1(function () { 2 3function $parcel$export(e, n, v, s) { 4 Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); 5} 6 7function $parcel$interopDefault(a) { 8 return a && a.__esModule ? a.default : a; 9} 10 11 var $parcel$global = 12 typeof globalThis !== 'undefined' 13 ? globalThis 14 : typeof self !== 'undefined' 15 ? self 16 : typeof window !== 'undefined' 17 ? window 18 : typeof global !== 'undefined' 19 ? global 20 : {}; 21 22var $parcel$modules = {}; 23var $parcel$inits = {}; 24 25var parcelRequire = $parcel$global["parcelRequire7dd8"]; 26 27if (parcelRequire == null) { 28 parcelRequire = function(id) { 29 if (id in $parcel$modules) { 30 return $parcel$modules[id].exports; 31 } 32 if (id in $parcel$inits) { 33 var init = $parcel$inits[id]; 34 delete $parcel$inits[id]; 35 var module = {id: id, exports: {}}; 36 $parcel$modules[id] = module; 37 init.call(module.exports, module, module.exports); 38 return module.exports; 39 } 40 var err = new Error("Cannot find module '" + id + "'"); 41 err.code = 'MODULE_NOT_FOUND'; 42 throw err; 43 }; 44 45 parcelRequire.register = function register(id, init) { 46 $parcel$inits[id] = init; 47 }; 48 49 $parcel$global["parcelRequire7dd8"] = parcelRequire; 50} 51 52var parcelRegister = parcelRequire.register; 53parcelRegister("jplPN", function(module, exports) { 54 55$parcel$export(module.exports, "Fragment", function () { return $e21149fb538acd68$export$ffb0004e005737fa; }, function (v) { return $e21149fb538acd68$export$ffb0004e005737fa = v; }); 56$parcel$export(module.exports, "jsx", function () { return $e21149fb538acd68$export$34b9dba7ce09269b; }, function (v) { return $e21149fb538acd68$export$34b9dba7ce09269b = v; }); 57$parcel$export(module.exports, "jsxs", function () { return $e21149fb538acd68$export$25062201e9e25d76; }, function (v) { return $e21149fb538acd68$export$25062201e9e25d76 = v; }); 58/** 59 * @license React 60 * react-jsx-runtime.production.min.js 61 * 62 * Copyright (c) Facebook, Inc. and its affiliates. 63 * 64 * This source code is licensed under the MIT license found in the 65 * LICENSE file in the root directory of this source tree. 66 */ var $e21149fb538acd68$export$ffb0004e005737fa; 67var $e21149fb538acd68$export$34b9dba7ce09269b; 68var $e21149fb538acd68$export$25062201e9e25d76; 69'use strict'; 70 71var $fYIks = parcelRequire("fYIks"); 72var $e21149fb538acd68$var$k = Symbol.for("react.element"), $e21149fb538acd68$var$l = Symbol.for("react.fragment"), $e21149fb538acd68$var$m = Object.prototype.hasOwnProperty, $e21149fb538acd68$var$n = $fYIks.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $e21149fb538acd68$var$p = { 73 key: !0, 74 ref: !0, 75 __self: !0, 76 __source: !0 77}; 78function $e21149fb538acd68$var$q(c, a, g) { 79 var b, d = {}, e = null, h = null; 80 void 0 !== g && (e = "" + g); 81 void 0 !== a.key && (e = "" + a.key); 82 void 0 !== a.ref && (h = a.ref); 83 for(b in a)$e21149fb538acd68$var$m.call(a, b) && !$e21149fb538acd68$var$p.hasOwnProperty(b) && (d[b] = a[b]); 84 if (c && c.defaultProps) for(b in a = c.defaultProps, a)void 0 === d[b] && (d[b] = a[b]); 85 return { 86 $$typeof: $e21149fb538acd68$var$k, 87 type: c, 88 key: e, 89 ref: h, 90 props: d, 91 _owner: $e21149fb538acd68$var$n.current 92 }; 93} 94$e21149fb538acd68$export$ffb0004e005737fa = $e21149fb538acd68$var$l; 95$e21149fb538acd68$export$34b9dba7ce09269b = $e21149fb538acd68$var$q; 96$e21149fb538acd68$export$25062201e9e25d76 = $e21149fb538acd68$var$q; 97 98}); 99parcelRegister("fYIks", function(module, exports) { 100'use strict'; 101 102module.exports = (parcelRequire("6SADM")); 103 104}); 105parcelRegister("6SADM", function(module, exports) { 106 107$parcel$export(module.exports, "Children", function () { return $50243547d56ed4fe$export$dca3b0875bd9a954; }, function (v) { return $50243547d56ed4fe$export$dca3b0875bd9a954 = v; }); 108$parcel$export(module.exports, "Component", function () { return $50243547d56ed4fe$export$16fa2f45be04daa8; }, function (v) { return $50243547d56ed4fe$export$16fa2f45be04daa8 = v; }); 109$parcel$export(module.exports, "Fragment", function () { return $50243547d56ed4fe$export$ffb0004e005737fa; }, function (v) { return $50243547d56ed4fe$export$ffb0004e005737fa = v; }); 110$parcel$export(module.exports, "Profiler", function () { return $50243547d56ed4fe$export$e2c29f18771995cb; }, function (v) { return $50243547d56ed4fe$export$e2c29f18771995cb = v; }); 111$parcel$export(module.exports, "PureComponent", function () { return $50243547d56ed4fe$export$221d75b3f55bb0bd; }, function (v) { return $50243547d56ed4fe$export$221d75b3f55bb0bd = v; }); 112$parcel$export(module.exports, "StrictMode", function () { return $50243547d56ed4fe$export$5f8d39834fd61797; }, function (v) { return $50243547d56ed4fe$export$5f8d39834fd61797 = v; }); 113$parcel$export(module.exports, "Suspense", function () { return $50243547d56ed4fe$export$74bf444e3cd11ea5; }, function (v) { return $50243547d56ed4fe$export$74bf444e3cd11ea5 = v; });
114$parcel$export(module.exports, "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", function () { return $50243547d56ed4fe$export$ae55be85d98224ed; }, function (v) { return $50243547d56ed4fe$export$ae55be85d98224ed = v; }); 115$parcel$export(module.exports, "act", function () { return $50243547d56ed4fe$export$3ba232387fd5d6dd; }, function (v) { return $50243547d56ed4fe$export$3ba232387fd5d6dd = v; }); 116$parcel$export(module.exports, "cloneElement", function () { return $50243547d56ed4fe$export$e530037191fcd5d7; }, function (v) { return $50243547d56ed4fe$export$e530037191fcd5d7 = v; }); 117$parcel$export(module.exports, "createContext", function () { return $50243547d56ed4fe$export$fd42f52fd3ae1109; }, function (v) { return $50243547d56ed4fe$export$fd42f52fd3ae1109 = v; }); 118$parcel$export(module.exports, "createElement", function () { return $50243547d56ed4fe$export$c8a8987d4410bf2d; }, function (v) { return $50243547d56ed4fe$export$c8a8987d4410bf2d = v; }); 119$parcel$export(module.exports, "createFactory", function () { return $50243547d56ed4fe$export$d38cd72104c1f0e9; }, function (v) { return $50243547d56ed4fe$export$d38cd72104c1f0e9 = v; }); 120$parcel$export(module.exports, "createRef", function () { return $50243547d56ed4fe$export$7d1e3a5e95ceca43; }, function (v) { return $50243547d56ed4fe$export$7d1e3a5e95ceca43 = v; }); 121$parcel$export(module.exports, "forwardRef", function () { return $50243547d56ed4fe$export$257a8862b851cb5b; }, function (v) { return $50243547d56ed4fe$export$257a8862b851cb5b = v; }); 122$parcel$export(module.exports, "isValidElement", function () { return $50243547d56ed4fe$export$a8257692ac88316c; }, function (v) { return $50243547d56ed4fe$export$a8257692ac88316c = v; }); 123$parcel$export(module.exports, "lazy", function () { return $50243547d56ed4fe$export$488013bae63b21da; }, function (v) { return $50243547d56ed4fe$export$488013bae63b21da = v; }); 124$parcel$export(module.exports, "memo", function () { return $50243547d56ed4fe$export$7c73462e0d25e514; }, function (v) { return $50243547d56ed4fe$export$7c73462e0d25e514 = v; }); 125$parcel$export(module.exports, "startTransition", function () { return $50243547d56ed4fe$export$7568632d0d33d16d; }, function (v) { return $50243547d56ed4fe$export$7568632d0d33d16d = v; }); 126$parcel$export(module.exports, "unstable_act", function () { return $50243547d56ed4fe$export$88948ce120ea2619; }, function (v) { return $50243547d56ed4fe$export$88948ce120ea2619 = v; }); 127$parcel$export(module.exports, "useCallback", function () { return $50243547d56ed4fe$export$35808ee640e87ca7; }, function (v) { return $50243547d56ed4fe$export$35808ee640e87ca7 = v; }); 128$parcel$export(module.exports, "useContext", function () { return $50243547d56ed4fe$export$fae74005e78b1a27; }, function (v) { return $50243547d56ed4fe$export$fae74005e78b1a27 = v; }); 129$parcel$export(module.exports, "useDebugValue", function () { return $50243547d56ed4fe$export$dc8fbce3eb94dc1e; }, function (v) { return $50243547d56ed4fe$export$dc8fbce3eb94dc1e = v; }); 130$parcel$export(module.exports, "useDeferredValue", function () { return $50243547d56ed4fe$export$6a7bc4e911dc01cf; }, function (v) { return $50243547d56ed4fe$export$6a7bc4e911dc01cf = v; }); 131$parcel$export(module.exports, "useEffect", function () { return $50243547d56ed4fe$export$6d9c69b0de29b591; }, function (v) { return $50243547d56ed4fe$export$6d9c69b0de29b591 = v; }); 132$parcel$export(module.exports, "useId", function () { return $50243547d56ed4fe$export$f680877a34711e37; }, function (v) { return $50243547d56ed4fe$export$f680877a34711e37 = v; }); 133$parcel$export(module.exports, "useImperativeHandle", function () { return $50243547d56ed4fe$export$d5a552a76deda3c2; }, function (v) { return $50243547d56ed4fe$export$d5a552a76deda3c2 = v; }); 134$parcel$export(module.exports, "useInsertionEffect", function () { return $50243547d56ed4fe$export$aaabe4eda9ed9969; }, function (v) { return $50243547d56ed4fe$export$aaabe4eda9ed9969 = v; }); 135$parcel$export(module.exports, "useLayoutEffect", function () { return $50243547d56ed4fe$export$e5c5a5f917a5871c; }, function (v) { return $50243547d56ed4fe$export$e5c5a5f917a5871c = v; }); 136$parcel$export(module.exports, "useMemo", function () { return $50243547d56ed4fe$export$1538c33de8887b59; }, function (v) { return $50243547d56ed4fe$export$1538c33de8887b59 = v; }); 137$parcel$export(module.exports, "useReducer", function () { return $50243547d56ed4fe$export$13e3392192263954; }, function (v) { return $50243547d56ed4fe$export$13e3392192263954 = v; }); 138$parcel$export(module.exports, "useRef", function () { return $50243547d56ed4fe$export$b8f5890fc79d6aca; }, function (v) { return $50243547d56ed4fe$export$b8f5890fc79d6aca = v; }); 139$parcel$export(module.exports, "useState", function () { return $50243547d56ed4fe$export$60241385465d0a34; }, function (v) { return $50243547d56ed4fe$export$60241385465d0a34 = v; }); 140$parcel$export(module.exports, "useSyncExternalStore", function () { return $50243547d56ed4fe$export$306c0aa65ff9ec16; }, function (v) { return $50243547d56ed4fe$export$306c0aa65ff9ec16 = v; }); 141$parcel$export(module.exports, "useTransition", function () { return $50243547d56ed4fe$export$7b286972b8d8ccbf; }, function (v) { return $50243547d56ed4fe$export$7b286972b8d8ccbf = v; }); 142$parcel$export(module.exports, "version", function () { return $50243547d56ed4fe$export$83d89fbfd8236492; }, function (v) { return $50243547d56ed4fe$export$83d89fbfd8236492 = v; }); 143/** 144 * @license React 145 * react.production.min.js 146 * 147 * Copyright (c) Facebook, Inc. and its affiliates. 148 * 149 * This source code is licensed under the MIT license found in the 150 * LICENSE file in the root directory of this source tree. 151 */ var $50243547d56ed4fe$export$dca3b0875bd9a954; 152var $50243547d56ed4fe$export$16fa2f45be04daa8; 153var $50243547d56ed4fe$export$ffb0004e005737fa; 154var $50243547d56ed4fe$export$e2c29f18771995cb; 155var $50243547d56ed4fe$export$221d75b3f55bb0bd; 156var $50243547d56ed4fe$export$5f8d39834fd61797; 157var $50243547d56ed4fe$export$74bf444e3cd11ea5; 158var $50243547d56ed4fe$export$ae55be85d98224ed; 159var $50243547d56ed4fe$export$3ba232387fd5d6dd; 160var $50243547d56ed4fe$export$e530037191fcd5d7; 161var $50243547d56ed4fe$export$fd42f52fd3ae1109; 162var $50243547d56ed4fe$export$c8a8987d4410bf2d; 163var $50243547d56ed4fe$export$d38cd72104c1f0e9; 164var $50243547d56ed4fe$export$7d1e3a5e95ceca43; 165var $50243547d56ed4fe$export$257a8862b851cb5b; 166var $50243547d56ed4fe$export$a8257692ac88316c; 167var $50243547d56ed4fe$export$488013bae63b21da; 168var $50243547d56ed4fe$export$7c73462e0d25e514; 169var $50243547d56ed4fe$export$7568632d0d33d16d; 170var $50243547d56ed4fe$export$88948ce120ea2619; 171var $50243547d56ed4fe$export$35808ee640e87ca7; 172var $50243547d56ed4fe$export$fae74005e78b1a27; 173var $50243547d56ed4fe$export$dc8fbce3eb94dc1e; 174var $50243547d56ed4fe$export$6a7bc4e911dc01cf; 175var $50243547d56ed4fe$export$6d9c69b0de29b591; 176var $50243547d56ed4fe$export$f680877a34711e37; 177var $50243547d56ed4fe$export$d5a552a76deda3c2; 178var $50243547d56ed4fe$export$aaabe4eda9ed9969; 179var $50243547d56ed4fe$export$e5c5a5f917a5871c; 180var $50243547d56ed4fe$export$1538c33de8887b59; 181var $50243547d56ed4fe$export$13e3392192263954; 182var $50243547d56ed4fe$export$b8f5890fc79d6aca; 183var $50243547d56ed4fe$export$60241385465d0a34; 184var $50243547d56ed4fe$export$306c0aa65ff9ec16; 185var $50243547d56ed4fe$export$7b286972b8d8ccbf; 186var $50243547d56ed4fe$export$83d89fbfd8236492; 187'use strict'; 188var $50243547d56ed4fe$var$l = Symbol.for("react.element"), $50243547d56ed4fe$var$n = Symbol.for("react.portal"), $50243547d56ed4fe$var$p = Symbol.for("react.fragment"), $50243547d56ed4fe$var$q =
vendor: 6,835 bytes, lines 188-347
188Symbol.for("react.strict_mode"), $50243547d56ed4fe$var$r = Symbol.for("react.profiler"), $50243547d56ed4fe$var$t = Symbol.for("react.provider"), $50243547d56ed4fe$var$u = Symbol.for("react.context"), $50243547d56ed4fe$var$v = Symbol.for("react.forward_ref"), $50243547d56ed4fe$var$w = Symbol.for("react.suspense"), $50243547d56ed4fe$var$x = Symbol.for("react.memo"), $50243547d56ed4fe$var$y = Symbol.for("react.lazy"), $50243547d56ed4fe$var$z = Symbol.iterator; 189function $50243547d56ed4fe$var$A(a) { 190 if (null === a || "object" !== typeof a) return null; 191 a = $50243547d56ed4fe$var$z && a[$50243547d56ed4fe$var$z] || a["@@iterator"]; 192 return "function" === typeof a ? a : null; 193} 194var $50243547d56ed4fe$var$B = { 195 isMounted: function() { 196 return !1; 197 }, 198 enqueueForceUpdate: function() {}, 199 enqueueReplaceState: function() {}, 200 enqueueSetState: function() {} 201}, $50243547d56ed4fe$var$C = Object.assign, $50243547d56ed4fe$var$D = {}; 202function $50243547d56ed4fe$var$E(a, b, e) { 203 this.props = a; 204 this.context = b; 205 this.refs = $50243547d56ed4fe$var$D; 206 this.updater = e || $50243547d56ed4fe$var$B; 207} 208$50243547d56ed4fe$var$E.prototype.isReactComponent = {}; 209$50243547d56ed4fe$var$E.prototype.setState = function(a, b) { 210 if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); 211 this.updater.enqueueSetState(this, a, b, "setState"); 212}; 213$50243547d56ed4fe$var$E.prototype.forceUpdate = function(a) { 214 this.updater.enqueueForceUpdate(this, a, "forceUpdate"); 215}; 216function $50243547d56ed4fe$var$F() {} 217$50243547d56ed4fe$var$F.prototype = $50243547d56ed4fe$var$E.prototype; 218function $50243547d56ed4fe$var$G(a, b, e) { 219 this.props = a; 220 this.context = b; 221 this.refs = $50243547d56ed4fe$var$D; 222 this.updater = e || $50243547d56ed4fe$var$B; 223} 224var $50243547d56ed4fe$var$H = $50243547d56ed4fe$var$G.prototype = new $50243547d56ed4fe$var$F; 225$50243547d56ed4fe$var$H.constructor = $50243547d56ed4fe$var$G; 226$50243547d56ed4fe$var$C($50243547d56ed4fe$var$H, $50243547d56ed4fe$var$E.prototype); 227$50243547d56ed4fe$var$H.isPureReactComponent = !0; 228var $50243547d56ed4fe$var$I = Array.isArray, $50243547d56ed4fe$var$J = Object.prototype.hasOwnProperty, $50243547d56ed4fe$var$K = { 229 current: null 230}, $50243547d56ed4fe$var$L = { 231 key: !0, 232 ref: !0, 233 __self: !0, 234 __source: !0 235}; 236function $50243547d56ed4fe$var$M(a, b, e) { 237 var d, c = {}, k = null, h = null; 238 if (null != b) for(d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b)$50243547d56ed4fe$var$J.call(b, d) && !$50243547d56ed4fe$var$L.hasOwnProperty(d) && (c[d] = b[d]); 239 var g = arguments.length - 2; 240 if (1 === g) c.children = e; 241 else if (1 < g) { 242 for(var f = Array(g), m = 0; m < g; m++)f[m] = arguments[m + 2]; 243 c.children = f; 244 } 245 if (a && a.defaultProps) for(d in g = a.defaultProps, g)void 0 === c[d] && (c[d] = g[d]); 246 return { 247 $$typeof: $50243547d56ed4fe$var$l, 248 type: a, 249 key: k, 250 ref: h, 251 props: c, 252 _owner: $50243547d56ed4fe$var$K.current 253 }; 254} 255function $50243547d56ed4fe$var$N(a, b) { 256 return { 257 $$typeof: $50243547d56ed4fe$var$l, 258 type: a.type, 259 key: b, 260 ref: a.ref, 261 props: a.props, 262 _owner: a._owner 263 }; 264} 265function $50243547d56ed4fe$var$O(a) { 266 return "object" === typeof a && null !== a && a.$$typeof === $50243547d56ed4fe$var$l; 267} 268function $50243547d56ed4fe$var$escape(a) { 269 var b = { 270 "=": "=0", 271 ":": "=2" 272 }; 273 return "$" + a.replace(/[=:]/g, function(a) { 274 return b[a]; 275 }); 276} 277var $50243547d56ed4fe$var$P = /\/+/g; 278function $50243547d56ed4fe$var$Q(a, b) { 279 return "object" === typeof a && null !== a && null != a.key ? $50243547d56ed4fe$var$escape("" + a.key) : b.toString(36); 280} 281function $50243547d56ed4fe$var$R(a, b, e, d, c) { 282 var k = typeof a; 283 if ("undefined" === k || "boolean" === k) a = null; 284 var h = !1; 285 if (null === a) h = !0; 286 else switch(k){ 287 case "string": 288 case "number": 289 h = !0; 290 break; 291 case "object": 292 switch(a.$$typeof){ 293 case $50243547d56ed4fe$var$l: 294 case $50243547d56ed4fe$var$n: 295 h = !0; 296 } 297 } 298 if (h) return h = a, c = c(h), a = "" === d ? "." + $50243547d56ed4fe$var$Q(h, 0) : d, $50243547d56ed4fe$var$I(c) ? (e = "", null != a && (e = a.replace($50243547d56ed4fe$var$P, "$&/") + "/"), $50243547d56ed4fe$var$R(c, b, e, "", function(a) { 299 return a; 300 })) : null != c && ($50243547d56ed4fe$var$O(c) && (c = $50243547d56ed4fe$var$N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace($50243547d56ed4fe$var$P, "$&/") + "/") + a)), b.push(c)), 1; 301 h = 0; 302 d = "" === d ? "." : d + ":"; 303 if ($50243547d56ed4fe$var$I(a)) for(var g = 0; g < a.length; g++){ 304 k = a[g]; 305 var f = d + $50243547d56ed4fe$var$Q(k, g); 306 h += $50243547d56ed4fe$var$R(k, b, e, f, c); 307 } 308 else if (f = $50243547d56ed4fe$var$A(a), "function" === typeof f) for(a = f.call(a), g = 0; !(k = a.next()).done;)k = k.value, f = d + $50243547d56ed4fe$var$Q(k, g++), h += $50243547d56ed4fe$var$R(k, b, e, f, c); 309 else if ("object" === k) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead."); 310 return h; 311} 312function $50243547d56ed4fe$var$S(a, b, e) { 313 if (null == a) return a; 314 var d = [], c = 0; 315 $50243547d56ed4fe$var$R(a, d, "", "", function(a) { 316 return b.call(e, a, c++); 317 }); 318 return d; 319} 320function $50243547d56ed4fe$var$T(a) { 321 if (-1 === a._status) { 322 var b = a._result; 323 b = b(); 324 b.then(function(b) { 325 if (0 === a._status || -1 === a._status) a._status = 1, a._result = b; 326 }, function(b) { 327 if (0 === a._status || -1 === a._status) a._status = 2, a._result = b; 328 }); 329 -1 === a._status && (a._status = 0, a._result = b); 330 } 331 if (1 === a._status) return a._result.default; 332 throw a._result; 333} 334var $50243547d56ed4fe$var$U = { 335 current: null 336}, $50243547d56ed4fe$var$V = { 337 transition: null 338}, $50243547d56ed4fe$var$W = { 339 ReactCurrentDispatcher: $50243547d56ed4fe$var$U, 340 ReactCurrentBatchConfig: $50243547d56ed4fe$var$V, 341 ReactCurrentOwner: $50243547d56ed4fe$var$K 342}; 343function $50243547d56ed4fe$var$X() { 344 throw Error("act(...) is not supported in production builds of React."); 345} 346$50243547d56ed4fe$export$dca3b0875bd9a954 = { 347 map: $50243547d56ed4fe$var$S,
348 forEach: function(a, b, e) { 349 $50243547d56ed4fe$var$S(a, function() { 350 b.apply(this, arguments); 351 }, e); 352 }, 353 count: function(a) { 354 var b = 0; 355 $50243547d56ed4fe$var$S(a, function() { 356 b++; 357 }); 358 return b; 359 }, 360 toArray: function(a) { 361 return $50243547d56ed4fe$var$S(a, function(a) { 362 return a; 363 }) || []; 364 }, 365 only: function(a) { 366 if (!$50243547d56ed4fe$var$O(a)) throw Error("React.Children.only expected to receive a single React element child."); 367 return a; 368 } 369}; 370$50243547d56ed4fe$export$16fa2f45be04daa8 = $50243547d56ed4fe$var$E; 371$50243547d56ed4fe$export$ffb0004e005737fa = $50243547d56ed4fe$var$p; 372$50243547d56ed4fe$export$e2c29f18771995cb = $50243547d56ed4fe$var$r; 373$50243547d56ed4fe$export$221d75b3f55bb0bd = $50243547d56ed4fe$var$G; 374$50243547d56ed4fe$export$5f8d39834fd61797 = $50243547d56ed4fe$var$q; 375$50243547d56ed4fe$export$74bf444e3cd11ea5 = $50243547d56ed4fe$var$w; 376$50243547d56ed4fe$export$ae55be85d98224ed = $50243547d56ed4fe$var$W; 377$50243547d56ed4fe$export$3ba232387fd5d6dd = $50243547d56ed4fe$var$X; 378$50243547d56ed4fe$export$e530037191fcd5d7 = function(a, b, e) { 379 if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + "."); 380 var d = $50243547d56ed4fe$var$C({}, a.props), c = a.key, k = a.ref, h = a._owner; 381 if (null != b) { 382 void 0 !== b.ref && (k = b.ref, h = $50243547d56ed4fe$var$K.current); 383 void 0 !== b.key && (c = "" + b.key); 384 if (a.type && a.type.defaultProps) var g = a.type.defaultProps; 385 for(f in b)$50243547d56ed4fe$var$J.call(b, f) && !$50243547d56ed4fe$var$L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]); 386 } 387 var f = arguments.length - 2; 388 if (1 === f) d.children = e; 389 else if (1 < f) { 390 g = Array(f); 391 for(var m = 0; m < f; m++)g[m] = arguments[m + 2]; 392 d.children = g; 393 } 394 return { 395 $$typeof: $50243547d56ed4fe$var$l, 396 type: a.type, 397 key: c, 398 ref: k, 399 props: d, 400 _owner: h 401 }; 402}; 403$50243547d56ed4fe$export$fd42f52fd3ae1109 = function(a) { 404 a = { 405 $$typeof: $50243547d56ed4fe$var$u, 406 _currentValue: a, 407 _currentValue2: a, 408 _threadCount: 0, 409 Provider: null, 410 Consumer: null, 411 _defaultValue: null, 412 _globalName: null 413 }; 414 a.Provider = { 415 $$typeof: $50243547d56ed4fe$var$t, 416 _context: a 417 }; 418 return a.Consumer = a; 419}; 420$50243547d56ed4fe$export$c8a8987d4410bf2d = $50243547d56ed4fe$var$M; 421$50243547d56ed4fe$export$d38cd72104c1f0e9 = function(a) { 422 var b = $50243547d56ed4fe$var$M.bind(null, a); 423 b.type = a; 424 return b; 425}; 426$50243547d56ed4fe$export$7d1e3a5e95ceca43 = function() { 427 return { 428 current: null 429 }; 430}; 431$50243547d56ed4fe$export$257a8862b851cb5b = function(a) { 432 return { 433 $$typeof: $50243547d56ed4fe$var$v, 434 render: a 435 }; 436}; 437$50243547d56ed4fe$export$a8257692ac88316c = $50243547d56ed4fe$var$O; 438$50243547d56ed4fe$export$488013bae63b21da = function(a) { 439 return { 440 $$typeof: $50243547d56ed4fe$var$y, 441 _payload: { 442 _status: -1, 443 _result: a 444 }, 445 _init: $50243547d56ed4fe$var$T 446 }; 447}; 448$50243547d56ed4fe$export$7c73462e0d25e514 = function(a, b) { 449 return { 450 $$typeof: $50243547d56ed4fe$var$x, 451 type: a, 452 compare: void 0 === b ? null : b 453 }; 454}; 455$50243547d56ed4fe$export$7568632d0d33d16d = function(a) { 456 var b = $50243547d56ed4fe$var$V.transition; 457 $50243547d56ed4fe$var$V.transition = {}; 458 try { 459 a(); 460 } finally{ 461 $50243547d56ed4fe$var$V.transition = b; 462 } 463}; 464$50243547d56ed4fe$export$88948ce120ea2619 = $50243547d56ed4fe$var$X; 465$50243547d56ed4fe$export$35808ee640e87ca7 = function(a, b) { 466 return $50243547d56ed4fe$var$U.current.useCallback(a, b); 467}; 468$50243547d56ed4fe$export$fae74005e78b1a27 = function(a) { 469 return $50243547d56ed4fe$var$U.current.useContext(a); 470}; 471$50243547d56ed4fe$export$dc8fbce3eb94dc1e = function() {}; 472$50243547d56ed4fe$export$6a7bc4e911dc01cf = function(a) { 473 return $50243547d56ed4fe$var$U.current.useDeferredValue(a); 474}; 475$50243547d56ed4fe$export$6d9c69b0de29b591 = function(a, b) { 476 return $50243547d56ed4fe$var$U.current.useEffect(a, b); 477}; 478$50243547d56ed4fe$export$f680877a34711e37 = function() { 479 return $50243547d56ed4fe$var$U.current.useId(); 480}; 481$50243547d56ed4fe$export$d5a552a76deda3c2 = function(a, b, e) { 482 return $50243547d56ed4fe$var$U.current.useImperativeHandle(a, b, e); 483}; 484$50243547d56ed4fe$export$aaabe4eda9ed9969 = function(a, b) { 485 return $50243547d56ed4fe$var$U.current.useInsertionEffect(a, b); 486}; 487$50243547d56ed4fe$export$e5c5a5f917a5871c = function(a, b) { 488 return $50243547d56ed4fe$var$U.current.useLayoutEffect(a, b); 489}; 490$50243547d56ed4fe$export$1538c33de8887b59 = function(a, b) { 491 return $50243547d56ed4fe$var$U.current.useMemo(a, b); 492}; 493$50243547d56ed4fe$export$13e3392192263954 = function(a, b, e) { 494 return $50243547d56ed4fe$var$U.current.useReducer(a, b, e); 495}; 496$50243547d56ed4fe$export$b8f5890fc79d6aca = function(a) { 497 return $50243547d56ed4fe$var$U.current.useRef(a); 498}; 499$50243547d56ed4fe$export$60241385465d0a34 = function(a) { 500 return $50243547d56ed4fe$var$U.current.useState(a); 501}; 502$50243547d56ed4fe$export$306c0aa65ff9ec16 = function(a, b, e) { 503 return $50243547d56ed4fe$var$U.current.useSyncExternalStore(a, b, e); 504}; 505$50243547d56ed4fe$export$7b286972b8d8ccbf = function() { 506 return $50243547d56ed4fe$var$U.current.useTransition(); 507}; 508$50243547d56ed4fe$export$83d89fbfd8236492 = "18.3.1"; 509 510}); 511 512 513
514parcelRegister("1QJnT", function(module, exports) { 515 516$parcel$export(module.exports, "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", function () { return $158dda26ac6b94e2$export$ae55be85d98224ed; }, function (v) { return $158dda26ac6b94e2$export$ae55be85d98224ed = v; }); 517$parcel$export(module.exports, "createPortal", function () { return $158dda26ac6b94e2$export$d39a5bbd09211389; }, function (v) { return $158dda26ac6b94e2$export$d39a5bbd09211389 = v; }); 518$parcel$export(module.exports, "createRoot", function () { return $158dda26ac6b94e2$export$882461b6382ed46c; }, function (v) { return $158dda26ac6b94e2$export$882461b6382ed46c = v; }); 519$parcel$export(module.exports, "findDOMNode", function () { return $158dda26ac6b94e2$export$466bfc07425424d5; }, function (v) { return $158dda26ac6b94e2$export$466bfc07425424d5 = v; }); 520$parcel$export(module.exports, "flushSync", function () { return $158dda26ac6b94e2$export$cd75ccfd720a3cd4; }, function (v) { return $158dda26ac6b94e2$export$cd75ccfd720a3cd4 = v; }); 521$parcel$export(module.exports, "hydrate", function () { return $158dda26ac6b94e2$export$fa8d919ba61d84db; }, function (v) { return $158dda26ac6b94e2$export$fa8d919ba61d84db = v; }); 522$parcel$export(module.exports, "hydrateRoot", function () { return $158dda26ac6b94e2$export$757ceba2d55c277e; }, function (v) { return $158dda26ac6b94e2$export$757ceba2d55c277e = v; }); 523$parcel$export(module.exports, "render", function () { return $158dda26ac6b94e2$export$b3890eb0ae9dca99; }, function (v) { return $158dda26ac6b94e2$export$b3890eb0ae9dca99 = v; }); 524$parcel$export(module.exports, "unmountComponentAtNode", function () { return $158dda26ac6b94e2$export$502457920280e6be; }, function (v) { return $158dda26ac6b94e2$export$502457920280e6be = v; }); 525$parcel$export(module.exports, "unstable_batchedUpdates", function () { return $158dda26ac6b94e2$export$c78a37762a8d58e1; }, function (v) { return $158dda26ac6b94e2$export$c78a37762a8d58e1 = v; }); 526$parcel$export(module.exports, "unstable_renderSubtreeIntoContainer", function () { return $158dda26ac6b94e2$export$dc54d992c10e8a18; }, function (v) { return $158dda26ac6b94e2$export$dc54d992c10e8a18 = v; }); 527$parcel$export(module.exports, "version", function () { return $158dda26ac6b94e2$export$83d89fbfd8236492; }, function (v) { return $158dda26ac6b94e2$export$83d89fbfd8236492 = v; }); 528/** 529 * @license React 530 * react-dom.production.min.js 531 * 532 * Copyright (c) Facebook, Inc. and its affiliates. 533 * 534 * This source code is licensed under the MIT license found in the 535 * LICENSE file in the root directory of this source tree. 536 */ /* 537 Modernizr 3.0.0pre (Custom Build) | MIT 538*/ var $158dda26ac6b94e2$export$ae55be85d98224ed; 539var $158dda26ac6b94e2$export$d39a5bbd09211389; 540var $158dda26ac6b94e2$export$882461b6382ed46c; 541var $158dda26ac6b94e2$export$466bfc07425424d5; 542var $158dda26ac6b94e2$export$cd75ccfd720a3cd4; 543var $158dda26ac6b94e2$export$fa8d919ba61d84db; 544var $158dda26ac6b94e2$export$757ceba2d55c277e; 545var $158dda26ac6b94e2$export$b3890eb0ae9dca99; 546var $158dda26ac6b94e2$export$502457920280e6be; 547var $158dda26ac6b94e2$export$c78a37762a8d58e1; 548var $158dda26ac6b94e2$export$dc54d992c10e8a18; 549var $158dda26ac6b94e2$export$83d89fbfd8236492; 550'use strict'; 551 552var $fYIks = parcelRequire("fYIks"); 553 554var $25SSU = parcelRequire("25SSU"); 555function $158dda26ac6b94e2$var$p(a) { 556 for(var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++)b += "&args[]=" + encodeURIComponent(arguments[c]); 557 return "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; 558} 559var $158dda26ac6b94e2$var$da = new Set, $158dda26ac6b94e2$var$ea = {}; 560function $158dda26ac6b94e2$var$fa(a, b) { 561 $158dda26ac6b94e2$var$ha(a, b); 562 $158dda26ac6b94e2$var$ha(a + "Capture", b); 563} 564function $158dda26ac6b94e2$var$ha(a, b) { 565 $158dda26ac6b94e2$var$ea[a] = b; 566 for(a = 0; a < b.length; a++)$158dda26ac6b94e2$var$da.add(b[a]); 567} 568var $158dda26ac6b94e2$var$ia = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), $158dda26ac6b94e2$var$ja = Object.prototype.hasOwnProperty, $158dda26ac6b94e2$var$ka = /^[: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]*$/, $158dda26ac6b94e2$var$la = {}, $158dda26ac6b94e2$var$ma = {}; 569function $158dda26ac6b94e2$var$oa(a) { 570 if ($158dda26ac6b94e2$var$ja.call($158dda26ac6b94e2$var$ma, a)) return !0; 571 if ($158dda26ac6b94e2$var$ja.call($158dda26ac6b94e2$var$la, a)) return !1; 572 if ($158dda26ac6b94e2$var$ka.test(a)) return $158dda26ac6b94e2$var$ma[a] = !0; 573 $158dda26ac6b94e2$var$la[a] = !0; 574 return !1; 575} 576function $158dda26ac6b94e2$var$pa(a, b, c, d) { 577 if (null !== c && 0 === c.type) return !1; 578 switch(typeof b){ 579 case "function": 580 case "symbol": 581 return !0; 582 case "boolean": 583 if (d) return !1; 584 if (null !== c) return !c.acceptsBooleans; 585 a = a.toLowerCase().slice(0, 5); 586 return "data-" !== a && "aria-" !== a; 587 default: 588 return !1; 589 } 590} 591function $158dda26ac6b94e2$var$qa(a, b, c, d) { 592 if (null === b || "undefined" === typeof b || $158dda26ac6b94e2$var$pa(a, b, c, d)) return !0; 593 if (d) return !1; 594 if (null !== c) switch(c.type){ 595 case 3: 596 return !b; 597 case 4: 598 return !1 === b; 599 case 5: 600 return isNaN(b); 601 case 6: 602 return isNaN(b) || 1 > b; 603 } 604 return !1; 605} 606function $158dda26ac6b94e2$var$v(a, b, c, d, e, f, g) { 607 this.acceptsBooleans = 2 === b || 3 === b || 4 === b; 608 this.attributeName = d; 609 this.attributeNamespace = e; 610 this.mustUseProperty = c; 611 this.propertyName = a; 612 this.type = b; 613 this.sanitizeURL = f; 614 this.removeEmptyString = g; 615} 616var $158dda26ac6b94e2$var$z = {}; 617"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a) { 618 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 0, !1, a, null, !1, !1); 619}); 620[ 621 [ 622 "acceptCharset", 623 "accept-charset" 624 ], 625 [ 626 "className", 627 "class" 628 ], 629 [ 630 "htmlFor", 631 "for" 632 ], 633 [ 634 "httpEquiv", 635 "http-equiv" 636 ]
637].forEach(function(a) { 638 var b = a[0]; 639 $158dda26ac6b94e2$var$z[b] = new $158dda26ac6b94e2$var$v(b, 1, !1, a[1], null, !1, !1); 640}); 641[ 642 "contentEditable", 643 "draggable", 644 "spellCheck", 645 "value" 646].forEach(function(a) { 647 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 2, !1, a.toLowerCase(), null, !1, !1); 648}); 649[ 650 "autoReverse", 651 "externalResourcesRequired", 652 "focusable", 653 "preserveAlpha" 654].forEach(function(a) { 655 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 2, !1, a, null, !1, !1); 656}); 657"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a) { 658 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 3, !1, a.toLowerCase(), null, !1, !1); 659}); 660[ 661 "checked", 662 "multiple", 663 "muted", 664 "selected" 665].forEach(function(a) { 666 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 3, !0, a, null, !1, !1); 667}); 668[ 669 "capture", 670 "download" 671].forEach(function(a) { 672 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 4, !1, a, null, !1, !1); 673}); 674[ 675 "cols", 676 "rows", 677 "size", 678 "span" 679].forEach(function(a) { 680 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 6, !1, a, null, !1, !1); 681}); 682[ 683 "rowSpan", 684 "start" 685].forEach(function(a) { 686 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 5, !1, a.toLowerCase(), null, !1, !1); 687}); 688var $158dda26ac6b94e2$var$ra = /[\-:]([a-z])/g; 689function $158dda26ac6b94e2$var$sa(a) { 690 return a[1].toUpperCase(); 691} 692"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(a) { 693 var b = a.replace($158dda26ac6b94e2$var$ra, $158dda26ac6b94e2$var$sa); 694 $158dda26ac6b94e2$var$z[b] = new $158dda26ac6b94e2$var$v(b, 1, !1, a, null, !1, !1); 695}); 696"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a) { 697 var b = a.replace($158dda26ac6b94e2$var$ra, $158dda26ac6b94e2$var$sa); 698 $158dda26ac6b94e2$var$z[b] = new $158dda26ac6b94e2$var$v(b, 1, !1, a, "http://www.w3.org/1999/xlink", !1, !1); 699}); 700[ 701 "xml:base", 702 "xml:lang", 703 "xml:space" 704].forEach(function(a) { 705 var b = a.replace($158dda26ac6b94e2$var$ra, $158dda26ac6b94e2$var$sa); 706 $158dda26ac6b94e2$var$z[b] = new $158dda26ac6b94e2$var$v(b, 1, !1, a, "http://www.w3.org/XML/1998/namespace", !1, !1); 707}); 708[ 709 "tabIndex", 710 "crossOrigin" 711].forEach(function(a) { 712 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 1, !1, a.toLowerCase(), null, !1, !1); 713}); 714$158dda26ac6b94e2$var$z.xlinkHref = new $158dda26ac6b94e2$var$v("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1); 715[ 716 "src", 717 "href", 718 "action", 719 "formAction" 720].forEach(function(a) { 721 $158dda26ac6b94e2$var$z[a] = new $158dda26ac6b94e2$var$v(a, 1, !1, a.toLowerCase(), null, !0, !0); 722}); 723function $158dda26ac6b94e2$var$ta(a, b, c, d) { 724 var e = $158dda26ac6b94e2$var$z.hasOwnProperty(b) ? $158dda26ac6b94e2$var$z[b] : null; 725 if (null !== e ? 0 !== e.type : d || !(2 < b.length) || "o" !== b[0] && "O" !== b[0] || "n" !== b[1] && "N" !== b[1]) $158dda26ac6b94e2$var$qa(b, c, e, d) && (c = null), d || null === e ? $158dda26ac6b94e2$var$oa(b) && (null === c ? a.removeAttribute(b) : a.setAttribute(b, "" + c)) : e.mustUseProperty ? a[e.propertyName] = null === c ? 3 === e.type ? !1 : "" : c : (b = e.attributeName, d = e.attributeNamespace, null === c ? a.removeAttribute(b) : (e = e.type, c = 3 === e || 4 === e && !0 === c ? "" : "" + c, d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c))); 726}
vendor: 43,232 bytes, lines 727-1919
727var $158dda26ac6b94e2$var$ua = $fYIks.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, $158dda26ac6b94e2$var$va = Symbol.for("react.element"), $158dda26ac6b94e2$var$wa = Symbol.for("react.portal"), $158dda26ac6b94e2$var$ya = Symbol.for("react.fragment"), $158dda26ac6b94e2$var$za = Symbol.for("react.strict_mode"), $158dda26ac6b94e2$var$Aa = Symbol.for("react.profiler"), $158dda26ac6b94e2$var$Ba = Symbol.for("react.provider"), $158dda26ac6b94e2$var$Ca = Symbol.for("react.context"), $158dda26ac6b94e2$var$Da = Symbol.for("react.forward_ref"), $158dda26ac6b94e2$var$Ea = Symbol.for("react.suspense"), $158dda26ac6b94e2$var$Fa = Symbol.for("react.suspense_list"), $158dda26ac6b94e2$var$Ga = Symbol.for("react.memo"), $158dda26ac6b94e2$var$Ha = Symbol.for("react.lazy"); 728Symbol.for("react.scope"); 729Symbol.for("react.debug_trace_mode"); 730var $158dda26ac6b94e2$var$Ia = Symbol.for("react.offscreen"); 731Symbol.for("react.legacy_hidden"); 732Symbol.for("react.cache"); 733Symbol.for("react.tracing_marker"); 734var $158dda26ac6b94e2$var$Ja = Symbol.iterator; 735function $158dda26ac6b94e2$var$Ka(a) { 736 if (null === a || "object" !== typeof a) return null; 737 a = $158dda26ac6b94e2$var$Ja && a[$158dda26ac6b94e2$var$Ja] || a["@@iterator"]; 738 return "function" === typeof a ? a : null; 739} 740var $158dda26ac6b94e2$var$A = Object.assign, $158dda26ac6b94e2$var$La; 741function $158dda26ac6b94e2$var$Ma(a) { 742 if (void 0 === $158dda26ac6b94e2$var$La) try { 743 throw Error(); 744 } catch (c) { 745 var b = c.stack.trim().match(/\n( *(at )?)/); 746 $158dda26ac6b94e2$var$La = b && b[1] || ""; 747 } 748 return "\n" + $158dda26ac6b94e2$var$La + a; 749} 750var $158dda26ac6b94e2$var$Na = !1; 751function $158dda26ac6b94e2$var$Oa(a, b) { 752 if (!a || $158dda26ac6b94e2$var$Na) return ""; 753 $158dda26ac6b94e2$var$Na = !0; 754 var c = Error.prepareStackTrace; 755 Error.prepareStackTrace = void 0; 756 try { 757 if (b) { 758 if (b = function() { 759 throw Error(); 760 }, Object.defineProperty(b.prototype, "props", { 761 set: function() { 762 throw Error(); 763 } 764 }), "object" === typeof Reflect && Reflect.construct) { 765 try { 766 Reflect.construct(b, []); 767 } catch (l) { 768 var d = l; 769 } 770 Reflect.construct(a, [], b); 771 } else { 772 try { 773 b.call(); 774 } catch (l) { 775 d = l; 776 } 777 a.call(b.prototype); 778 } 779 } else { 780 try { 781 throw Error(); 782 } catch (l) { 783 d = l; 784 } 785 a(); 786 } 787 } catch (l) { 788 if (l && d && "string" === typeof l.stack) { 789 for(var e = l.stack.split("\n"), f = d.stack.split("\n"), g = e.length - 1, h = f.length - 1; 1 <= g && 0 <= h && e[g] !== f[h];)h--; 790 for(; 1 <= g && 0 <= h; g--, h--)if (e[g] !== f[h]) { 791 if (1 !== g || 1 !== h) { 792 do if (g--, h--, 0 > h || e[g] !== f[h]) { 793 var k = "\n" + e[g].replace(" at new ", " at "); 794 a.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", a.displayName)); 795 return k; 796 } 797 while (1 <= g && 0 <= h); 798 } 799 break; 800 } 801 } 802 } finally{ 803 $158dda26ac6b94e2$var$Na = !1, Error.prepareStackTrace = c; 804 } 805 return (a = a ? a.displayName || a.name : "") ? $158dda26ac6b94e2$var$Ma(a) : ""; 806} 807function $158dda26ac6b94e2$var$Pa(a) { 808 switch(a.tag){ 809 case 5: 810 return $158dda26ac6b94e2$var$Ma(a.type); 811 case 16: 812 return $158dda26ac6b94e2$var$Ma("Lazy"); 813 case 13: 814 return $158dda26ac6b94e2$var$Ma("Suspense"); 815 case 19: 816 return $158dda26ac6b94e2$var$Ma("SuspenseList"); 817 case 0: 818 case 2: 819 case 15: 820 return a = $158dda26ac6b94e2$var$Oa(a.type, !1), a; 821 case 11: 822 return a = $158dda26ac6b94e2$var$Oa(a.type.render, !1), a; 823 case 1: 824 return a = $158dda26ac6b94e2$var$Oa(a.type, !0), a; 825 default: 826 return ""; 827 } 828} 829function $158dda26ac6b94e2$var$Qa(a) { 830 if (null == a) return null; 831 if ("function" === typeof a) return a.displayName || a.name || null; 832 if ("string" === typeof a) return a; 833 switch(a){ 834 case $158dda26ac6b94e2$var$ya: 835 return "Fragment"; 836 case $158dda26ac6b94e2$var$wa: 837 return "Portal"; 838 case $158dda26ac6b94e2$var$Aa: 839 return "Profiler"; 840 case $158dda26ac6b94e2$var$za: 841 return "StrictMode"; 842 case $158dda26ac6b94e2$var$Ea: 843 return "Suspense"; 844 case $158dda26ac6b94e2$var$Fa: 845 return "SuspenseList"; 846 } 847 if ("object" === typeof a) switch(a.$$typeof){ 848 case $158dda26ac6b94e2$var$Ca: 849 return (a.displayName || "Context") + ".Consumer"; 850 case $158dda26ac6b94e2$var$Ba: 851 return (a._context.displayName || "Context") + ".Provider"; 852 case $158dda26ac6b94e2$var$Da: 853 var b = a.render; 854 a = a.displayName; 855 a || (a = b.displayName || b.name || "", a = "" !== a ? "ForwardRef(" + a + ")" : "ForwardRef"); 856 return a; 857 case $158dda26ac6b94e2$var$Ga: 858 return b = a.displayName || null, null !== b ? b : $158dda26ac6b94e2$var$Qa(a.type) || "Memo"; 859 case $158dda26ac6b94e2$var$Ha: 860 b = a._payload; 861 a = a._init; 862 try { 863 return $158dda26ac6b94e2$var$Qa(a(b)); 864 } catch (c) {} 865 } 866 return null; 867} 868function $158dda26ac6b94e2$var$Ra(a) { 869 var b = a.type; 870 switch(a.tag){ 871 case 24: 872 return "Cache"; 873 case 9: 874 return (b.displayName || "Context") + ".Consumer"; 875 case 10: 876 return (b._context.displayName || "Context") + ".Provider"; 877 case 18: 878 return "DehydratedFragment"; 879 case 11: 880 return a = b.render, a = a.displayName || a.name || "", b.displayName || ("" !== a ? "ForwardRef(" + a + ")" : "ForwardRef"); 881 case 7: 882 return "Fragment"; 883 case 5: 884 return b; 885 case 4: 886 return "Portal"; 887 case 3: 888 return "Root"; 889 case 6: 890 return "Text"; 891 case 16: 892 return $158dda26ac6b94e2$var$Qa(b); 893 case 8: 894 return b === $158dda26ac6b94e2$var$za ? "StrictMode" : "Mode"; 895 case 22: 896 return "Offscreen"; 897 case 12: 898 return "Profiler"; 899 case 21: 900 return "Scope"; 901 case 13: 902 return "Suspense"; 903 case 19: 904 return "SuspenseList"; 905 case 25: 906 return "TracingMarker"; 907 case 1: 908 case 0: 909 case 17: 910 case 2: 911 case 14: 912 case 15: 913 if ("function" === typeof b) return b.displayName || b.name || null; 914 if ("string" === typeof b) return b; 915 } 916 return null; 917} 918function $158dda26ac6b94e2$var$Sa(a) { 919 switch(typeof a){ 920 case "boolean": 921 case "number": 922 case "string": 923 case "undefined": 924 return a; 925 case "object": 926 return a; 927 default: 928 return ""; 929 } 930} 931function $158dda26ac6b94e2$var$Ta(a) { 932 var b = a.type; 933 return (a = a.nodeName) && "input" === a.toLowerCase() && ("checkbox" === b || "radio" === b); 934} 935function $158dda26ac6b94e2$var$Ua(a) { 936 var b = $158dda26ac6b94e2$var$Ta(a) ? "checked" : "value", c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b), d = "" + a[b]; 937 if (!a.hasOwnProperty(b) && "undefined" !== typeof c && "function" === typeof c.get && "function" === typeof c.set) { 938 var e = c.get, f = c.set; 939 Object.defineProperty(a, b, { 940 configurable: !0, 941 get: function() { 942 return e.call(this); 943 }, 944 set: function(a) { 945 d = "" + a; 946 f.call(this, a); 947 } 948 }); 949 Object.defineProperty(a, b, { 950 enumerable: c.enumerable 951 }); 952 return { 953 getValue: function() { 954 return d; 955 }, 956 setValue: function(a) { 957 d = "" + a; 958 }, 959 stopTracking: function() { 960 a._valueTracker = null; 961 delete a[b]; 962 } 963 }; 964 } 965} 966function $158dda26ac6b94e2$var$Va(a) { 967 a._valueTracker || (a._valueTracker = $158dda26ac6b94e2$var$Ua(a)); 968} 969function $158dda26ac6b94e2$var$Wa(a) { 970 if (!a) return !1; 971 var b = a._valueTracker; 972 if (!b) return !0; 973 var c = b.getValue(); 974 var d = ""; 975 a && (d = $158dda26ac6b94e2$var$Ta(a) ? a.checked ? "true" : "false" : a.value); 976 a = d; 977 return a !== c ? (b.setValue(a), !0) : !1; 978} 979function $158dda26ac6b94e2$var$Xa(a) { 980 a = a || ("undefined" !== typeof document ? document : void 0); 981 if ("undefined" === typeof a) return null; 982 try { 983 return a.activeElement || a.body; 984 } catch (b) { 985 return a.body; 986 } 987} 988function $158dda26ac6b94e2$var$Ya(a, b) { 989 var c = b.checked; 990 return $158dda26ac6b94e2$var$A({}, b, { 991 defaultChecked: void 0, 992 defaultValue: void 0, 993 value: void 0, 994 checked: null != c ? c : a._wrapperState.initialChecked 995 }); 996} 997function $158dda26ac6b94e2$var$Za(a, b) { 998 var c = null == b.defaultValue ? "" : b.defaultValue, d = null != b.checked ? b.checked : b.defaultChecked; 999 c = $158dda26ac6b94e2$var$Sa(null != b.value ? b.value : c); 1000 a._wrapperState = { 1001 initialChecked: d, 1002 initialValue: c, 1003 controlled: "checkbox" === b.type || "radio" === b.type ? null != b.checked : null != b.value 1004 }; 1005} 1006function $158dda26ac6b94e2$var$ab(a, b) { 1007 b = b.checked; 1008 null != b && $158dda26ac6b94e2$var$ta(a, "checked", b, !1); 1009} 1010function $158dda26ac6b94e2$var$bb(a, b) { 1011 $158dda26ac6b94e2$var$ab(a, b); 1012 var c = $158dda26ac6b94e2$var$Sa(b.value), d = b.type; 1013 if (null != c) { 1014 if ("number" === d) { 1015 if (0 === c && "" === a.value || a.value != c) a.value = "" + c; 1016 } else a.value !== "" + c && (a.value = "" + c); 1017 } else if ("submit" === d || "reset" === d) { 1018 a.removeAttribute("value"); 1019 return; 1020 } 1021 b.hasOwnProperty("value") ? $158dda26ac6b94e2$var$cb(a, b.type, c) : b.hasOwnProperty("defaultValue") && $158dda26ac6b94e2$var$cb(a, b.type, $158dda26ac6b94e2$var$Sa(b.defaultValue)); 1022 null == b.checked && null != b.defaultChecked && (a.defaultChecked = !!b.defaultChecked); 1023} 1024function $158dda26ac6b94e2$var$db(a, b, c) { 1025 if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) { 1026 var d = b.type; 1027 if (!("submit" !== d && "reset" !== d || void 0 !== b.value && null !== b.value)) return; 1028 b = "" + a._wrapperState.initialValue; 1029 c || b === a.value || (a.value = b); 1030 a.defaultValue = b; 1031 } 1032 c = a.name; 1033 "" !== c && (a.name = ""); 1034 a.defaultChecked = !!a._wrapperState.initialChecked; 1035 "" !== c && (a.name = c); 1036} 1037function $158dda26ac6b94e2$var$cb(a, b, c) { 1038 if ("number" !== b || $158dda26ac6b94e2$var$Xa(a.ownerDocument) !== a) null == c ? a.defaultValue = "" + a._wrapperState.initialValue : a.defaultValue !== "" + c && (a.defaultValue = "" + c); 1039} 1040var $158dda26ac6b94e2$var$eb = Array.isArray; 1041function $158dda26ac6b94e2$var$fb(a, b, c, d) { 1042 a = a.options; 1043 if (b) { 1044 b = {}; 1045 for(var e = 0; e < c.length; e++)b["$" + c[e]] = !0; 1046 for(c = 0; c < a.length; c++)e = b.hasOwnProperty("$" + a[c].value), a[c].selected !== e && (a[c].selected = e), e && d && (a[c].defaultSelected = !0); 1047 } else { 1048 c = "" + $158dda26ac6b94e2$var$Sa(c); 1049 b = null; 1050 for(e = 0; e < a.length; e++){ 1051 if (a[e].value === c) { 1052 a[e].selected = !0; 1053 d && (a[e].defaultSelected = !0); 1054 return; 1055 } 1056 null !== b || a[e].disabled || (b = a[e]); 1057 } 1058 null !== b && (b.selected = !0); 1059 } 1060} 1061function $158dda26ac6b94e2$var$gb(a, b) { 1062 if (null != b.dangerouslySetInnerHTML) throw Error($158dda26ac6b94e2$var$p(91)); 1063 return $158dda26ac6b94e2$var$A({}, b, { 1064 value: void 0, 1065 defaultValue: void 0, 1066 children: "" + a._wrapperState.initialValue 1067 }); 1068} 1069function $158dda26ac6b94e2$var$hb(a, b) { 1070 var c = b.value; 1071 if (null == c) { 1072 c = b.children; 1073 b = b.defaultValue; 1074 if (null != c) { 1075 if (null != b) throw Error($158dda26ac6b94e2$var$p(92)); 1076 if ($158dda26ac6b94e2$var$eb(c)) { 1077 if (1 < c.length) throw Error($158dda26ac6b94e2$var$p(93)); 1078 c = c[0]; 1079 } 1080 b = c; 1081 } 1082 null == b && (b = ""); 1083 c = b; 1084 } 1085 a._wrapperState = { 1086 initialValue: $158dda26ac6b94e2$var$Sa(c) 1087 }; 1088} 1089function $158dda26ac6b94e2$var$ib(a, b) { 1090 var c = $158dda26ac6b94e2$var$Sa(b.value), d = $158dda26ac6b94e2$var$Sa(b.defaultValue); 1091 null != c && (c = "" + c, c !== a.value && (a.value = c), null == b.defaultValue && a.defaultValue !== c && (a.defaultValue = c)); 1092 null != d && (a.defaultValue = "" + d); 1093} 1094function $158dda26ac6b94e2$var$jb(a) { 1095 var b = a.textContent; 1096 b === a._wrapperState.initialValue && "" !== b && null !== b && (a.value = b); 1097} 1098function $158dda26ac6b94e2$var$kb(a) { 1099 switch(a){ 1100 case "svg": 1101 return "http://www.w3.org/2000/svg"; 1102 case "math": 1103 return "http://www.w3.org/1998/Math/MathML"; 1104 default: 1105 return "http://www.w3.org/1999/xhtml"; 1106 } 1107} 1108function $158dda26ac6b94e2$var$lb(a, b) { 1109 return null == a || "http://www.w3.org/1999/xhtml" === a ? $158dda26ac6b94e2$var$kb(b) : "http://www.w3.org/2000/svg" === a && "foreignObject" === b ? "http://www.w3.org/1999/xhtml" : a; 1110} 1111var $158dda26ac6b94e2$var$mb, $158dda26ac6b94e2$var$nb = function(a) { 1112 return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function(b, c, d, e) { 1113 MSApp.execUnsafeLocalFunction(function() { 1114 return a(b, c, d, e); 1115 }); 1116 } : a; 1117}(function(a, b) { 1118 if ("http://www.w3.org/2000/svg" !== a.namespaceURI || "innerHTML" in a) a.innerHTML = b; 1119 else { 1120 $158dda26ac6b94e2$var$mb = $158dda26ac6b94e2$var$mb || document.createElement("div"); 1121 $158dda26ac6b94e2$var$mb.innerHTML = "<svg>" + b.valueOf().toString() + "</svg>"; 1122 for(b = $158dda26ac6b94e2$var$mb.firstChild; a.firstChild;)a.removeChild(a.firstChild); 1123 for(; b.firstChild;)a.appendChild(b.firstChild); 1124 } 1125}); 1126function $158dda26ac6b94e2$var$ob(a, b) { 1127 if (b) { 1128 var c = a.firstChild; 1129 if (c && c === a.lastChild && 3 === c.nodeType) { 1130 c.nodeValue = b; 1131 return; 1132 } 1133 } 1134 a.textContent = b; 1135} 1136var $158dda26ac6b94e2$var$pb = { 1137 animationIterationCount: !0, 1138 aspectRatio: !0, 1139 borderImageOutset: !0, 1140 borderImageSlice: !0, 1141 borderImageWidth: !0, 1142 boxFlex: !0, 1143 boxFlexGroup: !0, 1144 boxOrdinalGroup: !0, 1145 columnCount: !0, 1146 columns: !0, 1147 flex: !0, 1148 flexGrow: !0, 1149 flexPositive: !0, 1150 flexShrink: !0, 1151 flexNegative: !0, 1152 flexOrder: !0, 1153 gridArea: !0, 1154 gridRow: !0, 1155 gridRowEnd: !0, 1156 gridRowSpan: !0, 1157 gridRowStart: !0, 1158 gridColumn: !0, 1159 gridColumnEnd: !0, 1160 gridColumnSpan: !0, 1161 gridColumnStart: !0, 1162 fontWeight: !0, 1163 lineClamp: !0, 1164 lineHeight: !0, 1165 opacity: !0, 1166 order: !0, 1167 orphans: !0, 1168 tabSize: !0, 1169 widows: !0, 1170 zIndex: !0, 1171 zoom: !0, 1172 fillOpacity: !0, 1173 floodOpacity: !0, 1174 stopOpacity: !0, 1175 strokeDasharray: !0, 1176 strokeDashoffset: !0, 1177 strokeMiterlimit: !0, 1178 strokeOpacity: !0, 1179 strokeWidth: !0 1180}, $158dda26ac6b94e2$var$qb = [ 1181 "Webkit", 1182 "ms", 1183 "Moz", 1184 "O" 1185]; 1186Object.keys($158dda26ac6b94e2$var$pb).forEach(function(a) { 1187 $158dda26ac6b94e2$var$qb.forEach(function(b) { 1188 b = b + a.charAt(0).toUpperCase() + a.substring(1); 1189 $158dda26ac6b94e2$var$pb[b] = $158dda26ac6b94e2$var$pb[a]; 1190 }); 1191}); 1192function $158dda26ac6b94e2$var$rb(a, b, c) { 1193 return null == b || "boolean" === typeof b || "" === b ? "" : c || "number" !== typeof b || 0 === b || $158dda26ac6b94e2$var$pb.hasOwnProperty(a) && $158dda26ac6b94e2$var$pb[a] ? ("" + b).trim() : b + "px"; 1194} 1195function $158dda26ac6b94e2$var$sb(a, b) { 1196 a = a.style; 1197 for(var c in b)if (b.hasOwnProperty(c)) { 1198 var d = 0 === c.indexOf("--"), e = $158dda26ac6b94e2$var$rb(c, b[c], d); 1199 "float" === c && (c = "cssFloat"); 1200 d ? a.setProperty(c, e) : a[c] = e; 1201 } 1202} 1203var $158dda26ac6b94e2$var$tb = $158dda26ac6b94e2$var$A({ 1204 menuitem: !0 1205}, { 1206 area: !0, 1207 base: !0, 1208 br: !0, 1209 col: !0, 1210 embed: !0, 1211 hr: !0, 1212 img: !0, 1213 input: !0, 1214 keygen: !0, 1215 link: !0, 1216 meta: !0, 1217 param: !0, 1218 source: !0, 1219 track: !0, 1220 wbr: !0 1221}); 1222function $158dda26ac6b94e2$var$ub(a, b) { 1223 if (b) { 1224 if ($158dda26ac6b94e2$var$tb[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error($158dda26ac6b94e2$var$p(137, a)); 1225 if (null != b.dangerouslySetInnerHTML) { 1226 if (null != b.children) throw Error($158dda26ac6b94e2$var$p(60)); 1227 if ("object" !== typeof b.dangerouslySetInnerHTML || !("__html" in b.dangerouslySetInnerHTML)) throw Error($158dda26ac6b94e2$var$p(61)); 1228 } 1229 if (null != b.style && "object" !== typeof b.style) throw Error($158dda26ac6b94e2$var$p(62)); 1230 } 1231} 1232function $158dda26ac6b94e2$var$vb(a, b) { 1233 if (-1 === a.indexOf("-")) return "string" === typeof b.is; 1234 switch(a){ 1235 case "annotation-xml": 1236 case "color-profile": 1237 case "font-face": 1238 case "font-face-src": 1239 case "font-face-uri": 1240 case "font-face-format": 1241 case "font-face-name": 1242 case "missing-glyph": 1243 return !1; 1244 default: 1245 return !0; 1246 } 1247} 1248var $158dda26ac6b94e2$var$wb = null; 1249function $158dda26ac6b94e2$var$xb(a) { 1250 a = a.target || a.srcElement || window; 1251 a.correspondingUseElement && (a = a.correspondingUseElement); 1252 return 3 === a.nodeType ? a.parentNode : a; 1253} 1254var $158dda26ac6b94e2$var$yb = null, $158dda26ac6b94e2$var$zb = null, $158dda26ac6b94e2$var$Ab = null; 1255function $158dda26ac6b94e2$var$Bb(a) { 1256 if (a = $158dda26ac6b94e2$var$Cb(a)) { 1257 if ("function" !== typeof $158dda26ac6b94e2$var$yb) throw Error($158dda26ac6b94e2$var$p(280)); 1258 var b = a.stateNode; 1259 b && (b = $158dda26ac6b94e2$var$Db(b), $158dda26ac6b94e2$var$yb(a.stateNode, a.type, b)); 1260 } 1261} 1262function $158dda26ac6b94e2$var$Eb(a) { 1263 $158dda26ac6b94e2$var$zb ? $158dda26ac6b94e2$var$Ab ? $158dda26ac6b94e2$var$Ab.push(a) : $158dda26ac6b94e2$var$Ab = [ 1264 a 1265 ] : $158dda26ac6b94e2$var$zb = a; 1266} 1267function $158dda26ac6b94e2$var$Fb() { 1268 if ($158dda26ac6b94e2$var$zb) { 1269 var a = $158dda26ac6b94e2$var$zb, b = $158dda26ac6b94e2$var$Ab; 1270 $158dda26ac6b94e2$var$Ab = $158dda26ac6b94e2$var$zb = null; 1271 $158dda26ac6b94e2$var$Bb(a); 1272 if (b) for(a = 0; a < b.length; a++)$158dda26ac6b94e2$var$Bb(b[a]); 1273 } 1274} 1275function $158dda26ac6b94e2$var$Gb(a, b) { 1276 return a(b); 1277} 1278function $158dda26ac6b94e2$var$Hb() {} 1279var $158dda26ac6b94e2$var$Ib = !1; 1280function $158dda26ac6b94e2$var$Jb(a, b, c) { 1281 if ($158dda26ac6b94e2$var$Ib) return a(b, c); 1282 $158dda26ac6b94e2$var$Ib = !0; 1283 try { 1284 return $158dda26ac6b94e2$var$Gb(a, b, c); 1285 } finally{ 1286 if ($158dda26ac6b94e2$var$Ib = !1, null !== $158dda26ac6b94e2$var$zb || null !== $158dda26ac6b94e2$var$Ab) $158dda26ac6b94e2$var$Hb(), $158dda26ac6b94e2$var$Fb(); 1287 } 1288} 1289function $158dda26ac6b94e2$var$Kb(a, b) { 1290 var c = a.stateNode; 1291 if (null === c) return null; 1292 var d = $158dda26ac6b94e2$var$Db(c); 1293 if (null === d) return null; 1294 c = d[b]; 1295 a: switch(b){ 1296 case "onClick": 1297 case "onClickCapture": 1298 case "onDoubleClick": 1299 case "onDoubleClickCapture": 1300 case "onMouseDown": 1301 case "onMouseDownCapture": 1302 case "onMouseMove": 1303 case "onMouseMoveCapture": 1304 case "onMouseUp": 1305 case "onMouseUpCapture": 1306 case "onMouseEnter": 1307 (d = !d.disabled) || (a = a.type, d = !("button" === a || "input" === a || "select" === a || "textarea" === a)); 1308 a = !d; 1309 break a; 1310 default: 1311 a = !1; 1312 } 1313 if (a) return null; 1314 if (c && "function" !== typeof c) throw Error($158dda26ac6b94e2$var$p(231, b, typeof c)); 1315 return c; 1316} 1317var $158dda26ac6b94e2$var$Lb = !1; 1318if ($158dda26ac6b94e2$var$ia) try { 1319 var $158dda26ac6b94e2$var$Mb = {}; 1320 Object.defineProperty($158dda26ac6b94e2$var$Mb, "passive", { 1321 get: function() { 1322 $158dda26ac6b94e2$var$Lb = !0; 1323 } 1324 }); 1325 window.addEventListener("test", $158dda26ac6b94e2$var$Mb, $158dda26ac6b94e2$var$Mb); 1326 window.removeEventListener("test", $158dda26ac6b94e2$var$Mb, $158dda26ac6b94e2$var$Mb); 1327} catch (a) { 1328 $158dda26ac6b94e2$var$Lb = !1; 1329} 1330function $158dda26ac6b94e2$var$Nb(a, b, c, d, e, f, g, h, k) { 1331 var l = Array.prototype.slice.call(arguments, 3); 1332 try { 1333 b.apply(c, l); 1334 } catch (m) { 1335 this.onError(m); 1336 } 1337} 1338var $158dda26ac6b94e2$var$Ob = !1, $158dda26ac6b94e2$var$Pb = null, $158dda26ac6b94e2$var$Qb = !1, $158dda26ac6b94e2$var$Rb = null, $158dda26ac6b94e2$var$Sb = { 1339 onError: function(a) { 1340 $158dda26ac6b94e2$var$Ob = !0; 1341 $158dda26ac6b94e2$var$Pb = a; 1342 } 1343}; 1344function $158dda26ac6b94e2$var$Tb(a, b, c, d, e, f, g, h, k) { 1345 $158dda26ac6b94e2$var$Ob = !1; 1346 $158dda26ac6b94e2$var$Pb = null; 1347 $158dda26ac6b94e2$var$Nb.apply($158dda26ac6b94e2$var$Sb, arguments); 1348} 1349function $158dda26ac6b94e2$var$Ub(a, b, c, d, e, f, g, h, k) { 1350 $158dda26ac6b94e2$var$Tb.apply(this, arguments); 1351 if ($158dda26ac6b94e2$var$Ob) { 1352 if ($158dda26ac6b94e2$var$Ob) { 1353 var l = $158dda26ac6b94e2$var$Pb; 1354 $158dda26ac6b94e2$var$Ob = !1; 1355 $158dda26ac6b94e2$var$Pb = null; 1356 } else throw Error($158dda26ac6b94e2$var$p(198)); 1357 $158dda26ac6b94e2$var$Qb || ($158dda26ac6b94e2$var$Qb = !0, $158dda26ac6b94e2$var$Rb = l); 1358 } 1359} 1360function $158dda26ac6b94e2$var$Vb(a) { 1361 var b = a, c = a; 1362 if (a.alternate) for(; b.return;)b = b.return; 1363 else { 1364 a = b; 1365 do b = a, 0 !== (b.flags & 4098) && (c = b.return), a = b.return; 1366 while (a); 1367 } 1368 return 3 === b.tag ? c : null; 1369} 1370function $158dda26ac6b94e2$var$Wb(a) { 1371 if (13 === a.tag) { 1372 var b = a.memoizedState; 1373 null === b && (a = a.alternate, null !== a && (b = a.memoizedState)); 1374 if (null !== b) return b.dehydrated; 1375 } 1376 return null; 1377} 1378function $158dda26ac6b94e2$var$Xb(a) { 1379 if ($158dda26ac6b94e2$var$Vb(a) !== a) throw Error($158dda26ac6b94e2$var$p(188)); 1380} 1381function $158dda26ac6b94e2$var$Yb(a) { 1382 var b = a.alternate; 1383 if (!b) { 1384 b = $158dda26ac6b94e2$var$Vb(a); 1385 if (null === b) throw Error($158dda26ac6b94e2$var$p(188)); 1386 return b !== a ? null : a; 1387 } 1388 for(var c = a, d = b;;){ 1389 var e = c.return; 1390 if (null === e) break; 1391 var f = e.alternate; 1392 if (null === f) { 1393 d = e.return; 1394 if (null !== d) { 1395 c = d; 1396 continue; 1397 } 1398 break; 1399 } 1400 if (e.child === f.child) { 1401 for(f = e.child; f;){ 1402 if (f === c) return $158dda26ac6b94e2$var$Xb(e), a; 1403 if (f === d) return $158dda26ac6b94e2$var$Xb(e), b; 1404 f = f.sibling; 1405 } 1406 throw Error($158dda26ac6b94e2$var$p(188)); 1407 } 1408 if (c.return !== d.return) c = e, d = f; 1409 else { 1410 for(var g = !1, h = e.child; h;){ 1411 if (h === c) { 1412 g = !0; 1413 c = e; 1414 d = f; 1415 break; 1416 } 1417 if (h === d) { 1418 g = !0; 1419 d = e; 1420 c = f; 1421 break; 1422 } 1423 h = h.sibling; 1424 } 1425 if (!g) { 1426 for(h = f.child; h;){ 1427 if (h === c) { 1428 g = !0; 1429 c = f; 1430 d = e; 1431 break; 1432 } 1433 if (h === d) { 1434 g = !0; 1435 d = f; 1436 c = e; 1437 break; 1438 } 1439 h = h.sibling; 1440 } 1441 if (!g) throw Error($158dda26ac6b94e2$var$p(189)); 1442 } 1443 } 1444 if (c.alternate !== d) throw Error($158dda26ac6b94e2$var$p(190)); 1445 } 1446 if (3 !== c.tag) throw Error($158dda26ac6b94e2$var$p(188)); 1447 return c.stateNode.current === c ? a : b; 1448} 1449function $158dda26ac6b94e2$var$Zb(a) { 1450 a = $158dda26ac6b94e2$var$Yb(a); 1451 return null !== a ? $158dda26ac6b94e2$var$$b(a) : null; 1452} 1453function $158dda26ac6b94e2$var$$b(a) { 1454 if (5 === a.tag || 6 === a.tag) return a; 1455 for(a = a.child; null !== a;){ 1456 var b = $158dda26ac6b94e2$var$$b(a); 1457 if (null !== b) return b; 1458 a = a.sibling; 1459 } 1460 return null; 1461} 1462var $158dda26ac6b94e2$var$ac = $25SSU.unstable_scheduleCallback, $158dda26ac6b94e2$var$bc = $25SSU.unstable_cancelCallback, $158dda26ac6b94e2$var$cc = $25SSU.unstable_shouldYield, $158dda26ac6b94e2$var$dc = $25SSU.unstable_requestPaint, $158dda26ac6b94e2$var$B = $25SSU.unstable_now, $158dda26ac6b94e2$var$ec = $25SSU.unstable_getCurrentPriorityLevel, $158dda26ac6b94e2$var$fc = $25SSU.unstable_ImmediatePriority, $158dda26ac6b94e2$var$gc = $25SSU.unstable_UserBlockingPriority, $158dda26ac6b94e2$var$hc = $25SSU.unstable_NormalPriority, $158dda26ac6b94e2$var$ic = $25SSU.unstable_LowPriority, $158dda26ac6b94e2$var$jc = $25SSU.unstable_IdlePriority, $158dda26ac6b94e2$var$kc = null, $158dda26ac6b94e2$var$lc = null; 1463function $158dda26ac6b94e2$var$mc(a) { 1464 if ($158dda26ac6b94e2$var$lc && "function" === typeof $158dda26ac6b94e2$var$lc.onCommitFiberRoot) try { 1465 $158dda26ac6b94e2$var$lc.onCommitFiberRoot($158dda26ac6b94e2$var$kc, a, void 0, 128 === (a.current.flags & 128)); 1466 } catch (b) {} 1467} 1468var $158dda26ac6b94e2$var$oc = Math.clz32 ? Math.clz32 : $158dda26ac6b94e2$var$nc, $158dda26ac6b94e2$var$pc = Math.log, $158dda26ac6b94e2$var$qc = Math.LN2; 1469function $158dda26ac6b94e2$var$nc(a) { 1470 a >>>= 0; 1471 return 0 === a ? 32 : 31 - ($158dda26ac6b94e2$var$pc(a) / $158dda26ac6b94e2$var$qc | 0) | 0; 1472} 1473var $158dda26ac6b94e2$var$rc = 64, $158dda26ac6b94e2$var$sc = 4194304; 1474function $158dda26ac6b94e2$var$tc(a) { 1475 switch(a & -a){ 1476 case 1: 1477 return 1; 1478 case 2: 1479 return 2; 1480 case 4: 1481 return 4; 1482 case 8: 1483 return 8; 1484 case 16: 1485 return 16; 1486 case 32: 1487 return 32; 1488 case 64: 1489 case 128: 1490 case 256: 1491 case 512: 1492 case 1024: 1493 case 2048: 1494 case 4096: 1495 case 8192: 1496 case 16384: 1497 case 32768: 1498 case 65536: 1499 case 131072: 1500 case 262144: 1501 case 524288: 1502 case 1048576: 1503 case 2097152: 1504 return a & 4194240; 1505 case 4194304: 1506 case 8388608: 1507 case 16777216: 1508 case 33554432: 1509 case 67108864: 1510 return a & 130023424; 1511 case 134217728: 1512 return 134217728; 1513 case 268435456: 1514 return 268435456; 1515 case 536870912: 1516 return 536870912; 1517 case 1073741824: 1518 return 1073741824; 1519 default: 1520 return a; 1521 } 1522} 1523function $158dda26ac6b94e2$var$uc(a, b) { 1524 var c = a.pendingLanes; 1525 if (0 === c) return 0; 1526 var d = 0, e = a.suspendedLanes, f = a.pingedLanes, g = c & 268435455; 1527 if (0 !== g) { 1528 var h = g & ~e; 1529 0 !== h ? d = $158dda26ac6b94e2$var$tc(h) : (f &= g, 0 !== f && (d = $158dda26ac6b94e2$var$tc(f))); 1530 } else g = c & ~e, 0 !== g ? d = $158dda26ac6b94e2$var$tc(g) : 0 !== f && (d = $158dda26ac6b94e2$var$tc(f)); 1531 if (0 === d) return 0; 1532 if (0 !== b && b !== d && 0 === (b & e) && (e = d & -d, f = b & -b, e >= f || 16 === e && 0 !== (f & 4194240))) return b; 1533 0 !== (d & 4) && (d |= c & 16); 1534 b = a.entangledLanes; 1535 if (0 !== b) for(a = a.entanglements, b &= d; 0 < b;)c = 31 - $158dda26ac6b94e2$var$oc(b), e = 1 << c, d |= a[c], b &= ~e; 1536 return d; 1537} 1538function $158dda26ac6b94e2$var$vc(a, b) { 1539 switch(a){ 1540 case 1: 1541 case 2: 1542 case 4: 1543 return b + 250; 1544 case 8: 1545 case 16: 1546 case 32: 1547 case 64: 1548 case 128: 1549 case 256: 1550 case 512: 1551 case 1024: 1552 case 2048: 1553 case 4096: 1554 case 8192: 1555 case 16384: 1556 case 32768: 1557 case 65536: 1558 case 131072: 1559 case 262144: 1560 case 524288: 1561 case 1048576: 1562 case 2097152: 1563 return b + 5E3; 1564 case 4194304: 1565 case 8388608: 1566 case 16777216: 1567 case 33554432: 1568 case 67108864: 1569 return -1; 1570 case 134217728: 1571 case 268435456: 1572 case 536870912: 1573 case 1073741824: 1574 return -1; 1575 default: 1576 return -1; 1577 } 1578} 1579function $158dda26ac6b94e2$var$wc(a, b) { 1580 for(var c = a.suspendedLanes, d = a.pingedLanes, e = a.expirationTimes, f = a.pendingLanes; 0 < f;){ 1581 var g = 31 - $158dda26ac6b94e2$var$oc(f), h = 1 << g, k = e[g]; 1582 if (-1 === k) { 1583 if (0 === (h & c) || 0 !== (h & d)) e[g] = $158dda26ac6b94e2$var$vc(h, b); 1584 } else k <= b && (a.expiredLanes |= h); 1585 f &= ~h; 1586 } 1587} 1588function $158dda26ac6b94e2$var$xc(a) { 1589 a = a.pendingLanes & -1073741825; 1590 return 0 !== a ? a : a & 1073741824 ? 1073741824 : 0; 1591} 1592function $158dda26ac6b94e2$var$yc() { 1593 var a = $158dda26ac6b94e2$var$rc; 1594 $158dda26ac6b94e2$var$rc <<= 1; 1595 0 === ($158dda26ac6b94e2$var$rc & 4194240) && ($158dda26ac6b94e2$var$rc = 64); 1596 return a; 1597} 1598function $158dda26ac6b94e2$var$zc(a) { 1599 for(var b = [], c = 0; 31 > c; c++)b.push(a); 1600 return b; 1601} 1602function $158dda26ac6b94e2$var$Ac(a, b, c) { 1603 a.pendingLanes |= b; 1604 536870912 !== b && (a.suspendedLanes = 0, a.pingedLanes = 0); 1605 a = a.eventTimes; 1606 b = 31 - $158dda26ac6b94e2$var$oc(b); 1607 a[b] = c; 1608} 1609function $158dda26ac6b94e2$var$Bc(a, b) { 1610 var c = a.pendingLanes & ~b; 1611 a.pendingLanes = b; 1612 a.suspendedLanes = 0; 1613 a.pingedLanes = 0; 1614 a.expiredLanes &= b; 1615 a.mutableReadLanes &= b; 1616 a.entangledLanes &= b; 1617 b = a.entanglements; 1618 var d = a.eventTimes; 1619 for(a = a.expirationTimes; 0 < c;){ 1620 var e = 31 - $158dda26ac6b94e2$var$oc(c), f = 1 << e; 1621 b[e] = 0; 1622 d[e] = -1; 1623 a[e] = -1; 1624 c &= ~f; 1625 } 1626} 1627function $158dda26ac6b94e2$var$Cc(a, b) { 1628 var c = a.entangledLanes |= b; 1629 for(a = a.entanglements; c;){ 1630 var d = 31 - $158dda26ac6b94e2$var$oc(c), e = 1 << d; 1631 e & b | a[d] & b && (a[d] |= b); 1632 c &= ~e; 1633 } 1634} 1635var $158dda26ac6b94e2$var$C = 0; 1636function $158dda26ac6b94e2$var$Dc(a) { 1637 a &= -a; 1638 return 1 < a ? 4 < a ? 0 !== (a & 268435455) ? 16 : 536870912 : 4 : 1; 1639} 1640var $158dda26ac6b94e2$var$Ec, $158dda26ac6b94e2$var$Fc, $158dda26ac6b94e2$var$Gc, $158dda26ac6b94e2$var$Hc, $158dda26ac6b94e2$var$Ic, $158dda26ac6b94e2$var$Jc = !1, $158dda26ac6b94e2$var$Kc = [], $158dda26ac6b94e2$var$Lc = null, $158dda26ac6b94e2$var$Mc = null, $158dda26ac6b94e2$var$Nc = null, $158dda26ac6b94e2$var$Oc = new Map, $158dda26ac6b94e2$var$Pc = new Map, $158dda26ac6b94e2$var$Qc = [], $158dda26ac6b94e2$var$Rc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); 1641function $158dda26ac6b94e2$var$Sc(a, b) { 1642 switch(a){ 1643 case "focusin": 1644 case "focusout": 1645 $158dda26ac6b94e2$var$Lc = null; 1646 break; 1647 case "dragenter": 1648 case "dragleave": 1649 $158dda26ac6b94e2$var$Mc = null; 1650 break; 1651 case "mouseover": 1652 case "mouseout": 1653 $158dda26ac6b94e2$var$Nc = null; 1654 break; 1655 case "pointerover": 1656 case "pointerout": 1657 $158dda26ac6b94e2$var$Oc.delete(b.pointerId); 1658 break; 1659 case "gotpointercapture": 1660 case "lostpointercapture": 1661 $158dda26ac6b94e2$var$Pc.delete(b.pointerId); 1662 } 1663} 1664function $158dda26ac6b94e2$var$Tc(a, b, c, d, e, f) { 1665 if (null === a || a.nativeEvent !== f) return a = { 1666 blockedOn: b, 1667 domEventName: c, 1668 eventSystemFlags: d, 1669 nativeEvent: f, 1670 targetContainers: [ 1671 e 1672 ] 1673 }, null !== b && (b = $158dda26ac6b94e2$var$Cb(b), null !== b && $158dda26ac6b94e2$var$Fc(b)), a; 1674 a.eventSystemFlags |= d; 1675 b = a.targetContainers; 1676 null !== e && -1 === b.indexOf(e) && b.push(e); 1677 return a; 1678} 1679function $158dda26ac6b94e2$var$Uc(a, b, c, d, e) { 1680 switch(b){ 1681 case "focusin": 1682 return $158dda26ac6b94e2$var$Lc = $158dda26ac6b94e2$var$Tc($158dda26ac6b94e2$var$Lc, a, b, c, d, e), !0; 1683 case "dragenter": 1684 return $158dda26ac6b94e2$var$Mc = $158dda26ac6b94e2$var$Tc($158dda26ac6b94e2$var$Mc, a, b, c, d, e), !0; 1685 case "mouseover": 1686 return $158dda26ac6b94e2$var$Nc = $158dda26ac6b94e2$var$Tc($158dda26ac6b94e2$var$Nc, a, b, c, d, e), !0; 1687 case "pointerover": 1688 var f = e.pointerId; 1689 $158dda26ac6b94e2$var$Oc.set(f, $158dda26ac6b94e2$var$Tc($158dda26ac6b94e2$var$Oc.get(f) || null, a, b, c, d, e)); 1690 return !0; 1691 case "gotpointercapture": 1692 return f = e.pointerId, $158dda26ac6b94e2$var$Pc.set(f, $158dda26ac6b94e2$var$Tc($158dda26ac6b94e2$var$Pc.get(f) || null, a, b, c, d, e)), !0; 1693 } 1694 return !1; 1695} 1696function $158dda26ac6b94e2$var$Vc(a) { 1697 var b = $158dda26ac6b94e2$var$Wc(a.target); 1698 if (null !== b) { 1699 var c = $158dda26ac6b94e2$var$Vb(b); 1700 if (null !== c) { 1701 if (b = c.tag, 13 === b) { 1702 if (b = $158dda26ac6b94e2$var$Wb(c), null !== b) { 1703 a.blockedOn = b; 1704 $158dda26ac6b94e2$var$Ic(a.priority, function() { 1705 $158dda26ac6b94e2$var$Gc(c); 1706 }); 1707 return; 1708 } 1709 } else if (3 === b && c.stateNode.current.memoizedState.isDehydrated) { 1710 a.blockedOn = 3 === c.tag ? c.stateNode.containerInfo : null; 1711 return; 1712 } 1713 } 1714 } 1715 a.blockedOn = null; 1716} 1717function $158dda26ac6b94e2$var$Xc(a) { 1718 if (null !== a.blockedOn) return !1; 1719 for(var b = a.targetContainers; 0 < b.length;){ 1720 var c = $158dda26ac6b94e2$var$Yc(a.domEventName, a.eventSystemFlags, b[0], a.nativeEvent); 1721 if (null === c) { 1722 c = a.nativeEvent; 1723 var d = new c.constructor(c.type, c); 1724 $158dda26ac6b94e2$var$wb = d; 1725 c.target.dispatchEvent(d); 1726 $158dda26ac6b94e2$var$wb = null; 1727 } else return b = $158dda26ac6b94e2$var$Cb(c), null !== b && $158dda26ac6b94e2$var$Fc(b), a.blockedOn = c, !1; 1728 b.shift(); 1729 } 1730 return !0; 1731} 1732function $158dda26ac6b94e2$var$Zc(a, b, c) { 1733 $158dda26ac6b94e2$var$Xc(a) && c.delete(b); 1734} 1735function $158dda26ac6b94e2$var$$c() { 1736 $158dda26ac6b94e2$var$Jc = !1; 1737 null !== $158dda26ac6b94e2$var$Lc && $158dda26ac6b94e2$var$Xc($158dda26ac6b94e2$var$Lc) && ($158dda26ac6b94e2$var$Lc = null); 1738 null !== $158dda26ac6b94e2$var$Mc && $158dda26ac6b94e2$var$Xc($158dda26ac6b94e2$var$Mc) && ($158dda26ac6b94e2$var$Mc = null); 1739 null !== $158dda26ac6b94e2$var$Nc && $158dda26ac6b94e2$var$Xc($158dda26ac6b94e2$var$Nc) && ($158dda26ac6b94e2$var$Nc = null); 1740 $158dda26ac6b94e2$var$Oc.forEach($158dda26ac6b94e2$var$Zc); 1741 $158dda26ac6b94e2$var$Pc.forEach($158dda26ac6b94e2$var$Zc); 1742} 1743function $158dda26ac6b94e2$var$ad(a, b) { 1744 a.blockedOn === b && (a.blockedOn = null, $158dda26ac6b94e2$var$Jc || ($158dda26ac6b94e2$var$Jc = !0, $25SSU.unstable_scheduleCallback($25SSU.unstable_NormalPriority, $158dda26ac6b94e2$var$$c))); 1745} 1746function $158dda26ac6b94e2$var$bd(a) { 1747 function b(b) { 1748 return $158dda26ac6b94e2$var$ad(b, a); 1749 } 1750 if (0 < $158dda26ac6b94e2$var$Kc.length) { 1751 $158dda26ac6b94e2$var$ad($158dda26ac6b94e2$var$Kc[0], a); 1752 for(var c = 1; c < $158dda26ac6b94e2$var$Kc.length; c++){ 1753 var d = $158dda26ac6b94e2$var$Kc[c]; 1754 d.blockedOn === a && (d.blockedOn = null); 1755 } 1756 } 1757 null !== $158dda26ac6b94e2$var$Lc && $158dda26ac6b94e2$var$ad($158dda26ac6b94e2$var$Lc, a); 1758 null !== $158dda26ac6b94e2$var$Mc && $158dda26ac6b94e2$var$ad($158dda26ac6b94e2$var$Mc, a); 1759 null !== $158dda26ac6b94e2$var$Nc && $158dda26ac6b94e2$var$ad($158dda26ac6b94e2$var$Nc, a); 1760 $158dda26ac6b94e2$var$Oc.forEach(b); 1761 $158dda26ac6b94e2$var$Pc.forEach(b); 1762 for(c = 0; c < $158dda26ac6b94e2$var$Qc.length; c++)d = $158dda26ac6b94e2$var$Qc[c], d.blockedOn === a && (d.blockedOn = null); 1763 for(; 0 < $158dda26ac6b94e2$var$Qc.length && (c = $158dda26ac6b94e2$var$Qc[0], null === c.blockedOn);)$158dda26ac6b94e2$var$Vc(c), null === c.blockedOn && $158dda26ac6b94e2$var$Qc.shift(); 1764} 1765var $158dda26ac6b94e2$var$cd = $158dda26ac6b94e2$var$ua.ReactCurrentBatchConfig, $158dda26ac6b94e2$var$dd = !0; 1766function $158dda26ac6b94e2$var$ed(a, b, c, d) { 1767 var e = $158dda26ac6b94e2$var$C, f = $158dda26ac6b94e2$var$cd.transition; 1768 $158dda26ac6b94e2$var$cd.transition = null; 1769 try { 1770 $158dda26ac6b94e2$var$C = 1, $158dda26ac6b94e2$var$fd(a, b, c, d); 1771 } finally{ 1772 $158dda26ac6b94e2$var$C = e, $158dda26ac6b94e2$var$cd.transition = f; 1773 } 1774} 1775function $158dda26ac6b94e2$var$gd(a, b, c, d) { 1776 var e = $158dda26ac6b94e2$var$C, f = $158dda26ac6b94e2$var$cd.transition; 1777 $158dda26ac6b94e2$var$cd.transition = null; 1778 try { 1779 $158dda26ac6b94e2$var$C = 4, $158dda26ac6b94e2$var$fd(a, b, c, d); 1780 } finally{ 1781 $158dda26ac6b94e2$var$C = e, $158dda26ac6b94e2$var$cd.transition = f; 1782 } 1783} 1784function $158dda26ac6b94e2$var$fd(a, b, c, d) { 1785 if ($158dda26ac6b94e2$var$dd) { 1786 var e = $158dda26ac6b94e2$var$Yc(a, b, c, d); 1787 if (null === e) $158dda26ac6b94e2$var$hd(a, b, d, $158dda26ac6b94e2$var$id, c), $158dda26ac6b94e2$var$Sc(a, d); 1788 else if ($158dda26ac6b94e2$var$Uc(e, a, b, c, d)) d.stopPropagation(); 1789 else if ($158dda26ac6b94e2$var$Sc(a, d), b & 4 && -1 < $158dda26ac6b94e2$var$Rc.indexOf(a)) { 1790 for(; null !== e;){ 1791 var f = $158dda26ac6b94e2$var$Cb(e); 1792 null !== f && $158dda26ac6b94e2$var$Ec(f); 1793 f = $158dda26ac6b94e2$var$Yc(a, b, c, d); 1794 null === f && $158dda26ac6b94e2$var$hd(a, b, d, $158dda26ac6b94e2$var$id, c); 1795 if (f === e) break; 1796 e = f; 1797 } 1798 null !== e && d.stopPropagation(); 1799 } else $158dda26ac6b94e2$var$hd(a, b, d, null, c); 1800 } 1801} 1802var $158dda26ac6b94e2$var$id = null; 1803function $158dda26ac6b94e2$var$Yc(a, b, c, d) { 1804 $158dda26ac6b94e2$var$id = null; 1805 a = $158dda26ac6b94e2$var$xb(d); 1806 a = $158dda26ac6b94e2$var$Wc(a); 1807 if (null !== a) { 1808 if (b = $158dda26ac6b94e2$var$Vb(a), null === b) a = null; 1809 else if (c = b.tag, 13 === c) { 1810 a = $158dda26ac6b94e2$var$Wb(b); 1811 if (null !== a) return a; 1812 a = null; 1813 } else if (3 === c) { 1814 if (b.stateNode.current.memoizedState.isDehydrated) return 3 === b.tag ? b.stateNode.containerInfo : null; 1815 a = null; 1816 } else b !== a && (a = null); 1817 } 1818 $158dda26ac6b94e2$var$id = a; 1819 return null; 1820} 1821function $158dda26ac6b94e2$var$jd(a) { 1822 switch(a){ 1823 case "cancel": 1824 case "click": 1825 case "close": 1826 case "contextmenu": 1827 case "copy": 1828 case "cut": 1829 case "auxclick": 1830 case "dblclick": 1831 case "dragend": 1832 case "dragstart": 1833 case "drop": 1834 case "focusin": 1835 case "focusout": 1836 case "input": 1837 case "invalid": 1838 case "keydown": 1839 case "keypress": 1840 case "keyup": 1841 case "mousedown": 1842 case "mouseup": 1843 case "paste": 1844 case "pause": 1845 case "play": 1846 case "pointercancel": 1847 case "pointerdown": 1848 case "pointerup": 1849 case "ratechange": 1850 case "reset": 1851 case "resize": 1852 case "seeked": 1853 case "submit": 1854 case "touchcancel": 1855 case "touchend": 1856 case "touchstart": 1857 case "volumechange": 1858 case "change": 1859 case "selectionchange": 1860 case "textInput": 1861 case "compositionstart": 1862 case "compositionend": 1863 case "compositionupdate": 1864 case "beforeblur": 1865 case "afterblur": 1866 case "beforeinput": 1867 case "blur": 1868 case "fullscreenchange": 1869 case "focus": 1870 case "hashchange": 1871 case "popstate": 1872 case "select": 1873 case "selectstart": 1874 return 1; 1875 case "drag": 1876 case "dragenter": 1877 case "dragexit": 1878 case "dragleave": 1879 case "dragover": 1880 case "mousemove": 1881 case "mouseout": 1882 case "mouseover": 1883 case "pointermove": 1884 case "pointerout": 1885 case "pointerover": 1886 case "scroll": 1887 case "toggle": 1888 case "touchmove": 1889 case "wheel": 1890 case "mouseenter": 1891 case "mouseleave": 1892 case "pointerenter": 1893 case "pointerleave": 1894 return 4; 1895 case "message": 1896 switch($158dda26ac6b94e2$var$ec()){ 1897 case $158dda26ac6b94e2$var$fc: 1898 return 1; 1899 case $158dda26ac6b94e2$var$gc: 1900 return 4; 1901 case $158dda26ac6b94e2$var$hc: 1902 case $158dda26ac6b94e2$var$ic: 1903 return 16; 1904 case $158dda26ac6b94e2$var$jc: 1905 return 536870912; 1906 default: 1907 return 16; 1908 } 1909 default: 1910 return 16; 1911 } 1912} 1913var $158dda26ac6b94e2$var$kd = null, $158dda26ac6b94e2$var$ld = null, $158dda26ac6b94e2$var$md = null; 1914function $158dda26ac6b94e2$var$nd() { 1915 if ($158dda26ac6b94e2$var$md) return $158dda26ac6b94e2$var$md; 1916 var a, b = $158dda26ac6b94e2$var$ld, c = b.length, d, e = "value" in $158dda26ac6b94e2$var$kd ? $158dda26ac6b94e2$var$kd.value : $158dda26ac6b94e2$var$kd.textContent, f = e.length; 1917 for(a = 0; a < c && b[a] === e[a]; a++); 1918 var g = c - a; 1919 for(d = 1; d <= g && b[c - d] === e[f - d]; d++);
1920 return $158dda26ac6b94e2$var$md = e.slice(a, 1 < d ? 1 - d : void 0); 1921} 1922function $158dda26ac6b94e2$var$od(a) { 1923 var b = a.keyCode; 1924 "charCode" in a ? (a = a.charCode, 0 === a && 13 === b && (a = 13)) : a = b; 1925 10 === a && (a = 13); 1926 return 32 <= a || 13 === a ? a : 0; 1927} 1928function $158dda26ac6b94e2$var$pd() { 1929 return !0; 1930} 1931function $158dda26ac6b94e2$var$qd() { 1932 return !1; 1933} 1934function $158dda26ac6b94e2$var$rd(a) { 1935 function b(b, d, e, f, g) { 1936 this._reactName = b; 1937 this._targetInst = e; 1938 this.type = d; 1939 this.nativeEvent = f; 1940 this.target = g; 1941 this.currentTarget = null; 1942 for(var c in a)a.hasOwnProperty(c) && (b = a[c], this[c] = b ? b(f) : f[c]); 1943 this.isDefaultPrevented = (null != f.defaultPrevented ? f.defaultPrevented : !1 === f.returnValue) ? $158dda26ac6b94e2$var$pd : $158dda26ac6b94e2$var$qd; 1944 this.isPropagationStopped = $158dda26ac6b94e2$var$qd; 1945 return this; 1946 } 1947 $158dda26ac6b94e2$var$A(b.prototype, { 1948 preventDefault: function() { 1949 this.defaultPrevented = !0; 1950 var a = this.nativeEvent; 1951 a && (a.preventDefault ? a.preventDefault() : "unknown" !== typeof a.returnValue && (a.returnValue = !1), this.isDefaultPrevented = $158dda26ac6b94e2$var$pd); 1952 }, 1953 stopPropagation: function() { 1954 var a = this.nativeEvent; 1955 a && (a.stopPropagation ? a.stopPropagation() : "unknown" !== typeof a.cancelBubble && (a.cancelBubble = !0), this.isPropagationStopped = $158dda26ac6b94e2$var$pd); 1956 }, 1957 persist: function() {}, 1958 isPersistent: $158dda26ac6b94e2$var$pd 1959 }); 1960 return b; 1961} 1962var $158dda26ac6b94e2$var$sd = { 1963 eventPhase: 0, 1964 bubbles: 0, 1965 cancelable: 0, 1966 timeStamp: function(a) { 1967 return a.timeStamp || Date.now(); 1968 }, 1969 defaultPrevented: 0, 1970 isTrusted: 0 1971}, $158dda26ac6b94e2$var$td = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$sd), $158dda26ac6b94e2$var$ud = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$sd, { 1972 view: 0, 1973 detail: 0 1974}), $158dda26ac6b94e2$var$vd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$ud), $158dda26ac6b94e2$var$wd, $158dda26ac6b94e2$var$xd, $158dda26ac6b94e2$var$yd, $158dda26ac6b94e2$var$Ad = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$ud, { 1975 screenX: 0, 1976 screenY: 0, 1977 clientX: 0, 1978 clientY: 0, 1979 pageX: 0, 1980 pageY: 0, 1981 ctrlKey: 0,
vendor: 4,973 bytes, lines 1982-2119
1982 shiftKey: 0, 1983 altKey: 0, 1984 metaKey: 0, 1985 getModifierState: $158dda26ac6b94e2$var$zd, 1986 button: 0, 1987 buttons: 0, 1988 relatedTarget: function(a) { 1989 return void 0 === a.relatedTarget ? a.fromElement === a.srcElement ? a.toElement : a.fromElement : a.relatedTarget; 1990 }, 1991 movementX: function(a) { 1992 if ("movementX" in a) return a.movementX; 1993 a !== $158dda26ac6b94e2$var$yd && ($158dda26ac6b94e2$var$yd && "mousemove" === a.type ? ($158dda26ac6b94e2$var$wd = a.screenX - $158dda26ac6b94e2$var$yd.screenX, $158dda26ac6b94e2$var$xd = a.screenY - $158dda26ac6b94e2$var$yd.screenY) : $158dda26ac6b94e2$var$xd = $158dda26ac6b94e2$var$wd = 0, $158dda26ac6b94e2$var$yd = a); 1994 return $158dda26ac6b94e2$var$wd; 1995 }, 1996 movementY: function(a) { 1997 return "movementY" in a ? a.movementY : $158dda26ac6b94e2$var$xd; 1998 } 1999}), $158dda26ac6b94e2$var$Bd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Ad), $158dda26ac6b94e2$var$Cd = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$Ad, { 2000 dataTransfer: 0 2001}), $158dda26ac6b94e2$var$Dd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Cd), $158dda26ac6b94e2$var$Ed = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$ud, { 2002 relatedTarget: 0 2003}), $158dda26ac6b94e2$var$Fd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Ed), $158dda26ac6b94e2$var$Gd = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$sd, { 2004 animationName: 0, 2005 elapsedTime: 0, 2006 pseudoElement: 0 2007}), $158dda26ac6b94e2$var$Hd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Gd), $158dda26ac6b94e2$var$Id = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$sd, { 2008 clipboardData: function(a) { 2009 return "clipboardData" in a ? a.clipboardData : window.clipboardData; 2010 } 2011}), $158dda26ac6b94e2$var$Jd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Id), $158dda26ac6b94e2$var$Kd = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$sd, { 2012 data: 0 2013}), $158dda26ac6b94e2$var$Ld = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Kd), $158dda26ac6b94e2$var$Md = { 2014 Esc: "Escape", 2015 Spacebar: " ", 2016 Left: "ArrowLeft", 2017 Up: "ArrowUp", 2018 Right: "ArrowRight", 2019 Down: "ArrowDown", 2020 Del: "Delete", 2021 Win: "OS", 2022 Menu: "ContextMenu", 2023 Apps: "ContextMenu", 2024 Scroll: "ScrollLock", 2025 MozPrintableKey: "Unidentified" 2026}, $158dda26ac6b94e2$var$Nd = { 2027 8: "Backspace", 2028 9: "Tab", 2029 12: "Clear", 2030 13: "Enter", 2031 16: "Shift", 2032 17: "Control", 2033 18: "Alt", 2034 19: "Pause", 2035 20: "CapsLock", 2036 27: "Escape", 2037 32: " ", 2038 33: "PageUp", 2039 34: "PageDown", 2040 35: "End", 2041 36: "Home", 2042 37: "ArrowLeft", 2043 38: "ArrowUp", 2044 39: "ArrowRight", 2045 40: "ArrowDown", 2046 45: "Insert", 2047 46: "Delete", 2048 112: "F1", 2049 113: "F2", 2050 114: "F3", 2051 115: "F4", 2052 116: "F5", 2053 117: "F6", 2054 118: "F7", 2055 119: "F8", 2056 120: "F9", 2057 121: "F10", 2058 122: "F11", 2059 123: "F12", 2060 144: "NumLock", 2061 145: "ScrollLock", 2062 224: "Meta" 2063}, $158dda26ac6b94e2$var$Od = { 2064 Alt: "altKey", 2065 Control: "ctrlKey", 2066 Meta: "metaKey", 2067 Shift: "shiftKey" 2068}; 2069function $158dda26ac6b94e2$var$Pd(a) { 2070 var b = this.nativeEvent; 2071 return b.getModifierState ? b.getModifierState(a) : (a = $158dda26ac6b94e2$var$Od[a]) ? !!b[a] : !1; 2072} 2073function $158dda26ac6b94e2$var$zd() { 2074 return $158dda26ac6b94e2$var$Pd; 2075} 2076var $158dda26ac6b94e2$var$Qd = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$ud, { 2077 key: function(a) { 2078 if (a.key) { 2079 var b = $158dda26ac6b94e2$var$Md[a.key] || a.key; 2080 if ("Unidentified" !== b) return b; 2081 } 2082 return "keypress" === a.type ? (a = $158dda26ac6b94e2$var$od(a), 13 === a ? "Enter" : String.fromCharCode(a)) : "keydown" === a.type || "keyup" === a.type ? $158dda26ac6b94e2$var$Nd[a.keyCode] || "Unidentified" : ""; 2083 }, 2084 code: 0, 2085 location: 0, 2086 ctrlKey: 0, 2087 shiftKey: 0, 2088 altKey: 0, 2089 metaKey: 0, 2090 repeat: 0, 2091 locale: 0, 2092 getModifierState: $158dda26ac6b94e2$var$zd, 2093 charCode: function(a) { 2094 return "keypress" === a.type ? $158dda26ac6b94e2$var$od(a) : 0; 2095 }, 2096 keyCode: function(a) { 2097 return "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0; 2098 }, 2099 which: function(a) { 2100 return "keypress" === a.type ? $158dda26ac6b94e2$var$od(a) : "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0; 2101 } 2102}), $158dda26ac6b94e2$var$Rd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Qd), $158dda26ac6b94e2$var$Sd = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$Ad, { 2103 pointerId: 0, 2104 width: 0, 2105 height: 0, 2106 pressure: 0, 2107 tangentialPressure: 0, 2108 tiltX: 0, 2109 tiltY: 0, 2110 twist: 0, 2111 pointerType: 0, 2112 isPrimary: 0 2113}), $158dda26ac6b94e2$var$Td = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Sd), $158dda26ac6b94e2$var$Ud = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$ud, { 2114 touches: 0, 2115 targetTouches: 0, 2116 changedTouches: 0, 2117 altKey: 0, 2118 metaKey: 0, 2119 ctrlKey: 0,
vendor: 4,734 bytes, lines 2120-2239
2120 shiftKey: 0, 2121 getModifierState: $158dda26ac6b94e2$var$zd 2122}), $158dda26ac6b94e2$var$Vd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Ud), $158dda26ac6b94e2$var$Wd = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$sd, { 2123 propertyName: 0, 2124 elapsedTime: 0, 2125 pseudoElement: 0 2126}), $158dda26ac6b94e2$var$Xd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Wd), $158dda26ac6b94e2$var$Yd = $158dda26ac6b94e2$var$A({}, $158dda26ac6b94e2$var$Ad, { 2127 deltaX: function(a) { 2128 return "deltaX" in a ? a.deltaX : "wheelDeltaX" in a ? -a.wheelDeltaX : 0; 2129 }, 2130 deltaY: function(a) { 2131 return "deltaY" in a ? a.deltaY : "wheelDeltaY" in a ? -a.wheelDeltaY : "wheelDelta" in a ? -a.wheelDelta : 0; 2132 }, 2133 deltaZ: 0, 2134 deltaMode: 0 2135}), $158dda26ac6b94e2$var$Zd = $158dda26ac6b94e2$var$rd($158dda26ac6b94e2$var$Yd), $158dda26ac6b94e2$var$$d = [ 2136 9, 2137 13, 2138 27, 2139 32 2140], $158dda26ac6b94e2$var$ae = $158dda26ac6b94e2$var$ia && "CompositionEvent" in window, $158dda26ac6b94e2$var$be = null; 2141$158dda26ac6b94e2$var$ia && "documentMode" in document && ($158dda26ac6b94e2$var$be = document.documentMode); 2142var $158dda26ac6b94e2$var$ce = $158dda26ac6b94e2$var$ia && "TextEvent" in window && !$158dda26ac6b94e2$var$be, $158dda26ac6b94e2$var$de = $158dda26ac6b94e2$var$ia && (!$158dda26ac6b94e2$var$ae || $158dda26ac6b94e2$var$be && 8 < $158dda26ac6b94e2$var$be && 11 >= $158dda26ac6b94e2$var$be), $158dda26ac6b94e2$var$ee = String.fromCharCode(32), $158dda26ac6b94e2$var$fe = !1; 2143function $158dda26ac6b94e2$var$ge(a, b) { 2144 switch(a){ 2145 case "keyup": 2146 return -1 !== $158dda26ac6b94e2$var$$d.indexOf(b.keyCode); 2147 case "keydown": 2148 return 229 !== b.keyCode; 2149 case "keypress": 2150 case "mousedown": 2151 case "focusout": 2152 return !0; 2153 default: 2154 return !1; 2155 } 2156} 2157function $158dda26ac6b94e2$var$he(a) { 2158 a = a.detail; 2159 return "object" === typeof a && "data" in a ? a.data : null; 2160} 2161var $158dda26ac6b94e2$var$ie = !1; 2162function $158dda26ac6b94e2$var$je(a, b) { 2163 switch(a){ 2164 case "compositionend": 2165 return $158dda26ac6b94e2$var$he(b); 2166 case "keypress": 2167 if (32 !== b.which) return null; 2168 $158dda26ac6b94e2$var$fe = !0; 2169 return $158dda26ac6b94e2$var$ee; 2170 case "textInput": 2171 return a = b.data, a === $158dda26ac6b94e2$var$ee && $158dda26ac6b94e2$var$fe ? null : a; 2172 default: 2173 return null; 2174 } 2175} 2176function $158dda26ac6b94e2$var$ke(a, b) { 2177 if ($158dda26ac6b94e2$var$ie) return "compositionend" === a || !$158dda26ac6b94e2$var$ae && $158dda26ac6b94e2$var$ge(a, b) ? (a = $158dda26ac6b94e2$var$nd(), $158dda26ac6b94e2$var$md = $158dda26ac6b94e2$var$ld = $158dda26ac6b94e2$var$kd = null, $158dda26ac6b94e2$var$ie = !1, a) : null; 2178 switch(a){ 2179 case "paste": 2180 return null; 2181 case "keypress": 2182 if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) { 2183 if (b.char && 1 < b.char.length) return b.char; 2184 if (b.which) return String.fromCharCode(b.which); 2185 } 2186 return null; 2187 case "compositionend": 2188 return $158dda26ac6b94e2$var$de && "ko" !== b.locale ? null : b.data; 2189 default: 2190 return null; 2191 } 2192} 2193var $158dda26ac6b94e2$var$le = { 2194 color: !0, 2195 date: !0, 2196 datetime: !0, 2197 "datetime-local": !0, 2198 email: !0, 2199 month: !0, 2200 number: !0, 2201 password: !0, 2202 range: !0, 2203 search: !0, 2204 tel: !0, 2205 text: !0, 2206 time: !0, 2207 url: !0, 2208 week: !0 2209}; 2210function $158dda26ac6b94e2$var$me(a) { 2211 var b = a && a.nodeName && a.nodeName.toLowerCase(); 2212 return "input" === b ? !!$158dda26ac6b94e2$var$le[a.type] : "textarea" === b ? !0 : !1; 2213} 2214function $158dda26ac6b94e2$var$ne(a, b, c, d) { 2215 $158dda26ac6b94e2$var$Eb(d); 2216 b = $158dda26ac6b94e2$var$oe(b, "onChange"); 2217 0 < b.length && (c = new $158dda26ac6b94e2$var$td("onChange", "change", null, c, d), a.push({ 2218 event: c, 2219 listeners: b 2220 })); 2221} 2222var $158dda26ac6b94e2$var$pe = null, $158dda26ac6b94e2$var$qe = null; 2223function $158dda26ac6b94e2$var$re(a) { 2224 $158dda26ac6b94e2$var$se(a, 0); 2225} 2226function $158dda26ac6b94e2$var$te(a) { 2227 var b = $158dda26ac6b94e2$var$ue(a); 2228 if ($158dda26ac6b94e2$var$Wa(b)) return a; 2229} 2230function $158dda26ac6b94e2$var$ve(a, b) { 2231 if ("change" === a) return b; 2232} 2233var $158dda26ac6b94e2$var$we = !1; 2234if ($158dda26ac6b94e2$var$ia) { 2235 var $158dda26ac6b94e2$var$xe; 2236 if ($158dda26ac6b94e2$var$ia) { 2237 var $158dda26ac6b94e2$var$ye = "oninput" in document; 2238 if (!$158dda26ac6b94e2$var$ye) { 2239 var $158dda26ac6b94e2$var$ze = document.createElement("div");
vendor: 10,649 bytes, lines 2240-2429
2240 $158dda26ac6b94e2$var$ze.setAttribute("oninput", "return;"); 2241 $158dda26ac6b94e2$var$ye = "function" === typeof $158dda26ac6b94e2$var$ze.oninput; 2242 } 2243 $158dda26ac6b94e2$var$xe = $158dda26ac6b94e2$var$ye; 2244 } else $158dda26ac6b94e2$var$xe = !1; 2245 $158dda26ac6b94e2$var$we = $158dda26ac6b94e2$var$xe && (!document.documentMode || 9 < document.documentMode); 2246} 2247function $158dda26ac6b94e2$var$Ae() { 2248 $158dda26ac6b94e2$var$pe && ($158dda26ac6b94e2$var$pe.detachEvent("onpropertychange", $158dda26ac6b94e2$var$Be), $158dda26ac6b94e2$var$qe = $158dda26ac6b94e2$var$pe = null); 2249} 2250function $158dda26ac6b94e2$var$Be(a) { 2251 if ("value" === a.propertyName && $158dda26ac6b94e2$var$te($158dda26ac6b94e2$var$qe)) { 2252 var b = []; 2253 $158dda26ac6b94e2$var$ne(b, $158dda26ac6b94e2$var$qe, a, $158dda26ac6b94e2$var$xb(a)); 2254 $158dda26ac6b94e2$var$Jb($158dda26ac6b94e2$var$re, b); 2255 } 2256} 2257function $158dda26ac6b94e2$var$Ce(a, b, c) { 2258 "focusin" === a ? ($158dda26ac6b94e2$var$Ae(), $158dda26ac6b94e2$var$pe = b, $158dda26ac6b94e2$var$qe = c, $158dda26ac6b94e2$var$pe.attachEvent("onpropertychange", $158dda26ac6b94e2$var$Be)) : "focusout" === a && $158dda26ac6b94e2$var$Ae(); 2259} 2260function $158dda26ac6b94e2$var$De(a) { 2261 if ("selectionchange" === a || "keyup" === a || "keydown" === a) return $158dda26ac6b94e2$var$te($158dda26ac6b94e2$var$qe); 2262} 2263function $158dda26ac6b94e2$var$Ee(a, b) { 2264 if ("click" === a) return $158dda26ac6b94e2$var$te(b); 2265} 2266function $158dda26ac6b94e2$var$Fe(a, b) { 2267 if ("input" === a || "change" === a) return $158dda26ac6b94e2$var$te(b); 2268} 2269function $158dda26ac6b94e2$var$Ge(a, b) { 2270 return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b; 2271} 2272var $158dda26ac6b94e2$var$He = "function" === typeof Object.is ? Object.is : $158dda26ac6b94e2$var$Ge; 2273function $158dda26ac6b94e2$var$Ie(a, b) { 2274 if ($158dda26ac6b94e2$var$He(a, b)) return !0; 2275 if ("object" !== typeof a || null === a || "object" !== typeof b || null === b) return !1; 2276 var c = Object.keys(a), d = Object.keys(b); 2277 if (c.length !== d.length) return !1; 2278 for(d = 0; d < c.length; d++){ 2279 var e = c[d]; 2280 if (!$158dda26ac6b94e2$var$ja.call(b, e) || !$158dda26ac6b94e2$var$He(a[e], b[e])) return !1; 2281 } 2282 return !0; 2283} 2284function $158dda26ac6b94e2$var$Je(a) { 2285 for(; a && a.firstChild;)a = a.firstChild; 2286 return a; 2287} 2288function $158dda26ac6b94e2$var$Ke(a, b) { 2289 var c = $158dda26ac6b94e2$var$Je(a); 2290 a = 0; 2291 for(var d; c;){ 2292 if (3 === c.nodeType) { 2293 d = a + c.textContent.length; 2294 if (a <= b && d >= b) return { 2295 node: c, 2296 offset: b - a 2297 }; 2298 a = d; 2299 } 2300 a: { 2301 for(; c;){ 2302 if (c.nextSibling) { 2303 c = c.nextSibling; 2304 break a; 2305 } 2306 c = c.parentNode; 2307 } 2308 c = void 0; 2309 } 2310 c = $158dda26ac6b94e2$var$Je(c); 2311 } 2312} 2313function $158dda26ac6b94e2$var$Le(a, b) { 2314 return a && b ? a === b ? !0 : a && 3 === a.nodeType ? !1 : b && 3 === b.nodeType ? $158dda26ac6b94e2$var$Le(a, b.parentNode) : "contains" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : !1 : !1; 2315} 2316function $158dda26ac6b94e2$var$Me() { 2317 for(var a = window, b = $158dda26ac6b94e2$var$Xa(); b instanceof a.HTMLIFrameElement;){ 2318 try { 2319 var c = "string" === typeof b.contentWindow.location.href; 2320 } catch (d) { 2321 c = !1; 2322 } 2323 if (c) a = b.contentWindow; 2324 else break; 2325 b = $158dda26ac6b94e2$var$Xa(a.document); 2326 } 2327 return b; 2328} 2329function $158dda26ac6b94e2$var$Ne(a) { 2330 var b = a && a.nodeName && a.nodeName.toLowerCase(); 2331 return b && ("input" === b && ("text" === a.type || "search" === a.type || "tel" === a.type || "url" === a.type || "password" === a.type) || "textarea" === b || "true" === a.contentEditable); 2332} 2333function $158dda26ac6b94e2$var$Oe(a) { 2334 var b = $158dda26ac6b94e2$var$Me(), c = a.focusedElem, d = a.selectionRange; 2335 if (b !== c && c && c.ownerDocument && $158dda26ac6b94e2$var$Le(c.ownerDocument.documentElement, c)) { 2336 if (null !== d && $158dda26ac6b94e2$var$Ne(c)) { 2337 if (b = d.start, a = d.end, void 0 === a && (a = b), "selectionStart" in c) c.selectionStart = b, c.selectionEnd = Math.min(a, c.value.length); 2338 else if (a = (b = c.ownerDocument || document) && b.defaultView || window, a.getSelection) { 2339 a = a.getSelection(); 2340 var e = c.textContent.length, f = Math.min(d.start, e); 2341 d = void 0 === d.end ? f : Math.min(d.end, e); 2342 !a.extend && f > d && (e = d, d = f, f = e); 2343 e = $158dda26ac6b94e2$var$Ke(c, f); 2344 var g = $158dda26ac6b94e2$var$Ke(c, d); 2345 e && g && (1 !== a.rangeCount || a.anchorNode !== e.node || a.anchorOffset !== e.offset || a.focusNode !== g.node || a.focusOffset !== g.offset) && (b = b.createRange(), b.setStart(e.node, e.offset), a.removeAllRanges(), f > d ? (a.addRange(b), a.extend(g.node, g.offset)) : (b.setEnd(g.node, g.offset), a.addRange(b))); 2346 } 2347 } 2348 b = []; 2349 for(a = c; a = a.parentNode;)1 === a.nodeType && b.push({ 2350 element: a, 2351 left: a.scrollLeft, 2352 top: a.scrollTop 2353 }); 2354 "function" === typeof c.focus && c.focus(); 2355 for(c = 0; c < b.length; c++)a = b[c], a.element.scrollLeft = a.left, a.element.scrollTop = a.top; 2356 } 2357} 2358var $158dda26ac6b94e2$var$Pe = $158dda26ac6b94e2$var$ia && "documentMode" in document && 11 >= document.documentMode, $158dda26ac6b94e2$var$Qe = null, $158dda26ac6b94e2$var$Re = null, $158dda26ac6b94e2$var$Se = null, $158dda26ac6b94e2$var$Te = !1; 2359function $158dda26ac6b94e2$var$Ue(a, b, c) { 2360 var d = c.window === c ? c.document : 9 === c.nodeType ? c : c.ownerDocument; 2361 $158dda26ac6b94e2$var$Te || null == $158dda26ac6b94e2$var$Qe || $158dda26ac6b94e2$var$Qe !== $158dda26ac6b94e2$var$Xa(d) || (d = $158dda26ac6b94e2$var$Qe, "selectionStart" in d && $158dda26ac6b94e2$var$Ne(d) ? d = { 2362 start: d.selectionStart, 2363 end: d.selectionEnd 2364 } : (d = (d.ownerDocument && d.ownerDocument.defaultView || window).getSelection(), d = { 2365 anchorNode: d.anchorNode, 2366 anchorOffset: d.anchorOffset, 2367 focusNode: d.focusNode, 2368 focusOffset: d.focusOffset 2369 }), $158dda26ac6b94e2$var$Se && $158dda26ac6b94e2$var$Ie($158dda26ac6b94e2$var$Se, d) || ($158dda26ac6b94e2$var$Se = d, d = $158dda26ac6b94e2$var$oe($158dda26ac6b94e2$var$Re, "onSelect"), 0 < d.length && (b = new $158dda26ac6b94e2$var$td("onSelect", "select", null, b, c), a.push({ 2370 event: b, 2371 listeners: d 2372 }), b.target = $158dda26ac6b94e2$var$Qe))); 2373} 2374function $158dda26ac6b94e2$var$Ve(a, b) { 2375 var c = {}; 2376 c[a.toLowerCase()] = b.toLowerCase(); 2377 c["Webkit" + a] = "webkit" + b; 2378 c["Moz" + a] = "moz" + b; 2379 return c; 2380} 2381var $158dda26ac6b94e2$var$We = { 2382 animationend: $158dda26ac6b94e2$var$Ve("Animation", "AnimationEnd"), 2383 animationiteration: $158dda26ac6b94e2$var$Ve("Animation", "AnimationIteration"), 2384 animationstart: $158dda26ac6b94e2$var$Ve("Animation", "AnimationStart"), 2385 transitionend: $158dda26ac6b94e2$var$Ve("Transition", "TransitionEnd") 2386}, $158dda26ac6b94e2$var$Xe = {}, $158dda26ac6b94e2$var$Ye = {}; 2387$158dda26ac6b94e2$var$ia && ($158dda26ac6b94e2$var$Ye = document.createElement("div").style, "AnimationEvent" in window || (delete $158dda26ac6b94e2$var$We.animationend.animation, delete $158dda26ac6b94e2$var$We.animationiteration.animation, delete $158dda26ac6b94e2$var$We.animationstart.animation), "TransitionEvent" in window || delete $158dda26ac6b94e2$var$We.transitionend.transition); 2388function $158dda26ac6b94e2$var$Ze(a) { 2389 if ($158dda26ac6b94e2$var$Xe[a]) return $158dda26ac6b94e2$var$Xe[a]; 2390 if (!$158dda26ac6b94e2$var$We[a]) return a; 2391 var b = $158dda26ac6b94e2$var$We[a], c; 2392 for(c in b)if (b.hasOwnProperty(c) && c in $158dda26ac6b94e2$var$Ye) return $158dda26ac6b94e2$var$Xe[a] = b[c]; 2393 return a; 2394} 2395var $158dda26ac6b94e2$var$$e = $158dda26ac6b94e2$var$Ze("animationend"), $158dda26ac6b94e2$var$af = $158dda26ac6b94e2$var$Ze("animationiteration"), $158dda26ac6b94e2$var$bf = $158dda26ac6b94e2$var$Ze("animationstart"), $158dda26ac6b94e2$var$cf = $158dda26ac6b94e2$var$Ze("transitionend"), $158dda26ac6b94e2$var$df = new Map, $158dda26ac6b94e2$var$ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); 2396function $158dda26ac6b94e2$var$ff(a, b) { 2397 $158dda26ac6b94e2$var$df.set(a, b); 2398 $158dda26ac6b94e2$var$fa(b, [ 2399 a 2400 ]); 2401} 2402for(var $158dda26ac6b94e2$var$gf = 0; $158dda26ac6b94e2$var$gf < $158dda26ac6b94e2$var$ef.length; $158dda26ac6b94e2$var$gf++){ 2403 var $158dda26ac6b94e2$var$hf = $158dda26ac6b94e2$var$ef[$158dda26ac6b94e2$var$gf], $158dda26ac6b94e2$var$jf = $158dda26ac6b94e2$var$hf.toLowerCase(), $158dda26ac6b94e2$var$kf = $158dda26ac6b94e2$var$hf[0].toUpperCase() + $158dda26ac6b94e2$var$hf.slice(1); 2404 $158dda26ac6b94e2$var$ff($158dda26ac6b94e2$var$jf, "on" + $158dda26ac6b94e2$var$kf); 2405} 2406$158dda26ac6b94e2$var$ff($158dda26ac6b94e2$var$$e, "onAnimationEnd"); 2407$158dda26ac6b94e2$var$ff($158dda26ac6b94e2$var$af, "onAnimationIteration"); 2408$158dda26ac6b94e2$var$ff($158dda26ac6b94e2$var$bf, "onAnimationStart"); 2409$158dda26ac6b94e2$var$ff("dblclick", "onDoubleClick"); 2410$158dda26ac6b94e2$var$ff("focusin", "onFocus"); 2411$158dda26ac6b94e2$var$ff("focusout", "onBlur"); 2412$158dda26ac6b94e2$var$ff($158dda26ac6b94e2$var$cf, "onTransitionEnd"); 2413$158dda26ac6b94e2$var$ha("onMouseEnter", [ 2414 "mouseout", 2415 "mouseover" 2416]); 2417$158dda26ac6b94e2$var$ha("onMouseLeave", [ 2418 "mouseout", 2419 "mouseover" 2420]); 2421$158dda26ac6b94e2$var$ha("onPointerEnter", [ 2422 "pointerout", 2423 "pointerover" 2424]); 2425$158dda26ac6b94e2$var$ha("onPointerLeave", [ 2426 "pointerout", 2427 "pointerover" 2428]); 2429$158dda26ac6b94e2$var$fa("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
2430$158dda26ac6b94e2$var$fa("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")); 2431$158dda26ac6b94e2$var$fa("onBeforeInput", [ 2432 "compositionend", 2433 "keypress", 2434 "textInput", 2435 "paste" 2436]); 2437$158dda26ac6b94e2$var$fa("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")); 2438$158dda26ac6b94e2$var$fa("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")); 2439$158dda26ac6b94e2$var$fa("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" ")); 2440var $158dda26ac6b94e2$var$lf = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), $158dda26ac6b94e2$var$mf = new Set("cancel close invalid load scroll toggle".split(" ").concat($158dda26ac6b94e2$var$lf)); 2441function $158dda26ac6b94e2$var$nf(a, b, c) { 2442 var d = a.type || "unknown-event"; 2443 a.currentTarget = c; 2444 $158dda26ac6b94e2$var$Ub(d, b, void 0, a); 2445 a.currentTarget = null; 2446} 2447function $158dda26ac6b94e2$var$se(a, b) { 2448 b = 0 !== (b & 4); 2449 for(var c = 0; c < a.length; c++){ 2450 var d = a[c], e = d.event; 2451 d = d.listeners; 2452 a: { 2453 var f = void 0; 2454 if (b) for(var g = d.length - 1; 0 <= g; g--){ 2455 var h = d[g], k = h.instance, l = h.currentTarget; 2456 h = h.listener; 2457 if (k !== f && e.isPropagationStopped()) break a; 2458 $158dda26ac6b94e2$var$nf(e, h, l); 2459 f = k; 2460 } 2461 else for(g = 0; g < d.length; g++){ 2462 h = d[g]; 2463 k = h.instance; 2464 l = h.currentTarget; 2465 h = h.listener; 2466 if (k !== f && e.isPropagationStopped()) break a; 2467 $158dda26ac6b94e2$var$nf(e, h, l); 2468 f = k; 2469 } 2470 } 2471 } 2472 if ($158dda26ac6b94e2$var$Qb) throw a = $158dda26ac6b94e2$var$Rb, $158dda26ac6b94e2$var$Qb = !1, $158dda26ac6b94e2$var$Rb = null, a; 2473} 2474function $158dda26ac6b94e2$var$D(a, b) { 2475 var c = b[$158dda26ac6b94e2$var$of]; 2476 void 0 === c && (c = b[$158dda26ac6b94e2$var$of] = new Set); 2477 var d = a + "__bubble"; 2478 c.has(d) || ($158dda26ac6b94e2$var$pf(b, a, 2, !1), c.add(d)); 2479} 2480function $158dda26ac6b94e2$var$qf(a, b, c) { 2481 var d = 0; 2482 b && (d |= 4); 2483 $158dda26ac6b94e2$var$pf(c, a, d, b); 2484} 2485var $158dda26ac6b94e2$var$rf = "_reactListening" + Math.random().toString(36).slice(2); 2486function $158dda26ac6b94e2$var$sf(a) { 2487 if (!a[$158dda26ac6b94e2$var$rf]) { 2488 a[$158dda26ac6b94e2$var$rf] = !0;
vendor: 23,478 bytes, lines 2489-2988
2489 $158dda26ac6b94e2$var$da.forEach(function(b) { 2490 "selectionchange" !== b && ($158dda26ac6b94e2$var$mf.has(b) || $158dda26ac6b94e2$var$qf(b, !1, a), $158dda26ac6b94e2$var$qf(b, !0, a)); 2491 }); 2492 var b = 9 === a.nodeType ? a : a.ownerDocument; 2493 null === b || b[$158dda26ac6b94e2$var$rf] || (b[$158dda26ac6b94e2$var$rf] = !0, $158dda26ac6b94e2$var$qf("selectionchange", !1, b)); 2494 } 2495} 2496function $158dda26ac6b94e2$var$pf(a, b, c, d) { 2497 switch($158dda26ac6b94e2$var$jd(b)){ 2498 case 1: 2499 var e = $158dda26ac6b94e2$var$ed; 2500 break; 2501 case 4: 2502 e = $158dda26ac6b94e2$var$gd; 2503 break; 2504 default: 2505 e = $158dda26ac6b94e2$var$fd; 2506 } 2507 c = e.bind(null, b, c, a); 2508 e = void 0; 2509 !$158dda26ac6b94e2$var$Lb || "touchstart" !== b && "touchmove" !== b && "wheel" !== b || (e = !0); 2510 d ? void 0 !== e ? a.addEventListener(b, c, { 2511 capture: !0, 2512 passive: e 2513 }) : a.addEventListener(b, c, !0) : void 0 !== e ? a.addEventListener(b, c, { 2514 passive: e 2515 }) : a.addEventListener(b, c, !1); 2516} 2517function $158dda26ac6b94e2$var$hd(a, b, c, d, e) { 2518 var f = d; 2519 if (0 === (b & 1) && 0 === (b & 2) && null !== d) a: for(;;){ 2520 if (null === d) return; 2521 var g = d.tag; 2522 if (3 === g || 4 === g) { 2523 var h = d.stateNode.containerInfo; 2524 if (h === e || 8 === h.nodeType && h.parentNode === e) break; 2525 if (4 === g) for(g = d.return; null !== g;){ 2526 var k = g.tag; 2527 if (3 === k || 4 === k) { 2528 if (k = g.stateNode.containerInfo, k === e || 8 === k.nodeType && k.parentNode === e) return; 2529 } 2530 g = g.return; 2531 } 2532 for(; null !== h;){ 2533 g = $158dda26ac6b94e2$var$Wc(h); 2534 if (null === g) return; 2535 k = g.tag; 2536 if (5 === k || 6 === k) { 2537 d = f = g; 2538 continue a; 2539 } 2540 h = h.parentNode; 2541 } 2542 } 2543 d = d.return; 2544 } 2545 $158dda26ac6b94e2$var$Jb(function() { 2546 var d = f, e = $158dda26ac6b94e2$var$xb(c), g = []; 2547 a: { 2548 var h = $158dda26ac6b94e2$var$df.get(a); 2549 if (void 0 !== h) { 2550 var k = $158dda26ac6b94e2$var$td, n = a; 2551 switch(a){ 2552 case "keypress": 2553 if (0 === $158dda26ac6b94e2$var$od(c)) break a; 2554 case "keydown": 2555 case "keyup": 2556 k = $158dda26ac6b94e2$var$Rd; 2557 break; 2558 case "focusin": 2559 n = "focus"; 2560 k = $158dda26ac6b94e2$var$Fd; 2561 break; 2562 case "focusout": 2563 n = "blur"; 2564 k = $158dda26ac6b94e2$var$Fd; 2565 break; 2566 case "beforeblur": 2567 case "afterblur": 2568 k = $158dda26ac6b94e2$var$Fd; 2569 break; 2570 case "click": 2571 if (2 === c.button) break a; 2572 case "auxclick": 2573 case "dblclick": 2574 case "mousedown": 2575 case "mousemove": 2576 case "mouseup": 2577 case "mouseout": 2578 case "mouseover": 2579 case "contextmenu": 2580 k = $158dda26ac6b94e2$var$Bd; 2581 break; 2582 case "drag": 2583 case "dragend": 2584 case "dragenter": 2585 case "dragexit": 2586 case "dragleave": 2587 case "dragover": 2588 case "dragstart": 2589 case "drop": 2590 k = $158dda26ac6b94e2$var$Dd; 2591 break; 2592 case "touchcancel": 2593 case "touchend": 2594 case "touchmove": 2595 case "touchstart": 2596 k = $158dda26ac6b94e2$var$Vd; 2597 break; 2598 case $158dda26ac6b94e2$var$$e: 2599 case $158dda26ac6b94e2$var$af: 2600 case $158dda26ac6b94e2$var$bf: 2601 k = $158dda26ac6b94e2$var$Hd; 2602 break; 2603 case $158dda26ac6b94e2$var$cf: 2604 k = $158dda26ac6b94e2$var$Xd; 2605 break; 2606 case "scroll": 2607 k = $158dda26ac6b94e2$var$vd; 2608 break; 2609 case "wheel": 2610 k = $158dda26ac6b94e2$var$Zd; 2611 break; 2612 case "copy": 2613 case "cut": 2614 case "paste": 2615 k = $158dda26ac6b94e2$var$Jd; 2616 break; 2617 case "gotpointercapture": 2618 case "lostpointercapture": 2619 case "pointercancel": 2620 case "pointerdown": 2621 case "pointermove": 2622 case "pointerout": 2623 case "pointerover": 2624 case "pointerup": 2625 k = $158dda26ac6b94e2$var$Td; 2626 } 2627 var t = 0 !== (b & 4), J = !t && "scroll" === a, x = t ? null !== h ? h + "Capture" : null : h; 2628 t = []; 2629 for(var w = d, u; null !== w;){ 2630 u = w; 2631 var F = u.stateNode; 2632 5 === u.tag && null !== F && (u = F, null !== x && (F = $158dda26ac6b94e2$var$Kb(w, x), null != F && t.push($158dda26ac6b94e2$var$tf(w, F, u)))); 2633 if (J) break; 2634 w = w.return; 2635 } 2636 0 < t.length && (h = new k(h, n, null, c, e), g.push({ 2637 event: h, 2638 listeners: t 2639 })); 2640 } 2641 } 2642 if (0 === (b & 7)) { 2643 a: { 2644 h = "mouseover" === a || "pointerover" === a; 2645 k = "mouseout" === a || "pointerout" === a; 2646 if (h && c !== $158dda26ac6b94e2$var$wb && (n = c.relatedTarget || c.fromElement) && ($158dda26ac6b94e2$var$Wc(n) || n[$158dda26ac6b94e2$var$uf])) break a; 2647 if (k || h) { 2648 h = e.window === e ? e : (h = e.ownerDocument) ? h.defaultView || h.parentWindow : window; 2649 if (k) { 2650 if (n = c.relatedTarget || c.toElement, k = d, n = n ? $158dda26ac6b94e2$var$Wc(n) : null, null !== n && (J = $158dda26ac6b94e2$var$Vb(n), n !== J || 5 !== n.tag && 6 !== n.tag)) n = null; 2651 } else k = null, n = d; 2652 if (k !== n) { 2653 t = $158dda26ac6b94e2$var$Bd; 2654 F = "onMouseLeave"; 2655 x = "onMouseEnter"; 2656 w = "mouse"; 2657 if ("pointerout" === a || "pointerover" === a) t = $158dda26ac6b94e2$var$Td, F = "onPointerLeave", x = "onPointerEnter", w = "pointer"; 2658 J = null == k ? h : $158dda26ac6b94e2$var$ue(k); 2659 u = null == n ? h : $158dda26ac6b94e2$var$ue(n); 2660 h = new t(F, w + "leave", k, c, e); 2661 h.target = J; 2662 h.relatedTarget = u; 2663 F = null; 2664 $158dda26ac6b94e2$var$Wc(e) === d && (t = new t(x, w + "enter", n, c, e), t.target = u, t.relatedTarget = J, F = t); 2665 J = F; 2666 if (k && n) b: { 2667 t = k; 2668 x = n; 2669 w = 0; 2670 for(u = t; u; u = $158dda26ac6b94e2$var$vf(u))w++; 2671 u = 0; 2672 for(F = x; F; F = $158dda26ac6b94e2$var$vf(F))u++; 2673 for(; 0 < w - u;)t = $158dda26ac6b94e2$var$vf(t), w--; 2674 for(; 0 < u - w;)x = $158dda26ac6b94e2$var$vf(x), u--; 2675 for(; w--;){ 2676 if (t === x || null !== x && t === x.alternate) break b; 2677 t = $158dda26ac6b94e2$var$vf(t); 2678 x = $158dda26ac6b94e2$var$vf(x); 2679 } 2680 t = null; 2681 } 2682 else t = null; 2683 null !== k && $158dda26ac6b94e2$var$wf(g, h, k, t, !1); 2684 null !== n && null !== J && $158dda26ac6b94e2$var$wf(g, J, n, t, !0); 2685 } 2686 } 2687 } 2688 a: { 2689 h = d ? $158dda26ac6b94e2$var$ue(d) : window; 2690 k = h.nodeName && h.nodeName.toLowerCase(); 2691 if ("select" === k || "input" === k && "file" === h.type) var na = $158dda26ac6b94e2$var$ve; 2692 else if ($158dda26ac6b94e2$var$me(h)) { 2693 if ($158dda26ac6b94e2$var$we) na = $158dda26ac6b94e2$var$Fe; 2694 else { 2695 na = $158dda26ac6b94e2$var$De; 2696 var xa = $158dda26ac6b94e2$var$Ce; 2697 } 2698 } else (k = h.nodeName) && "input" === k.toLowerCase() && ("checkbox" === h.type || "radio" === h.type) && (na = $158dda26ac6b94e2$var$Ee); 2699 if (na && (na = na(a, d))) { 2700 $158dda26ac6b94e2$var$ne(g, na, c, e); 2701 break a; 2702 } 2703 xa && xa(a, h, d); 2704 "focusout" === a && (xa = h._wrapperState) && xa.controlled && "number" === h.type && $158dda26ac6b94e2$var$cb(h, "number", h.value); 2705 } 2706 xa = d ? $158dda26ac6b94e2$var$ue(d) : window; 2707 switch(a){ 2708 case "focusin": 2709 if ($158dda26ac6b94e2$var$me(xa) || "true" === xa.contentEditable) $158dda26ac6b94e2$var$Qe = xa, $158dda26ac6b94e2$var$Re = d, $158dda26ac6b94e2$var$Se = null; 2710 break; 2711 case "focusout": 2712 $158dda26ac6b94e2$var$Se = $158dda26ac6b94e2$var$Re = $158dda26ac6b94e2$var$Qe = null; 2713 break; 2714 case "mousedown": 2715 $158dda26ac6b94e2$var$Te = !0; 2716 break; 2717 case "contextmenu": 2718 case "mouseup": 2719 case "dragend": 2720 $158dda26ac6b94e2$var$Te = !1; 2721 $158dda26ac6b94e2$var$Ue(g, c, e); 2722 break; 2723 case "selectionchange": 2724 if ($158dda26ac6b94e2$var$Pe) break; 2725 case "keydown": 2726 case "keyup": 2727 $158dda26ac6b94e2$var$Ue(g, c, e); 2728 } 2729 var $a; 2730 if ($158dda26ac6b94e2$var$ae) b: { 2731 switch(a){ 2732 case "compositionstart": 2733 var ba = "onCompositionStart"; 2734 break b; 2735 case "compositionend": 2736 ba = "onCompositionEnd"; 2737 break b; 2738 case "compositionupdate": 2739 ba = "onCompositionUpdate"; 2740 break b; 2741 } 2742 ba = void 0; 2743 } 2744 else $158dda26ac6b94e2$var$ie ? $158dda26ac6b94e2$var$ge(a, c) && (ba = "onCompositionEnd") : "keydown" === a && 229 === c.keyCode && (ba = "onCompositionStart"); 2745 ba && ($158dda26ac6b94e2$var$de && "ko" !== c.locale && ($158dda26ac6b94e2$var$ie || "onCompositionStart" !== ba ? "onCompositionEnd" === ba && $158dda26ac6b94e2$var$ie && ($a = $158dda26ac6b94e2$var$nd()) : ($158dda26ac6b94e2$var$kd = e, $158dda26ac6b94e2$var$ld = "value" in $158dda26ac6b94e2$var$kd ? $158dda26ac6b94e2$var$kd.value : $158dda26ac6b94e2$var$kd.textContent, $158dda26ac6b94e2$var$ie = !0)), xa = $158dda26ac6b94e2$var$oe(d, ba), 0 < xa.length && (ba = new $158dda26ac6b94e2$var$Ld(ba, a, null, c, e), g.push({ 2746 event: ba, 2747 listeners: xa 2748 }), $a ? ba.data = $a : ($a = $158dda26ac6b94e2$var$he(c), null !== $a && (ba.data = $a)))); 2749 if ($a = $158dda26ac6b94e2$var$ce ? $158dda26ac6b94e2$var$je(a, c) : $158dda26ac6b94e2$var$ke(a, c)) d = $158dda26ac6b94e2$var$oe(d, "onBeforeInput"), 0 < d.length && (e = new $158dda26ac6b94e2$var$Ld("onBeforeInput", "beforeinput", null, c, e), g.push({ 2750 event: e, 2751 listeners: d 2752 }), e.data = $a); 2753 } 2754 $158dda26ac6b94e2$var$se(g, b); 2755 }); 2756} 2757function $158dda26ac6b94e2$var$tf(a, b, c) { 2758 return { 2759 instance: a, 2760 listener: b, 2761 currentTarget: c 2762 }; 2763} 2764function $158dda26ac6b94e2$var$oe(a, b) { 2765 for(var c = b + "Capture", d = []; null !== a;){ 2766 var e = a, f = e.stateNode; 2767 5 === e.tag && null !== f && (e = f, f = $158dda26ac6b94e2$var$Kb(a, c), null != f && d.unshift($158dda26ac6b94e2$var$tf(a, f, e)), f = $158dda26ac6b94e2$var$Kb(a, b), null != f && d.push($158dda26ac6b94e2$var$tf(a, f, e))); 2768 a = a.return; 2769 } 2770 return d; 2771} 2772function $158dda26ac6b94e2$var$vf(a) { 2773 if (null === a) return null; 2774 do a = a.return; 2775 while (a && 5 !== a.tag); 2776 return a ? a : null; 2777} 2778function $158dda26ac6b94e2$var$wf(a, b, c, d, e) { 2779 for(var f = b._reactName, g = []; null !== c && c !== d;){ 2780 var h = c, k = h.alternate, l = h.stateNode; 2781 if (null !== k && k === d) break; 2782 5 === h.tag && null !== l && (h = l, e ? (k = $158dda26ac6b94e2$var$Kb(c, f), null != k && g.unshift($158dda26ac6b94e2$var$tf(c, k, h))) : e || (k = $158dda26ac6b94e2$var$Kb(c, f), null != k && g.push($158dda26ac6b94e2$var$tf(c, k, h)))); 2783 c = c.return; 2784 } 2785 0 !== g.length && a.push({ 2786 event: b, 2787 listeners: g 2788 }); 2789} 2790var $158dda26ac6b94e2$var$xf = /\r\n?/g, $158dda26ac6b94e2$var$yf = /\u0000|\uFFFD/g; 2791function $158dda26ac6b94e2$var$zf(a) { 2792 return ("string" === typeof a ? a : "" + a).replace($158dda26ac6b94e2$var$xf, "\n").replace($158dda26ac6b94e2$var$yf, ""); 2793} 2794function $158dda26ac6b94e2$var$Af(a, b, c) { 2795 b = $158dda26ac6b94e2$var$zf(b); 2796 if ($158dda26ac6b94e2$var$zf(a) !== b && c) throw Error($158dda26ac6b94e2$var$p(425)); 2797} 2798function $158dda26ac6b94e2$var$Bf() {} 2799var $158dda26ac6b94e2$var$Cf = null, $158dda26ac6b94e2$var$Df = null; 2800function $158dda26ac6b94e2$var$Ef(a, b) { 2801 return "textarea" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === typeof b.dangerouslySetInnerHTML && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html; 2802} 2803var $158dda26ac6b94e2$var$Ff = "function" === typeof setTimeout ? setTimeout : void 0, $158dda26ac6b94e2$var$Gf = "function" === typeof clearTimeout ? clearTimeout : void 0, $158dda26ac6b94e2$var$Hf = "function" === typeof Promise ? Promise : void 0, $158dda26ac6b94e2$var$Jf = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof $158dda26ac6b94e2$var$Hf ? function(a) { 2804 return $158dda26ac6b94e2$var$Hf.resolve(null).then(a).catch($158dda26ac6b94e2$var$If); 2805} : $158dda26ac6b94e2$var$Ff; 2806function $158dda26ac6b94e2$var$If(a) { 2807 setTimeout(function() { 2808 throw a; 2809 }); 2810} 2811function $158dda26ac6b94e2$var$Kf(a, b) { 2812 var c = b, d = 0; 2813 do { 2814 var e = c.nextSibling; 2815 a.removeChild(c); 2816 if (e && 8 === e.nodeType) { 2817 if (c = e.data, "/$" === c) { 2818 if (0 === d) { 2819 a.removeChild(e); 2820 $158dda26ac6b94e2$var$bd(b); 2821 return; 2822 } 2823 d--; 2824 } else "$" !== c && "$?" !== c && "$!" !== c || d++; 2825 } 2826 c = e; 2827 }while (c); 2828 $158dda26ac6b94e2$var$bd(b); 2829} 2830function $158dda26ac6b94e2$var$Lf(a) { 2831 for(; null != a; a = a.nextSibling){ 2832 var b = a.nodeType; 2833 if (1 === b || 3 === b) break; 2834 if (8 === b) { 2835 b = a.data; 2836 if ("$" === b || "$!" === b || "$?" === b) break; 2837 if ("/$" === b) return null; 2838 } 2839 } 2840 return a; 2841} 2842function $158dda26ac6b94e2$var$Mf(a) { 2843 a = a.previousSibling; 2844 for(var b = 0; a;){ 2845 if (8 === a.nodeType) { 2846 var c = a.data; 2847 if ("$" === c || "$!" === c || "$?" === c) { 2848 if (0 === b) return a; 2849 b--; 2850 } else "/$" === c && b++; 2851 } 2852 a = a.previousSibling; 2853 } 2854 return null; 2855} 2856var $158dda26ac6b94e2$var$Nf = Math.random().toString(36).slice(2), $158dda26ac6b94e2$var$Of = "__reactFiber$" + $158dda26ac6b94e2$var$Nf, $158dda26ac6b94e2$var$Pf = "__reactProps$" + $158dda26ac6b94e2$var$Nf, $158dda26ac6b94e2$var$uf = "__reactContainer$" + $158dda26ac6b94e2$var$Nf, $158dda26ac6b94e2$var$of = "__reactEvents$" + $158dda26ac6b94e2$var$Nf, $158dda26ac6b94e2$var$Qf = "__reactListeners$" + $158dda26ac6b94e2$var$Nf, $158dda26ac6b94e2$var$Rf = "__reactHandles$" + $158dda26ac6b94e2$var$Nf; 2857function $158dda26ac6b94e2$var$Wc(a) { 2858 var b = a[$158dda26ac6b94e2$var$Of]; 2859 if (b) return b; 2860 for(var c = a.parentNode; c;){ 2861 if (b = c[$158dda26ac6b94e2$var$uf] || c[$158dda26ac6b94e2$var$Of]) { 2862 c = b.alternate; 2863 if (null !== b.child || null !== c && null !== c.child) for(a = $158dda26ac6b94e2$var$Mf(a); null !== a;){ 2864 if (c = a[$158dda26ac6b94e2$var$Of]) return c; 2865 a = $158dda26ac6b94e2$var$Mf(a); 2866 } 2867 return b; 2868 } 2869 a = c; 2870 c = a.parentNode; 2871 } 2872 return null; 2873} 2874function $158dda26ac6b94e2$var$Cb(a) { 2875 a = a[$158dda26ac6b94e2$var$Of] || a[$158dda26ac6b94e2$var$uf]; 2876 return !a || 5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag ? null : a; 2877} 2878function $158dda26ac6b94e2$var$ue(a) { 2879 if (5 === a.tag || 6 === a.tag) return a.stateNode; 2880 throw Error($158dda26ac6b94e2$var$p(33)); 2881} 2882function $158dda26ac6b94e2$var$Db(a) { 2883 return a[$158dda26ac6b94e2$var$Pf] || null; 2884} 2885var $158dda26ac6b94e2$var$Sf = [], $158dda26ac6b94e2$var$Tf = -1; 2886function $158dda26ac6b94e2$var$Uf(a) { 2887 return { 2888 current: a 2889 }; 2890} 2891function $158dda26ac6b94e2$var$E(a) { 2892 0 > $158dda26ac6b94e2$var$Tf || (a.current = $158dda26ac6b94e2$var$Sf[$158dda26ac6b94e2$var$Tf], $158dda26ac6b94e2$var$Sf[$158dda26ac6b94e2$var$Tf] = null, $158dda26ac6b94e2$var$Tf--); 2893} 2894function $158dda26ac6b94e2$var$G(a, b) { 2895 $158dda26ac6b94e2$var$Tf++; 2896 $158dda26ac6b94e2$var$Sf[$158dda26ac6b94e2$var$Tf] = a.current; 2897 a.current = b; 2898} 2899var $158dda26ac6b94e2$var$Vf = {}, $158dda26ac6b94e2$var$H = $158dda26ac6b94e2$var$Uf($158dda26ac6b94e2$var$Vf), $158dda26ac6b94e2$var$Wf = $158dda26ac6b94e2$var$Uf(!1), $158dda26ac6b94e2$var$Xf = $158dda26ac6b94e2$var$Vf; 2900function $158dda26ac6b94e2$var$Yf(a, b) { 2901 var c = a.type.contextTypes; 2902 if (!c) return $158dda26ac6b94e2$var$Vf; 2903 var d = a.stateNode; 2904 if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext; 2905 var e = {}, f; 2906 for(f in c)e[f] = b[f]; 2907 d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e); 2908 return e; 2909} 2910function $158dda26ac6b94e2$var$Zf(a) { 2911 a = a.childContextTypes; 2912 return null !== a && void 0 !== a; 2913} 2914function $158dda26ac6b94e2$var$$f() { 2915 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$Wf); 2916 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$H); 2917} 2918function $158dda26ac6b94e2$var$ag(a, b, c) { 2919 if ($158dda26ac6b94e2$var$H.current !== $158dda26ac6b94e2$var$Vf) throw Error($158dda26ac6b94e2$var$p(168)); 2920 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$H, b); 2921 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$Wf, c); 2922} 2923function $158dda26ac6b94e2$var$bg(a, b, c) { 2924 var d = a.stateNode; 2925 b = b.childContextTypes; 2926 if ("function" !== typeof d.getChildContext) return c; 2927 d = d.getChildContext(); 2928 for(var e in d)if (!(e in b)) throw Error($158dda26ac6b94e2$var$p(108, $158dda26ac6b94e2$var$Ra(a) || "Unknown", e)); 2929 return $158dda26ac6b94e2$var$A({}, c, d); 2930} 2931function $158dda26ac6b94e2$var$cg(a) { 2932 a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || $158dda26ac6b94e2$var$Vf; 2933 $158dda26ac6b94e2$var$Xf = $158dda26ac6b94e2$var$H.current; 2934 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$H, a); 2935 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$Wf, $158dda26ac6b94e2$var$Wf.current); 2936 return !0; 2937} 2938function $158dda26ac6b94e2$var$dg(a, b, c) { 2939 var d = a.stateNode; 2940 if (!d) throw Error($158dda26ac6b94e2$var$p(169)); 2941 c ? (a = $158dda26ac6b94e2$var$bg(a, b, $158dda26ac6b94e2$var$Xf), d.__reactInternalMemoizedMergedChildContext = a, $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$Wf), $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$H), $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$H, a)) : $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$Wf); 2942 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$Wf, c); 2943} 2944var $158dda26ac6b94e2$var$eg = null, $158dda26ac6b94e2$var$fg = !1, $158dda26ac6b94e2$var$gg = !1; 2945function $158dda26ac6b94e2$var$hg(a) { 2946 null === $158dda26ac6b94e2$var$eg ? $158dda26ac6b94e2$var$eg = [ 2947 a 2948 ] : $158dda26ac6b94e2$var$eg.push(a); 2949} 2950function $158dda26ac6b94e2$var$ig(a) { 2951 $158dda26ac6b94e2$var$fg = !0; 2952 $158dda26ac6b94e2$var$hg(a); 2953} 2954function $158dda26ac6b94e2$var$jg() { 2955 if (!$158dda26ac6b94e2$var$gg && null !== $158dda26ac6b94e2$var$eg) { 2956 $158dda26ac6b94e2$var$gg = !0; 2957 var a = 0, b = $158dda26ac6b94e2$var$C; 2958 try { 2959 var c = $158dda26ac6b94e2$var$eg; 2960 for($158dda26ac6b94e2$var$C = 1; a < c.length; a++){ 2961 var d = c[a]; 2962 do d = d(!0); 2963 while (null !== d); 2964 } 2965 $158dda26ac6b94e2$var$eg = null; 2966 $158dda26ac6b94e2$var$fg = !1; 2967 } catch (e) { 2968 throw null !== $158dda26ac6b94e2$var$eg && ($158dda26ac6b94e2$var$eg = $158dda26ac6b94e2$var$eg.slice(a + 1)), $158dda26ac6b94e2$var$ac($158dda26ac6b94e2$var$fc, $158dda26ac6b94e2$var$jg), e; 2969 } finally{ 2970 $158dda26ac6b94e2$var$C = b, $158dda26ac6b94e2$var$gg = !1; 2971 } 2972 } 2973 return null; 2974} 2975var $158dda26ac6b94e2$var$kg = [], $158dda26ac6b94e2$var$lg = 0, $158dda26ac6b94e2$var$mg = null, $158dda26ac6b94e2$var$ng = 0, $158dda26ac6b94e2$var$og = [], $158dda26ac6b94e2$var$pg = 0, $158dda26ac6b94e2$var$qg = null, $158dda26ac6b94e2$var$rg = 1, $158dda26ac6b94e2$var$sg = ""; 2976function $158dda26ac6b94e2$var$tg(a, b) { 2977 $158dda26ac6b94e2$var$kg[$158dda26ac6b94e2$var$lg++] = $158dda26ac6b94e2$var$ng; 2978 $158dda26ac6b94e2$var$kg[$158dda26ac6b94e2$var$lg++] = $158dda26ac6b94e2$var$mg; 2979 $158dda26ac6b94e2$var$mg = a; 2980 $158dda26ac6b94e2$var$ng = b; 2981} 2982function $158dda26ac6b94e2$var$ug(a, b, c) { 2983 $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg++] = $158dda26ac6b94e2$var$rg; 2984 $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg++] = $158dda26ac6b94e2$var$sg; 2985 $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg++] = $158dda26ac6b94e2$var$qg; 2986 $158dda26ac6b94e2$var$qg = a; 2987 var d = $158dda26ac6b94e2$var$rg; 2988 a = $158dda26ac6b94e2$var$sg;
vendor: 1,761 bytes, lines 2989-3015
2989 var e = 32 - $158dda26ac6b94e2$var$oc(d) - 1; 2990 d &= ~(1 << e); 2991 c += 1; 2992 var f = 32 - $158dda26ac6b94e2$var$oc(b) + e; 2993 if (30 < f) { 2994 var g = e - e % 5; 2995 f = (d & (1 << g) - 1).toString(32); 2996 d >>= g; 2997 e -= g; 2998 $158dda26ac6b94e2$var$rg = 1 << 32 - $158dda26ac6b94e2$var$oc(b) + e | c << e | d; 2999 $158dda26ac6b94e2$var$sg = f + a; 3000 } else $158dda26ac6b94e2$var$rg = 1 << f | c << e | d, $158dda26ac6b94e2$var$sg = a; 3001} 3002function $158dda26ac6b94e2$var$vg(a) { 3003 null !== a.return && ($158dda26ac6b94e2$var$tg(a, 1), $158dda26ac6b94e2$var$ug(a, 1, 0)); 3004} 3005function $158dda26ac6b94e2$var$wg(a) { 3006 for(; a === $158dda26ac6b94e2$var$mg;)$158dda26ac6b94e2$var$mg = $158dda26ac6b94e2$var$kg[--$158dda26ac6b94e2$var$lg], $158dda26ac6b94e2$var$kg[$158dda26ac6b94e2$var$lg] = null, $158dda26ac6b94e2$var$ng = $158dda26ac6b94e2$var$kg[--$158dda26ac6b94e2$var$lg], $158dda26ac6b94e2$var$kg[$158dda26ac6b94e2$var$lg] = null; 3007 for(; a === $158dda26ac6b94e2$var$qg;)$158dda26ac6b94e2$var$qg = $158dda26ac6b94e2$var$og[--$158dda26ac6b94e2$var$pg], $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg] = null, $158dda26ac6b94e2$var$sg = $158dda26ac6b94e2$var$og[--$158dda26ac6b94e2$var$pg], $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg] = null, $158dda26ac6b94e2$var$rg = $158dda26ac6b94e2$var$og[--$158dda26ac6b94e2$var$pg], $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg] = null; 3008} 3009var $158dda26ac6b94e2$var$xg = null, $158dda26ac6b94e2$var$yg = null, $158dda26ac6b94e2$var$I = !1, $158dda26ac6b94e2$var$zg = null; 3010function $158dda26ac6b94e2$var$Ag(a, b) { 3011 var c = $158dda26ac6b94e2$var$Bg(5, null, null, 0); 3012 c.elementType = "DELETED"; 3013 c.stateNode = b; 3014 c.return = a; 3015 b = a.deletions;
vendor: 113,827 bytes, lines 3016-5640
3016 null === b ? (a.deletions = [ 3017 c 3018 ], a.flags |= 16) : b.push(c); 3019} 3020function $158dda26ac6b94e2$var$Cg(a, b) { 3021 switch(a.tag){ 3022 case 5: 3023 var c = a.type; 3024 b = 1 !== b.nodeType || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b; 3025 return null !== b ? (a.stateNode = b, $158dda26ac6b94e2$var$xg = a, $158dda26ac6b94e2$var$yg = $158dda26ac6b94e2$var$Lf(b.firstChild), !0) : !1; 3026 case 6: 3027 return b = "" === a.pendingProps || 3 !== b.nodeType ? null : b, null !== b ? (a.stateNode = b, $158dda26ac6b94e2$var$xg = a, $158dda26ac6b94e2$var$yg = null, !0) : !1; 3028 case 13: 3029 return b = 8 !== b.nodeType ? null : b, null !== b ? (c = null !== $158dda26ac6b94e2$var$qg ? { 3030 id: $158dda26ac6b94e2$var$rg, 3031 overflow: $158dda26ac6b94e2$var$sg 3032 } : null, a.memoizedState = { 3033 dehydrated: b, 3034 treeContext: c, 3035 retryLane: 1073741824 3036 }, c = $158dda26ac6b94e2$var$Bg(18, null, null, 0), c.stateNode = b, c.return = a, a.child = c, $158dda26ac6b94e2$var$xg = a, $158dda26ac6b94e2$var$yg = null, !0) : !1; 3037 default: 3038 return !1; 3039 } 3040} 3041function $158dda26ac6b94e2$var$Dg(a) { 3042 return 0 !== (a.mode & 1) && 0 === (a.flags & 128); 3043} 3044function $158dda26ac6b94e2$var$Eg(a) { 3045 if ($158dda26ac6b94e2$var$I) { 3046 var b = $158dda26ac6b94e2$var$yg; 3047 if (b) { 3048 var c = b; 3049 if (!$158dda26ac6b94e2$var$Cg(a, b)) { 3050 if ($158dda26ac6b94e2$var$Dg(a)) throw Error($158dda26ac6b94e2$var$p(418)); 3051 b = $158dda26ac6b94e2$var$Lf(c.nextSibling); 3052 var d = $158dda26ac6b94e2$var$xg; 3053 b && $158dda26ac6b94e2$var$Cg(a, b) ? $158dda26ac6b94e2$var$Ag(d, c) : (a.flags = a.flags & -4097 | 2, $158dda26ac6b94e2$var$I = !1, $158dda26ac6b94e2$var$xg = a); 3054 } 3055 } else { 3056 if ($158dda26ac6b94e2$var$Dg(a)) throw Error($158dda26ac6b94e2$var$p(418)); 3057 a.flags = a.flags & -4097 | 2; 3058 $158dda26ac6b94e2$var$I = !1; 3059 $158dda26ac6b94e2$var$xg = a; 3060 } 3061 } 3062} 3063function $158dda26ac6b94e2$var$Fg(a) { 3064 for(a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag;)a = a.return; 3065 $158dda26ac6b94e2$var$xg = a; 3066} 3067function $158dda26ac6b94e2$var$Gg(a) { 3068 if (a !== $158dda26ac6b94e2$var$xg) return !1; 3069 if (!$158dda26ac6b94e2$var$I) return $158dda26ac6b94e2$var$Fg(a), $158dda26ac6b94e2$var$I = !0, !1; 3070 var b; 3071 (b = 3 !== a.tag) && !(b = 5 !== a.tag) && (b = a.type, b = "head" !== b && "body" !== b && !$158dda26ac6b94e2$var$Ef(a.type, a.memoizedProps)); 3072 if (b && (b = $158dda26ac6b94e2$var$yg)) { 3073 if ($158dda26ac6b94e2$var$Dg(a)) throw $158dda26ac6b94e2$var$Hg(), Error($158dda26ac6b94e2$var$p(418)); 3074 for(; b;)$158dda26ac6b94e2$var$Ag(a, b), b = $158dda26ac6b94e2$var$Lf(b.nextSibling); 3075 } 3076 $158dda26ac6b94e2$var$Fg(a); 3077 if (13 === a.tag) { 3078 a = a.memoizedState; 3079 a = null !== a ? a.dehydrated : null; 3080 if (!a) throw Error($158dda26ac6b94e2$var$p(317)); 3081 a: { 3082 a = a.nextSibling; 3083 for(b = 0; a;){ 3084 if (8 === a.nodeType) { 3085 var c = a.data; 3086 if ("/$" === c) { 3087 if (0 === b) { 3088 $158dda26ac6b94e2$var$yg = $158dda26ac6b94e2$var$Lf(a.nextSibling); 3089 break a; 3090 } 3091 b--; 3092 } else "$" !== c && "$!" !== c && "$?" !== c || b++; 3093 } 3094 a = a.nextSibling; 3095 } 3096 $158dda26ac6b94e2$var$yg = null; 3097 } 3098 } else $158dda26ac6b94e2$var$yg = $158dda26ac6b94e2$var$xg ? $158dda26ac6b94e2$var$Lf(a.stateNode.nextSibling) : null; 3099 return !0; 3100} 3101function $158dda26ac6b94e2$var$Hg() { 3102 for(var a = $158dda26ac6b94e2$var$yg; a;)a = $158dda26ac6b94e2$var$Lf(a.nextSibling); 3103} 3104function $158dda26ac6b94e2$var$Ig() { 3105 $158dda26ac6b94e2$var$yg = $158dda26ac6b94e2$var$xg = null; 3106 $158dda26ac6b94e2$var$I = !1; 3107} 3108function $158dda26ac6b94e2$var$Jg(a) { 3109 null === $158dda26ac6b94e2$var$zg ? $158dda26ac6b94e2$var$zg = [ 3110 a 3111 ] : $158dda26ac6b94e2$var$zg.push(a); 3112} 3113var $158dda26ac6b94e2$var$Kg = $158dda26ac6b94e2$var$ua.ReactCurrentBatchConfig; 3114function $158dda26ac6b94e2$var$Lg(a, b, c) { 3115 a = c.ref; 3116 if (null !== a && "function" !== typeof a && "object" !== typeof a) { 3117 if (c._owner) { 3118 c = c._owner; 3119 if (c) { 3120 if (1 !== c.tag) throw Error($158dda26ac6b94e2$var$p(309)); 3121 var d = c.stateNode; 3122 } 3123 if (!d) throw Error($158dda26ac6b94e2$var$p(147, a)); 3124 var e = d, f = "" + a; 3125 if (null !== b && null !== b.ref && "function" === typeof b.ref && b.ref._stringRef === f) return b.ref; 3126 b = function(a) { 3127 var b = e.refs; 3128 null === a ? delete b[f] : b[f] = a; 3129 }; 3130 b._stringRef = f; 3131 return b; 3132 } 3133 if ("string" !== typeof a) throw Error($158dda26ac6b94e2$var$p(284)); 3134 if (!c._owner) throw Error($158dda26ac6b94e2$var$p(290, a)); 3135 } 3136 return a; 3137} 3138function $158dda26ac6b94e2$var$Mg(a, b) { 3139 a = Object.prototype.toString.call(b); 3140 throw Error($158dda26ac6b94e2$var$p(31, "[object Object]" === a ? "object with keys {" + Object.keys(b).join(", ") + "}" : a)); 3141} 3142function $158dda26ac6b94e2$var$Ng(a) { 3143 var b = a._init; 3144 return b(a._payload); 3145} 3146function $158dda26ac6b94e2$var$Og(a) { 3147 function b(b, c) { 3148 if (a) { 3149 var d = b.deletions; 3150 null === d ? (b.deletions = [ 3151 c 3152 ], b.flags |= 16) : d.push(c); 3153 } 3154 } 3155 function c(c, d) { 3156 if (!a) return null; 3157 for(; null !== d;)b(c, d), d = d.sibling; 3158 return null; 3159 } 3160 function d(a, b) { 3161 for(a = new Map; null !== b;)null !== b.key ? a.set(b.key, b) : a.set(b.index, b), b = b.sibling; 3162 return a; 3163 } 3164 function e(a, b) { 3165 a = $158dda26ac6b94e2$var$Pg(a, b); 3166 a.index = 0; 3167 a.sibling = null; 3168 return a; 3169 } 3170 function f(b, c, d) { 3171 b.index = d; 3172 if (!a) return b.flags |= 1048576, c; 3173 d = b.alternate; 3174 if (null !== d) return d = d.index, d < c ? (b.flags |= 2, c) : d; 3175 b.flags |= 2; 3176 return c; 3177 } 3178 function g(b) { 3179 a && null === b.alternate && (b.flags |= 2); 3180 return b; 3181 } 3182 function h(a, b, c, d) { 3183 if (null === b || 6 !== b.tag) return b = $158dda26ac6b94e2$var$Qg(c, a.mode, d), b.return = a, b; 3184 b = e(b, c); 3185 b.return = a; 3186 return b; 3187 } 3188 function k(a, b, c, d) { 3189 var f = c.type; 3190 if (f === $158dda26ac6b94e2$var$ya) return m(a, b, c.props.children, d, c.key); 3191 if (null !== b && (b.elementType === f || "object" === typeof f && null !== f && f.$$typeof === $158dda26ac6b94e2$var$Ha && $158dda26ac6b94e2$var$Ng(f) === b.type)) return d = e(b, c.props), d.ref = $158dda26ac6b94e2$var$Lg(a, b, c), d.return = a, d; 3192 d = $158dda26ac6b94e2$var$Rg(c.type, c.key, c.props, null, a.mode, d); 3193 d.ref = $158dda26ac6b94e2$var$Lg(a, b, c); 3194 d.return = a; 3195 return d; 3196 } 3197 function l(a, b, c, d) { 3198 if (null === b || 4 !== b.tag || b.stateNode.containerInfo !== c.containerInfo || b.stateNode.implementation !== c.implementation) return b = $158dda26ac6b94e2$var$Sg(c, a.mode, d), b.return = a, b; 3199 b = e(b, c.children || []); 3200 b.return = a; 3201 return b; 3202 } 3203 function m(a, b, c, d, f) { 3204 if (null === b || 7 !== b.tag) return b = $158dda26ac6b94e2$var$Tg(c, a.mode, d, f), b.return = a, b; 3205 b = e(b, c); 3206 b.return = a; 3207 return b; 3208 } 3209 function q(a, b, c) { 3210 if ("string" === typeof b && "" !== b || "number" === typeof b) return b = $158dda26ac6b94e2$var$Qg("" + b, a.mode, c), b.return = a, b; 3211 if ("object" === typeof b && null !== b) { 3212 switch(b.$$typeof){ 3213 case $158dda26ac6b94e2$var$va: 3214 return c = $158dda26ac6b94e2$var$Rg(b.type, b.key, b.props, null, a.mode, c), c.ref = $158dda26ac6b94e2$var$Lg(a, null, b), c.return = a, c; 3215 case $158dda26ac6b94e2$var$wa: 3216 return b = $158dda26ac6b94e2$var$Sg(b, a.mode, c), b.return = a, b; 3217 case $158dda26ac6b94e2$var$Ha: 3218 var d = b._init; 3219 return q(a, d(b._payload), c); 3220 } 3221 if ($158dda26ac6b94e2$var$eb(b) || $158dda26ac6b94e2$var$Ka(b)) return b = $158dda26ac6b94e2$var$Tg(b, a.mode, c, null), b.return = a, b; 3222 $158dda26ac6b94e2$var$Mg(a, b); 3223 } 3224 return null; 3225 } 3226 function r(a, b, c, d) { 3227 var e = null !== b ? b.key : null; 3228 if ("string" === typeof c && "" !== c || "number" === typeof c) return null !== e ? null : h(a, b, "" + c, d); 3229 if ("object" === typeof c && null !== c) { 3230 switch(c.$$typeof){ 3231 case $158dda26ac6b94e2$var$va: 3232 return c.key === e ? k(a, b, c, d) : null; 3233 case $158dda26ac6b94e2$var$wa: 3234 return c.key === e ? l(a, b, c, d) : null; 3235 case $158dda26ac6b94e2$var$Ha: 3236 return e = c._init, r(a, b, e(c._payload), d); 3237 } 3238 if ($158dda26ac6b94e2$var$eb(c) || $158dda26ac6b94e2$var$Ka(c)) return null !== e ? null : m(a, b, c, d, null); 3239 $158dda26ac6b94e2$var$Mg(a, c); 3240 } 3241 return null; 3242 } 3243 function y(a, b, c, d, e) { 3244 if ("string" === typeof d && "" !== d || "number" === typeof d) return a = a.get(c) || null, h(b, a, "" + d, e); 3245 if ("object" === typeof d && null !== d) { 3246 switch(d.$$typeof){ 3247 case $158dda26ac6b94e2$var$va: 3248 return a = a.get(null === d.key ? c : d.key) || null, k(b, a, d, e); 3249 case $158dda26ac6b94e2$var$wa: 3250 return a = a.get(null === d.key ? c : d.key) || null, l(b, a, d, e); 3251 case $158dda26ac6b94e2$var$Ha: 3252 var f = d._init; 3253 return y(a, b, c, f(d._payload), e); 3254 } 3255 if ($158dda26ac6b94e2$var$eb(d) || $158dda26ac6b94e2$var$Ka(d)) return a = a.get(c) || null, m(b, a, d, e, null); 3256 $158dda26ac6b94e2$var$Mg(b, d); 3257 } 3258 return null; 3259 } 3260 function n(e, g, h, k) { 3261 for(var l = null, m = null, u = g, w = g = 0, x = null; null !== u && w < h.length; w++){ 3262 u.index > w ? (x = u, u = null) : x = u.sibling; 3263 var n = r(e, u, h[w], k); 3264 if (null === n) { 3265 null === u && (u = x); 3266 break; 3267 } 3268 a && u && null === n.alternate && b(e, u); 3269 g = f(n, g, w); 3270 null === m ? l = n : m.sibling = n; 3271 m = n; 3272 u = x; 3273 } 3274 if (w === h.length) return c(e, u), $158dda26ac6b94e2$var$I && $158dda26ac6b94e2$var$tg(e, w), l; 3275 if (null === u) { 3276 for(; w < h.length; w++)u = q(e, h[w], k), null !== u && (g = f(u, g, w), null === m ? l = u : m.sibling = u, m = u); 3277 $158dda26ac6b94e2$var$I && $158dda26ac6b94e2$var$tg(e, w); 3278 return l; 3279 } 3280 for(u = d(e, u); w < h.length; w++)x = y(u, e, w, h[w], k), null !== x && (a && null !== x.alternate && u.delete(null === x.key ? w : x.key), g = f(x, g, w), null === m ? l = x : m.sibling = x, m = x); 3281 a && u.forEach(function(a) { 3282 return b(e, a); 3283 }); 3284 $158dda26ac6b94e2$var$I && $158dda26ac6b94e2$var$tg(e, w); 3285 return l; 3286 } 3287 function t(e, g, h, k) { 3288 var l = $158dda26ac6b94e2$var$Ka(h); 3289 if ("function" !== typeof l) throw Error($158dda26ac6b94e2$var$p(150)); 3290 h = l.call(h); 3291 if (null == h) throw Error($158dda26ac6b94e2$var$p(151)); 3292 for(var u = l = null, m = g, w = g = 0, x = null, n = h.next(); null !== m && !n.done; w++, n = h.next()){ 3293 m.index > w ? (x = m, m = null) : x = m.sibling; 3294 var t = r(e, m, n.value, k); 3295 if (null === t) { 3296 null === m && (m = x); 3297 break; 3298 } 3299 a && m && null === t.alternate && b(e, m); 3300 g = f(t, g, w); 3301 null === u ? l = t : u.sibling = t; 3302 u = t; 3303 m = x; 3304 } 3305 if (n.done) return c(e, m), $158dda26ac6b94e2$var$I && $158dda26ac6b94e2$var$tg(e, w), l; 3306 if (null === m) { 3307 for(; !n.done; w++, n = h.next())n = q(e, n.value, k), null !== n && (g = f(n, g, w), null === u ? l = n : u.sibling = n, u = n); 3308 $158dda26ac6b94e2$var$I && $158dda26ac6b94e2$var$tg(e, w); 3309 return l; 3310 } 3311 for(m = d(e, m); !n.done; w++, n = h.next())n = y(m, e, w, n.value, k), null !== n && (a && null !== n.alternate && m.delete(null === n.key ? w : n.key), g = f(n, g, w), null === u ? l = n : u.sibling = n, u = n); 3312 a && m.forEach(function(a) { 3313 return b(e, a); 3314 }); 3315 $158dda26ac6b94e2$var$I && $158dda26ac6b94e2$var$tg(e, w); 3316 return l; 3317 } 3318 function J(a, d, f, h) { 3319 "object" === typeof f && null !== f && f.type === $158dda26ac6b94e2$var$ya && null === f.key && (f = f.props.children); 3320 if ("object" === typeof f && null !== f) { 3321 switch(f.$$typeof){ 3322 case $158dda26ac6b94e2$var$va: 3323 a: { 3324 for(var k = f.key, l = d; null !== l;){ 3325 if (l.key === k) { 3326 k = f.type; 3327 if (k === $158dda26ac6b94e2$var$ya) { 3328 if (7 === l.tag) { 3329 c(a, l.sibling); 3330 d = e(l, f.props.children); 3331 d.return = a; 3332 a = d; 3333 break a; 3334 } 3335 } else if (l.elementType === k || "object" === typeof k && null !== k && k.$$typeof === $158dda26ac6b94e2$var$Ha && $158dda26ac6b94e2$var$Ng(k) === l.type) { 3336 c(a, l.sibling); 3337 d = e(l, f.props); 3338 d.ref = $158dda26ac6b94e2$var$Lg(a, l, f); 3339 d.return = a; 3340 a = d; 3341 break a; 3342 } 3343 c(a, l); 3344 break; 3345 } else b(a, l); 3346 l = l.sibling; 3347 } 3348 f.type === $158dda26ac6b94e2$var$ya ? (d = $158dda26ac6b94e2$var$Tg(f.props.children, a.mode, h, f.key), d.return = a, a = d) : (h = $158dda26ac6b94e2$var$Rg(f.type, f.key, f.props, null, a.mode, h), h.ref = $158dda26ac6b94e2$var$Lg(a, d, f), h.return = a, a = h); 3349 } 3350 return g(a); 3351 case $158dda26ac6b94e2$var$wa: 3352 a: { 3353 for(l = f.key; null !== d;){ 3354 if (d.key === l) { 3355 if (4 === d.tag && d.stateNode.containerInfo === f.containerInfo && d.stateNode.implementation === f.implementation) { 3356 c(a, d.sibling); 3357 d = e(d, f.children || []); 3358 d.return = a; 3359 a = d; 3360 break a; 3361 } else { 3362 c(a, d); 3363 break; 3364 } 3365 } else b(a, d); 3366 d = d.sibling; 3367 } 3368 d = $158dda26ac6b94e2$var$Sg(f, a.mode, h); 3369 d.return = a; 3370 a = d; 3371 } 3372 return g(a); 3373 case $158dda26ac6b94e2$var$Ha: 3374 return l = f._init, J(a, d, l(f._payload), h); 3375 } 3376 if ($158dda26ac6b94e2$var$eb(f)) return n(a, d, f, h); 3377 if ($158dda26ac6b94e2$var$Ka(f)) return t(a, d, f, h); 3378 $158dda26ac6b94e2$var$Mg(a, f); 3379 } 3380 return "string" === typeof f && "" !== f || "number" === typeof f ? (f = "" + f, null !== d && 6 === d.tag ? (c(a, d.sibling), d = e(d, f), d.return = a, a = d) : (c(a, d), d = $158dda26ac6b94e2$var$Qg(f, a.mode, h), d.return = a, a = d), g(a)) : c(a, d); 3381 } 3382 return J; 3383} 3384var $158dda26ac6b94e2$var$Ug = $158dda26ac6b94e2$var$Og(!0), $158dda26ac6b94e2$var$Vg = $158dda26ac6b94e2$var$Og(!1), $158dda26ac6b94e2$var$Wg = $158dda26ac6b94e2$var$Uf(null), $158dda26ac6b94e2$var$Xg = null, $158dda26ac6b94e2$var$Yg = null, $158dda26ac6b94e2$var$Zg = null; 3385function $158dda26ac6b94e2$var$$g() { 3386 $158dda26ac6b94e2$var$Zg = $158dda26ac6b94e2$var$Yg = $158dda26ac6b94e2$var$Xg = null; 3387} 3388function $158dda26ac6b94e2$var$ah(a) { 3389 var b = $158dda26ac6b94e2$var$Wg.current; 3390 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$Wg); 3391 a._currentValue = b; 3392} 3393function $158dda26ac6b94e2$var$bh(a, b, c) { 3394 for(; null !== a;){ 3395 var d = a.alternate; 3396 (a.childLanes & b) !== b ? (a.childLanes |= b, null !== d && (d.childLanes |= b)) : null !== d && (d.childLanes & b) !== b && (d.childLanes |= b); 3397 if (a === c) break; 3398 a = a.return; 3399 } 3400} 3401function $158dda26ac6b94e2$var$ch(a, b) { 3402 $158dda26ac6b94e2$var$Xg = a; 3403 $158dda26ac6b94e2$var$Zg = $158dda26ac6b94e2$var$Yg = null; 3404 a = a.dependencies; 3405 null !== a && null !== a.firstContext && (0 !== (a.lanes & b) && ($158dda26ac6b94e2$var$dh = !0), a.firstContext = null); 3406} 3407function $158dda26ac6b94e2$var$eh(a) { 3408 var b = a._currentValue; 3409 if ($158dda26ac6b94e2$var$Zg !== a) { 3410 if (a = { 3411 context: a, 3412 memoizedValue: b, 3413 next: null 3414 }, null === $158dda26ac6b94e2$var$Yg) { 3415 if (null === $158dda26ac6b94e2$var$Xg) throw Error($158dda26ac6b94e2$var$p(308)); 3416 $158dda26ac6b94e2$var$Yg = a; 3417 $158dda26ac6b94e2$var$Xg.dependencies = { 3418 lanes: 0, 3419 firstContext: a 3420 }; 3421 } else $158dda26ac6b94e2$var$Yg = $158dda26ac6b94e2$var$Yg.next = a; 3422 } 3423 return b; 3424} 3425var $158dda26ac6b94e2$var$fh = null; 3426function $158dda26ac6b94e2$var$gh(a) { 3427 null === $158dda26ac6b94e2$var$fh ? $158dda26ac6b94e2$var$fh = [ 3428 a 3429 ] : $158dda26ac6b94e2$var$fh.push(a); 3430} 3431function $158dda26ac6b94e2$var$hh(a, b, c, d) { 3432 var e = b.interleaved; 3433 null === e ? (c.next = c, $158dda26ac6b94e2$var$gh(b)) : (c.next = e.next, e.next = c); 3434 b.interleaved = c; 3435 return $158dda26ac6b94e2$var$ih(a, d); 3436} 3437function $158dda26ac6b94e2$var$ih(a, b) { 3438 a.lanes |= b; 3439 var c = a.alternate; 3440 null !== c && (c.lanes |= b); 3441 c = a; 3442 for(a = a.return; null !== a;)a.childLanes |= b, c = a.alternate, null !== c && (c.childLanes |= b), c = a, a = a.return; 3443 return 3 === c.tag ? c.stateNode : null; 3444} 3445var $158dda26ac6b94e2$var$jh = !1; 3446function $158dda26ac6b94e2$var$kh(a) { 3447 a.updateQueue = { 3448 baseState: a.memoizedState, 3449 firstBaseUpdate: null, 3450 lastBaseUpdate: null, 3451 shared: { 3452 pending: null, 3453 interleaved: null, 3454 lanes: 0 3455 }, 3456 effects: null 3457 }; 3458} 3459function $158dda26ac6b94e2$var$lh(a, b) { 3460 a = a.updateQueue; 3461 b.updateQueue === a && (b.updateQueue = { 3462 baseState: a.baseState, 3463 firstBaseUpdate: a.firstBaseUpdate, 3464 lastBaseUpdate: a.lastBaseUpdate, 3465 shared: a.shared, 3466 effects: a.effects 3467 }); 3468} 3469function $158dda26ac6b94e2$var$mh(a, b) { 3470 return { 3471 eventTime: a, 3472 lane: b, 3473 tag: 0, 3474 payload: null, 3475 callback: null, 3476 next: null 3477 }; 3478} 3479function $158dda26ac6b94e2$var$nh(a, b, c) { 3480 var d = a.updateQueue; 3481 if (null === d) return null; 3482 d = d.shared; 3483 if (0 !== ($158dda26ac6b94e2$var$K & 2)) { 3484 var e = d.pending; 3485 null === e ? b.next = b : (b.next = e.next, e.next = b); 3486 d.pending = b; 3487 return $158dda26ac6b94e2$var$ih(a, c); 3488 } 3489 e = d.interleaved; 3490 null === e ? (b.next = b, $158dda26ac6b94e2$var$gh(d)) : (b.next = e.next, e.next = b); 3491 d.interleaved = b; 3492 return $158dda26ac6b94e2$var$ih(a, c); 3493} 3494function $158dda26ac6b94e2$var$oh(a, b, c) { 3495 b = b.updateQueue; 3496 if (null !== b && (b = b.shared, 0 !== (c & 4194240))) { 3497 var d = b.lanes; 3498 d &= a.pendingLanes; 3499 c |= d; 3500 b.lanes = c; 3501 $158dda26ac6b94e2$var$Cc(a, c); 3502 } 3503} 3504function $158dda26ac6b94e2$var$ph(a, b) { 3505 var c = a.updateQueue, d = a.alternate; 3506 if (null !== d && (d = d.updateQueue, c === d)) { 3507 var e = null, f = null; 3508 c = c.firstBaseUpdate; 3509 if (null !== c) { 3510 do { 3511 var g = { 3512 eventTime: c.eventTime, 3513 lane: c.lane, 3514 tag: c.tag, 3515 payload: c.payload, 3516 callback: c.callback, 3517 next: null 3518 }; 3519 null === f ? e = f = g : f = f.next = g; 3520 c = c.next; 3521 }while (null !== c); 3522 null === f ? e = f = b : f = f.next = b; 3523 } else e = f = b; 3524 c = { 3525 baseState: d.baseState, 3526 firstBaseUpdate: e, 3527 lastBaseUpdate: f, 3528 shared: d.shared, 3529 effects: d.effects 3530 }; 3531 a.updateQueue = c; 3532 return; 3533 } 3534 a = c.lastBaseUpdate; 3535 null === a ? c.firstBaseUpdate = b : a.next = b; 3536 c.lastBaseUpdate = b; 3537} 3538function $158dda26ac6b94e2$var$qh(a, b, c, d) { 3539 var e = a.updateQueue; 3540 $158dda26ac6b94e2$var$jh = !1; 3541 var f = e.firstBaseUpdate, g = e.lastBaseUpdate, h = e.shared.pending; 3542 if (null !== h) { 3543 e.shared.pending = null; 3544 var k = h, l = k.next; 3545 k.next = null; 3546 null === g ? f = l : g.next = l; 3547 g = k; 3548 var m = a.alternate; 3549 null !== m && (m = m.updateQueue, h = m.lastBaseUpdate, h !== g && (null === h ? m.firstBaseUpdate = l : h.next = l, m.lastBaseUpdate = k)); 3550 } 3551 if (null !== f) { 3552 var q = e.baseState; 3553 g = 0; 3554 m = l = k = null; 3555 h = f; 3556 do { 3557 var r = h.lane, y = h.eventTime; 3558 if ((d & r) === r) { 3559 null !== m && (m = m.next = { 3560 eventTime: y, 3561 lane: 0, 3562 tag: h.tag, 3563 payload: h.payload, 3564 callback: h.callback, 3565 next: null 3566 }); 3567 a: { 3568 var n = a, t = h; 3569 r = b; 3570 y = c; 3571 switch(t.tag){ 3572 case 1: 3573 n = t.payload; 3574 if ("function" === typeof n) { 3575 q = n.call(y, q, r); 3576 break a; 3577 } 3578 q = n; 3579 break a; 3580 case 3: 3581 n.flags = n.flags & -65537 | 128; 3582 case 0: 3583 n = t.payload; 3584 r = "function" === typeof n ? n.call(y, q, r) : n; 3585 if (null === r || void 0 === r) break a; 3586 q = $158dda26ac6b94e2$var$A({}, q, r); 3587 break a; 3588 case 2: 3589 $158dda26ac6b94e2$var$jh = !0; 3590 } 3591 } 3592 null !== h.callback && 0 !== h.lane && (a.flags |= 64, r = e.effects, null === r ? e.effects = [ 3593 h 3594 ] : r.push(h)); 3595 } else y = { 3596 eventTime: y, 3597 lane: r, 3598 tag: h.tag, 3599 payload: h.payload, 3600 callback: h.callback, 3601 next: null 3602 }, null === m ? (l = m = y, k = q) : m = m.next = y, g |= r; 3603 h = h.next; 3604 if (null === h) { 3605 if (h = e.shared.pending, null === h) break; 3606 else r = h, h = r.next, r.next = null, e.lastBaseUpdate = r, e.shared.pending = null; 3607 } 3608 }while (1); 3609 null === m && (k = q); 3610 e.baseState = k; 3611 e.firstBaseUpdate = l; 3612 e.lastBaseUpdate = m; 3613 b = e.shared.interleaved; 3614 if (null !== b) { 3615 e = b; 3616 do g |= e.lane, e = e.next; 3617 while (e !== b); 3618 } else null === f && (e.shared.lanes = 0); 3619 $158dda26ac6b94e2$var$rh |= g; 3620 a.lanes = g; 3621 a.memoizedState = q; 3622 } 3623} 3624function $158dda26ac6b94e2$var$sh(a, b, c) { 3625 a = b.effects; 3626 b.effects = null; 3627 if (null !== a) for(b = 0; b < a.length; b++){ 3628 var d = a[b], e = d.callback; 3629 if (null !== e) { 3630 d.callback = null; 3631 d = c; 3632 if ("function" !== typeof e) throw Error($158dda26ac6b94e2$var$p(191, e)); 3633 e.call(d); 3634 } 3635 } 3636} 3637var $158dda26ac6b94e2$var$th = {}, $158dda26ac6b94e2$var$uh = $158dda26ac6b94e2$var$Uf($158dda26ac6b94e2$var$th), $158dda26ac6b94e2$var$vh = $158dda26ac6b94e2$var$Uf($158dda26ac6b94e2$var$th), $158dda26ac6b94e2$var$wh = $158dda26ac6b94e2$var$Uf($158dda26ac6b94e2$var$th); 3638function $158dda26ac6b94e2$var$xh(a) { 3639 if (a === $158dda26ac6b94e2$var$th) throw Error($158dda26ac6b94e2$var$p(174)); 3640 return a; 3641} 3642function $158dda26ac6b94e2$var$yh(a, b) { 3643 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$wh, b); 3644 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$vh, a); 3645 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$uh, $158dda26ac6b94e2$var$th); 3646 a = b.nodeType; 3647 switch(a){ 3648 case 9: 3649 case 11: 3650 b = (b = b.documentElement) ? b.namespaceURI : $158dda26ac6b94e2$var$lb(null, ""); 3651 break; 3652 default: 3653 a = 8 === a ? b.parentNode : b, b = a.namespaceURI || null, a = a.tagName, b = $158dda26ac6b94e2$var$lb(b, a); 3654 } 3655 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$uh); 3656 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$uh, b); 3657} 3658function $158dda26ac6b94e2$var$zh() { 3659 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$uh); 3660 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$vh); 3661 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$wh); 3662} 3663function $158dda26ac6b94e2$var$Ah(a) { 3664 $158dda26ac6b94e2$var$xh($158dda26ac6b94e2$var$wh.current); 3665 var b = $158dda26ac6b94e2$var$xh($158dda26ac6b94e2$var$uh.current); 3666 var c = $158dda26ac6b94e2$var$lb(b, a.type); 3667 b !== c && ($158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$vh, a), $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$uh, c)); 3668} 3669function $158dda26ac6b94e2$var$Bh(a) { 3670 $158dda26ac6b94e2$var$vh.current === a && ($158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$uh), $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$vh)); 3671} 3672var $158dda26ac6b94e2$var$L = $158dda26ac6b94e2$var$Uf(0); 3673function $158dda26ac6b94e2$var$Ch(a) { 3674 for(var b = a; null !== b;){ 3675 if (13 === b.tag) { 3676 var c = b.memoizedState; 3677 if (null !== c && (c = c.dehydrated, null === c || "$?" === c.data || "$!" === c.data)) return b; 3678 } else if (19 === b.tag && void 0 !== b.memoizedProps.revealOrder) { 3679 if (0 !== (b.flags & 128)) return b; 3680 } else if (null !== b.child) { 3681 b.child.return = b; 3682 b = b.child; 3683 continue; 3684 } 3685 if (b === a) break; 3686 for(; null === b.sibling;){ 3687 if (null === b.return || b.return === a) return null; 3688 b = b.return; 3689 } 3690 b.sibling.return = b.return; 3691 b = b.sibling; 3692 } 3693 return null; 3694} 3695var $158dda26ac6b94e2$var$Dh = []; 3696function $158dda26ac6b94e2$var$Eh() { 3697 for(var a = 0; a < $158dda26ac6b94e2$var$Dh.length; a++)$158dda26ac6b94e2$var$Dh[a]._workInProgressVersionPrimary = null; 3698 $158dda26ac6b94e2$var$Dh.length = 0; 3699} 3700var $158dda26ac6b94e2$var$Fh = $158dda26ac6b94e2$var$ua.ReactCurrentDispatcher, $158dda26ac6b94e2$var$Gh = $158dda26ac6b94e2$var$ua.ReactCurrentBatchConfig, $158dda26ac6b94e2$var$Hh = 0, $158dda26ac6b94e2$var$M = null, $158dda26ac6b94e2$var$N = null, $158dda26ac6b94e2$var$O = null, $158dda26ac6b94e2$var$Ih = !1, $158dda26ac6b94e2$var$Jh = !1, $158dda26ac6b94e2$var$Kh = 0, $158dda26ac6b94e2$var$Lh = 0; 3701function $158dda26ac6b94e2$var$P() { 3702 throw Error($158dda26ac6b94e2$var$p(321)); 3703} 3704function $158dda26ac6b94e2$var$Mh(a, b) { 3705 if (null === b) return !1; 3706 for(var c = 0; c < b.length && c < a.length; c++)if (!$158dda26ac6b94e2$var$He(a[c], b[c])) return !1; 3707 return !0; 3708} 3709function $158dda26ac6b94e2$var$Nh(a, b, c, d, e, f) { 3710 $158dda26ac6b94e2$var$Hh = f; 3711 $158dda26ac6b94e2$var$M = b; 3712 b.memoizedState = null; 3713 b.updateQueue = null; 3714 b.lanes = 0; 3715 $158dda26ac6b94e2$var$Fh.current = null === a || null === a.memoizedState ? $158dda26ac6b94e2$var$Oh : $158dda26ac6b94e2$var$Ph; 3716 a = c(d, e); 3717 if ($158dda26ac6b94e2$var$Jh) { 3718 f = 0; 3719 do { 3720 $158dda26ac6b94e2$var$Jh = !1; 3721 $158dda26ac6b94e2$var$Kh = 0; 3722 if (25 <= f) throw Error($158dda26ac6b94e2$var$p(301)); 3723 f += 1; 3724 $158dda26ac6b94e2$var$O = $158dda26ac6b94e2$var$N = null; 3725 b.updateQueue = null; 3726 $158dda26ac6b94e2$var$Fh.current = $158dda26ac6b94e2$var$Qh; 3727 a = c(d, e); 3728 }while ($158dda26ac6b94e2$var$Jh); 3729 } 3730 $158dda26ac6b94e2$var$Fh.current = $158dda26ac6b94e2$var$Rh; 3731 b = null !== $158dda26ac6b94e2$var$N && null !== $158dda26ac6b94e2$var$N.next; 3732 $158dda26ac6b94e2$var$Hh = 0; 3733 $158dda26ac6b94e2$var$O = $158dda26ac6b94e2$var$N = $158dda26ac6b94e2$var$M = null; 3734 $158dda26ac6b94e2$var$Ih = !1; 3735 if (b) throw Error($158dda26ac6b94e2$var$p(300)); 3736 return a; 3737} 3738function $158dda26ac6b94e2$var$Sh() { 3739 var a = 0 !== $158dda26ac6b94e2$var$Kh; 3740 $158dda26ac6b94e2$var$Kh = 0; 3741 return a; 3742} 3743function $158dda26ac6b94e2$var$Th() { 3744 var a = { 3745 memoizedState: null, 3746 baseState: null, 3747 baseQueue: null, 3748 queue: null, 3749 next: null 3750 }; 3751 null === $158dda26ac6b94e2$var$O ? $158dda26ac6b94e2$var$M.memoizedState = $158dda26ac6b94e2$var$O = a : $158dda26ac6b94e2$var$O = $158dda26ac6b94e2$var$O.next = a; 3752 return $158dda26ac6b94e2$var$O; 3753} 3754function $158dda26ac6b94e2$var$Uh() { 3755 if (null === $158dda26ac6b94e2$var$N) { 3756 var a = $158dda26ac6b94e2$var$M.alternate; 3757 a = null !== a ? a.memoizedState : null; 3758 } else a = $158dda26ac6b94e2$var$N.next; 3759 var b = null === $158dda26ac6b94e2$var$O ? $158dda26ac6b94e2$var$M.memoizedState : $158dda26ac6b94e2$var$O.next; 3760 if (null !== b) $158dda26ac6b94e2$var$O = b, $158dda26ac6b94e2$var$N = a; 3761 else { 3762 if (null === a) throw Error($158dda26ac6b94e2$var$p(310)); 3763 $158dda26ac6b94e2$var$N = a; 3764 a = { 3765 memoizedState: $158dda26ac6b94e2$var$N.memoizedState, 3766 baseState: $158dda26ac6b94e2$var$N.baseState, 3767 baseQueue: $158dda26ac6b94e2$var$N.baseQueue, 3768 queue: $158dda26ac6b94e2$var$N.queue, 3769 next: null 3770 }; 3771 null === $158dda26ac6b94e2$var$O ? $158dda26ac6b94e2$var$M.memoizedState = $158dda26ac6b94e2$var$O = a : $158dda26ac6b94e2$var$O = $158dda26ac6b94e2$var$O.next = a; 3772 } 3773 return $158dda26ac6b94e2$var$O; 3774} 3775function $158dda26ac6b94e2$var$Vh(a, b) { 3776 return "function" === typeof b ? b(a) : b; 3777} 3778function $158dda26ac6b94e2$var$Wh(a) { 3779 var b = $158dda26ac6b94e2$var$Uh(), c = b.queue; 3780 if (null === c) throw Error($158dda26ac6b94e2$var$p(311)); 3781 c.lastRenderedReducer = a; 3782 var d = $158dda26ac6b94e2$var$N, e = d.baseQueue, f = c.pending; 3783 if (null !== f) { 3784 if (null !== e) { 3785 var g = e.next; 3786 e.next = f.next; 3787 f.next = g; 3788 } 3789 d.baseQueue = e = f; 3790 c.pending = null; 3791 } 3792 if (null !== e) { 3793 f = e.next; 3794 d = d.baseState; 3795 var h = g = null, k = null, l = f; 3796 do { 3797 var m = l.lane; 3798 if (($158dda26ac6b94e2$var$Hh & m) === m) null !== k && (k = k.next = { 3799 lane: 0, 3800 action: l.action, 3801 hasEagerState: l.hasEagerState, 3802 eagerState: l.eagerState, 3803 next: null 3804 }), d = l.hasEagerState ? l.eagerState : a(d, l.action); 3805 else { 3806 var q = { 3807 lane: m, 3808 action: l.action, 3809 hasEagerState: l.hasEagerState, 3810 eagerState: l.eagerState, 3811 next: null 3812 }; 3813 null === k ? (h = k = q, g = d) : k = k.next = q; 3814 $158dda26ac6b94e2$var$M.lanes |= m; 3815 $158dda26ac6b94e2$var$rh |= m; 3816 } 3817 l = l.next; 3818 }while (null !== l && l !== f); 3819 null === k ? g = d : k.next = h; 3820 $158dda26ac6b94e2$var$He(d, b.memoizedState) || ($158dda26ac6b94e2$var$dh = !0); 3821 b.memoizedState = d; 3822 b.baseState = g; 3823 b.baseQueue = k; 3824 c.lastRenderedState = d; 3825 } 3826 a = c.interleaved; 3827 if (null !== a) { 3828 e = a; 3829 do f = e.lane, $158dda26ac6b94e2$var$M.lanes |= f, $158dda26ac6b94e2$var$rh |= f, e = e.next; 3830 while (e !== a); 3831 } else null === e && (c.lanes = 0); 3832 return [ 3833 b.memoizedState, 3834 c.dispatch 3835 ]; 3836} 3837function $158dda26ac6b94e2$var$Xh(a) { 3838 var b = $158dda26ac6b94e2$var$Uh(), c = b.queue; 3839 if (null === c) throw Error($158dda26ac6b94e2$var$p(311)); 3840 c.lastRenderedReducer = a; 3841 var d = c.dispatch, e = c.pending, f = b.memoizedState; 3842 if (null !== e) { 3843 c.pending = null; 3844 var g = e = e.next; 3845 do f = a(f, g.action), g = g.next; 3846 while (g !== e); 3847 $158dda26ac6b94e2$var$He(f, b.memoizedState) || ($158dda26ac6b94e2$var$dh = !0); 3848 b.memoizedState = f; 3849 null === b.baseQueue && (b.baseState = f); 3850 c.lastRenderedState = f; 3851 } 3852 return [ 3853 f, 3854 d 3855 ]; 3856} 3857function $158dda26ac6b94e2$var$Yh() {} 3858function $158dda26ac6b94e2$var$Zh(a, b) { 3859 var c = $158dda26ac6b94e2$var$M, d = $158dda26ac6b94e2$var$Uh(), e = b(), f = !$158dda26ac6b94e2$var$He(d.memoizedState, e); 3860 f && (d.memoizedState = e, $158dda26ac6b94e2$var$dh = !0); 3861 d = d.queue; 3862 $158dda26ac6b94e2$var$$h($158dda26ac6b94e2$var$ai.bind(null, c, d, a), [ 3863 a 3864 ]); 3865 if (d.getSnapshot !== b || f || null !== $158dda26ac6b94e2$var$O && $158dda26ac6b94e2$var$O.memoizedState.tag & 1) { 3866 c.flags |= 2048; 3867 $158dda26ac6b94e2$var$bi(9, $158dda26ac6b94e2$var$ci.bind(null, c, d, e, b), void 0, null); 3868 if (null === $158dda26ac6b94e2$var$Q) throw Error($158dda26ac6b94e2$var$p(349)); 3869 0 !== ($158dda26ac6b94e2$var$Hh & 30) || $158dda26ac6b94e2$var$di(c, b, e); 3870 } 3871 return e; 3872} 3873function $158dda26ac6b94e2$var$di(a, b, c) { 3874 a.flags |= 16384; 3875 a = { 3876 getSnapshot: b, 3877 value: c 3878 }; 3879 b = $158dda26ac6b94e2$var$M.updateQueue; 3880 null === b ? (b = { 3881 lastEffect: null, 3882 stores: null 3883 }, $158dda26ac6b94e2$var$M.updateQueue = b, b.stores = [ 3884 a 3885 ]) : (c = b.stores, null === c ? b.stores = [ 3886 a 3887 ] : c.push(a)); 3888} 3889function $158dda26ac6b94e2$var$ci(a, b, c, d) { 3890 b.value = c; 3891 b.getSnapshot = d; 3892 $158dda26ac6b94e2$var$ei(b) && $158dda26ac6b94e2$var$fi(a); 3893} 3894function $158dda26ac6b94e2$var$ai(a, b, c) { 3895 return c(function() { 3896 $158dda26ac6b94e2$var$ei(b) && $158dda26ac6b94e2$var$fi(a); 3897 }); 3898} 3899function $158dda26ac6b94e2$var$ei(a) { 3900 var b = a.getSnapshot; 3901 a = a.value; 3902 try { 3903 var c = b(); 3904 return !$158dda26ac6b94e2$var$He(a, c); 3905 } catch (d) { 3906 return !0; 3907 } 3908} 3909function $158dda26ac6b94e2$var$fi(a) { 3910 var b = $158dda26ac6b94e2$var$ih(a, 1); 3911 null !== b && $158dda26ac6b94e2$var$gi(b, a, 1, -1); 3912} 3913function $158dda26ac6b94e2$var$hi(a) { 3914 var b = $158dda26ac6b94e2$var$Th(); 3915 "function" === typeof a && (a = a()); 3916 b.memoizedState = b.baseState = a; 3917 a = { 3918 pending: null, 3919 interleaved: null, 3920 lanes: 0, 3921 dispatch: null, 3922 lastRenderedReducer: $158dda26ac6b94e2$var$Vh, 3923 lastRenderedState: a 3924 }; 3925 b.queue = a; 3926 a = a.dispatch = $158dda26ac6b94e2$var$ii.bind(null, $158dda26ac6b94e2$var$M, a); 3927 return [ 3928 b.memoizedState, 3929 a 3930 ]; 3931} 3932function $158dda26ac6b94e2$var$bi(a, b, c, d) { 3933 a = { 3934 tag: a, 3935 create: b, 3936 destroy: c, 3937 deps: d, 3938 next: null 3939 }; 3940 b = $158dda26ac6b94e2$var$M.updateQueue; 3941 null === b ? (b = { 3942 lastEffect: null, 3943 stores: null 3944 }, $158dda26ac6b94e2$var$M.updateQueue = b, b.lastEffect = a.next = a) : (c = b.lastEffect, null === c ? b.lastEffect = a.next = a : (d = c.next, c.next = a, a.next = d, b.lastEffect = a)); 3945 return a; 3946} 3947function $158dda26ac6b94e2$var$ji() { 3948 return $158dda26ac6b94e2$var$Uh().memoizedState; 3949} 3950function $158dda26ac6b94e2$var$ki(a, b, c, d) { 3951 var e = $158dda26ac6b94e2$var$Th(); 3952 $158dda26ac6b94e2$var$M.flags |= a; 3953 e.memoizedState = $158dda26ac6b94e2$var$bi(1 | b, c, void 0, void 0 === d ? null : d); 3954} 3955function $158dda26ac6b94e2$var$li(a, b, c, d) { 3956 var e = $158dda26ac6b94e2$var$Uh(); 3957 d = void 0 === d ? null : d; 3958 var f = void 0; 3959 if (null !== $158dda26ac6b94e2$var$N) { 3960 var g = $158dda26ac6b94e2$var$N.memoizedState; 3961 f = g.destroy; 3962 if (null !== d && $158dda26ac6b94e2$var$Mh(d, g.deps)) { 3963 e.memoizedState = $158dda26ac6b94e2$var$bi(b, c, f, d); 3964 return; 3965 } 3966 } 3967 $158dda26ac6b94e2$var$M.flags |= a; 3968 e.memoizedState = $158dda26ac6b94e2$var$bi(1 | b, c, f, d); 3969} 3970function $158dda26ac6b94e2$var$mi(a, b) { 3971 return $158dda26ac6b94e2$var$ki(8390656, 8, a, b); 3972} 3973function $158dda26ac6b94e2$var$$h(a, b) { 3974 return $158dda26ac6b94e2$var$li(2048, 8, a, b); 3975} 3976function $158dda26ac6b94e2$var$ni(a, b) { 3977 return $158dda26ac6b94e2$var$li(4, 2, a, b); 3978} 3979function $158dda26ac6b94e2$var$oi(a, b) { 3980 return $158dda26ac6b94e2$var$li(4, 4, a, b); 3981} 3982function $158dda26ac6b94e2$var$pi(a, b) { 3983 if ("function" === typeof b) return a = a(), b(a), function() { 3984 b(null); 3985 }; 3986 if (null !== b && void 0 !== b) return a = a(), b.current = a, function() { 3987 b.current = null; 3988 }; 3989} 3990function $158dda26ac6b94e2$var$qi(a, b, c) { 3991 c = null !== c && void 0 !== c ? c.concat([ 3992 a 3993 ]) : null; 3994 return $158dda26ac6b94e2$var$li(4, 4, $158dda26ac6b94e2$var$pi.bind(null, b, a), c); 3995} 3996function $158dda26ac6b94e2$var$ri() {} 3997function $158dda26ac6b94e2$var$si(a, b) { 3998 var c = $158dda26ac6b94e2$var$Uh(); 3999 b = void 0 === b ? null : b; 4000 var d = c.memoizedState; 4001 if (null !== d && null !== b && $158dda26ac6b94e2$var$Mh(b, d[1])) return d[0]; 4002 c.memoizedState = [ 4003 a, 4004 b 4005 ]; 4006 return a; 4007} 4008function $158dda26ac6b94e2$var$ti(a, b) { 4009 var c = $158dda26ac6b94e2$var$Uh(); 4010 b = void 0 === b ? null : b; 4011 var d = c.memoizedState; 4012 if (null !== d && null !== b && $158dda26ac6b94e2$var$Mh(b, d[1])) return d[0]; 4013 a = a(); 4014 c.memoizedState = [ 4015 a, 4016 b 4017 ]; 4018 return a; 4019} 4020function $158dda26ac6b94e2$var$ui(a, b, c) { 4021 if (0 === ($158dda26ac6b94e2$var$Hh & 21)) return a.baseState && (a.baseState = !1, $158dda26ac6b94e2$var$dh = !0), a.memoizedState = c; 4022 $158dda26ac6b94e2$var$He(c, b) || (c = $158dda26ac6b94e2$var$yc(), $158dda26ac6b94e2$var$M.lanes |= c, $158dda26ac6b94e2$var$rh |= c, a.baseState = !0); 4023 return b; 4024} 4025function $158dda26ac6b94e2$var$vi(a, b) { 4026 var c = $158dda26ac6b94e2$var$C; 4027 $158dda26ac6b94e2$var$C = 0 !== c && 4 > c ? c : 4; 4028 a(!0); 4029 var d = $158dda26ac6b94e2$var$Gh.transition; 4030 $158dda26ac6b94e2$var$Gh.transition = {}; 4031 try { 4032 a(!1), b(); 4033 } finally{ 4034 $158dda26ac6b94e2$var$C = c, $158dda26ac6b94e2$var$Gh.transition = d; 4035 } 4036} 4037function $158dda26ac6b94e2$var$wi() { 4038 return $158dda26ac6b94e2$var$Uh().memoizedState; 4039} 4040function $158dda26ac6b94e2$var$xi(a, b, c) { 4041 var d = $158dda26ac6b94e2$var$yi(a); 4042 c = { 4043 lane: d, 4044 action: c, 4045 hasEagerState: !1, 4046 eagerState: null, 4047 next: null 4048 }; 4049 if ($158dda26ac6b94e2$var$zi(a)) $158dda26ac6b94e2$var$Ai(b, c); 4050 else if (c = $158dda26ac6b94e2$var$hh(a, b, c, d), null !== c) { 4051 var e = $158dda26ac6b94e2$var$R(); 4052 $158dda26ac6b94e2$var$gi(c, a, d, e); 4053 $158dda26ac6b94e2$var$Bi(c, b, d); 4054 } 4055} 4056function $158dda26ac6b94e2$var$ii(a, b, c) { 4057 var d = $158dda26ac6b94e2$var$yi(a), e = { 4058 lane: d, 4059 action: c, 4060 hasEagerState: !1, 4061 eagerState: null, 4062 next: null 4063 }; 4064 if ($158dda26ac6b94e2$var$zi(a)) $158dda26ac6b94e2$var$Ai(b, e); 4065 else { 4066 var f = a.alternate; 4067 if (0 === a.lanes && (null === f || 0 === f.lanes) && (f = b.lastRenderedReducer, null !== f)) try { 4068 var g = b.lastRenderedState, h = f(g, c); 4069 e.hasEagerState = !0; 4070 e.eagerState = h; 4071 if ($158dda26ac6b94e2$var$He(h, g)) { 4072 var k = b.interleaved; 4073 null === k ? (e.next = e, $158dda26ac6b94e2$var$gh(b)) : (e.next = k.next, k.next = e); 4074 b.interleaved = e; 4075 return; 4076 } 4077 } catch (l) {} finally{} 4078 c = $158dda26ac6b94e2$var$hh(a, b, e, d); 4079 null !== c && (e = $158dda26ac6b94e2$var$R(), $158dda26ac6b94e2$var$gi(c, a, d, e), $158dda26ac6b94e2$var$Bi(c, b, d)); 4080 } 4081} 4082function $158dda26ac6b94e2$var$zi(a) { 4083 var b = a.alternate; 4084 return a === $158dda26ac6b94e2$var$M || null !== b && b === $158dda26ac6b94e2$var$M; 4085} 4086function $158dda26ac6b94e2$var$Ai(a, b) { 4087 $158dda26ac6b94e2$var$Jh = $158dda26ac6b94e2$var$Ih = !0; 4088 var c = a.pending; 4089 null === c ? b.next = b : (b.next = c.next, c.next = b); 4090 a.pending = b; 4091} 4092function $158dda26ac6b94e2$var$Bi(a, b, c) { 4093 if (0 !== (c & 4194240)) { 4094 var d = b.lanes; 4095 d &= a.pendingLanes; 4096 c |= d; 4097 b.lanes = c; 4098 $158dda26ac6b94e2$var$Cc(a, c); 4099 } 4100} 4101var $158dda26ac6b94e2$var$Rh = { 4102 readContext: $158dda26ac6b94e2$var$eh, 4103 useCallback: $158dda26ac6b94e2$var$P, 4104 useContext: $158dda26ac6b94e2$var$P, 4105 useEffect: $158dda26ac6b94e2$var$P, 4106 useImperativeHandle: $158dda26ac6b94e2$var$P, 4107 useInsertionEffect: $158dda26ac6b94e2$var$P, 4108 useLayoutEffect: $158dda26ac6b94e2$var$P, 4109 useMemo: $158dda26ac6b94e2$var$P, 4110 useReducer: $158dda26ac6b94e2$var$P, 4111 useRef: $158dda26ac6b94e2$var$P, 4112 useState: $158dda26ac6b94e2$var$P, 4113 useDebugValue: $158dda26ac6b94e2$var$P, 4114 useDeferredValue: $158dda26ac6b94e2$var$P, 4115 useTransition: $158dda26ac6b94e2$var$P, 4116 useMutableSource: $158dda26ac6b94e2$var$P, 4117 useSyncExternalStore: $158dda26ac6b94e2$var$P, 4118 useId: $158dda26ac6b94e2$var$P, 4119 unstable_isNewReconciler: !1 4120}, $158dda26ac6b94e2$var$Oh = { 4121 readContext: $158dda26ac6b94e2$var$eh, 4122 useCallback: function(a, b) { 4123 $158dda26ac6b94e2$var$Th().memoizedState = [ 4124 a, 4125 void 0 === b ? null : b 4126 ]; 4127 return a; 4128 }, 4129 useContext: $158dda26ac6b94e2$var$eh, 4130 useEffect: $158dda26ac6b94e2$var$mi, 4131 useImperativeHandle: function(a, b, c) { 4132 c = null !== c && void 0 !== c ? c.concat([ 4133 a 4134 ]) : null; 4135 return $158dda26ac6b94e2$var$ki(4194308, 4, $158dda26ac6b94e2$var$pi.bind(null, b, a), c); 4136 }, 4137 useLayoutEffect: function(a, b) { 4138 return $158dda26ac6b94e2$var$ki(4194308, 4, a, b); 4139 }, 4140 useInsertionEffect: function(a, b) { 4141 return $158dda26ac6b94e2$var$ki(4, 2, a, b); 4142 }, 4143 useMemo: function(a, b) { 4144 var c = $158dda26ac6b94e2$var$Th(); 4145 b = void 0 === b ? null : b; 4146 a = a(); 4147 c.memoizedState = [ 4148 a, 4149 b 4150 ]; 4151 return a; 4152 }, 4153 useReducer: function(a, b, c) { 4154 var d = $158dda26ac6b94e2$var$Th(); 4155 b = void 0 !== c ? c(b) : b; 4156 d.memoizedState = d.baseState = b; 4157 a = { 4158 pending: null, 4159 interleaved: null, 4160 lanes: 0, 4161 dispatch: null, 4162 lastRenderedReducer: a, 4163 lastRenderedState: b 4164 }; 4165 d.queue = a; 4166 a = a.dispatch = $158dda26ac6b94e2$var$xi.bind(null, $158dda26ac6b94e2$var$M, a); 4167 return [ 4168 d.memoizedState, 4169 a 4170 ]; 4171 }, 4172 useRef: function(a) { 4173 var b = $158dda26ac6b94e2$var$Th(); 4174 a = { 4175 current: a 4176 }; 4177 return b.memoizedState = a; 4178 }, 4179 useState: $158dda26ac6b94e2$var$hi, 4180 useDebugValue: $158dda26ac6b94e2$var$ri, 4181 useDeferredValue: function(a) { 4182 return $158dda26ac6b94e2$var$Th().memoizedState = a; 4183 }, 4184 useTransition: function() { 4185 var a = $158dda26ac6b94e2$var$hi(!1), b = a[0]; 4186 a = $158dda26ac6b94e2$var$vi.bind(null, a[1]); 4187 $158dda26ac6b94e2$var$Th().memoizedState = a; 4188 return [ 4189 b, 4190 a 4191 ]; 4192 }, 4193 useMutableSource: function() {}, 4194 useSyncExternalStore: function(a, b, c) { 4195 var d = $158dda26ac6b94e2$var$M, e = $158dda26ac6b94e2$var$Th(); 4196 if ($158dda26ac6b94e2$var$I) { 4197 if (void 0 === c) throw Error($158dda26ac6b94e2$var$p(407)); 4198 c = c(); 4199 } else { 4200 c = b(); 4201 if (null === $158dda26ac6b94e2$var$Q) throw Error($158dda26ac6b94e2$var$p(349)); 4202 0 !== ($158dda26ac6b94e2$var$Hh & 30) || $158dda26ac6b94e2$var$di(d, b, c); 4203 } 4204 e.memoizedState = c; 4205 var f = { 4206 value: c, 4207 getSnapshot: b 4208 }; 4209 e.queue = f; 4210 $158dda26ac6b94e2$var$mi($158dda26ac6b94e2$var$ai.bind(null, d, f, a), [ 4211 a 4212 ]); 4213 d.flags |= 2048; 4214 $158dda26ac6b94e2$var$bi(9, $158dda26ac6b94e2$var$ci.bind(null, d, f, c, b), void 0, null); 4215 return c; 4216 }, 4217 useId: function() { 4218 var a = $158dda26ac6b94e2$var$Th(), b = $158dda26ac6b94e2$var$Q.identifierPrefix; 4219 if ($158dda26ac6b94e2$var$I) { 4220 var c = $158dda26ac6b94e2$var$sg; 4221 var d = $158dda26ac6b94e2$var$rg; 4222 c = (d & ~(1 << 32 - $158dda26ac6b94e2$var$oc(d) - 1)).toString(32) + c; 4223 b = ":" + b + "R" + c; 4224 c = $158dda26ac6b94e2$var$Kh++; 4225 0 < c && (b += "H" + c.toString(32)); 4226 b += ":"; 4227 } else c = $158dda26ac6b94e2$var$Lh++, b = ":" + b + "r" + c.toString(32) + ":"; 4228 return a.memoizedState = b; 4229 }, 4230 unstable_isNewReconciler: !1 4231}, $158dda26ac6b94e2$var$Ph = { 4232 readContext: $158dda26ac6b94e2$var$eh, 4233 useCallback: $158dda26ac6b94e2$var$si, 4234 useContext: $158dda26ac6b94e2$var$eh, 4235 useEffect: $158dda26ac6b94e2$var$$h, 4236 useImperativeHandle: $158dda26ac6b94e2$var$qi, 4237 useInsertionEffect: $158dda26ac6b94e2$var$ni, 4238 useLayoutEffect: $158dda26ac6b94e2$var$oi, 4239 useMemo: $158dda26ac6b94e2$var$ti, 4240 useReducer: $158dda26ac6b94e2$var$Wh, 4241 useRef: $158dda26ac6b94e2$var$ji, 4242 useState: function() { 4243 return $158dda26ac6b94e2$var$Wh($158dda26ac6b94e2$var$Vh); 4244 }, 4245 useDebugValue: $158dda26ac6b94e2$var$ri, 4246 useDeferredValue: function(a) { 4247 var b = $158dda26ac6b94e2$var$Uh(); 4248 return $158dda26ac6b94e2$var$ui(b, $158dda26ac6b94e2$var$N.memoizedState, a); 4249 }, 4250 useTransition: function() { 4251 var a = $158dda26ac6b94e2$var$Wh($158dda26ac6b94e2$var$Vh)[0], b = $158dda26ac6b94e2$var$Uh().memoizedState; 4252 return [ 4253 a, 4254 b 4255 ]; 4256 }, 4257 useMutableSource: $158dda26ac6b94e2$var$Yh, 4258 useSyncExternalStore: $158dda26ac6b94e2$var$Zh, 4259 useId: $158dda26ac6b94e2$var$wi, 4260 unstable_isNewReconciler: !1 4261}, $158dda26ac6b94e2$var$Qh = { 4262 readContext: $158dda26ac6b94e2$var$eh, 4263 useCallback: $158dda26ac6b94e2$var$si, 4264 useContext: $158dda26ac6b94e2$var$eh, 4265 useEffect: $158dda26ac6b94e2$var$$h, 4266 useImperativeHandle: $158dda26ac6b94e2$var$qi, 4267 useInsertionEffect: $158dda26ac6b94e2$var$ni, 4268 useLayoutEffect: $158dda26ac6b94e2$var$oi, 4269 useMemo: $158dda26ac6b94e2$var$ti, 4270 useReducer: $158dda26ac6b94e2$var$Xh, 4271 useRef: $158dda26ac6b94e2$var$ji, 4272 useState: function() { 4273 return $158dda26ac6b94e2$var$Xh($158dda26ac6b94e2$var$Vh); 4274 }, 4275 useDebugValue: $158dda26ac6b94e2$var$ri, 4276 useDeferredValue: function(a) { 4277 var b = $158dda26ac6b94e2$var$Uh(); 4278 return null === $158dda26ac6b94e2$var$N ? b.memoizedState = a : $158dda26ac6b94e2$var$ui(b, $158dda26ac6b94e2$var$N.memoizedState, a); 4279 }, 4280 useTransition: function() { 4281 var a = $158dda26ac6b94e2$var$Xh($158dda26ac6b94e2$var$Vh)[0], b = $158dda26ac6b94e2$var$Uh().memoizedState; 4282 return [ 4283 a, 4284 b 4285 ]; 4286 }, 4287 useMutableSource: $158dda26ac6b94e2$var$Yh, 4288 useSyncExternalStore: $158dda26ac6b94e2$var$Zh, 4289 useId: $158dda26ac6b94e2$var$wi, 4290 unstable_isNewReconciler: !1 4291}; 4292function $158dda26ac6b94e2$var$Ci(a, b) { 4293 if (a && a.defaultProps) { 4294 b = $158dda26ac6b94e2$var$A({}, b); 4295 a = a.defaultProps; 4296 for(var c in a)void 0 === b[c] && (b[c] = a[c]); 4297 return b; 4298 } 4299 return b; 4300} 4301function $158dda26ac6b94e2$var$Di(a, b, c, d) { 4302 b = a.memoizedState; 4303 c = c(d, b); 4304 c = null === c || void 0 === c ? b : $158dda26ac6b94e2$var$A({}, b, c); 4305 a.memoizedState = c; 4306 0 === a.lanes && (a.updateQueue.baseState = c); 4307} 4308var $158dda26ac6b94e2$var$Ei = { 4309 isMounted: function(a) { 4310 return (a = a._reactInternals) ? $158dda26ac6b94e2$var$Vb(a) === a : !1; 4311 }, 4312 enqueueSetState: function(a, b, c) { 4313 a = a._reactInternals; 4314 var d = $158dda26ac6b94e2$var$R(), e = $158dda26ac6b94e2$var$yi(a), f = $158dda26ac6b94e2$var$mh(d, e); 4315 f.payload = b; 4316 void 0 !== c && null !== c && (f.callback = c); 4317 b = $158dda26ac6b94e2$var$nh(a, f, e); 4318 null !== b && ($158dda26ac6b94e2$var$gi(b, a, e, d), $158dda26ac6b94e2$var$oh(b, a, e)); 4319 }, 4320 enqueueReplaceState: function(a, b, c) { 4321 a = a._reactInternals; 4322 var d = $158dda26ac6b94e2$var$R(), e = $158dda26ac6b94e2$var$yi(a), f = $158dda26ac6b94e2$var$mh(d, e); 4323 f.tag = 1; 4324 f.payload = b; 4325 void 0 !== c && null !== c && (f.callback = c); 4326 b = $158dda26ac6b94e2$var$nh(a, f, e); 4327 null !== b && ($158dda26ac6b94e2$var$gi(b, a, e, d), $158dda26ac6b94e2$var$oh(b, a, e)); 4328 }, 4329 enqueueForceUpdate: function(a, b) { 4330 a = a._reactInternals; 4331 var c = $158dda26ac6b94e2$var$R(), d = $158dda26ac6b94e2$var$yi(a), e = $158dda26ac6b94e2$var$mh(c, d); 4332 e.tag = 2; 4333 void 0 !== b && null !== b && (e.callback = b); 4334 b = $158dda26ac6b94e2$var$nh(a, e, d); 4335 null !== b && ($158dda26ac6b94e2$var$gi(b, a, d, c), $158dda26ac6b94e2$var$oh(b, a, d)); 4336 } 4337}; 4338function $158dda26ac6b94e2$var$Fi(a, b, c, d, e, f, g) { 4339 a = a.stateNode; 4340 return "function" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d, f, g) : b.prototype && b.prototype.isPureReactComponent ? !$158dda26ac6b94e2$var$Ie(c, d) || !$158dda26ac6b94e2$var$Ie(e, f) : !0; 4341} 4342function $158dda26ac6b94e2$var$Gi(a, b, c) { 4343 var d = !1, e = $158dda26ac6b94e2$var$Vf; 4344 var f = b.contextType; 4345 "object" === typeof f && null !== f ? f = $158dda26ac6b94e2$var$eh(f) : (e = $158dda26ac6b94e2$var$Zf(b) ? $158dda26ac6b94e2$var$Xf : $158dda26ac6b94e2$var$H.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? $158dda26ac6b94e2$var$Yf(a, e) : $158dda26ac6b94e2$var$Vf); 4346 b = new b(c, f); 4347 a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null; 4348 b.updater = $158dda26ac6b94e2$var$Ei; 4349 a.stateNode = b; 4350 b._reactInternals = a; 4351 d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f); 4352 return b; 4353} 4354function $158dda26ac6b94e2$var$Hi(a, b, c, d) { 4355 a = b.state; 4356 "function" === typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d); 4357 "function" === typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d); 4358 b.state !== a && $158dda26ac6b94e2$var$Ei.enqueueReplaceState(b, b.state, null); 4359} 4360function $158dda26ac6b94e2$var$Ii(a, b, c, d) { 4361 var e = a.stateNode; 4362 e.props = c; 4363 e.state = a.memoizedState; 4364 e.refs = {}; 4365 $158dda26ac6b94e2$var$kh(a); 4366 var f = b.contextType; 4367 "object" === typeof f && null !== f ? e.context = $158dda26ac6b94e2$var$eh(f) : (f = $158dda26ac6b94e2$var$Zf(b) ? $158dda26ac6b94e2$var$Xf : $158dda26ac6b94e2$var$H.current, e.context = $158dda26ac6b94e2$var$Yf(a, f)); 4368 e.state = a.memoizedState; 4369 f = b.getDerivedStateFromProps; 4370 "function" === typeof f && ($158dda26ac6b94e2$var$Di(a, b, f, c), e.state = a.memoizedState); 4371 "function" === typeof b.getDerivedStateFromProps || "function" === typeof e.getSnapshotBeforeUpdate || "function" !== typeof e.UNSAFE_componentWillMount && "function" !== typeof e.componentWillMount || (b = e.state, "function" === typeof e.componentWillMount && e.componentWillMount(), "function" === typeof e.UNSAFE_componentWillMount && e.UNSAFE_componentWillMount(), b !== e.state && $158dda26ac6b94e2$var$Ei.enqueueReplaceState(e, e.state, null), $158dda26ac6b94e2$var$qh(a, c, e, d), e.state = a.memoizedState); 4372 "function" === typeof e.componentDidMount && (a.flags |= 4194308); 4373} 4374function $158dda26ac6b94e2$var$Ji(a, b) { 4375 try { 4376 var c = "", d = b; 4377 do c += $158dda26ac6b94e2$var$Pa(d), d = d.return; 4378 while (d); 4379 var e = c; 4380 } catch (f) { 4381 e = "\nError generating stack: " + f.message + "\n" + f.stack; 4382 } 4383 return { 4384 value: a, 4385 source: b, 4386 stack: e, 4387 digest: null 4388 }; 4389} 4390function $158dda26ac6b94e2$var$Ki(a, b, c) { 4391 return { 4392 value: a, 4393 source: null, 4394 stack: null != c ? c : null, 4395 digest: null != b ? b : null 4396 }; 4397} 4398function $158dda26ac6b94e2$var$Li(a, b) { 4399 try { 4400 console.error(b.value); 4401 } catch (c) { 4402 setTimeout(function() { 4403 throw c; 4404 }); 4405 } 4406} 4407var $158dda26ac6b94e2$var$Mi = "function" === typeof WeakMap ? WeakMap : Map; 4408function $158dda26ac6b94e2$var$Ni(a, b, c) { 4409 c = $158dda26ac6b94e2$var$mh(-1, c); 4410 c.tag = 3; 4411 c.payload = { 4412 element: null 4413 }; 4414 var d = b.value; 4415 c.callback = function() { 4416 $158dda26ac6b94e2$var$Oi || ($158dda26ac6b94e2$var$Oi = !0, $158dda26ac6b94e2$var$Pi = d); 4417 $158dda26ac6b94e2$var$Li(a, b); 4418 }; 4419 return c; 4420} 4421function $158dda26ac6b94e2$var$Qi(a, b, c) { 4422 c = $158dda26ac6b94e2$var$mh(-1, c); 4423 c.tag = 3; 4424 var d = a.type.getDerivedStateFromError; 4425 if ("function" === typeof d) { 4426 var e = b.value; 4427 c.payload = function() { 4428 return d(e); 4429 }; 4430 c.callback = function() { 4431 $158dda26ac6b94e2$var$Li(a, b); 4432 }; 4433 } 4434 var f = a.stateNode; 4435 null !== f && "function" === typeof f.componentDidCatch && (c.callback = function() { 4436 $158dda26ac6b94e2$var$Li(a, b); 4437 "function" !== typeof d && (null === $158dda26ac6b94e2$var$Ri ? $158dda26ac6b94e2$var$Ri = new Set([ 4438 this 4439 ]) : $158dda26ac6b94e2$var$Ri.add(this)); 4440 var c = b.stack; 4441 this.componentDidCatch(b.value, { 4442 componentStack: null !== c ? c : "" 4443 }); 4444 }); 4445 return c; 4446} 4447function $158dda26ac6b94e2$var$Si(a, b, c) { 4448 var d = a.pingCache; 4449 if (null === d) { 4450 d = a.pingCache = new $158dda26ac6b94e2$var$Mi; 4451 var e = new Set; 4452 d.set(b, e); 4453 } else e = d.get(b), void 0 === e && (e = new Set, d.set(b, e)); 4454 e.has(c) || (e.add(c), a = $158dda26ac6b94e2$var$Ti.bind(null, a, b, c), b.then(a, a)); 4455} 4456function $158dda26ac6b94e2$var$Ui(a) { 4457 do { 4458 var b; 4459 if (b = 13 === a.tag) b = a.memoizedState, b = null !== b ? null !== b.dehydrated ? !0 : !1 : !0; 4460 if (b) return a; 4461 a = a.return; 4462 }while (null !== a); 4463 return null; 4464} 4465function $158dda26ac6b94e2$var$Vi(a, b, c, d, e) { 4466 if (0 === (a.mode & 1)) return a === b ? a.flags |= 65536 : (a.flags |= 128, c.flags |= 131072, c.flags &= -52805, 1 === c.tag && (null === c.alternate ? c.tag = 17 : (b = $158dda26ac6b94e2$var$mh(-1, 1), b.tag = 2, $158dda26ac6b94e2$var$nh(c, b, 1))), c.lanes |= 1), a; 4467 a.flags |= 65536; 4468 a.lanes = e; 4469 return a; 4470} 4471var $158dda26ac6b94e2$var$Wi = $158dda26ac6b94e2$var$ua.ReactCurrentOwner, $158dda26ac6b94e2$var$dh = !1; 4472function $158dda26ac6b94e2$var$Xi(a, b, c, d) { 4473 b.child = null === a ? $158dda26ac6b94e2$var$Vg(b, null, c, d) : $158dda26ac6b94e2$var$Ug(b, a.child, c, d); 4474} 4475function $158dda26ac6b94e2$var$Yi(a, b, c, d, e) { 4476 c = c.render; 4477 var f = b.ref; 4478 $158dda26ac6b94e2$var$ch(b, e); 4479 d = $158dda26ac6b94e2$var$Nh(a, b, c, d, f, e); 4480 c = $158dda26ac6b94e2$var$Sh(); 4481 if (null !== a && !$158dda26ac6b94e2$var$dh) return b.updateQueue = a.updateQueue, b.flags &= -2053, a.lanes &= ~e, $158dda26ac6b94e2$var$Zi(a, b, e); 4482 $158dda26ac6b94e2$var$I && c && $158dda26ac6b94e2$var$vg(b); 4483 b.flags |= 1; 4484 $158dda26ac6b94e2$var$Xi(a, b, d, e); 4485 return b.child; 4486} 4487function $158dda26ac6b94e2$var$$i(a, b, c, d, e) { 4488 if (null === a) { 4489 var f = c.type; 4490 if ("function" === typeof f && !$158dda26ac6b94e2$var$aj(f) && void 0 === f.defaultProps && null === c.compare && void 0 === c.defaultProps) return b.tag = 15, b.type = f, $158dda26ac6b94e2$var$bj(a, b, f, d, e); 4491 a = $158dda26ac6b94e2$var$Rg(c.type, null, d, b, b.mode, e); 4492 a.ref = b.ref; 4493 a.return = b; 4494 return b.child = a; 4495 } 4496 f = a.child; 4497 if (0 === (a.lanes & e)) { 4498 var g = f.memoizedProps; 4499 c = c.compare; 4500 c = null !== c ? c : $158dda26ac6b94e2$var$Ie; 4501 if (c(g, d) && a.ref === b.ref) return $158dda26ac6b94e2$var$Zi(a, b, e); 4502 } 4503 b.flags |= 1; 4504 a = $158dda26ac6b94e2$var$Pg(f, d); 4505 a.ref = b.ref; 4506 a.return = b; 4507 return b.child = a; 4508} 4509function $158dda26ac6b94e2$var$bj(a, b, c, d, e) { 4510 if (null !== a) { 4511 var f = a.memoizedProps; 4512 if ($158dda26ac6b94e2$var$Ie(f, d) && a.ref === b.ref) { 4513 if ($158dda26ac6b94e2$var$dh = !1, b.pendingProps = d = f, 0 !== (a.lanes & e)) 0 !== (a.flags & 131072) && ($158dda26ac6b94e2$var$dh = !0); 4514 else return b.lanes = a.lanes, $158dda26ac6b94e2$var$Zi(a, b, e); 4515 } 4516 } 4517 return $158dda26ac6b94e2$var$cj(a, b, c, d, e); 4518} 4519function $158dda26ac6b94e2$var$dj(a, b, c) { 4520 var d = b.pendingProps, e = d.children, f = null !== a ? a.memoizedState : null; 4521 if ("hidden" === d.mode) { 4522 if (0 === (b.mode & 1)) b.memoizedState = { 4523 baseLanes: 0, 4524 cachePool: null, 4525 transitions: null 4526 }, $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$ej, $158dda26ac6b94e2$var$fj), $158dda26ac6b94e2$var$fj |= c; 4527 else { 4528 if (0 === (c & 1073741824)) return a = null !== f ? f.baseLanes | c : c, b.lanes = b.childLanes = 1073741824, b.memoizedState = { 4529 baseLanes: a, 4530 cachePool: null, 4531 transitions: null 4532 }, b.updateQueue = null, $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$ej, $158dda26ac6b94e2$var$fj), $158dda26ac6b94e2$var$fj |= a, null; 4533 b.memoizedState = { 4534 baseLanes: 0, 4535 cachePool: null, 4536 transitions: null 4537 }; 4538 d = null !== f ? f.baseLanes : c; 4539 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$ej, $158dda26ac6b94e2$var$fj); 4540 $158dda26ac6b94e2$var$fj |= d; 4541 } 4542 } else null !== f ? (d = f.baseLanes | c, b.memoizedState = null) : d = c, $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$ej, $158dda26ac6b94e2$var$fj), $158dda26ac6b94e2$var$fj |= d; 4543 $158dda26ac6b94e2$var$Xi(a, b, e, c); 4544 return b.child; 4545} 4546function $158dda26ac6b94e2$var$gj(a, b) { 4547 var c = b.ref; 4548 if (null === a && null !== c || null !== a && a.ref !== c) b.flags |= 512, b.flags |= 2097152; 4549} 4550function $158dda26ac6b94e2$var$cj(a, b, c, d, e) { 4551 var f = $158dda26ac6b94e2$var$Zf(c) ? $158dda26ac6b94e2$var$Xf : $158dda26ac6b94e2$var$H.current; 4552 f = $158dda26ac6b94e2$var$Yf(b, f); 4553 $158dda26ac6b94e2$var$ch(b, e); 4554 c = $158dda26ac6b94e2$var$Nh(a, b, c, d, f, e); 4555 d = $158dda26ac6b94e2$var$Sh(); 4556 if (null !== a && !$158dda26ac6b94e2$var$dh) return b.updateQueue = a.updateQueue, b.flags &= -2053, a.lanes &= ~e, $158dda26ac6b94e2$var$Zi(a, b, e); 4557 $158dda26ac6b94e2$var$I && d && $158dda26ac6b94e2$var$vg(b); 4558 b.flags |= 1; 4559 $158dda26ac6b94e2$var$Xi(a, b, c, e); 4560 return b.child; 4561} 4562function $158dda26ac6b94e2$var$hj(a, b, c, d, e) { 4563 if ($158dda26ac6b94e2$var$Zf(c)) { 4564 var f = !0; 4565 $158dda26ac6b94e2$var$cg(b); 4566 } else f = !1; 4567 $158dda26ac6b94e2$var$ch(b, e); 4568 if (null === b.stateNode) $158dda26ac6b94e2$var$ij(a, b), $158dda26ac6b94e2$var$Gi(b, c, d), $158dda26ac6b94e2$var$Ii(b, c, d, e), d = !0; 4569 else if (null === a) { 4570 var g = b.stateNode, h = b.memoizedProps; 4571 g.props = h; 4572 var k = g.context, l = c.contextType; 4573 "object" === typeof l && null !== l ? l = $158dda26ac6b94e2$var$eh(l) : (l = $158dda26ac6b94e2$var$Zf(c) ? $158dda26ac6b94e2$var$Xf : $158dda26ac6b94e2$var$H.current, l = $158dda26ac6b94e2$var$Yf(b, l)); 4574 var m = c.getDerivedStateFromProps, q = "function" === typeof m || "function" === typeof g.getSnapshotBeforeUpdate; 4575 q || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && $158dda26ac6b94e2$var$Hi(b, g, d, l); 4576 $158dda26ac6b94e2$var$jh = !1; 4577 var r = b.memoizedState; 4578 g.state = r; 4579 $158dda26ac6b94e2$var$qh(b, d, g, e); 4580 k = b.memoizedState; 4581 h !== d || r !== k || $158dda26ac6b94e2$var$Wf.current || $158dda26ac6b94e2$var$jh ? ("function" === typeof m && ($158dda26ac6b94e2$var$Di(b, c, m, d), k = b.memoizedState), (h = $158dda26ac6b94e2$var$jh || $158dda26ac6b94e2$var$Fi(b, c, h, d, r, k, l)) ? (q || "function" !== typeof g.UNSAFE_componentWillMount && "function" !== typeof g.componentWillMount || ("function" === typeof g.componentWillMount && g.componentWillMount(), "function" === typeof g.UNSAFE_componentWillMount && g.UNSAFE_componentWillMount()), "function" === typeof g.componentDidMount && (b.flags |= 4194308)) : ("function" === typeof g.componentDidMount && (b.flags |= 4194308), b.memoizedProps = d, b.memoizedState = k), g.props = d, g.state = k, g.context = l, d = h) : ("function" === typeof g.componentDidMount && (b.flags |= 4194308), d = !1); 4582 } else { 4583 g = b.stateNode; 4584 $158dda26ac6b94e2$var$lh(a, b); 4585 h = b.memoizedProps; 4586 l = b.type === b.elementType ? h : $158dda26ac6b94e2$var$Ci(b.type, h); 4587 g.props = l; 4588 q = b.pendingProps; 4589 r = g.context; 4590 k = c.contextType; 4591 "object" === typeof k && null !== k ? k = $158dda26ac6b94e2$var$eh(k) : (k = $158dda26ac6b94e2$var$Zf(c) ? $158dda26ac6b94e2$var$Xf : $158dda26ac6b94e2$var$H.current, k = $158dda26ac6b94e2$var$Yf(b, k)); 4592 var y = c.getDerivedStateFromProps; 4593 (m = "function" === typeof y || "function" === typeof g.getSnapshotBeforeUpdate) || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== q || r !== k) && $158dda26ac6b94e2$var$Hi(b, g, d, k); 4594 $158dda26ac6b94e2$var$jh = !1; 4595 r = b.memoizedState; 4596 g.state = r; 4597 $158dda26ac6b94e2$var$qh(b, d, g, e); 4598 var n = b.memoizedState; 4599 h !== q || r !== n || $158dda26ac6b94e2$var$Wf.current || $158dda26ac6b94e2$var$jh ? ("function" === typeof y && ($158dda26ac6b94e2$var$Di(b, c, y, d), n = b.memoizedState), (l = $158dda26ac6b94e2$var$jh || $158dda26ac6b94e2$var$Fi(b, c, l, d, r, n, k) || !1) ? (m || "function" !== typeof g.UNSAFE_componentWillUpdate && "function" !== typeof g.componentWillUpdate || ("function" === typeof g.componentWillUpdate && g.componentWillUpdate(d, n, k), "function" === typeof g.UNSAFE_componentWillUpdate && g.UNSAFE_componentWillUpdate(d, n, k)), "function" === typeof g.componentDidUpdate && (b.flags |= 4), "function" === typeof g.getSnapshotBeforeUpdate && (b.flags |= 1024)) : ("function" !== typeof g.componentDidUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 1024), b.memoizedProps = d, b.memoizedState = n), g.props = d, g.state = n, g.context = k, d = l) : ("function" !== typeof g.componentDidUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 1024), d = !1); 4600 } 4601 return $158dda26ac6b94e2$var$jj(a, b, c, d, f, e); 4602} 4603function $158dda26ac6b94e2$var$jj(a, b, c, d, e, f) { 4604 $158dda26ac6b94e2$var$gj(a, b); 4605 var g = 0 !== (b.flags & 128); 4606 if (!d && !g) return e && $158dda26ac6b94e2$var$dg(b, c, !1), $158dda26ac6b94e2$var$Zi(a, b, f); 4607 d = b.stateNode; 4608 $158dda26ac6b94e2$var$Wi.current = b; 4609 var h = g && "function" !== typeof c.getDerivedStateFromError ? null : d.render(); 4610 b.flags |= 1; 4611 null !== a && g ? (b.child = $158dda26ac6b94e2$var$Ug(b, a.child, null, f), b.child = $158dda26ac6b94e2$var$Ug(b, null, h, f)) : $158dda26ac6b94e2$var$Xi(a, b, h, f); 4612 b.memoizedState = d.state; 4613 e && $158dda26ac6b94e2$var$dg(b, c, !0); 4614 return b.child; 4615} 4616function $158dda26ac6b94e2$var$kj(a) { 4617 var b = a.stateNode; 4618 b.pendingContext ? $158dda26ac6b94e2$var$ag(a, b.pendingContext, b.pendingContext !== b.context) : b.context && $158dda26ac6b94e2$var$ag(a, b.context, !1); 4619 $158dda26ac6b94e2$var$yh(a, b.containerInfo); 4620} 4621function $158dda26ac6b94e2$var$lj(a, b, c, d, e) { 4622 $158dda26ac6b94e2$var$Ig(); 4623 $158dda26ac6b94e2$var$Jg(e); 4624 b.flags |= 256; 4625 $158dda26ac6b94e2$var$Xi(a, b, c, d); 4626 return b.child; 4627} 4628var $158dda26ac6b94e2$var$mj = { 4629 dehydrated: null, 4630 treeContext: null, 4631 retryLane: 0 4632}; 4633function $158dda26ac6b94e2$var$nj(a) { 4634 return { 4635 baseLanes: a, 4636 cachePool: null, 4637 transitions: null 4638 }; 4639} 4640function $158dda26ac6b94e2$var$oj(a, b, c) { 4641 var d = b.pendingProps, e = $158dda26ac6b94e2$var$L.current, f = !1, g = 0 !== (b.flags & 128), h; 4642 (h = g) || (h = null !== a && null === a.memoizedState ? !1 : 0 !== (e & 2)); 4643 if (h) f = !0, b.flags &= -129; 4644 else if (null === a || null !== a.memoizedState) e |= 1; 4645 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, e & 1); 4646 if (null === a) { 4647 $158dda26ac6b94e2$var$Eg(b); 4648 a = b.memoizedState; 4649 if (null !== a && (a = a.dehydrated, null !== a)) return 0 === (b.mode & 1) ? b.lanes = 1 : "$!" === a.data ? b.lanes = 8 : b.lanes = 1073741824, null; 4650 g = d.children; 4651 a = d.fallback; 4652 return f ? (d = b.mode, f = b.child, g = { 4653 mode: "hidden", 4654 children: g 4655 }, 0 === (d & 1) && null !== f ? (f.childLanes = 0, f.pendingProps = g) : f = $158dda26ac6b94e2$var$pj(g, d, 0, null), a = $158dda26ac6b94e2$var$Tg(a, d, c, null), f.return = b, a.return = b, f.sibling = a, b.child = f, b.child.memoizedState = $158dda26ac6b94e2$var$nj(c), b.memoizedState = $158dda26ac6b94e2$var$mj, a) : $158dda26ac6b94e2$var$qj(b, g); 4656 } 4657 e = a.memoizedState; 4658 if (null !== e && (h = e.dehydrated, null !== h)) return $158dda26ac6b94e2$var$rj(a, b, g, d, h, e, c); 4659 if (f) { 4660 f = d.fallback; 4661 g = b.mode; 4662 e = a.child; 4663 h = e.sibling; 4664 var k = { 4665 mode: "hidden", 4666 children: d.children 4667 }; 4668 0 === (g & 1) && b.child !== e ? (d = b.child, d.childLanes = 0, d.pendingProps = k, b.deletions = null) : (d = $158dda26ac6b94e2$var$Pg(e, k), d.subtreeFlags = e.subtreeFlags & 14680064); 4669 null !== h ? f = $158dda26ac6b94e2$var$Pg(h, f) : (f = $158dda26ac6b94e2$var$Tg(f, g, c, null), f.flags |= 2); 4670 f.return = b; 4671 d.return = b; 4672 d.sibling = f; 4673 b.child = d; 4674 d = f; 4675 f = b.child; 4676 g = a.child.memoizedState; 4677 g = null === g ? $158dda26ac6b94e2$var$nj(c) : { 4678 baseLanes: g.baseLanes | c, 4679 cachePool: null, 4680 transitions: g.transitions 4681 }; 4682 f.memoizedState = g; 4683 f.childLanes = a.childLanes & ~c; 4684 b.memoizedState = $158dda26ac6b94e2$var$mj; 4685 return d; 4686 } 4687 f = a.child; 4688 a = f.sibling; 4689 d = $158dda26ac6b94e2$var$Pg(f, { 4690 mode: "visible", 4691 children: d.children 4692 }); 4693 0 === (b.mode & 1) && (d.lanes = c); 4694 d.return = b; 4695 d.sibling = null; 4696 null !== a && (c = b.deletions, null === c ? (b.deletions = [ 4697 a 4698 ], b.flags |= 16) : c.push(a)); 4699 b.child = d; 4700 b.memoizedState = null; 4701 return d; 4702} 4703function $158dda26ac6b94e2$var$qj(a, b) { 4704 b = $158dda26ac6b94e2$var$pj({ 4705 mode: "visible", 4706 children: b 4707 }, a.mode, 0, null); 4708 b.return = a; 4709 return a.child = b; 4710} 4711function $158dda26ac6b94e2$var$sj(a, b, c, d) { 4712 null !== d && $158dda26ac6b94e2$var$Jg(d); 4713 $158dda26ac6b94e2$var$Ug(b, a.child, null, c); 4714 a = $158dda26ac6b94e2$var$qj(b, b.pendingProps.children); 4715 a.flags |= 2; 4716 b.memoizedState = null; 4717 return a; 4718} 4719function $158dda26ac6b94e2$var$rj(a, b, c, d, e, f, g) { 4720 if (c) { 4721 if (b.flags & 256) return b.flags &= -257, d = $158dda26ac6b94e2$var$Ki(Error($158dda26ac6b94e2$var$p(422))), $158dda26ac6b94e2$var$sj(a, b, g, d); 4722 if (null !== b.memoizedState) return b.child = a.child, b.flags |= 128, null; 4723 f = d.fallback; 4724 e = b.mode; 4725 d = $158dda26ac6b94e2$var$pj({ 4726 mode: "visible", 4727 children: d.children 4728 }, e, 0, null); 4729 f = $158dda26ac6b94e2$var$Tg(f, e, g, null); 4730 f.flags |= 2; 4731 d.return = b; 4732 f.return = b; 4733 d.sibling = f; 4734 b.child = d; 4735 0 !== (b.mode & 1) && $158dda26ac6b94e2$var$Ug(b, a.child, null, g); 4736 b.child.memoizedState = $158dda26ac6b94e2$var$nj(g); 4737 b.memoizedState = $158dda26ac6b94e2$var$mj; 4738 return f; 4739 } 4740 if (0 === (b.mode & 1)) return $158dda26ac6b94e2$var$sj(a, b, g, null); 4741 if ("$!" === e.data) { 4742 d = e.nextSibling && e.nextSibling.dataset; 4743 if (d) var h = d.dgst; 4744 d = h; 4745 f = Error($158dda26ac6b94e2$var$p(419)); 4746 d = $158dda26ac6b94e2$var$Ki(f, d, void 0); 4747 return $158dda26ac6b94e2$var$sj(a, b, g, d); 4748 } 4749 h = 0 !== (g & a.childLanes); 4750 if ($158dda26ac6b94e2$var$dh || h) { 4751 d = $158dda26ac6b94e2$var$Q; 4752 if (null !== d) { 4753 switch(g & -g){ 4754 case 4: 4755 e = 2; 4756 break; 4757 case 16: 4758 e = 8; 4759 break; 4760 case 64: 4761 case 128: 4762 case 256: 4763 case 512: 4764 case 1024: 4765 case 2048: 4766 case 4096: 4767 case 8192: 4768 case 16384: 4769 case 32768: 4770 case 65536: 4771 case 131072: 4772 case 262144: 4773 case 524288: 4774 case 1048576: 4775 case 2097152: 4776 case 4194304: 4777 case 8388608: 4778 case 16777216: 4779 case 33554432: 4780 case 67108864: 4781 e = 32; 4782 break; 4783 case 536870912: 4784 e = 268435456; 4785 break; 4786 default: 4787 e = 0; 4788 } 4789 e = 0 !== (e & (d.suspendedLanes | g)) ? 0 : e; 4790 0 !== e && e !== f.retryLane && (f.retryLane = e, $158dda26ac6b94e2$var$ih(a, e), $158dda26ac6b94e2$var$gi(d, a, e, -1)); 4791 } 4792 $158dda26ac6b94e2$var$tj(); 4793 d = $158dda26ac6b94e2$var$Ki(Error($158dda26ac6b94e2$var$p(421))); 4794 return $158dda26ac6b94e2$var$sj(a, b, g, d); 4795 } 4796 if ("$?" === e.data) return b.flags |= 128, b.child = a.child, b = $158dda26ac6b94e2$var$uj.bind(null, a), e._reactRetry = b, null; 4797 a = f.treeContext; 4798 $158dda26ac6b94e2$var$yg = $158dda26ac6b94e2$var$Lf(e.nextSibling); 4799 $158dda26ac6b94e2$var$xg = b; 4800 $158dda26ac6b94e2$var$I = !0; 4801 $158dda26ac6b94e2$var$zg = null; 4802 null !== a && ($158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg++] = $158dda26ac6b94e2$var$rg, $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg++] = $158dda26ac6b94e2$var$sg, $158dda26ac6b94e2$var$og[$158dda26ac6b94e2$var$pg++] = $158dda26ac6b94e2$var$qg, $158dda26ac6b94e2$var$rg = a.id, $158dda26ac6b94e2$var$sg = a.overflow, $158dda26ac6b94e2$var$qg = b); 4803 b = $158dda26ac6b94e2$var$qj(b, d.children); 4804 b.flags |= 4096; 4805 return b; 4806} 4807function $158dda26ac6b94e2$var$vj(a, b, c) { 4808 a.lanes |= b; 4809 var d = a.alternate; 4810 null !== d && (d.lanes |= b); 4811 $158dda26ac6b94e2$var$bh(a.return, b, c); 4812} 4813function $158dda26ac6b94e2$var$wj(a, b, c, d, e) { 4814 var f = a.memoizedState; 4815 null === f ? a.memoizedState = { 4816 isBackwards: b, 4817 rendering: null, 4818 renderingStartTime: 0, 4819 last: d, 4820 tail: c, 4821 tailMode: e 4822 } : (f.isBackwards = b, f.rendering = null, f.renderingStartTime = 0, f.last = d, f.tail = c, f.tailMode = e); 4823} 4824function $158dda26ac6b94e2$var$xj(a, b, c) { 4825 var d = b.pendingProps, e = d.revealOrder, f = d.tail; 4826 $158dda26ac6b94e2$var$Xi(a, b, d.children, c); 4827 d = $158dda26ac6b94e2$var$L.current; 4828 if (0 !== (d & 2)) d = d & 1 | 2, b.flags |= 128; 4829 else { 4830 if (null !== a && 0 !== (a.flags & 128)) a: for(a = b.child; null !== a;){ 4831 if (13 === a.tag) null !== a.memoizedState && $158dda26ac6b94e2$var$vj(a, c, b); 4832 else if (19 === a.tag) $158dda26ac6b94e2$var$vj(a, c, b); 4833 else if (null !== a.child) { 4834 a.child.return = a; 4835 a = a.child; 4836 continue; 4837 } 4838 if (a === b) break a; 4839 for(; null === a.sibling;){ 4840 if (null === a.return || a.return === b) break a; 4841 a = a.return; 4842 } 4843 a.sibling.return = a.return; 4844 a = a.sibling; 4845 } 4846 d &= 1; 4847 } 4848 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, d); 4849 if (0 === (b.mode & 1)) b.memoizedState = null; 4850 else switch(e){ 4851 case "forwards": 4852 c = b.child; 4853 for(e = null; null !== c;)a = c.alternate, null !== a && null === $158dda26ac6b94e2$var$Ch(a) && (e = c), c = c.sibling; 4854 c = e; 4855 null === c ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null); 4856 $158dda26ac6b94e2$var$wj(b, !1, e, c, f); 4857 break; 4858 case "backwards": 4859 c = null; 4860 e = b.child; 4861 for(b.child = null; null !== e;){ 4862 a = e.alternate; 4863 if (null !== a && null === $158dda26ac6b94e2$var$Ch(a)) { 4864 b.child = e; 4865 break; 4866 } 4867 a = e.sibling; 4868 e.sibling = c; 4869 c = e; 4870 e = a; 4871 } 4872 $158dda26ac6b94e2$var$wj(b, !0, c, null, f); 4873 break; 4874 case "together": 4875 $158dda26ac6b94e2$var$wj(b, !1, null, null, void 0); 4876 break; 4877 default: 4878 b.memoizedState = null; 4879 } 4880 return b.child; 4881} 4882function $158dda26ac6b94e2$var$ij(a, b) { 4883 0 === (b.mode & 1) && null !== a && (a.alternate = null, b.alternate = null, b.flags |= 2); 4884} 4885function $158dda26ac6b94e2$var$Zi(a, b, c) { 4886 null !== a && (b.dependencies = a.dependencies); 4887 $158dda26ac6b94e2$var$rh |= b.lanes; 4888 if (0 === (c & b.childLanes)) return null; 4889 if (null !== a && b.child !== a.child) throw Error($158dda26ac6b94e2$var$p(153)); 4890 if (null !== b.child) { 4891 a = b.child; 4892 c = $158dda26ac6b94e2$var$Pg(a, a.pendingProps); 4893 b.child = c; 4894 for(c.return = b; null !== a.sibling;)a = a.sibling, c = c.sibling = $158dda26ac6b94e2$var$Pg(a, a.pendingProps), c.return = b; 4895 c.sibling = null; 4896 } 4897 return b.child; 4898} 4899function $158dda26ac6b94e2$var$yj(a, b, c) { 4900 switch(b.tag){ 4901 case 3: 4902 $158dda26ac6b94e2$var$kj(b); 4903 $158dda26ac6b94e2$var$Ig(); 4904 break; 4905 case 5: 4906 $158dda26ac6b94e2$var$Ah(b); 4907 break; 4908 case 1: 4909 $158dda26ac6b94e2$var$Zf(b.type) && $158dda26ac6b94e2$var$cg(b); 4910 break; 4911 case 4: 4912 $158dda26ac6b94e2$var$yh(b, b.stateNode.containerInfo); 4913 break; 4914 case 10: 4915 var d = b.type._context, e = b.memoizedProps.value; 4916 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$Wg, d._currentValue); 4917 d._currentValue = e; 4918 break; 4919 case 13: 4920 d = b.memoizedState; 4921 if (null !== d) { 4922 if (null !== d.dehydrated) return $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, $158dda26ac6b94e2$var$L.current & 1), b.flags |= 128, null; 4923 if (0 !== (c & b.child.childLanes)) return $158dda26ac6b94e2$var$oj(a, b, c); 4924 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, $158dda26ac6b94e2$var$L.current & 1); 4925 a = $158dda26ac6b94e2$var$Zi(a, b, c); 4926 return null !== a ? a.sibling : null; 4927 } 4928 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, $158dda26ac6b94e2$var$L.current & 1); 4929 break; 4930 case 19: 4931 d = 0 !== (c & b.childLanes); 4932 if (0 !== (a.flags & 128)) { 4933 if (d) return $158dda26ac6b94e2$var$xj(a, b, c); 4934 b.flags |= 128; 4935 } 4936 e = b.memoizedState; 4937 null !== e && (e.rendering = null, e.tail = null, e.lastEffect = null); 4938 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, $158dda26ac6b94e2$var$L.current); 4939 if (d) break; 4940 else return null; 4941 case 22: 4942 case 23: 4943 return b.lanes = 0, $158dda26ac6b94e2$var$dj(a, b, c); 4944 } 4945 return $158dda26ac6b94e2$var$Zi(a, b, c); 4946} 4947var $158dda26ac6b94e2$var$zj, $158dda26ac6b94e2$var$Aj, $158dda26ac6b94e2$var$Bj, $158dda26ac6b94e2$var$Cj; 4948$158dda26ac6b94e2$var$zj = function(a, b) { 4949 for(var c = b.child; null !== c;){ 4950 if (5 === c.tag || 6 === c.tag) a.appendChild(c.stateNode); 4951 else if (4 !== c.tag && null !== c.child) { 4952 c.child.return = c; 4953 c = c.child; 4954 continue; 4955 } 4956 if (c === b) break; 4957 for(; null === c.sibling;){ 4958 if (null === c.return || c.return === b) return; 4959 c = c.return; 4960 } 4961 c.sibling.return = c.return; 4962 c = c.sibling; 4963 } 4964}; 4965$158dda26ac6b94e2$var$Aj = function() {}; 4966$158dda26ac6b94e2$var$Bj = function(a, b, c, d) { 4967 var e = a.memoizedProps; 4968 if (e !== d) { 4969 a = b.stateNode; 4970 $158dda26ac6b94e2$var$xh($158dda26ac6b94e2$var$uh.current); 4971 var f = null; 4972 switch(c){ 4973 case "input": 4974 e = $158dda26ac6b94e2$var$Ya(a, e); 4975 d = $158dda26ac6b94e2$var$Ya(a, d); 4976 f = []; 4977 break; 4978 case "select": 4979 e = $158dda26ac6b94e2$var$A({}, e, { 4980 value: void 0 4981 }); 4982 d = $158dda26ac6b94e2$var$A({}, d, { 4983 value: void 0 4984 }); 4985 f = []; 4986 break; 4987 case "textarea": 4988 e = $158dda26ac6b94e2$var$gb(a, e); 4989 d = $158dda26ac6b94e2$var$gb(a, d); 4990 f = []; 4991 break; 4992 default: 4993 "function" !== typeof e.onClick && "function" === typeof d.onClick && (a.onclick = $158dda26ac6b94e2$var$Bf); 4994 } 4995 $158dda26ac6b94e2$var$ub(c, d); 4996 var g; 4997 c = null; 4998 for(l in e)if (!d.hasOwnProperty(l) && e.hasOwnProperty(l) && null != e[l]) { 4999 if ("style" === l) { 5000 var h = e[l]; 5001 for(g in h)h.hasOwnProperty(g) && (c || (c = {}), c[g] = ""); 5002 } else "dangerouslySetInnerHTML" !== l && "children" !== l && "suppressContentEditableWarning" !== l && "suppressHydrationWarning" !== l && "autoFocus" !== l && ($158dda26ac6b94e2$var$ea.hasOwnProperty(l) ? f || (f = []) : (f = f || []).push(l, null)); 5003 } 5004 for(l in d){ 5005 var k = d[l]; 5006 h = null != e ? e[l] : void 0; 5007 if (d.hasOwnProperty(l) && k !== h && (null != k || null != h)) { 5008 if ("style" === l) { 5009 if (h) { 5010 for(g in h)!h.hasOwnProperty(g) || k && k.hasOwnProperty(g) || (c || (c = {}), c[g] = ""); 5011 for(g in k)k.hasOwnProperty(g) && h[g] !== k[g] && (c || (c = {}), c[g] = k[g]); 5012 } else c || (f || (f = []), f.push(l, c)), c = k; 5013 } else "dangerouslySetInnerHTML" === l ? (k = k ? k.__html : void 0, h = h ? h.__html : void 0, null != k && h !== k && (f = f || []).push(l, k)) : "children" === l ? "string" !== typeof k && "number" !== typeof k || (f = f || []).push(l, "" + k) : "suppressContentEditableWarning" !== l && "suppressHydrationWarning" !== l && ($158dda26ac6b94e2$var$ea.hasOwnProperty(l) ? (null != k && "onScroll" === l && $158dda26ac6b94e2$var$D("scroll", a), f || h === k || (f = [])) : (f = f || []).push(l, k)); 5014 } 5015 } 5016 c && (f = f || []).push("style", c); 5017 var l = f; 5018 if (b.updateQueue = l) b.flags |= 4; 5019 } 5020}; 5021$158dda26ac6b94e2$var$Cj = function(a, b, c, d) { 5022 c !== d && (b.flags |= 4); 5023}; 5024function $158dda26ac6b94e2$var$Dj(a, b) { 5025 if (!$158dda26ac6b94e2$var$I) switch(a.tailMode){ 5026 case "hidden": 5027 b = a.tail; 5028 for(var c = null; null !== b;)null !== b.alternate && (c = b), b = b.sibling; 5029 null === c ? a.tail = null : c.sibling = null; 5030 break; 5031 case "collapsed": 5032 c = a.tail; 5033 for(var d = null; null !== c;)null !== c.alternate && (d = c), c = c.sibling; 5034 null === d ? b || null === a.tail ? a.tail = null : a.tail.sibling = null : d.sibling = null; 5035 } 5036} 5037function $158dda26ac6b94e2$var$S(a) { 5038 var b = null !== a.alternate && a.alternate.child === a.child, c = 0, d = 0; 5039 if (b) for(var e = a.child; null !== e;)c |= e.lanes | e.childLanes, d |= e.subtreeFlags & 14680064, d |= e.flags & 14680064, e.return = a, e = e.sibling; 5040 else for(e = a.child; null !== e;)c |= e.lanes | e.childLanes, d |= e.subtreeFlags, d |= e.flags, e.return = a, e = e.sibling; 5041 a.subtreeFlags |= d; 5042 a.childLanes = c; 5043 return b; 5044} 5045function $158dda26ac6b94e2$var$Ej(a, b, c) { 5046 var d = b.pendingProps; 5047 $158dda26ac6b94e2$var$wg(b); 5048 switch(b.tag){ 5049 case 2: 5050 case 16: 5051 case 15: 5052 case 0: 5053 case 11: 5054 case 7: 5055 case 8: 5056 case 12: 5057 case 9: 5058 case 14: 5059 return $158dda26ac6b94e2$var$S(b), null; 5060 case 1: 5061 return $158dda26ac6b94e2$var$Zf(b.type) && $158dda26ac6b94e2$var$$f(), $158dda26ac6b94e2$var$S(b), null; 5062 case 3: 5063 d = b.stateNode; 5064 $158dda26ac6b94e2$var$zh(); 5065 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$Wf); 5066 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$H); 5067 $158dda26ac6b94e2$var$Eh(); 5068 d.pendingContext && (d.context = d.pendingContext, d.pendingContext = null); 5069 if (null === a || null === a.child) $158dda26ac6b94e2$var$Gg(b) ? b.flags |= 4 : null === a || a.memoizedState.isDehydrated && 0 === (b.flags & 256) || (b.flags |= 1024, null !== $158dda26ac6b94e2$var$zg && ($158dda26ac6b94e2$var$Fj($158dda26ac6b94e2$var$zg), $158dda26ac6b94e2$var$zg = null)); 5070 $158dda26ac6b94e2$var$Aj(a, b); 5071 $158dda26ac6b94e2$var$S(b); 5072 return null; 5073 case 5: 5074 $158dda26ac6b94e2$var$Bh(b); 5075 var e = $158dda26ac6b94e2$var$xh($158dda26ac6b94e2$var$wh.current); 5076 c = b.type; 5077 if (null !== a && null != b.stateNode) $158dda26ac6b94e2$var$Bj(a, b, c, d, e), a.ref !== b.ref && (b.flags |= 512, b.flags |= 2097152); 5078 else { 5079 if (!d) { 5080 if (null === b.stateNode) throw Error($158dda26ac6b94e2$var$p(166)); 5081 $158dda26ac6b94e2$var$S(b); 5082 return null; 5083 } 5084 a = $158dda26ac6b94e2$var$xh($158dda26ac6b94e2$var$uh.current); 5085 if ($158dda26ac6b94e2$var$Gg(b)) { 5086 d = b.stateNode; 5087 c = b.type; 5088 var f = b.memoizedProps; 5089 d[$158dda26ac6b94e2$var$Of] = b; 5090 d[$158dda26ac6b94e2$var$Pf] = f; 5091 a = 0 !== (b.mode & 1); 5092 switch(c){ 5093 case "dialog": 5094 $158dda26ac6b94e2$var$D("cancel", d); 5095 $158dda26ac6b94e2$var$D("close", d); 5096 break; 5097 case "iframe": 5098 case "object": 5099 case "embed": 5100 $158dda26ac6b94e2$var$D("load", d); 5101 break; 5102 case "video": 5103 case "audio": 5104 for(e = 0; e < $158dda26ac6b94e2$var$lf.length; e++)$158dda26ac6b94e2$var$D($158dda26ac6b94e2$var$lf[e], d); 5105 break; 5106 case "source": 5107 $158dda26ac6b94e2$var$D("error", d); 5108 break; 5109 case "img": 5110 case "image": 5111 case "link": 5112 $158dda26ac6b94e2$var$D("error", d); 5113 $158dda26ac6b94e2$var$D("load", d); 5114 break; 5115 case "details": 5116 $158dda26ac6b94e2$var$D("toggle", d); 5117 break; 5118 case "input": 5119 $158dda26ac6b94e2$var$Za(d, f); 5120 $158dda26ac6b94e2$var$D("invalid", d); 5121 break; 5122 case "select": 5123 d._wrapperState = { 5124 wasMultiple: !!f.multiple 5125 }; 5126 $158dda26ac6b94e2$var$D("invalid", d); 5127 break; 5128 case "textarea": 5129 $158dda26ac6b94e2$var$hb(d, f), $158dda26ac6b94e2$var$D("invalid", d); 5130 } 5131 $158dda26ac6b94e2$var$ub(c, f); 5132 e = null; 5133 for(var g in f)if (f.hasOwnProperty(g)) { 5134 var h = f[g]; 5135 "children" === g ? "string" === typeof h ? d.textContent !== h && (!0 !== f.suppressHydrationWarning && $158dda26ac6b94e2$var$Af(d.textContent, h, a), e = [ 5136 "children", 5137 h 5138 ]) : "number" === typeof h && d.textContent !== "" + h && (!0 !== f.suppressHydrationWarning && $158dda26ac6b94e2$var$Af(d.textContent, h, a), e = [ 5139 "children", 5140 "" + h 5141 ]) : $158dda26ac6b94e2$var$ea.hasOwnProperty(g) && null != h && "onScroll" === g && $158dda26ac6b94e2$var$D("scroll", d); 5142 } 5143 switch(c){ 5144 case "input": 5145 $158dda26ac6b94e2$var$Va(d); 5146 $158dda26ac6b94e2$var$db(d, f, !0); 5147 break; 5148 case "textarea": 5149 $158dda26ac6b94e2$var$Va(d); 5150 $158dda26ac6b94e2$var$jb(d); 5151 break; 5152 case "select": 5153 case "option": 5154 break; 5155 default: 5156 "function" === typeof f.onClick && (d.onclick = $158dda26ac6b94e2$var$Bf); 5157 } 5158 d = e; 5159 b.updateQueue = d; 5160 null !== d && (b.flags |= 4); 5161 } else { 5162 g = 9 === e.nodeType ? e : e.ownerDocument; 5163 "http://www.w3.org/1999/xhtml" === a && (a = $158dda26ac6b94e2$var$kb(c)); 5164 "http://www.w3.org/1999/xhtml" === a ? "script" === c ? (a = g.createElement("div"), a.innerHTML = "<script>\x3c/script>", a = a.removeChild(a.firstChild)) : "string" === typeof d.is ? a = g.createElement(c, { 5165 is: d.is 5166 }) : (a = g.createElement(c), "select" === c && (g = a, d.multiple ? g.multiple = !0 : d.size && (g.size = d.size))) : a = g.createElementNS(a, c); 5167 a[$158dda26ac6b94e2$var$Of] = b; 5168 a[$158dda26ac6b94e2$var$Pf] = d; 5169 $158dda26ac6b94e2$var$zj(a, b, !1, !1); 5170 b.stateNode = a; 5171 a: { 5172 g = $158dda26ac6b94e2$var$vb(c, d); 5173 switch(c){ 5174 case "dialog": 5175 $158dda26ac6b94e2$var$D("cancel", a); 5176 $158dda26ac6b94e2$var$D("close", a); 5177 e = d; 5178 break; 5179 case "iframe": 5180 case "object": 5181 case "embed": 5182 $158dda26ac6b94e2$var$D("load", a); 5183 e = d; 5184 break; 5185 case "video": 5186 case "audio": 5187 for(e = 0; e < $158dda26ac6b94e2$var$lf.length; e++)$158dda26ac6b94e2$var$D($158dda26ac6b94e2$var$lf[e], a); 5188 e = d; 5189 break; 5190 case "source": 5191 $158dda26ac6b94e2$var$D("error", a); 5192 e = d; 5193 break; 5194 case "img": 5195 case "image": 5196 case "link": 5197 $158dda26ac6b94e2$var$D("error", a); 5198 $158dda26ac6b94e2$var$D("load", a); 5199 e = d; 5200 break; 5201 case "details": 5202 $158dda26ac6b94e2$var$D("toggle", a); 5203 e = d; 5204 break; 5205 case "input": 5206 $158dda26ac6b94e2$var$Za(a, d); 5207 e = $158dda26ac6b94e2$var$Ya(a, d); 5208 $158dda26ac6b94e2$var$D("invalid", a); 5209 break; 5210 case "option": 5211 e = d; 5212 break; 5213 case "select": 5214 a._wrapperState = { 5215 wasMultiple: !!d.multiple 5216 }; 5217 e = $158dda26ac6b94e2$var$A({}, d, { 5218 value: void 0 5219 }); 5220 $158dda26ac6b94e2$var$D("invalid", a); 5221 break; 5222 case "textarea": 5223 $158dda26ac6b94e2$var$hb(a, d); 5224 e = $158dda26ac6b94e2$var$gb(a, d); 5225 $158dda26ac6b94e2$var$D("invalid", a); 5226 break; 5227 default: 5228 e = d; 5229 } 5230 $158dda26ac6b94e2$var$ub(c, e); 5231 h = e; 5232 for(f in h)if (h.hasOwnProperty(f)) { 5233 var k = h[f]; 5234 "style" === f ? $158dda26ac6b94e2$var$sb(a, k) : "dangerouslySetInnerHTML" === f ? (k = k ? k.__html : void 0, null != k && $158dda26ac6b94e2$var$nb(a, k)) : "children" === f ? "string" === typeof k ? ("textarea" !== c || "" !== k) && $158dda26ac6b94e2$var$ob(a, k) : "number" === typeof k && $158dda26ac6b94e2$var$ob(a, "" + k) : "suppressContentEditableWarning" !== f && "suppressHydrationWarning" !== f && "autoFocus" !== f && ($158dda26ac6b94e2$var$ea.hasOwnProperty(f) ? null != k && "onScroll" === f && $158dda26ac6b94e2$var$D("scroll", a) : null != k && $158dda26ac6b94e2$var$ta(a, f, k, g)); 5235 } 5236 switch(c){ 5237 case "input": 5238 $158dda26ac6b94e2$var$Va(a); 5239 $158dda26ac6b94e2$var$db(a, d, !1); 5240 break; 5241 case "textarea": 5242 $158dda26ac6b94e2$var$Va(a); 5243 $158dda26ac6b94e2$var$jb(a); 5244 break; 5245 case "option": 5246 null != d.value && a.setAttribute("value", "" + $158dda26ac6b94e2$var$Sa(d.value)); 5247 break; 5248 case "select": 5249 a.multiple = !!d.multiple; 5250 f = d.value; 5251 null != f ? $158dda26ac6b94e2$var$fb(a, !!d.multiple, f, !1) : null != d.defaultValue && $158dda26ac6b94e2$var$fb(a, !!d.multiple, d.defaultValue, !0); 5252 break; 5253 default: 5254 "function" === typeof e.onClick && (a.onclick = $158dda26ac6b94e2$var$Bf); 5255 } 5256 switch(c){ 5257 case "button": 5258 case "input": 5259 case "select": 5260 case "textarea": 5261 d = !!d.autoFocus; 5262 break a; 5263 case "img": 5264 d = !0; 5265 break a; 5266 default: 5267 d = !1; 5268 } 5269 } 5270 d && (b.flags |= 4); 5271 } 5272 null !== b.ref && (b.flags |= 512, b.flags |= 2097152); 5273 } 5274 $158dda26ac6b94e2$var$S(b); 5275 return null; 5276 case 6: 5277 if (a && null != b.stateNode) $158dda26ac6b94e2$var$Cj(a, b, a.memoizedProps, d); 5278 else { 5279 if ("string" !== typeof d && null === b.stateNode) throw Error($158dda26ac6b94e2$var$p(166)); 5280 c = $158dda26ac6b94e2$var$xh($158dda26ac6b94e2$var$wh.current); 5281 $158dda26ac6b94e2$var$xh($158dda26ac6b94e2$var$uh.current); 5282 if ($158dda26ac6b94e2$var$Gg(b)) { 5283 d = b.stateNode; 5284 c = b.memoizedProps; 5285 d[$158dda26ac6b94e2$var$Of] = b; 5286 if (f = d.nodeValue !== c) { 5287 if (a = $158dda26ac6b94e2$var$xg, null !== a) switch(a.tag){ 5288 case 3: 5289 $158dda26ac6b94e2$var$Af(d.nodeValue, c, 0 !== (a.mode & 1)); 5290 break; 5291 case 5: 5292 !0 !== a.memoizedProps.suppressHydrationWarning && $158dda26ac6b94e2$var$Af(d.nodeValue, c, 0 !== (a.mode & 1)); 5293 } 5294 } 5295 f && (b.flags |= 4); 5296 } else d = (9 === c.nodeType ? c : c.ownerDocument).createTextNode(d), d[$158dda26ac6b94e2$var$Of] = b, b.stateNode = d; 5297 } 5298 $158dda26ac6b94e2$var$S(b); 5299 return null; 5300 case 13: 5301 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$L); 5302 d = b.memoizedState; 5303 if (null === a || null !== a.memoizedState && null !== a.memoizedState.dehydrated) { 5304 if ($158dda26ac6b94e2$var$I && null !== $158dda26ac6b94e2$var$yg && 0 !== (b.mode & 1) && 0 === (b.flags & 128)) $158dda26ac6b94e2$var$Hg(), $158dda26ac6b94e2$var$Ig(), b.flags |= 98560, f = !1; 5305 else if (f = $158dda26ac6b94e2$var$Gg(b), null !== d && null !== d.dehydrated) { 5306 if (null === a) { 5307 if (!f) throw Error($158dda26ac6b94e2$var$p(318)); 5308 f = b.memoizedState; 5309 f = null !== f ? f.dehydrated : null; 5310 if (!f) throw Error($158dda26ac6b94e2$var$p(317)); 5311 f[$158dda26ac6b94e2$var$Of] = b; 5312 } else $158dda26ac6b94e2$var$Ig(), 0 === (b.flags & 128) && (b.memoizedState = null), b.flags |= 4; 5313 $158dda26ac6b94e2$var$S(b); 5314 f = !1; 5315 } else null !== $158dda26ac6b94e2$var$zg && ($158dda26ac6b94e2$var$Fj($158dda26ac6b94e2$var$zg), $158dda26ac6b94e2$var$zg = null), f = !0; 5316 if (!f) return b.flags & 65536 ? b : null; 5317 } 5318 if (0 !== (b.flags & 128)) return b.lanes = c, b; 5319 d = null !== d; 5320 d !== (null !== a && null !== a.memoizedState) && d && (b.child.flags |= 8192, 0 !== (b.mode & 1) && (null === a || 0 !== ($158dda26ac6b94e2$var$L.current & 1) ? 0 === $158dda26ac6b94e2$var$T && ($158dda26ac6b94e2$var$T = 3) : $158dda26ac6b94e2$var$tj())); 5321 null !== b.updateQueue && (b.flags |= 4); 5322 $158dda26ac6b94e2$var$S(b); 5323 return null; 5324 case 4: 5325 return $158dda26ac6b94e2$var$zh(), $158dda26ac6b94e2$var$Aj(a, b), null === a && $158dda26ac6b94e2$var$sf(b.stateNode.containerInfo), $158dda26ac6b94e2$var$S(b), null; 5326 case 10: 5327 return $158dda26ac6b94e2$var$ah(b.type._context), $158dda26ac6b94e2$var$S(b), null; 5328 case 17: 5329 return $158dda26ac6b94e2$var$Zf(b.type) && $158dda26ac6b94e2$var$$f(), $158dda26ac6b94e2$var$S(b), null; 5330 case 19: 5331 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$L); 5332 f = b.memoizedState; 5333 if (null === f) return $158dda26ac6b94e2$var$S(b), null; 5334 d = 0 !== (b.flags & 128); 5335 g = f.rendering; 5336 if (null === g) { 5337 if (d) $158dda26ac6b94e2$var$Dj(f, !1); 5338 else { 5339 if (0 !== $158dda26ac6b94e2$var$T || null !== a && 0 !== (a.flags & 128)) for(a = b.child; null !== a;){ 5340 g = $158dda26ac6b94e2$var$Ch(a); 5341 if (null !== g) { 5342 b.flags |= 128; 5343 $158dda26ac6b94e2$var$Dj(f, !1); 5344 d = g.updateQueue; 5345 null !== d && (b.updateQueue = d, b.flags |= 4); 5346 b.subtreeFlags = 0; 5347 d = c; 5348 for(c = b.child; null !== c;)f = c, a = d, f.flags &= 14680066, g = f.alternate, null === g ? (f.childLanes = 0, f.lanes = a, f.child = null, f.subtreeFlags = 0, f.memoizedProps = null, f.memoizedState = null, f.updateQueue = null, f.dependencies = null, f.stateNode = null) : (f.childLanes = g.childLanes, f.lanes = g.lanes, f.child = g.child, f.subtreeFlags = 0, f.deletions = null, f.memoizedProps = g.memoizedProps, f.memoizedState = g.memoizedState, f.updateQueue = g.updateQueue, f.type = g.type, a = g.dependencies, f.dependencies = null === a ? null : { 5349 lanes: a.lanes, 5350 firstContext: a.firstContext 5351 }), c = c.sibling; 5352 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, $158dda26ac6b94e2$var$L.current & 1 | 2); 5353 return b.child; 5354 } 5355 a = a.sibling; 5356 } 5357 null !== f.tail && $158dda26ac6b94e2$var$B() > $158dda26ac6b94e2$var$Gj && (b.flags |= 128, d = !0, $158dda26ac6b94e2$var$Dj(f, !1), b.lanes = 4194304); 5358 } 5359 } else { 5360 if (!d) { 5361 if (a = $158dda26ac6b94e2$var$Ch(g), null !== a) { 5362 if (b.flags |= 128, d = !0, c = a.updateQueue, null !== c && (b.updateQueue = c, b.flags |= 4), $158dda26ac6b94e2$var$Dj(f, !0), null === f.tail && "hidden" === f.tailMode && !g.alternate && !$158dda26ac6b94e2$var$I) return $158dda26ac6b94e2$var$S(b), null; 5363 } else 2 * $158dda26ac6b94e2$var$B() - f.renderingStartTime > $158dda26ac6b94e2$var$Gj && 1073741824 !== c && (b.flags |= 128, d = !0, $158dda26ac6b94e2$var$Dj(f, !1), b.lanes = 4194304); 5364 } 5365 f.isBackwards ? (g.sibling = b.child, b.child = g) : (c = f.last, null !== c ? c.sibling = g : b.child = g, f.last = g); 5366 } 5367 if (null !== f.tail) return b = f.tail, f.rendering = b, f.tail = b.sibling, f.renderingStartTime = $158dda26ac6b94e2$var$B(), b.sibling = null, c = $158dda26ac6b94e2$var$L.current, $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$L, d ? c & 1 | 2 : c & 1), b; 5368 $158dda26ac6b94e2$var$S(b); 5369 return null; 5370 case 22: 5371 case 23: 5372 return $158dda26ac6b94e2$var$Hj(), d = null !== b.memoizedState, null !== a && null !== a.memoizedState !== d && (b.flags |= 8192), d && 0 !== (b.mode & 1) ? 0 !== ($158dda26ac6b94e2$var$fj & 1073741824) && ($158dda26ac6b94e2$var$S(b), b.subtreeFlags & 6 && (b.flags |= 8192)) : $158dda26ac6b94e2$var$S(b), null; 5373 case 24: 5374 return null; 5375 case 25: 5376 return null; 5377 } 5378 throw Error($158dda26ac6b94e2$var$p(156, b.tag)); 5379} 5380function $158dda26ac6b94e2$var$Ij(a, b) { 5381 $158dda26ac6b94e2$var$wg(b); 5382 switch(b.tag){ 5383 case 1: 5384 return $158dda26ac6b94e2$var$Zf(b.type) && $158dda26ac6b94e2$var$$f(), a = b.flags, a & 65536 ? (b.flags = a & -65537 | 128, b) : null; 5385 case 3: 5386 return $158dda26ac6b94e2$var$zh(), $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$Wf), $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$H), $158dda26ac6b94e2$var$Eh(), a = b.flags, 0 !== (a & 65536) && 0 === (a & 128) ? (b.flags = a & -65537 | 128, b) : null; 5387 case 5: 5388 return $158dda26ac6b94e2$var$Bh(b), null; 5389 case 13: 5390 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$L); 5391 a = b.memoizedState; 5392 if (null !== a && null !== a.dehydrated) { 5393 if (null === b.alternate) throw Error($158dda26ac6b94e2$var$p(340)); 5394 $158dda26ac6b94e2$var$Ig(); 5395 } 5396 a = b.flags; 5397 return a & 65536 ? (b.flags = a & -65537 | 128, b) : null; 5398 case 19: 5399 return $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$L), null; 5400 case 4: 5401 return $158dda26ac6b94e2$var$zh(), null; 5402 case 10: 5403 return $158dda26ac6b94e2$var$ah(b.type._context), null; 5404 case 22: 5405 case 23: 5406 return $158dda26ac6b94e2$var$Hj(), null; 5407 case 24: 5408 return null; 5409 default: 5410 return null; 5411 } 5412} 5413var $158dda26ac6b94e2$var$Jj = !1, $158dda26ac6b94e2$var$U = !1, $158dda26ac6b94e2$var$Kj = "function" === typeof WeakSet ? WeakSet : Set, $158dda26ac6b94e2$var$V = null; 5414function $158dda26ac6b94e2$var$Lj(a, b) { 5415 var c = a.ref; 5416 if (null !== c) { 5417 if ("function" === typeof c) try { 5418 c(null); 5419 } catch (d) { 5420 $158dda26ac6b94e2$var$W(a, b, d); 5421 } 5422 else c.current = null; 5423 } 5424} 5425function $158dda26ac6b94e2$var$Mj(a, b, c) { 5426 try { 5427 c(); 5428 } catch (d) { 5429 $158dda26ac6b94e2$var$W(a, b, d); 5430 } 5431} 5432var $158dda26ac6b94e2$var$Nj = !1; 5433function $158dda26ac6b94e2$var$Oj(a, b) { 5434 $158dda26ac6b94e2$var$Cf = $158dda26ac6b94e2$var$dd; 5435 a = $158dda26ac6b94e2$var$Me(); 5436 if ($158dda26ac6b94e2$var$Ne(a)) { 5437 if ("selectionStart" in a) var c = { 5438 start: a.selectionStart, 5439 end: a.selectionEnd 5440 }; 5441 else a: { 5442 c = (c = a.ownerDocument) && c.defaultView || window; 5443 var d = c.getSelection && c.getSelection(); 5444 if (d && 0 !== d.rangeCount) { 5445 c = d.anchorNode; 5446 var e = d.anchorOffset, f = d.focusNode; 5447 d = d.focusOffset; 5448 try { 5449 c.nodeType, f.nodeType; 5450 } catch (F) { 5451 c = null; 5452 break a; 5453 } 5454 var g = 0, h = -1, k = -1, l = 0, m = 0, q = a, r = null; 5455 b: for(;;){ 5456 for(var y;;){ 5457 q !== c || 0 !== e && 3 !== q.nodeType || (h = g + e); 5458 q !== f || 0 !== d && 3 !== q.nodeType || (k = g + d); 5459 3 === q.nodeType && (g += q.nodeValue.length); 5460 if (null === (y = q.firstChild)) break; 5461 r = q; 5462 q = y; 5463 } 5464 for(;;){ 5465 if (q === a) break b; 5466 r === c && ++l === e && (h = g); 5467 r === f && ++m === d && (k = g); 5468 if (null !== (y = q.nextSibling)) break; 5469 q = r; 5470 r = q.parentNode; 5471 } 5472 q = y; 5473 } 5474 c = -1 === h || -1 === k ? null : { 5475 start: h, 5476 end: k 5477 }; 5478 } else c = null; 5479 } 5480 c = c || { 5481 start: 0, 5482 end: 0 5483 }; 5484 } else c = null; 5485 $158dda26ac6b94e2$var$Df = { 5486 focusedElem: a, 5487 selectionRange: c 5488 }; 5489 $158dda26ac6b94e2$var$dd = !1; 5490 for($158dda26ac6b94e2$var$V = b; null !== $158dda26ac6b94e2$var$V;)if (b = $158dda26ac6b94e2$var$V, a = b.child, 0 !== (b.subtreeFlags & 1028) && null !== a) a.return = b, $158dda26ac6b94e2$var$V = a; 5491 else for(; null !== $158dda26ac6b94e2$var$V;){ 5492 b = $158dda26ac6b94e2$var$V; 5493 try { 5494 var n = b.alternate; 5495 if (0 !== (b.flags & 1024)) switch(b.tag){ 5496 case 0: 5497 case 11: 5498 case 15: 5499 break; 5500 case 1: 5501 if (null !== n) { 5502 var t = n.memoizedProps, J = n.memoizedState, x = b.stateNode, w = x.getSnapshotBeforeUpdate(b.elementType === b.type ? t : $158dda26ac6b94e2$var$Ci(b.type, t), J); 5503 x.__reactInternalSnapshotBeforeUpdate = w; 5504 } 5505 break; 5506 case 3: 5507 var u = b.stateNode.containerInfo; 5508 1 === u.nodeType ? u.textContent = "" : 9 === u.nodeType && u.documentElement && u.removeChild(u.documentElement); 5509 break; 5510 case 5: 5511 case 6: 5512 case 4: 5513 case 17: 5514 break; 5515 default: 5516 throw Error($158dda26ac6b94e2$var$p(163)); 5517 } 5518 } catch (F) { 5519 $158dda26ac6b94e2$var$W(b, b.return, F); 5520 } 5521 a = b.sibling; 5522 if (null !== a) { 5523 a.return = b.return; 5524 $158dda26ac6b94e2$var$V = a; 5525 break; 5526 } 5527 $158dda26ac6b94e2$var$V = b.return; 5528 } 5529 n = $158dda26ac6b94e2$var$Nj; 5530 $158dda26ac6b94e2$var$Nj = !1; 5531 return n; 5532} 5533function $158dda26ac6b94e2$var$Pj(a, b, c) { 5534 var d = b.updateQueue; 5535 d = null !== d ? d.lastEffect : null; 5536 if (null !== d) { 5537 var e = d = d.next; 5538 do { 5539 if ((e.tag & a) === a) { 5540 var f = e.destroy; 5541 e.destroy = void 0; 5542 void 0 !== f && $158dda26ac6b94e2$var$Mj(b, c, f); 5543 } 5544 e = e.next; 5545 }while (e !== d); 5546 } 5547} 5548function $158dda26ac6b94e2$var$Qj(a, b) { 5549 b = b.updateQueue; 5550 b = null !== b ? b.lastEffect : null; 5551 if (null !== b) { 5552 var c = b = b.next; 5553 do { 5554 if ((c.tag & a) === a) { 5555 var d = c.create; 5556 c.destroy = d(); 5557 } 5558 c = c.next; 5559 }while (c !== b); 5560 } 5561} 5562function $158dda26ac6b94e2$var$Rj(a) { 5563 var b = a.ref; 5564 if (null !== b) { 5565 var c = a.stateNode; 5566 switch(a.tag){ 5567 case 5: 5568 a = c; 5569 break; 5570 default: 5571 a = c; 5572 } 5573 "function" === typeof b ? b(a) : b.current = a; 5574 } 5575} 5576function $158dda26ac6b94e2$var$Sj(a) { 5577 var b = a.alternate; 5578 null !== b && (a.alternate = null, $158dda26ac6b94e2$var$Sj(b)); 5579 a.child = null; 5580 a.deletions = null; 5581 a.sibling = null; 5582 5 === a.tag && (b = a.stateNode, null !== b && (delete b[$158dda26ac6b94e2$var$Of], delete b[$158dda26ac6b94e2$var$Pf], delete b[$158dda26ac6b94e2$var$of], delete b[$158dda26ac6b94e2$var$Qf], delete b[$158dda26ac6b94e2$var$Rf])); 5583 a.stateNode = null; 5584 a.return = null; 5585 a.dependencies = null; 5586 a.memoizedProps = null; 5587 a.memoizedState = null; 5588 a.pendingProps = null; 5589 a.stateNode = null; 5590 a.updateQueue = null; 5591} 5592function $158dda26ac6b94e2$var$Tj(a) { 5593 return 5 === a.tag || 3 === a.tag || 4 === a.tag; 5594} 5595function $158dda26ac6b94e2$var$Uj(a) { 5596 a: for(;;){ 5597 for(; null === a.sibling;){ 5598 if (null === a.return || $158dda26ac6b94e2$var$Tj(a.return)) return null; 5599 a = a.return; 5600 } 5601 a.sibling.return = a.return; 5602 for(a = a.sibling; 5 !== a.tag && 6 !== a.tag && 18 !== a.tag;){ 5603 if (a.flags & 2) continue a; 5604 if (null === a.child || 4 === a.tag) continue a; 5605 else a.child.return = a, a = a.child; 5606 } 5607 if (!(a.flags & 2)) return a.stateNode; 5608 } 5609} 5610function $158dda26ac6b94e2$var$Vj(a, b, c) { 5611 var d = a.tag; 5612 if (5 === d || 6 === d) a = a.stateNode, b ? 8 === c.nodeType ? c.parentNode.insertBefore(a, b) : c.insertBefore(a, b) : (8 === c.nodeType ? (b = c.parentNode, b.insertBefore(a, c)) : (b = c, b.appendChild(a)), c = c._reactRootContainer, null !== c && void 0 !== c || null !== b.onclick || (b.onclick = $158dda26ac6b94e2$var$Bf)); 5613 else if (4 !== d && (a = a.child, null !== a)) for($158dda26ac6b94e2$var$Vj(a, b, c), a = a.sibling; null !== a;)$158dda26ac6b94e2$var$Vj(a, b, c), a = a.sibling; 5614} 5615function $158dda26ac6b94e2$var$Wj(a, b, c) { 5616 var d = a.tag; 5617 if (5 === d || 6 === d) a = a.stateNode, b ? c.insertBefore(a, b) : c.appendChild(a); 5618 else if (4 !== d && (a = a.child, null !== a)) for($158dda26ac6b94e2$var$Wj(a, b, c), a = a.sibling; null !== a;)$158dda26ac6b94e2$var$Wj(a, b, c), a = a.sibling; 5619} 5620var $158dda26ac6b94e2$var$X = null, $158dda26ac6b94e2$var$Xj = !1; 5621function $158dda26ac6b94e2$var$Yj(a, b, c) { 5622 for(c = c.child; null !== c;)$158dda26ac6b94e2$var$Zj(a, b, c), c = c.sibling; 5623} 5624function $158dda26ac6b94e2$var$Zj(a, b, c) { 5625 if ($158dda26ac6b94e2$var$lc && "function" === typeof $158dda26ac6b94e2$var$lc.onCommitFiberUnmount) try { 5626 $158dda26ac6b94e2$var$lc.onCommitFiberUnmount($158dda26ac6b94e2$var$kc, c); 5627 } catch (h) {} 5628 switch(c.tag){ 5629 case 5: 5630 $158dda26ac6b94e2$var$U || $158dda26ac6b94e2$var$Lj(c, b); 5631 case 6: 5632 var d = $158dda26ac6b94e2$var$X, e = $158dda26ac6b94e2$var$Xj; 5633 $158dda26ac6b94e2$var$X = null; 5634 $158dda26ac6b94e2$var$Yj(a, b, c); 5635 $158dda26ac6b94e2$var$X = d; 5636 $158dda26ac6b94e2$var$Xj = e; 5637 null !== $158dda26ac6b94e2$var$X && ($158dda26ac6b94e2$var$Xj ? (a = $158dda26ac6b94e2$var$X, c = c.stateNode, 8 === a.nodeType ? a.parentNode.removeChild(c) : a.removeChild(c)) : $158dda26ac6b94e2$var$X.removeChild(c.stateNode)); 5638 break; 5639 case 18: 5640 null !== $158dda26ac6b94e2$var$X && ($158dda26ac6b94e2$var$Xj ? (a = $158dda26ac6b94e2$var$X, c = c.stateNode, 8 === a.nodeType ? $158dda26ac6b94e2$var$Kf(a.parentNode, c) : 1 === a.nodeType && $158dda26ac6b94e2$var$Kf(a, c), $158dda26ac6b94e2$var$bd(a)) : $158dda26ac6b94e2$var$Kf($
vendor: 11,272 bytes, lines 5640-5888
5640158dda26ac6b94e2$var$X, c.stateNode)); 5641 break; 5642 case 4: 5643 d = $158dda26ac6b94e2$var$X; 5644 e = $158dda26ac6b94e2$var$Xj; 5645 $158dda26ac6b94e2$var$X = c.stateNode.containerInfo; 5646 $158dda26ac6b94e2$var$Xj = !0; 5647 $158dda26ac6b94e2$var$Yj(a, b, c); 5648 $158dda26ac6b94e2$var$X = d; 5649 $158dda26ac6b94e2$var$Xj = e; 5650 break; 5651 case 0: 5652 case 11: 5653 case 14: 5654 case 15: 5655 if (!$158dda26ac6b94e2$var$U && (d = c.updateQueue, null !== d && (d = d.lastEffect, null !== d))) { 5656 e = d = d.next; 5657 do { 5658 var f = e, g = f.destroy; 5659 f = f.tag; 5660 void 0 !== g && (0 !== (f & 2) ? $158dda26ac6b94e2$var$Mj(c, b, g) : 0 !== (f & 4) && $158dda26ac6b94e2$var$Mj(c, b, g)); 5661 e = e.next; 5662 }while (e !== d); 5663 } 5664 $158dda26ac6b94e2$var$Yj(a, b, c); 5665 break; 5666 case 1: 5667 if (!$158dda26ac6b94e2$var$U && ($158dda26ac6b94e2$var$Lj(c, b), d = c.stateNode, "function" === typeof d.componentWillUnmount)) try { 5668 d.props = c.memoizedProps, d.state = c.memoizedState, d.componentWillUnmount(); 5669 } catch (h) { 5670 $158dda26ac6b94e2$var$W(c, b, h); 5671 } 5672 $158dda26ac6b94e2$var$Yj(a, b, c); 5673 break; 5674 case 21: 5675 $158dda26ac6b94e2$var$Yj(a, b, c); 5676 break; 5677 case 22: 5678 c.mode & 1 ? ($158dda26ac6b94e2$var$U = (d = $158dda26ac6b94e2$var$U) || null !== c.memoizedState, $158dda26ac6b94e2$var$Yj(a, b, c), $158dda26ac6b94e2$var$U = d) : $158dda26ac6b94e2$var$Yj(a, b, c); 5679 break; 5680 default: 5681 $158dda26ac6b94e2$var$Yj(a, b, c); 5682 } 5683} 5684function $158dda26ac6b94e2$var$ak(a) { 5685 var b = a.updateQueue; 5686 if (null !== b) { 5687 a.updateQueue = null; 5688 var c = a.stateNode; 5689 null === c && (c = a.stateNode = new $158dda26ac6b94e2$var$Kj); 5690 b.forEach(function(b) { 5691 var d = $158dda26ac6b94e2$var$bk.bind(null, a, b); 5692 c.has(b) || (c.add(b), b.then(d, d)); 5693 }); 5694 } 5695} 5696function $158dda26ac6b94e2$var$ck(a, b) { 5697 var c = b.deletions; 5698 if (null !== c) for(var d = 0; d < c.length; d++){ 5699 var e = c[d]; 5700 try { 5701 var f = a, g = b, h = g; 5702 a: for(; null !== h;){ 5703 switch(h.tag){ 5704 case 5: 5705 $158dda26ac6b94e2$var$X = h.stateNode; 5706 $158dda26ac6b94e2$var$Xj = !1; 5707 break a; 5708 case 3: 5709 $158dda26ac6b94e2$var$X = h.stateNode.containerInfo; 5710 $158dda26ac6b94e2$var$Xj = !0; 5711 break a; 5712 case 4: 5713 $158dda26ac6b94e2$var$X = h.stateNode.containerInfo; 5714 $158dda26ac6b94e2$var$Xj = !0; 5715 break a; 5716 } 5717 h = h.return; 5718 } 5719 if (null === $158dda26ac6b94e2$var$X) throw Error($158dda26ac6b94e2$var$p(160)); 5720 $158dda26ac6b94e2$var$Zj(f, g, e); 5721 $158dda26ac6b94e2$var$X = null; 5722 $158dda26ac6b94e2$var$Xj = !1; 5723 var k = e.alternate; 5724 null !== k && (k.return = null); 5725 e.return = null; 5726 } catch (l) { 5727 $158dda26ac6b94e2$var$W(e, b, l); 5728 } 5729 } 5730 if (b.subtreeFlags & 12854) for(b = b.child; null !== b;)$158dda26ac6b94e2$var$dk(b, a), b = b.sibling; 5731} 5732function $158dda26ac6b94e2$var$dk(a, b) { 5733 var c = a.alternate, d = a.flags; 5734 switch(a.tag){ 5735 case 0: 5736 case 11: 5737 case 14: 5738 case 15: 5739 $158dda26ac6b94e2$var$ck(b, a); 5740 $158dda26ac6b94e2$var$ek(a); 5741 if (d & 4) { 5742 try { 5743 $158dda26ac6b94e2$var$Pj(3, a, a.return), $158dda26ac6b94e2$var$Qj(3, a); 5744 } catch (t) { 5745 $158dda26ac6b94e2$var$W(a, a.return, t); 5746 } 5747 try { 5748 $158dda26ac6b94e2$var$Pj(5, a, a.return); 5749 } catch (t) { 5750 $158dda26ac6b94e2$var$W(a, a.return, t); 5751 } 5752 } 5753 break; 5754 case 1: 5755 $158dda26ac6b94e2$var$ck(b, a); 5756 $158dda26ac6b94e2$var$ek(a); 5757 d & 512 && null !== c && $158dda26ac6b94e2$var$Lj(c, c.return); 5758 break; 5759 case 5: 5760 $158dda26ac6b94e2$var$ck(b, a); 5761 $158dda26ac6b94e2$var$ek(a); 5762 d & 512 && null !== c && $158dda26ac6b94e2$var$Lj(c, c.return); 5763 if (a.flags & 32) { 5764 var e = a.stateNode; 5765 try { 5766 $158dda26ac6b94e2$var$ob(e, ""); 5767 } catch (t) { 5768 $158dda26ac6b94e2$var$W(a, a.return, t); 5769 } 5770 } 5771 if (d & 4 && (e = a.stateNode, null != e)) { 5772 var f = a.memoizedProps, g = null !== c ? c.memoizedProps : f, h = a.type, k = a.updateQueue; 5773 a.updateQueue = null; 5774 if (null !== k) try { 5775 "input" === h && "radio" === f.type && null != f.name && $158dda26ac6b94e2$var$ab(e, f); 5776 $158dda26ac6b94e2$var$vb(h, g); 5777 var l = $158dda26ac6b94e2$var$vb(h, f); 5778 for(g = 0; g < k.length; g += 2){ 5779 var m = k[g], q = k[g + 1]; 5780 "style" === m ? $158dda26ac6b94e2$var$sb(e, q) : "dangerouslySetInnerHTML" === m ? $158dda26ac6b94e2$var$nb(e, q) : "children" === m ? $158dda26ac6b94e2$var$ob(e, q) : $158dda26ac6b94e2$var$ta(e, m, q, l); 5781 } 5782 switch(h){ 5783 case "input": 5784 $158dda26ac6b94e2$var$bb(e, f); 5785 break; 5786 case "textarea": 5787 $158dda26ac6b94e2$var$ib(e, f); 5788 break; 5789 case "select": 5790 var r = e._wrapperState.wasMultiple; 5791 e._wrapperState.wasMultiple = !!f.multiple; 5792 var y = f.value; 5793 null != y ? $158dda26ac6b94e2$var$fb(e, !!f.multiple, y, !1) : r !== !!f.multiple && (null != f.defaultValue ? $158dda26ac6b94e2$var$fb(e, !!f.multiple, f.defaultValue, !0) : $158dda26ac6b94e2$var$fb(e, !!f.multiple, f.multiple ? [] : "", !1)); 5794 } 5795 e[$158dda26ac6b94e2$var$Pf] = f; 5796 } catch (t) { 5797 $158dda26ac6b94e2$var$W(a, a.return, t); 5798 } 5799 } 5800 break; 5801 case 6: 5802 $158dda26ac6b94e2$var$ck(b, a); 5803 $158dda26ac6b94e2$var$ek(a); 5804 if (d & 4) { 5805 if (null === a.stateNode) throw Error($158dda26ac6b94e2$var$p(162)); 5806 e = a.stateNode; 5807 f = a.memoizedProps; 5808 try { 5809 e.nodeValue = f; 5810 } catch (t) { 5811 $158dda26ac6b94e2$var$W(a, a.return, t); 5812 } 5813 } 5814 break; 5815 case 3: 5816 $158dda26ac6b94e2$var$ck(b, a); 5817 $158dda26ac6b94e2$var$ek(a); 5818 if (d & 4 && null !== c && c.memoizedState.isDehydrated) try { 5819 $158dda26ac6b94e2$var$bd(b.containerInfo); 5820 } catch (t) { 5821 $158dda26ac6b94e2$var$W(a, a.return, t); 5822 } 5823 break; 5824 case 4: 5825 $158dda26ac6b94e2$var$ck(b, a); 5826 $158dda26ac6b94e2$var$ek(a); 5827 break; 5828 case 13: 5829 $158dda26ac6b94e2$var$ck(b, a); 5830 $158dda26ac6b94e2$var$ek(a); 5831 e = a.child; 5832 e.flags & 8192 && (f = null !== e.memoizedState, e.stateNode.isHidden = f, !f || null !== e.alternate && null !== e.alternate.memoizedState || ($158dda26ac6b94e2$var$fk = $158dda26ac6b94e2$var$B())); 5833 d & 4 && $158dda26ac6b94e2$var$ak(a); 5834 break; 5835 case 22: 5836 m = null !== c && null !== c.memoizedState; 5837 a.mode & 1 ? ($158dda26ac6b94e2$var$U = (l = $158dda26ac6b94e2$var$U) || m, $158dda26ac6b94e2$var$ck(b, a), $158dda26ac6b94e2$var$U = l) : $158dda26ac6b94e2$var$ck(b, a); 5838 $158dda26ac6b94e2$var$ek(a); 5839 if (d & 8192) { 5840 l = null !== a.memoizedState; 5841 if ((a.stateNode.isHidden = l) && !m && 0 !== (a.mode & 1)) for($158dda26ac6b94e2$var$V = a, m = a.child; null !== m;){ 5842 for(q = $158dda26ac6b94e2$var$V = m; null !== $158dda26ac6b94e2$var$V;){ 5843 r = $158dda26ac6b94e2$var$V; 5844 y = r.child; 5845 switch(r.tag){ 5846 case 0: 5847 case 11: 5848 case 14: 5849 case 15: 5850 $158dda26ac6b94e2$var$Pj(4, r, r.return); 5851 break; 5852 case 1: 5853 $158dda26ac6b94e2$var$Lj(r, r.return); 5854 var n = r.stateNode; 5855 if ("function" === typeof n.componentWillUnmount) { 5856 d = r; 5857 c = r.return; 5858 try { 5859 b = d, n.props = b.memoizedProps, n.state = b.memoizedState, n.componentWillUnmount(); 5860 } catch (t) { 5861 $158dda26ac6b94e2$var$W(d, c, t); 5862 } 5863 } 5864 break; 5865 case 5: 5866 $158dda26ac6b94e2$var$Lj(r, r.return); 5867 break; 5868 case 22: 5869 if (null !== r.memoizedState) { 5870 $158dda26ac6b94e2$var$gk(q); 5871 continue; 5872 } 5873 } 5874 null !== y ? (y.return = r, $158dda26ac6b94e2$var$V = y) : $158dda26ac6b94e2$var$gk(q); 5875 } 5876 m = m.sibling; 5877 } 5878 a: for(m = null, q = a;;){ 5879 if (5 === q.tag) { 5880 if (null === m) { 5881 m = q; 5882 try { 5883 e = q.stateNode, l ? (f = e.style, "function" === typeof f.setProperty ? f.setProperty("display", "none", "important") : f.display = "none") : (h = q.stateNode, k = q.memoizedProps.style, g = void 0 !== k && null !== k && k.hasOwnProperty("display") ? k.display : null, h.style.display = $158dda26ac6b94e2$var$rb("display", g)); 5884 } catch (t) { 5885 $158dda26ac6b94e2$var$W(a, a.return, t); 5886 } 5887 } 5888 }
vendor: 68,579 bytes, lines 5888-7424
5888 else if (6 === q.tag) { 5889 if (null === m) try { 5890 q.stateNode.nodeValue = l ? "" : q.memoizedProps; 5891 } catch (t) { 5892 $158dda26ac6b94e2$var$W(a, a.return, t); 5893 } 5894 } else if ((22 !== q.tag && 23 !== q.tag || null === q.memoizedState || q === a) && null !== q.child) { 5895 q.child.return = q; 5896 q = q.child; 5897 continue; 5898 } 5899 if (q === a) break a; 5900 for(; null === q.sibling;){ 5901 if (null === q.return || q.return === a) break a; 5902 m === q && (m = null); 5903 q = q.return; 5904 } 5905 m === q && (m = null); 5906 q.sibling.return = q.return; 5907 q = q.sibling; 5908 } 5909 } 5910 break; 5911 case 19: 5912 $158dda26ac6b94e2$var$ck(b, a); 5913 $158dda26ac6b94e2$var$ek(a); 5914 d & 4 && $158dda26ac6b94e2$var$ak(a); 5915 break; 5916 case 21: 5917 break; 5918 default: 5919 $158dda26ac6b94e2$var$ck(b, a), $158dda26ac6b94e2$var$ek(a); 5920 } 5921} 5922function $158dda26ac6b94e2$var$ek(a) { 5923 var b = a.flags; 5924 if (b & 2) { 5925 try { 5926 a: { 5927 for(var c = a.return; null !== c;){ 5928 if ($158dda26ac6b94e2$var$Tj(c)) { 5929 var d = c; 5930 break a; 5931 } 5932 c = c.return; 5933 } 5934 throw Error($158dda26ac6b94e2$var$p(160)); 5935 } 5936 switch(d.tag){ 5937 case 5: 5938 var e = d.stateNode; 5939 d.flags & 32 && ($158dda26ac6b94e2$var$ob(e, ""), d.flags &= -33); 5940 var f = $158dda26ac6b94e2$var$Uj(a); 5941 $158dda26ac6b94e2$var$Wj(a, f, e); 5942 break; 5943 case 3: 5944 case 4: 5945 var g = d.stateNode.containerInfo, h = $158dda26ac6b94e2$var$Uj(a); 5946 $158dda26ac6b94e2$var$Vj(a, h, g); 5947 break; 5948 default: 5949 throw Error($158dda26ac6b94e2$var$p(161)); 5950 } 5951 } catch (k) { 5952 $158dda26ac6b94e2$var$W(a, a.return, k); 5953 } 5954 a.flags &= -3; 5955 } 5956 b & 4096 && (a.flags &= -4097); 5957} 5958function $158dda26ac6b94e2$var$hk(a, b, c) { 5959 $158dda26ac6b94e2$var$V = a; 5960 $158dda26ac6b94e2$var$ik(a, b, c); 5961} 5962function $158dda26ac6b94e2$var$ik(a, b, c) { 5963 for(var d = 0 !== (a.mode & 1); null !== $158dda26ac6b94e2$var$V;){ 5964 var e = $158dda26ac6b94e2$var$V, f = e.child; 5965 if (22 === e.tag && d) { 5966 var g = null !== e.memoizedState || $158dda26ac6b94e2$var$Jj; 5967 if (!g) { 5968 var h = e.alternate, k = null !== h && null !== h.memoizedState || $158dda26ac6b94e2$var$U; 5969 h = $158dda26ac6b94e2$var$Jj; 5970 var l = $158dda26ac6b94e2$var$U; 5971 $158dda26ac6b94e2$var$Jj = g; 5972 if (($158dda26ac6b94e2$var$U = k) && !l) for($158dda26ac6b94e2$var$V = e; null !== $158dda26ac6b94e2$var$V;)g = $158dda26ac6b94e2$var$V, k = g.child, 22 === g.tag && null !== g.memoizedState ? $158dda26ac6b94e2$var$jk(e) : null !== k ? (k.return = g, $158dda26ac6b94e2$var$V = k) : $158dda26ac6b94e2$var$jk(e); 5973 for(; null !== f;)$158dda26ac6b94e2$var$V = f, $158dda26ac6b94e2$var$ik(f, b, c), f = f.sibling; 5974 $158dda26ac6b94e2$var$V = e; 5975 $158dda26ac6b94e2$var$Jj = h; 5976 $158dda26ac6b94e2$var$U = l; 5977 } 5978 $158dda26ac6b94e2$var$kk(a, b, c); 5979 } else 0 !== (e.subtreeFlags & 8772) && null !== f ? (f.return = e, $158dda26ac6b94e2$var$V = f) : $158dda26ac6b94e2$var$kk(a, b, c); 5980 } 5981} 5982function $158dda26ac6b94e2$var$kk(a) { 5983 for(; null !== $158dda26ac6b94e2$var$V;){ 5984 var b = $158dda26ac6b94e2$var$V; 5985 if (0 !== (b.flags & 8772)) { 5986 var c = b.alternate; 5987 try { 5988 if (0 !== (b.flags & 8772)) switch(b.tag){ 5989 case 0: 5990 case 11: 5991 case 15: 5992 $158dda26ac6b94e2$var$U || $158dda26ac6b94e2$var$Qj(5, b); 5993 break; 5994 case 1: 5995 var d = b.stateNode; 5996 if (b.flags & 4 && !$158dda26ac6b94e2$var$U) { 5997 if (null === c) d.componentDidMount(); 5998 else { 5999 var e = b.elementType === b.type ? c.memoizedProps : $158dda26ac6b94e2$var$Ci(b.type, c.memoizedProps); 6000 d.componentDidUpdate(e, c.memoizedState, d.__reactInternalSnapshotBeforeUpdate); 6001 } 6002 } 6003 var f = b.updateQueue; 6004 null !== f && $158dda26ac6b94e2$var$sh(b, f, d); 6005 break; 6006 case 3: 6007 var g = b.updateQueue; 6008 if (null !== g) { 6009 c = null; 6010 if (null !== b.child) switch(b.child.tag){ 6011 case 5: 6012 c = b.child.stateNode; 6013 break; 6014 case 1: 6015 c = b.child.stateNode; 6016 } 6017 $158dda26ac6b94e2$var$sh(b, g, c); 6018 } 6019 break; 6020 case 5: 6021 var h = b.stateNode; 6022 if (null === c && b.flags & 4) { 6023 c = h; 6024 var k = b.memoizedProps; 6025 switch(b.type){ 6026 case "button": 6027 case "input": 6028 case "select": 6029 case "textarea": 6030 k.autoFocus && c.focus(); 6031 break; 6032 case "img": 6033 k.src && (c.src = k.src); 6034 } 6035 } 6036 break; 6037 case 6: 6038 break; 6039 case 4: 6040 break; 6041 case 12: 6042 break; 6043 case 13: 6044 if (null === b.memoizedState) { 6045 var l = b.alternate; 6046 if (null !== l) { 6047 var m = l.memoizedState; 6048 if (null !== m) { 6049 var q = m.dehydrated; 6050 null !== q && $158dda26ac6b94e2$var$bd(q); 6051 } 6052 } 6053 } 6054 break; 6055 case 19: 6056 case 17: 6057 case 21: 6058 case 22: 6059 case 23: 6060 case 25: 6061 break; 6062 default: 6063 throw Error($158dda26ac6b94e2$var$p(163)); 6064 } 6065 $158dda26ac6b94e2$var$U || b.flags & 512 && $158dda26ac6b94e2$var$Rj(b); 6066 } catch (r) { 6067 $158dda26ac6b94e2$var$W(b, b.return, r); 6068 } 6069 } 6070 if (b === a) { 6071 $158dda26ac6b94e2$var$V = null; 6072 break; 6073 } 6074 c = b.sibling; 6075 if (null !== c) { 6076 c.return = b.return; 6077 $158dda26ac6b94e2$var$V = c; 6078 break; 6079 } 6080 $158dda26ac6b94e2$var$V = b.return; 6081 } 6082} 6083function $158dda26ac6b94e2$var$gk(a) { 6084 for(; null !== $158dda26ac6b94e2$var$V;){ 6085 var b = $158dda26ac6b94e2$var$V; 6086 if (b === a) { 6087 $158dda26ac6b94e2$var$V = null; 6088 break; 6089 } 6090 var c = b.sibling; 6091 if (null !== c) { 6092 c.return = b.return; 6093 $158dda26ac6b94e2$var$V = c; 6094 break; 6095 } 6096 $158dda26ac6b94e2$var$V = b.return; 6097 } 6098} 6099function $158dda26ac6b94e2$var$jk(a) { 6100 for(; null !== $158dda26ac6b94e2$var$V;){ 6101 var b = $158dda26ac6b94e2$var$V; 6102 try { 6103 switch(b.tag){ 6104 case 0: 6105 case 11: 6106 case 15: 6107 var c = b.return; 6108 try { 6109 $158dda26ac6b94e2$var$Qj(4, b); 6110 } catch (k) { 6111 $158dda26ac6b94e2$var$W(b, c, k); 6112 } 6113 break; 6114 case 1: 6115 var d = b.stateNode; 6116 if ("function" === typeof d.componentDidMount) { 6117 var e = b.return; 6118 try { 6119 d.componentDidMount(); 6120 } catch (k) { 6121 $158dda26ac6b94e2$var$W(b, e, k); 6122 } 6123 } 6124 var f = b.return; 6125 try { 6126 $158dda26ac6b94e2$var$Rj(b); 6127 } catch (k) { 6128 $158dda26ac6b94e2$var$W(b, f, k); 6129 } 6130 break; 6131 case 5: 6132 var g = b.return; 6133 try { 6134 $158dda26ac6b94e2$var$Rj(b); 6135 } catch (k) { 6136 $158dda26ac6b94e2$var$W(b, g, k); 6137 } 6138 } 6139 } catch (k) { 6140 $158dda26ac6b94e2$var$W(b, b.return, k); 6141 } 6142 if (b === a) { 6143 $158dda26ac6b94e2$var$V = null; 6144 break; 6145 } 6146 var h = b.sibling; 6147 if (null !== h) { 6148 h.return = b.return; 6149 $158dda26ac6b94e2$var$V = h; 6150 break; 6151 } 6152 $158dda26ac6b94e2$var$V = b.return; 6153 } 6154} 6155var $158dda26ac6b94e2$var$lk = Math.ceil, $158dda26ac6b94e2$var$mk = $158dda26ac6b94e2$var$ua.ReactCurrentDispatcher, $158dda26ac6b94e2$var$nk = $158dda26ac6b94e2$var$ua.ReactCurrentOwner, $158dda26ac6b94e2$var$ok = $158dda26ac6b94e2$var$ua.ReactCurrentBatchConfig, $158dda26ac6b94e2$var$K = 0, $158dda26ac6b94e2$var$Q = null, $158dda26ac6b94e2$var$Y = null, $158dda26ac6b94e2$var$Z = 0, $158dda26ac6b94e2$var$fj = 0, $158dda26ac6b94e2$var$ej = $158dda26ac6b94e2$var$Uf(0), $158dda26ac6b94e2$var$T = 0, $158dda26ac6b94e2$var$pk = null, $158dda26ac6b94e2$var$rh = 0, $158dda26ac6b94e2$var$qk = 0, $158dda26ac6b94e2$var$rk = 0, $158dda26ac6b94e2$var$sk = null, $158dda26ac6b94e2$var$tk = null, $158dda26ac6b94e2$var$fk = 0, $158dda26ac6b94e2$var$Gj = Infinity, $158dda26ac6b94e2$var$uk = null, $158dda26ac6b94e2$var$Oi = !1, $158dda26ac6b94e2$var$Pi = null, $158dda26ac6b94e2$var$Ri = null, $158dda26ac6b94e2$var$vk = !1, $158dda26ac6b94e2$var$wk = null, $158dda26ac6b94e2$var$xk = 0, $158dda26ac6b94e2$var$yk = 0, $158dda26ac6b94e2$var$zk = null, $158dda26ac6b94e2$var$Ak = -1, $158dda26ac6b94e2$var$Bk = 0; 6156function $158dda26ac6b94e2$var$R() { 6157 return 0 !== ($158dda26ac6b94e2$var$K & 6) ? $158dda26ac6b94e2$var$B() : -1 !== $158dda26ac6b94e2$var$Ak ? $158dda26ac6b94e2$var$Ak : $158dda26ac6b94e2$var$Ak = $158dda26ac6b94e2$var$B(); 6158} 6159function $158dda26ac6b94e2$var$yi(a) { 6160 if (0 === (a.mode & 1)) return 1; 6161 if (0 !== ($158dda26ac6b94e2$var$K & 2) && 0 !== $158dda26ac6b94e2$var$Z) return $158dda26ac6b94e2$var$Z & -$158dda26ac6b94e2$var$Z; 6162 if (null !== $158dda26ac6b94e2$var$Kg.transition) return 0 === $158dda26ac6b94e2$var$Bk && ($158dda26ac6b94e2$var$Bk = $158dda26ac6b94e2$var$yc()), $158dda26ac6b94e2$var$Bk; 6163 a = $158dda26ac6b94e2$var$C; 6164 if (0 !== a) return a; 6165 a = window.event; 6166 a = void 0 === a ? 16 : $158dda26ac6b94e2$var$jd(a.type); 6167 return a; 6168} 6169function $158dda26ac6b94e2$var$gi(a, b, c, d) { 6170 if (50 < $158dda26ac6b94e2$var$yk) throw $158dda26ac6b94e2$var$yk = 0, $158dda26ac6b94e2$var$zk = null, Error($158dda26ac6b94e2$var$p(185)); 6171 $158dda26ac6b94e2$var$Ac(a, c, d); 6172 if (0 === ($158dda26ac6b94e2$var$K & 2) || a !== $158dda26ac6b94e2$var$Q) a === $158dda26ac6b94e2$var$Q && (0 === ($158dda26ac6b94e2$var$K & 2) && ($158dda26ac6b94e2$var$qk |= c), 4 === $158dda26ac6b94e2$var$T && $158dda26ac6b94e2$var$Ck(a, $158dda26ac6b94e2$var$Z)), $158dda26ac6b94e2$var$Dk(a, d), 1 === c && 0 === $158dda26ac6b94e2$var$K && 0 === (b.mode & 1) && ($158dda26ac6b94e2$var$Gj = $158dda26ac6b94e2$var$B() + 500, $158dda26ac6b94e2$var$fg && $158dda26ac6b94e2$var$jg()); 6173} 6174function $158dda26ac6b94e2$var$Dk(a, b) { 6175 var c = a.callbackNode; 6176 $158dda26ac6b94e2$var$wc(a, b); 6177 var d = $158dda26ac6b94e2$var$uc(a, a === $158dda26ac6b94e2$var$Q ? $158dda26ac6b94e2$var$Z : 0); 6178 if (0 === d) null !== c && $158dda26ac6b94e2$var$bc(c), a.callbackNode = null, a.callbackPriority = 0; 6179 else if (b = d & -d, a.callbackPriority !== b) { 6180 null != c && $158dda26ac6b94e2$var$bc(c); 6181 if (1 === b) 0 === a.tag ? $158dda26ac6b94e2$var$ig($158dda26ac6b94e2$var$Ek.bind(null, a)) : $158dda26ac6b94e2$var$hg($158dda26ac6b94e2$var$Ek.bind(null, a)), $158dda26ac6b94e2$var$Jf(function() { 6182 0 === ($158dda26ac6b94e2$var$K & 6) && $158dda26ac6b94e2$var$jg(); 6183 }), c = null; 6184 else { 6185 switch($158dda26ac6b94e2$var$Dc(d)){ 6186 case 1: 6187 c = $158dda26ac6b94e2$var$fc; 6188 break; 6189 case 4: 6190 c = $158dda26ac6b94e2$var$gc; 6191 break; 6192 case 16: 6193 c = $158dda26ac6b94e2$var$hc; 6194 break; 6195 case 536870912: 6196 c = $158dda26ac6b94e2$var$jc; 6197 break; 6198 default: 6199 c = $158dda26ac6b94e2$var$hc; 6200 } 6201 c = $158dda26ac6b94e2$var$Fk(c, $158dda26ac6b94e2$var$Gk.bind(null, a)); 6202 } 6203 a.callbackPriority = b; 6204 a.callbackNode = c; 6205 } 6206} 6207function $158dda26ac6b94e2$var$Gk(a, b) { 6208 $158dda26ac6b94e2$var$Ak = -1; 6209 $158dda26ac6b94e2$var$Bk = 0; 6210 if (0 !== ($158dda26ac6b94e2$var$K & 6)) throw Error($158dda26ac6b94e2$var$p(327)); 6211 var c = a.callbackNode; 6212 if ($158dda26ac6b94e2$var$Hk() && a.callbackNode !== c) return null; 6213 var d = $158dda26ac6b94e2$var$uc(a, a === $158dda26ac6b94e2$var$Q ? $158dda26ac6b94e2$var$Z : 0); 6214 if (0 === d) return null; 6215 if (0 !== (d & 30) || 0 !== (d & a.expiredLanes) || b) b = $158dda26ac6b94e2$var$Ik(a, d); 6216 else { 6217 b = d; 6218 var e = $158dda26ac6b94e2$var$K; 6219 $158dda26ac6b94e2$var$K |= 2; 6220 var f = $158dda26ac6b94e2$var$Jk(); 6221 if ($158dda26ac6b94e2$var$Q !== a || $158dda26ac6b94e2$var$Z !== b) $158dda26ac6b94e2$var$uk = null, $158dda26ac6b94e2$var$Gj = $158dda26ac6b94e2$var$B() + 500, $158dda26ac6b94e2$var$Kk(a, b); 6222 for(;;)try { 6223 $158dda26ac6b94e2$var$Lk(); 6224 break; 6225 } catch (h) { 6226 $158dda26ac6b94e2$var$Mk(a, h); 6227 } 6228 $158dda26ac6b94e2$var$$g(); 6229 $158dda26ac6b94e2$var$mk.current = f; 6230 $158dda26ac6b94e2$var$K = e; 6231 null !== $158dda26ac6b94e2$var$Y ? b = 0 : ($158dda26ac6b94e2$var$Q = null, $158dda26ac6b94e2$var$Z = 0, b = $158dda26ac6b94e2$var$T); 6232 } 6233 if (0 !== b) { 6234 2 === b && (e = $158dda26ac6b94e2$var$xc(a), 0 !== e && (d = e, b = $158dda26ac6b94e2$var$Nk(a, e))); 6235 if (1 === b) throw c = $158dda26ac6b94e2$var$pk, $158dda26ac6b94e2$var$Kk(a, 0), $158dda26ac6b94e2$var$Ck(a, d), $158dda26ac6b94e2$var$Dk(a, $158dda26ac6b94e2$var$B()), c; 6236 if (6 === b) $158dda26ac6b94e2$var$Ck(a, d); 6237 else { 6238 e = a.current.alternate; 6239 if (0 === (d & 30) && !$158dda26ac6b94e2$var$Ok(e) && (b = $158dda26ac6b94e2$var$Ik(a, d), 2 === b && (f = $158dda26ac6b94e2$var$xc(a), 0 !== f && (d = f, b = $158dda26ac6b94e2$var$Nk(a, f))), 1 === b)) throw c = $158dda26ac6b94e2$var$pk, $158dda26ac6b94e2$var$Kk(a, 0), $158dda26ac6b94e2$var$Ck(a, d), $158dda26ac6b94e2$var$Dk(a, $158dda26ac6b94e2$var$B()), c; 6240 a.finishedWork = e; 6241 a.finishedLanes = d; 6242 switch(b){ 6243 case 0: 6244 case 1: 6245 throw Error($158dda26ac6b94e2$var$p(345)); 6246 case 2: 6247 $158dda26ac6b94e2$var$Pk(a, $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$uk); 6248 break; 6249 case 3: 6250 $158dda26ac6b94e2$var$Ck(a, d); 6251 if ((d & 130023424) === d && (b = $158dda26ac6b94e2$var$fk + 500 - $158dda26ac6b94e2$var$B(), 10 < b)) { 6252 if (0 !== $158dda26ac6b94e2$var$uc(a, 0)) break; 6253 e = a.suspendedLanes; 6254 if ((e & d) !== d) { 6255 $158dda26ac6b94e2$var$R(); 6256 a.pingedLanes |= a.suspendedLanes & e; 6257 break; 6258 } 6259 a.timeoutHandle = $158dda26ac6b94e2$var$Ff($158dda26ac6b94e2$var$Pk.bind(null, a, $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$uk), b); 6260 break; 6261 } 6262 $158dda26ac6b94e2$var$Pk(a, $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$uk); 6263 break; 6264 case 4: 6265 $158dda26ac6b94e2$var$Ck(a, d); 6266 if ((d & 4194240) === d) break; 6267 b = a.eventTimes; 6268 for(e = -1; 0 < d;){ 6269 var g = 31 - $158dda26ac6b94e2$var$oc(d); 6270 f = 1 << g; 6271 g = b[g]; 6272 g > e && (e = g); 6273 d &= ~f; 6274 } 6275 d = e; 6276 d = $158dda26ac6b94e2$var$B() - d; 6277 d = (120 > d ? 120 : 480 > d ? 480 : 1080 > d ? 1080 : 1920 > d ? 1920 : 3E3 > d ? 3E3 : 4320 > d ? 4320 : 1960 * $158dda26ac6b94e2$var$lk(d / 1960)) - d; 6278 if (10 < d) { 6279 a.timeoutHandle = $158dda26ac6b94e2$var$Ff($158dda26ac6b94e2$var$Pk.bind(null, a, $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$uk), d); 6280 break; 6281 } 6282 $158dda26ac6b94e2$var$Pk(a, $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$uk); 6283 break; 6284 case 5: 6285 $158dda26ac6b94e2$var$Pk(a, $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$uk); 6286 break; 6287 default: 6288 throw Error($158dda26ac6b94e2$var$p(329)); 6289 } 6290 } 6291 } 6292 $158dda26ac6b94e2$var$Dk(a, $158dda26ac6b94e2$var$B()); 6293 return a.callbackNode === c ? $158dda26ac6b94e2$var$Gk.bind(null, a) : null; 6294} 6295function $158dda26ac6b94e2$var$Nk(a, b) { 6296 var c = $158dda26ac6b94e2$var$sk; 6297 a.current.memoizedState.isDehydrated && ($158dda26ac6b94e2$var$Kk(a, b).flags |= 256); 6298 a = $158dda26ac6b94e2$var$Ik(a, b); 6299 2 !== a && (b = $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$tk = c, null !== b && $158dda26ac6b94e2$var$Fj(b)); 6300 return a; 6301} 6302function $158dda26ac6b94e2$var$Fj(a) { 6303 null === $158dda26ac6b94e2$var$tk ? $158dda26ac6b94e2$var$tk = a : $158dda26ac6b94e2$var$tk.push.apply($158dda26ac6b94e2$var$tk, a); 6304} 6305function $158dda26ac6b94e2$var$Ok(a) { 6306 for(var b = a;;){ 6307 if (b.flags & 16384) { 6308 var c = b.updateQueue; 6309 if (null !== c && (c = c.stores, null !== c)) for(var d = 0; d < c.length; d++){ 6310 var e = c[d], f = e.getSnapshot; 6311 e = e.value; 6312 try { 6313 if (!$158dda26ac6b94e2$var$He(f(), e)) return !1; 6314 } catch (g) { 6315 return !1; 6316 } 6317 } 6318 } 6319 c = b.child; 6320 if (b.subtreeFlags & 16384 && null !== c) c.return = b, b = c; 6321 else { 6322 if (b === a) break; 6323 for(; null === b.sibling;){ 6324 if (null === b.return || b.return === a) return !0; 6325 b = b.return; 6326 } 6327 b.sibling.return = b.return; 6328 b = b.sibling; 6329 } 6330 } 6331 return !0; 6332} 6333function $158dda26ac6b94e2$var$Ck(a, b) { 6334 b &= ~$158dda26ac6b94e2$var$rk; 6335 b &= ~$158dda26ac6b94e2$var$qk; 6336 a.suspendedLanes |= b; 6337 a.pingedLanes &= ~b; 6338 for(a = a.expirationTimes; 0 < b;){ 6339 var c = 31 - $158dda26ac6b94e2$var$oc(b), d = 1 << c; 6340 a[c] = -1; 6341 b &= ~d; 6342 } 6343} 6344function $158dda26ac6b94e2$var$Ek(a) { 6345 if (0 !== ($158dda26ac6b94e2$var$K & 6)) throw Error($158dda26ac6b94e2$var$p(327)); 6346 $158dda26ac6b94e2$var$Hk(); 6347 var b = $158dda26ac6b94e2$var$uc(a, 0); 6348 if (0 === (b & 1)) return $158dda26ac6b94e2$var$Dk(a, $158dda26ac6b94e2$var$B()), null; 6349 var c = $158dda26ac6b94e2$var$Ik(a, b); 6350 if (0 !== a.tag && 2 === c) { 6351 var d = $158dda26ac6b94e2$var$xc(a); 6352 0 !== d && (b = d, c = $158dda26ac6b94e2$var$Nk(a, d)); 6353 } 6354 if (1 === c) throw c = $158dda26ac6b94e2$var$pk, $158dda26ac6b94e2$var$Kk(a, 0), $158dda26ac6b94e2$var$Ck(a, b), $158dda26ac6b94e2$var$Dk(a, $158dda26ac6b94e2$var$B()), c; 6355 if (6 === c) throw Error($158dda26ac6b94e2$var$p(345)); 6356 a.finishedWork = a.current.alternate; 6357 a.finishedLanes = b; 6358 $158dda26ac6b94e2$var$Pk(a, $158dda26ac6b94e2$var$tk, $158dda26ac6b94e2$var$uk); 6359 $158dda26ac6b94e2$var$Dk(a, $158dda26ac6b94e2$var$B()); 6360 return null; 6361} 6362function $158dda26ac6b94e2$var$Qk(a, b) { 6363 var c = $158dda26ac6b94e2$var$K; 6364 $158dda26ac6b94e2$var$K |= 1; 6365 try { 6366 return a(b); 6367 } finally{ 6368 $158dda26ac6b94e2$var$K = c, 0 === $158dda26ac6b94e2$var$K && ($158dda26ac6b94e2$var$Gj = $158dda26ac6b94e2$var$B() + 500, $158dda26ac6b94e2$var$fg && $158dda26ac6b94e2$var$jg()); 6369 } 6370} 6371function $158dda26ac6b94e2$var$Rk(a) { 6372 null !== $158dda26ac6b94e2$var$wk && 0 === $158dda26ac6b94e2$var$wk.tag && 0 === ($158dda26ac6b94e2$var$K & 6) && $158dda26ac6b94e2$var$Hk(); 6373 var b = $158dda26ac6b94e2$var$K; 6374 $158dda26ac6b94e2$var$K |= 1; 6375 var c = $158dda26ac6b94e2$var$ok.transition, d = $158dda26ac6b94e2$var$C; 6376 try { 6377 if ($158dda26ac6b94e2$var$ok.transition = null, $158dda26ac6b94e2$var$C = 1, a) return a(); 6378 } finally{ 6379 $158dda26ac6b94e2$var$C = d, $158dda26ac6b94e2$var$ok.transition = c, $158dda26ac6b94e2$var$K = b, 0 === ($158dda26ac6b94e2$var$K & 6) && $158dda26ac6b94e2$var$jg(); 6380 } 6381} 6382function $158dda26ac6b94e2$var$Hj() { 6383 $158dda26ac6b94e2$var$fj = $158dda26ac6b94e2$var$ej.current; 6384 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$ej); 6385} 6386function $158dda26ac6b94e2$var$Kk(a, b) { 6387 a.finishedWork = null; 6388 a.finishedLanes = 0; 6389 var c = a.timeoutHandle; 6390 -1 !== c && (a.timeoutHandle = -1, $158dda26ac6b94e2$var$Gf(c)); 6391 if (null !== $158dda26ac6b94e2$var$Y) for(c = $158dda26ac6b94e2$var$Y.return; null !== c;){ 6392 var d = c; 6393 $158dda26ac6b94e2$var$wg(d); 6394 switch(d.tag){ 6395 case 1: 6396 d = d.type.childContextTypes; 6397 null !== d && void 0 !== d && $158dda26ac6b94e2$var$$f(); 6398 break; 6399 case 3: 6400 $158dda26ac6b94e2$var$zh(); 6401 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$Wf); 6402 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$H); 6403 $158dda26ac6b94e2$var$Eh(); 6404 break; 6405 case 5: 6406 $158dda26ac6b94e2$var$Bh(d); 6407 break; 6408 case 4: 6409 $158dda26ac6b94e2$var$zh(); 6410 break; 6411 case 13: 6412 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$L); 6413 break; 6414 case 19: 6415 $158dda26ac6b94e2$var$E($158dda26ac6b94e2$var$L); 6416 break; 6417 case 10: 6418 $158dda26ac6b94e2$var$ah(d.type._context); 6419 break; 6420 case 22: 6421 case 23: 6422 $158dda26ac6b94e2$var$Hj(); 6423 } 6424 c = c.return; 6425 } 6426 $158dda26ac6b94e2$var$Q = a; 6427 $158dda26ac6b94e2$var$Y = a = $158dda26ac6b94e2$var$Pg(a.current, null); 6428 $158dda26ac6b94e2$var$Z = $158dda26ac6b94e2$var$fj = b; 6429 $158dda26ac6b94e2$var$T = 0; 6430 $158dda26ac6b94e2$var$pk = null; 6431 $158dda26ac6b94e2$var$rk = $158dda26ac6b94e2$var$qk = $158dda26ac6b94e2$var$rh = 0; 6432 $158dda26ac6b94e2$var$tk = $158dda26ac6b94e2$var$sk = null; 6433 if (null !== $158dda26ac6b94e2$var$fh) { 6434 for(b = 0; b < $158dda26ac6b94e2$var$fh.length; b++)if (c = $158dda26ac6b94e2$var$fh[b], d = c.interleaved, null !== d) { 6435 c.interleaved = null; 6436 var e = d.next, f = c.pending; 6437 if (null !== f) { 6438 var g = f.next; 6439 f.next = e; 6440 d.next = g; 6441 } 6442 c.pending = d; 6443 } 6444 $158dda26ac6b94e2$var$fh = null; 6445 } 6446 return a; 6447} 6448function $158dda26ac6b94e2$var$Mk(a, b) { 6449 do { 6450 var c = $158dda26ac6b94e2$var$Y; 6451 try { 6452 $158dda26ac6b94e2$var$$g(); 6453 $158dda26ac6b94e2$var$Fh.current = $158dda26ac6b94e2$var$Rh; 6454 if ($158dda26ac6b94e2$var$Ih) { 6455 for(var d = $158dda26ac6b94e2$var$M.memoizedState; null !== d;){ 6456 var e = d.queue; 6457 null !== e && (e.pending = null); 6458 d = d.next; 6459 } 6460 $158dda26ac6b94e2$var$Ih = !1; 6461 } 6462 $158dda26ac6b94e2$var$Hh = 0; 6463 $158dda26ac6b94e2$var$O = $158dda26ac6b94e2$var$N = $158dda26ac6b94e2$var$M = null; 6464 $158dda26ac6b94e2$var$Jh = !1; 6465 $158dda26ac6b94e2$var$Kh = 0; 6466 $158dda26ac6b94e2$var$nk.current = null; 6467 if (null === c || null === c.return) { 6468 $158dda26ac6b94e2$var$T = 1; 6469 $158dda26ac6b94e2$var$pk = b; 6470 $158dda26ac6b94e2$var$Y = null; 6471 break; 6472 } 6473 a: { 6474 var f = a, g = c.return, h = c, k = b; 6475 b = $158dda26ac6b94e2$var$Z; 6476 h.flags |= 32768; 6477 if (null !== k && "object" === typeof k && "function" === typeof k.then) { 6478 var l = k, m = h, q = m.tag; 6479 if (0 === (m.mode & 1) && (0 === q || 11 === q || 15 === q)) { 6480 var r = m.alternate; 6481 r ? (m.updateQueue = r.updateQueue, m.memoizedState = r.memoizedState, m.lanes = r.lanes) : (m.updateQueue = null, m.memoizedState = null); 6482 } 6483 var y = $158dda26ac6b94e2$var$Ui(g); 6484 if (null !== y) { 6485 y.flags &= -257; 6486 $158dda26ac6b94e2$var$Vi(y, g, h, f, b); 6487 y.mode & 1 && $158dda26ac6b94e2$var$Si(f, l, b); 6488 b = y; 6489 k = l; 6490 var n = b.updateQueue; 6491 if (null === n) { 6492 var t = new Set; 6493 t.add(k); 6494 b.updateQueue = t; 6495 } else n.add(k); 6496 break a; 6497 } else { 6498 if (0 === (b & 1)) { 6499 $158dda26ac6b94e2$var$Si(f, l, b); 6500 $158dda26ac6b94e2$var$tj(); 6501 break a; 6502 } 6503 k = Error($158dda26ac6b94e2$var$p(426)); 6504 } 6505 } else if ($158dda26ac6b94e2$var$I && h.mode & 1) { 6506 var J = $158dda26ac6b94e2$var$Ui(g); 6507 if (null !== J) { 6508 0 === (J.flags & 65536) && (J.flags |= 256); 6509 $158dda26ac6b94e2$var$Vi(J, g, h, f, b); 6510 $158dda26ac6b94e2$var$Jg($158dda26ac6b94e2$var$Ji(k, h)); 6511 break a; 6512 } 6513 } 6514 f = k = $158dda26ac6b94e2$var$Ji(k, h); 6515 4 !== $158dda26ac6b94e2$var$T && ($158dda26ac6b94e2$var$T = 2); 6516 null === $158dda26ac6b94e2$var$sk ? $158dda26ac6b94e2$var$sk = [ 6517 f 6518 ] : $158dda26ac6b94e2$var$sk.push(f); 6519 f = g; 6520 do { 6521 switch(f.tag){ 6522 case 3: 6523 f.flags |= 65536; 6524 b &= -b; 6525 f.lanes |= b; 6526 var x = $158dda26ac6b94e2$var$Ni(f, k, b); 6527 $158dda26ac6b94e2$var$ph(f, x); 6528 break a; 6529 case 1: 6530 h = k; 6531 var w = f.type, u = f.stateNode; 6532 if (0 === (f.flags & 128) && ("function" === typeof w.getDerivedStateFromError || null !== u && "function" === typeof u.componentDidCatch && (null === $158dda26ac6b94e2$var$Ri || !$158dda26ac6b94e2$var$Ri.has(u)))) { 6533 f.flags |= 65536; 6534 b &= -b; 6535 f.lanes |= b; 6536 var F = $158dda26ac6b94e2$var$Qi(f, h, b); 6537 $158dda26ac6b94e2$var$ph(f, F); 6538 break a; 6539 } 6540 } 6541 f = f.return; 6542 }while (null !== f); 6543 } 6544 $158dda26ac6b94e2$var$Sk(c); 6545 } catch (na) { 6546 b = na; 6547 $158dda26ac6b94e2$var$Y === c && null !== c && ($158dda26ac6b94e2$var$Y = c = c.return); 6548 continue; 6549 } 6550 break; 6551 }while (1); 6552} 6553function $158dda26ac6b94e2$var$Jk() { 6554 var a = $158dda26ac6b94e2$var$mk.current; 6555 $158dda26ac6b94e2$var$mk.current = $158dda26ac6b94e2$var$Rh; 6556 return null === a ? $158dda26ac6b94e2$var$Rh : a; 6557} 6558function $158dda26ac6b94e2$var$tj() { 6559 if (0 === $158dda26ac6b94e2$var$T || 3 === $158dda26ac6b94e2$var$T || 2 === $158dda26ac6b94e2$var$T) $158dda26ac6b94e2$var$T = 4; 6560 null === $158dda26ac6b94e2$var$Q || 0 === ($158dda26ac6b94e2$var$rh & 268435455) && 0 === ($158dda26ac6b94e2$var$qk & 268435455) || $158dda26ac6b94e2$var$Ck($158dda26ac6b94e2$var$Q, $158dda26ac6b94e2$var$Z); 6561} 6562function $158dda26ac6b94e2$var$Ik(a, b) { 6563 var c = $158dda26ac6b94e2$var$K; 6564 $158dda26ac6b94e2$var$K |= 2; 6565 var d = $158dda26ac6b94e2$var$Jk(); 6566 if ($158dda26ac6b94e2$var$Q !== a || $158dda26ac6b94e2$var$Z !== b) $158dda26ac6b94e2$var$uk = null, $158dda26ac6b94e2$var$Kk(a, b); 6567 for(;;)try { 6568 $158dda26ac6b94e2$var$Tk(); 6569 break; 6570 } catch (e) { 6571 $158dda26ac6b94e2$var$Mk(a, e); 6572 } 6573 $158dda26ac6b94e2$var$$g(); 6574 $158dda26ac6b94e2$var$K = c; 6575 $158dda26ac6b94e2$var$mk.current = d; 6576 if (null !== $158dda26ac6b94e2$var$Y) throw Error($158dda26ac6b94e2$var$p(261)); 6577 $158dda26ac6b94e2$var$Q = null; 6578 $158dda26ac6b94e2$var$Z = 0; 6579 return $158dda26ac6b94e2$var$T; 6580} 6581function $158dda26ac6b94e2$var$Tk() { 6582 for(; null !== $158dda26ac6b94e2$var$Y;)$158dda26ac6b94e2$var$Uk($158dda26ac6b94e2$var$Y); 6583} 6584function $158dda26ac6b94e2$var$Lk() { 6585 for(; null !== $158dda26ac6b94e2$var$Y && !$158dda26ac6b94e2$var$cc();)$158dda26ac6b94e2$var$Uk($158dda26ac6b94e2$var$Y); 6586} 6587function $158dda26ac6b94e2$var$Uk(a) { 6588 var b = $158dda26ac6b94e2$var$Vk(a.alternate, a, $158dda26ac6b94e2$var$fj); 6589 a.memoizedProps = a.pendingProps; 6590 null === b ? $158dda26ac6b94e2$var$Sk(a) : $158dda26ac6b94e2$var$Y = b; 6591 $158dda26ac6b94e2$var$nk.current = null; 6592} 6593function $158dda26ac6b94e2$var$Sk(a) { 6594 var b = a; 6595 do { 6596 var c = b.alternate; 6597 a = b.return; 6598 if (0 === (b.flags & 32768)) { 6599 if (c = $158dda26ac6b94e2$var$Ej(c, b, $158dda26ac6b94e2$var$fj), null !== c) { 6600 $158dda26ac6b94e2$var$Y = c; 6601 return; 6602 } 6603 } else { 6604 c = $158dda26ac6b94e2$var$Ij(c, b); 6605 if (null !== c) { 6606 c.flags &= 32767; 6607 $158dda26ac6b94e2$var$Y = c; 6608 return; 6609 } 6610 if (null !== a) a.flags |= 32768, a.subtreeFlags = 0, a.deletions = null; 6611 else { 6612 $158dda26ac6b94e2$var$T = 6; 6613 $158dda26ac6b94e2$var$Y = null; 6614 return; 6615 } 6616 } 6617 b = b.sibling; 6618 if (null !== b) { 6619 $158dda26ac6b94e2$var$Y = b; 6620 return; 6621 } 6622 $158dda26ac6b94e2$var$Y = b = a; 6623 }while (null !== b); 6624 0 === $158dda26ac6b94e2$var$T && ($158dda26ac6b94e2$var$T = 5); 6625} 6626function $158dda26ac6b94e2$var$Pk(a, b, c) { 6627 var d = $158dda26ac6b94e2$var$C, e = $158dda26ac6b94e2$var$ok.transition; 6628 try { 6629 $158dda26ac6b94e2$var$ok.transition = null, $158dda26ac6b94e2$var$C = 1, $158dda26ac6b94e2$var$Wk(a, b, c, d); 6630 } finally{ 6631 $158dda26ac6b94e2$var$ok.transition = e, $158dda26ac6b94e2$var$C = d; 6632 } 6633 return null; 6634} 6635function $158dda26ac6b94e2$var$Wk(a, b, c, d) { 6636 do $158dda26ac6b94e2$var$Hk(); 6637 while (null !== $158dda26ac6b94e2$var$wk); 6638 if (0 !== ($158dda26ac6b94e2$var$K & 6)) throw Error($158dda26ac6b94e2$var$p(327)); 6639 c = a.finishedWork; 6640 var e = a.finishedLanes; 6641 if (null === c) return null; 6642 a.finishedWork = null; 6643 a.finishedLanes = 0; 6644 if (c === a.current) throw Error($158dda26ac6b94e2$var$p(177)); 6645 a.callbackNode = null; 6646 a.callbackPriority = 0; 6647 var f = c.lanes | c.childLanes; 6648 $158dda26ac6b94e2$var$Bc(a, f); 6649 a === $158dda26ac6b94e2$var$Q && ($158dda26ac6b94e2$var$Y = $158dda26ac6b94e2$var$Q = null, $158dda26ac6b94e2$var$Z = 0); 6650 0 === (c.subtreeFlags & 2064) && 0 === (c.flags & 2064) || $158dda26ac6b94e2$var$vk || ($158dda26ac6b94e2$var$vk = !0, $158dda26ac6b94e2$var$Fk($158dda26ac6b94e2$var$hc, function() { 6651 $158dda26ac6b94e2$var$Hk(); 6652 return null; 6653 })); 6654 f = 0 !== (c.flags & 15990); 6655 if (0 !== (c.subtreeFlags & 15990) || f) { 6656 f = $158dda26ac6b94e2$var$ok.transition; 6657 $158dda26ac6b94e2$var$ok.transition = null; 6658 var g = $158dda26ac6b94e2$var$C; 6659 $158dda26ac6b94e2$var$C = 1; 6660 var h = $158dda26ac6b94e2$var$K; 6661 $158dda26ac6b94e2$var$K |= 4; 6662 $158dda26ac6b94e2$var$nk.current = null; 6663 $158dda26ac6b94e2$var$Oj(a, c); 6664 $158dda26ac6b94e2$var$dk(c, a); 6665 $158dda26ac6b94e2$var$Oe($158dda26ac6b94e2$var$Df); 6666 $158dda26ac6b94e2$var$dd = !!$158dda26ac6b94e2$var$Cf; 6667 $158dda26ac6b94e2$var$Df = $158dda26ac6b94e2$var$Cf = null; 6668 a.current = c; 6669 $158dda26ac6b94e2$var$hk(c, a, e); 6670 $158dda26ac6b94e2$var$dc(); 6671 $158dda26ac6b94e2$var$K = h; 6672 $158dda26ac6b94e2$var$C = g; 6673 $158dda26ac6b94e2$var$ok.transition = f; 6674 } else a.current = c; 6675 $158dda26ac6b94e2$var$vk && ($158dda26ac6b94e2$var$vk = !1, $158dda26ac6b94e2$var$wk = a, $158dda26ac6b94e2$var$xk = e); 6676 f = a.pendingLanes; 6677 0 === f && ($158dda26ac6b94e2$var$Ri = null); 6678 $158dda26ac6b94e2$var$mc(c.stateNode, d); 6679 $158dda26ac6b94e2$var$Dk(a, $158dda26ac6b94e2$var$B()); 6680 if (null !== b) for(d = a.onRecoverableError, c = 0; c < b.length; c++)e = b[c], d(e.value, { 6681 componentStack: e.stack, 6682 digest: e.digest 6683 }); 6684 if ($158dda26ac6b94e2$var$Oi) throw $158dda26ac6b94e2$var$Oi = !1, a = $158dda26ac6b94e2$var$Pi, $158dda26ac6b94e2$var$Pi = null, a; 6685 0 !== ($158dda26ac6b94e2$var$xk & 1) && 0 !== a.tag && $158dda26ac6b94e2$var$Hk(); 6686 f = a.pendingLanes; 6687 0 !== (f & 1) ? a === $158dda26ac6b94e2$var$zk ? $158dda26ac6b94e2$var$yk++ : ($158dda26ac6b94e2$var$yk = 0, $158dda26ac6b94e2$var$zk = a) : $158dda26ac6b94e2$var$yk = 0; 6688 $158dda26ac6b94e2$var$jg(); 6689 return null; 6690} 6691function $158dda26ac6b94e2$var$Hk() { 6692 if (null !== $158dda26ac6b94e2$var$wk) { 6693 var a = $158dda26ac6b94e2$var$Dc($158dda26ac6b94e2$var$xk), b = $158dda26ac6b94e2$var$ok.transition, c = $158dda26ac6b94e2$var$C; 6694 try { 6695 $158dda26ac6b94e2$var$ok.transition = null; 6696 $158dda26ac6b94e2$var$C = 16 > a ? 16 : a; 6697 if (null === $158dda26ac6b94e2$var$wk) var d = !1; 6698 else { 6699 a = $158dda26ac6b94e2$var$wk; 6700 $158dda26ac6b94e2$var$wk = null; 6701 $158dda26ac6b94e2$var$xk = 0; 6702 if (0 !== ($158dda26ac6b94e2$var$K & 6)) throw Error($158dda26ac6b94e2$var$p(331)); 6703 var e = $158dda26ac6b94e2$var$K; 6704 $158dda26ac6b94e2$var$K |= 4; 6705 for($158dda26ac6b94e2$var$V = a.current; null !== $158dda26ac6b94e2$var$V;){ 6706 var f = $158dda26ac6b94e2$var$V, g = f.child; 6707 if (0 !== ($158dda26ac6b94e2$var$V.flags & 16)) { 6708 var h = f.deletions; 6709 if (null !== h) { 6710 for(var k = 0; k < h.length; k++){ 6711 var l = h[k]; 6712 for($158dda26ac6b94e2$var$V = l; null !== $158dda26ac6b94e2$var$V;){ 6713 var m = $158dda26ac6b94e2$var$V; 6714 switch(m.tag){ 6715 case 0: 6716 case 11: 6717 case 15: 6718 $158dda26ac6b94e2$var$Pj(8, m, f); 6719 } 6720 var q = m.child; 6721 if (null !== q) q.return = m, $158dda26ac6b94e2$var$V = q; 6722 else for(; null !== $158dda26ac6b94e2$var$V;){ 6723 m = $158dda26ac6b94e2$var$V; 6724 var r = m.sibling, y = m.return; 6725 $158dda26ac6b94e2$var$Sj(m); 6726 if (m === l) { 6727 $158dda26ac6b94e2$var$V = null; 6728 break; 6729 } 6730 if (null !== r) { 6731 r.return = y; 6732 $158dda26ac6b94e2$var$V = r; 6733 break; 6734 } 6735 $158dda26ac6b94e2$var$V = y; 6736 } 6737 } 6738 } 6739 var n = f.alternate; 6740 if (null !== n) { 6741 var t = n.child; 6742 if (null !== t) { 6743 n.child = null; 6744 do { 6745 var J = t.sibling; 6746 t.sibling = null; 6747 t = J; 6748 }while (null !== t); 6749 } 6750 } 6751 $158dda26ac6b94e2$var$V = f; 6752 } 6753 } 6754 if (0 !== (f.subtreeFlags & 2064) && null !== g) g.return = f, $158dda26ac6b94e2$var$V = g; 6755 else b: for(; null !== $158dda26ac6b94e2$var$V;){ 6756 f = $158dda26ac6b94e2$var$V; 6757 if (0 !== (f.flags & 2048)) switch(f.tag){ 6758 case 0: 6759 case 11: 6760 case 15: 6761 $158dda26ac6b94e2$var$Pj(9, f, f.return); 6762 } 6763 var x = f.sibling; 6764 if (null !== x) { 6765 x.return = f.return; 6766 $158dda26ac6b94e2$var$V = x; 6767 break b; 6768 } 6769 $158dda26ac6b94e2$var$V = f.return; 6770 } 6771 } 6772 var w = a.current; 6773 for($158dda26ac6b94e2$var$V = w; null !== $158dda26ac6b94e2$var$V;){ 6774 g = $158dda26ac6b94e2$var$V; 6775 var u = g.child; 6776 if (0 !== (g.subtreeFlags & 2064) && null !== u) u.return = g, $158dda26ac6b94e2$var$V = u; 6777 else b: for(g = w; null !== $158dda26ac6b94e2$var$V;){ 6778 h = $158dda26ac6b94e2$var$V; 6779 if (0 !== (h.flags & 2048)) try { 6780 switch(h.tag){ 6781 case 0: 6782 case 11: 6783 case 15: 6784 $158dda26ac6b94e2$var$Qj(9, h); 6785 } 6786 } catch (na) { 6787 $158dda26ac6b94e2$var$W(h, h.return, na); 6788 } 6789 if (h === g) { 6790 $158dda26ac6b94e2$var$V = null; 6791 break b; 6792 } 6793 var F = h.sibling; 6794 if (null !== F) { 6795 F.return = h.return; 6796 $158dda26ac6b94e2$var$V = F; 6797 break b; 6798 } 6799 $158dda26ac6b94e2$var$V = h.return; 6800 } 6801 } 6802 $158dda26ac6b94e2$var$K = e; 6803 $158dda26ac6b94e2$var$jg(); 6804 if ($158dda26ac6b94e2$var$lc && "function" === typeof $158dda26ac6b94e2$var$lc.onPostCommitFiberRoot) try { 6805 $158dda26ac6b94e2$var$lc.onPostCommitFiberRoot($158dda26ac6b94e2$var$kc, a); 6806 } catch (na) {} 6807 d = !0; 6808 } 6809 return d; 6810 } finally{ 6811 $158dda26ac6b94e2$var$C = c, $158dda26ac6b94e2$var$ok.transition = b; 6812 } 6813 } 6814 return !1; 6815} 6816function $158dda26ac6b94e2$var$Xk(a, b, c) { 6817 b = $158dda26ac6b94e2$var$Ji(c, b); 6818 b = $158dda26ac6b94e2$var$Ni(a, b, 1); 6819 a = $158dda26ac6b94e2$var$nh(a, b, 1); 6820 b = $158dda26ac6b94e2$var$R(); 6821 null !== a && ($158dda26ac6b94e2$var$Ac(a, 1, b), $158dda26ac6b94e2$var$Dk(a, b)); 6822} 6823function $158dda26ac6b94e2$var$W(a, b, c) { 6824 if (3 === a.tag) $158dda26ac6b94e2$var$Xk(a, a, c); 6825 else for(; null !== b;){ 6826 if (3 === b.tag) { 6827 $158dda26ac6b94e2$var$Xk(b, a, c); 6828 break; 6829 } else if (1 === b.tag) { 6830 var d = b.stateNode; 6831 if ("function" === typeof b.type.getDerivedStateFromError || "function" === typeof d.componentDidCatch && (null === $158dda26ac6b94e2$var$Ri || !$158dda26ac6b94e2$var$Ri.has(d))) { 6832 a = $158dda26ac6b94e2$var$Ji(c, a); 6833 a = $158dda26ac6b94e2$var$Qi(b, a, 1); 6834 b = $158dda26ac6b94e2$var$nh(b, a, 1); 6835 a = $158dda26ac6b94e2$var$R(); 6836 null !== b && ($158dda26ac6b94e2$var$Ac(b, 1, a), $158dda26ac6b94e2$var$Dk(b, a)); 6837 break; 6838 } 6839 } 6840 b = b.return; 6841 } 6842} 6843function $158dda26ac6b94e2$var$Ti(a, b, c) { 6844 var d = a.pingCache; 6845 null !== d && d.delete(b); 6846 b = $158dda26ac6b94e2$var$R(); 6847 a.pingedLanes |= a.suspendedLanes & c; 6848 $158dda26ac6b94e2$var$Q === a && ($158dda26ac6b94e2$var$Z & c) === c && (4 === $158dda26ac6b94e2$var$T || 3 === $158dda26ac6b94e2$var$T && ($158dda26ac6b94e2$var$Z & 130023424) === $158dda26ac6b94e2$var$Z && 500 > $158dda26ac6b94e2$var$B() - $158dda26ac6b94e2$var$fk ? $158dda26ac6b94e2$var$Kk(a, 0) : $158dda26ac6b94e2$var$rk |= c); 6849 $158dda26ac6b94e2$var$Dk(a, b); 6850} 6851function $158dda26ac6b94e2$var$Yk(a, b) { 6852 0 === b && (0 === (a.mode & 1) ? b = 1 : (b = $158dda26ac6b94e2$var$sc, $158dda26ac6b94e2$var$sc <<= 1, 0 === ($158dda26ac6b94e2$var$sc & 130023424) && ($158dda26ac6b94e2$var$sc = 4194304))); 6853 var c = $158dda26ac6b94e2$var$R(); 6854 a = $158dda26ac6b94e2$var$ih(a, b); 6855 null !== a && ($158dda26ac6b94e2$var$Ac(a, b, c), $158dda26ac6b94e2$var$Dk(a, c)); 6856} 6857function $158dda26ac6b94e2$var$uj(a) { 6858 var b = a.memoizedState, c = 0; 6859 null !== b && (c = b.retryLane); 6860 $158dda26ac6b94e2$var$Yk(a, c); 6861} 6862function $158dda26ac6b94e2$var$bk(a, b) { 6863 var c = 0; 6864 switch(a.tag){ 6865 case 13: 6866 var d = a.stateNode; 6867 var e = a.memoizedState; 6868 null !== e && (c = e.retryLane); 6869 break; 6870 case 19: 6871 d = a.stateNode; 6872 break; 6873 default: 6874 throw Error($158dda26ac6b94e2$var$p(314)); 6875 } 6876 null !== d && d.delete(b); 6877 $158dda26ac6b94e2$var$Yk(a, c); 6878} 6879var $158dda26ac6b94e2$var$Vk; 6880$158dda26ac6b94e2$var$Vk = function(a, b, c) { 6881 if (null !== a) { 6882 if (a.memoizedProps !== b.pendingProps || $158dda26ac6b94e2$var$Wf.current) $158dda26ac6b94e2$var$dh = !0; 6883 else { 6884 if (0 === (a.lanes & c) && 0 === (b.flags & 128)) return $158dda26ac6b94e2$var$dh = !1, $158dda26ac6b94e2$var$yj(a, b, c); 6885 $158dda26ac6b94e2$var$dh = 0 !== (a.flags & 131072) ? !0 : !1; 6886 } 6887 } else $158dda26ac6b94e2$var$dh = !1, $158dda26ac6b94e2$var$I && 0 !== (b.flags & 1048576) && $158dda26ac6b94e2$var$ug(b, $158dda26ac6b94e2$var$ng, b.index); 6888 b.lanes = 0; 6889 switch(b.tag){ 6890 case 2: 6891 var d = b.type; 6892 $158dda26ac6b94e2$var$ij(a, b); 6893 a = b.pendingProps; 6894 var e = $158dda26ac6b94e2$var$Yf(b, $158dda26ac6b94e2$var$H.current); 6895 $158dda26ac6b94e2$var$ch(b, c); 6896 e = $158dda26ac6b94e2$var$Nh(null, b, d, a, e, c); 6897 var f = $158dda26ac6b94e2$var$Sh(); 6898 b.flags |= 1; 6899 "object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b.tag = 1, b.memoizedState = null, b.updateQueue = null, $158dda26ac6b94e2$var$Zf(d) ? (f = !0, $158dda26ac6b94e2$var$cg(b)) : f = !1, b.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, $158dda26ac6b94e2$var$kh(b), e.updater = $158dda26ac6b94e2$var$Ei, b.stateNode = e, e._reactInternals = b, $158dda26ac6b94e2$var$Ii(b, d, a, c), b = $158dda26ac6b94e2$var$jj(null, b, d, !0, f, c)) : (b.tag = 0, $158dda26ac6b94e2$var$I && f && $158dda26ac6b94e2$var$vg(b), $158dda26ac6b94e2$var$Xi(null, b, e, c), b = b.child); 6900 return b; 6901 case 16: 6902 d = b.elementType; 6903 a: { 6904 $158dda26ac6b94e2$var$ij(a, b); 6905 a = b.pendingProps; 6906 e = d._init; 6907 d = e(d._payload); 6908 b.type = d; 6909 e = b.tag = $158dda26ac6b94e2$var$Zk(d); 6910 a = $158dda26ac6b94e2$var$Ci(d, a); 6911 switch(e){ 6912 case 0: 6913 b = $158dda26ac6b94e2$var$cj(null, b, d, a, c); 6914 break a; 6915 case 1: 6916 b = $158dda26ac6b94e2$var$hj(null, b, d, a, c); 6917 break a; 6918 case 11: 6919 b = $158dda26ac6b94e2$var$Yi(null, b, d, a, c); 6920 break a; 6921 case 14: 6922 b = $158dda26ac6b94e2$var$$i(null, b, d, $158dda26ac6b94e2$var$Ci(d.type, a), c); 6923 break a; 6924 } 6925 throw Error($158dda26ac6b94e2$var$p(306, d, "")); 6926 } 6927 return b; 6928 case 0: 6929 return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : $158dda26ac6b94e2$var$Ci(d, e), $158dda26ac6b94e2$var$cj(a, b, d, e, c); 6930 case 1: 6931 return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : $158dda26ac6b94e2$var$Ci(d, e), $158dda26ac6b94e2$var$hj(a, b, d, e, c); 6932 case 3: 6933 a: { 6934 $158dda26ac6b94e2$var$kj(b); 6935 if (null === a) throw Error($158dda26ac6b94e2$var$p(387)); 6936 d = b.pendingProps; 6937 f = b.memoizedState; 6938 e = f.element; 6939 $158dda26ac6b94e2$var$lh(a, b); 6940 $158dda26ac6b94e2$var$qh(b, d, null, c); 6941 var g = b.memoizedState; 6942 d = g.element; 6943 if (f.isDehydrated) { 6944 if (f = { 6945 element: d, 6946 isDehydrated: !1, 6947 cache: g.cache, 6948 pendingSuspenseBoundaries: g.pendingSuspenseBoundaries, 6949 transitions: g.transitions 6950 }, b.updateQueue.baseState = f, b.memoizedState = f, b.flags & 256) { 6951 e = $158dda26ac6b94e2$var$Ji(Error($158dda26ac6b94e2$var$p(423)), b); 6952 b = $158dda26ac6b94e2$var$lj(a, b, d, c, e); 6953 break a; 6954 } else if (d !== e) { 6955 e = $158dda26ac6b94e2$var$Ji(Error($158dda26ac6b94e2$var$p(424)), b); 6956 b = $158dda26ac6b94e2$var$lj(a, b, d, c, e); 6957 break a; 6958 } else for($158dda26ac6b94e2$var$yg = $158dda26ac6b94e2$var$Lf(b.stateNode.containerInfo.firstChild), $158dda26ac6b94e2$var$xg = b, $158dda26ac6b94e2$var$I = !0, $158dda26ac6b94e2$var$zg = null, c = $158dda26ac6b94e2$var$Vg(b, null, d, c), b.child = c; c;)c.flags = c.flags & -3 | 4096, c = c.sibling; 6959 } else { 6960 $158dda26ac6b94e2$var$Ig(); 6961 if (d === e) { 6962 b = $158dda26ac6b94e2$var$Zi(a, b, c); 6963 break a; 6964 } 6965 $158dda26ac6b94e2$var$Xi(a, b, d, c); 6966 } 6967 b = b.child; 6968 } 6969 return b; 6970 case 5: 6971 return $158dda26ac6b94e2$var$Ah(b), null === a && $158dda26ac6b94e2$var$Eg(b), d = b.type, e = b.pendingProps, f = null !== a ? a.memoizedProps : null, g = e.children, $158dda26ac6b94e2$var$Ef(d, e) ? g = null : null !== f && $158dda26ac6b94e2$var$Ef(d, f) && (b.flags |= 32), $158dda26ac6b94e2$var$gj(a, b), $158dda26ac6b94e2$var$Xi(a, b, g, c), b.child; 6972 case 6: 6973 return null === a && $158dda26ac6b94e2$var$Eg(b), null; 6974 case 13: 6975 return $158dda26ac6b94e2$var$oj(a, b, c); 6976 case 4: 6977 return $158dda26ac6b94e2$var$yh(b, b.stateNode.containerInfo), d = b.pendingProps, null === a ? b.child = $158dda26ac6b94e2$var$Ug(b, null, d, c) : $158dda26ac6b94e2$var$Xi(a, b, d, c), b.child; 6978 case 11: 6979 return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : $158dda26ac6b94e2$var$Ci(d, e), $158dda26ac6b94e2$var$Yi(a, b, d, e, c); 6980 case 7: 6981 return $158dda26ac6b94e2$var$Xi(a, b, b.pendingProps, c), b.child; 6982 case 8: 6983 return $158dda26ac6b94e2$var$Xi(a, b, b.pendingProps.children, c), b.child; 6984 case 12: 6985 return $158dda26ac6b94e2$var$Xi(a, b, b.pendingProps.children, c), b.child; 6986 case 10: 6987 a: { 6988 d = b.type._context; 6989 e = b.pendingProps; 6990 f = b.memoizedProps; 6991 g = e.value; 6992 $158dda26ac6b94e2$var$G($158dda26ac6b94e2$var$Wg, d._currentValue); 6993 d._currentValue = g; 6994 if (null !== f) { 6995 if ($158dda26ac6b94e2$var$He(f.value, g)) { 6996 if (f.children === e.children && !$158dda26ac6b94e2$var$Wf.current) { 6997 b = $158dda26ac6b94e2$var$Zi(a, b, c); 6998 break a; 6999 } 7000 } else for(f = b.child, null !== f && (f.return = b); null !== f;){ 7001 var h = f.dependencies; 7002 if (null !== h) { 7003 g = f.child; 7004 for(var k = h.firstContext; null !== k;){ 7005 if (k.context === d) { 7006 if (1 === f.tag) { 7007 k = $158dda26ac6b94e2$var$mh(-1, c & -c); 7008 k.tag = 2; 7009 var l = f.updateQueue; 7010 if (null !== l) { 7011 l = l.shared; 7012 var m = l.pending; 7013 null === m ? k.next = k : (k.next = m.next, m.next = k); 7014 l.pending = k; 7015 } 7016 } 7017 f.lanes |= c; 7018 k = f.alternate; 7019 null !== k && (k.lanes |= c); 7020 $158dda26ac6b94e2$var$bh(f.return, c, b); 7021 h.lanes |= c; 7022 break; 7023 } 7024 k = k.next; 7025 } 7026 } else if (10 === f.tag) g = f.type === b.type ? null : f.child; 7027 else if (18 === f.tag) { 7028 g = f.return; 7029 if (null === g) throw Error($158dda26ac6b94e2$var$p(341)); 7030 g.lanes |= c; 7031 h = g.alternate; 7032 null !== h && (h.lanes |= c); 7033 $158dda26ac6b94e2$var$bh(g, c, b); 7034 g = f.sibling; 7035 } else g = f.child; 7036 if (null !== g) g.return = f; 7037 else for(g = f; null !== g;){ 7038 if (g === b) { 7039 g = null; 7040 break; 7041 } 7042 f = g.sibling; 7043 if (null !== f) { 7044 f.return = g.return; 7045 g = f; 7046 break; 7047 } 7048 g = g.return; 7049 } 7050 f = g; 7051 } 7052 } 7053 $158dda26ac6b94e2$var$Xi(a, b, e.children, c); 7054 b = b.child; 7055 } 7056 return b; 7057 case 9: 7058 return e = b.type, d = b.pendingProps.children, $158dda26ac6b94e2$var$ch(b, c), e = $158dda26ac6b94e2$var$eh(e), d = d(e), b.flags |= 1, $158dda26ac6b94e2$var$Xi(a, b, d, c), b.child; 7059 case 14: 7060 return d = b.type, e = $158dda26ac6b94e2$var$Ci(d, b.pendingProps), e = $158dda26ac6b94e2$var$Ci(d.type, e), $158dda26ac6b94e2$var$$i(a, b, d, e, c); 7061 case 15: 7062 return $158dda26ac6b94e2$var$bj(a, b, b.type, b.pendingProps, c); 7063 case 17: 7064 return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : $158dda26ac6b94e2$var$Ci(d, e), $158dda26ac6b94e2$var$ij(a, b), b.tag = 1, $158dda26ac6b94e2$var$Zf(d) ? (a = !0, $158dda26ac6b94e2$var$cg(b)) : a = !1, $158dda26ac6b94e2$var$ch(b, c), $158dda26ac6b94e2$var$Gi(b, d, e), $158dda26ac6b94e2$var$Ii(b, d, e, c), $158dda26ac6b94e2$var$jj(null, b, d, !0, a, c); 7065 case 19: 7066 return $158dda26ac6b94e2$var$xj(a, b, c); 7067 case 22: 7068 return $158dda26ac6b94e2$var$dj(a, b, c); 7069 } 7070 throw Error($158dda26ac6b94e2$var$p(156, b.tag)); 7071}; 7072function $158dda26ac6b94e2$var$Fk(a, b) { 7073 return $158dda26ac6b94e2$var$ac(a, b); 7074} 7075function $158dda26ac6b94e2$var$$k(a, b, c, d) { 7076 this.tag = a; 7077 this.key = c; 7078 this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null; 7079 this.index = 0; 7080 this.ref = null; 7081 this.pendingProps = b; 7082 this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null; 7083 this.mode = d; 7084 this.subtreeFlags = this.flags = 0; 7085 this.deletions = null; 7086 this.childLanes = this.lanes = 0; 7087 this.alternate = null; 7088} 7089function $158dda26ac6b94e2$var$Bg(a, b, c, d) { 7090 return new $158dda26ac6b94e2$var$$k(a, b, c, d); 7091} 7092function $158dda26ac6b94e2$var$aj(a) { 7093 a = a.prototype; 7094 return !(!a || !a.isReactComponent); 7095} 7096function $158dda26ac6b94e2$var$Zk(a) { 7097 if ("function" === typeof a) return $158dda26ac6b94e2$var$aj(a) ? 1 : 0; 7098 if (void 0 !== a && null !== a) { 7099 a = a.$$typeof; 7100 if (a === $158dda26ac6b94e2$var$Da) return 11; 7101 if (a === $158dda26ac6b94e2$var$Ga) return 14; 7102 } 7103 return 2; 7104} 7105function $158dda26ac6b94e2$var$Pg(a, b) { 7106 var c = a.alternate; 7107 null === c ? (c = $158dda26ac6b94e2$var$Bg(a.tag, b, a.key, a.mode), c.elementType = a.elementType, c.type = a.type, c.stateNode = a.stateNode, c.alternate = a, a.alternate = c) : (c.pendingProps = b, c.type = a.type, c.flags = 0, c.subtreeFlags = 0, c.deletions = null); 7108 c.flags = a.flags & 14680064; 7109 c.childLanes = a.childLanes; 7110 c.lanes = a.lanes; 7111 c.child = a.child; 7112 c.memoizedProps = a.memoizedProps; 7113 c.memoizedState = a.memoizedState; 7114 c.updateQueue = a.updateQueue; 7115 b = a.dependencies; 7116 c.dependencies = null === b ? null : { 7117 lanes: b.lanes, 7118 firstContext: b.firstContext 7119 }; 7120 c.sibling = a.sibling; 7121 c.index = a.index; 7122 c.ref = a.ref; 7123 return c; 7124} 7125function $158dda26ac6b94e2$var$Rg(a, b, c, d, e, f) { 7126 var g = 2; 7127 d = a; 7128 if ("function" === typeof a) $158dda26ac6b94e2$var$aj(a) && (g = 1); 7129 else if ("string" === typeof a) g = 5; 7130 else a: switch(a){ 7131 case $158dda26ac6b94e2$var$ya: 7132 return $158dda26ac6b94e2$var$Tg(c.children, e, f, b); 7133 case $158dda26ac6b94e2$var$za: 7134 g = 8; 7135 e |= 8; 7136 break; 7137 case $158dda26ac6b94e2$var$Aa: 7138 return a = $158dda26ac6b94e2$var$Bg(12, c, b, e | 2), a.elementType = $158dda26ac6b94e2$var$Aa, a.lanes = f, a; 7139 case $158dda26ac6b94e2$var$Ea: 7140 return a = $158dda26ac6b94e2$var$Bg(13, c, b, e), a.elementType = $158dda26ac6b94e2$var$Ea, a.lanes = f, a; 7141 case $158dda26ac6b94e2$var$Fa: 7142 return a = $158dda26ac6b94e2$var$Bg(19, c, b, e), a.elementType = $158dda26ac6b94e2$var$Fa, a.lanes = f, a; 7143 case $158dda26ac6b94e2$var$Ia: 7144 return $158dda26ac6b94e2$var$pj(c, e, f, b); 7145 default: 7146 if ("object" === typeof a && null !== a) switch(a.$$typeof){ 7147 case $158dda26ac6b94e2$var$Ba: 7148 g = 10; 7149 break a; 7150 case $158dda26ac6b94e2$var$Ca: 7151 g = 9; 7152 break a; 7153 case $158dda26ac6b94e2$var$Da: 7154 g = 11; 7155 break a; 7156 case $158dda26ac6b94e2$var$Ga: 7157 g = 14; 7158 break a; 7159 case $158dda26ac6b94e2$var$Ha: 7160 g = 16; 7161 d = null; 7162 break a; 7163 } 7164 throw Error($158dda26ac6b94e2$var$p(130, null == a ? a : typeof a, "")); 7165 } 7166 b = $158dda26ac6b94e2$var$Bg(g, c, b, e); 7167 b.elementType = a; 7168 b.type = d; 7169 b.lanes = f; 7170 return b; 7171} 7172function $158dda26ac6b94e2$var$Tg(a, b, c, d) { 7173 a = $158dda26ac6b94e2$var$Bg(7, a, d, b); 7174 a.lanes = c; 7175 return a; 7176} 7177function $158dda26ac6b94e2$var$pj(a, b, c, d) { 7178 a = $158dda26ac6b94e2$var$Bg(22, a, d, b); 7179 a.elementType = $158dda26ac6b94e2$var$Ia; 7180 a.lanes = c; 7181 a.stateNode = { 7182 isHidden: !1 7183 }; 7184 return a; 7185} 7186function $158dda26ac6b94e2$var$Qg(a, b, c) { 7187 a = $158dda26ac6b94e2$var$Bg(6, a, null, b); 7188 a.lanes = c; 7189 return a; 7190} 7191function $158dda26ac6b94e2$var$Sg(a, b, c) { 7192 b = $158dda26ac6b94e2$var$Bg(4, null !== a.children ? a.children : [], a.key, b); 7193 b.lanes = c; 7194 b.stateNode = { 7195 containerInfo: a.containerInfo, 7196 pendingChildren: null, 7197 implementation: a.implementation 7198 }; 7199 return b; 7200} 7201function $158dda26ac6b94e2$var$al(a, b, c, d, e) { 7202 this.tag = b; 7203 this.containerInfo = a; 7204 this.finishedWork = this.pingCache = this.current = this.pendingChildren = null; 7205 this.timeoutHandle = -1; 7206 this.callbackNode = this.pendingContext = this.context = null; 7207 this.callbackPriority = 0; 7208 this.eventTimes = $158dda26ac6b94e2$var$zc(0); 7209 this.expirationTimes = $158dda26ac6b94e2$var$zc(-1); 7210 this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0; 7211 this.entanglements = $158dda26ac6b94e2$var$zc(0); 7212 this.identifierPrefix = d; 7213 this.onRecoverableError = e; 7214 this.mutableSourceEagerHydrationData = null; 7215} 7216function $158dda26ac6b94e2$var$bl(a, b, c, d, e, f, g, h, k) { 7217 a = new $158dda26ac6b94e2$var$al(a, b, c, h, k); 7218 1 === b ? (b = 1, !0 === f && (b |= 8)) : b = 0; 7219 f = $158dda26ac6b94e2$var$Bg(3, null, null, b); 7220 a.current = f; 7221 f.stateNode = a; 7222 f.memoizedState = { 7223 element: d, 7224 isDehydrated: c, 7225 cache: null, 7226 transitions: null, 7227 pendingSuspenseBoundaries: null 7228 }; 7229 $158dda26ac6b94e2$var$kh(f); 7230 return a; 7231} 7232function $158dda26ac6b94e2$var$cl(a, b, c) { 7233 var d = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; 7234 return { 7235 $$typeof: $158dda26ac6b94e2$var$wa, 7236 key: null == d ? null : "" + d, 7237 children: a, 7238 containerInfo: b, 7239 implementation: c 7240 }; 7241} 7242function $158dda26ac6b94e2$var$dl(a) { 7243 if (!a) return $158dda26ac6b94e2$var$Vf; 7244 a = a._reactInternals; 7245 a: { 7246 if ($158dda26ac6b94e2$var$Vb(a) !== a || 1 !== a.tag) throw Error($158dda26ac6b94e2$var$p(170)); 7247 var b = a; 7248 do { 7249 switch(b.tag){ 7250 case 3: 7251 b = b.stateNode.context; 7252 break a; 7253 case 1: 7254 if ($158dda26ac6b94e2$var$Zf(b.type)) { 7255 b = b.stateNode.__reactInternalMemoizedMergedChildContext; 7256 break a; 7257 } 7258 } 7259 b = b.return; 7260 }while (null !== b); 7261 throw Error($158dda26ac6b94e2$var$p(171)); 7262 } 7263 if (1 === a.tag) { 7264 var c = a.type; 7265 if ($158dda26ac6b94e2$var$Zf(c)) return $158dda26ac6b94e2$var$bg(a, c, b); 7266 } 7267 return b; 7268} 7269function $158dda26ac6b94e2$var$el(a, b, c, d, e, f, g, h, k) { 7270 a = $158dda26ac6b94e2$var$bl(c, d, !0, a, e, f, g, h, k); 7271 a.context = $158dda26ac6b94e2$var$dl(null); 7272 c = a.current; 7273 d = $158dda26ac6b94e2$var$R(); 7274 e = $158dda26ac6b94e2$var$yi(c); 7275 f = $158dda26ac6b94e2$var$mh(d, e); 7276 f.callback = void 0 !== b && null !== b ? b : null; 7277 $158dda26ac6b94e2$var$nh(c, f, e); 7278 a.current.lanes = e; 7279 $158dda26ac6b94e2$var$Ac(a, e, d); 7280 $158dda26ac6b94e2$var$Dk(a, d); 7281 return a; 7282} 7283function $158dda26ac6b94e2$var$fl(a, b, c, d) { 7284 var e = b.current, f = $158dda26ac6b94e2$var$R(), g = $158dda26ac6b94e2$var$yi(e); 7285 c = $158dda26ac6b94e2$var$dl(c); 7286 null === b.context ? b.context = c : b.pendingContext = c; 7287 b = $158dda26ac6b94e2$var$mh(f, g); 7288 b.payload = { 7289 element: a 7290 }; 7291 d = void 0 === d ? null : d; 7292 null !== d && (b.callback = d); 7293 a = $158dda26ac6b94e2$var$nh(e, b, g); 7294 null !== a && ($158dda26ac6b94e2$var$gi(a, e, g, f), $158dda26ac6b94e2$var$oh(a, e, g)); 7295 return g; 7296} 7297function $158dda26ac6b94e2$var$gl(a) { 7298 a = a.current; 7299 if (!a.child) return null; 7300 switch(a.child.tag){ 7301 case 5: 7302 return a.child.stateNode; 7303 default: 7304 return a.child.stateNode; 7305 } 7306} 7307function $158dda26ac6b94e2$var$hl(a, b) { 7308 a = a.memoizedState; 7309 if (null !== a && null !== a.dehydrated) { 7310 var c = a.retryLane; 7311 a.retryLane = 0 !== c && c < b ? c : b; 7312 } 7313} 7314function $158dda26ac6b94e2$var$il(a, b) { 7315 $158dda26ac6b94e2$var$hl(a, b); 7316 (a = a.alternate) && $158dda26ac6b94e2$var$hl(a, b); 7317} 7318function $158dda26ac6b94e2$var$jl() { 7319 return null; 7320} 7321var $158dda26ac6b94e2$var$kl = "function" === typeof reportError ? reportError : function(a) { 7322 console.error(a); 7323}; 7324function $158dda26ac6b94e2$var$ll(a) { 7325 this._internalRoot = a; 7326} 7327$158dda26ac6b94e2$var$ml.prototype.render = $158dda26ac6b94e2$var$ll.prototype.render = function(a) { 7328 var b = this._internalRoot; 7329 if (null === b) throw Error($158dda26ac6b94e2$var$p(409)); 7330 $158dda26ac6b94e2$var$fl(a, b, null, null); 7331}; 7332$158dda26ac6b94e2$var$ml.prototype.unmount = $158dda26ac6b94e2$var$ll.prototype.unmount = function() { 7333 var a = this._internalRoot; 7334 if (null !== a) { 7335 this._internalRoot = null; 7336 var b = a.containerInfo; 7337 $158dda26ac6b94e2$var$Rk(function() { 7338 $158dda26ac6b94e2$var$fl(null, a, null, null); 7339 }); 7340 b[$158dda26ac6b94e2$var$uf] = null; 7341 } 7342}; 7343function $158dda26ac6b94e2$var$ml(a) { 7344 this._internalRoot = a; 7345} 7346$158dda26ac6b94e2$var$ml.prototype.unstable_scheduleHydration = function(a) { 7347 if (a) { 7348 var b = $158dda26ac6b94e2$var$Hc(); 7349 a = { 7350 blockedOn: null, 7351 target: a, 7352 priority: b 7353 }; 7354 for(var c = 0; c < $158dda26ac6b94e2$var$Qc.length && 0 !== b && b < $158dda26ac6b94e2$var$Qc[c].priority; c++); 7355 $158dda26ac6b94e2$var$Qc.splice(c, 0, a); 7356 0 === c && $158dda26ac6b94e2$var$Vc(a); 7357 } 7358}; 7359function $158dda26ac6b94e2$var$nl(a) { 7360 return !(!a || 1 !== a.nodeType && 9 !== a.nodeType && 11 !== a.nodeType); 7361} 7362function $158dda26ac6b94e2$var$ol(a) { 7363 return !(!a || 1 !== a.nodeType && 9 !== a.nodeType && 11 !== a.nodeType && (8 !== a.nodeType || " react-mount-point-unstable " !== a.nodeValue)); 7364} 7365function $158dda26ac6b94e2$var$pl() {} 7366function $158dda26ac6b94e2$var$ql(a, b, c, d, e) { 7367 if (e) { 7368 if ("function" === typeof d) { 7369 var f = d; 7370 d = function() { 7371 var a = $158dda26ac6b94e2$var$gl(g); 7372 f.call(a); 7373 }; 7374 } 7375 var g = $158dda26ac6b94e2$var$el(b, d, a, 0, null, !1, !1, "", $158dda26ac6b94e2$var$pl); 7376 a._reactRootContainer = g; 7377 a[$158dda26ac6b94e2$var$uf] = g.current; 7378 $158dda26ac6b94e2$var$sf(8 === a.nodeType ? a.parentNode : a); 7379 $158dda26ac6b94e2$var$Rk(); 7380 return g; 7381 } 7382 for(; e = a.lastChild;)a.removeChild(e); 7383 if ("function" === typeof d) { 7384 var h = d; 7385 d = function() { 7386 var a = $158dda26ac6b94e2$var$gl(k); 7387 h.call(a); 7388 }; 7389 } 7390 var k = $158dda26ac6b94e2$var$bl(a, 0, !1, null, null, !1, !1, "", $158dda26ac6b94e2$var$pl); 7391 a._reactRootContainer = k; 7392 a[$158dda26ac6b94e2$var$uf] = k.current; 7393 $158dda26ac6b94e2$var$sf(8 === a.nodeType ? a.parentNode : a); 7394 $158dda26ac6b94e2$var$Rk(function() { 7395 $158dda26ac6b94e2$var$fl(b, k, c, d); 7396 }); 7397 return k; 7398} 7399function $158dda26ac6b94e2$var$rl(a, b, c, d, e) { 7400 var f = c._reactRootContainer; 7401 if (f) { 7402 var g = f; 7403 if ("function" === typeof e) { 7404 var h = e; 7405 e = function() { 7406 var a = $158dda26ac6b94e2$var$gl(g); 7407 h.call(a); 7408 }; 7409 } 7410 $158dda26ac6b94e2$var$fl(b, g, a, e); 7411 } else g = $158dda26ac6b94e2$var$ql(c, b, a, e, d); 7412 return $158dda26ac6b94e2$var$gl(g); 7413} 7414$158dda26ac6b94e2$var$Ec = function(a) { 7415 switch(a.tag){ 7416 case 3: 7417 var b = a.stateNode; 7418 if (b.current.memoizedState.isDehydrated) { 7419 var c = $158dda26ac6b94e2$var$tc(b.pendingLanes); 7420 0 !== c && ($158dda26ac6b94e2$var$Cc(b, c | 1), $158dda26ac6b94e2$var$Dk(b, $158dda26ac6b94e2$var$B()), 0 === ($158dda26ac6b94e2$var$K & 6) && ($158dda26ac6b94e2$var$Gj = $158dda26ac6b94e2$var$B() + 500, $158dda26ac6b94e2$var$jg())); 7421 } 7422 break; 7423 case 13: 7424 $158dda26ac6b94e2$var$Rk(function() {
7425 var b = $158dda26ac6b94e2$var$ih(a, 1); 7426 if (null !== b) { 7427 var c = $158dda26ac6b94e2$var$R(); 7428 $158dda26ac6b94e2$var$gi(b, a, 1, c); 7429 } 7430 }), $158dda26ac6b94e2$var$il(a, 1); 7431 } 7432}; 7433$158dda26ac6b94e2$var$Fc = function(a) { 7434 if (13 === a.tag) { 7435 var b = $158dda26ac6b94e2$var$ih(a, 134217728); 7436 if (null !== b) { 7437 var c = $158dda26ac6b94e2$var$R(); 7438 $158dda26ac6b94e2$var$gi(b, a, 134217728, c); 7439 } 7440 $158dda26ac6b94e2$var$il(a, 134217728); 7441 } 7442}; 7443$158dda26ac6b94e2$var$Gc = function(a) { 7444 if (13 === a.tag) { 7445 var b = $158dda26ac6b94e2$var$yi(a), c = $158dda26ac6b94e2$var$ih(a, b); 7446 if (null !== c) { 7447 var d = $158dda26ac6b94e2$var$R(); 7448 $158dda26ac6b94e2$var$gi(c, a, b, d); 7449 } 7450 $158dda26ac6b94e2$var$il(a, b); 7451 } 7452}; 7453$158dda26ac6b94e2$var$Hc = function() { 7454 return $158dda26ac6b94e2$var$C; 7455}; 7456$158dda26ac6b94e2$var$Ic = function(a, b) { 7457 var c = $158dda26ac6b94e2$var$C; 7458 try { 7459 return $158dda26ac6b94e2$var$C = a, b(); 7460 } finally{ 7461 $158dda26ac6b94e2$var$C = c; 7462 } 7463}; 7464$158dda26ac6b94e2$var$yb = function(a, b, c) { 7465 switch(b){ 7466 case "input": 7467 $158dda26ac6b94e2$var$bb(a, c); 7468 b = c.name; 7469 if ("radio" === c.type && null != b) { 7470 for(c = a; c.parentNode;)c = c.parentNode; 7471 c = c.querySelectorAll("input[name=" + JSON.stringify("" + b) + '][type="radio"]'); 7472 for(b = 0; b < c.length; b++){ 7473 var d = c[b]; 7474 if (d !== a && d.form === a.form) { 7475 var e = $158dda26ac6b94e2$var$Db(d); 7476 if (!e) throw Error($158dda26ac6b94e2$var$p(90)); 7477 $158dda26ac6b94e2$var$Wa(d); 7478 $158dda26ac6b94e2$var$bb(d, e); 7479 } 7480 } 7481 } 7482 break; 7483 case "textarea": 7484 $158dda26ac6b94e2$var$ib(a, c); 7485 break; 7486 case "select": 7487 b = c.value, null != b && $158dda26ac6b94e2$var$fb(a, !!c.multiple, b, !1); 7488 } 7489}; 7490$158dda26ac6b94e2$var$Gb = $158dda26ac6b94e2$var$Qk; 7491$158dda26ac6b94e2$var$Hb = $158dda26ac6b94e2$var$Rk; 7492var $158dda26ac6b94e2$var$sl = { 7493 usingClientEntryPoint: !1, 7494 Events: [ 7495 $158dda26ac6b94e2$var$Cb, 7496 $158dda26ac6b94e2$var$ue, 7497 $158dda26ac6b94e2$var$Db, 7498 $158dda26ac6b94e2$var$Eb, 7499 $158dda26ac6b94e2$var$Fb, 7500 $158dda26ac6b94e2$var$Qk 7501 ] 7502}, $158dda26ac6b94e2$var$tl = { 7503 findFiberByHostInstance: $158dda26ac6b94e2$var$Wc, 7504 bundleType: 0, 7505 version: "18.3.1", 7506 rendererPackageName: "react-dom" 7507}; 7508var $158dda26ac6b94e2$var$ul = { 7509 bundleType: $158dda26ac6b94e2$var$tl.bundleType, 7510 version: $158dda26ac6b94e2$var$tl.version, 7511 rendererPackageName: $158dda26ac6b94e2$var$tl.rendererPackageName, 7512 rendererConfig: $158dda26ac6b94e2$var$tl.rendererConfig, 7513 overrideHookState: null, 7514 overrideHookStateDeletePath: null, 7515 overrideHookStateRenamePath: null, 7516 overrideProps: null, 7517 overridePropsDeletePath: null, 7518 overridePropsRenamePath: null, 7519 setErrorHandler: null, 7520 setSuspenseHandler: null, 7521 scheduleUpdate: null, 7522 currentDispatcherRef: $158dda26ac6b94e2$var$ua.ReactCurrentDispatcher, 7523 findHostInstanceByFiber: function(a) { 7524 a = $158dda26ac6b94e2$var$Zb(a); 7525 return null === a ? null : a.stateNode; 7526 }, 7527 findFiberByHostInstance: $158dda26ac6b94e2$var$tl.findFiberByHostInstance || $158dda26ac6b94e2$var$jl, 7528 findHostInstancesForRefresh: null, 7529 scheduleRefresh: null, 7530 scheduleRoot: null, 7531 setRefreshHandler: null, 7532 getCurrentFiber: null, 7533 reconcilerVersion: "18.3.1-next-f1338f8080-20240426" 7534}; 7535if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { 7536 var $158dda26ac6b94e2$var$vl = __REACT_DEVTOOLS_GLOBAL_HOOK__; 7537 if (!$158dda26ac6b94e2$var$vl.isDisabled && $158dda26ac6b94e2$var$vl.supportsFiber) try { 7538 $158dda26ac6b94e2$var$kc = $158dda26ac6b94e2$var$vl.inject($158dda26ac6b94e2$var$ul), $158dda26ac6b94e2$var$lc = $158dda26ac6b94e2$var$vl; 7539 } catch (a) {} 7540} 7541$158dda26ac6b94e2$export$ae55be85d98224ed = $158dda26ac6b94e2$var$sl; 7542$158dda26ac6b94e2$export$d39a5bbd09211389 = function(a, b) { 7543 var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; 7544 if (!$158dda26ac6b94e2$var$nl(b)) throw Error($158dda26ac6b94e2$var$p(200)); 7545 return $158dda26ac6b94e2$var$cl(a, b, null, c); 7546}; 7547$158dda26ac6b94e2$export$882461b6382ed46c = function(a, b) { 7548 if (!$158dda26ac6b94e2$var$nl(a)) throw Error($158dda26ac6b94e2$var$p(299)); 7549 var c = !1, d = "", e = $158dda26ac6b94e2$var$kl; 7550 null !== b && void 0 !== b && (!0 === b.unstable_strictMode && (c = !0), void 0 !== b.identifierPrefix && (d = b.identifierPrefix), void 0 !== b.onRecoverableError && (e = b.onRecoverableError)); 7551 b = $158dda26ac6b94e2$var$bl(a, 1, !1, null, null, c, !1, d, e); 7552 a[$158dda26ac6b94e2$var$uf] = b.current; 7553 $158dda26ac6b94e2$var$sf(8 === a.nodeType ? a.parentNode : a); 7554 return new $158dda26ac6b94e2$var$ll(b); 7555}; 7556$158dda26ac6b94e2$export$466bfc07425424d5 = function(a) { 7557 if (null == a) return null; 7558 if (1 === a.nodeType) return a; 7559 var b = a._reactInternals; 7560 if (void 0 === b) { 7561 if ("function" === typeof a.render) throw Error($158dda26ac6b94e2$var$p(188)); 7562 a = Object.keys(a).join(","); 7563 throw Error($158dda26ac6b94e2$var$p(268, a)); 7564 } 7565 a = $158dda26ac6b94e2$var$Zb(b); 7566 a = null === a ? null : a.stateNode; 7567 return a; 7568}; 7569$158dda26ac6b94e2$export$cd75ccfd720a3cd4 = function(a) { 7570 return $158dda26ac6b94e2$var$Rk(a); 7571}; 7572$158dda26ac6b94e2$export$fa8d919ba61d84db = function(a, b, c) { 7573 if (!$158dda26ac6b94e2$var$ol(b)) throw Error($158dda26ac6b94e2$var$p(200)); 7574 return $158dda26ac6b94e2$var$rl(null, a, b, !0, c); 7575}; 7576$158dda26ac6b94e2$export$757ceba2d55c277e = function(a, b, c) { 7577 if (!$158dda26ac6b94e2$var$nl(a)) throw Error($158dda26ac6b94e2$var$p(405)); 7578 var d = null != c && c.hydratedSources || null, e = !1, f = "", g = $158dda26ac6b94e2$var$kl; 7579 null !== c && void 0 !== c && (!0 === c.unstable_strictMode && (e = !0), void 0 !== c.identifierPrefix && (f = c.identifierPrefix), void 0 !== c.onRecoverableError && (g = c.onRecoverableError)); 7580 b = $158dda26ac6b94e2$var$el(b, null, a, 1, null != c ? c : null, e, !1, f, g); 7581 a[$158dda26ac6b94e2$var$uf] = b.current; 7582 $158dda26ac6b94e2$var$sf(a); 7583 if (d) for(a = 0; a < d.length; a++)c = d[a], e = c._getVersion, e = e(c._source), null == b.mutableSourceEagerHydrationData ? b.mutableSourceEagerHydrationData = [ 7584 c, 7585 e 7586 ] : b.mutableSourceEagerHydrationData.push(c, e); 7587 return new $158dda26ac6b94e2$var$ml(b); 7588}; 7589$158dda26ac6b94e2$export$b3890eb0ae9dca99 = function(a, b, c) { 7590 if (!$158dda26ac6b94e2$var$ol(b)) throw Error($158dda26ac6b94e2$var$p(200)); 7591 return $158dda26ac6b94e2$var$rl(null, a, b, !1, c); 7592}; 7593$158dda26ac6b94e2$export$502457920280e6be = function(a) { 7594 if (!$158dda26ac6b94e2$var$ol(a)) throw Error($158dda26ac6b94e2$var$p(40)); 7595 return a._reactRootContainer ? ($158dda26ac6b94e2$var$Rk(function() { 7596 $158dda26ac6b94e2$var$rl(null, null, a, !1, function() { 7597 a._reactRootContainer = null; 7598 a[$158dda26ac6b94e2$var$uf] = null; 7599 }); 7600 }), !0) : !1; 7601}; 7602$158dda26ac6b94e2$export$c78a37762a8d58e1 = $158dda26ac6b94e2$var$Qk; 7603$158dda26ac6b94e2$export$dc54d992c10e8a18 = function(a, b, c, d) { 7604 if (!$158dda26ac6b94e2$var$ol(c)) throw Error($158dda26ac6b94e2$var$p(200)); 7605 if (null == a || void 0 === a._reactInternals) throw Error($158dda26ac6b94e2$var$p(38)); 7606 return $158dda26ac6b94e2$var$rl(a, b, c, !1, d); 7607}; 7608$158dda26ac6b94e2$export$83d89fbfd8236492 = "18.3.1-next-f1338f8080-20240426"; 7609 7610});
vendor: 15,382 bytes, lines 7611-7904
7611parcelRegister("25SSU", function(module, exports) { 7612'use strict'; 7613 7614module.exports = (parcelRequire("1Kj77")); 7615 7616}); 7617parcelRegister("1Kj77", function(module, exports) { 7618 7619$parcel$export(module.exports, "unstable_now", function () { return $1458e9f1fce7481f$export$c4744153514ff05d; }, function (v) { return $1458e9f1fce7481f$export$c4744153514ff05d = v; }); 7620$parcel$export(module.exports, "unstable_IdlePriority", function () { return $1458e9f1fce7481f$export$3e506c1ccc9cc1a7; }, function (v) { return $1458e9f1fce7481f$export$3e506c1ccc9cc1a7 = v; }); 7621$parcel$export(module.exports, "unstable_ImmediatePriority", function () { return $1458e9f1fce7481f$export$e26fe2ed2fa76875; }, function (v) { return $1458e9f1fce7481f$export$e26fe2ed2fa76875 = v; }); 7622$parcel$export(module.exports, "unstable_LowPriority", function () { return $1458e9f1fce7481f$export$502329bbf4b505b1; }, function (v) { return $1458e9f1fce7481f$export$502329bbf4b505b1 = v; }); 7623$parcel$export(module.exports, "unstable_NormalPriority", function () { return $1458e9f1fce7481f$export$6e3807111c4874c4; }, function (v) { return $1458e9f1fce7481f$export$6e3807111c4874c4 = v; }); 7624$parcel$export(module.exports, "unstable_Profiling", function () { return $1458e9f1fce7481f$export$c27134553091fb3a; }, function (v) { return $1458e9f1fce7481f$export$c27134553091fb3a = v; }); 7625$parcel$export(module.exports, "unstable_UserBlockingPriority", function () { return $1458e9f1fce7481f$export$33ee1acdc04fd2a2; }, function (v) { return $1458e9f1fce7481f$export$33ee1acdc04fd2a2 = v; }); 7626$parcel$export(module.exports, "unstable_cancelCallback", function () { return $1458e9f1fce7481f$export$b00a404bbd5edef2; }, function (v) { return $1458e9f1fce7481f$export$b00a404bbd5edef2 = v; }); 7627$parcel$export(module.exports, "unstable_continueExecution", function () { return $1458e9f1fce7481f$export$8352ce38b91d0c62; }, function (v) { return $1458e9f1fce7481f$export$8352ce38b91d0c62 = v; }); 7628$parcel$export(module.exports, "unstable_forceFrameRate", function () { return $1458e9f1fce7481f$export$d66a1c1c77bd778b; }, function (v) { return $1458e9f1fce7481f$export$d66a1c1c77bd778b = v; }); 7629$parcel$export(module.exports, "unstable_getCurrentPriorityLevel", function () { return $1458e9f1fce7481f$export$d3dfb8e4810cb555; }, function (v) { return $1458e9f1fce7481f$export$d3dfb8e4810cb555 = v; }); 7630$parcel$export(module.exports, "unstable_getFirstCallbackNode", function () { return $1458e9f1fce7481f$export$839f9183b0465a69; }, function (v) { return $1458e9f1fce7481f$export$839f9183b0465a69 = v; }); 7631$parcel$export(module.exports, "unstable_next", function () { return $1458e9f1fce7481f$export$72fdf0e06517287b; }, function (v) { return $1458e9f1fce7481f$export$72fdf0e06517287b = v; }); 7632$parcel$export(module.exports, "unstable_pauseExecution", function () { return $1458e9f1fce7481f$export$4b844e58a3e414b4; }, function (v) { return $1458e9f1fce7481f$export$4b844e58a3e414b4 = v; }); 7633$parcel$export(module.exports, "unstable_requestPaint", function () { return $1458e9f1fce7481f$export$816d2913ae6b83b1; }, function (v) { return $1458e9f1fce7481f$export$816d2913ae6b83b1 = v; }); 7634$parcel$export(module.exports, "unstable_runWithPriority", function () { return $1458e9f1fce7481f$export$61bcfe829111a1d0; }, function (v) { return $1458e9f1fce7481f$export$61bcfe829111a1d0 = v; }); 7635$parcel$export(module.exports, "unstable_scheduleCallback", function () { return $1458e9f1fce7481f$export$7ee8c9beb337bc3f; }, function (v) { return $1458e9f1fce7481f$export$7ee8c9beb337bc3f = v; }); 7636$parcel$export(module.exports, "unstable_shouldYield", function () { return $1458e9f1fce7481f$export$b5836b71941fa3ed; }, function (v) { return $1458e9f1fce7481f$export$b5836b71941fa3ed = v; }); 7637$parcel$export(module.exports, "unstable_wrapCallback", function () { return $1458e9f1fce7481f$export$cf845f2c119da08a; }, function (v) { return $1458e9f1fce7481f$export$cf845f2c119da08a = v; }); 7638/** 7639 * @license React 7640 * scheduler.production.min.js 7641 * 7642 * Copyright (c) Facebook, Inc. and its affiliates. 7643 * 7644 * This source code is licensed under the MIT license found in the 7645 * LICENSE file in the root directory of this source tree. 7646 */ var $1458e9f1fce7481f$export$c4744153514ff05d; 7647var $1458e9f1fce7481f$export$3e506c1ccc9cc1a7; 7648var $1458e9f1fce7481f$export$e26fe2ed2fa76875; 7649var $1458e9f1fce7481f$export$502329bbf4b505b1; 7650var $1458e9f1fce7481f$export$6e3807111c4874c4; 7651var $1458e9f1fce7481f$export$c27134553091fb3a; 7652var $1458e9f1fce7481f$export$33ee1acdc04fd2a2; 7653var $1458e9f1fce7481f$export$b00a404bbd5edef2; 7654var $1458e9f1fce7481f$export$8352ce38b91d0c62; 7655var $1458e9f1fce7481f$export$d66a1c1c77bd778b; 7656var $1458e9f1fce7481f$export$d3dfb8e4810cb555; 7657var $1458e9f1fce7481f$export$839f9183b0465a69; 7658var $1458e9f1fce7481f$export$72fdf0e06517287b; 7659var $1458e9f1fce7481f$export$4b844e58a3e414b4; 7660var $1458e9f1fce7481f$export$816d2913ae6b83b1; 7661var $1458e9f1fce7481f$export$61bcfe829111a1d0; 7662var $1458e9f1fce7481f$export$7ee8c9beb337bc3f; 7663var $1458e9f1fce7481f$export$b5836b71941fa3ed; 7664var $1458e9f1fce7481f$export$cf845f2c119da08a; 7665'use strict'; 7666function $1458e9f1fce7481f$var$f(a, b) { 7667 var c = a.length; 7668 a.push(b); 7669 a: for(; 0 < c;){ 7670 var d = c - 1 >>> 1, e = a[d]; 7671 if (0 < $1458e9f1fce7481f$var$g(e, b)) a[d] = b, a[c] = e, c = d; 7672 else break a; 7673 } 7674} 7675function $1458e9f1fce7481f$var$h(a) { 7676 return 0 === a.length ? null : a[0]; 7677} 7678function $1458e9f1fce7481f$var$k(a) { 7679 if (0 === a.length) return null; 7680 var b = a[0], c = a.pop(); 7681 if (c !== b) { 7682 a[0] = c; 7683 a: for(var d = 0, e = a.length, w = e >>> 1; d < w;){ 7684 var m = 2 * (d + 1) - 1, C = a[m], n = m + 1, x = a[n]; 7685 if (0 > $1458e9f1fce7481f$var$g(C, c)) n < e && 0 > $1458e9f1fce7481f$var$g(x, C) ? (a[d] = x, a[n] = c, d = n) : (a[d] = C, a[m] = c, d = m); 7686 else if (n < e && 0 > $1458e9f1fce7481f$var$g(x, c)) a[d] = x, a[n] = c, d = n; 7687 else break a; 7688 } 7689 } 7690 return b; 7691} 7692function $1458e9f1fce7481f$var$g(a, b) { 7693 var c = a.sortIndex - b.sortIndex; 7694 return 0 !== c ? c : a.id - b.id; 7695} 7696if ("object" === typeof performance && "function" === typeof performance.now) { 7697 var $1458e9f1fce7481f$var$l = performance; 7698 $1458e9f1fce7481f$export$c4744153514ff05d = function() { 7699 return $1458e9f1fce7481f$var$l.now(); 7700 }; 7701} else { 7702 var $1458e9f1fce7481f$var$p = Date, $1458e9f1fce7481f$var$q = $1458e9f1fce7481f$var$p.now(); 7703 $1458e9f1fce7481f$export$c4744153514ff05d = function() { 7704 return $1458e9f1fce7481f$var$p.now() - $1458e9f1fce7481f$var$q; 7705 }; 7706} 7707var $1458e9f1fce7481f$var$r = [], $1458e9f1fce7481f$var$t = [], $1458e9f1fce7481f$var$u = 1, $1458e9f1fce7481f$var$v = null, $1458e9f1fce7481f$var$y = 3, $1458e9f1fce7481f$var$z = !1, $1458e9f1fce7481f$var$A = !1, $1458e9f1fce7481f$var$B = !1, $1458e9f1fce7481f$var$D = "function" === typeof setTimeout ? setTimeout : null, $1458e9f1fce7481f$var$E = "function" === typeof clearTimeout ? clearTimeout : null, $1458e9f1fce7481f$var$F = "undefined" !== typeof setImmediate ? setImmediate : null; 7708"undefined" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling); 7709function $1458e9f1fce7481f$var$G(a) { 7710 for(var b = $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$t); null !== b;){ 7711 if (null === b.callback) $1458e9f1fce7481f$var$k($1458e9f1fce7481f$var$t); 7712 else if (b.startTime <= a) $1458e9f1fce7481f$var$k($1458e9f1fce7481f$var$t), b.sortIndex = b.expirationTime, $1458e9f1fce7481f$var$f($1458e9f1fce7481f$var$r, b); 7713 else break; 7714 b = $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$t); 7715 } 7716} 7717function $1458e9f1fce7481f$var$H(a) { 7718 $1458e9f1fce7481f$var$B = !1; 7719 $1458e9f1fce7481f$var$G(a); 7720 if (!$1458e9f1fce7481f$var$A) { 7721 if (null !== $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$r)) $1458e9f1fce7481f$var$A = !0, $1458e9f1fce7481f$var$I($1458e9f1fce7481f$var$J); 7722 else { 7723 var b = $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$t); 7724 null !== b && $1458e9f1fce7481f$var$K($1458e9f1fce7481f$var$H, b.startTime - a); 7725 } 7726 } 7727} 7728function $1458e9f1fce7481f$var$J(a, b) { 7729 $1458e9f1fce7481f$var$A = !1; 7730 $1458e9f1fce7481f$var$B && ($1458e9f1fce7481f$var$B = !1, $1458e9f1fce7481f$var$E($1458e9f1fce7481f$var$L), $1458e9f1fce7481f$var$L = -1); 7731 $1458e9f1fce7481f$var$z = !0; 7732 var c = $1458e9f1fce7481f$var$y; 7733 try { 7734 $1458e9f1fce7481f$var$G(b); 7735 for($1458e9f1fce7481f$var$v = $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$r); null !== $1458e9f1fce7481f$var$v && (!($1458e9f1fce7481f$var$v.expirationTime > b) || a && !$1458e9f1fce7481f$var$M());){ 7736 var d = $1458e9f1fce7481f$var$v.callback; 7737 if ("function" === typeof d) { 7738 $1458e9f1fce7481f$var$v.callback = null; 7739 $1458e9f1fce7481f$var$y = $1458e9f1fce7481f$var$v.priorityLevel; 7740 var e = d($1458e9f1fce7481f$var$v.expirationTime <= b); 7741 b = $1458e9f1fce7481f$export$c4744153514ff05d(); 7742 "function" === typeof e ? $1458e9f1fce7481f$var$v.callback = e : $1458e9f1fce7481f$var$v === $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$r) && $1458e9f1fce7481f$var$k($1458e9f1fce7481f$var$r); 7743 $1458e9f1fce7481f$var$G(b); 7744 } else $1458e9f1fce7481f$var$k($1458e9f1fce7481f$var$r); 7745 $1458e9f1fce7481f$var$v = $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$r); 7746 } 7747 if (null !== $1458e9f1fce7481f$var$v) var w = !0; 7748 else { 7749 var m = $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$t); 7750 null !== m && $1458e9f1fce7481f$var$K($1458e9f1fce7481f$var$H, m.startTime - b); 7751 w = !1; 7752 } 7753 return w; 7754 } finally{ 7755 $1458e9f1fce7481f$var$v = null, $1458e9f1fce7481f$var$y = c, $1458e9f1fce7481f$var$z = !1; 7756 } 7757} 7758var $1458e9f1fce7481f$var$N = !1, $1458e9f1fce7481f$var$O = null, $1458e9f1fce7481f$var$L = -1, $1458e9f1fce7481f$var$P = 5, $1458e9f1fce7481f$var$Q = -1; 7759function $1458e9f1fce7481f$var$M() { 7760 return $1458e9f1fce7481f$export$c4744153514ff05d() - $1458e9f1fce7481f$var$Q < $1458e9f1fce7481f$var$P ? !1 : !0; 7761} 7762function $1458e9f1fce7481f$var$R() { 7763 if (null !== $1458e9f1fce7481f$var$O) { 7764 var a = $1458e9f1fce7481f$export$c4744153514ff05d(); 7765 $1458e9f1fce7481f$var$Q = a; 7766 var b = !0; 7767 try { 7768 b = $1458e9f1fce7481f$var$O(!0, a); 7769 } finally{ 7770 b ? $1458e9f1fce7481f$var$S() : ($1458e9f1fce7481f$var$N = !1, $1458e9f1fce7481f$var$O = null); 7771 } 7772 } else $1458e9f1fce7481f$var$N = !1; 7773} 7774var $1458e9f1fce7481f$var$S; 7775if ("function" === typeof $1458e9f1fce7481f$var$F) $1458e9f1fce7481f$var$S = function() { 7776 $1458e9f1fce7481f$var$F($1458e9f1fce7481f$var$R); 7777}; 7778else if ("undefined" !== typeof MessageChannel) { 7779 var $1458e9f1fce7481f$var$T = new MessageChannel, $1458e9f1fce7481f$var$U = $1458e9f1fce7481f$var$T.port2; 7780 $1458e9f1fce7481f$var$T.port1.onmessage = $1458e9f1fce7481f$var$R; 7781 $1458e9f1fce7481f$var$S = function() { 7782 $1458e9f1fce7481f$var$U.postMessage(null); 7783 }; 7784} else $1458e9f1fce7481f$var$S = function() { 7785 $1458e9f1fce7481f$var$D($1458e9f1fce7481f$var$R, 0); 7786}; 7787function $1458e9f1fce7481f$var$I(a) { 7788 $1458e9f1fce7481f$var$O = a; 7789 $1458e9f1fce7481f$var$N || ($1458e9f1fce7481f$var$N = !0, $1458e9f1fce7481f$var$S()); 7790} 7791function $1458e9f1fce7481f$var$K(a, b) { 7792 $1458e9f1fce7481f$var$L = $1458e9f1fce7481f$var$D(function() { 7793 a($1458e9f1fce7481f$export$c4744153514ff05d()); 7794 }, b); 7795} 7796$1458e9f1fce7481f$export$3e506c1ccc9cc1a7 = 5; 7797$1458e9f1fce7481f$export$e26fe2ed2fa76875 = 1; 7798$1458e9f1fce7481f$export$502329bbf4b505b1 = 4; 7799$1458e9f1fce7481f$export$6e3807111c4874c4 = 3; 7800$1458e9f1fce7481f$export$c27134553091fb3a = null; 7801$1458e9f1fce7481f$export$33ee1acdc04fd2a2 = 2; 7802$1458e9f1fce7481f$export$b00a404bbd5edef2 = function(a) { 7803 a.callback = null; 7804}; 7805$1458e9f1fce7481f$export$8352ce38b91d0c62 = function() { 7806 $1458e9f1fce7481f$var$A || $1458e9f1fce7481f$var$z || ($1458e9f1fce7481f$var$A = !0, $1458e9f1fce7481f$var$I($1458e9f1fce7481f$var$J)); 7807}; 7808$1458e9f1fce7481f$export$d66a1c1c77bd778b = function(a) { 7809 0 > a || 125 < a ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : $1458e9f1fce7481f$var$P = 0 < a ? Math.floor(1E3 / a) : 5; 7810}; 7811$1458e9f1fce7481f$export$d3dfb8e4810cb555 = function() { 7812 return $1458e9f1fce7481f$var$y; 7813}; 7814$1458e9f1fce7481f$export$839f9183b0465a69 = function() { 7815 return $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$r); 7816}; 7817$1458e9f1fce7481f$export$72fdf0e06517287b = function(a) { 7818 switch($1458e9f1fce7481f$var$y){ 7819 case 1: 7820 case 2: 7821 case 3: 7822 var b = 3; 7823 break; 7824 default: 7825 b = $1458e9f1fce7481f$var$y; 7826 } 7827 var c = $1458e9f1fce7481f$var$y; 7828 $1458e9f1fce7481f$var$y = b; 7829 try { 7830 return a(); 7831 } finally{ 7832 $1458e9f1fce7481f$var$y = c; 7833 } 7834}; 7835$1458e9f1fce7481f$export$4b844e58a3e414b4 = function() {}; 7836$1458e9f1fce7481f$export$816d2913ae6b83b1 = function() {}; 7837$1458e9f1fce7481f$export$61bcfe829111a1d0 = function(a, b) { 7838 switch(a){ 7839 case 1: 7840 case 2: 7841 case 3: 7842 case 4: 7843 case 5: 7844 break; 7845 default: 7846 a = 3; 7847 } 7848 var c = $1458e9f1fce7481f$var$y; 7849 $1458e9f1fce7481f$var$y = a; 7850 try { 7851 return b(); 7852 } finally{ 7853 $1458e9f1fce7481f$var$y = c; 7854 } 7855}; 7856$1458e9f1fce7481f$export$7ee8c9beb337bc3f = function(a, b, c) { 7857 var d = $1458e9f1fce7481f$export$c4744153514ff05d(); 7858 "object" === typeof c && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d; 7859 switch(a){ 7860 case 1: 7861 var e = -1; 7862 break; 7863 case 2: 7864 e = 250; 7865 break; 7866 case 5: 7867 e = 1073741823; 7868 break; 7869 case 4: 7870 e = 1E4; 7871 break; 7872 default: 7873 e = 5E3; 7874 } 7875 e = c + e; 7876 a = { 7877 id: $1458e9f1fce7481f$var$u++, 7878 callback: b, 7879 priorityLevel: a, 7880 startTime: c, 7881 expirationTime: e, 7882 sortIndex: -1 7883 }; 7884 c > d ? (a.sortIndex = c, $1458e9f1fce7481f$var$f($1458e9f1fce7481f$var$t, a), null === $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$r) && a === $1458e9f1fce7481f$var$h($1458e9f1fce7481f$var$t) && ($1458e9f1fce7481f$var$B ? ($1458e9f1fce7481f$var$E($1458e9f1fce7481f$var$L), $1458e9f1fce7481f$var$L = -1) : $1458e9f1fce7481f$var$B = !0, $1458e9f1fce7481f$var$K($1458e9f1fce7481f$var$H, c - d))) : (a.sortIndex = e, $1458e9f1fce7481f$var$f($1458e9f1fce7481f$var$r, a), $1458e9f1fce7481f$var$A || $1458e9f1fce7481f$var$z || ($1458e9f1fce7481f$var$A = !0, $1458e9f1fce7481f$var$I($1458e9f1fce7481f$var$J))); 7885 return a; 7886}; 7887$1458e9f1fce7481f$export$b5836b71941fa3ed = $1458e9f1fce7481f$var$M; 7888$1458e9f1fce7481f$export$cf845f2c119da08a = function(a) { 7889 var b = $1458e9f1fce7481f$var$y; 7890 return function() { 7891 var c = $1458e9f1fce7481f$var$y; 7892 $1458e9f1fce7481f$var$y = b; 7893 try { 7894 return a.apply(this, arguments); 7895 } finally{ 7896 $1458e9f1fce7481f$var$y = c; 7897 } 7898 }; 7899}; 7900 7901}); 7902 7903 7904
7905parcelRegister("5PkP4", function(module, exports) { 7906'use strict'; 7907 7908var $89e92 = parcelRequire("89e92"); 7909 7910var $dTPtR = parcelRequire("dTPtR"); 7911 7912var $hi63r = parcelRequire("hi63r"); 7913 7914var $jxiXD = parcelRequire("jxiXD"); 7915 7916var $buJKY = parcelRequire("buJKY"); 7917/** 7918 * Create an instance of Axios 7919 * 7920 * @param {Object} defaultConfig The default config for the instance 7921 * @return {Axios} A new instance of Axios 7922 */ function $43e1de1e60874524$var$createInstance(defaultConfig) { 7923 var context = new $hi63r(defaultConfig); 7924 var instance = $dTPtR($hi63r.prototype.request, context); 7925 // Copy axios.prototype to instance 7926 $89e92.extend(instance, $hi63r.prototype, context); 7927 // Copy context to instance 7928 $89e92.extend(instance, context); 7929 // Factory for creating new instances 7930 instance.create = function create(instanceConfig) { 7931 return $43e1de1e60874524$var$createInstance($jxiXD(defaultConfig, instanceConfig)); 7932 }; 7933 return instance; 7934} 7935// Create the default instance to be exported 7936var $43e1de1e60874524$var$axios = $43e1de1e60874524$var$createInstance($buJKY); 7937// Expose Axios class to allow class inheritance 7938$43e1de1e60874524$var$axios.Axios = $hi63r; 7939 7940// Expose Cancel & CancelToken 7941$43e1de1e60874524$var$axios.Cancel = (parcelRequire("aJrjM")); 7942 7943$43e1de1e60874524$var$axios.CancelToken = (parcelRequire("2WJ28")); 7944 7945$43e1de1e60874524$var$axios.isCancel = (parcelRequire("4HFcn")); 7946 7947$43e1de1e60874524$var$axios.VERSION = (parcelRequire("fZjdx")).version; 7948// Expose all/spread 7949$43e1de1e60874524$var$axios.all = function all(promises) { 7950 return Promise.all(promises); 7951}; 7952 7953$43e1de1e60874524$var$axios.spread = (parcelRequire("2YWFU")); 7954 7955// Expose isAxiosError 7956$43e1de1e60874524$var$axios.isAxiosError = (parcelRequire("7rg2Q")); 7957module.exports = $43e1de1e60874524$var$axios; 7958// Allow use of default import syntax in TypeScript 7959module.exports.default = $43e1de1e60874524$var$axios; 7960 7961}); 7962parcelRegister("89e92", function(module, exports) { 7963'use strict'; 7964 7965var $dTPtR = parcelRequire("dTPtR"); 7966// utils is a library of generic helper functions non-specific to axios 7967var $5eea22db2969038e$var$toString = Object.prototype.toString; 7968/** 7969 * Determine if a value is an Array 7970 * 7971 * @param {Object} val The value to test 7972 * @returns {boolean} True if value is an Array, otherwise false 7973 */ function $5eea22db2969038e$var$isArray(val) { 7974 return $5eea22db2969038e$var$toString.call(val) === '[object Array]'; 7975} 7976/** 7977 * Determine if a value is undefined 7978 * 7979 * @param {Object} val The value to test 7980 * @returns {boolean} True if the value is undefined, otherwise false 7981 */ function $5eea22db2969038e$var$isUndefined(val) { 7982 return typeof val === 'undefined'; 7983} 7984/** 7985 * Determine if a value is a Buffer 7986 * 7987 * @param {Object} val The value to test 7988 * @returns {boolean} True if value is a Buffer, otherwise false 7989 */ function $5eea22db2969038e$var$isBuffer(val) { 7990 return val !== null && !$5eea22db2969038e$var$isUndefined(val) && val.constructor !== null && !$5eea22db2969038e$var$isUndefined(val.constructor) && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); 7991} 7992/** 7993 * Determine if a value is an ArrayBuffer 7994 * 7995 * @param {Object} val The value to test 7996 * @returns {boolean} True if value is an ArrayBuffer, otherwise false 7997 */ function $5eea22db2969038e$var$isArrayBuffer(val) { 7998 return $5eea22db2969038e$var$toString.call(val) === '[object ArrayBuffer]'; 7999} 8000/** 8001 * Determine if a value is a FormData 8002 * 8003 * @param {Object} val The value to test 8004 * @returns {boolean} True if value is an FormData, otherwise false 8005 */ function $5eea22db2969038e$var$isFormData(val) { 8006 return typeof FormData !== 'undefined' && val instanceof FormData; 8007} 8008/** 8009 * Determine if a value is a view on an ArrayBuffer 8010 * 8011 * @param {Object} val The value to test 8012 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false 8013 */ function $5eea22db2969038e$var$isArrayBufferView(val) { 8014 var result; 8015 if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) result = ArrayBuffer.isView(val); 8016 else result = val && val.buffer && val.buffer instanceof ArrayBuffer; 8017 return result; 8018} 8019/** 8020 * Determine if a value is a String 8021 * 8022 * @param {Object} val The value to test 8023 * @returns {boolean} True if value is a String, otherwise false 8024 */ function $5eea22db2969038e$var$isString(val) { 8025 return typeof val === 'string'; 8026} 8027/** 8028 * Determine if a value is a Number 8029 * 8030 * @param {Object} val The value to test 8031 * @returns {boolean} True if value is a Number, otherwise false 8032 */ function $5eea22db2969038e$var$isNumber(val) { 8033 return typeof val === 'number'; 8034} 8035/** 8036 * Determine if a value is an Object 8037 * 8038 * @param {Object} val The value to test 8039 * @returns {boolean} True if value is an Object, otherwise false 8040 */ function $5eea22db2969038e$var$isObject(val) { 8041 return val !== null && typeof val === 'object'; 8042} 8043/** 8044 * Determine if a value is a plain Object 8045 * 8046 * @param {Object} val The value to test 8047 * @return {boolean} True if value is a plain Object, otherwise false 8048 */ function $5eea22db2969038e$var$isPlainObject(val) { 8049 if ($5eea22db2969038e$var$toString.call(val) !== '[object Object]') return false;
8050 var prototype = Object.getPrototypeOf(val); 8051 return prototype === null || prototype === Object.prototype; 8052} 8053/** 8054 * Determine if a value is a Date 8055 * 8056 * @param {Object} val The value to test 8057 * @returns {boolean} True if value is a Date, otherwise false 8058 */ function $5eea22db2969038e$var$isDate(val) { 8059 return $5eea22db2969038e$var$toString.call(val) === '[object Date]'; 8060} 8061/** 8062 * Determine if a value is a File 8063 * 8064 * @param {Object} val The value to test 8065 * @returns {boolean} True if value is a File, otherwise false 8066 */ function $5eea22db2969038e$var$isFile(val) { 8067 return $5eea22db2969038e$var$toString.call(val) === '[object File]'; 8068} 8069/** 8070 * Determine if a value is a Blob 8071 * 8072 * @param {Object} val The value to test 8073 * @returns {boolean} True if value is a Blob, otherwise false 8074 */ function $5eea22db2969038e$var$isBlob(val) { 8075 return $5eea22db2969038e$var$toString.call(val) === '[object Blob]'; 8076} 8077/** 8078 * Determine if a value is a Function 8079 * 8080 * @param {Object} val The value to test 8081 * @returns {boolean} True if value is a Function, otherwise false 8082 */ function $5eea22db2969038e$var$isFunction(val) { 8083 return $5eea22db2969038e$var$toString.call(val) === '[object Function]'; 8084} 8085/** 8086 * Determine if a value is a Stream 8087 * 8088 * @param {Object} val The value to test 8089 * @returns {boolean} True if value is a Stream, otherwise false 8090 */ function $5eea22db2969038e$var$isStream(val) { 8091 return $5eea22db2969038e$var$isObject(val) && $5eea22db2969038e$var$isFunction(val.pipe); 8092} 8093/** 8094 * Determine if a value is a URLSearchParams object 8095 * 8096 * @param {Object} val The value to test 8097 * @returns {boolean} True if value is a URLSearchParams object, otherwise false 8098 */ function $5eea22db2969038e$var$isURLSearchParams(val) { 8099 return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; 8100} 8101/** 8102 * Trim excess whitespace off the beginning and end of a string 8103 * 8104 * @param {String} str The String to trim 8105 * @returns {String} The String freed of excess whitespace 8106 */ function $5eea22db2969038e$var$trim(str) { 8107 return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); 8108} 8109/** 8110 * Determine if we're running in a standard browser environment 8111 * 8112 * This allows axios to run in a web worker, and react-native. 8113 * Both environments support XMLHttpRequest, but not fully standard globals. 8114 * 8115 * web workers: 8116 * typeof window -> undefined 8117 * typeof document -> undefined 8118 * 8119 * react-native: 8120 * navigator.product -> 'ReactNative' 8121 * nativescript 8122 * navigator.product -> 'NativeScript' or 'NS' 8123 */ function $5eea22db2969038e$var$isStandardBrowserEnv() { 8124 if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) return false; 8125 return typeof window !== 'undefined' && typeof document !== 'undefined'; 8126} 8127/** 8128 * Iterate over an Array or an Object invoking a function for each item. 8129 * 8130 * If `obj` is an Array callback will be called passing 8131 * the value, index, and complete array for each item. 8132 * 8133 * If 'obj' is an Object callback will be called passing 8134 * the value, key, and complete object for each property. 8135 * 8136 * @param {Object|Array} obj The object to iterate 8137 * @param {Function} fn The callback to invoke for each item 8138 */ function $5eea22db2969038e$var$forEach(obj, fn) { 8139 // Don't bother if no value provided 8140 if (obj === null || typeof obj === 'undefined') return; 8141 // Force an array if not already something iterable 8142 if (typeof obj !== 'object') /*eslint no-param-reassign:0*/ obj = [ 8143 obj 8144 ]; 8145 if ($5eea22db2969038e$var$isArray(obj)) // Iterate over array values 8146 for(var i = 0, l = obj.length; i < l; i++)fn.call(null, obj[i], i, obj); 8147 else { 8148 // Iterate over object keys 8149 for(var key in obj)if (Object.prototype.hasOwnProperty.call(obj, key)) fn.call(null, obj[key], key, obj); 8150 } 8151} 8152/** 8153 * Accepts varargs expecting each argument to be an object, then 8154 * immutably merges the properties of each object and returns result. 8155 * 8156 * When multiple objects contain the same key the later object in 8157 * the arguments list will take precedence. 8158 * 8159 * Example: 8160 * 8161 * ```js 8162 * var result = merge({foo: 123}, {foo: 456}); 8163 * console.log(result.foo); // outputs 456 8164 * ``` 8165 * 8166 * @param {Object} obj1 Object to merge 8167 * @returns {Object} Result of all merge properties 8168 */ function $5eea22db2969038e$var$merge() { 8169 var result = {}; 8170 function assignValue(val, key) { 8171 if ($5eea22db2969038e$var$isPlainObject(result[key]) && $5eea22db2969038e$var$isPlainObject(val)) result[key] = $5eea22db2969038e$var$merge(result[key], val); 8172 else if ($5eea22db2969038e$var$isPlainObject(val)) result[key] = $5eea22db2969038e$var$merge({}, val); 8173 else if ($5eea22db2969038e$var$isArray(val)) result[key] = val.slice(); 8174 else result[key] = val; 8175 } 8176 for(var i = 0, l = arguments.length; i < l; i++)$5eea22db2969038e$var$forEach(arguments[i], assignValue); 8177 return result; 8178} 8179/** 8180 * Extends object a by mutably adding to it the properties of object b. 8181 * 8182 * @param {Object} a The object to be extended 8183 * @param {Object} b The object to copy properties from 8184 * @param {Object} thisArg The object to bind function to 8185 * @return {Object} The resulting value of object a 8186 */ function $5eea22db2969038e$var$extend(a, b, thisArg) { 8187 $5eea22db2969038e$var$forEach(b, function assignValue(val, key) { 8188 if (thisArg && typeof val === 'function') a[key] = $dTPtR(val, thisArg); 8189 else a[key] = val; 8190 }); 8191 return a; 8192} 8193/** 8194 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) 8195 * 8196 * @param {string} content with BOM 8197 * @return {string} content value without BOM 8198 */ function $5eea22db2969038e$var$stripBOM(content) { 8199 if (content.charCodeAt(0) === 0xFEFF) content = content.slice(1); 8200 return content; 8201} 8202module.exports = { 8203 isArray: $5eea22db2969038e$var$isArray, 8204 isArrayBuffer: $5eea22db2969038e$var$isArrayBuffer, 8205 isBuffer: $5eea22db2969038e$var$isBuffer, 8206 isFormData: $5eea22db2969038e$var$isFormData, 8207 isArrayBufferView: $5eea22db2969038e$var$isArrayBufferView, 8208 isString: $5eea22db2969038e$var$isString, 8209 isNumber: $5eea22db2969038e$var$isNumber, 8210 isObject: $5eea22db2969038e$var$isObject, 8211 isPlainObject: $5eea22db2969038e$var$isPlainObject, 8212 isUndefined: $5eea22db2969038e$var$isUndefined, 8213 isDate: $5eea22db2969038e$var$isDate, 8214 isFile: $5eea22db2969038e$var$isFile, 8215 isBlob: $5eea22db2969038e$var$isBlob, 8216 isFunction: $5eea22db2969038e$var$isFunction, 8217 isStream: $5eea22db2969038e$var$isStream, 8218 isURLSearchParams: $5eea22db2969038e$var$isURLSearchParams, 8219 isStandardBrowserEnv: $5eea22db2969038e$var$isStandardBrowserEnv,
8220 forEach: $5eea22db2969038e$var$forEach, 8221 merge: $5eea22db2969038e$var$merge, 8222 extend: $5eea22db2969038e$var$extend, 8223 trim: $5eea22db2969038e$var$trim, 8224 stripBOM: $5eea22db2969038e$var$stripBOM 8225}; 8226 8227}); 8228parcelRegister("dTPtR", function(module, exports) { 8229'use strict'; 8230module.exports = function bind(fn, thisArg) { 8231 return function wrap() { 8232 var args = new Array(arguments.length); 8233 for(var i = 0; i < args.length; i++)args[i] = arguments[i]; 8234 return fn.apply(thisArg, args); 8235 }; 8236}; 8237 8238}); 8239 8240 8241parcelRegister("hi63r", function(module, exports) { 8242'use strict'; 8243 8244var $89e92 = parcelRequire("89e92"); 8245 8246var $9wHch = parcelRequire("9wHch"); 8247 8248var $kpzuo = parcelRequire("kpzuo"); 8249 8250var $iN8hN = parcelRequire("iN8hN"); 8251 8252var $jxiXD = parcelRequire("jxiXD"); 8253 8254var $5wtUN = parcelRequire("5wtUN"); 8255var $c968d06490bc1319$var$validators = $5wtUN.validators; 8256/** 8257 * Create a new instance of Axios 8258 * 8259 * @param {Object} instanceConfig The default config for the instance 8260 */ function $c968d06490bc1319$var$Axios(instanceConfig) { 8261 this.defaults = instanceConfig; 8262 this.interceptors = { 8263 request: new $kpzuo(), 8264 response: new $kpzuo() 8265 }; 8266} 8267/** 8268 * Dispatch a request 8269 * 8270 * @param {Object} config The config specific for this request (merged with this.defaults) 8271 */ $c968d06490bc1319$var$Axios.prototype.request = function request(config) { 8272 /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API 8273 if (typeof config === 'string') { 8274 config = arguments[1] || {}; 8275 config.url = arguments[0]; 8276 } else config = config || {}; 8277 config = $jxiXD(this.defaults, config); 8278 // Set config.method 8279 if (config.method) config.method = config.method.toLowerCase(); 8280 else if (this.defaults.method) config.method = this.defaults.method.toLowerCase(); 8281 else config.method = 'get'; 8282 var transitional = config.transitional; 8283 if (transitional !== undefined) $5wtUN.assertOptions(transitional, { 8284 silentJSONParsing: $c968d06490bc1319$var$validators.transitional($c968d06490bc1319$var$validators.boolean), 8285 forcedJSONParsing: $c968d06490bc1319$var$validators.transitional($c968d06490bc1319$var$validators.boolean), 8286 clarifyTimeoutError: $c968d06490bc1319$var$validators.transitional($c968d06490bc1319$var$validators.boolean) 8287 }, false); 8288 // filter out skipped interceptors 8289 var requestInterceptorChain = []; 8290 var synchronousRequestInterceptors = true; 8291 this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { 8292 if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) return; 8293 synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; 8294 requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); 8295 }); 8296 var responseInterceptorChain = []; 8297 this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { 8298 responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); 8299 }); 8300 var promise; 8301 if (!synchronousRequestInterceptors) { 8302 var chain = [ 8303 $iN8hN, 8304 undefined 8305 ]; 8306 Array.prototype.unshift.apply(chain, requestInterceptorChain); 8307 chain = chain.concat(responseInterceptorChain); 8308 promise = Promise.resolve(config); 8309 while(chain.length)promise = promise.then(chain.shift(), chain.shift()); 8310 return promise; 8311 } 8312 var newConfig = config; 8313 while(requestInterceptorChain.length){ 8314 var onFulfilled = requestInterceptorChain.shift(); 8315 var onRejected = requestInterceptorChain.shift(); 8316 try { 8317 newConfig = onFulfilled(newConfig); 8318 } catch (error) { 8319 onRejected(error); 8320 break; 8321 } 8322 } 8323 try { 8324 promise = $iN8hN(newConfig); 8325 } catch (error) { 8326 return Promise.reject(error); 8327 } 8328 while(responseInterceptorChain.length)promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); 8329 return promise; 8330}; 8331$c968d06490bc1319$var$Axios.prototype.getUri = function getUri(config) { 8332 config = $jxiXD(this.defaults, config); 8333 return $9wHch(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); 8334}; 8335// Provide aliases for supported request methods 8336$89e92.forEach([ 8337 'delete', 8338 'get', 8339 'head', 8340 'options' 8341], function forEachMethodNoData(method) { 8342 /*eslint func-names:0*/ $c968d06490bc1319$var$Axios.prototype[method] = function(url, config) { 8343 return this.request($jxiXD(config || {}, { 8344 method: method, 8345 url: url, 8346 data: (config || {}).data 8347 })); 8348 }; 8349}); 8350$89e92.forEach([ 8351 'post', 8352 'put', 8353 'patch' 8354], function forEachMethodWithData(method) { 8355 /*eslint func-names:0*/ $c968d06490bc1319$var$Axios.prototype[method] = function(url, data, config) { 8356 return this.request($jxiXD(config || {}, { 8357 method: method, 8358 url: url, 8359 data: data 8360 })); 8361 }; 8362}); 8363module.exports = $c968d06490bc1319$var$Axios; 8364 8365});
8366parcelRegister("9wHch", function(module, exports) { 8367'use strict'; 8368 8369var $89e92 = parcelRequire("89e92"); 8370function $6ef89c4602e76839$var$encode(val) { 8371 return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); 8372} 8373/** 8374 * Build a URL by appending params to the end 8375 * 8376 * @param {string} url The base of the url (e.g., http://www.google.com) 8377 * @param {object} [params] The params to be appended 8378 * @returns {string} The formatted url 8379 */ module.exports = function buildURL(url, params, paramsSerializer) { 8380 /*eslint no-param-reassign:0*/ if (!params) return url; 8381 var serializedParams; 8382 if (paramsSerializer) serializedParams = paramsSerializer(params); 8383 else if ($89e92.isURLSearchParams(params)) serializedParams = params.toString(); 8384 else { 8385 var parts = []; 8386 $89e92.forEach(params, function serialize(val, key) { 8387 if (val === null || typeof val === 'undefined') return; 8388 if ($89e92.isArray(val)) key = key + '[]'; 8389 else val = [ 8390 val 8391 ]; 8392 $89e92.forEach(val, function parseValue(v) { 8393 if ($89e92.isDate(v)) v = v.toISOString(); 8394 else if ($89e92.isObject(v)) v = JSON.stringify(v); 8395 parts.push($6ef89c4602e76839$var$encode(key) + '=' + $6ef89c4602e76839$var$encode(v)); 8396 }); 8397 }); 8398 serializedParams = parts.join('&'); 8399 } 8400 if (serializedParams) { 8401 var hashmarkIndex = url.indexOf('#'); 8402 if (hashmarkIndex !== -1) url = url.slice(0, hashmarkIndex); 8403 url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; 8404 } 8405 return url; 8406}; 8407 8408}); 8409 8410parcelRegister("kpzuo", function(module, exports) { 8411'use strict'; 8412 8413var $89e92 = parcelRequire("89e92"); 8414function $edc1abd7ed65816d$var$InterceptorManager() { 8415 this.handlers = []; 8416} 8417/** 8418 * Add a new interceptor to the stack 8419 * 8420 * @param {Function} fulfilled The function to handle `then` for a `Promise` 8421 * @param {Function} rejected The function to handle `reject` for a `Promise` 8422 * 8423 * @return {Number} An ID used to remove interceptor later 8424 */ $edc1abd7ed65816d$var$InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { 8425 this.handlers.push({ 8426 fulfilled: fulfilled, 8427 rejected: rejected, 8428 synchronous: options ? options.synchronous : false, 8429 runWhen: options ? options.runWhen : null 8430 }); 8431 return this.handlers.length - 1; 8432}; 8433/** 8434 * Remove an interceptor from the stack 8435 * 8436 * @param {Number} id The ID that was returned by `use` 8437 */ $edc1abd7ed65816d$var$InterceptorManager.prototype.eject = function eject(id) { 8438 if (this.handlers[id]) this.handlers[id] = null; 8439}; 8440/** 8441 * Iterate over all the registered interceptors 8442 * 8443 * This method is particularly useful for skipping over any 8444 * interceptors that may have become `null` calling `eject`. 8445 * 8446 * @param {Function} fn The function to call for each interceptor 8447 */ $edc1abd7ed65816d$var$InterceptorManager.prototype.forEach = function forEach(fn) { 8448 $89e92.forEach(this.handlers, function forEachHandler(h) { 8449 if (h !== null) fn(h); 8450 }); 8451}; 8452module.exports = $edc1abd7ed65816d$var$InterceptorManager; 8453 8454}); 8455 8456parcelRegister("iN8hN", function(module, exports) { 8457'use strict'; 8458 8459var $89e92 = parcelRequire("89e92"); 8460 8461var $3xdUl = parcelRequire("3xdUl"); 8462 8463var $4HFcn = parcelRequire("4HFcn"); 8464 8465var $buJKY = parcelRequire("buJKY"); 8466 8467var $aJrjM = parcelRequire("aJrjM"); 8468/** 8469 * Throws a `Cancel` if cancellation has been requested. 8470 */ function $dae33b036a4776be$var$throwIfCancellationRequested(config) { 8471 if (config.cancelToken) config.cancelToken.throwIfRequested(); 8472 if (config.signal && config.signal.aborted) throw new $aJrjM('canceled'); 8473} 8474/** 8475 * Dispatch a request to the server using the configured adapter. 8476 * 8477 * @param {object} config The config that is to be used for the request 8478 * @returns {Promise} The Promise to be fulfilled 8479 */ module.exports = function dispatchRequest(config) { 8480 $dae33b036a4776be$var$throwIfCancellationRequested(config); 8481 // Ensure headers exist 8482 config.headers = config.headers || {}; 8483 // Transform request data 8484 config.data = $3xdUl.call(config, config.data, config.headers, config.transformRequest); 8485 // Flatten headers 8486 config.headers = $89e92.merge(config.headers.common || {}
8486, config.headers[config.method] || {}, config.headers); 8487 $89e92.forEach([ 8488 'delete', 8489 'get', 8490 'head', 8491 'post', 8492 'put', 8493 'patch', 8494 'common' 8495 ], function cleanHeaderConfig(method) { 8496 delete config.headers[method]; 8497 }); 8498 var adapter = config.adapter || $buJKY.adapter; 8499 return adapter(config).then(function onAdapterResolution(response) { 8500 $dae33b036a4776be$var$throwIfCancellationRequested(config); 8501 // Transform response data 8502 response.data = $3xdUl.call(config, response.data, response.headers, config.transformResponse); 8503 return response; 8504 }, function onAdapterRejection(reason) { 8505 if (!$4HFcn(reason)) { 8506 $dae33b036a4776be$var$throwIfCancellationRequested(config); 8507 // Transform response data 8508 if (reason && reason.response) reason.response.data = $3xdUl.call(config, reason.response.data, reason.response.headers, config.transformResponse); 8509 } 8510 return Promise.reject(reason); 8511 }); 8512}; 8513 8514}); 8515parcelRegister("3xdUl", function(module, exports) { 8516'use strict'; 8517 8518var $89e92 = parcelRequire("89e92"); 8519 8520var $buJKY = parcelRequire("buJKY"); 8521/** 8522 * Transform the data for a request or a response 8523 * 8524 * @param {Object|String} data The data to be transformed 8525 * @param {Array} headers The headers for the request or response 8526 * @param {Array|Function} fns A single function or Array of functions 8527 * @returns {*} The resulting transformed data 8528 */ module.exports = function transformData(data, headers, fns) { 8529 var context = this || $buJKY; 8530 /*eslint no-param-reassign:0*/ $89e92.forEach(fns, function transform(fn) { 8531 data = fn.call(context, data, headers); 8532 }); 8533 return data; 8534}; 8535 8536}); 8537parcelRegister("buJKY", function(module, exports) { 8538'use strict'; 8539 8540var $89e92 = parcelRequire("89e92"); 8541 8542var $1Dis0 = parcelRequire("1Dis0"); 8543 8544var $aLtXx = parcelRequire("aLtXx"); 8545var $85e5fd60a1b9c233$var$DEFAULT_CONTENT_TYPE = { 8546 'Content-Type': 'application/x-www-form-urlencoded' 8547}; 8548function $85e5fd60a1b9c233$var$setContentTypeIfUnset(headers, value) { 8549 if (!$89e92.isUndefined(headers) && $89e92.isUndefined(headers['Content-Type'])) headers['Content-Type'] = value; 8550} 8551 8552function $85e5fd60a1b9c233$var$getDefaultAdapter() { 8553 var adapter; 8554 if (typeof XMLHttpRequest !== 'undefined') // For browsers use XHR adapter 8555 adapter = (parcelRequire("89h6s")); 8556 return adapter; 8557} 8558function $85e5fd60a1b9c233$var$stringifySafely(rawValue, parser, encoder) { 8559 if ($89e92.isString(rawValue)) try { 8560 (parser || JSON.parse)(rawValue); 8561 return $89e92.trim(rawValue); 8562 } catch (e) { 8563 if (e.name !== 'SyntaxError') throw e; 8564 } 8565 return (encoder || JSON.stringify)(rawValue); 8566} 8567var $85e5fd60a1b9c233$var$defaults = { 8568 transitional: { 8569 silentJSONParsing: true, 8570 forcedJSONParsing: true, 8571 clarifyTimeoutError: false 8572 }, 8573 adapter: $85e5fd60a1b9c233$var$getDefaultAdapter(), 8574 transformRequest: [ 8575 function transformRequest(data, headers) { 8576 $1Dis0(headers, 'Accept'); 8577 $1Dis0(headers, 'Content-Type'); 8578 if ($89e92.isFormData(data) || $89e92.isArrayBuffer(data) || $89e92.isBuffer(data) || $89e92.isStream(data) || $89e92.isFile(data) || $89e92.isBlob(data)) return data; 8579 if ($89e92.isArrayBufferView(data)) return data.buffer; 8580 if ($89e92.isURLSearchParams(data)) { 8581 $85e5fd60a1b9c233$var$setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); 8582 return data.toString(); 8583 } 8584 if ($89e92.isObject(data) || headers && headers['Content-Type'] === 'application/json') { 8585 $85e5fd60a1b9c233$var$setContentTypeIfUnset(headers, 'application/json'); 8586 return $85e5fd60a1b9c233$var$stringifySafely(data); 8587 } 8588 return data; 8589 } 8590 ], 8591 transformResponse: [ 8592 function transformResponse(data) { 8593 var transitional = this.transitional || $85e5fd60a1b9c233$var$defaults.transitional; 8594 var silentJSONParsing = transitional && transitional.silentJSONParsing; 8595 var forcedJSONParsing = transitional && transitional.forcedJSONParsing; 8596 var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; 8597 if (strictJSONParsing || forcedJSONParsing && $89e92.isString(data) && data.length) try { 8598 return JSON.parse(data); 8599 } catch (e) { 8600 if (strictJSONParsing) { 8601 if (e.name === 'SyntaxError') throw $aLtXx(e, this, 'E_JSON_PARSE'); 8602 throw e; 8603 } 8604 } 8605 return data; 8606 } 8607 ], 8608 /** 8609 * A timeout in milliseconds to abort a request. If set to 0 (default) a 8610 * timeout is not created. 8611 */ timeout: 0, 8612 xsrfCookieName: 'XSRF-TOKEN', 8613 xsrfHeaderName: 'X-XSRF-TOKEN', 8614 maxContentLength: -1,
8615 maxBodyLength: -1, 8616 validateStatus: function validateStatus(status) { 8617 return status >= 200 && status < 300; 8618 }, 8619 headers: { 8620 common: { 8621 'Accept': 'application/json, text/plain, */*' 8622 } 8623 } 8624}; 8625$89e92.forEach([ 8626 'delete', 8627 'get', 8628 'head' 8629], function forEachMethodNoData(method) { 8630 $85e5fd60a1b9c233$var$defaults.headers[method] = {}; 8631}); 8632$89e92.forEach([ 8633 'post', 8634 'put', 8635 'patch' 8636], function forEachMethodWithData(method) { 8637 $85e5fd60a1b9c233$var$defaults.headers[method] = $89e92.merge($85e5fd60a1b9c233$var$DEFAULT_CONTENT_TYPE); 8638}); 8639module.exports = $85e5fd60a1b9c233$var$defaults; 8640 8641}); 8642parcelRegister("1Dis0", function(module, exports) { 8643'use strict'; 8644 8645var $89e92 = parcelRequire("89e92"); 8646module.exports = function normalizeHeaderName(headers, normalizedName) { 8647 $89e92.forEach(headers, function processHeader(value, name) { 8648 if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { 8649 headers[normalizedName] = value; 8650 delete headers[name]; 8651 } 8652 }); 8653}; 8654 8655}); 8656 8657parcelRegister("aLtXx", function(module, exports) { 8658'use strict'; 8659/** 8660 * Update an Error with the specified config, error code, and response. 8661 * 8662 * @param {Error} error The error to update. 8663 * @param {Object} config The config. 8664 * @param {string} [code] The error code (for example, 'ECONNABORTED'). 8665 * @param {Object} [request] The request. 8666 * @param {Object} [response] The response. 8667 * @returns {Error} The error. 8668 */ module.exports = function enhanceError(error, config, code, request, response) { 8669 error.config = config; 8670 if (code) error.code = code; 8671 error.request = request; 8672 error.response = response; 8673 error.isAxiosError = true; 8674 error.toJSON = function toJSON() { 8675 return { 8676 // Standard 8677 message: this.message, 8678 name: this.name, 8679 // Microsoft 8680 description: this.description, 8681 number: this.number, 8682 // Mozilla 8683 fileName: this.fileName, 8684 lineNumber: this.lineNumber, 8685 columnNumber: this.columnNumber, 8686 stack: this.stack, 8687 // Axios 8688 config: this.config, 8689 code: this.code, 8690 status: this.response && this.response.status ? this.response.status : null 8691 }; 8692 }; 8693 return error; 8694}; 8695 8696}); 8697 8698parcelRegister("89h6s", function(module, exports) { 8699'use strict'; 8700 8701var $89e92 = parcelRequire("89e92"); 8702 8703var $5VT2I = parcelRequire("5VT2I"); 8704 8705var $hpd5l = parcelRequire("hpd5l"); 8706 8707var $9wHch = parcelRequire("9wHch"); 8708 8709var $3HoZB = parcelRequire("3HoZB"); 8710 8711var $d5ji5 = parcelRequire("d5ji5"); 8712 8713var $hqw6a = parcelRequire("hqw6a"); 8714 8715var $7NBKy = parcelRequire("7NBKy"); 8716 8717var $buJKY = parcelRequire("buJKY"); 8718 8719var $aJrjM = parcelRequire("aJrjM"); 8720module.exports = function xhrAdapter(config) { 8721 return new Promise(function dispatchXhrRequest(resolve, reject) { 8722 var requestData = config.data; 8723 var requestHeaders = config.headers; 8724 var responseType = config.responseType; 8725 var onCanceled; 8726 function done() { 8727 if (config.cancelToken) config.cancelToken.unsubscribe(onCanceled); 8728 if (config.signal) config.signal.removeEventListener('abort', onCanceled); 8729 } 8730 if ($89e92.isFormData(requestData)) delete requestHeaders['Content-Type']; // Let the browser set it 8731 var request = new XMLHttpRequest(); 8732 // HTTP basic authentication 8733 if (config.auth) { 8734 var username = config.auth.username || ''; 8735 var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; 8736 requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); 8737 } 8738 var fullPath = $3HoZB(config.baseURL, config.url); 8739 request.open(config.method.toUpperCase(), $9wHch(fullPath, config.params, config.paramsSerializer), true); 8740 // Set the request timeout in MS 8741 request.timeout = config.timeout; 8742 function onloadend() { 8743 if (!request) return; 8744 // Prepare the response 8745 var responseHeaders = 'getAllResponseHeaders' in request ? $d5ji5(request.getAllResponseHeaders()) : null; 8746 var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response; 8747 var response = { 8748 data: responseData, 8749 status: request.status, 8750 statusText: request.statusText, 8751 headers: responseHeaders, 8752 config: config, 8753 request: request 8754 }; 8755 $5VT2I(function _resolve(value) { 8756 resolve(value); 8757 done(); 8758 }, function _reject(err) { 8759 reject(err); 8760 done(); 8761 }, response); 8762 // Clean up request 8763 request = null; 8764 } 8765 if ('onloadend' in request) // Use onloadend if available 8766 request.onloadend = onloadend; 8767 else // Listen for ready state to emulate onloadend 8768 request.onreadystatechange = function handleLoad() { 8769 if (!request || request.readyState !== 4) return; 8770 // The request errored out and we didn't get a response, this will be 8771 // handled by onerror instead
8772 // With one exception: request that using file: protocol, most browsers 8773 // will return status as 0 even though it's a successful request 8774 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) return; 8775 // readystate handler is calling before onerror or ontimeout handlers, 8776 // so we should call onloadend on the next 'tick' 8777 setTimeout(onloadend); 8778 }; 8779 // Handle browser request cancellation (as opposed to a manual cancellation) 8780 request.onabort = function handleAbort() { 8781 if (!request) return; 8782 reject($7NBKy('Request aborted', config, 'ECONNABORTED', request)); 8783 // Clean up request 8784 request = null; 8785 }; 8786 // Handle low level network errors 8787 request.onerror = function handleError() { 8788 // Real errors are hidden from us by the browser 8789 // onerror should only fire if it's a network error 8790 reject($7NBKy('Network Error', config, null, request)); 8791 // Clean up request 8792 request = null; 8793 }; 8794 // Handle timeout 8795 request.ontimeout = function handleTimeout() { 8796 var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; 8797 var transitional = config.transitional || $buJKY.transitional; 8798 if (config.timeoutErrorMessage) timeoutErrorMessage = config.timeoutErrorMessage; 8799 reject($7NBKy(timeoutErrorMessage, config, transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', request)); 8800 // Clean up request 8801 request = null; 8802 }; 8803 // Add xsrf header 8804 // This is only done if running in a standard browser environment. 8805 // Specifically not if we're in a web worker, or react-native. 8806 if ($89e92.isStandardBrowserEnv()) { 8807 // Add xsrf header 8808 var xsrfValue = (config.withCredentials || $hqw6a(fullPath)) && config.xsrfCookieName ? $hpd5l.read(config.xsrfCookieName) : undefined; 8809 if (xsrfValue) requestHeaders[config.xsrfHeaderName] = xsrfValue; 8810 } 8811 // Add headers to the request 8812 if ('setRequestHeader' in request) $89e92.forEach(requestHeaders, function setRequestHeader(val, key) { 8813 if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') // Remove Content-Type if data is undefined 8814 delete requestHeaders[key]; 8815 else // Otherwise add header to the request 8816 request.setRequestHeader(key, val); 8817 }); 8818 // Add withCredentials to request if needed 8819 if (!$89e92.isUndefined(config.withCredentials)) request.withCredentials = !!config.withCredentials; 8820 // Add responseType to request if needed 8821 if (responseType && responseType !== 'json') request.responseType = config.responseType; 8822 // Handle progress if needed 8823 if (typeof config.onDownloadProgress === 'function') request.addEventListener('progress', config.onDownloadProgress); 8824 // Not all browsers support upload events 8825 if (typeof config.onUploadProgress === 'function' && request.upload) request.upload.addEventListener('progress', config.onUploadProgress); 8826 if (config.cancelToken || config.signal) { 8827 // Handle cancellation 8828 // eslint-disable-next-line func-names 8829 onCanceled = function(cancel) { 8830 if (!request) return; 8831 reject(!cancel || cancel && cancel.type ? new $aJrjM('canceled') : cancel); 8832 request.abort(); 8833 request = null; 8834 }; 8835 config.cancelToken && config.cancelToken.subscribe(onCanceled); 8836 if (config.signal) config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); 8837 } 8838 if (!requestData) requestData = null; 8839 // Send the request 8840 request.send(requestData); 8841 }); 8842}; 8843 8844}); 8845parcelRegister("5VT2I", function(module, exports) { 8846'use strict'; 8847 8848var $7NBKy = parcelRequire("7NBKy"); 8849/** 8850 * Resolve or reject a Promise based on response status. 8851 * 8852 * @param {Function} resolve A function that resolves the promise. 8853 * @param {Function} reject A function that rejects the promise. 8854 * @param {object} response The response. 8855 */ module.exports = function settle(resolve, reject, response) {
8856 var validateStatus = response.config.validateStatus; 8857 if (!response.status || !validateStatus || validateStatus(response.status)) resolve(response); 8858 else reject($7NBKy('Request failed with status code ' + response.status, response.config, null, response.request, response)); 8859}; 8860 8861}); 8862parcelRegister("7NBKy", function(module, exports) { 8863'use strict'; 8864 8865var $aLtXx = parcelRequire("aLtXx"); 8866/** 8867 * Create an Error with the specified message, config, error code, request and response. 8868 * 8869 * @param {string} message The error message. 8870 * @param {Object} config The config. 8871 * @param {string} [code] The error code (for example, 'ECONNABORTED'). 8872 * @param {Object} [request] The request. 8873 * @param {Object} [response] The response. 8874 * @returns {Error} The created error. 8875 */ module.exports = function createError(message, config, code, request, response) { 8876 var error = new Error(message); 8877 return $aLtXx(error, config, code, request, response); 8878}; 8879 8880}); 8881 8882 8883parcelRegister("hpd5l", function(module, exports) { 8884'use strict'; 8885 8886var $89e92 = parcelRequire("89e92"); 8887module.exports = $89e92.isStandardBrowserEnv() ? // Standard browser envs support document.cookie 8888function standardBrowserEnv() { 8889 return { 8890 write: function write(name, value, expires, path, domain, secure) { 8891 var cookie = []; 8892 cookie.push(name + '=' + encodeURIComponent(value)); 8893 if ($89e92.isNumber(expires)) cookie.push('expires=' + new Date(expires).toGMTString()); 8894 if ($89e92.isString(path)) cookie.push('path=' + path); 8895 if ($89e92.isString(domain)) cookie.push('domain=' + domain); 8896 if (secure === true) cookie.push('secure'); 8897 document.cookie = cookie.join('; '); 8898 }, 8899 read: function read(name) { 8900 var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); 8901 return match ? decodeURIComponent(match[3]) : null; 8902 }, 8903 remove: function remove(name) { 8904 this.write(name, '', Date.now() - 86400000); 8905 } 8906 }; 8907}() : // Non standard browser env (web workers, react-native) lack needed support. 8908function nonStandardBrowserEnv() { 8909 return { 8910 write: function write() {}, 8911 read: function read() { 8912 return null; 8913 }, 8914 remove: function remove() {} 8915 }; 8916}(); 8917 8918}); 8919 8920parcelRegister("3HoZB", function(module, exports) { 8921'use strict'; 8922 8923var $lwREZ = parcelRequire("lwREZ"); 8924 8925var $f91HW = parcelRequire("f91HW"); 8926/** 8927 * Creates a new URL by combining the baseURL with the requestedURL, 8928 * only when the requestedURL is not already an absolute URL. 8929 * If the requestURL is absolute, this function returns the requestedURL untouched. 8930 * 8931 * @param {string} baseURL The base URL 8932 * @param {string} requestedURL Absolute or relative URL to combine 8933 * @returns {string} The combined full path 8934 */ module.exports = function buildFullPath(baseURL, requestedURL) { 8935 if (baseURL && !$lwREZ(requestedURL)) return $f91HW(baseURL, requestedURL); 8936 return requestedURL; 8937}; 8938 8939}); 8940parcelRegister("lwREZ", function(module, exports) { 8941'use strict'; 8942/** 8943 * Determines whether the specified URL is absolute 8944 * 8945 * @param {string} url The URL to test 8946 * @returns {boolean} True if the specified URL is absolute, otherwise false 8947 */ module.exports = function isAbsoluteURL(url) { 8948 // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). 8949 // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed 8950 // by any combination of letters, digits, plus, period, or hyphen. 8951 return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); 8952}; 8953 8954}); 8955 8956parcelRegister("f91HW", function(module, exports) { 8957'use strict'; 8958/** 8959 * Creates a new URL by combining the specified URLs 8960 * 8961 * @param {string} baseURL The base URL 8962 * @param {string} relativeURL The relative URL 8963 * @returns {string} The combined URL 8964 */ module.exports = function combineURLs(baseURL, relativeURL) { 8965 return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; 8966}; 8967 8968}); 8969 8970
8971parcelRegister("d5ji5", function(module, exports) { 8972'use strict'; 8973 8974var $89e92 = parcelRequire("89e92"); 8975// Headers whose duplicates are ignored by node 8976// c.f. https://nodejs.org/api/http.html#http_message_headers 8977var $986ab4b4f816f476$var$ignoreDuplicateOf = [ 8978 'age', 8979 'authorization', 8980 'content-length', 8981 'content-type', 8982 'etag', 8983 'expires', 8984 'from', 8985 'host', 8986 'if-modified-since', 8987 'if-unmodified-since', 8988 'last-modified', 8989 'location', 8990 'max-forwards', 8991 'proxy-authorization', 8992 'referer', 8993 'retry-after', 8994 'user-agent' 8995]; 8996/** 8997 * Parse headers into an object 8998 * 8999 * ``` 9000 * Date: Wed, 27 Aug 2014 08:58:49 GMT 9001 * Content-Type: application/json 9002 * Connection: keep-alive 9003 * Transfer-Encoding: chunked 9004 * ``` 9005 * 9006 * @param {String} headers Headers needing to be parsed 9007 * @returns {Object} Headers parsed into an object 9008 */ module.exports = function parseHeaders(headers) { 9009 var parsed = {}; 9010 var key; 9011 var val; 9012 var i; 9013 if (!headers) return parsed; 9014 $89e92.forEach(headers.split('\n'), function parser(line) { 9015 i = line.indexOf(':');
9016 key = $89e92.trim(line.substr(0, i)).toLowerCase(); 9017 val = $89e92.trim(line.substr(i + 1)); 9018 if (key) { 9019 if (parsed[key] && $986ab4b4f816f476$var$ignoreDuplicateOf.indexOf(key) >= 0) return; 9020 if (key === 'set-cookie') parsed[key] = (parsed[key] ? parsed[key] : []).concat([ 9021 val 9022 ]); 9023 else parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; 9024 } 9025 }); 9026 return parsed; 9027}; 9028 9029}); 9030 9031parcelRegister("hqw6a", function(module, exports) { 9032'use strict'; 9033 9034var $89e92 = parcelRequire("89e92"); 9035module.exports = $89e92.isStandardBrowserEnv() ? // Standard browser envs have full support of the APIs needed to test 9036// whether the request URL is of the same origin as current location. 9037function standardBrowserEnv() { 9038 var msie = /(msie|trident)/i.test(navigator.userAgent); 9039 var urlParsingNode = document.createElement('a'); 9040 var originURL; 9041 /** 9042 * Parse a URL to discover it's components 9043 * 9044 * @param {String} url The URL to be parsed 9045 * @returns {Object} 9046 */ function resolveURL(url) { 9047 var href = url; 9048 if (msie) { 9049 // IE needs attribute set twice to normalize properties 9050 urlParsingNode.setAttribute('href', href); 9051 href = urlParsingNode.href; 9052 } 9053 urlParsingNode.setAttribute('href', href); 9054 // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils 9055 return { 9056 href: urlParsingNode.href, 9057 protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', 9058 host: urlParsingNode.host, 9059 search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', 9060 hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', 9061 hostname: urlParsingNode.hostname, 9062 port: urlParsingNode.port, 9063 pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname 9064 }; 9065 } 9066 originURL = resolveURL(window.location.href); 9067 /** 9068 * Determine if a URL shares the same origin as the current location 9069 * 9070 * @param {String} requestURL The URL to test 9071 * @returns {boolean} True if URL shares the same origin, otherwise false 9072 */ return function isURLSameOrigin(requestURL) { 9073 var parsed = $89e92.isString(requestURL) ? resolveURL(requestURL) : requestURL; 9074 return parsed.protocol === originURL.protocol && parsed.host === originURL.host; 9075 }; 9076}() : // Non standard browser envs (web workers, react-native) lack needed support. 9077function nonStandardBrowserEnv() { 9078 return function isURLSameOrigin() { 9079 return true; 9080 }; 9081}(); 9082 9083}); 9084 9085parcelRegister("aJrjM", function(module, exports) { 9086'use strict'; 9087/** 9088 * A `Cancel` is an object that is thrown when an operation is canceled. 9089 * 9090 * @class 9091 * @param {string=} message The message. 9092 */ function $7d034c25a9ab125f$var$Cancel(message) { 9093 this.message = message; 9094} 9095$7d034c25a9ab125f$var$Cancel.prototype.toString = function toString() { 9096 return 'Cancel' + (this.message ? ': ' + this.message : ''); 9097}; 9098$7d034c25a9ab125f$var$Cancel.prototype.__CANCEL__ = true; 9099module.exports = $7d034c25a9ab125f$var$Cancel; 9100 9101}); 9102 9103 9104 9105 9106parcelRegister("4HFcn", function(module, exports) { 9107'use strict'; 9108module.exports = function isCancel(value) { 9109 return !!(value && value.__CANCEL__); 9110}; 9111 9112}); 9113 9114 9115parcelRegister("jxiXD", function(module, exports) { 9116'use strict'; 9117 9118var $89e92 = parcelRequire("89e92"); 9119/** 9120 * Config-specific merge-function which creates a new config-object 9121 * by merging two configuration objects together. 9122 * 9123 * @param {Object} config1 9124 * @param {Object} config2 9125 * @returns {Object} New object resulting from merging config2 to config1 9126 */ module.exports = function mergeConfig(config1, config2) { 9127 // eslint-disable-next-line no-param-reassign 9128 config2 = config2 || {}; 9129 var config = {}; 9130 function getMergedValue(target, source) { 9131 if ($89e92.isPlainObject(target) && $89e92.isPlainObject(source)) return $89e92.merge(target, source); 9132 else if ($89e92.isPlainObject(source)) return $89e92.merge({}, source); 9133 else if ($89e92.isArray(source)) return source.slice(); 9134 return source; 9135 } 9136 // eslint-disable-next-line consistent-return 9137 function mergeDeepProperties(prop) { 9138 if (!$89e92.isUndefined(config2[prop])) return getMergedValue(config1[prop], config2[prop]); 9139 else if (!$89e92.isUndefined(config1[prop])) return getMergedValue(undefined, c
9139onfig1[prop]); 9140 } 9141 // eslint-disable-next-line consistent-return 9142 function valueFromConfig2(prop) { 9143 if (!$89e92.isUndefined(config2[prop])) return getMergedValue(undefined, config2[prop]); 9144 } 9145 // eslint-disable-next-line consistent-return 9146 function defaultToConfig2(prop) { 9147 if (!$89e92.isUndefined(config2[prop])) return getMergedValue(undefined, config2[prop]); 9148 else if (!$89e92.isUndefined(config1[prop])) return getMergedValue(undefined, config1[prop]); 9149 } 9150 // eslint-disable-next-line consistent-return 9151 function mergeDirectKeys(prop) { 9152 if (prop in config2) return getMergedValue(config1[prop], config2[prop]); 9153 else if (prop in config1) return getMergedValue(undefined, config1[prop]); 9154 } 9155 var mergeMap = { 9156 'url': valueFromConfig2, 9157 'method': valueFromConfig2, 9158 'data': valueFromConfig2, 9159 'baseURL': defaultToConfig2, 9160 'transformRequest': defaultToConfig2, 9161 'transformResponse': defaultToConfig2, 9162 'paramsSerializer': defaultToConfig2, 9163 'timeout': defaultToConfig2, 9164 'timeoutMessage': defaultToConfig2, 9165 'withCredentials': defaultToConfig2, 9166 'adapter': defaultToConfig2, 9167 'responseType': defaultToConfig2, 9168 'xsrfCookieName': defaultToConfig2, 9169 'xsrfHeaderName': defaultToConfig2, 9170 'onUploadProgress': defaultToConfig2, 9171 'onDownloadProgress': defaultToConfig2, 9172 'decompress': defaultToConfig2, 9173 'maxContentLength': defaultToConfig2, 9174 'maxBodyLength': defaultToConfig2, 9175 'transport': defaultToConfig2, 9176 'httpAgent': defaultToConfig2, 9177 'httpsAgent': defaultToConfig2, 9178 'cancelToken': defaultToConfig2, 9179 'socketPath': defaultToConfig2, 9180 'responseEncoding': defaultToConfig2, 9181 'validateStatus': mergeDirectKeys 9182 }; 9183 $89e92.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { 9184 var merge = mergeMap[prop] || mergeDeepProperties; 9185 var configValue = merge(prop); 9186 $89e92.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue); 9187 }); 9188 return config; 9189}; 9190 9191}); 9192 9193parcelRegister("5wtUN", function(module, exports) { 9194'use strict'; 9195 9196var $fZjdx = parcelRequire("fZjdx"); 9197var $40572567c4be7a14$require$VERSION = $fZjdx.version; 9198var $40572567c4be7a14$var$validators = {}; 9199// eslint-disable-next-line func-names 9200[ 9201 'object', 9202 'boolean', 9203 'number', 9204 'function', 9205 'string', 9206 'symbol' 9207].forEach(function(type, i) { 9208 $40572567c4be7a14$var$validators[type] = function validator(thing) { 9209 return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; 9210 }; 9211}); 9212var $40572567c4be7a14$var$deprecatedWarnings = {}; 9213/** 9214 * Transitional option validator 9215 * @param {function|boolean?} validator - set to false if the transitional option has been removed 9216 * @param {string?} version - deprecated version / removed since version 9217 * @param {string?} message - some message with additional info 9218 * @returns {function} 9219 */ $40572567c4be7a14$var$validators.transitional = function transitional(validator, version, message) { 9220 function formatMessage(opt, desc) { 9221 return '[Axios v' + $40572567c4be7a14$require$VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); 9222 } 9223 // eslint-disable-next-line func-names 9224 return function(value, opt, opts) { 9225 if (validator === false) throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : ''))); 9226 if (version && !$40572567c4be7a14$var$deprecatedWarnings[opt]) { 9227 $40572567c4be7a14$var$deprecatedWarnings[opt] = true; 9228 // eslint-disable-next-line no-console 9229 console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future')); 9230 } 9231 return validator ? validator(value, opt, opts) : true; 9232 }; 9233}; 9234/** 9235 * Assert object's properties type 9236 * @param {object} options 9237 * @param {object} schema 9238 * @param {boolean?} allowUnknown 9239 */ function $40572567c4be7a14$var$assertOptions(options, schema, allowUnknown) { 9240 if (typeof options !== 'object') throw new TypeError('options must be an object'); 9241 var keys = Object.keys(options); 9242 var i = keys.length; 9243 while(i-- > 0){ 9244 var opt = keys[i];
9245 var validator = schema[opt]; 9246 if (validator) { 9247 var value = options[opt]; 9248 var result = value === undefined || validator(value, opt, options); 9249 if (result !== true) throw new TypeError('option ' + opt + ' must be ' + result); 9250 continue; 9251 } 9252 if (allowUnknown !== true) throw Error('Unknown option ' + opt); 9253 } 9254} 9255module.exports = { 9256 assertOptions: $40572567c4be7a14$var$assertOptions, 9257 validators: $40572567c4be7a14$var$validators 9258}; 9259 9260}); 9261parcelRegister("fZjdx", function(module, exports) { 9262module.exports = { 9263 "version": "0.24.0" 9264}; 9265 9266}); 9267 9268 9269 9270parcelRegister("2WJ28", function(module, exports) { 9271'use strict'; 9272 9273var $aJrjM = parcelRequire("aJrjM"); 9274/** 9275 * A `CancelToken` is an object that can be used to request cancellation of an operation. 9276 * 9277 * @class 9278 * @param {Function} executor The executor function. 9279 */ function $2253ee459c7badcf$var$CancelToken(executor) { 9280 if (typeof executor !== 'function') throw new TypeError('executor must be a function.'); 9281 var resolvePromise; 9282 this.promise = new Promise(function promiseExecutor(resolve) { 9283 resolvePromise = resolve; 9284 }); 9285 var token = this; 9286 // eslint-disable-next-line func-names 9287 this.promise.then(function(cancel) { 9288 if (!token._listeners) return; 9289 var i; 9290 var l = token._listeners.length; 9291 for(i = 0; i < l; i++)token._listeners[i](cancel); 9292 token._listeners = null; 9293 }); 9294 // eslint-disable-next-line func-names 9295 this.promise.then = function(onfulfilled) { 9296 var _resolve; 9297 // eslint-disable-next-line func-names 9298 var promise = new Promise(function(resolve) { 9299 token.subscribe(resolve); 9300 _resolve = resolve; 9301 }).then(onfulfilled); 9302 promise.cancel = function reject() { 9303 token.unsubscribe(_resolve); 9304 }; 9305 return promise; 9306 }; 9307 executor(function cancel(message) { 9308 if (token.reason) // Cancellation has already been requested 9309 return; 9310 token.reason = new $aJrjM(message); 9311 resolvePromise(token.reason); 9312 }); 9313} 9314/** 9315 * Throws a `Cancel` if cancellation has been requested. 9316 */ $2253ee459c7badcf$var$CancelToken.prototype.throwIfRequested = function throwIfRequested() { 9317 if (this.reason) throw this.reason; 9318}; 9319/** 9320 * Subscribe to the cancel signal 9321 */ $2253ee459c7badcf$var$CancelToken.prototype.subscribe = function subscribe(listener) { 9322 if (this.reason) { 9323 listener(this.reason); 9324 return; 9325 } 9326 if (this._listeners) this._listeners.push(listener); 9327 else this._listeners = [ 9328 listener 9329 ]; 9330}; 9331/** 9332 * Unsubscribe from the cancel signal 9333 */ $2253ee459c7badcf$var$CancelToken.prototype.unsubscribe = function unsubscribe(listener) { 9334 if (!this._listeners) return; 9335 var index = this._listeners.indexOf(listener); 9336 if (index !== -1) this._listeners.splice(index, 1); 9337}; 9338/** 9339 * Returns an object that contains a new `CancelToken` and a function that, when called, 9340 * cancels the `CancelToken`. 9341 */ $2253ee459c7badcf$var$CancelToken.source = function source() { 9342 var cancel; 9343 var token = new $2253ee459c7badcf$var$CancelToken(function executor(c) { 9344 cancel = c; 9345 }); 9346 return { 9347 token: token, 9348 cancel: cancel 9349 }; 9350}; 9351module.exports = $2253ee459c7badcf$var$CancelToken; 9352 9353}); 9354 9355parcelRegister("2YWFU", function(module, exports) { 9356'use strict'; 9357/** 9358 * Syntactic sugar for invoking a function and expanding an array for arguments. 9359 * 9360 * Common use case would be to use `Function.prototype.apply`. 9361 * 9362 * ```js 9363 * function f(x, y, z) {} 9364 * var args = [1, 2, 3]; 9365 * f.apply(null, args); 9366 * ``` 9367 * 9368 * With `spread` this example can be re-written. 9369 * 9370 * ```js 9371 * spread(function(x, y, z) {})([1, 2, 3]); 9372 * ``` 9373 * 9374 * @param {Function} callback 9375 * @returns {Function} 9376 */ module.exports = function spread(callback) { 9377 return function wrap(arr) { 9378 return callback.apply(null, arr); 9379 }; 9380}; 9381 9382}); 9383 9384parcelRegister("7rg2Q", function(module, exports) { 9385'use strict'; 9386/** 9387 * Determines whether the payload is an error thrown by Axios 9388 * 9389 * @param {*} payload The value to test 9390 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false 9391 */ module.exports = function isAxiosError(payload) { 9392 return typeof payload === 'object' && payload.isAxiosError === true; 9393}; 9394 9395}); 9396 9397 9398var $393491384ce93f5d$exports = {}; 9399'use strict'; 9400 9401$393491384ce93f5d$exports = (parcelRequire("jplPN")); 9402 9403 9404 9405var $fYIks = parcelRequire("fYIks"); 9406var $2738edde298c9f1e$export$882461b6382ed46c; 9407var $2738edde298c9f1e$export$757ceba2d55c277e; 9408'use strict'; 9409var $9e93f347a4838f21$exports = {}; 9410'use strict'; 9411function $9e93f347a4838f21$var$checkDCE() { 9412 /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function') return; 9413 try { 9414 // Verify that the code above has been dead code eliminated (DCE'd). 9415 __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($9e93f347a4838f21$var$checkDCE); 9416 } catch (err) { 9417 // DevTools shouldn't crash React, no matter what. 9418 // We should still report in case we break this code. 9419 console.error(err); 9420 } 9421}
9422// DCE check should happen before ReactDOM bundle executes so that 9423// DevTools can report bad minification during injection. 9424$9e93f347a4838f21$var$checkDCE(); 9425 9426$9e93f347a4838f21$exports = (parcelRequire("1QJnT")); 9427 9428 9429var $2738edde298c9f1e$var$i; 9430$2738edde298c9f1e$export$882461b6382ed46c = $9e93f347a4838f21$exports.createRoot; 9431$2738edde298c9f1e$export$757ceba2d55c277e = $9e93f347a4838f21$exports.hydrateRoot; 9432 9433 9434/* eslint-disable no-unused-vars */ 9435 9436var $fYIks = parcelRequire("fYIks"); 9437 9438 9439function $69f880115ec2caad$export$71511d61b312f219(obj, key, value) { 9440 if (key in obj) Object.defineProperty(obj, key, { 9441 value: value, 9442 enumerable: true, 9443 configurable: true, 9444 writable: true 9445 }); 9446 else obj[key] = value; 9447 return obj; 9448} 9449 9450 9451function $ca7d1670581030c8$export$71511d61b312f219(target) { 9452 for(var i = 1; i < arguments.length; i++){ 9453 var source = arguments[i] != null ? arguments[i] : {}; 9454 var ownKeys = Object.keys(source); 9455 if (typeof Object.getOwnPropertySymbols === "function") ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) { 9456 return Object.getOwnPropertyDescriptor(source, sym).enumerable; 9457 })); 9458 ownKeys.forEach(function(key) { 9459 (0, $69f880115ec2caad$export$71511d61b312f219)(target, key, source[key]); 9460 }); 9461 } 9462 return target; 9463} 9464 9465 9466function $4ead65f8391fca5a$var$ownKeys(object, enumerableOnly) { 9467 var keys = Object.keys(object); 9468 if (Object.getOwnPropertySymbols) { 9469 var symbols = Object.getOwnPropertySymbols(object); 9470 if (enumerableOnly) symbols = symbols.filter(function(sym) { 9471 return Object.getOwnPropertyDescriptor(object, sym).enumerable; 9472 }); 9473 keys.push.apply(keys, symbols); 9474 } 9475 return keys; 9476} 9477function $4ead65f8391fca5a$export$71511d61b312f219(target, source) { 9478 source = source != null ? source : {}; 9479 if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); 9480 else $4ead65f8391fca5a$var$ownKeys(Object(source)).forEach(function(key) { 9481 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); 9482 }); 9483 return target; 9484} 9485 9486 9487 9488var $a8518210ce2c4217$exports = {}; 9489 9490$a8518210ce2c4217$exports = (parcelRequire("5PkP4")); 9491 9492 9493 9494var $fYIks = parcelRequire("fYIks"); 9495 9496 9497function $c178a15e18ac2a97$export$71511d61b312f219(source, excluded) { 9498 if (source == null) return {}; 9499 var target = {}; 9500 var sourceKeys = Object.keys(source); 9501 var key, i; 9502 for(i = 0; i < sourceKeys.length; i++){ 9503 key = sourceKeys[i]; 9504 if (excluded.indexOf(key) >= 0) continue; 9505 target[key] = source[key]; 9506 } 9507 return target; 9508} 9509 9510 9511function $e7548388a0765c32$export$71511d61b312f219(source, excluded) { 9512 if (source == null) return {}; 9513 var target = (0, $c178a15e18ac2a97$export$71511d61b312f219)(source, excluded); 9514 var key, i; 9515 if (Object.getOwnPropertySymbols) { 9516 var sourceSymbolKeys = Object.getOwnPropertySymbols(source); 9517 for(i = 0; i < sourceSymbolKeys.length; i++){ 9518 key = sourceSymbolKeys[i]; 9519 if (excluded.indexOf(key) >= 0) continue; 9520 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; 9521 target[key] = source[key]; 9522 } 9523 } 9524 return target; 9525} 9526 9527 9528 9529var $fYIks = parcelRequire("fYIks"); 9530var $c855b811fd5e8ae6$var$isCheckBoxInput = (element)=>element.type === 'checkbox'; 9531var $c855b811fd5e8ae6$var$isDateObject = (value1)=>value1 instanceof Date; 9532var $c855b811fd5e8ae6$var$isNullOrUndefined = (value1)=>value1 == null; 9533const $c855b811fd5e8ae6$var$isObjectType = (value1)=>typeof value1 === 'object'; 9534var $c855b811fd5e8ae6$var$isObject = (value1)=>!$c855b811fd5e8ae6$var$isNullOrUndefined(value1) && !Array.isArray(value1) && $c855b811fd5e8ae6$var$isObjectType(value1) && !$c855b811fd5e8ae6$var$isDateObject(value1); 9535var $c855b811fd5e8ae6$var$getEventValue = (event)=>$c855b811fd5e8ae6$var$isObject(event) && event.target ? $c855b811fd5e8ae6$var$isCheckBoxInput(event.target) ? event.target.checked : event.target.value : event; 9536var $c855b811fd5e8ae6$var$getNodeParentName = (name)=>name.substring(0, name.search(/\.\d+(\.|$)/)) || name; 9537var $c855b811fd5e8ae6$var$isNameInFieldArray = (names, name)=>names.has($c855b811fd5e8ae6$var$getNodeParentName(name)); 9538var $c855b811fd5e8ae6$var$isPlainObject = (tempObject)=>{ 9539 const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype; 9540 return $c855b811fd5e8ae6$var$isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'); 9541}; 9542var $c855b811fd5e8ae6$var$isWeb = typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined' && typeof document !== 'undefined'; 9543function $c855b811fd5e8ae6$var$cloneObject(data) {
9544 let copy; 9545 const isArray = Array.isArray(data); 9546 const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false; 9547 if (data instanceof Date) copy = new Date(data); 9548 else if (!($c855b811fd5e8ae6$var$isWeb && (data instanceof Blob || isFileListInstance)) && (isArray || $c855b811fd5e8ae6$var$isObject(data))) { 9549 copy = isArray ? [] : Object.create(Object.getPrototypeOf(data)); 9550 if (!isArray && !$c855b811fd5e8ae6$var$isPlainObject(data)) copy = data; 9551 else { 9552 for(const key in data)if (data.hasOwnProperty(key)) copy[key] = $c855b811fd5e8ae6$var$cloneObject(data[key]); 9553 } 9554 } else return data; 9555 return copy; 9556} 9557var $c855b811fd5e8ae6$var$isKey = (value1)=>/^\w*$/.test(value1); 9558var $c855b811fd5e8ae6$var$isUndefined = (val)=>val === undefined; 9559var $c855b811fd5e8ae6$var$compact = (value1)=>Array.isArray(value1) ? value1.filter(Boolean) : []; 9560var $c855b811fd5e8ae6$var$stringToPath = (input)=>$c855b811fd5e8ae6$var$compact(input.replace(/["|']|\]/g, '').split(/\.|\[/)); 9561var $c855b811fd5e8ae6$export$3988ae62b71be9a3 = (object, path, defaultValue)=>{ 9562 if (!path || !$c855b811fd5e8ae6$var$isObject(object)) return defaultValue; 9563 const result = ($c855b811fd5e8ae6$var$isKey(path) ? [ 9564 path 9565 ] : $c855b811fd5e8ae6$var$stringToPath(path)).reduce((result, key)=>$c855b811fd5e8ae6$var$isNullOrUndefined(result) ? result : result[key], object); 9566 return $c855b811fd5e8ae6$var$isUndefined(result) || result === object ? $c855b811fd5e8ae6$var$isUndefined(object[path]) ? defaultValue : object[path] : result; 9567}; 9568var $c855b811fd5e8ae6$var$isBoolean = (value1)=>typeof value1 === 'boolean'; 9569var $c855b811fd5e8ae6$export$adaa4cf7ef1b65be = (object, path, value1)=>{ 9570 let index = -1; 9571 const tempPath = $c855b811fd5e8ae6$var$isKey(path) ? [ 9572 path 9573 ] : $c855b811fd5e8ae6$var$stringToPath(path); 9574 const length = tempPath.length; 9575 const lastIndex = length - 1; 9576 while(++index < length){ 9577 const key = tempPath[index]; 9578 let newValue = value1; 9579 if (index !== lastIndex) { 9580 const objValue = object[key]; 9581 newValue = $c855b811fd5e8ae6$var$isObject(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {}; 9582 } 9583 if (key === '__proto__' || key === 'constructor' || key === 'prototype') return; 9584 object[key] = newValue; 9585 object = object[key]; 9586 } 9587}; 9588const $c855b811fd5e8ae6$var$EVENTS = { 9589 BLUR: 'blur', 9590 FOCUS_OUT: 'focusout', 9591 CHANGE: 'change' 9592}; 9593const $c855b811fd5e8ae6$var$VALIDATION_MODE = { 9594 onBlur: 'onBlur', 9595 onChange: 'onChange', 9596 onSubmit: 'onSubmit', 9597 onTouched: 'onTouched', 9598 all: 'all' 9599}; 9600const $c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES = { 9601 max: 'max', 9602 min: 'min', 9603 maxLength: 'maxLength', 9604 minLength: 'minLength', 9605 pattern: 'pattern', 9606 required: 'required', 9607 validate: 'validate' 9608}; 9609const $c855b811fd5e8ae6$var$HookFormContext = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).createContext(null); 9610$c855b811fd5e8ae6$var$HookFormContext.displayName = 'HookFormContext'; 9611/** 9612 * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}. 9613 * 9614 * @remarks 9615 * [API](https://react-hook-form.com/docs/useformcontext) ⢠[Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi) 9616 * 9617 * @returns return all useForm methods 9618 * 9619 * @example 9620 * ```tsx 9621 * function App() { 9622 * const methods = useForm(); 9623 * const onSubmit = data => console.log(data); 9624 * 9625 * return ( 9626 * <FormProvider {...methods} > 9627 * <form onSubmit={methods.handleSubmit(onSubmit)}> 9628 * <NestedInput /> 9629 * <input type="submit" /> 9630 * </form> 9631 * </FormProvider> 9632 * ); 9633 * } 9634 * 9635 * function NestedInput() { 9636 * const { register } = useFormContext(); // retrieve all hook methods 9637 * return <input {...register("test")} />; 9638 * } 9639 * ``` 9640 */ const $c855b811fd5e8ae6$export$4d957a5e1be13b03 = ()=>
9640(0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useContext($c855b811fd5e8ae6$var$HookFormContext); 9641/** 9642 * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}. 9643 * 9644 * @remarks 9645 * [API](https://react-hook-form.com/docs/useformcontext) ⢠[Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi) 9646 * 9647 * @param props - all useForm methods 9648 * 9649 * @example 9650 * ```tsx 9651 * function App() { 9652 * const methods = useForm(); 9653 * const onSubmit = data => console.log(data); 9654 * 9655 * return ( 9656 * <FormProvider {...methods} > 9657 * <form onSubmit={methods.handleSubmit(onSubmit)}> 9658 * <NestedInput /> 9659 * <input type="submit" /> 9660 * </form> 9661 * </FormProvider> 9662 * ); 9663 * } 9664 * 9665 * function NestedInput() { 9666 * const { register } = useFormContext(); // retrieve all hook methods 9667 * return <input {...register("test")} />; 9668 * } 9669 * ``` 9670 */ const $c855b811fd5e8ae6$export$8ce1ff4f94d08846 = (props)=>{ 9671 const { children: children } = props, data = (0, $e7548388a0765c32$export$71511d61b312f219)(props, [ 9672 "children" 9673 ]); 9674 return (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).createElement($c855b811fd5e8ae6$var$HookFormContext.Provider, { 9675 value: data 9676 }, children); 9677}; 9678var $c855b811fd5e8ae6$var$getProxyFormState = (formState, control, localProxyFormState, isRoot = true)=>{ 9679 const result = { 9680 defaultValues: control._defaultValues 9681 }; 9682 for(const key in formState)Object.defineProperty(result, key, { 9683 get: ()=>{ 9684 const _key = key; 9685 if (control._proxyFormState[_key] !== $c855b811fd5e8ae6$var$VALIDATION_MODE.all) control._proxyFormState[_key] = !isRoot || $c855b811fd5e8ae6$var$VALIDATION_MODE.all; 9686 localProxyFormState && (localProxyFormState[_key] = true); 9687 return formState[_key]; 9688 } 9689 }); 9690 return result; 9691}; 9692const $c855b811fd5e8ae6$var$useIsomorphicLayoutEffect = typeof window !== 'undefined' ? (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useLayoutEffect : (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect; 9693/** 9694 * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application. 9695 * 9696 * @remarks 9697 * [API](https://react-hook-form.com/docs/useformstate) ⢠[Demo](https://codesandbox.io/s/useformstate-75xly) 9698 * 9699 * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn} 9700 * 9701 * @example 9702 * ```tsx 9703 * function App() { 9704 * const { register, handleSubmit, control } = useForm({ 9705 * defaultValues: { 9706 * firstName: "firstName" 9707 * }}); 9708 * const { dirtyFields } = useFormState({ 9709 * control 9710 * }); 9711 * const onSubmit = (data) => console.log(data); 9712 * 9713 * return ( 9714 * <form onSubmit={handleSubmit(onSubmit)}> 9715 * <input {...register("firstName")} placeholder="First Name" /> 9716 * {dirtyFields.firstName && <p>Field is dirty.</p>} 9717 * <input type="submit" /> 9718 * </form> 9719 * ); 9720 * } 9721 * ``` 9722 */ function $c855b811fd5e8ae6$export$606f11b2eb45ecc6(props) { 9723 const methods = $c855b811fd5e8ae6$export$4d957a5e1be13b03(); 9724 const { control: control = methods.control, disabled: disabled, name: name, exact: exact } = props || {}; 9725 const [formState, updateFormState] = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useState(control._formState); 9726 const _localProxyFormState = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef({ 9727 isDirty: false, 9728 isLoading: false, 9729 dirtyFields: false, 9730 touchedFields: false, 9731 validatingFields: false, 9732 isValidating: false, 9733 isValid: false, 9734 errors: false 9735 }); 9736 $c855b811fd5e8ae6$var$useIsomorphicLayoutEffect(()=>control._subscribe({ 9737 name: name, 9738 formState: _localProxyFormState.current, 9739 exact: exact, 9740 callback: (formState)=>{ 9741 !disabled && updateFormState((0, $ca7d1670581030c8$export$71511d61b312f219)({}, control._formState, formState)); 9742 } 9743 }), [ 9744 name, 9745 disabled, 9746 exact 9747 ]);
9748 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 9749 _localProxyFormState.current.isValid && control._setValid(true); 9750 }, [ 9751 control 9752 ]); 9753 return (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>$c855b811fd5e8ae6$var$getProxyFormState(formState, control, _localProxyFormState.current, false), [ 9754 formState, 9755 control 9756 ]); 9757} 9758var $c855b811fd5e8ae6$var$isString = (value1)=>typeof value1 === 'string'; 9759var $c855b811fd5e8ae6$var$generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue)=>{ 9760 if ($c855b811fd5e8ae6$var$isString(names)) { 9761 isGlobal && _names.watch.add(names); 9762 return $c855b811fd5e8ae6$export$3988ae62b71be9a3(formValues, names, defaultValue); 9763 } 9764 if (Array.isArray(names)) return names.map((fieldName)=>(isGlobal && _names.watch.add(fieldName), $c855b811fd5e8ae6$export$3988ae62b71be9a3(formValues, fieldName))); 9765 isGlobal && (_names.watchAll = true); 9766 return formValues; 9767}; 9768var $c855b811fd5e8ae6$var$isPrimitive = (value1)=>$c855b811fd5e8ae6$var$isNullOrUndefined(value1) || !$c855b811fd5e8ae6$var$isObjectType(value1); 9769function $c855b811fd5e8ae6$var$deepEqual(object1, object2, _internal_visited = new WeakSet()) { 9770 if ($c855b811fd5e8ae6$var$isPrimitive(object1) || $c855b811fd5e8ae6$var$isPrimitive(object2)) return object1 === object2; 9771 if ($c855b811fd5e8ae6$var$isDateObject(object1) && $c855b811fd5e8ae6$var$isDateObject(object2)) return object1.getTime() === object2.getTime(); 9772 const keys1 = Object.keys(object1); 9773 const keys2 = Object.keys(object2); 9774 if (keys1.length !== keys2.length) return false; 9775 if (_internal_visited.has(object1) || _internal_visited.has(object2)) return true; 9776 _internal_visited.add(object1); 9777 _internal_visited.add(object2); 9778 for (const key of keys1){ 9779 const val1 = object1[key]; 9780 if (!keys2.includes(key)) return false; 9781 if (key !== 'ref') { 9782 const val2 = object2[key]; 9783 if ($c855b811fd5e8ae6$var$isDateObject(val1) && $c855b811fd5e8ae6$var$isDateObject(val2) || $c855b811fd5e8ae6$var$isObject(val1) && $c855b811fd5e8ae6$var$isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !$c855b811fd5e8ae6$var$deepEqual(val1, val2, _internal_visited) : val1 !== val2) return false; 9784 } 9785 } 9786 return true; 9787} 9788/** 9789 * Custom hook to subscribe to field change and isolate re-rendering at the component level. 9790 * 9791 * @remarks 9792 * 9793 * [API](https://react-hook-form.com/docs/usewatch) ⢠[Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e) 9794 * 9795 * @example 9796 * ```tsx 9797 * const { control } = useForm(); 9798 * const values = useWatch({ 9799 * name: "fieldName" 9800 * control, 9801 * }) 9802 * ``` 9803 */ function $c855b811fd5e8ae6$export$3c773aa2b84f29e0(props) { 9804 const methods = $c855b811fd5e8ae6$export$4d957a5e1be13b03(); 9805 const { control: control = methods.control, name: name, defaultValue: defaultValue, disabled: disabled, exact: exact, compute: compute } = props || {}; 9806 const _defaultValue = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(defaultValue); 9807 const _compute = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(compute); 9808 const _computeFormValues = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(undefined); 9809 _compute.current = compute; 9810 const defaultValueMemo = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>control._getWatch(name, _defaultValue.current), [ 9811 control, 9812 name 9813 ]); 9814 const [value1, updateValue] = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo); 9815 $c855b811fd5e8ae6$var$useIsomorphicLayoutEffect(()=>control._subscribe({ 9816 name: name, 9817 formState: { 9818 values: true 9819 }, 9820 exact: exact, 9821 callback: (formState)=>{ 9822 if (!disabled) { 9823 const formValues = $c855b811fd5e8ae6$var$generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current); 9824 if (_compute.current) { 9825 const computedFormValues = _compute.current(formValues); 9826 if (!$c855b811fd5e8ae6$var$deepEqual(computedFormValues, _computeFormValues.current)) {
9827 updateValue(computedFormValues); 9828 _computeFormValues.current = computedFormValues; 9829 } 9830 } else updateValue(formValues); 9831 } 9832 } 9833 }), [ 9834 control, 9835 disabled, 9836 name, 9837 exact 9838 ]); 9839 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>control._removeUnmounted()); 9840 return value1; 9841} 9842/** 9843 * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level. 9844 * 9845 * @remarks 9846 * [API](https://react-hook-form.com/docs/usecontroller) ⢠[Demo](https://codesandbox.io/s/usecontroller-0o8px) 9847 * 9848 * @param props - the path name to the form field value, and validation rules. 9849 * 9850 * @returns field properties, field and form state. {@link UseControllerReturn} 9851 * 9852 * @example 9853 * ```tsx 9854 * function Input(props) { 9855 * const { field, fieldState, formState } = useController(props); 9856 * return ( 9857 * <div> 9858 * <input {...field} placeholder={props.name} /> 9859 * <p>{fieldState.isTouched && "Touched"}</p> 9860 * <p>{formState.isSubmitted ? "submitted" : ""}</p> 9861 * </div> 9862 * ); 9863 * } 9864 * ``` 9865 */ function $c855b811fd5e8ae6$export$e8c786024a2b0a79(props) { 9866 const methods = $c855b811fd5e8ae6$export$4d957a5e1be13b03(); 9867 const { name: name, disabled: disabled, control: control = methods.control, shouldUnregister: shouldUnregister, defaultValue: defaultValue } = props; 9868 const isArrayField = $c855b811fd5e8ae6$var$isNameInFieldArray(control._names.array, name); 9869 const defaultValueMemo = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>$c855b811fd5e8ae6$export$3988ae62b71be9a3(control._formValues, name, $c855b811fd5e8ae6$export$3988ae62b71be9a3(control._defaultValues, name, defaultValue)), [ 9870 control, 9871 name, 9872 defaultValue 9873 ]); 9874 const value1 = $c855b811fd5e8ae6$export$3c773aa2b84f29e0({ 9875 control: control, 9876 name: name, 9877 defaultValue: defaultValueMemo, 9878 exact: true 9879 }); 9880 const formState = $c855b811fd5e8ae6$export$606f11b2eb45ecc6({ 9881 control: control, 9882 name: name, 9883 exact: true 9884 }); 9885 const _props = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(props); 9886 const _registerProps = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(control.register(name, (0, $ca7d1670581030c8$export$71511d61b312f219)((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, props.rules), { 9887 value: value1 9888 }), $c855b811fd5e8ae6$var$isBoolean(props.disabled) ? { 9889 disabled: props.disabled 9890 } : {}))); 9891 _props.current = props; 9892 const fieldState = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>Object.defineProperties({}, { 9893 invalid: { 9894 enumerable: true, 9895 get: ()=>!!$c855b811fd5e8ae6$export$3988ae62b71be9a3(formState.errors, name) 9896 }, 9897 isDirty: { 9898 enumerable: true, 9899 get: ()=>!!$c855b811fd5e8ae6$export$3988ae62b71be9a3(formState.dirtyFields, name) 9900 }, 9901 isTouched: { 9902 enumerable: true, 9903 get: ()=>!!$c855b811fd5e8ae6$export$3988ae62b71be9a3(formState.touchedFields, name) 9904 }, 9905 isValidating: { 9906 enumerable: true, 9907 get: ()=>!!$c855b811fd5e8ae6$export$3988ae62b71be9a3(formState.validatingFields, name) 9908 }, 9909 error: { 9910 enumerable: true, 9911 get: ()=>$c855b811fd5e8ae6$export$3988ae62b71be9a3(formState.errors, name) 9912 } 9913 }), [ 9914 formState, 9915 name 9916 ]); 9917 const onChange = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback((event)=>_registerProps.current.onChange({ 9918 target: { 9919 value: $c855b811fd5e8ae6$var$getEventValue(event), 9920 name: name 9921 }, 9922 type: $c855b811fd5e8ae6$var$EVENTS.CHANGE 9923 }), [ 9924 name 9925 ]); 9926 const onBlur = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))
9926).useCallback(()=>_registerProps.current.onBlur({ 9927 target: { 9928 value: $c855b811fd5e8ae6$export$3988ae62b71be9a3(control._formValues, name), 9929 name: name 9930 }, 9931 type: $c855b811fd5e8ae6$var$EVENTS.BLUR 9932 }), [ 9933 name, 9934 control._formValues 9935 ]); 9936 const ref = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback((elm)=>{ 9937 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(control._fields, name); 9938 if (field && elm) field._f.ref = { 9939 focus: ()=>elm.focus && elm.focus(), 9940 select: ()=>elm.select && elm.select(), 9941 setCustomValidity: (message)=>elm.setCustomValidity(message), 9942 reportValidity: ()=>elm.reportValidity() 9943 }; 9944 }, [ 9945 control._fields, 9946 name 9947 ]); 9948 const field = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>(0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({ 9949 name: name, 9950 value: value1 9951 }, $c855b811fd5e8ae6$var$isBoolean(disabled) || formState.disabled ? { 9952 disabled: formState.disabled || disabled 9953 } : {}), { 9954 onChange: onChange, 9955 onBlur: onBlur, 9956 ref: ref 9957 }), [ 9958 name, 9959 disabled, 9960 formState.disabled, 9961 onChange, 9962 onBlur, 9963 ref, 9964 value1 9965 ]); 9966 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 9967 const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister; 9968 control.register(name, (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _props.current.rules, $c855b811fd5e8ae6$var$isBoolean(_props.current.disabled) ? { 9969 disabled: _props.current.disabled 9970 } : {})); 9971 const updateMounted = (name, value1)=>{ 9972 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(control._fields, name); 9973 if (field && field._f) field._f.mount = value1; 9974 }; 9975 updateMounted(name, true); 9976 if (_shouldUnregisterField) { 9977 const value1 = $c855b811fd5e8ae6$var$cloneObject($c855b811fd5e8ae6$export$3988ae62b71be9a3(control._options.defaultValues, name)); 9978 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(control._defaultValues, name, value1); 9979 if ($c855b811fd5e8ae6$var$isUndefined($c855b811fd5e8ae6$export$3988ae62b71be9a3(control._formValues, name))) $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(control._formValues, name, value1); 9980 } 9981 !isArrayField && control.register(name); 9982 return ()=>{ 9983 (isArrayField ? _shouldUnregisterField && !control._state.action : _shouldUnregisterField) ? control.unregister(name) : updateMounted(name, false); 9984 }; 9985 }, [ 9986 name, 9987 control, 9988 isArrayField, 9989 shouldUnregister 9990 ]); 9991 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 9992 control._setDisabledField({ 9993 disabled: disabled, 9994 name: name 9995 }); 9996 }, [ 9997 disabled, 9998 name, 9999 control 10000 ]); 10001 return (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>({ 10002 field: field, 10003 formState: formState, 10004 fieldState: fieldState 10005 }), [ 10006 field, 10007 formState, 10008 fieldState 10009 ]); 10010} 10011/** 10012 * Component based on `useController` hook to work with controlled component. 10013 * 10014 * @remarks 10015 * [API](https://react-hook-form.com/docs/usecontroller/controller) ⢠[Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) ⢠[Video](https://www.youtube.com/watch?v=N2UNk_UCVyA) 10016 * 10017 * @param props - the path name to the form field value, and validation rules. 10018 * 10019 * @returns provide field handler functions, field and form state. 10020 * 10021 * @example 10022 * ```tsx 10023 * function App() { 10024 * const { control } = useForm<FormValues>({ 10025 * defaultValues: { 10026 * test: "" 10027 * } 10028 * }); 10029 * 10030 * return ( 10031 * <form> 10032 * <Controller 10033 * control={control} 10034 * name="test" 10035 * render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => ( 10036 * <> 10037 * <input 10038 * onChange={onChange} // send value to hook form 10039 * onBlur={onBlur} // notify when input is touched 10040 * value={value} // return updated value 10041 * ref={ref} // set ref for focus management 10042 * /> 10043 * <p>{formState.isSubmitted ? "submitted" : ""}</p> 10044 * <p>{fieldState.isTouched ? "touched" : ""}</p> 10045 * </> 10046 * )} 10047 * /> 10048 * </form> 10049 * ); 10050 * } 10051 * ``` 10052 */ const $c855b811fd5e8ae6$export$bd0bf19f25da8474 = (props)=>props.render($c855b811fd5e8ae6$export$e8c786024a2b0a79(props)); 10053const $c855b811fd5e8ae6$var$flatten = (obj)=>{ 10054 const output = {}; 10055 for (const key of Object.keys(obj))if ($c855b811fd5e8ae6$var$isObjectType(obj[key]) && obj[key] !== null) { 10056 const nested = $c855b811fd5e8ae6$var$flatten(obj[key]); 10057 for (const nestedKey of Object.keys(nested))output[`${key}.${nestedKey}`] = nested[nestedKey]; 10058 } else output[key] = obj[key]; 10059 return output; 10060}; 10061const $c855b811fd5e8ae6$var$POST_REQUEST = 'post'; 10062/** 10063 * Form component to manage submission. 10064 * 10065 * @param props - to setup submission detail. {@link FormProps} 10066 * 10067 * @returns form component or headless render prop. 10068 * 10069 * @example 10070 * ```tsx 10071 * function App() { 10072 * const { control, formState: { errors } } = useForm(); 10073 * 10074 * return ( 10075 * <Form action="/api" control={control}> 10076 * <input {...register("name")} /> 10077 * <p>{errors?.root?.server && 'Server error'}</p> 10078 * <button>Submit</button> 10079 * </Form> 10080 * ); 10081 * } 10082 * ``` 10083 */ function $c855b811fd5e8ae6$export$a7fed597f4b8afd8(props) { 10084 const methods = $c855b811fd5e8ae6$export$4d957a5e1be13b03(); 10085 const [mounted, setMounted] = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))
10085).useState(false); 10086 const { control: control = methods.control, onSubmit: onSubmit, children: children, action: action, method: method = $c855b811fd5e8ae6$var$POST_REQUEST, headers: headers, encType: encType, onError: onError, render: render, onSuccess: onSuccess, validateStatus: validateStatus } = props, rest = (0, $e7548388a0765c32$export$71511d61b312f219)(props, [ 10087 "control", 10088 "onSubmit", 10089 "children", 10090 "action", 10091 "method", 10092 "headers", 10093 "encType", 10094 "onError", 10095 "render", 10096 "onSuccess", 10097 "validateStatus" 10098 ]); 10099 const submit = async (event)=>{ 10100 let hasError = false; 10101 let type = ''; 10102 await control.handleSubmit(async (data)=>{ 10103 const formData = new FormData(); 10104 let formDataJson = ''; 10105 try { 10106 formDataJson = JSON.stringify(data); 10107 } catch (_a) {} 10108 const flattenFormValues = $c855b811fd5e8ae6$var$flatten(control._formValues); 10109 for(const key in flattenFormValues)formData.append(key, flattenFormValues[key]); 10110 if (onSubmit) await onSubmit({ 10111 data: data, 10112 event: event, 10113 method: method, 10114 formData: formData, 10115 formDataJson: formDataJson 10116 }); 10117 if (action) try { 10118 const shouldStringifySubmissionData = [ 10119 headers && headers['Content-Type'], 10120 encType 10121 ].some((value1)=>value1 && value1.includes('json')); 10122 const response = await fetch(String(action), { 10123 method: method, 10124 headers: (0, $ca7d1670581030c8$export$71511d61b312f219)({}, headers, encType && encType !== 'multipart/form-data' ? { 10125 'Content-Type': encType 10126 } : {}), 10127 body: shouldStringifySubmissionData ? formDataJson : formData 10128 }); 10129 if (response && (validateStatus ? !validateStatus(response.status) : response.status < 200 || response.status >= 300)) { 10130 hasError = true; 10131 onError && onError({ 10132 response: response 10133 }); 10134 type = String(response.status); 10135 } else onSuccess && onSuccess({ 10136 response: response 10137 }); 10138 } catch (error) { 10139 hasError = true; 10140 onError && onError({ 10141 error: error 10142 }); 10143 } 10144 })(event); 10145 if (hasError && props.control) { 10146 props.control._subjects.state.next({ 10147 isSubmitSuccessful: false 10148 }); 10149 props.control.setError('root.server', { 10150 type: type 10151 }); 10152 } 10153 }; 10154 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 10155 setMounted(true); 10156 }, []); 10157 return render ? (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).createElement((0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).Fragment, null, render({ 10158 submit: submit 10159 })) : (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).createElement("form", (0, $ca7d1670581030c8$export$71511d61b312f219)({ 10160 noValidate: mounted, 10161 action: action, 10162 method: method, 10163 encType: encType, 10164 onSubmit: submit 10165 }, rest), children); 10166} 10167var $c855b811fd5e8ae6$export$b196c2a4f765bd30 = (name, validateAllFieldCriteria, errors, type, message)=>validateAllFieldCriteria ? (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, errors[name]), { 10168 types: (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, errors[name] && errors[name].types ? errors[name].types : {}), { 10169 [type]: message || true 10170 }) 10171 }) : {}; 10172var $c855b811fd5e8ae6$var$convertToArrayPayload = (value1)=>Array.isArray(value1) ? value1 : [ 10173 value1 10174 ]; 10175var $c855b811fd5e8ae6$var$createSubject = ()=>{ 10176 let _observers = []; 10177 const next = (value1)=>{ 10178 for (const observer of _observers)observer.next && observer.next(value1); 10179 }; 10180 const subscribe = (observer)=>{ 10181 _observers.push(observer); 10182 return { 10183 unsubscribe: ()=>{ 10184 _observers = _observers.filter((o)=>o !== observer); 10185 } 10186 }; 10187 }; 10188 const unsubscribe = ()=>{ 10189 _observers = []; 10190 }; 10191 return { 10192 get observers () { 10193 return _observers; 10194 }, 10195 next: next, 10196 subscribe: subscribe, 10197 unsubscribe: unsubscribe 10198 }; 10199}; 10200var $c855b811fd5e8ae6$var$isEmptyObject = (value1)=>$c855b811fd5e8ae6$var$isObject(value1) && !Object.keys(value1).length; 10201var $c855b811fd5e8ae6$var$isFileInput = (element)=>element.type === 'file'; 10202var $c855b811fd5e8ae6$var$isFunction = (value1)=>typeof value1 === 'function'; 10203var $c855b811fd5e8ae6$var$isHTMLElement = (value1)=>{ 10204 if (!$c855b811fd5e8ae6$var$isWeb) return false;
10205 const owner = value1 ? value1.ownerDocument : 0; 10206 return value1 instanceof (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement); 10207}; 10208var $c855b811fd5e8ae6$var$isMultipleSelect = (element)=>element.type === `select-multiple`; 10209var $c855b811fd5e8ae6$var$isRadioInput = (element)=>element.type === 'radio'; 10210var $c855b811fd5e8ae6$var$isRadioOrCheckbox = (ref)=>$c855b811fd5e8ae6$var$isRadioInput(ref) || $c855b811fd5e8ae6$var$isCheckBoxInput(ref); 10211var $c855b811fd5e8ae6$var$live = (ref)=>$c855b811fd5e8ae6$var$isHTMLElement(ref) && ref.isConnected; 10212function $c855b811fd5e8ae6$var$baseGet(object, updatePath) { 10213 const length = updatePath.slice(0, -1).length; 10214 let index = 0; 10215 while(index < length)object = $c855b811fd5e8ae6$var$isUndefined(object) ? index++ : object[updatePath[index++]]; 10216 return object; 10217} 10218function $c855b811fd5e8ae6$var$isEmptyArray(obj) { 10219 for(const key in obj){ 10220 if (obj.hasOwnProperty(key) && !$c855b811fd5e8ae6$var$isUndefined(obj[key])) return false; 10221 } 10222 return true; 10223} 10224function $c855b811fd5e8ae6$var$unset(object, path) { 10225 const paths = Array.isArray(path) ? path : $c855b811fd5e8ae6$var$isKey(path) ? [ 10226 path 10227 ] : $c855b811fd5e8ae6$var$stringToPath(path); 10228 const childObject = paths.length === 1 ? object : $c855b811fd5e8ae6$var$baseGet(object, paths); 10229 const index = paths.length - 1; 10230 const key = paths[index]; 10231 if (childObject) delete childObject[key]; 10232 if (index !== 0 && ($c855b811fd5e8ae6$var$isObject(childObject) && $c855b811fd5e8ae6$var$isEmptyObject(childObject) || Array.isArray(childObject) && $c855b811fd5e8ae6$var$isEmptyArray(childObject))) $c855b811fd5e8ae6$var$unset(object, paths.slice(0, -1)); 10233 return object; 10234} 10235var $c855b811fd5e8ae6$var$objectHasFunction = (data)=>{ 10236 for(const key in data){ 10237 if ($c855b811fd5e8ae6$var$isFunction(data[key])) return true; 10238 } 10239 return false; 10240}; 10241function $c855b811fd5e8ae6$var$markFieldsDirty(data, fields = {}) { 10242 const isParentNodeArray = Array.isArray(data); 10243 if ($c855b811fd5e8ae6$var$isObject(data) || isParentNodeArray) for(const key in data){ 10244 if (Array.isArray(data[key]) || $c855b811fd5e8ae6$var$isObject(data[key]) && !$c855b811fd5e8ae6$var$objectHasFunction(data[key])) { 10245 fields[key] = Array.isArray(data[key]) ? [] : {}; 10246 $c855b811fd5e8ae6$var$markFieldsDirty(data[key], fields[key]); 10247 } else if (!$c855b811fd5e8ae6$var$isNullOrUndefined(data[key])) fields[key] = true; 10248 } 10249 return fields; 10250} 10251function $c855b811fd5e8ae6$var$getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) { 10252 const isParentNodeArray = Array.isArray(data); 10253 if ($c855b811fd5e8ae6$var$isObject(data) || isParentNodeArray) { 10254 for(const key in data)if (Array.isArray(data[key]) || $c855b811fd5e8ae6$var$isObject(data[key]) && !$c855b811fd5e8ae6$var$objectHasFunction(data[key])) { 10255 if ($c855b811fd5e8ae6$var$isUndefined(formValues) || $c855b811fd5e8ae6$var$isPrimitive(dirtyFieldsFromValues[key])) dirtyFieldsFromValues[key] = Array.isArray(data[key]) ? $c855b811fd5e8ae6$var$markFieldsDirty(data[key], []) : (0, $ca7d1670581030c8$export$71511d61b312f219)({}, $c855b811fd5e8ae6$var$markFieldsDirty(data[key])); 10256 else $c855b811fd5e8ae6$var$getDirtyFieldsFromDefaultValues(data[key], $c855b811fd5e8ae6$var$isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]); 10257 } else dirtyFieldsFromValues[key] = !$c855b811fd5e8ae6$var$deepEqual(data[key], formValues[key]); 10258 } 10259 return dirtyFieldsFromValues; 10260} 10261var $c855b811fd5e8ae6$var$getDirtyFields = (defaultValues, formValues)=>$c855b811fd5e8ae6$var$getDirtyFieldsFromDefaultValues(defaultValues, formValues, $c855b811fd5e8ae6$var$markFieldsDirty(formValues)); 10262const $c855b811fd5e8ae6$var$defaultResult = { 10263 value: false, 10264 isValid: false 10265}; 10266const $c855b811fd5e8ae6$var$validResult = { 10267 value: true, 10268 isValid: true 10269}; 10270var $c855b811fd5e8ae6$var$getCheckboxValue = (options)=>{ 10271 if (Array.isArray(options)) { 10272 if (options.length > 1) { 10273 const values = options.filter((option)=>option && option.checked && !option.disabled).map((option)=>option.value); 10274 return { 10275 value: values, 10276 isValid: !!values.length 10277 }; 10278 } 10279 return options[0].checked && !options[0].disabled ? options[0].attributes && !$c855b811fd5e8ae6$var$isUndefined(options[0].attributes.value) ? $c855b811fd5e8ae6$var$isUndefined(options[0].value) || options[0].value === '' ? $c855b811fd5e8ae6$var$validResult : { 10280 value: options[0].value, 10281 isValid: true 10282 } : $c855b811fd5e8ae6$var$validResult : $c855b811fd5e8ae6$var$defaultResult; 10283 } 10284 return $c855b811fd5e8ae6$var$defaultResult; 10285}; 10286var $c855b811fd5e8ae6$var$getFieldValueAs = (value1, { valueAsNumber: valueAsNumber, valueAsDate: valueAsDate, setValueAs: setValueAs })=>$c855b811fd5e8ae6$var$isUndefined(value1) ? value1 : valueAsNumber ? value1 === '' ? NaN : value1 ? +value1 : value1 : valueAsDate && $c855b811fd5e8ae6$var$isString(value1) ? new Date(value1) : setValueAs ? setValueAs(value1) : value1; 10287const $c855b811fd5e8ae6$var$defaultReturn = { 10288 isValid: false, 10289 value: null 10290}; 10291var $c855b811fd5e8ae6$var$getRadioValue = (options)=>Array.isArray(options) ? options.reduce((previous, option)=>option && option.checked && !option.disabled ? { 10292 isValid: true, 10293 value: option.value 10294 } : previous, $c855b811fd5e8ae6$var$defaultReturn) : $c855b811fd5e8ae6$var$defaultReturn; 10295function $c855b811fd5e8ae6$var$getFieldValue(_f) { 10296 const ref = _f.ref; 10297 if ($c855b811fd5e8ae6$var$isFileInput(ref)) return ref.files; 10298 if ($c855b811fd5e8ae6$var$isRadioInput(ref)) return $c855b811fd5e8ae6$var$getRadioValue(_f.refs).value; 10299 if ($c855b811fd5e8ae6$var$isMultipleSelect(ref)) return [ 10300 ...ref.selectedOptions 10301 ].map(({ value: value1 })=>value1); 10302 if ($c855b811fd5e8ae6$var$isCheckBoxInput(ref)) return $c855b811fd5e8ae6$var$getCheckboxValue(_f.refs).value; 10303 return $c855b811fd5e8ae6$var$getFieldValueAs($c855b811fd5e8ae6$var$isUndefined(ref.value) ? _f.ref.value : ref.value, _f); 10304} 10305var $c855b811fd5e8ae6$var$getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation)=>{ 10306 const fields = {}; 10307 for (const name of fieldsNames){ 10308 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 10309 field && $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(fields, name, field._f); 10310 } 10311 return { 10312 criteriaMode: criteriaMode, 10313 names: [ 10314 ...fieldsNames 10315 ], 10316 fields: fields, 10317 shouldUseNativeValidation: shouldUseNativeValidation 10318 }; 10319}; 10320var $c855b811fd5e8ae6$var$isRegex = (value1)=>value1 instanceof RegExp; 10321var $c855b811fd5e8ae6$var$getRuleValue = (rule)=>$c855b811fd5e8ae6$var$isUndefined(rule) ? rule : $c855b811fd5e8ae6$var$isRegex(rule) ? rule.source : $c855b811fd5e8ae6$var$isObject(rule) ? $c855b811fd5e8ae6$var$isRegex(rule.value) ? rule.value.source : rule.value : rule; 10322var $c855b811fd5e8ae6$var$getValidationModes = (mode)=>({ 10323 isOnSubmit: !mode || mode === $c855b811fd5e8ae6$var$VALIDATION_MODE.onSubmit, 10324 isOnBlur: mode === $c855b811fd5e8ae6$var$VALIDATION_MODE.onBlur, 10325 isOnChange: mode === $c855b811fd5e8ae6$var$VALIDATION_MODE.onChange, 10326 isOnAll: mode === $c855b811fd5e8ae6$var$VALIDATION_MODE.all, 10327 isOnTouch: mode === $c855b811fd5e8ae6$var$VALIDATION_MODE.onTouched 10328 }); 10329const $c855b811fd5e8ae6$var$ASYNC_FUNCTION = 'AsyncFunction'; 10330var $c855b811fd5e8ae6$var$hasPromiseValidation = (fieldReference)=>!!fieldReference && !!fieldReference.validate && !!($c855b811fd5e8ae6$var$isFunction(fieldReference.validate) && fieldReference.validate.constructor.name === $c855b811fd5e8ae6$var$ASYNC_FUNCTION || $c855b811fd5e8ae6$var$isObject(fieldReference.validate) && Object.values(fieldReference.validate).find((validateFunction)=>validateFunction.constructor.name === $c855b811fd5e8ae6$var$ASYNC_FUNCTION)); 10331var $c855b811fd5e8ae6$var$hasValidation = (options)=>options.mount && (options.required || options.min || options.max || options.maxLength || options.minLength || options.pattern || options.validate); 10332var $c855b811fd5e8ae6$var$isWatched = (name, _names, isBlurEvent)=>
10332!isBlurEvent && (_names.watchAll || _names.watch.has(name) || [ 10333 ..._names.watch 10334 ].some((watchName)=>name.startsWith(watchName) && /^\.\w+/.test(name.slice(watchName.length)))); 10335const $c855b811fd5e8ae6$var$iterateFieldsByAction = (fields, action, fieldsNames, abortEarly)=>{ 10336 for (const _ref of fieldsNames || Object.keys(fields)){ 10337 let key = _ref; 10338 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(fields, key); 10339 if (field) { 10340 const { _f: _f } = field, currentField = (0, $e7548388a0765c32$export$71511d61b312f219)(field, [ 10341 "_f" 10342 ]); 10343 if (_f) { 10344 if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) return true; 10345 else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) return true; 10346 else { 10347 if ($c855b811fd5e8ae6$var$iterateFieldsByAction(currentField, action)) break; 10348 } 10349 } else if ($c855b811fd5e8ae6$var$isObject(currentField)) { 10350 if ($c855b811fd5e8ae6$var$iterateFieldsByAction(currentField, action)) break; 10351 } 10352 } 10353 } 10354 return; 10355}; 10356function $c855b811fd5e8ae6$var$schemaErrorLookup(errors, _fields, name) { 10357 const error = $c855b811fd5e8ae6$export$3988ae62b71be9a3(errors, name); 10358 if (error || $c855b811fd5e8ae6$var$isKey(name)) return { 10359 error: error, 10360 name: name 10361 }; 10362 const names = name.split('.'); 10363 while(names.length){ 10364 const fieldName = names.join('.'); 10365 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, fieldName); 10366 const foundError = $c855b811fd5e8ae6$export$3988ae62b71be9a3(errors, fieldName); 10367 if (field && !Array.isArray(field) && name !== fieldName) return { 10368 name: name 10369 }; 10370 if (foundError && foundError.type) return { 10371 name: fieldName, 10372 error: foundError 10373 }; 10374 if (foundError && foundError.root && foundError.root.type) return { 10375 name: `${fieldName}.root`, 10376 error: foundError.root 10377 }; 10378 names.pop(); 10379 } 10380 return { 10381 name: name 10382 }; 10383} 10384var $c855b811fd5e8ae6$var$shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot)=>{ 10385 updateFormState(formStateData); 10386 const { name: name } = formStateData, formState = (0, $e7548388a0765c32$export$71511d61b312f219)(formStateData, [ 10387 "name" 10388 ]); 10389 return $c855b811fd5e8ae6$var$isEmptyObject(formState) || Object.keys(formState).length >= Object.keys(_proxyFormState).length || Object.keys(formState).find((key)=>_proxyFormState[key] === (!isRoot || $c855b811fd5e8ae6$var$VALIDATION_MODE.all)); 10390}; 10391var $c855b811fd5e8ae6$var$shouldSubscribeByName = (name, signalName, exact)=>!name || !signalName || name === signalName || $c855b811fd5e8ae6$var$convertToArrayPayload(name).some((currentName)=>currentName && (exact ? currentName === signalName : currentName.startsWith(signalName) || signalName.startsWith(currentName))); 10392var $c855b811fd5e8ae6$var$skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode)=>{ 10393 if (mode.isOnAll) return false; 10394 else if (!isSubmitted && mode.isOnTouch) return !(isTouched || isBlurEvent); 10395 else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) return !isBlurEvent; 10396 else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) return isBlurEvent; 10397 return true; 10398}; 10399var $c855b811fd5e8ae6$var$unsetEmptyArray = (ref, name)=>!$c855b811fd5e8ae6$var$compact($c855b811fd5e8ae6$export$3988ae62b71be9a3(ref, name)).length && $c855b811fd5e8ae6$var$unset(ref, name); 10400var $c855b811fd5e8ae6$var$updateFieldArrayRootError = (errors, error, name)=>{ 10401 const fieldArrayErrors = $c855b811fd5e8ae6$var$convertToArrayPayload($c855b811fd5e8ae6$export$3988ae62b71be9a3(errors, name)); 10402 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(fieldArrayErrors, 'root', error[name]); 10403 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(errors, name, fieldArrayErrors); 10404 return errors; 10405}; 10406var $c855b811fd5e8ae6$var$isMessage = (value1)=>$c855b811fd5e8ae6$var$isString(value1);
10407function $c855b811fd5e8ae6$var$getValidateError(result, ref, type = 'validate') { 10408 if ($c855b811fd5e8ae6$var$isMessage(result) || Array.isArray(result) && result.every($c855b811fd5e8ae6$var$isMessage) || $c855b811fd5e8ae6$var$isBoolean(result) && !result) return { 10409 type: type, 10410 message: $c855b811fd5e8ae6$var$isMessage(result) ? result : '', 10411 ref: ref 10412 }; 10413} 10414var $c855b811fd5e8ae6$var$getValueAndMessage = (validationData)=>$c855b811fd5e8ae6$var$isObject(validationData) && !$c855b811fd5e8ae6$var$isRegex(validationData) ? validationData : { 10415 value: validationData, 10416 message: '' 10417 }; 10418var $c855b811fd5e8ae6$var$validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray)=>{ 10419 const { ref: ref, refs: refs, required: required, maxLength: maxLength, minLength: minLength, min: min, max: max, pattern: pattern, validate: validate, name: name, valueAsNumber: valueAsNumber, mount: mount } = field._f; 10420 const inputValue = $c855b811fd5e8ae6$export$3988ae62b71be9a3(formValues, name); 10421 if (!mount || disabledFieldNames.has(name)) return {}; 10422 const inputRef = refs ? refs[0] : ref; 10423 const setCustomValidity = (message)=>{ 10424 if (shouldUseNativeValidation && inputRef.reportValidity) { 10425 inputRef.setCustomValidity($c855b811fd5e8ae6$var$isBoolean(message) ? '' : message || ''); 10426 inputRef.reportValidity(); 10427 } 10428 }; 10429 const error = {}; 10430 const isRadio = $c855b811fd5e8ae6$var$isRadioInput(ref); 10431 const isCheckBox = $c855b811fd5e8ae6$var$isCheckBoxInput(ref); 10432 const isRadioOrCheckbox = isRadio || isCheckBox; 10433 const isEmpty = (valueAsNumber || $c855b811fd5e8ae6$var$isFileInput(ref)) && $c855b811fd5e8ae6$var$isUndefined(ref.value) && $c855b811fd5e8ae6$var$isUndefined(inputValue) || $c855b811fd5e8ae6$var$isHTMLElement(ref) && ref.value === '' || inputValue === '' || Array.isArray(inputValue) && !inputValue.length; 10434 const appendErrorsCurry = $c855b811fd5e8ae6$export$b196c2a4f765bd30.bind(null, name, validateAllFieldCriteria, error); 10435 const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = $c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.maxLength, minType = $c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.minLength)=>{ 10436 const message = exceedMax ? maxLengthMessage : minLengthMessage; 10437 error[name] = (0, $ca7d1670581030c8$export$71511d61b312f219)({ 10438 type: exceedMax ? maxType : minType, 10439 message: message, 10440 ref: ref 10441 }, appendErrorsCurry(exceedMax ? maxType : minType, message)); 10442 }; 10443 if (isFieldArray ? !Array.isArray(inputValue) || !inputValue.length : required && (!isRadioOrCheckbox && (isEmpty || $c855b811fd5e8ae6$var$isNullOrUndefined(inputValue)) || $c855b811fd5e8ae6$var$isBoolean(inputValue) && !inputValue || isCheckBox && !$c855b811fd5e8ae6$var$getCheckboxValue(refs).isValid || isRadio && !$c855b811fd5e8ae6$var$getRadioValue(refs).isValid)) { 10444 const { value: value1, message: message } = $c855b811fd5e8ae6$var$isMessage(required) ? { 10445 value: !!required, 10446 message: required 10447 } : $c855b811fd5e8ae6$var$getValueAndMessage(required); 10448 if (value1) { 10449 error[name] = (0, $ca7d1670581030c8$export$71511d61b312f219)({ 10450 type: $c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.required, 10451 message: message, 10452 ref: inputRef 10453 }, appendErrorsCurry($c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.required, message)); 10454 if (!validateAllFieldCriteria) { 10455 setCustomValidity(message); 10456 return error; 10457 } 10458 } 10459 } 10460 if (!isEmpty && (!$c855b811fd5e8ae6$var$isNullOrUndefined(min) || !$c855b811fd5e8ae6$var$isNullOrUndefined(max))) { 10461 let exceedMax; 10462 let exceedMin; 10463 const maxOutput = $c855b811fd5e8ae6$var$getValueAndMessage(max); 10464 const minOutput = $c855b811fd5e8ae6$var$getValueAndMessage(min); 10465 if (!$c855b811fd5e8ae6$var$isNullOrUndefined(inputValue) && !isNaN(inputValue)) { 10466 const valueNumber = ref.valueAsNumber || (inputValue ? +inputValue : inputValue); 10467 if (!$c855b811fd5e8ae6$var$isNullOrUndefined(maxOutput.value)) exceedMax = valueNumber > maxOutput.value; 10468 if (!$c855b811fd5e8ae6$var$isNullOrUndefined(minOutput.value)) exceedMin = valueNumber < minOutput.value; 10469 } else { 10470 const valueDate = ref.valueAsDate || new Date(inputValue); 10471 const convertTimeToDate = (time)=>new Date(new Date().toDateString() + ' ' + time); 10472 const isTime = ref.type == 'time'; 10473 const isWeek = ref.type == 'week'; 10474 if ($c855b811fd5e8ae6$var$isString(maxOutput.value) && inputValue) exceedMax = isTime ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value) : isWeek ? inputValue > maxOutput.value : valueDate > new Date(maxOutput.value); 10475 if ($c855b811fd5e8ae6$var$isString(minOutput.value) && inputValue) exceedMin = isTime ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value) : isWeek ? inputValue < minOutput.value : valueDate < new Date(minOutput.value); 10476 } 10477 if (exceedMax || exceedMin) { 10478 getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, $c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.max, $c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.min); 10479 if (!validateAllFieldCriteria) { 10480 setCustomValidity(error[name].message); 10481 return error; 10482 } 10483 } 10484 } 10485 if ((maxLength || minLength) && !isEmpty && ($c855b811fd5e8ae6$var$isString(inputValue) || isFieldArray && Array.isArray(inputValue))) { 10486 const maxLengthOutput = $c855b811fd5e8ae6$var$getValueAndMessage(maxLength); 10487 const minLengthOutput = $c855b811fd5e8ae6$var$getValueAndMessage(minLength); 10488 const exceedMax = !$c855b811fd5e8ae6$var$isNullOrUndefined(maxLengthOutput.value) && inputValue.length > +maxLengthOutput.value; 10489 const exceedMin = !$c855b811fd5e8ae6$var$isNullOrUndefined(minLengthOutput.value) && inputValue.length < +minLengthOutput.value; 10490 if (exceedMax || exceedMin) { 10491 getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message); 10492 if (!validateAllFieldCriteria) { 10493 setCustomValidity(error[name].message); 10494 return error; 10495 } 10496 } 10497 } 10498 if (pattern && !isEmpty && $c855b811fd5e8ae6$var$isString(inputValue)) { 10499 const { value: patternValue, message: message } = $c855b811fd5e8ae6$var$getValueAndMessage(pattern); 10500 if ($c855b811fd5e8ae6$var$isRegex(patternValue) && !inputValue.match(patternValue)) { 10501 error[name] = (0, $ca7d1670581030c8$export$71511d61b312f219)({ 10502 type: $c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.pattern, 10503 message: message, 10504 ref: ref 10505 }, appendErrorsCurry($c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.pattern, message)); 10506 if (!validateAllFieldCriteria) { 10507 setCustomValidity(message); 10508 return error; 10509 } 10510 } 10511 } 10512 if (validate) {
10513 if ($c855b811fd5e8ae6$var$isFunction(validate)) { 10514 const result = await validate(inputValue, formValues); 10515 const validateError = $c855b811fd5e8ae6$var$getValidateError(result, inputRef); 10516 if (validateError) { 10517 error[name] = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, validateError, appendErrorsCurry($c855b811fd5e8ae6$var$INPUT_VALIDATION_RULES.validate, validateError.message)); 10518 if (!validateAllFieldCriteria) { 10519 setCustomValidity(validateError.message); 10520 return error; 10521 } 10522 } 10523 } else if ($c855b811fd5e8ae6$var$isObject(validate)) { 10524 let validationResult = {}; 10525 for(const key in validate){ 10526 if (!$c855b811fd5e8ae6$var$isEmptyObject(validationResult) && !validateAllFieldCriteria) break; 10527 const validateError = $c855b811fd5e8ae6$var$getValidateError(await validate[key](inputValue, formValues), inputRef, key); 10528 if (validateError) { 10529 validationResult = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, validateError, appendErrorsCurry(key, validateError.message)); 10530 setCustomValidity(validateError.message); 10531 if (validateAllFieldCriteria) error[name] = validationResult; 10532 } 10533 } 10534 if (!$c855b811fd5e8ae6$var$isEmptyObject(validationResult)) { 10535 error[name] = (0, $ca7d1670581030c8$export$71511d61b312f219)({ 10536 ref: inputRef 10537 }, validationResult); 10538 if (!validateAllFieldCriteria) return error; 10539 } 10540 } 10541 } 10542 setCustomValidity(true); 10543 return error; 10544}; 10545const $c855b811fd5e8ae6$var$defaultOptions = { 10546 mode: $c855b811fd5e8ae6$var$VALIDATION_MODE.onSubmit, 10547 reValidateMode: $c855b811fd5e8ae6$var$VALIDATION_MODE.onChange, 10548 shouldFocusError: true 10549}; 10550function $c855b811fd5e8ae6$export$1361f5e0e4cca3c3(props = {}) { 10551 let _options = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, $c855b811fd5e8ae6$var$defaultOptions, props); 10552 let _formState = { 10553 submitCount: 0, 10554 isDirty: false, 10555 isReady: false, 10556 isLoading: $c855b811fd5e8ae6$var$isFunction(_options.defaultValues), 10557 isValidating: false, 10558 isSubmitted: false, 10559 isSubmitting: false, 10560 isSubmitSuccessful: false, 10561 isValid: false, 10562 touchedFields: {}, 10563 dirtyFields: {}, 10564 validatingFields: {}, 10565 errors: _options.errors || {}, 10566 disabled: _options.disabled || false 10567 }; 10568 let _fields = {}; 10569 let _defaultValues = $c855b811fd5e8ae6$var$isObject(_options.defaultValues) || $c855b811fd5e8ae6$var$isObject(_options.values) ? $c855b811fd5e8ae6$var$cloneObject(_options.defaultValues || _options.values) || {} : {}; 10570 let _formValues = _options.shouldUnregister ? {} : $c855b811fd5e8ae6$var$cloneObject(_defaultValues); 10571 let _state = { 10572 action: false, 10573 mount: false, 10574 watch: false 10575 }; 10576 let _names = { 10577 mount: new Set(), 10578 disabled: new Set(), 10579 unMount: new Set(), 10580 array: new Set(), 10581 watch: new Set() 10582 }; 10583 let delayErrorCallback; 10584 let timer = 0; 10585 const _proxyFormState = { 10586 isDirty: false, 10587 dirtyFields: false, 10588 validatingFields: false, 10589 touchedFields: false, 10590 isValidating: false, 10591 isValid: false, 10592 errors: false 10593 }; 10594 let _proxySubscribeFormState = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _proxyFormState); 10595 const _subjects = { 10596 array: $c855b811fd5e8ae6$var$createSubject(), 10597 state: $c855b811fd5e8ae6$var$createSubject() 10598 }; 10599 const shouldDisplayAllAssociatedErrors = _options.criteriaMode === $c855b811fd5e8ae6$var$VALIDATION_MODE.all; 10600 const debounce = (callback)=>(wait)=>{ 10601 clearTimeout(timer); 10602 timer = setTimeout(callback, wait); 10603 }; 10604 const _setValid = async (shouldUpdateValid)=>{ 10605 if (!_options.disabled && (_proxyFormState.isValid || _proxySubscribeFormState.isValid || shouldUpdateValid)) { 10606 const isValid = _options.resolver ? $c855b811fd5e8ae6$var$isEmptyObject((await _runSchema()).errors) : await executeBuiltInValidation(_fields, true); 10607 if (isValid !== _formState.isValid) _subjects.state.next({ 10608 isValid: isValid 10609 }); 10610 } 10611 }; 10612 const _updateIsValidating = (names, isValidating)=>{ 10613 if (!_options.disabled && (_proxyFormState.isValidating || _proxyFormState.validatingFields || _proxySubscribeFormState.isValidating || _proxySubscribeFormState.validatingFields)) {
10614 (names || Array.from(_names.mount)).forEach((name)=>{ 10615 if (name) isValidating ? $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.validatingFields, name, isValidating) : $c855b811fd5e8ae6$var$unset(_formState.validatingFields, name); 10616 }); 10617 _subjects.state.next({ 10618 validatingFields: _formState.validatingFields, 10619 isValidating: !$c855b811fd5e8ae6$var$isEmptyObject(_formState.validatingFields) 10620 }); 10621 } 10622 }; 10623 const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true)=>{ 10624 if (args && method && !_options.disabled) { 10625 _state.action = true; 10626 if (shouldUpdateFieldsAndState && Array.isArray($c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name))) { 10627 const fieldValues = method($c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name), args.argA, args.argB); 10628 shouldSetValues && $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_fields, name, fieldValues); 10629 } 10630 if (shouldUpdateFieldsAndState && Array.isArray($c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.errors, name))) { 10631 const errors = method($c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.errors, name), args.argA, args.argB); 10632 shouldSetValues && $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.errors, name, errors); 10633 $c855b811fd5e8ae6$var$unsetEmptyArray(_formState.errors, name); 10634 } 10635 if ((_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && shouldUpdateFieldsAndState && Array.isArray($c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.touchedFields, name))) { 10636 const touchedFields = method($c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.touchedFields, name), args.argA, args.argB); 10637 shouldSetValues && $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.touchedFields, name, touchedFields); 10638 } 10639 if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) _formState.dirtyFields = $c855b811fd5e8ae6$var$getDirtyFields(_defaultValues, _formValues); 10640 _subjects.state.next({ 10641 name: name, 10642 isDirty: _getDirty(name, values), 10643 dirtyFields: _formState.dirtyFields, 10644 errors: _formState.errors, 10645 isValid: _formState.isValid 10646 }); 10647 } else $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formValues, name, values); 10648 }; 10649 const updateErrors = (name, error)=>{ 10650 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.errors, name, error); 10651 _subjects.state.next({ 10652 errors: _formState.errors 10653 }); 10654 }; 10655 const _setErrors = (errors)=>{ 10656 _formState.errors = errors; 10657 _subjects.state.next({ 10658 errors: _formState.errors, 10659 isValid: false 10660 }); 10661 }; 10662 const updateValidAndValue = (name, shouldSkipSetValueAs, value1, ref)=>{ 10663 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 10664 if (field) { 10665 const defaultValue = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_formValues, name, $c855b811fd5e8ae6$var$isUndefined(value1) ? $c855b811fd5e8ae6$export$3988ae62b71be9a3(_defaultValues, name) : value1); 10666 $c855b811fd5e8ae6$var$isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formValues, name, shouldSkipSetValueAs ? defaultValue : $c855b811fd5e8ae6$var$getFieldValue(field._f)) : setFieldValue(name, defaultValue); 10667 _state.mount && _setValid(); 10668 } 10669 }; 10670 const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender)=>{ 10671 let shouldUpdateField = false; 10672 let isPreviousDirty = false; 10673 const output = { 10674 name: name 10675 }; 10676 if (!_options.disabled) { 10677 if (!isBlurEvent || shouldDirty) { 10678 if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) { 10679 isPreviousDirty = _formState.isDirty; 10680 _formState.isDirty = output.isDirty = _getDirty(); 10681 shouldUpdateField = isPreviousDirty !== output.isDirty; 10682 } 10683 const isCurrentFieldPristine = $c855b811fd5e8ae6$var$deepEqual($c855b811fd5e8ae6$export$3988ae62b71be9a3(_defaultValues, name), fieldValue); 10684 isPreviousDirty = !!$c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.dirtyFields, name); 10685 isCurrentFieldPristine ? $c855b811fd5e8ae6$var$unset(_formState.dirtyFields, name) : $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.dirtyFields, name, true); 10686 output.dirtyFields = _formState.dirtyFields; 10687 shouldUpdateField = shouldUpdateField || (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) && isPreviousDirty !== !isCurrentFieldPristine; 10688 } 10689 if (isBlurEvent) { 10690 const isPreviousFieldTouched = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.touchedFields, name); 10691 if (!isPreviousFieldTouched) { 10692 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.touchedFields, name, isBlurEvent); 10693 output.touchedFields = _formState.touchedFields; 10694 shouldUpdateField = shouldUpdateField || (_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && isPreviousFieldTouched !== isBlurEvent; 10695 } 10696 } 10697 shouldUpdateField && shouldRender && _subjects.state.next(output); 10698 } 10699 return shouldUpdateField ? output : {}; 10700 }; 10701 const shouldRenderByError = (name, isValid, error, fieldState)=>{ 10702 const previousFieldError = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.errors, name); 10703 const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && $c855b811fd5e8ae6$var$isBoolean(isValid) && _formState.isValid !== isValid; 10704 if (_options.delayError && error) { 10705 delayErrorCallback = debounce(()=>updateErrors(name, error)); 10706 delayErrorCallback(_options.delayError); 10707 } else { 10708 clearTimeout(timer); 10709 delayErrorCallback = null; 10710 error ? $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.errors, name, error) : $c855b811fd5e8ae6$var$unset(_formState.errors, name); 10711 } 10712 if ((error ? !$c855b811fd5e8ae6$var$deepEqual(previousFieldError, error) : previousFieldError) || !$c855b811fd5e8ae6$var$isEmptyObject(fieldState) || shouldUpdateValid) { 10713 const updatedFormState = (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, fieldState, shouldUpdateValid && $c855b811fd5e8ae6$var$isBoolean(isValid) ? { 10714 isValid: isValid 10715 } : {}), { 10716 errors: _formState.errors, 10717 name: name 10718 }); 10719 _formState = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formState, updatedFormState); 10720 _subjects.state.next(updatedFormState); 10721 } 10722 }; 10723 const _runSchema = async (name)=>{ 10724 _updateIsValidating(name, true); 10725 const result = await _options.resolver(_formValues, _options.context, $c855b811fd5e8ae6$var$getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation)); 10726 _updateIsValidating(name); 10727 return result; 10728 }; 10729 const executeSchemaAndUpdateState = async (names)=>{ 10730 const { errors: errors } = await _runSchema(names); 10731 if (names) for (const name of names){ 10732 const error = $c855b811fd5e8ae6$export$3988ae62b71be9a3(errors, name); 10733 error ? $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.errors, name, error) : $c855b811fd5e8ae6$var$unset(_formState.errors, name); 10734 } 10735 else _formState.errors = errors; 10736 return errors; 10737 }; 10738 const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = { 10739 valid: true 10740 })=>{ 10741 for(const _ref in fields){ 10742 let name = _ref;
10743 const field = fields[name]; 10744 if (field) { 10745 const { _f: _f } = field, fieldValue = (0, $e7548388a0765c32$export$71511d61b312f219)(field, [ 10746 "_f" 10747 ]); 10748 if (_f) { 10749 const isFieldArrayRoot = _names.array.has(_f.name); 10750 const isPromiseFunction = field._f && $c855b811fd5e8ae6$var$hasPromiseValidation(field._f); 10751 if (isPromiseFunction && _proxyFormState.validatingFields) _updateIsValidating([ 10752 name 10753 ], true); 10754 const fieldError = await $c855b811fd5e8ae6$var$validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot); 10755 if (isPromiseFunction && _proxyFormState.validatingFields) _updateIsValidating([ 10756 name 10757 ]); 10758 if (fieldError[_f.name]) { 10759 context.valid = false; 10760 if (shouldOnlyCheckValid) break; 10761 } 10762 !shouldOnlyCheckValid && ($c855b811fd5e8ae6$export$3988ae62b71be9a3(fieldError, _f.name) ? isFieldArrayRoot ? $c855b811fd5e8ae6$var$updateFieldArrayRootError(_formState.errors, fieldError, _f.name) : $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.errors, _f.name, fieldError[_f.name]) : $c855b811fd5e8ae6$var$unset(_formState.errors, _f.name)); 10763 } 10764 !$c855b811fd5e8ae6$var$isEmptyObject(fieldValue) && await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context); 10765 } 10766 } 10767 return context.valid; 10768 }; 10769 const _removeUnmounted = ()=>{ 10770 for (const name of _names.unMount){ 10771 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 10772 field && (field._f.refs ? field._f.refs.every((ref)=>!$c855b811fd5e8ae6$var$live(ref)) : !$c855b811fd5e8ae6$var$live(field._f.ref)) && unregister(name); 10773 } 10774 _names.unMount = new Set(); 10775 }; 10776 const _getDirty = (name, data)=>!_options.disabled && (name && data && $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formValues, name, data), !$c855b811fd5e8ae6$var$deepEqual(getValues(), _defaultValues)); 10777 const _getWatch = (names, defaultValue, isGlobal)=>$c855b811fd5e8ae6$var$generateWatchOutput(names, _names, (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _state.mount ? _formValues : $c855b811fd5e8ae6$var$isUndefined(defaultValue) ? _defaultValues : $c855b811fd5e8ae6$var$isString(names) ? { 10778 [names]: defaultValue 10779 } : defaultValue), isGlobal, defaultValue); 10780 const _getFieldArray = (name)=>$c855b811fd5e8ae6$var$compact($c855b811fd5e8ae6$export$3988ae62b71be9a3(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? $c855b811fd5e8ae6$export$3988ae62b71be9a3(_defaultValues, name, []) : [])); 10781 const setFieldValue = (name, value1, options = {})=>{ 10782 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 10783 let fieldValue = value1; 10784 if (field) { 10785 const fieldReference = field._f; 10786 if (fieldReference) { 10787 !fieldReference.disabled && $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formValues, name, $c855b811fd5e8ae6$var$getFieldValueAs(value1, fieldReference)); 10788 fieldValue = $c855b811fd5e8ae6$var$isHTMLElement(fieldReference.ref) && $c855b811fd5e8ae6$var$isNullOrUndefined(value1) ? '' : value1; 10789 if ($c855b811fd5e8ae6$var$isMultipleSelect(fieldReference.ref)) [ 10790 ...fieldReference.ref.options 10791 ].forEach((optionRef)=>optionRef.selected = fieldValue.includes(optionRef.value)); 10792 else if (fieldReference.refs) { 10793 if ($c855b811fd5e8ae6$var$isCheckBoxInput(fieldReference.ref)) fieldReference.refs.forEach((checkboxRef)=>{ 10794 if (!checkboxRef.defaultChecked || !checkboxRef.disabled) { 10795 if (Array.isArray(fieldValue)) checkboxRef.checked = !!fieldValue.find((data)=>data === checkboxRef.value); 10796 else checkboxRef.checked = fieldValue === checkboxRef.value || !!fieldValue; 10797 } 10798 });
10799 else fieldReference.refs.forEach((radioRef)=>radioRef.checked = radioRef.value === fieldValue); 10800 } else if ($c855b811fd5e8ae6$var$isFileInput(fieldReference.ref)) fieldReference.ref.value = ''; 10801 else { 10802 fieldReference.ref.value = fieldValue; 10803 if (!fieldReference.ref.type) _subjects.state.next({ 10804 name: name, 10805 values: $c855b811fd5e8ae6$var$cloneObject(_formValues) 10806 }); 10807 } 10808 } 10809 } 10810 (options.shouldDirty || options.shouldTouch) && updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true); 10811 options.shouldValidate && trigger(name); 10812 }; 10813 const setValues = (name, value1, options)=>{ 10814 for(const fieldKey in value1){ 10815 if (!value1.hasOwnProperty(fieldKey)) return; 10816 const fieldValue = value1[fieldKey]; 10817 const fieldName = name + '.' + fieldKey; 10818 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, fieldName); 10819 (_names.array.has(name) || $c855b811fd5e8ae6$var$isObject(fieldValue) || field && !field._f) && !$c855b811fd5e8ae6$var$isDateObject(fieldValue) ? setValues(fieldName, fieldValue, options) : setFieldValue(fieldName, fieldValue, options); 10820 } 10821 }; 10822 const setValue = (name, value1, options = {})=>{ 10823 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 10824 const isFieldArray = _names.array.has(name); 10825 const cloneValue = $c855b811fd5e8ae6$var$cloneObject(value1); 10826 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formValues, name, cloneValue); 10827 if (isFieldArray) { 10828 _subjects.array.next({ 10829 name: name, 10830 values: $c855b811fd5e8ae6$var$cloneObject(_formValues) 10831 }); 10832 if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields || _proxySubscribeFormState.isDirty || _proxySubscribeFormState.dirtyFields) && options.shouldDirty) _subjects.state.next({ 10833 name: name, 10834 dirtyFields: $c855b811fd5e8ae6$var$getDirtyFields(_defaultValues, _formValues), 10835 isDirty: _getDirty(name, cloneValue) 10836 }); 10837 } else field && !field._f && !$c855b811fd5e8ae6$var$isNullOrUndefined(cloneValue) ? setValues(name, cloneValue, options) : setFieldValue(name, cloneValue, options); 10838 $c855b811fd5e8ae6$var$isWatched(name, _names) && _subjects.state.next((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formState), { 10839 name: name 10840 })); 10841 _subjects.state.next({ 10842 name: _state.mount ? name : undefined, 10843 values: $c855b811fd5e8ae6$var$cloneObject(_formValues) 10844 }); 10845 }; 10846 const onChange = async (event)=>{ 10847 _state.mount = true; 10848 const target = event.target; 10849 let name = target.name; 10850 let isFieldValueUpdated = true; 10851 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 10852 const _updateIsFieldValueUpdated = (fieldValue)=>{ 10853 isFieldValueUpdated = Number.isNaN(fieldValue) || $c855b811fd5e8ae6$var$isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || $c855b811fd5e8ae6$var$deepEqual(fieldValue, $c855b811fd5e8ae6$export$3988ae62b71be9a3(_formValues, name, fieldValue)); 10854 }; 10855 const validationModeBeforeSubmit = $c855b811fd5e8ae6$var$getValidationModes(_options.mode); 10856 const validationModeAfterSubmit = $c855b811fd5e8ae6$var$getValidationModes(_options.reValidateMode); 10857 if (field) { 10858 let error; 10859 let isValid; 10860 const fieldValue = target.type ? $c855b811fd5e8ae6$var$getFieldValue(field._f) : $c855b811fd5e8ae6$var$getEventValue(event); 10861 const isBlurEvent = event.type === $c855b811fd5e8ae6$var$EVENTS.BLUR || event.type === $c855b811fd5e8ae6$var$EVENTS.FOCUS_OUT; 10862 const shouldSkipValidation = !$c855b811fd5e8ae6$var$hasValidation(field._f) && !_options.resolver && !$c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.errors, name) && !field._f.deps || $c855b811fd5e8ae6$var$skipValidation(isBlurEvent, $c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit); 10863 const watched = $c855b811fd5e8ae6$var$isWatched(name, _names, isBlurEvent); 10864 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formValues, name, fieldValue); 10865 if (isBlurEvent) { 10866 if (!target || !target.readOnly) { 10867 field._f.onBlur && field._f.onBlur(event); 10868 delayErrorCallback && delayErrorCallback(0); 10869 } 10870 } else if (field._f.onChange) field._f.onChange(event); 10871 const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent); 10872 const shouldRender = !$c855b811fd5e8ae6$var$isEmptyObject(fieldState) || watched; 10873 !isBlurEvent && _subjects.state.next({ 10874 name: name, 10875 type: event.type, 10876 values: $c855b811fd5e8ae6$var$cloneObject(_formValues) 10877 }); 10878 if (shouldSkipValidation) { 10879 if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) { 10880 if (_options.mode === 'onBlur') { 10881 if (isBlurEvent) _setValid(); 10882 } else if (!isBlurEvent) _setValid(); 10883 } 10884 return shouldRender && _subjects.state.next((0, $ca7d1670581030c8$export$71511d61b312f219)({ 10885 name: name 10886 }, watched ? {} : fieldState)); 10887 } 10888 !isBlurEvent && watched && _subjects.state.next((0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formState)); 10889 if (_options.resolver) { 10890 const { errors: errors } = await _runSchema([ 10891 name 10892 ]); 10893 _updateIsFieldValueUpdated(fieldValue); 10894 if (isFieldValueUpdated) { 10895 const previousErrorLookupResult = $c855b811fd5e8ae6$var$schemaErrorLookup(_formState.errors, _fields, name); 10896 const errorLookupResult = $c855b811fd5e8ae6$var$schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name); 10897 error = errorLookupResult.error; 10898 name = errorLookupResult.name; 10899 isValid = $c855b811fd5e8ae6$var$isEmptyObject(errors); 10900 } 10901 } else { 10902 _updateIsValidating([ 10903 name 10904 ], true); 10905 error = (await $c855b811fd5e8ae6$var$validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name]; 10906 _updateIsValidating([ 10907 name 10908 ]); 10909 _updateIsFieldValueUpdated(fieldValue); 10910 if (isFieldValueUpdated) { 10911 if (error) isValid = false;
10912 else if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) isValid = await executeBuiltInValidation(_fields, true); 10913 } 10914 } 10915 if (isFieldValueUpdated) { 10916 field._f.deps && trigger(field._f.deps); 10917 shouldRenderByError(name, isValid, error, fieldState); 10918 } 10919 } 10920 }; 10921 const _focusInput = (ref, key)=>{ 10922 if ($c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.errors, key) && ref.focus) { 10923 ref.focus(); 10924 return 1; 10925 } 10926 return; 10927 }; 10928 const trigger = async (name, options = {})=>{ 10929 let isValid; 10930 let validationResult; 10931 const fieldNames = $c855b811fd5e8ae6$var$convertToArrayPayload(name); 10932 if (_options.resolver) { 10933 const errors = await executeSchemaAndUpdateState($c855b811fd5e8ae6$var$isUndefined(name) ? name : fieldNames); 10934 isValid = $c855b811fd5e8ae6$var$isEmptyObject(errors); 10935 validationResult = name ? !fieldNames.some((name)=>$c855b811fd5e8ae6$export$3988ae62b71be9a3(errors, name)) : isValid; 10936 } else if (name) { 10937 validationResult = (await Promise.all(fieldNames.map(async (fieldName)=>{ 10938 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, fieldName); 10939 return await executeBuiltInValidation(field && field._f ? { 10940 [fieldName]: field 10941 } : field); 10942 }))).every(Boolean); 10943 !(!validationResult && !_formState.isValid) && _setValid(); 10944 } else validationResult = isValid = await executeBuiltInValidation(_fields); 10945 _subjects.state.next((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, !$c855b811fd5e8ae6$var$isString(name) || (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && isValid !== _formState.isValid ? {} : { 10946 name: name 10947 }, _options.resolver || !name ? { 10948 isValid: isValid 10949 } : {}), { 10950 errors: _formState.errors 10951 })); 10952 options.shouldFocus && !validationResult && $c855b811fd5e8ae6$var$iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount); 10953 return validationResult; 10954 }; 10955 const getValues = (fieldNames)=>{ 10956 const values = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _state.mount ? _formValues : _defaultValues); 10957 return $c855b811fd5e8ae6$var$isUndefined(fieldNames) ? values : $c855b811fd5e8ae6$var$isString(fieldNames) ? $c855b811fd5e8ae6$export$3988ae62b71be9a3(values, fieldNames) : fieldNames.map((name)=>$c855b811fd5e8ae6$export$3988ae62b71be9a3(values, name)); 10958 }; 10959 const getFieldState = (name, formState)=>({ 10960 invalid: !!$c855b811fd5e8ae6$export$3988ae62b71be9a3((formState || _formState).errors, name), 10961 isDirty: !!$c855b811fd5e8ae6$export$3988ae62b71be9a3((formState || _formState).dirtyFields, name), 10962 error: $c855b811fd5e8ae6$export$3988ae62b71be9a3((formState || _formState).errors, name), 10963 isValidating: !!$c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.validatingFields, name), 10964 isTouched: !!$c855b811fd5e8ae6$export$3988ae62b71be9a3((formState || _formState).touchedFields, name) 10965 }); 10966 const clearErrors = (name)=>{ 10967 name && $c855b811fd5e8ae6$var$convertToArrayPayload(name).forEach((inputName)=>$c855b811fd5e8ae6$var$unset(_formState.errors, inputName)); 10968 _subjects.state.next({ 10969 errors: name ? _formState.errors : {} 10970 }); 10971 }; 10972 const setError = (name, error, options)=>{ 10973 const ref = ($c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name, { 10974 _f: {} 10975 })._f || {}).ref; 10976 const currentError = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.errors, name) || {}; 10977 // Don't override existing error messages elsewhere in the object tree. 10978 const { ref: currentRef, message: message, type: type } = currentError, restOfErrorTree = (0, $e7548388a0765c32$export$71511d61b312f219)(currentError, [ 10979 "ref", 10980 "message", 10981 "type" 10982 ]); 10983 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_formState.errors, name, (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, restOfErrorTree, error), { 10984 ref: ref 10985 })); 10986 _subjects.state.next({ 10987 name: name, 10988 errors: _formState.errors, 10989 isValid: false 10990 }); 10991 options && options.shouldFocus && ref && ref.focus && ref.focus(); 10992 }; 10993 const watch = (name, defaultValue)=>$c855b811fd5e8ae6$var$isFunction(name) ? _subjects.state.subscribe({ 10994 next: (payload)=>'values' in payload && name(_getWatch(undefined, defaultValue), payload) 10995 }) : _getWatch(name, defaultValue, true); 10996 const _subscribe = (props)=>_subjects.state.subscribe({ 10997 next: (formState)=>{ 10998 if ($c855b811fd5e8ae6$var$shouldSubscribeByName(props.name, formState.name, props.exact) && $c855b811fd5e8ae6$var$shouldRenderFormState(formState, props.formState || _proxyFormState, _setFormState, props.reRenderRoot)) props.callback((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({ 10999 values: (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formValues) 11000 }, _formState, formState), { 11001 defaultValues: _defaultValues 11002 })); 11003 } 11004 }).unsubscribe; 11005 const subscribe = (props)=>{ 11006 _state.mount = true; 11007 _proxySubscribeFormState = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _proxySubscribeFormState, props.formState); 11008 return _subscribe((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, props), { 11009 formState: _proxySubscribeFormState 11010 })); 11011 }; 11012 const unregister = (name, options = {})=>{ 11013 for (const fieldName of name ? $c855b811fd5e8ae6$var$convertToArrayPayload(name) : _names.mount){ 11014 _names.mount.delete(fieldName); 11015 _names.array.delete(fieldName); 11016 if (!options.keepValue) { 11017 $c855b811fd5e8ae6$var$unset(_fields, fieldName); 11018 $c855b811fd5e8ae6$var$unset(_formValues, fieldName); 11019 } 11020 !options.keepError && $c855b811fd5e8ae6$var$unset(_formState.errors, fieldName); 11021 !options.keepDirty && $c855b811fd5e8ae6$var$unset(_formState.dirtyFields, fieldName); 11022 !options.keepTouched && $c855b811fd5e8ae6$var$unset(_formState.touchedFields, fieldName); 11023 !options.keepIsValidating && $c855b811fd5e8ae6$var$unset(_formState.validatingFields, fieldName); 11024 !_options.shouldUnregister && !options.keepDefaultValue && $c855b811fd5e8ae6$var$unset(_defaultValues, fieldName); 11025 } 11026 _subjects.state.next({ 11027 values: $c855b811fd5e8ae6$var$cloneObject(_formValues) 11028 }); 11029 _subjects.state.next((0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formState, !options.keepDirty ? {} : { 11030 isDirty: _getDirty() 11031 })); 11032 !options.keepIsValid && _setValid(); 11033 }; 11034 const _setDisabledField = ({ disabled: disabled, name: name })=>{ 11035 if ($c855b811fd5e8ae6$var$isBoolean(disabled) && _state.mount || !!disabled || _names.disabled.has(name)) disabled ? _names.disabled.add(name) : _names.disabled.delete(name); 11036 }; 11037 const register = (name, options = {})=>{ 11038 let field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 11039 const disabledIsDefined = $c855b811fd5e8ae6$var$isBoolean(options.disabled) || $c855b811fd5e8ae6$var$isBoolean(_options.disabled); 11040 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_fields, name, (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, field || {}), { 11041 _f: (0, $ca7d1670581030c8$export$71511d61b312f219)((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, field && field._f ? field._f : { 11042 ref: { 11043 name: name 11044 } 11045 }), { 11046 name: name, 11047 mount: true 11048 }), options) 11049 })); 11050 _names.mount.add(name); 11051 if (field) _setDisabledField({ 11052 disabled: $c855b811fd5e8ae6$var$isBoolean(options.disabled) ? options.disabled : _options.disabled, 11053 name: name 11054 });
11055 else updateValidAndValue(name, true, options.value); 11056 return (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, disabledIsDefined ? { 11057 disabled: options.disabled || _options.disabled 11058 } : {}, _options.progressive ? { 11059 required: !!options.required, 11060 min: $c855b811fd5e8ae6$var$getRuleValue(options.min), 11061 max: $c855b811fd5e8ae6$var$getRuleValue(options.max), 11062 minLength: $c855b811fd5e8ae6$var$getRuleValue(options.minLength), 11063 maxLength: $c855b811fd5e8ae6$var$getRuleValue(options.maxLength), 11064 pattern: $c855b811fd5e8ae6$var$getRuleValue(options.pattern) 11065 } : {}), { 11066 name: name, 11067 onChange: onChange, 11068 onBlur: onChange, 11069 ref: (ref)=>{ 11070 if (ref) { 11071 register(name, options); 11072 field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 11073 const fieldRef = $c855b811fd5e8ae6$var$isUndefined(ref.value) ? ref.querySelectorAll ? ref.querySelectorAll('input,select,textarea')[0] || ref : ref : ref; 11074 const radioOrCheckbox = $c855b811fd5e8ae6$var$isRadioOrCheckbox(fieldRef); 11075 const refs = field._f.refs || []; 11076 if (radioOrCheckbox ? refs.find((option)=>option === fieldRef) : fieldRef === field._f.ref) return; 11077 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_fields, name, { 11078 _f: (0, $ca7d1670581030c8$export$71511d61b312f219)({}, field._f, radioOrCheckbox ? { 11079 refs: [ 11080 ...refs.filter($c855b811fd5e8ae6$var$live), 11081 fieldRef, 11082 ...Array.isArray($c855b811fd5e8ae6$export$3988ae62b71be9a3(_defaultValues, name)) ? [ 11083 {} 11084 ] : [] 11085 ], 11086 ref: { 11087 type: fieldRef.type, 11088 name: name 11089 } 11090 } : { 11091 ref: fieldRef 11092 }) 11093 }); 11094 updateValidAndValue(name, false, undefined, fieldRef); 11095 } else { 11096 field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name, {}); 11097 if (field._f) field._f.mount = false; 11098 (_options.shouldUnregister || options.shouldUnregister) && !($c855b811fd5e8ae6$var$isNameInFieldArray(_names.array, name) && _state.action) && _names.unMount.add(name); 11099 } 11100 } 11101 }); 11102 }; 11103 const _focusError = ()=>_options.shouldFocusError && $c855b811fd5e8ae6$var$iterateFieldsByAction(_fields, _focusInput, _names.mount); 11104 const _disableForm = (disabled)=>{ 11105 if ($c855b811fd5e8ae6$var$isBoolean(disabled)) { 11106 _subjects.state.next({ 11107 disabled: disabled 11108 }); 11109 $c855b811fd5e8ae6$var$iterateFieldsByAction(_fields, (ref, name)=>{ 11110 const currentField = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 11111 if (currentField) { 11112 ref.disabled = currentField._f.disabled || disabled; 11113 if (Array.isArray(currentField._f.refs)) currentField._f.refs.forEach((inputRef)=>{ 11114 inputRef.disabled = currentField._f.disabled || disabled; 11115 }); 11116 } 11117 }, 0, false); 11118 } 11119 }; 11120 const handleSubmit = (onValid, onInvalid)=>async (e)=>{ 11121 let onValidError = undefined; 11122 if (e) { 11123 e.preventDefault && e.preventDefault(); 11124 e.persist && e.persist(); 11125 } 11126 let fieldValues = $c855b811fd5e8ae6$var$cloneObject(_formValues); 11127 _subjects.state.next({ 11128 isSubmitting: true 11129 }); 11130 if (_options.resolver) { 11131 const { errors: errors, values: values } = await _runSchema(); 11132 _formState.errors = errors; 11133 fieldValues = $c855b811fd5e8ae6$var$cloneObject(values); 11134 } else await executeBuiltInValidation(_fields); 11135 if (_names.disabled.size) for (const name of _names.disabled)$c855b811fd5e8ae6$var$unset(fieldValues, name); 11136 $c855b811fd5e8ae6$var$unset(_formState.errors, 'root'); 11137 if ($c855b811fd5e8ae6$var$isEmptyObject(_formState.errors)) { 11138 _subjects.state.next({ 11139 errors: {} 11140 }); 11141 try { 11142 await onValid(fieldValues, e); 11143 } catch (error) { 11144 onValidError = error; 11145 } 11146 } else { 11147 if (onInvalid) await onInvalid((0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formState.errors), e); 11148 _focusError(); 11149 setTimeout(_focusError); 11150 } 11151 _subjects.state.next({ 11152 isSubmitted: true, 11153 isSubmitting: false, 11154 isSubmitSuccessful: $c855b811fd5e8ae6$var$isEmptyObject(_formState.errors) && !onValidError, 11155 submitCount: _formState.submitCount + 1, 11156 errors: _formState.errors 11157 }); 11158 if (onValidError) throw onValidError; 11159 }; 11160 const resetField = (name, options = {})=>{ 11161 if ($c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name)) { 11162 if ($c855b811fd5e8ae6$var$isUndefined(options.defaultValue)) setValue(name, $c855b811fd5e8ae6$var$cloneObject($c855b811fd5e8ae6$export$3988ae62b71be9a3(_defaultValues, name))); 11163 else { 11164 setValue(name, options.defaultValue); 11165 $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(_defaultValues, name, $c855b811fd5e8ae6$var$cloneObject(options.defaultValue)); 11166 } 11167 if (!options.keepTouched) $c855b811fd5e8ae6$var$unset(_formState.touchedFields, name); 11168 if (!options.keepDirty) { 11169 $c855b811fd5e8ae6$var$unset(_formState.dirtyFields, name); 11170 _formState.isDirty = options.defaultValue ? _getDirty(name, $c855b811fd5e8ae6$var$cloneObject($c855b811fd5e8ae6$export$3988ae62b71be9a3(_defaultValues, name))) : _getDirty(); 11171 } 11172 if (!options.keepError) { 11173 $c855b811fd5e8ae6$var$unset(_formState.errors, name); 11174 _proxyFormState.isValid && _setValid(); 11175 } 11176 _subjects.state.next((0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formState)); 11177 } 11178 }; 11179 const _reset = (formValues, keepStateOptions = {})=>{ 11180 const updatedValues = formValues ? $c855b811fd5e8ae6$var$cloneObject(formValues) : _defaultValues; 11181 const cloneUpdatedValues = $c855b811fd5e8ae6$var$cloneObject(updatedValues); 11182 const isEmptyResetValues = $c855b811fd5e8ae6$var$isEmptyObject(formValues); 11183 const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues; 11184 if (!keepStateOptions.keepDefaultValues) _defaultValues = updatedValues; 11185 if (!keepStateOptions.keepValues) { 11186 if (keepStateOptions.keepDirtyValues) { 11187 const fieldsToCheck = new Set([ 11188 ..._names.mount, 11189 ...Object.keys($c855b811fd5e8ae6$var$getDirtyFields(_defaultValues, _formValues)) 11190 ]); 11191 for (const fieldName of Array.from(fieldsToCheck))$c855b811fd5e8ae6$export$3988ae62b71be9a3(_formState.dirtyFields, fieldName) ? $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(values, fieldName, $c855b811fd5e8ae6$export$3988ae62b71be9a3(_formValues, fieldName)) : setValue(fieldName, $c855b811fd5e8ae6$export$3988ae62b71be9a3(values, fieldName)); 11192 } else { 11193 if ($c855b811fd5e8ae6$var$isWeb && $c855b811fd5e8ae6$var$isUndefined(formValues)) for (const name of _names.mount){ 11194 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 11195 if (field && field._f) { 11196 const fieldReference = Array.isArray(field._f.refs) ? field._f.refs[0] : field._f.ref; 11197 if ($c855b811fd5e8ae6$var$isHTMLElement(fieldReference)) { 11198 const form = fieldReference.closest('form'); 11199 if (form) { 11200 form.reset(); 11201 break; 11202 } 11203 } 11204 } 11205 } 11206 if (keepStateOptions.keepFieldsRef) for (const fieldName of _names.mount)setValue(fieldName, $c855b811fd5e8ae6$export$3988ae62b71be9a3(values, fieldName)); 11207 else _fields = {}; 11208 } 11209 _formValues = _options.shouldUnregister ? keepStateOptions.keepDefaultValues ? $c855b811fd5e8ae6$var$cloneObject(_defaultValues) : {} : $c855b811fd5e8ae6$var$cloneObject(values); 11210 _subjects.array.next({ 11211 values: (0, $ca7d1670581030c8$export$71511d61b312f219)({}, values) 11212 }); 11213 _subjects.state.next({ 11214 values: (0, $ca7d1670581030c8$export$71511d61b312f219)({}, values) 11215 }); 11216 } 11217 _names = { 11218 mount: keepStateOptions.keepDirtyValues ? _names.mount : new Set(), 11219 unMount: new Set(), 11220 array: new Set(), 11221 disabled: new Set(), 11222 watch: new Set(), 11223 watchAll: false, 11224 focus: '' 11225 }; 11226 _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues; 11227 _state.watch = !!_options.shouldUnregister; 11228 _subjects.state.next({ 11229 submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0, 11230 isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !$c855b811fd5e8ae6$var$deepEqual(formValues, _defaultValues)), 11231 isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false, 11232 dirtyFields: isEmptyResetValues ? {}
11232 : keepStateOptions.keepDirtyValues ? keepStateOptions.keepDefaultValues && _formValues ? $c855b811fd5e8ae6$var$getDirtyFields(_defaultValues, _formValues) : _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? $c855b811fd5e8ae6$var$getDirtyFields(_defaultValues, formValues) : keepStateOptions.keepDirty ? _formState.dirtyFields : {}, 11233 touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {}, 11234 errors: keepStateOptions.keepErrors ? _formState.errors : {}, 11235 isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful ? _formState.isSubmitSuccessful : false, 11236 isSubmitting: false, 11237 defaultValues: _defaultValues 11238 }); 11239 }; 11240 const reset = (formValues, keepStateOptions)=>_reset($c855b811fd5e8ae6$var$isFunction(formValues) ? formValues(_formValues) : formValues, keepStateOptions); 11241 const setFocus = (name, options = {})=>{ 11242 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(_fields, name); 11243 const fieldReference = field && field._f; 11244 if (fieldReference) { 11245 const fieldRef = fieldReference.refs ? fieldReference.refs[0] : fieldReference.ref; 11246 if (fieldRef.focus) { 11247 fieldRef.focus(); 11248 options.shouldSelect && $c855b811fd5e8ae6$var$isFunction(fieldRef.select) && fieldRef.select(); 11249 } 11250 } 11251 }; 11252 const _setFormState = (updatedFormState)=>{ 11253 _formState = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _formState, updatedFormState); 11254 }; 11255 const _resetDefaultValues = ()=>$c855b811fd5e8ae6$var$isFunction(_options.defaultValues) && _options.defaultValues().then((values)=>{ 11256 reset(values, _options.resetOptions); 11257 _subjects.state.next({ 11258 isLoading: false 11259 }); 11260 }); 11261 const methods = { 11262 control: { 11263 register: register, 11264 unregister: unregister, 11265 getFieldState: getFieldState, 11266 handleSubmit: handleSubmit, 11267 setError: setError, 11268 _subscribe: _subscribe, 11269 _runSchema: _runSchema, 11270 _focusError: _focusError, 11271 _getWatch: _getWatch, 11272 _getDirty: _getDirty, 11273 _setValid: _setValid, 11274 _setFieldArray: _setFieldArray, 11275 _setDisabledField: _setDisabledField, 11276 _setErrors: _setErrors, 11277 _getFieldArray: _getFieldArray, 11278 _reset: _reset, 11279 _resetDefaultValues: _resetDefaultValues, 11280 _removeUnmounted: _removeUnmounted, 11281 _disableForm: _disableForm, 11282 _subjects: _subjects, 11283 _proxyFormState: _proxyFormState, 11284 get _fields () { 11285 return _fields; 11286 }, 11287 get _formValues () { 11288 return _formValues; 11289 }, 11290 get _state () { 11291 return _state; 11292 }, 11293 set _state (value){ 11294 _state = value; 11295 }, 11296 get _defaultValues () { 11297 return _defaultValues; 11298 }, 11299 get _names () { 11300 return _names; 11301 }, 11302 set _names (value){ 11303 _names = value; 11304 }, 11305 get _formState () { 11306 return _formState; 11307 }, 11308 get _options () { 11309 return _options; 11310 }, 11311 set _options (value){ 11312 _options = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, _options, value); 11313 } 11314 }, 11315 subscribe: subscribe, 11316 trigger: trigger, 11317 register: register, 11318 handleSubmit: handleSubmit, 11319 watch: watch, 11320 setValue: setValue, 11321 getValues: getValues, 11322 reset: reset, 11323 resetField: resetField, 11324 clearErrors: clearErrors, 11325 unregister: unregister, 11326 setError: setError, 11327 setFocus: setFocus, 11328 getFieldState: getFieldState 11329 }; 11330 return (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, methods), { 11331 formControl: methods 11332 }); 11333} 11334var $c855b811fd5e8ae6$var$generateId = ()=>{ 11335 if (typeof crypto !== 'undefined' && crypto.randomUUID) return crypto.randomUUID(); 11336 const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000; 11337 return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c)=>{ 11338 const r = (Math.random() * 16 + d) % 16 | 0; 11339 return (c == 'x' ? r : r & 0x3 | 0x8).toString(16); 11340 }); 11341}; 11342var $c855b811fd5e8ae6$var$getFocusFieldName = (name, index, options = {})=>options.shouldFocus || $c855b811fd5e8ae6$var$isUndefined(options.shouldFocus) ? options.focusName || `${name}.${$c855b811fd5e8ae6$var$isUndefined(options.focusIndex) ? index : options.focusIndex}.` : ''; 11343var $c855b811fd5e8ae6$var$appendAt = (data, value1)=>[ 11344 ...data, 11345 ...$c855b811fd5e8ae6$var$convertToArrayPayload(value1) 11346 ]; 11347var $c855b811fd5e8ae6$var$fillEmptyArray = (value1)=>Array.isArray(value1) ? value1.map(()=>undefined) : undefined; 11348function $c855b811fd5e8ae6$var$insert(data, index, value1) { 11349 return [ 11350 ...data.slice(0, index), 11351 ...$c855b811fd5e8ae6$var$convertToArrayPayload(value1), 11352 ...data.slice(index) 11353 ]; 11354} 11355var $c855b811fd5e8ae6$var$moveArrayAt = (data, from, to)=>{ 11356 if (!Array.isArray(data)) return []; 11357 if ($c855b811fd5e8ae6$var$isUndefined(data[to])) data[to] = undefined; 11358 data.splice(to, 0, data.splice(from, 1)[0]); 11359 return data; 11360}; 11361var $c855b811fd5e8ae6$var$prependAt = (data, value1)=>[ 11362 ...$c855b811fd5e8ae6$var$convertToArrayPayload(value1), 11363 ...$c855b811fd5e8ae6$var$convertToArrayPayload(data) 11364 ]; 11365function $c855b811fd5e8ae6$var$removeAtIndexes(data, indexes) { 11366 let i = 0; 11367 const temp = [ 11368 ...data 11369 ]; 11370 for (const index of indexes){ 11371 temp.splice(index - i, 1); 11372 i++; 11373 } 11374 return $c855b811fd5e8ae6$var$compact(temp).length ? temp : []; 11375} 11376var $c855b811fd5e8ae6$var$removeArrayAt = (data, index)=>$c855b811fd5e8ae6$var$isUndefined(index) ? [] : $c855b811fd5e8ae6$var$removeAtIndexes(data, $c855b811fd5e8ae6$var$convertToArrayPayload(index).sort((a, b)=>a - b)); 11377var $c855b811fd5e8ae6$var$swapArrayAt = (data, indexA, indexB)=>{ 11378 [data[indexA], data[indexB]] = [ 11379 data[indexB], 11380 data[indexA] 11381 ]; 11382}; 11383var $c855b811fd5e8ae6$var$updateAt = (fieldValues, index, value1)=>{ 11384 fieldValues[index] = value1; 11385 return fieldValues; 11386}; 11387/** 11388 * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. ⢠[Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) ⢠[Video](https://youtu.be/4MrbfGSFY2A) 11389 * 11390 * @remarks 11391 * [API](https://react-hook-form.com/docs/usefieldarray) ⢠[Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) 11392 * 11393 * @param props - useFieldArray props 11394 * 11395 * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn} 11396 * 11397 * @example 11398 * ```tsx 11399 * function App() { 11400 * const { register, control, handleSubmit, reset, trigger, setError } = useForm({ 11401 * defaultValues: { 11402 * test: [] 11403 * } 11404 * }); 11405 * const { fields, append } = useFieldArray({ 11406 * control, 11407 * name: "test" 11408 * }); 11409 * 11410 * return ( 11411 * <form onSubmit={handleSubmit(data => console.log(data))}> 11412 * {fields.map((item, index) => ( 11413 * <input key={item.id} {...register(`test.${index}.firstName`)} /> 11414 * ))} 11415 * <button type="button" onClick={() => append({ firstName: "bill" })}> 11416 * append 11417 * </button> 11418 * <input type="submit" /> 11419 * </form> 11420 * ); 11421 * } 11422 * ``` 11423 */ function $c855b811fd5e8ae6$export$310131896651d559(props) { 11424 const methods = $c855b811fd5e8ae6$export$4d957a5e1be13b03(); 11425 const { control: control = methods.control, name: name, keyName: keyName = 'id', shouldUnregister: shouldUnregister, rules: rules } = props; 11426 const [fields, setFields] = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))
11426).useState(control._getFieldArray(name)); 11427 const ids = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(control._getFieldArray(name).map($c855b811fd5e8ae6$var$generateId)); 11428 const _fieldIds = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(fields); 11429 const _actioned = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(false); 11430 _fieldIds.current = fields; 11431 control._names.array.add(name); 11432 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>rules && control.register(name, rules), [ 11433 control, 11434 rules, 11435 name 11436 ]); 11437 $c855b811fd5e8ae6$var$useIsomorphicLayoutEffect(()=>control._subjects.array.subscribe({ 11438 next: ({ values: values, name: fieldArrayName })=>{ 11439 if (fieldArrayName === name || !fieldArrayName) { 11440 const fieldValues = $c855b811fd5e8ae6$export$3988ae62b71be9a3(values, name); 11441 if (Array.isArray(fieldValues)) { 11442 setFields(fieldValues); 11443 ids.current = fieldValues.map($c855b811fd5e8ae6$var$generateId); 11444 } 11445 } 11446 } 11447 }).unsubscribe, [ 11448 control, 11449 name 11450 ]); 11451 const updateValues = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback((updatedFieldArrayValues)=>{ 11452 _actioned.current = true; 11453 control._setFieldArray(name, updatedFieldArrayValues); 11454 }, [ 11455 control, 11456 name 11457 ]); 11458 const append = (value1, options)=>{ 11459 const appendValue = $c855b811fd5e8ae6$var$convertToArrayPayload($c855b811fd5e8ae6$var$cloneObject(value1)); 11460 const updatedFieldArrayValues = $c855b811fd5e8ae6$var$appendAt(control._getFieldArray(name), appendValue); 11461 control._names.focus = $c855b811fd5e8ae6$var$getFocusFieldName(name, updatedFieldArrayValues.length - 1, options); 11462 ids.current = $c855b811fd5e8ae6$var$appendAt(ids.current, appendValue.map($c855b811fd5e8ae6$var$generateId)); 11463 updateValues(updatedFieldArrayValues); 11464 setFields(updatedFieldArrayValues); 11465 control._setFieldArray(name, updatedFieldArrayValues, $c855b811fd5e8ae6$var$appendAt, { 11466 argA: $c855b811fd5e8ae6$var$fillEmptyArray(value1) 11467 }); 11468 }; 11469 const prepend = (value1, options)=>{ 11470 const prependValue = $c855b811fd5e8ae6$var$convertToArrayPayload($c855b811fd5e8ae6$var$cloneObject(value1)); 11471 const updatedFieldArrayValues = $c855b811fd5e8ae6$var$prependAt(control._getFieldArray(name), prependValue); 11472 control._names.focus = $c855b811fd5e8ae6$var$getFocusFieldName(name, 0, options); 11473 ids.current = $c855b811fd5e8ae6$var$prependAt(ids.current, prependValue.map($c855b811fd5e8ae6$var$generateId)); 11474 updateValues(updatedFieldArrayValues); 11475 setFields(updatedFieldArrayValues); 11476 control._setFieldArray(name, updatedFieldArrayValues, $c855b811fd5e8ae6$var$prependAt, { 11477 argA: $c855b811fd5e8ae6$var$fillEmptyArray(value1) 11478 }); 11479 }; 11480 const remove = (index)=>{ 11481 const updatedFieldArrayValues = $c855b811fd5e8ae6$var$removeArrayAt(control._getFieldArray(name), index); 11482 ids.current = $c855b811fd5e8ae6$var$removeArrayAt(ids.current, index); 11483 updateValues(updatedFieldArrayValues); 11484 setFields(updatedFieldArrayValues); 11485 !Array.isArray($c855b811fd5e8ae6$export$3988ae62b71be9a3(control._fields, name)) && $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(control._fields, name, undefined); 11486 control._setFieldArray(name, updatedFieldArrayValues, $c855b811fd5e8ae6$var$removeArrayAt, { 11487 argA: index 11488 }); 11489 }; 11490 const insert$1 = (index, value1, options)=>{ 11491 const insertValue = $c855b811fd5e8ae6$var$convertToArrayPayload($c855b811fd5e8ae6$var$cloneObject(value1)); 11492 const updatedFieldArrayValues = $c855b811fd5e8ae6$var$insert(control._getFieldArray(name), index, insertValue); 11493 control._names.focus = $c855b811fd5e8ae6$var$getFocusFieldName(name, index, options); 11494 ids.current = $c855b811fd5e8ae6$var$insert(ids.current, index, insertValue.map($c855b811fd5e8ae6$var$generateId));
11495 updateValues(updatedFieldArrayValues); 11496 setFields(updatedFieldArrayValues); 11497 control._setFieldArray(name, updatedFieldArrayValues, $c855b811fd5e8ae6$var$insert, { 11498 argA: index, 11499 argB: $c855b811fd5e8ae6$var$fillEmptyArray(value1) 11500 }); 11501 }; 11502 const swap = (indexA, indexB)=>{ 11503 const updatedFieldArrayValues = control._getFieldArray(name); 11504 $c855b811fd5e8ae6$var$swapArrayAt(updatedFieldArrayValues, indexA, indexB); 11505 $c855b811fd5e8ae6$var$swapArrayAt(ids.current, indexA, indexB); 11506 updateValues(updatedFieldArrayValues); 11507 setFields(updatedFieldArrayValues); 11508 control._setFieldArray(name, updatedFieldArrayValues, $c855b811fd5e8ae6$var$swapArrayAt, { 11509 argA: indexA, 11510 argB: indexB 11511 }, false); 11512 }; 11513 const move = (from, to)=>{ 11514 const updatedFieldArrayValues = control._getFieldArray(name); 11515 $c855b811fd5e8ae6$var$moveArrayAt(updatedFieldArrayValues, from, to); 11516 $c855b811fd5e8ae6$var$moveArrayAt(ids.current, from, to); 11517 updateValues(updatedFieldArrayValues); 11518 setFields(updatedFieldArrayValues); 11519 control._setFieldArray(name, updatedFieldArrayValues, $c855b811fd5e8ae6$var$moveArrayAt, { 11520 argA: from, 11521 argB: to 11522 }, false); 11523 }; 11524 const update = (index, value1)=>{ 11525 const updateValue = $c855b811fd5e8ae6$var$cloneObject(value1); 11526 const updatedFieldArrayValues = $c855b811fd5e8ae6$var$updateAt(control._getFieldArray(name), index, updateValue); 11527 ids.current = [ 11528 ...updatedFieldArrayValues 11529 ].map((item, i)=>!item || i === index ? $c855b811fd5e8ae6$var$generateId() : ids.current[i]); 11530 updateValues(updatedFieldArrayValues); 11531 setFields([ 11532 ...updatedFieldArrayValues 11533 ]); 11534 control._setFieldArray(name, updatedFieldArrayValues, $c855b811fd5e8ae6$var$updateAt, { 11535 argA: index, 11536 argB: updateValue 11537 }, true, false); 11538 }; 11539 const replace = (value1)=>{ 11540 const updatedFieldArrayValues = $c855b811fd5e8ae6$var$convertToArrayPayload($c855b811fd5e8ae6$var$cloneObject(value1)); 11541 ids.current = updatedFieldArrayValues.map($c855b811fd5e8ae6$var$generateId); 11542 updateValues([ 11543 ...updatedFieldArrayValues 11544 ]); 11545 setFields([ 11546 ...updatedFieldArrayValues 11547 ]); 11548 control._setFieldArray(name, [ 11549 ...updatedFieldArrayValues 11550 ], (data)=>data, {}, true, false); 11551 }; 11552 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11553 control._state.action = false; 11554 $c855b811fd5e8ae6$var$isWatched(name, control._names) && control._subjects.state.next((0, $ca7d1670581030c8$export$71511d61b312f219)({}, control._formState)); 11555 if (_actioned.current && (!$c855b811fd5e8ae6$var$getValidationModes(control._options.mode).isOnSubmit || control._formState.isSubmitted) && !$c855b811fd5e8ae6$var$getValidationModes(control._options.reValidateMode).isOnSubmit) { 11556 if (control._options.resolver) control._runSchema([ 11557 name 11558 ]).then((result)=>{ 11559 const error = $c855b811fd5e8ae6$export$3988ae62b71be9a3(result.errors, name); 11560 const existingError = $c855b811fd5e8ae6$export$3988ae62b71be9a3(control._formState.errors, name); 11561 if (existingError ? !error && existingError.type || error && (existingError.type !== error.type || existingError.message !== error.message) : error && error.type) { 11562 error ? $c855b811fd5e8ae6$export$adaa4cf7ef1b65be(control._formState.errors, name, error) : $c855b811fd5e8ae6$var$unset(control._formState.errors, name); 11563 control._subjects.state.next({ 11564 errors: control._formState.errors 11565 }); 11566 } 11567 }); 11568 else { 11569 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(control._fields, name); 11570 if (field && field._f && !($c855b811fd5e8ae6$var$getValidationModes(control._options.reValidateMode).isOnSubmit && $c855b811fd5e8ae6$var$getValidationModes(control._options.mode).isOnSubmit)) $c855b811fd5e8ae6$var$validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === $c855b811fd5e8ae6$var$VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error)=>!$c855b811fd5e8ae6$var$isEmptyObject(error) && control._subjects.state.next({ 11571 errors: $c855b811fd5e8ae6$var$updateFieldArrayRootError(control._formState.errors, error, name) 11572 })); 11573 } 11574 } 11575 control._subjects.state.next({ 11576 name: name, 11577 values: $c855b811fd5e8ae6$var$cloneObject(control._formValues) 11578 }); 11579 control._names.focus && $c855b811fd5e8ae6$var$iterateFieldsByAction(control._fields, (ref, key)=>{ 11580 if (control._names.focus && key.startsWith(control._names.focus) && ref.focus) { 11581 ref.focus(); 11582 return 1; 11583 } 11584 return; 11585 }); 11586 control._names.focus = ''; 11587 control._setValid(); 11588 _actioned.current = false;
11589 }, [ 11590 fields, 11591 name, 11592 control 11593 ]); 11594 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11595 !$c855b811fd5e8ae6$export$3988ae62b71be9a3(control._formValues, name) && control._setFieldArray(name); 11596 return ()=>{ 11597 const updateMounted = (name, value1)=>{ 11598 const field = $c855b811fd5e8ae6$export$3988ae62b71be9a3(control._fields, name); 11599 if (field && field._f) field._f.mount = value1; 11600 }; 11601 control._options.shouldUnregister || shouldUnregister ? control.unregister(name) : updateMounted(name, false); 11602 }; 11603 }, [ 11604 name, 11605 control, 11606 keyName, 11607 shouldUnregister 11608 ]); 11609 return { 11610 swap: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(swap, [ 11611 updateValues, 11612 name, 11613 control 11614 ]), 11615 move: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(move, [ 11616 updateValues, 11617 name, 11618 control 11619 ]), 11620 prepend: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(prepend, [ 11621 updateValues, 11622 name, 11623 control 11624 ]), 11625 append: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(append, [ 11626 updateValues, 11627 name, 11628 control 11629 ]), 11630 remove: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(remove, [ 11631 updateValues, 11632 name, 11633 control 11634 ]), 11635 insert: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(insert$1, [ 11636 updateValues, 11637 name, 11638 control 11639 ]), 11640 update: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(update, [ 11641 updateValues, 11642 name, 11643 control 11644 ]), 11645 replace: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useCallback(replace, [ 11646 updateValues, 11647 name, 11648 control 11649 ]), 11650 fields: (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useMemo(()=>fields.map((field, index)=>(0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, field), { 11651 [keyName]: ids.current[index] || $c855b811fd5e8ae6$var$generateId() 11652 })), [ 11653 fields, 11654 keyName 11655 ]) 11656 }; 11657} 11658/** 11659 * Custom hook to manage the entire form. 11660 * 11661 * @remarks 11662 * [API](https://react-hook-form.com/docs/useform) ⢠[Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) ⢠[Video](https://www.youtube.com/watch?v=RkXv4AXXC_4) 11663 * 11664 * @param props - form configuration and validation parameters. 11665 * 11666 * @returns methods - individual functions to manage the form state. {@link UseFormReturn} 11667 * 11668 * @example 11669 * ```tsx 11670 * function App() { 11671 * const { register, handleSubmit, watch, formState: { errors } } = useForm(); 11672 * const onSubmit = data => console.log(data); 11673 * 11674 * console.log(watch("example")); 11675 * 11676 * return ( 11677 * <form onSubmit={handleSubmit(onSubmit)}> 11678 * <input defaultValue="test" {...register("example")} /> 11679 * <input {...register("exampleRequired", { required: true })} /> 11680 * {errors.exampleRequired && <span>This field is required</span>} 11681 * <button>Submit</button> 11682 * </form> 11683 * ); 11684 * } 11685 * ``` 11686 */ function $c855b811fd5e8ae6$export$87c0cf8eb5a167e0(props = {}) { 11687 const _formControl = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(undefined); 11688 const _values = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useRef(undefined); 11689 const [formState, updateFormState] = (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useState({ 11690 isDirty: false, 11691 isValidating: false, 11692 isLoading: $c855b811fd5e8ae6$var$isFunction(props.defaultValues), 11693 isSubmitted: false, 11694 isSubmitting: false, 11695 isSubmitSuccessful: false, 11696 isValid: false, 11697 submitCount: 0, 11698 dirtyFields: {}, 11699 touchedFields: {}, 11700 validatingFields: {}, 11701 errors: props.errors || {}, 11702 disabled: props.disabled || false, 11703 isReady: false, 11704 defaultValues: $c855b811fd5e8ae6$var$isFunction(props.defaultValues) ? undefined : props.defaultValues 11705 }); 11706 if (!_formControl.current) { 11707 if (props.formControl) { 11708 _formControl.current = (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, props.formControl), { 11709 formState: formState 11710 }); 11711 if (props.defaultValues && !$c855b811fd5e8ae6$var$isFunction(props.defaultValues)) props.formControl.reset(props.defaultValues, props.resetOptions); 11712 } else { 11713 const _createFormControl = $c855b811fd5e8ae6$export$1361f5e0e4cca3c3(props), { formControl: formControl } = _createFormControl, rest = (0, $e7548388a0765c32$export$71511d61b312f219)(_createFormControl, [ 11714 "formControl" 11715 ]); 11716 _formControl.current = (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, rest), { 11717 formState: formState 11718 }); 11719 } 11720 } 11721 const control = _formControl.current.control; 11722 control._options = props; 11723 $c855b811fd5e8ae6$var$useIsomorphicLayoutEffect(()=>{ 11724 const sub = control._subscribe({ 11725 formState: control._proxyFormState, 11726 callback: ()=>updateFormState((0, $ca7d1670581030c8$export$71511d61b312f219)({}, control._formState)),
11727 reRenderRoot: true 11728 }); 11729 updateFormState((data)=>(0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, data), { 11730 isReady: true 11731 })); 11732 control._formState.isReady = true; 11733 return sub; 11734 }, [ 11735 control 11736 ]); 11737 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>control._disableForm(props.disabled), [ 11738 control, 11739 props.disabled 11740 ]); 11741 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11742 if (props.mode) control._options.mode = props.mode; 11743 if (props.reValidateMode) control._options.reValidateMode = props.reValidateMode; 11744 }, [ 11745 control, 11746 props.mode, 11747 props.reValidateMode 11748 ]); 11749 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11750 if (props.errors) { 11751 control._setErrors(props.errors); 11752 control._focusError(); 11753 } 11754 }, [ 11755 control, 11756 props.errors 11757 ]); 11758 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11759 props.shouldUnregister && control._subjects.state.next({ 11760 values: control._getWatch() 11761 }); 11762 }, [ 11763 control, 11764 props.shouldUnregister 11765 ]); 11766 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11767 if (control._proxyFormState.isDirty) { 11768 const isDirty = control._getDirty(); 11769 if (isDirty !== formState.isDirty) control._subjects.state.next({ 11770 isDirty: isDirty 11771 }); 11772 } 11773 }, [ 11774 control, 11775 formState.isDirty 11776 ]); 11777 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11778 if (props.values && !$c855b811fd5e8ae6$var$deepEqual(props.values, _values.current)) { 11779 control._reset(props.values, (0, $ca7d1670581030c8$export$71511d61b312f219)({ 11780 keepFieldsRef: true 11781 }, control._options.resetOptions)); 11782 _values.current = props.values; 11783 updateFormState((state)=>(0, $ca7d1670581030c8$export$71511d61b312f219)({}, state)); 11784 } else control._resetDefaultValues(); 11785 }, [ 11786 control, 11787 props.values 11788 ]); 11789 (0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).useEffect(()=>{ 11790 if (!control._state.mount) { 11791 control._setValid(); 11792 control._state.mount = true; 11793 } 11794 if (control._state.watch) { 11795 control._state.watch = false; 11796 control._subjects.state.next((0, $ca7d1670581030c8$export$71511d61b312f219)({}, control._formState)); 11797 } 11798 control._removeUnmounted(); 11799 }); 11800 _formControl.current.formState = $c855b811fd5e8ae6$var$getProxyFormState(formState, control); 11801 return _formControl.current; 11802} 11803 11804 11805 11806 11807 11808/** 11809 * auth0-js v9.28.0 11810 * Author: Auth0 11811 * Date: 2024-10-21 11812 * License: MIT 11813 */ var $5957ddbc692cbfa8$exports = {}; 11814"use strict"; 11815 11816 11817var $90f323912e688b98$var$commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof $parcel$global ? $parcel$global : "undefined" != typeof self ? self : {}; 11818function $90f323912e688b98$var$createCommonjsModule(fn, module) { 11819 return fn(module = { 11820 exports: {} 11821 }, module.exports), module.exports; 11822} 11823var $90f323912e688b98$var$urlJoin = $90f323912e688b98$var$createCommonjsModule(function(module) { 11824 var context, definition; 11825 context = $90f323912e688b98$var$commonjsGlobal, definition = function() { 11826 function normalize(strArray) { 11827 var resultArray = []; 11828 if (0 === strArray.length) return ""; 11829 if ("string" != typeof strArray[0]) throw new TypeError("Url must be a string. Received " + strArray[0]); 11830 if (strArray[0].match(/^[^/:]+:\/*$/) && strArray.length > 1) { 11831 var first = strArray.shift(); 11832 strArray[0] = first + strArray[0]; 11833 } 11834 strArray[0].match(/^file:\/\/\//) ? strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, "$1:///") : strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, "$1://"); 11835 for(var i = 0; i < strArray.length; i++){ 11836 var component = strArray[i]; 11837 if ("string" != typeof component) throw new TypeError("Url must be a string. Received " + component); 11838 "" !== component && (i > 0 && (component = component.replace(/^[\/]+/, "")), component = i < strArray.length - 1 ? component.replace(/[\/]+$/, "") : component.replace(/[\/]+$/, "/"), resultArray.push(component)); 11839 } 11840 var str = resultArray.join("/"), parts = (str = str.replace(/\/(\?|&|#[^!])/g, "$1")).split("?"); 11841 return str = parts.shift() + (parts.length > 0 ? "?" : "") + parts.join("&"); 11842 } 11843 return function() { 11844 return normalize("object" == typeof arguments[0] ? arguments[0] : [].slice.call(arguments)); 11845 }; 11846 }, module.exports ? module.exports = definition() : context.urljoin = definition(); 11847}), $90f323912e688b98$var$esErrors = Error, $90f323912e688b98$var$_eval = EvalError, $90f323912e688b98$var$range = RangeError, $90f323912e688b98$var$ref = ReferenceError, $90f323912e688b98$var$syntax = SyntaxError, $90f323912e688b98$var$type = TypeError, $90f323912e688b98$var$uri = URIError, $90f323912e688b98$var$origSymbol = "undefined" != typeof Symbol && Symbol, $90f323912e688b98$var$test = { 11848 foo: {} 11849}, $90f323912e688b98$var$$Object = Object, $90f323912e688b98$var$ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", $90f323912e688b98$var$toStr = Object.prototype.toString, $90f323912e688b98$var$max = Math.max, $90f323912e688b98$var$concatty = function(a, b) { 11850 for(var arr = [], i = 0; i < a.length; i += 1)arr[i] = a[i]; 11851 for(var j = 0; j < b.length; j += 1)arr[j + a.length] = b[j]; 11852 return arr; 11853}, $90f323912e688b98$var$slicy = function(arrLike, offset) { 11854 for(var arr = [], i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1)arr[j] = arrLike[i]; 11855 return arr; 11856}, $90f323912e688b98$var$joiny = function(arr, joiner) { 11857 for(var str = "", i = 0; i < arr.length; i += 1)str += arr[i], i + 1 < arr.length && (str += joiner); 11858 return str; 11859}, $90f323912e688b98$var$functionBind = Function.prototype.bind || function(that) { 11860 var target = this; 11861 if ("function" != typeof target || "[object Function]" !== $90f323912e688b98$var$toStr.apply(target)) throw new TypeError($9
118610f323912e688b98$var$ERROR_MESSAGE + target); 11862 for(var bound, args = $90f323912e688b98$var$slicy(arguments, 1), binder = function() { 11863 if (this instanceof bound) { 11864 var result = target.apply(this, $90f323912e688b98$var$concatty(args, arguments)); 11865 return Object(result) === result ? result : this; 11866 } 11867 return target.apply(that, $90f323912e688b98$var$concatty(args, arguments)); 11868 }, boundLength = $90f323912e688b98$var$max(0, target.length - args.length), boundArgs = [], i = 0; i < boundLength; i++)boundArgs[i] = "$" + i; 11869 if (bound = Function("binder", "return function (" + $90f323912e688b98$var$joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder), target.prototype) { 11870 var Empty = function() {}; 11871 Empty.prototype = target.prototype, bound.prototype = new Empty, Empty.prototype = null; 11872 } 11873 return bound; 11874}, $90f323912e688b98$var$call = Function.prototype.call, $90f323912e688b98$var$$hasOwn = Object.prototype.hasOwnProperty, $90f323912e688b98$var$hasown = $90f323912e688b98$var$functionBind.call($90f323912e688b98$var$call, $90f323912e688b98$var$$hasOwn), $90f323912e688b98$var$$Function = Function, $90f323912e688b98$var$getEvalledConstructor = function(expressionSyntax) { 11875 try { 11876 return $90f323912e688b98$var$$Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); 11877 } catch (e) {} 11878}, $90f323912e688b98$var$$gOPD = Object.getOwnPropertyDescriptor; 11879if ($90f323912e688b98$var$$gOPD) try { 11880 $90f323912e688b98$var$$gOPD({}, ""); 11881} catch (e) { 11882 $90f323912e688b98$var$$gOPD = null; 11883} 11884var $90f323912e688b98$var$throwTypeError = function() { 11885 throw new $90f323912e688b98$var$type; 11886}, $90f323912e688b98$var$ThrowTypeError = $90f323912e688b98$var$$gOPD ? function() { 11887 try { 11888 return $90f323912e688b98$var$throwTypeError; 11889 } catch (calleeThrows) { 11890 try { 11891 return $90f323912e688b98$var$$gOPD(arguments, "callee").get; 11892 } catch (gOPDthrows) { 11893 return $90f323912e688b98$var$throwTypeError; 11894 } 11895 } 11896}() : $90f323912e688b98$var$throwTypeError, $90f323912e688b98$var$hasSymbols$1 = "function" == typeof $90f323912e688b98$var$origSymbol && "function" == typeof Symbol && "symbol" == typeof $90f323912e688b98$var$origSymbol("foo") && "symbol" == typeof Symbol("bar") && function() { 11897 if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; 11898 if ("symbol" == typeof Symbol.iterator) return !0; 11899 var obj = {}, sym = Symbol("test"), symObj = Object(sym); 11900 if ("string" == typeof sym) return !1; 11901 if ("[object Symbol]" !== Object.prototype.toString.call(sym)) return !1; 11902 if ("[object Symbol]" !== Object.prototype.toString.call(symObj)) return !1; 11903 for(sym in obj[sym] = 42, obj)return !1; 11904 if ("function" == typeof Object.keys && 0 !== Object.keys(obj).length) return !1; 11905 if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(obj).length) return !1; 11906 var syms = Object.getOwnPropertySymbols(obj); 11907 if (1 !== syms.length || syms[0] !== sym) return !1; 11908 if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) return !1; 11909 if ("function" == typeof Object.getOwnPropertyDescriptor) { 11910 var descriptor = Object.getOwnPropertyDescriptor(obj, sym); 11911 if (42 !== descriptor.value || !0 !== descriptor.enumerable) return !1; 11912 } 11913 return !0; 11914}(), $90f323912e688b98$var$hasProto$1 = { 11915 __proto__: $90f323912e688b98$var$test 11916}.foo === $90f323912e688b98$var$test.foo && !(({ 11917 __proto__: null 11918}) instanceof $90f323912e688b98$var$$Object), $90f323912e688b98$var$getProto = Object.getPrototypeOf || ($90f323912e688b98$var$hasProto$1 ? function(x) { 11919 return x.__proto__; 11920} : null), $90f323912e688b98$var$needsEval = {}, $90f323912e688b98$var$TypedArray = "undefined" != typeof Uint8Array && $90f323912e688b98$var$getProto ? $90f323912e688b98$var$getProto(Uint8Array) : void 0, $90f323912e688b98$var$INTRINSICS = { 11921 __proto__: null, 11922 "%AggregateError%": "undefined" == typeof AggregateError ? void 0 : AggregateError, 11923 "%Array%": Array, 11924 "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? void 0 : ArrayBuffer, 11925 "%ArrayIteratorPrototype%": $90f323912e688b98$var$hasSymbols$1 && $90f323912e688b98$var$getProto ? $90f323912e688b98$var$getProto([][Symbol.iterator]()) : void 0, 11926 "%AsyncFromSyncIteratorPrototype%": void 0, 11927 "%AsyncFunction%": $90f323912e688b98$var$needsEval, 11928 "%AsyncGenerator%": $90f323912e688b98$var$needsEval, 11929 "%AsyncGeneratorFunction%": $90f323912e688b98$var$needsEval, 11930 "%AsyncIteratorPrototype%": $90f323912e688b98$var$needsEval, 11931 "%Atomics%": "undefined" == typeof Atomics ? void 0 : Atomics, 11932 "%BigInt%": "undefined" == typeof BigInt ? void 0 : BigInt, 11933 "%BigInt64Array%": "undefined" == typeof BigInt64Array ? void 0 : BigInt64Array, 11934 "%BigUint64Array%": "undefined" == typeof BigUint64Array ? void 0 : BigUint64Array, 11935 "%Boolean%": Boolean, 11936 "%DataView%": "undefined" == typeof DataView ? void 0 : DataView, 11937 "%Date%": Date, 11938 "%decodeURI%": decodeURI, 11939 "%decodeURIComponent%": decodeURIComponent, 11940 "%encodeURI%": encodeURI, 11941 "%encodeURIComponent%": encodeURIComponent, 11942 "%Error%": $90f323912e688b98$var$esErrors, 11943 "%eval%": eval, 11944 "%EvalError%": $90f323912e688b98$var$_eval, 11945 "%Float32Array%": "undefined" == typeof Float32Array ? void 0 : Float32Array, 11946 "%Float64Array%": "undefined" == typeof Float64Array ? void 0 : Float64Array, 11947 "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? void 0 : FinalizationRegistry, 11948 "%Function%": $90f323912e688b98$var$$Function, 11949 "%GeneratorFunction%": $90f323912e688b98$var$needsEval, 11950 "%Int8Array%": "undefined" == typeof Int8Array ? void 0 : Int8Array, 11951 "%Int16Array%": "undefined" == typeof Int16Array ? void 0 : Int16Array, 11952 "%Int32Array%": "undefined" == typeof Int32Array ? void 0 : Int32Array, 11953 "%isFinite%": isFinite, 11954 "%isNaN%": isNaN, 11955 "%IteratorPrototype%": $90f323912e688b98$var$hasSymbols$1 && $90f323912e688b98$var$getProto ? $90f323912e688b98$var$getProto($90f323912e688b98$var$getProto([][Symbol.iterator]())) : void 0, 11956 "%JSON%": "object" == typeof JSON ? JSON : void 0, 11957 "%Map%": "undefined" == typeof Map ? void 0 : Map, 11958 "%MapIteratorPrototype%": "undefined" != typeof Map && $90f323912e688b98$var$hasSymbols$1 && $90f323912e688b98$var$getProto ? $90f323912e688b98$var$getProto((new Map)[Symbol.iterator]()) : void 0, 11959 "%Math%": Math, 11960 "%Number%": Number, 11961 "%Object%": Object, 11962 "%parseFloat%": parseFloat, 11963 "%parseInt%": parseInt, 11964 "%Promise%": "undefined" == typeof Promise ? void 0 : Promise, 11965 "%Proxy%": "undefined" == typeof Proxy ? void 0 : Proxy, 11966 "%RangeError%": $90f323912e688b98$var$range, 11967 "%ReferenceError%": $90f323912e688b98$var$ref, 11968 "%Reflect%": "undefined" == typeof Reflect ? void 0 : Reflect, 11969 "%RegExp%": RegExp, 11970 "%Set%": "undefined" == typeof Set ? void 0 : Set, 11971 "%SetIteratorPrototype%": "undefined" != typeof Set && $90f323912e688b98$var$hasSymbols$1 && $90f323912e688b98$var$getProto ? $90f323912e688b98$var$getProto((new Set)[Symbol.iterator]()) : void 0, 11972 "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? void 0 : SharedArrayBuffer, 11973 "%String%": String, 11974 "%StringIteratorPrototype%": $90f323912e688b98$var$hasSymbols$1 && $90f323912e688b98$var$getProto ? $90f323912e688b98$var$getProto(""[Symbol.iterator]()) : void 0, 11975 "%Symbol%": $90f323912e688b98$var$hasSymbols$1 ? Symbol : void 0, 11976 "%SyntaxError%": $90f323912e688b98$var$syntax, 11977 "%ThrowTypeError%": $90f323912e688b98$var$ThrowTypeError, 11978 "%TypedArray%": $90f323912e688b98$var$TypedArray, 11979 "%TypeError%": $90f323912e688b98$var$type, 11980 "%Uint8Array%": "undefined" == typeof Uint8Array ? void 0 : Uint8Array, 11981 "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? void 0 : Uint8ClampedArray, 11982 "%Uint16Array%": "undefined" == typeof Uint16Array ? void 0 : Uint16Array, 11983 "%Uint32Array%": "undefined" == typeof Uint32Array ? void 0 : Uint32Array, 11984 "%URIError%": $90f323912e688b98$var$uri, 11985 "%WeakMap%": "undefined" == typeof WeakMap ? void 0 : WeakMap, 11986 "%WeakRef%": "undefined" == typeof WeakRef ? void 0 : WeakRef, 11987 "%WeakSet%": "undefined" == typeof WeakSet ? void 0 : WeakSet 11988}; 11989if ($90f323912e688b98$var$getProto) try { 11990 null.error; 11991} catch (e) { 11992 var $90f323912e688b98$var$errorProto = $90f323912e688b98$var$getProto($90f323912e688b98$var$getProto(e)); 11993 $90f323912e688b98$var$INTRINSICS["%Error.prototype%"] = $90f323912e688b98$var$errorProto; 11994} 11995var $90f323912e688b98$var$LEGACY_ALIASES = { 11996 __proto__: null, 11997 "%ArrayBufferPrototype%": [ 11998 "ArrayBuffer", 11999 "prototype" 12000 ], 12001 "%ArrayPrototype%": [ 12002 "Array", 12003 "prototype" 12004 ], 12005 "%ArrayProto_entries%": [ 12006 "Array", 12007 "prototype", 12008 "entries" 12009 ], 12010 "%ArrayProto_forEach%": [ 12011 "Array", 12012 "prototype", 12013 "forEach" 12014 ], 12015 "%ArrayProto_keys%": [ 12016 "Array", 12017 "prototype", 12018 "keys" 12019 ], 12020 "%ArrayProto_values%": [ 12021 "Array", 12022 "prototype", 12023 "values" 12024 ], 12025 "%AsyncFunctionPrototype%": [ 12026 "AsyncFunction", 12027 "prototype" 12028 ], 12029 "%AsyncGenerator%": [ 12030 "AsyncGeneratorFunction", 12031 "prototype" 12032 ], 12033 "%AsyncGeneratorPrototype%": [ 12034 "AsyncGeneratorFunction", 12035 "prototype", 12036 "prototype" 12037 ], 12038 "%BooleanPrototype%": [ 12039 "Boolean", 12040 "prototype" 12041 ], 12042 "%DataViewPrototype%": [ 12043 "DataView", 12044 "prototype" 12045 ], 12046 "%DatePrototype%": [ 12047 "Date", 12048 "prototype" 12049 ], 12050 "%ErrorPrototype%": [ 12051 "Error", 12052 "prototype" 12053 ], 12054 "%EvalErrorPrototype%": [ 12055 "EvalError", 12056 "prototype" 12057 ], 12058 "%Float32ArrayPrototype%": [ 12059 "Float32Array", 12060 "prototype" 12061 ], 12062 "%Float64ArrayPrototype%": [ 12063 "Float64Array", 12064 "prototype" 12065 ], 12066 "%FunctionPrototype%": [ 12067 "Function", 12068 "prototype" 12069 ], 12070 "%Generator%": [ 12071 "GeneratorFunction", 12072 "prototype" 12073 ], 12074 "%GeneratorPrototype%": [ 12075 "GeneratorFunction", 12076 "prototype", 12077 "prototype" 12078 ], 12079 "%Int8ArrayPrototype%": [ 12080 "Int8Array", 12081 "prototype" 12082 ], 12083 "%Int16ArrayPrototype%": [ 12084 "Int16Array", 12085 "prototype" 12086 ], 12087 "%Int32ArrayPrototype%": [ 12088 "Int32Array", 12089 "prototype" 12090 ], 12091 "%JSONParse%": [ 12092 "JSON", 12093 "parse" 12094 ], 12095 "%JSONStringify%": [ 12096 "JSON", 12097 "stringify" 12098 ], 12099 "%MapPrototype%": [ 12100 "Map", 12101 "prototype" 12102 ], 12103 "%NumberPrototype%": [ 12104 "Number", 12105 "prototype" 12106 ], 12107 "%ObjectPrototype%": [ 12108 "Object", 12109 "prototype" 12110 ], 12111 "%ObjProto_toString%": [ 12112 "Object", 12113 "prototype", 12114 "toString" 12115 ], 12116 "%ObjProto_valueOf%": [ 12117 "Object", 12118 "prototype", 12119 "valueOf" 12120 ], 12121 "%PromisePrototype%": [ 12122 "Promise", 12123 "prototype" 12124 ], 12125 "%PromiseProto_then%": [ 12126 "Promise", 12127 "prototype", 12128 "then" 12129 ], 12130 "%Promise_all%": [ 12131 "Promise", 12132 "all" 12133 ], 12134 "%Promise_reject%": [ 12135 "Promise", 12136 "reject" 12137 ], 12138 "%Promise_resolve%": [ 12139 "Promise", 12140 "resolve" 12141 ], 12142 "%RangeErrorPrototype%": [ 12143 "RangeError", 12144 "prototype" 12145 ], 12146 "%ReferenceErrorPrototype%": [ 12147 "ReferenceError", 12148 "prototype" 12149 ], 12150 "%RegExpPrototype%": [ 12151 "RegExp", 12152 "prototype" 12153 ], 12154 "%SetPrototype%": [ 12155 "Set", 12156 "prototype" 12157 ], 12158 "%SharedArrayBufferPrototype%": [ 12159 "SharedArrayBuffer", 12160 "prototype" 12161 ], 12162 "%StringPrototype%": [ 12163 "String", 12164 "prototype" 12165 ], 12166 "%SymbolPrototype%": [ 12167 "Symbol", 12168 "prototype" 12169 ], 12170 "%SyntaxErrorPrototype%": [ 12171 "SyntaxError", 12172 "prototype" 12173 ], 12174 "%TypedArrayPrototype%": [ 12175 "TypedArray", 12176 "prototype" 12177 ], 12178 "%TypeErrorPrototype%": [ 12179 "TypeError", 12180 "prototype" 12181 ], 12182 "%Uint8ArrayPrototype%": [ 12183 "Uint8Array", 12184 "prototype" 12185 ], 12186 "%Uint8ClampedArrayPrototype%": [ 12187 "Uint8ClampedArray", 12188 "prototype" 12189 ], 12190 "%Uint16ArrayPrototype%": [ 12191 "Uint16Array", 12192 "prototype" 12193 ], 12194 "%Uint32ArrayPrototype%": [ 12195 "Uint32Array", 12196 "prototype" 12197 ], 12198 "%URIErrorPrototype%": [ 12199 "URIError", 12200 "prototype" 12201 ], 12202 "%WeakMapPrototype%": [ 12203 "WeakMap", 12204 "prototype" 12205 ], 12206 "%WeakSetPrototype%": [ 12207 "WeakSet", 12208 "prototype" 12209 ] 12210}, $90f323912e688b98$var$$concat = $90f323912e688b98$var$functionBind.call(Function.call, Array.prototype.concat), $90f323912e688b98$var$$spliceApply = $90f323912e688b98$var$functionBind.call(Function.apply, Array.prototype.splice), $90f323912e688b98$var$$replace = $90f323912e688b98$var$functionBind.call(Function.call, String.prototype.replace), $90f323912e688b98$var$$strSlice = $90f323912e688b98$var$functionBind.call(Function.call, String.prototype.slice), $90f323912e688b98$var$$exec = $90f323912e688b98$var$functionBind.call(Function.call, RegExp.prototype.exec), $90f323912e688b98$var$rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, $90f323912e688b98$var$reEscapeChar = /\\(\\)?/g, $90f323912e688b98$var$stringToPath = function(string) { 12211 var first = $90f323912e688b98$var$$strSlice(string, 0, 1), last = $90f323912e688b98$var$$strSlice(string, -1); 12212 if ("%" === first && "%" !== last) throw new $90f323912e688b98$var$syntax("invalid intrinsic syntax, expected closing `%`"); 12213 if ("%" === last && "%" !== first) throw new $90f323912e688b98$var$syntax("invalid intrinsic syntax, expected opening `%`"); 12214 var result = []; 12215 return $90f323912e688b98$var$$replace(string, $90f323912e688b98$var$rePropName, function(match, number, quote, subString) { 12216 result[result.length] = quote ? $90f323912e688b98$var$$replace(subString, $90f323912e688b98$var$reEscapeChar, "$1") : number || match; 12217 }), result; 12218}, $90f323912e688b98$var$getBaseIntrinsic = function(name, allowMissing) { 12219 var alias, intrinsicName = name; 12220 if ($90f323912e688b98$var$hasown($90f323912e688b98$var$LEGACY_ALIASES, intrinsicName) && (intrinsicName = "%" + (alias = $90f323912e688b98$var$LEGACY_ALIASES[intrinsicName])[0] + "%"), $90f323912e688b98$var$hasown($90f323912e688b98$var$INTRINSICS, intrinsicName)) { 12221 var value = $90f323912e688b98$var$INTRINSICS[intrinsicName]; 12222 if (value === $90f323912e688b98$var$needsEval && (value = function doEval(name) { 12223 var value; 12224 if ("%AsyncFunction%" === name) value = $90f323912e688b98$var$getEvalledConstructor("async function () {}"); 12225 else if ("%GeneratorFunction%" === name) value = $90f323912e688b98$var$getEvalledConstructor("function* () {}"); 12226 else if ("%AsyncGeneratorFunction%" === name) value = $90f323912e688b98$var$getEvalledConstructor("async function* () {}"); 12227 else if ("%AsyncGenerator%" === name) { 12228 var fn = doEval("%AsyncGeneratorFunction%"); 12229 fn && (value = fn.prototype); 12230 } else if ("%AsyncIteratorPrototype%" === name) { 12231 var gen = doEval("%AsyncGenerator%"); 12232 gen && $90f323912e688b98$var$getProto && (value = $90f323912e688b98$var$getProto(gen.prototype)); 12233 } 12234 return $90f323912e688b98$var$INTRINSICS[name] = value, value; 12235 }(intrinsicName)), void 0 === value && !allowMissing) throw new $90f323912e688b98$var$type("intrinsic " + name + " exists, but is not available. Please file an issue!"); 12236 return { 12237 alias: alias, 12238 name: intrinsicName, 12239 value: value 12240 }; 12241 } 12242 throw new $90f323912e688b98$var$syntax("intrinsic " + name + " does not exist!"); 12243}, $90f323912e688b98$var$getIntrinsic = function(name, allowMissing) { 12244 if ("string" != typeof name || 0 === name.length) throw new $90f323912e688b98$var$type("intrinsic name must be a non-empty string"); 12245 if (arguments.length > 1 && "boolean" != typeof allowMiss
12245ing) throw new $90f323912e688b98$var$type('"allowMissing" argument must be a boolean'); 12246 if (null === $90f323912e688b98$var$$exec(/^%?[^%]*%?$/, name)) throw new $90f323912e688b98$var$syntax("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); 12247 var parts = $90f323912e688b98$var$stringToPath(name), intrinsicBaseName = parts.length > 0 ? parts[0] : "", intrinsic = $90f323912e688b98$var$getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing), intrinsicRealName = intrinsic.name, value = intrinsic.value, skipFurtherCaching = !1, alias = intrinsic.alias; 12248 alias && (intrinsicBaseName = alias[0], $90f323912e688b98$var$$spliceApply(parts, $90f323912e688b98$var$$concat([ 12249 0, 12250 1 12251 ], alias))); 12252 for(var i = 1, isOwn = !0; i < parts.length; i += 1){ 12253 var part = parts[i], first = $90f323912e688b98$var$$strSlice(part, 0, 1), last = $90f323912e688b98$var$$strSlice(part, -1); 12254 if (('"' === first || "'" === first || "`" === first || '"' === last || "'" === last || "`" === last) && first !== last) throw new $90f323912e688b98$var$syntax("property names with quotes must have matching quotes"); 12255 if ("constructor" !== part && isOwn || (skipFurtherCaching = !0), $90f323912e688b98$var$hasown($90f323912e688b98$var$INTRINSICS, intrinsicRealName = "%" + (intrinsicBaseName += "." + part) + "%")) value = $90f323912e688b98$var$INTRINSICS[intrinsicRealName]; 12256 else if (null != value) { 12257 if (!(part in value)) { 12258 if (!allowMissing) throw new $90f323912e688b98$var$type("base intrinsic for " + name + " exists, but the property is not available."); 12259 return; 12260 } 12261 if ($90f323912e688b98$var$$gOPD && i + 1 >= parts.length) { 12262 var desc = $90f323912e688b98$var$$gOPD(value, part); 12263 value = (isOwn = !!desc) && "get" in desc && !("originalValue" in desc.get) ? desc.get : value[part]; 12264 } else isOwn = $90f323912e688b98$var$hasown(value, part), value = value[part]; 12265 isOwn && !skipFurtherCaching && ($90f323912e688b98$var$INTRINSICS[intrinsicRealName] = value); 12266 } 12267 } 12268 return value; 12269}, $90f323912e688b98$var$$defineProperty = $90f323912e688b98$var$getIntrinsic("%Object.defineProperty%", !0) || !1; 12270if ($90f323912e688b98$var$$defineProperty) try { 12271 $90f323912e688b98$var$$defineProperty({}, "a", { 12272 value: 1 12273 }); 12274} catch (e) { 12275 $90f323912e688b98$var$$defineProperty = !1; 12276} 12277var $90f323912e688b98$var$esDefineProperty = $90f323912e688b98$var$$defineProperty, $90f323912e688b98$var$$gOPD$1 = $90f323912e688b98$var$getIntrinsic("%Object.getOwnPropertyDescriptor%", !0); 12278if ($90f323912e688b98$var$$gOPD$1) try { 12279 $90f323912e688b98$var$$gOPD$1([], "length"); 12280} catch (e) { 12281 $90f323912e688b98$var$$gOPD$1 = null; 12282} 12283var $90f323912e688b98$var$gopd = $90f323912e688b98$var$$gOPD$1, $90f323912e688b98$var$defineDataProperty = function(obj, property, value) { 12284 if (!obj || "object" != typeof obj && "function" != typeof obj) throw new $90f323912e688b98$var$type("`obj` must be an object or a function`"); 12285 if ("string" != typeof property && "symbol" != typeof property) throw new $90f323912e688b98$var$type("`property` must be a string or a symbol`"); 12286 if (arguments.length > 3 && "boolean" != typeof arguments[3] && null !== arguments[3]) throw new $90f323912e688b98$var$type("`nonEnumerable`, if provided, must be a boolean or null"); 12287 if (arguments.length > 4 && "boolean" != typeof arguments[4] && null !== arguments[4]) throw new $90f323912e688b98$var$type("`nonWritable`, if provided, must be a boolean or null"); 12288 if (arguments.length > 5 && "boolean" != typeof arguments[5] && null !== arguments[5]) throw new $90f323912e688b98$var$type("`nonConfigurable`, if provided, must be a boolean or null"); 12289 if (arguments.length > 6 && "boolean" != typeof arguments[6]) throw new $90f323912e688b98$var$type("`loose`, if provided, must be a boolean"); 12290 var nonEnumerable = arguments.length > 3 ? arguments[3] : null, nonWritable = arguments.length > 4 ? arguments[4] : null, nonConfigurable = arguments.length > 5 ? arguments[5] : null, loose = arguments.length > 6 && arguments[6], desc = !!$90f323912e688b98$var$gopd && $90f323912e688b98$var$gopd(obj, property); 12291 if ($90f323912e688b98$var$esDefineProperty) $90f323912e688b98$var$esDefineProperty(obj, property, { 12292 configurable: null === nonConfigurable && desc ? desc.configurable : !nonConfigurable, 12293 enumerable: null === nonEnumerable && desc ? desc.enumerable : !nonEnumerable, 12294 value: value, 12295 writable: null === nonWritable && desc ? desc.writable : !nonWritable 12296 }); 12297 else { 12298 if (!loose && (nonEnumerable || nonWritable || nonConfigurable)) throw new $90f323912e688b98$var$syntax("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); 12299 obj[property] = value; 12300 } 12301}, $90f323912e688b98$var$hasPropertyDescriptors = function() { 12302 return !!$90f323912e688b98$var$esDefineProperty; 12303}; 12304$90f323912e688b98$var$hasPropertyDescriptors.hasArrayLengthDefineBug = function() { 12305 if (!$90f323912e688b98$var$esDefineProperty) return null; 12306 try { 12307 return 1 !== $90f323912e688b98$var$esDefineProperty([], "length", { 12308 value: 1 12309 }).length; 12310 } catch (e) { 12311 return !0; 12312 } 12313}; 12314var $90f323912e688b98$var$hasDescriptors = $90f323912e688b98$var$hasPropertyDescriptors(), $90f323912e688b98$var$$floor = $90f323912e688b98$var$getIntrinsic("%Math.floor%"), $90f323912e688b98$var$setFunctionLength = function(fn, length) { 12315 if ("function" != typeof fn) throw new $90f323912e688b98$var$type("`fn` is not a function"); 12316 if ("number" != typeof length || length < 0 || length > 4294967295 || $90f323912e688b98$var$$floor(length) !== length) throw new $90f323912e688b98$var$type("`length` must be a positive 32-bit integer"); 12317 var loose = arguments.length > 2 && !!arguments[2], functionLengthIsConfigurable = !0, functionLengthIsWritable = !0; 12318 if ("length" in fn && $90f323912e688b98$var$gopd) { 12319 var desc = $90f323912e688b98$var$gopd(fn, "length"); 12320 desc && !desc.configurable && (functionLengthIsConfigurable = !1), desc && !desc.writable && (functionLengthIsWritable = !1); 12321 } 12322 return (functionLengthIsConfigurable || functionLengthIsWritable || !loose) && ($90f323912e688b98$var$hasDescriptors ? $90f323912e688b98$var$defineDataProperty(fn, "length", length, !0, !0) : $90f323912e688b98$var$defineDataProperty(fn, "length", length)), fn; 12323}, $90f323912e688b98$var$callBind = $90f323912e688b98$var$createCommonjsModule(function(module) { 12324 var $apply = $90f323912e688b98$var$getIntrinsic("%Function.prototype.apply%"), $call = $90f323912e688b98$var$getIntrinsic("%Function.prototype.call%"), $reflectAp
vendor: 9,904 bytes, lines 12324-12418
12324ply = $90f323912e688b98$var$getIntrinsic("%Reflect.apply%", !0) || $90f323912e688b98$var$functionBind.call($call, $apply), $max = $90f323912e688b98$var$getIntrinsic("%Math.max%"); 12325 module.exports = function(originalFunction) { 12326 if ("function" != typeof originalFunction) throw new $90f323912e688b98$var$type("a function is required"); 12327 var func = $reflectApply($90f323912e688b98$var$functionBind, $call, arguments); 12328 return $90f323912e688b98$var$setFunctionLength(func, 1 + $max(0, originalFunction.length - (arguments.length - 1)), !0); 12329 }; 12330 var applyBind = function() { 12331 return $reflectApply($90f323912e688b98$var$functionBind, $apply, arguments); 12332 }; 12333 $90f323912e688b98$var$esDefineProperty ? $90f323912e688b98$var$esDefineProperty(module.exports, "apply", { 12334 value: applyBind 12335 }) : module.exports.apply = applyBind; 12336}), $90f323912e688b98$var$$indexOf = ($90f323912e688b98$var$callBind.apply, $90f323912e688b98$var$callBind($90f323912e688b98$var$getIntrinsic("String.prototype.indexOf"))), $90f323912e688b98$var$callBound = function(name, allowMissing) { 12337 var intrinsic = $90f323912e688b98$var$getIntrinsic(name, !!allowMissing); 12338 return "function" == typeof intrinsic && $90f323912e688b98$var$$indexOf(name, ".prototype.") > -1 ? $90f323912e688b98$var$callBind(intrinsic) : intrinsic; 12339}, $90f323912e688b98$var$semver = function(n) { 12340 return n && n.default || n; 12341}(Object.freeze({ 12342 __proto__: null, 12343 default: {} 12344})), $90f323912e688b98$var$hasMap = "function" == typeof Map && Map.prototype, $90f323912e688b98$var$mapSizeDescriptor = Object.getOwnPropertyDescriptor && $90f323912e688b98$var$hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, $90f323912e688b98$var$mapSize = $90f323912e688b98$var$hasMap && $90f323912e688b98$var$mapSizeDescriptor && "function" == typeof $90f323912e688b98$var$mapSizeDescriptor.get ? $90f323912e688b98$var$mapSizeDescriptor.get : null, $90f323912e688b98$var$mapForEach = $90f323912e688b98$var$hasMap && Map.prototype.forEach, $90f323912e688b98$var$hasSet = "function" == typeof Set && Set.prototype, $90f323912e688b98$var$setSizeDescriptor = Object.getOwnPropertyDescriptor && $90f323912e688b98$var$hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, $90f323912e688b98$var$setSize = $90f323912e688b98$var$hasSet && $90f323912e688b98$var$setSizeDescriptor && "function" == typeof $90f323912e688b98$var$setSizeDescriptor.get ? $90f323912e688b98$var$setSizeDescriptor.get : null, $90f323912e688b98$var$setForEach = $90f323912e688b98$var$hasSet && Set.prototype.forEach, $90f323912e688b98$var$weakMapHas = "function" == typeof WeakMap && WeakMap.prototype ? WeakMap.prototype.has : null, $90f323912e688b98$var$weakSetHas = "function" == typeof WeakSet && WeakSet.prototype ? WeakSet.prototype.has : null, $90f323912e688b98$var$weakRefDeref = "function" == typeof WeakRef && WeakRef.prototype ? WeakRef.prototype.deref : null, $90f323912e688b98$var$booleanValueOf = Boolean.prototype.valueOf, $90f323912e688b98$var$objectToString = Object.prototype.toString, $90f323912e688b98$var$functionToString = Function.prototype.toString, $90f323912e688b98$var$$match = String.prototype.match, $90f323912e688b98$var$$slice = String.prototype.slice, $90f323912e688b98$var$$replace$1 = String.prototype.replace, $90f323912e688b98$var$$toUpperCase = String.prototype.toUpperCase, $90f323912e688b98$var$$toLowerCase = String.prototype.toLowerCase, $90f323912e688b98$var$$test = RegExp.prototype.test, $90f323912e688b98$var$$concat$1 = Array.prototype.concat, $90f323912e688b98$var$$join = Array.prototype.join, $90f323912e688b98$var$$arrSlice = Array.prototype.slice, $90f323912e688b98$var$$floor$1 = Math.floor, $90f323912e688b98$var$bigIntValueOf = "function" == typeof BigInt ? BigInt.prototype.valueOf : null, $90f323912e688b98$var$gOPS = Object.getOwnPropertySymbols, $90f323912e688b98$var$symToString = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol.prototype.toString : null, $90f323912e688b98$var$hasShammedSymbols = "function" == typeof Symbol && "object" == typeof Symbol.iterator, $90f323912e688b98$var$toStringTag = "function" == typeof Symbol && Symbol.toStringTag && (typeof Symbol.toStringTag === $90f323912e688b98$var$hasShammedSymbols || "symbol") ? Symbol.toStringTag : null, $90f323912e688b98$var$isEnumerable = Object.prototype.propertyIsEnumerable, $90f323912e688b98$var$gPO = ("function" == typeof Reflect ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) { 12345 return O.__proto__; 12346} : null); 12347function $90f323912e688b98$var$addNumericSeparator(num, str) { 12348 if (num === 1 / 0 || num === -1 / 0 || num != num || num && num > -1000 && num < 1e3 || $90f323912e688b98$var$$test.call(/e/, str)) return str; 12349 var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; 12350 if ("number" == typeof num) { 12351 var int = num < 0 ? -$90f323912e688b98$var$$floor$1(-num) : $90f323912e688b98$var$$floor$1(num); 12352 if (int !== num) { 12353 var intStr = String(int), dec = $90f323912e688b98$var$$slice.call(str, intStr.length + 1); 12354 return $90f323912e688b98$var$$replace$1.call(intStr, sepRegex, "$&_") + "." + $90f323912e688b98$var$$replace$1.call($90f323912e688b98$var$$replace$1.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); 12355 } 12356 } 12357 return $90f323912e688b98$var$$replace$1.call(str, sepRegex, "$&_"); 12358} 12359var $90f323912e688b98$var$inspectCustom = $90f323912e688b98$var$semver.custom, $90f323912e688b98$var$inspectSymbol = $90f323912e688b98$var$isSymbol($90f323912e688b98$var$inspectCustom) ? $90f323912e688b98$var$inspectCustom : null, $90f323912e688b98$var$objectInspect = function inspect_(obj, options, depth, seen) { 12360 var opts = options || {}; 12361 if ($90f323912e688b98$var$has(opts, "quoteStyle") && "single" !== opts.quoteStyle && "double" !== opts.quoteStyle) throw new TypeError('option "quoteStyle" must be "single" or "double"'); 12362 if ($90f323912e688b98$var$has(opts, "maxStringLength") && ("number" == typeof opts.maxStringLength ? opts.maxStringLength < 0 && opts.maxStringLength !== 1 / 0 : null !== opts.maxStringLength)) throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); 12363 var customInspect = !$90f323912e688b98$var$has(opts, "customInspect") || opts.customInspect; 12364 if ("boolean" != typeof customInspect && "symbol" !== customInspect) throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); 12365 if ($90f323912e688b98$var$has(opts, "indent") && null !== opts.indent && "\t" !== opts.indent && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); 12366 if ($90f323912e688b98$var$has(opts, "numericSeparator") && "boolean" != typeof opts.numericSeparator) throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); 12367 var numericSeparator = opts.numericSeparator; 12368 if (void 0 === obj) return "undefined"; 12369 if (null === obj) return "null"; 12370 if ("boolean" == typeof obj) return obj ? "true" : "false"; 12371 if ("string" == typeof obj) return function inspectString(str, opts) { 12372 if (str.length > opts.maxStringLength) { 12373 var remaining = str.length - opts.maxStringLength, trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); 12374 return inspectString($90f323912e688b98$var$$slice.call(str, 0, opts.maxStringLength), opts) + trailer; 12375 } 12376 return $90f323912e688b98$var$wrapQuotes($90f323912e688b98$var$$replace$1.call($90f323912e688b98$var$$replace$1.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, $90f323912e688b98$var$lowbyte), "single", opts); 12377 }(obj, opts); 12378 if ("number" == typeof obj) { 12379 if (0 === obj) return 1 / 0 / obj > 0 ? "0" : "-0"; 12380 var str = String(obj); 12381 return numericSeparator ? $90f323912e688b98$var$addNumericSeparator(obj, str) : str; 12382 } 12383 if ("bigint" == typeof obj) { 12384 var bigIntStr = String(obj) + "n"; 12385 return numericSeparator ? $90f323912e688b98$var$addNumericSeparator(obj, bigIntStr) : bigIntStr; 12386 } 12387 var maxDepth = void 0 === opts.depth ? 5 : opts.depth; 12388 if (void 0 === depth && (depth = 0), depth >= maxDepth && maxDepth > 0 && "object" == typeof obj) return $90f323912e688b98$var$isArray(obj) ? "[Array]" : "[Object]"; 12389 var indent = function(opts, depth) { 12390 var baseIndent; 12391 if ("\t" === opts.indent) baseIndent = "\t"; 12392 else { 12393 if (!("number" == typeof opts.indent && opts.indent > 0)) return null; 12394 baseIndent = $90f323912e688b98$var$$join.call(Array(opts.indent + 1), " "); 12395 } 12396 return { 12397 base: baseIndent, 12398 prev: $90f323912e688b98$var$$join.call(Array(depth + 1), baseIndent) 12399 }; 12400 }(opts, depth); 12401 if (void 0 === seen) seen = []; 12402 else if ($90f323912e688b98$var$indexOf(seen, obj) >= 0) return "[Circular]"; 12403 function inspect(value, from, noIndent) { 12404 if (from && (seen = $90f323912e688b98$var$$arrSlice.call(seen)).push(from), noIndent) { 12405 var newOpts = { 12406 depth: opts.depth 12407 }; 12408 return $90f323912e688b98$var$has(opts, "quoteStyle") && (newOpts.quoteStyle = opts.quoteStyle), inspect_(value, newOpts, depth + 1, seen); 12409 } 12410 return inspect_(value, opts, depth + 1, seen); 12411 } 12412 if ("function" == typeof obj && !$90f323912e688b98$var$isRegExp(obj)) { 12413 var name = function(f) { 12414 if (f.name) return f.name; 12415 var m = $90f323912e688b98$var$$match.call($90f323912e688b98$var$functionToString.call(f), /^function\s*([\w$]+)/); 12416 if (m) return m[1]; 12417 return null; 12418 }(obj), keys = $90f323912e688b98$var$arrObjKeys(obj, inspect);
12419 return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $90f323912e688b98$var$$join.call(keys, ", ") + " }" : ""); 12420 } 12421 if ($90f323912e688b98$var$isSymbol(obj)) { 12422 var symString = $90f323912e688b98$var$hasShammedSymbols ? $90f323912e688b98$var$$replace$1.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : $90f323912e688b98$var$symToString.call(obj); 12423 return "object" != typeof obj || $90f323912e688b98$var$hasShammedSymbols ? symString : $90f323912e688b98$var$markBoxed(symString); 12424 } 12425 if (function(x) { 12426 if (!x || "object" != typeof x) return !1; 12427 if ("undefined" != typeof HTMLElement && x instanceof HTMLElement) return !0; 12428 return "string" == typeof x.nodeName && "function" == typeof x.getAttribute; 12429 }(obj)) { 12430 for(var s = "<" + $90f323912e688b98$var$$toLowerCase.call(String(obj.nodeName)), attrs = obj.attributes || [], i = 0; i < attrs.length; i++)s += " " + attrs[i].name + "=" + $90f323912e688b98$var$wrapQuotes($90f323912e688b98$var$quote(attrs[i].value), "double", opts); 12431 return s += ">", obj.childNodes && obj.childNodes.length && (s += "..."), s += "</" + $90f323912e688b98$var$$toLowerCase.call(String(obj.nodeName)) + ">"; 12432 } 12433 if ($90f323912e688b98$var$isArray(obj)) { 12434 if (0 === obj.length) return "[]"; 12435 var xs = $90f323912e688b98$var$arrObjKeys(obj, inspect); 12436 return indent && !function(xs) { 12437 for(var i = 0; i < xs.length; i++)if ($90f323912e688b98$var$indexOf(xs[i], "\n") >= 0) return !1; 12438 return !0; 12439 }(xs) ? "[" + $90f323912e688b98$var$indentedJoin(xs, indent) + "]" : "[ " + $90f323912e688b98$var$$join.call(xs, ", ") + " ]"; 12440 } 12441 if (function(obj) { 12442 return !("[object Error]" !== $90f323912e688b98$var$toStr$1(obj) || $90f323912e688b98$var$toStringTag && "object" == typeof obj && $90f323912e688b98$var$toStringTag in obj); 12443 }(obj)) { 12444 var parts = $90f323912e688b98$var$arrObjKeys(obj, inspect); 12445 return "cause" in Error.prototype || !("cause" in obj) || $90f323912e688b98$var$isEnumerable.call(obj, "cause") ? 0 === parts.length ? "[" + String(obj) + "]" : "{ [" + String(obj) + "] " + $90f323912e688b98$var$$join.call(parts, ", ") + " }" : "{ [" + String(obj) + "] " + $90f323912e688b98$var$$join.call($90f323912e688b98$var$$concat$1.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; 12446 } 12447 if ("object" == typeof obj && customInspect) { 12448 if ($90f323912e688b98$var$inspectSymbol && "function" == typeof obj[$90f323912e688b98$var$inspectSymbol] && $90f323912e688b98$var$semver) return $90f323912e688b98$var$semver(obj, { 12449 depth: maxDepth - depth 12450 }); 12451 if ("symbol" !== customInspect && "function" == typeof obj.inspect) return obj.inspect(); 12452 } 12453 if (function(x) { 12454 if (!$90f323912e688b98$var$mapSize || !x || "object" != typeof x) return !1; 12455 try { 12456 $90f323912e688b98$var$mapSize.call(x); 12457 try { 12458 $90f323912e688b98$var$setSize.call(x); 12459 } catch (s) { 12460 return !0; 12461 } 12462 return x instanceof Map; 12463 } catch (e) {} 12464 return !1; 12465 }(obj)) { 12466 var mapParts = []; 12467 return $90f323912e688b98$var$mapForEach && $90f323912e688b98$var$mapForEach.call(obj, function(value, key) { 12468 mapParts.push(inspect(key, obj, !0) + " => " + inspect(value, obj)); 12469 }), $90f323912e688b98$var$collectionOf("Map", $90f323912e688b98$var$mapSize.call(obj), mapParts, indent); 12470 } 12471 if (function(x) { 12472 if (!$90f323912e688b98$var$setSize || !x || "object" != typeof x) return !1; 12473 try { 12474 $90f323912e688b98$var$setSize.call(x); 12475 try { 12476 $90f323912e688b98$var$mapSize.call(x); 12477 } catch (m) { 12478 return !0; 12479 } 12480 return x instanceof Set; 12481 } catch (e) {} 12482 return !1; 12483 }(obj)) { 12484 var setParts = []; 12485 return $90f323912e688b98$var$setForEach && $90f323912e688b98$var$setForEach.call(obj, function(value) { 12486 setParts.push(inspect(value, obj)); 12487 }), $90f323912e688b98$var$collectionOf("Set", $90f323912e688b98$var$setSize.call(obj), setParts, indent); 12488 } 12489 if (function(x) { 12490 if (!$90f323912e688b98$var$weakMapHas || !x || "object" != typeof x) return !1; 12491 try { 12492 $90f323912e688b98$var$weakMapHas.call(x, $90f323912e688b98$var$weakMapHas); 12493 try { 12494 $90f323912e688b98$var$weakSetHas.call(x, $90f323912e688b98$var$weakSetHas); 12495 } catch (s) { 12496 return !0; 12497 } 12498 return x instanceof WeakMap; 12499 } catch (e) {} 12500 return !1; 12501 }(obj)) return $90f323912e688b98$var$weakCollectionOf("WeakMap"); 12502 if (function(x) { 12503 if (!$90f323912e688b98$var$weakSetHas || !x || "object" != typeof x) return !1; 12504 try { 12505 $90f323912e688b98$var$weakSetHas.call(x, $90f323912e688b98$var$weakSetHas); 12506 try { 12507 $90f323912e688b98$var$weakMapHas.call(x, $90f323912e688b98$var$weakMapHas); 12508 } catch (s) { 12509 return !0; 12510 } 12511 return x instanceof WeakSet; 12512 } catch (e) {} 12513 return !1; 12514 }(obj)) return $90f323912e688b98$var$weakCollectionOf("WeakSet"); 12515 if (function(x) { 12516 if (!$90f323912e688b98$var$weakRefDeref || !x || "object" != typeof x) return !1; 12517 try { 12518 return $90f323912e688b98$var$weakRefDeref.call(x), !0; 12519 } catch (e) {} 12520 return !1; 12521 }(obj)) return $90f323912e688b98$var$weakCollectionOf("WeakRef"); 12522 if (function(obj) { 12523 return !("[object Number]" !== $90f323912e688b98$var$toStr$1(obj) || $90f323912e688b98$var$toStringTag && "object" == typeof obj && $90f323912e688b98$var$toStringTag in obj); 12524 }(obj)) return $90f323912e688b98$var$markBoxed(inspect(Number(obj))); 12525 if (function(obj) { 12526 if (!obj || "object" != typeof obj || !$90f323912e688b98$var$bigIntValueOf) return !1; 12527 try { 12528 return $90f323912e688b98$var$bigIntValueOf.call(obj), !0; 12529 } catch (e) {} 12530 return !1; 12531 }(obj)) return $90f323912e688b98$var$markBoxed(inspect($90f323912e688b98$var$bigIntValueOf.call(obj))); 12532 if (function(obj) { 12533 return !("[object Boolean]" !== $90f323912e688b98$var$toStr$1(obj) || $90f323912e688b98$var$toStringTag && "object" == typeof obj && $90f323912e688b98$var$toStringTag in obj); 12534 }(obj)) return $90f323912e688b98$var$markBoxed($90f323912e688b98$var$booleanValueOf.call(obj)); 12535 if (function(obj) { 12536 return !("[object String]" !== $90f323912e688b98$var$toStr$1(obj) || $90f323912e688b98$var$toStringTag && "object" == typeof obj && $90f323912e688b98$var$toStringTag in obj); 12537 }(obj)) return $90f323912e688b98$var$markBoxed(inspect(String(obj))); 12538 if ("undefined" != typeof window && obj === window) return "{ [object Window] }"; 12539 if (obj === $90f323912e688b98$var$commonjsGlobal) return "{ [object globalThis] }"; 12540 if (!function(obj) { 12541 return !("[object Date]" !== $90f323912e688b98$var$toStr$1(obj) || $90f323912e688b98$var$toStringTag && "object" == typeof obj && $90f323912e688b98$var$toStringTag in obj); 12542 }(obj) && !$90f323912e688b98$var$isRegExp(obj)) { 12543 var ys = $90f323912e688b98$var$arrObjKeys(obj, inspect), isPlainObject = $90f323912e688b98$var$gPO ? $90f323912e688b98$var$gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object, protoTag = obj instanceof Object ? "" : "null prototype", stringTag = !isPlainObject && $90f323912e688b98$var$toStringTag && Object(obj) === obj && $90f323912e688b98$var$toStringTag in obj ? $90f323912e688b98$var$$slice.call($90f323912e688b98$var$toStr$1(obj), 8, -1) : protoTag ? "Object" : "", tag = (isPlainObject || "function" != typeof obj.constructor ? "" : obj.constructor.name ? obj.constructor.name + " " : "") + (stringTag || protoTag ? "[" + $90f323912e688b98$var$$join.call($90f323912e688b98$var$$concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); 12544 return 0 === ys.length ? tag + "{}" : indent ? tag + "{" + $90f323912e688b98$var$indentedJoin(ys, indent) + "}" : tag + "{ " + $90f323912e688b98$var$$join.call(ys, ", ") + " }"; 12545 } 12546 return String(obj); 12547}; 12548function $90f323912e688b98$var$wrapQuotes(s, defaultStyle, opts) { 12549 var quoteChar = "double" === (opts.quoteStyle || defaultStyle) ? '"' : "'"; 12550 return quoteChar + s + quoteChar; 12551} 12552function $90f323912e688b98$var$quote(s) { 12553 return $90f323912e688b98$var$$replace$1.call(String(s), /"/g, """); 12554} 12555function $90f323912e688b98$var$isArray(obj) { 12556 return !("[object Array]" !== $90f323912e688b98$var$toStr$1(obj) || $90f323912e688b98$var$toStringTag && "object" == typeof obj && $90f323912e688b98$var$toStringTag in obj); 12557} 12558function $90f323912e688b98$var$isRegExp(obj) { 12559 return !("[object RegExp]" !== $90f323912e688b98$var$toStr$1(obj) || $90f323912e688b98$var$toStringTag && "object" == typeof obj && $90f323912e688b98$var$toStringTag in obj); 12560} 12561function $90f323912e688b98$var$isSymbol(obj) { 12562 if ($90f323912e688b98$var$hasShammedSymbols) return obj && "object" == typeof obj && obj instanceof Symbol; 12563 if ("symbol" == typeof obj) return !0; 12564 if (!obj || "object" != typeof obj || !$90f323912e688b98$var$symToString) return !1; 12565 try { 12566 return $90f323912e688b98$var$symToString.call(obj), !0; 12567 } catch (e) {} 12568 return !1; 12569} 12570var $90f323912e688b98$var$hasOwn = Object.prototype.hasOwnProperty || function(key) { 12571 return key in this; 12572}; 12573function $90f323912e688b98$var$has(obj, key) { 12574 return $90f323912e688b98$var$hasOwn.call(obj, key); 12575} 12576function $90f323912e688b98$var$toStr$1(obj) { 12577 return $90f323912e688b98$var$objectToString.call(obj); 12578} 12579function $90f323912e688b98$var$indexOf(xs, x) { 12580 if (xs.indexOf) return xs.indexOf(x); 12581 for(var i = 0, l = xs.length; i < l; i++)if (xs[i] === x) return i; 12582 return -1; 12583} 12584function $90f323912e688b98$var$lowbyte(c) {
12585 var n = c.charCodeAt(0), x = { 12586 8: "b", 12587 9: "t", 12588 10: "n", 12589 12: "f", 12590 13: "r" 12591 }[n]; 12592 return x ? "\\" + x : "\\x" + (n < 16 ? "0" : "") + $90f323912e688b98$var$$toUpperCase.call(n.toString(16)); 12593} 12594function $90f323912e688b98$var$markBoxed(str) { 12595 return "Object(" + str + ")"; 12596} 12597function $90f323912e688b98$var$weakCollectionOf(type) { 12598 return type + " { ? }"; 12599} 12600function $90f323912e688b98$var$collectionOf(type, size, entries, indent) { 12601 return type + " (" + size + ") {" + (indent ? $90f323912e688b98$var$indentedJoin(entries, indent) : $90f323912e688b98$var$$join.call(entries, ", ")) + "}"; 12602} 12603function $90f323912e688b98$var$indentedJoin(xs, indent) { 12604 if (0 === xs.length) return ""; 12605 var lineJoiner = "\n" + indent.prev + indent.base; 12606 return lineJoiner + $90f323912e688b98$var$$join.call(xs, "," + lineJoiner) + "\n" + indent.prev; 12607} 12608function $90f323912e688b98$var$arrObjKeys(obj, inspect) { 12609 var isArr = $90f323912e688b98$var$isArray(obj), xs = []; 12610 if (isArr) { 12611 xs.length = obj.length; 12612 for(var i = 0; i < obj.length; i++)xs[i] = $90f323912e688b98$var$has(obj, i) ? inspect(obj[i], obj) : ""; 12613 } 12614 var symMap, syms = "function" == typeof $90f323912e688b98$var$gOPS ? $90f323912e688b98$var$gOPS(obj) : []; 12615 if ($90f323912e688b98$var$hasShammedSymbols) { 12616 symMap = {}; 12617 for(var k = 0; k < syms.length; k++)symMap["$" + syms[k]] = syms[k]; 12618 } 12619 for(var key in obj)$90f323912e688b98$var$has(obj, key) && (isArr && String(Number(key)) === key && key < obj.length || $90f323912e688b98$var$hasShammedSymbols && symMap["$" + key] instanceof Symbol || ($90f323912e688b98$var$$test.call(/[^\w$]/, key) ? xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj)) : xs.push(key + ": " + inspect(obj[key], obj)))); 12620 if ("function" == typeof $90f323912e688b98$var$gOPS) for(var j = 0; j < syms.length; j++)$90f323912e688b98$var$isEnumerable.call(obj, syms[j]) && xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj)); 12621 return xs; 12622} 12623var $90f323912e688b98$var$$WeakMap = $90f323912e688b98$var$getIntrinsic("%WeakMap%", !0), $90f323912e688b98$var$$Map = $90f323912e688b98$var$getIntrinsic("%Map%", !0), $90f323912e688b98$var$$weakMapGet = $90f323912e688b98$var$callBound("WeakMap.prototype.get", !0), $90f323912e688b98$var$$weakMapSet = $90f323912e688b98$var$callBound("WeakMap.prototype.set", !0), $90f323912e688b98$var$$weakMapHas = $90f323912e688b98$var$callBound("WeakMap.prototype.has", !0), $90f323912e688b98$var$$mapGet = $90f323912e688b98$var$callBound("Map.prototype.get", !0), $90f323912e688b98$var$$mapSet = $90f323912e688b98$var$callBound("Map.prototype.set", !0), $90f323912e688b98$var$$mapHas = $90f323912e688b98$var$callBound("Map.prototype.has", !0), $90f323912e688b98$var$listGetNode = function(list, key) { 12624 for(var curr, prev = list; null !== (curr = prev.next); prev = curr)if (curr.key === key) return prev.next = curr.next, curr.next = list.next, list.next = curr, curr; 12625}, $90f323912e688b98$var$sideChannel = function() { 12626 var $wm, $m, $o, channel = { 12627 assert: function(key) { 12628 if (!channel.has(key)) throw new $90f323912e688b98$var$type("Side channel does not contain " + $90f323912e688b98$var$objectInspect(key)); 12629 }, 12630 get: function(key) { 12631 if ($90f323912e688b98$var$$WeakMap && key && ("object" == typeof key || "function" == typeof key)) { 12632 if ($wm) return $90f323912e688b98$var$$weakMapGet($wm, key); 12633 } else if ($90f323912e688b98$var$$Map) { 12634 if ($m) return $90f323912e688b98$var$$mapGet($m, key); 12635 } else if ($o) return function(objects, key) { 12636 var node = $90f323912e688b98$var$listGetNode(objects, key); 12637 return node && node.value; 12638 }($o, key); 12639 }, 12640 has: function(key) { 12641 if ($90f323912e688b98$var$$WeakMap && key && ("object" == typeof key || "function" == typeof key)) { 12642 if ($wm) return $90f323912e688b98$var$$weakMapHas($wm, key); 12643 } else if ($90f323912e688b98$var$$Map) { 12644 if ($m) return $90f323912e688b98$var$$mapHas($m, key); 12645 } else if ($o) return function(objects, key) { 12646 return !!$90f323912e688b98$var$listGetNode(objects, key); 12647 }($o, key); 12648 return !1; 12649 }, 12650 set: function(key, value) { 12651 $90f323912e688b98$var$$WeakMap && key && ("object" == typeof key || "function" == typeof key) ? ($wm || ($wm = new $90f323912e688b98$var$$WeakMap), $90f323912e688b98$var$$weakMapSet($wm, key, value)) : $90f323912e688b98$var$$Map ? ($m || ($m = new $90f323912e688b98$var$$Map), $90f323912e688b98$var$$mapSet($m, key, value)) : ($o || ($o = { 12652 key: {}, 12653 next: null 12654 }), function(objects, key, value) { 12655 var node = $90f323912e688b98$var$listGetNode(objects, key); 12656 node ? node.value = value : objects.next = { 12657 key: key, 12658 next: objects.next, 12659 value: value 12660 }; 12661 }($o, key, value)); 12662 } 12663 }; 12664 return channel; 12665}, $90f323912e688b98$var$replace = String.prototype.replace, $90f323912e688b98$var$percentTwenties = /%20/g, $90f323912e688b98$var$Format_RFC3986 = "RFC3986", $90f323912e688b98$var$formats = { 12666 default: $90f323912e688b98$var$Format_RFC3986, 12667 formatters: { 12668 RFC1738: function(value) { 12669 return $90f323912e688b98$var$replace.call(value, $90f323912e688b98$var$percentTwenties, "+"); 12670 }, 12671 RFC3986: function(value) { 12672 return String(value); 12673 } 12674 }, 12675 RFC1738: "RFC1738", 12676 RFC3986: $90f323912e688b98$var$Format_RFC3986 12677}, $90f323912e688b98$var$has$1 = Object.prototype.hasOwnProperty, $90f323912e688b98$var$isArray$1 = Array.isArray, $90f323912e688b98$var$hexTable = function() { 12678 for(var array = [], i = 0; i < 256; ++i)array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()); 12679 return array; 12680}(), $90f323912e688b98$var$arrayToObject = function(source, options) { 12681 for(var obj = options && options.plainObjects ? Object.create(null) : {}, i = 0; i < source.length; ++i)void 0 !== source[i] && (obj[i] = source[i]); 12682 return obj; 12683}, $90f323912e688b98$var$utils = { 12684 arrayToObject: $90f323912e688b98$var$arrayToObject, 12685 assign: function(target, source) { 12686 return Object.keys(source).reduce(function(acc, key) { 12687 return acc[key] = source[key], acc; 12688 }, target); 12689 }, 12690 combine: function(a, b) { 12691 return [].concat(a, b); 12692 }, 12693 compact: function(value) { 12694 for(var queue = [ 12695 { 12696 obj: { 12697 o: value 12698 }, 12699 prop: "o" 12700 } 12701 ], refs = [], i = 0; i < queue.length; ++i)for(var item = queue[i], obj = item.obj[item.prop], keys = Object.keys(obj), j = 0; j < keys.length; ++j){ 12702 var key = keys[j], val = obj[key]; 12703 "object" == typeof val && null !== val && -1 === refs.indexOf(val) && (queue.push({ 12704 obj: obj, 12705 prop: key 12706 }), refs.push(val)); 12707 } 12708 return function(queue) { 12709 for(; queue.length > 1;){ 12710 var item = queue.pop(), obj = item.obj[item.prop]; 12711 if ($90f323912e688b98$var$isArray$1(obj)) { 12712 for(var compacted = [], j = 0; j < obj.length; ++j)void 0 !== obj[j] && compacted.push(obj[j]); 12713 item.obj[item.prop] = compacted; 12714 } 12715 } 12716 }(queue), value; 12717 }, 12718 decode: function(str, decoder, charset) { 12719 var strWithoutPlus = str.replace(/\+/g, " "); 12720 if ("iso-8859-1" === charset) return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); 12721 try { 12722 return decodeURIComponent(strWithoutPlus); 12723 } catch (e) { 12724 return strWithoutPlus; 12725 } 12726 }, 12727 encode: function(str, defaultEncoder, charset, kind, format) { 12728 if (0 === str.length) return str; 12729 var string = str; 12730 if ("symbol" == typeof str ? string = Symbol.prototype.toString.call(str)
12730: "string" != typeof str && (string = String(str)), "iso-8859-1" === charset) return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) { 12731 return "%26%23" + parseInt($0.slice(2), 16) + "%3B"; 12732 }); 12733 for(var out = "", j = 0; j < string.length; j += 1024){ 12734 for(var segment = string.length >= 1024 ? string.slice(j, j + 1024) : string, arr = [], i = 0; i < segment.length; ++i){ 12735 var c = segment.charCodeAt(i); 12736 45 === c || 46 === c || 95 === c || 126 === c || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === $90f323912e688b98$var$formats.RFC1738 && (40 === c || 41 === c) ? arr[arr.length] = segment.charAt(i) : c < 128 ? arr[arr.length] = $90f323912e688b98$var$hexTable[c] : c < 2048 ? arr[arr.length] = $90f323912e688b98$var$hexTable[192 | c >> 6] + $90f323912e688b98$var$hexTable[128 | 63 & c] : c < 55296 || c >= 57344 ? arr[arr.length] = $90f323912e688b98$var$hexTable[224 | c >> 12] + $90f323912e688b98$var$hexTable[128 | c >> 6 & 63] + $90f323912e688b98$var$hexTable[128 | 63 & c] : (i += 1, c = 65536 + ((1023 & c) << 10 | 1023 & segment.charCodeAt(i)), arr[arr.length] = $90f323912e688b98$var$hexTable[240 | c >> 18] + $90f323912e688b98$var$hexTable[128 | c >> 12 & 63] + $90f323912e688b98$var$hexTable[128 | c >> 6 & 63] + $90f323912e688b98$var$hexTable[128 | 63 & c]); 12737 } 12738 out += arr.join(""); 12739 } 12740 return out; 12741 }, 12742 isBuffer: function(obj) { 12743 return !(!obj || "object" != typeof obj) && !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); 12744 }, 12745 isRegExp: function(obj) { 12746 return "[object RegExp]" === Object.prototype.toString.call(obj); 12747 }, 12748 maybeMap: function(val, fn) { 12749 if ($90f323912e688b98$var$isArray$1(val)) { 12750 for(var mapped = [], i = 0; i < val.length; i += 1)mapped.push(fn(val[i])); 12751 return mapped; 12752 } 12753 return fn(val); 12754 }, 12755 merge: function merge(target, source, options) { 12756 if (!source) return target; 12757 if ("object" != typeof source) { 12758 if ($90f323912e688b98$var$isArray$1(target)) target.push(source); 12759 else { 12760 if (!target || "object" != typeof target) return [ 12761 target, 12762 source 12763 ]; 12764 (options && (options.plainObjects || options.allowPrototypes) || !$90f323912e688b98$var$has$1.call(Object.prototype, source)) && (target[source] = !0); 12765 } 12766 return target; 12767 } 12768 if (!target || "object" != typeof target) return [ 12769 target 12770 ].concat(source); 12771 var mergeTarget = target; 12772 return $90f323912e688b98$var$isArray$1(target) && !$90f323912e688b98$var$isArray$1(source) && (mergeTarget = $90f323912e688b98$var$arrayToObject(target, options)), $90f323912e688b98$var$isArray$1(target) && $90f323912e688b98$var$isArray$1(source) ? (source.forEach(function(item, i) { 12773 if ($90f323912e688b98$var$has$1.call(target, i)) { 12774 var targetItem = target[i]; 12775 targetItem && "object" == typeof targetItem && item && "object" == typeof item ? target[i] = merge(targetItem, item, options) : target.push(item); 12776 } else target[i] = item; 12777 }), target) : Object.keys(source).reduce(function(acc, key) { 12778 var value = source[key]; 12779 return $90f323912e688b98$var$has$1.call(acc, key) ? acc[key] = merge(acc[key], value, options) : acc[key] = value, acc; 12780 }, mergeTarget); 12781 } 12782}, $90f323912e688b98$var$has$2 = Object.prototype.hasOwnProperty, $90f323912e688b98$var$arrayPrefixGenerators = { 12783 brackets: function(prefix) { 12784 return prefix + "[]"; 12785 }, 12786 comma: "comma", 12787 indices: function(prefix, key) { 12788 return prefix + "[" + key + "]"; 12789 }, 12790 repeat: function(prefix) { 12791 return prefix; 12792 } 12793}, $90f323912e688b98$var$isArray$2 = Array.isArray, $90f323912e688b98$var$push = Array.prototype.push, $90f323912e688b98$var$pushToArray = function(arr, valueOrArray) { 12794 $90f323912e688b98$var$push.apply(arr, $90f323912e688b98$var$isArray$2(valueOrArray) ? valueOrArray : [ 12795 valueOrArray 12796 ]); 12797}, $90f323912e688b98$var$toISO = Date.prototype.toISOString, $90f323912e688b98$var$defaultFormat = $90f323912e688b98$var$formats.default, $90f323912e688b98$var$defaults = { 12798 addQueryPrefix: !1, 12799 allowDots: !1, 12800 allowEmptyArrays: !1, 12801 arrayFormat: "indices", 12802 charset: "utf-8", 12803 charsetSentinel: !1, 12804 delimiter: "&", 12805 encode: !0, 12806 encodeDotInKeys: !1, 12807 encoder: $90f323912e688b98$var$utils.encode, 12808 encodeValuesOnly: !1, 12809 format: $90f323912e688b98$var$defaultFormat, 12810 formatter: $90f323912e688b98$var$formats.formatters[$90f323912e688b98$var$defaultFormat], 12811 indices: !1, 12812 serializeDate: function(date) { 12813 return $90f323912e688b98$var$toISO.call(date); 12814 }, 12815 skipNulls: !1, 12816 strictNullHandling: !1 12817}, $90f323912e688b98$var$sentinel = {}, $90f323912e688b98$var$stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel$1) { 12818 for(var obj = object, tmpSc = sideChannel$1, step = 0, findFlag = !1; void 0 !== (tmpSc = tmpSc.get($90f323912e688b98$var$sentinel)) && !findFlag;){ 12819 var pos = tmpSc.get(object); 12820 if (step += 1, void 0 !== pos) { 12821 if (pos === step) throw new RangeError("Cyclic object value"); 12822 findFlag = !0; 12823 } 12824 void 0 === tmpSc.get($90f323912e688b98$var$sentinel) && (step = 0); 12825 } 12826 if ("function" == typeof filter ? obj = filter(prefix, obj) : obj instanceof Date ? obj = serializeDate(obj) : "comma" === generateArrayPrefix && $90f323912e688b98$var$isArray$2(obj) && (obj = $90f323912e688b98$var$utils.maybeMap(obj, function(value) { 12827 return value instanceof Date ? serializeDate(value) : value; 12828 })), null === obj) { 12829 if (strictNullHandling) return encoder && !encodeValuesOnly ? encoder(prefix, $90f323912e688b98$var$defaults.encoder, charset, "key", format) : prefix; 12830 obj = ""; 12831 } 12832 if (function(v) { 12833 return "string" == typeof v || "number" == typeof v || "boolean" == typeof v || "symbol" == typeof v || "bigint" == typeof v; 12834 }(obj) || $90f323912e688b98$var$utils.isBuffer(obj)) return encoder ? [ 12835 formatter(encodeValuesOnly ? prefix : encoder(prefix, $90f323912e688b98$var$defaults.encoder, charset, "key", format)) + "=" + formatter(encoder(obj, $90f323912e688b98$var$defaults.encoder, charset, "value", format)) 12836 ] : [ 12837 formatter(prefix) + "=" + formatter(String(obj)) 12838 ]; 12839 var objKeys, values = []; 12840 if (void 0 === obj) return values; 12841 if ("comma" === generateArrayPrefix && $90f323912e688b98$var$isArray$2(obj)) encodeValuesOnly && encoder && (obj = $90f323912e688b98$var$utils.maybeMap(obj, encoder)), objKeys = [ 12842 { 12843 value: obj.length > 0 ? obj.join(",") || null : void 0 12844 } 12845 ]; 12846 else if ($90f323912e688b98$var$isArray$2(filter)) objKeys = filter; 12847 else { 12848 var keys = Object.keys(obj); 12849 objKeys = sort ? keys.sort(sort) : keys; 12850 } 12851 var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, "%2E") : prefix, adjustedPrefix = commaRoundTrip && $90f323912e688b98$var$isArray$2(obj) && 1 === obj.length ? encodedPrefix + "[]" : encodedPrefix; 12852 if (allowEmptyArrays && $90f323912e688b98$var$isArray$2(obj) && 0 === obj.length) return adjustedPrefix + "[]"; 12853 for(var j = 0; j < objKeys.length; ++j){ 12854 var key = objKeys[j], value = "object" == typeof key && void 0 !== key.value ? key.value : obj[key]; 12855 if (!skipNulls || null !== value) { 12856 var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, "%2E") : key, keyPrefix = $90f323912e688b98$var$isArray$2(obj) ? "function" == typeof generateArrayPrefix ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]"); 12857 sideChannel$1.set(object, step); 12858 var valueSideChannel = $90f323912e688b98$var$sideChannel(); 12859 valueSideChannel.set($90f323912e688b98$var$sentinel, sideChannel$1), $90f323912e688b98$var$pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, "comma" === generateArrayPrefix && encodeValuesOnly && $90f323912e688b98$var$isArray$2(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel)); 12860 } 12861 } 12862 return values; 12863}, $90f323912e688b98$var$has$3 = Object.prototype.hasOwnProperty, $90f323912e688b98$var$isArray$3 = Array.isArray, $90f323912e688b98$var$defaults$1 = { 12864 allowDots: !1, 12865 allowEmptyArrays: !1, 12866 allowPrototypes: !1, 12867 allowSparse: !1, 12868 arrayLimit: 20, 12869 charset: "utf-8", 12870 charsetSentinel: !1, 12871 comma: !1, 12872 decodeDotInKeys: !1, 12873 decoder: $90f323912e688b98$var$utils.decode, 12874 delimiter: "&", 12875 depth: 5, 12876 duplicates: "combine", 12877 ignoreQueryPrefix: !1, 12878 interpretNumericEntities: !1, 12879 parameterLimit: 1e3, 12880 parseArrays: !0, 12881 plainObjects: !1, 12882 strictNullHandling: !1 12883}, $90f323912e688b98$var$interpretNumericEntities = function(str) { 12884 return str.replace(/&#(\d+);/g, function($0, numberStr) { 12885 return String.fromCharCode(parseInt(numberStr, 10)); 12886 }); 12887}, $90f323912e688b98$var$parseArrayValue = function(val, options) { 12888 return val && "string" == typeof val && options.comma && val.indexOf(",") > -1 ? val.split(",") : val; 12889}, $90f323912e688b98$var$parseKeys = function(givenKey, val, options, valuesParsed) { 12890 if (givenKey) { 12891 var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey, child = /(\[[^[\]]*])/g, segment = options.depth > 0 && /(\[[^[\]]*])/.exec(key), parent = segment ? key.slice(0, segment.index) : key, keys = []; 12892 if (parent) { 12893 if (!options.plainObjects && $90f323912e688b98$var$has$3.call(Object.prototype, parent) && !options.allowPrototypes) return; 12894 keys.push(parent); 12895 } 12896 for(var i = 0; options.depth > 0 && null !== (segment = child.exec(key)) && i < options.depth;){ 12897 if (i += 1, !options.plainObjects && $90f323912e688b98$var$has$3.call(Object.prototype, segment[1].slice(1, -1)) && !options.allowPrototypes) return; 12898 keys.push(segment[1]); 12899 }
vendor: 4,823 bytes, lines 12900-12945
12900 return segment && keys.push("[" + key.slice(segment.index) + "]"), function(chain, val, options, valuesParsed) { 12901 for(var leaf = valuesParsed ? val : $90f323912e688b98$var$parseArrayValue(val, options), i = chain.length - 1; i >= 0; --i){ 12902 var obj, root = chain[i]; 12903 if ("[]" === root && options.parseArrays) obj = options.allowEmptyArrays && "" === leaf ? [] : [].concat(leaf); 12904 else { 12905 obj = options.plainObjects ? Object.create(null) : {}; 12906 var cleanRoot = "[" === root.charAt(0) && "]" === root.charAt(root.length - 1) ? root.slice(1, -1) : root, decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot, index = parseInt(decodedRoot, 10); 12907 options.parseArrays || "" !== decodedRoot ? !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit ? (obj = [])[index] = leaf : "__proto__" !== decodedRoot && (obj[decodedRoot] = leaf) : obj = { 12908 0: leaf 12909 }; 12910 } 12911 leaf = obj; 12912 } 12913 return leaf; 12914 }(keys, val, options, valuesParsed); 12915 } 12916}, $90f323912e688b98$var$lib = { 12917 formats: $90f323912e688b98$var$formats, 12918 parse: function(str, opts) { 12919 var options = function(opts) { 12920 if (!opts) return $90f323912e688b98$var$defaults$1; 12921 if (void 0 !== opts.allowEmptyArrays && "boolean" != typeof opts.allowEmptyArrays) throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); 12922 if (void 0 !== opts.decodeDotInKeys && "boolean" != typeof opts.decodeDotInKeys) throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided"); 12923 if (null !== opts.decoder && void 0 !== opts.decoder && "function" != typeof opts.decoder) throw new TypeError("Decoder has to be a function."); 12924 if (void 0 !== opts.charset && "utf-8" !== opts.charset && "iso-8859-1" !== opts.charset) throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); 12925 var charset = void 0 === opts.charset ? $90f323912e688b98$var$defaults$1.charset : opts.charset, duplicates = void 0 === opts.duplicates ? $90f323912e688b98$var$defaults$1.duplicates : opts.duplicates; 12926 if ("combine" !== duplicates && "first" !== duplicates && "last" !== duplicates) throw new TypeError("The duplicates option must be either combine, first, or last"); 12927 return { 12928 allowDots: void 0 === opts.allowDots ? !0 === opts.decodeDotInKeys || $90f323912e688b98$var$defaults$1.allowDots : !!opts.allowDots, 12929 allowEmptyArrays: "boolean" == typeof opts.allowEmptyArrays ? !!opts.allowEmptyArrays : $90f323912e688b98$var$defaults$1.allowEmptyArrays, 12930 allowPrototypes: "boolean" == typeof opts.allowPrototypes ? opts.allowPrototypes : $90f323912e688b98$var$defaults$1.allowPrototypes, 12931 allowSparse: "boolean" == typeof opts.allowSparse ? opts.allowSparse : $90f323912e688b98$var$defaults$1.allowSparse, 12932 arrayLimit: "number" == typeof opts.arrayLimit ? opts.arrayLimit : $90f323912e688b98$var$defaults$1.arrayLimit, 12933 charset: charset, 12934 charsetSentinel: "boolean" == typeof opts.charsetSentinel ? opts.charsetSentinel : $90f323912e688b98$var$defaults$1.charsetSentinel, 12935 comma: "boolean" == typeof opts.comma ? opts.comma : $90f323912e688b98$var$defaults$1.comma, 12936 decodeDotInKeys: "boolean" == typeof opts.decodeDotInKeys ? opts.decodeDotInKeys : $90f323912e688b98$var$defaults$1.decodeDotInKeys, 12937 decoder: "function" == typeof opts.decoder ? opts.decoder : $90f323912e688b98$var$defaults$1.decoder, 12938 delimiter: "string" == typeof opts.delimiter || $90f323912e688b98$var$utils.isRegExp(opts.delimiter) ? opts.delimiter : $90f323912e688b98$var$defaults$1.delimiter, 12939 depth: "number" == typeof opts.depth || !1 === opts.depth ? +opts.depth : $90f323912e688b98$var$defaults$1.depth, 12940 duplicates: duplicates, 12941 ignoreQueryPrefix: !0 === opts.ignoreQueryPrefix, 12942 interpretNumericEntities: "boolean" == typeof opts.interpretNumericEntities ? opts.interpretNumericEntities : $90f323912e688b98$var$defaults$1.interpretNumericEntities, 12943 parameterLimit: "number" == typeof opts.parameterLimit ? opts.parameterLimit : $90f323912e688b98$var$defaults$1.parameterLimit, 12944 parseArrays: !1 !== opts.parseArrays, 12945 plainObjects: "boolean" == typeof opts.plainObjects ? opts.plainObjects : $90f323912e688b98$var$defaults$1.plainObjects,
12946 strictNullHandling: "boolean" == typeof opts.strictNullHandling ? opts.strictNullHandling : $90f323912e688b98$var$defaults$1.strictNullHandling 12947 }; 12948 }(opts); 12949 if ("" === str || null == str) return options.plainObjects ? Object.create(null) : {}; 12950 for(var tempObj = "string" == typeof str ? function(str, options) { 12951 var i, obj = { 12952 __proto__: null 12953 }, cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str, limit = options.parameterLimit === 1 / 0 ? void 0 : options.parameterLimit, parts = cleanStr.split(options.delimiter, limit), skipIndex = -1, charset = options.charset; 12954 if (options.charsetSentinel) for(i = 0; i < parts.length; ++i)0 === parts[i].indexOf("utf8=") && ("utf8=%E2%9C%93" === parts[i] ? charset = "utf-8" : "utf8=%26%2310003%3B" === parts[i] && (charset = "iso-8859-1"), skipIndex = i, i = parts.length); 12955 for(i = 0; i < parts.length; ++i)if (i !== skipIndex) { 12956 var key, val, part = parts[i], bracketEqualsPos = part.indexOf("]="), pos = -1 === bracketEqualsPos ? part.indexOf("=") : bracketEqualsPos + 1; 12957 -1 === pos ? (key = options.decoder(part, $90f323912e688b98$var$defaults$1.decoder, charset, "key"), val = options.strictNullHandling ? null : "") : (key = options.decoder(part.slice(0, pos), $90f323912e688b98$var$defaults$1.decoder, charset, "key"), val = $90f323912e688b98$var$utils.maybeMap($90f323912e688b98$var$parseArrayValue(part.slice(pos + 1), options), function(encodedVal) { 12958 return options.decoder(encodedVal, $90f323912e688b98$var$defaults$1.decoder, charset, "value"); 12959 })), val && options.interpretNumericEntities && "iso-8859-1" === charset && (val = $90f323912e688b98$var$interpretNumericEntities(val)), part.indexOf("[]=") > -1 && (val = $90f323912e688b98$var$isArray$3(val) ? [ 12960 val 12961 ] : val); 12962 var existing = $90f323912e688b98$var$has$3.call(obj, key); 12963 existing && "combine" === options.duplicates ? obj[key] = $90f323912e688b98$var$utils.combine(obj[key], val) : existing && "last" !== options.duplicates || (obj[key] = val); 12964 } 12965 return obj; 12966 }(str, options) : str, obj = options.plainObjects ? Object.create(null) : {}, keys = Object.keys(tempObj), i = 0; i < keys.length; ++i){ 12967 var key = keys[i], newObj = $90f323912e688b98$var$parseKeys(key, tempObj[key], options, "string" == typeof str); 12968 obj = $90f323912e688b98$var$utils.merge(obj, newObj, options); 12969 } 12970 return !0 === options.allowSparse ? obj : $90f323912e688b98$var$utils.compact(obj); 12971 }, 12972 stringify: function(object, opts) { 12973 var objKeys, obj = object, options = function(opts) { 12974 if (!opts) return $90f323912e688b98$var$defaults; 12975 if (void 0 !== opts.allowEmptyArrays && "boolean" != typeof opts.allowEmptyArrays) throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); 12976 if (void 0 !== opts.encodeDotInKeys && "boolean" != typeof opts.encodeDotInKeys) throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided"); 12977 if (null !== opts.encoder && void 0 !== opts.encoder && "function" != typeof opts.encoder) throw new TypeError("Encoder has to be a function."); 12978 var charset = opts.charset || $90f323912e688b98$var$defaults.charset; 12979 if (void 0 !== opts.charset && "utf-8" !== opts.charset && "iso-8859-1" !== opts.charset) throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); 12980 var format = $90f323912e688b98$var$formats.default; 12981 if (void 0 !== opts.format) { 12982 if (!$90f323912e688b98$var$has$2.call($90f323912e688b98$var$formats.formatters, opts.format)) throw new TypeError("Unknown format option provided."); 12983 format = opts.format; 12984 } 12985 var arrayFormat, formatter = $90f323912e688b98$var$formats.formatters[format], filter = $90f323912e688b98$var$defaults.filter; 12986 if (("function" == typeof opts.filter || $90f323912e688b98$var$isArray$2(opts.filter)) && (filter = opts.filter), arrayFormat = opts.arrayFormat in $90f323912e688b98$var$arrayPrefixGenerators ? opts.arrayFormat : "indices" in o
12986pts ? opts.indices ? "indices" : "repeat" : $90f323912e688b98$var$defaults.arrayFormat, "commaRoundTrip" in opts && "boolean" != typeof opts.commaRoundTrip) throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); 12987 var allowDots = void 0 === opts.allowDots ? !0 === opts.encodeDotInKeys || $90f323912e688b98$var$defaults.allowDots : !!opts.allowDots; 12988 return { 12989 addQueryPrefix: "boolean" == typeof opts.addQueryPrefix ? opts.addQueryPrefix : $90f323912e688b98$var$defaults.addQueryPrefix, 12990 allowDots: allowDots, 12991 allowEmptyArrays: "boolean" == typeof opts.allowEmptyArrays ? !!opts.allowEmptyArrays : $90f323912e688b98$var$defaults.allowEmptyArrays, 12992 arrayFormat: arrayFormat, 12993 charset: charset, 12994 charsetSentinel: "boolean" == typeof opts.charsetSentinel ? opts.charsetSentinel : $90f323912e688b98$var$defaults.charsetSentinel, 12995 commaRoundTrip: opts.commaRoundTrip, 12996 delimiter: void 0 === opts.delimiter ? $90f323912e688b98$var$defaults.delimiter : opts.delimiter, 12997 encode: "boolean" == typeof opts.encode ? opts.encode : $90f323912e688b98$var$defaults.encode, 12998 encodeDotInKeys: "boolean" == typeof opts.encodeDotInKeys ? opts.encodeDotInKeys : $90f323912e688b98$var$defaults.encodeDotInKeys, 12999 encoder: "function" == typeof opts.encoder ? opts.encoder : $90f323912e688b98$var$defaults.encoder, 13000 encodeValuesOnly: "boolean" == typeof opts.encodeValuesOnly ? opts.encodeValuesOnly : $90f323912e688b98$var$defaults.encodeValuesOnly, 13001 filter: filter, 13002 format: format, 13003 formatter: formatter, 13004 serializeDate: "function" == typeof opts.serializeDate ? opts.serializeDate : $90f323912e688b98$var$defaults.serializeDate, 13005 skipNulls: "boolean" == typeof opts.skipNulls ? opts.skipNulls : $90f323912e688b98$var$defaults.skipNulls, 13006 sort: "function" == typeof opts.sort ? opts.sort : null, 13007 strictNullHandling: "boolean" == typeof opts.strictNullHandling ? opts.strictNullHandling : $90f323912e688b98$var$defaults.strictNullHandling 13008 }; 13009 }(opts); 13010 "function" == typeof options.filter ? obj = (0, options.filter)("", obj) : $90f323912e688b98$var$isArray$2(options.filter) && (objKeys = options.filter); 13011 var keys = []; 13012 if ("object" != typeof obj || null === obj) return ""; 13013 var generateArrayPrefix = $90f323912e688b98$var$arrayPrefixGenerators[options.arrayFormat], commaRoundTrip = "comma" === generateArrayPrefix && options.commaRoundTrip; 13014 objKeys || (objKeys = Object.keys(obj)), options.sort && objKeys.sort(options.sort); 13015 for(var sideChannel$1 = $90f323912e688b98$var$sideChannel(), i = 0; i < objKeys.length; ++i){ 13016 var key = objKeys[i]; 13017 options.skipNulls && null === obj[key] || $90f323912e688b98$var$pushToArray(keys, $90f323912e688b98$var$stringify(obj[key], key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel$1)); 13018 } 13019 var joined = keys.join(options.delimiter), prefix = !0 === options.addQueryPrefix ? "?" : ""; 13020 return options.charsetSentinel && ("iso-8859-1" === options.charset ? prefix += "utf8=%26%2310003%3B&" : prefix += "utf8=%E2%9C%93&"), joined.length > 0 ? prefix + joined : ""; 13021 } 13022}, $90f323912e688b98$var$componentEmitter = $90f323912e688b98$var$createCommonjsModule(function(module) { 13023 function Emitter(obj) { 13024 if (obj) return function(obj) { 13025 for(var key in Emitter.prototype)obj[key] = Emitter.prototype[key]; 13026 return obj; 13027 }(obj); 13028 } 13029 module.exports = Emitter, Emitter.prototype.on = Emitter.prototype.addEventListener = function(event, fn) { 13030 return this._callbacks = this._callbacks || {}, (this._callbacks["$" + event] = this._callbacks["$" + event] || []).push(fn), this; 13031 }, Emitter.prototype.once = function(event, fn) { 13032 function on() { 13033 this.off(event, on), fn.apply(this, arguments); 13034 } 13035 return on.fn = fn, this.on(event, on), this; 13036 }, Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function(event, fn) { 13037 if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this; 13038 var cb, callbacks = this._callbacks["$" + event]; 13039 if (!callbacks) return this; 13040 if (1 == arguments.length) return delete this._callbacks["$" + event], this; 13041 for(var i = 0; i < callbacks.length;
13041 i++)if ((cb = callbacks[i]) === fn || cb.fn === fn) { 13042 callbacks.splice(i, 1); 13043 break; 13044 } 13045 return 0 === callbacks.length && delete this._callbacks["$" + event], this; 13046 }, Emitter.prototype.emit = function(event) { 13047 this._callbacks = this._callbacks || {}; 13048 for(var args = new Array(arguments.length - 1), callbacks = this._callbacks["$" + event], i = 1; i < arguments.length; i++)args[i - 1] = arguments[i]; 13049 if (callbacks) { 13050 i = 0; 13051 for(var len = (callbacks = callbacks.slice(0)).length; i < len; ++i)callbacks[i].apply(this, args); 13052 } 13053 return this; 13054 }, Emitter.prototype.listeners = function(event) { 13055 return this._callbacks = this._callbacks || {}, this._callbacks["$" + event] || []; 13056 }, Emitter.prototype.hasListeners = function(event) { 13057 return !!this.listeners(event).length; 13058 }; 13059}), $90f323912e688b98$var$fastSafeStringify = $90f323912e688b98$var$stringify$1; 13060$90f323912e688b98$var$stringify$1.default = $90f323912e688b98$var$stringify$1, $90f323912e688b98$var$stringify$1.stable = $90f323912e688b98$var$deterministicStringify, $90f323912e688b98$var$stringify$1.stableStringify = $90f323912e688b98$var$deterministicStringify; 13061var $90f323912e688b98$var$arr = [], $90f323912e688b98$var$replacerStack = []; 13062function $90f323912e688b98$var$defaultOptions() { 13063 return { 13064 depthLimit: Number.MAX_SAFE_INTEGER, 13065 edgesLimit: Number.MAX_SAFE_INTEGER 13066 }; 13067} 13068function $90f323912e688b98$var$stringify$1(obj, replacer, spacer, options) { 13069 var res; 13070 void 0 === options && (options = $90f323912e688b98$var$defaultOptions()), function decirc(val, k, edgeIndex, stack, parent, depth, options) { 13071 var i; 13072 if (depth += 1, "object" == typeof val && null !== val) { 13073 for(i = 0; i < stack.length; i++)if (stack[i] === val) return void $90f323912e688b98$var$setReplace("[Circular]", val, k, parent); 13074 if (void 0 !== options.depthLimit && depth > options.depthLimit) return void $90f323912e688b98$var$setReplace("[...]", val, k, parent); 13075 if (void 0 !== options.edgesLimit && edgeIndex + 1 > options.edgesLimit) return void $90f323912e688b98$var$setReplace("[...]", val, k, parent); 13076 if (stack.push(val), Array.isArray(val)) for(i = 0; i < val.length; i++)decirc(val[i], i, i, stack, val, depth, options); 13077 else { 13078 var keys = Object.keys(val); 13079 for(i = 0; i < keys.length; i++){ 13080 var key = keys[i]; 13081 decirc(val[key], key, i, stack, val, depth, options); 13082 } 13083 } 13084 stack.pop(); 13085 } 13086 }(obj, "", 0, [], void 0, 0, options); 13087 try { 13088 res = 0 === $90f323912e688b98$var$replacerStack.length ? JSON.stringify(obj, replacer, spacer) : JSON.stringify(obj, $90f323912e688b98$var$replaceGetterValues(replacer), spacer); 13089 } catch (_) { 13090 return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); 13091 } finally{ 13092 for(; 0 !== $90f323912e688b98$var$arr.length;){ 13093 var part = $90f323912e688b98$var$arr.pop(); 13094 4 === part.length ? Object.defineProperty(part[0], part[1], part[3]) : part[0][part[1]] = part[2]; 13095 } 13096 } 13097 return res; 13098} 13099function $90f323912e688b98$var$setReplace(replace, val, k, parent) { 13100 var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k); 13101 void 0 !== propertyDescriptor.get ? propertyDescriptor.configurable ? (Object.defineProperty(parent, k, { 13102 value: replace 13103 }), $90f323912e688b98$var$arr.push([ 13104 parent, 13105 k, 13106 val, 13107 propertyDescriptor 13108 ])) : $90f323912e688b98$var$replacerStack.push([ 13109 val, 13110 k, 13111 replace 13112 ]) : (parent[k] = replace, $90f323912e688b98$var$arr.push([ 13113 parent, 13114 k, 13115 val 13116 ])); 13117} 13118function $90f323912e688b98$var$compareFunction(a, b) { 13119 return a < b ? -1 : a > b ? 1 : 0; 13120} 13121function $90f323912e688b98$var$deterministicStringify(obj, replacer, spacer, options) { 13122 void 0 === options && (options = $90f323912e688b98$var$defaultOptions()); 13123 var res, tmp = function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) { 13124 var i; 13125 if (depth += 1, "object" == typeof val && null !== val) { 13126 for(i = 0; i < stack.length; i++)if (stack[i] === val) return void $90f323912e688b98$var$setReplace("[Circular]", val, k, parent); 13127 try { 13128 if ("function" == typeof val.toJSON) return; 13129 } catch (_) { 13130 return; 13131 } 13132 if (void 0 !== options.depthLimit && depth > options.depthLimit) return void $90f323912e688b98$var$setReplace("[...]", val, k, parent); 13133 if (void 0 !== options.edgesLimit && edgeIndex + 1 > options.edgesLimit) return void $90f323912e688b98$var$setReplace("[...]", val, k, parent); 13134 if (stack.push(val), Array.isArray(val)) for(i = 0; i < val.length;
13134 i++)deterministicDecirc(val[i], i, i, stack, val, depth, options); 13135 else { 13136 var tmp = {}, keys = Object.keys(val).sort($90f323912e688b98$var$compareFunction); 13137 for(i = 0; i < keys.length; i++){ 13138 var key = keys[i]; 13139 deterministicDecirc(val[key], key, i, stack, val, depth, options), tmp[key] = val[key]; 13140 } 13141 if (void 0 === parent) return tmp; 13142 $90f323912e688b98$var$arr.push([ 13143 parent, 13144 k, 13145 val 13146 ]), parent[k] = tmp; 13147 } 13148 stack.pop(); 13149 } 13150 }(obj, "", 0, [], void 0, 0, options) || obj; 13151 try { 13152 res = 0 === $90f323912e688b98$var$replacerStack.length ? JSON.stringify(tmp, replacer, spacer) : JSON.stringify(tmp, $90f323912e688b98$var$replaceGetterValues(replacer), spacer); 13153 } catch (_) { 13154 return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); 13155 } finally{ 13156 for(; 0 !== $90f323912e688b98$var$arr.length;){ 13157 var part = $90f323912e688b98$var$arr.pop(); 13158 4 === part.length ? Object.defineProperty(part[0], part[1], part[3]) : part[0][part[1]] = part[2]; 13159 } 13160 } 13161 return res; 13162} 13163function $90f323912e688b98$var$replaceGetterValues(replacer) { 13164 return replacer = void 0 !== replacer ? replacer : function(k, v) { 13165 return v; 13166 }, function(key, val) { 13167 if ($90f323912e688b98$var$replacerStack.length > 0) for(var i = 0; i < $90f323912e688b98$var$replacerStack.length; i++){ 13168 var part = $90f323912e688b98$var$replacerStack[i]; 13169 if (part[1] === key && part[0] === val) { 13170 val = part[2], $90f323912e688b98$var$replacerStack.splice(i, 1); 13171 break; 13172 } 13173 } 13174 return replacer.call(this, key, val); 13175 }; 13176} 13177var $90f323912e688b98$var$utils$1 = $90f323912e688b98$var$createCommonjsModule(function(module, exports) { 13178 function _typeof(obj) { 13179 return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { 13180 return typeof obj; 13181 } : function(obj) { 13182 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 13183 })(obj); 13184 } 13185 function _createForOfIteratorHelper(o, allowArrayLike) { 13186 var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"]; 13187 if (!it) { 13188 if (Array.isArray(o) || (it = function(o, minLen) { 13189 if (!o) return; 13190 if ("string" == typeof o) return _arrayLikeToArray(o, minLen); 13191 var n = Object.prototype.toString.call(o).slice(8, -1); 13192 "Object" === n && o.constructor && (n = o.constructor.name); 13193 if ("Map" === n || "Set" === n) return Array.from(o); 13194 if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); 13195 }(o)) || allowArrayLike && o && "number" == typeof o.length) { 13196 it && (o = it); 13197 var i = 0, F = function() {}; 13198 return { 13199 s: F, 13200 n: function() { 13201 return i >= o.length ? { 13202 done: !0 13203 } : { 13204 done: !1, 13205 value: o[i++] 13206 }; 13207 }, 13208 e: function(_e) { 13209 throw _e; 13210 }, 13211 f: F 13212 }; 13213 } 13214 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 13215 } 13216 var err, normalCompletion = !0, didErr = !1; 13217 return { 13218 s: function() { 13219 it = it.call(o); 13220 }, 13221 n: function() { 13222 var step = it.next(); 13223 return normalCompletion = step.done, step; 13224 }, 13225 e: function(_e2) { 13226 didErr = !0, err = _e2; 13227 }, 13228 f: function() { 13229 try { 13230 normalCompletion || null == it.return || it.return(); 13231 } finally{ 13232 if (didErr) throw err; 13233 } 13234 } 13235 }; 13236 } 13237 function _arrayLikeToArray(arr, len) { 13238 (null == len || len > arr.length) && (len = arr.length); 13239 for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; 13240 return arr2; 13241 } 13242 exports.type = function(string_) { 13243 return string_.split(/ *; */).shift(); 13244 }, exports.params = function(value) { 13245 var _step, object = {}, _iterator = _createForOfIteratorHelper(value.split(/ *; */)); 13246 try { 13247 for(_iterator.s();
13247 !(_step = _iterator.n()).done;){ 13248 var parts = _step.value.split(/ *= */), key = parts.shift(), _value = parts.shift(); 13249 key && _value && (object[key] = _value); 13250 } 13251 } catch (err) { 13252 _iterator.e(err); 13253 } finally{ 13254 _iterator.f(); 13255 } 13256 return object; 13257 }, exports.parseLinks = function(value) { 13258 var _step2, object = {}, _iterator2 = _createForOfIteratorHelper(value.split(/ *, */)); 13259 try { 13260 for(_iterator2.s(); !(_step2 = _iterator2.n()).done;){ 13261 var parts = _step2.value.split(/ *; */), url = parts[0].slice(1, -1); 13262 object[parts[1].split(/ *= */)[1].slice(1, -1)] = url; 13263 } 13264 } catch (err) { 13265 _iterator2.e(err); 13266 } finally{ 13267 _iterator2.f(); 13268 } 13269 return object; 13270 }, exports.cleanHeader = function(header, changesOrigin) { 13271 return delete header["content-type"], delete header["content-length"], delete header["transfer-encoding"], delete header.host, changesOrigin && (delete header.authorization, delete header.cookie), header; 13272 }, exports.isObject = function(object) { 13273 return null !== object && "object" === _typeof(object); 13274 }, exports.hasOwn = Object.hasOwn || function(object, property) { 13275 if (null == object) throw new TypeError("Cannot convert undefined or null to object"); 13276 return Object.prototype.hasOwnProperty.call(new Object(object), property); 13277 }, exports.mixin = function(target, source) { 13278 for(var key in source)exports.hasOwn(source, key) && (target[key] = source[key]); 13279 }; 13280}); 13281$90f323912e688b98$var$utils$1.type, $90f323912e688b98$var$utils$1.params, $90f323912e688b98$var$utils$1.parseLinks, $90f323912e688b98$var$utils$1.cleanHeader, $90f323912e688b98$var$utils$1.isObject, $90f323912e688b98$var$utils$1.hasOwn, $90f323912e688b98$var$utils$1.mixin; 13282function $90f323912e688b98$var$_typeof(obj) { 13283 return ($90f323912e688b98$var$_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { 13284 return typeof obj; 13285 } : function(obj) { 13286 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 13287 })(obj); 13288} 13289var $90f323912e688b98$var$isObject = $90f323912e688b98$var$utils$1.isObject, $90f323912e688b98$var$hasOwn$1 = $90f323912e688b98$var$utils$1.hasOwn, $90f323912e688b98$var$requestBase = $90f323912e688b98$var$RequestBase; 13290function $90f323912e688b98$var$RequestBase() {} 13291$90f323912e688b98$var$RequestBase.prototype.clearTimeout = function() { 13292 return clearTimeout(this._timer), clearTimeout(this._responseTimeoutTimer), clearTimeout(this._uploadTimeoutTimer), delete this._timer, delete this._responseTimeoutTimer, delete this._uploadTimeoutTimer, this; 13293}, $90f323912e688b98$var$RequestBase.prototype.parse = function(fn) { 13294 return this._parser = fn, this; 13295}, $90f323912e688b98$var$RequestBase.prototype.responseType = function(value) { 13296 return this._responseType = value, this; 13297}, $90f323912e688b98$var$RequestBase.prototype.serialize = function(fn) { 13298 return this._serializer = fn, this; 13299}, $90f323912e688b98$var$RequestBase.prototype.timeout = function(options) { 13300 if (!options || "object" !== $90f323912e688b98$var$_typeof(options)) return this._timeout = options, this._responseTimeout = 0, this._uploadTimeout = 0, this; 13301 for(var option in options)if ($90f323912e688b98$var$hasOwn$1(options, option)) switch(option){ 13302 case "deadline": 13303 this._timeout = options.deadline; 13304 break; 13305 case "response": 13306 this._responseTimeout = options.response; 13307 break; 13308 case "upload": 13309 this._uploadTimeout = options.upload; 13310 break; 13311 default: 13312 console.warn("Unknown timeout option", option); 13313 } 13314 return this; 13315}, $90f323912e688b98$var$RequestBase.prototype.retry = function(count, fn) { 13316 return 0 !== arguments.length && !0 !== count || (count = 1), count <= 0 && (count = 0), this._maxRetries = count, this._retries = 0, this._retryCallback = fn, this; 13317}; 13318var $90f323912e688b98$var$ERROR_CODES = new Set([ 13319 "ETIMEDOUT", 13320 "ECONNRESET", 13321 "EADDRINUSE", 13322 "ECONNREFUSED", 13323 "EPIPE", 13324 "ENOTFOUND", 13325 "ENETUNREACH", 13326 "EAI_AGAIN" 13327]), $90f323912e688b98$var$STATUS_CODES = new Set([ 13328 408, 13329 413, 13330 429, 13331 500, 13332 502, 13333 503, 13334 504, 13335 521, 13336 522, 13337 524 13338]); 13339$90f323912e688b98$var$RequestBase.prototype._shouldRetry = function(error, res) { 13340 if (!this._maxRetries || this._retries++ >= this._maxRetries) return !1; 13341 if (this._retryCallback) try { 13342 var override = this._retryCallback(error, res); 13343 if (!0 === override) return !0; 13344 if (!1 === override) return !1; 13345 } catch (err) { 13346 console.error(err); 13347 } 13348 if (res && res.status && $90f323912e688b98$var$STATUS_CODES.has(res.status)) return !0; 13349 if (error) { 13350 if (error.code && $90f323912e688b98$var$ERROR_CODES.has(error.code)) return !0; 13351 if (error.timeout && "ECONNABORTED" === error.code) return !0; 13352 if (error.crossDomain) return !0; 13353 } 13354 return !1; 13355}, $90f323912e688b98$var$RequestBase.prototype._retry = function() { 13356 return this.clearTimeout(), this.req && (this.req = null, this.req = this.request()), this._aborted = !1, this.timedout = !1, this.timedoutError = null, this._end(); 13357}, $90f323912e688b98$var$RequestBase.prototype.then = function(resolve, reject) { 13358 var _this = this; 13359 if (!this._fullfilledPromise) { 13360 var self1 = this; 13361 this._endCalled && console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"), this._fullfilledPromise = new Promise(function(resolve, reject) { 13362 self1.on("abort", function() { 13363 if (!(_this._maxRetries && _this._maxRetries > _this._retries)) { 13364 if (_this.timedout && _this.timedoutError) reject(_this.timedoutError); 13365 else { 13366 var error = new Error("Aborted"); 13367 error.code = "ABORTED", error.status = _this.status, error.method = _this.method, error.url = _this.url, reject(error); 13368 } 13369 } 13370 }), self1.end(function(error, res) { 13371 error ? reject(error) : resolve(res); 13372 }); 13373 }); 13374 } 13375 return this._fullfilledPromise.then(resolve, reject); 13376}, $90f323912e688b98$var$RequestBase.prototype.catch = function(callback) { 13377 return this.then(void 0, callback); 13378}, $90f323912e688b98$var$RequestBase.prototype.use = function(fn) { 13379 return fn(this), this; 13380}, $90f323912e688b98$var$RequestBase.prototype.ok = function(callback) { 13381 if ("function" != typeof callback) throw new Error("Callback required"); 13382 return this._okCallback = callback, this; 13383}, $90f323912e688b98$var$RequestBase.prototype._isResponseOK = function(res) { 13384 return !!res && (this._okCallback ? this._okCallback(res) : res.status >= 200 && res.status < 300); 13385}, $90f323912e688b98$var$RequestBase.prototype.get = function(field) { 13386 return this._header[field.toLowerCase()]; 13387}, $90f323912e688b98$var$RequestBase.prototype.getHeader = $90f323912e688b98$var$RequestBase.prototype.get, $90f323912e688b98$var$RequestBase.prototype.set = function(field, value) { 13388 if ($90f323912e688b98$var$isObject(field)) { 13389 for(var key in field)$90f323912e688b98$var$hasOwn$1(field, key) && this.set(key, field[key]); 13390 return this; 13391 } 13392 return this._header[field.toLowerCase()] = value, this.header[field] = value, this; 13393}, $90f323912e688b98$var$RequestBase.prototype.unset = function(field) { 13394 return delete this._header[field.toLowerCase()], delete this.header[field], this; 13395}, $90f323912e688b98$var$RequestBase.prototype.field = function(name, value, options) { 13396 if (null == name) throw new Error(".field(name, val) name can not be empty"); 13397 if (this._data) throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"); 13398 if ($90f323912e688b98$var$isObject(name)) { 13399 for(var key in name)$90f323912e688b98$var$hasOwn$1(name, key) && this.field(key, name[key]); 13400 return this; 13401 } 13402 if (Array.isArray(value)) { 13403 for(var i in value)$90f323912e688b98$var$hasOwn$1(value, i) && this.field(name, value[i]); 13404 return this; 13405 } 13406 if (null == value) throw new Error(".field(name, val) val can not be empty"); 13407 return "boolean" == typeof value && (value = String(value)), options ? this._getFormData().append(name, value, options) : this._getFormData().append(name, value), this; 13408}, $90f323912e688b98$var$RequestBase.prototype.abort = function() { 13409 if (this._aborted) return this; 13410 if (this._aborted = !0, this.xhr && this.xhr.abort(), this.req) { 13411 if ($90f323912e688b98$var$semver.gte($5957ddbc692cbfa8$exports.version, "v13.0.0") && $90f323912e688b98$var$semver.lt($5957ddbc692cbfa8$exports.version, "v14.0.0")) throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes"); 13412 $90f323912e688b98$var$semver.gte($5957ddbc692cbfa8$exports.version, "v14.0.0") && (this.req.destroyed = !0), this.req.abort(); 13413 }
13414 return this.clearTimeout(), this.emit("abort"), this; 13415}, $90f323912e688b98$var$RequestBase.prototype._auth = function(user, pass, options, base64Encoder) { 13416 switch(options.type){ 13417 case "basic": 13418 this.set("Authorization", "Basic ".concat(base64Encoder("".concat(user, ":").concat(pass)))); 13419 break; 13420 case "auto": 13421 this.username = user, this.password = pass; 13422 break; 13423 case "bearer": 13424 this.set("Authorization", "Bearer ".concat(user)); 13425 } 13426 return this; 13427}, $90f323912e688b98$var$RequestBase.prototype.withCredentials = function(on) { 13428 return void 0 === on && (on = !0), this._withCredentials = on, this; 13429}, $90f323912e688b98$var$RequestBase.prototype.redirects = function(n) { 13430 return this._maxRedirects = n, this; 13431}, $90f323912e688b98$var$RequestBase.prototype.maxResponseSize = function(n) { 13432 if ("number" != typeof n) throw new TypeError("Invalid argument"); 13433 return this._maxResponseSize = n, this; 13434}, $90f323912e688b98$var$RequestBase.prototype.toJSON = function() { 13435 return { 13436 method: this.method, 13437 url: this.url, 13438 data: this._data, 13439 headers: this._header 13440 }; 13441}, $90f323912e688b98$var$RequestBase.prototype.send = function(data) { 13442 var isObject_ = $90f323912e688b98$var$isObject(data), type = this._header["content-type"]; 13443 if (this._formData) throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"); 13444 if (isObject_ && !this._data) Array.isArray(data) ? this._data = [] : this._isHost(data) || (this._data = {}); 13445 else if (data && this._data && this._isHost(this._data)) throw new Error("Can't merge these send calls"); 13446 if (isObject_ && $90f323912e688b98$var$isObject(this._data)) for(var key in data)$90f323912e688b98$var$hasOwn$1(data, key) && (this._data[key] = data[key]); 13447 else "string" == typeof data ? (type || this.type("form"), (type = this._header["content-type"]) && (type = type.toLowerCase().trim()), this._data = "application/x-www-form-urlencoded" === type ? this._data ? "".concat(this._data, "&").concat(data) : data : (this._data || "") + data) : this._data = data; 13448 return !isObject_ || this._isHost(data) || type || this.type("json"), this; 13449}, $90f323912e688b98$var$RequestBase.prototype.sortQuery = function(sort) { 13450 return this._sort = void 0 === sort || sort, this; 13451}, $90f323912e688b98$var$RequestBase.prototype._finalizeQueryString = function() { 13452 var query = this._query.join("&"); 13453 if (query && (this.url += (this.url.includes("?") ? "&" : "?") + query), this._query.length = 0, this._sort) { 13454 var index = this.url.indexOf("?"); 13455 if (index >= 0) { 13456 var queryArray = this.url.slice(index + 1).split("&"); 13457 "function" == typeof this._sort ? queryArray.sort(this._sort) : queryArray.sort(), this.url = this.url.slice(0, index) + "?" + queryArray.join("&"); 13458 } 13459 } 13460}, $90f323912e688b98$var$RequestBase.prototype._appendQueryString = function() { 13461 console.warn("Unsupported"); 13462}, $90f323912e688b98$var$RequestBase.prototype._timeoutError = function(reason, timeout, errno) { 13463 if (!this._aborted) { 13464 var error = new Error("".concat(reason + timeout, "ms exceeded")); 13465 error.timeout = timeout, error.code = "ECONNABORTED", error.errno = errno, this.timedout = !0, this.timedoutError = error, this.abort(), this.callback(error); 13466 } 13467}, $90f323912e688b98$var$RequestBase.prototype._setTimeouts = function() { 13468 var self1 = this; 13469 this._timeout && !this._timer && (this._timer = setTimeout(function() { 13470 self1._timeoutError("Timeout of ", self1._timeout, "ETIME"); 13471 }, this._timeout)), this._responseTimeout && !this._responseTimeoutTimer && (this._responseTimeoutTimer = setTimeout(function() { 13472 self1._timeoutError("Response timeout of ", self1._responseTimeout, "ETIMEDOUT"); 13473 }, this._responseTimeout)); 13474}; 13475var $90f323912e688b98$var$responseBase = $90f323912e688b98$var$ResponseBase; 13476function $90f323912e688b98$var$ResponseBase() {} 13477function $90f323912e688b98$var$_toConsumableArray(arr) { 13478 return function(arr) { 13479 if (Array.isArray(arr)) return $90f323912e688b98$var$_arrayLikeToArray(arr); 13480 }(arr) || function(iter) { 13481 if ("undefined" != typeof Symbol && null != iter[Symbol.iterator] || null != iter["@@iterator"]) return Array.from(iter); 13482 }(arr) || $90f323912e688b98$var$_unsupportedIterableToArray(arr) || function() { 13483 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 13484 }(); 13485} 13486function $90f323912e688b98$var$_unsupportedIterableToArray(o, minLen) { 13487 if (o) { 13488 if ("string" == typeof o) return $90f323912e688b98$var$_arrayLikeToArray(o, minLen); 13489 var n = Object.prototype.toString.call(o).slice(8, -1); 13490 return "Object" === n && o.constructor && (n = o.constructor.name), "Map" === n || "Set" === n ? Array.from(o) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? $90f323912e688b98$var$_arrayLikeToArray(o, minLen) : void 0; 13491 } 13492} 13493function $90f323912e688b98$var$_arrayLikeToArray(arr, len) { 13494 (null == len || len > arr.length) && (len = arr.length); 13495 for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; 13496 return arr2; 13497} 13498function $90f323912e688b98$var$Agent() { 13499 this._defaults = []; 13500} 13501$90f323912e688b98$var$ResponseBase.prototype.get = function(field) { 13502 return this.header[field.toLowerCase()]; 13503}, $90f323912e688b98$var$ResponseBase.prototype._setHeaderProperties = function(header) { 13504 var ct = header["content-type"] || ""; 13505 this.type = $90f323912e688b98$var$utils$1.type(ct); 13506 var parameters = $90f323912e688b98$var$utils$1.params(ct); 13507 for(var key in parameters)Object.prototype.hasOwnProperty.call(parameters,
13507key) && (this[key] = parameters[key]); 13508 this.links = {}; 13509 try { 13510 header.link && (this.links = $90f323912e688b98$var$utils$1.parseLinks(header.link)); 13511 } catch (_unused) {} 13512}, $90f323912e688b98$var$ResponseBase.prototype._setStatusProperties = function(status) { 13513 var type = Math.trunc(status / 100); 13514 this.statusCode = status, this.status = this.statusCode, this.statusType = type, this.info = 1 === type, this.ok = 2 === type, this.redirect = 3 === type, this.clientError = 4 === type, this.serverError = 5 === type, this.error = (4 === type || 5 === type) && this.toError(), this.created = 201 === status, this.accepted = 202 === status, this.noContent = 204 === status, this.badRequest = 400 === status, this.unauthorized = 401 === status, this.notAcceptable = 406 === status, this.forbidden = 403 === status, this.notFound = 404 === status, this.unprocessableEntity = 422 === status; 13515}; 13516for(var $90f323912e688b98$var$_loop = function() { 13517 var fn = $90f323912e688b98$var$_arr[$90f323912e688b98$var$_i]; 13518 $90f323912e688b98$var$Agent.prototype[fn] = function() { 13519 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 13520 return this._defaults.push({ 13521 fn: fn, 13522 args: args 13523 }), this; 13524 }; 13525}, $90f323912e688b98$var$_i = 0, $90f323912e688b98$var$_arr = [ 13526 "use", 13527 "on", 13528 "once", 13529 "set", 13530 "query", 13531 "type", 13532 "accept", 13533 "auth", 13534 "withCredentials", 13535 "sortQuery", 13536 "retry", 13537 "ok", 13538 "redirects", 13539 "timeout", 13540 "buffer", 13541 "serialize", 13542 "parse", 13543 "ca", 13544 "key", 13545 "pfx", 13546 "cert", 13547 "disableTLSCerts" 13548]; $90f323912e688b98$var$_i < $90f323912e688b98$var$_arr.length; $90f323912e688b98$var$_i++)$90f323912e688b98$var$_loop(); 13549$90f323912e688b98$var$Agent.prototype._setDefaults = function(request) { 13550 var _step, _iterator = function(o, allowArrayLike) { 13551 var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"]; 13552 if (!it) { 13553 if (Array.isArray(o) || (it = $90f323912e688b98$var$_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) { 13554 it && (o = it); 13555 var i = 0, F = function() {}; 13556 return { 13557 s: F, 13558 n: function() { 13559 return i >= o.length ? { 13560 done: !0 13561 } : { 13562 done: !1, 13563 value: o[i++] 13564 }; 13565 }, 13566 e: function(_e) { 13567 throw _e; 13568 }, 13569 f: F 13570 }; 13571 } 13572 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 13573 } 13574 var err, normalCompletion = !0, didErr = !1; 13575 return { 13576 s: function() { 13577 it = it.call(o); 13578 }, 13579 n: function() { 13580 var step = it.next(); 13581 return normalCompletion = step.done, step; 13582 }, 13583 e: function(_e2) { 13584 didErr = !0, err = _e2; 13585 }, 13586 f: function() { 13587 try { 13588 normalCompletion || null == it.return || it.return(); 13589 } finally{ 13590 if (didErr) throw err; 13591 } 13592 } 13593 }; 13594 }(this._defaults); 13595 try { 13596 for(_iterator.s(); !(_step = _iterator.n()).done;){ 13597 var def = _step.value; 13598 request[def.fn].apply(request, $90f323912e688b98$var$_toConsumableArray(def.args)); 13599 } 13600 } catch (err) { 13601 _iterator.e(err); 13602 } finally{ 13603 _iterator.f(); 13604 } 13605}; 13606for(var $90f323912e688b98$var$agentBase = $90f323912e688b98$var$Agent, $90f323912e688b98$var$client = $90f323912e688b98$var$createCommonjsModule(function(module, exports) { 13607 function _typeof(obj) { 13608 return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { 13609 return typeof obj; 13610 } : function(obj) { 13611 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 13612 })(obj); 13613 } 13614 function _createForOfIteratorHelper(o, allowArrayLike) { 13615 var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"]; 13616 if (!it) { 13617 if (Array.isArray(o) || (it = function(o, minLen) { 13618 if (!o) return; 13619 if ("string" == typeof o) return _arrayLikeToArray(o, minLen); 13620 var n = Object.prototype.toString.call(o).slice(8, -1); 13621 "Object" === n && o.constructor && (n = o.constructor.name); 13622 if ("Map" === n || "Set" === n) return Array.from(o); 13623 if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); 13624 }(o)) || allowArrayLike && o && "number" == typeof o.length) { 13625 it && (o = it); 13626 var i = 0, F = function() {}; 13627 return { 13628 s: F, 13629 n: function() { 13630 return i >= o.length ? { 13631 done: !0 13632 } : { 13633 done: !1, 13634 value: o[i++] 13635 }; 13636 }, 13637 e: function(_e) { 13638 throw _e; 13639 }, 13640 f: F 13641 }; 13642 } 13643 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 13644 } 13645 var err, normalCompletion = !0, didErr = !1; 13646 return { 13647 s: function() { 13648 it = it.call(o); 13649 }, 13650 n: function() { 13651 var step = it.next(); 13652 return normalCompletion = step.done, step; 13653 }, 13654 e: function(_e2) { 13655 didErr = !0, err = _e2; 13656 }, 13657 f: function() { 13658 try { 13659 normalCompletion || null == it.return || it.return(); 13660 } finally{ 13661 if (didErr) throw err; 13662 } 13663 } 13664 }; 13665 } 13666 function _arrayLikeToArray(arr, len) { 13667 (null == len || len > arr.length) && (len = arr.length); 13668 for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; 13669 return arr2; 13670 } 13671 var root; 13672 "undefined" != typeof window ? root = window : "undefined" == typeof self ? (console.warn("Using browser-only version of superagent in non-browser environment"), root = void 0) : root = self; 13673 var isObject = $90f323912e688b98$var$utils$1.isObject, mixin = $90f323912e688b98$var$utils$1.mixin, hasOwn = $90f323912e688b98$var$utils$1.hasOwn; 13674 function noop() {} 13675 module.exports = function(method, url) { 13676 return "function" == typeof url ? new exports.Request("GET", method).end(url) : 1 === arguments.length ? new exports.Request("GET", method) : new exp
13676orts.Request(method, url); 13677 }; 13678 var request = exports = module.exports; 13679 exports.Request = Request, request.getXHR = function() { 13680 if (root.XMLHttpRequest && (!root.location || "file:" !== root.location.protocol || !root.ActiveXObject)) return new XMLHttpRequest; 13681 try { 13682 return new ActiveXObject("Microsoft.XMLHTTP"); 13683 } catch (_unused) {} 13684 try { 13685 return new ActiveXObject("Msxml2.XMLHTTP.6.0"); 13686 } catch (_unused2) {} 13687 try { 13688 return new ActiveXObject("Msxml2.XMLHTTP.3.0"); 13689 } catch (_unused3) {} 13690 try { 13691 return new ActiveXObject("Msxml2.XMLHTTP"); 13692 } catch (_unused4) {} 13693 throw new Error("Browser-only version of superagent could not find XHR"); 13694 }; 13695 var trim = "".trim ? function(s) { 13696 return s.trim(); 13697 } : function(s) { 13698 return s.replace(/(^\s*|\s*$)/g, ""); 13699 }; 13700 function serialize(object) { 13701 if (!isObject(object)) return object; 13702 var pairs = []; 13703 for(var key in object)hasOwn(object, key) && pushEncodedKeyValuePair(pairs, key, object[key]); 13704 return pairs.join("&"); 13705 } 13706 function pushEncodedKeyValuePair(pairs, key, value) { 13707 if (void 0 !== value) { 13708 if (null !== value) { 13709 if (Array.isArray(value)) { 13710 var _step, _iterator = _createForOfIteratorHelper(value); 13711 try { 13712 for(_iterator.s(); !(_step = _iterator.n()).done;)pushEncodedKeyValuePair(pairs, key, _step.value); 13713 } catch (err) { 13714 _iterator.e(err); 13715 } finally{ 13716 _iterator.f(); 13717 } 13718 } else if (isObject(value)) for(var subkey in value)hasOwn(value, subkey) && pushEncodedKeyValuePair(pairs, "".concat(key, "[").concat(subkey, "]"), value[subkey]); 13719 else pairs.push(encodeURI(key) + "=" + encodeURIComponent(value)); 13720 } else pairs.push(encodeURI(key)); 13721 } 13722 } 13723 function parseString(string_) { 13724 for(var pair, pos, object = {}, pairs = string_.split("&"), i = 0, length_ = pairs.length; i < length_; ++i)-1 === (pos = (pair = pairs[i]).indexOf("=")) ? object[decodeURIComponent(pair)] = "" : object[decodeURIComponent(pair.slice(0, pos))] = decodeURIComponent(pair.slice(pos + 1)); 13725 return object; 13726 } 13727 function isJSON(mime) { 13728 return /[/+]json($|[^-\w])/i.test(mime); 13729 } 13730 function Response(request_) { 13731 this.req = request_, this.xhr = this.req.xhr, this.text = "HEAD" !== this.req.method && ("" === this.xhr.responseType || "text" === this.xhr.responseType) || void 0 === this.xhr.responseType ? this.xhr.responseText : null, this.statusText = this.req.xhr.statusText; 13732 var status = this.xhr.status; 13733 1223 === status && (status = 204), this._setStatusProperties(status), this.headers = function(string_) { 13734 for(var index, line, field, value, lines = string_.split(/\r?\n/), fields = {}, i = 0, length_ = lines.length; i < length_; ++i)-1 !== (index = (line = lines[i]).indexOf(":")) && (field = line.slice(0, index).toLowerCase(), value = trim(line.slice(index + 1)), fields[field] = value); 13735 return fields; 13736 }(this.xhr.getAllResponseHeaders()), this.header = this.headers, this.header["content-type"] = this.xhr.getResponseHeader("content-type"), this._setHeaderProperties(this.header), null === this.text && request_._responseType ? this.body = this.xhr.response : this.body = "HEAD" === this.req.method ? null : this._parseBody(this.text ? this.text : this.xhr.response); 13737 }
13738 function Request(method, url) { 13739 var self1 = this; 13740 this._query = this._query || [], this.method = method, this.url = url, this.header = {}, this._header = {}, this.on("end", function() { 13741 var new_error, error = null, res = null; 13742 try { 13743 res = new Response(self1); 13744 } catch (err) { 13745 return (error = new Error("Parser is unable to parse the response")).parse = !0, error.original = err, self1.xhr ? (error.rawResponse = void 0 === self1.xhr.responseType ? self1.xhr.responseText : self1.xhr.response, error.status = self1.xhr.status ? self1.xhr.status : null, error.statusCode = error.status) : (error.rawResponse = null, error.status = null), self1.callback(error); 13746 } 13747 self1.emit("response", res); 13748 try { 13749 self1._isResponseOK(res) || (new_error = new Error(res.statusText || res.text || "Unsuccessful HTTP response")); 13750 } catch (err) { 13751 new_error = err; 13752 } 13753 new_error ? (new_error.original = error, new_error.response = res, new_error.status = res.status, self1.callback(new_error, res)) : self1.callback(null, res); 13754 }); 13755 } 13756 request.serializeObject = serialize, request.parseString = parseString, request.types = { 13757 html: "text/html", 13758 json: "application/json", 13759 xml: "text/xml", 13760 urlencoded: "application/x-www-form-urlencoded", 13761 form: "application/x-www-form-urlencoded", 13762 "form-data": "application/x-www-form-urlencoded" 13763 }, request.serialize = { 13764 "application/x-www-form-urlencoded": $90f323912e688b98$var$lib.stringify, 13765 "application/json": $90f323912e688b98$var$fastSafeStringify 13766 }, request.parse = { 13767 "application/x-www-form-urlencoded": parseString, 13768 "application/json": JSON.parse 13769 }, mixin(Response.prototype, $90f323912e688b98$var$responseBase.prototype), Response.prototype._parseBody = function(string_) { 13770 var parse = request.parse[this.type]; 13771 return this.req._parser ? this.req._parser(this, string_) : (!parse && isJSON(this.type) && (parse = request.parse["application/json"]), parse && string_ && (string_.length > 0 || string_ instanceof Object) ? parse(string_) : null); 13772 }, Response.prototype.toError = function() { 13773 var req = this.req, method = req.method, url = req.url, message = "cannot ".concat(method, " ").concat(url, " (").concat(this.status, ")"), error = new Error(message); 13774 return error.status = this.status, error.method = method, error.url = url, error; 13775 }, request.Response = Response, $90f323912e688b98$var$componentEmitter(Request.prototype), mixin(Request.prototype, $90f323912e688b98$var$requestBase.prototype), Request.prototype.type = function(type) { 13776 return this.set("Content-Type", request.types[type] || type), this; 13777 }, Request.prototype.accept = function(type) { 13778 return this.set("Accept", request.types[type] || type), this; 13779 }, Request.prototype.auth = function(user, pass, options) { 13780 1 === arguments.length && (pass = ""), "object" === _typeof(pass) && null !== pass && (options = pass, pass = ""), options || (options = { 13781 type: "function" == typeof btoa ? "basic" : "auto" 13782 }); 13783 var encoder = options.encoder ? options.encoder : function(string) { 13784 if ("function" == typeof btoa) return btoa(string); 13785 throw new Error("Cannot use basic auth, btoa is not a function"); 13786 }; 13787 return this._auth(user, pass, options, encoder); 13788 }, Request.prototype.query = function(value) { 13789 return "string" != typeof value && (value = serialize(value)), value && this._query.push(value), this; 13790 }, Request.prototype.attach = function(field, file, options) { 13791 if (file) { 13792 if (this._data) throw new Error("superagent can't mix .send() and .attach()"); 13793 this._getFormData().append(field, file, options || file.name); 13794 } 13795 return this; 13796 }, Request.prototype._getFormData = function() { 13797 return this._formData || (this._formData = new root.FormData), this._formData; 13798 }, Request.prototype.callback = function(error, res) { 13799 if (this._shouldRetry(error, res)) return this._retry(); 13800 var fn = this._callback; 13801 this.clearTimeout(), error && (this._maxRetries && (error.retries = this._retries - 1), this.emit
13801("error", error)), fn(error, res); 13802 }, Request.prototype.crossDomainError = function() { 13803 var error = new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc."); 13804 error.crossDomain = !0, error.status = this.status, error.method = this.method, error.url = this.url, this.callback(error); 13805 }, Request.prototype.agent = function() { 13806 return console.warn("This is not supported in browser version of superagent"), this; 13807 }, Request.prototype.ca = Request.prototype.agent, Request.prototype.buffer = Request.prototype.ca, Request.prototype.write = function() { 13808 throw new Error("Streaming is not supported in browser version of superagent"); 13809 }, Request.prototype.pipe = Request.prototype.write, Request.prototype._isHost = function(object) { 13810 return object && "object" === _typeof(object) && !Array.isArray(object) && "[object Object]" !== Object.prototype.toString.call(object); 13811 }, Request.prototype.end = function(fn) { 13812 this._endCalled && console.warn("Warning: .end() was called twice. This is not supported in superagent"), this._endCalled = !0, this._callback = fn || noop, this._finalizeQueryString(), this._end(); 13813 }, Request.prototype._setUploadTimeout = function() { 13814 var self1 = this; 13815 this._uploadTimeout && !this._uploadTimeoutTimer && (this._uploadTimeoutTimer = setTimeout(function() { 13816 self1._timeoutError("Upload timeout of ", self1._uploadTimeout, "ETIMEDOUT"); 13817 }, this._uploadTimeout)); 13818 }, Request.prototype._end = function() { 13819 if (this._aborted) return this.callback(new Error("The request has been aborted even before .end() was called")); 13820 var self1 = this; 13821 this.xhr = request.getXHR(); 13822 var xhr = this.xhr, data = this._formData || this._data; 13823 this._setTimeouts(), xhr.addEventListener("readystatechange", function() { 13824 var readyState = xhr.readyState; 13825 if (readyState >= 2 && self1._responseTimeoutTimer && clearTimeout(self1._responseTimeoutTimer), 4 === readyState) { 13826 var status; 13827 try { 13828 status = xhr.status; 13829 } catch (_unused5) { 13830 status = 0; 13831 } 13832 if (!status) { 13833 if (self1.timedout || self1._aborted) return; 13834 return self1.crossDomainError(); 13835 } 13836 self1.emit("end"); 13837 } 13838 }); 13839 var handleProgress = function(direction, e) { 13840 e.total > 0 && (e.percent = e.loaded / e.total * 100, 100 === e.percent && clearTimeout(self1._uploadTimeoutTimer)), e.direction = direction, self1.emit("progress", e); 13841 }; 13842 if (this.hasListeners("progress")) try { 13843 xhr.addEventListener("progress", handleProgress.bind(null, "download")), xhr.upload && xhr.upload.addEventListener("progress", handleProgress.bind(null, "upload")); 13844 } catch (_unused6) {} 13845 xhr.upload && this._setUploadTimeout(); 13846 try { 13847 this.username && this.password ? xhr.open(this.method, this.url, !0, this.username, this.password) : xhr.open(this.method, this.url, !0); 13848 } catch (err) { 13849 return this.callback(err); 13850 } 13851 if (this._withCredentials && (xhr.withCredentials = !0), !this._formData && "GET" !== this.method && "HEAD" !== this.method && "string" != typeof data && !this._isHost(data)) { 13852 var contentType = this._header["content-type"], _serialize = this._serializer || request.serialize[contentType ? contentType.split(";")[0] : ""]; 13853 !_serialize && isJSON(contentType) && (_serialize = request.serialize["application/json"]), _serialize && (data = _serialize(data)); 13854 } 13855 for(var field in this.header)null !== this.header[field] && hasOwn(this.header, field) && xhr.setRequestHeader(field, this.header[field]); 13856 this._responseType && (xhr.responseType = this._responseType), this.emit("request", this), xhr.send(void 0 === data ? null : data); 13857 }, request.agent = function() { 13858 return new $90f323912e688b98$var$agentBase; 13859 }; 13860 for(var _loop = function() { 13861 var method = _arr[_i]; 13862 $90f323912e688b98$var$agentBase.prototype[method.toLowerCase()] = function(url, fn) {
13863 var request_ = new request.Request(method, url); 13864 return this._setDefaults(request_), fn && request_.end(fn), request_; 13865 }; 13866 }, _i = 0, _arr = [ 13867 "GET", 13868 "POST", 13869 "OPTIONS", 13870 "PATCH", 13871 "PUT", 13872 "DELETE" 13873 ]; _i < _arr.length; _i++)_loop(); 13874 function del(url, data, fn) { 13875 var request_ = request("DELETE", url); 13876 return "function" == typeof data && (fn = data, data = null), data && request_.send(data), fn && request_.end(fn), request_; 13877 } 13878 $90f323912e688b98$var$agentBase.prototype.del = $90f323912e688b98$var$agentBase.prototype.delete, request.get = function(url, data, fn) { 13879 var request_ = request("GET", url); 13880 return "function" == typeof data && (fn = data, data = null), data && request_.query(data), fn && request_.end(fn), request_; 13881 }, request.head = function(url, data, fn) { 13882 var request_ = request("HEAD", url); 13883 return "function" == typeof data && (fn = data, data = null), data && request_.query(data), fn && request_.end(fn), request_; 13884 }, request.options = function(url, data, fn) { 13885 var request_ = request("OPTIONS", url); 13886 return "function" == typeof data && (fn = data, data = null), data && request_.send(data), fn && request_.end(fn), request_; 13887 }, request.del = del, request.delete = del, request.patch = function(url, data, fn) { 13888 var request_ = request("PATCH", url); 13889 return "function" == typeof data && (fn = data, data = null), data && request_.send(data), fn && request_.end(fn), request_; 13890 }, request.post = function(url, data, fn) { 13891 var request_ = request("POST", url); 13892 return "function" == typeof data && (fn = data, data = null), data && request_.send(data), fn && request_.end(fn), request_; 13893 }, request.put = function(url, data, fn) { 13894 var request_ = request("PUT", url); 13895 return "function" == typeof data && (fn = data, data = null), data && request_.send(data), fn && request_.end(fn), request_; 13896 }; 13897}), $90f323912e688b98$var$byteLength_1 = ($90f323912e688b98$var$client.Request, function(b64) { 13898 var lens = $90f323912e688b98$var$getLens(b64), validLen = lens[0], placeHoldersLen = lens[1]; 13899 return 3 * (validLen + placeHoldersLen) / 4 - placeHoldersLen; 13900}), $90f323912e688b98$var$toByteArray_1 = function(b64) { 13901 var tmp, i, lens = $90f323912e688b98$var$getLens(b64), validLen = lens[0], placeHoldersLen = lens[1], arr = new $90f323912e688b98$var$Arr(function(b64, validLen, placeHoldersLen) { 13902 return 3 * (validLen + placeHoldersLen) / 4 - placeHoldersLen; 13903 }(0, validLen, placeHoldersLen)), curByte = 0, len = placeHoldersLen > 0 ? validLen - 4 : validLen; 13904 for(i = 0; i < len; i += 4)tmp = $90f323912e688b98$var$revLookup[b64.charCodeAt(i)] << 18 | $90f323912e688b98$var$revLookup[b64.charCodeAt(i + 1)] << 12 | $90f323912e688b98$var$revLookup[b64.charCodeAt(i + 2)] << 6 | $90f323912e688b98$var$revLookup[b64.charCodeAt(i + 3)], arr[curByte++] = tmp >> 16 & 255, arr[curByte++] = tmp >> 8 & 255, arr[curByte++] = 255 & tmp; 13905 2 === placeHoldersLen && (tmp = $90f323912e688b98$var$revLookup[b64.charCodeAt(i)] << 2 | $90f323912e688b98$var$revLookup[b64.charCodeAt(i + 1)] >> 4, arr[curByte++] = 255 & tmp); 13906 1 === placeHoldersLen && (tmp = $90f323912e688b98$var$revLookup[b64.charCodeAt(i)] << 10 | $90f323912e688b98$var$revLookup[b64.charCodeAt(i + 1)] << 4 | $90f323912e688b98$var$revLookup[b64.charCodeAt(i + 2)] >> 2, arr[curByte++] = tmp >> 8 & 255, arr[curByte++] = 255 & tmp); 13907 return arr; 13908}, $90f323912e688b98$var$fromByteArray_1 = function(uint8) { 13909 for(var tmp, len = uint8.length, extraBytes = len % 3, parts = [], i = 0, len2 = len - extraBytes; i < len2; i += 16383)parts.push($90f323912e688b98$var$encodeChunk(uint8, i, i + 16383 > len2 ? len2 : i + 16383)); 13910 1 === extraBytes ? (tmp = uint8[len - 1], parts.push($90f323912e688b98$var$lookup[tmp >> 2] + $90f323912e688b98$var$lookup[tmp << 4 & 63] + "==")) : 2 === extraBytes && (tmp = (uint8[len - 2] << 8) + uint8[len - 1], parts.push($90f323912e688b98$var$lookup[tmp >> 10] + $90f323912e688b98$var$lookup[tmp >> 4 & 63] + $90f323912e688b98$var$lookup[tmp << 2 & 63] + "=")); 13911 return parts.join(""); 13912}, $90f323912e688b98$var$lookup = [], $90f323912e688b98$var$revLookup = [], $90f323912e688b98$var$Arr = "undefined" != typeof Uint8Array ? Uint8Array : Array, $90f323912e688b98$var$code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
13912+/", $90f323912e688b98$var$i = 0, $90f323912e688b98$var$len = $90f323912e688b98$var$code.length; $90f323912e688b98$var$i < $90f323912e688b98$var$len; ++$90f323912e688b98$var$i)$90f323912e688b98$var$lookup[$90f323912e688b98$var$i] = $90f323912e688b98$var$code[$90f323912e688b98$var$i], $90f323912e688b98$var$revLookup[$90f323912e688b98$var$code.charCodeAt($90f323912e688b98$var$i)] = $90f323912e688b98$var$i; 13913function $90f323912e688b98$var$getLens(b64) { 13914 var len = b64.length; 13915 if (len % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); 13916 var validLen = b64.indexOf("="); 13917 return -1 === validLen && (validLen = len), [ 13918 validLen, 13919 validLen === len ? 0 : 4 - validLen % 4 13920 ]; 13921} 13922function $90f323912e688b98$var$encodeChunk(uint8, start, end) { 13923 for(var tmp, num, output = [], i = start; i < end; i += 3)tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (255 & uint8[i + 2]), output.push($90f323912e688b98$var$lookup[(num = tmp) >> 18 & 63] + $90f323912e688b98$var$lookup[num >> 12 & 63] + $90f323912e688b98$var$lookup[num >> 6 & 63] + $90f323912e688b98$var$lookup[63 & num]); 13924 return output.join(""); 13925} 13926$90f323912e688b98$var$revLookup["-".charCodeAt(0)] = 62, $90f323912e688b98$var$revLookup["_".charCodeAt(0)] = 63; 13927var $90f323912e688b98$var$base64Js = { 13928 byteLength: $90f323912e688b98$var$byteLength_1, 13929 toByteArray: $90f323912e688b98$var$toByteArray_1, 13930 fromByteArray: $90f323912e688b98$var$fromByteArray_1 13931}; 13932var $90f323912e688b98$var$base64Url = { 13933 encode: function(str) { 13934 return $90f323912e688b98$var$base64Js.fromByteArray(function(str) { 13935 for(var arr = new Array(str.length), a = 0; a < str.length; a++)arr[a] = str.charCodeAt(a); 13936 return arr; 13937 }(str)).replace(/\+/g, "-").replace(/\//g, "_"); 13938 }, 13939 decode: function(str) { 13940 return str = (function(str) { 13941 var mod = str.length % 4; 13942 return 0 === mod ? str : str + new Array(1 + (4 - mod)).join("="); 13943 })(str).replace(/-/g, "+").replace(/_/g, "/"), function(array) { 13944 for(var result = "", i = 0; i < array.length; i++)result += String.fromCharCode(array[i]); 13945 return result; 13946 }($90f323912e688b98$var$base64Js.toByteArray(str)); 13947 } 13948}, $90f323912e688b98$export$83d89fbfd8236492 = { 13949 raw: "9.28.0" 13950}, $90f323912e688b98$var$toString = Object.prototype.toString; 13951function $90f323912e688b98$var$attribute(o, attr, type, text) { 13952 if (type = "array" === type ? "object" : type, o && typeof o[attr] !== type) throw new Error(text); 13953} 13954function $90f323912e688b98$var$variable(o, type, text) { 13955 if (typeof o !== type) throw new Error(text); 13956} 13957function $90f323912e688b98$var$value(o, values, text) { 13958 if (-1 === values.indexOf(o)) throw new Error(text); 13959} 13960var $90f323912e688b98$var$assert = { 13961 check: function(o, config, attributes) { 13962 if (config.optional && !o || $90f323912e688b98$var$variable(o, config.type, config.message), "object" === config.type && attributes) for(var keys = Object.keys(attributes), index = 0; index < keys.length; index++){ 13963 var a = keys[index]; 13964 attributes[a].optional && !o[a] || attributes[a].condition && !attributes[a].condition(o) || ($90f323912e688b98$var$attribute(o, a, attributes[a].type, attributes[a].message), attributes[a].values && $90f323912e688b98$var$value(o[a], attributes[a].values, attributes[a].value_message)); 13965 } 13966 }, 13967 attribute: $90f323912e688b98$var$attribute, 13968 variable: $90f323912e688b98$var$variable, 13969 value: $90f323912e688b98$var$value, 13970 isArray: function(array) { 13971 return this.supportsIsArray() ? Array.isArray(array) : "[object Array]" === $90f323912e688b98$var$toString.call(array); 13972 }, 13973 supportsIsArray: function() { 13974 return null != Array.isArray; 13975 } 13976}; 13977function $90f323912e688b98$var$objectAssignPolyfill(target) { 13978 if (null == target) throw new TypeError("Cannot convert first argument to object"); 13979 for(var to = Object(target), i = 1; i < arguments.length; i++){ 13980 var nextSource = arguments[i]; 13981 if (null != nextSource) for(var keysArray = Object.keys(Object(nextSource)), nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++){ 13982 var nextKey = keysArray[nextIndex], desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
13983 void 0 !== desc && desc.enumerable && (to[nextKey] = nextSource[nextKey]); 13984 } 13985 } 13986 return to; 13987} 13988var $90f323912e688b98$var$objectAssign = { 13989 get: function() { 13990 return Object.assign ? Object.assign : $90f323912e688b98$var$objectAssignPolyfill; 13991 }, 13992 objectAssignPolyfill: $90f323912e688b98$var$objectAssignPolyfill 13993}; 13994function $90f323912e688b98$var$pick(object, keys) { 13995 return keys.reduce(function(prev, key) { 13996 return object[key] && (prev[key] = object[key]), prev; 13997 }, {}); 13998} 13999function $90f323912e688b98$var$objectValues(obj) { 14000 var values = []; 14001 for(var key in obj)values.push(obj[key]); 14002 return values; 14003} 14004function $90f323912e688b98$var$extend() { 14005 var params = $90f323912e688b98$var$objectValues(arguments); 14006 return params.unshift({}), $90f323912e688b98$var$objectAssign.get().apply(void 0, params); 14007} 14008function $90f323912e688b98$var$getLocationFromUrl(href) { 14009 var match = href.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/); 14010 return match && { 14011 href: href, 14012 protocol: match[1], 14013 host: match[2], 14014 hostname: match[3], 14015 port: match[4], 14016 pathname: match[5], 14017 search: match[6], 14018 hash: match[7] 14019 }; 14020} 14021function $90f323912e688b98$var$trim(options, key) { 14022 var trimmed = $90f323912e688b98$var$extend(options); 14023 return options[key] && (trimmed[key] = options[key].trim()), trimmed; 14024} 14025var $90f323912e688b98$var$objectHelper = { 14026 toSnakeCase: function toSnakeCase(object, exceptions) { 14027 return "object" != typeof object || $90f323912e688b98$var$assert.isArray(object) || null === object ? object : (exceptions = exceptions || [], Object.keys(object).reduce(function(p, key) { 14028 return p[-1 === exceptions.indexOf(key) ? function(str) { 14029 for(var code, newKey = "", index = 0, wasPrevNumber = !0, wasPrevUppercase = !0; index < str.length;)code = str.charCodeAt(index), !wasPrevUppercase && code >= 65 && code <= 90 || !wasPrevNumber && code >= 48 && code <= 57 ? (newKey += "_", newKey += str[index].toLowerCase()) : newKey += str[index].toLowerCase(), wasPrevNumber = code >= 48 && code <= 57, wasPrevUppercase = code >= 65 && code <= 90, index++; 14030 return newKey; 14031 }(key) : key] = toSnakeCase(object[key]), p; 14032 }, {})); 14033 }, 14034 toCamelCase: function toCamelCase(object, exceptions, options) { 14035 return "object" != typeof object || $90f323912e688b98$var$assert.isArray(object) || null === object ? object : (exceptions = exceptions || [], options = options || {}, Object.keys(object).reduce(function(p, key) { 14036 var parts, newKey = -1 === exceptions.indexOf(key) ? (parts = key.split("_")).reduce(function(p, c) { 14037 return p + c.charAt(0).toUpperCase() + c.slice(1); 14038 }, parts.shift()) : key; 14039 return p[newKey] = toCamelCase(object[newKey] || object[key], [], options), options.keepOriginal && (p[key] = toCamelCase(object[key], [], options)), p; 14040 }, {})); 14041 }, 14042 blacklist: function(object, blacklistedKeys) { 14043 return Object.keys(object).reduce(function(p, key) { 14044 return -1 === blacklistedKeys.indexOf(key) && (p[key] = object[key]), p; 14045 }, {}); 14046 }, 14047 merge: function(object, keys) { 14048 return { 14049 base: keys ? $90f323912e688b98$var$pick(object, keys) : object, 14050 with: function(object2, keys2) { 14051 return object2 = keys2 ? $90f323912e688b98$var$pick(object2, keys2) : object2, $90f323912e688b98$var$extend(this.base, object2); 14052 } 14053 }; 14054 }, 14055 pick: $90f323912e688b98$var$pick, 14056 getKeysNotIn: function(obj, allowedKeys) { 14057 var notAllowed = []; 14058 for(var key in obj)-1 === allowedKeys.indexOf(key) && notAllowed.push(key); 14059 return notAllowed; 14060 }, 14061 extend: $90f323912e688b98$var$extend, 14062 getOriginFromUrl: function(url) { 14063 if (url) { 14064 var parsed = $90f323912e688b98$var$getLocationFromUrl(url); 14065 if (!parsed) return null; 14066 var origin = parsed.protocol + "//" + parsed.hostname; 14067 return parsed.port && (origin += ":" + parsed.port), origin; 14068 } 14069 }, 14070 getLocationFromUrl: $90f323912e688b98$var$getLocationFromUrl, 14071 trimUserDetails: function(options) { 14072 return function(options, keys) { 14073 return keys.reduce($90f323912e688b98$var$trim, options); 14074 }(options, [ 14075 "username", 14076 "email", 14077 "phoneNumber" 14078 ]); 14079 }, 14080 updatePropertyOn: function updatePropertyOn(obj, path, value) { 14081 "string" == typeof path && (path = path.split(".")); 14082 var next = path[0]; 14083 obj.hasOwnProperty(next) && (1 === path.length ? obj[next] = value : updatePropertyOn(obj[next], path.slice(1), value)); 14084 } 14085}; 14086function $90f323912e688b98$var$RequestWrapper(req) { 14087 this.request = req, this.method = req.method, this.url = req.url, this.body = req._data, this.headers = req._header; 14088} 14089function $90f323912e688b98$var$RequestObj(req) { 14090 this.request = req; 14091} 14092function $90f323912e688b98$var$RequestBuilder(options) { 14093 this._sendTelemetry = !1 !== options._sendTelemetry || options._sendTelemetry, this._telemetryInfo = options._telemetryInfo || null, this._timesToRetryFailedRequests = options._timesToRetryFailedRequests, this.headers = options.headers || {}, this._universalLoginPage = options.universalLoginPage; 14094} 14095function $90f323912e688b98$var$getWindow() { 14096 return window; 14097} 14098$90f323912e688b98$var$RequestWrapper.prototype.abort = function() { 14099 this.request.abort(); 14100}, $90f323912e688b98$var$RequestWrapper.prototype.getMethod = function() { 14101 return this.method; 14102}, $90f323912e688b98$var$RequestWrapper.prototype.getBody = function() { 14103 return this.body; 14104}, $90f323912e688b98$var$RequestWrapper.prototype.getUrl = function() { 14105 return this.url; 14106}, $90f323912e688b98$var$RequestWrapper.prototype.getHeaders = function() { 14107 return this.headers; 14108}, $90f323912e688b98$var$RequestObj.prototype.set = function(key, value) { 14109 return this.request = this.request.set(key, value), this; 14110}, $90f323912e688b98$var$RequestObj.prototype.send = function(body) { 14111 return this.request = this.request.send($90f323912e688b98$var$objectHelper.trimUserDetails(body)), this; 14112}, $90f323912e688b98$var$RequestObj.prototype.withCredentials = function() { 14113 return this.request = this.request.withCredentials(), this; 14114}, $90f323912e688b98$var$RequestObj.prototype.end = function(cb) { 14115 return this.request.end(cb), new $90f323912e688b98$var$RequestWrapper(this.request); 14116}, $90f323912e688b98$var$RequestBuilder.prototype.setCommonConfiguration = function(ongoingRequest, options) { 14117 if (options = options || {}, this._timesToRetryFailedRequests > 0 && (ongoingRequest = ongoingRequest.retry(this._timesToRetryFailedRequests)), options.noHeaders) return ongoingRequest; 14118 var headers = this.headers; 14119 ongoingRequest = ongoingRequest.set("Content-Type", "application/json"), options.xRequestLanguage && (ongoingRequest = ongoingRequest.set("X-Request-Language", options.xRequestLanguage)); 14120 for(var keys = Object.keys(this.headers), a = 0;
14120 a < keys.length; a++)ongoingRequest = ongoingRequest.set(keys[a], headers[keys[a]]); 14121 return this._sendTelemetry && (ongoingRequest = ongoingRequest.set("Auth0-Client", this.getTelemetryData())), ongoingRequest; 14122}, $90f323912e688b98$var$RequestBuilder.prototype.getTelemetryData = function() { 14123 var telemetryName = this._universalLoginPage ? "auth0.js-ulp" : "auth0.js", clientInfo = { 14124 name: telemetryName, 14125 version: $90f323912e688b98$export$83d89fbfd8236492.raw 14126 }; 14127 this._telemetryInfo && ((clientInfo = $90f323912e688b98$var$objectHelper.extend({}, this._telemetryInfo)).env = $90f323912e688b98$var$objectHelper.extend({}, this._telemetryInfo.env), clientInfo.env[telemetryName] = $90f323912e688b98$export$83d89fbfd8236492.raw); 14128 var jsonClientInfo = JSON.stringify(clientInfo); 14129 return $90f323912e688b98$var$base64Url.encode(jsonClientInfo); 14130}, $90f323912e688b98$var$RequestBuilder.prototype.get = function(url, options) { 14131 return new $90f323912e688b98$var$RequestObj(this.setCommonConfiguration($90f323912e688b98$var$client.get(url), options)); 14132}, $90f323912e688b98$var$RequestBuilder.prototype.post = function(url, options) { 14133 return new $90f323912e688b98$var$RequestObj(this.setCommonConfiguration($90f323912e688b98$var$client.post(url), options)); 14134}, $90f323912e688b98$var$RequestBuilder.prototype.patch = function(url, options) { 14135 return new $90f323912e688b98$var$RequestObj(this.setCommonConfiguration($90f323912e688b98$var$client.patch(url), options)); 14136}; 14137var $90f323912e688b98$var$windowHelper = { 14138 redirect: function(url) { 14139 $90f323912e688b98$var$getWindow().location = url; 14140 }, 14141 getDocument: function() { 14142 return $90f323912e688b98$var$getWindow().document; 14143 }, 14144 getWindow: $90f323912e688b98$var$getWindow, 14145 getOrigin: function() { 14146 var location = $90f323912e688b98$var$getWindow().location, origin = location.origin; 14147 return origin || (origin = $90f323912e688b98$var$objectHelper.getOriginFromUrl(location.href)), origin; 14148 } 14149}; 14150function $90f323912e688b98$var$DummyStorage() {} 14151$90f323912e688b98$var$DummyStorage.prototype.getItem = function() { 14152 return null; 14153}, $90f323912e688b98$var$DummyStorage.prototype.removeItem = function() {}, $90f323912e688b98$var$DummyStorage.prototype.setItem = function() {}; 14154var $90f323912e688b98$var$js_cookie = $90f323912e688b98$var$createCommonjsModule(function(module, exports) { 14155 var factory; 14156 factory = function() { 14157 function extend() { 14158 for(var i = 0, result = {}; i < arguments.length; i++){ 14159 var attributes = arguments[i]; 14160 for(var key in attributes)result[key] = attributes[key]; 14161 } 14162 return result; 14163 } 14164 function decode(s) { 14165 return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 14166 } 14167 return function init(converter) { 14168 function api() {} 14169 function set(key, value, attributes) { 14170 if ("undefined" != typeof document) { 14171 "number" == typeof (attributes = extend({ 14172 path: "/" 14173 }, api.defaults, attributes)).expires && (attributes.expires = new Date(1 * new Date + 864e5 * attributes.expires)), attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ""; 14174 try { 14175 var result = JSON.stringify(value); 14176 /^[\{\[]/.test(result) && (value = result); 14177 } catch (e) {} 14178 value = converter.write ? converter.write(value, key) : encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), key = encodeURIComponent(String(key)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape); 14179 var stringifiedAttributes = ""; 14180 for(var attributeName in attributes)attributes[attributeName] && (stringifiedAttributes += "; " + attributeName, !0 !== attributes[attributeName] && (stringifiedAttributes += "=" + attributes[attributeName].split(";")[0])); 14181 return document.cookie = key + "=" + value + stringifiedAttributes; 14182 } 14183 } 14184 function get(key, json) { 14185 if ("undefined" != typeof document) { 14186 for(var jar = {}, cookies = document.cookie ? document.cookie.split("; ") : [], i = 0; i < cookies.length; i++){ 14187 var parts = cookies[i].split("="), cookie = parts.slice(1).join("="); 14188 json || '"' !== cookie.charAt(0) || (cookie = cookie.slice(1, -1)); 14189 try { 14190 var name = decode(parts[0]); 14191 if (cookie = (converter.read || converter)(cookie, name) || decode(cookie), json) try { 14192 cookie = JSON.parse(cookie); 14193 } catch (e) {} 14194 if (jar[name] = cookie, key === name) break; 14195 } catch (e) {} 14196 } 14197 return key ? jar[key] : jar; 14198 } 14199 } 14200 return api.set = set, api.get = function(key) { 14201 return get(key, !1); 14202 }, api.getJSON = function(key) { 14203 return get(key, !0); 14204 }, api.remove = function(key, attributes) { 14205 set(key, "", extend(attributes, { 14206 expires: -1 14207 })); 14208 }, api.defaults = {}, api.withConverter = init, api; 14209 }(function() {}); 14210 }, module.exports = factory(); 14211}); 14212function $90f323912e688b98$var$buildCompatCookieKey(key) { 14213 return "_" + key + "_compat"; 14214} 14215function $90f323912e688b98$var$CookieStorage(options) { 14216 this._options = options || {}; 14217} 14218function $90f323912e688b98$var$Warn(options) { 14219 this.disableWarnings = options.disableWarnings; 14220} 14221function $90f323912e688b98$var$StorageHandler(options) { 14222 if (this.warn = new $90f323912e688b98$var$Warn({}), this.storage = new $90f323912e688b98$var$CookieStorage(options), !0 === options.__tryLocal
14222StorageFirst) try { 14223 var localStorage = $90f323912e688b98$var$windowHelper.getWindow().localStorage; 14224 localStorage && (this.storage = localStorage); 14225 } catch (e) { 14226 this.warn.warning(e), this.warn.warning("Can't use localStorage. Using CookieStorage instead."); 14227 } 14228} 14229function $90f323912e688b98$var$Storage(options) { 14230 this.handler = new $90f323912e688b98$var$StorageHandler(options); 14231} 14232function $90f323912e688b98$var$SSODataStorage(options) { 14233 this.storage = new $90f323912e688b98$var$Storage(options); 14234} 14235function $90f323912e688b98$var$buildResponse(error, description) { 14236 return { 14237 error: error, 14238 errorDescription: description 14239 }; 14240} 14241$90f323912e688b98$var$CookieStorage.prototype.getItem = function(key) { 14242 return $90f323912e688b98$var$js_cookie.get(key) || $90f323912e688b98$var$js_cookie.get($90f323912e688b98$var$buildCompatCookieKey(key)); 14243}, $90f323912e688b98$var$CookieStorage.prototype.removeItem = function(key) { 14244 var params = {}; 14245 this._options.cookieDomain && (params.domain = this._options.cookieDomain), $90f323912e688b98$var$js_cookie.remove(key, params), $90f323912e688b98$var$js_cookie.remove($90f323912e688b98$var$buildCompatCookieKey(key), params); 14246}, $90f323912e688b98$var$CookieStorage.prototype.setItem = function(key, value, options) { 14247 var params = $90f323912e688b98$var$objectHelper.extend({ 14248 expires: 1 14249 }, options); 14250 if ("https:" === $90f323912e688b98$var$windowHelper.getWindow().location.protocol && (params.secure = !0, params.sameSite = "none", this._options.legacySameSiteCookie)) { 14251 var legacyOptions = $90f323912e688b98$var$objectHelper.blacklist(params, [ 14252 "sameSite" 14253 ]); 14254 $90f323912e688b98$var$js_cookie.set($90f323912e688b98$var$buildCompatCookieKey(key), value, legacyOptions); 14255 } 14256 this._options.cookieDomain && (params.domain = this._options.cookieDomain), $90f323912e688b98$var$js_cookie.set(key, value, params); 14257}, $90f323912e688b98$var$Warn.prototype.warning = function(message) { 14258 this.disableWarnings || console.warn(message); 14259}, $90f323912e688b98$var$StorageHandler.prototype.failover = function() { 14260 this.storage instanceof $90f323912e688b98$var$DummyStorage ? this.warn.warning("DummyStorage: ignore failover") : this.storage instanceof $90f323912e688b98$var$CookieStorage ? (this.warn.warning("CookieStorage: failing over DummyStorage"), this.storage = new $90f323912e688b98$var$DummyStorage) : (this.warn.warning("LocalStorage: failing over CookieStorage"), this.storage = new $90f323912e688b98$var$CookieStorage); 14261}, $90f323912e688b98$var$StorageHandler.prototype.getItem = function(key) { 14262 try { 14263 return this.storage.getItem(key); 14264 } catch (e) { 14265 return this.warn.warning(e), this.failover(), this.getItem(key); 14266 } 14267}, $90f323912e688b98$var$StorageHandler.prototype.removeItem = function(key) { 14268 try { 14269 return this.storage.removeItem(key); 14270 } catch (e) { 14271 return this.warn.warning(e), this.failover(), this.removeItem(key); 14272 } 14273}, $90f323912e688b98$var$StorageHandler.prototype.setItem = function(key, value, options) { 14274 try { 14275 return this.storage.setItem(key, value, options); 14276 } catch (e) { 14277 return this.warn.warning(e), this.failover(), this.setItem(key, value, options); 14278 } 14279}, $90f323912e688b98$var$Storage.prototype.getItem = function(key) { 14280 var value = this.handler.getItem(key); 14281 try { 14282 return JSON.parse(value); 14283 } catch (_) { 14284 return value; 14285 } 14286}, $90f323912e688b98$var$Storage.prototype.removeItem = function(key) { 14287 return this.handler.removeItem(key); 14288}, $90f323912e688b98$var$Storage.prototype.setItem = function(key, value, options) { 14289 var json = JSON.stringify(value); 14290 return this.handler.setItem(key, json, options); 14291}, $90f323912e688b98$var$SSODataStorage.prototype.set = function(connection, sub) { 14292 var ssodata = { 14293 lastUsedConnection: connection, 14294 lastUsedSub: sub 14295 }; 14296 this.storage.setItem("auth0.ssodata", JSON.stringify(ssodata)); 14297}, $90f323912e688b98$var$SSODataStorage.prototype.get = function() { 14298 var ssodata = this.storage.getItem("auth0.ssodata"); 14299 if (ssodata) return JSON.parse(ssodata); 14300}; 14301var $90f323912e688b98$var$error = { 14302 buildResponse: $90f323912e688b98$var$buildResponse, 14303 invalidToken: function(description) { 14304 return $90f323912e688b98$var$buildResponse("invalid_token", description); 14305 } 14306}; 14307function $90f323912e688b98$var$wrapCallback(cb, options) { 14308 return (options = options || {}).ignoreCasing = !!options.ignoreCasing && options.ignoreCasing, function(err, data) { 14309 var errObj; 14310 return err || data ? (!err && data.err && (err = data.err, data = null), !err && data.error && (err = data, data = null), err ? (errObj = { 14311 original: err 14312 }, $90f323912e688b98$var$objectHelper.updatePropertyOn(errObj, "original.response.req._data.password", "*****"), err.response && err.response.statusCode && (errObj.statusCode = err.response.statusCode), err.response && err.response.statusText && (errObj.statusText = err.response.statusText), err.response && err.response.body && (err = err.response.body), err.err && (err = err.err), errObj.code = err.code || err.error || err.error_code || err.status || null, errObj.description = err.errorDescription || err.error_description || err.description || err.error || err.details || err.err || null, options.forceLegacyError && (errObj.error = errObj.code, errObj.error_description = errObj.description), err.error_codes && err.error_details && (errObj.errorDetails = { 14313 codes: err.error_codes, 14314 details: err.error_details 14315 }), err.name && (errObj.name = err.name), err.policy && (errObj.policy = err.policy), cb(errObj)) : !data.type || "text/html" !== data.type && "text/plain" !== data.type ? options.ignoreCasing ? cb(null, data.body || data) : cb(null, $90f323912e688b98$var$objectHelper.toCamelCase(data.body || data, [], { 14316 keepOriginal: options.keepOriginalCasing 14317 })) : cb(null, data.text)) : cb($90f323912e688b98$var$error.buildResponse("generic_error", "Something went wrong")); 14318 }; 14319} 14320var $90f323912e688b98$var$tokenParams = [ 14321 "realm", 14322 "audience", 14323 "otp", 14324 "client_id", 14325 "client_secret", 14326 "redirect_uri", 14327 "scope", 14328 "code", 14329 "grant_type", 14330 "username", 14331 "password", 14332 "refresh_token", 14333 "assertion", 14334 "client_assertion", 14335 "client_assertion_type", 14336 "code_verifier" 14337], $90f323912e688b98$var$authorizeParams = [ 14338 "connection", 14339 "connection_scope", 14340 "auth0Client", 14341 "owp", 14342 "device", 14343 "realm", 14344 "organization", 14345 "invitation", 14346 "protocol", 14347 "_csrf", 14348 "_intstate", 14349 "login_ticket", 14350 "client_id", 14351 "response_type", 14352 "response_mode", 14353 "redirect_uri", 14354 "audience", 14355 "scope", 14356 "state", 14357 "nonce", 14358 "display", 14359 "prompt", 14360 "screen_hint", 14361 "max_age", 14362 "ui_locales", 14363 "claims_locales", 14364 "id_token_hint", 14365 "login_hint", 14366 "acr_values", 14367 "claims", 14368 "registration", 14369 "request", 14370 "request_uri", 14371 "code_challenge", 14372 "code_challenge_method", 14373 "access_type", 14374 "display" 14375]; 14376var $90f323912e688b98$var$parametersWhitelist = { 14377 oauthTokenParams: function(warn, params) { 14378 return $90f323912e688b98$var$objectHelper.pick(params, $90f323912e688b98$var$tokenParams); 14379 }, 14380 oauthAuthorizeParams: function(warn, params) { 14381 var notAllowed = $90f323912e688b98$var$objectHelper.getKeysNotIn(params, $90f323912e688b98$var$authorizeParams); 14382 return notAllowed.length > 0 && warn.warning("Following parameters are not allowed on the `/authorize` endpoint: [" + notAllowed.join(",") + "]"), params; 14383 } 14384}, $90f323912e688b98$var$t = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof $parcel$global ? $parcel$global : "undefined" != typeof self ? self : {}; 14385function $90f323912e688b98$var$e(t) { 14386 var e = { 14387 exports: {} 14388 }; 14389 return t(e, e.exports), e.exports; 14390} 14391var $90f323912e688b98$var$r = $90f323912e688b98$var$e(function(e, r) { 14392 e.exports = function() { 14393 function e(t) { 14394 return "function" == typeof t; 14395 } 14396 var r = Array.isArray ? Array.isArray : function(t) { 14397 return "[object Array]" === Object.prototype.toString.call(t); 14398 }, i = 0, n = void 0, o = void 0, s = function(t, e) { 14399 l[i] = t, l[i + 1] = e, 2 === (i += 2) && (o ? o(d) : w()); 14400 }, h = "undefined" != typeof window ? window : void 0, u = h || {}, a = u.MutationObserver || u.WebKitMutationObserver, f = "undefined" == typeof self && false, c = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" != typeof MessageChannel; 14401 function p() { 14402 var t = setTimeout; 14403 return function() { 14404 return t(d, 1); 14405 }; 14406 } 14407 var l = new Array(1e3); 14408 function d() { 14409 for(var t = 0; t < i; t += 2)(0, l[t])(l[t + 1]), l[t] = void 0, l[t + 1] = void 0; 14410 i = 0; 14411 } 14412 var m, v, y, g, w = void 0; 14413 function T(t, e) { 14414 var r = this, i = new this.constructor(S); 14415 void 0 === i[_] && N(i); 14416 var n = r._state; 14417 if (n) { 14418 var o = arguments[n - 1]; 14419 s(function() { 14420 return O(n, i, o, r._result); 14421 }); 14422 } else C(r, i, t, e); 14423 return i; 14424 } 14425 function b(t) { 14426 if (t && "object" == typeof t && t.constructor === this) return t; 14427 var e = new this(S); 14428 return E(e, t), e; 14429 } 14430 w = f ? function() { 14431 return $5957ddbc692cbfa8$exports.nextTick(d); 14432 } : a ? (v = 0, y = new a(d), g = document.createTextNode(""), y.observe(g, { 14433 characterData: !0 14434 }), function() { 14435 g.data = v = ++v % 2; 14436 }) : c ? ((m = new MessageChannel).port1.onmessage = d, function() { 14437 return m.port2.postMessage(0); 14438 }) : void 0 === h ? function() { 14439 try { 14440 var t = Function("return this")().require("vertx"); 14441 return void 0 !== (n = t.runOnLoop || t.runOnContext) ? function() { 14442 n(d); 14443 } : p(); 14444 } catch (t) { 14445 return p(); 14446 } 14447 }() : p(); 14448 var _ = Math.random().toString(36).substring(2); 14449 function S() {} 14450 var A = void 0; 14451 function x(t, r, i) { 14452 r.constructor === t.constructor && i === T && r.constructor.resolve === b ? function(t, e) { 14453 1 === e._state ? I(t, e._result) : 2 === e._state ? M(t, e._result) : C(e, void 0, function(e) { 14454 return E(t, e); 14455 }, function(e) { 14456 return M(t, e); 14457 }); 14458 }(t, r) : void 0 === i ? I(t, r) : e(i) ? function(t, e, r) { 14459 s(function(t) { 14460 var i = !1, n = function(r, n, o, s) { 14461 try { 14462 r.call(n, function(r) { 14463 i || (i = !0, e !== r ? E(t, r) : I(t, r)); 14464 }, function(e) { 14465 i || (i = !0, M(t, e)); 14466 }); 14467 } catch (t) { 14468 return t; 14469 } 14470 }(r, e); 14471 !i && n && (i = !0, M(t, n)); 14472 }, t); 14473 }(t, r, i) : I(t, r); 14474 } 14475 function E(t, e) { 14476 if (t === e) M(t, new TypeError("You cannot resolve a promise with itself")); 14477 else if (n = typeof (i = e), null === i || "object" !== n && "function" !== n) I(t, e); 14478 else { 14479 var r = void 0; 14480 try { 14481 r = e.then; 14482 } catch (e) { 14483 return void M(t, e); 14484 } 14485 x(t, e, r); 14486 } 14487 var i, n; 14488 } 14489 function k(t) {
14490 t._onerror && t._onerror(t._result), R(t); 14491 } 14492 function I(t, e) { 14493 t._state === A && (t._result = e, t._state = 1, 0 !== t._subscribers.length && s(R, t)); 14494 } 14495 function M(t, e) { 14496 t._state === A && (t._state = 2, t._result = e, s(k, t)); 14497 } 14498 function C(t, e, r, i) { 14499 var n = t._subscribers, o = n.length; 14500 t._onerror = null, n[o] = e, n[o + 1] = r, n[o + 2] = i, 0 === o && t._state && s(R, t); 14501 } 14502 function R(t) { 14503 var e = t._subscribers, r = t._state; 14504 if (0 !== e.length) { 14505 for(var i = void 0, n = void 0, o = t._result, s = 0; s < e.length; s += 3)n = e[s + r], (i = e[s]) ? O(r, i, n, o) : n(o); 14506 t._subscribers.length = 0; 14507 } 14508 } 14509 function O(t, r, i, n) { 14510 var o = e(i), s = void 0, h = void 0, u = !0; 14511 if (o) { 14512 try { 14513 s = i(n); 14514 } catch (t) { 14515 u = !1, h = t; 14516 } 14517 if (r === s) return void M(r, new TypeError("A promises callback cannot return that same promise.")); 14518 } else s = n; 14519 r._state !== A || (o && u ? E(r, s) : !1 === u ? M(r, h) : 1 === t ? I(r, s) : 2 === t && M(r, s)); 14520 } 14521 var j = 0; 14522 function N(t) { 14523 t[_] = j++, t._state = void 0, t._result = void 0, t._subscribers = []; 14524 } 14525 var P = function() { 14526 function t(t, e) { 14527 this._instanceConstructor = t, this.promise = new t(S), this.promise[_] || N(this.promise), r(e) ? (this.length = e.length, this._remaining = e.length, this._result = new Array(this.length), 0 === this.length ? I(this.promise, this._result) : (this.length = this.length || 0, this._enumerate(e), 0 === this._remaining && I(this.promise, this._result))) : M(this.promise, new Error("Array Methods must be provided an Array")); 14528 } 14529 return t.prototype._enumerate = function(t) { 14530 for(var e = 0; this._state === A && e < t.length; e++)this._eachEntry(t[e], e); 14531 }, t.prototype._eachEntry = function(t, e) { 14532 var r = this._instanceConstructor, i = r.resolve; 14533 if (i === b) { 14534 var n = void 0, o = void 0, s = !1; 14535 try { 14536 n = t.then; 14537 } catch (t) { 14538 s = !0, o = t; 14539 } 14540 if (n === T && t._state !== A) this._settledAt(t._state, e, t._result); 14541 else if ("function" != typeof n) this._remaining--, this._result[e] = t; 14542 else if (r === V) { 14543 var h = new r(S); 14544 s ? M(h, o) : x(h, t, n), this._willSettleAt(h, e); 14545 } else this._willSettleAt(new r(function(e) { 14546 return e(t); 14547 }), e); 14548 } else this._willSettleAt(i(t), e); 14549 }, t.prototype._settledAt = function(t, e, r) { 14550 var i = this.promise; 14551 i._state === A && (this._remaining--, 2 === t ? M(i, r) : this._result[e] = r), 0 === this._remaining && I(i, this._result); 14552 }, t.prototype._willSettleAt = function(t, e) { 14553 var r = this; 14554 C(t, void 0, function(t) { 14555 return r._settledAt(1, e, t); 14556 }, function(t) { 14557 return r._settledAt(2, e, t); 14558 }); 14559 }, t; 14560 }(), V = function() { 14561 function t(e) { 14562 this[_] = j++, this._result = this._state = void 0, this._subscribers = [], S !== e && ("function" != typeof e && function() { 14563 throw new TypeError("You must pass a resolver function as the first argument to the promise constructor"); 14564 }(), this instanceof t ? function(t, e) { 14565 try { 14566 e(function(e) { 14567 E(t, e); 14568 }, function(e) { 14569 M(t, e); 14570 }); 14571 } catch (e) { 14572 M(t, e); 14573 } 14574 }(this, e) : function() { 14575 throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
14575onstructor cannot be called as a function."); 14576 }()); 14577 } 14578 return t.prototype.catch = function(t) { 14579 return this.then(null, t); 14580 }, t.prototype.finally = function(t) { 14581 var r = this, i = r.constructor; 14582 return e(t) ? r.then(function(e) { 14583 return i.resolve(t()).then(function() { 14584 return e; 14585 }); 14586 }, function(e) { 14587 return i.resolve(t()).then(function() { 14588 throw e; 14589 }); 14590 }) : r.then(t, t); 14591 }, t; 14592 }(); 14593 return V.prototype.then = T, V.all = function(t) { 14594 return new P(this, t).promise; 14595 }, V.race = function(t) { 14596 var e = this; 14597 return r(t) ? new e(function(r, i) { 14598 for(var n = t.length, o = 0; o < n; o++)e.resolve(t[o]).then(r, i); 14599 }) : new e(function(t, e) { 14600 return e(new TypeError("You must pass an array to race.")); 14601 }); 14602 }, V.resolve = b, V.reject = function(t) { 14603 var e = new this(S); 14604 return M(e, t), e; 14605 }, V._setScheduler = function(t) { 14606 o = t; 14607 }, V._setAsap = function(t) { 14608 s = t; 14609 }, V._asap = s, V.polyfill = function() { 14610 var e = void 0; 14611 if (void 0 !== $90f323912e688b98$var$t) e = $90f323912e688b98$var$t; 14612 else if ("undefined" != typeof self) e = self; 14613 else try { 14614 e = Function("return this")(); 14615 } catch (t) { 14616 throw new Error("polyfill failed because global object is unavailable in this environment"); 14617 } 14618 var r = e.Promise; 14619 if (r) { 14620 var i = null; 14621 try { 14622 i = Object.prototype.toString.call(r.resolve()); 14623 } catch (t) {} 14624 if ("[object Promise]" === i && !r.cast) return; 14625 } 14626 e.Promise = V; 14627 }, V.Promise = V, V; 14628 }(); 14629}), $90f323912e688b98$var$i$1 = { 14630 __proto__: null, 14631 default: {} 14632}, $90f323912e688b98$var$n = $90f323912e688b98$var$e(function(e, r) { 14633 var n; 14634 e.exports = n = n || function(e, r) { 14635 var n; 14636 if ("undefined" != typeof window && window.crypto && (n = window.crypto), "undefined" != typeof self && self.crypto && (n = self.crypto), "undefined" != typeof globalThis && globalThis.crypto && (n = globalThis.crypto), !n && "undefined" != typeof window && window.msCrypto && (n = window.msCrypto), !n && void 0 !== $90f323912e688b98$var$t && $90f323912e688b98$var$t.crypto && (n = $90f323912e688b98$var$t.crypto), !n) try { 14637 n = $90f323912e688b98$var$i$1; 14638 } catch (t) {} 14639 var o = function() { 14640 if (n) { 14641 if ("function" == typeof n.getRandomValues) try { 14642 return n.getRandomValues(new Uint32Array(1))[0]; 14643 } catch (t) {} 14644 if ("function" == typeof n.randomBytes) try { 14645 return n.randomBytes(4).readInt32LE(); 14646 } catch (t) {} 14647 } 14648 throw new Error("Native crypto module could not be used to get secure random number."); 14649 }, s = Object.create || function() { 14650 function t() {} 14651 return function(e) { 14652 var r; 14653 return t.prototype = e, r = new t, t.prototype = null, r; 14654 }; 14655 }(), h = {}, u = h.lib = {}, a = u.Base = { 14656 extend: function(t) { 14657 var e = s(this); 14658 return t && e.mixIn(t), e.hasOwnProperty("init") && this.init !== e.init || (e.init = function() { 14659 e.$super.init.apply(this, arguments); 14660 }), e.init.prototype = e, e.$super = this, e; 14661 }, 14662 create: function() { 14663 var t = this.extend(); 14664 return t.init.apply(t, arguments), t; 14665 }, 14666 init: function() {}, 14667 mixIn: function(t) { 14668 for(var e in t)t.hasOwnProperty(e) && (this[e] = t[e]); 14669 t.hasOwnProperty("toString") && (this.toString = t.toString); 14670 }, 14671 clone: function() { 14672 return this.init.prototype.extend(this); 14673 } 14674 }, f = u.WordArray = a.extend({ 14675 init: function(t, e) { 14676 t = this.words = t || [], this.sigBytes = null != e ? e : 4 * t.length; 14677 }, 14678 toString: function(t) { 14679 return (t || p).stringify(this); 14680 }, 14681 concat: function(t) { 14682 var e = this.words, r = t.words, i = this.sigBytes, n = t.sigBytes; 14683 if (this.clamp(), i % 4) for(var o = 0; o < n; o++)e[i + o >>> 2] |= (r[o >>> 2] >>> 24 - o % 4 * 8 & 255) << 24 - (i + o) % 4 * 8; 14684 else for(var s = 0; s < n; s += 4)e[i + s >>> 2] = r[s >>> 2]; 14685 return this.sigBytes += n, this; 14686 }, 14687 clamp: function() { 14688 var t = this.words, r = this.sigBytes; 14689 t[r >>> 2] &= 4294967295 << 32 - r % 4 * 8, t.length = e.ceil(r / 4); 14690 }, 14691 clone: function() { 14692 var t = a.clone.call(this); 14693 return t.words = this.words.slice(0), t; 14694 }, 14695 random: function(t) { 14696 for(var e = [], r = 0; r < t; r += 4)e.push(o()); 14697 return new f.init(e, t); 14698 } 14699 }), c = h.enc = {}, p = c.Hex = {
14700 stringify: function(t) { 14701 for(var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n++){ 14702 var o = e[n >>> 2] >>> 24 - n % 4 * 8 & 255; 14703 i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)); 14704 } 14705 return i.join(""); 14706 }, 14707 parse: function(t) { 14708 for(var e = t.length, r = [], i = 0; i < e; i += 2)r[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; 14709 return new f.init(r, e / 2); 14710 } 14711 }, l = c.Latin1 = { 14712 stringify: function(t) { 14713 for(var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n++)i.push(String.fromCharCode(e[n >>> 2] >>> 24 - n % 4 * 8 & 255)); 14714 return i.join(""); 14715 }, 14716 parse: function(t) { 14717 for(var e = t.length, r = [], i = 0; i < e; i++)r[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; 14718 return new f.init(r, e); 14719 } 14720 }, d = c.Utf8 = { 14721 stringify: function(t) { 14722 try { 14723 return decodeURIComponent(escape(l.stringify(t))); 14724 } catch (t) { 14725 throw new Error("Malformed UTF-8 data"); 14726 } 14727 }, 14728 parse: function(t) { 14729 return l.parse(unescape(encodeURIComponent(t))); 14730 } 14731 }, m = u.BufferedBlockAlgorithm = a.extend({ 14732 reset: function() { 14733 this._data = new f.init, this._nDataBytes = 0; 14734 }, 14735 _append: function(t) { 14736 "string" == typeof t && (t = d.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes; 14737 }, 14738 _process: function(t) { 14739 var r, i = this._data, n = i.words, o = i.sigBytes, s = this.blockSize, h = o / (4 * s), u = (h = t ? e.ceil(h) : e.max((0 | h) - this._minBufferSize, 0)) * s, a = e.min(4 * u, o); 14740 if (u) { 14741 for(var c = 0; c < u; c += s)this._doProcessBlock(n, c); 14742 r = n.splice(0, u), i.sigBytes -= a; 14743 } 14744 return new f.init(r, a); 14745 }, 14746 clone: function() { 14747 var t = a.clone.call(this); 14748 return t._data = this._data.clone(), t; 14749 }, 14750 _minBufferSize: 0 14751 }); 14752 u.Hasher = m.extend({ 14753 cfg: a.extend(), 14754 init: function(t) { 14755 this.cfg = this.cfg.extend(t), this.reset(); 14756 }, 14757 reset: function() { 14758 m.reset.call(this), this._doReset(); 14759 }, 14760 update: function(t) { 14761 return this._append(t), this._process(), this; 14762 }, 14763 finalize: function(t) { 14764 return t && this._append(t), this._doFinalize(); 14765 }, 14766 blockSize: 16, 14767 _createHelper: function(t) { 14768 return function(e, r) { 14769 return new t.init(r).finalize(e); 14770 }; 14771 }, 14772 _createHmacHelper: function(t) { 14773 return function(e, r) { 14774 return new v.HMAC.init(t, r).finalize(e); 14775 }; 14776 } 14777 }); 14778 var v = h.algo = {}; 14779 return h; 14780 }(Math); 14781}), $90f323912e688b98$var$o = $90f323912e688b98$var$e(function(t, e) { 14782 var r; 14783 t.exports = (r = $90f323912e688b98$var$n, function(t) { 14784 var e = r, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, h = [], u = []; 14785 !function() { 14786 function e(e) { 14787 for(var r = t.sqrt(e), i = 2; i <= r; i++)if (!(e % i)) return !1; 14788 return !0; 14789 } 14790 function r(t) { 14791 return 4294967296 * (t - (0 | t)) | 0; 14792 } 14793 for(var i = 2, n = 0; n < 64;)e(i) && (n < 8 && (h[n] = r(t.pow(i, .5))), u[n] = r(t.pow(i, 1 / 3)), n++), i++; 14794 }(); 14795 var a = [], f = s.SHA256 = o.extend({ 14796 _doReset: function() { 14797 this._hash = new n.init(h.slice(0)); 14798 }, 14799 _doProcessBlock: function(t, e) { 14800 for(var r = this._hash.words, i = r[0], n = r[1], o = r[2], s = r[3], h = r[4], f = r[5], c = r[6], p = r[7], l = 0; l < 64; l++){ 14801 if (l < 16) a[l] = 0 | t[e + l]; 14802 else { 14803 var d = a[l - 15], m = a[l - 2]; 14804 a[l] = ((d << 25 | d >>> 7) ^ (d << 14 | d >>> 18) ^ d >>> 3) + a[l - 7] + ((m << 15 | m >>> 17) ^ (m << 13 | m >>> 19) ^ m >>> 10) + a[l - 16]; 14805 } 14806 var v = i & n ^ i & o ^ n & o, y = p + ((h << 26 | h >>> 6) ^ (h << 21 | h >>> 11) ^ (h << 7 | h >>> 25)) + (h & f ^ ~h & c) + u[l] + a[l];
14807 p = c, c = f, f = h, h = s + y | 0, s = o, o = n, n = i, i = y + (((i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22)) + v) | 0; 14808 } 14809 r[0] = r[0] + i | 0, r[1] = r[1] + n | 0, r[2] = r[2] + o | 0, r[3] = r[3] + s | 0, r[4] = r[4] + h | 0, r[5] = r[5] + f | 0, r[6] = r[6] + c | 0, r[7] = r[7] + p | 0; 14810 }, 14811 _doFinalize: function() { 14812 var e = this._data, r = e.words, i = 8 * this._nDataBytes, n = 8 * e.sigBytes; 14813 return r[n >>> 5] |= 128 << 24 - n % 32, r[14 + (n + 64 >>> 9 << 4)] = t.floor(i / 4294967296), r[15 + (n + 64 >>> 9 << 4)] = i, e.sigBytes = 4 * r.length, this._process(), this._hash; 14814 }, 14815 clone: function() { 14816 var t = o.clone.call(this); 14817 return t._hash = this._hash.clone(), t; 14818 } 14819 }); 14820 e.SHA256 = o._createHelper(f), e.HmacSHA256 = o._createHmacHelper(f); 14821 }(Math), r.SHA256); 14822}), $90f323912e688b98$var$s = $90f323912e688b98$var$e(function(t, e) { 14823 var r, i; 14824 t.exports = (i = (r = $90f323912e688b98$var$n).lib.WordArray, r.enc.Base64 = { 14825 stringify: function(t) { 14826 var e = t.words, r = t.sigBytes, i = this._map; 14827 t.clamp(); 14828 for(var n = [], o = 0; o < r; o += 3)for(var s = (e[o >>> 2] >>> 24 - o % 4 * 8 & 255) << 16 | (e[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255) << 8 | e[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = 0; h < 4 && o + .75 * h < r; h++)n.push(i.charAt(s >>> 6 * (3 - h) & 63)); 14829 var u = i.charAt(64); 14830 if (u) for(; n.length % 4;)n.push(u); 14831 return n.join(""); 14832 }, 14833 parse: function(t) { 14834 var e = t.length, r = this._map, n = this._reverseMap; 14835 if (!n) { 14836 n = this._reverseMap = []; 14837 for(var o = 0; o < r.length; o++)n[r.charCodeAt(o)] = o; 14838 } 14839 var s = r.charAt(64); 14840 if (s) { 14841 var h = t.indexOf(s); 14842 -1 !== h && (e = h); 14843 } 14844 return function(t, e, r) { 14845 for(var n = [], o = 0, s = 0; s < e; s++)if (s % 4) { 14846 var h = r[t.charCodeAt(s - 1)] << s % 4 * 2, u = r[t.charCodeAt(s)] >>> 6 - s % 4 * 2; 14847 n[o >>> 2] |= (h | u) << 24 - o % 4 * 8, o++; 14848 } 14849 return i.create(n, o); 14850 }(t, e, n); 14851 }, 14852 _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" 14853 }, r.enc.Base64); 14854}), $90f323912e688b98$var$h = $90f323912e688b98$var$e(function(t, e) { 14855 t.exports = $90f323912e688b98$var$n.enc.Hex; 14856}), $90f323912e688b98$var$u = $90f323912e688b98$var$e(function(e, r) { 14857 (function() { 14858 var t; 14859 function r(t, e, r) { 14860 null != t && ("number" == typeof t ? this.fromNumber(t, e, r) : this.fromString(t, null == e && "string" != typeof t ? 256 : e)); 14861 } 14862 function i() { 14863 return new r(null); 14864 } 14865 var n = "undefined" != typeof navigator; 14866 n && "Microsoft Internet Explorer" == navigator.appName ? (r.prototype.am = function(t, e, r, i, n, o) { 14867 for(var s = 32767 & e, h = e >> 15; --o >= 0;){ 14868 var u = 32767 & this[t], a = this[t++] >> 15, f = h * u + a * s; 14869 n = ((u = s * u + ((32767 & f) << 15) + r[i] + (1073741823 & n)) >>> 30) + (f >>> 15) + h * a + (n >>> 30), r[i++] = 1073741823 & u; 14870 } 14871 return n; 14872 }, t = 30) : n && "Netscape" != navigator.appName ? (r.prototype.am = function(t, e, r, i, n, o) { 14873 for(; --o >= 0;){ 14874 var s = e * this[t++] + r[i] + n; 14875 n = Math.floor(s / 67108864), r[i++] = 67108863 & s; 14876 } 14877 return n; 14878 }, t = 26) : (r.prototype.am = function(t, e, r, i, n, o) { 14879 for(var s = 16383 & e, h = e >> 14; --o >= 0;){ 14880 var u = 16383 & this[t], a = this[t++] >> 14, f = h * u + a * s; 14881 n = ((u = s * u + ((16383 & f) << 14) + r[i] + n) >> 28) + (f >> 14) + h * a, r[i++] = 268435455 & u; 14882 } 14883 return n; 14884 }, t = 28), r.prototype.DB = t, r.prototype.DM = (1 << t) - 1, r.prototype.DV = 1 << t, r.prototype.FV = Math.pow(2, 52), r.prototype.F1 = 52 - t, r.prototype.F2 = 2 * t - 52; 14885 var o, s, h = new Array; 14886 for(o = "0".charCodeAt(0), s = 0; s <= 9; ++s)h[o++] = s; 14887 for(o = "a".charCodeAt(0), s = 10; s < 36; ++s)h[o++] = s; 14888 for(o = "A".charCodeAt(0), s = 10; s < 36; ++s)h[o++] = s; 14889 function u(t) { 14890 return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(t); 14891 } 14892 function a(t, e) { 14893 var r = h[t.charCodeAt(e)]; 14894 return null == r ? -1 : r; 14895 } 14896 function f(t) { 14897 var e = i(); 14898 return e.fromInt(t), e; 14899 } 14900 function c(t) { 14901 var e, r = 1; 14902 return 0 != (e = t >>> 16) && (t = e, r += 16), 0 != (e = t >> 8) && (t = e, r += 8), 0 != (e = t >> 4) && (t = e, r += 4), 0 != (e = t >> 2) && (t = e, r += 2), 0 != (e = t >> 1) && (t = e, r += 1), r; 14903 } 14904 function p(t) { 14905 this.m = t; 14906 } 14907 function l(t) { 14908 this.m = t, this.mp = t.invDigit(), this.mpl = 32767 & this.mp, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t; 14909 } 14910 function d(t, e) { 14911 return t & e; 14912 } 14913 function m(t, e) { 14914 return t | e; 14915 } 14916 function v(t, e) { 14917 return t ^ e; 14918 } 14919 function y(t, e) { 14920 return t & ~e; 14921 } 14922 function g(t) { 14923 if (0 == t) return -1; 14924 var e = 0; 14925 return 0 == (65535 & t) && (t >>= 16, e += 16), 0 == (255 & t) && (t >>= 8, e += 8), 0 == (15 & t) && (t >>= 4, e += 4), 0 == (3 & t) && (t >>= 2, e += 2), 0 == (1 & t) && ++e, e; 14926 } 14927 function w(t) { 14928 for(var e = 0; 0 != t;)t &= t - 1, ++e; 14929 return e; 14930 } 14931 function T() {} 14932 function b(t) { 14933 return t; 14934 } 14935 function _(t) { 14936 this.r2 = i(), this.q3 = i(), r.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t), this.m = t; 14937 } 14938 p.prototype.convert = function(t) { 14939 return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t; 14940 }, p.prototype.revert = function(t) { 14941 return t; 14942 }, p.prototype.reduce = function(t) { 14943 t.divRemTo(this.m, null, t); 14944 }, p.prototype.mulTo = function(t, e, r) { 14945 t.multiplyTo(e, r), this.reduce(r); 14946 }, p.prototype.sqrTo = function(t, e) { 14947 t.squareTo(e), this.reduce(e); 14948 }, l.prototype.convert = function(t) { 14949 var e = i(); 14950 return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(r.ZERO) > 0 && this.m.subTo(e, e), e; 14951 }, l.prototype.revert = function(t) { 14952 var e = i(); 14953 return t.copyTo(e), this.reduce(e), e; 14954 }, l.prototype.reduce = function(t) { 14955 for(; t.t <= this.mt2;)t[t.t++] = 0; 14956 for(var e = 0; e < this.m.t; ++e){ 14957 var r = 32767 & t[e], i = r * this.mpl + ((r * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM; 14958 for(t[r = e + this.m.t] += this.m.am(0, i, t, e, 0, this.m.t); t[r] >= t.DV;)t[r] -= t.DV, t[++r]++; 14959 } 14960 t.clamp(), t.drShiftTo(this.m.t, t), t.compareTo(this.m) >= 0 && t.subTo(this.m, t); 14961 }, l.prototype.mulTo = function(t, e, r) { 14962 t.multiplyTo(e, r), this.reduce(r); 14963 }, l.prototype.sqrTo = function(t, e) { 14964 t.squareTo(e), this.reduce(e); 14965 }, r.prototype.copyTo = function(t) { 14966 for(var e = this.t - 1; e >= 0; --e)t[e] = this[e]; 14967 t.t = this.t, t.s = this.s; 14968 }, r.prototype.fromInt = function(t) { 14969 this.t = 1, this.s = t < 0 ? -1 : 0, t > 0 ? this[0] = t : t < -1 ? this[0] = t + this.DV : this.t = 0; 14970 }, r.prototype.fromString = function(t, e) { 14971 var i; 14972 if (16 == e) i = 4; 14973 else if (8 == e) i = 3; 14974 else if (256 == e) i = 8; 14975 else if (2 == e) i = 1; 14976 else if (32 == e) i = 5; 14977 else { 14978 if (4 != e) return void this.fromRadix(t, e); 14979 i = 2; 14980 } 14981 this.t = 0, this.s = 0; 14982 for(var n = t.length, o = !1, s = 0; --n >= 0;){ 14983 var h = 8 == i ? 255 & t[n] : a(t, n); 14984 h < 0 ? "-" == t.charAt(n) && (o = !0) : (o = !1, 0 == s ? this[this.t++] = h : s + i > this.DB ? (this[this.t - 1] |= (h & (1 << this.DB - s) - 1) << s, this[this.t++] = h >> this.DB - s) : this[this.t - 1] |= h << s, (s += i) >= this.DB && (s -= this.DB)); 14985 } 14986 8 == i && 0 != (128 & t[0]) && (this.s = -1, s > 0 && (this[this.t - 1] |= (1 << this.DB - s) - 1 << s)), this.clamp(), o && r.ZERO.subTo(this, this); 14987 }, r.prototype.clamp = function() { 14988 for(var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t;)--this.t; 14989 }, r.prototype.dlShiftTo = function(t, e) { 14990 var r; 14991 for(r = this.t - 1; r >= 0; --r)e[r + t] = this[r]; 14992 for(r = t - 1; r >= 0; --r)e[r] = 0; 14993 e.t = this.t + t, e.s = this.s; 14994 }, r.prototype.drShiftTo = function(t, e) { 14995 for(var r = t; r < this.t; ++r)e[r - t] = this[r]; 14996 e.t = Math.max(this.t - t, 0), e.s = this.s; 14997 }, r.prototype.lShiftTo = function(t, e) { 14998 var r, i = t % this.DB, n = this.DB - i, o = (1 << n) - 1, s = Math.floor(t / this.DB), h = this.s << i & this.DM; 14999 for(r = this.t - 1; r >= 0; --r)e[r + s + 1] = this[r] >> n | h, h = (this[r] & o) << i;
vendor: 14,162 bytes, lines 15000-15360
15000 for(r = s - 1; r >= 0; --r)e[r] = 0; 15001 e[s] = h, e.t = this.t + s + 1, e.s = this.s, e.clamp(); 15002 }, r.prototype.rShiftTo = function(t, e) { 15003 e.s = this.s; 15004 var r = Math.floor(t / this.DB); 15005 if (r >= this.t) e.t = 0; 15006 else { 15007 var i = t % this.DB, n = this.DB - i, o = (1 << i) - 1; 15008 e[0] = this[r] >> i; 15009 for(var s = r + 1; s < this.t; ++s)e[s - r - 1] |= (this[s] & o) << n, e[s - r] = this[s] >> i; 15010 i > 0 && (e[this.t - r - 1] |= (this.s & o) << n), e.t = this.t - r, e.clamp(); 15011 } 15012 }, r.prototype.subTo = function(t, e) { 15013 for(var r = 0, i = 0, n = Math.min(t.t, this.t); r < n;)i += this[r] - t[r], e[r++] = i & this.DM, i >>= this.DB; 15014 if (t.t < this.t) { 15015 for(i -= t.s; r < this.t;)i += this[r], e[r++] = i & this.DM, i >>= this.DB; 15016 i += this.s; 15017 } else { 15018 for(i += this.s; r < t.t;)i -= t[r], e[r++] = i & this.DM, i >>= this.DB; 15019 i -= t.s; 15020 } 15021 e.s = i < 0 ? -1 : 0, i < -1 ? e[r++] = this.DV + i : i > 0 && (e[r++] = i), e.t = r, e.clamp(); 15022 }, r.prototype.multiplyTo = function(t, e) { 15023 var i = this.abs(), n = t.abs(), o = i.t; 15024 for(e.t = o + n.t; --o >= 0;)e[o] = 0; 15025 for(o = 0; o < n.t; ++o)e[o + i.t] = i.am(0, n[o], e, o, 0, i.t); 15026 e.s = 0, e.clamp(), this.s != t.s && r.ZERO.subTo(e, e); 15027 }, r.prototype.squareTo = function(t) { 15028 for(var e = this.abs(), r = t.t = 2 * e.t; --r >= 0;)t[r] = 0; 15029 for(r = 0; r < e.t - 1; ++r){ 15030 var i = e.am(r, e[r], t, 2 * r, 0, 1); 15031 (t[r + e.t] += e.am(r + 1, 2 * e[r], t, 2 * r + 1, i, e.t - r - 1)) >= e.DV && (t[r + e.t] -= e.DV, t[r + e.t + 1] = 1); 15032 } 15033 t.t > 0 && (t[t.t - 1] += e.am(r, e[r], t, 2 * r, 0, 1)), t.s = 0, t.clamp(); 15034 }, r.prototype.divRemTo = function(t, e, n) { 15035 var o = t.abs(); 15036 if (!(o.t <= 0)) { 15037 var s = this.abs(); 15038 if (s.t < o.t) return null != e && e.fromInt(0), void (null != n && this.copyTo(n)); 15039 null == n && (n = i()); 15040 var h = i(), u = this.s, a = t.s, f = this.DB - c(o[o.t - 1]); 15041 f > 0 ? (o.lShiftTo(f, h), s.lShiftTo(f, n)) : (o.copyTo(h), s.copyTo(n)); 15042 var p = h.t, l = h[p - 1]; 15043 if (0 != l) { 15044 var d = l * (1 << this.F1) + (p > 1 ? h[p - 2] >> this.F2 : 0), m = this.FV / d, v = (1 << this.F1) / d, y = 1 << this.F2, g = n.t, w = g - p, T = null == e ? i() : e; 15045 for(h.dlShiftTo(w, T), n.compareTo(T) >= 0 && (n[n.t++] = 1, n.subTo(T, n)), r.ONE.dlShiftTo(p, T), T.subTo(h, h); h.t < p;)h[h.t++] = 0; 15046 for(; --w >= 0;){ 15047 var b = n[--g] == l ? this.DM : Math.floor(n[g] * m + (n[g - 1] + y) * v); 15048 if ((n[g] += h.am(0, b, n, w, 0, p)) < b) for(h.dlShiftTo(w, T), n.subTo(T, n); n[g] < --b;)n.subTo(T, n); 15049 } 15050 null != e && (n.drShiftTo(p, e), u != a && r.ZERO.subTo(e, e)), n.t = p, n.clamp(), f > 0 && n.rShiftTo(f, n), u < 0 && r.ZERO.subTo(n, n); 15051 } 15052 } 15053 }, r.prototype.invDigit = function() { 15054 if (this.t < 1) return 0; 15055 var t = this[0]; 15056 if (0 == (1 & t)) return 0; 15057 var e = 3 & t; 15058 return (e = (e = (e = (e = e * (2 - (15 & t) * e) & 15) * (2 - (255 & t) * e) & 255) * (2 - ((65535 & t) * e & 65535)) & 65535) * (2 - t * e % this.DV) % this.DV) > 0 ? this.DV - e : -e; 15059 }, r.prototype.isEven = function() { 15060 return 0 == (this.t > 0 ? 1 & this[0] : this.s); 15061 }, r.prototype.exp = function(t, e) { 15062 if (t > 4294967295 || t < 1) return r.ONE; 15063 var n = i(), o = i(), s = e.convert(this), h = c(t) - 1; 15064 for(s.copyTo(n); --h >= 0;)if (e.sqrTo(n, o), (t & 1 << h) > 0) e.mulTo(o, s, n); 15065 else { 15066 var u = n; 15067 n = o, o = u; 15068 } 15069 return e.revert(n); 15070 }, r.prototype.toString = function(t) { 15071 if (this.s < 0) return "-" + this.negate().toString(t); 15072 var e; 15073 if (16 == t) e = 4; 15074 else if (8 == t) e = 3; 15075 else if (2 == t) e = 1; 15076 else if (32 == t) e = 5; 15077 else { 15078 if (4 != t) return this.toRadix(t); 15079 e = 2; 15080 } 15081 var r, i = (1 << e) - 1, n = !1, o = "", s = this.t, h = this.DB - s * this.DB % e; 15082 if (s-- > 0) for(h < this.DB && (r = this[s] >> h) > 0 && (n = !0, o = u(r)); s >= 0;)h < e ? (r = (this[s] & (1 << h) - 1) << e - h, r |= this[--s] >> (h += this.DB - e)) : (r = this[s] >> (h -= e) & i, h <= 0 && (h += this.DB, --s)), r > 0 && (n = !0), n && (o += u(r)); 15083 return n ? o : "0"; 15084 }, r.prototype.negate = function() { 15085 var t = i(); 15086 return r.ZERO.subTo(this, t), t; 15087 }, r.prototype.abs = function() { 15088 return this.s < 0 ? this.negate() : this; 15089 }, r.prototype.compareTo = function(t) { 15090 var e = this.s - t.s; 15091 if (0 != e) return e; 15092 var r = this.t; 15093 if (0 != (e = r - t.t)) return this.s < 0 ? -e : e; 15094 for(; --r >= 0;)if (0 != (e = this[r] - t[r])) return e; 15095 return 0; 15096 }, r.prototype.bitLength = function() { 15097 return this.t <= 0 ? 0 : this.DB * (this.t - 1) + c(this[this.t - 1] ^ this.s & this.DM); 15098 }, r.prototype.mod = function(t) { 15099 var e = i(); 15100 return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(r.ZERO) > 0 && t.subTo(e, e), e; 15101 }, r.prototype.modPowInt = function(t, e) { 15102 var r; 15103 return r = t < 256 || e.isEven() ? new p(e) : new l(e), this.exp(t, r); 15104 }, r.ZERO = f(0), r.ONE = f(1), T.prototype.convert = b, T.prototype.revert = b, T.prototype.mulTo = function(t, e, r) { 15105 t.multiplyTo(e, r); 15106 }, T.prototype.sqrTo = function(t, e) { 15107 t.squareTo(e); 15108 }, _.prototype.convert = function(t) { 15109 if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m); 15110 if (t.compareTo(this.m) < 0) return t; 15111 var e = i(); 15112 return t.copyTo(e), this.reduce(e), e; 15113 }, _.prototype.revert = function(t) { 15114 return t; 15115 }, _.prototype.reduce = function(t) { 15116 for(t.drShiftTo(this.m.t - 1, this.r2), t.t > this.m.t + 1 && (t.t = this.m.t + 1, t.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); t.compareTo(this.r2) < 0;)t.dAddOffset(1, this.m.t + 1); 15117 for(t.subTo(this.r2, t); t.compareTo(this.m) >= 0;)t.subTo(this.m, t); 15118 }, _.prototype.mulTo = function(t, e, r) { 15119 t.multiplyTo(e, r), this.reduce(r); 15120 }, _.prototype.sqrTo = function(t, e) { 15121 t.squareTo(e), this.reduce(e); 15122 }; 15123 var S, A, D, B = [ 15124 2, 15125 3, 15126 5, 15127 7, 15128 11, 15129 13, 15130 17, 15131 19, 15132 23, 15133 29, 15134 31, 15135 37, 15136 41, 15137 43, 15138 47, 15139 53, 15140 59, 15141 61, 15142 67, 15143 71, 15144 73, 15145 79, 15146 83, 15147 89, 15148 97, 15149 101, 15150 103, 15151 107, 15152 109, 15153 113, 15154 127, 15155 131, 15156 137, 15157 139, 15158 149, 15159 151, 15160 157, 15161 163, 15162 167, 15163 173, 15164 179, 15165 181, 15166 191, 15167 193, 15168 197, 15169 199, 15170 211, 15171 223, 15172 227, 15173 229, 15174 233, 15175 239, 15176 241, 15177 251, 15178 257, 15179 263, 15180 269, 15181 271, 15182 277, 15183 281, 15184 283, 15185 293, 15186 307, 15187 311, 15188 313, 15189 317, 15190 331, 15191 337, 15192 347, 15193 349, 15194 353, 15195 359, 15196 367, 15197 373, 15198 379, 15199 383, 15200 389, 15201 397, 15202 401, 15203 409, 15204 419, 15205 421, 15206 431, 15207 433, 15208 439, 15209 443, 15210 449, 15211 457, 15212 461, 15213 463, 15214 467, 15215 479, 15216 487, 15217 491, 15218 499, 15219 503, 15220 509, 15221 521, 15222 523, 15223 541, 15224 547, 15225 557, 15226 563, 15227 569, 15228 571, 15229 577, 15230 587, 15231 593, 15232 599, 15233 601, 15234 607, 15235 613, 15236 617, 15237 619, 15238 631, 15239 641, 15240 643, 15241 647, 15242 653, 15243 659, 15244 661, 15245 673, 15246 677, 15247 683, 15248 691, 15249 701, 15250 709, 15251 719, 15252 727, 15253 733, 15254 739, 15255 743, 15256 751, 15257 757, 15258 761, 15259 769, 15260 773, 15261 787, 15262 797, 15263 809, 15264 811, 15265 821, 15266 823, 15267 827, 15268 829, 15269 839, 15270 853, 15271 857, 15272 859, 15273 863, 15274 877, 15275 881, 15276 883, 15277 887, 15278 907, 15279 911, 15280 919, 15281 929, 15282 937, 15283 941, 15284 947, 15285 953, 15286 967, 15287 971, 15288 977, 15289 983, 15290 991, 15291 997 15292 ], x = 67108864 / B[B.length - 1]; 15293 function E() { 15294 var t; 15295 t = (new Date).getTime(), A[D++] ^= 255 & t, A[D++] ^= t >> 8 & 255, A[D++] ^= t >> 16 & 255, A[D++] ^= t >> 24 & 255, D >= j && (D -= j); 15296 } 15297 if (r.prototype.chunkSize = function(t) { 15298 return Math.floor(Math.LN2 * this.DB / Math.log(t)); 15299 }, r.prototype.toRadix = function(t) { 15300 if (null == t && (t = 10), 0 == this.signum() || t < 2 || t > 36) return "0"; 15301 var e = this.chunkSize(t), r = Math.pow(t, e), n = f(r), o = i(), s = i(), h = ""; 15302 for(this.divRemTo(n, o, s); o.signum() > 0;)h = (r + s.intValue()).toString(t).substr(1) + h, o.divRemTo(n, o, s); 15303 return s.intValue().toString(t) + h; 15304 }, r.prototype.fromRadix = function(t, e) { 15305 this.fromInt(0), null == e && (e = 10); 15306 for(var i = this.chunkSize(e), n = Math.pow(e, i), o = !1, s = 0, h = 0, u = 0; u < t.length; ++u){ 15307 var f = a(t, u); 15308 f < 0 ? "-" == t.charAt(u) && 0 == this.signum() && (o = !0) : (h = e * h + f, ++s >= i && (this.dMultiply(n), this.dAddOffset(h, 0), s = 0, h = 0)); 15309 } 15310 s > 0 && (this.dMultiply(Math.pow(e, s)), this.dAddOffset(h, 0)), o && r.ZERO.subTo(this, this); 15311 }, r.prototype.fromNumber = function(t, e, i) { 15312 if ("number" == typeof e) { 15313 if (t < 2) this.fromInt(1); 15314 else for(this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), m, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e);)this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(r.ONE.shiftLeft(t - 1), this); 15315 } else { 15316 var n = new Array, o = 7 & t; 15317 n.length = 1 + (t >> 3), e.nextBytes(n), o > 0 ? n[0] &= (1 << o) - 1 : n[0] = 0, this.fromString(n, 256); 15318 } 15319 }, r.prototype.bitwiseTo = function(t, e, r) { 15320 var i, n, o = Math.min(t.t, this.t); 15321 for(i = 0; i < o; ++i)r[i] = e(this[i], t[i]); 15322 if (t.t < this.t) { 15323 for(n = t.s & this.DM, i = o; i < this.t; ++i)r[i] = e(this[i], n); 15324 r.t = this.t; 15325 } else { 15326 for(n = this.s & this.DM, i = o; i < t.t; ++i)r[i] = e(n, t[i]); 15327 r.t = t.t; 15328 } 15329 r.s = e(this.s, t.s), r.clamp(); 15330 }, r.prototype.changeBit = function(t, e) { 15331 var i = r.ONE.shiftLeft(t); 15332 return this.bitwiseTo(i, e, i), i; 15333 }, r.prototype.addTo = function(t, e) { 15334 for(var r = 0, i = 0, n = Math.min(t.t, this.t); r < n;)i += this[r] + t[r], e[r++] = i & this.DM, i >>= this.DB; 15335 if (t.t < this.t) { 15336 for(i += t.s; r < this.t;)i += this[r], e[r++] = i & this.DM, i >>= this.DB; 15337 i += this.s; 15338 } else { 15339 for(i += this.s; r < t.t;)i += t[r], e[r++] = i & this.DM, i >>= this.DB; 15340 i += t.s; 15341 } 15342 e.s = i < 0 ? -1 : 0, i > 0 ? e[r++] = i : i < -1 && (e[r++] = this.DV + i), e.t = r, e.clamp(); 15343 }, r.prototype.dMultiply = function(t) { 15344 this[this.t] = this.am(0, t - 1, this, 0, 0, this.t), ++this.t, this.clamp(); 15345 }, r.prototype.dAddOffset = function(t, e) { 15346 if (0 != t) { 15347 for(; this.t <= e;)this[this.t++] = 0; 15348 for(this[e] += t; this[e] >= this.DV;)this[e] -= this.DV, ++e >= this.t && (this[this.t++] = 0), ++this[e]; 15349 } 15350 }, r.prototype.multiplyLowerTo = function(t, e, r) { 15351 var i, n = Math.min(this.t + t.t, e); 15352 for(r.s = 0, r.t = n; n > 0;)r[--n] = 0; 15353 for(i = r.t - this.t; n < i; ++n)r[n + this.t] = this.am(0, t[n], r, n, 0, this.t); 15354 for(i = Math.min(t.t, e); n < i; ++n)this.am(0, t[n], r, n, 0, e - n); 15355 r.clamp(); 15356 }, r.prototype.multiplyUpperTo = function(t, e, r) { 15357 --e; 15358 var i = r.t = this.t + t.t - e; 15359 for(r.s = 0; --i >= 0;)r[i] = 0; 15360 for(i = Math.max(e - this.t, 0); i < t.t;
15360 ++i)r[this.t + i - e] = this.am(e - i, t[i], r, 0, 0, this.t + i - e); 15361 r.clamp(), r.drShiftTo(1, r); 15362 }, r.prototype.modInt = function(t) { 15363 if (t <= 0) return 0; 15364 var e = this.DV % t, r = this.s < 0 ? t - 1 : 0; 15365 if (this.t > 0) { 15366 if (0 == e) r = this[0] % t; 15367 else for(var i = this.t - 1; i >= 0; --i)r = (e * r + this[i]) % t; 15368 } 15369 return r; 15370 }, r.prototype.millerRabin = function(t) { 15371 var e = this.subtract(r.ONE), n = e.getLowestSetBit(); 15372 if (n <= 0) return !1; 15373 var o = e.shiftRight(n); 15374 (t = t + 1 >> 1) > B.length && (t = B.length); 15375 for(var s = i(), h = 0; h < t; ++h){ 15376 s.fromInt(B[Math.floor(Math.random() * B.length)]); 15377 var u = s.modPow(o, this); 15378 if (0 != u.compareTo(r.ONE) && 0 != u.compareTo(e)) { 15379 for(var a = 1; a++ < n && 0 != u.compareTo(e);)if (0 == (u = u.modPowInt(2, this)).compareTo(r.ONE)) return !1; 15380 if (0 != u.compareTo(e)) return !1; 15381 } 15382 } 15383 return !0; 15384 }, r.prototype.clone = function() { 15385 var t = i(); 15386 return this.copyTo(t), t; 15387 }, r.prototype.intValue = function() { 15388 if (this.s < 0) { 15389 if (1 == this.t) return this[0] - this.DV; 15390 if (0 == this.t) return -1; 15391 } else { 15392 if (1 == this.t) return this[0]; 15393 if (0 == this.t) return 0; 15394 } 15395 return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]; 15396 }, r.prototype.byteValue = function() { 15397 return 0 == this.t ? this.s : this[0] << 24 >> 24; 15398 }, r.prototype.shortValue = function() { 15399 return 0 == this.t ? this.s : this[0] << 16 >> 16; 15400 }, r.prototype.signum = function() { 15401 return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1; 15402 }, r.prototype.toByteArray = function() { 15403 var t = this.t, e = new Array; 15404 e[0] = this.s; 15405 var r, i = this.DB - t * this.DB % 8, n = 0; 15406 if (t-- > 0) for(i < this.DB && (r = this[t] >> i) != (this.s & this.DM) >> i && (e[n++] = r | this.s << this.DB - i); t >= 0;)i < 8 ? (r = (this[t] & (1 << i) - 1) << 8 - i, r |= this[--t] >> (i += this.DB - 8)) : (r = this[t] >> (i -= 8) & 255, i <= 0 && (i += this.DB, --t)), 0 != (128 & r) && (r |= -256), 0 == n && (128 & this.s) != (128 & r) && ++n, (n > 0 || r != this.s) && (e[n++] = r); 15407 return e; 15408 }, r.prototype.equals = function(t) { 15409 return 0 == this.compareTo(t); 15410 }, r.prototype.min = function(t) { 15411 return this.compareTo(t) < 0 ? this : t; 15412 }, r.prototype.max = function(t) { 15413 return this.compareTo(t) > 0 ? this : t; 15414 }, r.prototype.and = function(t) { 15415 var e = i(); 15416 return this.bitwiseTo(t, d, e), e; 15417 }, r.prototype.or = function(t) { 15418 var e = i(); 15419 return this.bitwiseTo(t, m, e), e; 15420 }, r.prototype.xor = function(t) { 15421 var e = i(); 15422 return this.bitwiseTo(t, v, e), e; 15423 }, r.prototype.andNot = function(t) { 15424 var e = i(); 15425 return this.bitwiseTo(t, y, e), e; 15426 }, r.prototype.not = function() { 15427 for(var t = i(), e = 0; e < this.t; ++e)t[e] = this.DM & ~this[e]; 15428 return t.t = this.t, t.s = ~this.s, t; 15429 }, r.prototype.shiftLeft = function(t) { 15430 var e = i(); 15431 return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e; 15432 }, r.prototype.shiftRight = function(t) { 15433 var e = i(); 15434 return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e; 15435 }, r.prototype.getLowestSetBit = function() { 15436 for(var t = 0; t < this.t; ++t)if (0 != this[t]) return t * this.DB + g(this[t]); 15437 return this.s < 0 ? this.t * this.DB : -1; 15438 }, r.prototype.bitCount = function() { 15439 for(var t = 0, e = this.s & this.DM, r = 0; r < this.t; ++r)t += w(this[r] ^ e); 15440 return t; 15441 }, r.prototype.testBit = function(t) { 15442 var e = Math.floor(t / this.DB); 15443 return e >= this.t ? 0 != this.s : 0 != (this[e] & 1 << t % this.DB); 15444 }, r.prototype.setBit = function(t) { 15445 return this.changeBit(t, m); 15446 }, r.prototype.clearBit = function(t) { 15447 return this.changeBit(t, y); 15448 }
vendor: 2,920 bytes, lines 15448-15496
15448, r.prototype.flipBit = function(t) { 15449 return this.changeBit(t, v); 15450 }, r.prototype.add = function(t) { 15451 var e = i(); 15452 return this.addTo(t, e), e; 15453 }, r.prototype.subtract = function(t) { 15454 var e = i(); 15455 return this.subTo(t, e), e; 15456 }, r.prototype.multiply = function(t) { 15457 var e = i(); 15458 return this.multiplyTo(t, e), e; 15459 }, r.prototype.divide = function(t) { 15460 var e = i(); 15461 return this.divRemTo(t, e, null), e; 15462 }, r.prototype.remainder = function(t) { 15463 var e = i(); 15464 return this.divRemTo(t, null, e), e; 15465 }, r.prototype.divideAndRemainder = function(t) { 15466 var e = i(), r = i(); 15467 return this.divRemTo(t, e, r), new Array(e, r); 15468 }, r.prototype.modPow = function(t, e) { 15469 var r, n, o = t.bitLength(), s = f(1); 15470 if (o <= 0) return s; 15471 r = o < 18 ? 1 : o < 48 ? 3 : o < 144 ? 4 : o < 768 ? 5 : 6, n = o < 8 ? new p(e) : e.isEven() ? new _(e) : new l(e); 15472 var h = new Array, u = 3, a = r - 1, d = (1 << r) - 1; 15473 if (h[1] = n.convert(this), r > 1) { 15474 var m = i(); 15475 for(n.sqrTo(h[1], m); u <= d;)h[u] = i(), n.mulTo(m, h[u - 2], h[u]), u += 2; 15476 } 15477 var v, y, g = t.t - 1, w = !0, T = i(); 15478 for(o = c(t[g]) - 1; g >= 0;){ 15479 for(o >= a ? v = t[g] >> o - a & d : (v = (t[g] & (1 << o + 1) - 1) << a - o, g > 0 && (v |= t[g - 1] >> this.DB + o - a)), u = r; 0 == (1 & v);)v >>= 1, --u; 15480 if ((o -= u) < 0 && (o += this.DB, --g), w) h[v].copyTo(s), w = !1; 15481 else { 15482 for(; u > 1;)n.sqrTo(s, T), n.sqrTo(T, s), u -= 2; 15483 u > 0 ? n.sqrTo(s, T) : (y = s, s = T, T = y), n.mulTo(T, h[v], s); 15484 } 15485 for(; g >= 0 && 0 == (t[g] & 1 << o);)n.sqrTo(s, T), y = s, s = T, T = y, --o < 0 && (o = this.DB - 1, --g); 15486 } 15487 return n.revert(s); 15488 }, r.prototype.modInverse = function(t) { 15489 var e = t.isEven(); 15490 if (this.isEven() && e || 0 == t.signum()) return r.ZERO; 15491 for(var i = t.clone(), n = this.clone(), o = f(1), s = f(0), h = f(0), u = f(1); 0 != i.signum();){ 15492 for(; i.isEven();)i.rShiftTo(1, i), e ? (o.isEven() && s.isEven() || (o.addTo(this, o), s.subTo(t, s)), o.rShiftTo(1, o)) : s.isEven() || s.subTo(t, s), s.rShiftTo(1, s); 15493 for(; n.isEven();)n.rShiftTo(1, n), e ? (h.isEven() && u.isEven() || (h.addTo(this, h), u.subTo(t, u)), h.rShiftTo(1, h)) : u.isEven() || u.subTo(t, u), u.rShiftTo(1, u); 15494 i.compareTo(n) >= 0 ? (i.subTo(n, i), e && o.subTo(h, o), s.subTo(u, s)) : (n.subTo(i, n), e && h.subTo(o, h), u.subTo(s, u)); 15495 } 15496 return 0 != n.compareTo(r.ONE) ? r.ZERO : u.compareTo(t) >
15496= 0 ? u.subtract(t) : u.signum() < 0 ? (u.addTo(t, u), u.signum() < 0 ? u.add(t) : u) : u; 15497 }, r.prototype.pow = function(t) { 15498 return this.exp(t, new T); 15499 }, r.prototype.gcd = function(t) { 15500 var e = this.s < 0 ? this.negate() : this.clone(), r = t.s < 0 ? t.negate() : t.clone(); 15501 if (e.compareTo(r) < 0) { 15502 var i = e; 15503 e = r, r = i; 15504 } 15505 var n = e.getLowestSetBit(), o = r.getLowestSetBit(); 15506 if (o < 0) return e; 15507 for(n < o && (o = n), o > 0 && (e.rShiftTo(o, e), r.rShiftTo(o, r)); e.signum() > 0;)(n = e.getLowestSetBit()) > 0 && e.rShiftTo(n, e), (n = r.getLowestSetBit()) > 0 && r.rShiftTo(n, r), e.compareTo(r) >= 0 ? (e.subTo(r, e), e.rShiftTo(1, e)) : (r.subTo(e, r), r.rShiftTo(1, r)); 15508 return o > 0 && r.lShiftTo(o, r), r; 15509 }, r.prototype.isProbablePrime = function(t) { 15510 var e, r = this.abs(); 15511 if (1 == r.t && r[0] <= B[B.length - 1]) { 15512 for(e = 0; e < B.length; ++e)if (r[0] == B[e]) return !0; 15513 return !1; 15514 } 15515 if (r.isEven()) return !1; 15516 for(e = 1; e < B.length;){ 15517 for(var i = B[e], n = e + 1; n < B.length && i < x;)i *= B[n++]; 15518 for(i = r.modInt(i); e < n;)if (i % B[e++] == 0) return !1; 15519 } 15520 return r.millerRabin(t); 15521 }, r.prototype.square = function() { 15522 var t = i(); 15523 return this.squareTo(t), t; 15524 }, r.prototype.Barrett = _, null == A) { 15525 var k; 15526 if (A = new Array, D = 0, "undefined" != typeof window && window.crypto) { 15527 if (window.crypto.getRandomValues) { 15528 var I = new Uint8Array(32); 15529 for(window.crypto.getRandomValues(I), k = 0; k < 32; ++k)A[D++] = I[k]; 15530 } else if ("Netscape" == navigator.appName && navigator.appVersion < "5") { 15531 var M = window.crypto.random(32); 15532 for(k = 0; k < M.length; ++k)A[D++] = 255 & M.charCodeAt(k); 15533 } 15534 } 15535 for(; D < j;)k = Math.floor(65536 * Math.random()), A[D++] = k >>> 8, A[D++] = 255 & k; 15536 D = 0, E(); 15537 } 15538 function C() { 15539 if (null == S) { 15540 for(E(), (S = new O).init(A), D = 0; D < A.length; ++D)A[D] = 0; 15541 D = 0; 15542 } 15543 return S.next(); 15544 } 15545 function R() {} 15546 function O() { 15547 this.i = 0, this.j = 0, this.S = new Array; 15548 } 15549 R.prototype.nextBytes = function(t) { 15550 var e; 15551 for(e = 0; e < t.length; ++e)t[e] = C(); 15552 }, O.prototype.init = function(t) { 15553 var e, r, i; 15554 for(e = 0; e < 256; ++e)this.S[e] = e; 15555 for(r = 0, e = 0; e < 256; ++e)i = this.S[e], this.S[e] = this.S[r = r + this.S[e] + t[e % t.length] & 255], this.S[r] = i; 15556 this.i = 0, this.j = 0; 15557 }, O.prototype.next = function() { 15558 var t; 15559 return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, t = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = t, this.S[t + this.S[this.i] & 255]; 15560 }; 15561 var j = 256; 15562 e.exports = { 15563 default: r, 15564 BigInteger: r, 15565 SecureRandom: R 15566 }; 15567 }).call($90f323912e688b98$var$t); 15568}), $90f323912e688b98$var$a = { 15569 sha1: "3021300906052b0e03021a05000414", 15570 sha224: "302d300d06096086480165030402040500041c", 15571 sha256: "3031300d060960864801650304020105000420", 15572 sha384: "3041300d060960864801650304020205000430", 15573 sha512: "3051300d060960864801650304020305000440", 15574 md2: "3020300c06082a864886f70d020205000410", 15575 md5: "3020300c06082a864886f70d020505000410", 15576 ripemd160: "3021300906052b2403020105000414" 15577}, $90f323912e688b98$var$f = { 15578 sha256: $90f323912e688b98$var$o 15579}; 15580function $90f323912e688b98$var$c(t, e) { 15581 if (this.n = null, this.e = 0, !(null != t && null != e && t.length > 0 && e.length > 0)) throw new Error("Invalid key data"); 15582 this.n = new $90f323912e688b98$var$u.BigInteger(t, 16), this.e = parseInt(e, 16); 15583} 15584$90f323912e688b98$var$c.prototype.verify = function(t, e) { 15585 e = e.replace(/[^0-9a-f]|[\s\n]]/gi, ""); 15586 var r = new $90f323912e688b98$var$u.BigInteger(e, 16); 15587 if (r.bitLength() > this.n.bitLength()) throw new Error("Signature does not match with the key modulus."); 15588 var i = function(t) { 15589 for(var e in $90f323912e688b98$var$a){ 15590 var r = $90f323912e688b98$var$a[e], i = r.length; 15591 if (t.substring(0, i) === r) return { 15592 alg: e, 15593 hash: t.substring(i) 15594 }; 15595 } 15596 return []; 15597 }(r.modPowInt(this.e, this.n).toString(16).replace(/^1f+00/, "")); 15598 if (0 === i.length) return !1; 15599 if (!$90f323912e688b98$var$f.hasOwnProperty(i.alg)) throw new Error("Hashing algorithm is not supported."); 15600 var n = $90f323912e688b98$var$f[i.alg](t).toString(); 15601 return i.hash === n; 15602}; 15603for(var $90f323912e688b98$var$p = [], $90f323912e688b98$var$l = [], $90f323912e688b98$var$d = "undefined" != typeof Uint8Array ? Uint8Array : Array, $90f323912e688b98$var$m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
15603+/", $90f323912e688b98$var$v = 0; $90f323912e688b98$var$v < 64; ++$90f323912e688b98$var$v)$90f323912e688b98$var$p[$90f323912e688b98$var$v] = $90f323912e688b98$var$m[$90f323912e688b98$var$v], $90f323912e688b98$var$l[$90f323912e688b98$var$m.charCodeAt($90f323912e688b98$var$v)] = $90f323912e688b98$var$v; 15604$90f323912e688b98$var$l["-".charCodeAt(0)] = 62, $90f323912e688b98$var$l["_".charCodeAt(0)] = 63; 15605var $90f323912e688b98$var$y = function(t) { 15606 var e, r, i = function(t) { 15607 var e = t.length; 15608 if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); 15609 var r = t.indexOf("="); 15610 return -1 === r && (r = e), [ 15611 r, 15612 r === e ? 0 : 4 - r % 4 15613 ]; 15614 }(t), n = i[0], o = i[1], s = new $90f323912e688b98$var$d(function(t, e, r) { 15615 return 3 * (e + r) / 4 - r; 15616 }(0, n, o)), h = 0, u = o > 0 ? n - 4 : n; 15617 for(r = 0; r < u; r += 4)e = $90f323912e688b98$var$l[t.charCodeAt(r)] << 18 | $90f323912e688b98$var$l[t.charCodeAt(r + 1)] << 12 | $90f323912e688b98$var$l[t.charCodeAt(r + 2)] << 6 | $90f323912e688b98$var$l[t.charCodeAt(r + 3)], s[h++] = e >> 16 & 255, s[h++] = e >> 8 & 255, s[h++] = 255 & e; 15618 return 2 === o && (e = $90f323912e688b98$var$l[t.charCodeAt(r)] << 2 | $90f323912e688b98$var$l[t.charCodeAt(r + 1)] >> 4, s[h++] = 255 & e), 1 === o && (e = $90f323912e688b98$var$l[t.charCodeAt(r)] << 10 | $90f323912e688b98$var$l[t.charCodeAt(r + 1)] << 4 | $90f323912e688b98$var$l[t.charCodeAt(r + 2)] >> 2, s[h++] = e >> 8 & 255, s[h++] = 255 & e), s; 15619}; 15620function $90f323912e688b98$var$g(t) { 15621 var e = t.length % 4; 15622 return 0 === e ? t : t + new Array(4 - e + 1).join("="); 15623} 15624function $90f323912e688b98$var$w(t) { 15625 return t = $90f323912e688b98$var$g(t).replace(/\-/g, "+").replace(/_/g, "/"), decodeURIComponent((function(t) { 15626 for(var e = "", r = 0; r < t.length; r++)e += String.fromCharCode(t[r]); 15627 return e; 15628 })($90f323912e688b98$var$y(t)).split("").map(function(t) { 15629 return "%" + ("00" + t.charCodeAt(0).toString(16)).slice(-2); 15630 }).join("")); 15631} 15632function $90f323912e688b98$var$T(t) { 15633 return function(t) { 15634 for(var e = "", r = 0; r < t.length; r++){ 15635 var i = t[r].toString(16); 15636 e += 2 === i.length ? i : "0" + i; 15637 } 15638 return e; 15639 }($90f323912e688b98$var$y($90f323912e688b98$var$g(t))); 15640} 15641var $90f323912e688b98$var$b = $90f323912e688b98$var$e(function(e) { 15642 var r, i; 15643 r = $90f323912e688b98$var$t, i = function() { 15644 return function() { 15645 return function(t) { 15646 var e = []; 15647 if (0 === t.length) return ""; 15648 if ("string" != typeof t[0]) throw new TypeError("Url must be a string. Received " + t[0]); 15649 if (t[0].match(/^[^/:]+:\/*$/) && t.length > 1) { 15650 var r = t.shift(); 15651 t[0] = r + t[0]; 15652 } 15653 t[0] = t[0].match(/^file:\/\/\//) ? t[0].replace(/^([^/:]+):\/*/, "$1:///") : t[0].replace(/^([^/:]+):\/*/, "$1://"); 15654 for(var i = 0; i < t.length; i++){ 15655 var n = t[i]; 15656 if ("string" != typeof n) throw new TypeError("Url must be a string. Received " + n); 15657 "" !== n && (i > 0 && (n = n.replace(/^[\/]+/, "")), n = n.replace(/[\/]+$/, i < t.length - 1 ? "" : "/"), e.push(n)); 15658 } 15659 var o = e.join("/"), s = (o = o.replace(/\/(\?|&|#[^!])/g, "$1")).split("?"); 15660 return s.shift() + (s.length > 0 ? "?" : "") + s.join("&"); 15661 }("object" == typeof arguments[0] ? arguments[0] : [].slice.call(arguments)); 15662 }; 15663 }, e.exports ? e.exports = i() : r.urljoin = i(); 15664}); 15665function $90f323912e688b98$var$_(t, e) { 15666 return e = e || {}, new Promise(function(r, i) { 15667 var n = new XMLHttpRequest, o = [], s = [], h = {}, u = function() { 15668 return { 15669 ok: 2 == (n.status / 100 | 0), 15670 statusText: n.statusText, 15671 status: n.status, 15672 url: n.responseURL, 15673 text: function() { 15674 return Promise.resolve(n.responseText); 15675 }, 15676 json: function() { 15677 return Promise.resolve(n.responseText).then(JSON.parse); 15678 }, 15679 blob: function() { 15680 return Promise.resolve(new Blob([ 15681 n.response 15682 ])); 15683 }, 15684 clone: u, 15685 headers: { 15686 keys: function() { 15687 return o; 15688 },
15689 entries: function() { 15690 return s; 15691 }, 15692 get: function(t) { 15693 return h[t.toLowerCase()]; 15694 }, 15695 has: function(t) { 15696 return t.toLowerCase() in h; 15697 } 15698 } 15699 }; 15700 }; 15701 for(var a in n.open(e.method || "get", t, !0), n.onload = function() { 15702 n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(t, e, r) { 15703 o.push(e = e.toLowerCase()), s.push([ 15704 e, 15705 r 15706 ]), h[e] = h[e] ? h[e] + "," + r : r; 15707 }), r(u()); 15708 }, n.onerror = i, n.withCredentials = "include" == e.credentials, e.headers)n.setRequestHeader(a, e.headers[a]); 15709 n.send(e.body || null); 15710 }); 15711} 15712function $90f323912e688b98$var$S(t) { 15713 if (t.ok) return t.json(); 15714 var e = new Error(t.statusText); 15715 return e.response = t, Promise.reject(e); 15716} 15717function $90f323912e688b98$var$A(t) { 15718 this.name = "ConfigurationError", this.message = t || ""; 15719} 15720function $90f323912e688b98$var$D(t) { 15721 this.name = "TokenValidationError", this.message = t || ""; 15722} 15723$90f323912e688b98$var$A.prototype = Error.prototype, $90f323912e688b98$var$D.prototype = Error.prototype; 15724var $90f323912e688b98$var$B = function() { 15725 function t() {} 15726 var e = t.prototype; 15727 return e.get = function() { 15728 return null; 15729 }, e.has = function() { 15730 return null; 15731 }, e.set = function() { 15732 return null; 15733 }, t; 15734}(); 15735$90f323912e688b98$var$r.polyfill(); 15736var $90f323912e688b98$var$x = "RS256", $90f323912e688b98$var$E = function(t) { 15737 return "number" == typeof t; 15738}, $90f323912e688b98$var$k = function() { 15739 return new Date; 15740}; 15741function $90f323912e688b98$var$I(t) { 15742 var e = t || {}; 15743 if (this.jwksCache = e.jwksCache || new $90f323912e688b98$var$B, this.expectedAlg = e.expectedAlg || "RS256", this.issuer = e.issuer, this.audience = e.audie
15743nce, this.leeway = 0 === e.leeway ? 0 : e.leeway || 60, this.jwksURI = e.jwksURI, this.maxAge = e.maxAge, this.__clock = "function" == typeof e.__clock ? e.__clock : $90f323912e688b98$var$k, this.leeway < 0 || this.leeway > 300) throw new $90f323912e688b98$var$A("The leeway should be positive and lower than five minutes."); 15744 if ($90f323912e688b98$var$x !== this.expectedAlg) throw new $90f323912e688b98$var$A('Signature algorithm of "' + this.expectedAlg + '" is not supported. Expected the ID token to be signed with "' + $90f323912e688b98$var$x + '".'); 15745} 15746function $90f323912e688b98$var$PluginHandler(webAuth, plugins) { 15747 this.plugins = plugins; 15748 for(var a = 0; a < this.plugins.length; a++){ 15749 if (this.plugins[a].version !== $90f323912e688b98$export$83d89fbfd8236492.raw) { 15750 var pluginName = ""; 15751 throw this.plugins[a].constructor && this.plugins[a].constructor.name && (pluginName = this.plugins[a].constructor.name), new Error("Plugin " + pluginName + " version (" + this.plugins[a].version + ") is not compatible with the SDK version (" + $90f323912e688b98$export$83d89fbfd8236492.raw + ")"); 15752 } 15753 this.plugins[a].setWebAuth(webAuth); 15754 } 15755} 15756$90f323912e688b98$var$I.prototype.verify = function(t, e, r) { 15757 if (!r && e && "function" == typeof e && (r = e, e = void 0), !t) return r(new $90f323912e688b98$var$D("ID token is required but missing"), null); 15758 var i = this.decode(t); 15759 if (i instanceof Error) return r(new $90f323912e688b98$var$D("ID token could not be decoded"), null); 15760 var n = i.encoded.header + "." + i.encoded.payload, o = $90f323912e688b98$var$T(i.encoded.signature), s = i.header.alg, h = i.header.kid, u = i.payload.aud, a = i.payload.sub, f = i.payload.iss, c = i.payload.exp, p = i.payload.nbf, l = i.payload.iat, d = i.payload.azp, m = i.payload.auth_time, v = i.payload.nonce, y = this.__clock(), g = this; 15761 if (g.expectedAlg !== s) return r(new $90f323912e688b98$var$D('Signature algorithm of "' + s + '" is not supported. Expected the ID token to be signed with "' + $90f323912e688b98$var$x + '".'), null); 15762 this.getRsaVerifier(f, h, function(t, s) { 15763 if (t) return r(t, null); 15764 if (!s.verify(n, o)) return r(new $90f323912e688b98$var$D("Invalid ID token signature."), null); 15765 if (!f || "string" != typeof f) return r(new $90f323912e688b98$var$D("Issuer (iss) claim must be a string present in the ID token"), null); 15766 if (g.issuer !== f) return r(new $90f323912e688b98$var$D('Issuer (iss) claim mismatch in the ID token, expected "' + g.issuer + '", found "' + f + '"'), null); 15767 if (!a || "string" != typeof a) return r(new $90f323912e688b98$var$D("Subject (sub) claim must be a string present in the ID token"), null); 15768 if (!u || "string" != typeof u && !Array.isArray(u)) return r(new $90f323912e688b98$var$D("Audience (aud) claim must be a string or array of strings present in the ID token"), null); 15769 if (Array.isArray(u) && !u.includes(g.audience)) return r(new $90f323912e688b98$var$D('Audience (aud) claim mismatch in the ID token; expected "' + g.audience + '" but was not one of "' + u.join(", ") + '"'), null); 15770 if ("string" == typeof u && g.audience !== u) return r(new $90f323912e688b98$var$D('Audience (aud) claim mismatch in the ID token; expected "' + g.audience + '" but found "' + u + '"'), null); 15771 if (e) { 15772 if (!v || "string" != typeof v) return r(new $90f323912e688b98$var$D("Nonce (nonce) claim must be a string present in the ID token"), null); 15773 if (v !== e) return r(new $90f323912e688b98$var$D('Nonce (nonce) claim value mismatch in the ID token; expected "' + e + '", found "' + v + '"'), null); 15774 } 15775 if (Array.isArray(u) && u.length > 1) { 15776 if (!d || "string" != typeof d) return r(new $90f323912e688b98$var$D("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"), null); 15777 if (d !== g.audience) return r(new $90f323912e688b98$var$D('Authorized Party (azp) claim mismatch in the ID token; expected "' + g.audience + '", found "' + d + '"'), null); 15778 } 15779 if (!c || !$90f323912e688b98$var$E(c)) return r(new $90f323912e688b98$var$D("Expiration Time (exp) claim must be a number present in the ID token"), null); 15780 if (!l || !$90f323912e688b98$var$E(l)) return r(new $90f323912e688b98$var$D("Issued At (iat) claim must be a number present in the ID token"), null); 15781 var h = c + g.leeway, w = new Date(0); 15782 if (w.setUTCSeconds(h), y > w) return r(new $90f323912e688b98$var$D('Expiration Time (exp) claim error in the ID token; current time "' + y + '" is after expiration time "' + w + '"'), null); 15783 if (p && $90f323912e688b98$var$E(p)) { 15784 var T = p - g.leeway, b = new Date(0); 15785 if (b.setUTCSeconds(T), y < b) return r(new $90f323912e688b98$var$D('Not Before Time (nbf) claim error in the ID token; current time "' + y + '" is before the not before time "' + b + '"'), null); 15786 } 15787 if (g.maxAge) { 15788 if (!m || !$90f323912e688b98$var$E(m)) return r(new $90f323912e688b98$var$D("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"), null); 15789 var _ = m + g.maxAge + g.leeway, S = new Date(0); 15790 if (S.setUTCSeconds(_), y > S) return r(new $90f323912e688b98$var$D('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "' + y + '" is after last auth time at "' + S + '"'), null); 15791 } 15792 return r(null, i.payload); 15793 }); 15794}, $90f323912e688b98$var$I.prototype.getRsaVerifier = function(t, e, r) { 15795 var i = this, n = t + e; 15796 Promise.resolve(this.jwksCache.has(n)).then(function(r) { 15797 var o, s; 15798 return r ? i.jwksCache.get(n) : (s = (o = { 15799 jwksURI: i.jwksURI, 15800 iss: t, 15801 kid: e 15802 }).jwksURI || $90f323912e688b98$var$b(o.iss, ".well-known", "jwks.json"), ("undefined" == fetch ? $90f323912e688b98$var$_ : fetch)(s).then($90f323912e688b98$var$S).then(function(t) { 15803 var e, r, i, n = null; 15804 for(e = 0; e < t.keys.length && null === n;
15804 e++)(r = t.keys[e]).kid === o.kid && (n = r); 15805 if (!n) throw new Error('Could not find a public key for Key ID (kid) "' + o.kid + '"'); 15806 return { 15807 modulus: $90f323912e688b98$var$T((i = n).n), 15808 exp: $90f323912e688b98$var$T(i.e) 15809 }; 15810 }).catch(function(t) { 15811 throw t; 15812 })); 15813 }).then(function(t) { 15814 if (!t || !t.modulus || !t.exp) throw new Error("Empty keyInfo in response"); 15815 return Promise.resolve(i.jwksCache.set(n, t)).then(function() { 15816 r && r(null, new $90f323912e688b98$var$c(t.modulus, t.exp)); 15817 }); 15818 }).catch(function(t) { 15819 r && r(t); 15820 }); 15821}, $90f323912e688b98$var$I.prototype.decode = function(t) { 15822 var e, r, i = t.split("."); 15823 if (3 !== i.length) return new $90f323912e688b98$var$D("Cannot decode a malformed JWT"); 15824 try { 15825 e = JSON.parse($90f323912e688b98$var$w(i[0])), r = JSON.parse($90f323912e688b98$var$w(i[1])); 15826 } catch (t) { 15827 return new $90f323912e688b98$var$D("Token header or payload is not valid JSON"); 15828 } 15829 return { 15830 header: e, 15831 payload: r, 15832 encoded: { 15833 header: i[0], 15834 payload: i[1], 15835 signature: i[2] 15836 } 15837 }; 15838}, $90f323912e688b98$var$I.prototype.validateAccessToken = function(t, e, r, i) { 15839 if (this.expectedAlg !== e) return i(new $90f323912e688b98$var$D('Signature algorithm of "' + e + '" is not supported. Expected "' + this.expectedAlg + '"')); 15840 var n, u = $90f323912e688b98$var$o(t), a = $90f323912e688b98$var$h.stringify(u), f = a.substring(0, a.length / 2), c = $90f323912e688b98$var$h.parse(f), p = $90f323912e688b98$var$s.stringify(c); 15841 return i((n = { 15842 "+": "-", 15843 "/": "_", 15844 "=": "" 15845 }, p.replace(/[+/=]/g, function(t) { 15846 return n[t]; 15847 }) !== r ? new $90f323912e688b98$var$D("Invalid access_token") : null)); 15848}, $90f323912e688b98$var$PluginHandler.prototype.get = function(extensibilityPoint) { 15849 for(var a = 0; a < this.plugins.length; a++)if (this.plugins[a].supports(extensibilityPoint)) return this.plugins[a].init(); 15850 return null; 15851}; 15852var $90f323912e688b98$var$random = { 15853 randomString: function(length) { 15854 var bytes = new Uint8Array(length), result = [], charset = "0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~", cryptoObj = $90f323912e688b98$var$windowHelper.getWindow().crypto || $90f323912e688b98$var$windowHelper.getWindow().msCrypto; 15855 if (!cryptoObj) return null; 15856 for(var random = cryptoObj.getRandomValues(bytes), a = 0; a < random.length; a++)result.push(charset[random[a] % charset.length]); 15857 return result.join(""); 15858 } 15859}; 15860function $90f323912e688b98$var$TransactionManager(options) { 15861 var transaction = options.transaction || {}; 15862 this.namespace = transaction.namespace || "com.auth0.auth.", this.keyLength = transaction.keyLength || 32, this.stateExpiration = options.stateExpiration ? options.stateExpiration / 60 / 24 : 1 / 48, this.storage = new $90f323912e688b98$var$Storage(options), this.options = options; 15863} 15864function $90f323912e688b98$var$IframeHandler(options) { 15865 if (this.url = options.url, this.callback = options.callback, this.timeout = options.timeout || 6e4, this.timeoutCallback = options.timeoutCallback || null, this.eventListenerType = options.eventListenerType || "message", this.iframe = null, this.timeoutHandle = null, this._destroyTimeout = null, this.transientMessageEventListener = null, this.proxyEventListener = null, this.eventValidator = options.eventValidator || { 15866 isValid: function() { 15867 return !0; 15868 } 15869 }, "function" != typeof this.callback) throw new Error("options.callback must be a function"); 15870} 15871function $90f323912e688b98$var$WebMessageHandler(webAuth) { 15872 this.webAuth = webAuth, this.warn = new $90f323912e688b98$var$Warn(webAuth.baseOptions); 15873} 15874function $90f323912e688b98$var$CrossOriginAuthentication(webAuth, options) { 15875 this.webAuth = webAuth, this.baseOptions = options, this.request = new $90f323912e688b98$var$RequestBuilder(options), this.webMessageHandler = new $90f323912e688b98$var$WebMessageHandler(webAuth), this.storage = new $90f323912e688b98$var$Storage(options); 15876} 15877function $90f323912e688b98$var$createKey(origin, coId) { 15878 return [ 15879 "co/verifier", 15880 encodeURIComponent(origin), 15881 encodeURIComponent(coId) 15882 ].join("/"); 15883} 15884function $90f323912e688b98$var$Redirect(auth0, options) { 15885 this.webAuth = auth0, this.baseOptions = options, this.crossOriginAuthentication = new $90f323912e688b98$var$CrossOriginAuthentication(auth0, this.baseOptions), this.warn = new $90f323912e688b98$var$Warn({ 15886 disableWarnings: !!options._disableDeprecationWarnings 15887 }); 15888} 15889$90f323912e688b98$var$TransactionManager.prototype.process = function(options) { 15890 if (!options.responseType) throw new Error("responseType is required"); 15891 var lastUsedConnection = options.realm || options.connection, responseTypeIncludesIdToken = -1 !== options.responseType.indexOf("id_token"), transaction = this.generateTransaction(options.appState, options.state, options.nonce, lastUsedConnection, responseTypeIncludesIdToken, options.organization); 15892 return options.state || (options.state = transaction.state), responseTypeIncludesIdToken && !options.nonce && (options.nonce = transaction.nonce), options; 15893}, $90f323912e688b98$var$TransactionManager.prototype.generateTransaction = function(appState, state, nonce, lastUsedConnection, generateNonce, organization) { 15894 if (state = state || $90f323912e688b98$var$random.randomString(this.keyLength), nonce = nonce || (generateNonce ? $90f323912e688b98$var$random.randomString(this.keyLength) : null), !($90f323912e688b98$var$windowHelper.getWindow().location.host === this.options.domain)) { 15895 var transactionPayload = { 15896 nonce: nonce, 15897 appState: appState, 15898 state: state, 15899 lastUsedConnection: lastUsedConnection 15900 }; 15901 organization && (transactionPayload.organization = organization), this.storage.setItem(this.namespace + state, transactionPayload, { 15902 expires: this.stateExpiration 15903 }); 15904 } 15905 return { 15906 state: state, 15907 nonce: nonce 15908 }; 15909}, $90f323912e688b98$var$TransactionManager.prototype.getStoredTransaction = function(state) { 15910 var transactionData; 15911 return transactionData = this.storage.getItem(this.namespace + state), this.clearTransaction(state), transactionData; 15912}, $90f323912e688b98$var$TransactionManager.prototype.clearTransaction = function(state) { 15913 this.storage.removeItem(this.namespace + state); 15914}, $90f323912e688b98$var$IframeHandler.prototype.init = function() { 15915 var _this = this, _window = $90f323912e688b98$var$windowHelper.getWindow(); 15916 switch(this.iframe = _window.document.createElement("iframe"), this.iframe.style.display = "none", this.proxyEventListener = function(e) { 15917 _this.eventListener(e); 15918 }, this.eventListenerType){ 15919 case "message": 15920 this.eventSourceObject = _window; 15921 break; 15922 case "load": 15923 this.eventSourceObject = this.iframe; 15924 break; 15925 default: 15926 throw new Error("Unsupported event listener type: " + this.eventListenerType); 15927 } 15928 this.eventSourceObject.addEventListener(this.eventListenerType, this.proxyEventListener, !1), _window.document.body.appendChild(this.iframe), this.iframe.src = this.url, this.timeoutHandle = setTimeout(function() { 15929 _this.timeoutHandler(); 15930 }, this.timeout); 15931}, $90f323912e688b98$var$IframeHandler.prototype.eventListener = function(event) { 15932 var eventData = { 15933 event: event, 15934 sourceObject: this.eventSourceObject 15935 }; 15936 this.eventValidator.isValid(eventData) && (this.destroy(), this.callback(eventData)); 15937}, $90f323912e688b98$var$IframeHandler.prototype.timeoutHandler = function() { 15938 this.destroy(), this.timeoutCallback && this.timeoutCallback(); 15939}, $90f323912e688b98$var$IframeHandler.prototype.destroy = function() { 15940 var _this = this; 15941 clearTimeout(this.timeoutHandle), this._destroyTimeout = setTimeout(function() { 15942 _this.eventSourceObject.removeEventListener(_this.eventListenerType, _this.proxyEventListener, !1), _this.iframe.parentNode && _this.iframe.parentNode.removeChild(_this.iframe); 15943 }, 0); 15944}, $90f323912e688b98$var$WebMessageHandler.prototype.run = function(options, cb) { 15945 var _this = this; 15946 options.responseMode = "web_message", options.prompt = "none"; 15947 var currentOrigin = $90f323912e688b98$var$windowHelper.getOrigin(), redirectUriOrigin = $90f323912e688b98$var$objectHelper.getOriginFromUrl(options.redirectUri); 15948 if (redirectUriOrigin && currentOrigin !== redirectUriOrigin) return cb({ 15949 error: "origin_mismatch", 15950 error_description: "The redirectUri's origin (" + redirectUriOrigin + ") should match the window's origin (" + currentOrigin + ")." 15951 }); 15952 !function(authorizeUrl, options, callback) { 15953 new $90f323912e688b98$var$IframeHandler({ 15954 url: authorizeUrl, 15955 eventListenerType: "message", 15956 callback: function(eventData) { 15957 callback(null, eventData); 15958 }, 15959 timeout: options.timeout, 15960 eventValidator: { 15961 isValid: function(eventData) { 15962 return !(!eventData.event.data || "authorization_response" !== eventData.event.data.type || options.state !== eventData.event.data.response.state); 15963 } 15964 }, 15965 timeoutCallback: function() { 15966 callback({ 15967 error: "timeout", 15968 error_description: "Timeout during executing web_message communication", 15969 state: options.state 15970 }); 15971 } 15972 }).init(); 15973 }(this.webAuth.client.buildAuthorizeUrl(options), options, function(err, eventData) { 15974 var error = err; 15975 if (!err && eventData.event.data.response.error && (error = eventData.event.data.response), !error) { 15976 var parsedHash = eventData.event.data.response; 15977 return _this.webAuth.validateAuthenticationResponse(options, parsedHash, cb); 15978 } 15979 return "consent_required" === error.error && "localhost" === $90f323912e688b98$var$windowHelper.getWindow().location.hostname && _this.warn.warning("Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"), _this.webAuth.transactionManager.clearTransaction(error.state), cb($9
159790f323912e688b98$var$objectHelper.pick(error, [ 15980 "error", 15981 "error_description" 15982 ])); 15983 }); 15984}, $90f323912e688b98$var$CrossOriginAuthentication.prototype.login = function(options, cb) { 15985 var _this = this, url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "/co/authenticate"); 15986 options.username = options.username || options.email, delete options.email; 15987 var authenticateBody = { 15988 client_id: options.clientID || this.baseOptions.clientID, 15989 username: options.username 15990 }; 15991 options.password && (authenticateBody.password = options.password), options.otp && (authenticateBody.otp = options.otp); 15992 var realm = options.realm || this.baseOptions.realm; 15993 if (realm) { 15994 var credentialType = options.credentialType || this.baseOptions.credentialType || "http://auth0.com/oauth/grant-type/password-realm"; 15995 authenticateBody.realm = realm, authenticateBody.credential_type = credentialType; 15996 } else authenticateBody.credential_type = "password"; 15997 this.request.post(url).withCredentials().send(authenticateBody).end(function(err, data) { 15998 if (err) { 15999 var errorObject = err.response && err.response.body || { 16000 error: "request_error", 16001 error_description: JSON.stringify(err) 16002 }; 16003 return $90f323912e688b98$var$wrapCallback(cb, { 16004 forceLegacyError: !0 16005 })(errorObject); 16006 } 16007 function doAuth() { 16008 var popupMode = !0 === options.popup; 16009 options = $90f323912e688b98$var$objectHelper.blacklist(options, [ 16010 "password", 16011 "credentialType", 16012 "otp", 16013 "popup", 16014 "onRedirecting" 16015 ]); 16016 var authorizeOptions = $90f323912e688b98$var$objectHelper.merge(options).with({ 16017 loginTicket: data.body.login_ticket 16018 }), key = $90f323912e688b98$var$createKey(_this.baseOptions.rootUrl, data.body.co_id); 16019 _this.storage.setItem(key, data.body.co_verifier, { 16020 expires: 1 / 96 16021 }), popupMode ? _this.webMessageHandler.run(authorizeOptions, $90f323912e688b98$var$wrapCallback(cb, { 16022 forceLegacyError: !0 16023 })) : _this.webAuth.authorize(authorizeOptions); 16024 } 16025 "function" == typeof options.onRedirecting ? options.onRedirecting(doAuth) : doAuth(); 16026 }); 16027}, $90f323912e688b98$var$CrossOriginAuthentication.prototype.callback = function() { 16028 var targetOrigin = decodeURIComponent(function(name) { 16029 var parts = ("&" + $90f323912e688b98$var$windowHelper.getWindow().location.hash.substring(1)).split("&" + name + "="); 16030 if (2 === parts.length) return parts.pop().split("&").shift(); 16031 }("origin")), theWindow = $90f323912e688b98$var$windowHelper.getWindow(), _this = this; 16032 theWindow.addEventListener("message", function(evt) { 16033 if ("co_verifier_request" === evt.data.type) { 16034 var key = $90f323912e688b98$var$createKey(evt.origin, evt.data.request.id), verifier = function(storage, key) { 16035 try { 16036 var verifier = storage.getItem(key); 16037 return storage.removeItem(key), verifier || ""; 16038 } catch (e) { 16039 return ""; 16040 } 16041 }(_this.storage, key); 16042 evt.source.postMessage({ 16043 type: "co_verifier_response", 16044 response: { 16045 verifier: verifier 16046 } 16047 }, evt.origin); 16048 } 16049 }), theWindow.parent.postMessage({ 16050 type: "ready" 16051 }, targetOrigin); 16052}, $90f323912e688b98$var$Redirect.prototype.loginWithCredentials = function(options, cb) { 16053 options.realm = options.realm || options.connection, delete options.connection, this.crossOriginAuthentication.login(options, cb); 16054}, $90f323912e688b98$var$Redirect.prototype.signupAndLogin = function(options, cb) { 16055 var _this = this; 16056 return this.webAuth.client.dbConnection.signup(options, function(err) { 16057 return err ? cb(err) : (options.realm = options.realm || options.connection, delete options.connection, _this.webAuth.login(options, cb)); 16058 }); 16059}; 16060var $90f323912e688b98$var$winchan = $90f323912e688b98$var$createCommonjsModule(function(module) { 16061 var WinChan = function() { 16062 function addListener(w, event, cb) { 16063 w.attachEvent ? w.attachEvent("on" + event, cb) : w.addEventListener && w.addEventListener(event, cb, !1); 16064 } 16065 function removeListener(w, event, cb) { 16066 w.detachEvent ? w.detachEvent("on" + event, cb) : w.removeEventListener && w.removeEventListener(event, cb, !1); 16067 } 16068 function extractOrigin(url) { 16069 /^https?:\/\//.test(url) || (url = window.location.href); 16070 var m = /^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(url); 16071 return m ? m[1] : url; 16072 } 16073 var isIE = function() { 16074 if ("undefined" == typeof navigator) return !1; 16075 var rv = -1, ua = navigator.userAgent; 16076 if ("Microsoft Internet Explorer" === navigator.appName) null != new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(ua) && (rv = parseFloat(RegExp.$1)); 16077 else if (ua.indexOf("Trident") > -1) null !== new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(ua) && (rv = parseFloat(RegExp.$1)); 16078 return rv >= 8; 16079 }(); 16080 return "undefined" != typeof window && window.JSON && window.JSON.stringify && window.JSON.parse && window.postMessage ? { 16081 open: function(opts, cb) { 16082 if (!cb) throw "missing required callback argument"; 16083 var err, iframe; 16084 opts.url || (err = "missing required 'url' parameter"), opts.relay_url || (err = "missing required 'relay_url' parameter"), err && setTimeout(function() { 16085 cb(err); 16086 }, 0), opts.window_name || (opts.window_name = null), opts.window_features && !function() { 16087 try { 16088 var userAgent = navigator.userAgent; 16089 return -1 != userAgent.indexOf("Fennec/") || -1 != userAgent.indexOf("Firefox/") && -1 != userAgent.indexOf("Android"); 16090 } catch (e) {} 16091 return !1; 16092 }() || (opts.window_features = void 0); 16093 var messageTarget, origin = opts.origin || extractOrigin(opts.url); 16094 if (origin !== extractOrigin(opts.relay_url)) return setTimeout(function() { 16095 cb("invalid arguments: origin of url and relay_url must match"); 16096 }, 0); 16097 isIE && ((iframe = document.createElement("iframe")).setAttribute("src", opts.relay_url), iframe.style.display = "none", iframe.setAttribute("name", "__winchan_relay_frame"), document.body.appendChild(iframe), messageTarget = iframe.contentWindow); 16098 var w = opts.popup || window.open(opts.url, opts.window_name, opts.window_features); 16099 opts.popup && (w.location.href = opts.url), messageTarget || (messageTarget = w
16099); 16100 var closeInterval = setInterval(function() { 16101 w && w.closed && (cleanup(), cb && (cb("User closed the popup window"), cb = null)); 16102 }, 500), req = JSON.stringify({ 16103 a: "request", 16104 d: opts.params 16105 }); 16106 function cleanup() { 16107 if (iframe && document.body.removeChild(iframe), iframe = void 0, closeInterval && (closeInterval = clearInterval(closeInterval)), removeListener(window, "message", onMessage), removeListener(window, "unload", cleanup), w) try { 16108 w.close(); 16109 } catch (securityViolation) { 16110 messageTarget.postMessage("die", origin); 16111 } 16112 w = messageTarget = void 0; 16113 } 16114 function onMessage(e) { 16115 if (e.origin === origin) { 16116 try { 16117 var d = JSON.parse(e.data); 16118 } catch (err) { 16119 if (cb) return cb(err); 16120 throw err; 16121 } 16122 "ready" === d.a ? messageTarget.postMessage(req, origin) : "error" === d.a ? (cleanup(), cb && (cb(d.d), cb = null)) : "response" === d.a && (cleanup(), cb && (cb(null, d.d), cb = null)); 16123 } 16124 } 16125 return addListener(window, "unload", cleanup), addListener(window, "message", onMessage), { 16126 originalPopup: w, 16127 close: cleanup, 16128 focus: function() { 16129 if (w) try { 16130 w.focus(); 16131 } catch (e) {} 16132 } 16133 }; 16134 }, 16135 onOpen: function(cb) { 16136 var o = "*", msgTarget = isIE ? function() { 16137 for(var frames = window.opener.frames, i = frames.length - 1; i >= 0; i--)try { 16138 if (frames[i].location.protocol === window.location.protocol && frames[i].location.host === window.location.host && "__winchan_relay_frame" === frames[i].name) return frames[i]; 16139 } catch (e) {} 16140 }() : window.opener; 16141 if (!msgTarget) throw "can't find relay frame"; 16142 function doPost(msg) { 16143 msg = JSON.stringify(msg), isIE ? msgTarget.doPost(msg, o) : msgTarget.postMessage(msg, o); 16144 } 16145 function onDie(e) { 16146 if ("die" === e.data) try { 16147 window.close(); 16148 } catch (o_O) {} 16149 } 16150 addListener(isIE ? msgTarget : window, "message", function onMessage(e) { 16151 var d; 16152 try { 16153 d = JSON.parse(e.data); 16154 } catch (err) {} 16155 d && "request" === d.a && (removeListener(window, "message", onMessage), o = e.origin, cb && setTimeout(function() { 16156 cb(o, d.d, function(r) { 16157 cb = void 0, doPost({ 16158 a: "response", 16159 d: r 16160 }); 16161 }); 16162 }, 0)); 16163 }), addListener(isIE ? msgTarget : window, "message", onDie); 16164 try { 16165 doPost({ 16166 a: "ready" 16167 }); 16168 } catch (e) { 16169 addListener(msgTarget, "load", function(e) { 16170 doPost({ 16171 a: "ready" 16172 }); 16173 }); 16174 } 16175 var onUnload = function() { 16176 try { 16177 removeListener(isIE ? msgTarget : window, "message", onDie); 16178 } catch (ohWell) {} 16179 cb && doPost({ 16180 a: "error", 16181 d: "client closed window" 16182 }), cb = void 0; 16183 try { 16184 window.close(); 16185 } catch (e) {} 16186 }; 16187 return addListener(window, "unload", onUnload), { 16188 detach: function() { 16189 removeListener(window, "unload", onUnload); 16190 } 16191 }; 16192 } 16193 } : { 16194 open: function(url, winopts, arg, cb) { 16195 setTimeout(function() { 16196 cb("unsupported browser"); 16197 }, 0); 16198 }, 16199 onOpen: function(cb) { 16200 setTimeout(function() { 16201 cb("unsupported browser"); 16202 }, 0); 16203 } 16204 }; 16205 }(); 16206 module.exports && (module.exports = WinChan); 16207}); 16208var $90f323912e688b98$var$urlHelper = { 16209 extractOrigin: function(url) { 16210 /^https?:\/\//.test(url) || (url = window.location.href); 16211 var m = /^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(url); 16212 return m ? m[1] : url; 16213 } 16214}; 16215function $90f323912e688b98$var$PopupHandler() { 16216 this._current_popup = null; 16217} 16218function $90f323912e688b98$var$Popup(webAuth, options) { 16219 this.baseOptions = options, this.baseOptions.popupOrigin = options.popupOrigin, this.client = webAuth.client, this.webAuth = webAuth, this.transactionManager = new $90f323912e688b98$var$TransactionManager(this.baseOptions), this.crossOriginAuthentication = new $90f323912e688b98$var$CrossOriginAuthentication(webAuth, this.baseOptions), this.warn = new $90f323912e688b98$var$Warn({ 16220 disableWarnings: !!options._disableDeprecationWarnings 16221 }); 16222} 16223function $90f323912e688b98$var$SilentAuthenticationHandler(options) { 16224 this.authenticationUrl = options.authenticationUrl, this.timeout = options.timeout || 6e4, this.handler = null, this.postMessageDataType = options.postMessageDataType || !1, this.postMessageOrigin = options.postMessageOrigin || $90f323912e688b98$var$windowHelper.getWindow().location.origin || $90f323912e688b98$var$windowHelper.getWindow().location.protocol + "//" + $90f323912e688b98$var$windowHelper.getWindow().location.hostname + ($90f323912e688b98$var$windowHelper.getWindow().location.port ? ":" + $90f323912e688b98$var$windowHelper.getWindow().location.port : ""); 16225} 16226function $90f323912e688b98$var$UsernamePassword(options) { 16227 this.baseOptions = options, this.request = new $90f323912e688b98$var$RequestBuilder(options), this.transactionManager = new $90f323912e688b98$var$TransactionManager(this.baseOptions); 16228} 16229function $90f323912e688b98$var$HostedPages(client, options) { 16230 this.baseOptions = options, this.client = client, this.baseOptions.universalLoginPage = !0, this.request = new $90f323912e688b98$var$RequestBuilder(this.baseOptions), this.warn = new $90f323912e688b98$var$Warn({ 16231 disableWarnings: !!options._disableDeprecationWarnings 16232 }); 16233} 16234$90f323912e688b98$var$PopupHandler.prototype.calculatePosition = function(options) { 16235 var width = options.width || 500, height = options.height || 600, _window = $90f323912e688b98$var$windowHelper.getWindow(), screenX = void 0 !== _window.screenX ? _window.screenX : _window.screenLeft, screenY = void 0 !== _window.screenY ? _window.screenY : _window.screenTop, outerWidth = void 0 !== _window.outerWidth ? _window.outerWidth : _window.document.body.clientWidth, outerHeight = void 0 !== _window.outerHeight ? _window.outerHeight : _window.document.body.clientHeight; 16236 return { 16237 width: width, 16238 height: height, 16239 left: options.left || screenX + (outerWidth - width) / 2, 16240 top: options.top || screenY + (outerHeight - height) / 2 16241 }; 16242}, $90f323912e688b98$var$PopupHandler.prototype.preload = function(options) { 16243 var _this = this, _window = $90f323912e688b98$var$windowHelper.getWindow(), popupPosition = this.calculatePosition(options.popupOptions || {}), popupOptions = $90f323912e688b98$var$objectHelper.merge(popupPosition).with(options.popupOptions), url = options.url || "about:blank", windowFeatures = $90f323912e688b98$var$lib.stringify(popupOptions, { 16244 encode: !1, 16245 delimiter: "," 16246 }); 16247 return this._current_popup && !this._current_popup.closed || (this._current_popup = _window.open(url, "auth0_signup_popup", windowFeatures), this._current_popup.kill = function() { 16248 this.close(), _this._current_popup = null; 16249 }), this._current_popup; 16250}, $90f323912e688b98$var$PopupHandler.prototype.load = function(url, relayUrl, options, cb) { 16251 var _this = this, popupPosition = this.calculatePosition(options.popupOptions || {}), popupOptions = $90f323912e688b98$var$objectHelper.merge(popupPosition).with(options.popupOptions), winchanOptions = $90f323912e688b98$var$objectHelper.merge({ 16252 url: url, 16253 relay_url: relayUrl, 16254 window_features: $90f323912e688b98$var$lib.stringify(popupOptions, { 16255 delimiter: ",", 16256 encode: !1 16257 }), 16258 popup: this._current_popup 16259 }).with(options), popup = $90f323912e688b98$var$winchan.open(winchanOptions, function(err, data) { 16260 if (!err || "SyntaxError" !== err.name) return _this._current_popup = null, cb(err, data); 16261 }); 16262 return popup.focus(), popup; 16263}, $90f323912e688b98$var$Popup.prototype.buildPopupHandler = function() { 16264 var pluginHandler = this.baseOptions.plugins.get("popup.getPopupHandler"); 16265 return pluginHandler ? pluginHandler.getPopupHandler() : new $90f323912e688b98$var$PopupHandler; 16266}, $90f323912e688b98$var$Popup.prototype.preload = function(options) { 16267 options = options || {}; 16268 var popup = this.buildPopupHandler(); 16269 return popup.preload(options), popup; 16270}, $90f323912e688b98$var$Popup.prototype.getPopupHandler = function(options, preload) { 16271 return options.popupHandler ? options.popupHandler : preload ? this.preload(options) : this.buildPopupHandler(); 16272}, $90f323912e688b98$var$Popup.prototype.callback = function(options) { 16273 var _this = this, theWindow = $90f323912e688b98$var$windowHelper.getWindow(), originUrl = (options = options || {}).popupOrigin || this.baseOptions.popupOrigin || $90f323912e688b98$var$windowHelper.getOrigin(); 16274 theWindow.opener ? $90f323912e688b98$var$winchan.onOpen(function(popupOrigin, r, cb) { 16275 if (popupOrigin !== originUrl) return cb({ 16276 error: "origin_mismatch", 16277 error_description: "The popup's origin (" + popupOrigin + ") should match the `popupOrigin` parameter (" + originUrl + ")." 16278 }); 16279 _this.webAuth.parseHash(options || {}, function(err, data) { 16280 return cb(err || data); 16281 }); 16282 }) : theWindow.doPost = function(msg) { 16283 theWindow.parent && theWindow.parent.postMessage(msg, originUrl); 16284 }; 16285}, $90f323912e688b98$var$Popup.prototype.authorize = function(options, cb) { 16286 var url, relayUrl, popOpts = {}, pluginHandler = this.baseOptions.plugins.get("popup.authorize"), params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 16287 "clientID", 16288 "scope", 16289 "domain", 16290 "audience", 16291 "tenant", 16292 "responseType", 16293 "redirectUri", 16294 "_csrf", 16295 "state", 16296 "_intstate", 16297 "nonce", 16298 "organization", 16299 "invitation" 16300 ]).with($90f323912e688b98$var$objectHelper.blacklist(options, [ 16301 "popupHandler" 16302 ])); 16303 return $90f323912e688b98$var$assert.check(params, { 16304 type: "object",
16305 message: "options parameter is not valid" 16306 }, { 16307 responseType: { 16308 type: "string", 16309 message: "responseType option is required" 16310 } 16311 }), relayUrl = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "relay.html"), options.owp ? params.owp = !0 : (popOpts.origin = $90f323912e688b98$var$urlHelper.extractOrigin(params.redirectUri), relayUrl = params.redirectUri), options.popupOptions && (popOpts.popupOptions = $90f323912e688b98$var$objectHelper.pick(options.popupOptions, [ 16312 "width", 16313 "height", 16314 "top", 16315 "left" 16316 ])), pluginHandler && (params = pluginHandler.processParams(params)), (params = this.transactionManager.process(params)).scope = params.scope || "openid profile email", delete params.domain, url = this.client.buildAuthorizeUrl(params), this.getPopupHandler(options).load(url, relayUrl, popOpts, $90f323912e688b98$var$wrapCallback(cb, { 16317 keepOriginalCasing: !0 16318 })); 16319}, $90f323912e688b98$var$Popup.prototype.loginWithCredentials = function(options, cb) { 16320 options.realm = options.realm || options.connection, options.popup = !0, options = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 16321 "redirectUri", 16322 "responseType", 16323 "state", 16324 "nonce", 16325 "timeout" 16326 ]).with($90f323912e688b98$var$objectHelper.blacklist(options, [ 16327 "popupHandler", 16328 "connection" 16329 ])), options = this.transactionManager.process(options), this.crossOriginAuthentication.login(options, cb); 16330}, $90f323912e688b98$var$Popup.prototype.passwordlessVerify = function(options, cb) { 16331 var _this = this; 16332 return this.client.passwordless.verify($90f323912e688b98$var$objectHelper.blacklist(options, [ 16333 "popupHandler" 16334 ]), function(err) { 16335 if (err) return cb(err); 16336 options.username = options.phoneNumber || options.email, options.password = options.verificationCode, delete options.email, delete options.phoneNumber, delete options.verificationCode, delete options.type, _this.client.loginWithResourceOwner(options, cb); 16337 }); 16338}, $90f323912e688b98$var$Popup.prototype.signupAndLogin = function(options, cb) { 16339 var _this = this; 16340 return this.client.dbConnection.signup(options, function(err) { 16341 if (err) return cb(err); 16342 _this.loginWithCredentials(options, cb); 16343 }); 16344}, $90f323912e688b98$var$SilentAuthenticationHandler.create = function(options) { 16345 return new $90f323912e688b98$var$SilentAuthenticationHandler(options); 16346}, $90f323912e688b98$var$SilentAuthenticationHandler.prototype.login = function(usePostMessage, callback) { 16347 this.handler = new $90f323912e688b98$var$IframeHandler({ 16348 auth0: this.auth0, 16349 url: this.authenticationUrl, 16350 eventListenerType: usePostMessage ? "message" : "load", 16351 callback: this.getCallbackHandler(callback, usePostMessage),
16352 timeout: this.timeout, 16353 eventValidator: this.getEventValidator(), 16354 timeoutCallback: function() { 16355 callback(null, "#error=timeout&error_description=Timeout+during+authentication+renew."); 16356 }, 16357 usePostMessage: usePostMessage || !1 16358 }), this.handler.init(); 16359}, $90f323912e688b98$var$SilentAuthenticationHandler.prototype.getEventValidator = function() { 16360 var _this = this; 16361 return { 16362 isValid: function(eventData) { 16363 switch(eventData.event.type){ 16364 case "message": 16365 return eventData.event.origin === _this.postMessageOrigin && eventData.event.source === _this.handler.iframe.contentWindow && (!1 === _this.postMessageDataType || eventData.event.data.type && eventData.event.data.type === _this.postMessageDataType); 16366 case "load": 16367 if ("about:" === eventData.sourceObject.contentWindow.location.protocol) return !1; 16368 default: 16369 return !0; 16370 } 16371 } 16372 }; 16373}, $90f323912e688b98$var$SilentAuthenticationHandler.prototype.getCallbackHandler = function(callback, usePostMessage) { 16374 return function(eventData) { 16375 var callbackValue; 16376 callbackValue = usePostMessage ? "object" == typeof eventData.event.data && eventData.event.data.hash ? eventData.event.data.hash : eventData.event.data : eventData.sourceObject.contentWindow.location.hash, callback(null, callbackValue); 16377 }; 16378}, $90f323912e688b98$var$UsernamePassword.prototype.login = function(options, cb) { 16379 var url, body; 16380 return url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "usernamepassword", "login"), options.username = options.username || options.email, options = $90f323912e688b98$var$objectHelper.blacklist(options, [ 16381 "email", 16382 "onRedirecting" 16383 ]), body = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 16384 "clientID", 16385 "redirectUri", 16386 "tenant", 16387 "responseType", 16388 "responseMode", 16389 "scope", 16390 "audience" 16391 ]).with(options), body = this.transactionManager.process(body), body = $90f323912e688b98$var$objectHelper.toSnakeCase(body, [ 16392 "auth0Client" 16393 ]), this.request.post(url).send(body).end($90f323912e688b98$var$wrapCallback(cb)); 16394}, $90f323912e688b98$var$UsernamePassword.prototype.callback = function(formHtml) { 16395 var div, _document = $90f323912e688b98$var$windowHelper.getDocument(); 16396 (div = _document.createElement("div")).innerHTML = formHtml, _document.body.appendChild(div).children[0].submit(); 16397}, $90f323912e688b98$var$HostedPages.prototype.login = function(options, cb) { 16398 if ($90f323912e688b98$var$windowHelper.getWindow().location.host !== this.baseOptions.domain) throw new Error("This method is meant to be used only inside the Universal Login Page."); 16399 var usernamePassword, params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 16400 "clientID", 16401 "redirectUri", 16402 "tenant", 16403 "responseType", 16404 "responseMode", 16405 "scope", 16406 "audience", 16407 "_csrf", 16408 "state", 16409 "_intstate", 16410 "nonce" 16411 ]).with(options); 16412 return $90f323912e688b98$var$assert.check(params, { 16413 type: "object", 16414 message: "options parameter is not valid" 16415 }, { 16416 responseType: { 16417 type: "string", 16418 message: "responseType option is required" 16419 } 16420 }), (usernamePassword = new $90f323912e688b98$var$UsernamePassword(this.baseOptions)).login(params, function(err, data) { 16421 if (err) return cb(err); 16422 function doAuth() { 16423 usernamePassword.callback(data); 16424 } 16425 if ("function" == typeof options.onRedirecting) return options.onRedirecting(function() { 16426 doAuth(); 16427 }); 16428 doAuth(); 16429 }); 16430}, $90f323912e688b98$var$HostedPages.prototype.signupAndLogin = function(options, cb) { 16431 var _this = this; 16432 return _this.client.client.dbConnection.signup(options, function(err) { 16433 return err ? cb(err) : _this.login(options, cb); 16434 }); 16435}, $90f323912e688b98$var$HostedPages.prototype.getSSOData = function(withActiveDirectories, cb) { 16436 var url, params = ""; 16437 return "function" == typeof withActiveDirectories && (cb = withActiveDirectories, withActiveDirectories = !1), $90f323912e688b98$var$assert.check(withActiveDirectories, { 16438 type: "boolean",
16439 message: "withActiveDirectories parameter is not valid" 16440 }), $90f323912e688b98$var$assert.check(cb, { 16441 type: "function", 16442 message: "cb parameter is not valid" 16443 }), withActiveDirectories && (params = "?" + $90f323912e688b98$var$lib.stringify({ 16444 ldaps: 1, 16445 client_id: this.baseOptions.clientID 16446 })), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "user", "ssodata", params), this.request.get(url, { 16447 noHeaders: !0 16448 }).withCredentials().end($90f323912e688b98$var$wrapCallback(cb)); 16449}; 16450var $90f323912e688b98$var$noop = function() {}, $90f323912e688b98$var$captchaSolved = $90f323912e688b98$var$noop, $90f323912e688b98$var$done = $90f323912e688b98$var$noop, $90f323912e688b98$var$captchaReloaded = !1, $90f323912e688b98$var$Flow = { 16451 DEFAULT: "default", 16452 SIGNUP: "signup", 16453 PASSWORDLESS: "passwordless", 16454 PASSWORD_RESET: "password_reset" 16455}, $90f323912e688b98$var$defaults$2 = { 16456 lang: "en", 16457 templates: { 16458 auth0: function(challenge) { 16459 var message = "code" === challenge.type ? "Enter the code shown above" : "Solve the formula shown above"; 16460 return '<div class="captcha-challenge">\n <img src="' + challenge.image + '" />\n <button type="button" class="captcha-reload">\u21BA</button>\n</div>\n<input type="text" name="captcha"\n class="form-control captcha-control"\n placeholder="' + message + '" />'; 16461 }, 16462 recaptcha_v2: function() { 16463 return '<div class="recaptcha" ></div><input type="hidden" name="captcha" />'; 16464 }, 16465 recaptcha_enterprise: function() { 16466 return '<div class="recaptcha" ></div><input type="hidden" name="captcha" />'; 16467 }, 16468 hcaptcha: function() { 16469 return '<div class="hcaptcha" ></div><input type="hidden" name="captcha" />'; 16470 }, 16471 friendly_captcha: function() { 16472 return '<div class="friendly-captcha" ></div><input type="hidden" name="captcha" />'; 16473 }, 16474 arkose: function() { 16475 return '<div class="arkose" ></div><input type="hidden" name="captcha" />'; 16476 }, 16477 auth0_v2: function() { 16478 return '<div class="auth0_v2" ></div><input type="hidden" name="captcha" />'; 16479 }, 16480 error: function() { 16481 return '<div class="error" style="color: red;">Error getting the bot detection challenge. Please contact the system administrator.</div>'; 16482 } 16483 } 16484}; 16485function $90f323912e688b98$var$globalForCaptchaProvider(provider) { 16486 switch(provider){ 16487 case "recaptcha_v2": 16488 return window.grecaptcha; 16489 case "recaptcha_enterprise": 16490 return window.grecaptcha.enterprise; 16491 case "hcaptcha": 16492 return window.hcaptcha; 16493 case "friendly_captcha": 16494 return window.friendlyChallenge; 16495 case "arkose": 16496 return window.arkose; 16497 case "auth0_v2": 16498 return window.turnstile; 16499 default: 16500 throw new Error("Unknown captcha provider"); 16501 } 16502} 16503function $90f323912e688b98$var$loadScript(url, attributes) { 16504 var script = window.document.createElement("script"); 16505 for(var attr in attributes)attr.startsWith("data-") ? script.dataset[attr.replace("data-", "")] = attributes[attr] : script[attr] = attributes[attr]; 16506 script.src = url, window.document.body.appendChild(script); 16507} 16508function $90f323912e688b98$var$removeScript(url) { 16509 window.document.querySelectorAll('script[src="' + url + '"]').forEach(function(script) { 16510 script.remove(); 16511 }); 16512} 16513function $90f323912e688b98$var$injectCaptchaScript(opts, callback, setValue) { 16514 var callbackName = opts.provider + "Callback_" + Math.floor(1000001 * Math.random()), attributes = { 16515 async: !0, 16516 defer: !0 16517 }, scriptSrc = function(provider, lang, callback, clientSubdomain, siteKey) { 16518 switch(provider){ 16519 case "recaptcha_v2": 16520 return "https://www.recaptcha.net/recaptcha/api.js?hl=" + lang + "&onload=" + callback; 16521 case "recaptcha_enterprise": 16522 return "https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl=" + lang + "&onload=" + callback; 16523 case "hcaptcha": 16524 return "https://js.hcaptcha.com/1/api.js?hl=" + lang + "&onload=" + callback; 16525 case "friendly_captcha": 16526 return "https://cdn.jsdelivr.net/npm/[email protected]/widget.min.js"; 16527 case "arkose": 16528 return "https://" + clientSubdomain + ".arkoselabs.com/v2/" + siteKey + "/api.js"; 16529 case "auth0_v2": 16530 return "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit&onload=" + callback; 16531 default: 16532 throw new Error("Unknown captcha provider"); 16533 } 16534 }(opts.provider, opts.lang, callbackName, opts.clientSubdomain, opts.siteKey); 16535 if ("arkose" === opts.provider || "auth0_v2" === opts.provider) { 16536 var retryCount = 0; 16537 attributes["data-callback"] = callbackName, attributes.onerror = function() { 16538 if (retryCount < 3) return $90f323912e688b98$var$removeScript(scriptSrc), $90f323912e688b98$var$loadScript(scriptSrc, attributes), void retryCount++; 16539 $90f323912e688b98$var$removeScript(scriptSrc), $90f323912e688b98$var$done(new Error(opts.provider + " failed to load")), setValue("BYPASS_CAPTCHA"); 16540 }, window[callbackName] = function(arkose) { 16541 window.arkose = arkose, callback(arkose); 16542 }; 16543 } else window[callbackName] = function() { 16544 delete window[callbackName], callback(); 16545 }, "friendly_captcha" === opts.provider && (attributes.onload = window[callbackName]); 16546 $90f323912e688b98$var$loadScript(scriptSrc, attributes); 16547} 16548var $90f323912e688b98$var$captcha = { 16549 render: function(auth0Client, flow, element, options, callback) { 16550 function load(loadDone) { 16551 function challengeCallback(err, challenge) { 16552 return err ? (element.innerHTML = options.templates.error(err), $90f323912e688b98$var$done(err)) : challenge.required ? (element.style.display = "", void ("auth0" === challenge.provider ? (!function(element, options, challenge, load) { 16553 element.innerHTML = options.templates[challenge.provider](challenge), element.querySelector(".captcha-reload").addEventListener("click", function(e) { 16554 e.preventDefault(), load(); 16555 }); 16556 }(element, options, challenge, load), $90f323912e688b98$var$done()) : "recaptcha_v2"
16556!== challenge.provider && "recaptcha_enterprise" !== challenge.provider && "hcaptcha" !== challenge.provider && "friendly_captcha" !== challenge.provider && "arkose" !== challenge.provider && "auth0_v2" !== challenge.provider || function(element, options, challenge) { 16557 var captchaClass, widgetId = element.hasAttribute("data-wid") && element.getAttribute("data-wid"); 16558 function setValue(value) { 16559 element.querySelector('input[name="captcha"]').value = value || ""; 16560 } 16561 if ("friendly_captcha" === challenge.provider && window.auth0FCInstance) return setValue(), void window.auth0FCInstance.reset(); 16562 if ("arkose" === challenge.provider && $90f323912e688b98$var$globalForCaptchaProvider(challenge.provider)) return setValue(), void $90f323912e688b98$var$globalForCaptchaProvider(challenge.provider).reset(); 16563 if (widgetId) return setValue(), void $90f323912e688b98$var$globalForCaptchaProvider(challenge.provider).reset(widgetId); 16564 switch(element.innerHTML = options.templates[challenge.provider](challenge), challenge.provider){ 16565 case "recaptcha_enterprise": 16566 case "recaptcha_v2": 16567 captchaClass = ".recaptcha"; 16568 break; 16569 case "hcaptcha": 16570 captchaClass = ".hcaptcha"; 16571 break; 16572 case "friendly_captcha": 16573 captchaClass = ".friendly-captcha"; 16574 break; 16575 case "arkose": 16576 captchaClass = ".arkose"; 16577 break; 16578 case "auth0_v2": 16579 captchaClass = ".auth0_v2"; 16580 } 16581 var captchaDiv = element.querySelector(captchaClass); 16582 $90f323912e688b98$var$injectCaptchaScript({ 16583 lang: options.lang, 16584 provider: challenge.provider, 16585 clientSubdomain: challenge.clientSubdomain, 16586 siteKey: challenge.siteKey 16587 }, function(arkose) { 16588 var global1 = $90f323912e688b98$var$globalForCaptchaProvider(challenge.provider); 16589 if ("arkose" === challenge.provider) { 16590 var retryCount = 0, arkoseLoaded = !1; 16591 arkose.setConfig({ 16592 onReady: function() { 16593 arkoseLoaded && !$90f323912e688b98$var$captchaReloaded || ($90f323912e688b98$var$done(null, { 16594 triggerCaptcha: function(solvedCallback) { 16595 arkose.run(), $90f323912e688b98$var$captchaSolved = solvedCallback; 16596 } 16597 }), $90f323912e688b98$var$captchaReloaded && ($90f323912e688b98$var$captchaReloaded = !1), arkoseLoaded = !0); 16598 }, 16599 onCompleted: function(response) { 16600 setValue(response.token), $90f323912e688b98$var$captchaSolved(); 16601 }, 16602 onError: function(response) { 16603 retryCount < 3 ? (setValue(), arkose.reset(), setTimeout(function() { 16604 arkose.run(); 16605 }, 500), retryCount++) : (arkoseLoaded || ($90f323912e688b98$var$done(new Error(response.error.error)), arkoseLoaded = !0), setValue("BYPASS_CAPTCHA")); 16606 } 16607 }); 16608 } else if ("friendly_captcha" === challenge.provider) window.auth0FCInstance = new global1.WidgetInstance(captchaDiv, { 16609 sitekey: challenge.siteKey, 16610 language: options.lang, 16611 doneCallback: function(solution) { 16612 setValue(solution); 16613 }, 16614 errorCallback: function() { 16615 setValue(); 16616 } 16617 }), $90f323912e688b98$var$done(); 16618 else { 16619 var renderParams = { 16620 callback: setValue, 16621 "expired-callback": function() { 16622 setValue(); 16623 }, 16624 "error-callback": function() { 16625 setValue(); 16626 }, 16627 sitekey: challenge.siteKey 16628 }; 16629 "auth0_v2" === challenge.provider && (retryCount = 0, renderParams.language = options.lang, renderParams.theme = "light", renderParams.retry = "never", renderParams["response-field"] = !1, renderParams["error-callback"] = function() { 16630 return retryCount < 3 ? (setValue(), $90f323912e688b98$var$globalForCaptchaProvider(challenge.provider).reset(widgetId), retryCount++) : setValue("BYPASS_CAPTCHA"), !0; 16631 }), widgetId = global1.render(captchaDiv, renderParams), element.setAttribute("data-wid", widgetId), $90f323912e688b98$var$done(); 16632 } 16633 }, setValue); 16634 }(element, options, challenge))) : (element.style.display = "none", element.innerHTML = "", $90f323912e688b98$var$done()); 16635 } 16636 $90f323912e688b98$var$done = loadDone || $90f323912e688b98$var$noop, flow === $90f323912e688b98$var$Flow.PASSWORDLESS ? auth0Client.passwordless.getChallenge(challengeCallback) : flow === $90f323912e688b98$var$Flow.PASSWORD_RESET ? auth0Client.dbConnection.getPasswordResetChallenge(challengeCallback) : flow === $90f323912e688b98$var$Flow.SIGNUP ? auth0Client.dbConnection.getSignupChallenge(challengeCallback) : auth0Client.getChallenge(challengeCallback); 16637 } 16638 return options = $90f323912e688b98$var$objectHelper.merge($90f323912e688b98$var$defaults$2).with(options || {}), load(callback), { 16639 reload: function(reloadDone) { 16640 $90f323912e688b98$var$captchaReloaded = !0, load(reloadDone); 16641 }, 16642 getValue: function() { 16643 var captchaInput = element.querySelector('input[name="captcha"]'); 16644 if (captchaInput) return captchaInput.value; 16645 } 16646 }; 16647 }, 16648 Flow: $90f323912e688b98$var$Flow 16649}; 16650function $90f323912e688b98$var$defaultClock() { 16651 return new Date; 16652} 16653function $90f323912e688b98$export$d1b7252873cb8575(options) { 16654 $90f323912e688b98$var$assert.check(options, { 16655 type: "object",
16656 message: "options parameter is not valid" 16657 }, { 16658 domain: { 16659 type: "string", 16660 message: "domain option is required" 16661 }, 16662 clientID: { 16663 type: "string", 16664 message: "clientID option is required" 16665 }, 16666 responseType: { 16667 optional: !0, 16668 type: "string", 16669 message: "responseType is not valid" 16670 }, 16671 responseMode: { 16672 optional: !0, 16673 type: "string", 16674 message: "responseMode is not valid" 16675 }, 16676 redirectUri: { 16677 optional: !0, 16678 type: "string", 16679 message: "redirectUri is not valid" 16680 }, 16681 scope: { 16682 optional: !0, 16683 type: "string", 16684 message: "scope is not valid" 16685 }, 16686 audience: { 16687 optional: !0, 16688 type: "string", 16689 message: "audience is not valid" 16690 }, 16691 popupOrigin: { 16692 optional: !0, 16693 type: "string", 16694 message: "popupOrigin is not valid" 16695 }, 16696 leeway: { 16697 optional: !0, 16698 type: "number", 16699 message: "leeway is not valid" 16700 }, 16701 plugins: { 16702 optional: !0, 16703 type: "array", 16704 message: "plugins is not valid" 16705 }, 16706 maxAge: { 16707 optional: !0, 16708 type: "number", 16709 message: "maxAge is not valid" 16710 }, 16711 stateExpiration: { 16712 optional: !0, 16713 type: "number", 16714 message: "stateExpiration is not valid" 16715 }, 16716 legacySameSiteCookie: { 16717 optional: !0, 16718 type: "boolean", 16719 message: "legacySameSiteCookie option is not valid" 16720 }, 16721 _disableDeprecationWarnings: { 16722 optional: !0, 16723 type: "boolean", 16724 message: "_disableDeprecationWarnings option is not valid" 16725 }, 16726 _sendTelemetry: { 16727 optional: !0, 16728 type: "boolean", 16729 message: "_sendTelemetry option is not valid" 16730 }, 16731 _telemetryInfo: { 16732 optional: !0, 16733 type: "object", 16734 message: "_telemetryInfo option is not valid" 16735 }, 16736 _timesToRetryFailedRequests: { 16737 optional: !0, 16738 type: "number", 16739 message: "_timesToRetryFailedRequests option is not valid" 16740 } 16741 }), options.overrides && $90f323912e688b98$var$assert.check(options.overrides, { 16742 type: "object", 16743 message: "overrides option is not valid" 16744 }, { 16745 __tenant: { 16746 optional: !0, 16747 type: "string", 16748 message: "__tenant option is required" 16749 }, 16750 __token_issuer: { 16751 optional: !0, 16752 type: "string", 16753 message: "__token_issuer option is required" 16754 }, 16755 __jwks_uri: { 16756 optional: !0, 16757 type: "string", 16758 message: "__jwks_uri is required" 16759 } 16760 }), this.baseOptions = options, this.baseOptions.plugins = new $90f323912e688b98$var$PluginHandler(this, this.baseOptions.plugins || []), this.baseOptions._sendTelemetry = !1 !== this.baseOptions._sendTelemetry || this.baseOptions._sendTelemetry, this.baseOptions._timesToRetryFailedRequests = options._timesToRetryFailedRequests ? parseInt(options._timesToRetryFailedRequests) : 0, this.baseOptions.tenant = this.baseOptions.overrides && this.baseOptions.overrides.__tenant || this.baseOptions.domain.split(".")[0], this.baseOptions.token_issuer = this.baseOptions.overrides && this.baseOptions.overrides.__token_issuer || "https://" + this.baseOptions.domain + "/", this.baseOptions.jwksURI = this.baseOptions.overrides && this.baseOptions.overrides.__jwks_uri, !1 !== options.legacySameSiteCookie && (this.baseOptions.legacySameSiteCookie = !0), this.transactionManager = new $90f323912e688b98$var$TransactionManager(this.baseOptions), this.client = new $90f323912e688b98$export$d9e3c9dc7eaad0c3(this.baseOptions), this.redirect = new $90f323912e688b98$var$Redirect(this, this.baseOptions), this.popup = new $90f323912e688b98$var$Popup(this, this.baseOptions), this.crossOriginAuthentication = new $90f323912e688b98$var$CrossOriginAuthentication(this, this.baseOptions), this.webMessageHandler = new $90f323912e688b98$var$WebMessageHandler(this), this._universalLogin = new $90f323912e688b98$var$HostedPages(this, this.baseOptions), this.ssodataStorage = new $90f323912e688b98$var$SSODataStorage(this.baseOptions); 16761} 16762function $90f323912e688b98$var$PasswordlessAuthentication(request, options) { 16763 this.baseOptions = options, this.request = request; 16764} 16765function $90f323912e688b98$var$DBConnection(request, options) { 16766 this.baseOptions = options, this.request = request; 16767} 16768function $90f323912e688b98$export$d9e3c9dc7eaad0c3(auth0, options) { 16769 2 === arguments.length ? this.auth0 = auth0 : options = auth0, $90f323912e688b98$var$assert.check(options, { 16770 type: "object",
16771 message: "options parameter is not valid" 16772 }, { 16773 domain: { 16774 type: "string", 16775 message: "domain option is required" 16776 }, 16777 clientID: { 16778 type: "string", 16779 message: "clientID option is required" 16780 }, 16781 responseType: { 16782 optional: !0, 16783 type: "string", 16784 message: "responseType is not valid" 16785 }, 16786 responseMode: { 16787 optional: !0, 16788 type: "string", 16789 message: "responseMode is not valid" 16790 }, 16791 redirectUri: { 16792 optional: !0, 16793 type: "string", 16794 message: "redirectUri is not valid" 16795 }, 16796 scope: { 16797 optional: !0, 16798 type: "string", 16799 message: "scope is not valid" 16800 }, 16801 audience: { 16802 optional: !0, 16803 type: "string", 16804 message: "audience is not valid" 16805 }, 16806 _disableDeprecationWarnings: { 16807 optional: !0, 16808 type: "boolean", 16809 message: "_disableDeprecationWarnings option is not valid" 16810 }, 16811 _sendTelemetry: { 16812 optional: !0, 16813 type: "boolean", 16814 message: "_sendTelemetry option is not valid" 16815 }, 16816 _telemetryInfo: { 16817 optional: !0, 16818 type: "object", 16819 message: "_telemetryInfo option is not valid" 16820 } 16821 }), this.baseOptions = options, this.baseOptions._sendTelemetry = !1 !== this.baseOptions._sendTelemetry || this.baseOptions._sendTelemetry, this.baseOptions.rootUrl = this.baseOptions.domain && 0 === this.baseOptions.domain.toLowerCase().indexOf("http") ? this.baseOptions.domain : "https://" + this.baseOptions.domain, this.request = new $90f323912e688b98$var$RequestBuilder(this.baseOptions), this.passwordless = new $90f323912e688b98$var$PasswordlessAuthentication(this.request, this.baseOptions), this.dbConnection = new $90f323912e688b98$var$DBConnection(this.request, this.baseOptions), this.warn = new $90f323912e688b98$var$Warn({ 16822 disableWarnings: !!options._disableDeprecationWarnings 16823 }), this.ssodataStorage = new $90f323912e688b98$var$SSODataStorage(this.baseOptions); 16824} 16825function $90f323912e688b98$export$cbb26d9fbbee6ab2(options) { 16826 $90f323912e688b98$var$assert.check(options, { 16827 type: "object", 16828 message: "options parameter is not valid" 16829 }, { 16830 domain: { 16831 type: "string", 16832 message: "domain option is required" 16833 }, 16834 token: { 16835 type: "string", 16836 message: "token option is required" 16837 }, 16838 _sendTelemetry: { 16839 optional: !0, 16840 type: "boolean", 16841 message: "_sendTelemetry option is not valid" 16842 }, 16843 _telemetryInfo: { 16844 optional: !0, 16845 type: "object", 16846 message: "_telemetryInfo option is not valid" 16847 } 16848 }), this.baseOptions = options, this.baseOptions.headers = { 16849 Authorization: "Bearer " + this.baseOptions.token 16850 }, this.request = new $90f323912e688b98$var$RequestBuilder(this.baseOptions), this.baseOptions.rootUrl = $90f323912e688b98$var$urlJoin("https://" + this.baseOptions.domain, "api", "v2"); 16851} 16852$90f323912e688b98$export$d1b7252873cb8575.prototype.parseHash = function(options, cb) { 16853 var parsedQs, err; 16854 cb || "function" != typeof options ? options = options || {} : (cb = options, options = {}); 16855 var hashStr = void 0 === options.hash ? $90f323912e688b98$var$windowHelper.getWindow().location.hash : options.hash; 16856 if (hashStr = hashStr.replace(/^#?\/?/, ""), (parsedQs = $90f323912e688b98$var$lib.parse(hashStr)).hasOwnProperty("error")) return err = $90f323912e688b98$var$error.buildResponse(parsedQs.error, parsedQs.error_description), parsedQs.state && (err.state = parsedQs.state), cb(err); 16857 if (!parsedQs.hasOwnProperty("access_token") && !parsedQs.hasOwnProperty("id_token") && !parsedQs.hasOwnProperty("refresh_token")) return cb(null, null); 16858 var responseTypes = (this.baseOptions.responseType || options.responseType || "").split(" "); 16859 return responseTypes.length > 0 && -1 !== responseTypes.indexOf("token") && !parsedQs.hasOwnProperty("access_token") ? cb($9
168590f323912e688b98$var$error.buildResponse("invalid_hash", "response_type contains `token`, but the parsed hash does not contain an `access_token` property")) : responseTypes.length > 0 && -1 !== responseTypes.indexOf("id_token") && !parsedQs.hasOwnProperty("id_token") ? cb($90f323912e688b98$var$error.buildResponse("invalid_hash", "response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")) : this.validateAuthenticationResponse(options, parsedQs, cb); 16860}, $90f323912e688b98$export$d1b7252873cb8575.prototype.validateAuthenticationResponse = function(options, parsedHash, cb) { 16861 var _this = this; 16862 options.__enableIdPInitiatedLogin = options.__enableIdPInitiatedLogin || options.__enableImpersonation; 16863 var state = parsedHash.state, transaction = this.transactionManager.getStoredTransaction(state), transactionState = options.state || transaction && transaction.state || null, transactionStateMatchesState = transactionState === state; 16864 if (!(!state && !transactionState && options.__enableIdPInitiatedLogin) && !transactionStateMatchesState) return cb({ 16865 error: "invalid_token", 16866 errorDescription: "`state` does not match." 16867 }); 16868 var transactionNonce = options.nonce || transaction && transaction.nonce || null, transactionOrganization = transaction && transaction.organization, appState = options.state || transaction && transaction.appState || null, callback = function(err, payload) { 16869 if (err) return cb(err); 16870 var sub; 16871 transaction && transaction.lastUsedConnection && (payload && (sub = payload.sub), _this.ssodataStorage.set(transaction.lastUsedConnection, sub)); 16872 return cb(null, function(qsParams, appState, token) { 16873 return { 16874 accessToken: qsParams.access_token || null, 16875 idToken: qsParams.id_token || null, 16876 idTokenPayload: token || null, 16877 appState: appState || null, 16878 refreshToken: qsParams.refresh_token || null, 16879 state: qsParams.state || null, 16880 expiresIn: qsParams.expires_in ? parseInt(qsParams.expires_in, 10) : null, 16881 tokenType: qsParams.token_type || null, 16882 scope: qsParams.scope || null 16883 }; 16884 }(parsedHash, appState, payload)); 16885 }; 16886 return parsedHash.id_token ? this.validateToken(parsedHash.id_token, transactionNonce, function(validationError, payload) { 16887 if (!validationError) { 16888 if (transactionOrganization) { 16889 if (0 === transactionOrganization.indexOf("org_")) { 16890 if (!payload.org_id) return callback($90f323912e688b98$var$error.invalidToken("Organization Id (org_id) claim must be a string present in the ID token")); 16891 if (payload.org_id !== transactionOrganization) return callback($90f323912e688b98$var$error.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "' + transactionOrganization + '", found "' + payload.org_id + '"')); 16892 } else { 16893 if (!payload.org_name) return callback($90f323912e688b98$var$error.invalidToken("Organization Name (org_name) claim must be a string present in the ID token")); 16894 if (payload.org_name !== transactionOrganization.toLowerCase()) return callback($90f323912e688b98$var$error.invalidToken('Organization Name (org_name) claim value mismatch in the ID token; expected "' + transactionOrganization + '", found "' + payload.org_name + '"')); 16895 } 16896 } 16897 return parsedHash.access_token && payload.at_hash ? (new $90f323912e688b98$var$I).validateAccessToken(parsedHash.access_token, "RS256", payload.at_hash, function(err) { 16898 return err ? callback($90f323912e688b98$var$error.invalidToken(err.message)) : callback(null, payload); 16899 }) : callback(null, payload); 16900 } 16901 if ("invalid_token" !== validationError.error || validationError.errorDescription && validationError.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token") > -1) return callback(validationError);
16902 var decodedToken = (new $90f323912e688b98$var$I).decode(parsedHash.id_token); 16903 if ("HS256" !== decodedToken.header.alg) return callback(validationError); 16904 if ((decodedToken.payload.nonce || null) !== transactionNonce) return callback({ 16905 error: "invalid_token", 16906 errorDescription: 'Nonce (nonce) claim value mismatch in the ID token; expected "' + transactionNonce + '", found "' + decodedToken.payload.nonce + '"' 16907 }); 16908 if (!parsedHash.access_token) return callback({ 16909 error: "invalid_token", 16910 description: "The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can\u2019t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token" 16911 }); 16912 return _this.client.userInfo(parsedHash.access_token, function(errUserInfo, profile) { 16913 return errUserInfo ? callback(errUserInfo) : callback(null, profile); 16914 }); 16915 }) : callback(null, null); 16916}, $90f323912e688b98$export$d1b7252873cb8575.prototype.validateToken = function(token, nonce, cb) { 16917 new $90f323912e688b98$var$I({ 16918 issuer: this.baseOptions.token_issuer, 16919 jwksURI: this.baseOptions.jwksURI, 16920 audience: this.baseOptions.clientID, 16921 leeway: this.baseOptions.leeway || 60, 16922 maxAge: this.baseOptions.maxAge, 16923 __clock: this.baseOptions.__clock || $90f323912e688b98$var$defaultClock 16924 }).verify(token, nonce, function(err, payload) { 16925 if (err) return cb($90f323912e688b98$var$error.invalidToken(err.message)); 16926 cb(null, payload); 16927 }); 16928}, $90f323912e688b98$export$d1b7252873cb8575.prototype.renewAuth = function(options, cb) { 16929 var usePostMessage = !!options.usePostMessage, postMessageDataType = options.postMessageDataType || !1, postMessageOrigin = options.postMessageOrigin || $90f323912e688b98$var$windowHelper.getWindow().origin, timeout = options.timeout, _this = this, params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 16930 "clientID", 16931 "redirectUri", 16932 "responseType", 16933 "scope", 16934 "audience", 16935 "_csrf", 16936 "state", 16937 "_intstate", 16938 "nonce" 16939 ]).with(options); 16940 params.responseType = params.responseType || "token", params.responseMode = params.responseMode || "fragment", params = this.transactionManager.process(params), $90f323912e688b98$var$assert.check(params, { 16941 type: "object", 16942 message: "options parameter is not valid" 16943 }), $90f323912e688b98$var$assert.check(cb, { 16944 type: "function", 16945 message: "cb parameter is not valid" 16946 }), params.prompt = "none", params = $90f323912e688b98$var$objectHelper.blacklist(params, [ 16947 "usePostMessage", 16948 "tenant", 16949 "postMessageDataType", 16950 "postMessageOrigin" 16951 ]), $90f323912e688b98$var$SilentAuthenticationHandler.create({ 16952 authenticationUrl: this.client.buildAuthorizeUrl(params), 16953 postMessageDataType: postMessageDataType, 16954 postMessageOrigin: postMessageOrigin, 16955 timeout: timeout 16956 }).login(usePostMessage, function(err, hash) { 16957 if ("object" == typeof hash) return cb(err, hash); 16958 _this.parseHash({ 16959 hash: hash 16960 }, cb); 16961 }); 16962}, $90f323912e688b98$export$d1b7252873cb8575.prototype.checkSession = function(options, cb) { 16963 var params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 16964 "clientID", 16965 "responseType", 16966 "redirectUri", 16967 "scope", 16968 "audience", 16969 "_csrf", 16970 "state", 16971 "_intstate", 16972 "nonce" 16973 ]).with(options); 16974 return "code" === params.responseType ? cb({ 16975 error: "error", 16976 error_description: "responseType can't be `code`" 16977 }) : (options.nonce || (params = this.transactionManager.process(params)), params.redirectUri ? ($90f323912e688b98$var$assert.check(params, { 16978 type: "object",
16979 message: "options parameter is not valid" 16980 }), $90f323912e688b98$var$assert.check(cb, { 16981 type: "function", 16982 message: "cb parameter is not valid" 16983 }), params = $90f323912e688b98$var$objectHelper.blacklist(params, [ 16984 "usePostMessage", 16985 "tenant", 16986 "postMessageDataType" 16987 ]), void this.webMessageHandler.run(params, $90f323912e688b98$var$wrapCallback(cb, { 16988 forceLegacyError: !0, 16989 ignoreCasing: !0 16990 }))) : cb({ 16991 error: "error", 16992 error_description: "redirectUri can't be empty" 16993 })); 16994}, $90f323912e688b98$export$d1b7252873cb8575.prototype.changePassword = function(options, cb) { 16995 return this.client.dbConnection.changePassword(options, cb); 16996}, $90f323912e688b98$export$d1b7252873cb8575.prototype.passwordlessStart = function(options, cb) { 16997 var authParams = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 16998 "responseType", 16999 "responseMode", 17000 "redirectUri", 17001 "scope", 17002 "audience", 17003 "_csrf", 17004 "state", 17005 "_intstate", 17006 "nonce" 17007 ]).with(options.authParams); 17008 return options.authParams = this.transactionManager.process(authParams), this.client.passwordless.start(options, cb); 17009}, $90f323912e688b98$export$d1b7252873cb8575.prototype.signup = function(options, cb) { 17010 return this.client.dbConnection.signup(options, cb); 17011}, $90f323912e688b98$export$d1b7252873cb8575.prototype.authorize = function(options) { 17012 var params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17013 "clientID", 17014 "responseType", 17015 "responseMode", 17016 "redirectUri", 17017 "scope", 17018 "audience", 17019 "_csrf", 17020 "state", 17021 "_intstate", 17022 "nonce", 17023 "organization", 17024 "invitation" 17025 ]).with(options); 17026 $90f323912e688b98$var$assert.check(params, { 17027 type: "object", 17028 message: "options parameter is not valid" 17029 }, { 17030 responseType: { 17031 type: "string", 17032 message: "responseType option is required" 17033 } 17034 }), (params = this.transactionManager.process(params)).scope = params.scope || "openid profile email", $90f323912e688b98$var$windowHelper.redirect(this.client.buildAuthorizeUrl(params)); 17035}, $90f323912e688b98$export$d1b7252873cb8575.prototype.signupAndAuthorize = function(options, cb) { 17036 var _this = this; 17037 return this.client.dbConnection.signup($90f323912e688b98$var$objectHelper.blacklist(options, [ 17038 "popupHandler" 17039 ]), function(err) { 17040 if (err) return cb(err); 17041 options.realm = options.connection, options.username || (options.username = options.email), _this.client.login(options, cb); 17042 }); 17043}, $90f323912e688b98$export$d1b7252873cb8575.prototype.login = function(options, cb) { 17044 var params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17045 "clientID", 17046 "responseType", 17047 "redirectUri", 17048 "scope", 17049 "audience", 17050 "_csrf", 17051 "state", 17052 "_intstate", 17053 "nonce", 17054 "onRedirecting", 17055 "organization", 17056 "invitation" 17057 ]).with(options); 17058 params = this.transactionManager.process(params), $90f323912e688b98$var$windowHelper.getWindow().location.host === this.baseOptions.domain ? (params.connection = params.realm, delete params.realm, this._universalLogin.login(params, cb)) : this.crossOriginAuthentication.login(params, cb); 17059}, $90f323912e688b98$export$d1b7252873cb8575.prototype.passwordlessLogin = function(options, cb) { 17060 var params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17061 "clientID", 17062 "responseType", 17063 "redirectUri", 17064 "scope", 17065 "audience", 17066 "_csrf", 17067 "state", 17068 "_intstate", 17069 "nonce", 17070 "onRedirecting" 17071 ]).with(options); 17072 if (params = this.transactionManager.process(params), $90f323912e688b98$var$windowHelper.getWindow().location.host === this.baseOptions.domain) this.passwordlessVerify(params, cb); 17073 else { 17074 var crossOriginOptions = $90f323912e688b98$var$objectHelper.extend({ 17075 credentialType: "http://auth0.com/oauth/grant-type/passwordless/otp", 17076 realm: params.connection, 17077 username: params.email || params.phoneNumber, 17078 otp: params.verificationCode 17079 }, $90f323912e688b98$var$objectHelper.blacklist(params, [ 17080 "connection", 17081 "email", 17082 "phoneNumber", 17083 "verificationCode" 17084 ])); 17085 this.crossOriginAuthentication.login(crossOriginOptions, cb); 17086 } 17087}, $90f323912e688b98$export$d1b7252873cb8575.prototype.crossOriginAuthenticationCallback = function() { 17088 this.crossOriginVerification(); 17089}, $90f323912e688b98$export$d1b7252873cb8575.prototype.crossOriginVerification = function() { 17090 this.crossOriginAuthentication.callback(); 17091}, $90f323912e688b98$export$d1b7252873cb8575.prototype.logout = function(options) { 17092 $90f323912e688b98$var$windowHelper.redirect(this.client.buildLogoutUrl(options)); 17093}, $90f323912e688b98$export$d1b7252873cb8575.prototype.passwordlessVerify = function(options, cb) { 17094 var _this = this, params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17095 "clientID", 17096 "responseType", 17097 "responseMode", 17098 "redirectUri", 17099 "scope", 17100 "audience", 17101 "_csrf", 17102 "state", 17103 "_intstate", 17104 "nonce", 17105 "onRedirecting" 17106 ]).with(options); 17107 return $90f323912e688b98$var$assert.check(params, { 17108 type: "object",
17109 message: "options parameter is not valid" 17110 }, { 17111 responseType: { 17112 type: "string", 17113 message: "responseType option is required" 17114 } 17115 }), params = this.transactionManager.process(params), this.client.passwordless.verify(params, function(err) { 17116 if (err) return cb(err); 17117 function doAuth() { 17118 $90f323912e688b98$var$windowHelper.redirect(_this.client.passwordless.buildVerifyUrl(params)); 17119 } 17120 if ("function" == typeof options.onRedirecting) return options.onRedirecting(function() { 17121 doAuth(); 17122 }); 17123 doAuth(); 17124 }); 17125}, $90f323912e688b98$export$d1b7252873cb8575.prototype.renderCaptcha = function(element, options, callback) { 17126 return $90f323912e688b98$var$captcha.render(this.client, $90f323912e688b98$var$captcha.Flow.DEFAULT, element, options, callback); 17127}, $90f323912e688b98$export$d1b7252873cb8575.prototype.renderSignupCaptcha = function(element, options, callback) { 17128 return $90f323912e688b98$var$captcha.render(this.client, $90f323912e688b98$var$captcha.Flow.SIGNUP, element, options, callback); 17129}, $90f323912e688b98$export$d1b7252873cb8575.prototype.renderPasswordlessCaptcha = function(element, options, callback) { 17130 return $90f323912e688b98$var$captcha.render(this.client, $90f323912e688b98$var$captcha.Flow.PASSWORDLESS, element, options, callback); 17131}, $90f323912e688b98$export$d1b7252873cb8575.prototype.renderPasswordResetCaptcha = function(element, options, callback) { 17132 return $90f323912e688b98$var$captcha.render(this.client, $90f323912e688b98$var$captcha.Flow.PASSWORD_RESET, element, options, callback); 17133}, $90f323912e688b98$var$PasswordlessAuthentication.prototype.buildVerifyUrl = function(options) { 17134 var params, qString; 17135 return $90f323912e688b98$var$assert.check(options, { 17136 type: "object", 17137 message: "options parameter is not valid" 17138 }, { 17139 connection: { 17140 type: "string", 17141 message: "connection option is required" 17142 }, 17143 verificationCode: { 17144 type: "string", 17145 message: "verificationCode option is required" 17146 }, 17147 phoneNumber: { 17148 optional: !1, 17149 type: "string", 17150 message: "phoneNumber option is required", 17151 condition: function(o) { 17152 return !o.email; 17153 } 17154 }, 17155 email: { 17156 optional: !1, 17157 type: "string", 17158 message: "email option is required", 17159 condition: function(o) { 17160 return !o.phoneNumber; 17161 } 17162 } 17163 }), params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17164 "clientID", 17165 "responseType", 17166 "responseMode", 17167 "redirectUri", 17168 "scope", 17169 "audience", 17170 "_csrf", 17171 "state", 17172 "_intstate", 17173 "protocol", 17174 "nonce" 17175 ]).with(options), this.baseOptions._sendTelemetry && (params.auth0Client = this.request.getTelemetryData()), params = $90f323912e688b98$var$objectHelper.toSnakeCase(params, [ 17176 "auth0Client" 17177 ]), qString = $90f323912e688b98$var$lib.stringify(params), $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "passwordless", "verify_redirect", "?" + qString); 17178}, $90f323912e688b98$var$PasswordlessAuthentication.prototype.start = function(options, cb) { 17179 var url, body; 17180 $90f323912e688b98$var$assert.check(options, { 17181 type: "object", 17182 message: "options parameter is not valid" 17183 }, { 17184 connection: { 17185 type: "string", 17186 message: "connection option is required" 17187 }, 17188 send: { 17189 type: "string", 17190 message: "send option is required", 17191 values: [ 17192 "link", 17193 "code" 17194 ], 17195 value_message: "send is not valid ([link, code])" 17196 }, 17197 phoneNumber: { 17198 optional: !0, 17199 type: "string", 17200 message: "phoneNumber option is required", 17201 condition: function(o) { 17202 return "code" === o.send || !o.email; 17203 } 17204 }, 17205 email: { 17206 optional: !0, 17207 type: "string", 17208 message: "email option is required", 17209 condition: function(o) { 17210 return "link" === o.send || !o.phoneNumber; 17211 } 17212 }, 17213 authParams: { 17214 optional: !0, 17215 type: "object", 17216 message: "authParams option is required" 17217 } 17218 }), $90f323912e688b98$var$assert.check(cb, { 17219 type: "function",
17220 message: "cb parameter is not valid" 17221 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "passwordless", "start"); 17222 var xRequestLanguage = options.xRequestLanguage; 17223 delete options.xRequestLanguage, (body = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17224 "clientID", 17225 "responseType", 17226 "redirectUri", 17227 "scope" 17228 ]).with(options)).scope && (body.authParams = body.authParams || {}, body.authParams.scope = body.authParams.scope || body.scope), body.redirectUri && (body.authParams = body.authParams || {}, body.authParams.redirect_uri = body.authParams.redirectUri || body.redirectUri), body.responseType && (body.authParams = body.authParams || {}, body.authParams.response_type = body.authParams.responseType || body.responseType), delete body.redirectUri, delete body.responseType, delete body.scope, body = $90f323912e688b98$var$objectHelper.toSnakeCase(body, [ 17229 "auth0Client", 17230 "authParams" 17231 ]); 17232 var postOptions = xRequestLanguage ? { 17233 xRequestLanguage: xRequestLanguage 17234 } : void 0; 17235 return this.request.post(url, postOptions).send(body).end($90f323912e688b98$var$wrapCallback(cb)); 17236}, $90f323912e688b98$var$PasswordlessAuthentication.prototype.verify = function(options, cb) { 17237 var url, cleanOption; 17238 return $90f323912e688b98$var$assert.check(options, { 17239 type: "object", 17240 message: "options parameter is not valid" 17241 }, { 17242 connection: { 17243 type: "string", 17244 message: "connection option is required" 17245 }, 17246 verificationCode: { 17247 type: "string", 17248 message: "verificationCode option is required" 17249 }, 17250 phoneNumber: { 17251 optional: !1, 17252 type: "string", 17253 message: "phoneNumber option is required", 17254 condition: function(o) { 17255 return !o.email; 17256 } 17257 }, 17258 email: { 17259 optional: !1, 17260 type: "string", 17261 message: "email option is required", 17262 condition: function(o) { 17263 return !o.phoneNumber; 17264 } 17265 } 17266 }), $90f323912e688b98$var$assert.check(cb, { 17267 type: "function", 17268 message: "cb parameter is not valid" 17269 }), cleanOption = $90f323912e688b98$var$objectHelper.pick(options, [ 17270 "connection", 17271 "verificationCode", 17272 "phoneNumber", 17273 "email", 17274 "auth0Client", 17275 "clientID" 17276 ]), cleanOption = $90f323912e688b98$var$objectHelper.toSnakeCase(cleanOption, [ 17277 "auth0Client" 17278 ]), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "passwordless", "verify"), this.request.post(url).send(cleanOption).end($90f323912e688b98$var$wrapCallback(cb)); 17279}, $90f323912e688b98$var$PasswordlessAuthentication.prototype.getChallenge = function(cb) { 17280 if ($90f323912e688b98$var$assert.check(cb, { 17281 type: "function", 17282 message: "cb parameter is not valid" 17283 }), !this.baseOptions.state) return cb(); 17284 var url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "passwordless", "challenge"); 17285 return this.request.post(url).send({ 17286 state: this.baseOptions.state 17287 }).end($90f323912e688b98$var$wrapCallback(cb, { 17288 ignoreCasing: !0 17289 })); 17290}, $90f323912e688b98$var$DBConnection.prototype.signup = function(options, cb) { 17291 var url, body, metadata; 17292 return $90f323912e688b98$var$assert.check(options, { 17293 type: "object", 17294 message: "options parameter is not valid" 17295 }, { 17296 connection: { 17297 type: "string", 17298 message: "connection option is required" 17299 }, 17300 email: { 17301 type: "string", 17302 message: "email option is required" 17303 }, 17304 password: { 17305 type: "string", 17306 message: "password option is required" 17307 } 17308 }), $90f323912e688b98$var$assert.check(cb, { 17309 type: "function", 17310 message: "cb parameter is not valid" 17311 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "dbconnections", "signup"), metadata = (body = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17312 "clientID", 17313 "state" 17314 ]).with(options)).user_metadata || body.userMetadata, body = $90f323912e688b98$var$objectHelper.blacklist(body, [ 17315 "scope", 17316 "userMetadata", 17317 "user_metadata" 17318 ]), body = $90f323912e688b98$var$objectHelper.toSnakeCase(body, [ 17319 "auth0Client" 17320 ]), metadata && (body.user_metadata = metadata), this.request.post(url).send(body).end($90f323912e688b98$var$wrapCallback(cb)); 17321}, $90f323912e688b98$var$DBConnection.prototype.changePassword = function(options, cb) { 17322 var url, body; 17323 return $90f323912e688b98$var$assert.check(options, { 17324 type: "object",
17325 message: "options parameter is not valid" 17326 }, { 17327 connection: { 17328 type: "string", 17329 message: "connection option is required" 17330 }, 17331 email: { 17332 type: "string", 17333 message: "email option is required" 17334 } 17335 }), $90f323912e688b98$var$assert.check(cb, { 17336 type: "function", 17337 message: "cb parameter is not valid" 17338 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "dbconnections", "change_password"), body = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17339 "clientID", 17340 "state" 17341 ]).with(options, [ 17342 "email", 17343 "connection", 17344 "captcha" 17345 ]), body = $90f323912e688b98$var$objectHelper.toSnakeCase(body, [ 17346 "auth0Client" 17347 ]), this.request.post(url).send(body).end($90f323912e688b98$var$wrapCallback(cb)); 17348}, $90f323912e688b98$var$DBConnection.prototype.getPasswordResetChallenge = function(cb) { 17349 if ($90f323912e688b98$var$assert.check(cb, { 17350 type: "function", 17351 message: "cb parameter is not valid" 17352 }), !this.baseOptions.state) return cb(); 17353 var url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "dbconnections", "change_password", "challenge"); 17354 return this.request.post(url).send({ 17355 state: this.baseOptions.state 17356 }).end($90f323912e688b98$var$wrapCallback(cb, { 17357 ignoreCasing: !0 17358 })); 17359}, $90f323912e688b98$var$DBConnection.prototype.getSignupChallenge = function(cb) { 17360 if ($90f323912e688b98$var$assert.check(cb, { 17361 type: "function", 17362 message: "cb parameter is not valid" 17363 }), !this.baseOptions.state) return cb(); 17364 var url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "dbconnections", "signup", "challenge"); 17365 return this.request.post(url).send({ 17366 state: this.baseOptions.state 17367 }).end($90f323912e688b98$var$wrapCallback(cb, { 17368 ignoreCasing: !0 17369 })); 17370}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.buildAuthorizeUrl = function(options) { 17371 var params, qString; 17372 return $90f323912e688b98$var$assert.check(options, { 17373 type: "object", 17374 message: "options parameter is not valid" 17375 }), params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17376 "clientID", 17377 "responseType", 17378 "responseMode", 17379 "redirectUri", 17380 "scope", 17381 "audience" 17382 ]).with(options), $90f323912e688b98$var$assert.check(params, { 17383 type: "object", 17384 message: "options parameter is not valid" 17385 }, { 17386 clientID: { 17387 type: "string", 17388 message: "clientID option is required" 17389 }, 17390 redirectUri: { 17391 optional: !0, 17392 type: "string", 17393 message: "redirectUri option is required" 17394 }, 17395 responseType: { 17396 type: "string", 17397 message: "responseType option is required" 17398 }, 17399 nonce: { 17400 type: "string", 17401 message: "nonce option is required", 17402 condition: function(o) { 17403 return -1 === o.responseType.indexOf("code") && -1 !== o.responseType.indexOf("id_token"); 17404 } 17405 }, 17406 scope: { 17407 optional: !0, 17408 type: "string", 17409 message: "scope option is required" 17410 }, 17411 audience: { 17412 optional: !0, 17413 type: "string", 17414 message: "audience option is required" 17415 } 17416 }), this.baseOptions._sendTelemetry && (params.auth0Client = this.request.getTelemetryData()), params.connection_scope && $90f323912e688b98$var$assert.isArray(params.connection_scope) && (params.connection_scope = params.connection_scope.join(",")), params = $90f323912e688b98$var$objectHelper.blacklist(params, [ 17417 "username", 17418 "popupOptions", 17419 "domain", 17420 "tenant", 17421 "timeout", 17422 "appState" 17423 ]), params = $90f323912e688b98$var$objectHelper.toSnakeCase(params, [ 17424 "auth0Client" 17425 ]), params = $90f323912e688b98$var$parametersWhitelist.oauthAuthorizeParams(this.warn, params), qString = $90f323912e688b98$var$lib.stringify(params), $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "authorize", "?" + qString); 17426}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.buildLogoutUrl = function(options) { 17427 var params, qString; 17428 return $90f323912e688b98$var$assert.check(options, { 17429 optional: !0, 17430 type: "object",
17431 message: "options parameter is not valid" 17432 }), params = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17433 "clientID" 17434 ]).with(options || {}), this.baseOptions._sendTelemetry && (params.auth0Client = this.request.getTelemetryData()), params = $90f323912e688b98$var$objectHelper.toSnakeCase(params, [ 17435 "auth0Client", 17436 "returnTo" 17437 ]), qString = $90f323912e688b98$var$lib.stringify($90f323912e688b98$var$objectHelper.blacklist(params, [ 17438 "federated" 17439 ])), options && void 0 !== options.federated && !1 !== options.federated && "false" !== options.federated && (qString += "&federated"), $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "v2", "logout", "?" + qString); 17440}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.loginWithDefaultDirectory = function(options, cb) { 17441 return $90f323912e688b98$var$assert.check(options, { 17442 type: "object", 17443 message: "options parameter is not valid" 17444 }, { 17445 username: { 17446 type: "string", 17447 message: "username option is required" 17448 }, 17449 password: { 17450 type: "string", 17451 message: "password option is required" 17452 }, 17453 scope: { 17454 optional: !0, 17455 type: "string", 17456 message: "scope option is required" 17457 }, 17458 audience: { 17459 optional: !0, 17460 type: "string", 17461 message: "audience option is required" 17462 } 17463 }), options.grantType = "password", this.oauthToken(options, cb); 17464}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.login = function(options, cb) { 17465 return $90f323912e688b98$var$assert.check(options, { 17466 type: "object", 17467 message: "options parameter is not valid" 17468 }, { 17469 username: { 17470 type: "string", 17471 message: "username option is required" 17472 }, 17473 password: { 17474 type: "string", 17475 message: "password option is required" 17476 }, 17477 realm: { 17478 type: "string", 17479 message: "realm option is required" 17480 }, 17481 scope: { 17482 optional: !0, 17483 type: "string", 17484 message: "scope option is required" 17485 }, 17486 audience: { 17487 optional: !0, 17488 type: "string", 17489 message: "audience option is required" 17490 } 17491 }), options.grantType = "http://auth0.com/oauth/grant-type/password-realm", this.oauthToken(options, cb); 17492}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.oauthToken = function(options, cb) { 17493 var url, body; 17494 return $90f323912e688b98$var$assert.check(options, { 17495 type: "object", 17496 message: "options parameter is not valid" 17497 }), $90f323912e688b98$var$assert.check(cb, { 17498 type: "function", 17499 message: "cb parameter is not valid" 17500 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "oauth", "token"), body = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17501 "clientID", 17502 "scope", 17503 "audience" 17504 ]).with(options), $90f323912e688b98$var$assert.check(body, { 17505 type: "object", 17506 message: "options parameter is not valid" 17507 }, { 17508 clientID: { 17509 type: "string", 17510 message: "clientID option is required" 17511 }, 17512 grantType: { 17513 type: "string", 17514 message: "grantType option is required" 17515 }, 17516 scope: { 17517 optional: !0, 17518 type: "string", 17519 message: "scope option is required" 17520 }, 17521 audience: { 17522 optional: !0, 17523 type: "string", 17524 message: "audience option is required" 17525 } 17526 }), body = $90f323912e688b98$var$objectHelper.toSnakeCase(body, [ 17527 "auth0Client" 17528 ]), body = $90f323912e688b98$var$parametersWhitelist.oauthTokenParams(this.warn, body), this.request.post(url).send(body).end($90f323912e688b98$var$wrapCallback(cb)); 17529}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.loginWithResourceOwner = function(options, cb) { 17530 var url, body; 17531 return $90f323912e688b98$var$assert.check(options, { 17532 type: "object",
17533 message: "options parameter is not valid" 17534 }, { 17535 username: { 17536 type: "string", 17537 message: "username option is required" 17538 }, 17539 password: { 17540 type: "string", 17541 message: "password option is required" 17542 }, 17543 connection: { 17544 type: "string", 17545 message: "connection option is required" 17546 }, 17547 scope: { 17548 optional: !0, 17549 type: "string", 17550 message: "scope option is required" 17551 } 17552 }), $90f323912e688b98$var$assert.check(cb, { 17553 type: "function", 17554 message: "cb parameter is not valid" 17555 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "oauth", "ro"), body = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17556 "clientID", 17557 "scope" 17558 ]).with(options, [ 17559 "username", 17560 "password", 17561 "scope", 17562 "connection", 17563 "device" 17564 ]), (body = $90f323912e688b98$var$objectHelper.toSnakeCase(body, [ 17565 "auth0Client" 17566 ])).grant_type = body.grant_type || "password", this.request.post(url).send(body).end($90f323912e688b98$var$wrapCallback(cb)); 17567}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.getSSOData = function(withActiveDirectories, cb) { 17568 if (this.auth0 || (this.auth0 = new $90f323912e688b98$export$d1b7252873cb8575(this.baseOptions)), $90f323912e688b98$var$windowHelper.getWindow().location.host === this.baseOptions.domain) return this.auth0._universalLogin.getSSOData(withActiveDirectories, cb); 17569 "function" == typeof withActiveDirectories && (cb = withActiveDirectories), $90f323912e688b98$var$assert.check(cb, { 17570 type: "function", 17571 message: "cb parameter is not valid" 17572 }); 17573 var clientId = this.baseOptions.clientID, ssodataInformation = this.ssodataStorage.get() || {}; 17574 this.auth0.checkSession({ 17575 responseType: "token id_token", 17576 scope: "openid profile email", 17577 connection: ssodataInformation.lastUsedConnection, 17578 timeout: 5e3 17579 }, function(err, result) { 17580 return err ? "login_required" === err.error ? cb(null, { 17581 sso: !1 17582 }) : ("consent_required" === err.error && (err.error_description = "Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."), cb(err, { 17583 sso: !1 17584 })) : ssodataInformation.lastUsedSub && ssodataInformation.lastUsedSub !== result.idTokenPayload.sub ? cb(err, { 17585 sso: !1 17586 }) : cb(null, { 17587 lastUsedConnection: { 17588 name: ssodataInformation.lastUsedConnection 17589 }, 17590 lastUsedUserID: result.idTokenPayload.sub, 17591 lastUsedUsername: result.idTokenPayload.email || result.idTokenPayload.name, 17592 lastUsedClientID: clientId, 17593 sessionClients: [ 17594 clientId 17595 ], 17596 sso: !0 17597 }); 17598 }); 17599}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.userInfo = function(accessToken, cb) { 17600 var url; 17601 return $90f323912e688b98$var$assert.check(accessToken, { 17602 type: "string", 17603 message: "accessToken parameter is not valid" 17604 }), $90f323912e688b98$var$assert.check(cb, { 17605 type: "function", 17606 message: "cb parameter is not valid" 17607 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "userinfo"), this.request.get(url).set("Authorization", "Bearer " + accessToken).end($90f323912e688b98$var$wrapCallback(cb, { 17608 ignoreCasing: !0 17609 })); 17610}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.getChallenge = function(cb) { 17611 if ($90f323912e688b98$var$assert.check(cb, { 17612 type: "function", 17613 message: "cb parameter is not valid" 17614 }), !this.baseOptions.state) return cb(); 17615 var url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "usernamepassword", "challenge"); 17616 return this.request.post(url).send({ 17617 state: this.baseOptions.state 17618 }).end($90f323912e688b98$var$wrapCallback(cb, { 17619 ignoreCasing: !0 17620 })); 17621}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.delegation = function(options, cb) { 17622 var url, body; 17623 return $90f323912e688b98$var$assert.check(options, { 17624 type: "object",
17625 message: "options parameter is not valid" 17626 }, { 17627 grant_type: { 17628 type: "string", 17629 message: "grant_type option is required" 17630 } 17631 }), $90f323912e688b98$var$assert.check(cb, { 17632 type: "function", 17633 message: "cb parameter is not valid" 17634 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "delegation"), body = $90f323912e688b98$var$objectHelper.merge(this.baseOptions, [ 17635 "clientID" 17636 ]).with(options), body = $90f323912e688b98$var$objectHelper.toSnakeCase(body, [ 17637 "auth0Client" 17638 ]), this.request.post(url).send(body).end($90f323912e688b98$var$wrapCallback(cb)); 17639}, $90f323912e688b98$export$d9e3c9dc7eaad0c3.prototype.getUserCountry = function(cb) { 17640 var url; 17641 return $90f323912e688b98$var$assert.check(cb, { 17642 type: "function", 17643 message: "cb parameter is not valid" 17644 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "user", "geoloc", "country"), this.request.get(url).end($90f323912e688b98$var$wrapCallback(cb)); 17645}, $90f323912e688b98$export$cbb26d9fbbee6ab2.prototype.getUser = function(userId, cb) { 17646 var url; 17647 return $90f323912e688b98$var$assert.check(userId, { 17648 type: "string", 17649 message: "userId parameter is not valid" 17650 }), $90f323912e688b98$var$assert.check(cb, { 17651 type: "function", 17652 message: "cb parameter is not valid" 17653 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "users", userId), this.request.get(url).end($90f323912e688b98$var$wrapCallback(cb, { 17654 ignoreCasing: !0 17655 })); 17656}, $90f323912e688b98$export$cbb26d9fbbee6ab2.prototype.patchUserMetadata = function(userId, userMetadata, cb) { 17657 var url; 17658 return $90f323912e688b98$var$assert.check(userId, { 17659 type: "string", 17660 message: "userId parameter is not valid" 17661 }), $90f323912e688b98$var$assert.check(userMetadata, { 17662 type: "object", 17663 message: "userMetadata parameter is not valid" 17664 }), $90f323912e688b98$var$assert.check(cb, { 17665 type: "function", 17666 message: "cb parameter is not valid" 17667 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "users", userId), this.request.patch(url).send({ 17668 user_metadata: userMetadata 17669 }).end($90f323912e688b98$var$wrapCallback(cb, { 17670 ignoreCasing: !0 17671 })); 17672}, $90f323912e688b98$export$cbb26d9fbbee6ab2.prototype.patchUserAttributes = function(userId, user, cb) { 17673 var url; 17674 return $90f323912e688b98$var$assert.check(userId, { 17675 type: "string", 17676 message: "userId parameter is not valid" 17677 }), $90f323912e688b98$var$assert.check(user, { 17678 type: "object", 17679 message: "user parameter is not valid" 17680 }), $90f323912e688b98$var$assert.check(cb, { 17681 type: "function", 17682 message: "cb parameter is not valid" 17683 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "users", userId), this.request.patch(url).send(user).end($90f323912e688b98$var$wrapCallback(cb, { 17684 ignoreCasing: !0 17685 })); 17686}, $90f323912e688b98$export$cbb26d9fbbee6ab2.prototype.linkUser = function(userId, secondaryUserToken, cb) { 17687 var url; 17688 return $90f323912e688b98$var$assert.check(userId, { 17689 type: "string", 17690 message: "userId parameter is not valid" 17691 }), $90f323912e688b98$var$assert.check(secondaryUserToken, { 17692 type: "string", 17693 message: "secondaryUserToken parameter is not valid" 17694 }), $90f323912e688b98$var$assert.check(cb, { 17695 type: "function", 17696 message: "cb parameter is not valid" 17697 }), url = $90f323912e688b98$var$urlJoin(this.baseOptions.rootUrl, "users", userId, "identities"), this.request.post(url).send({ 17698 link_with: secondaryUserToken 17699 }).end($90f323912e688b98$var$wrapCallback(cb, { 17700 ignoreCasing: !0 17701 })); 17702}; 17703var $90f323912e688b98$var$index = { 17704 Authentication: $90f323912e688b98$export$d9e3c9dc7eaad0c3, 17705 Management: $90f323912e688b98$export$cbb26d9fbbee6ab2, 17706 WebAuth: $90f323912e688b98$export$d1b7252873cb8575, 17707 version: $90f323912e688b98$export$83d89fbfd8236492 17708}; 17709var $90f323912e688b98$export$2e2bcd8739ae039 = $90f323912e688b98$var$index; 17710 17711 17712// Auth Application IDs 17713 17714 17715const $ae59e8ec7b666bff$export$e80e8b1bea817f73 = { 17716 Admin: "oEFWoYxyxi6q3OG1hNKNluIT5e2WLEFT", 17717 MCP: "G0T8XbB4Be9ht2yZq6xrMLS2s7AmMBd1" 17718}; 17719const $ae59e8ec7b666bff$export$b3f633c0d7aa7abe = { 17720 admin: { 17721 pattern: /admin-signup/, 17722 clientId: $ae59e8ec7b666bff$export$e80e8b1bea817f73.Admin, 17723 redirectUri: "https://admin.explorium.ai/login" 17724 }, 17725 mcp: { 17726 pattern: /mcp-signup/, 17727 clientId: $ae59e8ec7b666bff$export$e80e8b1bea817f73.MCP, 17728 redirectUri: "https://mcp-playground.explorium.ai/login" 17729 }, 17730 // Add more patterns as needed 17731 default: { 17732 pattern: /signup/, 17733 clientId: $ae59e8ec7b666bff$export$e80e8b1bea817f73.Admin, 17734 redirectUri: "https://admin.explorium.ai/login" 17735 } 17736}; 17737const $ae59e8ec7b666bff$export$74e3474e86f2ede7 = ()=>{ 17738 const currentHash = window.location.hash.substring(1); 17739 // Only check hash patterns - form should only show with specific hash fragments 17740 if (currentHash) switch(currentHash){ 17741 case 'admin-signup': 17742 return { 17743 clientId: $ae59e8ec7b666bff$export$e80e8b1bea817f73.Admin, 17744 redirectUri: "https://admin.explorium.ai/login", 17745 type: 'admin' 17746 }; 17747 case 'mcp-signup': 17748 return { 17749 clientId: $ae59e8ec7b666bff$export$e80e8b1bea817f73.MCP, 17750 redirectUri: "https://mcp-playground.explorium.ai/login", 17751 type: 'mcp' 17752 }; 17753 case 'vibe-signup': 17754 return { 17755 clientId: "H6OeHP5sVZyNAxHXKjybW5smcpXCgEYx", 17756 redirectUri: "http://localhost:4200", 17757 type: 'vibe' 17758 }; 17759 case 'signup': 17760 return { 17761 clientId: $ae59e8ec7b666bff$export$e80e8b1bea817f73.Admin, 17762 redirectUri: "https://admin.explorium.ai/login", 17763 type: 'default' 17764 }; 17765 } 17766 return null; 17767}; 17768const $ae59e8ec7b666bff$export$7a660ea2ca5c1d6b = (...paramNames)=>{ 17769 const searchParams = new URLSearchParams(window.location.search); 17770 const result = {};
17771 paramNames.forEach((param)=>{ 17772 const value = searchParams.get(param); 17773 if (value) result[param] = value; 17774 }); 17775 return result; 17776}; 17777const $ae59e8ec7b666bff$export$810df963bf200fcd = ()=>{ 17778 const firstReferrer = sessionStorage.getItem('first_referrer') || document.referrer || 'direct'; 17779 const lastReferrer = document.referrer || 'direct'; 17780 // Store first referrer in session storage if not already stored 17781 if (!sessionStorage.getItem('first_referrer')) sessionStorage.setItem('first_referrer', firstReferrer); 17782 return { 17783 firstReferrer: firstReferrer, 17784 lastReferrer: lastReferrer 17785 }; 17786}; 17787const $ae59e8ec7b666bff$export$3ef474e8b2f39b96 = (baseRedirectUri)=>{ 17788 const url = new URL(baseRedirectUri); 17789 const currentParams = new URLSearchParams(window.location.search); 17790 // Add current URL parameters to redirect URI 17791 currentParams.forEach((value, key)=>{ 17792 url.searchParams.set(key, value); 17793 }); 17794 return url.toString(); 17795}; 17796const $ae59e8ec7b666bff$export$7d306ca8b72b6792 = (email, fullName, password, clientId, redirectUri)=>{ 17797 const { firstReferrer: firstReferrer, lastReferrer: lastReferrer } = $ae59e8ec7b666bff$export$810df963bf200fcd(); 17798 const redirectUriWithParam = $ae59e8ec7b666bff$export$3ef474e8b2f39b96(redirectUri); 17799 return (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, Object.fromEntries(new URLSearchParams(window.location.search).entries())), { 17800 email: email, 17801 firstName: fullName === null || fullName === void 0 ? void 0 : fullName.split(" ")[0], 17802 lastName: fullName === null || fullName === void 0 ? void 0 : fullName.split(" ")[1], 17803 user_initial_password: password, 17804 jobTitle: "N/A", 17805 companyName: "N/A", 17806 is_direct_data: true, 17807 pageUri: window.location.href, 17808 pageName: document.title, 17809 redirect_uri: redirectUriWithParam, 17810 first_referrer: firstReferrer, 17811 last_referrer: lastReferrer, 17812 direct_data_client_id: clientId, 17813 client_id: clientId 17814 }); 17815}; 17816 17817 17818const $f3a60463a4b81705$export$e8d539af66b54c0b = ()=>{ 17819 var _window_ga_getAll_, _window_ga; 17820 // @ts-ignore 17821 // eslint-disable-next-line no-undef 17822 return (_window_ga = window.ga) === null || _window_ga === void 0 ? void 0 : (_window_ga_getAll_ = _window_ga.getAll()[0]) === null || _window_ga_getAll_ === void 0 ? void 0 : _window_ga_getAll_.get('clientId'); 17823}; 17824 17825 17826 17827 17828// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file 17829/*! 17830 * The buffer module from node.js, for the browser. 17831 * 17832 * @author Feross Aboukhadijeh <https://feross.org> 17833 * @license MIT 17834 */ /* eslint-disable no-proto */ var $d756b869280043fa$export$a143d493d941bafc; 17835var $d756b869280043fa$export$e4cf37d7f6fb9e0a; 17836var $d756b869280043fa$export$f99ded8fe4b79145; 17837var $d756b869280043fa$export$599f31c3813fae4d; 17838'use strict'; 17839var $8bf602c809f4a385$export$a48f0734ac7c2329; 17840var $8bf602c809f4a385$export$d622b2ad8d90c771; 17841var $8bf602c809f4a385$export$6100ba28696e12de; 17842'use strict'; 17843$8bf602c809f4a385$export$a48f0734ac7c2329 = $8bf602c809f4a385$var$byteLength; 17844$8bf602c809f4a385$export$d622b2ad8d90c771 = $8bf602c809f4a385$var$toByteArray; 17845$8bf602c809f4a385$export$6100ba28696e12de = $8bf602c809f4a385$var$fromByteArray; 17846var $8bf602c809f4a385$var$lookup = []; 17847var $8bf602c809f4a385$var$revLookup = []; 17848var $8bf602c809f4a385$var$Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; 17849var $8bf602c809f4a385$var$code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 17850for(var $8bf602c809f4a385$var$i = 0, $8bf602c809f4a385$var$len = $8bf602c809f4a385$var$code.length; $8bf602c809f4a385$var$i < $8bf602c809f4a385$var$len; ++$8bf602c809f4a385$var$i){ 17851 $8bf602c809f4a385$var$lookup[$8bf602c809f4a385$var$i] = $8bf602c809f4a385$var$code[$8bf602c809f4a385$var$i]; 17852 $8bf602c809f4a385$var$revLookup[$8bf602c809f4a385$var$code.charCodeAt($8bf602c809f4a385$var$i)] = $8bf602c809f4a385$var$i; 17853} 17854// Support decoding URL-safe base64 strings, as Node.js does. 17855// See: https://en.wikipedia.org/wiki/Base64#URL_applications 17856$8bf602c809f4a385$var$revLookup['-'.charCodeAt(0)] = 62; 17857$8bf602c809f4a385$var$revLookup['_'.charCodeAt(0)] = 63; 17858function $8bf602c809f4a385$var$getLens(b64) { 17859 var len = b64.length; 17860 if (len % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); 17861 // Trim off extra bytes after placeholder bytes are found 17862 // See: https://github.com/beatgammit/base64-js/issues/42
vendor: 12,563 bytes, lines 17863-18122
17863 var validLen = b64.indexOf('='); 17864 if (validLen === -1) validLen = len; 17865 var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4; 17866 return [ 17867 validLen, 17868 placeHoldersLen 17869 ]; 17870} 17871// base64 is 4/3 + up to two characters of the original data 17872function $8bf602c809f4a385$var$byteLength(b64) { 17873 var lens = $8bf602c809f4a385$var$getLens(b64); 17874 var validLen = lens[0]; 17875 var placeHoldersLen = lens[1]; 17876 return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; 17877} 17878function $8bf602c809f4a385$var$_byteLength(b64, validLen, placeHoldersLen) { 17879 return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; 17880} 17881function $8bf602c809f4a385$var$toByteArray(b64) { 17882 var tmp; 17883 var lens = $8bf602c809f4a385$var$getLens(b64); 17884 var validLen = lens[0]; 17885 var placeHoldersLen = lens[1]; 17886 var arr = new $8bf602c809f4a385$var$Arr($8bf602c809f4a385$var$_byteLength(b64, validLen, placeHoldersLen)); 17887 var curByte = 0; 17888 // if there are placeholders, only get up to the last complete 4 chars 17889 var len = placeHoldersLen > 0 ? validLen - 4 : validLen; 17890 var i; 17891 for(i = 0; i < len; i += 4){ 17892 tmp = $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i)] << 18 | $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i + 1)] << 12 | $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i + 2)] << 6 | $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i + 3)]; 17893 arr[curByte++] = tmp >> 16 & 0xFF; 17894 arr[curByte++] = tmp >> 8 & 0xFF; 17895 arr[curByte++] = tmp & 0xFF; 17896 } 17897 if (placeHoldersLen === 2) { 17898 tmp = $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i)] << 2 | $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i + 1)] >> 4; 17899 arr[curByte++] = tmp & 0xFF; 17900 } 17901 if (placeHoldersLen === 1) { 17902 tmp = $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i)] << 10 | $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i + 1)] << 4 | $8bf602c809f4a385$var$revLookup[b64.charCodeAt(i + 2)] >> 2; 17903 arr[curByte++] = tmp >> 8 & 0xFF; 17904 arr[curByte++] = tmp & 0xFF; 17905 } 17906 return arr; 17907} 17908function $8bf602c809f4a385$var$tripletToBase64(num) { 17909 return $8bf602c809f4a385$var$lookup[num >> 18 & 0x3F] + $8bf602c809f4a385$var$lookup[num >> 12 & 0x3F] + $8bf602c809f4a385$var$lookup[num >> 6 & 0x3F] + $8bf602c809f4a385$var$lookup[num & 0x3F]; 17910} 17911function $8bf602c809f4a385$var$encodeChunk(uint8, start, end) { 17912 var tmp; 17913 var output = []; 17914 for(var i = start; i < end; i += 3){ 17915 tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF); 17916 output.push($8bf602c809f4a385$var$tripletToBase64(tmp)); 17917 } 17918 return output.join(''); 17919} 17920function $8bf602c809f4a385$var$fromByteArray(uint8) { 17921 var tmp; 17922 var len = uint8.length; 17923 var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes 17924 ; 17925 var parts = []; 17926 var maxChunkLength = 16383 // must be multiple of 3 17927 ; 17928 // go through the array every three bytes, we'll deal with trailing stuff later 17929 for(var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)parts.push($8bf602c809f4a385$var$encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); 17930 // pad the end with zeros, but make sure to not forget the extra bytes 17931 if (extraBytes === 1) { 17932 tmp = uint8[len - 1]; 17933 parts.push($8bf602c809f4a385$var$lookup[tmp >> 2] + $8bf602c809f4a385$var$lookup[tmp << 4 & 0x3F] + '=='); 17934 } else if (extraBytes === 2) { 17935 tmp = (uint8[len - 2] << 8) + uint8[len - 1]; 17936 parts.push($8bf602c809f4a385$var$lookup[tmp >> 10] + $8bf602c809f4a385$var$lookup[tmp >> 4 & 0x3F] + $8bf602c809f4a385$var$lookup[tmp << 2 & 0x3F] + '='); 17937 } 17938 return parts.join(''); 17939} 17940 17941 17942/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ var $87795d83e4c60727$export$aafa59e2e03f2942; 17943var $87795d83e4c60727$export$68d8715fc104d294; 17944$87795d83e4c60727$export$aafa59e2e03f2942 = function(buffer, offset, isLE, mLen, nBytes) { 17945 var e, m; 17946 var eLen = nBytes * 8 - mLen - 1; 17947 var eMax = (1 << eLen) - 1; 17948 var eBias = eMax >> 1; 17949 var nBits = -7; 17950 var i = isLE ? nBytes - 1 : 0; 17951 var d = isLE ? -1 : 1; 17952 var s = buffer[offset + i]; 17953 i += d; 17954 e = s & (1 << -nBits) - 1; 17955 s >>= -nBits; 17956 nBits += eLen; 17957 for(; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); 17958 m = e & (1 << -nBits) - 1; 17959 e >>= -nBits; 17960 nBits += mLen; 17961 for(; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); 17962 if (e === 0) e = 1 - eBias; 17963 else if (e === eMax) return m ? NaN : (s ? -1 : 1) * Infinity; 17964 else { 17965 m = m + Math.pow(2, mLen); 17966 e = e - eBias; 17967 } 17968 return (s ? -1 : 1) * m * Math.pow(2, e - mLen); 17969}; 17970$87795d83e4c60727$export$68d8715fc104d294 = function(buffer, value, offset, isLE, mLen, nBytes) { 17971 var e, m, c; 17972 var eLen = nBytes * 8 - mLen - 1; 17973 var eMax = (1 << eLen) - 1; 17974 var eBias = eMax >> 1; 17975 var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; 17976 var i = isLE ? 0 : nBytes - 1; 17977 var d = isLE ? 1 : -1; 17978 var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; 17979 value = Math.abs(value); 17980 if (isNaN(value) || value === Infinity) { 17981 m = isNaN(value) ? 1 : 0; 17982 e = eMax; 17983 } else { 17984 e = Math.floor(Math.log(value) / Math.LN2); 17985 if (value * (c = Math.pow(2, -e)) < 1) { 17986 e--; 17987 c *= 2; 17988 } 17989 if (e + eBias >= 1) value += rt / c; 17990 else value += rt * Math.pow(2, 1 - eBias); 17991 if (value * c >= 2) { 17992 e++; 17993 c /= 2; 17994 } 17995 if (e + eBias >= eMax) { 17996 m = 0; 17997 e = eMax; 17998 } else if (e + eBias >= 1) { 17999 m = (value * c - 1) * Math.pow(2, mLen); 18000 e = e + eBias; 18001 } else { 18002 m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); 18003 e = 0; 18004 } 18005 } 18006 for(; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); 18007 e = e << mLen | m; 18008 eLen += mLen; 18009 for(; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); 18010 buffer[offset + i - d] |= s * 128; 18011}; 18012 18013 18014const $d756b869280043fa$var$customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation 18015 ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation 18016 : null; 18017$d756b869280043fa$export$a143d493d941bafc = $d756b869280043fa$var$Buffer; 18018$d756b869280043fa$export$e4cf37d7f6fb9e0a = $d756b869280043fa$var$SlowBuffer; 18019$d756b869280043fa$export$f99ded8fe4b79145 = 50; 18020const $d756b869280043fa$var$K_MAX_LENGTH = 0x7fffffff; 18021$d756b869280043fa$export$599f31c3813fae4d = $d756b869280043fa$var$K_MAX_LENGTH; 18022/** 18023 * If `Buffer.TYPED_ARRAY_SUPPORT`: 18024 * === true Use Uint8Array implementation (fastest) 18025 * === false Print warning and recommend using `buffer` v4.x which has an Object 18026 * implementation (most compatible, even IE6) 18027 * 18028 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, 18029 * Opera 11.6+, iOS 4.2+. 18030 * 18031 * We report that the browser does not support typed arrays if the are not subclassable 18032 * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` 18033 * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support 18034 * for __proto__ and has a buggy typed array implementation. 18035 */ $d756b869280043fa$var$Buffer.TYPED_ARRAY_SUPPORT = $d756b869280043fa$var$typedArraySupport(); 18036if (!$d756b869280043fa$var$Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && 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."); 18037function $d756b869280043fa$var$typedArraySupport() { 18038 // Can typed array instances can be augmented? 18039 try { 18040 const arr = new Uint8Array(1); 18041 const proto = { 18042 foo: function() { 18043 return 42; 18044 } 18045 }; 18046 Object.setPrototypeOf(proto, Uint8Array.prototype); 18047 Object.setPrototypeOf(arr, proto); 18048 return arr.foo() === 42; 18049 } catch (e) { 18050 return false; 18051 } 18052} 18053Object.defineProperty($d756b869280043fa$var$Buffer.prototype, 'parent', { 18054 enumerable: true, 18055 get: function() { 18056 if (!$d756b869280043fa$var$Buffer.isBuffer(this)) return undefined; 18057 return this.buffer; 18058 } 18059}); 18060Object.defineProperty($d756b869280043fa$var$Buffer.prototype, 'offset', { 18061 enumerable: true, 18062 get: function() { 18063 if (!$d756b869280043fa$var$Buffer.isBuffer(this)) return undefined; 18064 return this.byteOffset; 18065 } 18066}); 18067function $d756b869280043fa$var$createBuffer(length) { 18068 if (length > $d756b869280043fa$var$K_MAX_LENGTH) throw new RangeError('The value "' + length + '" is invalid for option "size"'); 18069 // Return an augmented `Uint8Array` instance 18070 const buf = new Uint8Array(length); 18071 Object.setPrototypeOf(buf, $d756b869280043fa$var$Buffer.prototype); 18072 return buf; 18073} 18074/** 18075 * The Buffer constructor returns instances of `Uint8Array` that have their 18076 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of 18077 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods 18078 * and the `Uint8Array` methods. Square bracket notation works as expected -- it 18079 * returns a single octet. 18080 * 18081 * The `Uint8Array` prototype remains unmodified. 18082 */ function $d756b869280043fa$var$Buffer(arg, encodingOrOffset, length) { 18083 // Common case. 18084 if (typeof arg === 'number') { 18085 if (typeof encodingOrOffset === 'string') throw new TypeError('The "string" argument must be of type string. Received type number'); 18086 return $d756b869280043fa$var$allocUnsafe(arg); 18087 } 18088 return $d756b869280043fa$var$from(arg, encodingOrOffset, length); 18089} 18090$d756b869280043fa$var$Buffer.poolSize = 8192 // not used by this implementation 18091; 18092function $d756b869280043fa$var$from(value, encodingOrOffset, length) { 18093 if (typeof value === 'string') return $d756b869280043fa$var$fromString(value, encodingOrOffset); 18094 if (ArrayBuffer.isView(value)) return $d756b869280043fa$var$fromArrayView(value); 18095 if (value == null) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); 18096 if ($d756b869280043fa$var$isInstance(value, ArrayBuffer) || value && $d756b869280043fa$var$isInstance(value.buffer, ArrayBuffer)) return $d756b869280043fa$var$fromArrayBuffer(value, encodingOrOffset, length); 18097 if (typeof SharedArrayBuffer !== 'undefined' && ($d756b869280043fa$var$isInstance(value, SharedArrayBuffer) || value && $d756b869280043fa$var$isInstance(value.buffer, SharedArrayBuffer))) return $d756b869280043fa$var$fromArrayBuffer(value, encodingOrOffset, length); 18098 if (typeof value === 'number') throw new TypeError('The "value" argument must not be of type number. Received type number'); 18099 const valueOf = value.valueOf && value.valueOf(); 18100 if (valueOf != null && valueOf !== value) return $d756b869280043fa$var$Buffer.from(valueOf, encodingOrOffset, length); 18101 const b = $d756b869280043fa$var$fromObject(value); 18102 if (b) return b; 18103 if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') return $d756b869280043fa$var$Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length); 18104 throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); 18105} 18106/** 18107 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError 18108 * if value is a number. 18109 * Buffer.from(str[, encoding]) 18110 * Buffer.from(array) 18111 * Buffer.from(buffer) 18112 * Buffer.from(arrayBuffer[, byteOffset[, length]]) 18113 **/ $d756b869280043fa$var$Buffer.from = function(value, encodingOrOffset, length) { 18114 return $d756b869280043fa$var$from(value, encodingOrOffset, length); 18115}; 18116// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: 18117// https://github.com/feross/buffer/pull/148 18118Object.setPrototypeOf($d756b869280043fa$var$Buffer.prototype, Uint8Array.prototype); 18119Object.setPrototypeOf($d756b869280043fa$var$Buffer, Uint8Array); 18120function $d756b869280043fa$var$assertSize(size) { 18121 if (typeof size !== 'number') throw new TypeError('"size" argument must be of type number'); 18122 else if (size < 0) throw new RangeError('The value "' + size + '" is invali
18122d for option "size"'); 18123} 18124function $d756b869280043fa$var$alloc(size, fill, encoding) { 18125 $d756b869280043fa$var$assertSize(size); 18126 if (size <= 0) return $d756b869280043fa$var$createBuffer(size); 18127 if (fill !== undefined) // Only pay attention to encoding if it's a string. This 18128 // prevents accidentally sending in a number that would 18129 // be interpreted as a start offset. 18130 return typeof encoding === 'string' ? $d756b869280043fa$var$createBuffer(size).fill(fill, encoding) : $d756b869280043fa$var$createBuffer(size).fill(fill); 18131 return $d756b869280043fa$var$createBuffer(size); 18132} 18133/** 18134 * Creates a new filled Buffer instance. 18135 * alloc(size[, fill[, encoding]]) 18136 **/ $d756b869280043fa$var$Buffer.alloc = function(size, fill, encoding) { 18137 return $d756b869280043fa$var$alloc(size, fill, encoding); 18138}; 18139function $d756b869280043fa$var$allocUnsafe(size) { 18140 $d756b869280043fa$var$assertSize(size); 18141 return $d756b869280043fa$var$createBuffer(size < 0 ? 0 : $d756b869280043fa$var$checked(size) | 0); 18142} 18143/** 18144 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. 18145 * */ $d756b869280043fa$var$Buffer.allocUnsafe = function(size) { 18146 return $d756b869280043fa$var$allocUnsafe(size); 18147}; 18148/** 18149 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. 18150 */ $d756b869280043fa$var$Buffer.allocUnsafeSlow = function(size) { 18151 return $d756b869280043fa$var$allocUnsafe(size); 18152}; 18153function $d756b869280043fa$var$fromString(string, encoding) { 18154 if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'; 18155 if (!$d756b869280043fa$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding); 18156 const length = $d756b869280043fa$var$byteLength(string, encoding) | 0; 18157 let buf = $d756b869280043fa$var$createBuffer(length); 18158 const actual = buf.write(string, encoding); 18159 if (actual !== length) // Writing a hex string, for example, that contains invalid characters will 18160 // cause everything after the first invalid character to be ignored. (e.g. 18161 // 'abxxcd' will be treated as 'ab') 18162 buf = buf.slice(0, actual); 18163 return buf; 18164} 18165function $d756b869280043fa$var$fromArrayLike(array) { 18166 const length = array.length < 0 ? 0 : $d756b869280043fa$var$checked(array.length) | 0; 18167 const buf = $d756b869280043fa$var$createBuffer(length); 18168 for(let i = 0; i < length; i += 1)buf[i] = array[i] & 255; 18169 return buf; 18170} 18171function $d756b869280043fa$var$fromArrayView(arrayView) { 18172 if ($d756b869280043fa$var$isInstance(arrayView, Uint8Array)) { 18173 const copy = new Uint8Array(arrayView); 18174 return $d756b869280043fa$var$fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength); 18175 } 18176 return $d756b869280043fa$var$fromArrayLike(arrayView); 18177} 18178function $d756b869280043fa$var$fromArrayBuffer(array, byteOffset, length) { 18179 if (byteOffset < 0 || array.byteLength < byteOffset) throw new RangeError('"offset" is outside of buffer bounds'); 18180 if (array.byteLength < byteOffset + (length || 0)) throw new RangeError('"length" is outside of buffer bounds'); 18181 let buf; 18182 if (byteOffset === undefined && length === undefined) buf = new Uint8Array(array); 18183 else if (length === undefined) buf = new Uint8Array(array, byteOffset); 18184 else buf = new Uint8Array(array, byteOffset, length); 18185 // Return an augmented `Uint8Array` instance 18186 Object.setPrototypeOf(buf, $d756b869280043fa$var$Buffer.prototype); 18187 return buf; 18188} 18189function $d756b869280043fa$var$fromObject(obj) { 18190 if ($d756b869280043fa$var$Buffer.isBuffer(obj)) { 18191 const len = $d756b869280043fa$var$checked(obj.length) | 0; 18192 const buf = $d756b869280043fa$var$createBuffer(len); 18193 if (buf.length === 0) return buf; 18194 obj.copy(buf, 0, 0, len); 18195 return buf; 18196 } 18197 if (obj.length !== undefined) { 18198 if (typeof obj.length !== 'number' || $d756b869280043fa$var$numberIsNaN(obj.length)) return $d756b869280043fa$var$createBuffer(0); 18199 return $d756b869280043fa$var$fromArrayLike(obj); 18200 } 18201 if (obj.type === 'Buffer' && Array.isArray(obj.data)) return $d756b869280043fa$var$fromArrayLike(obj.data); 18202} 18203function $d756b869280043fa$var$checked(length) { 18204 // Note: cannot use `length < K_MAX_LENGTH` here because that fails when 18205 // length is NaN (which is otherwise coerced to zero.) 18206 if (length >= $d756b869280043fa$var$K_MAX_LENGTH) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + $d756b869280043fa$var$K_MAX_LENGTH.toString(16) + ' bytes'); 18207 return length | 0; 18208} 18209function $d756b869280043fa$var$SlowBuffer(length) { 18210 if (+length != length) length = 0; 18211 return $d756b869280043fa$var$Buffer.alloc(+length); 18212} 18213$d756b869280043fa$var$Buffer.isBuffer = function isBuffer(b) { 18214 return b != null && b._isBuffer === true && b !== $d756b869280043fa$var$Buffer.prototype // so Buffer.isBuffer(
18214Buffer.prototype) will be false 18215 ; 18216}; 18217$d756b869280043fa$var$Buffer.compare = function compare(a, b) { 18218 if ($d756b869280043fa$var$isInstance(a, Uint8Array)) a = $d756b869280043fa$var$Buffer.from(a, a.offset, a.byteLength); 18219 if ($d756b869280043fa$var$isInstance(b, Uint8Array)) b = $d756b869280043fa$var$Buffer.from(b, b.offset, b.byteLength); 18220 if (!$d756b869280043fa$var$Buffer.isBuffer(a) || !$d756b869280043fa$var$Buffer.isBuffer(b)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); 18221 if (a === b) return 0; 18222 let x = a.length; 18223 let y = b.length; 18224 for(let i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) { 18225 x = a[i]; 18226 y = b[i]; 18227 break; 18228 } 18229 if (x < y) return -1; 18230 if (y < x) return 1; 18231 return 0; 18232}; 18233$d756b869280043fa$var$Buffer.isEncoding = function isEncoding(encoding) { 18234 switch(String(encoding).toLowerCase()){ 18235 case 'hex': 18236 case 'utf8': 18237 case 'utf-8': 18238 case 'ascii': 18239 case 'latin1': 18240 case 'binary': 18241 case 'base64': 18242 case 'ucs2': 18243 case 'ucs-2': 18244 case 'utf16le': 18245 case 'utf-16le': 18246 return true; 18247 default: 18248 return false; 18249 } 18250}; 18251$d756b869280043fa$var$Buffer.concat = function concat(list, length) { 18252 if (!Array.isArray(list)) throw new TypeError('"list" argument must be an Array of Buffers'); 18253 if (list.length === 0) return $d756b869280043fa$var$Buffer.alloc(0); 18254 let i; 18255 if (length === undefined) { 18256 length = 0; 18257 for(i = 0; i < list.length; ++i)length += list[i].length; 18258 } 18259 const buffer = $d756b869280043fa$var$Buffer.allocUnsafe(length); 18260 let pos = 0; 18261 for(i = 0; i < list.length; ++i){ 18262 let buf = list[i]; 18263 if ($d756b869280043fa$var$isInstance(buf, Uint8Array)) { 18264 if (pos + buf.length > buffer.length) { 18265 if (!$d756b869280043fa$var$Buffer.isBuffer(buf)) buf = $d756b869280043fa$var$Buffer.from(buf); 18266 buf.copy(buffer, pos); 18267 } else Uint8Array.prototype.set.call(buffer, buf, pos); 18268 } else if (!$d756b869280043fa$var$Buffer.isBuffer(buf)) throw new TypeError('"list" argument must be an Array of Buffers'); 18269 else buf.copy(buffer, pos); 18270 pos += buf.length; 18271 } 18272 return buffer; 18273}; 18274function $d756b869280043fa$var$byteLength(string, encoding) { 18275 if ($d756b869280043fa$var$Buffer.isBuffer(string)) return string.length; 18276 if (ArrayBuffer.isView(string) || $d756b869280043fa$var$isInstance(string, ArrayBuffer)) return string.byteLength; 18277 if (typeof string !== 'string') throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string); 18278 const len = string.length; 18279 const mustMatch = arguments.length > 2 && arguments[2] === true; 18280 if (!mustMatch && len === 0) return 0; 18281 // Use a for loop to avoid recursion 18282 let loweredCase = false; 18283 for(;;)switch(encoding){ 18284 case 'ascii': 18285 case 'latin1': 18286 case 'binary': 18287 return len; 18288 case 'utf8': 18289 case 'utf-8': 18290 return $d756b869280043fa$var$utf8ToBytes(string).length; 18291 case 'ucs2': 18292 case 'ucs-2': 18293 case 'utf16le': 18294 case 'utf-16le': 18295 return len * 2; 18296 case 'hex': 18297 return len >>> 1; 18298 case 'base64': 18299 return $d756b869280043fa$var$base64ToBytes(string).length; 18300 default: 18301 if (loweredCase) return mustMatch ? -1 : $d756b869280043fa$var$utf8ToBytes(string).length // assume utf8 18302 ; 18303 encoding = ('' + encoding).toLowerCase(); 18304 loweredCase = true; 18305 } 18306} 18307$d756b869280043fa$var$Buffer.byteLength = $d756b869280043fa$var$byteLength; 18308function $d756b869280043fa$var$slowToString(encoding, start, end) { 18309 let loweredCase = false; 18310 // No need to verify that "this.length <= MAX_UINT32" since it's a read-only 18311 // property of a typed array. 18312 // This behaves neither like String nor Uint8Array in that we set start/end 18313 // to their upper/lower bounds if the value passed is out of range. 18314 // undefined is handled specially as per ECMA-262 6th Edition, 18315 // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. 18316 if (start === undefined || start < 0) start = 0; 18317 // Return early if start > this.length. Done here to prevent potential uint32 18318 // coercion fail below. 18319 if (start > this.length) return ''; 18320 if (end === undefined || end > this.length) end = this.length; 18321 if (end <= 0) return ''; 18322 // Force coercion to uint32. This will also coerce falsey/NaN values to 0. 18323 end >>>= 0; 18324 start >>>= 0; 18325 if (end <= start) return ''; 18326 if (!encoding) encoding = 'utf8'; 18327 while(true)switch(encoding){ 18328 case 'hex': 18329 return $d756b869280043fa$var$hexSlice(this, start, end); 18330 case 'utf8': 18331 case 'utf-8': 18332 return $d756b869280043fa$var$utf8Slice(this, start, end); 18333 case 'ascii': 18334 return $d756b869280043fa$var$asciiSlice(this, start, end); 18335 case 'latin1': 18336 case 'binary': 18337 return $d756b869280043fa$var$latin1Slice(this, start, end); 18338 case 'base64': 18339 return $d756b869280043fa$var$base64Slice(this, start, end); 18340 case 'ucs2': 18341 case 'ucs-2': 18342 case 'utf16le': 18343 case 'utf-16le': 18344 return $d756b869280043fa$var$utf16leSlice(this, start, end); 18345 default: 18346 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); 18347 encoding = (encoding + '').toLowerCase(); 18348 loweredCase = true; 18349 } 18350} 18351// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) 18352// to detect a Buffer instance. It's not possible to use `instanceof Buffer` 18353// reliably in a browserify context because there could be multiple different 18354// copies of the 'buffer' package in use. This method works even for Buffer 18355// instances that were created from another copy of the `buffer` package. 18356// See: https://github.com/feross/buffer/issues/154 18357$d756b869280043fa$var$Buffer.prototype._isBuffer = true; 18358function $d756b869280043fa$var$swap(b, n, m) { 18359 const i = b[n]; 18360 b[n] = b[m]; 18361 b[m] = i; 18362} 18363$d756b869280043fa$var$Buffer.prototype.swap16 = function swap16() { 18364 const len = this.length; 18365 if (len % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); 18366 for(let i = 0; i < len; i += 2)$d756b869280043fa$var$swap(this, i, i + 1); 18367 return this; 18368}; 18369$d756b869280043fa$var$Buffer.prototype.swap32 = function swap32() { 18370 const len = this.length; 18371 if (len % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); 18372 for(let i = 0; i < len; i += 4){ 18373 $d756b869280043fa$var$swap(this, i, i + 3); 18374 $d756b869280043fa$var$swap(this, i + 1, i + 2); 18375 } 18376 return this; 18377}; 18378$d756b869280043fa$var$Buffer.prototype.swap64 = function swap64() { 18379 const len = this.length; 18380 if (len % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); 18381 for(let i = 0; i < len; i += 8){ 18382 $d756b869280043fa$var$swap(this, i, i + 7); 18383 $d756b869280043fa$var$swap(this, i + 1, i + 6); 18384 $d756b869280043fa$var$swap(this, i + 2, i + 5); 18385 $d756b869280043fa$var$swap(this, i + 3, i + 4); 18386 } 18387 return this; 18388}; 18389$d756b869280043fa$var$Buffer.prototype.toString = function toString() { 18390 const length = this.length; 18391 if (length === 0) return ''; 18392 if (arguments.length === 0) return $d756b869280043fa$var$utf8Slice(this, 0, length); 18393 return $d756b869280043fa$var$slowToString.apply(this, arguments); 18394};
18395$d756b869280043fa$var$Buffer.prototype.toLocaleString = $d756b869280043fa$var$Buffer.prototype.toString; 18396$d756b869280043fa$var$Buffer.prototype.equals = function equals(b) { 18397 if (!$d756b869280043fa$var$Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); 18398 if (this === b) return true; 18399 return $d756b869280043fa$var$Buffer.compare(this, b) === 0; 18400}; 18401$d756b869280043fa$var$Buffer.prototype.inspect = function inspect() { 18402 let str = ''; 18403 const max = $d756b869280043fa$export$f99ded8fe4b79145; 18404 str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim(); 18405 if (this.length > max) str += ' ... '; 18406 return '<Buffer ' + str + '>'; 18407}; 18408if ($d756b869280043fa$var$customInspectSymbol) $d756b869280043fa$var$Buffer.prototype[$d756b869280043fa$var$customInspectSymbol] = $d756b869280043fa$var$Buffer.prototype.inspect; 18409$d756b869280043fa$var$Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { 18410 if ($d756b869280043fa$var$isInstance(target, Uint8Array)) target = $d756b869280043fa$var$Buffer.from(target, target.offset, target.byteLength); 18411 if (!$d756b869280043fa$var$Buffer.isBuffer(target)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target); 18412 if (start === undefined) start = 0; 18413 if (end === undefined) end = target ? target.length : 0; 18414 if (thisStart === undefined) thisStart = 0; 18415 if (thisEnd === undefined) thisEnd = this.length; 18416 if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw new RangeError('out of range index'); 18417 if (thisStart >= thisEnd && start >= end) return 0; 18418 if (thisStart >= thisEnd) return -1; 18419 if (start >= end) return 1; 18420 start >>>= 0; 18421 end >>>= 0; 18422 thisStart >>>= 0; 18423 thisEnd >>>= 0; 18424 if (this === target) return 0; 18425 let x = thisEnd - thisStart; 18426 let y = end - start; 18427 const len = Math.min(x, y); 18428 const thisCopy = this.slice(thisStart, thisEnd); 18429 const targetCopy = target.slice(start, end); 18430 for(let i = 0; i < len; ++i)if (thisCopy[i] !== targetCopy[i]) { 18431 x = thisCopy[i]; 18432 y = targetCopy[i]; 18433 break; 18434 } 18435 if (x < y) return -1; 18436 if (y < x) return 1; 18437 return 0; 18438}; 18439// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, 18440// OR the last index of `val` in `buffer` at offset <= `byteOffset`. 18441// 18442// Arguments: 18443// - buffer - a Buffer to search 18444// - val - a string, Buffer, or number 18445// - byteOffset - an index into `buffer`; will be clamped to an int32 18446// - encoding - an optional encoding, relevant is val is a string 18447// - dir - true for indexOf, false for lastIndexOf 18448function $d756b869280043fa$var$bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { 18449 // Empty buffer means no match 18450 if (buffer.length === 0) return -1; 18451 // Normalize byteOffset 18452 if (typeof byteOffset === 'string') { 18453 encoding = byteOffset; 18454 byteOffset = 0; 18455 } else if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff; 18456 else if (byteOffset < -2147483648) byteOffset = -2147483648; 18457 byteOffset = +byteOffset // Coerce to Number. 18458 ; 18459 if ($d756b869280043fa$var$numberIsNaN(byteOffset)) // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer 18460 byteOffset = dir ? 0 : buffer.length - 1; 18461 // Normalize byteOffset: negative offsets start from the end of the buffer 18462 if (byteOffset < 0) byteOffset = buffer.length + byteOffset; 18463 if (byteOffset >= buffer.length) { 18464 if (dir) return -1; 18465 else byteOffset = buffer.length - 1; 18466 } else if (byteOffset < 0) { 18467 if (dir) byteOffset = 0; 18468 else return -1; 18469 } 18470 // Normalize val 18471 if (typeof val === 'string') val = $d756b869280043fa$var$Buffer.from(val, encoding); 18472 // Finally, search either indexOf (if dir is true) or lastIndexOf 18473 if ($d756b869280043fa$var$Buffer.isBuffer(val)) { 18474 // Special case: looking for empty string/buffer always fail
18474s 18475 if (val.length === 0) return -1; 18476 return $d756b869280043fa$var$arrayIndexOf(buffer, val, byteOffset, encoding, dir); 18477 } else if (typeof val === 'number') { 18478 val = val & 0xFF // Search for a byte value [0-255] 18479 ; 18480 if (typeof Uint8Array.prototype.indexOf === 'function') { 18481 if (dir) return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); 18482 else return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); 18483 } 18484 return $d756b869280043fa$var$arrayIndexOf(buffer, [ 18485 val 18486 ], byteOffset, encoding, dir); 18487 } 18488 throw new TypeError('val must be string, number or Buffer'); 18489} 18490function $d756b869280043fa$var$arrayIndexOf(arr, val, byteOffset, encoding, dir) { 18491 let indexSize = 1; 18492 let arrLength = arr.length; 18493 let valLength = val.length; 18494 if (encoding !== undefined) { 18495 encoding = String(encoding).toLowerCase(); 18496 if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { 18497 if (arr.length < 2 || val.length < 2) return -1; 18498 indexSize = 2; 18499 arrLength /= 2; 18500 valLength /= 2; 18501 byteOffset /= 2; 18502 } 18503 } 18504 function read(buf, i) { 18505 if (indexSize === 1) return buf[i]; 18506 else return buf.readUInt16BE(i * indexSize); 18507 } 18508 let i; 18509 if (dir) { 18510 let foundIndex = -1; 18511 for(i = byteOffset; i < arrLength; i++)if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { 18512 if (foundIndex === -1) foundIndex = i; 18513 if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; 18514 } else { 18515 if (foundIndex !== -1) i -= i - foundIndex; 18516 foundIndex = -1; 18517 } 18518 } else { 18519 if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; 18520 for(i = byteOffset; i >= 0; i--){ 18521 let found = true; 18522 for(let j = 0; j < valLength; j++)if (read(arr, i + j) !== read(val, j)) { 18523 found = false; 18524 break; 18525 } 18526 if (found) return i; 18527 } 18528 } 18529 return -1; 18530} 18531$d756b869280043fa$var$Buffer.prototype.includes = function includes(val, byteOffset, encoding) { 18532 return this.indexOf(val, byteOffset, encoding) !== -1; 18533}; 18534$d756b869280043fa$var$Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { 18535 return $d756b869280043fa$var$bidirectionalIndexOf(this, val, byteOffset, encoding, true); 18536}; 18537$d756b869280043fa$var$Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { 18538 return $d756b869280043fa$var$bidirectionalIndexOf(this, val, byteOffset, encoding, false); 18539}; 18540function $d756b869280043fa$var$hexWrite(buf, string, offset, length) { 18541 offset = Number(offset) || 0; 18542 const remaining = buf.length - offset; 18543 if (!length) length = remaining; 18544 else { 18545 length = Number(length); 18546 if (length > remaining) length = remaining; 18547 } 18548 const strLen = string.length; 18549 if (length > strLen / 2) length = strLen / 2; 18550 let i; 18551 for(i = 0; i < length; ++i){ 18552 const parsed = parseInt(string.substr(i * 2, 2), 16); 18553 if ($d756b869280043fa$var$numberIsNaN(parsed)) return i; 18554 buf[offset + i] = parsed; 18555 } 18556 return i; 18557} 18558function $d756b869280043fa$var$utf8Write(buf, string, offset, length) { 18559 return $d756b869280043fa$var$blitBuffer($d756b869280043fa$var$utf8ToBytes(string, buf.length - offset), buf, offset, length); 18560} 18561function $d756b869280043fa$var$asciiWrite(buf, string, offset, length) { 18562 return $d756b869280043fa$var$blitBuffer($d756b869280043fa$var$asciiToBytes(string), buf, offset, length); 18563} 18564function $d756b869280043fa$var$base64Write(buf, string, offset, length) { 18565 return $d756b869280043fa$var$blitBuffer($d756b869280043fa$var$base64ToBytes(string), buf, offset, length); 18566} 18567function $d756b869280043fa$var$ucs2Write(buf, string, offset, length) { 18568 return $d756b869280043fa$var$blitBuffer($d756b869280043fa$var$utf16leToBytes(string, buf.length - offset), buf, offset, length); 18569} 18570$d756b869280043fa$var$Buffer.prototype.write = function write(string, offset, length, encoding) { 18571 // Buffer#write(string) 18572 if (offset === undefined) { 18573 encoding = 'utf8'; 18574 length = this.length; 18575 offset = 0; 18576 // Buffer#write(string, encoding) 18577 } else if (length === undefined && typeof offset === 'string') { 18578 encoding = offset; 18579 length = this.length; 18580 offset = 0; 18581 // Buffer#write(string, offset[, length][, encoding]) 18582 } else if (isFinite(offset)) { 18583 offset = offset >>> 0; 18584 if (isFinite(length)) { 18585 length = length >>> 0; 18586 if (encoding === undefined) encoding = 'utf8'; 18587 } else { 18588 encoding = length; 18589 length = undefined; 18590 } 18591 } else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); 18592 const remaining = this.length - offset; 18593 if (length === undefined || length > remaining) length = remaining; 18594 if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) throw new RangeError('Attempt to write outside buffer bounds'); 18595 if (!encoding) encoding = 'utf8'; 18596 let loweredCase = false;
vendor: 3,762 bytes, lines 18597-18678
18597 for(;;)switch(encoding){ 18598 case 'hex': 18599 return $d756b869280043fa$var$hexWrite(this, string, offset, length); 18600 case 'utf8': 18601 case 'utf-8': 18602 return $d756b869280043fa$var$utf8Write(this, string, offset, length); 18603 case 'ascii': 18604 case 'latin1': 18605 case 'binary': 18606 return $d756b869280043fa$var$asciiWrite(this, string, offset, length); 18607 case 'base64': 18608 // Warning: maxLength not taken into account in base64Write 18609 return $d756b869280043fa$var$base64Write(this, string, offset, length); 18610 case 'ucs2': 18611 case 'ucs-2': 18612 case 'utf16le': 18613 case 'utf-16le': 18614 return $d756b869280043fa$var$ucs2Write(this, string, offset, length); 18615 default: 18616 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); 18617 encoding = ('' + encoding).toLowerCase(); 18618 loweredCase = true; 18619 } 18620}; 18621$d756b869280043fa$var$Buffer.prototype.toJSON = function toJSON() { 18622 return { 18623 type: 'Buffer', 18624 data: Array.prototype.slice.call(this._arr || this, 0) 18625 }; 18626}; 18627function $d756b869280043fa$var$base64Slice(buf, start, end) { 18628 if (start === 0 && end === buf.length) return $8bf602c809f4a385$export$6100ba28696e12de(buf); 18629 else return $8bf602c809f4a385$export$6100ba28696e12de(buf.slice(start, end)); 18630} 18631function $d756b869280043fa$var$utf8Slice(buf, start, end) { 18632 end = Math.min(buf.length, end); 18633 const res = []; 18634 let i = start; 18635 while(i < end){ 18636 const firstByte = buf[i]; 18637 let codePoint = null; 18638 let bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; 18639 if (i + bytesPerSequence <= end) { 18640 let secondByte, thirdByte, fourthByte, tempCodePoint; 18641 switch(bytesPerSequence){ 18642 case 1: 18643 if (firstByte < 0x80) codePoint = firstByte; 18644 break; 18645 case 2: 18646 secondByte = buf[i + 1]; 18647 if ((secondByte & 0xC0) === 0x80) { 18648 tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; 18649 if (tempCodePoint > 0x7F) codePoint = tempCodePoint; 18650 } 18651 break; 18652 case 3: 18653 secondByte = buf[i + 1]; 18654 thirdByte = buf[i + 2]; 18655 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { 18656 tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; 18657 if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) codePoint = tempCodePoint; 18658 } 18659 break; 18660 case 4: 18661 secondByte = buf[i + 1]; 18662 thirdByte = buf[i + 2]; 18663 fourthByte = buf[i + 3]; 18664 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { 18665 tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; 18666 if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) codePoint = tempCodePoint; 18667 } 18668 } 18669 } 18670 if (codePoint === null) { 18671 // we did not generate a valid codePoint so insert a 18672 // replacement char (U+FFFD) and advance only 1 byte 18673 codePoint = 0xFFFD; 18674 bytesPerSequence = 1; 18675 } else if (codePoint > 0xFFFF) { 18676 // encode to utf16 (surrogate pair dance) 18677 codePoint -= 0x10000; 18678 res.push(codePoint >>>
18678 10 & 0x3FF | 0xD800); 18679 codePoint = 0xDC00 | codePoint & 0x3FF; 18680 } 18681 res.push(codePoint); 18682 i += bytesPerSequence; 18683 } 18684 return $d756b869280043fa$var$decodeCodePointsArray(res); 18685} 18686// Based on http://stackoverflow.com/a/22747272/680742, the browser with 18687// the lowest limit is Chrome, with 0x10000 args. 18688// We go 1 magnitude less, for safety 18689const $d756b869280043fa$var$MAX_ARGUMENTS_LENGTH = 0x1000; 18690function $d756b869280043fa$var$decodeCodePointsArray(codePoints) { 18691 const len = codePoints.length; 18692 if (len <= $d756b869280043fa$var$MAX_ARGUMENTS_LENGTH) return String.fromCharCode.apply(String, codePoints) // avoid extra slice() 18693 ; 18694 // Decode in chunks to avoid "call stack size exceeded". 18695 let res = ''; 18696 let i = 0; 18697 while(i < len)res += String.fromCharCode.apply(String, codePoints.slice(i, i += $d756b869280043fa$var$MAX_ARGUMENTS_LENGTH)); 18698 return res; 18699} 18700function $d756b869280043fa$var$asciiSlice(buf, start, end) { 18701 let ret = ''; 18702 end = Math.min(buf.length, end); 18703 for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i] & 0x7F); 18704 return ret; 18705} 18706function $d756b869280043fa$var$latin1Slice(buf, start, end) { 18707 let ret = ''; 18708 end = Math.min(buf.length, end); 18709 for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i]); 18710 return ret; 18711} 18712function $d756b869280043fa$var$hexSlice(buf, start, end) { 18713 const len = buf.length; 18714 if (!start || start < 0) start = 0; 18715 if (!end || end < 0 || end > len) end = len; 18716 let out = ''; 18717 for(let i = start; i < end; ++i)out += $d756b869280043fa$var$hexSliceLookupTable[buf[i]]; 18718 return out; 18719} 18720function $d756b869280043fa$var$utf16leSlice(buf, start, end) { 18721 const bytes = buf.slice(start, end); 18722 let res = ''; 18723 // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) 18724 for(let i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); 18725 return res; 18726} 18727$d756b869280043fa$var$Buffer.prototype.slice = function slice(start, end) { 18728 const len = this.length; 18729 start = ~~start; 18730 end = end === undefined ? len : ~~end; 18731 if (start < 0) { 18732 start += len; 18733 if (start < 0) start = 0; 18734 } else if (start > len) start = len; 18735 if (end < 0) { 18736 end += len; 18737 if (end < 0) end = 0; 18738 } else if (end > len) end = len; 18739 if (end < start) end = start; 18740 const newBuf = this.subarray(start, end); 18741 // Return an augmented `Uint8Array` instance 18742 Object.setPrototypeOf(newBuf, $d756b869280043fa$var$Buffer.prototype); 18743 return newBuf; 18744}; 18745/* 18746 * Need to make sure that buffer isn't trying to write out of bounds. 18747 */ function $d756b869280043fa$var$checkOffset(offset, ext, length) { 18748 if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); 18749 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); 18750} 18751$d756b869280043fa$var$Buffer.prototype.readUintLE = $d756b869280043fa$var$Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { 18752 offset = offset >>> 0; 18753 byteLength = byteLength >>> 0; 18754 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, byteLength, this.length); 18755 let val = this[offset]; 18756 let mul = 1; 18757 let i = 0; 18758 while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul; 18759 return val; 18760}; 18761$d756b869280043fa$var$Buffer.prototype.readUintBE = $d756b869280043fa$var$Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { 18762 offset = offset >>> 0; 18763 byteLength = byteLength >>> 0; 18764 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, byteLength, this.length); 18765 let val = this[offset + --byteLength]; 18766 let mul = 1; 18767 while(byteLength > 0 && (mul *= 0x100))val += this[offset + --byteLength] * mul; 18768 return val; 18769}; 18770$d756b869280043fa$var$Buffer.prototype.readUint8 = $d756b869280043fa$var$Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { 18771 offset = offset >>> 0; 18772 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 1, this.length); 18773 return this[offset]; 18774};
vendor: 14,511 bytes, lines 18775-19070
18775$d756b869280043fa$var$Buffer.prototype.readUint16LE = $d756b869280043fa$var$Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { 18776 offset = offset >>> 0; 18777 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 2, this.length); 18778 return this[offset] | this[offset + 1] << 8; 18779}; 18780$d756b869280043fa$var$Buffer.prototype.readUint16BE = $d756b869280043fa$var$Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { 18781 offset = offset >>> 0; 18782 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 2, this.length); 18783 return this[offset] << 8 | this[offset + 1]; 18784}; 18785$d756b869280043fa$var$Buffer.prototype.readUint32LE = $d756b869280043fa$var$Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { 18786 offset = offset >>> 0; 18787 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 4, this.length); 18788 return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; 18789}; 18790$d756b869280043fa$var$Buffer.prototype.readUint32BE = $d756b869280043fa$var$Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { 18791 offset = offset >>> 0; 18792 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 4, this.length); 18793 return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); 18794}; 18795$d756b869280043fa$var$Buffer.prototype.readBigUInt64LE = $d756b869280043fa$var$defineBigIntMethod(function readBigUInt64LE(offset) { 18796 offset = offset >>> 0; 18797 $d756b869280043fa$var$validateNumber(offset, 'offset'); 18798 const first = this[offset]; 18799 const last = this[offset + 7]; 18800 if (first === undefined || last === undefined) $d756b869280043fa$var$boundsError(offset, this.length - 8); 18801 const lo = first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24; 18802 const hi = this[++offset] + this[++offset] * 256 + this[++offset] * 2 ** 16 + last * 2 ** 24; 18803 return BigInt(lo) + (BigInt(hi) << BigInt(32)); 18804}); 18805$d756b869280043fa$var$Buffer.prototype.readBigUInt64BE = $d756b869280043fa$var$defineBigIntMethod(function readBigUInt64BE(offset) { 18806 offset = offset >>> 0; 18807 $d756b869280043fa$var$validateNumber(offset, 'offset'); 18808 const first = this[offset]; 18809 const last = this[offset + 7]; 18810 if (first === undefined || last === undefined) $d756b869280043fa$var$boundsError(offset, this.length - 8); 18811 const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset]; 18812 const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last; 18813 return (BigInt(hi) << BigInt(32)) + BigInt(lo); 18814}); 18815$d756b869280043fa$var$Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { 18816 offset = offset >>> 0; 18817 byteLength = byteLength >>> 0; 18818 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, byteLength, this.length); 18819 let val = this[offset]; 18820 let mul = 1; 18821 let i = 0; 18822 while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul; 18823 mul *= 0x80; 18824 if (val >= mul) val -= Math.pow(2, 8 * byteLength); 18825 return val; 18826}; 18827$d756b869280043fa$var$Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { 18828 offset = offset >>> 0; 18829 byteLength = byteLength >>> 0; 18830 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, byteLength, this.length); 18831 let i = byteLength; 18832 let mul = 1; 18833 let val = this[offset + --i]; 18834 while(i > 0 && (mul *= 0x100))val += this[offset + --i] * mul; 18835 mul *= 0x80; 18836 if (val >= mul) val -= Math.pow(2, 8 * byteLength); 18837 return val; 18838}; 18839$d756b869280043fa$var$Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { 18840 offset = offset >>> 0; 18841 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 1, this.length); 18842 if (!(this[offset] & 0x80)) return this[offset]; 18843 return (0xff - this[offset] + 1) * -1; 18844}; 18845$d756b869280043fa$var$Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { 18846 offset = offset >>> 0; 18847 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 2, this.length); 18848 const val = this[offset] | this[offset + 1] << 8; 18849 return val & 0x8000 ? val | 0xFFFF0000 : val; 18850}; 18851$d756b869280043fa$var$Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { 18852 offset = offset >>> 0; 18853 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 2, this.length); 18854 const val = this[offset + 1] | this[offset] << 8; 18855 return val & 0x8000 ? val | 0xFFFF0000 : val; 18856}; 18857$d756b869280043fa$var$Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { 18858 offset = offset >>> 0; 18859 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 4, this.length); 18860 return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; 18861}; 18862$d756b869280043fa$var$Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { 18863 offset = offset >>> 0; 18864 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 4, this.length); 18865 return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; 18866}; 18867$d756b869280043fa$var$Buffer.prototype.readBigInt64LE = $d756b869280043fa$var$defineBigIntMethod(function readBigInt64LE(offset) { 18868 offset = offset >>> 0; 18869 $d756b869280043fa$var$validateNumber(offset, 'offset'); 18870 const first = this[offset]; 18871 const last = this[offset + 7]; 18872 if (first === undefined || last === undefined) $d756b869280043fa$var$boundsError(offset, this.length - 8); 18873 const val = this[offset + 4] + this[offset + 5] * 256 + this[offset + 6] * 2 ** 16 + (last << 24 // Overflow 18874 ); 18875 return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24); 18876}); 18877$d756b869280043fa$var$Buffer.prototype.readBigInt64BE = $d756b869280043fa$var$defineBigIntMethod(function readBigInt64BE(offset) { 18878 offset = offset >>> 0; 18879 $d756b869280043fa$var$validateNumber(offset, 'offset'); 18880 const first = this[offset]; 18881 const last = this[offset + 7]; 18882 if (first === undefined || last === undefined) $d756b869280043fa$var$boundsError(offset, this.length - 8); 18883 const val = (first << 24) + // Overflow 18884 this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset]; 18885 return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last); 18886}); 18887$d756b869280043fa$var$Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { 18888 offset = offset >>> 0; 18889 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 4, this.length); 18890 return $87795d83e4c60727$export$aafa59e2e03f2942(this, offset, true, 23, 4); 18891}; 18892$d756b869280043fa$var$Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { 18893 offset = offset >>> 0; 18894 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 4, this.length); 18895 return $87795d83e4c60727$export$aafa59e2e03f2942(this, offset, false, 23, 4); 18896}; 18897$d756b869280043fa$var$Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { 18898 offset = offset >>> 0; 18899 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 8, this.length); 18900 return $87795d83e4c60727$export$aafa59e2e03f2942(this, offset, true, 52, 8); 18901}; 18902$d756b869280043fa$var$Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { 18903 offset = offset >>> 0; 18904 if (!noAssert) $d756b869280043fa$var$checkOffset(offset, 8, this.length); 18905 return $87795d83e4c60727$export$aafa59e2e03f2942(this, offset, false, 52, 8); 18906}; 18907function $d756b869280043fa$var$checkInt(buf, value, offset, ext, max, min) { 18908 if (!$d756b869280043fa$var$Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); 18909 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); 18910 if (offset + ext > buf.length) throw new RangeError('Index out of range'); 18911} 18912$d756b869280043fa$var$Buffer.prototype.writeUintLE = $d756b869280043fa$var$Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { 18913 value = +value; 18914 offset = offset >>> 0; 18915 byteLength = byteLength >>> 0; 18916 if (!noAssert) { 18917 const maxBytes = Math.pow(2, 8 * byteLength) - 1; 18918 $d756b869280043fa$var$checkInt(this, value, offset, byteLength, maxBytes, 0); 18919 } 18920 let mul = 1; 18921 let i = 0; 18922 this[offset] = value & 0xFF; 18923 while(++i < byteLength && (mul *= 0x100))this[offset + i] = value / mul & 0xFF; 18924 return offset + byteLength; 18925}; 18926$d756b869280043fa$var$Buffer.prototype.writeUintBE = $d756b869280043fa$var$Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { 18927 value = +value; 18928 offset = offset >>> 0; 18929 byteLength = byteLength >>> 0; 18930 if (!noAssert) { 18931 const maxBytes = Math.pow(2, 8 * byteLength) - 1; 18932 $d756b869280043fa$var$checkInt(this, value, offset, byteLength, maxBytes, 0); 18933 } 18934 let i = byteLength - 1; 18935 let mul = 1; 18936 this[offset + i] = value & 0xFF; 18937 while(--i >= 0 && (mul *= 0x100))this[offset + i] = value / mul & 0xFF; 18938 return offset + byteLength; 18939}; 18940$d756b869280043fa$var$Buffer.prototype.writeUint8 = $d756b869280043fa$var$Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { 18941 value = +value; 18942 offset = offset >>> 0; 18943 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 1, 0xff, 0); 18944 this[offset] = value & 0xff; 18945 return offset + 1; 18946}; 18947$d756b869280043fa$var$Buffer.prototype.writeUint16LE = $d756b869280043fa$var$Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { 18948 value = +value; 18949 offset = offset >>> 0; 18950 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 2, 0xffff, 0); 18951 this[offset] = value & 0xff; 18952 this[offset + 1] = value >>> 8; 18953 return offset + 2; 18954}; 18955$d756b869280043fa$var$Buffer.prototype.writeUint16BE = $d756b869280043fa$var$Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { 18956 value = +value; 18957 offset = offset >>> 0; 18958 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 2, 0xffff, 0); 18959 this[offset] = value >>> 8; 18960 this[offset + 1] = value & 0xff; 18961 return offset + 2; 18962}; 18963$d756b869280043fa$var$Buffer.prototype.writeUint32LE = $d756b869280043fa$var$Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { 18964 value = +value; 18965 offset = offset >>> 0; 18966 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 4, 0xffffffff, 0); 18967 this[offset + 3] = value >>> 24; 18968 this[offset + 2] = value >>> 16; 18969 this[offset + 1] = value >>> 8; 18970 this[offset] = value & 0xff; 18971 return offset + 4; 18972}; 18973$d756b869280043fa$var$Buffer.prototype.writeUint32BE = $d756b869280043fa$var$Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { 18974 value = +value; 18975 offset = offset >>> 0; 18976 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 4, 0xffffffff, 0); 18977 this[offset] = value >>> 24; 18978 this[offset + 1] = value >>> 16; 18979 this[offset + 2] = value >>> 8; 18980 this[offset + 3] = value & 0xff; 18981 return offset + 4; 18982}; 18983function $d756b869280043fa$var$wrtBigUInt64LE(buf, value, offset, min, max) { 18984 $d756b869280043fa$var$checkIntBI(value, min, max, buf, offset, 7); 18985 let lo = Number(value & BigInt(0xffffffff)); 18986 buf[offset++] = lo; 18987 lo = lo >> 8; 18988 buf[offset++] = lo; 18989 lo = lo >> 8; 18990 buf[offset++] = lo; 18991 lo = lo >> 8; 18992 buf[offset++] = lo; 18993 let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)); 18994 buf[offset++] = hi; 18995 hi = hi >> 8; 18996 buf[offset++] = hi; 18997 hi = hi >> 8; 18998 buf[offset++] = hi; 18999 hi = hi >> 8; 19000 buf[offset++] = hi; 19001 return offset; 19002} 19003function $d756b869280043fa$var$wrtBigUInt64BE(buf, value, offset, min, max) { 19004 $d756b869280043fa$var$checkIntBI(value, min, max, buf, offset, 7); 19005 let lo = Number(value & BigInt(0xffffffff)); 19006 buf[offset + 7] = lo; 19007 lo = lo >> 8; 19008 buf[offset + 6] = lo; 19009 lo = lo >> 8; 19010 buf[offset + 5] = lo; 19011 lo = lo >> 8; 19012 buf[offset + 4] = lo; 19013 let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)); 19014 buf[offset + 3] = hi; 19015 hi = hi >> 8; 19016 buf[offset + 2] = hi; 19017 hi = hi >> 8; 19018 buf[offset + 1] = hi; 19019 hi = hi >> 8; 19020 buf[offset] = hi; 19021 return offset + 8; 19022} 19023$d756b869280043fa$var$Buffer.prototype.writeBigUInt64LE = $d756b869280043fa$var$defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) { 19024 return $d756b869280043fa$var$wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')); 19025}); 19026$d756b869280043fa$var$Buffer.prototype.writeBigUInt64BE = $d756b869280043fa$var$defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) { 19027 return $d756b869280043fa$var$wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')); 19028}); 19029$d756b869280043fa$var$Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { 19030 value = +value; 19031 offset = offset >>> 0; 19032 if (!noAssert) { 19033 const limit = Math.pow(2, 8 * byteLength - 1); 19034 $d756b869280043fa$var$checkInt(this, value, offset, byteLength, limit - 1, -limit); 19035 } 19036 let i = 0; 19037 let mul = 1; 19038 let sub = 0; 19039 this[offset] = value & 0xFF; 19040 while(++i < byteLength && (mul *= 0x100)){ 19041 if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) sub = 1; 19042 this[offset + i] = (value / mul >> 0) - sub & 0xFF; 19043 } 19044 return offset + byteLength; 19045}; 19046$d756b869280043fa$var$Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { 19047 value = +value; 19048 offset = offset >>> 0; 19049 if (!noAssert) { 19050 const limit = Math.pow(2, 8 * byteLength - 1); 19051 $d756b869280043fa$var$checkInt(this, value, offset, byteLength, limit - 1, -limit); 19052 } 19053 let i = byteLength - 1; 19054 let mul = 1; 19055 let sub = 0; 19056 this[offset + i] = value & 0xFF; 19057 while(--i >= 0 && (mul *= 0x100)){ 19058 if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) sub = 1; 19059 this[offset + i] = (value / mul >> 0) - sub & 0xFF; 19060 } 19061 return offset + byteLength; 19062}; 19063$d756b869280043fa$var$Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { 19064 value = +value; 19065 offset = offset >>> 0; 19066 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 1, 0x7f, -128); 19067 if (value < 0) value = 0xff + value + 1; 19068 this[offset] = value & 0xff; 19069 return offset + 1; 19070};
vendor: 4,514 bytes, lines 19071-19148
19071$d756b869280043fa$var$Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { 19072 value = +value; 19073 offset = offset >>> 0; 19074 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 2, 0x7fff, -32768); 19075 this[offset] = value & 0xff; 19076 this[offset + 1] = value >>> 8; 19077 return offset + 2; 19078}; 19079$d756b869280043fa$var$Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { 19080 value = +value; 19081 offset = offset >>> 0; 19082 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 2, 0x7fff, -32768); 19083 this[offset] = value >>> 8; 19084 this[offset + 1] = value & 0xff; 19085 return offset + 2; 19086}; 19087$d756b869280043fa$var$Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { 19088 value = +value; 19089 offset = offset >>> 0; 19090 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648); 19091 this[offset] = value & 0xff; 19092 this[offset + 1] = value >>> 8; 19093 this[offset + 2] = value >>> 16; 19094 this[offset + 3] = value >>> 24; 19095 return offset + 4; 19096}; 19097$d756b869280043fa$var$Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { 19098 value = +value; 19099 offset = offset >>> 0; 19100 if (!noAssert) $d756b869280043fa$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648); 19101 if (value < 0) value = 0xffffffff + value + 1; 19102 this[offset] = value >>> 24; 19103 this[offset + 1] = value >>> 16; 19104 this[offset + 2] = value >>> 8; 19105 this[offset + 3] = value & 0xff; 19106 return offset + 4; 19107}; 19108$d756b869280043fa$var$Buffer.prototype.writeBigInt64LE = $d756b869280043fa$var$defineBigIntMethod(function writeBigInt64LE(value, offset = 0) { 19109 return $d756b869280043fa$var$wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); 19110}); 19111$d756b869280043fa$var$Buffer.prototype.writeBigInt64BE = $d756b869280043fa$var$defineBigIntMethod(function writeBigInt64BE(value, offset = 0) { 19112 return $d756b869280043fa$var$wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); 19113}); 19114function $d756b869280043fa$var$checkIEEE754(buf, value, offset, ext, max, min) { 19115 if (offset + ext > buf.length) throw new RangeError('Index out of range'); 19116 if (offset < 0) throw new RangeError('Index out of range'); 19117} 19118function $d756b869280043fa$var$writeFloat(buf, value, offset, littleEndian, noAssert) { 19119 value = +value; 19120 offset = offset >>> 0; 19121 if (!noAssert) $d756b869280043fa$var$checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -340282346638528860000000000000000000000); 19122 $87795d83e4c60727$export$68d8715fc104d294(buf, value, offset, littleEndian, 23, 4); 19123 return offset + 4; 19124} 19125$d756b869280043fa$var$Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { 19126 return $d756b869280043fa$var$writeFloat(this, value, offset, true, noAssert); 19127}; 19128$d756b869280043fa$var$Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { 19129 return $d756b869280043fa$var$writeFloat(this, value, offset, false, noAssert); 19130}; 19131function $d756b869280043fa$var$writeDouble(buf, value, offset, littleEndian, noAssert) { 19132 value = +value; 19133 offset = offset >>> 0; 19134 if (!noAssert) $d756b869280043fa$var$checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000); 19135 $87795d83e4c60727$export$68d8715fc104d294(buf, value, offset, littleEndian, 52, 8); 19136 return offset + 8; 19137} 19138$d756b869280043fa$var$Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { 19139 return $d756b869280043fa$var$writeDouble(this, value, offset, true, noAssert); 19140}; 19141$d756b869280043fa$var$Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { 19142 return $d756b869280043fa$var$writeDouble(this, value, offset, false, noAssert); 19143}; 19144// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) 19145$d756b869280043fa$var$Buffer.prototype.copy = function copy(target, targetStart, start, end) { 19146 if (!$d756b869280043fa$var$Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer'); 19147 if (!start) start = 0; 19148 if (!end && end !== 0) end = this.length;
19149 if (targetStart >= target.length) targetStart = target.length; 19150 if (!targetStart) targetStart = 0; 19151 if (end > 0 && end < start) end = start; 19152 // Copy 0 bytes; we're done 19153 if (end === start) return 0; 19154 if (target.length === 0 || this.length === 0) return 0; 19155 // Fatal error conditions 19156 if (targetStart < 0) throw new RangeError('targetStart out of bounds'); 19157 if (start < 0 || start >= this.length) throw new RangeError('Index out of range'); 19158 if (end < 0) throw new RangeError('sourceEnd out of bounds'); 19159 // Are we oob? 19160 if (end > this.length) end = this.length; 19161 if (target.length - targetStart < end - start) end = target.length - targetStart + start; 19162 const len = end - start; 19163 if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') // Use built-in when available, missing from IE11 19164 this.copyWithin(targetStart, start, end); 19165 else Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart); 19166 return len; 19167}; 19168// Usage: 19169// buffer.fill(number[, offset[, end]]) 19170// buffer.fill(buffer[, offset[, end]]) 19171// buffer.fill(string[, offset[, end]][, encoding]) 19172$d756b869280043fa$var$Buffer.prototype.fill = function fill(val, start, end, encoding) { 19173 // Handle string cases: 19174 if (typeof val === 'string') { 19175 if (typeof start === 'string') { 19176 encoding = start; 19177 start = 0; 19178 end = this.length; 19179 } else if (typeof end === 'string') { 19180 encoding = end; 19181 end = this.length; 19182 } 19183 if (encoding !== undefined && typeof encoding !== 'string') throw new TypeError('encoding must be a string'); 19184 if (typeof encoding === 'string' && !$d756b869280043fa$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding); 19185 if (val.length === 1) { 19186 const code = val.charCodeAt(0); 19187 if (encoding === 'utf8' && code < 128 || encoding === 'latin1') // Fast path: If `val` fits into a single byte, use that numeric value. 19188 val = code; 19189 } 19190 } else if (typeof val === 'number') val = val & 255; 19191 else if (typeof val === 'boolean') val = Number(val); 19192 // Invalid ranges are not set to a default, so can range check early. 19193 if (start < 0 || this.length < start || this.length < end) throw new RangeError('Out of range index'); 19194 if (end <= start) return this; 19195 start = start >>> 0; 19196 end = end === undefined ? this.length : end >>> 0; 19197 if (!val) val = 0; 19198 let i; 19199 if (typeof val === 'number') for(i = start; i < end; ++i)this[i] = val; 19200 else { 19201 const bytes = $d756b869280043fa$var$Buffer.isBuffer(val) ? val : $d756b869280043fa$var$Buffer.from(val, encoding); 19202 const len = bytes.length; 19203 if (len === 0) throw new TypeError('The value "' + val + '" is invalid for argument "value"'); 19204 for(i = 0; i < end - start; ++i)this[i + start] = bytes[i % len]; 19205 } 19206 return this; 19207}; 19208// CUSTOM ERRORS 19209// ============= 19210// Simplified versions from Node, changed for Buffer-only usage 19211const $d756b869280043fa$var$errors = {}; 19212function $d756b869280043fa$var$E(sym, getMessage, Base) { 19213 $d756b869280043fa$var$errors[sym] = class NodeError extends Base { 19214 get code() { 19215 return sym; 19216 } 19217 set code(value) { 19218 Object.defineProperty(this, 'code', { 19219 configurable: true, 19220 enumerable: true, 19221 value: value, 19222 writable: true 19223 }); 19224 } 19225 toString() { 19226 return `${this.name} [${sym}]: ${this.message}`; 19227 } 19228 constructor(){ 19229 super(); 19230 Object.defineProperty(this, 'message', { 19231 value: getMessage.apply(this, arguments), 19232 writable: true, 19233 configurable: true 19234 }); 19235 // Add the error code to the name to include it in the stack trace. 19236 this.name = `${this.name} [${sym}]`; 19237 // Access the stack to generate the error message including the error code 19238 // from the name. 19239 this.stack // eslint-disable-line no-unused-expressions 19240 ; 19241 // Reset the name to the actual name. 19242 delete this.name; 19243 } 19244 }; 19245} 19246$d756b869280043fa$var$E('ERR_BUFFER_OUT_OF_BOUNDS', function(name) { 19247 if (name) return `${name} is outside of buffer bounds`; 19248 return 'Attempt to access memory outside buffer bounds'; 19249}, RangeError); 19250$d756b869280043fa$var$E('ERR_INVALID_ARG_TYPE', function(name, actual) { 19251 return `The "${name}" argument must be of type number. Received type ${typeof actual}`; 19252}, TypeError); 19253$d756b869280043fa$var$E('ERR_OUT_OF_RANGE', function(str, range, input) { 19254 let msg = `The value of "${str}" is out of range.`; 19255 let received = input; 19256 if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) received = $d756b869280043fa$var$addNumericalSeparator(String(input)); 19257 else if (typeof input === 'bigint') { 19258 received = String(input); 19259 if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) received = $d756b869280043fa$var$addNumericalSeparator(received); 19260 received += 'n'; 19261 } 19262 msg += ` It must be ${range}. Received ${received}`; 19263 return msg; 19264}, RangeError); 19265function $d756b869280043fa$var$addNumericalSeparator(val) { 19266 let res = ''; 19267 let i = val.length; 19268 const start = val[0] === '-' ? 1 : 0; 19269 for(; i >= start + 4; i -= 3)res = `_${val.slice(i - 3, i)}${res}`; 19270 return `${val.slice(0, i)}${res}`; 19271} 19272// CHECK FUNCTIONS 19273// =============== 19274function $d756b869280043fa$var$checkBounds(buf, offset, byteLength) { 19275 $d756b869280043fa$var$validateNumber(offset, 'offset'); 19276 if (buf[offset] === undefined || buf[offset + byteLength] === undefined) $d756b869280043fa$var$boundsError(offset, buf.length - (byteLength + 1)); 19277} 19278function $d756b869280043fa$var$checkIntBI(value, min, max, buf, offset, byteLength) { 19279 if (value > max || value < min) { 19280 const n = typeof min === 'bigint' ? 'n' : ''; 19281 let range; 19282 if (byteLength > 3) { 19283 if (min === 0 || min === BigInt(0)) range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`; 19284 else range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + `${(byteLength + 1) * 8 - 1}${n}`; 19285 } else range = `>= ${min}${n} and <= ${max}${n}`; 19286 throw new $d756b869280043fa$var$errors.ERR_OUT_OF_RANGE('value', range, value); 19287 } 19288 $d756b869280043fa$var$checkBounds(buf, offset, byteLength); 19289} 19290function $d756b869280043fa$var$validateNumber(value, name) { 19291 if (typeof value !== 'number') throw new $d756b869280043fa$var$errors.ERR_INVALID_ARG_TYPE(name, 'number', value); 19292} 19293function $d756b869280043fa$var$boundsError(value, length, type) { 19294 if (Math.floor(value) !== value) { 19295 $d756b869280043fa$var$validateNumber(value, type); 19296 throw new $d756b869280043fa$var$errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value); 19297 } 19298 if (length < 0) throw new $d756b869280043fa$var$errors.ERR_BUFFER_OUT_OF_BOUNDS(); 19299 throw new $d756b869280043fa$var$errors.ERR_OUT_OF_RANGE(type || 'offset', `>= ${type ? 1 : 0} and <= ${length}`, value); 19300} 19301// HELPER FUNCTIONS 19302// ================
vendor: 3,206 bytes, lines 19303-19377
19303const $d756b869280043fa$var$INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; 19304function $d756b869280043fa$var$base64clean(str) { 19305 // Node takes equal signs as end of the Base64 encoding 19306 str = str.split('=')[0]; 19307 // Node strips out invalid characters like \n and \t from the string, base64-js does not 19308 str = str.trim().replace($d756b869280043fa$var$INVALID_BASE64_RE, ''); 19309 // Node converts strings with length < 2 to '' 19310 if (str.length < 2) return ''; 19311 // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not 19312 while(str.length % 4 !== 0)str = str + '='; 19313 return str; 19314} 19315function $d756b869280043fa$var$utf8ToBytes(string, units) { 19316 units = units || Infinity; 19317 let codePoint; 19318 const length = string.length; 19319 let leadSurrogate = null; 19320 const bytes = []; 19321 for(let i = 0; i < length; ++i){ 19322 codePoint = string.charCodeAt(i); 19323 // is surrogate component 19324 if (codePoint > 0xD7FF && codePoint < 0xE000) { 19325 // last char was a lead 19326 if (!leadSurrogate) { 19327 // no lead yet 19328 if (codePoint > 0xDBFF) { 19329 // unexpected trail 19330 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); 19331 continue; 19332 } else if (i + 1 === length) { 19333 // unpaired lead 19334 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); 19335 continue; 19336 } 19337 // valid lead 19338 leadSurrogate = codePoint; 19339 continue; 19340 } 19341 // 2 leads in a row 19342 if (codePoint < 0xDC00) { 19343 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); 19344 leadSurrogate = codePoint; 19345 continue; 19346 } 19347 // valid surrogate pair 19348 codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; 19349 } else if (leadSurrogate) // valid bmp char, but last char was a lead 19350 { 19351 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); 19352 } 19353 leadSurrogate = null; 19354 // encode utf8 19355 if (codePoint < 0x80) { 19356 if ((units -= 1) < 0) break; 19357 bytes.push(codePoint); 19358 } else if (codePoint < 0x800) { 19359 if ((units -= 2) < 0) break; 19360 bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); 19361 } else if (codePoint < 0x10000) { 19362 if ((units -= 3) < 0) break; 19363 bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); 19364 } else if (codePoint < 0x110000) { 19365 if ((units -= 4) < 0) break; 19366 bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); 19367 } else throw new Error('Invalid code point'); 19368 } 19369 return bytes; 19370} 19371function $d756b869280043fa$var$asciiToBytes(str) { 19372 const byteArray = []; 19373 for(let i = 0; i < str.length; ++i)// Node's code seems to be doing this and not & 0x7F.. 19374 byteArray.push(str.charCodeAt(i) & 0xFF); 19375 return byteArray; 19376} 19377function $d756b869280043fa$var$utf16leToBytes(str, units) {
19378 let c, hi, lo; 19379 const byteArray = []; 19380 for(let i = 0; i < str.length; ++i){ 19381 if ((units -= 2) < 0) break; 19382 c = str.charCodeAt(i); 19383 hi = c >> 8; 19384 lo = c % 256; 19385 byteArray.push(lo); 19386 byteArray.push(hi); 19387 } 19388 return byteArray; 19389} 19390function $d756b869280043fa$var$base64ToBytes(str) { 19391 return $8bf602c809f4a385$export$d622b2ad8d90c771($d756b869280043fa$var$base64clean(str)); 19392} 19393function $d756b869280043fa$var$blitBuffer(src, dst, offset, length) { 19394 let i; 19395 for(i = 0; i < length; ++i){ 19396 if (i + offset >= dst.length || i >= src.length) break; 19397 dst[i + offset] = src[i]; 19398 } 19399 return i; 19400} 19401// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass 19402// the `instanceof` check but they should be treated as of that type. 19403// See: https://github.com/feross/buffer/issues/166 19404function $d756b869280043fa$var$isInstance(obj, type) { 19405 return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; 19406} 19407function $d756b869280043fa$var$numberIsNaN(obj) { 19408 // For IE11 support 19409 return obj !== obj // eslint-disable-line no-self-compare 19410 ; 19411} 19412// Create lookup table for `toString('hex')` 19413// See: https://github.com/feross/buffer/issues/219 19414const $d756b869280043fa$var$hexSliceLookupTable = function() { 19415 const alphabet = '0123456789abcdef'; 19416 const table = new Array(256); 19417 for(let i = 0; i < 16; ++i){ 19418 const i16 = i * 16; 19419 for(let j = 0; j < 16; ++j)table[i16 + j] = alphabet[i] + alphabet[j]; 19420 } 19421 return table; 19422}(); 19423// Return not function with Error if BigInt not supported 19424function $d756b869280043fa$var$defineBigIntMethod(fn) { 19425 return typeof BigInt === 'undefined' ? $d756b869280043fa$var$BufferBigIntNotDefined : fn; 19426} 19427function $d756b869280043fa$var$BufferBigIntNotDefined() { 19428 throw new Error('BigInt not supported'); 19429} 19430 19431 19432var $a44aab89caa44953$require$Buffer = $d756b869280043fa$export$a143d493d941bafc; 19433var $a44aab89caa44953$var$win; 19434if (typeof window === 'undefined') { 19435 var $a44aab89caa44953$var$loc = { 19436 hostname: '' 19437 }; 19438 $a44aab89caa44953$var$win = { 19439 crypto: { 19440 randomUUID: function() { 19441 throw Error('unsupported'); 19442 } 19443 }, 19444 navigator: { 19445 userAgent: '', 19446 onLine: true 19447 }, 19448 document: { 19449 createElement: function() { 19450 return {}; 19451 }, 19452 location: $a44aab89caa44953$var$loc, 19453 referrer: '' 19454 }, 19455 screen: { 19456 width: 0, 19457 height: 0 19458 }, 19459 location: $a44aab89caa44953$var$loc, 19460 addEventListener: function() {}, 19461 removeEventListener: function() {} 19462 }; 19463} else $a44aab89caa44953$var$win = window; 19464function $a44aab89caa44953$var$_array_like_to_array(arr, len) { 19465 if (len == null || len > arr.length) len = arr.length; 19466 for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; 19467 return arr2; 19468} 19469function $a44aab89caa44953$var$asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { 19470 try { 19471 var info = gen[key](arg); 19472 var value = info.value; 19473 } catch (error) { 19474 reject(error); 19475 return; 19476 } 19477 if (info.done) resolve(value); 19478 else Promise.resolve(value).then(_next, _throw); 19479} 19480function $a44aab89caa44953$var$_async_to_generator(fn) { 19481 return function() { 19482 var self = this, args = arguments; 19483 return new Promise(function(resolve, reject) { 19484 var gen = fn.apply(self, args); 19485 function _next(value) { 19486 $a44aab89caa44953$var$asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); 19487 } 19488 function _throw(err) { 19489 $a44aab89caa44953$var$asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); 19490 } 19491 _next(undefined); 19492 }); 19493 }; 19494} 19495function $a44aab89caa44953$var$_construct(Parent, args, Class) { 19496 if ($a44aab89caa44953$var$_is_native_reflect_construct()) $a44aab89caa44953$var$_construct = Reflect.construct; 19497 else $a44aab89caa44953$var$_construct = function construct(Parent, args, Class) { 19498 var a = [ 19499 null 19500 ]; 19501 a.push.apply(a, args); 19502 var Constructor = Function.bind.apply(Parent, a); 19503 var instance = new Constructor(); 19504 if (Class) $a44aab89caa44953$var$_set_prototype_of(instance, Class.prototype); 19505 return instance; 19506 }; 19507 return $a44aab89caa44953$var$_construct.apply(null, arguments); 19508} 19509function $a44aab89caa44953$var$_defineProperties(target, props) { 19510 for(var i = 0; i < props.length; i++){ 19511 var descriptor = props[i]; 19512 descriptor.enumerable = descriptor.enumerable || false; 19513 descriptor.configurable = true; 19514 if ("value" in descriptor) descriptor.writable = true; 19515 Object.defineProperty(target, descriptor.key, descriptor); 19516 } 19517} 19518function $a44aab89caa44953$var$_create_class(Constructor, protoProps, staticProps) { 19519 if (protoProps) $a44aab89caa44953$var$_defineProperties(Constructor.prototype, protoProps); 19520 return Constructor; 19521} 19522function $a44aab89caa44953$var$_extends() { 19523 $a44aab89caa44953$var$_extends = Object.assign || function(target) { 19524 for(var i = 1; i < arguments.length; i++){ 19525 var source = arguments[i]; 19526 for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; 19527 } 19528 return target; 19529 }; 19530 return $a44aab89caa44953$var$_extends.apply(this, arguments); 19531} 19532function $a44aab89caa44953$var$_get_prototype_of(o) { 19533 $a44aab89caa44953$var$_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o
vendor: 17,570 bytes, lines 19533-19957
19533) { 19534 return o.__proto__ || Object.getPrototypeOf(o); 19535 }; 19536 return $a44aab89caa44953$var$_get_prototype_of(o); 19537} 19538function $a44aab89caa44953$var$_inherits(subClass, superClass) { 19539 if (typeof superClass !== "function" && superClass !== null) throw new TypeError("Super expression must either be null or a function"); 19540 subClass.prototype = Object.create(superClass && superClass.prototype, { 19541 constructor: { 19542 value: subClass, 19543 writable: true, 19544 configurable: true 19545 } 19546 }); 19547 if (superClass) $a44aab89caa44953$var$_set_prototype_of(subClass, superClass); 19548} 19549function $a44aab89caa44953$var$_instanceof(left, right) { 19550 if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left); 19551 else return left instanceof right; 19552} 19553function $a44aab89caa44953$var$_is_native_function(fn) { 19554 return Function.toString.call(fn).indexOf("[native code]") !== -1; 19555} 19556function $a44aab89caa44953$var$_object_without_properties_loose(source, excluded) { 19557 if (source == null) return {}; 19558 var target = {}; 19559 var sourceKeys = Object.keys(source); 19560 var key, i; 19561 for(i = 0; i < sourceKeys.length; i++){ 19562 key = sourceKeys[i]; 19563 if (excluded.indexOf(key) >= 0) continue; 19564 target[key] = source[key]; 19565 } 19566 return target; 19567} 19568function $a44aab89caa44953$var$_set_prototype_of(o, p) { 19569 $a44aab89caa44953$var$_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) { 19570 o.__proto__ = p; 19571 return o; 19572 }; 19573 return $a44aab89caa44953$var$_set_prototype_of(o, p); 19574} 19575function $a44aab89caa44953$var$_type_of(obj) { 19576 "@swc/helpers - typeof"; 19577 return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; 19578} 19579function $a44aab89caa44953$var$_unsupported_iterable_to_array(o, minLen) { 19580 if (!o) return; 19581 if (typeof o === "string") return $a44aab89caa44953$var$_array_like_to_array(o, minLen); 19582 var n = Object.prototype.toString.call(o).slice(8, -1); 19583 if (n === "Object" && o.constructor) n = o.constructor.name; 19584 if (n === "Map" || n === "Set") return Array.from(n); 19585 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return $a44aab89caa44953$var$_array_like_to_array(o, minLen); 19586} 19587function $a44aab89caa44953$var$_wrap_native_super(Class) { 19588 var _cache = typeof Map === "function" ? new Map() : undefined; 19589 $a44aab89caa44953$var$_wrap_native_super = function wrapNativeSuper(Class) { 19590 if (Class === null || !$a44aab89caa44953$var$_is_native_function(Class)) return Class; 19591 if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function"); 19592 if (typeof _cache !== "undefined") { 19593 if (_cache.has(Class)) return _cache.get(Class); 19594 _cache.set(Class, Wrapper); 19595 } 19596 function Wrapper() { 19597 return $a44aab89caa44953$var$_construct(Class, arguments, $a44aab89caa44953$var$_get_prototype_of(this).constructor); 19598 } 19599 Wrapper.prototype = Object.create(Class.prototype, { 19600 constructor: { 19601 value: Wrapper, 19602 enumerable: false, 19603 writable: true, 19604 configurable: true 19605 } 19606 }); 19607 return $a44aab89caa44953$var$_set_prototype_of(Wrapper, Class); 19608 }; 19609 return $a44aab89caa44953$var$_wrap_native_super(Class); 19610} 19611function $a44aab89caa44953$var$_is_native_reflect_construct() { 19612 try { 19613 var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); 19614 } catch (_) {} 19615 return ($a44aab89caa44953$var$_is_native_reflect_construct = function() { 19616 return !!result; 19617 })(); 19618} 19619function $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(o, allowArrayLike) { 19620 var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; 19621 if (it) return (it = it.call(o)).next.bind(it); 19622 if (Array.isArray(o) || (it = $a44aab89caa44953$var$_unsupported_iterable_to_array(o)) || allowArrayLike) { 19623 if (it) o = it; 19624 var i = 0; 19625 return function() { 19626 if (i >= o.length) return { 19627 done: true 19628 }; 19629 return { 19630 done: false, 19631 value: o[i++] 19632 }; 19633 }; 19634 } 19635 throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 19636} 19637function $a44aab89caa44953$var$_ts_generator(thisArg, body) { 19638 var f, y, t, g, _ = { 19639 label: 0, 19640 sent: function() { 19641 if (t[0] & 1) throw t[1]; 19642 return t[1]; 19643 }, 19644 trys: [], 19645 ops: [] 19646 }; 19647 return g = { 19648 next: verb(0), 19649 "throw": verb(1), 19650 "return": verb(2) 19651 }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { 19652 return this; 19653 }), g; 19654 function verb(n) { 19655 return function(v) { 19656 return step([ 19657 n, 19658 v 19659 ]); 19660 }; 19661 } 19662 function step(op) { 19663 if (f) throw new TypeError("Generator is already executing."); 19664 while(_)try { 19665 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 19666 if (y = 0, t) op = [ 19667 op[0] & 2, 19668 t.value 19669 ]; 19670 switch(op[0]){ 19671 case 0: 19672 case 1: 19673 t = op; 19674 break; 19675 case 4: 19676 _.label++; 19677 return { 19678 value: op[1], 19679 done: false 19680 }; 19681 case 5: 19682 _.label++; 19683 y = op[1]; 19684 op = [ 19685 0 19686 ]; 19687 continue; 19688 case 7: 19689 op = _.ops.pop(); 19690 _.trys.pop(); 19691 continue; 19692 default: 19693 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { 19694 _ = 0; 19695 continue; 19696 } 19697 if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { 19698 _.label = op[1]; 19699 break; 19700 } 19701 if (op[0] === 6 && _.label < t[1]) { 19702 _.label = t[1]; 19703 t = op; 19704 break; 19705 } 19706 if (t && _.label < t[2]) { 19707 _.label = t[2]; 19708 _.ops.push(op); 19709 break; 19710 } 19711 if (t[2]) _.ops.pop(); 19712 _.trys.pop(); 19713 continue; 19714 } 19715 op = body.call(thisArg, _); 19716 } catch (e) { 19717 op = [ 19718 6, 19719 e 19720 ]; 19721 y = 0; 19722 } finally{ 19723 f = t = 0; 19724 } 19725 if (op[0] & 5) throw op[1]; 19726 return { 19727 value: op[0] ? op[1] : void 0, 19728 done: true 19729 }; 19730 } 19731} 19732function $a44aab89caa44953$var$_ts_values(o) { 19733 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; 19734 if (m) return m.call(o); 19735 if (o && typeof o.length === "number") return { 19736 next: function() { 19737 if (o && i >= o.length) o = void 0; 19738 return { 19739 value: o && o[i++], 19740 done: !o 19741 }; 19742 } 19743 }; 19744 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); 19745} 19746var $a44aab89caa44953$var$__defProp = Object.defineProperty; 19747var $a44aab89caa44953$var$__defNormalProp = function(obj, key, value) { 19748 return key in obj ? $a44aab89caa44953$var$__defProp(obj, key, { 19749 enumerable: true, 19750 configurable: true, 19751 writable: true, 19752 value: value 19753 }) : obj[key] = value; 19754}; 19755var $a44aab89caa44953$var$__publicField = function(obj, key, value) { 19756 return $a44aab89caa44953$var$__defNormalProp(obj, (typeof key === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(key)) !== "symbol" ? key + "" : key, value); 19757}; 19758var $a44aab89caa44953$var$_a; 19759var $a44aab89caa44953$var$__defProp$1 = Object.defineProperty; 19760var $a44aab89caa44953$var$__defNormalProp$1 = function(obj, key, value) { 19761 return key in obj ? $a44aab89caa44953$var$__defProp$1(obj, key, { 19762 enumerable: true, 19763 configurable: true, 19764 writable: true, 19765 value: value 19766 }) : obj[key] = value; 19767}; 19768var $a44aab89caa44953$var$__publicField$1 = function(obj, key, value) { 19769 return $a44aab89caa44953$var$__defNormalProp$1(obj, (typeof key === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(key)) !== "symbol" ? key + "" : key, value); 19770}; 19771var $a44aab89caa44953$var$NodeType$3 = /* @__PURE__ */ function(NodeType2) { 19772 NodeType2[NodeType2["Document"] = 0] = "Document"; 19773 NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType"; 19774 NodeType2[NodeType2["Element"] = 2] = "Element"; 19775 NodeType2[NodeType2["Text"] = 3] = "Text"; 19776 NodeType2[NodeType2["CDATA"] = 4] = "CDATA"; 19777 NodeType2[NodeType2["Comment"] = 5] = "Comment"; 19778 return NodeType2; 19779}($a44aab89caa44953$var$NodeType$3 || {}); 19780var $a44aab89caa44953$var$testableAccessors$1 = { 19781 Node: [ 19782 "childNodes", 19783 "parentNode", 19784 "parentElement", 19785 "textContent" 19786 ], 19787 ShadowRoot: [ 19788 "host", 19789 "styleSheets" 19790 ], 19791 Element: [ 19792 "shadowRoot", 19793 "querySelector", 19794 "querySelectorAll" 19795 ], 19796 MutationObserver: [] 19797}; 19798var $a44aab89caa44953$var$testableMethods$1 = { 19799 Node: [ 19800 "contains", 19801 "getRootNode" 19802 ], 19803 ShadowRoot: [ 19804 "getSelection" 19805 ], 19806 Element: [], 19807 MutationObserver: [ 19808 "constructor" 19809 ] 19810}; 19811var $a44aab89caa44953$var$untaintedBasePrototype$1 = {}; 19812var $a44aab89caa44953$var$isAngularZonePresent$1 = function() { 19813 return !!globalThis.Zone; 19814}; 19815function $a44aab89caa44953$var$getUntaintedPrototype$1(key) { 19816 if ($a44aab89caa44953$var$untaintedBasePrototype$1[key]) return $a44aab89caa44953$var$untaintedBasePrototype$1[key]; 19817 var defaultObj = globalThis[key]; 19818 var defaultPrototype = defaultObj.prototype; 19819 var accessorNames = key in $a44aab89caa44953$var$testableAccessors$1 ? $a44aab89caa44953$var$testableAccessors$1[key] : void 0; 19820 var isUntaintedAccessors = Boolean(accessorNames && // @ts-expect-error 2345 19821 accessorNames.every(function(accessor) { 19822 var _a2, _b; 19823 return Boolean((_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")); 19824 })); 19825 var methodNames = key in $a44aab89caa44953$var$testableMethods$1 ? $a44aab89caa44953$var$testableMethods$1[key] : void 0; 19826 var isUntaintedMethods = Boolean(methodNames && methodNames.every(function(method) { 19827 var _a2; 19828 return typeof defaultPrototype[method] === "function" && ((_a2 = defaultPrototype[method]) == null ? void 0 : _a2.toString().includes("[native code]")); 19829 })); 19830 if (isUntaintedAccessors && isUntaintedMethods && !$a44aab89caa44953$var$isAngularZonePresent$1()) { 19831 $a44aab89caa44953$var$untaintedBasePrototype$1[key] = defaultObj.prototype; 19832 return defaultObj.prototype; 19833 } 19834 try { 19835 var iframeEl = document.createElement("iframe"); 19836 document.body.appendChild(iframeEl); 19837 var win = iframeEl.contentWindow; 19838 if (!win) return defaultObj.prototype; 19839 var untaintedObject = win[key].prototype; 19840 document.body.removeChild(iframeEl); 19841 if (!untaintedObject) return defaultPrototype; 19842 return $a44aab89caa44953$var$untaintedBasePrototype$1[key] = untaintedObject; 19843 } catch (e) { 19844 return defaultPrototype; 19845 } 19846} 19847var $a44aab89caa44953$var$untaintedAccessorCache$1 = {}; 19848function $a44aab89caa44953$var$getUntaintedAccessor$1(key, instance, accessor) { 19849 var _a2; 19850 var cacheKey = key + "." + String(accessor); 19851 if ($a44aab89caa44953$var$untaintedAccessorCache$1[cacheKey]) return $a44aab89caa44953$var$untaintedAccessorCache$1[cacheKey].call(instance); 19852 var untaintedPrototype = $a44aab89caa44953$var$getUntaintedPrototype$1(key); 19853 var untaintedAccessor = (_a2 = Object.getOwnPropertyDescriptor(untaintedPrototype, accessor)) == null ? void 0 : _a2.get; 19854 if (!untaintedAccessor) return instance[accessor]; 19855 $a44aab89caa44953$var$untaintedAccessorCache$1[cacheKey] = untaintedAccessor; 19856 return untaintedAccessor.call(instance); 19857} 19858var $a44aab89caa44953$var$untaintedMethodCache$1 = {}; 19859function $a44aab89caa44953$var$getUntaintedMethod$1(key, instance, method) { 19860 var cacheKey = key + "." + String(method); 19861 if ($a44aab89caa44953$var$untaintedMethodCache$1[cacheKey]) return $a44aab89caa44953$var$untaintedMethodCache$1[cacheKey].bind(instance); 19862 var untaintedPrototype = $a44aab89caa44953$var$getUntaintedPrototype$1(key); 19863 var untaintedMethod = untaintedPrototype[method]; 19864 if (typeof untaintedMethod !== "function") return instance[method]; 19865 $a44aab89caa44953$var$untaintedMethodCache$1[cacheKey] = untaintedMethod; 19866 return untaintedMethod.bind(instance); 19867} 19868function $a44aab89caa44953$var$childNodes$1(n2) { 19869 return $a44aab89caa44953$var$getUntaintedAccessor$1("Node", n2, "childNodes"); 19870} 19871function $a44aab89caa44953$var$parentNode$1(n2) { 19872 return $a44aab89caa44953$var$getUntaintedAccessor$1("Node", n2, "parentNode"); 19873} 19874function $a44aab89caa44953$var$parentElement$1(n2) { 19875 return $a44aab89caa44953$var$getUntaintedAccessor$1("Node", n2, "parentElement"); 19876} 19877function $a44aab89caa44953$var$textContent$1(n2) { 19878 return $a44aab89caa44953$var$getUntaintedAccessor$1("Node", n2, "textContent"); 19879} 19880function $a44aab89caa44953$var$contains$1(n2, other) { 19881 return $a44aab89caa44953$var$getUntaintedMethod$1("Node", n2, "contains")(other); 19882} 19883function $a44aab89caa44953$var$getRootNode$1(n2) { 19884 return $a44aab89caa44953$var$getUntaintedMethod$1("Node", n2, "getRootNode")(); 19885} 19886function $a44aab89caa44953$var$host$1(n2) { 19887 if (!n2 || !("host" in n2)) return null; 19888 return $a44aab89caa44953$var$getUntaintedAccessor$1("ShadowRoot", n2, "host"); 19889} 19890function $a44aab89caa44953$var$styleSheets$1(n2) { 19891 return n2.styleSheets; 19892} 19893function $a44aab89caa44953$var$shadowRoot$1(n2) { 19894 if (!n2 || !("shadowRoot" in n2)) return null; 19895 return $a44aab89caa44953$var$getUntaintedAccessor$1("Element", n2, "shadowRoot"); 19896} 19897function $a44aab89caa44953$var$querySelector$1(n2, selectors) { 19898 return $a44aab89caa44953$var$getUntaintedAccessor$1("Element", n2, "querySelector")(selectors); 19899} 19900function $a44aab89caa44953$var$querySelectorAll$1(n2, selectors) { 19901 return $a44aab89caa44953$var$getUntaintedAccessor$1("Element", n2, "querySelectorAll")(selectors); 19902} 19903function $a44aab89caa44953$var$mutationObserverCtor$1() { 19904 return $a44aab89caa44953$var$getUntaintedPrototype$1("MutationObserver").constructor; 19905} 19906function $a44aab89caa44953$var$patch$1(source, name, replacement) { 19907 try { 19908 if (!(name in source)) return function() {}; 19909 var original = source[name]; 19910 var wrapped = replacement(original); 19911 if (typeof wrapped === "function") { 19912 wrapped.prototype = wrapped.prototype || {}; 19913 Object.defineProperties(wrapped, { 19914 __rrweb_original__: { 19915 enumerable: false, 19916 value: original 19917 } 19918 }); 19919 } 19920 source[name] = wrapped; 19921 return function() { 19922 source[name] = original; 19923 }; 19924 } catch (e) { 19925 return function() {}; 19926 } 19927} 19928var $a44aab89caa44953$var$index$1 = { 19929 childNodes: $a44aab89caa44953$var$childNodes$1, 19930 parentNode: $a44aab89caa44953$var$parentNode$1, 19931 parentElement: $a44aab89caa44953$var$parentElement$1, 19932 textContent: $a44aab89caa44953$var$textContent$1, 19933 contains: $a44aab89caa44953$var$contains$1, 19934 getRootNode: $a44aab89caa44953$var$getRootNode$1, 19935 host: $a44aab89caa44953$var$host$1, 19936 styleSheets: $a44aab89caa44953$var$styleSheets$1, 19937 shadowRoot: $a44aab89caa44953$var$shadowRoot$1, 19938 querySelector: $a44aab89caa44953$var$querySelector$1, 19939 querySelectorAll: $a44aab89caa44953$var$querySelectorAll$1, 19940 mutationObserver: $a44aab89caa44953$var$mutationObserverCtor$1, 19941 patch: $a44aab89caa44953$var$patch$1 19942}; 19943function $a44aab89caa44953$var$isElement(n2) { 19944 return n2.nodeType === n2.ELEMENT_NODE; 19945} 19946function $a44aab89caa44953$var$isShadowRoot(n2) { 19947 var hostEl = // but only shadow roots have a `mode` property 19948 n2 && "host" in n2 && "mode" in n2 && $a44aab89caa44953$var$index$1.host(n2) || null; 19949 return Boolean(hostEl && "shadowRoot" in hostEl && $a44aab89caa44953$var$index$1.shadowRoot(hostEl) === n2); 19950} 19951function $a44aab89caa44953$var$isNativeShadowDom(shadowRoot2) { 19952 return Object.prototype.toString.call(shadowRoot2) === "[object ShadowRoot]"; 19953} 19954function $a44aab89caa44953$var$fixBrowserCompatibilityIssuesInCSS(cssText) { 19955 if (cssText.includes(" background-clip: text;") && !cssText.includes(" -webkit-background-clip: text;")) cssText = cssText.replace(/\sbackground-clip:\s*text;/g, " -webkit-background-clip: text; background-clip: text;"); 19956 return cssText; 19957}
19958function $a44aab89caa44953$var$escapeImportStatement(rule2) { 19959 var cssText = rule2.cssText; 19960 if (cssText.split('"').length < 3) return cssText; 19961 var statement = [ 19962 "@import", 19963 "url(" + JSON.stringify(rule2.href) + ")" 19964 ]; 19965 if (rule2.layerName === "") statement.push("layer"); 19966 else if (rule2.layerName) statement.push("layer(" + rule2.layerName + ")"); 19967 if (rule2.supportsText) statement.push("supports(" + rule2.supportsText + ")"); 19968 if (rule2.media.length) statement.push(rule2.media.mediaText); 19969 return statement.join(" ") + ";"; 19970} 19971function $a44aab89caa44953$var$stringifyStylesheet(s2) { 19972 try { 19973 var rules2 = s2.rules || s2.cssRules; 19974 if (!rules2) return null; 19975 var sheetHref = s2.href; 19976 if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) sheetHref = s2.ownerNode.ownerDocument.location.href; 19977 var stringifiedRules = Array.from(rules2, function(rule2) { 19978 return $a44aab89caa44953$var$stringifyRule(rule2, sheetHref); 19979 }).join(""); 19980 return $a44aab89caa44953$var$fixBrowserCompatibilityIssuesInCSS(stringifiedRules); 19981 } catch (error) { 19982 return null; 19983 } 19984} 19985function $a44aab89caa44953$var$stringifyRule(rule2, sheetHref) { 19986 if ($a44aab89caa44953$var$isCSSImportRule(rule2)) { 19987 var importStringified; 19988 try { 19989 importStringified = $a44aab89caa44953$var$stringifyStylesheet(rule2.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement 19990 $a44aab89caa44953$var$escapeImportStatement(rule2); 19991 } catch (error) { 19992 importStringified = rule2.cssText; 19993 } 19994 if (rule2.styleSheet.href) return $a44aab89caa44953$var$absolutifyURLs(importStringified, rule2.styleSheet.href); 19995 return importStringified; 19996 } else { 19997 var ruleStringified = rule2.cssText; 19998 if ($a44aab89caa44953$var$isCSSStyleRule(rule2) && rule2.selectorText.includes(":")) ruleStringified = $a44aab89caa44953$var$fixSafariColons(ruleStringified); 19999 if (sheetHref) return $a44aab89caa44953$var$absolutifyURLs(ruleStringified, sheetHref); 20000 return ruleStringified; 20001 } 20002} 20003function $a44aab89caa44953$var$fixSafariColons(cssStringified) { 20004 var regex = /(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm; 20005 return cssStringified.replace(regex, "$1\\$2"); 20006} 20007function $a44aab89caa44953$var$isCSSImportRule(rule2) { 20008 return "styleSheet" in rule2; 20009} 20010function $a44aab89caa44953$var$isCSSStyleRule(rule2) { 20011 return "selectorText" in rule2; 20012} 20013var $a44aab89caa44953$var$Mirror = /*#__PURE__*/ function() { 20014 function Mirror() { 20015 $a44aab89caa44953$var$__publicField$1(this, "idNodeMap", /* @__PURE__ */ new Map()); 20016 $a44aab89caa44953$var$__publicField$1(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap()); 20017 } 20018 var _proto = Mirror.prototype; 20019 _proto.getId = function getId(n2) { 20020 var _a2; 20021 if (!n2) return -1; 20022 var id = (_a2 = this.getMeta(n2)) == null ? void 0 : _a2.id; 20023 return id != null ? id : -1; 20024 }; 20025 _proto.getNode = function getNode(id) { 20026 return this.idNodeMap.get(id) || null; 20027 }; 20028 _proto.getIds = function getIds() { 20029 return Array.from(this.idNodeMap.keys()); 20030 }; 20031 _proto.getMeta = function getMeta(n2) { 20032 return this.nodeMetaMap.get(n2) || null; 20033 }; 20034 // removes the node from idNodeMap 20035 // doesn't remove the node from nodeMetaMap 20036 _proto.removeNodeFromMap = function removeNodeFromMap(n2) { 20037 var _this = this; 20038 var id = this.getId(n2); 20039 this.idNodeMap.delete(id); 20040 if (n2.childNodes) n2.childNodes.forEach(function(childNode) { 20041 return _this.removeNodeFromMap(childNode); 20042 }); 20043 }; 20044 _proto.has = function has(id) { 20045 return this.idNodeMap.has(id); 20046 }; 20047 _proto.hasNode = function hasNode(node2) { 20048 return this.nodeMetaMap.has(node2); 20049 }; 20050 _proto.add = function add(n2, meta) { 20051 var id = meta.id; 20052 this.idNodeMap.set(id, n2); 20053 this.nodeMetaMap.set(n2, meta); 20054 }; 20055 _proto.replace = function replace(id, n2) { 20056 var oldNode = this.getNode(id); 20057 if (oldNode) { 20058 var meta = this.nodeMetaMap.get(oldNode); 20059 if (meta) this.nodeMetaMap.set(n2, meta); 20060 } 20061 this.idNodeMap.set(id, n2); 20062 }; 20063 _proto.reset = function reset() { 20064 this.idNodeMap = /* @__PURE__ */ new Map(); 20065 this.nodeMetaMap = /* @__PURE__ */ new WeakMap(); 20066 }; 20067 return Mirror; 20068}(); 20069function $a44aab89caa44953$var$createMirror$2() { 20070 return new $a44aab89caa44953$var$Mirror(); 20071} 20072function $a44aab89caa44953$var$maskInputValue(param) { 20073 var element = param.element, maskInputOptions = param.maskInputOptions, tagName = param.tagName, type = param.type, value = param.value, maskInputFn = param.maskInputFn; 20074 var text = value || ""; 20075 var actualType = type && $a44aab89caa44953$var$toLowerCase(type); 20076 if (maskInputOptions[tagName.toLowerCase()] || actualType && maskInputOptions[actualType]) { 20077 if (maskInputFn) text = maskInputFn(text, element); 20078 else text = "*".repeat(text.length); 20079 } 20080 return text; 20081} 20082function $a44aab89caa44953$var$toLowerCase(str) { 20083 return str.toLowerCase(); 20084} 20085var $a44aab89caa44953$var$ORIGINAL_ATTRIBUTE_NAME = "__rrweb_original__"; 20086function $a44aab89caa44953$var$is2DCanvasBlank(canvas) { 20087 var ctx = canvas.getContext("2d"); 20088 if (!ctx) return true; 20089 var chunkSize = 50; 20090 for(var x2 = 0; x2 < canvas.width; x2 += chunkSize)for(var y = 0; y < canvas.height; y += chunkSize){ 20091 var getImageData = ctx.getImageData; 20092 var originalGetImageData = $a44aab89caa44953$var$ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[$a44aab89caa44953$var$ORIGINAL_ATTRIBUTE_NAME] : getImageData; 20093 var pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2, y, Math.min(chunkSize, canvas.width - x2), Math.min(chunkSize, canvas.height - y)).data.buffer); 20094 if (pixelBuffer.some(function(pixel) { 20095 return pixel !== 0; 20096 })) return false;
20097 } 20098 return true; 20099} 20100function $a44aab89caa44953$var$getInputType(element) { 20101 var type = element.type; 20102 return element.hasAttribute("data-rr-is-password") ? "password" : type ? $a44aab89caa44953$var$toLowerCase(type) : null; 20103} 20104function $a44aab89caa44953$var$extractFileExtension(path, baseURL) { 20105 var url; 20106 try { 20107 url = new URL(path, baseURL != null ? baseURL : window.location.href); 20108 } catch (err) { 20109 return null; 20110 } 20111 var regex = /\.([0-9a-z]+)(?:$)/i; 20112 var match = url.pathname.match(regex); 20113 var _ref; 20114 return (_ref = match == null ? void 0 : match[1]) != null ? _ref : null; 20115} 20116function $a44aab89caa44953$var$extractOrigin(url) { 20117 var origin = ""; 20118 if (url.indexOf("//") > -1) origin = url.split("/").slice(0, 3).join("/"); 20119 else origin = url.split("/")[0]; 20120 origin = origin.split("?")[0]; 20121 return origin; 20122} 20123var $a44aab89caa44953$var$URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm; 20124var $a44aab89caa44953$var$URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\/\//i; 20125var $a44aab89caa44953$var$URL_WWW_MATCH = /^www\..*/i; 20126var $a44aab89caa44953$var$DATA_URI = /^(data:)([^,]*),(.*)/i; 20127function $a44aab89caa44953$var$absolutifyURLs(cssText, href) { 20128 return (cssText || "").replace($a44aab89caa44953$var$URL_IN_CSS_REF, function(origin, quote1, path1, quote2, path2, path3) { 20129 var filePath = path1 || path2 || path3; 20130 var maybeQuote = quote1 || quote2 || ""; 20131 if (!filePath) return origin; 20132 if ($a44aab89caa44953$var$URL_PROTOCOL_MATCH.test(filePath) || $a44aab89caa44953$var$URL_WWW_MATCH.test(filePath)) return "url(" + maybeQuote + filePath + maybeQuote + ")"; 20133 if ($a44aab89caa44953$var$DATA_URI.test(filePath)) return "url(" + maybeQuote + filePath + maybeQuote + ")"; 20134 if (filePath[0] === "/") return "url(" + maybeQuote + ($a44aab89caa44953$var$extractOrigin(href) + filePath) + maybeQuote + ")"; 20135 var stack = href.split("/"); 20136 var parts = filePath.split("/"); 20137 stack.pop(); 20138 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(parts), _step; !(_step = _iterator()).done;){ 20139 var part = _step.value; 20140 if (part === ".") continue; 20141 else if (part === "..") stack.pop(); 20142 else stack.push(part); 20143 } 20144 return "url(" + maybeQuote + stack.join("/") + maybeQuote + ")"; 20145 }); 20146} 20147function $a44aab89caa44953$var$normalizeCssString(cssText, _testNoPxNorm) { 20148 if (_testNoPxNorm === void 0) _testNoPxNorm = false; 20149 if (_testNoPxNorm) return cssText.replace(/(\/\*[^*]*\*\/)|[\s;]/g, ""); 20150 else return cssText.replace(/(\/\*[^*]*\*\/)|[\s;]/g, "").replace(/0px/g, "0"); 20151} 20152function $a44aab89caa44953$var$splitCssText(cssText, style, _testNoPxNorm) { 20153 if (_testNoPxNorm === void 0) _testNoPxNorm = false; 20154 var childNodes2 = Array.from(style.childNodes); 20155 var splits = []; 20156 var iterCount = 0; 20157 if (childNodes2.length > 1 && cssText && typeof cssText === "string") { 20158 var cssTextNorm = $a44aab89caa44953$var$normalizeCssString(cssText, _testNoPxNorm); 20159 var normFactor = cssTextNorm.length / cssText.length; 20160 for(var i2 = 1; i2 < childNodes2.length; i2++)if (childNodes2[i2].textContent && typeof childNodes2[i2].textContent === "string") { 20161 var textContentNorm = $a44aab89caa44953$var$normalizeCssString(childNodes2[i2].textContent, _testNoPxNorm); 20162 var jLimit = 100; 20163 var j = 3; 20164 for(; j < textContentNorm.length; j++){ 20165 if (textContentNorm[j].match(/[a-zA-Z0-9]/) || // substring needs to be unique to this section 20166 textContentNorm.indexOf(textContentNorm.substring(0, j), 1) !== -1) continue; 20167 break; 20168 } 20169 for(; j < textContentNorm.length; j++){ 20170 var startSubstring = textContentNorm.substring(0, j); 20171 var cssNormSplits = cssTextNorm.split(startSubstring); 20172 var splitNorm = -1; 20173 if (cssNormSplits.length === 2) splitNorm = cssNormSplits[0].length; 20174 else if (cssNormSplits.length > 2 && cssNormSplits[0] === "" && childNodes2[i2 - 1].textContent !== "")
20174splitNorm = cssTextNorm.indexOf(startSubstring, 1); 20175 else if (cssNormSplits.length === 1) { 20176 startSubstring = startSubstring.substring(0, startSubstring.length - 1); 20177 cssNormSplits = cssTextNorm.split(startSubstring); 20178 if (cssNormSplits.length <= 1) { 20179 splits.push(cssText); 20180 return splits; 20181 } 20182 j = jLimit + 1; 20183 } else if (j === textContentNorm.length - 1) splitNorm = cssTextNorm.indexOf(startSubstring); 20184 if (cssNormSplits.length >= 2 && j > jLimit) { 20185 var prevTextContent = childNodes2[i2 - 1].textContent; 20186 if (prevTextContent && typeof prevTextContent === "string") { 20187 var prevMinLength = $a44aab89caa44953$var$normalizeCssString(prevTextContent).length; 20188 splitNorm = cssTextNorm.indexOf(startSubstring, prevMinLength); 20189 } 20190 if (splitNorm === -1) splitNorm = cssNormSplits[0].length; 20191 } 20192 if (splitNorm !== -1) { 20193 var k = Math.floor(splitNorm / normFactor); 20194 for(; k > 0 && k < cssText.length;){ 20195 iterCount += 1; 20196 if (iterCount > 50 * childNodes2.length) { 20197 splits.push(cssText); 20198 return splits; 20199 } 20200 var normPart = $a44aab89caa44953$var$normalizeCssString(cssText.substring(0, k), _testNoPxNorm); 20201 if (normPart.length === splitNorm) { 20202 splits.push(cssText.substring(0, k)); 20203 cssText = cssText.substring(k); 20204 cssTextNorm = cssTextNorm.substring(splitNorm); 20205 break; 20206 } else if (normPart.length < splitNorm) k += Math.max(1, Math.floor((splitNorm - normPart.length) / normFactor)); 20207 else k -= Math.max(1, Math.floor((normPart.length - splitNorm) * normFactor)); 20208 } 20209 break; 20210 } 20211 } 20212 } 20213 } 20214 splits.push(cssText); 20215 return splits; 20216} 20217function $a44aab89caa44953$var$markCssSplits(cssText, style) { 20218 return $a44aab89caa44953$var$splitCssText(cssText, style).join("/* rr_split */"); 20219} 20220var $a44aab89caa44953$var$_id = 1; 20221var $a44aab89caa44953$var$tagNameRegex = new RegExp("[^a-z0-9-_:]"); 20222var $a44aab89caa44953$var$IGNORED_NODE = -2; 20223function $a44aab89caa44953$var$genId() { 20224 return $a44aab89caa44953$var$_id++; 20225} 20226function $a44aab89caa44953$var$getValidTagName$1(element) { 20227 if ($a44aab89caa44953$var$_instanceof(element, HTMLFormElement)) return "form"; 20228 var processedTagName = $a44aab89caa44953$var$toLowerCase(element.tagName); 20229 if ($a44aab89caa44953$var$tagNameRegex.test(processedTagName)) return "div"; 20230 return processedTagName; 20231} 20232var $a44aab89caa44953$var$canvasService; 20233var $a44aab89caa44953$var$canvasCtx; 20234var $a44aab89caa44953$var$SRCSET_NOT_SPACES = /^[^ \t\n\r\u000c]+/; 20235var $a44aab89caa44953$var$SRCSET_COMMAS_OR_SPACES = /^[, \t\n\r\u000c]+/; 20236function $a44aab89caa44953$var$getAbsoluteSrcsetString(doc, attributeValue) { 20237 if (attributeValue.trim() === "") return attributeValue; 20238 var pos = 0; 20239 function collectCharacters(regEx) { 20240 var chars2; 20241 var match = regEx.exec(attributeValue.substring(pos)); 20242 if (match) { 20243 chars2 = match[0]; 20244 pos += chars2.length; 20245 return chars2; 20246 } 20247 return ""; 20248 } 20249 var output = []; 20250 while(true){ 20251 collectCharacters($a44aab89caa44953$var$SRCSET_COMMAS_OR_SPACES); 20252 if (pos >= attributeValue.length) break; 20253 var url = collectCharacters($a44aab89caa44953$var$SRCSET_NOT_SPACES); 20254 if (url.slice(-1) === ",") { 20255 url = $a44aab89caa44953$var$absoluteToDoc(doc, url.substring(0, url.length - 1)); 20256 output.push(url); 20257 } else { 20258 var descriptorsStr = ""; 20259 url = $a44aab89caa44953$var$absoluteToDoc(doc, url); 20260 var inParens = false;
20261 while(true){ 20262 var c2 = attributeValue.charAt(pos); 20263 if (c2 === "") { 20264 output.push((url + descriptorsStr).trim()); 20265 break; 20266 } else if (!inParens) { 20267 if (c2 === ",") { 20268 pos += 1; 20269 output.push((url + descriptorsStr).trim()); 20270 break; 20271 } else if (c2 === "(") inParens = true; 20272 } else if (c2 === ")") inParens = false; 20273 descriptorsStr += c2; 20274 pos += 1; 20275 } 20276 } 20277 } 20278 return output.join(", "); 20279} 20280var $a44aab89caa44953$var$cachedDocument = /* @__PURE__ */ new WeakMap(); 20281function $a44aab89caa44953$var$absoluteToDoc(doc, attributeValue) { 20282 if (!attributeValue || attributeValue.trim() === "") return attributeValue; 20283 return $a44aab89caa44953$var$getHref(doc, attributeValue); 20284} 20285function $a44aab89caa44953$var$isSVGElement(el) { 20286 return Boolean(el.tagName === "svg" || el.ownerSVGElement); 20287} 20288function $a44aab89caa44953$var$getHref(doc, customHref) { 20289 var a2 = $a44aab89caa44953$var$cachedDocument.get(doc); 20290 if (!a2) { 20291 a2 = doc.createElement("a"); 20292 $a44aab89caa44953$var$cachedDocument.set(doc, a2); 20293 } 20294 if (!customHref) customHref = ""; 20295 else if (customHref.startsWith("blob:") || customHref.startsWith("data:")) return customHref; 20296 a2.setAttribute("href", customHref); 20297 return a2.href; 20298} 20299function $a44aab89caa44953$var$transformAttribute(doc, tagName, name, value) { 20300 if (!value) return value; 20301 if (name === "src" || name === "href" && !(tagName === "use" && value[0] === "#")) return $a44aab89caa44953$var$absoluteToDoc(doc, value); 20302 else if (name === "xlink:href" && value[0] !== "#") return $a44aab89caa44953$var$absoluteToDoc(doc, value); 20303 else if (name === "background" && (tagName === "table" || tagName === "td" || tagName === "th")) return $a44aab89caa44953$var$absoluteToDoc(doc, value); 20304 else if (name === "srcset") return $a44aab89caa44953$var$getAbsoluteSrcsetString(doc, value); 20305 else if (name === "style") return $a44aab89caa44953$var$absolutifyURLs(value, $a44aab89caa44953$var$getHref(doc)); 20306 else if (tagName === "object" && name === "data") return $a44aab89caa44953$var$absoluteToDoc(doc, value); 20307 return value; 20308} 20309function $a44aab89caa44953$var$ignoreAttribute(tagName, name, _value) { 20310 return (tagName === "video" || tagName === "audio") && name === "autoplay"; 20311} 20312function $a44aab89caa44953$var$_isBlockedElement(element, blockClass, blockSelector) { 20313 try { 20314 if (typeof blockClass === "string") { 20315 if (element.classList.contains(blockClass)) return true; 20316 } else for(var eIndex = element.classList.length; eIndex--;){ 20317 var className = element.classList[eIndex]; 20318 if (blockClass.test(className)) return true; 20319 } 20320 if (blockSelector) return element.matches(blockSelector); 20321 } catch (e2) {} 20322 return false; 20323} 20324function $a44aab89caa44953$var$classMatchesRegex(node2, regex, checkAncestors) { 20325 if (!node2) return false; 20326 if (node2.nodeType !== node2.ELEMENT_NODE) { 20327 if (!checkAncestors) return false; 20328 return $a44aab89caa44953$var$classMatchesRegex($a44aab89caa44953$var$index$1.parentNode(node2), regex, checkAncestors); 20329 } 20330 for(var eIndex = node2.classList.length; eIndex--;){ 20331 var className = node2.classList[eIndex]; 20332 if (regex.test(className)) return true; 20333 } 20334 if (!checkAncestors) return false; 20335 return $a44aab89caa44953$var$classMatchesRegex($a44aab89caa44953$var$index$1.parentNode(node2), regex, checkAncestors); 20336} 20337function $a44aab89caa44953$var$needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors) { 20338 var el; 20339 if ($a44aab89caa44953$var$isElement(node2)) { 20340 el = node2; 20341 if (!$a44aab89caa44953$var$index$1.childNodes(el).length) return false; 20342 } else if ($a44aab89caa44953$var$index$1.parentElement(node2) === null) return false; 20343 else el = $a44aab89caa44953$var$index$1.parentElement(node2); 20344 try { 20345 if (typeof maskTextClass === "string") { 20346 if (checkAncestors) { 20347 if (el.closest("." + maskTextClass)) return true; 20348 } else { 20349 if (el.classList.contains(maskTextClass)) return true; 20350 } 20351 } else { 20352 if ($a44aab89caa44953$var$classMatchesRegex(el, maskTextClass, checkAncestors)) return true; 20353 } 20354 if (maskTextSelector) { 20355 if (checkAncestors) { 20356 if (el.closest(maskTextSelector)) return true; 20357 } else { 20358 if (el.matches(maskTextSelector)) return true; 20359 } 20360 } 20361 } catch (e2) {} 20362 return false;
vendor: 4,663 bytes, lines 20363-20474
20363} 20364function $a44aab89caa44953$var$onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) { 20365 var win = iframeEl.contentWindow; 20366 if (!win) return; 20367 var fired = false; 20368 var readyState; 20369 try { 20370 readyState = win.document.readyState; 20371 } catch (error) { 20372 return; 20373 } 20374 if (readyState !== "complete") { 20375 var timer = setTimeout(function() { 20376 if (!fired) { 20377 listener(); 20378 fired = true; 20379 } 20380 }, iframeLoadTimeout); 20381 iframeEl.addEventListener("load", function() { 20382 clearTimeout(timer); 20383 fired = true; 20384 listener(); 20385 }); 20386 return; 20387 } 20388 var blankUrl = "about:blank"; 20389 if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === "") { 20390 setTimeout(listener, 0); 20391 return iframeEl.addEventListener("load", listener); 20392 } 20393 iframeEl.addEventListener("load", listener); 20394} 20395function $a44aab89caa44953$var$onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) { 20396 var fired = false; 20397 var styleSheetLoaded; 20398 try { 20399 styleSheetLoaded = link.sheet; 20400 } catch (error) { 20401 return; 20402 } 20403 if (styleSheetLoaded) return; 20404 var timer = setTimeout(function() { 20405 if (!fired) { 20406 listener(); 20407 fired = true; 20408 } 20409 }, styleSheetLoadTimeout); 20410 link.addEventListener("load", function() { 20411 clearTimeout(timer); 20412 fired = true; 20413 listener(); 20414 }); 20415} 20416function $a44aab89caa44953$var$serializeNode(n2, options) { 20417 var doc = options.doc, mirror2 = options.mirror, blockClass = options.blockClass, blockSelector = options.blockSelector, needsMask = options.needsMask, inlineStylesheet = options.inlineStylesheet, _options_maskInputOptions = options.maskInputOptions, maskInputOptions = _options_maskInputOptions === void 0 ? {} : _options_maskInputOptions, maskTextFn = options.maskTextFn, maskInputFn = options.maskInputFn, _options_dataURLOptions = options.dataURLOptions, dataURLOptions = _options_dataURLOptions === void 0 ? {} : _options_dataURLOptions, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _options_newlyAddedElement = options.newlyAddedElement, newlyAddedElement = _options_newlyAddedElement === void 0 ? false : _options_newlyAddedElement, _options_cssCaptured = options.cssCaptured, cssCaptured = _options_cssCaptured === void 0 ? false : _options_cssCaptured; 20418 var rootId = $a44aab89caa44953$var$getRootId(doc, mirror2); 20419 switch(n2.nodeType){ 20420 case n2.DOCUMENT_NODE: 20421 if (n2.compatMode !== "CSS1Compat") return { 20422 type: $a44aab89caa44953$var$NodeType$3.Document, 20423 childNodes: [], 20424 compatMode: n2.compatMode 20425 }; 20426 else return { 20427 type: $a44aab89caa44953$var$NodeType$3.Document, 20428 childNodes: [] 20429 }; 20430 case n2.DOCUMENT_TYPE_NODE: 20431 return { 20432 type: $a44aab89caa44953$var$NodeType$3.DocumentType, 20433 name: n2.name, 20434 publicId: n2.publicId, 20435 systemId: n2.systemId, 20436 rootId: rootId 20437 }; 20438 case n2.ELEMENT_NODE: 20439 return $a44aab89caa44953$var$serializeElementNode(n2, { 20440 doc: doc, 20441 blockClass: blockClass, 20442 blockSelector: blockSelector, 20443 inlineStylesheet: inlineStylesheet, 20444 maskInputOptions: maskInputOptions, 20445 maskInputFn: maskInputFn, 20446 dataURLOptions: dataURLOptions, 20447 inlineImages: inlineImages, 20448 recordCanvas: recordCanvas, 20449 keepIframeSrcFn: keepIframeSrcFn, 20450 newlyAddedElement: newlyAddedElement, 20451 rootId: rootId 20452 }); 20453 case n2.TEXT_NODE: 20454 return $a44aab89caa44953$var$serializeTextNode(n2, { 20455 doc: doc, 20456 needsMask: needsMask, 20457 maskTextFn: maskTextFn, 20458 rootId: rootId, 20459 cssCaptured: cssCaptured 20460 }); 20461 case n2.CDATA_SECTION_NODE: 20462 return { 20463 type: $a44aab89caa44953$var$NodeType$3.CDATA, 20464 textContent: "", 20465 rootId: rootId 20466 }; 20467 case n2.COMMENT_NODE: 20468 return { 20469 type: $a44aab89caa44953$var$NodeType$3.Comment, 20470 textContent: $a44aab89caa44953$var$index$1.textContent(n2) || "", 20471 rootId: rootId 20472 }; 20473 default: 20474 return false;
20475 } 20476} 20477function $a44aab89caa44953$var$getRootId(doc, mirror2) { 20478 if (!mirror2.hasNode(doc)) return void 0; 20479 var docId = mirror2.getId(doc); 20480 return docId === 1 ? void 0 : docId; 20481} 20482function $a44aab89caa44953$var$serializeTextNode(n2, options) { 20483 var needsMask = options.needsMask, maskTextFn = options.maskTextFn, rootId = options.rootId, cssCaptured = options.cssCaptured; 20484 var parent = $a44aab89caa44953$var$index$1.parentNode(n2); 20485 var parentTagName = parent && parent.tagName; 20486 var textContent2 = ""; 20487 var isStyle = parentTagName === "STYLE" ? true : void 0; 20488 var isScript = parentTagName === "SCRIPT" ? true : void 0; 20489 if (isScript) textContent2 = "SCRIPT_PLACEHOLDER"; 20490 else if (!cssCaptured) { 20491 textContent2 = $a44aab89caa44953$var$index$1.textContent(n2); 20492 if (isStyle && textContent2) textContent2 = $a44aab89caa44953$var$absolutifyURLs(textContent2, $a44aab89caa44953$var$getHref(options.doc)); 20493 } 20494 if (!isStyle && !isScript && textContent2 && needsMask) textContent2 = maskTextFn ? maskTextFn(textContent2, $a44aab89caa44953$var$index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*"); 20495 return { 20496 type: $a44aab89caa44953$var$NodeType$3.Text, 20497 textContent: textContent2 || "", 20498 rootId: rootId 20499 }; 20500} 20501function $a44aab89caa44953$var$serializeElementNode(n2, options) { 20502 var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _options_maskInputOptions = options.maskInputOptions, maskInputOptions = _options_maskInputOptions === void 0 ? {} : _options_maskInputOptions, maskInputFn = options.maskInputFn, _options_dataURLOptions = options.dataURLOptions, dataURLOptions = _options_dataURLOptions === void 0 ? {} : _options_dataURLOptions, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _options_newlyAddedElement = options.newlyAddedElement, newlyAddedElement = _options_newlyAddedElement === void 0 ? false : _options_newlyAddedElement, rootId = options.rootId; 20503 var needBlock = $a44aab89caa44953$var$_isBlockedElement(n2, blockClass, blockSelector); 20504 var tagName = $a44aab89caa44953$var$getValidTagName$1(n2); 20505 var attributes = {}; 20506 var len = n2.attributes.length; 20507 for(var i2 = 0; i2 < len; i2++){ 20508 var attr = n2.attributes[i2]; 20509 if (!$a44aab89caa44953$var$ignoreAttribute(tagName, attr.name, attr.value)) attributes[attr.name] = $a44aab89caa44953$var$transformAttribute(doc, tagName, $a44aab89caa44953$var$toLowerCase(attr.name), attr.value); 20510 } 20511 if (tagName === "link" && inlineStylesheet) { 20512 var stylesheet = Array.from(doc.styleSheets).find(function(s2) { 20513 return s2.href === n2.href; 20514 }); 20515 var cssText = null; 20516 if (stylesheet) cssText = $a44aab89caa44953$var$stringifyStylesheet(stylesheet); 20517 if (cssText) { 20518 delete attributes.rel; 20519 delete attributes.href; 20520 attributes._cssText = cssText; 20521 } 20522 } 20523 if (tagName === "style" && n2.sheet) { 20524 var cssText1 = $a44aab89caa44953$var$stringifyStylesheet(n2.sheet); 20525 if (cssText1) { 20526 if (n2.childNodes.length > 1) cssText1 = $a44aab89caa44953$var$markCssSplits(cssText1, n2); 20527 attributes._cssText = cssText1; 20528 } 20529 } 20530 if (tagName === "input" || tagName === "textarea" || tagName === "select") { 20531 var value = n2.value; 20532 var checked = n2.checked; 20533 if (attributes.type !== "radio" && attributes.type !== "checkbox" && attributes.type !== "submit" && attributes.type !== "button" && value) attributes.value = $a44aab89caa44953$var$maskInputValue({ 20534 element: n2, 20535 type: $a44aab89caa44953$var$getInputType(n2), 20536 tagName: tagName, 20537 value: value, 20538 maskInputOptions: maskInputOptions, 20539 maskInputFn: maskInputFn 20540 }); 20541 else if (checked) attributes.checked = checked; 20542 } 20543 if (tagName === "option") { 20544 if (n2.selected && !maskInputOptions["select"]) attributes.selected = true; 20545 else delete attributes.selected; 20546 } 20547 if (tagName === "dialog" && n2.open) attributes.rr_open_mode = n2.matches("dialog:modal") ? "modal" : "non-modal"; 20548 if (tagName === "canvas" && recordCanvas) { 20549 if (n2.__context === "2d") { 20550 if (!$a44aab89caa44953$var$is2DCanvasBlank(n2)) attributes.rr_dataURL = n2.toDataURL(dataURLOptions.type, dataURLOptions.quality); 20551 } else if (!("__context" in n2)) { 20552 var canvasDataURL = n2.toDataURL(dataURLOptions.type, dataURLOptions.quality); 20553 var blankCanvas = doc.createElement("canvas"); 20554 blankCanvas.width = n2.width; 20555 blankCanvas.height = n2.height; 20556 var blankCanvasDataURL = blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality); 20557 if (canvasDataURL !== blankCanvasDataURL) attributes.rr_dataURL = canvasDataURL; 20558 } 20559 } 20560 if (tagName === "img" && inlineImages) { 20561 if (!$a44aab89caa44953$var$canvasService) { 20562 $a44aab89caa44953$var$canvasService = doc.createElement("canvas"); 20563 $a44aab89caa44953$var$canvasCtx = $a44aab89caa44953$var$canvasService.getContext("2d"); 20564 } 20565 var image = n2; 20566 var imageSrc = image.currentSrc || image.getAttribute("src") || "<unknown-src>"; 20567 var priorCrossOrigin = image.crossOrigin; 20568 var recordInlineImage = function() { 20569 image.removeEventListener("load", recordInlineImage); 20570 try { 20571 $a44aab89caa44953$var$canvasService.width = image.naturalWi
20571dth; 20572 $a44aab89caa44953$var$canvasService.height = image.naturalHeight; 20573 $a44aab89caa44953$var$canvasCtx.drawImage(image, 0, 0); 20574 attributes.rr_dataURL = $a44aab89caa44953$var$canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality); 20575 } catch (err) { 20576 if (image.crossOrigin !== "anonymous") { 20577 image.crossOrigin = "anonymous"; 20578 if (image.complete && image.naturalWidth !== 0) recordInlineImage(); 20579 else image.addEventListener("load", recordInlineImage); 20580 return; 20581 } else console.warn("Cannot inline img src=" + imageSrc + "! Error: " + err); 20582 } 20583 if (image.crossOrigin === "anonymous") priorCrossOrigin ? attributes.crossOrigin = priorCrossOrigin : image.removeAttribute("crossorigin"); 20584 }; 20585 if (image.complete && image.naturalWidth !== 0) recordInlineImage(); 20586 else image.addEventListener("load", recordInlineImage); 20587 } 20588 if (tagName === "audio" || tagName === "video") { 20589 var mediaAttributes = attributes; 20590 mediaAttributes.rr_mediaState = n2.paused ? "paused" : "played"; 20591 mediaAttributes.rr_mediaCurrentTime = n2.currentTime; 20592 mediaAttributes.rr_mediaPlaybackRate = n2.playbackRate; 20593 mediaAttributes.rr_mediaMuted = n2.muted; 20594 mediaAttributes.rr_mediaLoop = n2.loop; 20595 mediaAttributes.rr_mediaVolume = n2.volume; 20596 } 20597 if (!newlyAddedElement) { 20598 if (n2.scrollLeft) attributes.rr_scrollLeft = n2.scrollLeft; 20599 if (n2.scrollTop) attributes.rr_scrollTop = n2.scrollTop; 20600 } 20601 if (needBlock) { 20602 var _n2_getBoundingClientRect = n2.getBoundingClientRect(), width = _n2_getBoundingClientRect.width, height = _n2_getBoundingClientRect.height; 20603 attributes = { 20604 class: attributes.class, 20605 rr_width: "" + width + "px", 20606 rr_height: "" + height + "px" 20607 }; 20608 } 20609 if (tagName === "iframe" && !keepIframeSrcFn(attributes.src)) { 20610 if (!n2.contentDocument) attributes.rr_src = attributes.src; 20611 delete attributes.src; 20612 } 20613 var isCustomElement; 20614 try { 20615 if (customElements.get(tagName)) isCustomElement = true; 20616 } catch (e2) {} 20617 return { 20618 type: $a44aab89caa44953$var$NodeType$3.Element, 20619 tagName: tagName, 20620 attributes: attributes, 20621 childNodes: [], 20622 isSVG: $a44aab89caa44953$var$isSVGElement(n2) || void 0, 20623 needBlock: needBlock, 20624 rootId: rootId, 20625 isCustom: isCustomElement 20626 }; 20627} 20628function $a44aab89caa44953$var$lowerIfExists(maybeAttr) { 20629 if (maybeAttr === void 0 || maybeAttr === null) return ""; 20630 else return maybeAttr.toLowerCase(); 20631} 20632function $a44aab89caa44953$var$slimDOMExcluded(sn, slimDOMOptions) { 20633 if (slimDOMOptions.comment && sn.type === $a44aab89caa44953$var$NodeType$3.Comment) return true; 20634 else if (sn.type === $a44aab89caa44953$var$NodeType$3.Element) { 20635 if (slimDOMOptions.script && // script tag 20636 (sn.tagName === "script" || // (module)preload link 20637 sn.tagName === "link" && (sn.attributes.rel === "preload" && sn.attributes.as === "script" || sn.attributes.rel === "modulepreload") || // prefetch link 20638 sn.tagName === "link" && sn.attributes.rel === "prefetch" && typeof sn.attributes.href === "string" && $a44aab89caa44953$var$extractFileExtension(sn.attributes.href) === "js")) return true; 20639 else if (slimDOMOptions.headFavicon && (sn.tagName === "link" && sn.attributes.rel === "shortcut icon" || sn.tagName === "meta" && ($a44aab89caa44953$var$lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "application-name" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.rel) === "icon" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.rel) === "apple-touch-icon" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.rel) === "shortcut icon"))) return true; 20640 else if (sn.tagName === "meta") { 20641 if (slimDOMOptions.headMetaDescKeywords && $a44aab89caa44953$var$lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) return true; 20642 else if (slimDOMOptions.headMetaSocial && ($a44aab89caa44953$var$lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook) 20643 $a44aab89caa44953$var$lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "pinterest")) return true; 20644 else if (slimDOMOptions.headMetaRobots && ($a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "robots" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "googlebot" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "bingbot")) return true; 20645 else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes["http-equiv"] !== void 0) return true; 20646 else if (slimDOMOptions.headMetaAuthorship && ($a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "author" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "generator" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "framework" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "publisher" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "progid" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.property).match(/^article:/) || $a44aab89caa44953$var$lowerIfExists(sn.attributes.property).match(/^product:/))) return true; 20647 else if (slimDOMOptions.headMetaVerification && ($a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "google-site-verification" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "yandex-verification" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "csrf-token" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "p:domain_verify" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "verify-v1" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "verification" || $a44aab89caa44953$var$lowerIfExists(sn.attributes.name) === "shopify-checkout-api-token")) return true; 20648 } 20649 } 20650 return false;
20651} 20652function $a44aab89caa44953$var$serializeNodeWithId(n2, options) { 20653 var doc = options.doc, mirror2 = options.mirror, blockClass = options.blockClass, blockSelector = options.blockSelector, maskTextClass = options.maskTextClass, maskTextSelector = options.maskTextSelector, _options_skipChild = options.skipChild, skipChild = _options_skipChild === void 0 ? false : _options_skipChild, _options_inlineStylesheet = options.inlineStylesheet, inlineStylesheet = _options_inlineStylesheet === void 0 ? true : _options_inlineStylesheet, _options_maskInputOptions = options.maskInputOptions, maskInputOptions = _options_maskInputOptions === void 0 ? {} : _options_maskInputOptions, maskTextFn = options.maskTextFn, maskInputFn = options.maskInputFn, slimDOMOptions = options.slimDOMOptions, _options_dataURLOptions = options.dataURLOptions, dataURLOptions = _options_dataURLOptions === void 0 ? {} : _options_dataURLOptions, _options_inlineImages = options.inlineImages, inlineImages = _options_inlineImages === void 0 ? false : _options_inlineImages, _options_recordCanvas = options.recordCanvas, recordCanvas = _options_recordCanvas === void 0 ? false : _options_recordCanvas, onSerialize = options.onSerialize, onIframeLoad = options.onIframeLoad, _options_iframeLoadTimeout = options.iframeLoadTimeout, iframeLoadTimeout = _options_iframeLoadTimeout === void 0 ? 5e3 : _options_iframeLoadTimeout, onStylesheetLoad = options.onStylesheetLoad, _options_stylesheetLoadTimeout = options.stylesheetLoadTimeout, stylesheetLoadTimeout = _options_stylesheetLoadTimeout === void 0 ? 5e3 : _options_stylesheetLoadTimeout, _options_keepIframeSrcFn = options.keepIframeSrcFn, keepIframeSrcFn = _options_keepIframeSrcFn === void 0 ? function() { 20654 return false; 20655 } : _options_keepIframeSrcFn, _options_newlyAddedElement = options.newlyAddedElement, newlyAddedElement = _options_newlyAddedElement === void 0 ? false : _options_newlyAddedElement, _options_cssCaptured = options.cssCaptured, cssCaptured = _options_cssCaptured === void 0 ? false : _options_cssCaptured; 20656 var needsMask = options.needsMask; 20657 var _options_preserveWhiteSpace = options.preserveWhiteSpace, preserveWhiteSpace = _options_preserveWhiteSpace === void 0 ? true : _options_preserveWhiteSpace; 20658 if (!needsMask) { 20659 var checkAncestors = needsMask === void 0; 20660 needsMask = $a44aab89caa44953$var$needMaskingText(n2, maskTextClass, maskTextSelector, checkAncestors); 20661 } 20662 var _serializedNode = $a44aab89caa44953$var$serializeNode(n2, { 20663 doc: doc, 20664 mirror: mirror2, 20665 blockClass: blockClass, 20666 blockSelector: blockSelector, 20667 needsMask: needsMask, 20668 inlineStylesheet: inlineStylesheet, 20669 maskInputOptions: maskInputOptions, 20670 maskTextFn: maskTextFn, 20671 maskInputFn: maskInputFn, 20672 dataURLOptions: dataURLOptions, 20673 inlineImages: inlineImages, 20674 recordCanvas: recordCanvas, 20675 keepIframeSrcFn: keepIframeSrcFn, 20676 newlyAddedElement: newlyAddedElement, 20677 cssCaptured: cssCaptured 20678 }); 20679 if (!_serializedNode) { 20680 console.warn(n2, "not serialized"); 20681 return null; 20682 } 20683 var id; 20684 if (mirror2.hasNode(n2)) id = mirror2.getId(n2); 20685 else if ($a44aab89caa44953$var$slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === $a44aab89caa44953$var$NodeType$3.Text && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) id = $a44aab89caa44953$var$IGNORED_NODE; 20686 else id = $a44aab89caa44953$var$genId(); 20687 var serializedNode = Object.assign(_serializedNode, { 20688 id: id 20689 }); 20690 mirror2.add(n2, serializedNode); 20691 if (id === $a44aab89caa44953$var$IGNORED_NODE) return null; 20692 if (onSerialize) onSerialize(n2); 20693 var recordChild = !skipChild; 20694 if (serializedNode.type === $a44aab89caa44953$var$NodeType$3.Element) { 20695 recordChild = recordChild && !serializedNode.needBlock; 20696 delete serializedNode.needBlock; 20697 var shadowRootEl = $a44aab89caa44953$var$index$1.shadowRoot(n2); 20698 if (shadowRootEl && $a44aab89caa44953$var$isNativeShadowDom(shadowRootEl)) serializedNode.isShadowHost = true; 20699 } 20700 if ((serializedNode.type === $a44aab89caa44953$var$NodeType$3.Document || serializedNode.type === $a44aab89caa44953$var$NodeType$3.Element) && recordChild) { 20701 if (slimDOMOptions.headWhitespace && serializedNode.type === $a44aab89caa44953$var$NodeType$3.Element && serializedNode.tagName === "head") preserveWhiteSpace = false;
20702 var bypassOptions = { 20703 doc: doc, 20704 mirror: mirror2, 20705 blockClass: blockClass, 20706 blockSelector: blockSelector, 20707 needsMask: needsMask, 20708 maskTextClass: maskTextClass, 20709 maskTextSelector: maskTextSelector, 20710 skipChild: skipChild, 20711 inlineStylesheet: inlineStylesheet, 20712 maskInputOptions: maskInputOptions, 20713 maskTextFn: maskTextFn, 20714 maskInputFn: maskInputFn, 20715 slimDOMOptions: slimDOMOptions, 20716 dataURLOptions: dataURLOptions, 20717 inlineImages: inlineImages, 20718 recordCanvas: recordCanvas, 20719 preserveWhiteSpace: preserveWhiteSpace, 20720 onSerialize: onSerialize, 20721 onIframeLoad: onIframeLoad, 20722 iframeLoadTimeout: iframeLoadTimeout, 20723 onStylesheetLoad: onStylesheetLoad, 20724 stylesheetLoadTimeout: stylesheetLoadTimeout, 20725 keepIframeSrcFn: keepIframeSrcFn, 20726 cssCaptured: false 20727 }; 20728 if (serializedNode.type === $a44aab89caa44953$var$NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ; 20729 else { 20730 if (serializedNode.type === $a44aab89caa44953$var$NodeType$3.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") bypassOptions.cssCaptured = true; 20731 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(Array.from($a44aab89caa44953$var$index$1.childNodes(n2))), _step; !(_step = _iterator()).done;){ 20732 var childN = _step.value; 20733 var serializedChildNode = $a44aab89caa44953$var$serializeNodeWithId(childN, bypassOptions); 20734 if (serializedChildNode) serializedNode.childNodes.push(serializedChildNode); 20735 } 20736 } 20737 var shadowRootEl1 = null; 20738 if ($a44aab89caa44953$var$isElement(n2) && (shadowRootEl1 = $a44aab89caa44953$var$index$1.shadowRoot(n2))) for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(Array.from($a44aab89caa44953$var$index$1.childNodes(shadowRootEl1))), _step1; !(_step1 = _iterator1()).done;){ 20739 var childN1 = _step1.value; 20740 var serializedChildNode1 = $a44aab89caa44953$var$serializeNodeWithId(childN1, bypassOptions); 20741 if (serializedChildNode1) { 20742 $a44aab89caa44953$var$isNativeShadowDom(shadowRootEl1) && (serializedChildNode1.isShadow = true); 20743 serializedNode.childNodes.push(serializedChildNode1); 20744 } 20745 } 20746 } 20747 var parent = $a44aab89caa44953$var$index$1.parentNode(n2); 20748 if (parent && $a44aab89caa44953$var$isShadowRoot(parent) && $a44aab89caa44953$var$isNativeShadowDom(parent)) serializedNode.isShadow = true; 20749 if (serializedNode.type === $a44aab89caa44953$var$NodeType$3.Element && serializedNode.tagName === "iframe") $a44aab89caa44953$var$onceIframeLoaded(n2, function() { 20750 var iframeDoc = n2.contentDocument; 20751 if (iframeDoc && onIframeLoad) { 20752 var serializedIframeNode = $a44aab89caa44953$var$serializeNodeWithId(iframeDoc, { 20753 doc: iframeDoc, 20754 mirror: mirror2, 20755 blockClass: blockClass, 20756 blockSelector: blockSelector, 20757 needsMask: needsMask, 20758 maskTextClass: maskTextClass, 20759 maskTextSelector: maskTextSelector, 20760 skipChild: false, 20761 inlineStylesheet: inlineStylesheet, 20762 maskInputOptions: maskInputOptions, 20763 maskTextFn: maskTextFn, 20764 maskInputFn: maskInputFn, 20765 slimDOMOptions: slimDOMOptions, 20766 dataURLOptions: dataURLOptions, 20767 inlineImages: inlineImages, 20768 recordCanvas: recordCanvas, 20769 preserveWhiteSpace: preserveWhiteSpace, 20770 onSerialize: onSerialize, 20771 onIframeLoad: onIframeLoad, 20772 iframeLoadTimeout: iframeLoadTimeout, 20773 onStylesheetLoad: onStylesheetLoad, 20774 stylesheetLoadTimeout: stylesheetLoadTimeout, 20775 keepIframeSrcFn: keepIframeSrcFn 20776 });
vendor: 8,914 bytes, lines 20777-20952
20777 if (serializedIframeNode) onIframeLoad(n2, serializedIframeNode); 20778 } 20779 }, iframeLoadTimeout); 20780 if (serializedNode.type === $a44aab89caa44953$var$NodeType$3.Element && serializedNode.tagName === "link" && typeof serializedNode.attributes.rel === "string" && (serializedNode.attributes.rel === "stylesheet" || serializedNode.attributes.rel === "preload" && typeof serializedNode.attributes.href === "string" && $a44aab89caa44953$var$extractFileExtension(serializedNode.attributes.href) === "css")) $a44aab89caa44953$var$onceStylesheetLoaded(n2, function() { 20781 if (onStylesheetLoad) { 20782 var serializedLinkNode = $a44aab89caa44953$var$serializeNodeWithId(n2, { 20783 doc: doc, 20784 mirror: mirror2, 20785 blockClass: blockClass, 20786 blockSelector: blockSelector, 20787 needsMask: needsMask, 20788 maskTextClass: maskTextClass, 20789 maskTextSelector: maskTextSelector, 20790 skipChild: false, 20791 inlineStylesheet: inlineStylesheet, 20792 maskInputOptions: maskInputOptions, 20793 maskTextFn: maskTextFn, 20794 maskInputFn: maskInputFn, 20795 slimDOMOptions: slimDOMOptions, 20796 dataURLOptions: dataURLOptions, 20797 inlineImages: inlineImages, 20798 recordCanvas: recordCanvas, 20799 preserveWhiteSpace: preserveWhiteSpace, 20800 onSerialize: onSerialize, 20801 onIframeLoad: onIframeLoad, 20802 iframeLoadTimeout: iframeLoadTimeout, 20803 onStylesheetLoad: onStylesheetLoad, 20804 stylesheetLoadTimeout: stylesheetLoadTimeout, 20805 keepIframeSrcFn: keepIframeSrcFn 20806 }); 20807 if (serializedLinkNode) onStylesheetLoad(n2, serializedLinkNode); 20808 } 20809 }, stylesheetLoadTimeout); 20810 return serializedNode; 20811} 20812function $a44aab89caa44953$var$snapshot(n2, options) { 20813 var _ref = options || {}, tmp = _ref.mirror, mirror2 = tmp === void 0 ? new $a44aab89caa44953$var$Mirror() : tmp, _ref_blockClass = _ref.blockClass, blockClass = _ref_blockClass === void 0 ? "rr-block" : _ref_blockClass, _ref_blockSelector = _ref.blockSelector, blockSelector = _ref_blockSelector === void 0 ? null : _ref_blockSelector, _ref_maskTextClass = _ref.maskTextClass, maskTextClass = _ref_maskTextClass === void 0 ? "rr-mask" : _ref_maskTextClass, _ref_maskTextSelector = _ref.maskTextSelector, maskTextSelector = _ref_maskTextSelector === void 0 ? null : _ref_maskTextSelector, _ref_inlineStylesheet = _ref.inlineStylesheet, inlineStylesheet = _ref_inlineStylesheet === void 0 ? true : _ref_inlineStylesheet, _ref_inlineImages = _ref.inlineImages, inlineImages = _ref_inlineImages === void 0 ? false : _ref_inlineImages, _ref_recordCanvas = _ref.recordCanvas, recordCanvas = _ref_recordCanvas === void 0 ? false : _ref_recordCanvas, _ref_maskAllInputs = _ref.maskAllInputs, maskAllInputs = _ref_maskAllInputs === void 0 ? false : _ref_maskAllInputs, maskTextFn = _ref.maskTextFn, maskInputFn = _ref.maskInputFn, _ref_slimDOM = _ref.slimDOM, slimDOM = _ref_slimDOM === void 0 ? false : _ref_slimDOM, dataURLOptions = _ref.dataURLOptions, preserveWhiteSpace = _ref.preserveWhiteSpace, onSerialize = _ref.onSerialize, onIframeLoad = _ref.onIframeLoad, iframeLoadTimeout = _ref.iframeLoadTimeout, onStylesheetLoad = _ref.onStylesheetLoad, stylesheetLoadTimeout = _ref.stylesheetLoadTimeout, _ref_keepIframeSrcFn = _ref.keepIframeSrcFn, keepIframeSrcFn = _ref_keepIframeSrcFn === void 0 ? function() { 20814 return false; 20815 } : _ref_keepIframeSrcFn; 20816 var maskInputOptions = maskAllInputs === true ? { 20817 color: true, 20818 date: true, 20819 "datetime-local": true, 20820 email: true, 20821 month: true, 20822 number: true, 20823 range: true, 20824 search: true, 20825 tel: true, 20826 text: true, 20827 time: true, 20828 url: true, 20829 week: true, 20830 textarea: true, 20831 select: true, 20832 password: true 20833 } : maskAllInputs === false ? { 20834 password: true 20835 } : maskAllInputs; 20836 var slimDOMOptions = slimDOM === true || slimDOM === "all" ? { 20837 script: true, 20838 comment: true, 20839 headFavicon: true, 20840 headWhitespace: true, 20841 headMetaDescKeywords: slimDOM === "all", 20842 // destructive 20843 headMetaSocial: true, 20844 headMetaRobots: true, 20845 headMetaHttpEquiv: true, 20846 headMetaAuthorship: true, 20847 headMetaVerification: true 20848 } : slimDOM === false ? {} : slimDOM; 20849 return $a44aab89caa44953$var$serializeNodeWithId(n2, { 20850 doc: n2, 20851 mirror: mirror2, 20852 blockClass: blockClass, 20853 blockSelector: blockSelector, 20854 maskTextClass: maskTextClass, 20855 maskTextSelector: maskTextSelector, 20856 skipChild: false, 20857 inlineStylesheet: inlineStylesheet, 20858 maskInputOptions: maskInputOptions, 20859 maskTextFn: maskTextFn, 20860 maskInputFn: maskInputFn, 20861 slimDOMOptions: slimDOMOptions, 20862 dataURLOptions: dataURLOptions, 20863 inlineImages: inlineImages, 20864 recordCanvas: recordCanvas, 20865 preserveWhiteSpace: preserveWhiteSpace, 20866 onSerialize: onSerialize, 20867 onIframeLoad: onIframeLoad, 20868 iframeLoadTimeout: iframeLoadTimeout, 20869 onStylesheetLoad: onStylesheetLoad, 20870 stylesheetLoadTimeout: stylesheetLoadTimeout, 20871 keepIframeSrcFn: keepIframeSrcFn, 20872 newlyAddedElement: false 20873 }); 20874} 20875function $a44aab89caa44953$var$getDefaultExportFromCjs$1(x2) { 20876 return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2; 20877} 20878function $a44aab89caa44953$var$getAugmentedNamespace$1(n2) { 20879 if (n2.__esModule) return n2; 20880 var f2 = n2.default; 20881 if (typeof f2 == "function") { 20882 var a2 = function a22() { 20883 if ($a44aab89caa44953$var$_instanceof(this, a22)) return Reflect.construct(f2, arguments, this.constructor); 20884 return f2.apply(this, arguments); 20885 }; 20886 a2.prototype = f2.prototype; 20887 } else a2 = {}; 20888 Object.defineProperty(a2, "__esModule", { 20889 value: true 20890 }); 20891 Object.keys(n2).forEach(function(k) { 20892 var d = Object.getOwnPropertyDescriptor(n2, k); 20893 Object.defineProperty(a2, k, d.get ? d : { 20894 enumerable: true, 20895 get: function get() { 20896 return n2[k]; 20897 } 20898 }); 20899 }); 20900 return a2; 20901} 20902var $a44aab89caa44953$var$picocolors_browser$1 = { 20903 exports: {} 20904}; 20905var $a44aab89caa44953$var$x$1 = String; 20906var $a44aab89caa44953$var$create$1 = function create$1() { 20907 return { 20908 isColorSupported: false, 20909 reset: $a44aab89caa44953$var$x$1, 20910 bold: $a44aab89caa44953$var$x$1, 20911 dim: $a44aab89caa44953$var$x$1, 20912 italic: $a44aab89caa44953$var$x$1, 20913 underline: $a44aab89caa44953$var$x$1, 20914 inverse: $a44aab89caa44953$var$x$1, 20915 hidden: $a44aab89caa44953$var$x$1, 20916 strikethrough: $a44aab89caa44953$var$x$1, 20917 black: $a44aab89caa44953$var$x$1, 20918 red: $a44aab89caa44953$var$x$1, 20919 green: $a44aab89caa44953$var$x$1, 20920 yellow: $a44aab89caa44953$var$x$1, 20921 blue: $a44aab89caa44953$var$x$1, 20922 magenta: $a44aab89caa44953$var$x$1, 20923 cyan: $a44aab89caa44953$var$x$1, 20924 white: $a44aab89caa44953$var$x$1, 20925 gray: $a44aab89caa44953$var$x$1, 20926 bgBlack: $a44aab89caa44953$var$x$1, 20927 bgRed: $a44aab89caa44953$var$x$1, 20928 bgGreen: $a44aab89caa44953$var$x$1, 20929 bgYellow: $a44aab89caa44953$var$x$1, 20930 bgBlue: $a44aab89caa44953$var$x$1, 20931 bgMagenta: $a44aab89caa44953$var$x$1, 20932 bgCyan: $a44aab89caa44953$var$x$1, 20933 bgWhite: $a44aab89caa44953$var$x$1 20934 }; 20935}; 20936$a44aab89caa44953$var$picocolors_browser$1.exports = $a44aab89caa44953$var$create$1(); 20937$a44aab89caa44953$var$picocolors_browser$1.exports.createColors = $a44aab89caa44953$var$create$1; 20938var $a44aab89caa44953$var$picocolors_browserExports$1 = $a44aab89caa44953$var$picocolors_browser$1.exports; 20939var $a44aab89caa44953$var$__viteBrowserExternal$2 = {}; 20940var $a44aab89caa44953$var$__viteBrowserExternal$1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 20941 __proto__: null, 20942 default: $a44aab89caa44953$var$__viteBrowserExternal$2 20943}, Symbol.toStringTag, { 20944 value: "Module" 20945})); 20946var $a44aab89caa44953$var$require$$2$1 = /* @__PURE__ */ $a44aab89caa44953$var$getAugmentedNamespace$1($a44aab89caa44953$var$__viteBrowserExternal$1$1); 20947var $a44aab89caa44953$var$pico$1 = $a44aab89caa44953$var$picocolors_browserExports$1; 20948var $a44aab89caa44953$var$terminalHighlight$1$1 = $a44aab89caa44953$var$require$$2$1; 20949var $a44aab89caa44953$var$CssSyntaxError$3$1 = /*#__PURE__*/ function(Error1) { 20950 $a44aab89caa44953$var$_inherits(CssSyntaxError, Error1); 20951 function CssSyntaxError(message, line, column, source, file, plugin22) { 20952 var _this;
20953 _this = Error1.call(this, message) || this; 20954 _this.name = "CssSyntaxError"; 20955 _this.reason = message; 20956 if (file) _this.file = file; 20957 if (source) _this.source = source; 20958 if (plugin22) _this.plugin = plugin22; 20959 if (typeof line !== "undefined" && typeof column !== "undefined") { 20960 if (typeof line === "number") { 20961 _this.line = line; 20962 _this.column = column; 20963 } else { 20964 _this.line = line.line; 20965 _this.column = line.column; 20966 _this.endLine = column.line; 20967 _this.endColumn = column.column; 20968 } 20969 } 20970 _this.setMessage(); 20971 if (Error.captureStackTrace) Error.captureStackTrace(_this, CssSyntaxError); 20972 return _this; 20973 } 20974 var _proto = CssSyntaxError.prototype; 20975 _proto.setMessage = function setMessage() { 20976 this.message = this.plugin ? this.plugin + ": " : ""; 20977 this.message += this.file ? this.file : "<css input>"; 20978 if (typeof this.line !== "undefined") this.message += ":" + this.line + ":" + this.column; 20979 this.message += ": " + this.reason; 20980 }; 20981 _proto.showSourceCode = function showSourceCode(color) { 20982 var _this = this; 20983 if (!this.source) return ""; 20984 var css = this.source; 20985 if (color == null) color = $a44aab89caa44953$var$pico$1.isColorSupported; 20986 if ($a44aab89caa44953$var$terminalHighlight$1$1) { 20987 if (color) css = $a44aab89caa44953$var$terminalHighlight$1$1(css); 20988 } 20989 var lines = css.split(/\r?\n/); 20990 var start = Math.max(this.line - 3, 0); 20991 var end = Math.min(this.line + 2, lines.length); 20992 var maxWidth = String(end).length; 20993 var mark, aside; 20994 if (color) { 20995 var _pico$1_createColors = $a44aab89caa44953$var$pico$1.createColors(true), bold = _pico$1_createColors.bold, gray = _pico$1_createColors.gray, red = _pico$1_createColors.red; 20996 mark = function(text) { 20997 return bold(red(text)); 20998 }; 20999 aside = function(text) { 21000 return gray(text); 21001 }; 21002 } else mark = aside = function(str) { 21003 return str; 21004 }; 21005 return lines.slice(start, end).map(function(line, index2) { 21006 var number = start + 1 + index2; 21007 var gutter = " " + (" " + number).slice(-maxWidth) + " | "; 21008 if (number === _this.line) { 21009 var spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, _this.column - 1).replace(/[^\t]/g, " "); 21010 return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^"); 21011 } 21012 return " " + aside(gutter) + line; 21013 }).join("\n"); 21014 }; 21015 _proto.toString = function toString() { 21016 var code = this.showSourceCode(); 21017 if (code) code = "\n\n" + code + "\n"; 21018 return this.name + ": " + this.message + code; 21019 }; 21020 return CssSyntaxError; 21021}($a44aab89caa44953$var$_wrap_native_super(Error)); 21022var $a44aab89caa44953$var$cssSyntaxError$1 = $a44aab89caa44953$var$CssSyntaxError$3$1; 21023$a44aab89caa44953$var$CssSyntaxError$3$1.default = $a44aab89caa44953$var$CssSyntaxError$3$1;
21024var $a44aab89caa44953$var$symbols$1 = {}; 21025$a44aab89caa44953$var$symbols$1.isClean = Symbol("isClean"); 21026$a44aab89caa44953$var$symbols$1.my = Symbol("my"); 21027var $a44aab89caa44953$var$DEFAULT_RAW$1 = { 21028 after: "\n", 21029 beforeClose: "\n", 21030 beforeComment: "\n", 21031 beforeDecl: "\n", 21032 beforeOpen: " ", 21033 beforeRule: "\n", 21034 colon: ": ", 21035 commentLeft: " ", 21036 commentRight: " ", 21037 emptyBody: "", 21038 indent: " ", 21039 semicolon: false 21040}; 21041function $a44aab89caa44953$var$capitalize$1(str) { 21042 return str[0].toUpperCase() + str.slice(1); 21043} 21044var $a44aab89caa44953$var$Stringifier$2$1 = /*#__PURE__*/ function() { 21045 function Stringifier(builder) { 21046 this.builder = builder; 21047 } 21048 var _proto = Stringifier.prototype; 21049 _proto.atrule = function atrule(node2, semicolon) { 21050 var name = "@" + node2.name; 21051 var params = node2.params ? this.rawValue(node2, "params") : ""; 21052 if (typeof node2.raws.afterName !== "undefined") name += node2.raws.afterName; 21053 else if (params) name += " "; 21054 if (node2.nodes) this.block(node2, name + params); 21055 else { 21056 var end = (node2.raws.between || "") + (semicolon ? ";" : ""); 21057 this.builder(name + params + end, node2); 21058 } 21059 }; 21060 _proto.beforeAfter = function beforeAfter(node2, detect) { 21061 var value; 21062 if (node2.type === "decl") value = this.raw(node2, null, "beforeDecl"); 21063 else if (node2.type === "comment") value = this.raw(node2, null, "beforeComment"); 21064 else if (detect === "before") value = this.raw(node2, null, "beforeRule"); 21065 else value = this.raw(node2, null, "beforeClose"); 21066 var buf = node2.parent; 21067 var depth = 0; 21068 while(buf && buf.type !== "root"){ 21069 depth += 1; 21070 buf = buf.parent; 21071 } 21072 if (value.includes("\n")) { 21073 var indent = this.raw(node2, null, "indent"); 21074 if (indent.length) for(var step = 0; step < depth; step++)value += indent; 21075 } 21076 return value; 21077 }; 21078 _proto.block = function block(node2, start) { 21079 var between = this.raw(node2, "between", "beforeOpen"); 21080 this.builder(start + between + "{", node2, "start"); 21081 var after; 21082 if (node2.nodes && node2.nodes.length) { 21083 this.body(node2); 21084 after = this.raw(node2, "after"); 21085 } else after = this.raw(node2, "after", "emptyBody"); 21086 if (after) this.builder(after); 21087 this.builder("}", node2, "end"); 21088 }; 21089 _proto.body = function body(node2) { 21090 var last = node2.nodes.length - 1; 21091 while(last > 0){ 21092 if (node2.nodes[last].type !== "comment") break; 21093 last -= 1; 21094 } 21095 var semicolon = this.raw(node2, "semicolon"); 21096 for(var i2 = 0; i2 < node2.nodes.length; i2++){ 21097 var child = node2.nodes[i2]; 21098 var before = this.raw(child, "before"); 21099 if (before) this.builder(before); 21100 this.stringify(child, last !== i2 || semicolon); 21101 } 21102 }; 21103 _proto.comment = function comment(node2) { 21104 var left = this.raw(node2, "left", "commentLeft"); 21105 var right = this.raw(node2, "right", "commentRight"); 21106 this.builder("/*" + left + node2.text + right + "*/", node2); 21107 }; 21108 _proto.decl = function decl(node2, semicolon) { 21109 var between = this.raw(node2, "between", "colon"); 21110 var string = node2.prop + between + this.rawValue(node2, "value"); 21111 if (node2.important) string += node2.raws.important || " !important"; 21112 if (semicolon) string += ";";
21113 this.builder(string, node2); 21114 }; 21115 _proto.document = function document1(node2) { 21116 this.body(node2); 21117 }; 21118 _proto.raw = function raw(node2, own, detect) { 21119 var value; 21120 if (!detect) detect = own; 21121 if (own) { 21122 value = node2.raws[own]; 21123 if (typeof value !== "undefined") return value; 21124 } 21125 var parent = node2.parent; 21126 if (detect === "before") { 21127 if (!parent || parent.type === "root" && parent.first === node2) return ""; 21128 if (parent && parent.type === "document") return ""; 21129 } 21130 if (!parent) return $a44aab89caa44953$var$DEFAULT_RAW$1[detect]; 21131 var root2 = node2.root(); 21132 if (!root2.rawCache) root2.rawCache = {}; 21133 if (typeof root2.rawCache[detect] !== "undefined") return root2.rawCache[detect]; 21134 if (detect === "before" || detect === "after") return this.beforeAfter(node2, detect); 21135 else { 21136 var method = "raw" + $a44aab89caa44953$var$capitalize$1(detect); 21137 if (this[method]) value = this[method](root2, node2); 21138 else root2.walk(function(i2) { 21139 value = i2.raws[own]; 21140 if (typeof value !== "undefined") return false; 21141 }); 21142 } 21143 if (typeof value === "undefined") value = $a44aab89caa44953$var$DEFAULT_RAW$1[detect]; 21144 root2.rawCache[detect] = value; 21145 return value; 21146 }; 21147 _proto.rawBeforeClose = function rawBeforeClose(root2) { 21148 var value; 21149 root2.walk(function(i2) { 21150 if (i2.nodes && i2.nodes.length > 0) { 21151 if (typeof i2.raws.after !== "undefined") { 21152 value = i2.raws.after; 21153 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 21154 return false; 21155 } 21156 } 21157 }); 21158 if (value) value = value.replace(/\S/g, ""); 21159 return value; 21160 }; 21161 _proto.rawBeforeComment = function rawBeforeComment(root2, node2) { 21162 var value; 21163 root2.walkComments(function(i2) { 21164 if (typeof i2.raws.before !== "undefined") { 21165 value = i2.raws.before; 21166 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 21167 return false; 21168 } 21169 }); 21170 if (typeof value === "undefined") value = this.raw(node2, null, "beforeDecl"); 21171 else if (value) value = value.replace(/\S/g, ""); 21172 return value; 21173 }; 21174 _proto.rawBeforeDecl = function rawBeforeDecl(root2, node2) { 21175 var value; 21176 root2.walkDecls(function(i2) { 21177 if (typeof i2.raws.before !== "undefined") { 21178 value = i2.raws.before; 21179 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 21180 return false; 21181 } 21182 }); 21183 if (typeof value === "undefined") value = this.raw(node2, null, "beforeRule"); 21184 else if (value) value = value.replace(/\S/g, ""); 21185 return value; 21186 }; 21187 _proto.rawBeforeOpen = function rawBeforeOpen(root2) { 21188 var value; 21189 root2.walk(function(i2) { 21190 if (i2.type !== "decl") { 21191 value = i2.raws.between; 21192 if (typeof value !== "undefined") return false; 21193 } 21194 }); 21195 return value; 21196 }; 21197 _proto.rawBeforeRule = function rawBeforeRule(root2) { 21198 var value; 21199 root2.walk(function(i2) { 21200 if (i2.nodes && (i2.parent !== root2 || root2.first !== i2)) { 21201 if (typeof i2.raws.before !== "undefined") { 21202 value = i2.raws.before; 21203 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 21204 return false; 21205 } 21206 } 21207 }); 21208 if (value) value = value.replace(/\S/g, ""); 21209 return value; 21210 }; 21211 _proto.rawColon = function rawColon(root2) { 21212 var value; 21213 root2.walkDecls(function(i2) { 21214 if (typeof i2.raws.between !== "undefined") { 21215 value = i2.raws.between.replace(/[^\s:]/g, ""); 21216 return false;
vendor: 2,782 bytes, lines 21217-21286
21217 } 21218 }); 21219 return value; 21220 }; 21221 _proto.rawEmptyBody = function rawEmptyBody(root2) { 21222 var value; 21223 root2.walk(function(i2) { 21224 if (i2.nodes && i2.nodes.length === 0) { 21225 value = i2.raws.after; 21226 if (typeof value !== "undefined") return false; 21227 } 21228 }); 21229 return value; 21230 }; 21231 _proto.rawIndent = function rawIndent(root2) { 21232 if (root2.raws.indent) return root2.raws.indent; 21233 var value; 21234 root2.walk(function(i2) { 21235 var p = i2.parent; 21236 if (p && p !== root2 && p.parent && p.parent === root2) { 21237 if (typeof i2.raws.before !== "undefined") { 21238 var parts = i2.raws.before.split("\n"); 21239 value = parts[parts.length - 1]; 21240 value = value.replace(/\S/g, ""); 21241 return false; 21242 } 21243 } 21244 }); 21245 return value; 21246 }; 21247 _proto.rawSemicolon = function rawSemicolon(root2) { 21248 var value; 21249 root2.walk(function(i2) { 21250 if (i2.nodes && i2.nodes.length && i2.last.type === "decl") { 21251 value = i2.raws.semicolon; 21252 if (typeof value !== "undefined") return false; 21253 } 21254 }); 21255 return value; 21256 }; 21257 _proto.rawValue = function rawValue(node2, prop) { 21258 var value = node2[prop]; 21259 var raw = node2.raws[prop]; 21260 if (raw && raw.value === value) return raw.raw; 21261 return value; 21262 }; 21263 _proto.root = function root(node2) { 21264 this.body(node2); 21265 if (node2.raws.after) this.builder(node2.raws.after); 21266 }; 21267 _proto.rule = function rule(node2) { 21268 this.block(node2, this.rawValue(node2, "selector")); 21269 if (node2.raws.ownSemicolon) this.builder(node2.raws.ownSemicolon, node2, "end"); 21270 }; 21271 _proto.stringify = function stringify(node2, semicolon) { 21272 if (!this[node2.type]) throw new Error("Unknown AST node type " + node2.type + ". Maybe you need to change PostCSS stringifier."); 21273 this[node2.type](node2, semicolon); 21274 }; 21275 return Stringifier; 21276}(); 21277var $a44aab89caa44953$var$stringifier$1 = $a44aab89caa44953$var$Stringifier$2$1; 21278$a44aab89caa44953$var$Stringifier$2$1.default = $a44aab89caa44953$var$Stringifier$2$1; 21279var $a44aab89caa44953$var$Stringifier$1$1 = $a44aab89caa44953$var$stringifier$1; 21280function $a44aab89caa44953$var$stringify$4$1(node2, builder) { 21281 var str = new $a44aab89caa44953$var$Stringifier$1$1(builder); 21282 str.stringify(node2); 21283} 21284var $a44aab89caa44953$var$stringify_1$1 = $a44aab89caa44953$var$stringify$4$1; 21285$a44aab89caa44953$var$stringify$4$1.default = $a44aab89caa44953$var$stringify$4$1; 21286var $a44aab89caa44953$var$isClean$2$1 = $a44aab89caa44953$var$symbols$
212861.isClean, $a44aab89caa44953$var$my$2$1 = $a44aab89caa44953$var$symbols$1.my; 21287var $a44aab89caa44953$var$CssSyntaxError$2$1 = $a44aab89caa44953$var$cssSyntaxError$1; 21288var $a44aab89caa44953$var$Stringifier2$1 = $a44aab89caa44953$var$stringifier$1; 21289var $a44aab89caa44953$var$stringify$3$1 = $a44aab89caa44953$var$stringify_1$1; 21290function $a44aab89caa44953$var$cloneNode$1(obj, parent) { 21291 var cloned = new obj.constructor(); 21292 for(var i2 in obj){ 21293 if (!Object.prototype.hasOwnProperty.call(obj, i2)) continue; 21294 if (i2 === "proxyCache") continue; 21295 var value = obj[i2]; 21296 var type = typeof value === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(value); 21297 if (i2 === "parent" && type === "object") { 21298 if (parent) cloned[i2] = parent; 21299 } else if (i2 === "source") cloned[i2] = value; 21300 else if (Array.isArray(value)) cloned[i2] = value.map(function(j) { 21301 return $a44aab89caa44953$var$cloneNode$1(j, cloned); 21302 }); 21303 else { 21304 if (type === "object" && value !== null) value = $a44aab89caa44953$var$cloneNode$1(value); 21305 cloned[i2] = value; 21306 } 21307 } 21308 return cloned; 21309} 21310var $a44aab89caa44953$var$Node$4$1 = /*#__PURE__*/ function() { 21311 function Node2(defaults) { 21312 if (defaults === void 0) defaults = {}; 21313 this.raws = {}; 21314 this[$a44aab89caa44953$var$isClean$2$1] = false; 21315 this[$a44aab89caa44953$var$my$2$1] = true; 21316 for(var name in defaults)if (name === "nodes") { 21317 this.nodes = []; 21318 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(defaults[name]), _step; !(_step = _iterator()).done;){ 21319 var node2 = _step.value; 21320 if (typeof node2.clone === "function") this.append(node2.clone()); 21321 else this.append(node2); 21322 } 21323 } else this[name] = defaults[name]; 21324 } 21325 var _proto = Node2.prototype; 21326 _proto.addToError = function addToError(error) { 21327 error.postcssNode = this; 21328 if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { 21329 var s2 = this.source; 21330 error.stack = error.stack.replace(/\n\s{4}at /, "$&" + s2.input.from + ":" + s2.start.line + ":" + s2.start.column + "$&"); 21331 } 21332 return error; 21333 }; 21334 _proto.after = function after(add) { 21335 this.parent.insertAfter(this, add); 21336 return this; 21337 }; 21338 _proto.assign = function assign(overrides) { 21339 if (overrides === void 0) overrides = {}; 21340 for(var name in overrides)this[name] = overrides[name]; 21341 return this; 21342 }; 21343 _proto.before = function before(add) { 21344 this.parent.insertBefore(this, add); 21345 return this; 21346 }; 21347 _proto.cleanRaws = function cleanRaws(keepBetween) { 21348 delete this.raws.before; 21349 delete this.raws.after; 21350 if (!keepBetween) delete this.raws.between; 21351 }; 21352 _proto.clone = function clone(overrides) { 21353 if (overrides === void 0) overrides = {}; 21354 var cloned = $a44aab89caa44953$var$cloneNode$1(this); 21355 for(var name in overrides)cloned[name] = overrides[name]; 21356 return cloned; 21357 }; 21358 _proto.cloneAfter = function cloneAfter(overrides) { 21359 if (overrides === void 0) overrides = {}; 21360 var cloned = this.clone(overrides); 21361 this.parent.insertAfter(this, cloned); 21362 return cloned; 21363 }; 21364 _proto.cloneBefore = function cloneBefore(overrides) { 21365 if (overrides === void 0) overrides = {}; 21366 var cloned = this.clone(overrides); 21367 this.parent.insertBefore(this, cloned); 21368 return cloned; 21369 }; 21370 _proto.error = function error(message, opts) { 21371 if (opts === void 0) opts = {}; 21372 if (this.source) { 21373 var _this_rangeBy = this.rangeBy(opts), end = _this_rangeBy.end, start = _this_rangeBy.start; 21374 return this.source.input.error(message, { 21375 column: start.column, 21376 line: start.line 21377 }, { 21378 column: end.column, 21379 line: end.line 21380 }, opts); 21381 } 21382 return new $a44aab89caa44953$var$CssSyntaxError$2$1(message); 21383 }; 21384 _proto.getProxyProcessor = function getProxyProcessor() { 21385 return { 21386 get: function get(node2, prop) { 21387 if (prop === "proxyOf") return node2; 21388 else if (prop === "root") return function() { 21389 return node2.root().toProxy(); 21390 }; 21391 else return node2[prop]; 21392 }, 21393 set: function set(node2, prop, value) { 21394 if (node2[prop] === value) return true; 21395 node2[prop] = value; 21396 if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */ prop === "text") node2.markDirty(); 21397 return true; 21398 } 21399 }; 21400 }; 21401 _proto.markDirty = function markDirty() { 21402 if (this[$a44aab89caa44953$var$isClean$2$1]) { 21403 this[$a44aab89caa44953$var$isClean$2$1] = false;
21404 var next = this; 21405 while(next = next.parent)next[$a44aab89caa44953$var$isClean$2$1] = false; 21406 } 21407 }; 21408 _proto.next = function next() { 21409 if (!this.parent) return void 0; 21410 var index2 = this.parent.index(this); 21411 return this.parent.nodes[index2 + 1]; 21412 }; 21413 _proto.positionBy = function positionBy(opts, stringRepresentation) { 21414 var pos = this.source.start; 21415 if (opts.index) pos = this.positionInside(opts.index, stringRepresentation); 21416 else if (opts.word) { 21417 stringRepresentation = this.toString(); 21418 var index2 = stringRepresentation.indexOf(opts.word); 21419 if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation); 21420 } 21421 return pos; 21422 }; 21423 _proto.positionInside = function positionInside(index2, stringRepresentation) { 21424 var string = stringRepresentation || this.toString(); 21425 var column = this.source.start.column; 21426 var line = this.source.start.line; 21427 for(var i2 = 0; i2 < index2; i2++)if (string[i2] === "\n") { 21428 column = 1; 21429 line += 1; 21430 } else column += 1; 21431 return { 21432 column: column, 21433 line: line 21434 }; 21435 }; 21436 _proto.prev = function prev() { 21437 if (!this.parent) return void 0; 21438 var index2 = this.parent.index(this); 21439 return this.parent.nodes[index2 - 1]; 21440 }; 21441 _proto.rangeBy = function rangeBy(opts) { 21442 var start = { 21443 column: this.source.start.column, 21444 line: this.source.start.line 21445 }; 21446 var end = this.source.end ? { 21447 column: this.source.end.column + 1, 21448 line: this.source.end.line 21449 } : { 21450 column: start.column + 1, 21451 line: start.line 21452 }; 21453 if (opts.word) { 21454 var stringRepresentation = this.toString(); 21455 var index2 = stringRepresentation.indexOf(opts.word); 21456 if (index2 !== -1) { 21457 start = this.positionInside(index2, stringRepresentation); 21458 end = this.positionInside(index2 + opts.word.length, stringRepresentation); 21459 } 21460 } else { 21461 if (opts.start) start = { 21462 column: opts.start.column, 21463 line: opts.start.line 21464 }; 21465 else if (opts.index) start = this.positionInside(opts.index); 21466 if (opts.end) end = { 21467 column: opts.end.column, 21468 line: opts.end.line 21469 }; 21470 else if (typeof opts.endIndex === "number") end = this.positionInside(opts.endIndex); 21471 else if (opts.index) end = this.positionInside(opts.index + 1); 21472 } 21473 if (end.line < start.line || end.line === start.line && end.column <= start.column) end = { 21474 column: start.column + 1, 21475 line: start.line 21476 }; 21477 return { 21478 end: end, 21479 start: start 21480 }; 21481 }; 21482 _proto.raw = function raw(prop, defaultType) { 21483 var str = new $a44aab89caa44953$var$Stringifier2$1(); 21484 return str.raw(this, prop, defaultType); 21485 }; 21486 _proto.remove = function remove() { 21487 if (this.parent) this.parent.removeChild(this); 21488 this.parent = void 0; 21489 return this; 21490 }; 21491 _proto.replaceWith = function replaceWith() { 21492 for(var _len = arguments.length, nodes = new Array(_len), _key = 0; _key < _len; _key++)nodes[_key] = arguments[_key]; 21493 if (this.parent) { 21494 var bookmark = this; 21495 var foundSelf = false; 21496 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 21497 var node2 = _step.value; 21498 if (node2 === this) foundSelf = true; 21499 else if (foundSelf) { 21500 this.parent.insertAfter(bookmark, node2); 21501 bookmark = node2; 21502 } else this.parent.insertBefore(bookmark, node2); 21503 } 21504 if (!foundSelf) this.remove(); 21505 } 21506 return this; 21507 }; 21508 _proto.root = function root() { 21509 var result2 = this; 21510 while(result2.parent && result2.parent.type !== "document")result2 = result2.parent; 21511 return result2; 21512 }; 21513 _proto.toJSON = function toJSON(_, inputs) { 21514 var fixed = {};
21515 var emitInputs = inputs == null; 21516 inputs = inputs || /* @__PURE__ */ new Map(); 21517 var inputsNextIndex = 0; 21518 for(var name in this){ 21519 if (!Object.prototype.hasOwnProperty.call(this, name)) continue; 21520 if (name === "parent" || name === "proxyCache") continue; 21521 var value = this[name]; 21522 if (Array.isArray(value)) fixed[name] = value.map(function(i2) { 21523 if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && i2.toJSON) return i2.toJSON(null, inputs); 21524 else return i2; 21525 }); 21526 else if ((typeof value === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(value)) === "object" && value.toJSON) fixed[name] = value.toJSON(null, inputs); 21527 else if (name === "source") { 21528 var inputId = inputs.get(value.input); 21529 if (inputId == null) { 21530 inputId = inputsNextIndex; 21531 inputs.set(value.input, inputsNextIndex); 21532 inputsNextIndex++; 21533 } 21534 fixed[name] = { 21535 end: value.end, 21536 inputId: inputId, 21537 start: value.start 21538 }; 21539 } else fixed[name] = value; 21540 } 21541 if (emitInputs) fixed.inputs = [].concat(inputs.keys()).map(function(input2) { 21542 return input2.toJSON(); 21543 }); 21544 return fixed; 21545 }; 21546 _proto.toProxy = function toProxy() { 21547 if (!this.proxyCache) this.proxyCache = new Proxy(this, this.getProxyProcessor()); 21548 return this.proxyCache; 21549 }; 21550 _proto.toString = function toString(stringifier2) { 21551 if (stringifier2 === void 0) stringifier2 = $a44aab89caa44953$var$stringify$3$1; 21552 if (stringifier2.stringify) stringifier2 = stringifier2.stringify; 21553 var result2 = ""; 21554 stringifier2(this, function(i2) { 21555 result2 += i2; 21556 }); 21557 return result2; 21558 }; 21559 _proto.warn = function warn(result2, text, opts) { 21560 var data = { 21561 node: this 21562 }; 21563 for(var i2 in opts)data[i2] = opts[i2]; 21564 return result2.warn(text, data); 21565 }; 21566 $a44aab89caa44953$var$_create_class(Node2, [ 21567 { 21568 key: "proxyOf", 21569 get: function get() { 21570 return this; 21571 } 21572 } 21573 ]); 21574 return Node2; 21575}(); 21576var $a44aab89caa44953$var$node$1 = $a44aab89caa44953$var$Node$4$1; 21577$a44aab89caa44953$var$Node$4$1.default = $a44aab89caa44953$var$Node$4$1; 21578var $a44aab89caa44953$var$Node$3$1 = $a44aab89caa44953$var$node$1; 21579var $a44aab89caa44953$var$Declaration$4$1 = /*#__PURE__*/ function(Node$3$1) { 21580 $a44aab89caa44953$var$_inherits(Declaration, Node$3$1); 21581 function Declaration(defaults) { 21582 var _this; 21583 if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") defaults = $a44aab89caa44953$var$_extends({}, defaults, { 21584 value: String(defaults.value) 21585 }); 21586 _this = Node$3$1.call(this, defaults) || this; 21587 _this.type = "decl"; 21588 return _this; 21589 } 21590 $a44aab89caa44953$var$_create_class(Declaration, [ 21591 { 21592 key: "variable", 21593 get: function get() { 21594 return this.prop.startsWith("--") || this.prop[0] === "$"; 21595 } 21596 } 21597 ]); 21598 return Declaration; 21599}($a44aab89caa44953$var$Node$3$1); 21600var $a44aab89caa44953$var$declaration$1 = $a44aab89caa44953$var$Declaration$4$1; 21601$a44aab89caa44953$var$Declaration$4$1.default = $a44aab89caa44953$var$Declaration$4$1; 21602var $a44aab89caa44953$var$urlAlphabet$1 = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; 21603var $a44aab89caa44953$var$nanoid$1$1 = function(size) { 21604 if (size === void 0) size = 21; 21605 var id = ""; 21606 var i2 = size; 21607 while(i2--)id += $a44aab89caa44953$var$urlAlphabet$1[Math.random() * 64 | 0]; 21608 return id; 21609}; 21610var $a44aab89caa44953$var$nonSecure$1 = { 21611 nanoid: $a44aab89caa44953$var$nanoid$1$1 21612}; 21613var $a44aab89caa44953$var$SourceMapConsumer$2$1 = $a44aab89caa44953$var$require$$2$1.SourceMapConsumer, $a44aab89caa44953$var$SourceMapGenerator$2$1 = $a44aab89caa44953$var$require$$2$1.SourceMapGenerator; 21614var $a44aab89caa44953$var$existsSync$1 = $a44aab89caa44953$var$require$$2$1.existsSync, $a44aab89caa44953$var$readFileSync$1 = $a44aab89caa44953$var$require$$2$1.readFileSync; 21615var $a44aab89caa44953$var$dirname$1$1 = $a44aab89caa44953$var$require$$2$1.dirname, $a44aab89caa44953$var$join$1 = $a44aab89caa44953$var$require$$2$1.join; 21616function $a44aab89caa44953$var$fromBase64$1(str) { 21617 if ($a44aab89caa44953$require$Buffer) return $a44aab89caa44953$require$Buffer.from(str, "base64").toString(); 21618 else return window.atob(str); 21619} 21620var $a44aab89caa44953$var$PreviousMap$2$1 = /*#__PURE__*/ function() { 21621 function PreviousMap(css, opts) { 21622 if (opts.map === false) return; 21623 this.loadAnnotation(css); 21624 this.inline = this.startWith(this.annotation, "data:"); 21625 var prev = opts.map ? opts.map.prev : void 0; 21626 var text = this.loadMap(opts.from, prev); 21627 if (!this.mapFile && opts.from) this.mapFile = opts.from; 21628 if (this.mapFile) this.root = $a44aab89caa44953$var$dirname$1$1(this.mapFile); 21629 if (text) this.text = text; 21630 } 21631 var _proto = PreviousMap.prototype; 21632 _proto.consumer = function consumer() { 21633 if (!this.consumerCache) this.consumerCache = new $a44aab89caa44953$var$SourceMapConsumer$2$1(this.text); 21634 return this.consumerCache; 21635 }; 21636 _proto.decodeInline = function decodeInline(text) { 21637 var baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; 21638 var baseUri = /^data:application\/json;base64,/; 21639 var charsetUri = /^data:application\/json;charset=utf-?8,/; 21640 var uri = /^data:application\/json,/; 21641 if (charsetUri.test(text) || uri.test(text)) return decodeURIComponent(text.substr(RegExp.lastMatch.length)); 21642 if (baseCharsetUri.test(text) || baseUri.test(text)) return $a44aab89caa44953$var$fromBase64$1(text.substr(RegExp.lastMatch.length)); 21643 var encoding = text.match(/data:application\/json;([^,]+),/)[1]; 21644 throw new Error("Unsupported source map encoding " + encoding); 21645 }; 21646 _proto.getAnnotationURL = function getAnnotationURL(sourceMapString) { 21647 return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim(); 21648 }; 21649 _proto.isMap = function isMap(map) { 21650 if ((typeof map === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(map)) !== "object") return false;
21651 return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections); 21652 }; 21653 _proto.loadAnnotation = function loadAnnotation(css) { 21654 var comments = css.match(/\/\*\s*# sourceMappingURL=/gm); 21655 if (!comments) return; 21656 var start = css.lastIndexOf(comments.pop()); 21657 var end = css.indexOf("*/", start); 21658 if (start > -1 && end > -1) this.annotation = this.getAnnotationURL(css.substring(start, end)); 21659 }; 21660 _proto.loadFile = function loadFile(path) { 21661 this.root = $a44aab89caa44953$var$dirname$1$1(path); 21662 if ($a44aab89caa44953$var$existsSync$1(path)) { 21663 this.mapFile = path; 21664 return $a44aab89caa44953$var$readFileSync$1(path, "utf-8").toString().trim(); 21665 } 21666 }; 21667 _proto.loadMap = function loadMap(file, prev) { 21668 if (prev === false) return false; 21669 if (prev) { 21670 if (typeof prev === "string") return prev; 21671 else if (typeof prev === "function") { 21672 var prevPath = prev(file); 21673 if (prevPath) { 21674 var map = this.loadFile(prevPath); 21675 if (!map) throw new Error("Unable to load previous source map: " + prevPath.toString()); 21676 return map; 21677 } 21678 } else if ($a44aab89caa44953$var$_instanceof(prev, $a44aab89caa44953$var$SourceMapConsumer$2$1)) return $a44aab89caa44953$var$SourceMapGenerator$2$1.fromSourceMap(prev).toString(); 21679 else if ($a44aab89caa44953$var$_instanceof(prev, $a44aab89caa44953$var$SourceMapGenerator$2$1)) return prev.toString(); 21680 else if (this.isMap(prev)) return JSON.stringify(prev); 21681 else throw new Error("Unsupported previous source map format: " + prev.toString()); 21682 } else if (this.inline) return this.decodeInline(this.annotation); 21683 else if (this.annotation) { 21684 var map1 = this.annotation; 21685 if (file) map1 = $a44aab89caa44953$var$join$1($a44aab89caa44953$var$dirname$1$1(file), map1); 21686 return this.loadFile(map1); 21687 } 21688 }; 21689 _proto.startWith = function startWith(string, start) { 21690 if (!string) return false; 21691 return string.substr(0, start.length) === start; 21692 }; 21693 _proto.withContent = function withContent() { 21694 return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0); 21695 }; 21696 return PreviousMap; 21697}(); 21698var $a44aab89caa44953$var$previousMap$1 = $a44aab89caa44953$var$PreviousMap$2$1; 21699$a44aab89caa44953$var$PreviousMap$2$1.default = $a44aab89caa44953$var$PreviousMap$2$1; 21700var $a44aab89caa44953$var$SourceMapConsumer$1$1 = $a44aab89caa44953$var$require$$2$1.SourceMapConsumer, $a44aab89caa44953$var$SourceMapGenerator$1$1 = $a44aab89caa44953$var$require$$2$1.SourceMapGenerator; 21701var $a44aab89caa44953$var$fileURLToPath$1 = $a44aab89caa44953$var$require$$2$1.fileURLToPath, $a44aab89caa44953$var$pathToFileURL$1$1 = $a44aab89caa44953$var$require$$2$1.pathToFileURL; 21702var $a44aab89caa44953$var$isAbsolute$1 = $a44aab89caa44953$var$require$$2$1.isAbsolute, $a44aab89caa44953$var$resolve$1$1 = $a44aab89caa44953$var$require$$2$1.resolve; 21703var $a44aab89caa44953$var$nanoid$2 = $a44aab89caa44953$var$nonSecure$1.nanoid; 21704var $a44aab89caa44953$var$terminalHighlight$2 = $a44aab89caa44953$var$require$$2$1; 21705var $a44aab89caa44953$var$CssSyntaxError$1$1 = $a44aab89caa44953$var$cssSyntaxError$1; 21706var $a44aab89caa44953$var$PreviousMap$1$1 = $a44aab89caa44953$var$previousMap$1;
21707var $a44aab89caa44953$var$fromOffsetCache$1 = Symbol("fromOffsetCache"); 21708var $a44aab89caa44953$var$sourceMapAvailable$1$1 = Boolean($a44aab89caa44953$var$SourceMapConsumer$1$1 && $a44aab89caa44953$var$SourceMapGenerator$1$1); 21709var $a44aab89caa44953$var$pathAvailable$1$1 = Boolean($a44aab89caa44953$var$resolve$1$1 && $a44aab89caa44953$var$isAbsolute$1); 21710var $a44aab89caa44953$var$Input$4$1 = /*#__PURE__*/ function() { 21711 function Input(css, opts) { 21712 if (opts === void 0) opts = {}; 21713 if (css === null || typeof css === "undefined" || (typeof css === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(css)) === "object" && !css.toString) throw new Error("PostCSS received " + css + " instead of CSS string"); 21714 this.css = css.toString(); 21715 if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") { 21716 this.hasBOM = true; 21717 this.css = this.css.slice(1); 21718 } else this.hasBOM = false; 21719 if (opts.from) { 21720 if (!$a44aab89caa44953$var$pathAvailable$1$1 || /^\w+:\/\//.test(opts.from) || $a44aab89caa44953$var$isAbsolute$1(opts.from)) this.file = opts.from; 21721 else this.file = $a44aab89caa44953$var$resolve$1$1(opts.from); 21722 } 21723 if ($a44aab89caa44953$var$pathAvailable$1$1 && $a44aab89caa44953$var$sourceMapAvailable$1$1) { 21724 var map = new $a44aab89caa44953$var$PreviousMap$1$1(this.css, opts); 21725 if (map.text) { 21726 this.map = map; 21727 var file = map.consumer().file; 21728 if (!this.file && file) this.file = this.mapResolve(file); 21729 } 21730 } 21731 if (!this.file) this.id = "<input css " + $a44aab89caa44953$var$nanoid$2(6) + ">"; 21732 if (this.map) this.map.file = this.from; 21733 } 21734 var _proto = Input.prototype; 21735 _proto.error = function error(message, line, column, opts) { 21736 if (opts === void 0) opts = {}; 21737 var result2, endLine, endColumn; 21738 if (line && (typeof line === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(line)) === "object") { 21739 var start = line; 21740 var end = column; 21741 if (typeof start.offset === "number") { 21742 var pos = this.fromOffset(start.offset); 21743 line = pos.line; 21744 column = pos.col; 21745 } else { 21746 line = start.line; 21747 column = start.column; 21748 } 21749 if (typeof end.offset === "number") { 21750 var pos1 = this.fromOffset(end.offset); 21751 endLine = pos1.line; 21752 endColumn = pos1.col; 21753 } else { 21754 endLine = end.line; 21755 endColumn = end.column; 21756 } 21757 } else if (!column) { 21758 var pos2 = this.fromOffset(line); 21759 line = pos2.line; 21760 column = pos2.col; 21761 } 21762 var origin = this.origin(line, column, endLine, endColumn); 21763 if (origin) result2 = new $a44aab89caa44953$var$CssSyntaxError$1$1(message, origin.endLine === void 0 ? origin.line : { 21764 column: origin.column, 21765 line: origin.line 21766 }, origin.endLine === void 0 ? origin.column : { 21767 column: origin.endColumn, 21768 line: origin.endLine 21769 }, origin.source, origin.file, opts.plugin); 21770 else result2 = new $a44aab89caa44953$var$CssSyntaxError$1$1(message, endLine === void 0 ? line : { 21771 column: column, 21772 line: line 21773 }, endLine === void 0 ? column : { 21774 column: endColumn, 21775 line: endLine 21776 }, this.css, this.file, opts.plugin); 21777 result2.input = { 21778 column: column, 21779 endColumn: endColumn, 21780 endLine: endLine, 21781 line: line, 21782 source: this.css 21783 }; 21784 if (this.file) { 21785 if ($a44aab89caa44953$var$pathToFileURL$1$1) result2.input.url = $a44aab89caa44953$var$pathToFileURL$1$1(this.file).toString(); 21786 result2.input.file = this.file; 21787 } 21788 return result2; 21789 }; 21790 _proto.fromOffset = function fromOffset(offset) { 21791 var lastLine, lineToIndex;
21792 if (!this[$a44aab89caa44953$var$fromOffsetCache$1]) { 21793 var lines = this.css.split("\n"); 21794 lineToIndex = new Array(lines.length); 21795 var prevIndex = 0; 21796 for(var i2 = 0, l2 = lines.length; i2 < l2; i2++){ 21797 lineToIndex[i2] = prevIndex; 21798 prevIndex += lines[i2].length + 1; 21799 } 21800 this[$a44aab89caa44953$var$fromOffsetCache$1] = lineToIndex; 21801 } else lineToIndex = this[$a44aab89caa44953$var$fromOffsetCache$1]; 21802 lastLine = lineToIndex[lineToIndex.length - 1]; 21803 var min = 0; 21804 if (offset >= lastLine) min = lineToIndex.length - 1; 21805 else { 21806 var max = lineToIndex.length - 2; 21807 var mid; 21808 while(min < max){ 21809 mid = min + (max - min >> 1); 21810 if (offset < lineToIndex[mid]) max = mid - 1; 21811 else if (offset >= lineToIndex[mid + 1]) min = mid + 1; 21812 else { 21813 min = mid; 21814 break; 21815 } 21816 } 21817 } 21818 return { 21819 col: offset - lineToIndex[min] + 1, 21820 line: min + 1 21821 }; 21822 }; 21823 _proto.mapResolve = function mapResolve(file) { 21824 if (/^\w+:\/\//.test(file)) return file; 21825 return $a44aab89caa44953$var$resolve$1$1(this.map.consumer().sourceRoot || this.map.root || ".", file); 21826 }; 21827 _proto.origin = function origin(line, column, endLine, endColumn) { 21828 if (!this.map) return false; 21829 var consumer = this.map.consumer(); 21830 var from = consumer.originalPositionFor({ 21831 column: column, 21832 line: line 21833 }); 21834 if (!from.source) return false; 21835 var to; 21836 if (typeof endLine === "number") to = consumer.originalPositionFor({ 21837 column: endColumn, 21838 line: endLine 21839 }); 21840 var fromUrl; 21841 if ($a44aab89caa44953$var$isAbsolute$1(from.source)) fromUrl = $a44aab89caa44953$var$pathToFileURL$1$1(from.source); 21842 else fromUrl = new URL(from.source, this.map.consumer().sourceRoot || $a44aab89caa44953$var$pathToFileURL$1$1(this.map.mapFile)); 21843 var result2 = { 21844 column: from.column, 21845 endColumn: to && to.column, 21846 endLine: to && to.line, 21847 line: from.line, 21848 url: fromUrl.toString() 21849 }; 21850 if (fromUrl.protocol === "file:") { 21851 if ($a44aab89caa44953$var$fileURLToPath$1) result2.file = $a44aab89caa44953$var$fileURLToPath$1(fromUrl); 21852 else throw new Error("file: protocol is not available in this PostCSS build"); 21853 } 21854 var source = consumer.sourceContentFor(from.source); 21855 if (source) result2.source = source; 21856 return result2; 21857 }; 21858 _proto.toJSON = function toJSON() { 21859 var json = {}; 21860 for(var _i = 0, _iter = [ 21861 "hasBOM", 21862 "css", 21863 "file", 21864 "id" 21865 ]; _i < _iter.length; _i++){ 21866 var name = _iter[_i]; 21867 if (this[name] != null) json[name] = this[name]; 21868 } 21869 if (this.map) { 21870 json.map = $a44aab89caa44953$var$_extends({}, this.map); 21871 if (json.map.consumerCache) json.map.consumerCache = void 0; 21872 } 21873 return json; 21874 }; 21875 $a44aab89caa44953$var$_create_class(Input, [ 21876 { 21877 key: "from", 21878 get: function get() { 21879 return this.file || this.id; 21880 } 21881 } 21882 ]); 21883 return Input; 21884}(); 21885var $a44aab89caa44953$var$input$1 = $a44aab89caa44953$var$Input$4$1; 21886$a44aab89caa44953$var$Input$4$1.default = $a44aab89caa44953$var$Input$4$1; 21887if ($a44aab89caa44953$var$terminalHighlight$2 && $a44aab89caa44953$var$terminalHighlight$2.registerInput) $a44aab89caa44953$var$terminalHighlight$2.registerInput($a44aab89caa44953$var$Input$4$1); 21888var $a44aab89caa44953$var$SourceMapConsumer$3 = $a44aab89caa44953$var$require$$2$1.SourceMapConsumer, $a44aab89caa44953$var$SourceMapGenerator$3 = $a44aab89caa44953$var$require$$2$1.SourceMapGenerator; 21889var $a44aab89caa44953$var$dirname$2 = $a44aab89caa44953$var$require$$2$1.dirname, $a44aab89caa44953$var$relative$1 = $a44aab89caa44953$var$require$$2$1.relative, $a44aab89caa44953$var$resolve$2 = $a44aab89caa44953$var$require$$2$1.resolve, $a44aab89caa44953$var$sep$1 = $a44aab89caa44953$var$require$$2$1.sep; 21890var $a44aab89caa44953$var$pathToFileURL$2 = $a44aab89caa44953$var$require$$2$1.pathToFileURL; 21891var $a44aab89caa44953$var$Input$3$1 = $a44aab89caa44953$var$input$1; 21892var $a44aab89caa44953$var$sourceMapAvailable$2 = Boolean($a44aab89caa44953$var$SourceMapConsumer$3 && $a44aab89caa44953$var$SourceMapGenerator$3); 21893var $a44aab89caa44953$var$pathAvailable$2 = Boolean($a44aab89caa44953$var$dirname$2 && $a44aab89caa44953$var$resolve$2 && $a44aab89caa44953$var$relative$1 && $a44aab89caa44953$var$sep$1); 21894var $a44aab89caa44953$var$MapGenerator$2$1 = /*#__PURE__*/ function() { 21895 function MapGenerator(stringify2, root2, opts, cssString) { 21896 this.stringify = stringify2; 21897 this.mapOpts = opts.map || {}; 21898 this.root = root2; 21899 this.opts = opts; 21900 this.css = cssString; 21901 this.originalCSS = cssString; 21902 this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute; 21903 this.memoizedFileURLs = /* @__PURE__ */ new Map(); 21904 this.memoizedPaths = /* @__PURE__ */ new Map(); 21905 this.memoizedURLs = /* @__PURE__ */ new Map(); 21906 } 21907 var _proto = MapGenerator.prototype; 21908 _proto.addAnnotation = function addAnnotation() { 21909 var content; 21910 if (this.isInline()) content = "data:application/json;base64," + this.toBase64(this.map.toString()); 21911 else if (typeof this.mapOpts.annotation === "string") content = this.mapOpts.annotation; 21912 else if (typeof this.mapOpts.annotation === "function") content = this.mapOpts.annotation(this.opts.to, this.root); 21913 else content = this.outputFile() + ".map"; 21914 var eol = "\n"; 21915 if (this.css.includes("\r\n")) eol = "\r\n"; 21916 this.css += eol + "/*# sourceMappingURL=" + content + " */"; 21917 }; 21918 _proto.applyPrevMaps = function applyPrevMaps() { 21919 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.previous()), _step; !(_step = _iterator()).done;){ 21920 var prev = _step.value; 21921 var from = this.toUrl(this.path(prev.file)); 21922 var root2 = prev.root || $a44aab89caa44953$var$dirname$2(prev.file); 21923 var map = void 0; 21924 if (this.mapOpts.sourcesContent === false) { 21925 map = new $a44aab89caa44953$var$SourceMapConsumer$3(prev.text); 21926 if (map.sourcesContent) map.sourcesContent = null; 21927 } else map = prev.consumer(); 21928 this.map.applySourceMap(map, from, this.toUrl(this.path(root2))); 21929 } 21930 }; 21931 _proto.clearAnnotation = function clearAnnotation() { 21932 if (this.mapOpts.annotation === false) return; 21933 if (this.root) { 21934 var node2; 21935 for(var i2 = this.root.nodes.length - 1; i2 >= 0; i2--){ 21936 node2 = this.root.nodes[i2]; 21937 if (node2.type !== "comment") continue; 21938 if (node2.text.indexOf("# sourceMappingURL=") === 0) this.root.removeChild(i2); 21939 } 21940 } else if (this.css) this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, ""); 21941 }; 21942 _proto.generate = function generate() { 21943 this.clearAnnotation(); 21944 if ($a44aab89caa44953$var$pathAvailable$2 && $a44aab89caa44953$var$sourceMapAvailable$2 && this.isMap()) return this.generateMap(); 21945 else { 21946 var result2 = ""; 21947 this.stringify(this.root, function(i2) { 21948 result2 += i2; 21949 }); 21950 return [ 21951 result2 21952 ]; 21953 } 21954 }; 21955 _proto.generateMap = function generateMap() { 21956 if (this.root) this.generateString(); 21957 else if (this.previous().length === 1) { 21958 var prev = this.previous()[0].consumer(); 21959 prev.file = this.outputFile(); 21960 this.map = $a44aab89caa44953$var$SourceMapGenerator$3.fromSourceMap(prev, { 21961 ignoreInvalidMapping: true 21962 }); 21963 } else { 21964 this.map = new $a44aab89caa44953$var$SourceMapGenerator$3({ 21965 file: this.outputFile(), 21966 ignoreInvalidMapping: true 21967 }); 21968 this.map.addMapping({ 21969 generated: { 21970 column: 0, 21971 line: 1 21972 }, 21973 original: { 21974 column: 0, 21975 line: 1 21976 }, 21977 source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" 21978 }); 21979 } 21980 if (this.isSourcesContent()) this.setSourcesContent(); 21981 if (this.root && this.previous().length > 0) this.applyPrevMaps(); 21982 if (this.isAnnotation()) this.addAnnotation(); 21983 if (this.isInline()) return [ 21984 this.css 21985 ]; 21986 else return [ 21987 this.css, 21988 this.map 21989 ]; 21990 }; 21991 _proto.generateString = function generateString() { 21992 var _this = this; 21993 this.css = ""; 21994 this.map = new $a44aab89caa44953$var$SourceMapGenerator$3({ 21995 file: this.outputFile(), 21996 ignoreInvalidMapping: true 21997 }); 21998 var line = 1; 21999 var column = 1; 22000 var noSource = "<no source>"; 22001 var mapping = { 22002 generated: { 22003 column: 0, 22004 line: 0 22005 }, 22006 original: { 22007 column: 0, 22008 line: 0 22009 }, 22010 source: "" 22011 }; 22012 var lines, last; 22013 this.stringify(this.root, function(str, node2, type) { 22014 _this.css += str; 22015 if (node2 && type !== "end") { 22016 mapping.generated.line = line; 22017 mapping.generated.column = column - 1;
22018 if (node2.source && node2.source.start) { 22019 mapping.source = _this.sourcePath(node2); 22020 mapping.original.line = node2.source.start.line; 22021 mapping.original.column = node2.source.start.column - 1; 22022 _this.map.addMapping(mapping); 22023 } else { 22024 mapping.source = noSource; 22025 mapping.original.line = 1; 22026 mapping.original.column = 0; 22027 _this.map.addMapping(mapping); 22028 } 22029 } 22030 lines = str.match(/\n/g); 22031 if (lines) { 22032 line += lines.length; 22033 last = str.lastIndexOf("\n"); 22034 column = str.length - last; 22035 } else column += str.length; 22036 if (node2 && type !== "start") { 22037 var p = node2.parent || { 22038 raws: {} 22039 }; 22040 var childless = node2.type === "decl" || node2.type === "atrule" && !node2.nodes; 22041 if (!childless || node2 !== p.last || p.raws.semicolon) { 22042 if (node2.source && node2.source.end) { 22043 mapping.source = _this.sourcePath(node2); 22044 mapping.original.line = node2.source.end.line; 22045 mapping.original.column = node2.source.end.column - 1; 22046 mapping.generated.line = line; 22047 mapping.generated.column = column - 2; 22048 _this.map.addMapping(mapping); 22049 } else { 22050 mapping.source = noSource; 22051 mapping.original.line = 1; 22052 mapping.original.column = 0; 22053 mapping.generated.line = line; 22054 mapping.generated.column = column - 1; 22055 _this.map.addMapping(mapping); 22056 } 22057 } 22058 } 22059 }); 22060 }; 22061 _proto.isAnnotation = function isAnnotation() { 22062 if (this.isInline()) return true; 22063 if (typeof this.mapOpts.annotation !== "undefined") return this.mapOpts.annotation; 22064 if (this.previous().length) return this.previous().some(function(i2) { 22065 return i2.annotation; 22066 }); 22067 return true; 22068 }; 22069 _proto.isInline = function isInline() { 22070 if (typeof this.mapOpts.inline !== "undefined") return this.mapOpts.inline; 22071 var annotation = this.mapOpts.annotation; 22072 if (typeof annotation !== "undefined" && annotation !== true) return false; 22073 if (this.previous().length) return this.previous().some(function(i2) { 22074 return i2.inline; 22075 }); 22076 return true; 22077 }; 22078 _proto.isMap = function isMap() { 22079 if (typeof this.opts.map !== "undefined") return !!this.opts.map; 22080 return this.previous().length > 0; 22081 }; 22082 _proto.isSourcesContent = function isSourcesContent() { 22083 if (typeof this.mapOpts.sourcesContent !== "undefined") return this.mapOpts.sourcesContent; 22084 if (this.previous().length) return this.previous().some(function(i2) { 22085 return i2.withContent(); 22086 }); 22087 return true; 22088 }; 22089 _proto.outputFile = function outputFile() { 22090 if (this.opts.to) return this.path(this.opts.to); 22091 else if (this.opts.from) return this.path(this.opts.from); 22092 else return "to.css"; 22093 }; 22094 _proto.path = function path(file) { 22095 if (this.mapOpts.absolute) return file; 22096 if (file.charCodeAt(0) === 60) return file; 22097 if (/^\w+:\/\//.test(file)) return file; 22098 var cached = this.memoizedPaths.get(file); 22099 if (cached) return cached; 22100 var from = this.opts.to ? $a44aab89caa44953$var$dirname$2(this.opts.to) : "."; 22101 if (typeof this.mapOpts.annotation === "string") from = $a44aab89caa44953$var$dirname$2($a44aab89caa44953$var$resolve$2(from, this.mapOpts.annotation)); 22102 var path = $a44aab89caa44953$var$relative$1(from, file); 22103 this.memoizedPaths.set(file, path); 22104 return path; 22105 }; 22106 _proto.previous = function previous() { 22107 var _this = this; 22108 if (!this.previousMaps) { 22109 this.previousMaps = []; 22110 if (this.root) this.root.walk(function(node2) {
22111 if (node2.source && node2.source.input.map) { 22112 var map = node2.source.input.map; 22113 if (!_this.previousMaps.includes(map)) _this.previousMaps.push(map); 22114 } 22115 }); 22116 else { 22117 var input2 = new $a44aab89caa44953$var$Input$3$1(this.originalCSS, this.opts); 22118 if (input2.map) this.previousMaps.push(input2.map); 22119 } 22120 } 22121 return this.previousMaps; 22122 }; 22123 _proto.setSourcesContent = function setSourcesContent() { 22124 var _this = this; 22125 var already = {}; 22126 if (this.root) this.root.walk(function(node2) { 22127 if (node2.source) { 22128 var from = node2.source.input.from; 22129 if (from && !already[from]) { 22130 already[from] = true; 22131 var fromUrl = _this.usesFileUrls ? _this.toFileUrl(from) : _this.toUrl(_this.path(from)); 22132 _this.map.setSourceContent(fromUrl, node2.source.input.css); 22133 } 22134 } 22135 }); 22136 else if (this.css) { 22137 var from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"; 22138 this.map.setSourceContent(from, this.css); 22139 } 22140 }; 22141 _proto.sourcePath = function sourcePath(node2) { 22142 if (this.mapOpts.from) return this.toUrl(this.mapOpts.from); 22143 else if (this.usesFileUrls) return this.toFileUrl(node2.source.input.from); 22144 else return this.toUrl(this.path(node2.source.input.from)); 22145 }; 22146 _proto.toBase64 = function toBase64(str) { 22147 if ($a44aab89caa44953$require$Buffer) return $a44aab89caa44953$require$Buffer.from(str).toString("base64"); 22148 else return window.btoa(unescape(encodeURIComponent(str))); 22149 }; 22150 _proto.toFileUrl = function toFileUrl(path) { 22151 var cached = this.memoizedFileURLs.get(path); 22152 if (cached) return cached; 22153 if ($a44aab89caa44953$var$pathToFileURL$2) { 22154 var fileURL = $a44aab89caa44953$var$pathToFileURL$2(path).toString(); 22155 this.memoizedFileURLs.set(path, fileURL); 22156 return fileURL; 22157 } else throw new Error("`map.absolute` option is not available in this PostCSS build"); 22158 }; 22159 _proto.toUrl = function toUrl(path) { 22160 var cached = this.memoizedURLs.get(path); 22161 if (cached) return cached; 22162 if ($a44aab89caa44953$var$sep$1 === "\\") path = path.replace(/\\/g, "/"); 22163 var url = encodeURI(path).replace(/[#?]/g, encodeURIComponent); 22164 this.memoizedURLs.set(path, url); 22165 return url; 22166 }; 22167 return MapGenerator; 22168}(); 22169var $a44aab89caa44953$var$mapGenerator$1 = $a44aab89caa44953$var$MapGenerator$2$1; 22170var $a44aab89caa44953$var$Node$2$1 = $a44aab89caa44953$var$node$1; 22171var $a44aab89caa44953$var$Comment$4$1 = /*#__PURE__*/ function(Node$2$1) { 22172 $a44aab89caa44953$var$_inherits(Comment, Node$2$1); 22173 function Comment(defaults) { 22174 var _this; 22175 _this = Node$2$1.call(this, defaults) || this; 22176 _this.type = "comment"; 22177 return _this; 22178 } 22179 return Comment; 22180}($a44aab89caa44953$var$Node$2$1); 22181var $a44aab89caa44953$var$comment$1 = $a44aab89caa44953$var$Comment$4$1; 22182$a44aab89caa44953$var$Comment$4$1.default = $a44aab89caa44953$var$Comment$4$1; 22183var $a44aab89caa44953$var$isClean$1$1 = $a44aab89caa44953$var$symbols$
221831.isClean, $a44aab89caa44953$var$my$1$1 = $a44aab89caa44953$var$symbols$1.my; 22184var $a44aab89caa44953$var$Declaration$3$1 = $a44aab89caa44953$var$declaration$1; 22185var $a44aab89caa44953$var$Comment$3$1 = $a44aab89caa44953$var$comment$1; 22186var $a44aab89caa44953$var$Node$1$1 = $a44aab89caa44953$var$node$1; 22187var $a44aab89caa44953$var$parse$4$1, $a44aab89caa44953$var$Rule$4$1, $a44aab89caa44953$var$AtRule$4$1, $a44aab89caa44953$var$Root$6$1; 22188function $a44aab89caa44953$var$cleanSource$1(nodes) { 22189 return nodes.map(function(i2) { 22190 if (i2.nodes) i2.nodes = $a44aab89caa44953$var$cleanSource$1(i2.nodes); 22191 delete i2.source; 22192 return i2; 22193 }); 22194} 22195function $a44aab89caa44953$var$markDirtyUp$1(node2) { 22196 node2[$a44aab89caa44953$var$isClean$1$1] = false; 22197 if (node2.proxyOf.nodes) for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(node2.proxyOf.nodes), _step; !(_step = _iterator()).done;){ 22198 var i2 = _step.value; 22199 $a44aab89caa44953$var$markDirtyUp$1(i2); 22200 } 22201} 22202var $a44aab89caa44953$var$Container$7$1 = /*#__PURE__*/ function(Node$1$1) { 22203 $a44aab89caa44953$var$_inherits(Container, Node$1$1); 22204 function Container() { 22205 return Node$1$1.apply(this, arguments) || this; 22206 } 22207 var _proto = Container.prototype; 22208 _proto.append = function append() { 22209 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 22210 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(children), _step; !(_step = _iterator()).done;){ 22211 var child = _step.value; 22212 var nodes = this.normalize(child, this.last); 22213 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step1; !(_step1 = _iterator1()).done;){ 22214 var node2 = _step1.value; 22215 this.proxyOf.nodes.push(node2); 22216 } 22217 } 22218 this.markDirty(); 22219 return this; 22220 }; 22221 _proto.cleanRaws = function cleanRaws(keepBetween) { 22222 Node$1$1.prototype.cleanRaws.call(this, keepBetween); 22223 if (this.nodes) for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.nodes), _step; !(_step = _iterator()).done;){ 22224 var node2 = _step.value; 22225 node2.cleanRaws(keepBetween); 22226 } 22227 }; 22228 _proto.each = function each(callback) { 22229 if (!this.proxyOf.nodes) return void 0; 22230 var iterator = this.getIterator(); 22231 var index2, result2; 22232 while(this.indexes[iterator] < this.proxyOf.nodes.length){ 22233 index2 = this.indexes[iterator]; 22234 result2 = callback(this.proxyOf.nodes[index2], index2); 22235 if (result2 === false) break; 22236 this.indexes[iterator] += 1; 22237 } 22238 delete this.indexes[iterator]; 22239 return result2; 22240 }; 22241 _proto.every = function every(condition) { 22242 return this.nodes.every(condition); 22243 }; 22244 _proto.getIterator = function getIterator() { 22245 if (!this.lastEach) this.lastEach = 0; 22246 if (!this.indexes) this.indexes = {}; 22247 this.lastEach += 1; 22248 var iterator = this.lastEach; 22249 this.indexes[iterator] = 0; 22250 return iterator; 22251 }; 22252 _proto.getProxyProcessor = function getProxyProcessor() { 22253 return { 22254 get: function get(node2, prop) { 22255 if (prop === "proxyOf") return node2; 22256 else if (!node2[prop]) return node2[prop]; 22257 else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) return function() { 22258 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 22259 var _node2; 22260 return (_node2 = node2)[prop].apply(_node2, [].concat(args.map(function(i2) { 22261 if (typeof i2 === "function") return function(child, index2) { 22262 return i2(child.toProxy(), index2); 22263 }; 22264 else return i2; 22265 }))); 22266 }; 22267 else if (prop === "every" || prop === "some") return function(cb) { 22268 return node2[prop](function(child) { 22269 for(var _len = arguments.length, other = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)other[_key - 1] = arguments[_key]; 22270 return cb.apply(void 0, [].concat([ 22271 child.toProxy() 22272 ], other)); 22273 }); 22274 }; 22275 else if (prop === "root") return function() { 22276 return node2.root().toProxy(); 22277 }; 22278 else if (prop === "nodes") return node2.nodes.map(function(i2) { 22279 return i2.toProxy(); 22280 }); 22281 else if (prop === "first" || prop === "last") return node2[prop].toProxy(); 22282 else return node2[prop]; 22283 }, 22284 set: function set(node2, prop, value) { 22285 if (node2[prop] === value) return true; 22286 node2[prop] = value; 22287 if (prop === "name" || prop === "params" || prop === "selector") node2.markDirty(); 22288 return true; 22289 } 22290 }; 22291 }; 22292 _proto.index = function index(child) { 22293 if (typeof child === "number") return child; 22294 if (child.proxyOf) child = child.proxyOf; 22295 return this.proxyOf.nodes.indexOf(child); 22296 }; 22297 _proto.insertAfter = function insertAfter(exist, add) { 22298 var existIndex = this.index(exist); 22299 var nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse(); 22300 existIndex = this.index(exist); 22301 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 22302 var node2 = _step.value; 22303 this.proxyOf.nodes.splice(existIndex + 1, 0, node2); 22304 } 22305 var index2; 22306 for(var id in this.indexes){ 22307 index2 = this.indexes[id]; 22308 if (existIndex < index2) this.indexes[id] = index2 + nodes.length; 22309 } 22310 this.markDirty(); 22311 return this; 22312 }; 22313 _proto.insertBefore = function insertBefore(exist, add) { 22314 var existIndex = this.index(exist); 22315 var type = existIndex === 0 ? "prepend" : false;
22316 var nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse(); 22317 existIndex = this.index(exist); 22318 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 22319 var node2 = _step.value; 22320 this.proxyOf.nodes.splice(existIndex, 0, node2); 22321 } 22322 var index2; 22323 for(var id in this.indexes){ 22324 index2 = this.indexes[id]; 22325 if (existIndex <= index2) this.indexes[id] = index2 + nodes.length; 22326 } 22327 this.markDirty(); 22328 return this; 22329 }; 22330 _proto.normalize = function normalize(nodes, sample) { 22331 var _this = this; 22332 if (typeof nodes === "string") nodes = $a44aab89caa44953$var$cleanSource$1($a44aab89caa44953$var$parse$4$1(nodes).nodes); 22333 else if (typeof nodes === "undefined") nodes = []; 22334 else if (Array.isArray(nodes)) { 22335 nodes = nodes.slice(0); 22336 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 22337 var i2 = _step.value; 22338 if (i2.parent) i2.parent.removeChild(i2, "ignore"); 22339 } 22340 } else if (nodes.type === "root" && this.type !== "document") { 22341 nodes = nodes.nodes.slice(0); 22342 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step1; !(_step1 = _iterator1()).done;){ 22343 var i21 = _step1.value; 22344 if (i21.parent) i21.parent.removeChild(i21, "ignore"); 22345 } 22346 } else if (nodes.type) nodes = [ 22347 nodes 22348 ]; 22349 else if (nodes.prop) { 22350 if (typeof nodes.value === "undefined") throw new Error("Value field is missed in node creation"); 22351 else if (typeof nodes.value !== "string") nodes.value = String(nodes.value); 22352 nodes = [ 22353 new $a44aab89caa44953$var$Declaration$3$1(nodes) 22354 ]; 22355 } else if (nodes.selector) nodes = [ 22356 new $a44aab89caa44953$var$Rule$4$1(nodes) 22357 ]; 22358 else if (nodes.name) nodes = [ 22359 new $a44aab89caa44953$var$AtRule$4$1(nodes) 22360 ]; 22361 else if (nodes.text) nodes = [ 22362 new $a44aab89caa44953$var$Comment$3$1(nodes) 22363 ]; 22364 else throw new Error("Unknown node type in node creation"); 22365 var processed = nodes.map(function(i2) { 22366 if (!i2[$a44aab89caa44953$var$my$1$1]) Container.rebuild(i2); 22367 i2 = i2.proxyOf; 22368 if (i2.parent) i2.parent.removeChild(i2); 22369 if (i2[$a44aab89caa44953$var$isClean$1$1]) $a44aab89caa44953$var$markDirtyUp$1(i2); 22370 if (typeof i2.raws.before === "undefined") { 22371 if (sample && typeof sample.raws.before !== "undefined") i2.raws.before = sample.raws.before.replace(/\S/g, ""); 22372 } 22373 i2.parent = _this.proxyOf; 22374 return i2; 22375 }); 22376 return processed; 22377 }; 22378 _proto.prepend = function prepend() { 22379 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 22380 children = children.reverse(); 22381 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(children), _step; !(_step = _iterator()).done;){ 22382 var child = _step.value; 22383 var nodes = this.normalize(child, this.first, "prepend").reverse(); 22384 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step1; !(_step1 = _iterator1()).done;){ 22385 var node2 = _step1.value; 22386 this.proxyOf.nodes.unshift(node2); 22387 } 22388 for(var id in this.indexes)this.indexes[id] = this.indexes[id] + nodes.length; 22389 } 22390 this.markDirty(); 22391 return this; 22392 }; 22393 _proto.push = function push(child) { 22394 child.parent = this; 22395 this.proxyOf.nodes.push(child); 22396 return this; 22397 }; 22398 _proto.removeAll = function removeAll() { 22399 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.proxyOf.nodes), _step; !(_step = _iterator()).done;){ 22400 var node2 = _step.value; 22401 node2.parent = void 0; 22402 } 22403 this.proxyOf.nodes = []; 22404 this.markDirty(); 22405 return this; 22406 }; 22407 _proto.removeChild = function removeChild(child) { 22408 child = this.index(child); 22409 this.proxyOf.nodes[child].parent = void 0; 22410 this.proxyOf.nodes.splice(child, 1); 22411 var index2; 22412 for(var id in this.indexes){ 22413 index2 = this.indexes[id]; 22414 if (index2 >= child) this.indexes[id] = index2 - 1; 22415 } 22416 this.markDirty(); 22417 return this; 22418 }; 22419 _proto.replaceValues = function replaceValues(pattern, opts, callback) { 22420 if (!callback) { 22421 callback = opts; 22422 opts = {}; 22423 } 22424 this.walkDecls(function(decl) { 22425 if (opts.props && !opts.props.includes(decl.prop)) return; 22426 if (opts.fast && !decl.value.includes(opts.fast)) return; 22427 decl.value = decl.value.replace(pattern, callback); 22428 }); 22429 this.markDirty(); 22430 return this; 22431 }; 22432 _proto.some = function some(condition) { 22433 return this.nodes.some(condition); 22434 }; 22435 _proto.walk = function walk(callback) { 22436 return this.each(function(child, i2) { 22437 var result2; 22438 try { 22439 result2 = callback(child, i2); 22440 } catch (e2) { 22441 throw child.addToError(e2); 22442 } 22443 if (result2 !== false && child.walk) result2 = child.walk(callback); 22444 return result2; 22445 }); 22446 }; 22447 _proto.walkAtRules = function walkAtRules(name, callback) { 22448 if (!callback) { 22449 callback = name; 22450 return this.walk(function(child, i2) { 22451 if (child.type === "atrule") return callback(child, i2); 22452 }); 22453 } 22454 if ($a44aab89caa44953$var$_instanceof(name, RegExp)) return this.walk(function(child, i2) { 22455 if (child.type === "atrule" && name.test(child.name)) return callback(child, i2); 22456 }); 22457 return this.walk(function(child, i2) { 22458 if (child.type === "atrule" && child.name === name) return callback(child, i2); 22459 }); 22460 }; 22461 _proto.walkComments = function walkComments(callback) { 22462 return this.walk(function(child, i2) { 22463 if (child.type === "comment") return callback(child, i2); 22464 }); 22465 }; 22466 _proto.walkDecls = function walkDecls(prop, callback) { 22467 if (!callback) { 22468 callback = prop; 22469 return this.walk(function(child, i2) { 22470 if (child.type === "decl") return callback(child, i2); 22471 }); 22472 } 22473 if ($a44aab89caa44953$var$_instanceof(prop, RegExp)) return this.walk(function(child, i2) { 22474 if (child.type === "decl" && prop.test(child.prop)) return callback(child, i2); 22475 }); 22476 return this.walk(function(child, i2) { 22477 if (child.type === "decl" && child.prop === prop) return callback(child, i2); 22478 }); 22479 }; 22480 _proto.walkRules = function walkRules(selector, callback) { 22481 if (!callback) { 22482 callback = selector; 22483 return this.walk(function(child, i2) { 22484 if (child.type === "rule") return callback(child, i2); 22485 }); 22486 } 22487 if ($a44aab89caa44953$var$_instanceof(selector, RegExp)) return this.walk(function(child, i2) { 22488 if (child.type === "rule" && selector.test(child.selector)) return callback(child, i2); 22489 }); 22490 return this.walk(function(child, i2) { 22491 if (child.type === "rule" && child.selector === selector) return callback(child, i2); 22492 }); 22493 }; 22494 $a44aab89caa44953$var$_create_class(Container, [ 22495 { 22496 key: "first", 22497 get: function get() { 22498 if (!this.proxyOf.nodes) return void 0; 22499 return this.proxyOf.nodes[0]; 22500 } 22501 }, 22502 { 22503 key: "last", 22504 get: function get() { 22505 if (!this.proxyOf.nodes) return void 0; 22506 return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]; 22507 } 22508 } 22509 ]); 22510 return Container; 22511}($a44aab89caa44953$var$Node$1$1); 22512$a44aab89caa44953$var$Container$7$1.registerParse = function(dependant) {
vendor: 7,626 bytes, lines 22513-22684
22513 $a44aab89caa44953$var$parse$4$1 = dependant; 22514}; 22515$a44aab89caa44953$var$Container$7$1.registerRule = function(dependant) { 22516 $a44aab89caa44953$var$Rule$4$1 = dependant; 22517}; 22518$a44aab89caa44953$var$Container$7$1.registerAtRule = function(dependant) { 22519 $a44aab89caa44953$var$AtRule$4$1 = dependant; 22520}; 22521$a44aab89caa44953$var$Container$7$1.registerRoot = function(dependant) { 22522 $a44aab89caa44953$var$Root$6$1 = dependant; 22523}; 22524var $a44aab89caa44953$var$container$1 = $a44aab89caa44953$var$Container$7$1; 22525$a44aab89caa44953$var$Container$7$1.default = $a44aab89caa44953$var$Container$7$1; 22526$a44aab89caa44953$var$Container$7$1.rebuild = function(node2) { 22527 if (node2.type === "atrule") Object.setPrototypeOf(node2, $a44aab89caa44953$var$AtRule$4$1.prototype); 22528 else if (node2.type === "rule") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Rule$4$1.prototype); 22529 else if (node2.type === "decl") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Declaration$3$1.prototype); 22530 else if (node2.type === "comment") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Comment$3$1.prototype); 22531 else if (node2.type === "root") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Root$6$1.prototype); 22532 node2[$a44aab89caa44953$var$my$1$1] = true; 22533 if (node2.nodes) node2.nodes.forEach(function(child) { 22534 $a44aab89caa44953$var$Container$7$1.rebuild(child); 22535 }); 22536}; 22537var $a44aab89caa44953$var$Container$6$1 = $a44aab89caa44953$var$container$1; 22538var $a44aab89caa44953$var$LazyResult$4$1, $a44aab89caa44953$var$Processor$3$1; 22539var $a44aab89caa44953$var$Document$3$1 = /*#__PURE__*/ function(Container$6$1) { 22540 $a44aab89caa44953$var$_inherits(Document2, Container$6$1); 22541 function Document2(defaults) { 22542 var _this; 22543 _this = Container$6$1.call(this, $a44aab89caa44953$var$_extends({ 22544 type: "document" 22545 }, defaults)) || this; 22546 if (!_this.nodes) _this.nodes = []; 22547 return _this; 22548 } 22549 var _proto = Document2.prototype; 22550 _proto.toResult = function toResult(opts) { 22551 if (opts === void 0) opts = {}; 22552 var lazy = new $a44aab89caa44953$var$LazyResult$4$1(new $a44aab89caa44953$var$Processor$3$1(), this, opts); 22553 return lazy.stringify(); 22554 }; 22555 return Document2; 22556}($a44aab89caa44953$var$Container$6$1); 22557$a44aab89caa44953$var$Document$3$1.registerLazyResult = function(dependant) { 22558 $a44aab89caa44953$var$LazyResult$4$1 = dependant; 22559}; 22560$a44aab89caa44953$var$Document$3$1.registerProcessor = function(dependant) { 22561 $a44aab89caa44953$var$Processor$3$1 = dependant; 22562}; 22563var $a44aab89caa44953$var$document$1$1 = $a44aab89caa44953$var$Document$3$1; 22564$a44aab89caa44953$var$Document$3$1.default = $a44aab89caa44953$var$Document$3$1; 22565var $a44aab89caa44953$var$printed$1 = {}; 22566var $a44aab89caa44953$var$warnOnce$2$1 = function warnOnce(message) { 22567 if ($a44aab89caa44953$var$printed$1[message]) return; 22568 $a44aab89caa44953$var$printed$1[message] = true; 22569 if (typeof console !== "undefined" && console.warn) console.warn(message); 22570}; 22571var $a44aab89caa44953$var$Warning$2$1 = /*#__PURE__*/ function() { 22572 function Warning(text, opts) { 22573 if (opts === void 0) opts = {}; 22574 this.type = "warning"; 22575 this.text = text; 22576 if (opts.node && opts.node.source) { 22577 var range = opts.node.rangeBy(opts); 22578 this.line = range.start.line; 22579 this.column = range.start.column; 22580 this.endLine = range.end.line; 22581 this.endColumn = range.end.column; 22582 } 22583 for(var opt in opts)this[opt] = opts[opt]; 22584 } 22585 var _proto = Warning.prototype; 22586 _proto.toString = function toString() { 22587 if (this.node) return this.node.error(this.text, { 22588 index: this.index, 22589 plugin: this.plugin, 22590 word: this.word 22591 }).message; 22592 if (this.plugin) return this.plugin + ": " + this.text; 22593 return this.text; 22594 }; 22595 return Warning; 22596}(); 22597var $a44aab89caa44953$var$warning$1 = $a44aab89caa44953$var$Warning$2$1; 22598$a44aab89caa44953$var$Warning$2$1.default = $a44aab89caa44953$var$Warning$2$1; 22599var $a44aab89caa44953$var$Warning$1$1 = $a44aab89caa44953$var$warning$1; 22600var $a44aab89caa44953$var$Result$3$1 = /*#__PURE__*/ function() { 22601 function Result(processor2, root2, opts) { 22602 this.processor = processor2; 22603 this.messages = []; 22604 this.root = root2; 22605 this.opts = opts; 22606 this.css = void 0; 22607 this.map = void 0; 22608 } 22609 var _proto = Result.prototype; 22610 _proto.toString = function toString() { 22611 return this.css; 22612 }; 22613 _proto.warn = function warn(text, opts) { 22614 if (opts === void 0) opts = {}; 22615 if (!opts.plugin) { 22616 if (this.lastPlugin && this.lastPlugin.postcssPlugin) opts.plugin = this.lastPlugin.postcssPlugin; 22617 } 22618 var warning2 = new $a44aab89caa44953$var$Warning$1$1(text, opts); 22619 this.messages.push(warning2); 22620 return warning2; 22621 }; 22622 _proto.warnings = function warnings() { 22623 return this.messages.filter(function(i2) { 22624 return i2.type === "warning"; 22625 }); 22626 }; 22627 $a44aab89caa44953$var$_create_class(Result, [ 22628 { 22629 key: "content", 22630 get: function get() { 22631 return this.css; 22632 } 22633 } 22634 ]); 22635 return Result; 22636}(); 22637var $a44aab89caa44953$var$result$1 = $a44aab89caa44953$var$Result$3$1; 22638$a44aab89caa44953$var$Result$3$1.default = $a44aab89caa44953$var$Result$3$1; 22639var $a44aab89caa44953$var$SINGLE_QUOTE$1 = "'".charCodeAt(0); 22640var $a44aab89caa44953$var$DOUBLE_QUOTE$1 = '"'.charCodeAt(0); 22641var $a44aab89caa44953$var$BACKSLASH$1 = "\\".charCodeAt(0); 22642var $a44aab89caa44953$var$SLASH$1 = "/".charCodeAt(0); 22643var $a44aab89caa44953$var$NEWLINE$1 = "\n".charCodeAt(0); 22644var $a44aab89caa44953$var$SPACE$1 = " ".charCodeAt(0); 22645var $a44aab89caa44953$var$FEED$1 = "\f".charCodeAt(0); 22646var $a44aab89caa44953$var$TAB$1 = " ".charCodeAt(0); 22647var $a44aab89caa44953$var$CR$1 = "\r".charCodeAt(0); 22648var $a44aab89caa44953$var$OPEN_SQUARE$1 = "[".charCodeAt(0); 22649var $a44aab89caa44953$var$CLOSE_SQUARE$1 = "]".charCodeAt(0); 22650var $a44aab89caa44953$var$OPEN_PARENTHESES$1 = "(".charCodeAt(0); 22651var $a44aab89caa44953$var$CLOSE_PARENTHESES$1 = ")".charCodeAt(0); 22652var $a44aab89caa44953$var$OPEN_CURLY$1 = "{".charCodeAt(0); 22653var $a44aab89caa44953$var$CLOSE_CURLY$1 = "}".charCodeAt(0); 22654var $a44aab89caa44953$var$SEMICOLON$1 = ";".charCodeAt(0); 22655var $a44aab89caa44953$var$ASTERISK$1 = "*".charCodeAt(0); 22656var $a44aab89caa44953$var$COLON$1 = ":".charCodeAt(0); 22657var $a44aab89caa44953$var$AT$1 = "@".charCodeAt(0); 22658var $a44aab89caa44953$var$RE_AT_END$1 = /[\t\n\f\r "#'()/;[\\\]{}]/g; 22659var $a44aab89caa44953$var$RE_WORD_END$1 = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; 22660var $a44aab89caa44953$var$RE_BAD_BRACKET$1 = /.[\r\n"'(/\\]/; 22661var $a44aab89caa44953$var$RE_HEX_ESCAPE$1 = /[\da-f]/i; 22662var $a44aab89caa44953$var$tokenize$1 = function tokenizer(input2, options) { 22663 if (options === void 0) options = {}; 22664 var css = input2.css.valueOf(); 22665 var ignore = options.ignoreErrors; 22666 var code, next, quote, content, escape; 22667 var escaped, escapePos, prev, n2, currentToken; 22668 var length = css.length; 22669 var pos = 0; 22670 var buffer = []; 22671 var returned = []; 22672 function position() { 22673 return pos; 22674 } 22675 function unclosed(what) { 22676 throw input2.error("Unclosed " + what, pos); 22677 } 22678 function endOfFile() { 22679 return returned.length === 0 && pos >= length; 22680 } 22681 function nextToken(opts) { 22682 if (returned.length) return returned.pop(); 22683 if (pos >= length) return; 22684 var ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
22685 code = css.charCodeAt(pos); 22686 switch(code){ 22687 case $a44aab89caa44953$var$NEWLINE$1: 22688 case $a44aab89caa44953$var$SPACE$1: 22689 case $a44aab89caa44953$var$TAB$1: 22690 case $a44aab89caa44953$var$CR$1: 22691 case $a44aab89caa44953$var$FEED$1: 22692 next = pos; 22693 do { 22694 next += 1; 22695 code = css.charCodeAt(next); 22696 }while (code === $a44aab89caa44953$var$SPACE$1 || code === $a44aab89caa44953$var$NEWLINE$1 || code === $a44aab89caa44953$var$TAB$1 || code === $a44aab89caa44953$var$CR$1 || code === $a44aab89caa44953$var$FEED$1); 22697 currentToken = [ 22698 "space", 22699 css.slice(pos, next) 22700 ]; 22701 pos = next - 1; 22702 break; 22703 case $a44aab89caa44953$var$OPEN_SQUARE$1: 22704 case $a44aab89caa44953$var$CLOSE_SQUARE$1: 22705 case $a44aab89caa44953$var$OPEN_CURLY$1: 22706 case $a44aab89caa44953$var$CLOSE_CURLY$1: 22707 case $a44aab89caa44953$var$COLON$1: 22708 case $a44aab89caa44953$var$SEMICOLON$1: 22709 case $a44aab89caa44953$var$CLOSE_PARENTHESES$1: 22710 var controlChar = String.fromCharCode(code); 22711 currentToken = [ 22712 controlChar, 22713 controlChar, 22714 pos 22715 ]; 22716 break; 22717 case $a44aab89caa44953$var$OPEN_PARENTHESES$1: 22718 prev = buffer.length ? buffer.pop()[1] : ""; 22719 n2 = css.charCodeAt(pos + 1); 22720 if (prev === "url" && n2 !== $a44aab89caa44953$var$SINGLE_QUOTE$1 && n2 !== $a44aab89caa44953$var$DOUBLE_QUOTE$1 && n2 !== $a44aab89caa44953$var$SPACE$1 && n2 !== $a44aab89caa44953$var$NEWLINE$1 && n2 !== $a44aab89caa44953$var$TAB$1 && n2 !== $a44aab89caa44953$var$FEED$1 && n2 !== $a44aab89caa44953$var$CR$1) { 22721 next = pos; 22722 do { 22723 escaped = false; 22724 next = css.indexOf(")", next + 1); 22725 if (next === -1) { 22726 if (ignore || ignoreUnclosed) { 22727 next = pos; 22728 break; 22729 } else unclosed("bracket"); 22730 } 22731 escapePos = next; 22732 while(css.charCodeAt(escapePos - 1) === $a44aab89caa44953$var$BACKSLASH$1){ 22733 escapePos -= 1; 22734 escaped = !escaped; 22735 } 22736 }while (escaped); 22737 currentToken = [ 22738 "brackets", 22739 css.slice(pos, next + 1), 22740 pos, 22741 next 22742 ]; 22743 pos = next; 22744 } else { 22745 next = css.indexOf(")", pos + 1); 22746 content = css.slice(pos, next + 1); 22747 if (next === -1 || $a44aab89caa44953$var$RE_BAD_BRACKET$1.test(content)) currentToken = [ 22748 "(", 22749 "(", 22750 pos 22751 ]; 22752 else { 22753 currentToken = [ 22754 "brackets", 22755 content, 22756 pos, 22757 next 22758 ]; 22759 pos = next; 22760 } 22761 } 22762 break; 22763 case $a44aab89caa44953$var$SINGLE_QUOTE$1: 22764 case $a44aab89caa44953$var$DOUBLE_QUOTE$1: 22765 quote = code === $a44aab89caa44953$var$SINGLE_QUOTE$1 ? "'" : '"'; 22766 next = pos; 22767 do { 22768 escaped = false; 22769 next = css.indexOf(quote, next + 1); 22770 if (next === -1) { 22771 if (ignore || ignoreUnclosed) { 22772 next = pos + 1; 22773 break; 22774 } else unclosed("string"); 22775 } 22776 escapePos = next; 22777 while(css.charCodeAt(escapePos - 1) === $a44aab89caa44953$var$BACKSLASH$1){ 22778 escapePos -= 1; 22779 escaped = !escaped; 22780 } 22781 }while (escaped); 22782 currentToken = [ 22783 "string", 22784 css.slice(pos, next + 1), 22785 pos, 22786 next 22787 ]; 22788 pos = next; 22789 break; 22790 case $a44aab89caa44953$var$AT$1: 22791 $a44aab89caa44953$var$RE_AT_END$1.lastIndex = pos + 1; 22792 $a44aab89caa44953$var$RE_AT_END$1.test(css); 22793 if ($a44aab89caa44953$var$RE_AT_END$1.lastIndex === 0) next = css.length - 1; 22794 else next = $a44aab89caa44953$var$RE_AT_END$1.lastIndex - 2; 22795 currentToken = [ 22796 "at-word", 22797 css.slice(pos, next + 1), 22798 pos, 22799 next 22800 ]; 22801 pos = next; 22802 break; 22803 case $a44aab89caa44953$var$BACKSLASH$1: 22804 next = pos; 22805 escape = true; 22806 while(css.charCodeAt(next + 1) === $a44aab89caa44953$var$BACKSLASH$1){ 22807 next += 1; 22808 escape = !escape; 22809 } 22810 code = css.charCodeAt(next + 1); 22811 if (escape && code !== $a44aab89caa44953$var$SLASH$1 && code !== $a44aab89caa44953$var$SPACE$1 && code !== $a44aab89caa44953$var$NEWLINE$1 && code !== $a44aab89caa44953$var$TAB$1 && code !== $a44aab89caa44953$var$CR$1 && code !== $a44aab89caa44953$var$FEED$1) { 22812 next += 1; 22813 if ($a44aab89caa44953$var$RE_HEX_ESCAPE$1.test(css.charAt(next))) { 22814 while($a44aab89caa44953$var$RE_HEX_ESCAPE$1.test(css.charAt(next + 1)))next += 1; 22815 if (css.charCodeAt(next + 1) === $a44aab89caa44953$var$SPACE$1) next += 1; 22816 } 22817 } 22818 currentToken = [ 22819 "word", 22820 css.slice(pos, next + 1), 22821 pos, 22822 next 22823 ]; 22824 pos = next; 22825 break; 22826 default: 22827 if (code === $a44aab89caa44953$var$SLASH$1 && css.charCodeAt(pos + 1) === $a44aab89caa44953$var$ASTERISK$1) { 22828 next = css.indexOf("*/", pos + 2) + 1; 22829 if (next === 0) { 22830 if (ignore || ignoreUnclosed) next = css.length; 22831 else unclosed("comment"); 22832 } 22833 currentToken = [ 22834 "comment", 22835 css.slice(pos, next + 1), 22836 pos, 22837 next 22838 ]; 22839 pos = next; 22840 } else { 22841 $a44aab89caa44953$var$RE_WORD_END$1.lastIndex = pos + 1; 22842 $a44aab89caa44953$var$RE_WORD_END$1.test(css); 22843 if ($a44aab89caa44953$var$RE_WORD_END$1.lastIndex === 0) next = css.length - 1; 22844 else next = $a44aab89caa44953$var$RE_WORD_END$1.lastIndex - 2; 22845 currentToken = [ 22846 "word", 22847 css.slice(pos, next + 1), 22848 pos, 22849 next 22850 ]; 22851 buffer.push(currentToken); 22852 pos = next; 22853 } 22854 break; 22855 } 22856 pos++; 22857 return currentToken; 22858 } 22859 function back(token) { 22860 returned.push(token); 22861 } 22862 return { 22863 back: back, 22864 endOfFile: endOfFile, 22865 nextToken: nextToken, 22866 position: position 22867 }; 22868}; 22869var $a44aab89caa44953$var$Container$5$1 = $a44aab89caa44953$var$container$1; 22870var $a44aab89caa44953$var$AtRule$3$1 = /*#__PURE__*/ function(Container$5$1) { 22871 $a44aab89caa44953$var$_inherits(AtRule, Container$5$1); 22872 function AtRule(defaults) { 22873 var _this; 22874 _this = Container$5$1.call(this, defaults) || this; 22875 _this.type = "atrule"; 22876 return _this; 22877 } 22878 var _proto = AtRule.prototype; 22879 _proto.append = function append() { 22880 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 22881 var _Container$5$1_prototype_append; 22882 if (!this.proxyOf.nodes) this.nodes = []; 22883 return (_Container$5$1_prototype_append = Container$5$1.prototype.append).call.apply(_Container$5$1_prototype_append, [].concat([ 22884 this 22885 ], children)); 22886 }; 22887 _proto.prepend = function prepend() { 22888 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 22889 var _Container$5$1_prototype_prepend; 22890 if (!this.proxyOf.nodes) this.nodes = []; 22891 return (_Container$5$1_prototype_prepend = Container$5$1.prototype.prepend).call.apply(_Container$5$1_prototype_prepend, [].concat([ 22892 this 22893 ], children)); 22894 }; 22895 return AtRule; 22896}($a44aab89caa44953$var$Container$5$1); 22897var $a44aab89caa44953$var$atRule$1 = $a44aab89caa44953$var$AtRule$3$1; 22898$a44aab89caa44953$var$AtRule$3$1.default = $a44aab89caa44953$var$AtRule$3$1; 22899$a44aab89caa44953$var$Container$5$1.registerAtRule($a44aab89caa44953$var$AtRule$3$1); 22900var $a44aab89caa44953$var$Container$4$1 = $a44aab89caa44953$var$container$1; 22901var $a44aab89caa44953$var$LazyResult$3$1, $a44aab89caa44953$var$Processor$2$1; 22902var $a44aab89caa44953$var$Root$5$1 = /*#__PURE__*/ function(Container$4$1) { 22903 $a44aab89caa44953$var$_inherits(Root, Container$4$1); 22904 function Root(defaults) { 22905 var _this; 22906 _this = Container$4$1.call(this, defaults) || this; 22907 _this.type = "root"; 22908 if (!_this.nodes) _this.nodes = []; 22909 return _this; 22910 } 22911 var _proto = Root.prototype; 22912 _proto.normalize = function normalize(child, sample, type) { 22913 var nodes = Container$4$1.prototype.normalize.call(this, child); 22914 if (sample) {
22915 if (type === "prepend") { 22916 if (this.nodes.length > 1) sample.raws.before = this.nodes[1].raws.before; 22917 else delete sample.raws.before; 22918 } else if (this.first !== sample) for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 22919 var node2 = _step.value; 22920 node2.raws.before = sample.raws.before; 22921 } 22922 } 22923 return nodes; 22924 }; 22925 _proto.removeChild = function removeChild(child, ignore) { 22926 var index2 = this.index(child); 22927 if (!ignore && index2 === 0 && this.nodes.length > 1) this.nodes[1].raws.before = this.nodes[index2].raws.before; 22928 return Container$4$1.prototype.removeChild.call(this, child); 22929 }; 22930 _proto.toResult = function toResult(opts) { 22931 if (opts === void 0) opts = {}; 22932 var lazy = new $a44aab89caa44953$var$LazyResult$3$1(new $a44aab89caa44953$var$Processor$2$1(), this, opts); 22933 return lazy.stringify(); 22934 }; 22935 return Root; 22936}($a44aab89caa44953$var$Container$4$1); 22937$a44aab89caa44953$var$Root$5$1.registerLazyResult = function(dependant) { 22938 $a44aab89caa44953$var$LazyResult$3$1 = dependant; 22939}; 22940$a44aab89caa44953$var$Root$5$1.registerProcessor = function(dependant) { 22941 $a44aab89caa44953$var$Processor$2$1 = dependant; 22942}; 22943var $a44aab89caa44953$var$root$1 = $a44aab89caa44953$var$Root$5$1; 22944$a44aab89caa44953$var$Root$5$1.default = $a44aab89caa44953$var$Root$5$1; 22945$a44aab89caa44953$var$Container$4$1.registerRoot($a44aab89caa44953$var$Root$5$1); 22946var $a44aab89caa44953$var$list$2$1 = { 22947 comma: function comma(string) { 22948 return $a44aab89caa44953$var$list$2$1.split(string, [ 22949 "," 22950 ], true); 22951 }, 22952 space: function space(string) { 22953 var spaces = [ 22954 " ", 22955 "\n", 22956 " " 22957 ]; 22958 return $a44aab89caa44953$var$list$2$1.split(string, spaces); 22959 }, 22960 split: function split(string, separators, last) { 22961 var array = []; 22962 var current = ""; 22963 var split = false; 22964 var func = 0; 22965 var inQuote = false; 22966 var prevQuote = ""; 22967 var escape = false;
vendor: 21,773 bytes, lines 22968-23526
22968 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(string), _step; !(_step = _iterator()).done;){ 22969 var letter = _step.value; 22970 if (escape) escape = false; 22971 else if (letter === "\\") escape = true; 22972 else if (inQuote) { 22973 if (letter === prevQuote) inQuote = false; 22974 } else if (letter === '"' || letter === "'") { 22975 inQuote = true; 22976 prevQuote = letter; 22977 } else if (letter === "(") func += 1; 22978 else if (letter === ")") { 22979 if (func > 0) func -= 1; 22980 } else if (func === 0) { 22981 if (separators.includes(letter)) split = true; 22982 } 22983 if (split) { 22984 if (current !== "") array.push(current.trim()); 22985 current = ""; 22986 split = false; 22987 } else current += letter; 22988 } 22989 if (last || current !== "") array.push(current.trim()); 22990 return array; 22991 } 22992}; 22993var $a44aab89caa44953$var$list_1$1 = $a44aab89caa44953$var$list$2$1; 22994$a44aab89caa44953$var$list$2$1.default = $a44aab89caa44953$var$list$2$1; 22995var $a44aab89caa44953$var$Container$3$1 = $a44aab89caa44953$var$container$1; 22996var $a44aab89caa44953$var$list$1$1 = $a44aab89caa44953$var$list_1$1; 22997var $a44aab89caa44953$var$Rule$3$1 = /*#__PURE__*/ function(Container$3$1) { 22998 $a44aab89caa44953$var$_inherits(Rule, Container$3$1); 22999 function Rule(defaults) { 23000 var _this; 23001 _this = Container$3$1.call(this, defaults) || this; 23002 _this.type = "rule"; 23003 if (!_this.nodes) _this.nodes = []; 23004 return _this; 23005 } 23006 $a44aab89caa44953$var$_create_class(Rule, [ 23007 { 23008 key: "selectors", 23009 get: function get() { 23010 return $a44aab89caa44953$var$list$1$1.comma(this.selector); 23011 }, 23012 set: function set(values) { 23013 var match = this.selector ? this.selector.match(/,\s*/) : null; 23014 var sep2 = match ? match[0] : "," + this.raw("between", "beforeOpen"); 23015 this.selector = values.join(sep2); 23016 } 23017 } 23018 ]); 23019 return Rule; 23020}($a44aab89caa44953$var$Container$3$1); 23021var $a44aab89caa44953$var$rule$1 = $a44aab89caa44953$var$Rule$3$1; 23022$a44aab89caa44953$var$Rule$3$1.default = $a44aab89caa44953$var$Rule$3$1; 23023$a44aab89caa44953$var$Container$3$1.registerRule($a44aab89caa44953$var$Rule$3$1); 23024var $a44aab89caa44953$var$Declaration$2$1 = $a44aab89caa44953$var$declaration$1; 23025var $a44aab89caa44953$var$tokenizer2$1 = $a44aab89caa44953$var$tokenize$1; 23026var $a44aab89caa44953$var$Comment$2$1 = $a44aab89caa44953$var$comment$1; 23027var $a44aab89caa44953$var$AtRule$2$1 = $a44aab89caa44953$var$atRule$1; 23028var $a44aab89caa44953$var$Root$4$1 = $a44aab89caa44953$var$root$1; 23029var $a44aab89caa44953$var$Rule$2$1 = $a44aab89caa44953$var$rule$1; 23030var $a44aab89caa44953$var$SAFE_COMMENT_NEIGHBOR$1 = { 23031 empty: true, 23032 space: true 23033}; 23034function $a44aab89caa44953$var$findLastWithPosition$1(tokens) { 23035 for(var i2 = tokens.length - 1; i2 >= 0; i2--){ 23036 var token = tokens[i2]; 23037 var pos = token[3] || token[2]; 23038 if (pos) return pos; 23039 } 23040} 23041var $a44aab89caa44953$var$Parser$1$1 = /*#__PURE__*/ function() { 23042 function Parser(input2) { 23043 this.input = input2; 23044 this.root = new $a44aab89caa44953$var$Root$4$1(); 23045 this.current = this.root; 23046 this.spaces = ""; 23047 this.semicolon = false; 23048 this.createTokenizer(); 23049 this.root.source = { 23050 input: input2, 23051 start: { 23052 column: 1, 23053 line: 1, 23054 offset: 0 23055 } 23056 }; 23057 } 23058 var _proto = Parser.prototype; 23059 _proto.atrule = function atrule(token) { 23060 var node2 = new $a44aab89caa44953$var$AtRule$2$1(); 23061 node2.name = token[1].slice(1); 23062 if (node2.name === "") this.unnamedAtrule(node2, token); 23063 this.init(node2, token[2]); 23064 var type; 23065 var prev; 23066 var shift; 23067 var last = false; 23068 var open = false; 23069 var params = []; 23070 var brackets = []; 23071 while(!this.tokenizer.endOfFile()){ 23072 token = this.tokenizer.nextToken(); 23073 type = token[0]; 23074 if (type === "(" || type === "[") brackets.push(type === "(" ? ")" : "]"); 23075 else if (type === "{" && brackets.length > 0) brackets.push("}"); 23076 else if (type === brackets[brackets.length - 1]) brackets.pop(); 23077 if (brackets.length === 0) { 23078 if (type === ";") { 23079 node2.source.end = this.getPosition(token[2]); 23080 node2.source.end.offset++; 23081 this.semicolon = true; 23082 break; 23083 } else if (type === "{") { 23084 open = true; 23085 break; 23086 } else if (type === "}") { 23087 if (params.length > 0) { 23088 shift = params.length - 1; 23089 prev = params[shift]; 23090 while(prev && prev[0] === "space")prev = params[--shift]; 23091 if (prev) { 23092 node2.source.end = this.getPosition(prev[3] || prev[2]); 23093 node2.source.end.offset++; 23094 } 23095 } 23096 this.end(token); 23097 break; 23098 } else params.push(token); 23099 } else params.push(token); 23100 if (this.tokenizer.endOfFile()) { 23101 last = true; 23102 break; 23103 } 23104 } 23105 node2.raws.between = this.spacesAndCommentsFromEnd(params); 23106 if (params.length) { 23107 node2.raws.afterName = this.spacesAndCommentsFromStart(params); 23108 this.raw(node2, "params", params); 23109 if (last) { 23110 token = params[params.length - 1]; 23111 node2.source.end = this.getPosition(token[3] || token[2]); 23112 node2.source.end.offset++; 23113 this.spaces = node2.raws.between; 23114 node2.raws.between = ""; 23115 } 23116 } else { 23117 node2.raws.afterName = ""; 23118 node2.params = ""; 23119 } 23120 if (open) { 23121 node2.nodes = []; 23122 this.current = node2; 23123 } 23124 }; 23125 _proto.checkMissedSemicolon = function checkMissedSemicolon(tokens) { 23126 var colon = this.colon(tokens); 23127 if (colon === false) return; 23128 var founded = 0; 23129 var token; 23130 for(var j = colon - 1; j >= 0; j--){ 23131 token = tokens[j]; 23132 if (token[0] !== "space") { 23133 founded += 1; 23134 if (founded === 2) break; 23135 } 23136 } 23137 throw this.input.error("Missed semicolon", token[0] === "word" ? token[3] + 1 : token[2]); 23138 }; 23139 _proto.colon = function colon(tokens) { 23140 var brackets = 0; 23141 var token, type, prev; 23142 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(tokens.entries()), _step; !(_step = _iterator()).done;){ 23143 var _step_value = _step.value, i2 = _step_value[0], element = _step_value[1]; 23144 token = element; 23145 type = token[0]; 23146 if (type === "(") brackets += 1; 23147 if (type === ")") brackets -= 1; 23148 if (brackets === 0 && type === ":") { 23149 if (!prev) this.doubleColon(token); 23150 else if (prev[0] === "word" && prev[1] === "progid") continue; 23151 else return i2; 23152 } 23153 prev = token; 23154 } 23155 return false; 23156 }; 23157 _proto.comment = function comment(token) { 23158 var node2 = new $a44aab89caa44953$var$Comment$2$1(); 23159 this.init(node2, token[2]); 23160 node2.source.end = this.getPosition(token[3] || token[2]); 23161 node2.source.end.offset++; 23162 var text = token[1].slice(2, -2); 23163 if (/^\s*$/.test(text)) { 23164 node2.text = ""; 23165 node2.raws.left = text; 23166 node2.raws.right = ""; 23167 } else { 23168 var match = text.match(/^(\s*)([^]*\S)(\s*)$/); 23169 node2.text = match[2]; 23170 node2.raws.left = match[1]; 23171 node2.raws.right = match[3]; 23172 } 23173 }; 23174 _proto.createTokenizer = function createTokenizer() { 23175 this.tokenizer = $a44aab89caa44953$var$tokenizer2$1(this.input); 23176 }; 23177 _proto.decl = function decl(tokens, customProperty) { 23178 var node2 = new $a44aab89caa44953$var$Declaration$2$1(); 23179 this.init(node2, tokens[0][2]); 23180 var last = tokens[tokens.length - 1]; 23181 if (last[0] === ";") { 23182 this.semicolon = true; 23183 tokens.pop(); 23184 } 23185 node2.source.end = this.getPosition(last[3] || last[2] || $a44aab89caa44953$var$findLastWithPosition$1(tokens)); 23186 node2.source.end.offset++; 23187 while(tokens[0][0] !== "word"){ 23188 if (tokens.length === 1) this.unknownWord(tokens); 23189 node2.raws.before += tokens.shift()[1]; 23190 } 23191 node2.source.start = this.getPosition(tokens[0][2]); 23192 node2.prop = ""; 23193 while(tokens.length){ 23194 var type = tokens[0][0]; 23195 if (type === ":" || type === "space" || type === "comment") break; 23196 node2.prop += tokens.shift()[1]; 23197 } 23198 node2.raws.between = ""; 23199 var token; 23200 while(tokens.length){ 23201 token = tokens.shift(); 23202 if (token[0] === ":") { 23203 node2.raws.between += token[1]; 23204 break; 23205 } else { 23206 if (token[0] === "word" && /\w/.test(token[1])) this.unknownWord([ 23207 token 23208 ]); 23209 node2.raws.between += token[1]; 23210 } 23211 } 23212 if (node2.prop[0] === "_" || node2.prop[0] === "*") { 23213 node2.raws.before += node2.prop[0]; 23214 node2.prop = node2.prop.slice(1); 23215 } 23216 var firstSpaces = []; 23217 var next; 23218 while(tokens.length){ 23219 next = tokens[0][0]; 23220 if (next !== "space" && next !== "comment") break; 23221 firstSpaces.push(tokens.shift()); 23222 } 23223 this.precheckMissedSemicolon(tokens); 23224 for(var i2 = tokens.length - 1; i2 >= 0; i2--){ 23225 token = tokens[i2]; 23226 if (token[1].toLowerCase() === "!important") { 23227 node2.important = true; 23228 var string = this.stringFrom(tokens, i2); 23229 string = this.spacesFromEnd(tokens) + string; 23230 if (string !== " !important") node2.raws.important = string; 23231 break; 23232 } else if (token[1].toLowerCase() === "important") { 23233 var cache = tokens.slice(0); 23234 var str = ""; 23235 for(var j = i2; j > 0; j--){ 23236 var type1 = cache[j][0]; 23237 if (str.trim().indexOf("!") === 0 && type1 !== "space") break; 23238 str = cache.pop()[1] + str; 23239 } 23240 if (str.trim().indexOf("!") === 0) { 23241 node2.important = true; 23242 node2.raws.important = str; 23243 tokens = cache; 23244 } 23245 } 23246 if (token[0] !== "space" && token[0] !== "comment") break; 23247 } 23248 var hasWord = tokens.some(function(i2) { 23249 return i2[0] !== "space" && i2[0] !== "comment"; 23250 }); 23251 if (hasWord) { 23252 node2.raws.between += firstSpaces.map(function(i2) { 23253 return i2[1]; 23254 }).join(""); 23255 firstSpaces = []; 23256 } 23257 this.raw(node2, "value", firstSpaces.concat(tokens), customProperty); 23258 if (node2.value.includes(":") && !customProperty) this.checkMissedSemicolon(tokens); 23259 }; 23260 _proto.doubleColon = function doubleColon(token) { 23261 throw this.input.error("Double colon", { 23262 offset: token[2] 23263 }, { 23264 offset: token[2] + token[1].length 23265 }); 23266 }; 23267 _proto.emptyRule = function emptyRule(token) { 23268 var node2 = new $a44aab89caa44953$var$Rule$2$1(); 23269 this.init(node2, token[2]); 23270 node2.selector = ""; 23271 node2.raws.between = ""; 23272 this.current = node2; 23273 }; 23274 _proto.end = function end(token) { 23275 if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon; 23276 this.semicolon = false; 23277 this.current.raws.after = (this.current.raws.after || "") + this.spaces; 23278 this.spaces = ""; 23279 if (this.current.parent) { 23280 this.current.source.end = this.getPosition(token[2]); 23281 this.current.source.end.offset++; 23282 this.current = this.current.parent; 23283 } else this.unexpectedClose(token); 23284 }; 23285 _proto.endFile = function endFile() { 23286 if (this.current.parent) this.unclosedBlock(); 23287 if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon; 23288 this.current.raws.after = (this.current.raws.after || "") + this.spaces; 23289 this.root.source.end = this.getPosition(this.tokenizer.position()); 23290 }; 23291 _proto.freeSemicolon = function freeSemicolon(token) { 23292 this.spaces += token[1]; 23293 if (this.current.nodes) { 23294 var prev = this.current.nodes[this.current.nodes.length - 1]; 23295 if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) { 23296 prev.raws.ownSemicolon = this.spaces; 23297 this.spaces = ""; 23298 } 23299 } 23300 }; 23301 // Helpers 23302 _proto.getPosition = function getPosition(offset) { 23303 var pos = this.input.fromOffset(offset); 23304 return { 23305 column: pos.col, 23306 line: pos.line, 23307 offset: offset 23308 }; 23309 }; 23310 _proto.init = function init(node2, offset) { 23311 this.current.push(node2); 23312 node2.source = { 23313 input: this.input, 23314 start: this.getPosition(offset) 23315 }; 23316 node2.raws.before = this.spaces; 23317 this.spaces = ""; 23318 if (node2.type !== "comment") this.semicolon = false; 23319 }; 23320 _proto.other = function other(start) { 23321 var end = false; 23322 var type = null; 23323 var colon = false; 23324 var bracket = null; 23325 var brackets = []; 23326 var customProperty = start[1].startsWith("--"); 23327 var tokens = []; 23328 var token = start; 23329 while(token){ 23330 type = token[0]; 23331 tokens.push(token); 23332 if (type === "(" || type === "[") { 23333 if (!bracket) bracket = token; 23334 brackets.push(type === "(" ? ")" : "]"); 23335 } else if (customProperty && colon && type === "{") { 23336 if (!bracket) bracket = token; 23337 brackets.push("}"); 23338 } else if (brackets.length === 0) { 23339 if (type === ";") { 23340 if (colon) { 23341 this.decl(tokens, customProperty); 23342 return; 23343 } else break; 23344 } else if (type === "{") { 23345 this.rule(tokens); 23346 return; 23347 } else if (type === "}") { 23348 this.tokenizer.back(tokens.pop()); 23349 end = true; 23350 break; 23351 } else if (type === ":") colon = true; 23352 } else if (type === brackets[brackets.length - 1]) { 23353 brackets.pop(); 23354 if (brackets.length === 0) bracket = null; 23355 } 23356 token = this.tokenizer.nextToken(); 23357 } 23358 if (this.tokenizer.endOfFile()) end = true; 23359 if (brackets.length > 0) this.unclosedBracket(bracket); 23360 if (end && colon) { 23361 if (!customProperty) while(tokens.length){ 23362 token = tokens[tokens.length - 1][0]; 23363 if (token !== "space" && token !== "comment") break; 23364 this.tokenizer.back(tokens.pop()); 23365 } 23366 this.decl(tokens, customProperty); 23367 } else this.unknownWord(tokens); 23368 }; 23369 _proto.parse = function parse() { 23370 var token; 23371 while(!this.tokenizer.endOfFile()){ 23372 token = this.tokenizer.nextToken(); 23373 switch(token[0]){ 23374 case "space": 23375 this.spaces += token[1]; 23376 break; 23377 case ";": 23378 this.freeSemicolon(token); 23379 break; 23380 case "}": 23381 this.end(token); 23382 break; 23383 case "comment": 23384 this.comment(token); 23385 break; 23386 case "at-word": 23387 this.atrule(token); 23388 break; 23389 case "{": 23390 this.emptyRule(token); 23391 break; 23392 default: 23393 this.other(token); 23394 break; 23395 } 23396 } 23397 this.endFile(); 23398 }; 23399 _proto.precheckMissedSemicolon = function precheckMissedSemicolon() {}; 23400 _proto.raw = function raw(node2, prop, tokens, customProperty) { 23401 var token, type; 23402 var length = tokens.length; 23403 var value = ""; 23404 var clean = true; 23405 var next, prev; 23406 for(var i2 = 0; i2 < length; i2 += 1){ 23407 token = tokens[i2]; 23408 type = token[0]; 23409 if (type === "space" && i2 === length - 1 && !customProperty) clean = false; 23410 else if (type === "comment") { 23411 prev = tokens[i2 - 1] ? tokens[i2 - 1][0] : "empty"; 23412 next = tokens[i2 + 1] ? tokens[i2 + 1][0] : "empty"; 23413 if (!$a44aab89caa44953$var$SAFE_COMMENT_NEIGHBOR$1[prev] && !$a44aab89caa44953$var$SAFE_COMMENT_NEIGHBOR$1[next]) { 23414 if (value.slice(-1) === ",") clean = false; 23415 else value += token[1]; 23416 } else clean = false; 23417 } else value += token[1]; 23418 } 23419 if (!clean) { 23420 var raw = tokens.reduce(function(all, i2) { 23421 return all + i2[1]; 23422 }, ""); 23423 node2.raws[prop] = { 23424 raw: raw, 23425 value: value 23426 }; 23427 } 23428 node2[prop] = value; 23429 }; 23430 _proto.rule = function rule(tokens) { 23431 tokens.pop(); 23432 var node2 = new $a44aab89caa44953$var$Rule$2$1(); 23433 this.init(node2, tokens[0][2]); 23434 node2.raws.between = this.spacesAndCommentsFromEnd(tokens); 23435 this.raw(node2, "selector", tokens); 23436 this.current = node2; 23437 }; 23438 _proto.spacesAndCommentsFromEnd = function spacesAndCommentsFromEnd(tokens) { 23439 var lastTokenType; 23440 var spaces = ""; 23441 while(tokens.length){ 23442 lastTokenType = tokens[tokens.length - 1][0]; 23443 if (lastTokenType !== "space" && lastTokenType !== "comment") break; 23444 spaces = tokens.pop()[1] + spaces; 23445 } 23446 return spaces; 23447 }; 23448 // Errors 23449 _proto.spacesAndCommentsFromStart = function spacesAndCommentsFromStart(tokens) { 23450 var next; 23451 var spaces = ""; 23452 while(tokens.length){ 23453 next = tokens[0][0]; 23454 if (next !== "space" && next !== "comment") break; 23455 spaces += tokens.shift()[1]; 23456 } 23457 return spaces; 23458 }; 23459 _proto.spacesFromEnd = function spacesFromEnd(tokens) { 23460 var lastTokenType; 23461 var spaces = ""; 23462 while(tokens.length){ 23463 lastTokenType = tokens[tokens.length - 1][0]; 23464 if (lastTokenType !== "space") break; 23465 spaces = tokens.pop()[1] + spaces; 23466 } 23467 return spaces; 23468 }; 23469 _proto.stringFrom = function stringFrom(tokens, from) { 23470 var result2 = ""; 23471 for(var i2 = from; i2 < tokens.length; i2++)result2 += tokens[i2][1]; 23472 tokens.splice(from, tokens.length - from); 23473 return result2; 23474 }; 23475 _proto.unclosedBlock = function unclosedBlock() { 23476 var pos = this.current.source.start; 23477 throw this.input.error("Unclosed block", pos.line, pos.column); 23478 }; 23479 _proto.unclosedBracket = function unclosedBracket(bracket) { 23480 throw this.input.error("Unclosed bracket", { 23481 offset: bracket[2] 23482 }, { 23483 offset: bracket[2] + 1 23484 }); 23485 }; 23486 _proto.unexpectedClose = function unexpectedClose(token) { 23487 throw this.input.error("Unexpected }", { 23488 offset: token[2] 23489 }, { 23490 offset: token[2] + 1 23491 }); 23492 }; 23493 _proto.unknownWord = function unknownWord(tokens) { 23494 throw this.input.error("Unknown word", { 23495 offset: tokens[0][2] 23496 }, { 23497 offset: tokens[0][2] + tokens[0][1].length 23498 }); 23499 }; 23500 _proto.unnamedAtrule = function unnamedAtrule(node2, token) { 23501 throw this.input.error("At-rule without name", { 23502 offset: token[2] 23503 }, { 23504 offset: token[2] + token[1].length 23505 }); 23506 }; 23507 return Parser; 23508}(); 23509var $a44aab89caa44953$var$parser$1 = $a44aab89caa44953$var$Parser$1$1; 23510var $a44aab89caa44953$var$Container$2$1 = $a44aab89caa44953$var$container$1; 23511var $a44aab89caa44953$var$Parser2$1 = $a44aab89caa44953$var$parser$1; 23512var $a44aab89caa44953$var$Input$2$1 = $a44aab89caa44953$var$input$1; 23513function $a44aab89caa44953$var$parse$3$1(css, opts) { 23514 var input2 = new $a44aab89caa44953$var$Input$2$1(css, opts); 23515 var parser2 = new $a44aab89caa44953$var$Parser2$1(input2); 23516 try { 23517 parser2.parse(); 23518 } catch (e2) { 23519 throw e2; 23520 } 23521 return parser2.root; 23522} 23523var $a44aab89caa44953$var$parse_1$1 = $a44aab89caa44953$var$parse$3$1; 23524$a44aab89caa44953$var$parse$3$1.default = $a44aab89caa44953$var$parse$3$1; 23525$a44aab89caa44953$var$Container$2$1.registerParse($a44aab89caa44953$var$parse$3$1); 23526var $a44aab89caa44953$var$isClean$3 = $a44aab89caa44953$var$symbols$
235261.isClean, $a44aab89caa44953$var$my$3 = $a44aab89caa44953$var$symbols$1.my; 23527var $a44aab89caa44953$var$MapGenerator$1$1 = $a44aab89caa44953$var$mapGenerator$1; 23528var $a44aab89caa44953$var$stringify$2$1 = $a44aab89caa44953$var$stringify_1$1; 23529var $a44aab89caa44953$var$Container$1$1 = $a44aab89caa44953$var$container$1; 23530var $a44aab89caa44953$var$Document$2$1 = $a44aab89caa44953$var$document$1$1; 23531var $a44aab89caa44953$var$warnOnce$1$1 = $a44aab89caa44953$var$warnOnce$2$1; 23532var $a44aab89caa44953$var$Result$2$1 = $a44aab89caa44953$var$result$1; 23533var $a44aab89caa44953$var$parse$2$1 = $a44aab89caa44953$var$parse_1$1; 23534var $a44aab89caa44953$var$Root$3$1 = $a44aab89caa44953$var$root$1; 23535var $a44aab89caa44953$var$TYPE_TO_CLASS_NAME$1 = { 23536 atrule: "AtRule", 23537 comment: "Comment", 23538 decl: "Declaration", 23539 document: "Document", 23540 root: "Root", 23541 rule: "Rule" 23542}; 23543var $a44aab89caa44953$var$PLUGIN_PROPS$1 = { 23544 AtRule: true, 23545 AtRuleExit: true, 23546 Comment: true, 23547 CommentExit: true, 23548 Declaration: true, 23549 DeclarationExit: true, 23550 Document: true, 23551 DocumentExit: true, 23552 Once: true, 23553 OnceExit: true, 23554 postcssPlugin: true, 23555 prepare: true, 23556 Root: true, 23557 RootExit: true, 23558 Rule: true, 23559 RuleExit: true 23560}; 23561var $a44aab89caa44953$var$NOT_VISITORS$1 = { 23562 Once: true, 23563 postcssPlugin: true, 23564 prepare: true 23565}; 23566var $a44aab89caa44953$var$CHILDREN$1 = 0; 23567function $a44aab89caa44953$var$isPromise$1(obj) { 23568 return (typeof obj === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(obj)) === "object" && typeof obj.then === "function"; 23569} 23570function $a44aab89caa44953$var$getEvents$1(node2) { 23571 var key = false; 23572 var type = $a44aab89caa44953$var$TYPE_TO_CLASS_NAME$1[node2.type]; 23573 if (node2.type === "decl") key = node2.prop.toLowerCase(); 23574 else if (node2.type === "atrule") key = node2.name.toLowerCase(); 23575 if (key && node2.append) return [ 23576 type, 23577 type + "-" + key, 23578 $a44aab89caa44953$var$CHILDREN$1, 23579 type + "Exit", 23580 type + "Exit-" + key 23581 ]; 23582 else if (key) return [ 23583 type, 23584 type + "-" + key, 23585 type + "Exit", 23586 type + "Exit-" + key 23587 ]; 23588 else if (node2.append) return [ 23589 type, 23590 $a44aab89caa44953$var$CHILDREN$1, 23591 type + "Exit" 23592 ]; 23593 else return [ 23594 type, 23595 type + "Exit" 23596 ]; 23597} 23598function $a44aab89caa44953$var$toStack$1(node2) { 23599 var events; 23600 if (node2.type === "document") events = [ 23601 "Document", 23602 $a44aab89caa44953$var$CHILDREN$1, 23603 "DocumentExit" 23604 ]; 23605 else if (node2.type === "root") events = [ 23606 "Root", 23607 $a44aab89caa44953$var$CHILDREN$1, 23608 "RootExit" 23609 ]; 23610 else events = $a44aab89caa44953$var$getEvents$1(node2); 23611 return { 23612 eventIndex: 0, 23613 events: events, 23614 iterator: 0, 23615 node: node2, 23616 visitorIndex: 0, 23617 visitors: [] 23618 }; 23619} 23620function $a44aab89caa44953$var$cleanMarks$1(node2) { 23621 node2[$a44aab89caa44953$var$isClean$3] = false; 23622 if (node2.nodes) node2.nodes.forEach(function(i2) { 23623 return $a44aab89caa44953$var$cleanMarks$1(i2); 23624 }); 23625 return node2; 23626} 23627var $a44aab89caa44953$var$postcss$2$1 = {}; 23628var $a44aab89caa44953$var$LazyResult$2$1 = /*#__PURE__*/ function() { 23629 function LazyResult(processor2, css, opts) { 23630 var _this = this; 23631 this.stringified = false; 23632 this.processed = false; 23633 var root2; 23634 if ((typeof css === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(css)) === "object" && css !== null && (css.type === "root" || css.type === "document")) root2 = $a44aab89caa44953$var$cleanMarks$1(css); 23635 else if ($a44aab89caa44953$var$_instanceof(css, LazyResult) || $a44aab89caa44953$var$_instanceof(css, $a44aab89caa44953$var$Result$2$1)) { 23636 root2 = $a44aab89caa44953$var$cleanMarks$1(css.root); 23637 if (css.map) { 23638 if (typeof opts.map === "undefined") opts.map = {}; 23639 if (!opts.map.inline) opts.map.inline = false; 23640 opts.map.prev = css.map; 23641 } 23642 } else { 23643 var parser2 = $a44aab89caa44953$var$parse$2$1; 23644 if (opts.syntax) parser2 = opts.syntax.parse; 23645 if (opts.parser) parser2 = opts.parser; 23646 if (parser2.parse) parser2 = parser2.parse; 23647 try { 23648 root2 = parser2(css, opts); 23649 } catch (error) { 23650 this.processed = true; 23651 this.error = error; 23652 } 23653 if (root2 && !root2[$a44aab89caa44953$var$my$3]) $a44aab89caa44953$var$Container$1$1.rebuild(root2); 23654 } 23655 this.result = new $a44aab89caa44953$var$Result$2$1(processor2, root2, opts); 23656 this.helpers = $a44aab89caa44953$var$_extends({}, $a44aab89caa44953$var$postcss$2$1, { 23657 postcss: $a44aab89caa44953$var$postcss$2$1, 23658 result: this.result 23659 }); 23660 this.plugins = this.processor.plugins.map(function(plugin22) { 23661 if ((typeof plugin22 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(plugin22)) === "object" && plugin22.prepare) return $a44aab89caa44953$var$_extends({}, plugin22, plugin22.prepare(_this.result)); 23662 else return plugin22; 23663 }); 23664 } 23665 var _proto = LazyResult.prototype; 23666 _proto.async = function async() { 23667 if (this.error) return Promise.reject(this.error); 23668 if (this.processed) return Promise.resolve(this.result); 23669 if (!this.processing) this.processing = this.runAsync(); 23670 return this.processing; 23671 };
vendor: 21,033 bytes, lines 23672-24166
23672 _proto.catch = function _catch(onRejected) { 23673 return this.async().catch(onRejected); 23674 }; 23675 _proto.finally = function _finally(onFinally) { 23676 return this.async().then(onFinally, onFinally); 23677 }; 23678 _proto.getAsyncError = function getAsyncError() { 23679 throw new Error("Use process(css).then(cb) to work with async plugins"); 23680 }; 23681 _proto.handleError = function handleError(error, node2) { 23682 var plugin22 = this.result.lastPlugin; 23683 try { 23684 if (node2) node2.addToError(error); 23685 this.error = error; 23686 if (error.name === "CssSyntaxError" && !error.plugin) { 23687 error.plugin = plugin22.postcssPlugin; 23688 error.setMessage(); 23689 } else if (plugin22.postcssVersion) var pluginName, pluginVer, runtimeVer, a2, b; 23690 } catch (err) { 23691 if (console && console.error) console.error(err); 23692 } 23693 return error; 23694 }; 23695 _proto.prepareVisitors = function prepareVisitors() { 23696 var _this = this; 23697 this.listeners = {}; 23698 var add = function(plugin22, type, cb) { 23699 if (!_this.listeners[type]) _this.listeners[type] = []; 23700 _this.listeners[type].push([ 23701 plugin22, 23702 cb 23703 ]); 23704 }; 23705 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.plugins), _step; !(_step = _iterator()).done;){ 23706 var plugin22 = _step.value; 23707 if ((typeof plugin22 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(plugin22)) === "object") for(var event in plugin22){ 23708 if (!$a44aab89caa44953$var$PLUGIN_PROPS$1[event] && /^[A-Z]/.test(event)) throw new Error("Unknown event " + event + " in " + plugin22.postcssPlugin + ". Try to update PostCSS (" + this.processor.version + " now)."); 23709 if (!$a44aab89caa44953$var$NOT_VISITORS$1[event]) { 23710 if ($a44aab89caa44953$var$_type_of(plugin22[event]) === "object") { 23711 for(var filter in plugin22[event])if (filter === "*") add(plugin22, event, plugin22[event][filter]); 23712 else add(plugin22, event + "-" + filter.toLowerCase(), plugin22[event][filter]); 23713 } else if (typeof plugin22[event] === "function") add(plugin22, event, plugin22[event]); 23714 } 23715 } 23716 } 23717 this.hasListener = Object.keys(this.listeners).length > 0; 23718 }; 23719 _proto.runAsync = function runAsync() { 23720 var _this = this; 23721 return $a44aab89caa44953$var$_async_to_generator(function() { 23722 var i2, plugin22, promise, error, root2, stack, promise1, e2, node2, _loop, _iterator, _step; 23723 return $a44aab89caa44953$var$_ts_generator(this, function(_state) { 23724 switch(_state.label){ 23725 case 0: 23726 _this.plugin = 0; 23727 i2 = 0; 23728 _state.label = 1; 23729 case 1: 23730 if (!(i2 < _this.plugins.length)) return [ 23731 3, 23732 6 23733 ]; 23734 plugin22 = _this.plugins[i2]; 23735 promise = _this.runOnRoot(plugin22); 23736 if (!$a44aab89caa44953$var$isPromise$1(promise)) return [ 23737 3, 23738 5 23739 ]; 23740 _state.label = 2; 23741 case 2: 23742 _state.trys.push([ 23743 2, 23744 4, 23745 , 23746 5 23747 ]); 23748 return [ 23749 4, 23750 promise 23751 ]; 23752 case 3: 23753 _state.sent(); 23754 return [ 23755 3, 23756 5 23757 ]; 23758 case 4: 23759 error = _state.sent(); 23760 throw _this.handleError(error); 23761 case 5: 23762 i2++; 23763 return [ 23764 3, 23765 1 23766 ]; 23767 case 6: 23768 _this.prepareVisitors(); 23769 if (!_this.hasListener) return [ 23770 3, 23771 18 23772 ]; 23773 root2 = _this.result.root; 23774 _state.label = 7; 23775 case 7: 23776 if (!!root2[$a44aab89caa44953$var$isClean$3]) return [ 23777 3, 23778 14 23779 ]; 23780 root2[$a44aab89caa44953$var$isClean$3] = true; 23781 stack = [ 23782 $a44aab89caa44953$var$toStack$1(root2) 23783 ]; 23784 _state.label = 8; 23785 case 8: 23786 if (!(stack.length > 0)) return [ 23787 3, 23788 13 23789 ]; 23790 promise1 = _this.visitTick(stack); 23791 if (!$a44aab89caa44953$var$isPromise$1(promise1)) return [ 23792 3, 23793 12 23794 ]; 23795 _state.label = 9; 23796 case 9: 23797 _state.trys.push([ 23798 9, 23799 11, 23800 , 23801 12 23802 ]); 23803 return [ 23804 4, 23805 promise1 23806 ]; 23807 case 10: 23808 _state.sent(); 23809 return [ 23810 3, 23811 12 23812 ]; 23813 case 11: 23814 e2 = _state.sent(); 23815 node2 = stack[stack.length - 1].node; 23816 throw _this.handleError(e2, node2); 23817 case 12: 23818 return [ 23819 3, 23820 8 23821 ]; 23822 case 13: 23823 return [ 23824 3, 23825 7 23826 ]; 23827 case 14: 23828 if (!_this.listeners.OnceExit) return [ 23829 3, 23830 18 23831 ]; 23832 _loop = function() { 23833 var _step_value, plugin22, visitor, roots, e2; 23834 return $a44aab89caa44953$var$_ts_generator(this, function(_state) { 23835 switch(_state.label){ 23836 case 0: 23837 _step_value = _step.value, plugin22 = _step_value[0], visitor = _step_value[1]; 23838 _this.result.lastPlugin = plugin22; 23839 _state.label = 1; 23840 case 1: 23841 _state.trys.push([ 23842 1, 23843 6, 23844 , 23845 7 23846 ]); 23847 if (!(root2.type === "document")) return [ 23848 3, 23849 3 23850 ]; 23851 roots = root2.nodes.map(function(subRoot) { 23852 return visitor(subRoot, _this.helpers); 23853 }); 23854 return [ 23855 4, 23856 Promise.all(roots) 23857 ]; 23858 case 2: 23859 _state.sent(); 23860 return [ 23861 3, 23862 5 23863 ]; 23864 case 3: 23865 return [ 23866 4, 23867 visitor(root2, _this.helpers) 23868 ]; 23869 case 4: 23870 _state.sent(); 23871 _state.label = 5; 23872 case 5: 23873 return [ 23874 3, 23875 7 23876 ]; 23877 case 6: 23878 e2 = _state.sent(); 23879 throw _this.handleError(e2); 23880 case 7: 23881 return [ 23882 2 23883 ]; 23884 } 23885 }); 23886 }; 23887 _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(_this.listeners.OnceExit); 23888 _state.label = 15; 23889 case 15: 23890 if (!!(_step = _iterator()).done) return [ 23891 3, 23892 18 23893 ]; 23894 return [ 23895 5, 23896 $a44aab89caa44953$var$_ts_values(_loop()) 23897 ]; 23898 case 16: 23899 _state.sent(); 23900 _state.label = 17; 23901 case 17: 23902 return [ 23903 3, 23904 15 23905 ]; 23906 case 18: 23907 _this.processed = true; 23908 return [ 23909 2, 23910 _this.stringify() 23911 ]; 23912 } 23913 }); 23914 })(); 23915 }; 23916 _proto.runOnRoot = function runOnRoot(plugin22) { 23917 var _this = this; 23918 this.result.lastPlugin = plugin22; 23919 try { 23920 if ((typeof plugin22 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(plugin22)) === "object" && plugin22.Once) { 23921 if (this.result.root.type === "document") { 23922 var roots = this.result.root.nodes.map(function(root2) { 23923 return plugin22.Once(root2, _this.helpers); 23924 }); 23925 if ($a44aab89caa44953$var$isPromise$1(roots[0])) return Promise.all(roots); 23926 return roots; 23927 } 23928 return plugin22.Once(this.result.root, this.helpers); 23929 } else if (typeof plugin22 === "function") return plugin22(this.result.root, this.result); 23930 } catch (error) { 23931 throw this.handleError(error); 23932 } 23933 }; 23934 _proto.stringify = function stringify() { 23935 if (this.error) throw this.error; 23936 if (this.stringified) return this.result; 23937 this.stringified = true; 23938 this.sync(); 23939 var opts = this.result.opts; 23940 var str = $a44aab89caa44953$var$stringify$2$1; 23941 if (opts.syntax) str = opts.syntax.stringify; 23942 if (opts.stringifier) str = opts.stringifier; 23943 if (str.stringify) str = str.stringify; 23944 var map = new $a44aab89caa44953$var$MapGenerator$1$1(str, this.result.root, this.result.opts); 23945 var data = map.generate(); 23946 this.result.css = data[0]; 23947 this.result.map = data[1]; 23948 return this.result; 23949 }; 23950 _proto.sync = function sync() { 23951 if (this.error) throw this.error; 23952 if (this.processed) return this.result; 23953 this.processed = true; 23954 if (this.processing) throw this.getAsyncError(); 23955 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.plugins), _step; !(_step = _iterator()).done;){ 23956 var plugin22 = _step.value; 23957 var promise = this.runOnRoot(plugin22); 23958 if ($a44aab89caa44953$var$isPromise$1(promise)) throw this.getAsyncError(); 23959 } 23960 this.prepareVisitors(); 23961 if (this.hasListener) { 23962 var root2 = this.result.root; 23963 while(!root2[$a44aab89caa44953$var$isClean$3]){ 23964 root2[$a44aab89caa44953$var$isClean$3] = true; 23965 this.walkSync(root2); 23966 } 23967 if (this.listeners.OnceExit) { 23968 if (root2.type === "document") for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(root2.nodes), _step1; !(_step1 = _iterator1()).done;){ 23969 var subRoot = _step1.value; 23970 this.visitSync(this.listeners.OnceExit, subRoot); 23971 } 23972 else this.visitSync(this.listeners.OnceExit, root2); 23973 } 23974 } 23975 return this.result; 23976 }; 23977 _proto.then = function then(onFulfilled, onRejected) { 23978 return this.async().then(onFulfilled, onRejected); 23979 }; 23980 _proto.toString = function toString() { 23981 return this.css; 23982 }; 23983 _proto.visitSync = function visitSync(visitors, node2) { 23984 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(visitors), _step; !(_step = _iterator()).done;){ 23985 var _step_value = _step.value, plugin22 = _step_value[0], visitor = _step_value[1]; 23986 this.result.lastPlugin = plugin22; 23987 var promise = void 0; 23988 try { 23989 promise = visitor(node2, this.helpers); 23990 } catch (e2) { 23991 throw this.handleError(e2, node2.proxyOf); 23992 } 23993 if (node2.type !== "root" && node2.type !== "document" && !node2.parent) return true; 23994 if ($a44aab89caa44953$var$isPromise$1(promise)) throw this.getAsyncError(); 23995 } 23996 }; 23997 _proto.visitTick = function visitTick(stack) { 23998 var visit2 = stack[stack.length - 1]; 23999 var node2 = visit2.node, visitors = visit2.visitors; 24000 if (node2.type !== "root" && node2.type !== "document" && !node2.parent) { 24001 stack.pop(); 24002 return; 24003 } 24004 if (visitors.length > 0 && visit2.visitorIndex < visitors.length) { 24005 var _visitors_visit2_visitorIndex = visitors[visit2.visitorIndex], plugin22 = _visitors_visit2_visitorIndex[0], visitor = _visitors_visit2_visitorIndex[1]; 24006 visit2.visitorIndex += 1; 24007 if (visit2.visitorIndex === visitors.length) { 24008 visit2.visitors = []; 24009 visit2.visitorIndex = 0; 24010 } 24011 this.result.lastPlugin = plugin22; 24012 try { 24013 return visitor(node2.toProxy(), this.helpers); 24014 } catch (e2) { 24015 throw this.handleError(e2, node2); 24016 } 24017 } 24018 if (visit2.iterator !== 0) { 24019 var iterator = visit2.iterator; 24020 var child; 24021 while(child = node2.nodes[node2.indexes[iterator]]){ 24022 node2.indexes[iterator] += 1; 24023 if (!child[$a44aab89caa44953$var$isClean$3]) { 24024 child[$a44aab89caa44953$var$isClean$3] = true; 24025 stack.push($a44aab89caa44953$var$toStack$1(child)); 24026 return; 24027 } 24028 } 24029 visit2.iterator = 0; 24030 delete node2.indexes[iterator]; 24031 } 24032 var events = visit2.events; 24033 while(visit2.eventIndex < events.length){ 24034 var event = events[visit2.eventIndex]; 24035 visit2.eventIndex += 1; 24036 if (event === $a44aab89caa44953$var$CHILDREN$1) { 24037 if (node2.nodes && node2.nodes.length) { 24038 node2[$a44aab89caa44953$var$isClean$3] = true; 24039 visit2.iterator = node2.getIterator(); 24040 } 24041 return; 24042 } else if (this.listeners[event]) { 24043 visit2.visitors = this.listeners[event]; 24044 return; 24045 } 24046 } 24047 stack.pop(); 24048 }; 24049 _proto.walkSync = function walkSync(node2) { 24050 var _this = this; 24051 node2[$a44aab89caa44953$var$isClean$3] = true; 24052 var events = $a44aab89caa44953$var$getEvents$1(node2); 24053 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(events), _step; !(_step = _iterator()).done;){ 24054 var event = _step.value; 24055 if (event === $a44aab89caa44953$var$CHILDREN$1) { 24056 if (node2.nodes) node2.each(function(child) { 24057 if (!child[$a44aab89caa44953$var$isClean$3]) _this.walkSync(child); 24058 }); 24059 } else { 24060 var visitors = this.listeners[event]; 24061 if (visitors) { 24062 if (this.visitSync(visitors, node2.toProxy())) return; 24063 } 24064 } 24065 } 24066 }; 24067 _proto.warnings = function warnings() { 24068 return this.sync().warnings(); 24069 }; 24070 $a44aab89caa44953$var$_create_class(LazyResult, [ 24071 { 24072 key: "content", 24073 get: function get() { 24074 return this.stringify().content; 24075 } 24076 }, 24077 { 24078 key: "css", 24079 get: function get() { 24080 return this.stringify().css; 24081 } 24082 }, 24083 { 24084 key: "map", 24085 get: function get() { 24086 return this.stringify().map; 24087 } 24088 }, 24089 { 24090 key: "messages", 24091 get: function get() { 24092 return this.sync().messages; 24093 } 24094 }, 24095 { 24096 key: "opts", 24097 get: function get() { 24098 return this.result.opts; 24099 } 24100 }, 24101 { 24102 key: "processor", 24103 get: function get() { 24104 return this.result.processor; 24105 } 24106 }, 24107 { 24108 key: "root", 24109 get: function get() { 24110 return this.sync().root; 24111 } 24112 }, 24113 { 24114 key: Symbol.toStringTag, 24115 get: function get() { 24116 return "LazyResult"; 24117 } 24118 } 24119 ]); 24120 return LazyResult; 24121}(); 24122$a44aab89caa44953$var$LazyResult$2$1.registerPostcss = function(dependant) { 24123 $a44aab89caa44953$var$postcss$2$1 = dependant; 24124}; 24125var $a44aab89caa44953$var$lazyResult$1 = $a44aab89caa44953$var$LazyResult$2$1; 24126$a44aab89caa44953$var$LazyResult$2$1.default = $a44aab89caa44953$var$LazyResult$2$1; 24127$a44aab89caa44953$var$Root$3$1.registerLazyResult($a44aab89caa44953$var$LazyResult$2$1); 24128$a44aab89caa44953$var$Document$2$1.registerLazyResult($a44aab89caa44953$var$LazyResult$2$1); 24129var $a44aab89caa44953$var$MapGenerator2$1 = $a44aab89caa44953$var$mapGenerator$1; 24130var $a44aab89caa44953$var$stringify$1$1 = $a44aab89caa44953$var$stringify_1$1; 24131var $a44aab89caa44953$var$warnOnce2$1 = $a44aab89caa44953$var$warnOnce$2$1; 24132var $a44aab89caa44953$var$parse$1$1 = $a44aab89caa44953$var$parse_1$1; 24133var $a44aab89caa44953$var$Result$1$1 = $a44aab89caa44953$var$result$1; 24134var $a44aab89caa44953$var$NoWorkResult$1$1 = /*#__PURE__*/ function() { 24135 function NoWorkResult(processor2, css, opts) { 24136 css = css.toString(); 24137 this.stringified = false; 24138 this._processor = processor2; 24139 this._css = css; 24140 this._opts = opts; 24141 this._map = void 0; 24142 var root2; 24143 var str = $a44aab89caa44953$var$stringify$1$1; 24144 this.result = new $a44aab89caa44953$var$Result$1$1(this._processor, root2, this._opts); 24145 this.result.css = css; 24146 var self = this; 24147 Object.defineProperty(this.result, "root", { 24148 get: function get() { 24149 return self.root; 24150 } 24151 }); 24152 var map = new $a44aab89caa44953$var$MapGenerator2$1(str, root2, this._opts, css); 24153 if (map.isMap()) { 24154 var _map_generate = map.generate(), generatedCSS = _map_generate[0], generatedMap = _map_generate[1]; 24155 if (generatedCSS) this.result.css = generatedCSS; 24156 if (generatedMap) this.result.map = generatedMap; 24157 } else { 24158 map.clearAnnotation(); 24159 this.result.css = map.css; 24160 } 24161 } 24162 var _proto = NoWorkResult.prototype; 24163 _proto.async = function async() { 24164 if (this.error) return Promise.reject(this.error); 24165 return Promise.resolve(this.result); 24166 };
24167 _proto.catch = function _catch(onRejected) { 24168 return this.async().catch(onRejected); 24169 }; 24170 _proto.finally = function _finally(onFinally) { 24171 return this.async().then(onFinally, onFinally); 24172 }; 24173 _proto.sync = function sync() { 24174 if (this.error) throw this.error; 24175 return this.result; 24176 }; 24177 _proto.then = function then(onFulfilled, onRejected) { 24178 return this.async().then(onFulfilled, onRejected); 24179 }; 24180 _proto.toString = function toString() { 24181 return this._css; 24182 }; 24183 _proto.warnings = function warnings() { 24184 return []; 24185 }; 24186 $a44aab89caa44953$var$_create_class(NoWorkResult, [ 24187 { 24188 key: "content", 24189 get: function get() { 24190 return this.result.css; 24191 } 24192 }, 24193 { 24194 key: "css", 24195 get: function get() { 24196 return this.result.css; 24197 } 24198 }, 24199 { 24200 key: "map", 24201 get: function get() { 24202 return this.result.map; 24203 } 24204 }, 24205 { 24206 key: "messages", 24207 get: function get() { 24208 return []; 24209 } 24210 }, 24211 { 24212 key: "opts", 24213 get: function get() { 24214 return this.result.opts; 24215 } 24216 }, 24217 { 24218 key: "processor", 24219 get: function get() { 24220 return this.result.processor; 24221 } 24222 }, 24223 { 24224 key: "root", 24225 get: function get() { 24226 if (this._root) return this._root; 24227 var root2; 24228 var parser2 = $a44aab89caa44953$var$parse$1$1; 24229 try { 24230 root2 = parser2(this._css, this._opts); 24231 } catch (error) { 24232 this.error = error; 24233 } 24234 if (this.error) throw this.error; 24235 else { 24236 this._root = root2; 24237 return root2; 24238 } 24239 } 24240 }, 24241 { 24242 key: Symbol.toStringTag, 24243 get: function get() { 24244 return "NoWorkResult"; 24245 } 24246 } 24247 ]); 24248 return NoWorkResult; 24249}(); 24250var $a44aab89caa44953$var$noWorkResult$1 = $a44aab89caa44953$var$NoWorkResult$1$1; 24251$a44aab89caa44953$var$NoWorkResult$1$1.default = $a44aab89caa44953$var$NoWorkResult$1$1; 24252var $a44aab89caa44953$var$NoWorkResult2$1 = $a44aab89caa44953$var$noWorkResult$1; 24253var $a44aab89caa44953$var$LazyResult$1$1 = $a44aab89caa44953$var$lazyResult$1; 24254var $a44aab89caa44953$var$Document$1$1 = $a44aab89caa44953$var$document$1$1; 24255var $a44aab89caa44953$var$Root$2$1 = $a44aab89caa44953$var$root$1; 24256var $a44aab89caa44953$var$Processor$1$1 = /*#__PURE__*/ function() { 24257 function Processor(plugins) { 24258 if (plugins === void 0) plugins = []; 24259 this.version = "8.4.38"; 24260 this.plugins = this.normalize(plugins); 24261 } 24262 var _proto = Processor.prototype; 24263 _proto.normalize = function normalize(plugins) { 24264 var normalized = []; 24265 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(plugins), _step; !(_step = _iterator()).done;){ 24266 var i2 = _step.value; 24267 if (i2.postcss === true) i2 = i2(); 24268 else if (i2.postcss) i2 = i2.postcss; 24269 if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && Array.isArray(i2.plugins)) normalized = normalized.concat(i2.plugins); 24270 else if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && i2.postcssPlugin) normalized.push(i2); 24271 else if (typeof i2 === "function") normalized.push(i2); 24272 else if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && (i2.parse || i2.stringify)) ; 24273 else throw new Error(i2 + " is not a PostCSS plugin"); 24274 } 24275 return normalized; 24276 }; 24277 _proto.process = function process1(css, opts) { 24278 if (opts === void 0) opts = {}; 24279 if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) return new $a44aab89caa44953$var$NoWorkResult2$1(this, css, opts); 24280 else return new $a44aab89caa44953$var$LazyResult$1$1(this, css, opts); 24281 }; 24282 _proto.use = function use(plugin22) { 24283 this.plugins = this.plugins.concat(this.normalize([ 24284 plugin22 24285 ])); 24286 return this; 24287 }; 24288 return Processor; 24289}(); 24290var $a44aab89caa44953$var$processor$1 = $a44aab89caa44953$var$Processor$1$1; 24291$a44aab89caa44953$var$Processor$1$1.default = $a44aab89caa44953$var$Processor$1$1; 24292$a44aab89caa44953$var$Root$2$1.registerProcessor($a44aab89caa44953$var$Processor$1$1); 24293$a44aab89caa44953$var$Document$1$1.registerProcessor($a44aab89caa44953$var$Processor$1$1); 24294var $a44aab89caa44953$var$Declaration$1$1 = $a44aab89caa44953$var$declaration$1; 24295var $a44aab89caa44953$var$PreviousMap2$1 = $a44aab89caa44953$var$previousMap$1; 24296var $a44aab89caa44953$var$Comment$1$1 = $a44aab89caa44953$var$comment$1; 24297var $a44aab89caa44953$var$AtRule$1$1 = $a44aab89caa44953$var$atRule$1; 24298var $a44aab89caa44953$var$Input$1$1 = $a44aab89caa44953$var$input$1; 24299var $a44aab89caa44953$var$Root$1$1 = $a44aab89caa44953$var$root$1; 24300var $a44aab89caa44953$var$Rule$1$1 = $a44aab89caa44953$var$rule$1; 24301function $a44aab89caa44953$var$fromJSON$1$1(json, inputs) { 24302 if (Array.isArray(json)) return json.map(function(n2) { 24303 return $a44aab89caa44953$var$fromJSON$1$1(n2); 24304 }); 24305 var ownInputs = json.inputs, defaults = $a44aab89caa44953$var$_object_without_properties_loose(json, [ 24306 "inputs" 24307 ]); 24308 if (ownInputs) { 24309 inputs = []; 24310 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(ownInputs), _step; !(_step = _iterator()).done;){ 24311 var input2 = _step.value; 24312 var inputHydrated = $a44aab89caa44953$var$_extends({}, input2, { 24313 __proto__: $a44aab89caa44953$var$Input$1$1.prototype 24314 }); 24315 if (inputHydrated.map) inputHydrated.map = $a44aab89caa44953$var$_extends({}, inputHydrated.map, { 24316 __proto__: $a44aab89caa44953$var$PreviousMap2$1.prototype 24317 }); 24318 inputs.push(inputHydrated); 24319 } 24320 } 24321 if (defaults.nodes) defaults.nodes = json.nodes.map(function(n2) { 24322 return $a44aab89caa44953$var$fromJSON$1$1(n2, inputs); 24323 }); 24324 if (defaults.source) { 24325 var _defaults_source = defaults.source, inputId = _defaults_source.inputId, source = $a44aab89caa44953$var$_object_without_properties_loose(_defaults_source, [ 24326 "inputId" 24327 ]); 24328 defaults.source = source; 24329 if (inputId != null) defaults.source.input = inputs[inputId]; 24330 } 24331 if (defaults.type === "root") return new $a44aab89caa44953$var$Root$1$1(defaults); 24332 else if (defaults.type === "decl") return new $a44aab89caa44953$var$Declaration$1$1(defaults); 24333 else if (defaults.type === "rule") return new $a44aab89caa44953$var$Rule$1$1(defaults); 24334 else if (defaults.type === "comment") return new $a44aab89caa44953$var$Comment$1$1(defaults); 24335 else if (defaults.type === "atrule") return new $a44aab89caa44953$var$AtRule$1$1(defaults); 24336 else throw new Error("Unknown node type: " + json.type); 24337} 24338var $a44aab89caa44953$var$fromJSON_1$1 = $a44aab89caa44953$var$fromJSON$1$1; 24339$a44aab89caa44953$var$fromJSON$1$1.default = $a44aab89caa44953$var$fromJSON$1$1; 24340var $a44aab89caa44953$var$CssSyntaxError2$1 = $a44aab89caa44953$var$cssSyntaxError$1; 24341var $a44aab89caa44953$var$Declaration2$1 = $a44aab89caa44953$var$declaration$1; 24342var $a44aab89caa44953$var$LazyResult2$1 = $a44aab89caa44953$var$lazyResult$1; 24343var $a44aab89caa44953$var$Container2$1 = $a44aab89caa44953$var$container$1; 24344var $a44aab89caa44953$var$Processor2$1 = $a44aab89caa44953$var$processor$1; 24345var $a44aab89caa44953$var$stringify$5 = $a44aab89caa44953$var$stringify_1$1; 24346var $a44aab89caa44953$var$fromJSON$2 = $a44aab89caa44953$var$fromJSON_1$1; 24347var $a44aab89caa44953$var$Document22 = $a44aab89caa44953$var$document$1$1; 24348var $a44aab89caa44953$var$Warning2$1 = $a44aab89caa44953$var$warning$1; 24349var $a44aab89caa44953$var$Comment2$1 = $a44aab89caa44953$var$comment$1; 24350var $a44aab89caa44953$var$AtRule2$1 = $a44aab89caa44953$var$atRule$1; 24351var $a44aab89caa44953$var$Result2$1 = $a44aab89caa44953$var$result$1; 24352var $a44aab89caa44953$var$Input2$1 = $a44aab89caa44953$var$input$1; 24353var $a44aab89caa44953$var$parse$5 = $a44aab89caa44953$var$parse_1$1; 24354var $a44aab89caa44953$var$list$3 = $a44aab89caa44953$var$list_1$1; 24355var $a44aab89caa44953$var$Rule2$1 = $a44aab89caa44953$var$rule$1; 24356var $a44aab89caa44953$var$Root2$1 = $a44aab89caa44953$var$root$1; 24357var $a44aab89caa44953$var$Node2$1 = $a44aab89caa44953$var$node$1; 24358function $a44aab89caa44953$var$postcss$3() { 24359 for(var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++)plugins[_key] = arguments[_key]; 24360 if (plugins.length === 1 && Array.isArray(plugins[0])) plugins = plugins[0]; 24361 return new $a44aab89caa44953$var$Processor2$1(plugins); 24362} 24363$a44aab89caa44953$var$postcss$3.plugin = function plugin(name, initializer) { 24364 var warningPrinted = false;
vendor: 11,990 bytes, lines 24365-24628
24365 function creator() { 24366 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 24367 if (console && console.warn && !warningPrinted) { 24368 warningPrinted = true; 24369 console.warn(name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"); 24370 } 24371 var transformer = initializer.apply(void 0, [].concat(args)); 24372 transformer.postcssPlugin = name; 24373 transformer.postcssVersion = new $a44aab89caa44953$var$Processor2$1().version; 24374 return transformer; 24375 } 24376 var cache; 24377 Object.defineProperty(creator, "postcss", { 24378 get: function get() { 24379 if (!cache) cache = creator(); 24380 return cache; 24381 } 24382 }); 24383 creator.process = function(css, processOpts, pluginOpts) { 24384 return $a44aab89caa44953$var$postcss$3([ 24385 creator(pluginOpts) 24386 ]).process(css, processOpts); 24387 }; 24388 return creator; 24389}; 24390$a44aab89caa44953$var$postcss$3.stringify = $a44aab89caa44953$var$stringify$5; 24391$a44aab89caa44953$var$postcss$3.parse = $a44aab89caa44953$var$parse$5; 24392$a44aab89caa44953$var$postcss$3.fromJSON = $a44aab89caa44953$var$fromJSON$2; 24393$a44aab89caa44953$var$postcss$3.list = $a44aab89caa44953$var$list$3; 24394$a44aab89caa44953$var$postcss$3.comment = function(defaults) { 24395 return new $a44aab89caa44953$var$Comment2$1(defaults); 24396}; 24397$a44aab89caa44953$var$postcss$3.atRule = function(defaults) { 24398 return new $a44aab89caa44953$var$AtRule2$1(defaults); 24399}; 24400$a44aab89caa44953$var$postcss$3.decl = function(defaults) { 24401 return new $a44aab89caa44953$var$Declaration2$1(defaults); 24402}; 24403$a44aab89caa44953$var$postcss$3.rule = function(defaults) { 24404 return new $a44aab89caa44953$var$Rule2$1(defaults); 24405}; 24406$a44aab89caa44953$var$postcss$3.root = function(defaults) { 24407 return new $a44aab89caa44953$var$Root2$1(defaults); 24408}; 24409$a44aab89caa44953$var$postcss$3.document = function(defaults) { 24410 return new $a44aab89caa44953$var$Document22(defaults); 24411}; 24412$a44aab89caa44953$var$postcss$3.CssSyntaxError = $a44aab89caa44953$var$CssSyntaxError2$1; 24413$a44aab89caa44953$var$postcss$3.Declaration = $a44aab89caa44953$var$Declaration2$1; 24414$a44aab89caa44953$var$postcss$3.Container = $a44aab89caa44953$var$Container2$1; 24415$a44aab89caa44953$var$postcss$3.Processor = $a44aab89caa44953$var$Processor2$1; 24416$a44aab89caa44953$var$postcss$3.Document = $a44aab89caa44953$var$Document22; 24417$a44aab89caa44953$var$postcss$3.Comment = $a44aab89caa44953$var$Comment2$1; 24418$a44aab89caa44953$var$postcss$3.Warning = $a44aab89caa44953$var$Warning2$1; 24419$a44aab89caa44953$var$postcss$3.AtRule = $a44aab89caa44953$var$AtRule2$1; 24420$a44aab89caa44953$var$postcss$3.Result = $a44aab89caa44953$var$Result2$1; 24421$a44aab89caa44953$var$postcss$3.Input = $a44aab89caa44953$var$Input2$1; 24422$a44aab89caa44953$var$postcss$3.Rule = $a44aab89caa44953$var$Rule2$1; 24423$a44aab89caa44953$var$postcss$3.Root = $a44aab89caa44953$var$Root2$1; 24424$a44aab89caa44953$var$postcss$3.Node = $a44aab89caa44953$var$Node2$1; 24425$a44aab89caa44953$var$LazyResult2$1.registerPostcss($a44aab89caa44953$var$postcss$3); 24426var $a44aab89caa44953$var$postcss_1$1 = $a44aab89caa44953$var$postcss$3; 24427$a44aab89caa44953$var$postcss$3.default = $a44aab89caa44953$var$postcss$3; 24428var $a44aab89caa44953$var$postcss$1$1 = /* @__PURE__ */ $a44aab89caa44953$var$getDefaultExportFromCjs$1($a44aab89caa44953$var$postcss_1$1); 24429$a44aab89caa44953$var$postcss$1$1.stringify; 24430$a44aab89caa44953$var$postcss$1$1.fromJSON; 24431$a44aab89caa44953$var$postcss$1$1.plugin; 24432$a44aab89caa44953$var$postcss$1$1.parse; 24433$a44aab89caa44953$var$postcss$1$1.list; 24434$a44aab89caa44953$var$postcss$1$1.document; 24435$a44aab89caa44953$var$postcss$1$1.comment; 24436$a44aab89caa44953$var$postcss$1$1.atRule; 24437$a44aab89caa44953$var$postcss$1$1.rule; 24438$a44aab89caa44953$var$postcss$1$1.decl; 24439$a44aab89caa44953$var$postcss$1$1.root; 24440$a44aab89caa44953$var$postcss$1$1.CssSyntaxError; 24441$a44aab89caa44953$var$postcss$1$1.Declaration; 24442$a44aab89caa44953$var$postcss$1$1.Container; 24443$a44aab89caa44953$var$postcss$1$1.Processor; 24444$a44aab89caa44953$var$postcss$1$1.Document; 24445$a44aab89caa44953$var$postcss$1$1.Comment; 24446$a44aab89caa44953$var$postcss$1$1.Warning; 24447$a44aab89caa44953$var$postcss$1$1.AtRule; 24448$a44aab89caa44953$var$postcss$1$1.Result; 24449$a44aab89caa44953$var$postcss$1$1.Input; 24450$a44aab89caa44953$var$postcss$1$1.Rule; 24451$a44aab89caa44953$var$postcss$1$1.Root; 24452$a44aab89caa44953$var$postcss$1$1.Node; 24453var $a44aab89caa44953$var$__defProp2 = Object.defineProperty; 24454var $a44aab89caa44953$var$__defNormalProp2 = function(obj, key, value) { 24455 return key in obj ? $a44aab89caa44953$var$__defProp2(obj, key, { 24456 enumerable: true, 24457 configurable: true, 24458 writable: true, 24459 value: value 24460 }) : obj[key] = value; 24461}; 24462var $a44aab89caa44953$var$__publicField2 = function(obj, key, value) { 24463 return $a44aab89caa44953$var$__defNormalProp2(obj, (typeof key === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(key)) !== "symbol" ? key + "" : key, value); 24464}; 24465function $a44aab89caa44953$var$getDefaultExportFromCjs(x2) { 24466 return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2; 24467} 24468function $a44aab89caa44953$var$getAugmentedNamespace(n2) { 24469 if (n2.__esModule) return n2; 24470 var f2 = n2.default; 24471 if (typeof f2 == "function") { 24472 var a2 = function a22() { 24473 if ($a44aab89caa44953$var$_instanceof(this, a22)) return Reflect.construct(f2, arguments, this.constructor); 24474 return f2.apply(this, arguments); 24475 }; 24476 a2.prototype = f2.prototype; 24477 } else a2 = {}; 24478 Object.defineProperty(a2, "__esModule", { 24479 value: true 24480 }); 24481 Object.keys(n2).forEach(function(k) { 24482 var d = Object.getOwnPropertyDescriptor(n2, k); 24483 Object.defineProperty(a2, k, d.get ? d : { 24484 enumerable: true, 24485 get: function get() { 24486 return n2[k]; 24487 } 24488 }); 24489 }); 24490 return a2; 24491} 24492var $a44aab89caa44953$var$picocolors_browser = { 24493 exports: {} 24494}; 24495var $a44aab89caa44953$var$x = String; 24496var $a44aab89caa44953$var$create = function create() { 24497 return { 24498 isColorSupported: false, 24499 reset: $a44aab89caa44953$var$x, 24500 bold: $a44aab89caa44953$var$x, 24501 dim: $a44aab89caa44953$var$x, 24502 italic: $a44aab89caa44953$var$x, 24503 underline: $a44aab89caa44953$var$x, 24504 inverse: $a44aab89caa44953$var$x, 24505 hidden: $a44aab89caa44953$var$x, 24506 strikethrough: $a44aab89caa44953$var$x, 24507 black: $a44aab89caa44953$var$x, 24508 red: $a44aab89caa44953$var$x, 24509 green: $a44aab89caa44953$var$x, 24510 yellow: $a44aab89caa44953$var$x, 24511 blue: $a44aab89caa44953$var$x, 24512 magenta: $a44aab89caa44953$var$x, 24513 cyan: $a44aab89caa44953$var$x, 24514 white: $a44aab89caa44953$var$x, 24515 gray: $a44aab89caa44953$var$x, 24516 bgBlack: $a44aab89caa44953$var$x, 24517 bgRed: $a44aab89caa44953$var$x, 24518 bgGreen: $a44aab89caa44953$var$x, 24519 bgYellow: $a44aab89caa44953$var$x, 24520 bgBlue: $a44aab89caa44953$var$x, 24521 bgMagenta: $a44aab89caa44953$var$x, 24522 bgCyan: $a44aab89caa44953$var$x, 24523 bgWhite: $a44aab89caa44953$var$x 24524 }; 24525}; 24526$a44aab89caa44953$var$picocolors_browser.exports = $a44aab89caa44953$var$create(); 24527$a44aab89caa44953$var$picocolors_browser.exports.createColors = $a44aab89caa44953$var$create; 24528var $a44aab89caa44953$var$picocolors_browserExports = $a44aab89caa44953$var$picocolors_browser.exports; 24529var $a44aab89caa44953$var$__viteBrowserExternal = {}; 24530var $a44aab89caa44953$var$__viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 24531 __proto__: null, 24532 default: $a44aab89caa44953$var$__viteBrowserExternal 24533}, Symbol.toStringTag, { 24534 value: "Module" 24535})); 24536var $a44aab89caa44953$var$require$$2 = /* @__PURE__ */ $a44aab89caa44953$var$getAugmentedNamespace($a44aab89caa44953$var$__viteBrowserExternal$1); 24537var $a44aab89caa44953$var$pico = $a44aab89caa44953$var$picocolors_browserExports; 24538var $a44aab89caa44953$var$terminalHighlight$1 = $a44aab89caa44953$var$require$$2; 24539var $a44aab89caa44953$var$CssSyntaxError$3 = /*#__PURE__*/ function(Error1) { 24540 $a44aab89caa44953$var$_inherits(CssSyntaxError2, Error1); 24541 function CssSyntaxError2(message, line, column, source, file, plugin22) { 24542 var _this; 24543 _this = Error1.call(this, message) || this; 24544 _this.name = "CssSyntaxError"; 24545 _this.reason = message; 24546 if (file) _this.file = file; 24547 if (source) _this.source = source; 24548 if (plugin22) _this.plugin = plugin22; 24549 if (typeof line !== "undefined" && typeof column !== "undefined") { 24550 if (typeof line === "number") { 24551 _this.line = line; 24552 _this.column = column; 24553 } else { 24554 _this.line = line.line; 24555 _this.column = line.column; 24556 _this.endLine = column.line; 24557 _this.endColumn = column.column; 24558 } 24559 } 24560 _this.setMessage(); 24561 if (Error.captureStackTrace) Error.captureStackTrace(_this, CssSyntaxError2); 24562 return _this; 24563 } 24564 var _proto = CssSyntaxError2.prototype; 24565 _proto.setMessage = function setMessage() { 24566 this.message = this.plugin ? this.plugin + ": " : ""; 24567 this.message += this.file ? this.file : "<css input>"; 24568 if (typeof this.line !== "undefined") this.message += ":" + this.line + ":" + this.column; 24569 this.message += ": " + this.reason; 24570 }; 24571 _proto.showSourceCode = function showSourceCode(color) { 24572 var _this = this; 24573 if (!this.source) return ""; 24574 var css = this.source; 24575 if (color == null) color = $a44aab89caa44953$var$pico.isColorSupported; 24576 if ($a44aab89caa44953$var$terminalHighlight$1) { 24577 if (color) css = $a44aab89caa44953$var$terminalHighlight$1(css); 24578 } 24579 var lines = css.split(/\r?\n/); 24580 var start = Math.max(this.line - 3, 0); 24581 var end = Math.min(this.line + 2, lines.length); 24582 var maxWidth = String(end).length; 24583 var mark, aside; 24584 if (color) { 24585 var _pico_createColors = $a44aab89caa44953$var$pico.createColors(true), bold = _pico_createColors.bold, gray = _pico_createColors.gray, red = _pico_createColors.red; 24586 mark = function(text) { 24587 return bold(red(text)); 24588 }; 24589 aside = function(text) { 24590 return gray(text); 24591 }; 24592 } else mark = aside = function(str) { 24593 return str; 24594 }; 24595 return lines.slice(start, end).map(function(line, index2) { 24596 var number = start + 1 + index2; 24597 var gutter = " " + (" " + number).slice(-maxWidth) + " | "; 24598 if (number === _this.line) { 24599 var spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, _this.column - 1).replace(/[^\t]/g, " "); 24600 return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^"); 24601 } 24602 return " " + aside(gutter) + line; 24603 }).join("\n"); 24604 }; 24605 _proto.toString = function toString() { 24606 var code = this.showSourceCode(); 24607 if (code) code = "\n\n" + code + "\n"; 24608 return this.name + ": " + this.message + code; 24609 }; 24610 return CssSyntaxError2; 24611}($a44aab89caa44953$var$_wrap_native_super(Error)); 24612var $a44aab89caa44953$var$cssSyntaxError = $a44aab89caa44953$var$CssSyntaxError$3; 24613$a44aab89caa44953$var$CssSyntaxError$3.default = $a44aab89caa44953$var$CssSyntaxError$3; 24614var $a44aab89caa44953$var$symbols = {}; 24615$a44aab89caa44953$var$symbols.isClean = Symbol("isClean"); 24616$a44aab89caa44953$var$symbols.my = Symbol("my"); 24617var $a44aab89caa44953$var$DEFAULT_RAW = { 24618 after: "\n", 24619 beforeClose: "\n", 24620 beforeComment: "\n", 24621 beforeDecl: "\n", 24622 beforeOpen: " ", 24623 beforeRule: "\n", 24624 colon: ": ", 24625 commentLeft: " ", 24626 commentRight: " ", 24627 emptyBody: "", 24628 indent: " ",
24629 semicolon: false 24630}; 24631function $a44aab89caa44953$var$capitalize(str) { 24632 return str[0].toUpperCase() + str.slice(1); 24633} 24634var $a44aab89caa44953$var$Stringifier$2 = /*#__PURE__*/ function() { 24635 function Stringifier2(builder) { 24636 this.builder = builder; 24637 } 24638 var _proto = Stringifier2.prototype; 24639 _proto.atrule = function atrule(node2, semicolon) { 24640 var name = "@" + node2.name; 24641 var params = node2.params ? this.rawValue(node2, "params") : ""; 24642 if (typeof node2.raws.afterName !== "undefined") name += node2.raws.afterName; 24643 else if (params) name += " "; 24644 if (node2.nodes) this.block(node2, name + params); 24645 else { 24646 var end = (node2.raws.between || "") + (semicolon ? ";" : ""); 24647 this.builder(name + params + end, node2); 24648 } 24649 }; 24650 _proto.beforeAfter = function beforeAfter(node2, detect) { 24651 var value; 24652 if (node2.type === "decl") value = this.raw(node2, null, "beforeDecl"); 24653 else if (node2.type === "comment") value = this.raw(node2, null, "beforeComment"); 24654 else if (detect === "before") value = this.raw(node2, null, "beforeRule"); 24655 else value = this.raw(node2, null, "beforeClose"); 24656 var buf = node2.parent; 24657 var depth = 0; 24658 while(buf && buf.type !== "root"){ 24659 depth += 1; 24660 buf = buf.parent; 24661 } 24662 if (value.includes("\n")) { 24663 var indent = this.raw(node2, null, "indent"); 24664 if (indent.length) for(var step = 0; step < depth; step++)value += indent; 24665 } 24666 return value; 24667 }; 24668 _proto.block = function block(node2, start) { 24669 var between = this.raw(node2, "between", "beforeOpen"); 24670 this.builder(start + between + "{", node2, "start"); 24671 var after; 24672 if (node2.nodes && node2.nodes.length) { 24673 this.body(node2); 24674 after = this.raw(node2, "after"); 24675 } else after = this.raw(node2, "after", "emptyBody"); 24676 if (after) this.builder(after); 24677 this.builder("}", node2, "end"); 24678 }; 24679 _proto.body = function body(node2) { 24680 var last = node2.nodes.length - 1; 24681 while(last > 0){ 24682 if (node2.nodes[last].type !== "comment") break; 24683 last -= 1; 24684 } 24685 var semicolon = this.raw(node2, "semicolon"); 24686 for(var i2 = 0; i2 < node2.nodes.length; i2++){ 24687 var child = node2.nodes[i2]; 24688 var before = this.raw(child, "before"); 24689 if (before) this.builder(before); 24690 this.stringify(child, last !== i2 || semicolon); 24691 } 24692 }; 24693 _proto.comment = function comment(node2) { 24694 var left = this.raw(node2, "left", "commentLeft"); 24695 var right = this.raw(node2, "right", "commentRight"); 24696 this.builder("/*" + left + node2.text + right + "*/", node2); 24697 }; 24698 _proto.decl = function decl(node2, semicolon) { 24699 var between = this.raw(node2, "between", "colon"); 24700 var string = node2.prop + between + this.rawValue(node2, "value"); 24701 if (node2.important) string += node2.raws.important || " !important"; 24702 if (semicolon) string += ";";
24703 this.builder(string, node2); 24704 }; 24705 _proto.document = function document1(node2) { 24706 this.body(node2); 24707 }; 24708 _proto.raw = function raw(node2, own, detect) { 24709 var value; 24710 if (!detect) detect = own; 24711 if (own) { 24712 value = node2.raws[own]; 24713 if (typeof value !== "undefined") return value; 24714 } 24715 var parent = node2.parent; 24716 if (detect === "before") { 24717 if (!parent || parent.type === "root" && parent.first === node2) return ""; 24718 if (parent && parent.type === "document") return ""; 24719 } 24720 if (!parent) return $a44aab89caa44953$var$DEFAULT_RAW[detect]; 24721 var root2 = node2.root(); 24722 if (!root2.rawCache) root2.rawCache = {}; 24723 if (typeof root2.rawCache[detect] !== "undefined") return root2.rawCache[detect]; 24724 if (detect === "before" || detect === "after") return this.beforeAfter(node2, detect); 24725 else { 24726 var method = "raw" + $a44aab89caa44953$var$capitalize(detect); 24727 if (this[method]) value = this[method](root2, node2); 24728 else root2.walk(function(i2) { 24729 value = i2.raws[own]; 24730 if (typeof value !== "undefined") return false; 24731 }); 24732 } 24733 if (typeof value === "undefined") value = $a44aab89caa44953$var$DEFAULT_RAW[detect]; 24734 root2.rawCache[detect] = value; 24735 return value; 24736 }; 24737 _proto.rawBeforeClose = function rawBeforeClose(root2) { 24738 var value; 24739 root2.walk(function(i2) { 24740 if (i2.nodes && i2.nodes.length > 0) { 24741 if (typeof i2.raws.after !== "undefined") { 24742 value = i2.raws.after; 24743 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 24744 return false; 24745 } 24746 } 24747 }); 24748 if (value) value = value.replace(/\S/g, ""); 24749 return value; 24750 }; 24751 _proto.rawBeforeComment = function rawBeforeComment(root2, node2) { 24752 var value; 24753 root2.walkComments(function(i2) { 24754 if (typeof i2.raws.before !== "undefined") { 24755 value = i2.raws.before; 24756 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 24757 return false; 24758 } 24759 }); 24760 if (typeof value === "undefined") value = this.raw(node2, null, "beforeDecl"); 24761 else if (value) value = value.replace(/\S/g, ""); 24762 return value; 24763 }; 24764 _proto.rawBeforeDecl = function rawBeforeDecl(root2, node2) { 24765 var value; 24766 root2.walkDecls(function(i2) { 24767 if (typeof i2.raws.before !== "undefined") { 24768 value = i2.raws.before; 24769 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 24770 return false; 24771 } 24772 }); 24773 if (typeof value === "undefined") value = this.raw(node2, null, "beforeRule"); 24774 else if (value) value = value.replace(/\S/g, ""); 24775 return value; 24776 }; 24777 _proto.rawBeforeOpen = function rawBeforeOpen(root2) { 24778 var value; 24779 root2.walk(function(i2) { 24780 if (i2.type !== "decl") { 24781 value = i2.raws.between; 24782 if (typeof value !== "undefined") return false; 24783 } 24784 }); 24785 return value; 24786 }; 24787 _proto.rawBeforeRule = function rawBeforeRule(root2) { 24788 var value; 24789 root2.walk(function(i2) { 24790 if (i2.nodes && (i2.parent !== root2 || root2.first !== i2)) { 24791 if (typeof i2.raws.before !== "undefined") { 24792 value = i2.raws.before; 24793 if (value.includes("\n")) value = value.replace(/[^\n]+$/, ""); 24794 return false; 24795 } 24796 } 24797 }); 24798 if (value) value = value.replace(/\S/g, ""); 24799 return value; 24800 }; 24801 _proto.rawColon = function rawColon(root2) { 24802 var value; 24803 root2.walkDecls(function(i2) { 24804 if (typeof i2.raws.between !== "undefined") { 24805 value = i2.raws.between.replace(/[^\s:]/g, ""); 24806 return false;
24807 } 24808 }); 24809 return value; 24810 }; 24811 _proto.rawEmptyBody = function rawEmptyBody(root2) { 24812 var value; 24813 root2.walk(function(i2) { 24814 if (i2.nodes && i2.nodes.length === 0) { 24815 value = i2.raws.after; 24816 if (typeof value !== "undefined") return false; 24817 } 24818 }); 24819 return value; 24820 }; 24821 _proto.rawIndent = function rawIndent(root2) { 24822 if (root2.raws.indent) return root2.raws.indent; 24823 var value; 24824 root2.walk(function(i2) { 24825 var p = i2.parent; 24826 if (p && p !== root2 && p.parent && p.parent === root2) { 24827 if (typeof i2.raws.before !== "undefined") { 24828 var parts = i2.raws.before.split("\n"); 24829 value = parts[parts.length - 1]; 24830 value = value.replace(/\S/g, ""); 24831 return false; 24832 } 24833 } 24834 }); 24835 return value; 24836 }; 24837 _proto.rawSemicolon = function rawSemicolon(root2) { 24838 var value; 24839 root2.walk(function(i2) { 24840 if (i2.nodes && i2.nodes.length && i2.last.type === "decl") { 24841 value = i2.raws.semicolon; 24842 if (typeof value !== "undefined") return false; 24843 } 24844 }); 24845 return value; 24846 }; 24847 _proto.rawValue = function rawValue(node2, prop) { 24848 var value = node2[prop]; 24849 var raw = node2.raws[prop]; 24850 if (raw && raw.value === value) return raw.raw; 24851 return value; 24852 }; 24853 _proto.root = function root(node2) { 24854 this.body(node2); 24855 if (node2.raws.after) this.builder(node2.raws.after); 24856 }; 24857 _proto.rule = function rule(node2) { 24858 this.block(node2, this.rawValue(node2, "selector")); 24859 if (node2.raws.ownSemicolon) this.builder(node2.raws.ownSemicolon, node2, "end"); 24860 }; 24861 _proto.stringify = function stringify(node2, semicolon) { 24862 if (!this[node2.type]) throw new Error("Unknown AST node type " + node2.type + ". Maybe you need to change PostCSS stringifier."); 24863 this[node2.type](node2, semicolon); 24864 }; 24865 return Stringifier2; 24866}(); 24867var $a44aab89caa44953$var$stringifier = $a44aab89caa44953$var$Stringifier$2; 24868$a44aab89caa44953$var$Stringifier$2.default = $a44aab89caa44953$var$Stringifier$2; 24869var $a44aab89caa44953$var$Stringifier$1 = $a44aab89caa44953$var$stringifier; 24870function $a44aab89caa44953$var$stringify$4(node2, builder) { 24871 var str = new $a44aab89caa44953$var$Stringifier$1(builder); 24872 str.stringify(node2); 24873} 24874var $a44aab89caa44953$var$stringify_1 = $a44aab89caa44953$var$stringify$4; 24875$a44aab89caa44953$var$stringify$4.default = $a44aab89caa44953$var$stringify$4; 24876var $a44aab89caa44953$var$isClean$2 = $a44aab89caa44953$var$symbols.isClean, $a44aab89caa44953$var$my$2 = $a44aab89caa44953$var$symbols.my; 24877var $a44aab89caa44953$var$CssSyntaxError$2 = $a44aab89caa44953$var$cssSyntaxError; 24878var $a44aab89caa44953$var$Stringifier22 = $a44aab89caa44953$var$stringifier; 24879var $a44aab89caa44953$var$stringify$3 = $a44aab89caa44953$var$stringify_1; 24880function $a44aab89caa44953$var$cloneNode(obj, parent) { 24881 var cloned = new obj.constructor(); 24882 for(var i2 in obj){ 24883 if (!Object.prototype.hasOwnProperty.call(obj, i2)) continue; 24884 if (i2 === "proxyCache") continue; 24885 var value = obj[i2]; 24886 var type = typeof value === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(value); 24887 if (i2 === "parent" && type === "object") { 24888 if (parent) cloned[i2] = parent; 24889 } else if (i2 === "source") cloned[i2] = value; 24890 else if (Array.isArray(value)) cloned[i2] = value.map(function(j) { 24891 return $a44aab89caa44953$var$cloneNode(j, cloned); 24892 }); 24893 else { 24894 if (type === "object" && value !== null) value = $a44aab89caa44953$var$cloneNode(value); 24895 cloned[i2] = value; 24896 } 24897 } 24898 return cloned; 24899} 24900var $a44aab89caa44953$var$Node$4 = /*#__PURE__*/ function() { 24901 function Node3(defaults) { 24902 if (defaults === void 0) defaults = {}; 24903 this.raws = {}; 24904 this[$a44aab89caa44953$var$isClean$2] = false;
24905 this[$a44aab89caa44953$var$my$2] = true; 24906 for(var name in defaults)if (name === "nodes") { 24907 this.nodes = []; 24908 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(defaults[name]), _step; !(_step = _iterator()).done;){ 24909 var node2 = _step.value; 24910 if (typeof node2.clone === "function") this.append(node2.clone()); 24911 else this.append(node2); 24912 } 24913 } else this[name] = defaults[name]; 24914 } 24915 var _proto = Node3.prototype; 24916 _proto.addToError = function addToError(error) { 24917 error.postcssNode = this; 24918 if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { 24919 var s2 = this.source; 24920 error.stack = error.stack.replace(/\n\s{4}at /, "$&" + s2.input.from + ":" + s2.start.line + ":" + s2.start.column + "$&"); 24921 } 24922 return error; 24923 }; 24924 _proto.after = function after(add) { 24925 this.parent.insertAfter(this, add); 24926 return this; 24927 }; 24928 _proto.assign = function assign(overrides) { 24929 if (overrides === void 0) overrides = {}; 24930 for(var name in overrides)this[name] = overrides[name]; 24931 return this; 24932 }; 24933 _proto.before = function before(add) { 24934 this.parent.insertBefore(this, add); 24935 return this; 24936 }; 24937 _proto.cleanRaws = function cleanRaws(keepBetween) { 24938 delete this.raws.before; 24939 delete this.raws.after; 24940 if (!keepBetween) delete this.raws.between; 24941 }; 24942 _proto.clone = function clone(overrides) { 24943 if (overrides === void 0) overrides = {}; 24944 var cloned = $a44aab89caa44953$var$cloneNode(this); 24945 for(var name in overrides)cloned[name] = overrides[name]; 24946 return cloned; 24947 }; 24948 _proto.cloneAfter = function cloneAfter(overrides) { 24949 if (overrides === void 0) overrides = {}; 24950 var cloned = this.clone(overrides); 24951 this.parent.insertAfter(this, cloned); 24952 return cloned; 24953 }; 24954 _proto.cloneBefore = function cloneBefore(overrides) { 24955 if (overrides === void 0) overrides = {}; 24956 var cloned = this.clone(overrides); 24957 this.parent.insertBefore(this, cloned); 24958 return cloned; 24959 }; 24960 _proto.error = function error(message, opts) { 24961 if (opts === void 0) opts = {}; 24962 if (this.source) { 24963 var _this_rangeBy = this.rangeBy(opts), end = _this_rangeBy.end, start = _this_rangeBy.start; 24964 return this.source.input.error(message, { 24965 column: start.column, 24966 line: start.line 24967 }, { 24968 column: end.column, 24969 line: end.line 24970 }, opts); 24971 } 24972 return new $a44aab89caa44953$var$CssSyntaxError$2(message); 24973 }; 24974 _proto.getProxyProcessor = function getProxyProcessor() { 24975 return { 24976 get: function get(node2, prop) { 24977 if (prop === "proxyOf") return node2; 24978 else if (prop === "root") return function() { 24979 return node2.root().toProxy(); 24980 }; 24981 else return node2[prop]; 24982 }, 24983 set: function set(node2, prop, value) { 24984 if (node2[prop] === value) return true; 24985 node2[prop] = value; 24986 if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */ prop === "text") node2.markDirty(); 24987 return true; 24988 } 24989 }; 24990 }; 24991 _proto.markDirty = function markDirty() { 24992 if (this[$a44aab89caa44953$var$isClean$2]) { 24993 this[$a44aab89caa44953$var$isClean$2] = false; 24994 var next = this; 24995 while(next = next.parent)next[$a44aab89caa44953$var$isClean$2] = false; 24996 } 24997 }; 24998 _proto.next = function next() { 24999 if (!this.parent) return void 0; 25000 var index2 = this.parent.index(this); 25001 return this.parent.nodes[index2 + 1]; 25002 }; 25003 _proto.positionBy = function positionBy(opts, stringRepresentation) { 25004 var pos = this.source.start; 25005 if (opts.index) pos = this.positionInside(opts.index, stringRepresentation); 25006 else if (opts.word) {
25007 stringRepresentation = this.toString(); 25008 var index2 = stringRepresentation.indexOf(opts.word); 25009 if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation); 25010 } 25011 return pos; 25012 }; 25013 _proto.positionInside = function positionInside(index2, stringRepresentation) { 25014 var string = stringRepresentation || this.toString(); 25015 var column = this.source.start.column; 25016 var line = this.source.start.line; 25017 for(var i2 = 0; i2 < index2; i2++)if (string[i2] === "\n") { 25018 column = 1; 25019 line += 1; 25020 } else column += 1; 25021 return { 25022 column: column, 25023 line: line 25024 }; 25025 }; 25026 _proto.prev = function prev() { 25027 if (!this.parent) return void 0; 25028 var index2 = this.parent.index(this); 25029 return this.parent.nodes[index2 - 1]; 25030 }; 25031 _proto.rangeBy = function rangeBy(opts) { 25032 var start = { 25033 column: this.source.start.column, 25034 line: this.source.start.line 25035 }; 25036 var end = this.source.end ? { 25037 column: this.source.end.column + 1, 25038 line: this.source.end.line 25039 } : { 25040 column: start.column + 1, 25041 line: start.line 25042 }; 25043 if (opts.word) { 25044 var stringRepresentation = this.toString(); 25045 var index2 = stringRepresentation.indexOf(opts.word); 25046 if (index2 !== -1) { 25047 start = this.positionInside(index2, stringRepresentation); 25048 end = this.positionInside(index2 + opts.word.length, stringRepresentation); 25049 } 25050 } else { 25051 if (opts.start) start = { 25052 column: opts.start.column, 25053 line: opts.start.line 25054 }; 25055 else if (opts.index) start = this.positionInside(opts.index); 25056 if (opts.end) end = { 25057 column: opts.end.column, 25058 line: opts.end.line 25059 }; 25060 else if (typeof opts.endIndex === "number") end = this.positionInside(opts.endIndex); 25061 else if (opts.index) end = this.positionInside(opts.index + 1); 25062 } 25063 if (end.line < start.line || end.line === start.line && end.column <= start.column) end = { 25064 column: start.column + 1, 25065 line: start.line 25066 }; 25067 return { 25068 end: end, 25069 start: start 25070 }; 25071 }; 25072 _proto.raw = function raw(prop, defaultType) { 25073 var str = new $a44aab89caa44953$var$Stringifier22(); 25074 return str.raw(this, prop, defaultType); 25075 }; 25076 _proto.remove = function remove() { 25077 if (this.parent) this.parent.removeChild(this); 25078 this.parent = void 0; 25079 return this; 25080 }; 25081 _proto.replaceWith = function replaceWith() { 25082 for(var _len = arguments.length, nodes = new Array(_len), _key = 0; _key < _len; _key++)nodes[_key] = arguments[_key]; 25083 if (this.parent) { 25084 var bookmark = this; 25085 var foundSelf = false; 25086 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 25087 var node2 = _step.value; 25088 if (node2 === this) foundSelf = true; 25089 else if (foundSelf) { 25090 this.parent.insertAfter(bookmark, node2); 25091 bookmark = node2; 25092 } else this.parent.insertBefore(bookmark, node2); 25093 } 25094 if (!foundSelf) this.remove(); 25095 } 25096 return this; 25097 }; 25098 _proto.root = function root() { 25099 var result2 = this; 25100 while(result2.parent && result2.parent.type !== "document")result2 = result2.parent; 25101 return result2; 25102 }; 25103 _proto.toJSON = function toJSON(_, inputs) { 25104 var fixed = {}; 25105 var emitInputs = inputs == null; 25106 inputs = inputs || /* @__PURE__ */ new Map(); 25107 var inputsNextIndex = 0; 25108 for(var name in this){ 25109 if (!Object.prototype.hasOwnProperty.call(this, name)) continue; 25110 if (name === "parent" || name === "proxyCache") continue; 25111 var value = this[name]; 25112 if (Array.isArray(value)) fixed[name] = value.map(function(i2) { 25113 if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && i2.toJSON) return i2.toJSON(null, inputs); 25114 else return i2; 25115 }); 25116 else if ((typeof value === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(value)) === "object" && value.toJSON) fixed[name] = value.toJSON(null, inputs); 25117 else if (name === "source") {
25118 var inputId = inputs.get(value.input); 25119 if (inputId == null) { 25120 inputId = inputsNextIndex; 25121 inputs.set(value.input, inputsNextIndex); 25122 inputsNextIndex++; 25123 } 25124 fixed[name] = { 25125 end: value.end, 25126 inputId: inputId, 25127 start: value.start 25128 }; 25129 } else fixed[name] = value; 25130 } 25131 if (emitInputs) fixed.inputs = [].concat(inputs.keys()).map(function(input2) { 25132 return input2.toJSON(); 25133 }); 25134 return fixed; 25135 }; 25136 _proto.toProxy = function toProxy() { 25137 if (!this.proxyCache) this.proxyCache = new Proxy(this, this.getProxyProcessor()); 25138 return this.proxyCache; 25139 }; 25140 _proto.toString = function toString(stringifier2) { 25141 if (stringifier2 === void 0) stringifier2 = $a44aab89caa44953$var$stringify$3; 25142 if (stringifier2.stringify) stringifier2 = stringifier2.stringify; 25143 var result2 = ""; 25144 stringifier2(this, function(i2) { 25145 result2 += i2; 25146 }); 25147 return result2; 25148 }; 25149 _proto.warn = function warn(result2, text, opts) { 25150 var data = { 25151 node: this 25152 }; 25153 for(var i2 in opts)data[i2] = opts[i2]; 25154 return result2.warn(text, data); 25155 }; 25156 $a44aab89caa44953$var$_create_class(Node3, [ 25157 { 25158 key: "proxyOf", 25159 get: function get() { 25160 return this; 25161 } 25162 } 25163 ]); 25164 return Node3; 25165}(); 25166var $a44aab89caa44953$var$node = $a44aab89caa44953$var$Node$4; 25167$a44aab89caa44953$var$Node$4.default = $a44aab89caa44953$var$Node$4; 25168var $a44aab89caa44953$var$Node$3 = $a44aab89caa44953$var$node; 25169var $a44aab89caa44953$var$Declaration$4 = /*#__PURE__*/ function(Node$3) { 25170 $a44aab89caa44953$var$_inherits(Declaration2, Node$3); 25171 function Declaration2(defaults) { 25172 var _this; 25173 if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") defaults = $a44aab89caa44953$var$_extends({}, defaults, { 25174 value: String(defaults.value) 25175 }); 25176 _this = Node$3.call(this, defaults) || this; 25177 _this.type = "decl"; 25178 return _this; 25179 } 25180 $a44aab89caa44953$var$_create_class(Declaration2, [ 25181 { 25182 key: "variable", 25183 get: function get() { 25184 return this.prop.startsWith("--") || this.prop[0] === "$"; 25185 } 25186 } 25187 ]); 25188 return Declaration2; 25189}($a44aab89caa44953$var$Node$3); 25190var $a44aab89caa44953$var$declaration = $a44aab89caa44953$var$Declaration$4; 25191$a44aab89caa44953$var$Declaration$4.default = $a44aab89caa44953$var$Declaration$4; 25192var $a44aab89caa44953$var$urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; 25193var $a44aab89caa44953$var$nanoid$1 = function(size) { 25194 if (size === void 0) size = 21; 25195 var id = ""; 25196 var i2 = size; 25197 while(i2--)id += $a44aab89caa44953$var$urlAlphabet[Math.random() * 64 | 0]; 25198 return id; 25199}; 25200var $a44aab89caa44953$var$nonSecure = { 25201 nanoid: $a44aab89caa44953$var$nanoid$1 25202}; 25203var $a44aab89caa44953$var$SourceMapConsumer$2 = $a44aab89caa44953$var$require$$2.SourceMapConsumer, $a44aab89caa44953$var$SourceMapGenerator$2 = $a44aab89caa44953$var$require$$2.SourceMapGenerator; 25204var $a44aab89caa44953$var$existsSync = $a44aab89caa44953$var$require$$2.existsSync, $a44aab89caa44953$var$readFileSync = $a44aab89caa44953$var$require$$2.readFileSync; 25205var $a44aab89caa44953$var$dirname$1 = $a44aab89caa44953$var$require$$2.dirname, $a44aab89caa44953$var$join = $a44aab89caa44953$var$require$$2.join; 25206function $a44aab89caa44953$var$fromBase64(str) { 25207 if ($a44aab89caa44953$require$Buffer) return $a44aab89caa44953$require$Buffer.from(str, "base64").toString(); 25208 else return window.atob(str); 25209} 25210var $a44aab89caa44953$var$PreviousMap$2 = /*#__PURE__*/ function() { 25211 function PreviousMap2(css, opts) { 25212 if (opts.map === false) return; 25213 this.loadAnnotation(css); 25214 this.inline = this.startWith(this.annotation, "data:"); 25215 var prev = opts.map ? opts.map.prev : void 0; 25216 var text = this.loadMap(opts.from, prev); 25217 if (!this.mapFile && opts.from) this.mapFile = opts.from; 25218 if (this.mapFile) this.root = $a44aab89caa44953$var$dirname$1(this.mapFile); 25219 if (text) this.text = text; 25220 } 25221 var _proto = PreviousMap2.prototype; 25222 _proto.consumer = function consumer() { 25223 if (!this.consumerCache) this.consumerCache = new $a44aab89caa44953$var$SourceMapConsumer$2(this.text); 25224 return this.consumerCache; 25225 }; 25226 _proto.decodeInline = function decodeInline(text) { 25227 var baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; 25228 var baseUri = /^data:application\/json;base64,/; 25229 var charsetUri = /^data:application\/json;charset=utf-?8,/; 25230 var uri = /^data:application\/json,/; 25231 if (charsetUri.test(text) || uri.test(text)) return decodeURIComponent(text.substr(RegExp.lastMatch.length)); 25232 if (baseCharsetUri.test(text) || baseUri.test(text)) return $a44aab89caa44953$var$fromBase64(text.substr(RegExp.lastMatch.length)); 25233 var encoding = text.match(/data:application\/json;([^,]+),/)[1]; 25234 throw new Error("Unsupported source map encoding " + encoding); 25235 }; 25236 _proto.getAnnotationURL = function getAnnotationURL(sourceMapString) { 25237 return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim(); 25238 }; 25239 _proto.isMap = function isMap(map) { 25240 if ((typeof map === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(map)) !== "object") return false;
25241 return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections); 25242 }; 25243 _proto.loadAnnotation = function loadAnnotation(css) { 25244 var comments = css.match(/\/\*\s*# sourceMappingURL=/gm); 25245 if (!comments) return; 25246 var start = css.lastIndexOf(comments.pop()); 25247 var end = css.indexOf("*/", start); 25248 if (start > -1 && end > -1) this.annotation = this.getAnnotationURL(css.substring(start, end)); 25249 }; 25250 _proto.loadFile = function loadFile(path) { 25251 this.root = $a44aab89caa44953$var$dirname$1(path); 25252 if ($a44aab89caa44953$var$existsSync(path)) { 25253 this.mapFile = path; 25254 return $a44aab89caa44953$var$readFileSync(path, "utf-8").toString().trim(); 25255 } 25256 }; 25257 _proto.loadMap = function loadMap(file, prev) { 25258 if (prev === false) return false; 25259 if (prev) { 25260 if (typeof prev === "string") return prev; 25261 else if (typeof prev === "function") { 25262 var prevPath = prev(file); 25263 if (prevPath) { 25264 var map = this.loadFile(prevPath); 25265 if (!map) throw new Error("Unable to load previous source map: " + prevPath.toString()); 25266 return map; 25267 } 25268 } else if ($a44aab89caa44953$var$_instanceof(prev, $a44aab89caa44953$var$SourceMapConsumer$2)) return $a44aab89caa44953$var$SourceMapGenerator$2.fromSourceMap(prev).toString(); 25269 else if ($a44aab89caa44953$var$_instanceof(prev, $a44aab89caa44953$var$SourceMapGenerator$2)) return prev.toString(); 25270 else if (this.isMap(prev)) return JSON.stringify(prev); 25271 else throw new Error("Unsupported previous source map format: " + prev.toString()); 25272 } else if (this.inline) return this.decodeInline(this.annotation); 25273 else if (this.annotation) { 25274 var map1 = this.annotation; 25275 if (file) map1 = $a44aab89caa44953$var$join($a44aab89caa44953$var$dirname$1(file), map1); 25276 return this.loadFile(map1); 25277 } 25278 }; 25279 _proto.startWith = function startWith(string, start) { 25280 if (!string) return false; 25281 return string.substr(0, start.length) === start; 25282 }; 25283 _proto.withContent = function withContent() { 25284 return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0); 25285 }; 25286 return PreviousMap2; 25287}(); 25288var $a44aab89caa44953$var$previousMap = $a44aab89caa44953$var$PreviousMap$2; 25289$a44aab89caa44953$var$PreviousMap$2.default = $a44aab89caa44953$var$PreviousMap$2; 25290var $a44aab89caa44953$var$SourceMapConsumer$1 = $a44aab89caa44953$var$require$$2.SourceMapConsumer, $a44aab89caa44953$var$SourceMapGenerator$1 = $a44aab89caa44953$var$require$$2.SourceMapGenerator; 25291var $a44aab89caa44953$var$fileURLToPath = $a44aab89caa44953$var$require$$2.fileURLToPath, $a44aab89caa44953$var$pathToFileURL$1 = $a44aab89caa44953$var$require$$2.pathToFileURL; 25292var $a44aab89caa44953$var$isAbsolute = $a44aab89caa44953$var$require$$2.isAbsolute, $a44aab89caa44953$var$resolve$1 = $a44aab89caa44953$var$require$$2.resolve; 25293var $a44aab89caa44953$var$nanoid = $a44aab89caa44953$var$nonSecure.nanoid; 25294var $a44aab89caa44953$var$terminalHighlight = $a44aab89caa44953$var$require$$2; 25295var $a44aab89caa44953$var$CssSyntaxError$1 = $a44aab89caa44953$var$cssSyntaxError; 25296var $a44aab89caa44953$var$PreviousMap$1 = $a44aab89caa44953$var$previousMap;
25297var $a44aab89caa44953$var$fromOffsetCache = Symbol("fromOffsetCache"); 25298var $a44aab89caa44953$var$sourceMapAvailable$1 = Boolean($a44aab89caa44953$var$SourceMapConsumer$1 && $a44aab89caa44953$var$SourceMapGenerator$1); 25299var $a44aab89caa44953$var$pathAvailable$1 = Boolean($a44aab89caa44953$var$resolve$1 && $a44aab89caa44953$var$isAbsolute); 25300var $a44aab89caa44953$var$Input$4 = /*#__PURE__*/ function() { 25301 function Input2(css, opts) { 25302 if (opts === void 0) opts = {}; 25303 if (css === null || typeof css === "undefined" || (typeof css === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(css)) === "object" && !css.toString) throw new Error("PostCSS received " + css + " instead of CSS string"); 25304 this.css = css.toString(); 25305 if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") { 25306 this.hasBOM = true; 25307 this.css = this.css.slice(1); 25308 } else this.hasBOM = false; 25309 if (opts.from) { 25310 if (!$a44aab89caa44953$var$pathAvailable$1 || /^\w+:\/\//.test(opts.from) || $a44aab89caa44953$var$isAbsolute(opts.from)) this.file = opts.from; 25311 else this.file = $a44aab89caa44953$var$resolve$1(opts.from); 25312 } 25313 if ($a44aab89caa44953$var$pathAvailable$1 && $a44aab89caa44953$var$sourceMapAvailable$1) { 25314 var map = new $a44aab89caa44953$var$PreviousMap$1(this.css, opts); 25315 if (map.text) { 25316 this.map = map; 25317 var file = map.consumer().file; 25318 if (!this.file && file) this.file = this.mapResolve(file); 25319 } 25320 } 25321 if (!this.file) this.id = "<input css " + $a44aab89caa44953$var$nanoid(6) + ">"; 25322 if (this.map) this.map.file = this.from; 25323 } 25324 var _proto = Input2.prototype; 25325 _proto.error = function error(message, line, column, opts) { 25326 if (opts === void 0) opts = {}; 25327 var result2, endLine, endColumn; 25328 if (line && (typeof line === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(line)) === "object") { 25329 var start = line; 25330 var end = column; 25331 if (typeof start.offset === "number") { 25332 var pos = this.fromOffset(start.offset); 25333 line = pos.line; 25334 column = pos.col; 25335 } else { 25336 line = start.line; 25337 column = start.column; 25338 } 25339 if (typeof end.offset === "number") { 25340 var pos1 = this.fromOffset(end.offset); 25341 endLine = pos1.line; 25342 endColumn = pos1.col; 25343 } else { 25344 endLine = end.line; 25345 endColumn = end.column; 25346 } 25347 } else if (!column) { 25348 var pos2 = this.fromOffset(line); 25349 line = pos2.line; 25350 column = pos2.col; 25351 } 25352 var origin = this.origin(line, column, endLine, endColumn); 25353 if (origin) result2 = new $a44aab89caa44953$var$CssSyntaxError$1(message, origin.endLine === void 0 ? origin.line : { 25354 column: origin.column, 25355 line: origin.line 25356 }, origin.endLine === void 0 ? origin.column : { 25357 column: origin.endColumn, 25358 line: origin.endLine 25359 }, origin.source, origin.file, opts.plugin); 25360 else result2 = new $a44aab89caa44953$var$CssSyntaxError$1(message, endLine === void 0 ? line : { 25361 column: column, 25362 line: line 25363 }, endLine === void 0 ? column : { 25364 column: endColumn, 25365 line: endLine 25366 }, this.css, this.file, opts.plugin); 25367 result2.input = { 25368 column: column, 25369 endColumn: endColumn, 25370 endLine: endLine, 25371 line: line, 25372 source: this.css 25373 }; 25374 if (this.file) { 25375 if ($a44aab89caa44953$var$pathToFileURL$1) result2.input.url = $a44aab89caa44953$var$pathToFileURL$1(this.file).toString(); 25376 result2.input.file = this.file; 25377 } 25378 return result2; 25379 }; 25380 _proto.fromOffset = function fromOffset(offset) { 25381 var lastLine, lineToIndex;
25382 if (!this[$a44aab89caa44953$var$fromOffsetCache]) { 25383 var lines = this.css.split("\n"); 25384 lineToIndex = new Array(lines.length); 25385 var prevIndex = 0; 25386 for(var i2 = 0, l2 = lines.length; i2 < l2; i2++){ 25387 lineToIndex[i2] = prevIndex; 25388 prevIndex += lines[i2].length + 1; 25389 } 25390 this[$a44aab89caa44953$var$fromOffsetCache] = lineToIndex; 25391 } else lineToIndex = this[$a44aab89caa44953$var$fromOffsetCache]; 25392 lastLine = lineToIndex[lineToIndex.length - 1]; 25393 var min = 0; 25394 if (offset >= lastLine) min = lineToIndex.length - 1; 25395 else { 25396 var max = lineToIndex.length - 2; 25397 var mid; 25398 while(min < max){ 25399 mid = min + (max - min >> 1); 25400 if (offset < lineToIndex[mid]) max = mid - 1; 25401 else if (offset >= lineToIndex[mid + 1]) min = mid + 1; 25402 else { 25403 min = mid; 25404 break; 25405 } 25406 } 25407 } 25408 return { 25409 col: offset - lineToIndex[min] + 1, 25410 line: min + 1 25411 }; 25412 }; 25413 _proto.mapResolve = function mapResolve(file) { 25414 if (/^\w+:\/\//.test(file)) return file; 25415 return $a44aab89caa44953$var$resolve$1(this.map.consumer().sourceRoot || this.map.root || ".", file); 25416 }; 25417 _proto.origin = function origin(line, column, endLine, endColumn) { 25418 if (!this.map) return false; 25419 var consumer = this.map.consumer(); 25420 var from = consumer.originalPositionFor({ 25421 column: column, 25422 line: line 25423 }); 25424 if (!from.source) return false; 25425 var to; 25426 if (typeof endLine === "number") to = consumer.originalPositionFor({ 25427 column: endColumn, 25428 line: endLine 25429 }); 25430 var fromUrl; 25431 if ($a44aab89caa44953$var$isAbsolute(from.source)) fromUrl = $a44aab89caa44953$var$pathToFileURL$1(from.source); 25432 else fromUrl = new URL(from.source, this.map.consumer().sourceRoot || $a44aab89caa44953$var$pathToFileURL$1(this.map.mapFile)); 25433 var result2 = { 25434 column: from.column, 25435 endColumn: to && to.column, 25436 endLine: to && to.line, 25437 line: from.line, 25438 url: fromUrl.toString() 25439 }; 25440 if (fromUrl.protocol === "file:") { 25441 if ($a44aab89caa44953$var$fileURLToPath) result2.file = $a44aab89caa44953$var$fileURLToPath(fromUrl); 25442 else throw new Error("file: protocol is not available in this PostCSS build"); 25443 } 25444 var source = consumer.sourceContentFor(from.source); 25445 if (source) result2.source = source; 25446 return result2; 25447 }; 25448 _proto.toJSON = function toJSON() { 25449 var json = {}; 25450 for(var _i = 0, _iter = [ 25451 "hasBOM", 25452 "css", 25453 "file", 25454 "id" 25455 ]; _i < _iter.length; _i++){ 25456 var name = _iter[_i]; 25457 if (this[name] != null) json[name] = this[name]; 25458 } 25459 if (this.map) { 25460 json.map = $a44aab89caa44953$var$_extends({}, this.map); 25461 if (json.map.consumerCache) json.map.consumerCache = void 0; 25462 } 25463 return json; 25464 }; 25465 $a44aab89caa44953$var$_create_class(Input2, [ 25466 { 25467 key: "from", 25468 get: function get() { 25469 return this.file || this.id; 25470 } 25471 } 25472 ]); 25473 return Input2; 25474}(); 25475var $a44aab89caa44953$var$input = $a44aab89caa44953$var$Input$4; 25476$a44aab89caa44953$var$Input$4.default = $a44aab89caa44953$var$Input$4; 25477if ($a44aab89caa44953$var$terminalHighlight && $a44aab89caa44953$var$terminalHighlight.registerInput) $a44aab89caa44953$var$terminalHighlight.registerInput($a44aab89caa44953$var$Input$4); 25478var $a44aab89caa44953$var$SourceMapConsumer = $a44aab89caa44953$var$require$$2.SourceMapConsumer, $a44aab89caa44953$var$SourceMapGenerator = $a44aab89caa44953$var$require$$2.SourceMapGenerator; 25479var $a44aab89caa44953$var$dirname = $a44aab89caa44953$var$require$$2.dirname, $a44aab89caa44953$var$relative = $a44aab89caa44953$var$require$$2.relative, $a44aab89caa44953$var$resolve$3 = $a44aab89caa44953$var$require$$2.resolve, $a44aab89caa44953$var$sep = $a44aab89caa44953$var$require$$2.sep; 25480var $a44aab89caa44953$var$pathToFileURL = $a44aab89caa44953$var$require$$2.pathToFileURL; 25481var $a44aab89caa44953$var$Input$3 = $a44aab89caa44953$var$input; 25482var $a44aab89caa44953$var$sourceMapAvailable = Boolean($a44aab89caa44953$var$SourceMapConsumer && $a44aab89caa44953$var$SourceMapGenerator); 25483var $a44aab89caa44953$var$pathAvailable = Boolean($a44aab89caa44953$var$dirname && $a44aab89caa44953$var$resolve$3 && $a44aab89caa44953$var$relative && $a44aab89caa44953$var$sep); 25484var $a44aab89caa44953$var$MapGenerator$2 = /*#__PURE__*/ function() { 25485 function MapGenerator2(stringify2, root2, opts, cssString) { 25486 this.stringify = stringify2; 25487 this.mapOpts = opts.map || {}; 25488 this.root = root2; 25489 this.opts = opts; 25490 this.css = cssString; 25491 this.originalCSS = cssString; 25492 this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute; 25493 this.memoizedFileURLs = /* @__PURE__ */ new Map(); 25494 this.memoizedPaths = /* @__PURE__ */ new Map(); 25495 this.memoizedURLs = /* @__PURE__ */ new Map(); 25496 } 25497 var _proto = MapGenerator2.prototype; 25498 _proto.addAnnotation = function addAnnotation() { 25499 var content; 25500 if (this.isInline()) content = "data:application/json;base64," + this.toBase64(this.map.toString()); 25501 else if (typeof this.mapOpts.annotation === "string") content = this.mapOpts.annotation; 25502 else if (typeof this.mapOpts.annotation === "function") content = this.mapOpts.annotation(this.opts.to, this.root); 25503 else content = this.outputFile() + ".map"; 25504 var eol = "\n"; 25505 if (this.css.includes("\r\n")) eol = "\r\n"; 25506 this.css += eol + "/*# sourceMappingURL=" + content + " */"; 25507 }; 25508 _proto.applyPrevMaps = function applyPrevMaps() { 25509 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.previous()), _step; !(_step = _iterator()).done;){ 25510 var prev = _step.value; 25511 var from = this.toUrl(this.path(prev.file)); 25512 var root2 = prev.root || $a44aab89caa44953$var$dirname(prev.file); 25513 var map = void 0; 25514 if (this.mapOpts.sourcesContent === false) { 25515 map = new $a44aab89caa44953$var$SourceMapConsumer(prev.text); 25516 if (map.sourcesContent) map.sourcesContent = null; 25517 } else map = prev.consumer(); 25518 this.map.applySourceMap(map, from, this.toUrl(this.path(root2))); 25519 } 25520 }; 25521 _proto.clearAnnotation = function clearAnnotation() { 25522 if (this.mapOpts.annotation === false) return; 25523 if (this.root) { 25524 var node2; 25525 for(var i2 = this.root.nodes.length - 1; i2 >= 0; i2--){ 25526 node2 = this.root.nodes[i2]; 25527 if (node2.type !== "comment") continue; 25528 if (node2.text.indexOf("# sourceMappingURL=") === 0) this.root.removeChild(i2); 25529 } 25530 } else if (this.css) this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, ""); 25531 }; 25532 _proto.generate = function generate() { 25533 this.clearAnnotation(); 25534 if ($a44aab89caa44953$var$pathAvailable && $a44aab89caa44953$var$sourceMapAvailable && this.isMap()) return this.generateMap(); 25535 else { 25536 var result2 = ""; 25537 this.stringify(this.root, function(i2) { 25538 result2 += i2; 25539 }); 25540 return [ 25541 result2 25542 ]; 25543 } 25544 }; 25545 _proto.generateMap = function generateMap() { 25546 if (this.root) this.generateString(); 25547 else if (this.previous().length === 1) { 25548 var prev = this.previous()[0].consumer(); 25549 prev.file = this.outputFile(); 25550 this.map = $a44aab89caa44953$var$SourceMapGenerator.fromSourceMap(prev, { 25551 ignoreInvalidMapping: true 25552 }); 25553 } else { 25554 this.map = new $a44aab89caa44953$var$SourceMapGenerator({ 25555 file: this.outputFile(), 25556 ignoreInvalidMapping: true 25557 }); 25558 this.map.addMapping({ 25559 generated: { 25560 column: 0, 25561 line: 1 25562 }, 25563 original: { 25564 column: 0, 25565 line: 1 25566 }, 25567 source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" 25568 }); 25569 } 25570 if (this.isSourcesContent()) this.setSourcesContent(); 25571 if (this.root && this.previous().length > 0) this.applyPrevMaps(); 25572 if (this.isAnnotation()) this.addAnnotation(); 25573 if (this.isInline()) return [ 25574 this.css 25575 ]; 25576 else return [ 25577 this.css, 25578 this.map 25579 ]; 25580 }; 25581 _proto.generateString = function generateString() { 25582 var _this = this; 25583 this.css = ""; 25584 this.map = new $a44aab89caa44953$var$SourceMapGenerator({ 25585 file: this.outputFile(), 25586 ignoreInvalidMapping: true 25587 }); 25588 var line = 1; 25589 var column = 1; 25590 var noSource = "<no source>"; 25591 var mapping = { 25592 generated: { 25593 column: 0, 25594 line: 0 25595 }, 25596 original: { 25597 column: 0, 25598 line: 0 25599 }, 25600 source: "" 25601 }; 25602 var lines, last; 25603 this.stringify(this.root, function(str, node2, type) { 25604 _this.css += str; 25605 if (node2 && type !== "end") { 25606 mapping.generated.line = line; 25607 mapping.generated.column = column - 1;
25608 if (node2.source && node2.source.start) { 25609 mapping.source = _this.sourcePath(node2); 25610 mapping.original.line = node2.source.start.line; 25611 mapping.original.column = node2.source.start.column - 1; 25612 _this.map.addMapping(mapping); 25613 } else { 25614 mapping.source = noSource; 25615 mapping.original.line = 1; 25616 mapping.original.column = 0; 25617 _this.map.addMapping(mapping); 25618 } 25619 } 25620 lines = str.match(/\n/g); 25621 if (lines) { 25622 line += lines.length; 25623 last = str.lastIndexOf("\n"); 25624 column = str.length - last; 25625 } else column += str.length; 25626 if (node2 && type !== "start") { 25627 var p = node2.parent || { 25628 raws: {} 25629 }; 25630 var childless = node2.type === "decl" || node2.type === "atrule" && !node2.nodes; 25631 if (!childless || node2 !== p.last || p.raws.semicolon) { 25632 if (node2.source && node2.source.end) { 25633 mapping.source = _this.sourcePath(node2); 25634 mapping.original.line = node2.source.end.line; 25635 mapping.original.column = node2.source.end.column - 1; 25636 mapping.generated.line = line; 25637 mapping.generated.column = column - 2; 25638 _this.map.addMapping(mapping); 25639 } else { 25640 mapping.source = noSource; 25641 mapping.original.line = 1; 25642 mapping.original.column = 0; 25643 mapping.generated.line = line; 25644 mapping.generated.column = column - 1; 25645 _this.map.addMapping(mapping); 25646 } 25647 } 25648 } 25649 }); 25650 }; 25651 _proto.isAnnotation = function isAnnotation() { 25652 if (this.isInline()) return true; 25653 if (typeof this.mapOpts.annotation !== "undefined") return this.mapOpts.annotation; 25654 if (this.previous().length) return this.previous().some(function(i2) { 25655 return i2.annotation; 25656 }); 25657 return true; 25658 }; 25659 _proto.isInline = function isInline() { 25660 if (typeof this.mapOpts.inline !== "undefined") return this.mapOpts.inline; 25661 var annotation = this.mapOpts.annotation; 25662 if (typeof annotation !== "undefined" && annotation !== true) return false; 25663 if (this.previous().length) return this.previous().some(function(i2) { 25664 return i2.inline; 25665 }); 25666 return true; 25667 }; 25668 _proto.isMap = function isMap() { 25669 if (typeof this.opts.map !== "undefined") return !!this.opts.map; 25670 return this.previous().length > 0; 25671 }; 25672 _proto.isSourcesContent = function isSourcesContent() { 25673 if (typeof this.mapOpts.sourcesContent !== "undefined") return this.mapOpts.sourcesContent; 25674 if (this.previous().length) return this.previous().some(function(i2) { 25675 return i2.withContent(); 25676 }); 25677 return true; 25678 }; 25679 _proto.outputFile = function outputFile() { 25680 if (this.opts.to) return this.path(this.opts.to); 25681 else if (this.opts.from) return this.path(this.opts.from); 25682 else return "to.css"; 25683 }; 25684 _proto.path = function path(file) { 25685 if (this.mapOpts.absolute) return file; 25686 if (file.charCodeAt(0) === 60) return file; 25687 if (/^\w+:\/\//.test(file)) return file; 25688 var cached = this.memoizedPaths.get(file); 25689 if (cached) return cached; 25690 var from = this.opts.to ? $a44aab89caa44953$var$dirname(this.opts.to) : "."; 25691 if (typeof this.mapOpts.annotation === "string") from = $a44aab89caa44953$var$dirname($a44aab89caa44953$var$resolve$3(from, this.mapOpts.annotation)); 25692 var path = $a44aab89caa44953$var$relative(from, file); 25693 this.memoizedPaths.set(file, path); 25694 return path; 25695 }; 25696 _proto.previous = function previous() { 25697 var _this = this; 25698 if (!this.previousMaps) { 25699 this.previousMaps = []; 25700 if (this.root) this.root.walk(function(node2) {
25701 if (node2.source && node2.source.input.map) { 25702 var map = node2.source.input.map; 25703 if (!_this.previousMaps.includes(map)) _this.previousMaps.push(map); 25704 } 25705 }); 25706 else { 25707 var input2 = new $a44aab89caa44953$var$Input$3(this.originalCSS, this.opts); 25708 if (input2.map) this.previousMaps.push(input2.map); 25709 } 25710 } 25711 return this.previousMaps; 25712 }; 25713 _proto.setSourcesContent = function setSourcesContent() { 25714 var _this = this; 25715 var already = {}; 25716 if (this.root) this.root.walk(function(node2) { 25717 if (node2.source) { 25718 var from = node2.source.input.from; 25719 if (from && !already[from]) { 25720 already[from] = true; 25721 var fromUrl = _this.usesFileUrls ? _this.toFileUrl(from) : _this.toUrl(_this.path(from)); 25722 _this.map.setSourceContent(fromUrl, node2.source.input.css); 25723 } 25724 } 25725 }); 25726 else if (this.css) { 25727 var from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"; 25728 this.map.setSourceContent(from, this.css); 25729 } 25730 }; 25731 _proto.sourcePath = function sourcePath(node2) { 25732 if (this.mapOpts.from) return this.toUrl(this.mapOpts.from); 25733 else if (this.usesFileUrls) return this.toFileUrl(node2.source.input.from); 25734 else return this.toUrl(this.path(node2.source.input.from)); 25735 }; 25736 _proto.toBase64 = function toBase64(str) { 25737 if ($a44aab89caa44953$require$Buffer) return $a44aab89caa44953$require$Buffer.from(str).toString("base64"); 25738 else return window.btoa(unescape(encodeURIComponent(str))); 25739 }; 25740 _proto.toFileUrl = function toFileUrl(path) { 25741 var cached = this.memoizedFileURLs.get(path); 25742 if (cached) return cached; 25743 if ($a44aab89caa44953$var$pathToFileURL) { 25744 var fileURL = $a44aab89caa44953$var$pathToFileURL(path).toString(); 25745 this.memoizedFileURLs.set(path, fileURL); 25746 return fileURL; 25747 } else throw new Error("`map.absolute` option is not available in this PostCSS build"); 25748 }; 25749 _proto.toUrl = function toUrl(path) { 25750 var cached = this.memoizedURLs.get(path); 25751 if (cached) return cached; 25752 if ($a44aab89caa44953$var$sep === "\\") path = path.replace(/\\/g, "/"); 25753 var url = encodeURI(path).replace(/[#?]/g, encodeURIComponent); 25754 this.memoizedURLs.set(path, url); 25755 return url; 25756 }; 25757 return MapGenerator2; 25758}(); 25759var $a44aab89caa44953$var$mapGenerator = $a44aab89caa44953$var$MapGenerator$2; 25760var $a44aab89caa44953$var$Node$2 = $a44aab89caa44953$var$node; 25761var $a44aab89caa44953$var$Comment$4 = /*#__PURE__*/ function(Node$2) { 25762 $a44aab89caa44953$var$_inherits(Comment2, Node$2); 25763 function Comment2(defaults) { 25764 var _this; 25765 _this = Node$2.call(this, defaults) || this; 25766 _this.type = "comment"; 25767 return _this; 25768 } 25769 return Comment2; 25770}($a44aab89caa44953$var$Node$2); 25771var $a44aab89caa44953$var$comment = $a44aab89caa44953$var$Comment$4; 25772$a44aab89caa44953$var$Comment$4.default = $a44aab89caa44953$var$Comment$4; 25773var $a44aab89caa44953$var$isClean$1 = $a44aab89caa44953$var$symbols.isClean, $a44aab89caa44953$var$my$1 = $a44aab89caa44953$var$symbols.my; 25774var $a44aab89caa44953$var$Declaration$3 = $a44aab89caa44953$var$declaration; 25775var $a44aab89caa44953$var$Comment$3 = $a44aab89caa44953$var$comment; 25776var $a44aab89caa44953$var$Node$1 = $a44aab89caa44953$var$node; 25777var $a44aab89caa44953$var$parse$4, $a44aab89caa44953$var$Rule$4, $a44aab89caa44953$var$AtRule$4, $a44aab89caa44953$var$Root$6; 25778function $a44aab89caa44953$var$cleanSource(nodes) { 25779 return nodes.map(function(i2) { 25780 if (i2.nodes) i2.nodes = $a44aab89caa44953$var$cleanSource(i2.nodes); 25781 delete i2.source; 25782 return i2; 25783 }); 25784} 25785function $a44aab89caa44953$var$markDirtyUp(node2) { 25786 node2[$a44aab89caa44953$var$isClean$1] = false; 25787 if (node2.proxyOf.nodes) for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(node2.proxyOf.nodes), _step; !(_step = _iterator()).done;){ 25788 var i2 = _step.value; 25789 $a44aab89caa44953$var$markDirtyUp(i2); 25790 } 25791} 25792var $a44aab89caa44953$var$Container$7 = /*#__PURE__*/ function(Node$1) { 25793 $a44aab89caa44953$var$_inherits(Container2, Node$1); 25794 function Container2() { 25795 return Node$1.apply(this, arguments) || this; 25796 } 25797 var _proto = Container2.prototype; 25798 _proto.append = function append() { 25799 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 25800 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(children), _step; !(_step = _iterator()).done;){ 25801 var child = _step.value; 25802 var nodes = this.normalize(child, this.last); 25803 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step1; !(_step1 = _iterator1()).done;){ 25804 var node2 = _step1.value; 25805 this.proxyOf.nodes.push(node2); 25806 } 25807 } 25808 this.markDirty(); 25809 return this; 25810 }; 25811 _proto.cleanRaws = function cleanRaws(keepBetween) { 25812 Node$1.prototype.cleanRaws.call(this, keepBetween); 25813 if (this.nodes) for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.nodes), _step; !(_step = _iterator()).done;){ 25814 var node2 = _step.value; 25815 node2.cleanRaws(keepBetween); 25816 } 25817 }; 25818 _proto.each = function each(callback) { 25819 if (!this.proxyOf.nodes) return void 0; 25820 var iterator = this.getIterator(); 25821 var index2, result2; 25822 while(this.indexes[iterator] < this.proxyOf.nodes.length){ 25823 index2 = this.indexes[iterator]; 25824 result2 = callback(this.proxyOf.nodes[index2], index2); 25825 if (result2 === false) break; 25826 this.indexes[iterator] += 1; 25827 } 25828 delete this.indexes[iterator]; 25829 return result2; 25830 }; 25831 _proto.every = function every(condition) { 25832 return this.nodes.every(condition); 25833 }; 25834 _proto.getIterator = function getIterator() { 25835 if (!this.lastEach) this.lastEach = 0; 25836 if (!this.indexes) this.indexes = {}; 25837 this.lastEach += 1; 25838 var iterator = this.lastEach; 25839 this.indexes[iterator] = 0; 25840 return iterator; 25841 }; 25842 _proto.getProxyProcessor = function getProxyProcessor() { 25843 return { 25844 get: function get(node2, prop) { 25845 if (prop === "proxyOf") return node2; 25846 else if (!node2[prop]) return node2[prop]; 25847 else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) return function() { 25848 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 25849 var _node2; 25850 return (_node2 = node2)[prop].apply(_node2, [].concat(args.map(function(i2) { 25851 if (typeof i2 === "function") return function(child, index2) { 25852 return i2(child.toProxy(), index2); 25853 }; 25854 else return i2; 25855 }))); 25856 }; 25857 else if (prop === "every" || prop === "some") return function(cb) { 25858 return node2[prop](function(child) { 25859 for(var _len = arguments.length, other = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)other[_key - 1] = arguments[_key]; 25860 return cb.apply(void 0, [].concat([ 25861 child.toProxy() 25862 ], other)); 25863 }); 25864 }; 25865 else if (prop === "root") return function() { 25866 return node2.root().toProxy(); 25867 }; 25868 else if (prop === "nodes") return node2.nodes.map(function(i2) { 25869 return i2.toProxy(); 25870 }); 25871 else if (prop === "first" || prop === "last") return node2[prop].toProxy(); 25872 else return node2[prop]; 25873 }, 25874 set: function set(node2, prop, value) { 25875 if (node2[prop] === value) return true; 25876 node2[prop] = value; 25877 if (prop === "name" || prop === "params" || prop === "selector") node2.markDirty(); 25878 return true; 25879 } 25880 }; 25881 }; 25882 _proto.index = function index(child) { 25883 if (typeof child === "number") return child; 25884 if (child.proxyOf) child = child.proxyOf; 25885 return this.proxyOf.nodes.indexOf(child); 25886 }; 25887 _proto.insertAfter = function insertAfter(exist, add) { 25888 var existIndex = this.index(exist); 25889 var nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse(); 25890 existIndex = this.index(exist); 25891 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 25892 var node2 = _step.value; 25893 this.proxyOf.nodes.splice(existIndex + 1, 0, node2); 25894 } 25895 var index2; 25896 for(var id in this.indexes){ 25897 index2 = this.indexes[id]; 25898 if (existIndex < index2) this.indexes[id] = index2 + nodes.length; 25899 } 25900 this.markDirty(); 25901 return this; 25902 }; 25903 _proto.insertBefore = function insertBefore(exist, add) { 25904 var existIndex = this.index(exist); 25905 var type = existIndex === 0 ? "prepend" : false;
25906 var nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse(); 25907 existIndex = this.index(exist); 25908 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 25909 var node2 = _step.value; 25910 this.proxyOf.nodes.splice(existIndex, 0, node2); 25911 } 25912 var index2; 25913 for(var id in this.indexes){ 25914 index2 = this.indexes[id]; 25915 if (existIndex <= index2) this.indexes[id] = index2 + nodes.length; 25916 } 25917 this.markDirty(); 25918 return this; 25919 }; 25920 _proto.normalize = function normalize(nodes, sample) { 25921 var _this = this; 25922 if (typeof nodes === "string") nodes = $a44aab89caa44953$var$cleanSource($a44aab89caa44953$var$parse$4(nodes).nodes); 25923 else if (typeof nodes === "undefined") nodes = []; 25924 else if (Array.isArray(nodes)) { 25925 nodes = nodes.slice(0); 25926 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 25927 var i2 = _step.value; 25928 if (i2.parent) i2.parent.removeChild(i2, "ignore"); 25929 } 25930 } else if (nodes.type === "root" && this.type !== "document") { 25931 nodes = nodes.nodes.slice(0); 25932 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step1; !(_step1 = _iterator1()).done;){ 25933 var i21 = _step1.value; 25934 if (i21.parent) i21.parent.removeChild(i21, "ignore"); 25935 } 25936 } else if (nodes.type) nodes = [ 25937 nodes 25938 ]; 25939 else if (nodes.prop) { 25940 if (typeof nodes.value === "undefined") throw new Error("Value field is missed in node creation"); 25941 else if (typeof nodes.value !== "string") nodes.value = String(nodes.value); 25942 nodes = [ 25943 new $a44aab89caa44953$var$Declaration$3(nodes) 25944 ]; 25945 } else if (nodes.selector) nodes = [ 25946 new $a44aab89caa44953$var$Rule$4(nodes) 25947 ]; 25948 else if (nodes.name) nodes = [ 25949 new $a44aab89caa44953$var$AtRule$4(nodes) 25950 ]; 25951 else if (nodes.text) nodes = [ 25952 new $a44aab89caa44953$var$Comment$3(nodes) 25953 ]; 25954 else throw new Error("Unknown node type in node creation"); 25955 var processed = nodes.map(function(i2) { 25956 if (!i2[$a44aab89caa44953$var$my$1]) Container2.rebuild(i2); 25957 i2 = i2.proxyOf; 25958 if (i2.parent) i2.parent.removeChild(i2); 25959 if (i2[$a44aab89caa44953$var$isClean$1]) $a44aab89caa44953$var$markDirtyUp(i2); 25960 if (typeof i2.raws.before === "undefined") { 25961 if (sample && typeof sample.raws.before !== "undefined") i2.raws.before = sample.raws.before.replace(/\S/g, ""); 25962 } 25963 i2.parent = _this.proxyOf; 25964 return i2; 25965 }); 25966 return processed; 25967 }; 25968 _proto.prepend = function prepend() { 25969 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 25970 children = children.reverse(); 25971 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(children), _step; !(_step = _iterator()).done;){ 25972 var child = _step.value; 25973 var nodes = this.normalize(child, this.first, "prepend").reverse(); 25974 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step1; !(_step1 = _iterator1()).done;){ 25975 var node2 = _step1.value; 25976 this.proxyOf.nodes.unshift(node2); 25977 } 25978 for(var id in this.indexes)this.indexes[id] = this.indexes[id] + nodes.length; 25979 } 25980 this.markDirty(); 25981 return this; 25982 }; 25983 _proto.push = function push(child) { 25984 child.parent = this; 25985 this.proxyOf.nodes.push(child); 25986 return this; 25987 }; 25988 _proto.removeAll = function removeAll() { 25989 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.proxyOf.nodes), _step; !(_step = _iterator()).done;){ 25990 var node2 = _step.value; 25991 node2.parent = void 0; 25992 } 25993 this.proxyOf.nodes = []; 25994 this.markDirty(); 25995 return this; 25996 }; 25997 _proto.removeChild = function removeChild(child) { 25998 child = this.index(child); 25999 this.proxyOf.nodes[child].parent = void 0; 26000 this.proxyOf.nodes.splice(child, 1); 26001 var index2; 26002 for(var id in this.indexes){ 26003 index2 = this.indexes[id]; 26004 if (index2 >= child) this.indexes[id] = index2 - 1; 26005 } 26006 this.markDirty(); 26007 return this; 26008 }; 26009 _proto.replaceValues = function replaceValues(pattern, opts, callback) { 26010 if (!callback) { 26011 callback = opts; 26012 opts = {}; 26013 } 26014 this.walkDecls(function(decl) { 26015 if (opts.props && !opts.props.includes(decl.prop)) return; 26016 if (opts.fast && !decl.value.includes(opts.fast)) return; 26017 decl.value = decl.value.replace(pattern, callback); 26018 }); 26019 this.markDirty(); 26020 return this; 26021 }; 26022 _proto.some = function some(condition) { 26023 return this.nodes.some(condition); 26024 }; 26025 _proto.walk = function walk(callback) { 26026 return this.each(function(child, i2) { 26027 var result2; 26028 try { 26029 result2 = callback(child, i2); 26030 } catch (e2) { 26031 throw child.addToError(e2); 26032 } 26033 if (result2 !== false && child.walk) result2 = child.walk(callback); 26034 return result2; 26035 }); 26036 }; 26037 _proto.walkAtRules = function walkAtRules(name, callback) { 26038 if (!callback) { 26039 callback = name; 26040 return this.walk(function(child, i2) { 26041 if (child.type === "atrule") return callback(child, i2); 26042 }); 26043 } 26044 if ($a44aab89caa44953$var$_instanceof(name, RegExp)) return this.walk(function(child, i2) { 26045 if (child.type === "atrule" && name.test(child.name)) return callback(child, i2); 26046 }); 26047 return this.walk(function(child, i2) { 26048 if (child.type === "atrule" && child.name === name) return callback(child, i2); 26049 }); 26050 }; 26051 _proto.walkComments = function walkComments(callback) { 26052 return this.walk(function(child, i2) { 26053 if (child.type === "comment") return callback(child, i2); 26054 }); 26055 }; 26056 _proto.walkDecls = function walkDecls(prop, callback) { 26057 if (!callback) { 26058 callback = prop; 26059 return this.walk(function(child, i2) { 26060 if (child.type === "decl") return callback(child, i2); 26061 }); 26062 } 26063 if ($a44aab89caa44953$var$_instanceof(prop, RegExp)) return this.walk(function(child, i2) { 26064 if (child.type === "decl" && prop.test(child.prop)) return callback(child, i2); 26065 }); 26066 return this.walk(function(child, i2) { 26067 if (child.type === "decl" && child.prop === prop) return callback(child, i2); 26068 }); 26069 }; 26070 _proto.walkRules = function walkRules(selector, callback) { 26071 if (!callback) { 26072 callback = selector; 26073 return this.walk(function(child, i2) { 26074 if (child.type === "rule") return callback(child, i2); 26075 }); 26076 } 26077 if ($a44aab89caa44953$var$_instanceof(selector, RegExp)) return this.walk(function(child, i2) { 26078 if (child.type === "rule" && selector.test(child.selector)) return callback(child, i2); 26079 }); 26080 return this.walk(function(child, i2) { 26081 if (child.type === "rule" && child.selector === selector) return callback(child, i2); 26082 }); 26083 }; 26084 $a44aab89caa44953$var$_create_class(Container2, [ 26085 { 26086 key: "first", 26087 get: function get() { 26088 if (!this.proxyOf.nodes) return void 0; 26089 return this.proxyOf.nodes[0]; 26090 } 26091 }, 26092 { 26093 key: "last", 26094 get: function get() { 26095 if (!this.proxyOf.nodes) return void 0; 26096 return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]; 26097 } 26098 } 26099 ]); 26100 return Container2; 26101}($a44aab89caa44953$var$Node$1); 26102$a44aab89caa44953$var$Container$7.registerParse = function(dependant) { 26103 $a44aab89caa44953$var$parse$4 = dependant; 26104}; 26105$a44aab89caa44953$var$Container$7.registerRule = function(dependant) { 26106 $a44aab89caa44953$var$Rule$4 = dependant; 26107}; 26108$a44aab89caa44953$var$Container$7.registerAtRule = function(dependant) { 26109 $a44aab89caa44953$var$AtRule$4 = dependant; 26110}; 26111$a44aab89caa44953$var$Container$7.registerRoot = function(dependant) {
vendor: 7,118 bytes, lines 26112-26274
26112 $a44aab89caa44953$var$Root$6 = dependant; 26113}; 26114var $a44aab89caa44953$var$container = $a44aab89caa44953$var$Container$7; 26115$a44aab89caa44953$var$Container$7.default = $a44aab89caa44953$var$Container$7; 26116$a44aab89caa44953$var$Container$7.rebuild = function(node2) { 26117 if (node2.type === "atrule") Object.setPrototypeOf(node2, $a44aab89caa44953$var$AtRule$4.prototype); 26118 else if (node2.type === "rule") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Rule$4.prototype); 26119 else if (node2.type === "decl") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Declaration$3.prototype); 26120 else if (node2.type === "comment") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Comment$3.prototype); 26121 else if (node2.type === "root") Object.setPrototypeOf(node2, $a44aab89caa44953$var$Root$6.prototype); 26122 node2[$a44aab89caa44953$var$my$1] = true; 26123 if (node2.nodes) node2.nodes.forEach(function(child) { 26124 $a44aab89caa44953$var$Container$7.rebuild(child); 26125 }); 26126}; 26127var $a44aab89caa44953$var$Container$6 = $a44aab89caa44953$var$container; 26128var $a44aab89caa44953$var$LazyResult$4, $a44aab89caa44953$var$Processor$3; 26129var $a44aab89caa44953$var$Document$3 = /*#__PURE__*/ function(Container$6) { 26130 $a44aab89caa44953$var$_inherits(Document23, Container$6); 26131 function Document23(defaults) { 26132 var _this; 26133 _this = Container$6.call(this, $a44aab89caa44953$var$_extends({ 26134 type: "document" 26135 }, defaults)) || this; 26136 if (!_this.nodes) _this.nodes = []; 26137 return _this; 26138 } 26139 var _proto = Document23.prototype; 26140 _proto.toResult = function toResult(opts) { 26141 if (opts === void 0) opts = {}; 26142 var lazy = new $a44aab89caa44953$var$LazyResult$4(new $a44aab89caa44953$var$Processor$3(), this, opts); 26143 return lazy.stringify(); 26144 }; 26145 return Document23; 26146}($a44aab89caa44953$var$Container$6); 26147$a44aab89caa44953$var$Document$3.registerLazyResult = function(dependant) { 26148 $a44aab89caa44953$var$LazyResult$4 = dependant; 26149}; 26150$a44aab89caa44953$var$Document$3.registerProcessor = function(dependant) { 26151 $a44aab89caa44953$var$Processor$3 = dependant; 26152}; 26153var $a44aab89caa44953$var$document$1$2 = $a44aab89caa44953$var$Document$3; 26154$a44aab89caa44953$var$Document$3.default = $a44aab89caa44953$var$Document$3; 26155var $a44aab89caa44953$var$printed = {}; 26156var $a44aab89caa44953$var$warnOnce$2 = function warnOnce2(message) { 26157 if ($a44aab89caa44953$var$printed[message]) return; 26158 $a44aab89caa44953$var$printed[message] = true; 26159 if (typeof console !== "undefined" && console.warn) console.warn(message); 26160}; 26161var $a44aab89caa44953$var$Warning$2 = /*#__PURE__*/ function() { 26162 function Warning2(text, opts) { 26163 if (opts === void 0) opts = {}; 26164 this.type = "warning"; 26165 this.text = text; 26166 if (opts.node && opts.node.source) { 26167 var range = opts.node.rangeBy(opts); 26168 this.line = range.start.line; 26169 this.column = range.start.column; 26170 this.endLine = range.end.line; 26171 this.endColumn = range.end.column; 26172 } 26173 for(var opt in opts)this[opt] = opts[opt]; 26174 } 26175 var _proto = Warning2.prototype; 26176 _proto.toString = function toString() { 26177 if (this.node) return this.node.error(this.text, { 26178 index: this.index, 26179 plugin: this.plugin, 26180 word: this.word 26181 }).message; 26182 if (this.plugin) return this.plugin + ": " + this.text; 26183 return this.text; 26184 }; 26185 return Warning2; 26186}(); 26187var $a44aab89caa44953$var$warning = $a44aab89caa44953$var$Warning$2; 26188$a44aab89caa44953$var$Warning$2.default = $a44aab89caa44953$var$Warning$2; 26189var $a44aab89caa44953$var$Warning$1 = $a44aab89caa44953$var$warning; 26190var $a44aab89caa44953$var$Result$3 = /*#__PURE__*/ function() { 26191 function Result2(processor2, root2, opts) { 26192 this.processor = processor2; 26193 this.messages = []; 26194 this.root = root2; 26195 this.opts = opts; 26196 this.css = void 0; 26197 this.map = void 0; 26198 } 26199 var _proto = Result2.prototype; 26200 _proto.toString = function toString() { 26201 return this.css; 26202 }; 26203 _proto.warn = function warn(text, opts) { 26204 if (opts === void 0) opts = {}; 26205 if (!opts.plugin) { 26206 if (this.lastPlugin && this.lastPlugin.postcssPlugin) opts.plugin = this.lastPlugin.postcssPlugin; 26207 } 26208 var warning2 = new $a44aab89caa44953$var$Warning$1(text, opts); 26209 this.messages.push(warning2); 26210 return warning2; 26211 }; 26212 _proto.warnings = function warnings() { 26213 return this.messages.filter(function(i2) { 26214 return i2.type === "warning"; 26215 }); 26216 }; 26217 $a44aab89caa44953$var$_create_class(Result2, [ 26218 { 26219 key: "content", 26220 get: function get() { 26221 return this.css; 26222 } 26223 } 26224 ]); 26225 return Result2; 26226}(); 26227var $a44aab89caa44953$var$result = $a44aab89caa44953$var$Result$3; 26228$a44aab89caa44953$var$Result$3.default = $a44aab89caa44953$var$Result$3; 26229var $a44aab89caa44953$var$SINGLE_QUOTE = "'".charCodeAt(0); 26230var $a44aab89caa44953$var$DOUBLE_QUOTE = '"'.charCodeAt(0); 26231var $a44aab89caa44953$var$BACKSLASH = "\\".charCodeAt(0); 26232var $a44aab89caa44953$var$SLASH = "/".charCodeAt(0); 26233var $a44aab89caa44953$var$NEWLINE = "\n".charCodeAt(0); 26234var $a44aab89caa44953$var$SPACE = " ".charCodeAt(0); 26235var $a44aab89caa44953$var$FEED = "\f".charCodeAt(0); 26236var $a44aab89caa44953$var$TAB = " ".charCodeAt(0); 26237var $a44aab89caa44953$var$CR = "\r".charCodeAt(0); 26238var $a44aab89caa44953$var$OPEN_SQUARE = "[".charCodeAt(0); 26239var $a44aab89caa44953$var$CLOSE_SQUARE = "]".charCodeAt(0); 26240var $a44aab89caa44953$var$OPEN_PARENTHESES = "(".charCodeAt(0); 26241var $a44aab89caa44953$var$CLOSE_PARENTHESES = ")".charCodeAt(0); 26242var $a44aab89caa44953$var$OPEN_CURLY = "{".charCodeAt(0); 26243var $a44aab89caa44953$var$CLOSE_CURLY = "}".charCodeAt(0); 26244var $a44aab89caa44953$var$SEMICOLON = ";".charCodeAt(0); 26245var $a44aab89caa44953$var$ASTERISK = "*".charCodeAt(0); 26246var $a44aab89caa44953$var$COLON = ":".charCodeAt(0); 26247var $a44aab89caa44953$var$AT = "@".charCodeAt(0); 26248var $a44aab89caa44953$var$RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; 26249var $a44aab89caa44953$var$RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; 26250var $a44aab89caa44953$var$RE_BAD_BRACKET = /.[\r\n"'(/\\]/; 26251var $a44aab89caa44953$var$RE_HEX_ESCAPE = /[\da-f]/i; 26252var $a44aab89caa44953$var$tokenize = function tokenizer2(input2, options) { 26253 if (options === void 0) options = {}; 26254 var css = input2.css.valueOf(); 26255 var ignore = options.ignoreErrors; 26256 var code, next, quote, content, escape; 26257 var escaped, escapePos, prev, n2, currentToken; 26258 var length = css.length; 26259 var pos = 0; 26260 var buffer = []; 26261 var returned = []; 26262 function position() { 26263 return pos; 26264 } 26265 function unclosed(what) { 26266 throw input2.error("Unclosed " + what, pos); 26267 } 26268 function endOfFile() { 26269 return returned.length === 0 && pos >= length; 26270 } 26271 function nextToken(opts) { 26272 if (returned.length) return returned.pop(); 26273 if (pos >= length) return; 26274 var ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
26275 code = css.charCodeAt(pos); 26276 switch(code){ 26277 case $a44aab89caa44953$var$NEWLINE: 26278 case $a44aab89caa44953$var$SPACE: 26279 case $a44aab89caa44953$var$TAB: 26280 case $a44aab89caa44953$var$CR: 26281 case $a44aab89caa44953$var$FEED: 26282 next = pos; 26283 do { 26284 next += 1; 26285 code = css.charCodeAt(next); 26286 }while (code === $a44aab89caa44953$var$SPACE || code === $a44aab89caa44953$var$NEWLINE || code === $a44aab89caa44953$var$TAB || code === $a44aab89caa44953$var$CR || code === $a44aab89caa44953$var$FEED); 26287 currentToken = [ 26288 "space", 26289 css.slice(pos, next) 26290 ]; 26291 pos = next - 1; 26292 break; 26293 case $a44aab89caa44953$var$OPEN_SQUARE: 26294 case $a44aab89caa44953$var$CLOSE_SQUARE: 26295 case $a44aab89caa44953$var$OPEN_CURLY: 26296 case $a44aab89caa44953$var$CLOSE_CURLY: 26297 case $a44aab89caa44953$var$COLON: 26298 case $a44aab89caa44953$var$SEMICOLON: 26299 case $a44aab89caa44953$var$CLOSE_PARENTHESES: 26300 var controlChar = String.fromCharCode(code); 26301 currentToken = [ 26302 controlChar, 26303 controlChar, 26304 pos 26305 ]; 26306 break; 26307 case $a44aab89caa44953$var$OPEN_PARENTHESES: 26308 prev = buffer.length ? buffer.pop()[1] : ""; 26309 n2 = css.charCodeAt(pos + 1); 26310 if (prev === "url" && n2 !== $a44aab89caa44953$var$SINGLE_QUOTE && n2 !== $a44aab89caa44953$var$DOUBLE_QUOTE && n2 !== $a44aab89caa44953$var$SPACE && n2 !== $a44aab89caa44953$var$NEWLINE && n2 !== $a44aab89caa44953$var$TAB && n2 !== $a44aab89caa44953$var$FEED && n2 !== $a44aab89caa44953$var$CR) { 26311 next = pos; 26312 do { 26313 escaped = false; 26314 next = css.indexOf(")", next + 1); 26315 if (next === -1) { 26316 if (ignore || ignoreUnclosed) { 26317 next = pos; 26318 break; 26319 } else unclosed("bracket"); 26320 } 26321 escapePos = next; 26322 while(css.charCodeAt(escapePos - 1) === $a44aab89caa44953$var$BACKSLASH){ 26323 escapePos -= 1; 26324 escaped = !escaped; 26325 } 26326 }while (escaped); 26327 currentToken = [ 26328 "brackets", 26329 css.slice(pos, next + 1), 26330 pos, 26331 next 26332 ]; 26333 pos = next; 26334 } else { 26335 next = css.indexOf(")", pos + 1); 26336 content = css.slice(pos, next + 1); 26337 if (next === -1 || $a44aab89caa44953$var$RE_BAD_BRACKET.test(content)) currentToken = [ 26338 "(", 26339 "(", 26340 pos 26341 ]; 26342 else { 26343 currentToken = [ 26344 "brackets", 26345 content, 26346 pos, 26347 next 26348 ]; 26349 pos = next; 26350 } 26351 } 26352 break; 26353 case $a44aab89caa44953$var$SINGLE_QUOTE: 26354 case $a44aab89caa44953$var$DOUBLE_QUOTE: 26355 quote = code === $a44aab89caa44953$var$SINGLE_QUOTE ? "'" : '"'; 26356 next = pos; 26357 do { 26358 escaped = false; 26359 next = css.indexOf(quote, next + 1); 26360 if (next === -1) { 26361 if (ignore || ignoreUnclosed) { 26362 next = pos + 1; 26363 break; 26364 } else unclosed("string"); 26365 } 26366 escapePos = next; 26367 while(css.charCodeAt(escapePos - 1) === $a44aab89caa44953$var$BACKSLASH){ 26368 escapePos -= 1; 26369 escaped = !escaped; 26370 } 26371 }while (escaped); 26372 currentToken = [ 26373 "string", 26374 css.slice(pos, next + 1), 26375 pos, 26376 next 26377 ]; 26378 pos = next; 26379 break; 26380 case $a44aab89caa44953$var$AT: 26381 $a44aab89caa44953$var$RE_AT_END.lastIndex = pos + 1; 26382 $a44aab89caa44953$var$RE_AT_END.test(css); 26383 if ($a44aab89caa44953$var$RE_AT_END.lastIndex === 0) next = css.length - 1; 26384 else next = $a44aab89caa44953$var$RE_AT_END.lastIndex - 2; 26385 currentToken = [ 26386 "at-word", 26387 css.slice(pos, next + 1), 26388 pos, 26389 next 26390 ]; 26391 pos = next; 26392 break; 26393 case $a44aab89caa44953$var$BACKSLASH: 26394 next = pos; 26395 escape = true; 26396 while(css.charCodeAt(next + 1) === $a44aab89caa44953$var$BACKSLASH){ 26397 next += 1; 26398 escape = !escape; 26399 } 26400 code = css.charCodeAt(next + 1); 26401 if (escape && code !== $a44aab89caa44953$var$SLASH && code !== $a44aab89caa44953$var$SPACE && code !== $a44aab89caa44953$var$NEWLINE && code !== $a44aab89caa44953$var$TAB && code !== $a44aab89caa44953$var$CR && code !== $a44aab89caa44953$var$FEED) { 26402 next += 1; 26403 if ($a44aab89caa44953$var$RE_HEX_ESCAPE.test(css.charAt(next))) { 26404 while($a44aab89caa44953$var$RE_HEX_ESCAPE.test(css.charAt(next + 1)))next += 1; 26405 if (css.charCodeAt(next + 1) === $a44aab89caa44953$var$SPACE) next += 1; 26406 } 26407 } 26408 currentToken = [ 26409 "word", 26410 css.slice(pos, next + 1), 26411 pos, 26412 next 26413 ]; 26414 pos = next; 26415 break; 26416 default: 26417 if (code === $a44aab89caa44953$var$SLASH && css.charCodeAt(pos + 1) === $a44aab89caa44953$var$ASTERISK) { 26418 next = css.indexOf("*/", pos + 2) + 1; 26419 if (next === 0) { 26420 if (ignore || ignoreUnclosed) next = css.length; 26421 else unclosed("comment"); 26422 } 26423 currentToken = [ 26424 "comment", 26425 css.slice(pos, next + 1), 26426 pos, 26427 next 26428 ]; 26429 pos = next; 26430 } else { 26431 $a44aab89caa44953$var$RE_WORD_END.lastIndex = pos + 1; 26432 $a44aab89caa44953$var$RE_WORD_END.test(css); 26433 if ($a44aab89caa44953$var$RE_WORD_END.lastIndex === 0) next = css.length - 1; 26434 else next = $a44aab89caa44953$var$RE_WORD_END.lastIndex - 2; 26435 currentToken = [ 26436 "word", 26437 css.slice(pos, next + 1), 26438 pos, 26439 next 26440 ]; 26441 buffer.push(currentToken); 26442 pos = next; 26443 } 26444 break; 26445 } 26446 pos++; 26447 return currentToken; 26448 } 26449 function back(token) { 26450 returned.push(token); 26451 } 26452 return { 26453 back: back, 26454 endOfFile: endOfFile, 26455 nextToken: nextToken, 26456 position: position 26457 }; 26458}; 26459var $a44aab89caa44953$var$Container$5 = $a44aab89caa44953$var$container; 26460var $a44aab89caa44953$var$AtRule$3 = /*#__PURE__*/ function(Container$5) { 26461 $a44aab89caa44953$var$_inherits(AtRule2, Container$5); 26462 function AtRule2(defaults) { 26463 var _this; 26464 _this = Container$5.call(this, defaults) || this; 26465 _this.type = "atrule"; 26466 return _this; 26467 } 26468 var _proto = AtRule2.prototype; 26469 _proto.append = function append() { 26470 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 26471 var _Container$5_prototype_append; 26472 if (!this.proxyOf.nodes) this.nodes = []; 26473 return (_Container$5_prototype_append = Container$5.prototype.append).call.apply(_Container$5_prototype_append, [].concat([ 26474 this 26475 ], children)); 26476 }; 26477 _proto.prepend = function prepend() { 26478 for(var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++)children[_key] = arguments[_key]; 26479 var _Container$5_prototype_prepend; 26480 if (!this.proxyOf.nodes) this.nodes = []; 26481 return (_Container$5_prototype_prepend = Container$5.prototype.prepend).call.apply(_Container$5_prototype_prepend, [].concat([ 26482 this 26483 ], children)); 26484 }; 26485 return AtRule2; 26486}($a44aab89caa44953$var$Container$5); 26487var $a44aab89caa44953$var$atRule = $a44aab89caa44953$var$AtRule$3; 26488$a44aab89caa44953$var$AtRule$3.default = $a44aab89caa44953$var$AtRule$3; 26489$a44aab89caa44953$var$Container$5.registerAtRule($a44aab89caa44953$var$AtRule$3); 26490var $a44aab89caa44953$var$Container$4 = $a44aab89caa44953$var$container; 26491var $a44aab89caa44953$var$LazyResult$3, $a44aab89caa44953$var$Processor$2; 26492var $a44aab89caa44953$var$Root$5 = /*#__PURE__*/ function(Container$4) { 26493 $a44aab89caa44953$var$_inherits(Root2, Container$4); 26494 function Root2(defaults) { 26495 var _this; 26496 _this = Container$4.call(this, defaults) || this; 26497 _this.type = "root"; 26498 if (!_this.nodes) _this.nodes = []; 26499 return _this; 26500 } 26501 var _proto = Root2.prototype; 26502 _proto.normalize = function normalize(child, sample, type) { 26503 var nodes = Container$4.prototype.normalize.call(this, child); 26504 if (sample) {
26505 if (type === "prepend") { 26506 if (this.nodes.length > 1) sample.raws.before = this.nodes[1].raws.before; 26507 else delete sample.raws.before; 26508 } else if (this.first !== sample) for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(nodes), _step; !(_step = _iterator()).done;){ 26509 var node2 = _step.value; 26510 node2.raws.before = sample.raws.before; 26511 } 26512 } 26513 return nodes; 26514 }; 26515 _proto.removeChild = function removeChild(child, ignore) { 26516 var index2 = this.index(child); 26517 if (!ignore && index2 === 0 && this.nodes.length > 1) this.nodes[1].raws.before = this.nodes[index2].raws.before; 26518 return Container$4.prototype.removeChild.call(this, child); 26519 }; 26520 _proto.toResult = function toResult(opts) { 26521 if (opts === void 0) opts = {}; 26522 var lazy = new $a44aab89caa44953$var$LazyResult$3(new $a44aab89caa44953$var$Processor$2(), this, opts); 26523 return lazy.stringify(); 26524 }; 26525 return Root2; 26526}($a44aab89caa44953$var$Container$4); 26527$a44aab89caa44953$var$Root$5.registerLazyResult = function(dependant) { 26528 $a44aab89caa44953$var$LazyResult$3 = dependant; 26529}; 26530$a44aab89caa44953$var$Root$5.registerProcessor = function(dependant) { 26531 $a44aab89caa44953$var$Processor$2 = dependant; 26532}; 26533var $a44aab89caa44953$var$root = $a44aab89caa44953$var$Root$5; 26534$a44aab89caa44953$var$Root$5.default = $a44aab89caa44953$var$Root$5; 26535$a44aab89caa44953$var$Container$4.registerRoot($a44aab89caa44953$var$Root$5); 26536var $a44aab89caa44953$var$list$2 = { 26537 comma: function comma(string) { 26538 return $a44aab89caa44953$var$list$2.split(string, [ 26539 "," 26540 ], true); 26541 }, 26542 space: function space(string) { 26543 var spaces = [ 26544 " ", 26545 "\n", 26546 " " 26547 ]; 26548 return $a44aab89caa44953$var$list$2.split(string, spaces); 26549 }, 26550 split: function split(string, separators, last) { 26551 var array = []; 26552 var current = ""; 26553 var split = false; 26554 var func = 0; 26555 var inQuote = false; 26556 var prevQuote = ""; 26557 var escape = false;
vendor: 19,406 bytes, lines 26558-27054
26558 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(string), _step; !(_step = _iterator()).done;){ 26559 var letter = _step.value; 26560 if (escape) escape = false; 26561 else if (letter === "\\") escape = true; 26562 else if (inQuote) { 26563 if (letter === prevQuote) inQuote = false; 26564 } else if (letter === '"' || letter === "'") { 26565 inQuote = true; 26566 prevQuote = letter; 26567 } else if (letter === "(") func += 1; 26568 else if (letter === ")") { 26569 if (func > 0) func -= 1; 26570 } else if (func === 0) { 26571 if (separators.includes(letter)) split = true; 26572 } 26573 if (split) { 26574 if (current !== "") array.push(current.trim()); 26575 current = ""; 26576 split = false; 26577 } else current += letter; 26578 } 26579 if (last || current !== "") array.push(current.trim()); 26580 return array; 26581 } 26582}; 26583var $a44aab89caa44953$var$list_1 = $a44aab89caa44953$var$list$2; 26584$a44aab89caa44953$var$list$2.default = $a44aab89caa44953$var$list$2; 26585var $a44aab89caa44953$var$Container$3 = $a44aab89caa44953$var$container; 26586var $a44aab89caa44953$var$list$1 = $a44aab89caa44953$var$list_1; 26587var $a44aab89caa44953$var$Rule$3 = /*#__PURE__*/ function(Container$3) { 26588 $a44aab89caa44953$var$_inherits(Rule2, Container$3); 26589 function Rule2(defaults) { 26590 var _this; 26591 _this = Container$3.call(this, defaults) || this; 26592 _this.type = "rule"; 26593 if (!_this.nodes) _this.nodes = []; 26594 return _this; 26595 } 26596 $a44aab89caa44953$var$_create_class(Rule2, [ 26597 { 26598 key: "selectors", 26599 get: function get() { 26600 return $a44aab89caa44953$var$list$1.comma(this.selector); 26601 }, 26602 set: function set(values) { 26603 var match = this.selector ? this.selector.match(/,\s*/) : null; 26604 var sep2 = match ? match[0] : "," + this.raw("between", "beforeOpen"); 26605 this.selector = values.join(sep2); 26606 } 26607 } 26608 ]); 26609 return Rule2; 26610}($a44aab89caa44953$var$Container$3); 26611var $a44aab89caa44953$var$rule = $a44aab89caa44953$var$Rule$3; 26612$a44aab89caa44953$var$Rule$3.default = $a44aab89caa44953$var$Rule$3; 26613$a44aab89caa44953$var$Container$3.registerRule($a44aab89caa44953$var$Rule$3); 26614var $a44aab89caa44953$var$Declaration$2 = $a44aab89caa44953$var$declaration; 26615var $a44aab89caa44953$var$tokenizer22 = $a44aab89caa44953$var$tokenize; 26616var $a44aab89caa44953$var$Comment$2 = $a44aab89caa44953$var$comment; 26617var $a44aab89caa44953$var$AtRule$2 = $a44aab89caa44953$var$atRule; 26618var $a44aab89caa44953$var$Root$4 = $a44aab89caa44953$var$root; 26619var $a44aab89caa44953$var$Rule$2 = $a44aab89caa44953$var$rule; 26620var $a44aab89caa44953$var$SAFE_COMMENT_NEIGHBOR = { 26621 empty: true, 26622 space: true 26623}; 26624function $a44aab89caa44953$var$findLastWithPosition(tokens) { 26625 for(var i2 = tokens.length - 1; i2 >= 0; i2--){ 26626 var token = tokens[i2]; 26627 var pos = token[3] || token[2]; 26628 if (pos) return pos; 26629 } 26630} 26631var $a44aab89caa44953$var$Parser$1 = /*#__PURE__*/ function() { 26632 function Parser2(input2) { 26633 this.input = input2; 26634 this.root = new $a44aab89caa44953$var$Root$4(); 26635 this.current = this.root; 26636 this.spaces = ""; 26637 this.semicolon = false; 26638 this.createTokenizer(); 26639 this.root.source = { 26640 input: input2, 26641 start: { 26642 column: 1, 26643 line: 1, 26644 offset: 0 26645 } 26646 }; 26647 } 26648 var _proto = Parser2.prototype; 26649 _proto.atrule = function atrule(token) { 26650 var node2 = new $a44aab89caa44953$var$AtRule$2(); 26651 node2.name = token[1].slice(1); 26652 if (node2.name === "") this.unnamedAtrule(node2, token); 26653 this.init(node2, token[2]); 26654 var type; 26655 var prev; 26656 var shift; 26657 var last = false; 26658 var open = false; 26659 var params = []; 26660 var brackets = []; 26661 while(!this.tokenizer.endOfFile()){ 26662 token = this.tokenizer.nextToken(); 26663 type = token[0]; 26664 if (type === "(" || type === "[") brackets.push(type === "(" ? ")" : "]"); 26665 else if (type === "{" && brackets.length > 0) brackets.push("}"); 26666 else if (type === brackets[brackets.length - 1]) brackets.pop(); 26667 if (brackets.length === 0) { 26668 if (type === ";") { 26669 node2.source.end = this.getPosition(token[2]); 26670 node2.source.end.offset++; 26671 this.semicolon = true; 26672 break; 26673 } else if (type === "{") { 26674 open = true; 26675 break; 26676 } else if (type === "}") { 26677 if (params.length > 0) { 26678 shift = params.length - 1; 26679 prev = params[shift]; 26680 while(prev && prev[0] === "space")prev = params[--shift]; 26681 if (prev) { 26682 node2.source.end = this.getPosition(prev[3] || prev[2]); 26683 node2.source.end.offset++; 26684 } 26685 } 26686 this.end(token); 26687 break; 26688 } else params.push(token); 26689 } else params.push(token); 26690 if (this.tokenizer.endOfFile()) { 26691 last = true; 26692 break; 26693 } 26694 } 26695 node2.raws.between = this.spacesAndCommentsFromEnd(params); 26696 if (params.length) { 26697 node2.raws.afterName = this.spacesAndCommentsFromStart(params); 26698 this.raw(node2, "params", params); 26699 if (last) { 26700 token = params[params.length - 1]; 26701 node2.source.end = this.getPosition(token[3] || token[2]); 26702 node2.source.end.offset++; 26703 this.spaces = node2.raws.between; 26704 node2.raws.between = ""; 26705 } 26706 } else { 26707 node2.raws.afterName = ""; 26708 node2.params = ""; 26709 } 26710 if (open) { 26711 node2.nodes = []; 26712 this.current = node2; 26713 } 26714 }; 26715 _proto.checkMissedSemicolon = function checkMissedSemicolon(tokens) { 26716 var colon = this.colon(tokens); 26717 if (colon === false) return; 26718 var founded = 0; 26719 var token; 26720 for(var j = colon - 1; j >= 0; j--){ 26721 token = tokens[j]; 26722 if (token[0] !== "space") { 26723 founded += 1; 26724 if (founded === 2) break; 26725 } 26726 } 26727 throw this.input.error("Missed semicolon", token[0] === "word" ? token[3] + 1 : token[2]); 26728 }; 26729 _proto.colon = function colon(tokens) { 26730 var brackets = 0; 26731 var token, type, prev; 26732 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(tokens.entries()), _step; !(_step = _iterator()).done;){ 26733 var _step_value = _step.value, i2 = _step_value[0], element = _step_value[1]; 26734 token = element; 26735 type = token[0]; 26736 if (type === "(") brackets += 1; 26737 if (type === ")") brackets -= 1; 26738 if (brackets === 0 && type === ":") { 26739 if (!prev) this.doubleColon(token); 26740 else if (prev[0] === "word" && prev[1] === "progid") continue; 26741 else return i2; 26742 } 26743 prev = token; 26744 } 26745 return false; 26746 }; 26747 _proto.comment = function comment(token) { 26748 var node2 = new $a44aab89caa44953$var$Comment$2(); 26749 this.init(node2, token[2]); 26750 node2.source.end = this.getPosition(token[3] || token[2]); 26751 node2.source.end.offset++; 26752 var text = token[1].slice(2, -2); 26753 if (/^\s*$/.test(text)) { 26754 node2.text = ""; 26755 node2.raws.left = text; 26756 node2.raws.right = ""; 26757 } else { 26758 var match = text.match(/^(\s*)([^]*\S)(\s*)$/); 26759 node2.text = match[2]; 26760 node2.raws.left = match[1]; 26761 node2.raws.right = match[3]; 26762 } 26763 }; 26764 _proto.createTokenizer = function createTokenizer() { 26765 this.tokenizer = $a44aab89caa44953$var$tokenizer22(this.input); 26766 }; 26767 _proto.decl = function decl(tokens, customProperty) { 26768 var node2 = new $a44aab89caa44953$var$Declaration$2(); 26769 this.init(node2, tokens[0][2]); 26770 var last = tokens[tokens.length - 1]; 26771 if (last[0] === ";") { 26772 this.semicolon = true; 26773 tokens.pop(); 26774 } 26775 node2.source.end = this.getPosition(last[3] || last[2] || $a44aab89caa44953$var$findLastWithPosition(tokens)); 26776 node2.source.end.offset++; 26777 while(tokens[0][0] !== "word"){ 26778 if (tokens.length === 1) this.unknownWord(tokens); 26779 node2.raws.before += tokens.shift()[1]; 26780 } 26781 node2.source.start = this.getPosition(tokens[0][2]); 26782 node2.prop = ""; 26783 while(tokens.length){ 26784 var type = tokens[0][0]; 26785 if (type === ":" || type === "space" || type === "comment") break; 26786 node2.prop += tokens.shift()[1]; 26787 } 26788 node2.raws.between = ""; 26789 var token; 26790 while(tokens.length){ 26791 token = tokens.shift(); 26792 if (token[0] === ":") { 26793 node2.raws.between += token[1]; 26794 break; 26795 } else { 26796 if (token[0] === "word" && /\w/.test(token[1])) this.unknownWord([ 26797 token 26798 ]); 26799 node2.raws.between += token[1]; 26800 } 26801 } 26802 if (node2.prop[0] === "_" || node2.prop[0] === "*") { 26803 node2.raws.before += node2.prop[0]; 26804 node2.prop = node2.prop.slice(1); 26805 } 26806 var firstSpaces = []; 26807 var next; 26808 while(tokens.length){ 26809 next = tokens[0][0]; 26810 if (next !== "space" && next !== "comment") break; 26811 firstSpaces.push(tokens.shift()); 26812 } 26813 this.precheckMissedSemicolon(tokens); 26814 for(var i2 = tokens.length - 1; i2 >= 0; i2--){ 26815 token = tokens[i2]; 26816 if (token[1].toLowerCase() === "!important") { 26817 node2.important = true; 26818 var string = this.stringFrom(tokens, i2); 26819 string = this.spacesFromEnd(tokens) + string; 26820 if (string !== " !important") node2.raws.important = string; 26821 break; 26822 } else if (token[1].toLowerCase() === "important") { 26823 var cache = tokens.slice(0); 26824 var str = ""; 26825 for(var j = i2; j > 0; j--){ 26826 var type1 = cache[j][0]; 26827 if (str.trim().indexOf("!") === 0 && type1 !== "space") break; 26828 str = cache.pop()[1] + str; 26829 } 26830 if (str.trim().indexOf("!") === 0) { 26831 node2.important = true; 26832 node2.raws.important = str; 26833 tokens = cache; 26834 } 26835 } 26836 if (token[0] !== "space" && token[0] !== "comment") break; 26837 } 26838 var hasWord = tokens.some(function(i2) { 26839 return i2[0] !== "space" && i2[0] !== "comment"; 26840 }); 26841 if (hasWord) { 26842 node2.raws.between += firstSpaces.map(function(i2) { 26843 return i2[1]; 26844 }).join(""); 26845 firstSpaces = []; 26846 } 26847 this.raw(node2, "value", firstSpaces.concat(tokens), customProperty); 26848 if (node2.value.includes(":") && !customProperty) this.checkMissedSemicolon(tokens); 26849 }; 26850 _proto.doubleColon = function doubleColon(token) { 26851 throw this.input.error("Double colon", { 26852 offset: token[2] 26853 }, { 26854 offset: token[2] + token[1].length 26855 }); 26856 }; 26857 _proto.emptyRule = function emptyRule(token) { 26858 var node2 = new $a44aab89caa44953$var$Rule$2(); 26859 this.init(node2, token[2]); 26860 node2.selector = ""; 26861 node2.raws.between = ""; 26862 this.current = node2; 26863 }; 26864 _proto.end = function end(token) { 26865 if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon; 26866 this.semicolon = false; 26867 this.current.raws.after = (this.current.raws.after || "") + this.spaces; 26868 this.spaces = ""; 26869 if (this.current.parent) { 26870 this.current.source.end = this.getPosition(token[2]); 26871 this.current.source.end.offset++; 26872 this.current = this.current.parent; 26873 } else this.unexpectedClose(token); 26874 }; 26875 _proto.endFile = function endFile() { 26876 if (this.current.parent) this.unclosedBlock(); 26877 if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon; 26878 this.current.raws.after = (this.current.raws.after || "") + this.spaces; 26879 this.root.source.end = this.getPosition(this.tokenizer.position()); 26880 }; 26881 _proto.freeSemicolon = function freeSemicolon(token) { 26882 this.spaces += token[1]; 26883 if (this.current.nodes) { 26884 var prev = this.current.nodes[this.current.nodes.length - 1]; 26885 if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) { 26886 prev.raws.ownSemicolon = this.spaces; 26887 this.spaces = ""; 26888 } 26889 } 26890 }; 26891 // Helpers 26892 _proto.getPosition = function getPosition(offset) { 26893 var pos = this.input.fromOffset(offset); 26894 return { 26895 column: pos.col, 26896 line: pos.line, 26897 offset: offset 26898 }; 26899 }; 26900 _proto.init = function init(node2, offset) { 26901 this.current.push(node2); 26902 node2.source = { 26903 input: this.input, 26904 start: this.getPosition(offset) 26905 }; 26906 node2.raws.before = this.spaces; 26907 this.spaces = ""; 26908 if (node2.type !== "comment") this.semicolon = false; 26909 }; 26910 _proto.other = function other(start) { 26911 var end = false; 26912 var type = null; 26913 var colon = false; 26914 var bracket = null; 26915 var brackets = []; 26916 var customProperty = start[1].startsWith("--"); 26917 var tokens = []; 26918 var token = start; 26919 while(token){ 26920 type = token[0]; 26921 tokens.push(token); 26922 if (type === "(" || type === "[") { 26923 if (!bracket) bracket = token; 26924 brackets.push(type === "(" ? ")" : "]"); 26925 } else if (customProperty && colon && type === "{") { 26926 if (!bracket) bracket = token; 26927 brackets.push("}"); 26928 } else if (brackets.length === 0) { 26929 if (type === ";") { 26930 if (colon) { 26931 this.decl(tokens, customProperty); 26932 return; 26933 } else break; 26934 } else if (type === "{") { 26935 this.rule(tokens); 26936 return; 26937 } else if (type === "}") { 26938 this.tokenizer.back(tokens.pop()); 26939 end = true; 26940 break; 26941 } else if (type === ":") colon = true; 26942 } else if (type === brackets[brackets.length - 1]) { 26943 brackets.pop(); 26944 if (brackets.length === 0) bracket = null; 26945 } 26946 token = this.tokenizer.nextToken(); 26947 } 26948 if (this.tokenizer.endOfFile()) end = true; 26949 if (brackets.length > 0) this.unclosedBracket(bracket); 26950 if (end && colon) { 26951 if (!customProperty) while(tokens.length){ 26952 token = tokens[tokens.length - 1][0]; 26953 if (token !== "space" && token !== "comment") break; 26954 this.tokenizer.back(tokens.pop()); 26955 } 26956 this.decl(tokens, customProperty); 26957 } else this.unknownWord(tokens); 26958 }; 26959 _proto.parse = function parse() { 26960 var token; 26961 while(!this.tokenizer.endOfFile()){ 26962 token = this.tokenizer.nextToken(); 26963 switch(token[0]){ 26964 case "space": 26965 this.spaces += token[1]; 26966 break; 26967 case ";": 26968 this.freeSemicolon(token); 26969 break; 26970 case "}": 26971 this.end(token); 26972 break; 26973 case "comment": 26974 this.comment(token); 26975 break; 26976 case "at-word": 26977 this.atrule(token); 26978 break; 26979 case "{": 26980 this.emptyRule(token); 26981 break; 26982 default: 26983 this.other(token); 26984 break; 26985 } 26986 } 26987 this.endFile(); 26988 }; 26989 _proto.precheckMissedSemicolon = function precheckMissedSemicolon() {}; 26990 _proto.raw = function raw(node2, prop, tokens, customProperty) { 26991 var token, type; 26992 var length = tokens.length; 26993 var value = ""; 26994 var clean = true; 26995 var next, prev; 26996 for(var i2 = 0; i2 < length; i2 += 1){ 26997 token = tokens[i2]; 26998 type = token[0]; 26999 if (type === "space" && i2 === length - 1 && !customProperty) clean = false; 27000 else if (type === "comment") { 27001 prev = tokens[i2 - 1] ? tokens[i2 - 1][0] : "empty"; 27002 next = tokens[i2 + 1] ? tokens[i2 + 1][0] : "empty"; 27003 if (!$a44aab89caa44953$var$SAFE_COMMENT_NEIGHBOR[prev] && !$a44aab89caa44953$var$SAFE_COMMENT_NEIGHBOR[next]) { 27004 if (value.slice(-1) === ",") clean = false; 27005 else value += token[1]; 27006 } else clean = false; 27007 } else value += token[1]; 27008 } 27009 if (!clean) { 27010 var raw = tokens.reduce(function(all, i2) { 27011 return all + i2[1]; 27012 }, ""); 27013 node2.raws[prop] = { 27014 raw: raw, 27015 value: value 27016 }; 27017 } 27018 node2[prop] = value; 27019 }; 27020 _proto.rule = function rule(tokens) { 27021 tokens.pop(); 27022 var node2 = new $a44aab89caa44953$var$Rule$2(); 27023 this.init(node2, tokens[0][2]); 27024 node2.raws.between = this.spacesAndCommentsFromEnd(tokens); 27025 this.raw(node2, "selector", tokens); 27026 this.current = node2; 27027 }; 27028 _proto.spacesAndCommentsFromEnd = function spacesAndCommentsFromEnd(tokens) { 27029 var lastTokenType; 27030 var spaces = ""; 27031 while(tokens.length){ 27032 lastTokenType = tokens[tokens.length - 1][0]; 27033 if (lastTokenType !== "space" && lastTokenType !== "comment") break; 27034 spaces = tokens.pop()[1] + spaces; 27035 } 27036 return spaces; 27037 }; 27038 // Errors 27039 _proto.spacesAndCommentsFromStart = function spacesAndCommentsFromStart(tokens) { 27040 var next; 27041 var spaces = ""; 27042 while(tokens.length){ 27043 next = tokens[0][0]; 27044 if (next !== "space" && next !== "comment") break; 27045 spaces += tokens.shift()[1]; 27046 } 27047 return spaces; 27048 }; 27049 _proto.spacesFromEnd = function spacesFromEnd(tokens) { 27050 var lastTokenType; 27051 var spaces = ""; 27052 while(tokens.length){ 27053 lastTokenType = tokens[tokens.length - 1][0]; 27054 if (lastTokenType !== "space") break;
27055 spaces = tokens.pop()[1] + spaces; 27056 } 27057 return spaces; 27058 }; 27059 _proto.stringFrom = function stringFrom(tokens, from) { 27060 var result2 = ""; 27061 for(var i2 = from; i2 < tokens.length; i2++)result2 += tokens[i2][1]; 27062 tokens.splice(from, tokens.length - from); 27063 return result2; 27064 }; 27065 _proto.unclosedBlock = function unclosedBlock() { 27066 var pos = this.current.source.start; 27067 throw this.input.error("Unclosed block", pos.line, pos.column); 27068 }; 27069 _proto.unclosedBracket = function unclosedBracket(bracket) { 27070 throw this.input.error("Unclosed bracket", { 27071 offset: bracket[2] 27072 }, { 27073 offset: bracket[2] + 1 27074 }); 27075 }; 27076 _proto.unexpectedClose = function unexpectedClose(token) { 27077 throw this.input.error("Unexpected }", { 27078 offset: token[2] 27079 }, { 27080 offset: token[2] + 1 27081 }); 27082 }; 27083 _proto.unknownWord = function unknownWord(tokens) { 27084 throw this.input.error("Unknown word", { 27085 offset: tokens[0][2] 27086 }, { 27087 offset: tokens[0][2] + tokens[0][1].length 27088 }); 27089 }; 27090 _proto.unnamedAtrule = function unnamedAtrule(node2, token) { 27091 throw this.input.error("At-rule without name", { 27092 offset: token[2] 27093 }, { 27094 offset: token[2] + token[1].length 27095 }); 27096 }; 27097 return Parser2; 27098}(); 27099var $a44aab89caa44953$var$parser = $a44aab89caa44953$var$Parser$1; 27100var $a44aab89caa44953$var$Container$2 = $a44aab89caa44953$var$container; 27101var $a44aab89caa44953$var$Parser22 = $a44aab89caa44953$var$parser; 27102var $a44aab89caa44953$var$Input$2 = $a44aab89caa44953$var$input; 27103function $a44aab89caa44953$var$parse$3(css, opts) { 27104 var input2 = new $a44aab89caa44953$var$Input$2(css, opts); 27105 var parser2 = new $a44aab89caa44953$var$Parser22(input2); 27106 try { 27107 parser2.parse(); 27108 } catch (e2) { 27109 throw e2; 27110 } 27111 return parser2.root; 27112} 27113var $a44aab89caa44953$var$parse_1 = $a44aab89caa44953$var$parse$3; 27114$a44aab89caa44953$var$parse$3.default = $a44aab89caa44953$var$parse$3; 27115$a44aab89caa44953$var$Container$2.registerParse($a44aab89caa44953$var$parse$3); 27116var $a44aab89caa44953$var$isClean = $a44aab89caa44953$var$symbols.isClean, $a44aab89caa44953$var$my = $a44aab89caa44953$var$symbols.my; 27117var $a44aab89caa44953$var$MapGenerator$1 = $a44aab89caa44953$var$mapGenerator; 27118var $a44aab89caa44953$var$stringify$2 = $a44aab89caa44953$var$stringify_1; 27119var $a44aab89caa44953$var$Container$1 = $a44aab89caa44953$var$container; 27120var $a44aab89caa44953$var$Document$2 = $a44aab89caa44953$var$document$1$2; 27121var $a44aab89caa44953$var$warnOnce$1 = $a44aab89caa44953$var$warnOnce$2; 27122var $a44aab89caa44953$var$Result$2 = $a44aab89caa44953$var$result; 27123var $a44aab89caa44953$var$parse$2 = $a44aab89caa44953$var$parse_1; 27124var $a44aab89caa44953$var$Root$3 = $a44aab89caa44953$var$root; 27125var $a44aab89caa44953$var$TYPE_TO_CLASS_NAME = { 27126 atrule: "AtRule", 27127 comment: "Comment", 27128 decl: "Declaration", 27129 document: "Document", 27130 root: "Root", 27131 rule: "Rule" 27132}; 27133var $a44aab89caa44953$var$PLUGIN_PROPS = { 27134 AtRule: true, 27135 AtRuleExit: true, 27136 Comment: true, 27137 CommentExit: true, 27138 Declaration: true, 27139 DeclarationExit: true, 27140 Document: true, 27141 DocumentExit: true, 27142 Once: true, 27143 OnceExit: true, 27144 postcssPlugin: true, 27145 prepare: true, 27146 Root: true, 27147 RootExit: true, 27148 Rule: true, 27149 RuleExit: true 27150}; 27151var $a44aab89caa44953$var$NOT_VISITORS = { 27152 Once: true, 27153 postcssPlugin: true, 27154 prepare: true 27155}; 27156var $a44aab89caa44953$var$CHILDREN = 0; 27157function $a44aab89caa44953$var$isPromise(obj) { 27158 return (typeof obj === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(obj)) === "object" && typeof obj.then === "function"; 27159} 27160function $a44aab89caa44953$var$getEvents(node2) { 27161 var key = false; 27162 var type = $a44aab89caa44953$var$TYPE_TO_CLASS_NAME[node2.type]; 27163 if (node2.type === "decl") key = node2.prop.toLowerCase(); 27164 else if (node2.type === "atrule") key = node2.name.toLowerCase(); 27165 if (key && node2.append) return [ 27166 type, 27167 type + "-" + key, 27168 $a44aab89caa44953$var$CHILDREN, 27169 type + "Exit", 27170 type + "Exit-" + key 27171 ]; 27172 else if (key) return [ 27173 type, 27174 type + "-" + key, 27175 type + "Exit", 27176 type + "Exit-" + key 27177 ]; 27178 else if (node2.append) return [ 27179 type, 27180 $a44aab89caa44953$var$CHILDREN, 27181 type + "Exit" 27182 ]; 27183 else return [ 27184 type, 27185 type + "Exit" 27186 ]; 27187} 27188function $a44aab89caa44953$var$toStack(node2) { 27189 var events; 27190 if (node2.type === "document") events = [ 27191 "Document", 27192 $a44aab89caa44953$var$CHILDREN, 27193 "DocumentExit" 27194 ]; 27195 else if (node2.type === "root") events = [ 27196 "Root", 27197 $a44aab89caa44953$var$CHILDREN, 27198 "RootExit" 27199 ]; 27200 else events = $a44aab89caa44953$var$getEvents(node2); 27201 return { 27202 eventIndex: 0, 27203 events: events, 27204 iterator: 0, 27205 node: node2, 27206 visitorIndex: 0, 27207 visitors: [] 27208 }; 27209} 27210function $a44aab89caa44953$var$cleanMarks(node2) { 27211 node2[$a44aab89caa44953$var$isClean] = false;
27212 if (node2.nodes) node2.nodes.forEach(function(i2) { 27213 return $a44aab89caa44953$var$cleanMarks(i2); 27214 }); 27215 return node2; 27216} 27217var $a44aab89caa44953$var$postcss$2 = {}; 27218var $a44aab89caa44953$var$LazyResult$2 = /*#__PURE__*/ function() { 27219 function LazyResult2(processor2, css, opts) { 27220 var _this = this; 27221 this.stringified = false; 27222 this.processed = false; 27223 var root2; 27224 if ((typeof css === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(css)) === "object" && css !== null && (css.type === "root" || css.type === "document")) root2 = $a44aab89caa44953$var$cleanMarks(css); 27225 else if ($a44aab89caa44953$var$_instanceof(css, LazyResult2) || $a44aab89caa44953$var$_instanceof(css, $a44aab89caa44953$var$Result$2)) { 27226 root2 = $a44aab89caa44953$var$cleanMarks(css.root); 27227 if (css.map) { 27228 if (typeof opts.map === "undefined") opts.map = {}; 27229 if (!opts.map.inline) opts.map.inline = false; 27230 opts.map.prev = css.map; 27231 } 27232 } else { 27233 var parser2 = $a44aab89caa44953$var$parse$2; 27234 if (opts.syntax) parser2 = opts.syntax.parse; 27235 if (opts.parser) parser2 = opts.parser; 27236 if (parser2.parse) parser2 = parser2.parse; 27237 try { 27238 root2 = parser2(css, opts); 27239 } catch (error) { 27240 this.processed = true; 27241 this.error = error; 27242 } 27243 if (root2 && !root2[$a44aab89caa44953$var$my]) $a44aab89caa44953$var$Container$1.rebuild(root2); 27244 } 27245 this.result = new $a44aab89caa44953$var$Result$2(processor2, root2, opts); 27246 this.helpers = $a44aab89caa44953$var$_extends({}, $a44aab89caa44953$var$postcss$2, { 27247 postcss: $a44aab89caa44953$var$postcss$2, 27248 result: this.result 27249 }); 27250 this.plugins = this.processor.plugins.map(function(plugin22) { 27251 if ((typeof plugin22 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(plugin22)) === "object" && plugin22.prepare) return $a44aab89caa44953$var$_extends({}, plugin22, plugin22.prepare(_this.result)); 27252 else return plugin22; 27253 }); 27254 } 27255 var _proto = LazyResult2.prototype; 27256 _proto.async = function async() { 27257 if (this.error) return Promise.reject(this.error); 27258 if (this.processed) return Promise.resolve(this.result); 27259 if (!this.processing) this.processing = this.runAsync(); 27260 return this.processing; 27261 }; 27262 _proto.catch = function _catch(onRejected) { 27263 return this.async().catch(onRejected); 27264 }; 27265 _proto.finally = function _finally(onFinally) { 27266 return this.async().then(onFinally, onFinally); 27267 }; 27268 _proto.getAsyncError = function getAsyncError() { 27269 throw new Error("Use process(css).then(cb) to work with async plugins"); 27270 }; 27271 _proto.handleError = function handleError(error, node2) { 27272 var plugin22 = this.result.lastPlugin; 27273 try { 27274 if (node2) node2.addToError(error); 27275 this.error = error; 27276 if (error.name === "CssSyntaxError" && !error.plugin) { 27277 error.plugin = plugin22.postcssPlugin; 27278 error.setMessage(); 27279 } else if (plugin22.postcssVersion) var pluginName, pluginVer, runtimeVer, a2, b; 27280 } catch (err) { 27281 if (console && console.error) console.error(err); 27282 } 27283 return error; 27284 }; 27285 _proto.prepareVisitors = function prepareVisitors() { 27286 var _this = this; 27287 this.listeners = {}; 27288 var add = function(plugin22, type, cb) { 27289 if (!_this.listeners[type]) _this.listeners[type] = []; 27290 _this.listeners[type].push([ 27291 plugin22, 27292 cb 27293 ]); 27294 }; 27295 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.plugins), _step; !(_step = _iterator()).done;){ 27296 var plugin22 = _step.value; 27297 if ((typeof plugin22 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(plugin22)) === "object") for(var event in plugin22){ 27298 if (!$a44aab89caa44953$var$PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) throw new Error("Unknown event " + event + " in " + plugin22.postcssPlugin + ". Try to update PostCSS (" + this.processor.ver
vendor: 19,120 bytes, lines 27298-27756
27298sion + " now)."); 27299 if (!$a44aab89caa44953$var$NOT_VISITORS[event]) { 27300 if ($a44aab89caa44953$var$_type_of(plugin22[event]) === "object") { 27301 for(var filter in plugin22[event])if (filter === "*") add(plugin22, event, plugin22[event][filter]); 27302 else add(plugin22, event + "-" + filter.toLowerCase(), plugin22[event][filter]); 27303 } else if (typeof plugin22[event] === "function") add(plugin22, event, plugin22[event]); 27304 } 27305 } 27306 } 27307 this.hasListener = Object.keys(this.listeners).length > 0; 27308 }; 27309 _proto.runAsync = function runAsync() { 27310 var _this = this; 27311 return $a44aab89caa44953$var$_async_to_generator(function() { 27312 var i2, plugin22, promise, error, root2, stack, promise1, e2, node2, _loop, _iterator, _step; 27313 return $a44aab89caa44953$var$_ts_generator(this, function(_state) { 27314 switch(_state.label){ 27315 case 0: 27316 _this.plugin = 0; 27317 i2 = 0; 27318 _state.label = 1; 27319 case 1: 27320 if (!(i2 < _this.plugins.length)) return [ 27321 3, 27322 6 27323 ]; 27324 plugin22 = _this.plugins[i2]; 27325 promise = _this.runOnRoot(plugin22); 27326 if (!$a44aab89caa44953$var$isPromise(promise)) return [ 27327 3, 27328 5 27329 ]; 27330 _state.label = 2; 27331 case 2: 27332 _state.trys.push([ 27333 2, 27334 4, 27335 , 27336 5 27337 ]); 27338 return [ 27339 4, 27340 promise 27341 ]; 27342 case 3: 27343 _state.sent(); 27344 return [ 27345 3, 27346 5 27347 ]; 27348 case 4: 27349 error = _state.sent(); 27350 throw _this.handleError(error); 27351 case 5: 27352 i2++; 27353 return [ 27354 3, 27355 1 27356 ]; 27357 case 6: 27358 _this.prepareVisitors(); 27359 if (!_this.hasListener) return [ 27360 3, 27361 18 27362 ]; 27363 root2 = _this.result.root; 27364 _state.label = 7; 27365 case 7: 27366 if (!!root2[$a44aab89caa44953$var$isClean]) return [ 27367 3, 27368 14 27369 ]; 27370 root2[$a44aab89caa44953$var$isClean] = true; 27371 stack = [ 27372 $a44aab89caa44953$var$toStack(root2) 27373 ]; 27374 _state.label = 8; 27375 case 8: 27376 if (!(stack.length > 0)) return [ 27377 3, 27378 13 27379 ]; 27380 promise1 = _this.visitTick(stack); 27381 if (!$a44aab89caa44953$var$isPromise(promise1)) return [ 27382 3, 27383 12 27384 ]; 27385 _state.label = 9; 27386 case 9: 27387 _state.trys.push([ 27388 9, 27389 11, 27390 , 27391 12 27392 ]); 27393 return [ 27394 4, 27395 promise1 27396 ]; 27397 case 10: 27398 _state.sent(); 27399 return [ 27400 3, 27401 12 27402 ]; 27403 case 11: 27404 e2 = _state.sent(); 27405 node2 = stack[stack.length - 1].node; 27406 throw _this.handleError(e2, node2); 27407 case 12: 27408 return [ 27409 3, 27410 8 27411 ]; 27412 case 13: 27413 return [ 27414 3, 27415 7 27416 ]; 27417 case 14: 27418 if (!_this.listeners.OnceExit) return [ 27419 3, 27420 18 27421 ]; 27422 _loop = function() { 27423 var _step_value, plugin22, visitor, roots, e2; 27424 return $a44aab89caa44953$var$_ts_generator(this, function(_state) { 27425 switch(_state.label){ 27426 case 0: 27427 _step_value = _step.value, plugin22 = _step_value[0], visitor = _step_value[1]; 27428 _this.result.lastPlugin = plugin22; 27429 _state.label = 1; 27430 case 1: 27431 _state.trys.push([ 27432 1, 27433 6, 27434 , 27435 7 27436 ]); 27437 if (!(root2.type === "document")) return [ 27438 3, 27439 3 27440 ]; 27441 roots = root2.nodes.map(function(subRoot) { 27442 return visitor(subRoot, _this.helpers); 27443 }); 27444 return [ 27445 4, 27446 Promise.all(roots) 27447 ]; 27448 case 2: 27449 _state.sent(); 27450 return [ 27451 3, 27452 5 27453 ]; 27454 case 3: 27455 return [ 27456 4, 27457 visitor(root2, _this.helpers) 27458 ]; 27459 case 4: 27460 _state.sent(); 27461 _state.label = 5; 27462 case 5: 27463 return [ 27464 3, 27465 7 27466 ]; 27467 case 6: 27468 e2 = _state.sent(); 27469 throw _this.handleError(e2); 27470 case 7: 27471 return [ 27472 2 27473 ]; 27474 } 27475 }); 27476 }; 27477 _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(_this.listeners.OnceExit); 27478 _state.label = 15; 27479 case 15: 27480 if (!!(_step = _iterator()).done) return [ 27481 3, 27482 18 27483 ]; 27484 return [ 27485 5, 27486 $a44aab89caa44953$var$_ts_values(_loop()) 27487 ]; 27488 case 16: 27489 _state.sent(); 27490 _state.label = 17; 27491 case 17: 27492 return [ 27493 3, 27494 15 27495 ]; 27496 case 18: 27497 _this.processed = true; 27498 return [ 27499 2, 27500 _this.stringify() 27501 ]; 27502 } 27503 }); 27504 })(); 27505 }; 27506 _proto.runOnRoot = function runOnRoot(plugin22) { 27507 var _this = this; 27508 this.result.lastPlugin = plugin22; 27509 try { 27510 if ((typeof plugin22 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(plugin22)) === "object" && plugin22.Once) { 27511 if (this.result.root.type === "document") { 27512 var roots = this.result.root.nodes.map(function(root2) { 27513 return plugin22.Once(root2, _this.helpers); 27514 }); 27515 if ($a44aab89caa44953$var$isPromise(roots[0])) return Promise.all(roots); 27516 return roots; 27517 } 27518 return plugin22.Once(this.result.root, this.helpers); 27519 } else if (typeof plugin22 === "function") return plugin22(this.result.root, this.result); 27520 } catch (error) { 27521 throw this.handleError(error); 27522 } 27523 }; 27524 _proto.stringify = function stringify() { 27525 if (this.error) throw this.error; 27526 if (this.stringified) return this.result; 27527 this.stringified = true; 27528 this.sync(); 27529 var opts = this.result.opts; 27530 var str = $a44aab89caa44953$var$stringify$2; 27531 if (opts.syntax) str = opts.syntax.stringify; 27532 if (opts.stringifier) str = opts.stringifier; 27533 if (str.stringify) str = str.stringify; 27534 var map = new $a44aab89caa44953$var$MapGenerator$1(str, this.result.root, this.result.opts); 27535 var data = map.generate(); 27536 this.result.css = data[0]; 27537 this.result.map = data[1]; 27538 return this.result; 27539 }; 27540 _proto.sync = function sync() { 27541 if (this.error) throw this.error; 27542 if (this.processed) return this.result; 27543 this.processed = true; 27544 if (this.processing) throw this.getAsyncError(); 27545 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(this.plugins), _step; !(_step = _iterator()).done;){ 27546 var plugin22 = _step.value; 27547 var promise = this.runOnRoot(plugin22); 27548 if ($a44aab89caa44953$var$isPromise(promise)) throw this.getAsyncError(); 27549 } 27550 this.prepareVisitors(); 27551 if (this.hasListener) { 27552 var root2 = this.result.root; 27553 while(!root2[$a44aab89caa44953$var$isClean]){ 27554 root2[$a44aab89caa44953$var$isClean] = true; 27555 this.walkSync(root2); 27556 } 27557 if (this.listeners.OnceExit) { 27558 if (root2.type === "document") for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(root2.nodes), _step1; !(_step1 = _iterator1()).done;){ 27559 var subRoot = _step1.value; 27560 this.visitSync(this.listeners.OnceExit, subRoot); 27561 } 27562 else this.visitSync(this.listeners.OnceExit, root2); 27563 } 27564 } 27565 return this.result; 27566 }; 27567 _proto.then = function then(onFulfilled, onRejected) { 27568 return this.async().then(onFulfilled, onRejected); 27569 }; 27570 _proto.toString = function toString() { 27571 return this.css; 27572 }; 27573 _proto.visitSync = function visitSync(visitors, node2) { 27574 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(visitors), _step; !(_step = _iterator()).done;){ 27575 var _step_value = _step.value, plugin22 = _step_value[0], visitor = _step_value[1]; 27576 this.result.lastPlugin = plugin22; 27577 var promise = void 0; 27578 try { 27579 promise = visitor(node2, this.helpers); 27580 } catch (e2) { 27581 throw this.handleError(e2, node2.proxyOf); 27582 } 27583 if (node2.type !== "root" && node2.type !== "document" && !node2.parent) return true; 27584 if ($a44aab89caa44953$var$isPromise(promise)) throw this.getAsyncError(); 27585 } 27586 }; 27587 _proto.visitTick = function visitTick(stack) { 27588 var visit2 = stack[stack.length - 1]; 27589 var node2 = visit2.node, visitors = visit2.visitors; 27590 if (node2.type !== "root" && node2.type !== "document" && !node2.parent) { 27591 stack.pop(); 27592 return; 27593 } 27594 if (visitors.length > 0 && visit2.visitorIndex < visitors.length) { 27595 var _visitors_visit2_visitorIndex = visitors[visit2.visitorIndex], plugin22 = _visitors_visit2_visitorIndex[0], visitor = _visitors_visit2_visitorIndex[1]; 27596 visit2.visitorIndex += 1; 27597 if (visit2.visitorIndex === visitors.length) { 27598 visit2.visitors = []; 27599 visit2.visitorIndex = 0; 27600 } 27601 this.result.lastPlugin = plugin22; 27602 try { 27603 return visitor(node2.toProxy(), this.helpers); 27604 } catch (e2) { 27605 throw this.handleError(e2, node2); 27606 } 27607 } 27608 if (visit2.iterator !== 0) { 27609 var iterator = visit2.iterator; 27610 var child; 27611 while(child = node2.nodes[node2.indexes[iterator]]){ 27612 node2.indexes[iterator] += 1; 27613 if (!child[$a44aab89caa44953$var$isClean]) { 27614 child[$a44aab89caa44953$var$isClean] = true; 27615 stack.push($a44aab89caa44953$var$toStack(child)); 27616 return; 27617 } 27618 } 27619 visit2.iterator = 0; 27620 delete node2.indexes[iterator]; 27621 } 27622 var events = visit2.events; 27623 while(visit2.eventIndex < events.length){ 27624 var event = events[visit2.eventIndex]; 27625 visit2.eventIndex += 1; 27626 if (event === $a44aab89caa44953$var$CHILDREN) { 27627 if (node2.nodes && node2.nodes.length) { 27628 node2[$a44aab89caa44953$var$isClean] = true; 27629 visit2.iterator = node2.getIterator(); 27630 } 27631 return; 27632 } else if (this.listeners[event]) { 27633 visit2.visitors = this.listeners[event]; 27634 return; 27635 } 27636 } 27637 stack.pop(); 27638 }; 27639 _proto.walkSync = function walkSync(node2) { 27640 var _this = this; 27641 node2[$a44aab89caa44953$var$isClean] = true; 27642 var events = $a44aab89caa44953$var$getEvents(node2); 27643 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(events), _step; !(_step = _iterator()).done;){ 27644 var event = _step.value; 27645 if (event === $a44aab89caa44953$var$CHILDREN) { 27646 if (node2.nodes) node2.each(function(child) { 27647 if (!child[$a44aab89caa44953$var$isClean]) _this.walkSync(child); 27648 }); 27649 } else { 27650 var visitors = this.listeners[event]; 27651 if (visitors) { 27652 if (this.visitSync(visitors, node2.toProxy())) return; 27653 } 27654 } 27655 } 27656 }; 27657 _proto.warnings = function warnings() { 27658 return this.sync().warnings(); 27659 }; 27660 $a44aab89caa44953$var$_create_class(LazyResult2, [ 27661 { 27662 key: "content", 27663 get: function get() { 27664 return this.stringify().content; 27665 } 27666 }, 27667 { 27668 key: "css", 27669 get: function get() { 27670 return this.stringify().css; 27671 } 27672 }, 27673 { 27674 key: "map", 27675 get: function get() { 27676 return this.stringify().map; 27677 } 27678 }, 27679 { 27680 key: "messages", 27681 get: function get() { 27682 return this.sync().messages; 27683 } 27684 }, 27685 { 27686 key: "opts", 27687 get: function get() { 27688 return this.result.opts; 27689 } 27690 }, 27691 { 27692 key: "processor", 27693 get: function get() { 27694 return this.result.processor; 27695 } 27696 }, 27697 { 27698 key: "root", 27699 get: function get() { 27700 return this.sync().root; 27701 } 27702 }, 27703 { 27704 key: Symbol.toStringTag, 27705 get: function get() { 27706 return "LazyResult"; 27707 } 27708 } 27709 ]); 27710 return LazyResult2; 27711}(); 27712$a44aab89caa44953$var$LazyResult$2.registerPostcss = function(dependant) { 27713 $a44aab89caa44953$var$postcss$2 = dependant; 27714}; 27715var $a44aab89caa44953$var$lazyResult = $a44aab89caa44953$var$LazyResult$2; 27716$a44aab89caa44953$var$LazyResult$2.default = $a44aab89caa44953$var$LazyResult$2; 27717$a44aab89caa44953$var$Root$3.registerLazyResult($a44aab89caa44953$var$LazyResult$2); 27718$a44aab89caa44953$var$Document$2.registerLazyResult($a44aab89caa44953$var$LazyResult$2); 27719var $a44aab89caa44953$var$MapGenerator22 = $a44aab89caa44953$var$mapGenerator; 27720var $a44aab89caa44953$var$stringify$1 = $a44aab89caa44953$var$stringify_1; 27721var $a44aab89caa44953$var$warnOnce22 = $a44aab89caa44953$var$warnOnce$2; 27722var $a44aab89caa44953$var$parse$1 = $a44aab89caa44953$var$parse_1; 27723var $a44aab89caa44953$var$Result$1 = $a44aab89caa44953$var$result; 27724var $a44aab89caa44953$var$NoWorkResult$1 = /*#__PURE__*/ function() { 27725 function NoWorkResult2(processor2, css, opts) { 27726 css = css.toString(); 27727 this.stringified = false; 27728 this._processor = processor2; 27729 this._css = css; 27730 this._opts = opts; 27731 this._map = void 0; 27732 var root2; 27733 var str = $a44aab89caa44953$var$stringify$1; 27734 this.result = new $a44aab89caa44953$var$Result$1(this._processor, root2, this._opts); 27735 this.result.css = css; 27736 var self = this; 27737 Object.defineProperty(this.result, "root", { 27738 get: function get() { 27739 return self.root; 27740 } 27741 }); 27742 var map = new $a44aab89caa44953$var$MapGenerator22(str, root2, this._opts, css); 27743 if (map.isMap()) { 27744 var _map_generate = map.generate(), generatedCSS = _map_generate[0], generatedMap = _map_generate[1]; 27745 if (generatedCSS) this.result.css = generatedCSS; 27746 if (generatedMap) this.result.map = generatedMap; 27747 } else { 27748 map.clearAnnotation(); 27749 this.result.css = map.css; 27750 } 27751 } 27752 var _proto = NoWorkResult2.prototype; 27753 _proto.async = function async() { 27754 if (this.error) return Promise.reject(this.error); 27755 return Promise.resolve(this.result); 27756 };
27757 _proto.catch = function _catch(onRejected) { 27758 return this.async().catch(onRejected); 27759 }; 27760 _proto.finally = function _finally(onFinally) { 27761 return this.async().then(onFinally, onFinally); 27762 }; 27763 _proto.sync = function sync() { 27764 if (this.error) throw this.error; 27765 return this.result; 27766 }; 27767 _proto.then = function then(onFulfilled, onRejected) { 27768 return this.async().then(onFulfilled, onRejected); 27769 }; 27770 _proto.toString = function toString() { 27771 return this._css; 27772 }; 27773 _proto.warnings = function warnings() { 27774 return []; 27775 }; 27776 $a44aab89caa44953$var$_create_class(NoWorkResult2, [ 27777 { 27778 key: "content", 27779 get: function get() { 27780 return this.result.css; 27781 } 27782 }, 27783 { 27784 key: "css", 27785 get: function get() { 27786 return this.result.css; 27787 } 27788 }, 27789 { 27790 key: "map", 27791 get: function get() { 27792 return this.result.map; 27793 } 27794 }, 27795 { 27796 key: "messages", 27797 get: function get() { 27798 return []; 27799 } 27800 }, 27801 { 27802 key: "opts", 27803 get: function get() { 27804 return this.result.opts; 27805 } 27806 }, 27807 { 27808 key: "processor", 27809 get: function get() { 27810 return this.result.processor; 27811 } 27812 }, 27813 { 27814 key: "root", 27815 get: function get() { 27816 if (this._root) return this._root; 27817 var root2; 27818 var parser2 = $a44aab89caa44953$var$parse$1; 27819 try { 27820 root2 = parser2(this._css, this._opts); 27821 } catch (error) { 27822 this.error = error; 27823 } 27824 if (this.error) throw this.error; 27825 else { 27826 this._root = root2; 27827 return root2; 27828 } 27829 } 27830 }, 27831 { 27832 key: Symbol.toStringTag, 27833 get: function get() { 27834 return "NoWorkResult"; 27835 } 27836 } 27837 ]); 27838 return NoWorkResult2; 27839}(); 27840var $a44aab89caa44953$var$noWorkResult = $a44aab89caa44953$var$NoWorkResult$1; 27841$a44aab89caa44953$var$NoWorkResult$1.default = $a44aab89caa44953$var$NoWorkResult$1; 27842var $a44aab89caa44953$var$NoWorkResult22 = $a44aab89caa44953$var$noWorkResult; 27843var $a44aab89caa44953$var$LazyResult$1 = $a44aab89caa44953$var$lazyResult; 27844var $a44aab89caa44953$var$Document$1 = $a44aab89caa44953$var$document$1$2; 27845var $a44aab89caa44953$var$Root$2 = $a44aab89caa44953$var$root; 27846var $a44aab89caa44953$var$Processor$1 = /*#__PURE__*/ function() { 27847 function Processor2(plugins) { 27848 if (plugins === void 0) plugins = []; 27849 this.version = "8.4.38"; 27850 this.plugins = this.normalize(plugins); 27851 } 27852 var _proto = Processor2.prototype; 27853 _proto.normalize = function normalize(plugins) { 27854 var normalized = []; 27855 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(plugins), _step; !(_step = _iterator()).done;){ 27856 var i2 = _step.value; 27857 if (i2.postcss === true) i2 = i2(); 27858 else if (i2.postcss) i2 = i2.postcss; 27859 if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && Array.isArray(i2.plugins)) normalized = normalized.concat(i2.plugins); 27860 else if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && i2.postcssPlugin) normalized.push(i2); 27861 else if (typeof i2 === "function") normalized.push(i2); 27862 else if ((typeof i2 === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(i2)) === "object" && (i2.parse || i2.stringify)) ; 27863 else throw new Error(i2 + " is not a PostCSS plugin"); 27864 } 27865 return normalized; 27866 }; 27867 _proto.process = function process1(css, opts) { 27868 if (opts === void 0) opts = {}; 27869 if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) return new $a44aab89caa44953$var$NoWorkResult22(this, css, opts); 27870 else return new $a44aab89caa44953$var$LazyResult$1(this, css, opts); 27871 }; 27872 _proto.use = function use(plugin22) { 27873 this.plugins = this.plugins.concat(this.normalize([ 27874 plugin22 27875 ])); 27876 return this; 27877 }; 27878 return Processor2; 27879}(); 27880var $a44aab89caa44953$var$processor = $a44aab89caa44953$var$Processor$1; 27881$a44aab89caa44953$var$Processor$1.default = $a44aab89caa44953$var$Processor$1; 27882$a44aab89caa44953$var$Root$2.registerProcessor($a44aab89caa44953$var$Processor$1); 27883$a44aab89caa44953$var$Document$1.registerProcessor($a44aab89caa44953$var$Processor$1); 27884var $a44aab89caa44953$var$Declaration$1 = $a44aab89caa44953$var$declaration; 27885var $a44aab89caa44953$var$PreviousMap22 = $a44aab89caa44953$var$previousMap; 27886var $a44aab89caa44953$var$Comment$1 = $a44aab89caa44953$var$comment; 27887var $a44aab89caa44953$var$AtRule$1 = $a44aab89caa44953$var$atRule; 27888var $a44aab89caa44953$var$Input$1 = $a44aab89caa44953$var$input; 27889var $a44aab89caa44953$var$Root$1 = $a44aab89caa44953$var$root; 27890var $a44aab89caa44953$var$Rule$1 = $a44aab89caa44953$var$rule; 27891function $a44aab89caa44953$var$fromJSON$1(json, inputs) { 27892 if (Array.isArray(json)) return json.map(function(n2) { 27893 return $a44aab89caa44953$var$fromJSON$1(n2); 27894 }); 27895 var ownInputs = json.inputs, defaults = $a44aab89caa44953$var$_object_without_properties_loose(json, [ 27896 "inputs" 27897 ]); 27898 if (ownInputs) { 27899 inputs = []; 27900 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(ownInputs), _step; !(_step = _iterator()).done;){ 27901 var input2 = _step.value; 27902 var inputHydrated = $a44aab89caa44953$var$_extends({}, input2, { 27903 __proto__: $a44aab89caa44953$var$Input$1.prototype 27904 }); 27905 if (inputHydrated.map) inputHydrated.map = $a44aab89caa44953$var$_extends({}, inputHydrated.map, { 27906 __proto__: $a44aab89caa44953$var$PreviousMap22.prototype 27907 }); 27908 inputs.push(inputHydrated); 27909 } 27910 } 27911 if (defaults.nodes) defaults.nodes = json.nodes.map(function(n2) { 27912 return $a44aab89caa44953$var$fromJSON$1(n2, inputs); 27913 }); 27914 if (defaults.source) { 27915 var _defaults_source = defaults.source, inputId = _defaults_source.inputId, source = $a44aab89caa44953$var$_object_without_properties_loose(_defaults_source, [ 27916 "inputId" 27917 ]); 27918 defaults.source = source; 27919 if (inputId != null) defaults.source.input = inputs[inputId]; 27920 } 27921 if (defaults.type === "root") return new $a44aab89caa44953$var$Root$1(defaults); 27922 else if (defaults.type === "decl") return new $a44aab89caa44953$var$Declaration$1(defaults); 27923 else if (defaults.type === "rule") return new $a44aab89caa44953$var$Rule$1(defaults); 27924 else if (defaults.type === "comment") return new $a44aab89caa44953$var$Comment$1(defaults); 27925 else if (defaults.type === "atrule") return new $a44aab89caa44953$var$AtRule$1(defaults); 27926 else throw new Error("Unknown node type: " + json.type); 27927} 27928var $a44aab89caa44953$var$fromJSON_1 = $a44aab89caa44953$var$fromJSON$1; 27929$a44aab89caa44953$var$fromJSON$1.default = $a44aab89caa44953$var$fromJSON$1; 27930var $a44aab89caa44953$var$CssSyntaxError22 = $a44aab89caa44953$var$cssSyntaxError; 27931var $a44aab89caa44953$var$Declaration22 = $a44aab89caa44953$var$declaration; 27932var $a44aab89caa44953$var$LazyResult22 = $a44aab89caa44953$var$lazyResult; 27933var $a44aab89caa44953$var$Container22 = $a44aab89caa44953$var$container; 27934var $a44aab89caa44953$var$Processor22 = $a44aab89caa44953$var$processor; 27935var $a44aab89caa44953$var$stringify = $a44aab89caa44953$var$stringify_1; 27936var $a44aab89caa44953$var$fromJSON = $a44aab89caa44953$var$fromJSON_1; 27937var $a44aab89caa44953$var$Document222 = $a44aab89caa44953$var$document$1$2; 27938var $a44aab89caa44953$var$Warning22 = $a44aab89caa44953$var$warning; 27939var $a44aab89caa44953$var$Comment22 = $a44aab89caa44953$var$comment; 27940var $a44aab89caa44953$var$AtRule22 = $a44aab89caa44953$var$atRule; 27941var $a44aab89caa44953$var$Result22 = $a44aab89caa44953$var$result; 27942var $a44aab89caa44953$var$Input22 = $a44aab89caa44953$var$input; 27943var $a44aab89caa44953$var$parse = $a44aab89caa44953$var$parse_1; 27944var $a44aab89caa44953$var$list = $a44aab89caa44953$var$list_1; 27945var $a44aab89caa44953$var$Rule22 = $a44aab89caa44953$var$rule; 27946var $a44aab89caa44953$var$Root22 = $a44aab89caa44953$var$root; 27947var $a44aab89caa44953$var$Node22 = $a44aab89caa44953$var$node; 27948function $a44aab89caa44953$var$postcss() { 27949 for(var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++)plugins[_key] = arguments[_key]; 27950 if (plugins.length === 1 && Array.isArray(plugins[0])) plugins = plugins[0]; 27951 return new $a44aab89caa44953$var$Processor22(plugins); 27952} 27953$a44aab89caa44953$var$postcss.plugin = function plugin2(name, initializer) { 27954 var warningPrinted = false;
vendor: 15,441 bytes, lines 27955-28291
27955 function creator() { 27956 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 27957 if (console && console.warn && !warningPrinted) { 27958 warningPrinted = true; 27959 console.warn(name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"); 27960 } 27961 var transformer = initializer.apply(void 0, [].concat(args)); 27962 transformer.postcssPlugin = name; 27963 transformer.postcssVersion = new $a44aab89caa44953$var$Processor22().version; 27964 return transformer; 27965 } 27966 var cache; 27967 Object.defineProperty(creator, "postcss", { 27968 get: function get() { 27969 if (!cache) cache = creator(); 27970 return cache; 27971 } 27972 }); 27973 creator.process = function(css, processOpts, pluginOpts) { 27974 return $a44aab89caa44953$var$postcss([ 27975 creator(pluginOpts) 27976 ]).process(css, processOpts); 27977 }; 27978 return creator; 27979}; 27980$a44aab89caa44953$var$postcss.stringify = $a44aab89caa44953$var$stringify; 27981$a44aab89caa44953$var$postcss.parse = $a44aab89caa44953$var$parse; 27982$a44aab89caa44953$var$postcss.fromJSON = $a44aab89caa44953$var$fromJSON; 27983$a44aab89caa44953$var$postcss.list = $a44aab89caa44953$var$list; 27984$a44aab89caa44953$var$postcss.comment = function(defaults) { 27985 return new $a44aab89caa44953$var$Comment22(defaults); 27986}; 27987$a44aab89caa44953$var$postcss.atRule = function(defaults) { 27988 return new $a44aab89caa44953$var$AtRule22(defaults); 27989}; 27990$a44aab89caa44953$var$postcss.decl = function(defaults) { 27991 return new $a44aab89caa44953$var$Declaration22(defaults); 27992}; 27993$a44aab89caa44953$var$postcss.rule = function(defaults) { 27994 return new $a44aab89caa44953$var$Rule22(defaults); 27995}; 27996$a44aab89caa44953$var$postcss.root = function(defaults) { 27997 return new $a44aab89caa44953$var$Root22(defaults); 27998}; 27999$a44aab89caa44953$var$postcss.document = function(defaults) { 28000 return new $a44aab89caa44953$var$Document222(defaults); 28001}; 28002$a44aab89caa44953$var$postcss.CssSyntaxError = $a44aab89caa44953$var$CssSyntaxError22; 28003$a44aab89caa44953$var$postcss.Declaration = $a44aab89caa44953$var$Declaration22; 28004$a44aab89caa44953$var$postcss.Container = $a44aab89caa44953$var$Container22; 28005$a44aab89caa44953$var$postcss.Processor = $a44aab89caa44953$var$Processor22; 28006$a44aab89caa44953$var$postcss.Document = $a44aab89caa44953$var$Document222; 28007$a44aab89caa44953$var$postcss.Comment = $a44aab89caa44953$var$Comment22; 28008$a44aab89caa44953$var$postcss.Warning = $a44aab89caa44953$var$Warning22; 28009$a44aab89caa44953$var$postcss.AtRule = $a44aab89caa44953$var$AtRule22; 28010$a44aab89caa44953$var$postcss.Result = $a44aab89caa44953$var$Result22; 28011$a44aab89caa44953$var$postcss.Input = $a44aab89caa44953$var$Input22; 28012$a44aab89caa44953$var$postcss.Rule = $a44aab89caa44953$var$Rule22; 28013$a44aab89caa44953$var$postcss.Root = $a44aab89caa44953$var$Root22; 28014$a44aab89caa44953$var$postcss.Node = $a44aab89caa44953$var$Node22; 28015$a44aab89caa44953$var$LazyResult22.registerPostcss($a44aab89caa44953$var$postcss); 28016var $a44aab89caa44953$var$postcss_1 = $a44aab89caa44953$var$postcss; 28017$a44aab89caa44953$var$postcss.default = $a44aab89caa44953$var$postcss; 28018var $a44aab89caa44953$var$postcss$1 = /* @__PURE__ */ $a44aab89caa44953$var$getDefaultExportFromCjs($a44aab89caa44953$var$postcss_1); 28019$a44aab89caa44953$var$postcss$1.stringify; 28020$a44aab89caa44953$var$postcss$1.fromJSON; 28021$a44aab89caa44953$var$postcss$1.plugin; 28022$a44aab89caa44953$var$postcss$1.parse; 28023$a44aab89caa44953$var$postcss$1.list; 28024$a44aab89caa44953$var$postcss$1.document; 28025$a44aab89caa44953$var$postcss$1.comment; 28026$a44aab89caa44953$var$postcss$1.atRule; 28027$a44aab89caa44953$var$postcss$1.rule; 28028$a44aab89caa44953$var$postcss$1.decl; 28029$a44aab89caa44953$var$postcss$1.root; 28030$a44aab89caa44953$var$postcss$1.CssSyntaxError; 28031$a44aab89caa44953$var$postcss$1.Declaration; 28032$a44aab89caa44953$var$postcss$1.Container; 28033$a44aab89caa44953$var$postcss$1.Processor; 28034$a44aab89caa44953$var$postcss$1.Document; 28035$a44aab89caa44953$var$postcss$1.Comment; 28036$a44aab89caa44953$var$postcss$1.Warning; 28037$a44aab89caa44953$var$postcss$1.AtRule; 28038$a44aab89caa44953$var$postcss$1.Result; 28039$a44aab89caa44953$var$postcss$1.Input; 28040$a44aab89caa44953$var$postcss$1.Rule; 28041$a44aab89caa44953$var$postcss$1.Root; 28042$a44aab89caa44953$var$postcss$1.Node; 28043var $a44aab89caa44953$var$BaseRRNode = /*#__PURE__*/ function() { 28044 function BaseRRNode() { 28045 for(var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++)_args[_key] = arguments[_key]; 28046 $a44aab89caa44953$var$__publicField2(this, "parentElement", null); 28047 $a44aab89caa44953$var$__publicField2(this, "parentNode", null); 28048 $a44aab89caa44953$var$__publicField2(this, "ownerDocument"); 28049 $a44aab89caa44953$var$__publicField2(this, "firstChild", null); 28050 $a44aab89caa44953$var$__publicField2(this, "lastChild", null); 28051 $a44aab89caa44953$var$__publicField2(this, "previousSibling", null); 28052 $a44aab89caa44953$var$__publicField2(this, "nextSibling", null); 28053 $a44aab89caa44953$var$__publicField2(this, "ELEMENT_NODE", 1); 28054 $a44aab89caa44953$var$__publicField2(this, "TEXT_NODE", 3); 28055 $a44aab89caa44953$var$__publicField2(this, "nodeType"); 28056 $a44aab89caa44953$var$__publicField2(this, "nodeName"); 28057 $a44aab89caa44953$var$__publicField2(this, "RRNodeType"); 28058 } 28059 var _proto = BaseRRNode.prototype; 28060 _proto.contains = function contains(node2) { 28061 if (!$a44aab89caa44953$var$_instanceof(node2, BaseRRNode)) return false; 28062 else if (node2.ownerDocument !== this.ownerDocument) return false; 28063 else if (node2 === this) return true; 28064 while(node2.parentNode){ 28065 if (node2.parentNode === this) return true; 28066 node2 = node2.parentNode; 28067 } 28068 return false; 28069 }; 28070 // eslint-disable-next-line @typescript-eslint/no-unused-vars 28071 _proto.appendChild = function appendChild(_newChild) { 28072 throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method."); 28073 }; 28074 // eslint-disable-next-line @typescript-eslint/no-unused-vars 28075 _proto.insertBefore = function insertBefore(_newChild, _refChild) { 28076 throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method."); 28077 }; 28078 // eslint-disable-next-line @typescript-eslint/no-unused-vars 28079 _proto.removeChild = function removeChild(_node) { 28080 throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method."); 28081 }; 28082 _proto.toString = function toString() { 28083 return "RRNode"; 28084 }; 28085 $a44aab89caa44953$var$_create_class(BaseRRNode, [ 28086 { 28087 key: "childNodes", 28088 get: function get() { 28089 var childNodes2 = []; 28090 var childIterator = this.firstChild; 28091 while(childIterator){ 28092 childNodes2.push(childIterator); 28093 childIterator = childIterator.nextSibling; 28094 } 28095 return childNodes2; 28096 } 28097 } 28098 ]); 28099 return BaseRRNode; 28100}(); 28101var $a44aab89caa44953$var$testableAccessors = { 28102 Node: [ 28103 "childNodes", 28104 "parentNode", 28105 "parentElement", 28106 "textContent" 28107 ], 28108 ShadowRoot: [ 28109 "host", 28110 "styleSheets" 28111 ], 28112 Element: [ 28113 "shadowRoot", 28114 "querySelector", 28115 "querySelectorAll" 28116 ], 28117 MutationObserver: [] 28118}; 28119var $a44aab89caa44953$var$testableMethods = { 28120 Node: [ 28121 "contains", 28122 "getRootNode" 28123 ], 28124 ShadowRoot: [ 28125 "getSelection" 28126 ], 28127 Element: [], 28128 MutationObserver: [ 28129 "constructor" 28130 ] 28131}; 28132var $a44aab89caa44953$var$untaintedBasePrototype = {}; 28133var $a44aab89caa44953$var$isAngularZonePresent = function() { 28134 return !!globalThis.Zone; 28135}; 28136function $a44aab89caa44953$var$getUntaintedPrototype(key) { 28137 if ($a44aab89caa44953$var$untaintedBasePrototype[key]) return $a44aab89caa44953$var$untaintedBasePrototype[key]; 28138 var defaultObj = globalThis[key]; 28139 var defaultPrototype = defaultObj.prototype; 28140 var accessorNames = key in $a44aab89caa44953$var$testableAccessors ? $a44aab89caa44953$var$testableAccessors[key] : void 0; 28141 var isUntaintedAccessors = Boolean(accessorNames && // @ts-expect-error 2345 28142 accessorNames.every(function(accessor) { 28143 var _a2, _b; 28144 return Boolean((_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")); 28145 })); 28146 var methodNames = key in $a44aab89caa44953$var$testableMethods ? $a44aab89caa44953$var$testableMethods[key] : void 0; 28147 var isUntaintedMethods = Boolean(methodNames && methodNames.every(function(method) { 28148 var _a2; 28149 return typeof defaultPrototype[method] === "function" && ((_a2 = defaultPrototype[method]) == null ? void 0 : _a2.toString().includes("[native code]")); 28150 })); 28151 if (isUntaintedAccessors && isUntaintedMethods && !$a44aab89caa44953$var$isAngularZonePresent()) { 28152 $a44aab89caa44953$var$untaintedBasePrototype[key] = defaultObj.prototype; 28153 return defaultObj.prototype; 28154 } 28155 try { 28156 var iframeEl = document.createElement("iframe"); 28157 document.body.appendChild(iframeEl); 28158 var win = iframeEl.contentWindow; 28159 if (!win) return defaultObj.prototype; 28160 var untaintedObject = win[key].prototype; 28161 document.body.removeChild(iframeEl); 28162 if (!untaintedObject) return defaultPrototype; 28163 return $a44aab89caa44953$var$untaintedBasePrototype[key] = untaintedObject; 28164 } catch (e) { 28165 return defaultPrototype; 28166 } 28167} 28168var $a44aab89caa44953$var$untaintedAccessorCache = {}; 28169function $a44aab89caa44953$var$getUntaintedAccessor(key, instance, accessor) { 28170 var _a2; 28171 var cacheKey = key + "." + String(accessor); 28172 if ($a44aab89caa44953$var$untaintedAccessorCache[cacheKey]) return $a44aab89caa44953$var$untaintedAccessorCache[cacheKey].call(instance); 28173 var untaintedPrototype = $a44aab89caa44953$var$getUntaintedPrototype(key); 28174 var untaintedAccessor = (_a2 = Object.getOwnPropertyDescriptor(untaintedPrototype, accessor)) == null ? void 0 : _a2.get; 28175 if (!untaintedAccessor) return instance[accessor]; 28176 $a44aab89caa44953$var$untaintedAccessorCache[cacheKey] = untaintedAccessor; 28177 return untaintedAccessor.call(instance); 28178} 28179var $a44aab89caa44953$var$untaintedMethodCache = {}; 28180function $a44aab89caa44953$var$getUntaintedMethod(key, instance, method) { 28181 var cacheKey = key + "." + String(method); 28182 if ($a44aab89caa44953$var$untaintedMethodCache[cacheKey]) return $a44aab89caa44953$var$untaintedMethodCache[cacheKey].bind(instance); 28183 var untaintedPrototype = $a44aab89caa44953$var$getUntaintedPrototype(key); 28184 var untaintedMethod = untaintedPrototype[method]; 28185 if (typeof untaintedMethod !== "function") return instance[method]; 28186 $a44aab89caa44953$var$untaintedMethodCache[cacheKey] = untaintedMethod; 28187 return untaintedMethod.bind(instance); 28188} 28189function $a44aab89caa44953$var$childNodes(n2) { 28190 return $a44aab89caa44953$var$getUntaintedAccessor("Node", n2, "childNodes"); 28191} 28192function $a44aab89caa44953$var$parentNode(n2) { 28193 return $a44aab89caa44953$var$getUntaintedAccessor("Node", n2, "parentNode"); 28194} 28195function $a44aab89caa44953$var$parentElement(n2) { 28196 return $a44aab89caa44953$var$getUntaintedAccessor("Node", n2, "parentElement"); 28197} 28198function $a44aab89caa44953$var$textContent(n2) { 28199 return $a44aab89caa44953$var$getUntaintedAccessor("Node", n2, "textContent"); 28200} 28201function $a44aab89caa44953$var$contains(n2, other) { 28202 return $a44aab89caa44953$var$getUntaintedMethod("Node", n2, "contains")(other); 28203} 28204function $a44aab89caa44953$var$getRootNode(n2) { 28205 return $a44aab89caa44953$var$getUntaintedMethod("Node", n2, "getRootNode")(); 28206} 28207function $a44aab89caa44953$var$host(n2) { 28208 if (!n2 || !("host" in n2)) return null; 28209 return $a44aab89caa44953$var$getUntaintedAccessor("ShadowRoot", n2, "host"); 28210} 28211function $a44aab89caa44953$var$styleSheets(n2) { 28212 return n2.styleSheets; 28213} 28214function $a44aab89caa44953$var$shadowRoot(n2) { 28215 if (!n2 || !("shadowRoot" in n2)) return null; 28216 return $a44aab89caa44953$var$getUntaintedAccessor("Element", n2, "shadowRoot"); 28217} 28218function $a44aab89caa44953$var$querySelector(n2, selectors) { 28219 return $a44aab89caa44953$var$getUntaintedAccessor("Element", n2, "querySelector")(selectors); 28220} 28221function $a44aab89caa44953$var$querySelectorAll(n2, selectors) { 28222 return $a44aab89caa44953$var$getUntaintedAccessor("Element", n2, "querySelectorAll")(selectors); 28223} 28224function $a44aab89caa44953$var$mutationObserverCtor() { 28225 return $a44aab89caa44953$var$getUntaintedPrototype("MutationObserver").constructor; 28226} 28227function $a44aab89caa44953$var$patch(source, name, replacement) { 28228 try { 28229 if (!(name in source)) return function() {}; 28230 var original = source[name]; 28231 var wrapped = replacement(original); 28232 if (typeof wrapped === "function") { 28233 wrapped.prototype = wrapped.prototype || {}; 28234 Object.defineProperties(wrapped, { 28235 __rrweb_original__: { 28236 enumerable: false, 28237 value: original 28238 } 28239 }); 28240 } 28241 source[name] = wrapped; 28242 return function() { 28243 source[name] = original; 28244 }; 28245 } catch (e) { 28246 return function() {}; 28247 } 28248} 28249var $a44aab89caa44953$var$index = { 28250 childNodes: $a44aab89caa44953$var$childNodes, 28251 parentNode: $a44aab89caa44953$var$parentNode, 28252 parentElement: $a44aab89caa44953$var$parentElement, 28253 textContent: $a44aab89caa44953$var$textContent, 28254 contains: $a44aab89caa44953$var$contains, 28255 getRootNode: $a44aab89caa44953$var$getRootNode, 28256 host: $a44aab89caa44953$var$host, 28257 styleSheets: $a44aab89caa44953$var$styleSheets, 28258 shadowRoot: $a44aab89caa44953$var$shadowRoot, 28259 querySelector: $a44aab89caa44953$var$querySelector, 28260 querySelectorAll: $a44aab89caa44953$var$querySelectorAll, 28261 mutationObserver: $a44aab89caa44953$var$mutationObserverCtor, 28262 patch: $a44aab89caa44953$var$patch 28263}; 28264function $a44aab89caa44953$var$on(type, fn, target) { 28265 if (target === void 0) target = document; 28266 var options = { 28267 capture: true, 28268 passive: true 28269 }; 28270 target.addEventListener(type, fn, options); 28271 return function() { 28272 return target.removeEventListener(type, fn, options); 28273 }; 28274} 28275var $a44aab89caa44953$var$DEPARTED_MIRROR_ACCESS_WARNING = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording."; 28276var $a44aab89caa44953$var$_mirror = { 28277 map: {}, 28278 getId: function getId() { 28279 console.error($a44aab89caa44953$var$DEPARTED_MIRROR_ACCESS_WARNING); 28280 return -1; 28281 }, 28282 getNode: function getNode() { 28283 console.error($a44aab89caa44953$var$DEPARTED_MIRROR_ACCESS_WARNING); 28284 return null; 28285 }, 28286 removeNodeFromMap: function removeNodeFromMap() { 28287 console.error($a44aab89caa44953$var$DEPARTED_MIRROR_ACCESS_WARNING); 28288 }, 28289 has: function has() { 28290 console.error($a44aab89caa44953$var$DEPARTED_MIRROR_ACCESS_WARNING); 28291 return false;
28292 }, 28293 reset: function reset() { 28294 console.error($a44aab89caa44953$var$DEPARTED_MIRROR_ACCESS_WARNING); 28295 } 28296}; 28297if (typeof window !== "undefined" && window.Proxy && window.Reflect) $a44aab89caa44953$var$_mirror = new Proxy($a44aab89caa44953$var$_mirror, { 28298 get: function get(target, prop, receiver) { 28299 if (prop === "map") console.error($a44aab89caa44953$var$DEPARTED_MIRROR_ACCESS_WARNING); 28300 return Reflect.get(target, prop, receiver); 28301 } 28302}); 28303function $a44aab89caa44953$var$throttle(func, wait, options) { 28304 if (options === void 0) options = {}; 28305 var timeout = null; 28306 var previous = 0; 28307 return function() { 28308 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 28309 var now = Date.now(); 28310 if (!previous && options.leading === false) previous = now; 28311 var remaining = wait - (now - previous); 28312 var context = this; 28313 if (remaining <= 0 || remaining > wait) { 28314 if (timeout) { 28315 clearTimeout(timeout); 28316 timeout = null; 28317 } 28318 previous = now; 28319 func.apply(context, args); 28320 } else if (!timeout && options.trailing !== false) timeout = setTimeout(function() { 28321 previous = options.leading === false ? 0 : Date.now(); 28322 timeout = null; 28323 func.apply(context, args); 28324 }, remaining); 28325 }; 28326} 28327function $a44aab89caa44953$var$hookSetter(target, key, d, isRevoked, win) { 28328 if (win === void 0) win = window; 28329 var original = win.Object.getOwnPropertyDescriptor(target, key); 28330 win.Object.defineProperty(target, key, isRevoked ? d : { 28331 set: function set(value) { 28332 var _this = this; 28333 setTimeout(function() { 28334 d.set.call(_this, value); 28335 }, 0); 28336 if (original && original.set) original.set.call(this, value); 28337 } 28338 }); 28339 return function() { 28340 return $a44aab89caa44953$var$hookSetter(target, key, original || {}, true); 28341 }; 28342} 28343var $a44aab89caa44953$var$nowTimestamp = Date.now; 28344if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) $a44aab89caa44953$var$nowTimestamp = function() { 28345 return /* @__PURE__ */ new Date().getTime(); 28346}; 28347function $a44aab89caa44953$var$getWindowScroll(win) { 28348 var _a2, _b, _c, _d; 28349 var doc = win.document; 28350 return { 28351 left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc.documentElement.scrollLeft || (doc == null ? void 0 : doc.body) && ((_a2 = $a44aab89caa44953$var$index.parentElement(doc.body)) == null ? void 0 : _a2.scrollLeft) || ((_b = doc == null ? void 0 : doc.body) == null ? void 0 : _b.scrollLeft) || 0, 28352 top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : (doc == null ? void 0 : doc.documentElement.scrollTop) || (doc == null ? void 0 : doc.body) && ((_c = $a44aab89caa44953$var$index.parentElement(doc.body)) == null ? void 0 : _c.scrollTop) || ((_d = doc == null ? void 0 : doc.body) == null ? void 0 : _d.scrollTop) || 0 28353 }; 28354} 28355function $a44aab89caa44953$var$getWindowHeight() { 28356 return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight; 28357} 28358function $a44aab89caa44953$var$getWindowWidth() { 28359 return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth; 28360} 28361function $a44aab89caa44953$var$closestElementOfNode(node2) { 28362 if (!node2) return null; 28363 var el = node2.nodeType === node2.ELEMENT_NODE ? node2 : $a44aab89caa44953$var$index.parentElement(node2); 28364 return el; 28365} 28366function $a44aab89caa44953$var$isBlocked(node2, blockClass, blockSelector, checkAncestors) { 28367 if (!node2) return false; 28368 var el = $a44aab89caa44953$var$closestElementOfNode(node2); 28369 if (!el) return false; 28370 try { 28371 if (typeof blockClass === "string") { 28372 if (el.classList.contains(blockClass)) return true; 28373 if (checkAncestors && el.closest("." + blockClass) !== null) return true; 28374 } else { 28375 if ($a44aab89caa44953$var$classMatchesRegex(el, blockClass, checkAncestors)) return true; 28376 } 28377 } catch (e2) {} 28378 if (blockSelector) { 28379 if (el.matches(blockSelector)) return true; 28380 if (checkAncestors && el.closest(blockSelector) !== null) return true; 28381 } 28382 return false;
28383} 28384function $a44aab89caa44953$var$isSerialized(n2, mirror2) { 28385 return mirror2.getId(n2) !== -1; 28386} 28387function $a44aab89caa44953$var$isIgnored(n2, mirror2, slimDOMOptions) { 28388 if (n2.tagName === "TITLE" && slimDOMOptions.headTitleMutations) return true; 28389 return mirror2.getId(n2) === $a44aab89caa44953$var$IGNORED_NODE; 28390} 28391function $a44aab89caa44953$var$isAncestorRemoved(target, mirror2) { 28392 if ($a44aab89caa44953$var$isShadowRoot(target)) return false; 28393 var id = mirror2.getId(target); 28394 if (!mirror2.has(id)) return true; 28395 var parent = $a44aab89caa44953$var$index.parentNode(target); 28396 if (parent && parent.nodeType === target.DOCUMENT_NODE) return false; 28397 if (!parent) return true; 28398 return $a44aab89caa44953$var$isAncestorRemoved(parent, mirror2); 28399} 28400function $a44aab89caa44953$var$legacy_isTouchEvent(event) { 28401 return Boolean(event.changedTouches); 28402} 28403function $a44aab89caa44953$var$polyfill$1(win) { 28404 if (win === void 0) win = window; 28405 if ("NodeList" in win && !win.NodeList.prototype.forEach) win.NodeList.prototype.forEach = Array.prototype.forEach; 28406 if ("DOMTokenList" in win && !win.DOMTokenList.prototype.forEach) win.DOMTokenList.prototype.forEach = Array.prototype.forEach; 28407} 28408function $a44aab89caa44953$var$isSerializedIframe(n2, mirror2) { 28409 return Boolean(n2.nodeName === "IFRAME" && mirror2.getMeta(n2)); 28410} 28411function $a44aab89caa44953$var$isSerializedStylesheet(n2, mirror2) { 28412 return Boolean(n2.nodeName === "LINK" && n2.nodeType === n2.ELEMENT_NODE && n2.getAttribute && n2.getAttribute("rel") === "stylesheet" && mirror2.getMeta(n2)); 28413} 28414function $a44aab89caa44953$var$hasShadowRoot(n2) { 28415 if (!n2) return false; 28416 if ($a44aab89caa44953$var$_instanceof(n2, $a44aab89caa44953$var$BaseRRNode) && "shadowRoot" in n2) return Boolean(n2.shadowRoot); 28417 return Boolean($a44aab89caa44953$var$index.shadowRoot(n2)); 28418} 28419var $a44aab89caa44953$var$StyleSheetMirror = /*#__PURE__*/ function() { 28420 function StyleSheetMirror() { 28421 $a44aab89caa44953$var$__publicField(this, "id", 1); 28422 $a44aab89caa44953$var$__publicField(this, "styleIDMap", /* @__PURE__ */ new WeakMap()); 28423 $a44aab89caa44953$var$__publicField(this, "idStyleMap", /* @__PURE__ */ new Map()); 28424 } 28425 var _proto = StyleSheetMirror.prototype; 28426 _proto.getId = function getId(stylesheet) { 28427 var _this_styleIDMap_get; 28428 return (_this_styleIDMap_get = this.styleIDMap.get(stylesheet)) != null ? _this_styleIDMap_get : -1; 28429 }; 28430 _proto.has = function has(stylesheet) { 28431 return this.styleIDMap.has(stylesheet); 28432 }; 28433 /** 28434 * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id. 28435 */ _proto.add = function add(stylesheet, id) { 28436 if (this.has(stylesheet)) return this.getId(stylesheet); 28437 var newId; 28438 if (id === void 0) newId = this.id++; 28439 else newId = id; 28440 this.styleIDMap.set(stylesheet, newId); 28441 this.idStyleMap.set(newId, stylesheet); 28442 return newId; 28443 }; 28444 _proto.getStyle = function getStyle(id) { 28445 return this.idStyleMap.get(id) || null; 28446 }; 28447 _proto.reset = function reset() { 28448 this.styleIDMap = /* @__PURE__ */ new WeakMap(); 28449 this.idStyleMap = /* @__PURE__ */ new Map(); 28450 this.id = 1; 28451 }; 28452 _proto.generateId = function generateId() { 28453 return this.id++; 28454 }; 28455 return StyleSheetMirror; 28456}(); 28457function $a44aab89caa44953$var$getShadowHost(n2) { 28458 var _a2; 28459 var shadowHost = null; 28460 if ("getRootNode" in n2 && ((_a2 = $a44aab89caa44953$var$index.getRootNode(n2)) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && $a44aab89caa44953$var$index.host($a44aab89caa44953$var$index.getRootNode(n2))) shadowHost = $a44aab89caa44953$var$index.host($a44aab89caa44953$var$index.getRootNode(n2)); 28461 return shadowHost; 28462} 28463function $a44aab89caa44953$var$getRootShadowHost(n2) { 28464 var rootShadowHost = n2; 28465 var shadowHost; 28466 while(shadowHost = $a44aab89caa44953$var$getShadowHost(rootShadowHost))rootShadowHost = shadowHost; 28467 return rootShadowHost; 28468} 28469function $a44aab89caa44953$var$shadowHostInDom(n2) { 28470 var doc = n2.ownerDocument; 28471 if (!doc) return false;
28472 var shadowHost = $a44aab89caa44953$var$getRootShadowHost(n2); 28473 return $a44aab89caa44953$var$index.contains(doc, shadowHost); 28474} 28475function $a44aab89caa44953$var$inDom(n2) { 28476 var doc = n2.ownerDocument; 28477 if (!doc) return false; 28478 return $a44aab89caa44953$var$index.contains(doc, n2) || $a44aab89caa44953$var$shadowHostInDom(n2); 28479} 28480var $a44aab89caa44953$var$EventType = /* @__PURE__ */ function(EventType2) { 28481 EventType2[EventType2["DomContentLoaded"] = 0] = "DomContentLoaded"; 28482 EventType2[EventType2["Load"] = 1] = "Load"; 28483 EventType2[EventType2["FullSnapshot"] = 2] = "FullSnapshot"; 28484 EventType2[EventType2["IncrementalSnapshot"] = 3] = "IncrementalSnapshot"; 28485 EventType2[EventType2["Meta"] = 4] = "Meta"; 28486 EventType2[EventType2["Custom"] = 5] = "Custom"; 28487 EventType2[EventType2["Plugin"] = 6] = "Plugin"; 28488 return EventType2; 28489}($a44aab89caa44953$var$EventType || {}); 28490var $a44aab89caa44953$var$IncrementalSource = /* @__PURE__ */ function(IncrementalSource2) { 28491 IncrementalSource2[IncrementalSource2["Mutation"] = 0] = "Mutation"; 28492 IncrementalSource2[IncrementalSource2["MouseMove"] = 1] = "MouseMove"; 28493 IncrementalSource2[IncrementalSource2["MouseInteraction"] = 2] = "MouseInteraction"; 28494 IncrementalSource2[IncrementalSource2["Scroll"] = 3] = "Scroll"; 28495 IncrementalSource2[IncrementalSource2["ViewportResize"] = 4] = "ViewportResize"; 28496 IncrementalSource2[IncrementalSource2["Input"] = 5] = "Input"; 28497 IncrementalSource2[IncrementalSource2["TouchMove"] = 6] = "TouchMove"; 28498 IncrementalSource2[IncrementalSource2["MediaInteraction"] = 7] = "MediaInteraction"; 28499 IncrementalSource2[IncrementalSource2["StyleSheetRule"] = 8] = "StyleSheetRule"; 28500 IncrementalSource2[IncrementalSource2["CanvasMutation"] = 9] = "CanvasMutation"; 28501 IncrementalSource2[IncrementalSource2["Font"] = 10] = "Font"; 28502 IncrementalSource2[IncrementalSource2["Log"] = 11] = "Log"; 28503 IncrementalSource2[IncrementalSource2["Drag"] = 12] = "Drag"; 28504 IncrementalSource2[IncrementalSource2["StyleDeclaration"] = 13] = "StyleDeclaration"; 28505 IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection"; 28506 IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet"; 28507 IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement"; 28508 return IncrementalSource2; 28509}($a44aab89caa44953$var$IncrementalSource || {}); 28510var $a44aab89caa44953$var$MouseInteractions = /* @__PURE__ */ function(MouseInteractions2) { 28511 MouseInteractions2[MouseInteractions2["MouseUp"] = 0] = "MouseUp"; 28512 MouseInteractions2[MouseInteractions2["MouseDown"] = 1] = "MouseDown"; 28513 MouseInteractions2[MouseInteractions2["Click"] = 2] = "Click"; 28514 MouseInteractions2[MouseInteractions2["ContextMenu"] = 3] = "ContextMenu"; 28515 MouseInteractions2[MouseInteractions2["DblClick"] = 4] = "DblClick"; 28516 MouseInteractions2[MouseInteractions2["Focus"] = 5] = "Focus"; 28517 MouseInteractions2[MouseInteractions2["Blur"] = 6] = "Blur"; 28518 MouseInteractions2[MouseInteractions2["TouchStart"] = 7] = "TouchStart"; 28519 MouseInteractions2[MouseInteractions2["TouchMove_Departed"] = 8] = "TouchMove_Departed"; 28520 MouseInteractions2[MouseInteractions2["TouchEnd"] = 9] = "TouchEnd"; 28521 MouseInteractions2[MouseInteractions2["TouchCancel"] = 10] = "TouchCancel"; 28522 return MouseInteractions2; 28523}($a44aab89caa44953$var$MouseInteractions || {}); 28524var $a44aab89caa44953$var$PointerTypes = /* @__PURE__ */ function(PointerTypes2) { 28525 PointerTypes2[PointerTypes2["Mouse"] = 0] = "Mouse"; 28526 PointerTypes2[PointerTypes2["Pen"] = 1] = "Pen"; 28527 PointerTypes2[PointerTypes2["Touch"] = 2] = "Touch"; 28528 return PointerTypes2; 28529}($a44aab89caa44953$var$PointerTypes || {}); 28530var $a44aab89caa44953$var$CanvasContext = /* @__PURE__ */ function(CanvasContext2) { 28531 CanvasContext2[CanvasContext2["2D"] = 0] = "2D"; 28532 CanvasContext2[CanvasContext2["WebGL"] = 1] = "WebGL"; 28533 CanvasContext2[CanvasContext2["WebGL2"] = 2] = "WebGL2"; 28534 return CanvasContext2; 28535}($a44aab89caa44953$var$CanvasContext || {}); 28536var $a44aab89caa44953$var$MediaInteractions = /* @__PURE__ */ function(MediaInteractions2) { 28537 MediaInteractions2[MediaInteractions2["Play"] = 0] = "Play"; 28538 MediaInteractions2[MediaInteractions2["Pause"] = 1] = "Pause"; 28539 MediaInteractions2[MediaInteractions2["Seeked"] = 2] = "Seeked"; 28540 MediaInteractions2[MediaInteractions2["VolumeChange"] = 3] = "VolumeChange"; 28541 MediaInteractions2[MediaInteractions2["RateChange"] = 4] = "RateChange"; 28542 return MediaInteractions2; 28543}($a44aab89caa44953$var$MediaInteractions || {}); 28544var $a44aab89caa44953$var$NodeType = /* @__PURE__ */ function(NodeType2) { 28545 NodeType2[NodeType2["Document"] = 0] = "Document"; 28546 NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType"; 28547 NodeType2[NodeType2["Element"] = 2] = "Element"; 28548 NodeType2[NodeType2["Text"] = 3] = "Text"; 28549 NodeType2[NodeType2["CDATA"] = 4] = "CDATA"; 28550 NodeType2[NodeType2["Comment"] = 5] = "Comment"; 28551 return NodeType2; 28552}($a44aab89caa44953$var$NodeType || {}); 28553function $a44aab89caa44953$var$isNodeInLinkedList(n2) { 28554 return "__ln" in n2; 28555} 28556var $a44aab89caa44953$var$DoubleLinkedList = /*#__PURE__*/ function() { 28557 function DoubleLinkedList() { 28558 $a44aab89caa44953$var$__publicField(this, "length", 0); 28559 $a44aab89caa44953$var$__publicField(this, "head", null); 28560 $a44aab89caa44953$var$__publicField(this, "tail", null); 28561 } 28562 var _proto = DoubleLinkedList.prototype; 28563 _proto.get = function get(position) { 28564 if (position >= this.length) throw new Error("Position outside of list range"); 28565 var current = this.head; 28566 for(var index2 = 0; index2 < position; index2++)current = (current == null ? void 0 : current.next) || null; 28567 return current; 28568 }; 28569 _proto.addNode = function addNode(n2) { 28570 var node2 = { 28571 value: n2, 28572 previous: null, 28573 next: null 28574 }; 28575 n2.__ln = node2; 28576 if (n2.previousSibling && $a44aab89caa44953$var$isNodeInLinkedList(n2.previousSibling)) { 28577 var current = n2.previousSibling.__ln.next; 28578 node2.next = current; 28579 node2.previous = n2.previousSibling.__ln; 28580 n2.previousSibling.__ln.next = node2; 28581 if (current) current.previous = node2; 28582 } else if (n2.nextSibling && $a44aab89caa44953$var$isNodeInLinkedList(n2.nextSibling) && n2.nextSibling.__ln.previous) { 28583 var current1 = n2.nextSibling.__ln.previous; 28584 node2.previous = current1; 28585 node2.next = n2.nextSibling.__ln; 28586 n2.nextSibling.__ln.previous = node2; 28587 if (current1) current1.next = node2; 28588 } else { 28589 if (this.head) this.head.previous = node2; 28590 node2.next = this.head; 28591 this.head = node2; 28592 } 28593 if (node2.next === null) this.tail = node2; 28594 this.length++; 28595 }; 28596 _proto.removeNode = function removeNode(n2) { 28597 var current = n2.__ln; 28598 if (!this.head) return; 28599 if (!current.previous) { 28600 this.head = current.next; 28601 if (this.head) this.head.previous = null; 28602 else this.tail = null; 28603 } else { 28604 current.previous.next = current.next; 28605 if (current.next) current.next.previous = current.previous; 28606 else this.tail = current.previous; 28607 } 28608 if (n2.__ln) delete n2.__ln; 28609 this.length--; 28610 }; 28611 return DoubleLinkedList; 28612}(); 28613var $a44aab89caa44953$var$moveKey = function(id, parentId) { 28614 return id + "@" + parentId; 28615}; 28616var $a44aab89caa44953$var$MutationBuffer = /*#__PURE__*/ function() { 28617 function MutationBuffer() { 28618 var _this = this; 28619 $a44aab89caa44953$var$__publicField(this, "frozen", false); 28620 $a44aab89caa44953$var$__publicField(this, "locked", false); 28621 $a44aab89caa44953$var$__publicField(this, "texts", []); 28622 $a44aab89caa44953$var$__publicField(this, "attributes", []); 28623 $a44aab89caa44953$var$__publicField(this, "attributeMap", /* @__P
28623URE__ */ new WeakMap()); 28624 $a44aab89caa44953$var$__publicField(this, "removes", []); 28625 $a44aab89caa44953$var$__publicField(this, "mapRemoves", []); 28626 $a44aab89caa44953$var$__publicField(this, "movedMap", {}); 28627 /** 28628 * the browser MutationObserver emits multiple mutations after 28629 * a delay for performance reasons, making tracing added nodes hard 28630 * in our `processMutations` callback function. 28631 * For example, if we append an element el_1 into body, and then append 28632 * another element el_2 into el_1, these two mutations may be passed to the 28633 * callback function together when the two operations were done. 28634 * Generally we need to trace child nodes of newly added nodes, but in this 28635 * case if we count el_2 as el_1's child node in the first mutation record, 28636 * then we will count el_2 again in the second mutation record which was 28637 * duplicated. 28638 * To avoid of duplicate counting added nodes, we use a Set to store 28639 * added nodes and its child nodes during iterate mutation records. The
28639n 28640 * collect added nodes from the Set which have no duplicate copy. But 28641 * this also causes newly added nodes will not be serialized with id ASAP, 28642 * which means all the id related calculation should be lazy too. 28643 */ $a44aab89caa44953$var$__publicField(this, "addedSet", /* @__PURE__ */ new Set()); 28644 $a44aab89caa44953$var$__publicField(this, "movedSet", /* @__PURE__ */ new Set()); 28645 $a44aab89caa44953$var$__publicField(this, "droppedSet", /* @__PURE__ */ new Set()); 28646 $a44aab89caa44953$var$__publicField(this, "removesSubTreeCache", /* @__PURE__ */ new Set()); 28647 $a44aab89caa44953$var$__publicField(this, "mutationCb"); 28648 $a44aab89caa44953$var$__publicField(this, "blockClass"); 28649 $a44aab89caa44953$var$__publicField(this, "blockSelector"); 28650 $a44aab89caa44953$var$__publicField(this, "maskTextClass"); 28651 $a44aab89caa44953$var$__publicField(this, "maskTextSelector"); 28652 $a44aab89caa44953$var$__publicField(this, "inlineStylesheet"); 28653 $a44aab89caa44953$var$__publicField(this, "maskInputOptions"); 28654 $a44aab89caa44953$var$__publicField(this, "maskTextFn"); 28655 $a44aab89caa44953$var$__publicField(this, "maskInputFn"); 28656 $a44aab89caa44953$var$__publicField(this, "keepIframeSrcFn"); 28657 $a44aab89caa44953$var$__publicField(this, "recordCanvas"); 28658 $a44aab89caa44953$var$__publicField(this, "inlineImages"); 28659 $a44aab89caa44953$var$__publicField(this, "slimDOMOptions"); 28660 $a44aab89caa44953$var$__publicField(this, "dataURLOptions"); 28661 $a44aab89caa44953$var$__publicField(this, "doc"); 28662 $a44aab89caa44953$var$__publicField(this, "mirror"); 28663 $a44aab89caa44953$var$__publicField(this, "iframeManager"); 28664 $a44aab89caa44953$var$__publicField(this, "stylesheetManager"); 28665 $a44aab89caa44953$var$__publicField(this, "shadowDomManager"); 28666 $a44aab89caa44953$var$__publicField(this, "canvasManager"); 28667 $a44aab89caa44953$var$__publicField(this, "processedNodeManager"); 28668 $a44aab89caa44953$var$__publicField(this, "unattachedDoc"); 28669 $a44aab89caa44953$var$__publicField(this, "processMutations", function(mutations) { 28670 mutations.forEach(_this.processMutation); 28671 _this.emit(); 28672 }); 28673 $a44aab89caa44953$var$__publicField(this, "emit", function() { 28674 if (_this.frozen || _this.locked) return; 28675 var adds = []; 28676 var addedIds = /* @__PURE__ */ new Set(); 28677 var addList = new $a44aab89caa44953$var$DoubleLinkedList(); 28678 var getNextId = function(n2) { 28679 var ns = n2; 28680 var nextId = $a44aab89caa44953$var$IGNORED_NODE; 28681 while(nextId === $a44aab89caa44953$var$IGNORED_NODE){ 28682 ns = ns && ns.nextSibling; 28683 nextId = ns && _this.mirror.getId(ns); 28684 } 28685 return nextId; 28686 }; 28687 var pushAdd = function(n2) { 28688 var parent = $a44aab89caa44953$var$index.parentNode(n2); 28689 if (!parent || !$a44aab89caa44953$var$inDom(n2)) return; 28690 var cssCaptured = false; 28691 if (n2.nodeType === Node.TEXT_NODE) { 28692 var parentTag = parent.tagName; 28693 if (parentTag === "TEXTAREA") return; 28694 else if (parentTag === "STYLE" && _this.addedSet.has(parent)) cssCaptured = true; 28695 } 28696 var parentId = $a44aab89caa44953$var$isShadowRoot(parent) ? _this.mirror.getId($a44aab89caa44953$var$getShadowHost(n2)) : _this.mirror.getId(parent); 28697 var nextId = getNextId(n2); 28698 if (parentId === -1 || nextId === -1) return addList.addNode(n2); 28699 var sn = $a44aab89caa44953$var$serializeNodeWithId(n2, { 28700 doc: _this.doc, 28701 mirror: _this.mirror, 28702 blockClass: _this.blockClass, 28703 blockSelector: _this.blockSelector, 28704 maskTextClass: _this.maskTextClass, 28705 maskTextSelector: _this.maskTextSelector, 28706 skipChild: true, 28707 newlyAddedElement: true, 28708 inlineStylesheet: _this.inlineStylesheet, 28709 maskInputOptions: _this.maskInputOptions, 28710 maskTextFn: _this.maskTextFn, 28711 maskInputFn: _this.maskInputFn, 28712 slimDOMOptions: _this.slimDOMOptions, 28713 dataURLOptions: _this.dataURLOptions, 28714 recordCanvas: _this.recordCanvas, 28715 inlineImages: _this.inlineImages, 28716 onSerialize: function(currentN) { 28717 if ($a44aab89caa44953$var$isSerializedIframe(currentN, _this.mirror)) _this.iframeManager.addIframe(currentN); 28718 if ($a44aab89caa44953$var$isSerializedStylesheet(currentN, _this.mirror)) _this.stylesheetManager.trackLinkElement(currentN); 28719 if ($a44aab89caa44953$var$hasShadowRoot(n2)) _this.shadowDomManager.addShadowRoot($a44aab89caa44953$var$index.shadowRoot(n2), _this.doc); 28720 }, 28721 onIframeLoad: function(iframe, childSn) { 28722 _this.iframeManager.attachIframe(iframe, childSn); 28723 _this.shadowDomManager.observeAttachShadow(iframe); 28724 }, 28725 onStylesheetLoad: function(link, childSn) { 28726 _this.stylesheetManager.attachLinkElement(link, childSn); 28727 }, 28728 cssCaptured: cssCaptured 28729 }); 28730 if (sn) { 28731 adds.push({ 28732 parentId: parentId, 28733 nextId: nextId, 28734 node: sn 28735 });
28736 addedIds.add(sn.id); 28737 } 28738 }; 28739 while(_this.mapRemoves.length)_this.mirror.removeNodeFromMap(_this.mapRemoves.shift()); 28740 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(_this.movedSet), _step; !(_step = _iterator()).done;){ 28741 var n2 = _step.value; 28742 if ($a44aab89caa44953$var$isParentRemoved(_this.removesSubTreeCache, n2, _this.mirror) && !_this.movedSet.has($a44aab89caa44953$var$index.parentNode(n2))) continue; 28743 pushAdd(n2); 28744 } 28745 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(_this.addedSet), _step1; !(_step1 = _iterator1()).done;){ 28746 var n21 = _step1.value; 28747 if (!$a44aab89caa44953$var$isAncestorInSet(_this.droppedSet, n21) && !$a44aab89caa44953$var$isParentRemoved(_this.removesSubTreeCache, n21, _this.mirror)) pushAdd(n21); 28748 else if ($a44aab89caa44953$var$isAncestorInSet(_this.movedSet, n21)) pushAdd(n21); 28749 else _this.droppedSet.add(n21); 28750 } 28751 var candidate = null; 28752 while(addList.length){ 28753 var node2 = null; 28754 if (candidate) { 28755 var parentId = _this.mirror.getId($a44aab89caa44953$var$index.parentNode(candidate.value)); 28756 var nextId = getNextId(candidate.value); 28757 if (parentId !== -1 && nextId !== -1) node2 = candidate; 28758 } 28759 if (!node2) { 28760 var tailNode = addList.tail; 28761 while(tailNode){ 28762 var _node = tailNode; 28763 tailNode = tailNode.previous; 28764 if (_node) { 28765 var parentId1 = _this.mirror.getId($a44aab89caa44953$var$index.parentNode(_node.value)); 28766 var nextId1 = getNextId(_node.value); 28767 if (nextId1 === -1) continue; 28768 else if (parentId1 !== -1) { 28769 node2 = _node; 28770 break; 28771 } else { 28772 var unhandledNode = _node.value; 28773 var parent = $a44aab89caa44953$var$index.parentNode(unhandledNode); 28774 if (parent && parent.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { 28775 var shadowHost = $a44aab89caa44953$var$index.host(parent); 28776 var parentId2 = _this.mirror.getId(shadowHost); 28777 if (parentId2 !== -1) { 28778 node2 = _node; 28779 break; 28780 } 28781 } 28782 } 28783 } 28784 } 28785 } 28786 if (!node2) { 28787 while(addList.head)addList.removeNode(addList.head.value); 28788 break; 28789 } 28790 candidate = node2.previous; 28791 addList.removeNode(node2.value); 28792 pushAdd(node2.value); 28793 } 28794 var payload = { 28795 texts: _this.texts.map(function(text) { 28796 var n2 = text.node; 28797 var parent = $a44aab89caa44953$var$index.parentNode(n2); 28798 if (parent && parent.tagName === "TEXTAREA") _this.genTextAreaValueMutation(parent); 28799 return { 28800 id: _this.mirror.getId(n2), 28801 value: text.value 28802 }; 28803 }).filter(function(text) { 28804 return !addedIds.has(text.id); 28805 }).filter(function(text) { 28806 return _this.mirror.has(text.id); 28807 }), 28808 attributes: _this.attributes.map(function(attribute) { 28809 var attributes = attribute.attributes; 28810 if (typeof attributes.style === "string") { 28811 var diffAsStr = JSON.stringify(attribute.styleDiff); 28812 var unchangedAsStr = JSON.stringify(attribute._unchangedStyles); 28813 if (diffAsStr.length < attributes.style.length) { 28814 if ((diffAsStr + unchangedAsStr).split("var(").length === attributes.style.split("var(").length) attributes.style = attribute.styleDiff; 28815 } 28816 } 28817 return {
28818 id: _this.mirror.getId(attribute.node), 28819 attributes: attributes 28820 }; 28821 }).filter(function(attribute) { 28822 return !addedIds.has(attribute.id); 28823 }).filter(function(attribute) { 28824 return _this.mirror.has(attribute.id); 28825 }), 28826 removes: _this.removes, 28827 adds: adds 28828 }; 28829 if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) return; 28830 _this.texts = []; 28831 _this.attributes = []; 28832 _this.attributeMap = /* @__PURE__ */ new WeakMap(); 28833 _this.removes = []; 28834 _this.addedSet = /* @__PURE__ */ new Set(); 28835 _this.movedSet = /* @__PURE__ */ new Set(); 28836 _this.droppedSet = /* @__PURE__ */ new Set(); 28837 _this.removesSubTreeCache = /* @__PURE__ */ new Set(); 28838 _this.movedMap = {}; 28839 _this.mutationCb(payload); 28840 }); 28841 $a44aab89caa44953$var$__publicField(this, "genTextAreaValueMutation", function(textarea) { 28842 var item = _this.attributeMap.get(textarea); 28843 if (!item) { 28844 item = { 28845 node: textarea, 28846 attributes: {}, 28847 styleDiff: {}, 28848 _unchangedStyles: {} 28849 }; 28850 _this.attributes.push(item); 28851 _this.attributeMap.set(textarea, item); 28852 } 28853 var value = Array.from($a44aab89caa44953$var$index.childNodes(textarea), function(cn) { 28854 return $a44aab89caa44953$var$index.textContent(cn) || ""; 28855 }).join(""); 28856 item.attributes.value = $a44aab89caa44953$var$maskInputValue({ 28857 element: textarea, 28858 maskInputOptions: _this.maskInputOptions, 28859 tagName: textarea.tagName, 28860 type: $a44aab89caa44953$var$getInputType(textarea), 28861 value: value, 28862 maskInputFn: _this.maskInputFn 28863 }); 28864 }); 28865 $a44aab89caa44953$var$__publicField(this, "processMutation", function(m) { 28866 if ($a44aab89caa44953$var$isIgnored(m.target, _this.mirror, _this.slimDOMOptions)) return; 28867 switch(m.type){ 28868 case "characterData": 28869 var value = $a44aab89caa44953$var$index.textContent(m.target); 28870 if (!$a44aab89caa44953$var$isBlocked(m.target, _this.blockClass, _this.blockSelector, false) && value !== m.oldValue) _this.texts.push({ 28871 value: $a44aab89caa44953$var$needMaskingText(m.target, _this.maskTextClass, _this.maskTextSelector, true) && value ? _this.maskTextFn ? _this.maskTextFn(value, $a44aab89caa44953$var$closestElementOfNode(m.target)) : value.replace(/[\S]/g, "*") : value, 28872 node: m.target 28873 }); 28874 break; 28875 case "attributes": 28876 var target = m.target; 28877 var attributeName = m.attributeName; 28878 var value1 = m.target.getAttribute(attributeName); 28879 if (attributeName === "value") { 28880 var type = $a44aab89caa44953$var$getInputType(target); 28881 value1 = $a44aab89caa44953$var$maskInputValue({ 28882 element: target, 28883 maskInputOptions: _this.maskInputOptions, 28884 tagName: target.tagName, 28885 type: type, 28886 value: value1, 28887 maskInputFn: _this.maskInputFn 28888 }); 28889 } 28890 if ($a44aab89caa44953$var$isBlocked(m.target, _this.blockClass, _this.blockSelector, false) || value1 === m.oldValue) return; 28891 var item = _this.attributeMap.get(m.target); 28892 if (target.tagName === "IFRAME" && attributeName === "src" && !_this.keepIframeSrcFn(value1)) { 28893 if (!target.contentDocument) attributeName = "rr_src"; 28894 else return; 28895 } 28896 if (!item) { 28897 item = { 28898 node: m.target, 28899 attributes: {}, 28900 styleDiff: {}, 28901 _unchangedStyles: {} 28902 }; 28903 _this.attributes.push(item); 28904 _this.attributeMap.set(m.target, item); 28905 } 28906 if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") target.setAttribute("data-rr-is-password", "true"); 28907 if (!$a44aab89caa44953$var$ignoreAttribute(target.tagName, attributeName)) { 28908 item.attributes[attributeName] = $a44aab89caa44953$var$transformAttribute(_this.doc, $a44aab89caa44953$var$toLowerCase(target.tagName), $a44aab89caa44953$var$toLowerCase(attributeName), value1); 28909 if (attributeName === "style") { 28910 if (!_this.unattachedDoc) try { 28911 _this.unattachedDoc = document.implementation.createHTMLDocument(); 28912 } catch (e2) { 28913 _this.unattachedDoc = _this.doc; 28914 } 28915 var old = _this.unattachedDoc.createElement("span"); 28916 if (m.oldValue) old.setAttribute("style", m.oldValue); 28917 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(Array.from(target.style)), _step; !(_step = _iterator()).done;){ 28918 var pname = _step.value; 28919 var newValue = target.style.getPropertyValue(pname); 28920 var newPriority = target.style.getPropertyPriority(pname); 28921 if (newValue !== old.style.getPropertyValue(pname) || newPriority !== old.style.getPropertyPriority(pname)) { 28922 if (newPriority === "") item.styleDiff[pname] = newValue; 28923 else item.styleDiff[pname] = [ 28924 newValue, 28925 newPriority 28926 ]; 28927 } else item._unchangedStyles[pname] = [ 28928 newValue, 28929 newPriority 28930 ]; 28931 } 28932 for(var _iterator1 = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(Array.from(old.style)), _step1; !(_step1 = _iterator1()).done;){ 28933 var pname1 = _step1.value; 28934 if (target.style.getPropertyValue(pname1) === "") item.styleDiff[pname1] = false;
28935 } 28936 } else if (attributeName === "open" && target.tagName === "DIALOG") { 28937 if (target.matches("dialog:modal")) item.attributes["rr_open_mode"] = "modal"; 28938 else item.attributes["rr_open_mode"] = "non-modal"; 28939 } 28940 } 28941 break; 28942 case "childList": 28943 if ($a44aab89caa44953$var$isBlocked(m.target, _this.blockClass, _this.blockSelector, true)) return; 28944 if (m.target.tagName === "TEXTAREA") { 28945 _this.genTextAreaValueMutation(m.target); 28946 return; 28947 } 28948 m.addedNodes.forEach(function(n2) { 28949 return _this.genAdds(n2, m.target); 28950 }); 28951 m.removedNodes.forEach(function(n2) { 28952 var nodeId = _this.mirror.getId(n2); 28953 var parentId = $a44aab89caa44953$var$isShadowRoot(m.target) ? _this.mirror.getId($a44aab89caa44953$var$index.host(m.target)) : _this.mirror.getId(m.target); 28954 if ($a44aab89caa44953$var$isBlocked(m.target, _this.blockClass, _this.blockSelector, false) || $a44aab89caa44953$var$isIgnored(n2, _this.mirror, _this.slimDOMOptions) || !$a44aab89caa44953$var$isSerialized(n2, _this.mirror)) return; 28955 if (_this.addedSet.has(n2)) { 28956 $a44aab89caa44953$var$deepDelete(_this.addedSet, n2); 28957 _this.droppedSet.add(n2); 28958 } else if (_this.addedSet.has(m.target) && nodeId === -1) ; 28959 else if ($a44aab89caa44953$var$isAncestorRemoved(m.target, _this.mirror)) ; 28960 else if (_this.movedSet.has(n2) && _this.movedMap[$a44aab89caa44953$var$moveKey(nodeId, parentId)]) $a44aab89caa44953$var$deepDelete(_this.movedSet, n2); 28961 else { 28962 _this.removes.push({ 28963 parentId: parentId, 28964 id: nodeId, 28965 isShadow: $a44aab89caa44953$var$isShadowRoot(m.target) && $a44aab89caa44953$var$isNativeShadowDom(m.target) ? true : void 0 28966 }); 28967 $a44aab89caa44953$var$processRemoves(n2, _this.removesSubTreeCache); 28968 } 28969 _this.mapRemoves.push(n2); 28970 }); 28971 break; 28972 } 28973 }); 28974 /** 28975 * Make sure you check if `n`'s parent is blocked before calling this function 28976 * */ $a44aab89caa44953$var$__publicField(this, "genAdds", function(n2, target) { 28977 if (_this.processedNodeManager.inOtherBuffer(n2, _this)) return; 28978 if (_this.addedSet.has(n2) || _this.movedSet.has(n2)) return; 28979 if (_this.mirror.hasNode(n2)) { 28980 if ($a44aab89caa44953$var$isIgnored(n2, _this.mirror, _this.slimDOMOptions)) return; 28981 _this.movedSet.add(n2); 28982 var targetId = null; 28983 if (target && _this.mirror.hasNode(target)) targetId = _this.mirror.getId(target); 28984 if (targetId && targetId !== -1) _this.movedMap[$a44aab89caa44953$var$moveKey(_this.mirror.getId(n2), targetId)] = true; 28985 } else { 28986 _this.addedSet.add(n2); 28987 _this.droppedSet.delete(n2); 28988 } 28989 if (!$a44aab89caa44953$var$isBlocked(n2, _this.blockClass, _this.blockSelector, false)) { 28990 $a44aab89caa44953$var$index.childNodes(n2).forEach(function(childN) { 28991 return _this.genAdds(childN); 28992 }); 28993 if ($a44aab89caa44953$var$hasShadowRoot(n2)) $a44aab89caa44953$var$index.childNodes($a44aab89caa44953$var$index.shadowRoot(n2)).forEach(function(childN) { 28994 _this.processedNodeManager.add(childN, _this); 28995 _this.genAdds(childN, n2); 28996 }); 28997 } 28998 }); 28999 } 29000 var _proto = MutationBuffer.prototype; 29001 _proto.init = function init(options) { 29002 var _this = this; 29003 [ 29004 "mutationCb", 29005 "blockClass", 29006 "blockSelector", 29007 "maskTextClass", 29008 "maskTextSelector", 29009 "inlineStylesheet", 29010 "maskInputOptions", 29011 "maskTextFn", 29012 "maskInputFn", 29013 "keepIframeSrcFn", 29014 "recordCanvas", 29015 "inlineImages", 29016 "slimDOMOptions", 29017 "dataURLOptions", 29018 "doc", 29019 "mirror", 29020 "iframeManager", 29021 "stylesheetManager", 29022 "shadowDomManager", 29023 "canvasManager", 29024 "processedNodeManager" 29025 ].forEach(function(key) { 29026 _this[key] = options[key]; 29027 }); 29028 }; 29029 _proto.freeze = function freeze() { 29030 this.frozen = true; 29031 this.canvasManager.freeze(); 29032 }; 29033 _proto.unfreeze = function unfreeze() { 29034 this.frozen = false;
29035 this.canvasManager.unfreeze(); 29036 this.emit(); 29037 }; 29038 _proto.isFrozen = function isFrozen() { 29039 return this.frozen; 29040 }; 29041 _proto.lock = function lock() { 29042 this.locked = true; 29043 this.canvasManager.lock(); 29044 }; 29045 _proto.unlock = function unlock() { 29046 this.locked = false; 29047 this.canvasManager.unlock(); 29048 this.emit(); 29049 }; 29050 _proto.reset = function reset() { 29051 this.shadowDomManager.reset(); 29052 this.canvasManager.reset(); 29053 }; 29054 return MutationBuffer; 29055}(); 29056function $a44aab89caa44953$var$deepDelete(addsSet, n2) { 29057 addsSet.delete(n2); 29058 $a44aab89caa44953$var$index.childNodes(n2).forEach(function(childN) { 29059 return $a44aab89caa44953$var$deepDelete(addsSet, childN); 29060 }); 29061} 29062function $a44aab89caa44953$var$processRemoves(n2, cache) { 29063 var queue = [ 29064 n2 29065 ]; 29066 while(queue.length){ 29067 var next = queue.pop(); 29068 if (cache.has(next)) continue; 29069 cache.add(next); 29070 $a44aab89caa44953$var$index.childNodes(next).forEach(function(n22) { 29071 return queue.push(n22); 29072 }); 29073 } 29074 return; 29075} 29076function $a44aab89caa44953$var$isParentRemoved(removes, n2, mirror2) { 29077 if (removes.size === 0) return false; 29078 return $a44aab89caa44953$var$_isParentRemoved(removes, n2); 29079} 29080function $a44aab89caa44953$var$_isParentRemoved(removes, n2, _mirror2) { 29081 var node2 = $a44aab89caa44953$var$index.parentNode(n2); 29082 if (!node2) return false; 29083 return removes.has(node2); 29084} 29085function $a44aab89caa44953$var$isAncestorInSet(set, n2) { 29086 if (set.size === 0) return false; 29087 return $a44aab89caa44953$var$_isAncestorInSet(set, n2); 29088} 29089function $a44aab89caa44953$var$_isAncestorInSet(set, n2) { 29090 var parent = $a44aab89caa44953$var$index.parentNode(n2); 29091 if (!parent) return false; 29092 if (set.has(parent)) return true; 29093 return $a44aab89caa44953$var$_isAncestorInSet(set, parent); 29094} 29095var $a44aab89caa44953$var$errorHandler; 29096function $a44aab89caa44953$var$registerErrorHandler(handler) { 29097 $a44aab89caa44953$var$errorHandler = handler; 29098} 29099function $a44aab89caa44953$var$unregisterErrorHandler() { 29100 $a44aab89caa44953$var$errorHandler = void 0; 29101} 29102var $a44aab89caa44953$var$callbackWrapper = function(cb) { 29103 if (!$a44aab89caa44953$var$errorHandler) return cb; 29104 var rrwebWrapped = function() { 29105 for(var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++)rest[_key] = arguments[_key]; 29106 try { 29107 return cb.apply(void 0, [].concat(rest)); 29108 } catch (error) { 29109 if ($a44aab89caa44953$var$errorHandler && $a44aab89caa44953$var$errorHandler(error) === true) return; 29110 throw error; 29111 } 29112 }; 29113 return rrwebWrapped; 29114}; 29115var $a44aab89caa44953$var$mutationBuffers = []; 29116function $a44aab89caa44953$var$getEventTarget(event) { 29117 try { 29118 if ("composedPath" in event) { 29119 var path = event.composedPath(); 29120 if (path.length) return path[0]; 29121 } else if ("path" in event && event.path.length) return event.path[0]; 29122 } catch (e) {} 29123 return event && event.target; 29124} 29125function $a44aab89caa44953$var$initMutationObserver(options, rootEl) { 29126 var mutationBuffer = new $a44aab89caa44953$var$MutationBuffer(); 29127 $a44aab89caa44953$var$mutationBuffers.push(mutationBuffer); 29128 mutationBuffer.init(options); 29129 var observer = new ($a44aab89caa44953$var$mutationObserverCtor())($a44aab89caa44953$var$callbackWrapper(mutationBuffer.processMutations.bind(mutationBuffer))); 29130 observer.observe(rootEl, { 29131 attributes: true, 29132 attributeOldValue: true, 29133 characterData: true, 29134 characterDataOldValue: true, 29135 childList: true, 29136 subtree: true 29137 }); 29138 return observer; 29139} 29140function $a44aab89caa44953$var$initMoveObserver(param) { 29141 var mousemoveCb = param.mousemoveCb, sampling = param.sampling, doc = param.doc, mirror2 = param.mirror; 29142 if (sampling.mousemove === false) return function() {}; 29143 var threshold = typeof sampling.mousemove === "number" ? sampling.mousemove : 50; 29144 var callbackThreshold = typeof sampling.mousemoveCallback === "number" ? sampling.mousemoveCallback : 500; 29145 var positions = []; 29146 var timeBaseline; 29147 var wrappedCb = $a44aab89caa44953$var$throttle($a44aab89caa44953$var$callbackWrapper(function(source) { 29148 var totalOffset = Date.now() - timeBaseline; 29149 mousemoveCb(positions.map(function(p) { 29150 p.timeOffset -= totalOffset; 29151 return p; 29152 }), source); 29153 positions = []; 29154 timeBaseline = null; 29155 }), callbackThreshold); 29156 var updatePosition = $a44aab89caa44953$var$callbackWrapper($a44aab89caa44953$var$throttle($a44aab89caa44953$var$callbackWrapper(function(evt) { 29157 var target = $a44aab89caa44953$var$getEventTarget(evt); 29158 var _ref = $a44aab89caa44953$var$legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt, clientX = _ref.clientX, clientY = _ref.clientY; 29159 if (!timeBaseline) timeBaseline = $a44aab89caa44953$var$nowTimestamp(); 29160 positions.push({ 29161 x: clientX, 29162 y: clientY, 29163 id: mirror2.getId(target), 29164 timeOffset: $a44aab89caa44953$var$nowTimestamp() - timeBaseline 29165 }); 29166 wrappedCb(typeof DragEvent !== "undefined" && $a44aab89caa44953$var$_instanceof(evt, DragEvent) ? $a44aab89caa44953$var$IncrementalSource.Drag : $a44aab89caa44953$var$_instanceof(evt, MouseEvent) ? $a44aab89caa44953$var$IncrementalSource.MouseMove : $a44aab89caa44953$var$IncrementalSource.TouchMove); 29167 }), threshold, { 29168 trailing: false 29169 })); 29170 var handlers = [ 29171 $a44aab89caa44953$var$on("mousemove", updatePosition, doc), 29172 $a44aab89caa44953$var$on("touchmove", updatePosition, doc), 29173 $a44aab89caa44953$var$on("drag", updatePosition, doc) 29174 ]; 29175 return $a44aab89caa44953$var$callbackWrapper(function() {
29176 handlers.forEach(function(h) { 29177 return h(); 29178 }); 29179 }); 29180} 29181function $a44aab89caa44953$var$initMouseInteractionObserver(param) { 29182 var mouseInteractionCb = param.mouseInteractionCb, doc = param.doc, mirror2 = param.mirror, blockClass = param.blockClass, blockSelector = param.blockSelector, sampling = param.sampling; 29183 if (sampling.mouseInteraction === false) return function() {}; 29184 var disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === void 0 ? {} : sampling.mouseInteraction; 29185 var handlers = []; 29186 var currentPointerType = null; 29187 var getHandler = function(eventKey) { 29188 return function(event) { 29189 var target = $a44aab89caa44953$var$getEventTarget(event); 29190 if ($a44aab89caa44953$var$isBlocked(target, blockClass, blockSelector, true)) return; 29191 var pointerType = null; 29192 var thisEventKey = eventKey; 29193 if ("pointerType" in event) { 29194 switch(event.pointerType){ 29195 case "mouse": 29196 pointerType = $a44aab89caa44953$var$PointerTypes.Mouse; 29197 break; 29198 case "touch": 29199 pointerType = $a44aab89caa44953$var$PointerTypes.Touch; 29200 break; 29201 case "pen": 29202 pointerType = $a44aab89caa44953$var$PointerTypes.Pen; 29203 break; 29204 } 29205 if (pointerType === $a44aab89caa44953$var$PointerTypes.Touch) { 29206 if ($a44aab89caa44953$var$MouseInteractions[eventKey] === $a44aab89caa44953$var$MouseInteractions.MouseDown) thisEventKey = "TouchStart"; 29207 else if ($a44aab89caa44953$var$MouseInteractions[eventKey] === $a44aab89caa44953$var$MouseInteractions.MouseUp) thisEventKey = "TouchEnd"; 29208 } else $a44aab89caa44953$var$PointerTypes.Pen; 29209 } else if ($a44aab89caa44953$var$legacy_isTouchEvent(event)) pointerType = $a44aab89caa44953$var$PointerTypes.Touch; 29210 if (pointerType !== null) { 29211 currentPointerType = pointerType; 29212 if (thisEventKey.startsWith("Touch") && pointerType === $a44aab89caa44953$var$PointerTypes.Touch || thisEventKey.startsWith("Mouse") && pointerType === $a44aab89caa44953$var$PointerTypes.Mouse) pointerType = null; 29213 } else if ($a44aab89caa44953$var$MouseInteractions[eventKey] === $a44aab89caa44953$var$MouseInteractions.Click) { 29214 pointerType = currentPointerType; 29215 currentPointerType = null; 29216 } 29217 var e2 = $a44aab89caa44953$var$legacy_isTouchEvent(event) ? event.changedTouches[0] : event; 29218 if (!e2) return; 29219 var id = mirror2.getId(target); 29220 var clientX = e2.clientX, clientY = e2.clientY; 29221 $a44aab89caa44953$var$callbackWrapper(mouseInteractionCb)($a44aab89caa44953$var$_extends({ 29222 type: $a44aab89caa44953$var$MouseInteractions[thisEventKey], 29223 id: id, 29224 x: clientX, 29225 y: clientY 29226 }, pointerType !== null && { 29227 pointerType: pointerType 29228 })); 29229 }; 29230 }; 29231 Object.keys($a44aab89caa44953$var$MouseInteractions).filter(function(key) { 29232 return Number.isNaN(Number(key)) && !key.endsWith("_Departed") && disableMap[key] !== false; 29233 }
vendor: 3,426 bytes, lines 29233-29302
29233).forEach(function(eventKey) { 29234 var eventName = $a44aab89caa44953$var$toLowerCase(eventKey); 29235 var handler = getHandler(eventKey); 29236 if (window.PointerEvent) switch($a44aab89caa44953$var$MouseInteractions[eventKey]){ 29237 case $a44aab89caa44953$var$MouseInteractions.MouseDown: 29238 case $a44aab89caa44953$var$MouseInteractions.MouseUp: 29239 eventName = eventName.replace("mouse", "pointer"); 29240 break; 29241 case $a44aab89caa44953$var$MouseInteractions.TouchStart: 29242 case $a44aab89caa44953$var$MouseInteractions.TouchEnd: 29243 return; 29244 } 29245 handlers.push($a44aab89caa44953$var$on(eventName, handler, doc)); 29246 }); 29247 return $a44aab89caa44953$var$callbackWrapper(function() { 29248 handlers.forEach(function(h) { 29249 return h(); 29250 }); 29251 }); 29252} 29253function $a44aab89caa44953$var$initScrollObserver(param) { 29254 var scrollCb = param.scrollCb, doc = param.doc, mirror2 = param.mirror, blockClass = param.blockClass, blockSelector = param.blockSelector, sampling = param.sampling; 29255 var updatePosition = $a44aab89caa44953$var$callbackWrapper($a44aab89caa44953$var$throttle($a44aab89caa44953$var$callbackWrapper(function(evt) { 29256 var target = $a44aab89caa44953$var$getEventTarget(evt); 29257 if (!target || $a44aab89caa44953$var$isBlocked(target, blockClass, blockSelector, true)) return; 29258 var id = mirror2.getId(target); 29259 if (target === doc && doc.defaultView) { 29260 var scrollLeftTop = $a44aab89caa44953$var$getWindowScroll(doc.defaultView); 29261 scrollCb({ 29262 id: id, 29263 x: scrollLeftTop.left, 29264 y: scrollLeftTop.top 29265 }); 29266 } else scrollCb({ 29267 id: id, 29268 x: target.scrollLeft, 29269 y: target.scrollTop 29270 }); 29271 }), sampling.scroll || 100)); 29272 return $a44aab89caa44953$var$on("scroll", updatePosition, doc); 29273} 29274function $a44aab89caa44953$var$initViewportResizeObserver(param, param1) { 29275 var viewportResizeCb = param.viewportResizeCb; 29276 var win = param1.win; 29277 var lastH = -1; 29278 var lastW = -1; 29279 var updateDimension = $a44aab89caa44953$var$callbackWrapper($a44aab89caa44953$var$throttle($a44aab89caa44953$var$callbackWrapper(function() { 29280 var height = $a44aab89caa44953$var$getWindowHeight(); 29281 var width = $a44aab89caa44953$var$getWindowWidth(); 29282 if (lastH !== height || lastW !== width) { 29283 viewportResizeCb({ 29284 width: Number(width), 29285 height: Number(height) 29286 }); 29287 lastH = height; 29288 lastW = width; 29289 } 29290 }), 200)); 29291 return $a44aab89caa44953$var$on("resize", updateDimension, win); 29292} 29293var $a44aab89caa44953$var$INPUT_TAGS = [ 29294 "INPUT", 29295 "TEXTAREA", 29296 "SELECT" 29297]; 29298var $a44aab89caa44953$var$lastInputValueMap = /* @__PURE__ */ new WeakMap(); 29299function $a44aab89caa44953$var$initInputObserver(param) { 29300 var inputCb = param.inputCb, doc = param.doc, mirror2 = param.mirror, blockClass = param.blockClass, blockSelector = param.blockSelector, ignoreClass = param.ignoreClass, ignoreSelector = param.ignoreSelector, maskInputOptions = param.maskInputOptions, maskInputFn = param.maskInputFn, sampling = param.sampling, userTriggeredOnInput = param.userTriggeredOnInput; 29301 function eventHandler(event) { 29302 var target = $a44aab89caa44953$var$getEventTarget(event);
29303 var userTriggered = event.isTrusted; 29304 var tagName = target && target.tagName; 29305 if (target && tagName === "OPTION") target = $a44aab89caa44953$var$index.parentElement(target); 29306 if (!target || !tagName || $a44aab89caa44953$var$INPUT_TAGS.indexOf(tagName) < 0 || $a44aab89caa44953$var$isBlocked(target, blockClass, blockSelector, true)) return; 29307 if (target.classList.contains(ignoreClass) || ignoreSelector && target.matches(ignoreSelector)) return; 29308 var text = target.value; 29309 var isChecked = false; 29310 var type = $a44aab89caa44953$var$getInputType(target) || ""; 29311 if (type === "radio" || type === "checkbox") isChecked = target.checked; 29312 else if (maskInputOptions[tagName.toLowerCase()] || maskInputOptions[type]) text = $a44aab89caa44953$var$maskInputValue({ 29313 element: target, 29314 maskInputOptions: maskInputOptions, 29315 tagName: tagName, 29316 type: type, 29317 value: text, 29318 maskInputFn: maskInputFn 29319 }); 29320 cbWithDedup(target, userTriggeredOnInput ? { 29321 text: text, 29322 isChecked: isChecked, 29323 userTriggered: userTriggered 29324 } : { 29325 text: text, 29326 isChecked: isChecked 29327 }); 29328 var name = target.name; 29329 if (type === "radio" && name && isChecked) doc.querySelectorAll('input[type="radio"][name="' + name + '"]').forEach(function(el) { 29330 if (el !== target) { 29331 var text2 = el.value; 29332 cbWithDedup(el, userTriggeredOnInput ? { 29333 text: text2, 29334 isChecked: !isChecked, 29335 userTriggered: false 29336 } : { 29337 text: text2, 29338 isChecked: !isChecked 29339 }); 29340 } 29341 }); 29342 } 29343 function cbWithDedup(target, v2) { 29344 var lastInputValue = $a44aab89caa44953$var$lastInputValueMap.get(target); 29345 if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) { 29346 $a44aab89caa44953$var$lastInputValueMap.set(target, v2); 29347 var id = mirror2.getId(target); 29348 $a44aab89caa44953$var$callbackWrapper(inputCb)($a44aab89caa44953$var$_extends({}, v2, { 29349 id: id 29350 })); 29351 } 29352 } 29353 var events = sampling.input === "last" ? [ 29354 "change" 29355 ] : [ 29356 "input", 29357 "change" 29358 ]; 29359 var handlers = events.map(function(eventName) { 29360 return $a44aab89caa44953$var$on(eventName, $a44aab89caa44953$var$callbackWrapper(eventHandler), doc); 29361 }); 29362 var currentWindow = doc.defaultView; 29363 if (!currentWindow) return function() { 29364 handlers.forEach(function(h) { 29365 return h(); 29366 }); 29367 }; 29368 var propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, "value"); 29369 var hookProperties = [ 29370 [ 29371 currentWindow.HTMLInputElement.prototype, 29372 "value" 29373 ], 29374 [ 29375 currentWindow.HTMLInputElement.prototype, 29376 "checked" 29377 ], 29378 [ 29379 currentWindow.HTMLSelectElement.prototype, 29380 "value" 29381 ], 29382 [ 29383 currentWindow.HTMLTextAreaElement.prototype, 29384 "value" 29385 ], 29386 // Some UI library use selectedIndex to set select value 29387 [ 29388 currentWindow.HTMLSelectElement.prototype, 29389 "selectedIndex" 29390 ], 29391 [ 29392 currentWindow.HTMLOptionElement.prototype, 29393 "selected" 29394 ] 29395 ]; 29396 if (propertyDescriptor && propertyDescriptor.set) { 29397 var _handlers; 29398 (_handlers = handlers).push.apply(_handlers, [].concat(hookProperties.map(function(p) { 29399 return $a44aab89caa44953$var$hookSetter(p[0], p[1], { 29400 set: function set() { 29401 $a44aab89caa44953$var$callbackWrapper(eventHandler)({ 29402 target: this, 29403 isTrusted: false 29404 }); 29405 } 29406 }, false, currentWindow); 29407 }))); 29408 } 29409 return $a44aab89caa44953$var$callbackWrapper(function() {
29410 handlers.forEach(function(h) { 29411 return h(); 29412 }); 29413 }); 29414} 29415function $a44aab89caa44953$var$getNestedCSSRulePositions(rule2) { 29416 var positions = []; 29417 function recurse(childRule, pos) { 29418 if ($a44aab89caa44953$var$hasNestedCSSRule("CSSGroupingRule") && $a44aab89caa44953$var$_instanceof(childRule.parentRule, CSSGroupingRule) || $a44aab89caa44953$var$hasNestedCSSRule("CSSMediaRule") && $a44aab89caa44953$var$_instanceof(childRule.parentRule, CSSMediaRule) || $a44aab89caa44953$var$hasNestedCSSRule("CSSSupportsRule") && $a44aab89caa44953$var$_instanceof(childRule.parentRule, CSSSupportsRule) || $a44aab89caa44953$var$hasNestedCSSRule("CSSConditionRule") && $a44aab89caa44953$var$_instanceof(childRule.parentRule, CSSConditionRule)) { 29419 var rules2 = Array.from(childRule.parentRule.cssRules); 29420 var index2 = rules2.indexOf(childRule); 29421 pos.unshift(index2); 29422 } else if (childRule.parentStyleSheet) { 29423 var rules21 = Array.from(childRule.parentStyleSheet.cssRules); 29424 var index21 = rules21.indexOf(childRule); 29425 pos.unshift(index21); 29426 } 29427 return pos; 29428 } 29429 return recurse(rule2, positions); 29430} 29431function $a44aab89caa44953$var$getIdAndStyleId(sheet, mirror2, styleMirror) { 29432 var id, styleId; 29433 if (!sheet) return {}; 29434 if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode); 29435 else styleId = styleMirror.getId(sheet); 29436 return { 29437 styleId: styleId, 29438 id: id 29439 }; 29440} 29441function $a44aab89caa44953$var$initStyleSheetObserver(param, param1) { 29442 var styleSheetRuleCb = param.styleSheetRuleCb, mirror2 = param.mirror, stylesheetManager = param.stylesheetManager; 29443 var win = param1.win; 29444 if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) return function() {}; 29445 var insertRule = win.CSSStyleSheet.prototype.insertRule; 29446 win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, { 29447 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29448 var rule2 = argumentsList[0], index2 = argumentsList[1]; 29449 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29450 if (id && id !== -1 || styleId && styleId !== -1) styleSheetRuleCb({ 29451 id: id, 29452 styleId: styleId, 29453 adds: [ 29454 { 29455 rule: rule2, 29456 index: index2 29457 } 29458 ] 29459 }); 29460 return target.apply(thisArg, argumentsList); 29461 }) 29462 }); 29463 win.CSSStyleSheet.prototype.addRule = function(selector, styleBlock, index2) { 29464 if (index2 === void 0) index2 = this.cssRules.length; 29465 var rule2 = selector + " { " + styleBlock + " }"; 29466 return win.CSSStyleSheet.prototype.insertRule.apply(this, [ 29467 rule2, 29468 index2 29469 ]); 29470 }; 29471 var deleteRule = win.CSSStyleSheet.prototype.deleteRule; 29472 win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, { 29473 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29474 var index2 = argumentsList[0]; 29475 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29476 if (id && id !== -1 || styleId && styleId !== -1) styleSheetRuleCb({ 29477 id: id, 29478 styleId: styleId, 29479 removes: [ 29480 { 29481 index: index2 29482 } 29483 ] 29484 }); 29485 return target.apply(thisArg, argumentsList); 29486 }) 29487 }); 29488 win.CSSStyleSheet.prototype.removeRule = function(index2) { 29489 return win.CSSStyleSheet.prototype.deleteRule.apply(this, [ 29490 index2 29491 ]); 29492 }; 29493 var replace; 29494 if (win.CSSStyleSheet.prototype.replace) { 29495 replace = win.CSSStyleSheet.prototype.replace; 29496 win.CSSStyleSheet.prototype.replace = new Proxy(replace, { 29497 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29498 var text = argumentsList[0]; 29499 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29500 if (id && id !== -1 || styleId && styleId !== -1) styleSheetRuleCb({ 29501 id: id, 29502 styleId: styleId, 29503 replace: text 29504 }); 29505 return target.apply(thisArg, argumentsList); 29506 }) 29507 }); 29508 } 29509 var replaceSync; 29510 if (win.CSSStyleSheet.prototype.replaceSync) { 29511 replaceSync = win.CSSStyleSheet.prototype.replaceSync; 29512 win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, { 29513 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29514 var text = argumentsList[0]; 29515 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29516 if (id && id !== -1 || styleId && styleId !== -1) styleSheetRuleCb({ 29517 id: id, 29518 styleId: styleId, 29519 replaceSync: text 29520 }); 29521 return target.apply(thisArg, argumentsList); 29522 }) 29523 }); 29524 } 29525 var supportedNestedCSSRuleTypes = {}; 29526 if ($a44aab89caa44953$var$canMonkeyPatchNestedCSSRule("CSSGroupingRule")) supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule; 29527 else { 29528 if ($a44aab89caa44953$var$canMonkeyPatchNestedCSSRule("CSSMediaRule")) supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule; 29529 if ($a44aab89caa44953$var$canMonkeyPatchNestedCSSRule("CSSConditionRule")) supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule; 29530 if ($a44aab89caa44953$var$canMonkeyPatchNestedCSSRule("CSSSupportsRule")) supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule; 29531 } 29532 var unmodifiedFunctions = {};
vendor: 4,943 bytes, lines 29533-29619
29533 Object.entries(supportedNestedCSSRuleTypes).forEach(function(param) { 29534 var typeKey = param[0], type = param[1]; 29535 unmodifiedFunctions[typeKey] = { 29536 // eslint-disable-next-line @typescript-eslint/unbound-method 29537 insertRule: type.prototype.insertRule, 29538 // eslint-disable-next-line @typescript-eslint/unbound-method 29539 deleteRule: type.prototype.deleteRule 29540 }; 29541 type.prototype.insertRule = new Proxy(unmodifiedFunctions[typeKey].insertRule, { 29542 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29543 var rule2 = argumentsList[0], index2 = argumentsList[1]; 29544 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId(thisArg.parentStyleSheet, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29545 if (id && id !== -1 || styleId && styleId !== -1) styleSheetRuleCb({ 29546 id: id, 29547 styleId: styleId, 29548 adds: [ 29549 { 29550 rule: rule2, 29551 index: [].concat($a44aab89caa44953$var$getNestedCSSRulePositions(thisArg), [ 29552 index2 || 0 29553 ]) 29554 } 29555 ] 29556 }); 29557 return target.apply(thisArg, argumentsList); 29558 }) 29559 }); 29560 type.prototype.deleteRule = new Proxy(unmodifiedFunctions[typeKey].deleteRule, { 29561 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29562 var index2 = argumentsList[0]; 29563 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId(thisArg.parentStyleSheet, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29564 if (id && id !== -1 || styleId && styleId !== -1) styleSheetRuleCb({ 29565 id: id, 29566 styleId: styleId, 29567 removes: [ 29568 { 29569 index: [].concat($a44aab89caa44953$var$getNestedCSSRulePositions(thisArg), [ 29570 index2 29571 ]) 29572 } 29573 ] 29574 }); 29575 return target.apply(thisArg, argumentsList); 29576 }) 29577 }); 29578 }); 29579 return $a44aab89caa44953$var$callbackWrapper(function() { 29580 win.CSSStyleSheet.prototype.insertRule = insertRule; 29581 win.CSSStyleSheet.prototype.deleteRule = deleteRule; 29582 replace && (win.CSSStyleSheet.prototype.replace = replace); 29583 replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync); 29584 Object.entries(supportedNestedCSSRuleTypes).forEach(function(param) { 29585 var typeKey = param[0], type = param[1]; 29586 type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule; 29587 type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule; 29588 }); 29589 }); 29590} 29591function $a44aab89caa44953$var$initAdoptedStyleSheetObserver(param, host2) { 29592 var mirror2 = param.mirror, stylesheetManager = param.stylesheetManager; 29593 var _a2, _b, _c; 29594 var hostId = null; 29595 if (host2.nodeName === "#document") hostId = mirror2.getId(host2); 29596 else hostId = mirror2.getId($a44aab89caa44953$var$index.host(host2)); 29597 var patchTarget = host2.nodeName === "#document" ? (_a2 = host2.defaultView) == null ? void 0 : _a2.Document : (_c = (_b = host2.ownerDocument) == null ? void 0 : _b.defaultView) == null ? void 0 : _c.ShadowRoot; 29598 var originalPropertyDescriptor = (patchTarget == null ? void 0 : patchTarget.prototype) ? Object.getOwnPropertyDescriptor(patchTarget == null ? void 0 : patchTarget.prototype, "adoptedStyleSheets") : void 0; 29599 if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor) return function() {}; 29600 Object.defineProperty(host2, "adoptedStyleSheets", { 29601 configurable: originalPropertyDescriptor.configurable, 29602 enumerable: originalPropertyDescriptor.enumerable, 29603 get: function get() { 29604 var _a3; 29605 return (_a3 = originalPropertyDescriptor.get) == null ? void 0 : _a3.call(this); 29606 }, 29607 set: function set(sheets) { 29608 var _a3; 29609 var result2 = (_a3 = originalPropertyDescriptor.set) == null ? void 0 : _a3.call(this, sheets); 29610 if (hostId !== null && hostId !== -1) try { 29611 stylesheetManager.adoptStyleSheets(sheets, hostId); 29612 } catch (e2) {} 29613 return result2; 29614 } 29615 }); 29616 return $a44aab89caa44953$var$callbackWrapper(function() { 29617 Object.defineProperty(host2, "adoptedStyleSheets", { 29618 configurable: originalPropertyDescriptor.configurable, 29619 enumerable: originalPropertyDescriptor.enumerable,
29620 // eslint-disable-next-line @typescript-eslint/unbound-method 29621 get: originalPropertyDescriptor.get, 29622 // eslint-disable-next-line @typescript-eslint/unbound-method 29623 set: originalPropertyDescriptor.set 29624 }); 29625 }); 29626} 29627function $a44aab89caa44953$var$initStyleDeclarationObserver(param, param1) { 29628 var styleDeclarationCb = param.styleDeclarationCb, mirror2 = param.mirror, ignoreCSSAttributes = param.ignoreCSSAttributes, stylesheetManager = param.stylesheetManager; 29629 var win = param1.win; 29630 var setProperty = win.CSSStyleDeclaration.prototype.setProperty; 29631 win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, { 29632 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29633 var _a2; 29634 var property = argumentsList[0], value = argumentsList[1], priority = argumentsList[2]; 29635 if (ignoreCSSAttributes.has(property)) return setProperty.apply(thisArg, [ 29636 property, 29637 value, 29638 priority 29639 ]); 29640 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId((_a2 = thisArg.parentRule) == null ? void 0 : _a2.parentStyleSheet, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29641 if (id && id !== -1 || styleId && styleId !== -1) styleDeclarationCb({ 29642 id: id, 29643 styleId: styleId, 29644 set: { 29645 property: property, 29646 value: value, 29647 priority: priority 29648 }, 29649 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 29650 index: $a44aab89caa44953$var$getNestedCSSRulePositions(thisArg.parentRule) 29651 }); 29652 return target.apply(thisArg, argumentsList); 29653 }) 29654 }); 29655 var removeProperty = win.CSSStyleDeclaration.prototype.removeProperty; 29656 win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, { 29657 apply: $a44aab89caa44953$var$callbackWrapper(function(target, thisArg, argumentsList) { 29658 var _a2; 29659 var property = argumentsList[0]; 29660 if (ignoreCSSAttributes.has(property)) return removeProperty.apply(thisArg, [ 29661 property 29662 ]); 29663 var _getIdAndStyleId = $a44aab89caa44953$var$getIdAndStyleId((_a2 = thisArg.parentRule) == null ? void 0 : _a2.parentStyleSheet, mirror2, stylesheetManager.styleMirror), id = _getIdAndStyleId.id, styleId = _getIdAndStyleId.styleId; 29664 if (id && id !== -1 || styleId && styleId !== -1) styleDeclarationCb({ 29665 id: id, 29666 styleId: styleId, 29667 remove: { 29668 property: property 29669 }, 29670 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 29671 index: $a44aab89caa44953$var$getNestedCSSRulePositions(thisArg.parentRule) 29672 }); 29673 return target.apply(thisArg, argumentsList); 29674 }) 29675 }); 29676 return $a44aab89caa44953$var$callbackWrapper(function() { 29677 win.CSSStyleDeclaration.prototype.setProperty = setProperty; 29678 win.CSSStyleDeclaration.prototype.removeProperty = removeProperty; 29679 }); 29680} 29681function $a44aab89caa44953$var$initMediaInteractionObserver(param) { 29682 var mediaInteractionCb = param.mediaInteractionCb, blockClass = param.blockClass, blockSelector = param.blockSelector, mirror2 = param.mirror, sampling = param.sampling, doc = param.doc; 29683 var handler = $a44aab89caa44953$var$callbackWrapper(function(type) { 29684 return $a44aab89caa44953$var$throttle($a44aab89caa44953$var$callbackWrapper(function(event) { 29685 var target = $a44aab89caa44953$var$getEventTarget(event); 29686 if (!target || $a44aab89caa44953$var$isBlocked(target, blockClass, blockSelector, true)) return; 29687 var currentTime = target.currentTime, volume = target.volume, muted = target.muted, playbackRate = target.playbackRate, loop = target.loop; 29688 mediaInteractionCb({ 29689 type: type, 29690 id: mirror2.getId(target), 29691 currentTime: currentTime, 29692 volume: volume, 29693 muted: muted, 29694 playbackRate: playbackRate, 29695 loop: loop 29696 }); 29697 }), sampling.media || 500); 29698 }); 29699 var handlers = [ 29700 $a44aab89caa44953$var$on("play", handler($a44aab89caa44953$var$MediaInteractions.Play), doc), 29701 $a44aab89caa44953$var$on("pause", handler($a44aab89caa44953$var$MediaInteractions.Pause), doc), 29702 $a44aab89caa44953$var$on("seeked", handler($a44aab89caa44953$var$MediaInteractions.Seeked), doc), 29703 $a44aab89caa44953$var$on("volumechange", handler($a44aab89caa44953$var$MediaInteractions.VolumeChange), doc), 29704 $a44aab89caa44953$var$on("ratechange", handler($a44aab89caa44953$var$MediaInteractions.RateChange), doc) 29705 ]; 29706 return $a44aab89caa44953$var$callbackWrapper(function() {
vendor: 4,575 bytes, lines 29707-29810
29707 handlers.forEach(function(h) { 29708 return h(); 29709 }); 29710 }); 29711} 29712function $a44aab89caa44953$var$initFontObserver(param) { 29713 var fontCb = param.fontCb, doc = param.doc; 29714 var win = doc.defaultView; 29715 if (!win) return function() {}; 29716 var handlers = []; 29717 var fontMap = /* @__PURE__ */ new WeakMap(); 29718 var originalFontFace = win.FontFace; 29719 win.FontFace = function FontFace2(family, source, descriptors) { 29720 var fontFace = new originalFontFace(family, source, descriptors); 29721 fontMap.set(fontFace, { 29722 family: family, 29723 buffer: typeof source !== "string", 29724 descriptors: descriptors, 29725 fontSource: typeof source === "string" ? source : JSON.stringify(Array.from(new Uint8Array(source))) 29726 }); 29727 return fontFace; 29728 }; 29729 var restoreHandler = $a44aab89caa44953$var$patch(doc.fonts, "add", function(original) { 29730 return function(fontFace) { 29731 setTimeout($a44aab89caa44953$var$callbackWrapper(function() { 29732 var p = fontMap.get(fontFace); 29733 if (p) { 29734 fontCb(p); 29735 fontMap.delete(fontFace); 29736 } 29737 }), 0); 29738 return original.apply(this, [ 29739 fontFace 29740 ]); 29741 }; 29742 }); 29743 handlers.push(function() { 29744 win.FontFace = originalFontFace; 29745 }); 29746 handlers.push(restoreHandler); 29747 return $a44aab89caa44953$var$callbackWrapper(function() { 29748 handlers.forEach(function(h) { 29749 return h(); 29750 }); 29751 }); 29752} 29753function $a44aab89caa44953$var$initSelectionObserver(param) { 29754 var doc = param.doc, mirror2 = param.mirror, blockClass = param.blockClass, blockSelector = param.blockSelector, selectionCb = param.selectionCb; 29755 var collapsed = true; 29756 var updateSelection = $a44aab89caa44953$var$callbackWrapper(function() { 29757 var selection = doc.getSelection(); 29758 if (!selection || collapsed && (selection == null ? void 0 : selection.isCollapsed)) return; 29759 collapsed = selection.isCollapsed || false; 29760 var ranges = []; 29761 var count = selection.rangeCount || 0; 29762 for(var i2 = 0; i2 < count; i2++){ 29763 var range = selection.getRangeAt(i2); 29764 var startContainer = range.startContainer, startOffset = range.startOffset, endContainer = range.endContainer, endOffset = range.endOffset; 29765 var blocked = $a44aab89caa44953$var$isBlocked(startContainer, blockClass, blockSelector, true) || $a44aab89caa44953$var$isBlocked(endContainer, blockClass, blockSelector, true); 29766 if (blocked) continue; 29767 ranges.push({ 29768 start: mirror2.getId(startContainer), 29769 startOffset: startOffset, 29770 end: mirror2.getId(endContainer), 29771 endOffset: endOffset 29772 }); 29773 } 29774 selectionCb({ 29775 ranges: ranges 29776 }); 29777 }); 29778 updateSelection(); 29779 return $a44aab89caa44953$var$on("selectionchange", updateSelection); 29780} 29781function $a44aab89caa44953$var$initCustomElementObserver(param) { 29782 var doc = param.doc, customElementCb = param.customElementCb; 29783 var win = doc.defaultView; 29784 if (!win || !win.customElements) return function() {}; 29785 var restoreHandler = $a44aab89caa44953$var$patch(win.customElements, "define", function(original) { 29786 return function(name, constructor, options) { 29787 try { 29788 customElementCb({ 29789 define: { 29790 name: name 29791 } 29792 }); 29793 } catch (e2) { 29794 console.warn("Custom element callback failed for " + name); 29795 } 29796 return original.apply(this, [ 29797 name, 29798 constructor, 29799 options 29800 ]); 29801 }; 29802 }); 29803 return restoreHandler; 29804} 29805function $a44aab89caa44953$var$mergeHooks(o2, hooks) { 29806 var mutationCb = o2.mutationCb, mousemoveCb = o2.mousemoveCb, mouseInteractionCb = o2.mouseInteractionCb, scrollCb = o2.scrollCb, viewportResizeCb = o2.viewportResizeCb, inputCb = o2.inputCb, mediaInteractionCb = o2.mediaInteractionCb, styleSheetRuleCb = o2.styleSheetRuleCb, styleDeclarationCb = o2.styleDeclarationCb, canvasMutationCb = o2.canvasMutationCb, fontCb = o2.fontCb, selectionCb = o2.selectionCb, customElementCb = o2.customElementCb; 29807 o2.mutationCb = function() { 29808 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29809 if (hooks.mutation) { 29810 var _hooks;
29811 (_hooks = hooks).mutation.apply(_hooks, [].concat(p)); 29812 } 29813 mutationCb.apply(void 0, [].concat(p)); 29814 }; 29815 o2.mousemoveCb = function() { 29816 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29817 if (hooks.mousemove) { 29818 var _hooks; 29819 (_hooks = hooks).mousemove.apply(_hooks, [].concat(p)); 29820 } 29821 mousemoveCb.apply(void 0, [].concat(p)); 29822 }; 29823 o2.mouseInteractionCb = function() { 29824 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29825 if (hooks.mouseInteraction) { 29826 var _hooks; 29827 (_hooks = hooks).mouseInteraction.apply(_hooks, [].concat(p)); 29828 } 29829 mouseInteractionCb.apply(void 0, [].concat(p)); 29830 }; 29831 o2.scrollCb = function() { 29832 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29833 if (hooks.scroll) { 29834 var _hooks; 29835 (_hooks = hooks).scroll.apply(_hooks, [].concat(p)); 29836 } 29837 scrollCb.apply(void 0, [].concat(p)); 29838 }; 29839 o2.viewportResizeCb = function() { 29840 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29841 if (hooks.viewportResize) { 29842 var _hooks; 29843 (_hooks = hooks).viewportResize.apply(_hooks, [].concat(p)); 29844 } 29845 viewportResizeCb.apply(void 0, [].concat(p)); 29846 }; 29847 o2.inputCb = function() { 29848 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29849 if (hooks.input) { 29850 var _hooks; 29851 (_hooks = hooks).input.apply(_hooks, [].concat(p)); 29852 } 29853 inputCb.apply(void 0, [].concat(p)); 29854 }; 29855 o2.mediaInteractionCb = function() { 29856 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29857 if (hooks.mediaInteaction) { 29858 var _hooks; 29859 (_hooks = hooks).mediaInteaction.apply(_hooks, [].concat(p)); 29860 } 29861 mediaInteractionCb.apply(void 0, [].concat(p)); 29862 }; 29863 o2.styleSheetRuleCb = function() { 29864 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29865 if (hooks.styleSheetRule) { 29866 var _hooks; 29867 (_hooks = hooks).styleSheetRule.apply(_hooks, [].concat(p)); 29868 } 29869 styleSheetRuleCb.apply(void 0, [].concat(p)); 29870 }; 29871 o2.styleDeclarationCb = function() { 29872 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29873 if (hooks.styleDeclaration) { 29874 var _hooks; 29875 (_hooks = hooks).styleDeclaration.apply(_hooks, [].concat(p)); 29876 } 29877 styleDeclarationCb.apply(void 0, [].concat(p)); 29878 }; 29879 o2.canvasMutationCb = function() { 29880 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29881 if (hooks.canvasMutation) { 29882 var _hooks; 29883 (_hooks = hooks).canvasMutation.apply(_hooks, [].concat(p)); 29884 } 29885 canvasMutationCb.apply(void 0, [].concat(p)); 29886 }; 29887 o2.fontCb = function() { 29888 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29889 if (hooks.font) { 29890 var _hooks; 29891 (_hooks = hooks).font.apply(_hooks, [].concat(p)); 29892 } 29893 fontCb.apply(void 0, [].concat(p)); 29894 }; 29895 o2.selectionCb = function() { 29896 for(var _len = arguments.length, p = new Array(_len), _key = 0; _key < _len; _key++)p[_key] = arguments[_key]; 29897 if (hooks.selection) { 29898 var _hooks; 29899 (_hooks = hooks).selection.apply(_hooks, [].concat(p)); 29900 } 29901 selectionCb.apply(void 0, [].concat(p)); 29902 }; 29903 o2.customElementCb = function() { 29904 for(var _len = arguments.length, c2 = new Array(_len), _key = 0; _key < _len; _key++)c2[_key] = arguments[_key]; 29905 if (hooks.customElement) { 29906 var _hooks;
vendor: 11,462 bytes, lines 29907-30136
29907 (_hooks = hooks).customElement.apply(_hooks, [].concat(c2)); 29908 } 29909 customElementCb.apply(void 0, [].concat(c2)); 29910 }; 29911} 29912function $a44aab89caa44953$var$initObservers(o2, hooks) { 29913 if (hooks === void 0) hooks = {}; 29914 var currentWindow = o2.doc.defaultView; 29915 if (!currentWindow) return function() {}; 29916 $a44aab89caa44953$var$mergeHooks(o2, hooks); 29917 var mutationObserver; 29918 if (o2.recordDOM) mutationObserver = $a44aab89caa44953$var$initMutationObserver(o2, o2.doc); 29919 var mousemoveHandler = $a44aab89caa44953$var$initMoveObserver(o2); 29920 var mouseInteractionHandler = $a44aab89caa44953$var$initMouseInteractionObserver(o2); 29921 var scrollHandler = $a44aab89caa44953$var$initScrollObserver(o2); 29922 var viewportResizeHandler = $a44aab89caa44953$var$initViewportResizeObserver(o2, { 29923 win: currentWindow 29924 }); 29925 var inputHandler = $a44aab89caa44953$var$initInputObserver(o2); 29926 var mediaInteractionHandler = $a44aab89caa44953$var$initMediaInteractionObserver(o2); 29927 var styleSheetObserver = function() {}; 29928 var adoptedStyleSheetObserver = function() {}; 29929 var styleDeclarationObserver = function() {}; 29930 var fontObserver = function() {}; 29931 if (o2.recordDOM) { 29932 styleSheetObserver = $a44aab89caa44953$var$initStyleSheetObserver(o2, { 29933 win: currentWindow 29934 }); 29935 adoptedStyleSheetObserver = $a44aab89caa44953$var$initAdoptedStyleSheetObserver(o2, o2.doc); 29936 styleDeclarationObserver = $a44aab89caa44953$var$initStyleDeclarationObserver(o2, { 29937 win: currentWindow 29938 }); 29939 if (o2.collectFonts) fontObserver = $a44aab89caa44953$var$initFontObserver(o2); 29940 } 29941 var selectionObserver = $a44aab89caa44953$var$initSelectionObserver(o2); 29942 var customElementObserver = $a44aab89caa44953$var$initCustomElementObserver(o2); 29943 var pluginHandlers = []; 29944 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(o2.plugins), _step; !(_step = _iterator()).done;){ 29945 var plugin3 = _step.value; 29946 pluginHandlers.push(plugin3.observer(plugin3.callback, currentWindow, plugin3.options)); 29947 } 29948 return $a44aab89caa44953$var$callbackWrapper(function() { 29949 $a44aab89caa44953$var$mutationBuffers.forEach(function(b) { 29950 return b.reset(); 29951 }); 29952 mutationObserver == null || mutationObserver.disconnect(); 29953 mousemoveHandler(); 29954 mouseInteractionHandler(); 29955 scrollHandler(); 29956 viewportResizeHandler(); 29957 inputHandler(); 29958 mediaInteractionHandler(); 29959 styleSheetObserver(); 29960 adoptedStyleSheetObserver(); 29961 styleDeclarationObserver(); 29962 fontObserver(); 29963 selectionObserver(); 29964 customElementObserver(); 29965 pluginHandlers.forEach(function(h) { 29966 return h(); 29967 }); 29968 }); 29969} 29970function $a44aab89caa44953$var$hasNestedCSSRule(prop) { 29971 return typeof window[prop] !== "undefined"; 29972} 29973function $a44aab89caa44953$var$canMonkeyPatchNestedCSSRule(prop) { 29974 return Boolean(typeof window[prop] !== "undefined" && // Note: Generally, this check _shouldn't_ be necessary 29975 // However, in some scenarios (e.g. jsdom) this can sometimes fail, so we check for it here 29976 window[prop].prototype && "insertRule" in window[prop].prototype && "deleteRule" in window[prop].prototype); 29977} 29978var $a44aab89caa44953$var$CrossOriginIframeMirror = /*#__PURE__*/ function() { 29979 function CrossOriginIframeMirror(generateIdFn) { 29980 $a44aab89caa44953$var$__publicField(this, "iframeIdToRemoteIdMap", /* @__PURE__ */ new WeakMap()); 29981 $a44aab89caa44953$var$__publicField(this, "iframeRemoteIdToIdMap", /* @__PURE__ */ new WeakMap()); 29982 this.generateIdFn = generateIdFn; 29983 } 29984 var _proto = CrossOriginIframeMirror.prototype; 29985 _proto.getId = function getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) { 29986 var idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe); 29987 var remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe); 29988 var id = idToRemoteIdMap.get(remoteId); 29989 if (!id) { 29990 id = this.generateIdFn(); 29991 idToRemoteIdMap.set(remoteId, id); 29992 remoteIdToIdMap.set(id, remoteId); 29993 } 29994 return id; 29995 }; 29996 _proto.getIds = function getIds(iframe, remoteId) { 29997 var _this = this; 29998 var idToRemoteIdMap = this.getIdToRemoteIdMap(iframe); 29999 var remoteIdToIdMap = this.getRemoteIdToIdMap(iframe); 30000 return remoteId.map(function(id) { 30001 return _this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap); 30002 }); 30003 }; 30004 _proto.getRemoteId = function getRemoteId(iframe, id, map) { 30005 var remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe); 30006 if (typeof id !== "number") return id; 30007 var remoteId = remoteIdToIdMap.get(id); 30008 if (!remoteId) return -1; 30009 return remoteId; 30010 }; 30011 _proto.getRemoteIds = function getRemoteIds(iframe, ids) { 30012 var _this = this; 30013 var remoteIdToIdMap = this.getRemoteIdToIdMap(iframe); 30014 return ids.map(function(id) { 30015 return _this.getRemoteId(iframe, id, remoteIdToIdMap); 30016 }); 30017 }; 30018 _proto.reset = function reset(iframe) { 30019 if (!iframe) { 30020 this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap(); 30021 this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap(); 30022 return; 30023 } 30024 this.iframeIdToRemoteIdMap.delete(iframe); 30025 this.iframeRemoteIdToIdMap.delete(iframe); 30026 }; 30027 _proto.getIdToRemoteIdMap = function getIdToRemoteIdMap(iframe) { 30028 var idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe); 30029 if (!idToRemoteIdMap) { 30030 idToRemoteIdMap = /* @__PURE__ */ new Map(); 30031 this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap); 30032 } 30033 return idToRemoteIdMap; 30034 }; 30035 _proto.getRemoteIdToIdMap = function getRemoteIdToIdMap(iframe) { 30036 var remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe); 30037 if (!remoteIdToIdMap) { 30038 remoteIdToIdMap = /* @__PURE__ */ new Map(); 30039 this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap); 30040 } 30041 return remoteIdToIdMap; 30042 }; 30043 return CrossOriginIframeMirror; 30044}(); 30045var $a44aab89caa44953$var$IframeManager = /*#__PURE__*/ function() { 30046 function IframeManager(options) { 30047 $a44aab89caa44953$var$__publicField(this, "iframes", /* @__PURE__ */ new WeakMap()); 30048 $a44aab89caa44953$var$__publicField(this, "crossOriginIframeMap", /* @__PURE__ */ new WeakMap()); 30049 $a44aab89caa44953$var$__publicField(this, "crossOriginIframeMirror", new $a44aab89caa44953$var$CrossOriginIframeMirror($a44aab89caa44953$var$genId)); 30050 $a44aab89caa44953$var$__publicField(this, "crossOriginIframeStyleMirror"); 30051 $a44aab89caa44953$var$__publicField(this, "crossOriginIframeRootIdMap", /* @__PURE__ */ new WeakMap()); 30052 $a44aab89caa44953$var$__publicField(this, "mirror"); 30053 $a44aab89caa44953$var$__publicField(this, "mutationCb"); 30054 $a44aab89caa44953$var$__publicField(this, "wrappedEmit"); 30055 $a44aab89caa44953$var$__publicField(this, "loadListener"); 30056 $a44aab89caa44953$var$__publicField(this, "stylesheetManager"); 30057 $a44aab89caa44953$var$__publicField(this, "recordCrossOriginIframes"); 30058 this.mutationCb = options.mutationCb; 30059 this.wrappedEmit = options.wrappedEmit; 30060 this.stylesheetManager = options.stylesheetManager; 30061 this.recordCrossOriginIframes = options.recordCrossOriginIframes; 30062 this.crossOriginIframeStyleMirror = new $a44aab89caa44953$var$CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)); 30063 this.mirror = options.mirror; 30064 if (this.recordCrossOriginIframes) window.addEventListener("message", this.handleMessage.bind(this)); 30065 } 30066 var _proto = IframeManager.prototype; 30067 _proto.addIframe = function addIframe(iframeEl) { 30068 this.iframes.set(iframeEl, true); 30069 if (iframeEl.contentWindow) this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl); 30070 }; 30071 _proto.addLoadListener = function addLoadListener(cb) { 30072 this.loadListener = cb; 30073 }; 30074 _proto.attachIframe = function attachIframe(iframeEl, childSn) { 30075 var _a2, _b; 30076 this.mutationCb({ 30077 adds: [ 30078 { 30079 parentId: this.mirror.getId(iframeEl), 30080 nextId: null, 30081 node: childSn 30082 } 30083 ], 30084 removes: [], 30085 texts: [], 30086 attributes: [], 30087 isAttachIframe: true 30088 }); 30089 if (this.recordCrossOriginIframes) (_a2 = iframeEl.contentWindow) == null || _a2.addEventListener("message", this.handleMessage.bind(this)); 30090 (_b = this.loadListener) == null || _b.call(this, iframeEl); 30091 if (iframeEl.contentDocument && iframeEl.contentDocument.adoptedStyleSheets && iframeEl.contentDocument.adoptedStyleSheets.length > 0) this.stylesheetManager.adoptStyleSheets(iframeEl.contentDocument.adoptedStyleSheets, this.mirror.getId(iframeEl.contentDocument)); 30092 }; 30093 _proto.handleMessage = function handleMessage(message) { 30094 var crossOriginMessageEvent = message; 30095 if (crossOriginMessageEvent.data.type !== "rrweb" || // To filter out the rrweb messages which are forwarded by some sites. 30096 crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin) return; 30097 var iframeSourceWindow = message.source; 30098 if (!iframeSourceWindow) return; 30099 var iframeEl = this.crossOriginIframeMap.get(message.source); 30100 if (!iframeEl) return; 30101 var transformedEvent = this.transformCrossOriginEvent(iframeEl, crossOriginMessageEvent.data.event); 30102 if (transformedEvent) this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout); 30103 }; 30104 _proto.transformCrossOriginEvent = function transformCrossOriginEvent(iframeEl, e2) { 30105 var _this = this; 30106 var _a2; 30107 switch(e2.type){ 30108 case $a44aab89caa44953$var$EventType.FullSnapshot: 30109 this.crossOriginIframeMirror.reset(iframeEl); 30110 this.crossOriginIframeStyleMirror.reset(iframeEl); 30111 this.replaceIdOnNode(e2.data.node, iframeEl); 30112 var rootId = e2.data.node.id; 30113 this.crossOriginIframeRootIdMap.set(iframeEl, rootId); 30114 this.patchRootIdOnNode(e2.data.node, rootId); 30115 return { 30116 timestamp: e2.timestamp, 30117 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 30118 data: { 30119 source: $a44aab89caa44953$var$IncrementalSource.Mutation, 30120 adds: [ 30121 { 30122 parentId: this.mirror.getId(iframeEl), 30123 nextId: null, 30124 node: e2.data.node 30125 } 30126 ], 30127 removes: [], 30128 texts: [], 30129 attributes: [], 30130 isAttachIframe: true 30131 } 30132 }; 30133 case $a44aab89caa44953$var$EventType.Meta: 30134 case $a44aab89caa44953$var$EventType.Load: 30135 case $a44aab89caa44953$var$EventType.DomContentLoaded: 30136 return false;
30137 case $a44aab89caa44953$var$EventType.Plugin: 30138 return e2; 30139 case $a44aab89caa44953$var$EventType.Custom: 30140 this.replaceIds(e2.data.payload, iframeEl, [ 30141 "id", 30142 "parentId", 30143 "previousId", 30144 "nextId" 30145 ]); 30146 return e2; 30147 case $a44aab89caa44953$var$EventType.IncrementalSnapshot: 30148 switch(e2.data.source){ 30149 case $a44aab89caa44953$var$IncrementalSource.Mutation: 30150 e2.data.adds.forEach(function(n2) { 30151 _this.replaceIds(n2, iframeEl, [ 30152 "parentId", 30153 "nextId", 30154 "previousId" 30155 ]); 30156 _this.replaceIdOnNode(n2.node, iframeEl); 30157 var rootId = _this.crossOriginIframeRootIdMap.get(iframeEl); 30158 rootId && _this.patchRootIdOnNode(n2.node, rootId); 30159 }); 30160 e2.data.removes.forEach(function(n2) { 30161 _this.replaceIds(n2, iframeEl, [ 30162 "parentId", 30163 "id" 30164 ]); 30165 }); 30166 e2.data.attributes.forEach(function(n2) { 30167 _this.replaceIds(n2, iframeEl, [ 30168 "id" 30169 ]); 30170 }); 30171 e2.data.texts.forEach(function(n2) { 30172 _this.replaceIds(n2, iframeEl, [ 30173 "id" 30174 ]); 30175 }); 30176 return e2; 30177 case $a44aab89caa44953$var$IncrementalSource.Drag: 30178 case $a44aab89caa44953$var$IncrementalSource.TouchMove: 30179 case $a44aab89caa44953$var$IncrementalSource.MouseMove: 30180 e2.data.positions.forEach(function(p) { 30181 _this.replaceIds(p, iframeEl, [ 30182 "id" 30183 ]); 30184 }); 30185 return e2; 30186 case $a44aab89caa44953$var$IncrementalSource.ViewportResize: 30187 return false; 30188 case $a44aab89caa44953$var$IncrementalSource.MediaInteraction: 30189 case $a44aab89caa44953$var$IncrementalSource.MouseInteraction: 30190 case $a44aab89caa44953$var$IncrementalSource.Scroll: 30191 case $a44aab89caa44953$var$IncrementalSource.CanvasMutation: 30192 case $a44aab89caa44953$var$IncrementalSource.Input: 30193 this.replaceIds(e2.data, iframeEl, [ 30194 "id" 30195 ]); 30196 return e2; 30197 case $a44aab89caa44953$var$IncrementalSource.StyleSheetRule: 30198 case $a44aab89caa44953$var$IncrementalSource.StyleDeclaration: 30199 this.replaceIds(e2.data, iframeEl, [ 30200 "id" 30201 ]); 30202 this.replaceStyleIds(e2.data, iframeEl, [ 30203 "styleId" 30204 ]); 30205 return e2; 30206 case $a44aab89caa44953$var$IncrementalSource.Font: 30207 return e2; 30208 case $a44aab89caa44953$var$IncrementalSource.Selection: 30209 e2.data.ranges.forEach(function(range) { 30210 _this.replaceIds(range, iframeEl, [ 30211 "start", 30212 "end" 30213 ]); 30214 }); 30215 return e2; 30216 case $a44aab89caa44953$var$IncrementalSource.AdoptedStyleSheet: 30217 this.replaceIds(e2.data, iframeEl, [ 30218 "id" 30219 ]); 30220 this.replaceStyleIds(e2.data, iframeEl, [ 30221 "styleIds" 30222 ]); 30223 (_a2 = e2.data.styles) == null || _a2.forEach(function(style) { 30224 _this.replaceStyleIds(style, iframeEl, [ 30225 "styleId"
vendor: 5,304 bytes, lines 30226-30334
30226 ]); 30227 }); 30228 return e2; 30229 } 30230 } 30231 return false; 30232 }; 30233 _proto.replace = function replace(iframeMirror, obj, iframeEl, keys) { 30234 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(keys), _step; !(_step = _iterator()).done;){ 30235 var key = _step.value; 30236 if (!Array.isArray(obj[key]) && typeof obj[key] !== "number") continue; 30237 if (Array.isArray(obj[key])) obj[key] = iframeMirror.getIds(iframeEl, obj[key]); 30238 else obj[key] = iframeMirror.getId(iframeEl, obj[key]); 30239 } 30240 return obj; 30241 }; 30242 _proto.replaceIds = function replaceIds(obj, iframeEl, keys) { 30243 return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys); 30244 }; 30245 _proto.replaceStyleIds = function replaceStyleIds(obj, iframeEl, keys) { 30246 return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys); 30247 }; 30248 _proto.replaceIdOnNode = function replaceIdOnNode(node2, iframeEl) { 30249 var _this = this; 30250 this.replaceIds(node2, iframeEl, [ 30251 "id", 30252 "rootId" 30253 ]); 30254 if ("childNodes" in node2) node2.childNodes.forEach(function(child) { 30255 _this.replaceIdOnNode(child, iframeEl); 30256 }); 30257 }; 30258 _proto.patchRootIdOnNode = function patchRootIdOnNode(node2, rootId) { 30259 var _this = this; 30260 if (node2.type !== $a44aab89caa44953$var$NodeType.Document && !node2.rootId) node2.rootId = rootId; 30261 if ("childNodes" in node2) node2.childNodes.forEach(function(child) { 30262 _this.patchRootIdOnNode(child, rootId); 30263 }); 30264 }; 30265 return IframeManager; 30266}(); 30267var $a44aab89caa44953$var$ShadowDomManager = /*#__PURE__*/ function() { 30268 function ShadowDomManager(options) { 30269 $a44aab89caa44953$var$__publicField(this, "shadowDoms", /* @__PURE__ */ new WeakSet()); 30270 $a44aab89caa44953$var$__publicField(this, "mutationCb"); 30271 $a44aab89caa44953$var$__publicField(this, "scrollCb"); 30272 $a44aab89caa44953$var$__publicField(this, "bypassOptions"); 30273 $a44aab89caa44953$var$__publicField(this, "mirror"); 30274 $a44aab89caa44953$var$__publicField(this, "restoreHandlers", []); 30275 this.mutationCb = options.mutationCb; 30276 this.scrollCb = options.scrollCb; 30277 this.bypassOptions = options.bypassOptions; 30278 this.mirror = options.mirror; 30279 this.init(); 30280 } 30281 var _proto = ShadowDomManager.prototype; 30282 _proto.init = function init() { 30283 this.reset(); 30284 this.patchAttachShadow(Element, document); 30285 }; 30286 _proto.addShadowRoot = function addShadowRoot(shadowRoot2, doc) { 30287 var _this = this; 30288 if (!$a44aab89caa44953$var$isNativeShadowDom(shadowRoot2)) return; 30289 if (this.shadowDoms.has(shadowRoot2)) return; 30290 this.shadowDoms.add(shadowRoot2); 30291 var observer = $a44aab89caa44953$var$initMutationObserver($a44aab89caa44953$var$_extends({}, this.bypassOptions, { 30292 doc: doc, 30293 mutationCb: this.mutationCb, 30294 mirror: this.mirror, 30295 shadowDomManager: this 30296 }), shadowRoot2); 30297 this.restoreHandlers.push(function() { 30298 return observer.disconnect(); 30299 }); 30300 this.restoreHandlers.push($a44aab89caa44953$var$initScrollObserver($a44aab89caa44953$var$_extends({}, this.bypassOptions, { 30301 scrollCb: this.scrollCb, 30302 // https://gist.github.com/praveenpuglia/0832da687ed5a5d7a0907046c9ef1813 30303 // scroll is not allowed to pass the boundary, so we need to listen the shadow document 30304 doc: shadowRoot2, 30305 mirror: this.mirror 30306 }))); 30307 setTimeout(function() { 30308 if (shadowRoot2.adoptedStyleSheets && shadowRoot2.adoptedStyleSheets.length > 0) _this.bypassOptions.stylesheetManager.adoptStyleSheets(shadowRoot2.adoptedStyleSheets, _this.mirror.getId($a44aab89caa44953$var$index.host(shadowRoot2))); 30309 _this.restoreHandlers.push($a44aab89caa44953$var$initAdoptedStyleSheetObserver({ 30310 mirror: _this.mirror, 30311 stylesheetManager: _this.bypassOptions.stylesheetManager 30312 }, shadowRoot2)); 30313 }, 0); 30314 }; 30315 /** 30316 * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms. 30317 */ _proto.observeAttachShadow = function observeAttachShadow(iframeElement) { 30318 if (!iframeElement.contentWindow || !iframeElement.contentDocument) return; 30319 this.patchAttachShadow(iframeElement.contentWindow.Element, iframeElement.contentDocument); 30320 }; 30321 /** 30322 * Patch 'attachShadow' to observe newly added shadow doms. 30323 */ _proto.patchAttachShadow = function patchAttachShadow(element, doc) { 30324 var manager = this; 30325 this.restoreHandlers.push($a44aab89caa44953$var$patch(element.prototype, "attachShadow", function(original) { 30326 return function(option) { 30327 var sRoot = original.call(this, option); 30328 var shadowRootEl = $a44aab89caa44953$var$index.shadowRoot(this); 30329 if (shadowRootEl && $a44aab89caa44953$var$inDom(this)) manager.addShadowRoot(shadowRootEl, doc); 30330 return sRoot; 30331 }; 30332 })); 30333 }; 30334 _proto.reset = function reset() {
30335 this.restoreHandlers.forEach(function(handler) { 30336 try { 30337 handler(); 30338 } catch (e2) {} 30339 }); 30340 this.restoreHandlers = []; 30341 this.shadowDoms = /* @__PURE__ */ new WeakSet(); 30342 }; 30343 return ShadowDomManager; 30344}(); 30345var $a44aab89caa44953$var$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 30346var $a44aab89caa44953$var$lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); 30347for(var $a44aab89caa44953$var$i$1 = 0; $a44aab89caa44953$var$i$1 < $a44aab89caa44953$var$chars.length; $a44aab89caa44953$var$i$1++)$a44aab89caa44953$var$lookup[$a44aab89caa44953$var$chars.charCodeAt($a44aab89caa44953$var$i$1)] = $a44aab89caa44953$var$i$1; 30348var $a44aab89caa44953$var$encode = function encode(arraybuffer) { 30349 var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = ""; 30350 for(i2 = 0; i2 < len; i2 += 3){ 30351 base64 += $a44aab89caa44953$var$chars[bytes[i2] >> 2]; 30352 base64 += $a44aab89caa44953$var$chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4]; 30353 base64 += $a44aab89caa44953$var$chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6]; 30354 base64 += $a44aab89caa44953$var$chars[bytes[i2 + 2] & 63]; 30355 } 30356 if (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "="; 30357 else if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "=="; 30358 return base64; 30359}; 30360var $a44aab89caa44953$var$canvasVarMap = /* @__PURE__ */ new Map(); 30361function $a44aab89caa44953$var$variableListFor$1(ctx, ctor) { 30362 var contextMap = $a44aab89caa44953$var$canvasVarMap.get(ctx); 30363 if (!contextMap) { 30364 contextMap = /* @__PURE__ */ new Map(); 30365 $a44aab89caa44953$var$canvasVarMap.set(ctx, contextMap); 30366 } 30367 if (!contextMap.has(ctor)) contextMap.set(ctor, []); 30368 return contextMap.get(ctor); 30369} 30370var $a44aab89caa44953$var$saveWebGLVar = function(value, win, ctx) { 30371 if (!value || !($a44aab89caa44953$var$isInstanceOfWebGLObject(value, win) || (typeof value === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(value)) === "object")) return; 30372 var name = value.constructor.name; 30373 var list2 = $a44aab89caa44953$var$variableListFor$1(ctx, name); 30374 var index2 = list2.indexOf(value); 30375 if (index2 === -1) { 30376 index2 = list2.length; 30377 list2.push(value); 30378 } 30379 return index2; 30380}; 30381function $a44aab89caa44953$var$serializeArg(value, win, ctx) { 30382 if ($a44aab89caa44953$var$_instanceof(value, Array)) return value.map(function(arg) { 30383 return $a44aab89caa44953$var$serializeArg(arg, win, ctx); 30384 }); 30385 else if (value === null) return value; 30386 else if ($a44aab89caa44953$var$_instanceof(value, Float32Array) || $a44aab89caa44953$var$_instanceof(value, Float64Array) || $a44aab89caa44953$var$_instanceof(value, Int32Array) || $a44aab89caa44953$var$_instanceof(value, Uint32Array) || $a44aab89caa44953$var$_instanceof(value, Uint8Array) || $a44aab89caa44953$var$_instanceof(value, Uint16Array) || $a44aab89caa44953$var$_instanceof(value, Int16Array) || $a44aab89caa44953$var$_instanceof(value, Int8Array) || $a44aab89caa44953$var$_instanceof(value, Uint8ClampedArray)) { 30387 var name = value.constructor.name; 30388 return { 30389 rr_type: name, 30390 args: [ 30391 Object.values(value) 30392 ] 30393 }; 30394 } else if (// More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/SharedArrayBuffer 30395 // value instanceof SharedArrayBuffer || 30396 $a44aab89caa44953$var$_instanceof(value, ArrayBuffer)) { 30397 var name1 = value.constructor.name; 30398 var base64 = $a44aab89caa44953$var$encode(value); 30399 return { 30400 rr_type: name1, 30401 base64: base64 30402 }; 30403 } else if ($a44aab89caa44953$var$_instanceof(value, DataView)) { 30404 var name2 = value.constructor.name; 30405 return { 30406 rr_type: name2, 30407 args: [ 30408 $a44aab89caa44953$var$serializeArg(value.buffer, win, ctx), 30409 value.byteOffset, 30410 value.byteLength 30411 ] 30412 }; 30413 } else if ($a44aab89caa44953$var$_instanceof(value, HTMLImageElement)) { 30414 var name3 = value.constructor.name; 30415 var src = value.src; 30416 return { 30417 rr_type: name3, 30418 src: src 30419 }; 30420 } else if ($a44aab89caa44953$var$_instanceof(value, HTMLCanvasElement)) { 30421 var name4 = "HTMLImageElement"; 30422 var src1 = value.toDataURL(); 30423 return { 30424 rr_type: name4, 30425 src: src1 30426 }; 30427 } else if ($a44aab89caa44953$var$_instanceof(value, ImageData)) { 30428 var name5 = value.constructor.name; 30429 return { 30430 rr_type: name5, 30431 args: [ 30432 $a44aab89caa44953$var$serializeArg(value.data, win, ctx), 30433 value.width, 30434 value.height 30435 ] 30436 }; 30437 } else if ($a44aab89caa44953$var$isInstanceOfWebGLObject(value, win) || (typeof value === "undefined" ? "undefined" : $a44aab89caa44953$var$_type_of(value)) === "object") { 30438 var name6 = value.constructor.name; 30439 var index2 = $a44aab89caa44953$var$saveWebGLVar(value, win, ctx); 30440 return { 30441 rr_type: name6, 30442 index: index2 30443 }; 30444 } 30445 return value; 30446}
vendor: 31,119 bytes, lines 30447-30988
30447var $a44aab89caa44953$var$serializeArgs = function(args, win, ctx) { 30448 return args.map(function(arg) { 30449 return $a44aab89caa44953$var$serializeArg(arg, win, ctx); 30450 }); 30451}; 30452var $a44aab89caa44953$var$isInstanceOfWebGLObject = function(value, win) { 30453 var webGLConstructorNames = [ 30454 "WebGLActiveInfo", 30455 "WebGLBuffer", 30456 "WebGLFramebuffer", 30457 "WebGLProgram", 30458 "WebGLRenderbuffer", 30459 "WebGLShader", 30460 "WebGLShaderPrecisionFormat", 30461 "WebGLTexture", 30462 "WebGLUniformLocation", 30463 "WebGLVertexArrayObject", 30464 // In old Chrome versions, value won't be an instanceof WebGLVertexArrayObject. 30465 "WebGLVertexArrayObjectOES" 30466 ]; 30467 var supportedWebGLConstructorNames = webGLConstructorNames.filter(function(name) { 30468 return typeof win[name] === "function"; 30469 }); 30470 return Boolean(supportedWebGLConstructorNames.find(function(name) { 30471 return $a44aab89caa44953$var$_instanceof(value, win[name]); 30472 })); 30473}; 30474function $a44aab89caa44953$var$initCanvas2DMutationObserver(cb, win, blockClass, blockSelector) { 30475 var _loop = function() { 30476 var prop = _step.value; 30477 try { 30478 if (typeof win.CanvasRenderingContext2D.prototype[prop] !== "function") return "continue"; 30479 var restoreHandler = $a44aab89caa44953$var$patch(win.CanvasRenderingContext2D.prototype, prop, function(original) { 30480 return function() { 30481 var _this = this; 30482 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 30483 if (!$a44aab89caa44953$var$isBlocked(this.canvas, blockClass, blockSelector, true)) setTimeout(function() { 30484 var recordArgs = $a44aab89caa44953$var$serializeArgs(args, win, _this); 30485 cb(_this.canvas, { 30486 type: $a44aab89caa44953$var$CanvasContext["2D"], 30487 property: prop, 30488 args: recordArgs 30489 }); 30490 }, 0); 30491 return original.apply(this, args); 30492 }; 30493 }); 30494 handlers.push(restoreHandler); 30495 } catch (e) { 30496 var hookHandler = $a44aab89caa44953$var$hookSetter(win.CanvasRenderingContext2D.prototype, prop, { 30497 set: function set(v2) { 30498 cb(this.canvas, { 30499 type: $a44aab89caa44953$var$CanvasContext["2D"], 30500 property: prop, 30501 args: [ 30502 v2 30503 ], 30504 setter: true 30505 }); 30506 } 30507 }); 30508 handlers.push(hookHandler); 30509 } 30510 }; 30511 var handlers = []; 30512 var props2D = Object.getOwnPropertyNames(win.CanvasRenderingContext2D.prototype); 30513 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(props2D), _step; !(_step = _iterator()).done;)_loop(); 30514 return function() { 30515 handlers.forEach(function(h) { 30516 return h(); 30517 }); 30518 }; 30519} 30520function $a44aab89caa44953$var$getNormalizedContextName(contextType) { 30521 return contextType === "experimental-webgl" ? "webgl" : contextType; 30522} 30523function $a44aab89caa44953$var$initCanvasContextObserver(win, blockClass, blockSelector, setPreserveDrawingBufferToTrue) { 30524 var handlers = []; 30525 try { 30526 var restoreHandler = $a44aab89caa44953$var$patch(win.HTMLCanvasElement.prototype, "getContext", function(original) { 30527 return function(contextType) { 30528 for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)args[_key - 1] = arguments[_key]; 30529 if (!$a44aab89caa44953$var$isBlocked(this, blockClass, blockSelector, true)) { 30530 var ctxName = $a44aab89caa44953$var$getNormalizedContextName(contextType); 30531 if (!("__context" in this)) this.__context = ctxName; 30532 if (setPreserveDrawingBufferToTrue && [ 30533 "webgl", 30534 "webgl2" 30535 ].includes(ctxName)) { 30536 if (args[0] && $a44aab89caa44953$var$_type_of(args[0]) === "object") { 30537 var contextAttributes = args[0]; 30538 if (!contextAttributes.preserveDrawingBuffer) contextAttributes.preserveDrawingBuffer = true; 30539 } else args.splice(0, 1, { 30540 preserveDrawingBuffer: true 30541 }); 30542 } 30543 } 30544 return original.apply(this, [].concat([ 30545 contextType 30546 ], args)); 30547 }; 30548 }); 30549 handlers.push(restoreHandler); 30550 } catch (e) { 30551 console.error("failed to patch HTMLCanvasElement.prototype.getContext"); 30552 } 30553 return function() { 30554 handlers.forEach(function(h) { 30555 return h(); 30556 }); 30557 }; 30558} 30559function $a44aab89caa44953$var$patchGLPrototype(prototype, type, cb, blockClass, blockSelector, win) { 30560 var _loop = function() { 30561 var prop = _step.value; 30562 if ([ 30563 "isContextLost", 30564 "canvas", 30565 "drawingBufferWidth", 30566 "drawingBufferHeight" 30567 ].includes(prop)) return "continue"; 30568 try { 30569 if (typeof prototype[prop] !== "function") return "continue"; 30570 var restoreHandler = $a44aab89caa44953$var$patch(prototype, prop, function(original) { 30571 return function() { 30572 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; 30573 var result2 = original.apply(this, args); 30574 $a44aab89caa44953$var$saveWebGLVar(result2, win, this); 30575 if ("tagName" in this.canvas && !$a44aab89caa44953$var$isBlocked(this.canvas, blockClass, blockSelector, true)) { 30576 var recordArgs = $a44aab89caa44953$var$serializeArgs(args, win, this); 30577 var mutation = { 30578 type: type, 30579 property: prop, 30580 args: recordArgs 30581 }; 30582 cb(this.canvas, mutation); 30583 } 30584 return result2; 30585 }; 30586 }); 30587 handlers.push(restoreHandler); 30588 } catch (e) { 30589 var hookHandler = $a44aab89caa44953$var$hookSetter(prototype, prop, { 30590 set: function set(v2) { 30591 cb(this.canvas, { 30592 type: type, 30593 property: prop, 30594 args: [ 30595 v2 30596 ], 30597 setter: true 30598 }); 30599 } 30600 }); 30601 handlers.push(hookHandler); 30602 } 30603 }; 30604 var handlers = []; 30605 var props = Object.getOwnPropertyNames(prototype); 30606 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(props), _step; !(_step = _iterator()).done;)_loop(); 30607 return handlers; 30608} 30609function $a44aab89caa44953$var$initCanvasWebGLMutationObserver(cb, win, blockClass, blockSelector) { 30610 var _handlers; 30611 var handlers = []; 30612 (_handlers = handlers).push.apply(_handlers, [].concat($a44aab89caa44953$var$patchGLPrototype(win.WebGLRenderingContext.prototype, $a44aab89caa44953$var$CanvasContext.WebGL, cb, blockClass, blockSelector, win))); 30613 if (typeof win.WebGL2RenderingContext !== "undefined") { 30614 var _handlers1; 30615 (_handlers1 = handlers).push.apply(_handlers1, [].concat($a44aab89caa44953$var$patchGLPrototype(win.WebGL2RenderingContext.prototype, $a44aab89caa44953$var$CanvasContext.WebGL2, cb, blockClass, blockSelector, win))); 30616 } 30617 return function() { 30618 handlers.forEach(function(h) { 30619 return h(); 30620 }); 30621 }; 30622} 30623var $a44aab89caa44953$var$encodedJs = "KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo="; 30624var $a44aab89caa44953$var$decodeBase64 = function(base64) { 30625 return Uint8Array.from(atob(base64), function(c2) { 30626 return c2.charCodeAt(0); 30627 }); 30628}; 30629var $a44aab89caa44953$var$blob = typeof window !== "undefined" && window.Blob && new Blob([ 30630 $a44aab89caa44953$var$decodeBase64($a44aab89caa44953$var$encodedJs) 30631], { 30632 type: "text/javascript;charset=utf-8" 30633}); 30634function $a44aab89caa44953$var$WorkerWrapper(options) { 30635 var objURL; 30636 try { 30637 objURL = $a44aab89caa44953$var$blob && (window.URL || window.webkitURL).createObjectURL($a44aab89caa44953$var$blob); 30638 if (!objURL) throw ""; 30639 var worker = new Worker(objURL, { 30640 name: options == null ? void 0 : options.name 30641 }); 30642 worker.addEventListener("error", function() { 30643 (window.URL || window.webkitURL).revokeObjectURL(objURL); 30644 }); 30645 return worker; 30646 } catch (e2) { 30647 return new Worker("data:text/javascript;base64," + $a44aab89caa44953$var$encodedJs, { 30648 name: options == null ? void 0 : options.name 30649 }); 30650 } finally{ 30651 objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL); 30652 } 30653} 30654var $a44aab89caa44953$var$CanvasManager = /*#__PURE__*/ function() { 30655 function CanvasManager(options) { 30656 var _this = this; 30657 $a44aab89caa44953$var$__publicField(this, "pendingCanvasMutations", /* @__PURE__ */ new Map()); 30658 $a44aab89caa44953$var$__publicField(this, "rafStamps", { 30659 latestId: 0, 30660 invokeId: null 30661 }); 30662 $a44aab89caa44953$var$__publicField(this, "mirror"); 30663 $a44aab89caa44953$var$__publicField(this, "mutationCb"); 30664 $a44aab89caa44953$var$__publicField(this, "resetObservers"); 30665 $a44aab89caa44953$var$__publicField(this, "frozen", false); 30666 $a44aab89caa44953$var$__publicField(this, "locked", false); 30667 $a44aab89caa44953$var$__publicField(this, "processMutation", function(target, mutation) { 30668 var newFrame = _this.rafStamps.invokeId && _this.rafStamps.latestId !== _this.rafStamps.invokeId; 30669 if (newFrame || !_this.rafStamps.invokeId) _this.rafStamps.invokeId = _this.rafStamps.latestId; 30670 if (!_this.pendingCanvasMutations.has(target)) _this.pendingCanvasMutations.set(target, []); 30671 _this.pendingCanvasMutations.get(target).push(mutation); 30672 }); 30673 var _options_sampling = options.sampling, sampling = _options_sampling === void 0 ? "all" : _options_sampling, win = options.win, blockClass = options.blockClass, blockSelector = options.blockSelector, recordCanvas = options.recordCanvas, dataURLOptions = options.dataURLOptions; 30674 this.mutationCb = options.mutationCb; 30675 this.mirror = options.mirror; 30676 if (recordCanvas && sampling === "all") this.initCanvasMutationObserver(win, blockClass, blockSelector); 30677 if (recordCanvas && typeof sampling === "number") this.initCanvasFPSObserver(sampling, win, blockClass, blockSelector, { 30678 dataURLOptions: dataURLOptions 30679 }); 30680 } 30681 var _proto = CanvasManager.prototype; 30682 _proto.reset = function reset() { 30683 this.pendingCanvasMutations.clear(); 30684 this.resetObservers && this.resetObservers(); 30685 }; 30686 _proto.freeze = function freeze() { 30687 this.frozen = true; 30688 }; 30689 _proto.unfreeze = function unfreeze() { 30690 this.frozen = false; 30691 }; 30692 _proto.lock = function lock() { 30693 this.locked = true; 30694 }; 30695 _proto.unlock = function unlock() { 30696 this.locked = false; 30697 }; 30698 _proto.initCanvasFPSObserver = function initCanvasFPSObserver(fps, win, blockClass, blockSelector, options) { 30699 var _this = this; 30700 var canvasContextReset = $a44aab89caa44953$var$initCanvasContextObserver(win, blockClass, blockSelector, true); 30701 var snapshotInProgressMap = /* @__PURE__ */ new Map(); 30702 var worker = new $a44aab89caa44953$var$WorkerWrapper(); 30703 worker.onmessage = function(e2) { 30704 var id = e2.data.id; 30705 snapshotInProgressMap.set(id, false); 30706 if (!("base64" in e2.data)) return; 30707 var _e2_data = e2.data, base64 = _e2_data.base64, type = _e2_data.type, width = _e2_data.width, height = _e2_data.height; 30708 _this.mutationCb({ 30709 id: id, 30710 type: $a44aab89caa44953$var$CanvasContext["2D"], 30711 commands: [ 30712 { 30713 property: "clearRect", 30714 // wipe canvas 30715 args: [ 30716 0, 30717 0, 30718 width, 30719 height 30720 ] 30721 }, 30722 { 30723 property: "drawImage", 30724 // draws (semi-transparent) image 30725 args: [ 30726 { 30727 rr_type: "ImageBitmap", 30728 args: [ 30729 { 30730 rr_type: "Blob", 30731 data: [ 30732 { 30733 rr_type: "ArrayBuffer", 30734 base64: base64 30735 } 30736 ], 30737 type: type 30738 } 30739 ] 30740 }, 30741 0, 30742 0 30743 ] 30744 } 30745 ] 30746 }); 30747 }; 30748 var timeBetweenSnapshots = 1e3 / fps; 30749 var lastSnapshotTime = 0; 30750 var rafId; 30751 var getCanvas = function() { 30752 var matchedCanvas = []; 30753 win.document.querySelectorAll("canvas").forEach(function(canvas) { 30754 if (!$a44aab89caa44953$var$isBlocked(canvas, blockClass, blockSelector, true)) matchedCanvas.push(canvas); 30755 }); 30756 return matchedCanvas; 30757 }; 30758 var takeCanvasSnapshots = function(timestamp) { 30759 if (lastSnapshotTime && timestamp - lastSnapshotTime < timeBetweenSnapshots) { 30760 rafId = requestAnimationFrame(takeCanvasSnapshots); 30761 return; 30762 } 30763 lastSnapshotTime = timestamp; 30764 var _this1 = _this; 30765 getCanvas().forEach(/*#__PURE__*/ $a44aab89caa44953$var$_async_to_generator(function(canvas) { 30766 var _a2, id, context, bitmap; 30767 return $a44aab89caa44953$var$_ts_generator(this, function(_state) { 30768 switch(_state.label){ 30769 case 0: 30770 id = _this1.mirror.getId(canvas); 30771 if (snapshotInProgressMap.get(id)) return [ 30772 2 30773 ]; 30774 if (canvas.width === 0 || canvas.height === 0) return [ 30775 2 30776 ]; 30777 snapshotInProgressMap.set(id, true); 30778 if ([ 30779 "webgl", 30780 "webgl2" 30781 ].includes(canvas.__context)) { 30782 context = canvas.getContext(canvas.__context); 30783 if (((_a2 = context == null ? void 0 : context.getContextAttributes()) == null ? void 0 : _a2.preserveDrawingBuffer) === false) context.clear(context.COLOR_BUFFER_BIT); 30784 } 30785 return [ 30786 4, 30787 createImageBitmap(canvas) 30788 ]; 30789 case 1: 30790 bitmap = _state.sent(); 30791 worker.postMessage({ 30792 id: id, 30793 bitmap: bitmap, 30794 width: canvas.width, 30795 height: canvas.height, 30796 dataURLOptions: options.dataURLOptions 30797 }, [ 30798 bitmap 30799 ]); 30800 return [ 30801 2 30802 ]; 30803 } 30804 }); 30805 })); 30806 rafId = requestAnimationFrame(takeCanvasSnapshots); 30807 }; 30808 rafId = requestAnimationFrame(takeCanvasSnapshots); 30809 this.resetObservers = function() { 30810 canvasContextReset(); 30811 cancelAnimationFrame(rafId); 30812 }; 30813 }; 30814 _proto.initCanvasMutationObserver = function initCanvasMutationObserver(win, blockClass, blockSelector) { 30815 this.startRAFTimestamping(); 30816 this.startPendingCanvasMutationFlusher(); 30817 var canvasContextReset = $a44aab89caa44953$var$initCanvasContextObserver(win, blockClass, blockSelector, false); 30818 var canvas2DReset = $a44aab89caa44953$var$initCanvas2DMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector); 30819 var canvasWebGL1and2Reset = $a44aab89caa44953$var$initCanvasWebGLMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector); 30820 this.resetObservers = function() { 30821 canvasContextReset(); 30822 canvas2DReset(); 30823 canvasWebGL1and2Reset(); 30824 }; 30825 }; 30826 _proto.startPendingCanvasMutationFlusher = function startPendingCanvasMutationFlusher() { 30827 var _this = this; 30828 requestAnimationFrame(function() { 30829 return _this.flushPendingCanvasMutations(); 30830 }); 30831 }; 30832 _proto.startRAFTimestamping = function startRAFTimestamping() { 30833 var _this = this; 30834 var setLatestRAFTimestamp = function(timestamp) { 30835 _this.rafStamps.latestId = timestamp; 30836 requestAnimationFrame(setLatestRAFTimestamp); 30837 }; 30838 requestAnimationFrame(setLatestRAFTimestamp); 30839 }; 30840 _proto.flushPendingCanvasMutations = function flushPendingCanvasMutations() { 30841 var _this = this; 30842 this.pendingCanvasMutations.forEach(function(_values, canvas) { 30843 var id = _this.mirror.getId(canvas); 30844 _this.flushPendingCanvasMutationFor(canvas, id); 30845 }); 30846 requestAnimationFrame(function() { 30847 return _this.flushPendingCanvasMutations(); 30848 }); 30849 }; 30850 _proto.flushPendingCanvasMutationFor = function flushPendingCanvasMutationFor(canvas, id) { 30851 if (this.frozen || this.locked) return; 30852 var valuesWithType = this.pendingCanvasMutations.get(canvas); 30853 if (!valuesWithType || id === -1) return; 30854 var values = valuesWithType.map(function(value) { 30855 value.type; 30856 var rest = $a44aab89caa44953$var$_object_without_properties_loose(value, [ 30857 "type" 30858 ]); 30859 return rest; 30860 }); 30861 var type = valuesWithType[0].type; 30862 this.mutationCb({ 30863 id: id, 30864 type: type, 30865 commands: values 30866 }); 30867 this.pendingCanvasMutations.delete(canvas); 30868 }; 30869 return CanvasManager; 30870}(); 30871var $a44aab89caa44953$var$StylesheetManager = /*#__PURE__*/ function() { 30872 function StylesheetManager(options) { 30873 $a44aab89caa44953$var$__publicField(this, "trackedLinkElements", /* @__PURE__ */ new WeakSet()); 30874 $a44aab89caa44953$var$__publicField(this, "mutationCb"); 30875 $a44aab89caa44953$var$__publicField(this, "adoptedStyleSheetCb"); 30876 $a44aab89caa44953$var$__publicField(this, "styleMirror", new $a44aab89caa44953$var$StyleSheetMirror()); 30877 this.mutationCb = options.mutationCb; 30878 this.adoptedStyleSheetCb = options.adoptedStyleSheetCb; 30879 } 30880 var _proto = StylesheetManager.prototype; 30881 _proto.attachLinkElement = function attachLinkElement(linkEl, childSn) { 30882 if ("_cssText" in childSn.attributes) this.mutationCb({ 30883 adds: [], 30884 removes: [], 30885 texts: [], 30886 attributes: [ 30887 { 30888 id: childSn.id, 30889 attributes: childSn.attributes 30890 } 30891 ] 30892 }); 30893 this.trackLinkElement(linkEl); 30894 }; 30895 _proto.trackLinkElement = function trackLinkElement(linkEl) { 30896 if (this.trackedLinkElements.has(linkEl)) return; 30897 this.trackedLinkElements.add(linkEl); 30898 this.trackStylesheetInLinkElement(linkEl); 30899 }; 30900 _proto.adoptStyleSheets = function adoptStyleSheets(sheets, hostId) { 30901 var _this, _loop = function() { 30902 var sheet = _step.value; 30903 var styleId = void 0; 30904 if (!_this.styleMirror.has(sheet)) { 30905 styleId = _this.styleMirror.add(sheet); 30906 styles.push({ 30907 styleId: styleId, 30908 rules: Array.from(sheet.rules || CSSRule, function(r2, index2) { 30909 return { 30910 rule: $a44aab89caa44953$var$stringifyRule(r2, sheet.href), 30911 index: index2 30912 }; 30913 }) 30914 }); 30915 } else styleId = _this.styleMirror.getId(sheet); 30916 adoptedStyleSheetData.styleIds.push(styleId); 30917 }; 30918 if (sheets.length === 0) return; 30919 var adoptedStyleSheetData = { 30920 id: hostId, 30921 styleIds: [] 30922 }; 30923 var styles = []; 30924 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(sheets), _step; !(_step = _iterator()).done;)_this = this, _loop(); 30925 if (styles.length > 0) adoptedStyleSheetData.styles = styles; 30926 this.adoptedStyleSheetCb(adoptedStyleSheetData); 30927 }; 30928 _proto.reset = function reset() { 30929 this.styleMirror.reset(); 30930 this.trackedLinkElements = /* @__PURE__ */ new WeakSet(); 30931 }; 30932 // TODO: take snapshot on stylesheet reload by applying event listener 30933 _proto.trackStylesheetInLinkElement = function trackStylesheetInLinkElement(_linkEl) {}; 30934 return StylesheetManager; 30935}(); 30936var $a44aab89caa44953$var$ProcessedNodeManager = /*#__PURE__*/ function() { 30937 function ProcessedNodeManager() { 30938 $a44aab89caa44953$var$__publicField(this, "nodeMap", /* @__PURE__ */ new WeakMap()); 30939 $a44aab89caa44953$var$__publicField(this, "active", false); 30940 } 30941 var _proto = ProcessedNodeManager.prototype; 30942 _proto.inOtherBuffer = function inOtherBuffer(node2, thisBuffer) { 30943 var buffers = this.nodeMap.get(node2); 30944 return buffers && Array.from(buffers).some(function(buffer) { 30945 return buffer !== thisBuffer; 30946 }); 30947 }; 30948 _proto.add = function add(node2, buffer) { 30949 var _this = this; 30950 if (!this.active) { 30951 this.active = true; 30952 requestAnimationFrame(function() { 30953 _this.nodeMap = /* @__PURE__ */ new WeakMap(); 30954 _this.active = false; 30955 }); 30956 } 30957 this.nodeMap.set(node2, (this.nodeMap.get(node2) || /* @__PURE__ */ new Set()).add(buffer)); 30958 }; 30959 _proto.destroy = function destroy() {}; 30960 return ProcessedNodeManager; 30961}(); 30962var $a44aab89caa44953$var$wrappedEmit; 30963var $a44aab89caa44953$var$takeFullSnapshot$1; 30964var $a44aab89caa44953$var$canvasManager; 30965var $a44aab89caa44953$var$recording = false; 30966try { 30967 if (Array.from([ 30968 1 30969 ], function(x2) { 30970 return x2 * 2; 30971 })[0] !== 2) { 30972 var $a44aab89caa44953$var$cleanFrame = document.createElement("iframe"); 30973 document.body.appendChild($a44aab89caa44953$var$cleanFrame); 30974 Array.from = (($a44aab89caa44953$var$_a = $a44aab89caa44953$var$cleanFrame.contentWindow) == null ? void 0 : $a44aab89caa44953$var$_a.Array.from) || Array.from; 30975 document.body.removeChild($a44aab89caa44953$var$cleanFrame); 30976 } 30977} catch (err) { 30978 console.debug("Unable to override Array.from", err); 30979} 30980var $a44aab89caa44953$var$mirror = $a44aab89caa44953$var$createMirror$2(); 30981function $a44aab89caa44953$var$record(options) { 30982 if (options === void 0) options = {}; 30983 var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _options_blockClass = options.blockClass, blockClass = _options_blockClass === void 0 ? "rr-block" : _options_blockClass, _options_blockSelector = options.blockSelector, blockSelector = _options_blockSelector === void 0 ? null : _options_blockSelector, _options_ignoreClass = options.ignoreClass, ignoreClass = _options_ignoreClass === void 0 ? "rr-ignore" : _options_ignoreClass, _options_ignoreSelector = options.ignoreSelector, ignoreSelector = _options_ignoreSelector === void 0 ? null : _options_ignoreSelector, _options_maskTextClass = options.maskTextClass, maskTextClass = _options_maskTextClass === void 0 ? "rr-mask" : _options_maskTextClass, _options_maskTextSelector = options.maskTextSelector, maskTextSelector = _options_maskTextSelector === void 0 ? null : _options_maskTextSelector, _options_inlineStylesheet = options.inlineStylesheet, inlineStylesheet = _options_inlineStylesheet === void 0 ? true : _options_inlineStylesheet, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, _slimDOMOptions = options.slimDOMOptions, maskInputFn = options.maskInputFn, maskTextFn = options.maskTextFn, hooks = options.hooks, packFn = options.packFn, _options_sampling = options.sampling, sampling = _options_sampling === void 0 ? {} : _options_sampling, _options_dataURLOptions = options.dataURLOptions, dataURLOptions = _options_dataURLOptions === void 0 ? {} : _options_dataURLOptions, mousemoveWait = options.mousemoveWait, _options_recordDOM = options.recordDOM, recordDOM = _options_recordDOM === void 0 ? true : _options_recordDOM, _options_recordCanvas = options.recordCanvas, recordCanvas = _options_recordCanvas === void 0 ? false : _options_recordCanvas, _options_recordCrossOriginIframes = options.recordCrossOriginIframes, recordCrossOriginIframes = _options_recordCrossOriginIframes === void 0 ? false : _options_recordCrossOriginIframes, _options_recordAfter = options.recordAfter, recordAfter = _options_recordAfter === void 0 ? options.recordAfter === "DOMContentLoaded" ? options.recordAfter : "load" : _options_recordAfter, _options_userTriggeredOnInput = options.userTriggeredOnInput, userTriggeredOnInput = _options_userTriggeredOnInput === void 0 ? false : _options_userTriggeredOnInput, _options_collectFonts = options.collectFonts, collectFonts = _options_collectFonts === void 0 ? false : _options_collectFonts, _options_inlineImages = options.inlineImages, inlineImages = _options_inlineImages === void 0 ? false : _options_inlineImages, plugins = options.plugins, _options_keepIframeSrcFn = options.keepIframeSrcFn, keepIframeSrcFn = _options_keepIframeSrcFn === void 0 ? function() { 30984 return false; 30985 } : _options_keepIframeSrcFn, _options_ignoreCSSAttributes = options.ignoreCSSAttributes, ignoreCSSAttributes = _options_ignoreCSSAttributes === void 0 ? /* @__PURE__ */ new Set([]) : _options_ignoreCSSAttributes, errorHandler2 = options.errorHandler; 30986 $a44aab89caa44953$var$registerErrorHandler(errorHandler2); 30987 var inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true; 30988 var passEmitsToParent = false;
30989 if (!inEmittingFrame) try { 30990 if (window.parent.document) passEmitsToParent = false; 30991 } catch (e2) { 30992 passEmitsToParent = true; 30993 } 30994 if (inEmittingFrame && !emit) throw new Error("emit function is required"); 30995 if (!inEmittingFrame && !passEmitsToParent) return function() {}; 30996 if (mousemoveWait !== void 0 && sampling.mousemove === void 0) sampling.mousemove = mousemoveWait; 30997 $a44aab89caa44953$var$mirror.reset(); 30998 var maskInputOptions = maskAllInputs === true ? { 30999 color: true, 31000 date: true, 31001 "datetime-local": true, 31002 email: true, 31003 month: true, 31004 number: true, 31005 range: true, 31006 search: true, 31007 tel: true, 31008 text: true, 31009 time: true, 31010 url: true, 31011 week: true, 31012 textarea: true, 31013 select: true, 31014 password: true 31015 } : _maskInputOptions !== void 0 ? _maskInputOptions : { 31016 password: true 31017 }; 31018 var slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === "all" ? { 31019 script: true, 31020 comment: true, 31021 headFavicon: true, 31022 headWhitespace: true, 31023 headMetaSocial: true, 31024 headMetaRobots: true, 31025 headMetaHttpEquiv: true, 31026 headMetaVerification: true, 31027 // the following are off for slimDOMOptions === true, 31028 // as they destroy some (hidden) info: 31029 headMetaAuthorship: _slimDOMOptions === "all", 31030 headMetaDescKeywords: _slimDOMOptions === "all", 31031 headTitleMutations: _slimDOMOptions === "all" 31032 } : _slimDOMOptions ? _slimDOMOptions : {}; 31033 $a44aab89caa44953$var$polyfill$1(); 31034 var lastFullSnapshotEvent; 31035 var incrementalSnapshotCount = 0; 31036 var eventProcessor = function(e2) { 31037 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(plugins || []), _step; !(_step = _iterator()).done;){ 31038 var plugin3 = _step.value; 31039 if (plugin3.eventProcessor) e2 = plugin3.eventProcessor(e2); 31040 } 31041 if (packFn && // Disable packing events which will be emitted to parent frames. 31042 !passEmitsToParent) e2 = packFn(e2); 31043 return e2; 31044 }; 31045 $a44aab89caa44953$var$wrappedEmit = function(r2, isCheckout) { 31046 var _a2; 31047 var e2 = r2; 31048 e2.timestamp = $a44aab89caa44953$var$nowTimestamp(); 31049 if (((_a2 = $a44aab89caa44953$var$mutationBuffers[0]) == null ? void 0 : _a2.isFrozen()) && e2.type !== $a44aab89caa44953$var$EventType.FullSnapshot && !(e2.type === $a44aab89caa44953$var$EventType.IncrementalSnapshot && e2.data.source === $a44aab89caa44953$var$IncrementalSource.Mutation)) $a44aab89caa44953$var$mutationBuffers.forEach(function(buf) { 31050 return buf.unfreeze(); 31051 }); 31052 if (inEmittingFrame) emit == null || emit(eventProcessor(e2), isCheckout); 31053 else if (passEmitsToParent) { 31054 var message = { 31055 type: "rrweb", 31056 event: eventProcessor(e2), 31057 origin: window.location.origin, 31058 isCheckout: isCheckout 31059 }; 31060 window.parent.postMessage(message, "*"); 31061 } 31062 if (e2.type === $a44aab89caa44953$var$EventType.FullSnapshot) { 31063 lastFullSnapshotEvent = e2; 31064 incrementalSnapshotCount = 0; 31065 } else if (e2.type === $a44aab89caa44953$var$EventType.IncrementalSnapshot) { 31066 if (e2.data.source === $a44aab89caa44953$var$IncrementalSource.Mutation && e2.data.isAttachIframe) return; 31067 incrementalSnapshotCount++; 31068 var exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth; 31069 var exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms; 31070 if (exceedCount || exceedTime) $a44aab89caa44953$var$takeFullSnapshot$1(true); 31071 } 31072 }; 31073 var wrappedMutationEmit = function(m) { 31074 $a44aab89caa44953$var$wrappedEmit({ 31075 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31076 data: $a44aab89caa44953$var$_extends({ 31077 source: $a44aab89caa44953$var$IncrementalSource.Mutation 31078 }, m) 31079 }); 31080 }; 31081 var wrappedScrollEmit = function(p) { 31082 return $a44aab89caa44953$var$wrappedEmit({ 31083 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31084 data: $a44aab89caa44953$var$_extends({ 31085 source: $a44aab89caa44953$var$IncrementalSource.Scroll 31086 }, p) 31087 }); 31088 }; 31089 var wrappedCanvasMutationEmit = function(p) { 31090 return $a44aab89caa44953$var$wrappedEmit({ 31091 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31092 data: $a44aab89caa44953$var$_extends({ 31093 source: $a44aab89caa44953$var$IncrementalSource.CanvasMutation 31094 }, p) 31095 }); 31096 }; 31097 var wrappedAdoptedStyleSheetEmit = function(a2) { 31098 return $a44aab89caa44953$var$wrappedEmit({ 31099 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31100 data: $a44aab89caa44953$var$_extends({ 31101 source: $a44aab89caa44953$var$IncrementalSource.AdoptedStyleSheet 31102 }, a2) 31103 }); 31104 }; 31105 var stylesheetManager = new $a44aab89caa44953$var$StylesheetManager({ 31106 mutationCb: wrappedMutationEmit, 31107 adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit 31108 }); 31109 var iframeManager = new $a44aab89caa44953$var$IframeManager({ 31110 mirror: $a44aab89caa44953$var$mirror, 31111 mutationCb: wrappedMutationEmit, 31112 stylesheetManager: stylesheetManager, 31113 recordCrossOriginIframes: recordCrossOriginIframes, 31114 wrappedEmit: $a44aab89caa44953$var$wrappedEmit 31115 }); 31116 for(var _iterator = $a44aab89caa44953$var$_create_for_of_iterator_helper_loose(plugins || []), _step; !(_step = _iterator()).done;){ 31117 var plugin3 = _step.value; 31118 if (plugin3.getMirror) plugin3.getMirror({ 31119 nodeMirror: $a44aab89caa44953$var$mirror, 31120 crossOriginIframeMirror: iframeManager.crossOriginIframeMirror, 31121 crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror 31122 }); 31123 } 31124 var processedNodeManager = new $a44aab89caa44953$var$ProcessedNodeManager(); 31125 $a44aab89caa44953$var$canvasManager = new $a44aab89caa44953$var$CanvasManager({ 31126 recordCanvas: recordCanvas, 31127 mutationCb: wrappedCanvasMutationEmit, 31128 win: window, 31129 blockClass: blockClass, 31130 blockSelector: blockSelector, 31131 mirror: $a44aab89caa44953$var$mirror, 31132 sampling: sampling.canvas, 31133 dataURLOptions: dataURLOptions 31134 }); 31135 var shadowDomManager = new $a44aab89caa44953$var$ShadowDomManager({ 31136 mutationCb: wrappedMutationEmit, 31137 scrollCb: wrappedScrollEmit, 31138 bypassOptions: { 31139 blockClass: blockClass, 31140 blockSelector: blockSelector, 31141 maskTextClass: maskTextClass, 31142 maskTextSelector: maskTextSelector, 31143 inlineStylesheet: inlineStylesheet, 31144 maskInputOptions: maskInputOptions, 31145 dataURLOptions: dataURLOptions, 31146 maskTextFn: maskTextFn, 31147 maskInputFn: maskInputFn, 31148 recordCanvas: recordCanvas, 31149 inlineImages: inlineImages, 31150 sampling: sampling, 31151 slimDOMOptions: slimDOMOptions, 31152 iframeManager: iframeManager, 31153 stylesheetManager: stylesheetManager, 31154 canvasManager: $a44aab89caa44953$var$canvasManager, 31155 keepIframeSrcFn: keepIframeSrcFn,
31156 processedNodeManager: processedNodeManager 31157 }, 31158 mirror: $a44aab89caa44953$var$mirror 31159 }); 31160 $a44aab89caa44953$var$takeFullSnapshot$1 = function(isCheckout) { 31161 if (isCheckout === void 0) isCheckout = false; 31162 if (!recordDOM) return; 31163 $a44aab89caa44953$var$wrappedEmit({ 31164 type: $a44aab89caa44953$var$EventType.Meta, 31165 data: { 31166 href: window.location.href, 31167 width: $a44aab89caa44953$var$getWindowWidth(), 31168 height: $a44aab89caa44953$var$getWindowHeight() 31169 } 31170 }, isCheckout); 31171 stylesheetManager.reset(); 31172 shadowDomManager.init(); 31173 $a44aab89caa44953$var$mutationBuffers.forEach(function(buf) { 31174 return buf.lock(); 31175 }); 31176 var node2 = $a44aab89caa44953$var$snapshot(document, { 31177 mirror: $a44aab89caa44953$var$mirror, 31178 blockClass: blockClass, 31179 blockSelector: blockSelector, 31180 maskTextClass: maskTextClass, 31181 maskTextSelector: maskTextSelector, 31182 inlineStylesheet: inlineStylesheet, 31183 maskAllInputs: maskInputOptions, 31184 maskTextFn: maskTextFn, 31185 maskInputFn: maskInputFn, 31186 slimDOM: slimDOMOptions, 31187 dataURLOptions: dataURLOptions, 31188 recordCanvas: recordCanvas, 31189 inlineImages: inlineImages, 31190 onSerialize: function(n2) { 31191 if ($a44aab89caa44953$var$isSerializedIframe(n2, $a44aab89caa44953$var$mirror)) iframeManager.addIframe(n2); 31192 if ($a44aab89caa44953$var$isSerializedStylesheet(n2, $a44aab89caa44953$var$mirror)) stylesheetManager.trackLinkElement(n2); 31193 if ($a44aab89caa44953$var$hasShadowRoot(n2)) shadowDomManager.addShadowRoot($a44aab89caa44953$var$index.shadowRoot(n2), document); 31194 }, 31195 onIframeLoad: function(iframe, childSn) { 31196 iframeManager.attachIframe(iframe, childSn); 31197 shadowDomManager.observeAttachShadow(iframe); 31198 }, 31199 onStylesheetLoad: function(linkEl, childSn) { 31200 stylesheetManager.attachLinkElement(linkEl, childSn); 31201 }, 31202 keepIframeSrcFn: keepIframeSrcFn 31203 }); 31204 if (!node2) return console.warn("Failed to snapshot the document"); 31205 $a44aab89caa44953$var$wrappedEmit({ 31206 type: $a44aab89caa44953$var$EventType.FullSnapshot, 31207 data: { 31208 node: node2, 31209 initialOffset: $a44aab89caa44953$var$getWindowScroll(window) 31210 } 31211 }, isCheckout); 31212 $a44aab89caa44953$var$mutationBuffers.forEach(function(buf) { 31213 return buf.unlock(); 31214 }); 31215 if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0) stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, $a44aab89caa44953$var$mirror.getId(document)); 31216 }; 31217 try { 31218 var handlers = []; 31219 var observe = function(doc) { 31220 var _a2; 31221 return $a44aab89caa44953$var$callbackWrapper($a44aab89caa44953$var$initObservers)({ 31222 mutationCb: wrappedMutationEmit, 31223 mousemoveCb: function(positions, source) { 31224 return $a44aab89caa44953$var$wrappedEmit({ 31225 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31226 data: { 31227 source: source, 31228 positions: positions 31229 } 31230 }); 31231 }, 31232 mouseInteractionCb: function(d) { 31233 return $a44aab89caa44953$var$wrappedEmit({ 31234 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31235 data: $a44aab89caa44953$var$_extends({ 31236 source: $a44aab89caa44953$var$IncrementalSource.MouseInteraction 31237 }, d) 31238 }); 31239 }, 31240 scrollCb: wrappedScrollEmit, 31241 viewportResizeCb: function(d) { 31242 return $a44aab89caa44953$var$wrappedEmit({ 31243 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31244 data: $a44aab89caa44953$var$_extends({ 31245 source: $a44aab89caa44953$var$IncrementalSource.ViewportResize 31246 }, d) 31247 }); 31248 }, 31249 inputCb: function(v2) { 31250 return $a44aab89caa44953$var$wrappedEmit({ 31251 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31252 data: $a44aab89caa44953$var$_extends({ 31253 source: $a44aab89caa44953$var$IncrementalSource.Input 31254 }, v2) 31255 }); 31256 }, 31257 mediaInteractionCb: function(p) { 31258 return $a44aab89caa44953$var$wrappedEmit({ 31259 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31260 data: $a44aab89caa44953$var$_extends({ 31261 source: $a44aab89caa44953$var$IncrementalSource.MediaInteraction 31262 }, p) 31263 }); 31264 }, 31265 styleSheetRuleCb: function(r2) { 31266 return $a44aab89caa44953$var$wrappedEmit({ 31267 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31268 data: $a44aab89caa44953$var$_extends({ 31269 source: $a44aab89caa44953$var$IncrementalSource.StyleSheetRule 31270 }, r2) 31271 }); 31272 }, 31273 styleDeclarationCb: function(r2) { 31274 return $a44aab89caa44953$var$wrappedEmit({ 31275 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31276 data: $a44aab89caa44953$var$_extends({ 31277 source: $a44aab89caa44953$var$IncrementalSource.StyleDeclaration 31278 }, r2) 31279 }); 31280 }, 31281 canvasMutationCb: wrappedCanvasMutationEmit, 31282 fontCb: function(p) { 31283 return $a44aab89caa44953$var$wrappedEmit({ 31284 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31285 data: $a44aab89caa44953$var$_extends({ 31286 source: $a44aab89caa44953$var$IncrementalSource.Font 31287 }, p) 31288 }); 31289 }, 31290 selectionCb: function(p) { 31291 $a44aab89caa44953$var$wrappedEmit({ 31292 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31293 data: $a44aab89caa44953$var$_extends({ 31294 source: $a44aab89caa44953$var$IncrementalSource.Selection 31295 }, p) 31296 }); 31297 }, 31298 customElementCb: function(c2) { 31299 $a44aab89caa44953$var$wrappedEmit({ 31300 type: $a44aab89caa44953$var$EventType.IncrementalSnapshot, 31301 data: $a44aab89caa44953$var$_extends({ 31302 source: $a44aab89caa44953$var$IncrementalSource.CustomElement 31303 }, c2) 31304 }); 31305 }, 31306 blockClass: blockClass, 31307 ignoreClass: ignoreClass, 31308 ignoreSelector: ignoreSelector, 31309 maskTextClass: maskTextClass, 31310 maskTextSelector: maskTextSelector, 31311 maskInputOptions: maskInputOptions, 31312 inlineStylesheet: inlineStylesheet, 31313 sampling: sampling, 31314 recordDOM: recordDOM, 31315 recordCanvas: recordCanvas, 31316 inlineImages: inlineImages,
31317 userTriggeredOnInput: userTriggeredOnInput, 31318 collectFonts: collectFonts, 31319 doc: doc, 31320 maskInputFn: maskInputFn, 31321 maskTextFn: maskTextFn, 31322 keepIframeSrcFn: keepIframeSrcFn, 31323 blockSelector: blockSelector, 31324 slimDOMOptions: slimDOMOptions, 31325 dataURLOptions: dataURLOptions, 31326 mirror: $a44aab89caa44953$var$mirror, 31327 iframeManager: iframeManager, 31328 stylesheetManager: stylesheetManager, 31329 shadowDomManager: shadowDomManager, 31330 processedNodeManager: processedNodeManager, 31331 canvasManager: $a44aab89caa44953$var$canvasManager, 31332 ignoreCSSAttributes: ignoreCSSAttributes, 31333 plugins: ((_a2 = plugins == null ? void 0 : plugins.filter(function(p) { 31334 return p.observer; 31335 })) == null ? void 0 : _a2.map(function(p) { 31336 return { 31337 observer: p.observer, 31338 options: p.options, 31339 callback: function(payload) { 31340 return $a44aab89caa44953$var$wrappedEmit({ 31341 type: $a44aab89caa44953$var$EventType.Plugin, 31342 data: { 31343 plugin: p.name, 31344 payload: payload 31345 } 31346 }); 31347 } 31348 }; 31349 })) || [] 31350 }, hooks); 31351 }; 31352 iframeManager.addLoadListener(function(iframeEl) { 31353 try { 31354 handlers.push(observe(iframeEl.contentDocument)); 31355 } catch (error) { 31356 console.warn(error); 31357 } 31358 }); 31359 var init = function() { 31360 $a44aab89caa44953$var$takeFullSnapshot$1(); 31361 handlers.push(observe(document)); 31362 $a44aab89caa44953$var$recording = true; 31363 }; 31364 if (document.readyState === "interactive" || document.readyState === "complete") init(); 31365 else { 31366 handlers.push($a44aab89caa44953$var$on("DOMContentLoaded", function() { 31367 $a44aab89caa44953$var$wrappedEmit({ 31368 type: $a44aab89caa44953$var$EventType.DomContentLoaded, 31369 data: {} 31370 }); 31371 if (recordAfter === "DOMContentLoaded") init(); 31372 })); 31373 handlers.push($a44aab89caa44953$var$on("load", function() { 31374 $a44aab89caa44953$var$wrappedEmit({ 31375 type: $a44aab89caa44953$var$EventType.Load, 31376 data: {} 31377 }); 31378 if (recordAfter === "load") init(); 31379 }, window)); 31380 } 31381 return function() { 31382 handlers.forEach(function(handler) { 31383 try { 31384 handler(); 31385 } catch (error) { 31386 var msg = String(error).toLowerCase(); 31387 if (!msg.includes("cross-origin")) console.warn(error); 31388 } 31389 }); 31390 processedNodeManager.destroy(); 31391 $a44aab89caa44953$var$recording = false; 31392 $a44aab89caa44953$var$unregisterErrorHandler(); 31393 }; 31394 } catch (error) { 31395 console.warn(error); 31396 } 31397} 31398$a44aab89caa44953$var$record.addCustomEvent = function(tag, payload) { 31399 if (!$a44aab89caa44953$var$recording) throw new Error("please add custom event after start recording"); 31400 $a44aab89caa44953$var$wrappedEmit({ 31401 type: $a44aab89caa44953$var$EventType.Custom, 31402 data: { 31403 tag: tag, 31404 payload: payload 31405 } 31406 }); 31407}; 31408$a44aab89caa44953$var$record.freezePage = function() { 31409 $a44aab89caa44953$var$mutationBuffers.forEach(function(buf) { 31410 return buf.freeze(); 31411 }); 31412}; 31413$a44aab89caa44953$var$record.takeFullSnapshot = function(isCheckout) { 31414 if (!$a44aab89caa44953$var$recording) throw new Error("please take full snapshot after start recording"); 31415 $a44aab89caa44953$var$takeFullSnapshot$1(isCheckout); 31416}; 31417$a44aab89caa44953$var$record.mirror = $a44aab89caa44953$var$mirror; 31418var $a44aab89caa44953$var$n; 31419!function(t2) { 31420 t2[t2.NotStarted = 0] = "NotStarted", t2[t2.Running = 1] = "Running", t2[t2.Stopped = 2] = "Stopped"; 31421}($a44aab89caa44953$var$n || ($a44aab89caa44953$var$n = {})); 31422$a44aab89caa44953$var$record.addCustomEvent; 31423$a44aab89caa44953$var$record.freezePage; 31424$a44aab89caa44953$var$record.takeFullSnapshot; 31425var $a44aab89caa44953$var$setImmediate = $a44aab89caa44953$var$win['setImmediate']; 31426var $a44aab89caa44953$var$builtInProp, $a44aab89caa44953$var$cycle, $a44aab89caa44953$var$schedulingQueue, $a44aab89caa44953$var$ToString = Object.prototype.toString, $a44aab89caa44953$var$timer = typeof $a44aab89caa44953$var$setImmediate !== 'undefined' ? function timer(fn) { 31427 return $a44aab89caa44953$var$setImmediate(fn); 31428} : setTimeout; 31429// dammit, IE8. 31430try { 31431 Object.defineProperty({}, 'x', {}); 31432 $a44aab89caa44953$var$builtInProp = function builtInProp(obj, name, val, config) { 31433 return Object.defineProperty(obj, name, { 31434 value: val, 31435 writable: true, 31436 configurable: config !== false 31437 }); 31438 }; 31439} catch (err) { 31440 $a44aab89caa44953$var$builtInProp = function builtInProp(obj, name, val) { 31441 obj[name] = val; 31442 return obj; 31443 }; 31444} 31445// Note: using a queue instead of array for efficiency 31446$a44aab89caa44953$var$schedulingQueue = function Queue() { 31447 var first, last, item; 31448 function Item(fn, self) { 31449 this.fn = fn; 31450 this.self = self; 31451 this.next = void 0; 31452 } 31453 return { 31454 add: function add(fn, self) { 31455 item = new Item(fn, self); 31456 if (last) last.next = item; 31457 else first = item; 31458 last = item; 31459 item = void 0; 31460 }, 31461 drain: function drain() { 31462 var f = first; 31463 first = last = $a44aab89caa44953$var$cycle = void 0; 31464 while(f){ 31465 f.fn.call(f.self); 31466 f = f.next; 31467 } 31468 } 31469 }; 31470}(); 31471function $a44aab89caa44953$var$schedule(fn, self) { 31472 $a44aab89caa44953$var$schedulingQueue.add(fn, self); 31473 if (!$a44aab89caa44953$var$cycle) $a44aab89caa44953$var$cycle = $a44aab89caa44953$var$timer($a44aab89caa44953$var$schedulingQueue.drain); 31474} 31475// promise duck typing 31476function $a44aab89caa44953$var$isThenable(o) { 31477 var _then, oType = typeof o; 31478 if (o !== null && (oType === 'object' || oType === 'function')) _then = o.then; 31479 return typeof _then === 'function' ? _then : false;
31480} 31481function $a44aab89caa44953$var$notify() { 31482 for(var i = 0; i < this.chain.length; i++)$a44aab89caa44953$var$notifyIsolated(this, this.state === 1 ? this.chain[i].success : this.chain[i].failure, this.chain[i]); 31483 this.chain.length = 0; 31484} 31485// NOTE: This is a separate function to isolate 31486// the `try..catch` so that other code can be 31487// optimized better 31488function $a44aab89caa44953$var$notifyIsolated(self, cb, chain) { 31489 var ret, _then; 31490 try { 31491 if (cb === false) chain.reject(self.msg); 31492 else { 31493 if (cb === true) ret = self.msg; 31494 else ret = cb.call(void 0, self.msg); 31495 if (ret === chain.promise) chain.reject(TypeError('Promise-chain cycle')); 31496 else if (_then = $a44aab89caa44953$var$isThenable(ret)) _then.call(ret, chain.resolve, chain.reject); 31497 else chain.resolve(ret); 31498 } 31499 } catch (err) { 31500 chain.reject(err); 31501 } 31502} 31503function $a44aab89caa44953$var$resolve(msg) { 31504 var _then, self = this; 31505 // already triggered? 31506 if (self.triggered) return; 31507 self.triggered = true; 31508 // unwrap 31509 if (self.def) self = self.def; 31510 try { 31511 // eslint-disable-next-line no-cond-assign 31512 if (_then = $a44aab89caa44953$var$isThenable(msg)) $a44aab89caa44953$var$schedule(function() { 31513 var defWrapper = new $a44aab89caa44953$var$MakeDefWrapper(self); 31514 try { 31515 _then.call(msg, function $resolve$() { 31516 $a44aab89caa44953$var$resolve.apply(defWrapper, arguments); 31517 }, function $reject$() { 31518 $a44aab89caa44953$var$reject.apply(defWrapper, arguments); 31519 }); 31520 } catch (err) { 31521 $a44aab89caa44953$var$reject.call(defWrapper, err); 31522 } 31523 }); 31524 else { 31525 self.msg = msg; 31526 self.state = 1; 31527 if (self.chain.length > 0) $a44aab89caa44953$var$schedule($a44aab89caa44953$var$notify, self); 31528 } 31529 } catch (err) { 31530 $a44aab89caa44953$var$reject.call(new $a44aab89caa44953$var$MakeDefWrapper(self), err); 31531 } 31532} 31533function $a44aab89caa44953$var$reject(msg) { 31534 var self = this; 31535 // already triggered? 31536 if (self.triggered) return; 31537 self.triggered = true; 31538 // unwrap 31539 if (self.def) self = self.def; 31540 self.msg = msg; 31541 self.state = 2; 31542 if (self.chain.length > 0) $a44aab89caa44953$var$schedule($a44aab89caa44953$var$notify, self); 31543} 31544function $a44aab89caa44953$var$iteratePromises(Constructor, arr, resolver, rejecter) { 31545 for(var idx = 0; idx < arr.length; idx++)(function IIFE(idx) { 31546 Constructor.resolve(arr[idx]).then(function $resolver$(msg) { 31547 resolver(idx, msg); 31548 }, rejecter); 31549 })(idx); 31550} 31551function $a44aab89caa44953$var$MakeDefWrapper(self) { 31552 this.def = self; 31553 this.triggered = false; 31554} 31555function $a44aab89caa44953$var$MakeDef(self) { 31556 this.promise = self; 31557 this.state = 0; 31558 this.triggered = false; 31559 this.chain = []; 31560 this.msg = void 0; 31561} 31562function $a44aab89caa44953$var$NpoPromise(executor) { 31563 if (typeof executor !== 'function') throw TypeError('Not a function'); 31564 if (this['__NPO__'] !== 0) throw TypeError('Not a promise'); 31565 // instance shadowing the inherited "brand" 31566 // to signal an already "initialized" promise 31567 this['__NPO__'] = 1; 31568 var def = new $a44aab89caa44953$var$MakeDef(this); 31569 this['then'] = function then(success, failure) { 31570 var o = { 31571 success: typeof success === 'function' ? success : true, 31572 failure: typeof failure === 'function' ? failure : false 31573 }; 31574 // Note: `then(..)` itself can be borrowed to be used against 31575 // a different promise constructor for making the chained promise, 31576 // by substituting a different `this` binding. 31577 o.promise = new this.constructor(function extractChain(resolve, reject) { 31578 if (typeof resolve !== 'function' || typeof reject !== 'function') throw TypeError('Not a function'); 31579 o.resolve = resolve; 31580 o.reject = reject; 31581 }); 31582 def.chain.push(o); 31583 if (def.state !== 0) $a44aab89caa44953$var$schedule($a44aab89caa44953$var$notify, def); 31584 return o.promise; 31585 }; 31586 this['catch'] = function $catch$(failure) { 31587 return this.then(void 0, failure); 31588 }; 31589 try { 31590 executor.call(void 0, function publicResolve(msg) { 31591 $a44aab89caa44953$var$resolve.call(def, msg); 31592 }, function publicReject(msg) { 31593 $a44aab89caa44953$var$reject.call(def, msg); 31594 }); 31595 } catch (err) { 31596 $a44aab89caa44953$var$reject.call(def, err); 31597 } 31598} 31599var $a44aab89caa44953$var$PromisePrototype = $a44aab89caa44953$var$builtInProp({}, 'constructor', $a44aab89caa44953$var$NpoPromise, /*configurable=*/ false); 31600// Note: Android 4 cannot use `Object.defineProperty(..)` here 31601$a44aab89caa44953$var$NpoPromise.prototype = $a44aab89caa44953$var$PromisePrototype; 31602// built-in "brand" to signal an "uninitialized" promise 31603$a44aab89caa44953$var$builtInProp($a44aab89caa44953$var$PromisePrototype, '__NPO__', 0, /*configurable=*/ false); 31604$a44aab89caa44953$var$builtInProp($a44aab89caa44953$var$NpoPromise, 'resolve', function Promise$resolve(msg) { 31605 var Constructor = this; 31606 // spec mandated checks 31607 // note: best "isPromise" check that's practical for now 31608 if (msg && typeof msg === 'object' && msg['__NPO__'] === 1) return msg; 31609 return new Constructor(function executor(resolve, reject) { 31610 if (typeof resolve !== 'function' || typeof reject !== 'function') throw TypeError('Not a function'); 31611 resolve(msg); 31612 }); 31613}); 31614$a44aab89caa44953$var$builtInProp($a44aab89caa44953$var$NpoPromise, 'reject', function Promise$reject(msg) { 31615 return new this(function executor(resolve, reject) { 31616 if (typeof resolve !== 'function' || typeof reject !== 'function') throw TypeError('Not a function'); 31617 reject(msg); 31618 }); 31619}); 31620$a44aab89caa44953$var$builtInProp($a44aab89caa44953$var$NpoPromise, 'all', function Promise$all(arr) { 31621 var Constructor = this; 31622 // spec mandated checks 31623 if ($a44aab89caa44953$var$ToString.call(arr) !== '[object Array]') return Constructor.reject(TypeError('Not an array')); 31624 if (arr.length === 0) return Constructor.resolve([]); 31625 return new Constructor(function executor(resolve, reject) { 31626 if (typeof resolve !== 'function' || typeof reject !== 'function') throw TypeError('Not a function'); 31627 var len = arr.length, msgs = Array(len), count = 0; 31628 $a44aab89caa44953$var$iteratePromises(Constructor, arr, function resolver(idx, msg) { 31629 msgs[idx] = msg; 31630 if (++count === len) resolve(msgs); 31631 }, reject); 31632 }); 31633}); 31634$a44aab89caa44953$var$builtInProp($a44aab89caa44953$var$NpoPromise, 'race', function Promise$race(arr) { 31635 var Constructor = this; 31636 // spec mandated checks 31637 if ($a44aab89caa44953$var$ToString.call(arr) !== '[object Array]') return Constructor.reject(TypeError('Not an array')); 31638 return new Constructor(function executor(resolve, reject) { 31639 if (typeof resolve !== 'function' || typeof reject !== 'function') throw TypeError('Not a function'); 31640 $a44aab89caa44953$var$iteratePromises(Constructor, arr, function resolver(idx, msg) { 31641 resolve(msg); 31642 }, reject); 31643 }); 31644}); 31645var $a44aab89caa44953$var$PromisePolyfill; 31646if (typeof Promise !== 'undefined' && Promise.toString().indexOf('[native code]') !== -1) $a44aab89caa44953$var$PromisePolyfill = Promise; 31647else $a44aab89caa44953$var$PromisePolyfill = $a44aab89caa44953$var$NpoPromise; 31648var $a44aab89caa44953$var$Config = { 31649 DEBUG: false, 31650 LIB_VERSION: '2.69.0' 31651}; 31652/* eslint camelcase: "off", eqeqeq: "off" */ // Maximum allowed session recording length 31653var $a44aab89caa44953$var$MAX_RECORDING_MS = 86400000; // 24 hours 31654// Maximum allowed value for minimum session recording length 31655var $a44aab89caa44953$var$MAX_VALUE_FOR_MIN_RECORDING_MS = 8000; // 8 seconds 31656/* 31657 * Saved references to long variable names, so that closure compiler can 31658 * minimize file size. 31659 */ var $a44aab89caa44953$var$ArrayProto = Array.prototype, $a44aab89caa44953$var$FuncProto = Function.prototype, $a44aab89caa44953$var$ObjProto = Object.prototype, $a44aab89caa44953$var$slice = $a44aab89caa44953$var$ArrayProto.slice, $a44aab89caa44953$var$toString = $a44aab89caa44953$var$ObjProto.toString, $a44aab89caa44953$var$hasOwnProperty = $a44aab89caa44953$var$ObjProto.hasOwnProperty, $a44aab89caa44953$var$windowConsole = $a44aab89caa44953$var$win.console, $a44aab89caa44953$var$navigator = $a44aab89caa44953$var$win.navigator, $a44aab89caa44953$var$document$1 = $a44aab89caa44953$var$win.document, $a44aab89caa44953$var$windowOpera = $a44aab89caa44953$var$win.opera, $a44aab89caa44953$var$screen = $a44aab89caa44953$var$win.screen, $a44aab89caa44953$var$userAgent = $a44aab89caa44953$var$navigator.userAgent; 31660var $a44aab89caa44953$var$nativeBind = $a44aab89caa44953$var$FuncProto.bind, $a44aab89caa44953$var$nativeForEach = $a44aab89caa44953$var$ArrayProto.forEach, $a44aab89caa44953$var$nativeIndexOf = $a44aab89caa44953$var$ArrayProto.indexOf, $a44aab89caa44953$var$nativeMap = $a44aab89caa44953$var$ArrayProto.map, $a44aab89caa44953$var$nativeIsArray = Array.isArray, $a44aab89caa44953$var$breaker = {}; 31661var $a44aab89caa44953$var$_ = { 31662 trim: function(str) { 31663 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill 31664 return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); 31665 } 31666}; 31667// Console override 31668var $a44aab89caa44953$var$console$1 = { 31669 /** @type {function(...*)} */ log: function() { 31670 if ($a44aab89caa44953$var$Config.DEBUG && !$a44aab89caa44953$var$_.isUndefined($a44aab89caa44953$var$windowConsole) && $a44aab89caa44953$var$windowConsole) try { 31671 $a44aab89caa44953$var$windowConsole.log.apply($a44aab89caa44953$var$windowConsole, arguments); 31672 } catch (err) { 31673 $a44aab89caa44953$var$_.each(arguments, function(arg) { 31674 $a44aab89caa44953$var$windowConsole.log(arg); 31675 }); 31676 } 31677 }, 31678 /** @type {function(...*)} */ warn: function() { 31679 if ($a44aab89caa44953$var$Config.DEBUG && !$a44aab89caa44953$var$_.isUndefined($a44aab89caa44953$var$windowConsole) && $a44aab89caa44953$var$windowConsole) { 31680 var args = [ 31681 'Mixpanel warning:' 31682 ].concat($a44aab89caa44953$var$_.toArray(arguments)); 31683 try { 31684 $a44aab89caa44953$var$windowConsole.warn.apply($a44aab89caa44953$var$windowConsole, args); 31685 } catch (err) { 31686 $a44aab89caa44953$var$_.each(args, function(arg) { 31687 $a44aab89caa44953$var$windowConsole.warn(arg); 31688 }); 31689 } 31690 } 31691 }, 31692 /** @type {function(...*)} */ error: function() { 31693 if ($a44aab89caa44953$var$Config.DEBUG && !$a44aab89caa44953$var$_.isUndefined($a44aab89caa44953$var$windowConsole) && $a44aab89caa44953$var$windowConsole) { 31694 var args = [ 31695 'Mixpanel error:' 31696 ].concat($a44aab89caa44953$var$_.toArray(arguments)); 31697 try { 31698 $a44aab89caa44953$var$windowConsole.error.apply($a44aab89caa44953$var$windowConsole, args); 31699 } catch (err) { 31700 $a44aab89caa44953$var$_.each(args, function(arg) { 31701 $a44aab89caa44953$var$windowConsole.error(arg); 31702 }); 31703 } 31704 } 31705 }, 31706 /** @type {function(...*)} */ critical: function() { 31707 if (!$a44aab89caa44953$var$_.isUndefined($a44aab89caa44953$var$windowConsole) && $a44aab89caa44953$var$windowConsole) { 31708 var args = [ 31709 'Mixpanel error:' 31710 ].concat($a44aab89caa44953$var$_.toArray(arguments)); 31711 try { 31712 $a44aab89caa44953$var$windowConsole.error.apply($a44aab89caa44953$var$windowConsole, args); 31713 } catch (err) { 31714 $a44aab89caa44953$var$_.each(args, function(arg) { 31715 $a44aab89caa44953$var$windowConsole.error(arg); 31716 }); 31717 } 31718 } 31719 } 31720}; 31721var $a44aab89caa44953$var$log_func_with_prefix = function(func, prefix) { 31722 return function() { 31723 arguments[0] = '[' + prefix + '] ' + arguments[0]; 31724 return func.apply($a44aab89caa44953$var$console$1, arguments); 31725 }; 31726}; 31727var $a44aab89caa44953$var$console_with_prefix = function(prefix) { 31728 return { 31729 log: $a44aab89caa44953$var$log_func_with_prefix($a44aab89caa44953$var$console$1.log, prefix), 31730 error: $a44aab89caa44953$var$log_func_with_prefix($a44aab89caa44953$var$console$1.error, prefix), 31731 critical: $a44aab89caa44953$var$log_func_with_prefix($a44aab89caa44953$var$console$1.critical, prefix) 31732 }; 31733}; 31734var $a44aab89caa44953$var$safewrap = function(f) { 31735 return function() { 31736 try { 31737 return f.apply(this, arguments); 31738 } catch (e) { 31739 $a44aab89caa44953$var$console$1.critical('Implementation error. Please turn on debug and contact [email protected].'); 31740 if ($a44aab89caa44953$var$Config.DEBUG) $a44aab89caa44953$var$console$1.critical(e); 31741 } 31742 }; 31743}; 31744var $a44aab89caa44953$var$safewrapClass = function(klass) { 31745 var proto = klass.prototype;
31746 for(var func in proto)if (typeof proto[func] === 'function') proto[func] = $a44aab89caa44953$var$safewrap(proto[func]); 31747}; 31748// UNDERSCORE 31749// Embed part of the Underscore Library 31750$a44aab89caa44953$var$_.bind = function(func, context) { 31751 var args, bound; 31752 if ($a44aab89caa44953$var$nativeBind && func.bind === $a44aab89caa44953$var$nativeBind) return $a44aab89caa44953$var$nativeBind.apply(func, $a44aab89caa44953$var$slice.call(arguments, 1)); 31753 if (!$a44aab89caa44953$var$_.isFunction(func)) throw new TypeError(); 31754 args = $a44aab89caa44953$var$slice.call(arguments, 2); 31755 bound = function() { 31756 if (!(this instanceof bound)) return func.apply(context, args.concat($a44aab89caa44953$var$slice.call(arguments))); 31757 var ctor = {}; 31758 ctor.prototype = func.prototype; 31759 var self = new ctor(); 31760 ctor.prototype = null; 31761 var result = func.apply(self, args.concat($a44aab89caa44953$var$slice.call(arguments))); 31762 if (Object(result) === result) return result; 31763 return self; 31764 }; 31765 return bound; 31766}; 31767/** 31768 * @param {*=} obj 31769 * @param {function(...*)=} iterator 31770 * @param {Object=} context 31771 */ $a44aab89caa44953$var$_.each = function(obj, iterator, context) { 31772 if (obj === null || obj === undefined) return; 31773 if ($a44aab89caa44953$var$nativeForEach && obj.forEach === $a44aab89caa44953$var$nativeForEach) obj.forEac
31773h(iterator, context); 31774 else if (obj.length === +obj.length) for(var i = 0, l = obj.length; i < l; i++){ 31775 if (i in obj && iterator.call(context, obj[i], i, obj) === $a44aab89caa44953$var$breaker) return; 31776 } 31777 else { 31778 for(var key in obj)if ($a44aab89caa44953$var$hasOwnProperty.call(obj, key)) { 31779 if (iterator.call(context, obj[key], key, obj) === $a44aab89caa44953$var$breaker) return; 31780 } 31781 } 31782}; 31783$a44aab89caa44953$var$_.extend = function(obj) { 31784 $a44aab89caa44953$var$_.each($a44aab89caa44953$var$slice.call(arguments, 1), function(source) { 31785 for(var prop in source)if (source[prop] !== void 0) obj[prop] = source[prop]; 31786 }); 31787 return obj; 31788}; 31789$a44aab89caa44953$var$_.isArray = $a44aab89caa44953$var$nativeIsArray || function(obj) { 31790 return $a44aab89caa44953$var$toString.call(obj) === '[object Array]'; 31791}; 31792// from a comment on http://dbj.org/dbj/?p=286 31793// fails on only one very rare and deliberate custom object: 31794// var bomb = { toString : undefined, valueOf: function(o) { return "function BOMBA!"; }}; 31795$a44aab89caa44953$var$_.isFunction = function(f) { 31796 try { 31797 return /^\s*\bfunction\b/.test(f); 31798 } catch (x) { 31799 return false; 31800 } 31801}; 31802$a44aab89caa44953$var$_.isArguments = function(obj) { 31803 return !!(obj && $a44aab89caa44953$var$hasOwnProperty.call(obj, 'callee')); 31804}; 31805$a44aab89caa44953$var$_.toArray = function(iterable) { 31806 if (!iterable) return []; 31807 if (iterable.toArray) return iterable.toArray(); 31808 if ($a44aab89caa44953$var$_.isArray(iterable)) return $a44aab89caa44953$var$slice.call(iterable); 31809 if ($a44aab89caa44953$var$_.isArguments(iterable)) return $a44aab89caa44953$var$slice.call(iterable); 31810 return $a44aab89caa44953$var$_.values(iterable); 31811}; 31812$a44aab89caa44953$var$_.map = function(arr, callback, context) { 31813 if ($a44aab89caa44953$var$nativeMap && arr.map === $a44aab89caa44953$var$nativeMap) return arr.map(callback, context); 31814 else { 31815 var results = []; 31816 $a44aab89caa44953$var$_.each(arr, function(item) { 31817 results.push(callback.call(context, item)); 31818 }); 31819 return results; 31820 } 31821}; 31822$a44aab89caa44953$var$_.keys = function(obj) { 31823 var results = []; 31824 if (obj === null) return results; 31825 $a44aab89caa44953$var$_.each(obj, function(value, key) { 31826 results[results.length] = key; 31827 }); 31828 return results; 31829}; 31830$a44aab89caa44953$var$_.values = function(obj) { 31831 var results = []; 31832 if (obj === null) return results; 31833 $a44aab89caa44953$var$_.each(obj, function(value) { 31834 results[results.length] = value; 31835 }); 31836 return results; 31837}; 31838$a44aab89caa44953$var$_.include = function(obj, target) { 31839 var found = false; 31840 if (obj === null) return found; 31841 if ($a44aab89caa44953$var$nativeIndexOf && obj.indexOf === $a44aab89caa44953$var$nativeIndexOf) return obj.indexOf(target) != -1; 31842 $a44aab89caa44953$var$_.each(obj, function(value) { 31843 if (found || (found = value === target)) return $a44aab89caa44953$var$breaker; 31844 }); 31845 return found; 31846}; 31847$a44aab89caa44953$var$_.includes = function(str, needle) { 31848 return str.indexOf(needle) !== -1; 31849}; 31850// Underscore Addons 31851$a44aab89caa44953$var$_.inherit = function(subclass, superclass) { 31852 subclass.prototype = new superclass(); 31853 subclass.prototype.constructor = subclass; 31854 subclass.superclass = superclass.prototype; 31855 return subclass; 31856}; 31857$a44aab89caa44953$var$_.isObject = function(obj) { 31858 return obj === Object(obj) && !$a44aab89caa44953$var$_.isArray(obj); 31859}; 31860$a44aab89caa44953$var$_.isEmptyObject = function(obj) { 31861 if ($a44aab89caa44953$var$_.isObject(obj)) { 31862 for(var key in obj){ 31863 if ($a44aab89caa44953$var$hasOwnProperty.call(obj, key)) return false; 31864 } 31865 return true; 31866 } 31867 return false; 31868}; 31869$a44aab89caa44953$var$_.isUndefined = function(obj) { 31870 return obj === void 0; 31871}; 31872$a44aab89caa44953$var$_.isString = function(obj) { 31873 return $a44aab89caa44953$var$toString.call(obj) == '[object String]'; 31874}; 31875$a44aab89caa44953$var$_.isDate = function(obj) { 31876 return $a44aab89caa44953$var$toString.call(obj) == '[object Date]'; 31877}; 31878$a44aab89caa44953$var$_.isNumber = function(obj) { 31879 return $a44aab89caa44953$var$toString.call(obj) == '[object Number]'; 31880}; 31881$a44aab89caa44953$var$_.isElement = function(obj) { 31882 return !!(obj && obj.nodeType === 1); 31883}; 31884$a44aab89caa44953$var$_.encodeDates = function(obj) { 31885 $a44aab89caa44953$var$_.each(obj, function(v, k) { 31886 if ($a44aab89caa44953$var$_.isDate(v)) obj[k] = $a44aab89caa44953$var$_.formatDate(v); 31887 else if ($a44aab89caa44953$var$_.isObject(v)) obj[k] = $a44aab89caa44953$var$_.encodeDates(v); // recurse 31888 }); 31889 return obj; 31890}; 31891$a44aab89caa44953$var$_.timestamp = function() { 31892 Date.now = Date.now || function() { 31893 return +new Date; 31894 }; 31895 return Date.now(); 31896}; 31897$a44aab89caa44953$var$_.formatDate = function(d) { 31898 // YYYY-MM-DDTHH:MM:SS in UTC 31899 function pad(n) { 31900 return n < 10 ? '0' + n : n; 31901 } 31902 return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()); 31903}; 31904$a44aab89caa44953$var$_.strip_empty_properties = function(p) { 31905 var ret = {}; 31906 $a44aab89caa44953$var$_.each(p, function(v, k) { 31907 if ($a44aab89caa44953$var$_.isString(v) && v.length > 0) ret[k] = v; 31908 }); 31909 return ret; 31910}; 31911/* 31912 * this function returns a copy of object after truncating it. If 31913 * passed an Array or Object it will iterate through obj and 31914 * truncate all the values recursively. 31915 */ $a44aab89caa44953$var$_.truncate = function(obj, length) { 31916 var ret; 31917 if (typeof obj === 'string') ret = obj.slice(0, length); 31918 else if ($a44aab89caa44953$var$_.isArray(obj)) { 31919 ret = []; 31920 $a44aab89caa44953$var$_.each(obj, function(val) {
31921 ret.push($a44aab89caa44953$var$_.truncate(val, length)); 31922 }); 31923 } else if ($a44aab89caa44953$var$_.isObject(obj)) { 31924 ret = {}; 31925 $a44aab89caa44953$var$_.each(obj, function(val, key) { 31926 ret[key] = $a44aab89caa44953$var$_.truncate(val, length); 31927 }); 31928 } else ret = obj; 31929 return ret; 31930}; 31931$a44aab89caa44953$var$_.JSONEncode = function() { 31932 return function(mixed_val) { 31933 var value = mixed_val; 31934 var quote = function(string) { 31935 var escapable = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; // eslint-disable-line no-control-regex 31936 var meta = { 31937 '\b': '\\b', 31938 '\t': '\\t', 31939 '\n': '\\n', 31940 '\f': '\\f', 31941 '\r': '\\r', 31942 '"': '\\"', 31943 '\\': '\\\\' 31944 }; 31945 escapable.lastIndex = 0; 31946 return escapable.test(string) ? '"' + string.replace(escapable, function(a) { 31947 var c = meta[a]; 31948 return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); 31949 }) + '"' : '"' + string + '"'; 31950 }; 31951 var str = function(key, holder) { 31952 var gap = ''; 31953 var indent = ' '; 31954 var i = 0; // The loop counter. 31955 var k = ''; // The member key. 31956 var v = ''; // The member value. 31957 var length = 0; 31958 var mind = gap; 31959 var partial = []; 31960 var value = holder[key]; 31961 // If the value has a toJSON method, call it to obtain a replacement value. 31962 if (value && typeof value === 'object' && typeof value.toJSON === 'function') value = value.toJSON(key); 31963 // What happens next depends on the value's type. 31964 switch(typeof value){ 31965 case 'string': 31966 return quote(value); 31967 case 'number': 31968 // JSON numbers must be finite. Encode non-finite numbers as null. 31969 return isFinite(value) ? String(value) : 'null'; 31970 case 'boolean': 31971 case 'null': 31972 // If the value is a boolean or null, convert it to a string. Note: 31973 // typeof null does not produce 'null'. The case is included here in 31974 // the remote chance that this gets fixed someday. 31975 return String(value); 31976 case 'object': 31977 // If the type is 'object', we might be dealing with an object or an array or 31978 // null. 31979 // Due to a specification blunder in ECMAScript, typeof null is 'object', 31980 // so watch out for that case. 31981 if (!value) return 'null'; 31982 // Make an array to hold the partial results of stringifying this object value. 31983 gap += indent; 31984 partial = []; 31985 // Is the value an array? 31986 if ($a44aab89caa44953$var$toString.apply(value) === '[object Array]') { 31987 // The value is an array. Stringify every element. Use null as a placeholder 31988 // for non-JSON values. 31989 length = value.length; 31990 for(i = 0; i < length; i += 1)partial[i] = str(i, value) || 'null'; 31991 // Join all of the elements together, separated with commas, and wrap them in 31992 // brackets. 31993 v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']'; 31994 gap = mind; 31995 return v; 31996 } 31997 // Iterate through all of the keys in the object. 31998 for(k in value)if ($a44aab89caa44953$var$hasOwnProperty.call(value, k)) { 31999 v = str(k, value); 32000 if (v) partial.push(quote(k) + (gap ? ': ' : ':') + v); 32001 } 32002 // Join all of the member texts together, separated with commas, 32003 // and wrap them in braces. 32004 v = partial.length === 0 ? '{}' : gap ? '{' + partial.join(',') + '' + mind + '}' : '{' + partial.join(',') + '}'; 32005 gap = mind; 32006 return v; 32007 } 32008 };
32009 // Make a fake root object containing our value under the key of ''. 32010 // Return the result of stringifying the value. 32011 return str('', { 32012 '': value 32013 }); 32014 }; 32015}(); 32016/** 32017 * From https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js 32018 * Slightly modified to throw a real Error rather than a POJO 32019 */ $a44aab89caa44953$var$_.JSONDecode = function() { 32020 var at, ch, escapee = { 32021 '"': '"', 32022 '\\': '\\', 32023 '/': '/', 32024 'b': '\b', 32025 'f': '\f', 32026 'n': '\n', 32027 'r': '\r', 32028 't': '\t' 32029 }, text, error = function(m) { 32030 var e = new SyntaxError(m); 32031 e.at = at; 32032 e.text = text; 32033 throw e; 32034 }, next = function(c) { 32035 // If a c parameter is provided, verify that it matches the current character. 32036 if (c && c !== ch) error('Expected \'' + c + '\' instead of \'' + ch + '\''); 32037 // Get the next character. When there are no more characters, 32038 // return the empty string. 32039 ch = text.charAt(at); 32040 at += 1; 32041 return ch; 32042 }, number = function() { 32043 // Parse a number value. 32044 var number, string = ''; 32045 if (ch === '-') { 32046 string = '-'; 32047 next('-'); 32048 } 32049 while(ch >= '0' && ch <= '9'){ 32050 string += ch; 32051 next(); 32052 } 32053 if (ch === '.') { 32054 string += '.';
32055 while(next() && ch >= '0' && ch <= '9')string += ch; 32056 } 32057 if (ch === 'e' || ch === 'E') { 32058 string += ch; 32059 next(); 32060 if (ch === '-' || ch === '+') { 32061 string += ch; 32062 next(); 32063 } 32064 while(ch >= '0' && ch <= '9'){ 32065 string += ch; 32066 next(); 32067 } 32068 } 32069 number = +string; 32070 if (!isFinite(number)) error('Bad number'); 32071 else return number; 32072 }, string = function() { 32073 // Parse a string value. 32074 var hex, i, string = '', uffff; 32075 // When parsing for string values, we must look for " and \ characters. 32076 if (ch === '"') while(next()){ 32077 if (ch === '"') { 32078 next(); 32079 return string; 32080 } 32081 if (ch === '\\') { 32082 next(); 32083 if (ch === 'u') { 32084 uffff = 0; 32085 for(i = 0; i < 4; i += 1){ 32086 hex = parseInt(next(), 16); 32087 if (!isFinite(hex)) break; 32088 uffff = uffff * 16 + hex; 32089 } 32090 string += String.fromCharCode(uffff); 32091 } else if (typeof escapee[ch] === 'string') string += escapee[ch]; 32092 else break; 32093 } else string += ch; 32094 } 32095 error('Bad string'); 32096 }, white = function() { 32097 // Skip whitespace. 32098 while(ch && ch <= ' ')next(); 32099 }, word = function() { 32100 // true, false, or null. 32101 switch(ch){ 32102 case 't': 32103 next('t'); 32104 next('r'); 32105 next('u'); 32106 next('e'); 32107 return true; 32108 case 'f': 32109 next('f'); 32110 next('a'); 32111 next('l'); 32112 next('s'); 32113 next('e'); 32114 return false; 32115 case 'n': 32116 next('n'); 32117 next('u'); 32118 next('l'); 32119 next('l'); 32120 return null; 32121 } 32122 error('Unexpected "' + ch + '"'); 32123 }, value, array = function() { 32124 // Parse an array value. 32125 var array = []; 32126 if (ch === '[') { 32127 next('['); 32128 white(); 32129 if (ch === ']') { 32130 next(']'); 32131 return array; // empty array 32132 } 32133 while(ch){ 32134 array.push(value()); 32135 white(); 32136 if (ch === ']') { 32137 next(']'); 32138 return array; 32139 } 32140 next(','); 32141 white(); 32142 } 32143 } 32144 error('Bad array'); 32145 }, object = function() { 32146 // Parse an object value. 32147 var key, object = {}; 32148 if (ch === '{') { 32149 next('{'); 32150 white(); 32151 if (ch === '}') { 32152 next('}'); 32153 return object; // empty object 32154 } 32155 while(ch){ 32156 key = string(); 32157 white(); 32158 next(':'); 32159 if (Object.hasOwnProperty.call(object, key)) error('Duplicate key "' + key + '"'); 32160 object[key] = value(); 32161 white(); 32162 if (ch === '}') { 32163 next('}'); 32164 return object; 32165 } 32166 next(','); 32167 white(); 32168 } 32169 } 32170 error('Bad object'); 32171 }; 32172 value = function() { 32173 // Parse a JSON value. It could be an object, an array, a string, 32174 // a number, or a word. 32175 white(); 32176 switch(ch){ 32177 case '{': 32178 return object(); 32179 case '[': 32180 return array(); 32181 case '"': 32182 return string(); 32183 case '-': 32184 return number(); 32185 default: 32186 return ch >= '0' && ch <= '9' ? number() : word(); 32187 } 32188 }; 32189 // Return the json_parse function. It will have access to all of the 32190 // above functions and variables. 32191 return function(source) { 32192 var result; 32193 text = source; 32194 at = 0; 32195 ch = ' '; 32196 result = value(); 32197 white(); 32198 if (ch) error('Syntax error'); 32199 return result; 32200 }; 32201}(); 32202$a44aab89caa44953$var$_.base64Encode = function(data) { 32203 var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
32203+/='; 32204 var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc = '', tmp_arr = []; 32205 if (!data) return data; 32206 data = $a44aab89caa44953$var$_.utf8Encode(data); 32207 do { 32208 o1 = data.charCodeAt(i++); 32209 o2 = data.charCodeAt(i++); 32210 o3 = data.charCodeAt(i++); 32211 bits = o1 << 16 | o2 << 8 | o3; 32212 h1 = bits >> 18 & 0x3f; 32213 h2 = bits >> 12 & 0x3f; 32214 h3 = bits >> 6 & 0x3f; 32215 h4 = bits & 0x3f; 32216 // use hexets to index into b64, and append result to encoded string 32217 tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); 32218 }while (i < data.length); 32219 enc = tmp_arr.join(''); 32220 switch(data.length % 3){ 32221 case 1: 32222 enc = enc.slice(0, -2) + '=='; 32223 break; 32224 case 2: 32225 enc = enc.slice(0, -1) + '='; 32226 break; 32227 } 32228 return enc; 32229}; 32230$a44aab89caa44953$var$_.utf8Encode = function(string) { 32231 string = (string + '').replace(/\r\n/g, '\n').replace(/\r/g, '\n'); 32232 var utftext = '', start, end; 32233 var stringl = 0, n; 32234 start = end = 0; 32235 stringl = string.length; 32236 for(n = 0; n < stringl; n++){ 32237 var c1 = string.charCodeAt(n); 32238 var enc = null; 32239 if (c1 < 128) end++; 32240 else if (c1 > 127 && c1 < 2048) enc = String.fromCharCode(c1 >> 6 | 192, c1 & 63 | 128); 32241 else enc = String.fromCharCode(c1 >> 12 | 224, c1 >> 6 & 63 | 128, c1 & 63 | 128); 32242 if (enc !== null) { 32243 if (end > start) utftext += string.substring(start, end); 32244 utftext += enc; 32245 start = end = n + 1; 32246 } 32247 } 32248 if (end > start) utftext += string.substring(start, string.length); 32249 return utftext; 32250}; 32251$a44aab89caa44953$var$_.UUID = function() { 32252 try { 32253 // use native Crypto API when available 32254 return $a44aab89caa44953$var$win['crypto']['randomUUID'](); 32255 } catch (err) { 32256 // fall back to generating our own UUID 32257 // based on https://gist.github.com/scwood/3bff42cc005cc20ab7ec98f0d8e1d59d 32258 var uuid = new Array(36); 32259 for(var i = 0; i < 36; i++)uuid[i] = Math.floor(Math.random() * 16); 32260 uuid[14] = 4; // set bits 12-15 of time-high-and-version to 0100 32261 uuid[19] = uuid[19] &= -5; // set bit 6 of clock-seq-and-reserved to zero 32262 uuid[19] = uuid[19] |= 8; // set bit 7 of clock-seq-and-reserved to one 32263 uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; 32264 return $a44aab89caa44953$var$_.map(uuid, function(x) { 32265 return x.toString(16); 32266 }).join(''); 32267 } 32268}; 32269// _.isBlockedUA() 32270// This is to block various web spiders from executing our JS and 32271// sending false tracking data 32272var $a44aab89caa44953$var$BLOCKED_UA_STRS = [ 32273 'ahrefsbot', 32274 'ahrefssiteaudit', 32275 'amazonbot', 32276 'baiduspider', 32277 'bingbot', 32278 'bingpreview', 32279 'chrome-lighthouse', 32280 'facebookexternal', 32281 'petalbot', 32282 'pinterest', 32283 'screaming frog', 32284 'yahoo! slurp', 32285 'yandex', 32286 // a whole bunch of goog-specific crawlers 32287 // https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers 32288 'adsbot-google', 32289 'apis-google', 32290 'duplexweb-google', 32291 'feedfetcher-google', 32292 'google favicon', 32293 'google web preview', 32294 'google-read-aloud', 32295 'googlebot', 32296 'googleweblight', 32297 'mediapartners-google', 32298 'storebot-google' 32299]; 32300$a44aab89caa44953$var$_.isBlockedUA = function(ua) { 32301 var i; 32302 ua = ua.toLowerCase(); 32303 for(i = 0; i < $a44aab89caa44953$var$BLOCKED_UA_STRS.length; i++){ 32304 if (ua.indexOf($a44aab89caa44953$var$BLOCKED_UA_STRS[i]) !== -1) return true; 32305 } 32306 return false; 32307}; 32308/** 32309 * @param {Object=} formdata 32310 * @param {string=} arg_separator 32311 */ $a44aab89caa44953$var$_.HTTPBuildQuery = function(formdata, arg_separator) { 32312 var use_val, use_key, tmp_arr = []; 32313 if ($a44aab89caa44953$var$_.isUndefined(arg_separator)) arg_separator = '&'; 32314 $a44aab89caa44953$var$_.each(formdata, function(val, key) { 32315 use_val = encodeURIComponent(val.toString()); 32316 use_key = encodeURIComponent(key); 32317 tmp_arr[tmp_arr.length] = use_key + '=' + use_val; 32318 }); 32319 return tmp_arr.join(arg_separator); 32320}; 32321$a44aab89caa44953$var$_.getQueryParam = function(url, param) { 32322 // Expects a raw URL 32323 param = param.replace(/[[]/g, '\\[').replace(/[\]]/g, '\\]'); 32324 var regexS = '[\\?&]' + param + '=([^&#]*)', regex = new RegExp(regexS), results = regex.exec(url); 32325 if (results === null || results && typeof results[1] !== 'string' && results[1].length) return ''; 32326 else { 32327 var result = results[1]; 32328 try { 32329 result = decodeURIComponent(result); 32330 } catch (err) { 32331 $a44aab89caa44953$var$console$1.error('Skipping decoding for malformed query param: ' + result); 32332 } 32333 return result.replace(/\+/g, ' '); 32334 } 32335}; 32336// _.cookie 32337// Methods partially borrowed from quirksmode.org/js/cookies.html 32338$a44aab89caa44953$var$_.cookie = { 32339 get: function(name) { 32340 var nameEQ = name + '='; 32341 var ca = $a44aab89caa44953$var$document$1.cookie.split(';'); 32342 for(var i = 0; i < ca.length; i++){ 32343 var c = ca[i]; 32344 while(c.charAt(0) == ' ')c = c.substring(1, c.length); 32345 if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length)); 32346 } 32347 return null; 32348 }, 32349 parse: function(name) { 32350 var cookie; 32351 try { 32352 cookie = $a44aab89caa44953$var$_.JSONDecode($a44aab89caa44953$var$_.cookie.get(name)) || {}; 32353 } catch (err) { 32354 // noop 32355 } 32356 return cookie; 32357 }, 32358 set_seconds: function(name, value, seconds, is_cross_subdomain, is_secure, is_cross_site, domain_override) { 32359 var cdomain = '', expires = '', secure = ''; 32360 if (domain_override) cdomain = '; domain=' + domain_override; 32361 else if (is_cross_subdomain) { 32362 var domain = $a44aab89caa44953$var$extract_domain($a44aab89caa44953$var$document$1.location.hostname); 32363 cdomain = domain ? '; domain=.' + domain : ''; 32364 } 32365 if (seconds) { 32366 var date = new Date(); 32367 date.setTime(date.getTime() + seconds * 1000); 32368 expires = '; expires=' + date.toGMTString(); 32369 } 32370 if (is_cross_site) { 32371 is_secure = true; 32372 secure = '; SameSite=None'; 32373 } 32374 if (is_secure) secure += '; secure'; 32375 $a44aab89caa44953$var$document$1.cookie = name + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure; 32376 }, 32377 set: function(name, value, days, is_cross_subdomain, is_secure, is_cross_site, domain_override) { 32378 var cdomain = '', expires = '', secure = ''; 32379 if (domain_override) cdomain = '; domain=' + domain_override; 32380 else if (is_cross_subdomain) { 32381 var domain = $a44aab89caa44953$var$extract_domain($a44aab89caa44953$var$document$1.location.hostname); 32382 cdomain = domain ? '; domain=.' + domain : ''; 32383 } 32384 if (days) { 32385 var date = new Date(); 32386 date.setTime(date.getTime() + days * 86400000); 32387 expires = '; expires=' + date.toGMTString(); 32388 } 32389 if (is_cross_site) { 32390 is_secure = true; 32391 secure = '; SameSite=None'; 32392 } 32393 if (is_secure) secure += '; secure'; 32394 var new_cookie_val = name + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure; 32395 $a44aab89caa44953$var$document$1.cookie = new_cookie_val; 32396 return new_cookie_val; 32397 }, 32398 remove: function(name, is_cross_subdomain, domain_override) { 32399 $a44aab89caa44953$var$_.cookie.set(name, '', -1, is_cross_subdomain, false, false, domain_override); 32400 } 32401}; 32402var $a44aab89caa44953$var$_testStorageSupported = function(storage) { 32403 var supported = true; 32404 try { 32405 var key = '__mplss_' + $a44aab89caa44953$var$cheap_guid(8), val = 'xyz'; 32406 storage.setItem(key, val); 32407 if (storage.getItem(key) !== val) supported = false;
32408 storage.removeItem(key); 32409 } catch (err) { 32410 supported = false; 32411 } 32412 return supported; 32413}; 32414var $a44aab89caa44953$var$_localStorageSupported = null; 32415var $a44aab89caa44953$var$localStorageSupported = function(storage, forceCheck) { 32416 if ($a44aab89caa44953$var$_localStorageSupported !== null && !forceCheck) return $a44aab89caa44953$var$_localStorageSupported; 32417 return $a44aab89caa44953$var$_localStorageSupported = $a44aab89caa44953$var$_testStorageSupported(storage || $a44aab89caa44953$var$win.localStorage); 32418}; 32419var $a44aab89caa44953$var$_sessionStorageSupported = null; 32420var $a44aab89caa44953$var$sessionStorageSupported = function(storage, forceCheck) { 32421 if ($a44aab89caa44953$var$_sessionStorageSupported !== null && !forceCheck) return $a44aab89caa44953$var$_sessionStorageSupported; 32422 return $a44aab89caa44953$var$_sessionStorageSupported = $a44aab89caa44953$var$_testStorageSupported(storage || $a44aab89caa44953$var$win.sessionStorage); 32423}; 32424function $a44aab89caa44953$var$_storageWrapper(storage, name, is_supported_fn) { 32425 var log_error = function(msg) { 32426 $a44aab89caa44953$var$console$1.error(name + ' error: ' + msg); 32427 }; 32428 return { 32429 is_supported: function(forceCheck) { 32430 var supported = is_supported_fn(storage, forceCheck); 32431 if (!supported) $a44aab89caa44953$var$console$1.error(name + ' unsupported'); 32432 return supported; 32433 }, 32434 error: log_error, 32435 get: function(key) { 32436 try { 32437 return storage.getItem(key); 32438 } catch (err) { 32439 log_error(err); 32440 } 32441 return null; 32442 }, 32443 parse: function(key) { 32444 try { 32445 return $a44aab89caa44953$var$_.JSONDecode(storage.getItem(key)) || {}; 32446 } catch (err) { 32447 // noop 32448 } 32449 return null; 32450 }, 32451 set: function(key, value) { 32452 try { 32453 storage.setItem(key, value); 32454 } catch (err) { 32455 log_error(err); 32456 } 32457 }, 32458 remove: function(key) { 32459 try { 32460 storage.removeItem(key); 32461 } catch (err) { 32462 log_error(err); 32463 } 32464 } 32465 }; 32466} 32467$a44aab89caa44953$var$_.localStorage = $a44aab89caa44953$var$_storageWrapper($a44aab89caa44953$var$win.localStorage, 'localStorage', $a44aab89caa44953$var$localStorageSupported); 32468$a44aab89caa44953$var$_.sessionStorage = $a44aab89caa44953$var$_storageWrapper($a44aab89caa44953$var$win.sessionStorage, 'sessionStorage', $a44aab89caa44953$var$sessionStorageSupported); 32469$a44aab89caa44953$var$_.register_event = function() { 32470 // written by Dean Edwards, 2005 32471 // with input from Tino Zijdel - [email protected] 32472 // with input from Carl Sverre - [email protected] 32473 // with input from Mixpanel 32474 // http://dean.edwards.name/weblog/2005/10/add-event/ 32475 // https://gist.github.com/1930440 32476 /** 32477 * @param {Object} element 32478 * @param {string} type 32479 * @param {function(...*)} handler 32480 * @param {boolean=} oldSchool 32481 * @param {boolean=} useCapture 32482 */ var register_event = function(element, type, handler, oldSchool, useCapture) { 32483 if (!element) { 32484 $a44aab89caa44953$var$console$1.error('No valid element provided to register_event'); 32485 return; 32486 } 32487 if (element.addEventListener && !oldSchool) element.addEventListener(type, handler, !!useCapture); 32488 else { 32489 var ontype = 'on' + type; 32490 var old_handler = element[ontype]; // can be undefined 32491 element[ontype] = makeHandler(element, handler, old_handler); 32492 } 32493 }; 32494 function makeHandler(element, new_handler, old_handlers) { 32495 var handler = function(event) { 32496 event = event || fixEvent($a44aab89caa44953$var$win.event); 32497 // this basically happens in firefox whenever another script 32498 // overwrites the onload callback and doesn't pass the event 32499 // object to previously defined callbacks. All the browsers 32500 // that don't define window.event implement addEventListener 32501 // so the dom_loaded handler will still be fired as usual. 32502 if (!event) return undefined; 32503 var ret = true; 32504 var old_result, new_result; 32505 if ($a44aab89caa44953$var$_.isFunction(old_handlers)) old_result = old_handlers(event); 32506 new_result = new_handler.call(element, event); 32507 if (false === old_result || false === new_result) ret = false;
32508 return ret; 32509 }; 32510 return handler; 32511 } 32512 function fixEvent(event) { 32513 if (event) { 32514 event.preventDefault = fixEvent.preventDefault; 32515 event.stopPropagation = fixEvent.stopPropagation; 32516 } 32517 return event; 32518 } 32519 fixEvent.preventDefault = function() { 32520 this.returnValue = false; 32521 }; 32522 fixEvent.stopPropagation = function() { 32523 this.cancelBubble = true; 32524 }; 32525 return register_event; 32526}(); 32527var $a44aab89caa44953$var$TOKEN_MATCH_REGEX = new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$'); 32528$a44aab89caa44953$var$_.dom_query = function() { 32529 /* document.getElementsBySelector(selector) 32530 - returns an array of element objects from the current document 32531 matching the CSS selector. Selectors can contain element names, 32532 class names and ids and can be nested. For example: 32533 32534 elements = document.getElementsBySelector('div#main p a.external') 32535 32536 Will return an array of all 'a' elements with 'external' in their 32537 class attribute that are contained inside 'p' elements that are 32538 contained inside the 'div' element which has id="main" 32539 32540 New in version 0.4: Support for CSS2 and CSS3 attribute selectors: 32541 See http://www.w3.org/TR/css3-selectors/#attribute-selectors 32542 32543 Version 0.4 - Simon Willison, March 25th 2003 32544 -- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows 32545 -- Opera 7 fails 32546 32547 Version 0.5 - Carl Sverre, Jan 7th 2013 32548 -- Now uses jQuery-esque `hasClass` for testing class name 32549 equality. This fixes a bug related to '-' characters being 32550 considered not part of a 'word' in regex. 32551 */ function getAllChildren(e) { 32552 // Returns all children of element. Workaround required for IE5/Windows. Ugh. 32553 return e.all ? e.all : e.getElementsByTagName('*'); 32554 } 32555 var bad_whitespace = /[\t\r\n]/g; 32556 function hasClass(elem, selector) { 32557 var className = ' ' + selector + ' '; 32558 return (' ' + elem.className + ' ').replace(bad_whitespace, ' ').indexOf(className) >= 0; 32559 } 32560 function getElementsBySelector(selector) { 32561 // Attempt to fail gracefully in lesser browsers 32562 if (!$a44aab89caa44953$var$document$1.getElementsByTagName) return []; 32563 // Split selector in to tokens 32564 var tokens = selector.split(' '); 32565 var token, bits, tagName, found, foundCount, i, j, k, elements, currentContextIndex; 32566 var currentContext = [ 32567 $a44aab89caa44953$var$document$1 32568 ]; 32569 for(i = 0; i < tokens.length; i++){ 32570 token = tokens[i].replace(/^\s+/, '').replace(/\s+$/, ''); 32571 if (token.indexOf('#') > -1) { 32572 // Token is an ID selector 32573 bits = token.split('#'); 32574 tagName = bits[0]; 32575 var id = bits[1]; 32576 var element = $a44aab89caa44953$var$document$1.getElementById(id); 32577 if (!element || tagName && element.nodeName.toLowerCase() != tagName) // element not found or tag with that ID not found, return false 32578 return []; 32579 // Set currentContext to contain just this element 32580 currentContext = [ 32581 element 32582 ]; 32583 continue; // Skip to next token 32584 } 32585 if (token.indexOf('.') > -1) { 32586 // Token contains a class selector 32587 bits = token.split('.'); 32588 tagName = bits[0]; 32589 var className = bits[1]; 32590 if (!tagName) tagName = '*'; 32591 // Get elements matching tag, filter them for class selector 32592 found = []; 32593 foundCount = 0; 32594 for(j = 0; j < currentContext.length; j++){ 32595 if (tagName == '*') elements = getAllChildren(currentContext[j]); 32596 else elements = currentContext[j].getElementsByTagName(tagName); 32597 for(k = 0; k < elements.length; k++)found[foundCount++] = elements[k]; 32598 } 32599 currentContext = []; 32600 currentContextIndex = 0; 32601 for(j = 0; j < found.length; j++)if (found[j].className && $a44aab89caa44953$var$_.isString(found[j].className) && // some SVG elements have classNames which are not strings 32602 hasClass(found[j], className)) currentContext[currentContextIndex++] = found[j]; 32603 continue; // Skip to next token 32604 } 32605 // Code to deal with attribute selectors 32606 var token_match = token.match($a44aab89caa44953$var$TOKEN_MATCH_REGEX); 32607 if (token_match) { 32608 tagName = token_match[1]; 32609 var attrName = token_match[2]; 32610 var attrOperator = token_match[3]; 32611 var attrValue = token_match[4]; 32612 if (!tagName) tagName = '*'; 32613 // Grab all of the tagName elements within current context 32614 found = []; 32615 foundCount = 0; 32616 for(j = 0; j < currentContext.length; j++){ 32617 if (tagName == '*') elements = getAllChildren(currentContext[j]); 32618 else elements = currentContext[j].getElementsByTagName(tagName); 32619 for(k = 0; k < elements.length; k++)found[foundCount++] = elements[k]; 32620 } 32621 currentContext = []; 32622 currentContextIndex = 0; 32623 var checkFunction; // This function will be used to filter the elements 32624 switch(attrOperator){ 32625 case '=': 32626 checkFunction = function(e) { 32627 return e.getAttribute(attrName) == attrValue; 32628 }; 32629 break; 32630 case '~': 32631 checkFunction = function(e) { 32632 return e.getAttribute(attrName).match(new RegExp('\\b' + attrValue + '\\b')); 32633 }; 32634 break; 32635 case '|': 32636 checkFunction = function(e) { 32637 return e.getAttribute(attrName).match(new RegExp('^' + attrValue + '-?')); 32638 }; 32639 break; 32640 case '^': 32641 checkFunction = function(e) { 32642 return e.getAttribute(attrName).indexOf(attrValue) === 0; 32643 }; 32644 break; 32645 case '$': 32646 checkFunction = function(e) { 32647 return e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length; 32648 }; 32649 break; 32650 case '*': 32651 checkFunction = function(e) { 32652 return e.getAttribute(attrName).indexOf(attrValue) > -1; 32653 }; 32654 break; 32655 default: 32656 // Just test for existence of attribute 32657 checkFunction = function(e) { 32658 return e.getAttribute(attrName); 32659 }; 32660 } 32661 currentContext = []; 32662 currentContextIndex = 0; 32663 for(j = 0; j < found.length; j++)if (checkFunction(found[j])) currentContext[currentContextIndex++] = found[j]; 32664 continue; // Skip to next token 32665 } 32666 // If we get here, token is JUST an element (not a class or ID selector) 32667 tagName = token; 32668 found = []; 32669 foundCount = 0; 32670 for(j = 0; j < currentContext.length; j++){ 32671 elements = currentContext[j].getElementsByTagName(tagName); 32672 for(k = 0; k < elements.length; k++)found[foundCount++] = elements[k]; 32673 } 32674 currentContext = found; 32675 } 32676 return currentContext; 32677 } 32678 return function(query) { 32679 if ($a44aab89caa44953$var$_.isElement(query)) return [ 32680 query 32681 ]; 32682 else if ($a44aab89caa44953$var$_.isObject(query) && !$a44aab89caa44953$var$_.isUndefined(query.length)) return query; 32683 else return getElementsBySelector.call(this, query); 32684 }; 32685}(); 32686var $a44aab89caa44953$var$CAMPAIGN_KEYWORDS = [ 32687 'utm_source', 32688 'utm_medium', 32689 'utm_campaign', 32690 'utm_content', 32691 'utm_term', 32692 'utm_id', 32693 'utm_source_platform', 32694 'utm_campaign_id', 32695 'utm_creative_format', 32696 'utm_marketing_tactic' 32697]; 32698var $a44aab89caa44953$var$CLICK_IDS = [ 32699 'dclid', 32700 'fbclid', 32701 'gclid', 32702 'ko_click_id', 32703 'li_fat_id', 32704 'msclkid', 32705 'sccid', 32706 'ttclid', 32707 'twclid', 32708 'wbraid' 32709]; 32710$a44aab89caa44953$var$_.info = { 32711 campaignParams: function(default_value) { 32712 var kw = '', params = {}; 32713 $a44aab89caa44953$var$_.each($a44aab89caa44953$var$CAMPAIGN_KEYWORDS, function(kwkey) { 32714 kw = $a44aab89caa44953$var$_.getQueryParam($a44aab89caa44953$var$document$1.URL, kwkey); 32715 if (kw.length) params[kwkey] = kw; 32716 else if (default_value !== undefined) params[kwkey] = default_value; 32717 }); 32718 return params; 32719 }, 32720 clickParams: function() { 32721 var id = '', params = {}; 32722 $a44aab89caa44953$var$_.each($a44aab89caa44953$var$CLICK_IDS, function(idkey) { 32723 id = $a44aab89caa44953$var$_.getQueryParam($a44aab89caa44953$var$document$1.URL, idkey
32723); 32724 if (id.length) params[idkey] = id; 32725 }); 32726 return params; 32727 }, 32728 marketingParams: function() { 32729 return $a44aab89caa44953$var$_.extend($a44aab89caa44953$var$_.info.campaignParams(), $a44aab89caa44953$var$_.info.clickParams()); 32730 }, 32731 searchEngine: function(referrer) { 32732 if (referrer.search('https?://(.*)google.([^/?]*)') === 0) return 'google'; 32733 else if (referrer.search('https?://(.*)bing.com') === 0) return 'bing'; 32734 else if (referrer.search('https?://(.*)yahoo.com') === 0) return 'yahoo'; 32735 else if (referrer.search('https?://(.*)duckduckgo.com') === 0) return 'duckduckgo'; 32736 else return null; 32737 }, 32738 searchInfo: function(referrer) { 32739 var search = $a44aab89caa44953$var$_.info.searchEngine(referrer), param = search != 'yahoo' ? 'q' : 'p', ret = {}; 32740 if (search !== null) { 32741 ret['$search_engine'] = search; 32742 var keyword = $a44aab89caa44953$var$_.getQueryParam(referrer, param); 32743 if (keyword.length) ret['mp_keyword'] = keyword; 32744 } 32745 return ret; 32746 }, 32747 /** 32748 * This function detects which browser is running this script. 32749 * The order of the checks are important since many user agents 32750 * include key words used in later checks. 32751 */ browser: function(user_agent, vendor, opera) { 32752 vendor = vendor || ''; // vendor is undefined for at least IE9 32753 if (opera || $a44aab89caa44953$var$_.includes(user_agent, ' OPR/')) { 32754 if ($a44aab89caa44953$var$_.includes(user_agent, 'Mini')) return 'Opera Mini'; 32755 return 'Opera'; 32756 } else if (/(BlackBerry|PlayBook|BB10)/i.test(user_agent)) return 'BlackBerry'; 32757 else if ($a44aab89caa44953$var$_.includes(user_agent, 'IEMobile') || $a44aab89caa44953$var$_.includes(user_agent, 'WPDesktop')) return 'Internet Explorer Mobile'; 32758 else if ($a44aab89caa44953$var$_.includes(user_agent, 'SamsungBrowser/')) // https://developer.samsung.com/internet/user-agent-string-format 32759 return 'Samsung Internet'; 32760 else if ($a44aab89caa44953$var$_.includes(user_agent, 'Edge') || $a44aab89caa44953$var$_.includes(user_agent, 'Edg/')) return 'Microsoft Edge'; 32761 else if ($a44aab89caa44953$var$_.includes(user_agent, 'FBIOS')) return 'Facebook Mobile'; 32762 else if ($a44aab89caa44953$var$_.includes(user_agent, 'Whale/')) // https://user-agents.net/browsers/whale-browser 32763 return 'Whale Browser'; 32764 else if ($a44aab89caa44953$var$_.includes(user_agent, 'Chrome')) return 'Chrome'; 32765 else if ($a44aab89caa44953$var$_.includes(user_agent, 'CriOS')) return 'Chrome iOS'; 32766 else if ($a44aab89caa44953$var$_.includes(user_agent, 'UCWEB') || $a44aab89caa44953$var$_.includes(user_agent, 'UCBrowser')) return 'UC Browser'; 32767 else if ($a44aab89caa44953$var$_.includes(user_agent, 'FxiOS')) return 'Firefox iOS'; 32768 else if ($a44aab89caa44953$var$_.includes(vendor, 'Apple')) { 32769 if ($a44aab89caa44953$var$_.includes(user_agent, 'Mobile')) return 'Mobile Safari'; 32770 return 'Safari'; 32771 } else if ($a44aab89caa44953$var$_.includes(user_agent, 'Android')) return 'Android Mobile'; 32772 else if ($a44aab89caa44953$var$_.includes(user_agent, 'Konqueror')) return 'Konqueror'; 32773 else if ($a44aab89caa44953$var$_.includes(user_agent, 'Firefox')) return 'Firefox'; 32774 else if ($a44aab89caa44953$var$_.includes(user_agent, 'MSIE') || $a44aab89caa44953$var$_.includes(user_agent, 'Trident/')) return 'Internet Explorer'; 32775 else if ($a44aab89caa44953$var$_.includes(user_agent, 'Gecko')) return 'Mozilla'; 32776 else return ''; 32777 }, 32778 /** 32779 * This function detects which browser version is running this script, 32780 * parsing major and minor version (e.g., 42.1). User agent strings from: 32781 * http://www.useragentstring.com/pages/useragentstring.php 32782 */ browserVersion: function(userAgent, vendor, opera) { 32783 var browser = $a44aab89caa44953$var$_.info.browser(userAgent, vendor, opera); 32784 var versionRegexs = { 32785 'Internet Explorer Mobile': /rv:(\d+(\.\d+)?)/, 32786 'Microsoft Edge': /Edge?\/(\d+(\.\d+)?)/, 32787 'Chrome': /Chrome\/(\d+(\.\d+)?)/, 32788 'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
32789 'UC Browser': /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/, 32790 'Safari': /Version\/(\d+(\.\d+)?)/, 32791 'Mobile Safari': /Version\/(\d+(\.\d+)?)/, 32792 'Opera': /(Opera|OPR)\/(\d+(\.\d+)?)/, 32793 'Firefox': /Firefox\/(\d+(\.\d+)?)/, 32794 'Firefox iOS': /FxiOS\/(\d+(\.\d+)?)/, 32795 'Konqueror': /Konqueror:(\d+(\.\d+)?)/, 32796 'BlackBerry': /BlackBerry (\d+(\.\d+)?)/, 32797 'Android Mobile': /android\s(\d+(\.\d+)?)/, 32798 'Samsung Internet': /SamsungBrowser\/(\d+(\.\d+)?)/, 32799 'Internet Explorer': /(rv:|MSIE )(\d+(\.\d+)?)/, 32800 'Mozilla': /rv:(\d+(\.\d+)?)/, 32801 'Whale Browser': /Whale\/(\d+(\.\d+)?)/ 32802 }; 32803 var regex = versionRegexs[browser]; 32804 if (regex === undefined) return null; 32805 var matches = userAgent.match(regex); 32806 if (!matches) return null; 32807 return parseFloat(matches[matches.length - 2]); 32808 }, 32809 os: function() { 32810 var a = $a44aab89caa44953$var$userAgent; 32811 if (/Windows/i.test(a)) { 32812 if (/Phone/.test(a) || /WPDesktop/.test(a)) return 'Windows Phone'; 32813 return 'Windows'; 32814 } else if (/(iPhone|iPad|iPod)/.test(a)) return 'iOS'; 32815 else if (/Android/.test(a)) return 'Android'; 32816 else if (/(BlackBerry|PlayBook|BB10)/i.test(a)) return 'BlackBerry'; 32817 else if (/Mac/i.test(a)) return 'Mac OS X'; 32818 else if (/Linux/.test(a)) return 'Linux'; 32819 else if (/CrOS/.test(a)) return 'Chrome OS'; 32820 else return ''; 32821 }, 32822 device: function(user_agent) { 32823 if (/Windows Phone/i.test(user_agent) || /WPDesktop/.test(user_agent)) return 'Windows Phone'; 32824 else if (/iPad/.test(user_agent)) return 'iPad'; 32825 else if (/iPod/.test(user_agent)) return 'iPod Touch'; 32826 else if (/iPhone/.test(user_agent)) return 'iPhone'; 32827 else if (/(BlackBerry|PlayBook|BB10)/i.test(user_agent)) return 'BlackBerry'; 32828 else if (/Android/.test(user_agent)) return 'Android'; 32829 else return ''; 32830 }, 32831 referringDomain: function(referrer) { 32832 var split = referrer.split('/'); 32833 if (split.length >= 3) return split[2]; 32834 return ''; 32835 }, 32836 currentUrl: function() { 32837 return $a44aab89caa44953$var$win.location.href; 32838 }, 32839 properties: function(extra_props) { 32840 if (typeof extra_props !== 'object') extra_props = {}; 32841 return $a44aab89caa44953$var$_.extend($a44aab89caa44953$var$_.strip_empty_properties({ 32842 '$os': $a44aab89caa44953$var$_.info.os(), 32843 '$browser': $a44aab89caa44953$var$_.info.browser($a44aab89caa44953$var$userAgent, $a44aab89caa44953$var$navigator.vendor, $a44aab89caa44953$var$windowOpera), 32844 '$referrer': $a44aab89caa44953$var$document$1.referrer, 32845 '$referring_domain': $a44aab89caa44953$var$_.info.referringDomain($a44aab89caa44953$var$document$1.referrer), 32846 '$device': $a44aab89caa44953$var$_.info.device($a44aab89caa44953$var$userAgent) 32847 }), { 32848 '$current_url': $a44aab89caa44953$var$_.info.currentUrl(), 32849 '$browser_version': $a44aab89caa44953$var$_.info.browserVersion($a44aab89caa44953$var$userAgent, $a44aab89caa44953$var$navigator.vendor, $a44aab89caa44953$var$windowOpera), 32850 '$screen_height': $a44aab89caa44953$var$screen.height, 32851 '$screen_width': $a44aab89caa44953$var$screen.width, 32852 'mp_lib': 'web', 32853 '$lib_version': $a44aab89caa44953$var$Config.LIB_VERSION, 32854 '$insert_id': $a44aab89caa44953$var$cheap_guid(), 32855 'time': $a44aab89caa44953$var$_.timestamp() / 1000 // epoch time in seconds 32856 }, $a44aab89caa44953$var$_.strip_empty_properties(extra_props)); 32857 }, 32858 people_properties: function() { 32859 return $a44aab89caa44953$var$_.extend($a44aab89caa44953$var$_.strip_empty_properties({ 32860 '$os': $a44aab89caa44953$var$_.info.os(), 32861 '$browser': $a44aab89caa44953$var$_.info.browser($a44aab89caa44953$var$userAgent, $a44aab89caa44953$var$navigator.vendor, $a44aab89caa44953$var$windowOpera) 32862 }), { 32863 '$browser_version': $a44aab89caa44953$var$_.info.browserVersion($a44aab89caa44953$var$userAgent, $a44aab89caa44953$var$navigator.vendor, $a44aab89caa44953$var$windowOpera) 32864 }); 32865 }, 32866 mpPageViewProperties: function() { 32867 return $a44aab89caa44953$var$_.strip_empty_properties({ 32868 'current_page_title': $a44aab89caa44953$var$document$1.title, 32869 'current_domain': $a44aab89caa44953$var$win.location.hostname, 32870 'current_url_path': $a44aab89caa44953$var$win.location.pathname, 32871 'current_url_protocol': $a44aab89caa44953$var$win.location.protocol, 32872 'current_url_search': $a44aab89caa44953$var$win.location.search 32873 }); 32874 } 32875}; 32876/** 32877 * Returns a throttled function that will only run at most every `waitMs` and returns a promise that resolves with the next invocation. 32878 * Throttled calls will build up a batch of args and invoke the callback with all args since the last invocation. 32879 */ var $a44aab89caa44953$var$batchedThrottle = function(fn, waitMs) { 32880 var timeoutPromise = null; 32881 var throttledItems = []; 32882 return function(item) { 32883 var self = this; 32884 throttledItems.push(item); 32885 if (!timeoutPromise) timeoutPromise = new $a44aab89caa44953$var$PromisePolyfill(function(resolve) { 32886 setTimeout(function() { 32887 var returnValue = fn.apply(self, [ 32888 throttledItems 32889 ]); 32890 timeoutPromise = null; 32891 throttledItems = []; 32892 resolve(returnValue); 32893 }, waitMs); 32894 }); 32895 return timeoutPromise; 32896 }; 32897}; 32898var $a44aab89caa44953$var$cheap_guid = function(maxlen) { 32899 var guid = Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10); 32900 return maxlen ? guid.substring(0, maxlen) : guid; 32901}; 32902// naive way to extract domain name (example.com) from full hostname (my.sub.example.com) 32903var $a44aab89caa44953$var$SIMPLE_DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]*\.[a-z]+$/i; 32904// this next one attempts to account for some ccSLDs, e.g. extracting oxford.ac.uk from www.oxford.ac.uk 32905var $a44aab89caa44953$var$DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i; 32906/** 32907 * Attempts to extract main domain name from full hostname, using a few blunt heuristics. For 32908 * common TLDs like .com/.org that always have a simple SLD.TLD structure (example.com), we 32909 * simply extract the last two .-separated parts of the hostname (SIMPLE_DOMAIN_MATCH_REGEX). 32910 * For others, we attempt to account for short ccSLD+TLD combos (.ac.uk) with the legacy 32911 * DOMAIN_MATCH_REGEX (kept to maintain backwards compatibility with existing Mixpanel 32912 * integrations). The only _reliable_ way to extract domain from hostname is with an up-to-date 32913 * list like at https://publicsuffix.org/ so for cases that this helper fails at, the SDK 32914 * offers the 'cookie_domain' config option to set it explicitly. 32915 * @example 32916 * extract_domain('my.sub.example.com') 32917 * // 'example.com' 32918 */ var $a44aab89caa44953$var$extract_domain = function(hostname) { 32919 var domain_regex = $a44aab89caa44953$var$DOMAIN_MATCH_REGEX; 32920 var parts = hostname.split('.'); 32921 var tld = parts[parts.length - 1]; 32922 if (tld.length > 4 || tld === 'com' || tld === 'org') domain_regex = $a44aab89caa44953$var$SIMPLE_DOMAIN_MATCH_REGEX; 32923 var matches = hostname.match(domain_regex); 32924 return matches ? matches[0] : ''; 32925}; 32926/** 32927 * Check whether we have network connection. default to true for browsers that don't support navigator.onLine (IE) 32928 * @returns {boolean} 32929 */ var $a44aab89caa44953$var$isOnline = function() { 32930 var onLine = $a44aab89caa44953$var$win.navigator['onLine']; 32931 return $a44aab89caa44953$var$_.isUndefined(onLine) || onLine; 32932}; 32933var $a44aab89caa44953$var$NOOP_FUNC = function() {}; 32934var $a44aab89caa44953$var$JSONStringify = null, $a44aab89caa44953$var$JSONParse = null; 32935if (typeof JSON !== 'undefined') { 32936 $a44aab89caa44953$var$JSONStringify = JSON.stringify; 32937 $a44aab89caa44953$var$JSONParse = JSON.parse; 32938} 32939$a44aab89caa44953$var$JSONStringify = $a44aab89caa44953$var$JSONStringify || $a44aab89caa44953$var$_.JSONEncode; 32940$a44aab89caa44953$var$JSONParse = $a44aab89caa44953$var$JSONParse || $a44aab89caa44953$var$_.JSONDecode; 32941// UNMINIFIED EXPORTS (for closure compiler) 32942$a44aab89caa44953$var$_['info'] = $a44aab89caa44953$var$_.info; 32943$a44aab89caa44953$var$_['info']['browser'] = $a44aab89caa44953$var$_.info.browser; 32944$a44aab89caa44953$var$_['info']['browserVersion'] = $a44aab89caa44953$var$_.info.browserVersion; 32945$a44aab89caa44953$var$_['info']['device'] = $a44aab89caa44953$var$_.info.device; 32946$a44aab89caa44953$var$_['info']['properties'] = $a44aab89caa44953$var$_.info.properties; 32947$a44aab89caa44953$var$_['isBlockedUA'] = $a44aab89caa44953$var$_.isBlockedUA; 32948$a44aab89caa44953$var$_['isEmptyObject'] = $a44aab89caa44953$var$_.isEmptyObject; 32949$a44aab89caa44953$var$_['isObject'] = $a44aab89caa44953$var$_.isObject; 32950$a44aab89caa44953$var$_['JSONDecode'] = $a44aab89caa44953$var$_.JSONDecode; 32951$a44aab89caa44953$var$_['JSONEncode'] = $a44aab89caa44953$var$_.JSONEncode; 32952$a44aab89caa44953$var$_['toArray'] = $a44aab89caa44953$var$_.toArray; 32953$a44aab89caa44953$var$_['NPO'] = $a44aab89caa44953$var$NpoPromise; 32954var $a44aab89caa44953$var$MIXPANEL_DB_NAME = 'mixpanelBrowserDb';
32955var $a44aab89caa44953$var$RECORDING_EVENTS_STORE_NAME = 'mixpanelRecordingEvents'; 32956var $a44aab89caa44953$var$RECORDING_REGISTRY_STORE_NAME = 'mixpanelRecordingRegistry'; 32957// note: increment the version number when adding new object stores 32958var $a44aab89caa44953$var$DB_VERSION = 1; 32959var $a44aab89caa44953$var$OBJECT_STORES = [ 32960 $a44aab89caa44953$var$RECORDING_EVENTS_STORE_NAME, 32961 $a44aab89caa44953$var$RECORDING_REGISTRY_STORE_NAME 32962]; 32963/** 32964 * @type {import('./wrapper').StorageWrapper} 32965 */ var $a44aab89caa44953$var$IDBStorageWrapper = function(storeName) { 32966 /** 32967 * @type {Promise<IDBDatabase>|null} 32968 */ this.dbPromise = null; 32969 this.storeName = storeName; 32970}; 32971$a44aab89caa44953$var$IDBStorageWrapper.prototype._openDb = function() { 32972 return new $a44aab89caa44953$var$PromisePolyfill(function(resolve, reject) { 32973 var openRequest = $a44aab89caa44953$var$win.indexedDB.open($a44aab89caa44953$var$MIXPANEL_DB_NAME, $a44aab89caa44953$var$DB_VERSION); 32974 openRequest['onerror'] = function() { 32975 reject(openRequest.error); 32976 }; 32977 openRequest['onsuccess'] = function() { 32978 resolve(openRequest.result); 32979 }; 32980 openRequest['onupgradeneeded'] = function(ev) { 32981 var db = ev.target.result; 32982 $a44aab89caa44953$var$OBJECT_STORES.forEach(function(storeName) { 32983 db.createObjectStore(storeName); 32984 }); 32985 }; 32986 }); 32987}; 32988$a44aab89caa44953$var$IDBStorageWrapper.prototype.init = function() { 32989 if (!$a44aab89caa44953$var$win.indexedDB) return $a44aab89caa44953$var$PromisePolyfill.reject('indexedDB is not supported in this browser'); 32990 if (!this.dbPromise) this.dbPromise = this._openDb(); 32991 return this.dbPromise.then(function(dbOrError) { 32992 if (dbOrError instanceof $a44aab89caa44953$var$win['IDBDatabase']) return $a44aab89caa44953$var$PromisePolyfill.resolve(); 32993 else return $a44aab89caa44953$var$PromisePolyfill.reject(dbOrError); 32994 }); 32995}; 32996$a44aab89caa44953$var$IDBStorageWrapper.prototype.isInitialized = function() { 32997 return !!this.dbPromise; 32998}; 32999/** 33000 * @param {IDBTransactionMode} mode 33001 * @param {function(IDBObjectStore): void} storeCb 33002 */ $a44aab89caa44953$var$IDBStorageWrapper.prototype.makeTransaction = function(mode, storeCb) { 33003 var storeName = this.storeName; 33004 var doTransaction = function(db) { 33005 return new $a44aab89caa44953$var$PromisePolyfill(function(resolve, reject) { 33006 var transaction = db.transaction(storeName, mode); 33007 transaction.oncomplete = function() { 33008 resolve(transaction); 33009 }; 33010 transaction.onabort = transaction.onerror = function() { 33011 reject(transaction.error); 33012 }; 33013 storeCb(transaction.objectStore(storeName)); 33014 }); 33015 }; 33016 return this.dbPromise.then(doTransaction).catch((function(err) { 33017 if (err && err['name'] === 'InvalidStateError') { 33018 // try reopening the DB if the connection is closed 33019 this.dbPromise = this._openDb(); 33020 return this.dbPromise.then(doTransaction); 33021 } else return $a44aab89caa44953$var$PromisePolyfill.reject(err); 33022 }).bind(this)); 33023}; 33024$a44aab89caa44953$var$IDBStorageWrapper.prototype.setItem = function(key, value) { 33025 return this.makeTransaction('readwrite', function(objectStore) { 33026 objectStore.put(value, key); 33027 }); 33028}; 33029$a44aab89caa44953$var$IDBStorageWrapper.prototype.getItem = function(key) { 33030 var req; 33031 return this.makeTransaction('readonly', function(objectStore) { 33032 req = objectStore.get(key); 33033 }).then(function() { 33034 return req.result; 33035 }); 33036}; 33037$a44aab89caa44953$var$IDBStorageWrapper.prototype.removeItem = function(key) { 33038 return this.makeTransaction('readwrite', function(objectStore) { 33039 objectStore.delete(key); 33040 }); 33041}; 33042$a44aab89caa44953$var$IDBStorageWrapper.prototype.getAll = function() { 33043 var req; 33044 return this.makeTransaction('readonly', function(objectStore) { 33045 req = objectStore.getAll(); 33046 }).then(function() { 33047 return req.result; 33048 }); 33049}; 33050/** 33051 * GDPR utils 33052 * 33053 * The General Data Protection Regulation (GDPR) is a regulation in EU law on data protection 33054 * and privacy for all individuals within the European Union. It addresses the export of personal 33055 * data outside the EU. The GDPR aims primarily to give control back to citizens and residents 33056 * over their personal data and to simplify the regulatory environment for international business 33057 * by unifying the regulation within the EU. 33058 * 33059 * This set of utilities is intended to enable opt in/out functionality in the Mixpanel JS SDK. 33060 * These functions are used internally by the SDK and are not intended to be publicly exposed. 33061 */ /** 33062 * A function used to track a Mixpanel event (e.g. MixpanelLib.track) 33063 * @callback trackFunction 33064 * @param {String} event_name The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc. 33065 * @param {Object} [properties] A set of properties to include with the event you're sending. These describe the user who did the event or details about the event itself. 33066 * @param {Function} [callback] If provided, the callback function will be called after tracking the event. 33067 */ /** Public **/ var $a44aab89caa44953$var$GDPR_DEFAULT_PERSISTENCE_PREFIX = '__mp_opt_in_out_'; 33068/** 33069 * Opt the user in to data tracking and cookies/localstorage for the given token 33070 * @param {string} token - Mixpanel project tracking token 33071 * @param {Object} [options] 33072 * @param {trackFunction} [options.track] - function used for tracking a Mixpanel event to record the opt-in action 33073 * @param {string} [options.trackEventName] - event name to be used for tracking the opt-in action 33074 * @param {Object} [options.trackProperties] - set of properties to be tracked along with the opt-in action 33075 * @param {string}
33075 [options.persistenceType] Persistence mechanism used - cookie or localStorage 33076 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33077 * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires 33078 * @param {string} [options.cookieDomain] - custom cookie domain 33079 * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled 33080 * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not 33081 * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not 33082 */ function $a44aab89caa44953$var$optIn(token, options) { 33083 $a44aab89caa44953$var$_optInOut(true, token, options); 33084} 33085/** 33086 * Opt the user out of data tracking and cookies/localstorage for the given token 33087 * @param {string} token - Mixpanel project tracking token 33088 * @param {Object} [options] 33089 * @param {string} [options.persistenceType] Persistence mechanism used - co
33089okie or localStorage 33090 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33091 * @param {Number} [options.cookieExpiration] - number of days until the opt-out cookie expires 33092 * @param {string} [options.cookieDomain] - custom cookie domain 33093 * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled 33094 * @param {boolean} [options.crossSubdomainCookie] - whether the opt-out cookie is set as cross-subdomain or not 33095 * @param {boolean} [options.secureCookie] - whether the opt-out cookie is set as secure or not 33096 */ function $a44aab89caa44953$var$optOut(token, options) { 33097 $a44aab89caa44953$var$_optInOut(false, token, options); 33098} 33099/** 33100 * Check whether the user has opted in to data tracking and cookies/localstorage for the given token 33101 * @param {string} token - Mixpanel project tracking token 33102 * @param {Object} [options] 33103 * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage 33104 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33105 * @returns {boolean} whether the user has opted in to the given opt type 33106 */ function $a44aab89caa44953$var$hasOptedIn(token, options) {
33107 return $a44aab89caa44953$var$_getStorageValue(token, options) === '1'; 33108} 33109/** 33110 * Check whether the user has opted out of data tracking and cookies/localstorage for the given token 33111 * @param {string} token - Mixpanel project tracking token 33112 * @param {Object} [options] 33113 * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage 33114 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33115 * @param {boolean} [options.ignoreDnt] - flag to ignore browser DNT settings and always return false 33116 * @returns {boolean} whether the user has opted out of the given opt type 33117 */ function $a44aab89caa44953$var$hasOptedOut(token, options) { 33118 if ($a44aab89caa44953$var$_hasDoNotTrackFlagOn(options)) { 33119 $a44aab89caa44953$var$console$1.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'); 33120 return true; 33121 }
33122 var optedOut = $a44aab89caa44953$var$_getStorageValue(token, options) === '0'; 33123 if (optedOut) $a44aab89caa44953$var$console$1.warn('You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data.'); 33124 return optedOut; 33125} 33126/** 33127 * Wrap a MixpanelLib method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token 33128 * If the user has opted out, return early instead of executing the method. 33129 * If a callback argument was provided, execute it passing the 0 error code. 33130 * @param {function} method - wrapped method to be executed if the user has not opted out 33131 * @returns {*} the result of executing method OR undefined if the user has opted out 33132 */ function $a44aab89caa44953$var$addOptOutCheckMixpanelLib(method) { 33133 return $a44aab89caa44953$var$_addOptOutCheck(method, function(name) { 33134 return this.get_config(name); 33135 }); 33136} 33137/** 33138 * Wrap a MixpanelPeople method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token 33139 * If the user has opted out, return early instead of executing the method. 33140 * If a callback argument was provided, execute it passing the 0 error code. 33141 * @param {function} method - wrapped method to be executed if the user has not opted out 33142 * @returns {*} the result of executing method OR undefined if the user has opted out 33143 */ function $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(method) { 33144 return $a44aab89caa44953$var$_addOptOutCheck(method, function(name) { 33145 return this._get_config(name); 33146 }); 33147} 33148/** 33149 * Wrap a MixpanelGroup method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token 33150 * If the user has opted out, return early instead of executing the method. 33151 * If a callback argument was provided, execute it passing the 0 error code. 33152 * @param {function} method - wrapped method to be executed if the user has not opted out 33153 * @returns {*} the result of executing method OR undefined if the user has opted out 33154 */ function $a44aab89caa44953$var$addOptOutCheckMixpanelGroup(method) { 33155 return $a44aab89caa44953$var$_addOptOutCheck(method, function(name) { 33156 return this._get_config(name); 33157 }); 33158} 33159/** 33160 * Clear the user's opt in/out status of data tracking and cookies/localstorage for the given token 33161 * @param {string} token - Mixpanel project tracking token 33162 * @param {Object} [options] 33163 * @param {string}
33163 [options.persistenceType] Persistence mechanism used - cookie or localStorage 33164 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33165 * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires 33166 * @param {string} [options.cookieDomain] - custom cookie domain 33167 * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled 33168 * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not 33169 * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not 33170 */ function $a44aab89caa44953$var$clearOptInOut(token, options) { 33171 options = options || {}; 33172 $a44aab89caa44953$var$_getStorage(options).remove($a44aab89caa44953$var$_getStorageKey(token, options), !!options.crossSubdomainCookie, options.cookieDomain); 33173} 33174/** Private **/ /** 33175 * Get storage util 33176 * @param {Object} [options] 33177 * @param {string} [options.persistenceType] 33178 * @returns {object} either _.cookie or _.localstorage
33179 */ function $a44aab89caa44953$var$_getStorage(options) { 33180 options = options || {}; 33181 return options.persistenceType === 'localStorage' ? $a44aab89caa44953$var$_.localStorage : $a44aab89caa44953$var$_.cookie; 33182} 33183/** 33184 * Get the name of the cookie that is used for the given opt type (tracking, cookie, etc.) 33185 * @param {string} token - Mixpanel project tracking token 33186 * @param {Object} [options] 33187 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33188 * @returns {string} the name of the cookie for the given opt type 33189 */ function $a44aab89caa44953$var$_getStorageKey(token, options) { 33190 options = options || {}; 33191 return (options.persistencePrefix || $a44aab89caa44953$var$GDPR_DEFAULT_PERSISTENCE_PREFIX) + token; 33192} 33193/** 33194 * Get the value of the cookie that is used for the given opt type (tracking, cookie, etc.) 33195 * @param {string} token - Mixpanel project tracking token 33196 * @param {Object} [options] 33197 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33198 * @returns {string} the value of the cookie for the given opt type
33199 */ function $a44aab89caa44953$var$_getStorageValue(token, options) { 33200 return $a44aab89caa44953$var$_getStorage(options).get($a44aab89caa44953$var$_getStorageKey(token, options)); 33201} 33202/** 33203 * Check whether the user has set the DNT/doNotTrack setting to true in their browser 33204 * @param {Object} [options] 33205 * @param {string} [options.window] - alternate window object to check; used to force various DNT settings in browser tests 33206 * @param {boolean} [options.ignoreDnt] - flag to ignore browser DNT settings and always return false 33207 * @returns {boolean} whether the DNT setting is true 33208 */ function $a44aab89caa44953$var$_hasDoNotTrackFlagOn(options) { 33209 if (options && options.ignoreDnt) return false; 33210 var win$1 = options && options.window || $a44aab89caa44953$var$win; 33211 var nav = win$1['navigator'] || {}; 33212 var hasDntOn = false; 33213 $a44aab89caa44953$var$_.each([ 33214 nav['doNotTrack'], 33215 nav['msDoNotTrack'], 33216 win$1['doNotTrack'] 33217 ], function(dntValue) { 33218 if ($a44aab89caa44953$var$_.includes([ 33219 true, 33220 1, 33221 '1', 33222 'yes' 33223 ], dntValue)) hasDntOn = true; 33224 }); 33225 return hasDntOn; 33226} 33227/** 33228 * Set cookie/localstorage for the user indicating that they are opted in or out for the given opt type 33229 * @param {boolean} optValue - whether to opt the user in or out for the given opt type 33230 * @param {string} token - Mixpanel project tracking token 33231 * @param {Object} [options] 33232 * @param {trackFunction} [options.track] - function used for tracking a Mixpanel event to record the opt-in action 33233 * @param {string} [options.trackEventName] - event name to be used for tracking the opt-in action 33234 * @param {Object} [options.trackProperties] - set of properties to be tracked along with the opt-in action 33235 * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name 33236 * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires 33237 * @param {string} [options.cookieDomain] - custom cookie domain 33238 * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled 33239 * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not 33240 * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not 33241 */ function $a44aab89caa44953$var$_optInOut(optValue, token, options) { 33242 if (!$a44aab89caa44953$var$_.isString(token) || !token.length) { 33243 $a44aab89caa44953$var$console$1.error('gdpr.' + (optValue ? 'optIn' : 'optOut') + ' called with an invalid token'); 33244 return; 33245 } 33246 options = options || {};
33247 $a44aab89caa44953$var$_getStorage(options).set($a44aab89caa44953$var$_getStorageKey(token, options), optValue ? 1 : 0, $a44aab89caa44953$var$_.isNumber(options.cookieExpiration) ? options.cookieExpiration : null, !!options.crossSubdomainCookie, !!options.secureCookie, !!options.crossSiteCookie, options.cookieDomain); 33248 if (options.track && optValue) options.track(options.trackEventName || '$opt_in', options.trackProperties, { 33249 'send_immediately': true 33250 }); 33251} 33252/** 33253 * Wrap a method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token 33254 * If the user has opted out, return early instead of executing the method. 33255 * If a callback argument was provided, execute it passing the 0 error code. 33256 * @param {function} method - wrapped method to be executed if the user has not opted out 33257 * @param {function} getConfigValue - getter function for the Mixpanel API token and other options to be used with opt-out check 33258 * @returns {*} the result of executing method OR undefined if the user has opted out 33259 */ function $a44aab89caa44953$var$_addOptOutCheck(method, getConfigValue) { 33260 return function() { 33261 var optedOut = false; 33262 try { 33263 var token = getConfigValue.call(this, 'token'); 33264 var ignoreDnt = getConfigValue.call(this, 'ignore_dnt'); 33265 var persistenceType = getConfigValue.call(this, 'opt_out_tracking_persistence_type'); 33266 var persistencePrefix = getConfigValue.call(this, 'opt_out_tracking_cookie_prefix'); 33267 var win = getConfigValue.call(this, 'window'); // used to override window during browser tests 33268 if (token) optedOut = $a44aab89caa44953$var$hasOptedOut(token, { 33269 ignoreDnt: ignoreDnt, 33270 persistenceType: persistenceType, 33271 persistencePrefix: persistencePrefix, 33272 window: win 33273 }); 33274 } catch (err) { 33275 $a44aab89caa44953$var$console$1.error('Unexpected error when checking tracking opt-out status: ' + err); 33276 } 33277 if (!optedOut) return method.apply(this, arguments); 33278 var callback = arguments[arguments.length - 1]; 33279 if (typeof callback === 'function') callback(0); 33280 return; 33281 }; 33282} 33283var $a44aab89caa44953$var$logger$6 = $a44aab89caa44953$var$console_with_prefix('lock'); 33284/** 33285 * SharedLock: a mutex built on HTML5 localStorage, to ensure that only one browser 33286 * window/tab at a time will be able to access shared resources. 33287 * 33288 * Based on the Alur and Taubenfeld fast lock 33289 * (http://www.cs.rochester.edu/research/synchronization/pseudocode/fastlock.html) 33290 * with an added timeout to ensure there will be eventual progress in the event 33291 * that a window is closed in the middle of the callback. 33292 * 33293 * Implementation based on the original version by David Wolever
33293(https://github.com/wolever) 33294 * at https://gist.github.com/wolever/5fd7573d1ef6166e8f8c4af286a69432. 33295 * 33296 * @example 33297 * const myLock = new SharedLock('some-key'); 33298 * myLock.withLock(function() { 33299 * console.log('I hold the mutex!'); 33300 * }); 33301 * 33302 * @constructor 33303 */ var $a44aab89caa44953$var$SharedLock = function(key, options) { 33304 options = options || {}; 33305 this.storageKey = key; 33306 this.storage = options.storage || $a44aab89caa44953$var$win.localStorage; 33307 this.pollIntervalMS = options.pollIntervalMS || 100; 33308 this.timeoutMS = options.timeoutMS || 2000; 33309 // dependency-inject promise implementation for testing purposes 33310 this.promiseImpl = options.promiseImpl || $a44aab89caa44953$var$PromisePolyfill; 33311}; 33312// pass in a specific pid to test contention scenarios; otherwise 33313// it is chosen randomly for each acquisition attempt 33314$a44aab89caa44953$var$SharedLock.prototype.withLock = function(lockedCB, pid) { 33315 var Promise1 = this.promiseImpl; 33316 return new Promise1($a44aab89caa44953$var$_.bind(function(resolve, reject) { 33317 var i = pid || new Date().getTime() + '|' + Math.random(); 33318 var startTime = new Date().getTime(); 33319 var key = this.storageKey; 33320 var pollIntervalMS = this.pollIntervalMS; 33321 var timeoutMS = this.timeoutMS; 33322 var storage = this.storage; 33323 var keyX = key + ':X'; 33324 var keyY = key + ':Y'; 33325 var keyZ = key + ':Z'; 33326 var delay = function(cb) { 33327 if (new Date().getTime() - startTime > timeoutMS) { 33328 $a44aab89caa44953$var$logger$6.error('Timeout waiting for mutex on ' + key + '; clearing lock. [' + i + ']'); 33329 storage.removeItem(keyZ); 33330 storage.removeItem(keyY); 33331 loop(); 33332 return; 33333 } 33334 setTimeout(function() { 33335 try { 33336 cb(); 33337 } catch (err) { 33338 reject(err); 33339 } 33340 }, pollIntervalMS * (Math.random() + 0.1)); 33341 }; 33342 var waitFor = function(predicate, cb) { 33343 if (predicate()) cb(); 33344 else delay(function() { 33345 waitFor(predicate, cb); 33346 }); 33347 }; 33348 var getSetY = function() { 33349 var valY = storage.getItem(keyY); 33350 if (valY && valY !== i) return false; 33351 else { 33352 storage.setItem(keyY, i); 33353 if (storage.getItem(keyY) === i) return true; 33354 else { 33355 if (!$a44aab89caa44953$var$localStorageSupported(storage, true)) reject(new Error('localStorage support dropped while acquiring lock')); 33356 return false; 33357 } 33358 } 33359 }; 33360 var loop = function() { 33361 storage.setItem(keyX, i); 33362 waitFor(getSetY, function() { 33363 if (storage.getItem(keyX) === i) { 33364 criticalSection(); 33365 return; 33366 } 33367 delay(function() { 33368 if (storage.getItem(keyY) !== i) { 33369 loop(); 33370 return; 33371 } 33372 waitFor(function() { 33373 return !storage.getItem(keyZ); 33374 }, criticalSection); 33375 }); 33376 }); 33377 }; 33378 var criticalSection = function() { 33379 storage.setItem(keyZ, '1'); 33380 var removeLock = function() { 33381 storage.removeItem(keyZ); 33382 if (storage.getItem(keyY) === i) storage.removeItem(keyY); 33383 if (storage.getItem(keyX) === i) storage.removeItem(keyX); 33384 }; 33385 lockedCB().then(function(ret) { 33386 removeLock(); 33387 resolve(ret); 33388 }).catch(function(err) { 33389 removeLock(); 33390 reject(err); 33391 }); 33392 }; 33393 try { 33394 if ($a44aab89caa44953$var$localStorageSupported(storage, true)) loop(); 33395 else throw new Error('localStorage support check failed'); 33396 } catch (err) { 33397 reject(err); 33398 } 33399 }, this)); 33400}; 33401/** 33402 * @type {import('./wrapper').StorageWrapper} 33403 */ var $a44aab89caa44953$var$LocalStorageWrapper = function(storageOverride) { 33404 this.storage = storageOverride || $a44aab89caa44953$var$win.localStorage; 33405}; 33406$a44aab89caa44953$var$LocalStorageWrapper.prototype.init = function() { 33407 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33408}; 33409$a44aab89caa44953$var$LocalStorageWrapper.prototype.isInitialized = function() { 33410 return true; 33411}; 33412$a44aab89caa44953$var$LocalStorageWrapper.prototype.setItem = function(key, value) { 33413 return new $a44aab89caa44953$var$PromisePolyfill($a44aab89caa44953$var$_.bind(function(resolve, reject) { 33414 try { 33415 this.storage.setItem(key, $a44aab89caa44953$var$JSONStringify(value)); 33416 } catch (e) { 33417 reject(e); 33418 } 33419 resolve(); 33420 }, this)); 33421}; 33422$a44aab89caa44953$var$LocalStorageWrapper.prototype.getItem = function(key) { 33423 return new $a44aab89caa44953$var$PromisePolyfill($a44aab89caa44953$var$_.bind(function(resolve, reject) { 33424 var item; 33425 try { 33426 item = $a44aab89caa44953$var$JSONParse(this.storage.getItem(key)); 33427 } catch (e) { 33428 reject(e); 33429 } 33430 resolve(item); 33431 }, this)); 33432}; 33433$a44aab89caa44953$var$LocalStorageWrapper.prototype.removeItem = function(key) { 33434 return new $a44aab89caa44953$var$PromisePolyfill($a44aab89caa44953$var$_.bind(function(resolve, reject) { 33435 try { 33436 this.storage.removeItem(key); 33437 } catch (e) { 33438 reject(e); 33439 } 33440 resolve(); 33441 }, this)); 33442}; 33443var $a44aab89caa44953$var$logger$5 = $a44aab89caa44953$var$console_with_prefix('batch'); 33444/** 33445 * RequestQueue: queue for batching API requests with localStorage backup for retries. 33446 * Maintains an in-memory queue which represents the source of truth for the current 33447 * page, but also writes all items out to a copy in the browser's localStorage, which 33448 * can be read on subsequent pageloads and retried. For batchability, all the request 33449 * items in the queue should be of the same type (events, people updates, group updates) 33450 * so they can be sent in a single request to the same API endpoint. 33451 * 33452 * LocalStorage keying and locking: In order for reloads and subsequent pageloads of 33453 * the same site to access the same persisted data, they must share the same localStorage 33454 * key (for instance based on project token and queue type). Therefore access to the 33455 * localStorage entry is guarded by an asynchronous mutex (SharedLock) to prevent 33456 * simultaneously open windows/tabs from overwriting each other's data (which would lead 33457 * to data loss in some situations). 33458 * @constructor 33459 */ var $a44aab89caa44953$var$RequestQueue = function(storageKey, options) { 33460 options = options || {}; 33461 this.storageKey = storageKey; 33462 this.usePersistence = options.usePersistence; 33463 if (this.usePersistence) { 33464 this.queueStorage = options.queueStorage || new $a44aab89caa44953$var$LocalStorageWrapper(); 33465 this.lock = new $a44aab89caa44953$var$SharedLock(storageKey, { 33466 storage: options.sharedLockStorage || $a44aab89caa44953$var$win.localStorage, 33467 timeoutMS: options.sharedLockTimeoutMS 33468 }); 33469 } 33470 this.reportError = options.errorReporter || $a44aab89caa44953$var$_.bind($a44aab89caa44953$var$logger$5.error, $a44aab89caa44953$var$logger$5); 33471 this.pid = options.pid || null; // pass pid to test out storage lock contention scenarios 33472 this.memQueue = []; 33473 this.initialized = false;
33474 if (options.enqueueThrottleMs) this.enqueuePersisted = $a44aab89caa44953$var$batchedThrottle($a44aab89caa44953$var$_.bind(this._enqueuePersisted, this), options.enqueueThrottleMs); 33475 else this.enqueuePersisted = $a44aab89caa44953$var$_.bind(function(queueEntry) { 33476 return this._enqueuePersisted([ 33477 queueEntry 33478 ]); 33479 }, this); 33480}; 33481$a44aab89caa44953$var$RequestQueue.prototype.ensureInit = function() { 33482 if (this.initialized || !this.usePersistence) return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33483 return this.queueStorage.init().then($a44aab89caa44953$var$_.bind(function() { 33484 this.initialized = true; 33485 }, this)).catch($a44aab89caa44953$var$_.bind(function(err) { 33486 this.reportError('Error initializing queue persistence. Disabling persistence', err); 33487 this.initialized = true; 33488 this.usePersistence = false; 33489 }, this)); 33490}; 33491/** 33492 * Add one item to queues (memory and localStorage). The queued entry includes 33493 * the given item along with an auto-generated ID and a "flush-after" timestamp. 33494 * It is expected that the item will be sent over the network and dequeued 33495 * before the flush-after time; if this doesn't happen it is considered orphaned 33496 * (e.g., the original tab where it was enqueued got closed before it could be 33497 * sent) and the item can be sent by any tab that finds it in localStorage. 33498 * 33499 * The final callback param is called with a param indicating success or 33500 * failure of the enqueue operation; it is asynchronous because the localStorage 33501 * lock is asynchronous. 33502 */ $a44aab89caa44953$var$RequestQueue.prototype.enqueue = function(item, flushInterval) { 33503 var queueEntry = { 33504 'id': $a44aab89caa44953$var$cheap_guid(), 33505 'flushAfter': new Date().getTime() + flushInterval * 2, 33506 'payload': item 33507 }; 33508 if (!this.usePersistence) { 33509 this.memQueue.push(queueEntry); 33510 return $a44aab89caa44953$var$PromisePolyfill.resolve(true); 33511 } else return this.enqueuePersisted(queueEntry); 33512}; 33513$a44aab89caa44953$var$RequestQueue.prototype._enqueuePersisted = function(queueEntries) { 33514 var enqueueItem = $a44aab89caa44953$var$_.bind(function() { 33515 return this.ensureInit().then($a44aab89caa44953$var$_.bind(function() { 33516 return this.readFromStorage(); 33517 }, this)).then($a44aab89caa44953$var$_.bind(function(storedQueue) { 33518 return this.saveToStorage(storedQueue.concat(queueEntries)); 33519 }, this)).then($a44aab89caa44953$var$_.bind(function(succeeded) { 33520 // only add to in-memory queue when storage succeeds 33521 if (succeeded) this.memQueue = this.memQueue.concat(queueEntries); 33522 return succeeded; 33523 }, this)).catch($a44aab89caa44953$var$_.bind(function(err) { 33524 this.reportError('Error enqueueing items', err, queueEntries); 33525 return false; 33526 }, this)); 33527 }, this); 33528 return this.lock.withLock(enqueueItem, this.pid).catch($a44aab89caa44953$var$_.bind(function(err) { 33529 this.reportError('Error acquiring storage lock', err); 33530 return false; 33531 }, this)); 33532}; 33533/** 33534 * Read out the given number of queue entries. If this.memQueue 33535 * has fewer than batchSize items, then look for "orphaned" items 33536 * in the persisted queue (items where the 'flushAfter' time has 33537 * already passed). 33538 */ $a44aab89caa44953$var$RequestQueue.prototype.fillBatch = function(batchSize) { 33539 var batch = this.memQueue.slice(0, batchSize); 33540 if (this.usePersistence && batch.length < batchSize) // don't need lock just to read events; localStorage is thread-safe 33541 // and the worst that could happen is a duplicate send of some 33542 // orphaned events, which will be deduplicated on the server side 33543 return this.ensureInit().then($a44aab89caa44953$var$_.bind(function() { 33544 return this.readFromStorage(); 33545 }, this)).then($a44aab89caa44953$var$_.bind(function(storedQueue) { 33546 if (storedQueue.length) { 33547 // item IDs already in batch; don't duplicate out of storage 33548 var idsInBatch = {}; // poor man's Set 33549 $a44aab89caa44953$var$_.each(batch, function(item) { 33550 idsInBatch[item['id']] = true; 33551 }); 33552 for(var i = 0; i < storedQueue.length; i++){ 33553 var item = storedQueue[i]; 33554 if (new Date().getTime() > item['flushAfter'] && !idsInBatch[item['id']]) { 33555 item.orphaned = true; 33556 batch.push(item); 33557 if (batch.length >= batchSize) break; 33558 } 33559 } 33560 } 33561 return batch; 33562 }, this)); 33563 else return $a44aab89caa44953$var$PromisePolyfill.resolve(batch); 33564}; 33565/** 33566 * Remove items with matching 'id' from array (immutably) 33567 * also remove any item without a valid id (e.g., malformed
33568 * storage entries). 33569 */ var $a44aab89caa44953$var$filterOutIDsAndInvalid = function(items, idSet) { 33570 var filteredItems = []; 33571 $a44aab89caa44953$var$_.each(items, function(item) { 33572 if (item['id'] && !idSet[item['id']]) filteredItems.push(item); 33573 }); 33574 return filteredItems; 33575}; 33576/** 33577 * Remove items with matching IDs from both in-memory queue 33578 * and persisted queue 33579 */ $a44aab89caa44953$var$RequestQueue.prototype.removeItemsByID = function(ids) { 33580 var idSet = {}; // poor man's Set 33581 $a44aab89caa44953$var$_.each(ids, function(id) { 33582 idSet[id] = true; 33583 }); 33584 this.memQueue = $a44aab89caa44953$var$filterOutIDsAndInvalid(this.memQueue, idSet); 33585 if (!this.usePersistence) return $a44aab89caa44953$var$PromisePolyfill.resolve(true); 33586 else { 33587 var removeFromStorage = $a44aab89caa44953$var$_.bind(function() { 33588 return this.ensureInit().then($a44aab89caa44953$var$_.bind(function() { 33589 return this.readFromStorage(); 33590 }, this)).then($a44aab89caa44953$var$_.bind(function(storedQueue) { 33591 storedQueue = $a44aab89caa44953$var$filterOutIDsAndInvalid(storedQueue, idSet); 33592 return this.saveToStorage(storedQueue); 33593 }, this)).then($a44aab89caa44953$var$_.bind(function() { 33594 return this.readFromStorage(); 33595 }, this)).then($a44aab89caa44953$var$_.bind(function(storedQueue) { 33596 // an extra check: did storage report success but somehow 33597 // the items are still there? 33598 for(var i = 0; i < storedQueue.length; i++){ 33599 var item = storedQueue[i]; 33600 if (item['id'] && !!idSet[item['id']]) throw new Error('Item not removed from storage'); 33601 } 33602 return true; 33603 }, this)).catch($a44aab89caa44953$var$_.bind(function(err) { 33604 this.reportError('Error removing items', err, ids); 33605 return false; 33606 }, this)); 33607 }, this); 33608 return this.lock.withLock(removeFromStorage, this.pid).catch($a44aab89caa44953$var$_.bind(function(err) { 33609 this.reportError('Error acquiring storage lock', err); 33610 if (!$a44aab89caa44953$var$localStorageSupported(this.lock.storage, true)) // Looks like localStorage writes have stopped working sometime after 33611 // initialization (probably full), and so nobody can acquire locks 33612 // anymore. Consider it temporarily safe to remove items without the 33613 // lock, since nobody's writing successfully anyway. 33614 return removeFromStorage().then($a44aab89caa44953$var$_.bind(function(success) { 33615 if (!success) // OK, we couldn't even write out the smaller queue. Try clearing it 33616 // entirely. 33617 return this.queueStorage.removeItem(this.storageKey).then(function() { 33618 return success; 33619 }); 33620 return success; 33621 }, this)).catch($a44aab89caa44953$var$_.bind(function(err) { 33622 this.reportError('Error clearing queue', err); 33623 return false; 33624 }, this)); 33625 else return false; 33626 }, this)); 33627 } 33628}; 33629// internal helper for RequestQueue.updatePayloads 33630var $a44aab89caa44953$var$updatePayloads = function(existingItems, itemsToUpdate) { 33631 var newItems = []; 33632 $a44aab89caa44953$var$_.each(existingItems, function(item) { 33633 var id = item['id']; 33634 if (id in itemsToUpdate) { 33635 var newPayload = itemsToUpdate[id]; 33636 if (newPayload !== null) { 33637 item['payload'] = newPayload; 33638 newItems.push(item); 33639 } 33640 } else // no update 33641 newItems.push(item); 33642 }); 33643 return newItems; 33644}; 33645/** 33646 * Update payloads of given items in both in-memory queue and 33647 * persisted queue. Items set to null are removed from queues. 33648 */ $a44aab89caa44953$var$RequestQueue.prototype.updatePayloads = function(itemsToUpdate) { 33649 this.memQueue = $a44aab89caa44953$var$updatePayloads(this.memQueue, itemsToUpdate); 33650 if (!this.usePersistence) return $a44aab89caa44953$var$PromisePolyfill.resolve(true); 33651 else return this.lock.withLock($a44aab89caa44953$var$_.bind(function lockAcquired() { 33652 return this.ensureInit().then($a44aab89caa44953$var$_.bind(function() { 33653 return this.readFromStorage(); 33654 }, this)).then($a44aab89caa44953$var$_.bind(function(storedQueue) { 33655 storedQueue = $a44aab89caa44953$var$updatePayloads(storedQueue, itemsToUpdate); 33656 return this.saveToStorage(storedQueue); 33657 }, this)).catch($a44aab89caa44953$var$_.bind(function(err) { 33658 this.reportError('Error updating items', itemsToUpdate, err); 33659 return false;
vendor: 4,222 bytes, lines 33660-33750
33660 }, this)); 33661 }, this), this.pid).catch($a44aab89caa44953$var$_.bind(function(err) { 33662 this.reportError('Error acquiring storage lock', err); 33663 return false; 33664 }, this)); 33665}; 33666/** 33667 * Read and parse items array from localStorage entry, handling 33668 * malformed/missing data if necessary. 33669 */ $a44aab89caa44953$var$RequestQueue.prototype.readFromStorage = function() { 33670 return this.ensureInit().then($a44aab89caa44953$var$_.bind(function() { 33671 return this.queueStorage.getItem(this.storageKey); 33672 }, this)).then($a44aab89caa44953$var$_.bind(function(storageEntry) { 33673 if (storageEntry) { 33674 if (!$a44aab89caa44953$var$_.isArray(storageEntry)) { 33675 this.reportError('Invalid storage entry:', storageEntry); 33676 storageEntry = null; 33677 } 33678 } 33679 return storageEntry || []; 33680 }, this)).catch($a44aab89caa44953$var$_.bind(function(err) { 33681 this.reportError('Error retrieving queue', err); 33682 return []; 33683 }, this)); 33684}; 33685/** 33686 * Serialize the given items array to localStorage. 33687 */ $a44aab89caa44953$var$RequestQueue.prototype.saveToStorage = function(queue) { 33688 return this.ensureInit().then($a44aab89caa44953$var$_.bind(function() { 33689 return this.queueStorage.setItem(this.storageKey, queue); 33690 }, this)).then(function() { 33691 return true; 33692 }).catch($a44aab89caa44953$var$_.bind(function(err) { 33693 this.reportError('Error saving queue', err); 33694 return false; 33695 }, this)); 33696}; 33697/** 33698 * Clear out queues (memory and localStorage). 33699 */ $a44aab89caa44953$var$RequestQueue.prototype.clear = function() { 33700 this.memQueue = []; 33701 if (this.usePersistence) return this.ensureInit().then($a44aab89caa44953$var$_.bind(function() { 33702 return this.queueStorage.removeItem(this.storageKey); 33703 }, this)); 33704 else return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33705}; 33706// maximum interval between request retries after exponential backoff 33707var $a44aab89caa44953$var$MAX_RETRY_INTERVAL_MS = 600000; // 10 minutes 33708var $a44aab89caa44953$var$logger$4 = $a44aab89caa44953$var$console_with_prefix('batch'); 33709/** 33710 * RequestBatcher: manages the queueing, flushing, retry etc of requests of one 33711 * type (events, people, groups). 33712 * Uses RequestQueue to manage the backing store. 33713 * @constructor 33714 */ var $a44aab89caa44953$var$RequestBatcher = function(storageKey, options) { 33715 this.errorReporter = options.errorReporter; 33716 this.queue = new $a44aab89caa44953$var$RequestQueue(storageKey, { 33717 errorReporter: $a44aab89caa44953$var$_.bind(this.reportError, this), 33718 queueStorage: options.queueStorage, 33719 sharedLockStorage: options.sharedLockStorage, 33720 sharedLockTimeoutMS: options.sharedLockTimeoutMS, 33721 usePersistence: options.usePersistence, 33722 enqueueThrottleMs: options.enqueueThrottleMs 33723 }); 33724 this.libConfig = options.libConfig; 33725 this.sendRequest = options.sendRequestFunc; 33726 this.beforeSendHook = options.beforeSendHook; 33727 this.stopAllBatching = options.stopAllBatchingFunc; 33728 // seed variable batch size + flush interval with configured values 33729 this.batchSize = this.libConfig['batch_size']; 33730 this.flushInterval = this.libConfig['batch_flush_interval_ms']; 33731 this.stopped = !this.libConfig['batch_autostart']; 33732 this.consecutiveRemovalFailures = 0; 33733 // extra client-side dedupe 33734 this.itemIdsSentSuccessfully = {}; 33735 // Make the flush occur at the interval specified by flushIntervalMs, default behavior will attempt consecutive flushes 33736 // as long as the queue is not empty. This is useful for high-frequency events like Session Replay where we might end up 33737 // in a request loop and get ratelimited by the server. 33738 this.flushOnlyOnInterval = options.flushOnlyOnInterval || false; 33739 this._flushPromise = null; 33740}; 33741/** 33742 * Add one item to queue. 33743 */ $a44aab89caa44953$var$RequestBatcher.prototype.enqueue = function(item) { 33744 return this.queue.enqueue(item, this.flushInterval); 33745}; 33746/** 33747 * Start flushing batches at the configured time interval. Must call 33748 * this method upon SDK init in order to send anything over the network. 33749 */ $a44aab89caa44953$var$RequestBatcher.prototype.start = function() { 33750 this.stopped = false;
33751 this.consecutiveRemovalFailures = 0; 33752 return this.flush(); 33753}; 33754/** 33755 * Stop flushing batches. Can be restarted by calling start(). 33756 */ $a44aab89caa44953$var$RequestBatcher.prototype.stop = function() { 33757 this.stopped = true; 33758 if (this.timeoutID) { 33759 clearTimeout(this.timeoutID); 33760 this.timeoutID = null; 33761 } 33762}; 33763/** 33764 * Clear out queue. 33765 */ $a44aab89caa44953$var$RequestBatcher.prototype.clear = function() { 33766 return this.queue.clear(); 33767}; 33768/** 33769 * Restore batch size configuration to whatever is set in the main SDK. 33770 */ $a44aab89caa44953$var$RequestBatcher.prototype.resetBatchSize = function() { 33771 this.batchSize = this.libConfig['batch_size']; 33772}; 33773/** 33774 * Restore flush interval time configuration to whatever is set in the main SDK. 33775 */ $a44aab89caa44953$var$RequestBatcher.prototype.resetFlush = function() { 33776 this.scheduleFlush(this.libConfig['batch_flush_interval_ms']); 33777}; 33778/** 33779 * Schedule the next flush in the given number of milliseconds. 33780 */ $a44aab89caa44953$var$RequestBatcher.prototype.scheduleFlush = function(flushMS) { 33781 this.flushInterval = flushMS; 33782 if (!this.stopped) this.timeoutID = setTimeout($a44aab89caa44953$var$_.bind(function() { 33783 if (!this.stopped) this._flushPromise = this.flush(); 33784 }, this), this.flushInterval); 33785}; 33786/** 33787 * Send a request using the sendRequest callback, but promisified. 33788 * TODO: sendRequest should be promisified in the first place. 33789 */ $a44aab89caa44953$var$RequestBatcher.prototype.sendRequestPromise = function(data, options) { 33790 return new $a44aab89caa44953$var$PromisePolyfill($a44aab89caa44953$var$_.bind(function(resolve) { 33791 this.sendRequest(data, options, resolve); 33792 }, this)); 33793}; 33794/** 33795 * Flush one batch to network. Depending on success/failure modes, it will either 33796 * remove the batch from the queue or leave it in for retry, and schedule the next 33797 * flush. In cases of most network or API failures, it will back off exponentially 33798 * when retrying. 33799 * @param {Object} [options] 33800 * @param {boolean} [options.sendBeacon] - whether to send batch with 33801 * navigator.sendBeacon (only useful for sending batches before page unloads, as 33802 * sendBeacon offers no callbacks or status indications) 33803 */ $a44aab89caa44953$var$RequestBatcher.prototype.flush = function(options) { 33804 if (this.requestInProgress) { 33805 $a44aab89caa44953$var$logger$4.log('Flush: Request already in progress'); 33806 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33807 } 33808 this.requestInProgress = true; 33809 options = options || {}; 33810 var timeoutMS = this.libConfig['batch_request_timeout_ms']; 33811 var startTime = new Date().getTime(); 33812 var currentBatchSize = this.batchSize; 33813 return this.queue.fillBatch(currentBatchSize).then($a44aab89caa44953$var$_.bind(function(batch) { 33814 // if there's more items in the queue than the batch size, attempt 33815 // to flush again after the current batch is done. 33816 var attemptSecondaryFlush = batch.length === currentBatchSize; 33817 var dataForRequest = []; 33818 var transformedItems = {}; 33819 $a44aab89caa44953$var$_.each(batch, function(item) { 33820 var payload = item['payload']; 33821 if (this.beforeSendHook && !item.orphaned) payload = this.beforeSendHook(payload); 33822 if (payload) { 33823 // mp_sent_by_lib_version prop captures which lib version actually 33824 // sends each event (regardless of which version originally queued 33825 // it for sending) 33826 if (payload['event'] && payload['properties']) payload['properties'] = $a44aab89caa44953$var$_.extend({}, payload['properties'], { 33827 'mp_sent_by_lib_version': $a44aab89caa44953$var$Config.LIB_VERSION 33828 }); 33829 var addPayload = true; 33830 var itemId = item['id']; 33831 if (itemId) { 33832 if ((this.itemIdsSentSuccessfully[itemId] || 0) > 5) { 33833 this.reportError('[dupe] item ID sent too many times, not sending', { 33834 item: item, 33835 batchSize: batch.length, 33836 timesSent: this.itemIdsSentSuccessfully[itemId] 33837 }); 33838 addPayload = false;
33839 } 33840 } else this.reportError('[dupe] found item with no ID', { 33841 item: item 33842 }); 33843 if (addPayload) dataForRequest.push(payload); 33844 } 33845 transformedItems[item['id']] = payload; 33846 }, this); 33847 if (dataForRequest.length < 1) { 33848 this.requestInProgress = false; 33849 this.resetFlush(); 33850 return $a44aab89caa44953$var$PromisePolyfill.resolve(); // nothing to do 33851 } 33852 var removeItemsFromQueue = $a44aab89caa44953$var$_.bind(function() { 33853 return this.queue.removeItemsByID($a44aab89caa44953$var$_.map(batch, function(item) { 33854 return item['id']; 33855 })).then($a44aab89caa44953$var$_.bind(function(succeeded) { 33856 // client-side dedupe 33857 $a44aab89caa44953$var$_.each(batch, $a44aab89caa44953$var$_.bind(function(item) { 33858 var itemId = item['id']; 33859 if (itemId) { 33860 this.itemIdsSentSuccessfully[itemId] = this.itemIdsSentSuccessfully[itemId] || 0; 33861 this.itemIdsSentSuccessfully[itemId]++; 33862 if (this.itemIdsSentSuccessfully[itemId] > 5) this.reportError('[dupe] item ID sent too many times', { 33863 item: item, 33864 batchSize: batch.length, 33865 timesSent: this.itemIdsSentSuccessfully[itemId] 33866 }); 33867 } else this.reportError('[dupe] found item with no ID while removing', { 33868 item: item 33869 }); 33870 }, this)); 33871 if (succeeded) { 33872 this.consecutiveRemovalFailures = 0; 33873 if (this.flushOnlyOnInterval && !attemptSecondaryFlush) { 33874 this.resetFlush(); // schedule next batch with a delay 33875 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33876 } else return this.flush(); // handle next batch if the queue isn't empty 33877 } else { 33878 if (++this.consecutiveRemovalFailures > 5) { 33879 this.reportError('Too many queue failures; disabling batching system.'); 33880 this.stopAllBatching(); 33881 } else this.resetFlush(); 33882 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33883 } 33884 }, this)); 33885 }, this); 33886 var batchSendCallback = $a44aab89caa44953$var$_.bind(function(res) { 33887 this.requestInProgress = false; 33888 try { 33889 // handle API response in a try-catch to make sure we can reset the 33890 // flush operation if something goes wrong 33891 if (options.unloading) // update persisted data to include hook transformations 33892 return this.queue.updatePayloads(transformedItems); 33893 else if ($a44aab89caa44953$var$_.isObject(res) && res.error === 'timeout' && new Date().getTime() - startTime >= timeoutMS) { 33894 this.reportError('Network timeout; retrying'); 33895 return this.flush(); 33896 } else if ($a44aab89caa44953$var$_.isObject(res) && (res.httpStatusCode >= 500 || res.httpStatusCode === 429 || res.httpStatusCode <= 0 && !$a44aab89caa44953$var$isOnline() || res.error === 'timeout')) { 33897 // network or API error, or 429 Too Many Requests, retry 33898 var retryMS = this.flushInterval * 2; 33899 if (res.retryAfter) retryMS = parseInt(res.retryAfter, 10) * 1000 || retryMS; 33900 retryMS = Math.min($a44aab89caa44953$var$MAX_RETRY_INTERVAL_MS, retryMS); 33901 this.reportError('Error; retry in ' + retryMS + ' ms'); 33902 this.scheduleFlush(retryMS); 33903 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33904 } else if ($a44aab89caa44953$var$_.isObject(res) && res.httpStatusCode === 413) { 33905 // 413 Payload Too Large 33906 if (batch.length > 1) { 33907 var halvedBatchSize = Math.max(1, Math.floor(currentBatchSize / 2)); 33908 this.batchSize = Math.min(this.batchSize, halvedBatchSize, batch.length - 1); 33909 this.reportError('413 response; reducing batch size to ' + this.batchSize); 33910 this.resetFlush(); 33911 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 33912 } else { 33913 this.reportError('Single-event request too large; dropping', batch); 33914 this.resetBatchSize(); 33915 return removeItemsFromQueue(); 33916 } 33917 } else // successful network request+response; remove each item in batch from queue 33918 // (even if it was e.g. a 400, in which case retrying won't help) 33919 return removeItemsFromQueue(); 33920 } catch (err) { 33921 this.reportError('Error handling API response', err); 33922 this.resetFlush(); 33923 } 33924 }, this); 33925 var requestOptions = { 33926 method: 'POST',
33927 verbose: true, 33928 ignore_json_errors: true, 33929 timeout_ms: timeoutMS // eslint-disable-line camelcase 33930 }; 33931 if (options.unloading) requestOptions.transport = 'sendBeacon'; 33932 $a44aab89caa44953$var$logger$4.log('MIXPANEL REQUEST:', dataForRequest); 33933 return this.sendRequestPromise(dataForRequest, requestOptions).then(batchSendCallback); 33934 }, this)).catch($a44aab89caa44953$var$_.bind(function(err) { 33935 this.reportError('Error flushing request queue', err); 33936 this.resetFlush(); 33937 }, this)); 33938}; 33939/** 33940 * Log error to global logger and optional user-defined logger. 33941 */ $a44aab89caa44953$var$RequestBatcher.prototype.reportError = function(msg, err) { 33942 $a44aab89caa44953$var$logger$4.error.apply($a44aab89caa44953$var$logger$4.error, arguments); 33943 if (this.errorReporter) try { 33944 if (!(err instanceof Error)) err = new Error(msg); 33945 this.errorReporter(msg, err); 33946 } catch (err) { 33947 $a44aab89caa44953$var$logger$4.error(err); 33948 } 33949}; 33950/** 33951 * @param {import('./session-recording').SerializedRecording} serializedRecording 33952 * @returns {boolean} 33953 */ var $a44aab89caa44953$var$isRecordingExpired = function(serializedRecording) { 33954 var now = Date.now(); 33955 return !serializedRecording || now > serializedRecording['maxExpires'] || now > serializedRecording['idleExpires']; 33956}; 33957var $a44aab89caa44953$var$RECORD_ENQUEUE_THROTTLE_MS = 250; 33958var $a44aab89caa44953$var$logger$3 = $a44aab89caa44953$var$console_with_prefix('recorder'); 33959var $a44aab89caa44953$var$CompressionStream = $a44aab89caa44953$var$win['CompressionStream']; 33960var $a44aab89caa44953$var$RECORDER_BATCHER_LIB_CONFIG = { 33961 'batch_size': 1000, 33962 'batch_flush_interval_ms': 10000, 33963 'batch_request_timeout_ms': 90000, 33964 'batch_autostart': true 33965}; 33966var $a44aab89caa44953$var$ACTIVE_SOURCES = new Set([ 33967 $a44aab89caa44953$var$IncrementalSource.MouseMove, 33968 $a44aab89caa44953$var$IncrementalSource.MouseInteraction, 33969 $a44aab89caa44953$var$IncrementalSource.Scroll, 33970 $a44aab89caa44953$var$IncrementalSource.ViewportResize, 33971 $a44aab89caa44953$var$IncrementalSource.Input, 33972 $a44aab89caa44953$var$IncrementalSource.TouchMove, 33973 $a44aab89caa44953$var$IncrementalSource.MediaInteraction, 33974 $a44aab89caa44953$var$IncrementalSource.Drag, 33975 $a44aab89caa44953$var$IncrementalSource.Selection 33976]); 33977function $a44aab89caa44953$var$isUserEvent(ev) { 33978 return ev.type === $a44aab89caa44953$var$EventType.IncrementalSnapshot && $a44aab89caa44953$var$ACTIVE_SOURCES.has(ev.data.source); 33979} 33980/** 33981 * @typedef {Object} SerializedRecording 33982 * @property {number} idleExpires 33983 * @property {number} maxExpires 33984 * @property {number} replayStartTime 33985 * @property {number} seqNo 33986 * @property {string} batchStartUrl 33987 * @property {string} replayId 33988 * @property {string} tabId 33989 * @property {string} replayStartUrl 33990 */ /** 33991 * @typedef {Object} SessionRecordingOptions 33992 * @property {Object} [options.mixpanelInstance] - reference to the core MixpanelLib 33993 * @property {String} [options.replayId] - unique uuid for a single replay 33994 * @property {Function} [options.onIdleTimeout] - callback when a recording reaches idle timeout 33995 * @property {Function} [options.onMaxLengthReached] - callback when a recording reaches its maximum length 33996 * @property {Function} [options.rrwebRecord] - rrweb's `record` function 33997 * @property {Function} [options.onBatchSent] - callback when a batch of events is sent to the server 33998 * @property {Storage} [options.sharedLockStorage] - optional storage for shared lock, used for test dependency injection 33999 * optional properties for deserialization: 34000 * @property {number} idleExpires 34001 * @property {number} maxExpires 34002 * @property {number} replayStartTime 34003 * @property {number} seqNo 34004 * @property {string} batchStartUrl 34005 * @property {string} replayStartUrl 34006 */ /** 34007 * @typedef {Object} UserIdInfo 34008 * @property {string} distinct_id 34009 * @property {string} user_id 34010 * @property {string} device_id 34011 */ /** 34012 * This class encapsulates a single session recording and its lifecycle. 34013 * @param {SessionRecordingOptions} options 34014 */ var $a44aab89caa44953$var$SessionRecording = function(options) { 34015 this._mixpanel = options.mixpanelInstance; 34016 this._onIdleTimeout = options.onIdleTimeout || $a44aab89caa44953$var$NOOP_FUNC; 34017 this._onMaxLengthReached = options.onMaxLengthReached || $a44aab89caa44953$var$NOOP_FUNC; 34018 this._onBatchSent = options.onBatchSent || $a44aab89caa44953$var$NOOP_FUNC; 34019 this._rrwebRecord = options.rrwebRecord || null; 34020 // internal rrweb stopRecording function 34021 this._stopRecording = null; 34022 this.replayId = options.replayId; 34023 this.batchStartUrl = options.batchStartUrl || null; 34024 this.replayStartUrl = options.replayStartUrl || null; 34025 this.idleExpires = options.idleExpires || null; 34026 this.maxExpires = options.maxExpires || null; 34027 this.replayStartTime = options.replayStartTime || null; 34028 this.seqNo = options.seqNo || 0; 34029 this.idleTimeoutId = null; 34030 this.maxTimeoutId = null; 34031 this.recordMaxMs = $a44aab89caa44953$var$MAX_RECORDING_MS; 34032 this.recordMinMs = 0; 34033 // disable persistence if localStorage is not supported 34034 // request-queue will automatically disable persistence if indexedDB fails to initialize 34035 var usePersistence = $a44aab89caa44953$var$localStorageSupported(options.sharedLockStorage, true) && !this.getConfig('disable_persistence'); 34036 // each replay has its own batcher key to avoid conflicts between rrweb events of different recordings 34037 this.batcherKey = '__mprec_' + this.getConfig('name') + '_' + this.getConfig('token') + '_' + this.replayId; 34038 this.queueStorage = new $a44aab89caa44953$var$IDBStorageWrapper($a44aab89caa44953$var$RECORDING_EVENTS_STORE_NAME); 34039 this.batcher = new $a44aab89caa44953$var$RequestBatcher(this.batcherKey, { 34040 errorReporter: this.reportError.bind(this), 34041 flushOnlyOnInterval: true, 34042 libConfig: $a44aab89caa44953$var$RECORDER_BATCHER_LIB_CONFIG, 34043 sendRequestFunc: this.flushEventsWithOptOut.bind(this), 34044 queueStorage: this.queueStorage, 34045 sharedLockStorage: options.sharedLockStorage, 34046 usePersistence: usePersistence, 34047 stopAllBatchingFunc: this.stopRecording.bind(this), 34048 // increased throttle and shared lock timeout because recording events are very high frequency. 34049 // this will minimize the amount of lock contention between enqueued events. 34050 // for session recordings there is a lock for each tab anyway, so there's no risk of deadlock between tabs. 34051 enqueueThrottleMs: $a44aab89caa44953$var$RECORD_ENQUEUE_THROTTLE_MS, 34052 sharedLockTimeoutMS: 10000 34053 }); 34054}; 34055/** 34056 * @returns {UserIdInfo} 34057 */ $a44aab89caa44953$var$SessionRecording.prototype.getUserIdInfo = function() { 34058 if (this.finalFlushUserIdInfo) return this.finalFlushUserIdInfo; 34059 var userIdInfo = { 34060 'distinct_id': String(this._mixpanel.get_distinct_id()) 34061 }; 34062 // send ID management props if they exist 34063 var deviceId = this._mixpanel.get_property('$device_id'); 34064 if (deviceId) userIdInfo['$device_id'] = deviceId; 34065 var userId = this._mixpanel.get_property('$user_id'); 34066 if (userId) userIdInfo['$user_id'] = userId; 34067 return userIdInfo; 34068}; 34069$a44aab89caa44953$var$SessionRecording.prototype.unloadPersistedData = function() { 34070 this.batcher.stop(); 34071 return this.batcher.flush().then((function() { 34072 return this.queueStorage.removeItem(this.batcherKey); 34073 }).bind(this)); 34074}; 34075$a44aab89caa44953$var$SessionRecording.prototype.getConfig = function(configVar) { 34076 return this._mixpanel.get_config(configVar); 34077}; 34078// Alias for getConfig, used by the common addOptOutCheckMixpanelLib function which 34079// reaches into this class instance and expects the snake case version of the function. 34080// eslint-disable-next-line camelcase 34081$a44aab89caa44953$var$SessionRecording.prototype.get_config = function(configVar) { 34082 return this.getConfig(configVar); 34083}; 34084$a44aab89caa44953$var$SessionRecording.prototype.startRecording = function(shouldStopBatcher) { 34085 if (this._rrwebRecord === null) { 34086 this.reportError('rrweb record function not provided. '); 34087 return; 34088 } 34089 if (this._stopRecording !== null) { 34090 $a44aab89caa44953$var$logger$3.log('Recording already in progress, skipping startRecording.'); 34091 return; 34092 } 34093 this.recordMaxMs = this.getConfig('record_max_ms'); 34094 if (this.recordMaxMs > $a44aab89caa44953$var$MAX_RECORDING_MS) { 34095 this.recordMaxMs = $a44aab89caa44953$var$MAX_RECORDING_MS; 34096 $a44aab89caa44953$var$logger$3.critical('record_max_ms cannot be greater than ' + $a44aab89caa44953$var$MAX_RECORDING_MS + 'ms. Capping value.'); 34097 } 34098 if (!this.maxExpires) this.maxExpires = new Date().getTime() + this.recordMaxMs; 34099 this.recordMinMs = this.getConfig('record_min_ms'); 34100 if (this.recordMinMs > $a44aab89caa44953$var$MAX_VALUE_FOR_MIN_RECORDING_MS) { 34101 this.recordMinMs = $a44aab89caa44953$var$MAX_VALUE_FOR_MIN_RECORDING_MS; 34102 $a44aab89caa44953$var$logger$3.critical('record_min_ms cannot be greater than ' + $a44aab89caa44953$var$MAX_VALUE_FOR_MIN_RECORDING_MS + 'ms. Capping value.'); 34103 } 34104 if (!this.replayStartTime) { 34105 this.replayStartTime = new Date().getTime(); 34106 this.batchStartUrl = $a44aab89caa44953$var$_.info.currentUrl(); 34107 this.replayStartUrl = $a44aab89caa44953$var$_.info.currentUrl(); 34108 } 34109 if (shouldStopBatcher || this.recordMinMs > 0) // the primary case for shouldStopBatcher is when we're starting recording after a reset 34110 // and don't want to send anything over the network until there's 34111 // actual user activity 34112 // this also applies if the minimum recording length has not been hit yet 34113 // so that we don't send data until we know the recording will be long enough 34114 this.batcher.stop(); 34115 else this.batcher.start(); 34116 var resetIdleTimeout = (function() { 34117 clearTimeout(this.idleTimeoutId); 34118 var idleTimeoutMs = this.getConfig('record_idle_timeout_ms'); 34119 this.idleTimeoutId = setTimeout(this._onIdleTimeout, idleTimeoutMs); 34120 this.idleExpires = new Date().getTime() + idleTimeoutMs; 34121 }).bind(this); 34122 resetIdleTimeout(); 34123 var blockSelector = this.getConfig('record_block_selector'); 34124 if (blockSelector === '' || blockSelector === null) blockSelector = undefined; 34125 try { 34126 this._stopRecording = this._rrwebRecord({ 34127 'emit': (function(ev) { 34128 if (this.idleExpires && this.idleExpires < ev.timestamp) { 34129 this._onIdleTimeout(); 34130 return; 34131 } 34132 if ($a44aab89caa44953$var$isUserEvent(ev)) { 34133 if (this.batcher.stopped && new Date().getTime() - this.replayStartTime >= this.recordMinMs) // start flushing again after user activity 34134 this.batcher.start(); 34135 resetIdleTimeout(); 34136 } 34137 // promise only used to await during tests 34138 this.__enqueuePromise = this.batcher.enqueue(ev); 34139 }).bind(this), 34140 'blockClass': this.getConfig('record_block_class'), 34141 'blockSelector': blockSelector, 34142 'collectFonts': this.getConfig('record_collect_fonts'), 34143 'dataURLOptions': { 34144 'type': 'image/webp', 34145 'quality': 0.6 34146 }, 34147 'maskAllInputs': true, 34148 'maskTextClass': this.getConfig('record_mask_text_class'), 34149 'maskTextSelector': this.getConfig('record_mask_text_selector'), 34150 'recordCanvas': this.getConfig('record_canvas'),
34151 'sampling': { 34152 'canvas': 15 34153 } 34154 }); 34155 } catch (err) { 34156 this.reportError('Unexpected error when starting rrweb recording.', err); 34157 } 34158 if (typeof this._stopRecording !== 'function') { 34159 this.reportError('rrweb failed to start, skipping this recording.'); 34160 this._stopRecording = null; 34161 this.stopRecording(); // stop batcher looping and any timeouts 34162 return; 34163 } 34164 var maxTimeoutMs = this.maxExpires - new Date().getTime(); 34165 this.maxTimeoutId = setTimeout(this._onMaxLengthReached.bind(this), maxTimeoutMs); 34166}; 34167$a44aab89caa44953$var$SessionRecording.prototype.stopRecording = function(skipFlush) { 34168 // store the user ID info in case this is getting called in mixpanel.reset() 34169 this.finalFlushUserIdInfo = this.getUserIdInfo(); 34170 if (!this.isRrwebStopped()) { 34171 try { 34172 this._stopRecording(); 34173 } catch (err) { 34174 this.reportError('Error with rrweb stopRecording', err); 34175 } 34176 this._stopRecording = null; 34177 } 34178 var flushPromise; 34179 if (this.batcher.stopped) // never got user activity to flush after reset, so just clear the batcher 34180 flushPromise = this.batcher.clear(); 34181 else if (!skipFlush) // flush any remaining events from running batcher 34182 flushPromise = this.batcher.flush(); 34183 this.batcher.stop(); 34184 clearTimeout(this.idleTimeoutId); 34185 clearTimeout(this.maxTimeoutId); 34186 return flushPromise; 34187}; 34188$a44aab89caa44953$var$SessionRecording.prototype.isRrwebStopped = function() { 34189 return this._stopRecording === null; 34190}; 34191/** 34192 * Flushes the current batch of events to the server, but passes an opt-out callback to make sure 34193 * we stop recording and dump any queued events if the user has opted out. 34194 */ $a44aab89caa44953$var$SessionRecording.prototype.flushEventsWithOptOut = function(data, options, cb) { 34195 var onOptOut = (function(code) { 34196 // addOptOutCheckMixpanelLib invokes this function with code=0 when the user has opted out 34197 if (code === 0) { 34198 this.stopRecording(); 34199 cb({ 34200 error: 'Tracking has been opted out, stopping recording.' 34201 }); 34202 } 34203 }).bind(this); 34204 this._flushEvents(data, options, cb, onOptOut); 34205}; 34206/** 34207 * @returns {SerializedRecording} 34208 */ $a44aab89caa44953$var$SessionRecording.prototype.serialize = function() { 34209 // don't break if mixpanel instance was destroyed at some point 34210 var tabId; 34211 try { 34212 tabId = this._mixpanel.get_tab_id(); 34213 } catch (e) { 34214 this.reportError('Error getting tab ID for serialization ', e); 34215 tabId = null; 34216 } 34217 return { 34218 'replayId': this.replayId, 34219 'seqNo': this.seqNo, 34220 'replayStartTime': this.replayStartTime, 34221 'batchStartUrl': this.batchStartUrl, 34222 'replayStartUrl': this.replayStartUrl, 34223 'idleExpires': this.idleExpires, 34224 'maxExpires': this.maxExpires, 34225 'tabId': tabId 34226 }; 34227}; 34228/** 34229 * @static 34230 * @param {SerializedRecording} serializedRecording 34231 * @param {SessionRecordingOptions} options 34232 * @returns {SessionRecording} 34233 */ $a44aab89caa44953$var$SessionRecording.deserialize = function(serializedRecording, options) { 34234 var recording = new $a44aab89caa44953$var$SessionRecording($a44aab89caa44953$var$_.extend({}, options, { 34235 replayId: serializedRecording['replayId'], 34236 batchStartUrl: serializedRecording['batchStartUrl'], 34237 replayStartUrl: serializedRecording['replayStartUrl'], 34238 idleExpires: serializedRecording['idleExpires'], 34239 maxExpires: serializedRecording['maxExpires'], 34240 replayStartTime: serializedRecording['replayStartTime'], 34241 seqNo: serializedRecording['seqNo'], 34242 sharedLockStorage: options.sharedLockStorage 34243 })); 34244 return recording; 34245}; 34246$a44aab89caa44953$var$SessionRecording.prototype._sendRequest = function(currentReplayId, reqParam
34246s, reqBody, callback) { 34247 var onSuccess = (function(response, responseBody) { 34248 // Update batch specific props only if the request was successful to guarantee ordering. 34249 // RequestBatcher will always flush the next batch after the previous one succeeds. 34250 // extra check to see if the replay ID has changed so that we don't increment the seqNo on the wrong replay 34251 if (response.status === 200 && this.replayId === currentReplayId) { 34252 this.seqNo++; 34253 this.batchStartUrl = $a44aab89caa44953$var$_.info.currentUrl(); 34254 } 34255 this._onBatchSent(); 34256 callback({ 34257 status: 0, 34258 httpStatusCode: response.status, 34259 responseBody: responseBody, 34260 retryAfter: response.headers.get('Retry-After') 34261 }); 34262 }).bind(this); 34263 var apiHost = this._mixpanel.get_api_host && this._mixpanel.get_api_host('record') || this.getConfig('api_host'); 34264 $a44aab89caa44953$var$win['fetch'](apiHost + '/' + this.getConfig('api_routes')['record'] + '?' + new URLSearchParams(reqParams), { 34265 'method': 'POST', 34266 'headers': { 34267 'Authorization': 'Basic ' + btoa(this.getConfig('token') + ':'), 34268 'Content-Type': 'application/octet-stream' 34269 }, 34270 'body': reqBody 34271 }).then(function(response) { 34272 response.json().then(function(responseBody) { 34273 onSuccess(response, responseBody); 34274 }).catch(function(error) { 34275 callback({ 34276 error: error 34277 }); 34278 }); 34279 }).catch(function(error) { 34280 callback({ 34281 error: error, 34282 httpStatusCode: 0 34283 }); 34284 }); 34285}; 34286$a44aab89caa44953$var$SessionRecording.prototype._flushEvents = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(data, options, callback) { 34287 var numEvents = data.length; 34288 if (numEvents > 0) { 34289 var replayId = this.replayId; 34290 // each rrweb event has a timestamp - leverage those to get time properties 34291 var batchStartTime = Infinity; 34292 var batchEndTime = -Infinity; 34293 var hasFullSnapshot = false; 34294 for(var i = 0; i < numEvents; i++){ 34295 batchStartTime = Math.min(batchStartTime, data[i].timestamp); 34296 batchEndTime = Math.max(batchEndTime, data[i].timestamp); 34297 if (data[i].type === $a44aab89caa44953$var$EventType.FullSnapshot) hasFullSnapshot = true; 34298 } 34299 if (this.seqNo === 0) { 34300 if (!hasFullSnapshot) { 34301 callback({ 34302 error: 'First batch does not contain a full snapshot. Aborting recording.' 34303 }); 34304 this.stopRecording(true); 34305 return; 34306 } 34307 this.replayStartTime = batchStartTime; 34308 } else if (!this.replayStartTime) { 34309 this.reportError('Replay start time not set but seqNo is not 0. Using current batch start time as a fallback.'); 34310 this.replayStartTime = batchStartTime; 34311 } 34312 var replayLengthMs = batchEndTime - this.replayStartTime; 34313 var reqParams = { 34314 '$current_url': this.batchStartUrl, 34315 '$lib_version': $a44aab89caa44953$var$Config.LIB_VERSION, 34316 'batch_start_time': batchStartTime / 1000, 34317 'mp_lib': 'web', 34318 'replay_id': replayId, 34319 'replay_length_ms': replayLengthMs, 34320 'replay_start_time': this.replayStartTime / 1000, 34321 'replay_start_url': this.replayStartUrl, 34322 'seq': this.seqNo 34323 }; 34324 var eventsJson = JSON.stringify(data); 34325 Object.assign(reqParams, this.getUserIdInfo()); 34326 if ($a44aab89caa44953$var$CompressionStream) { 34327 var jsonStream = new Blob([ 34328 eventsJson 34329 ], { 34330 type: 'application/json' 34331 }).stream(); 34332 var gzipStream = jsonStream.pipeThrough(new $a44aab89caa44953$var$CompressionStream('gzip')); 34333 new Response(gzipStream).blob().then((function(compressedBlob) { 34334 reqParams['format'] = 'gzip';
34335 this._sendRequest(replayId, reqParams, compressedBlob, callback); 34336 }).bind(this)); 34337 } else { 34338 reqParams['format'] = 'body'; 34339 this._sendRequest(replayId, reqParams, eventsJson, callback); 34340 } 34341 } 34342}); 34343$a44aab89caa44953$var$SessionRecording.prototype.reportError = function(msg, err) { 34344 $a44aab89caa44953$var$logger$3.error.apply($a44aab89caa44953$var$logger$3.error, arguments); 34345 try { 34346 if (!err && !(msg instanceof Error)) msg = new Error(msg); 34347 this.getConfig('error_reporter')(msg, err); 34348 } catch (err) { 34349 $a44aab89caa44953$var$logger$3.error(err); 34350 } 34351}; 34352/** 34353 * Module for handling the storage and retrieval of recording metadata as well as any active recordings. 34354 * Makes sure that only one tab can be recording at a time. 34355 */ var $a44aab89caa44953$var$RecordingRegistry = function(options) { 34356 /** @type {IDBStorageWrapper} */ this.idb = new $a44aab89caa44953$var$IDBStorageWrapper($a44aab89caa44953$var$RECORDING_REGISTRY_STORE_NAME); 34357 this.errorReporter = options.errorReporter; 34358 this.mixpanelInstance = options.mixpanelInstance; 34359 this.sharedLockStorage = options.sharedLockStorage; 34360}; 34361$a44aab89caa44953$var$RecordingRegistry.prototype.isPersistenceEnabled = function() { 34362 return !this.mixpanelInstance.get_config('disable_persistence'); 34363}; 34364$a44aab89caa44953$var$RecordingRegistry.prototype.handleError = function(err) { 34365 this.errorReporter('IndexedDB error: ', err); 34366}; 34367/** 34368 * @param {import('./session-recording').SerializedRecording} serializedRecording 34369 */ $a44aab89caa44953$var$RecordingRegistry.prototype.setActiveRecording = function(serializedRecording) { 34370 if (!this.isPersistenceEnabled()) return $a44aab89caa44953$var$PromisePolyfill.resolve(); 34371 var tabId = serializedRecording['tabId']; 34372 if (!tabId) { 34373 console.warn('No tab ID is set, cannot persist recording metadata.'); 34374 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 34375 } 34376 return this.idb.init().then((function() { 34377 return this.idb.setItem(tabId, serializedRecording); 34378 }).bind(this)).catch(this.handleError.bind(this)); 34379}; 34380/** 34381 * @returns {Promise<import('./session-recording').SerializedRecording>} 34382 */ $a44aab89caa44953$var$RecordingRegistry.prototype.getActiveRecording = function() { 34383 if (!this.isPersistenceEnabled()) return $a44aab89caa44953$var$PromisePolyfill.resolve(null); 34384 return this.idb.init().then((function() { 34385 return this.idb.getItem(this.mixpanelInstance.get_tab_id()); 34386 }).bind(this)).then((function(serializedRecording) { 34387 return $a44aab89caa44953$var$isRecordingExpired(serializedRecording) ? null : serializedRecording; 34388 }).bind(this)).catch(this.handleError.bind(this)); 34389}; 34390$a44aab89caa44953$var$RecordingRegistry.prototype.clearActiveRecording = function() { 34391 if (this.isPersistenceEnabled()) // mark recording as expired instead of deleting it in case the page unloads mid-flush and doesn't make it to ingestion. 34392 // this will ensure the next pageload will flush the remaining events, but not try to continue the recording. 34393 return this.markActiveRecordingExpired(); 34394 else return this.deleteActiveRecording(); 34395}; 34396$a44aab89caa44953$var$RecordingRegistry.prototype.markActiveRecordingExpired = function() { 34397 return this.getActiveRecording().then((function(serializedRecording) { 34398 if (serializedRecording) { 34399 serializedRecording['maxExpires'] = 0; 34400 return this.setActiveRecording(serializedRecording); 34401 } 34402 }).bind(this)).catch(this.handleError.bind(this)); 34403}; 34404$a44aab89caa44953$var$RecordingRegistry.prototype.deleteActiveRecording = function() { 34405 // avoid initializing IDB if this registry instance hasn't already written a recording 34406 if (this.idb.isInitialized()) return this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)); 34407 else return $a44aab89caa44953$var$PromisePolyfill.resolve(); 34408}; 34409/** 34410 * Flush any inactive recordings from the registry to minimize data loss. 34411 * The main idea here is that we can flush remaining rrweb events on the next page load if a tab is closed mid-batch. 34412 */ $a44aab89caa44953$var$RecordingRegistry.prototype.flushInactiveRecordings = function() { 34413 if (!this.isPersistenceEnabled()) return $a44aab89caa44953$var$PromisePolyfill.resolve([]); 34414 return this.idb.init().then((function() { 34415 return this.idb.getAll(); 34416 }).bind(this)).then((function(serializedRecordings) { 34417 // clean up any expired recordings from the registry, non-expired ones may be active in other tabs 34418 var unloadPromises = serializedRecordings.filter(function(serializedRecording) { 34419 return $a44aab89caa44953$var$isRecordingExpired(serializedRecording); 34420 }).map((function(serializedRecording) { 34421 var sessionRecording = $a44aab89caa44953$var$SessionRecording.deserialize(serializedRecording, { 34422 mixpanelInstance: this.mixpanelInstance, 34423 sharedLockStorage: this.sharedLockStorage 34424 }); 34425 return sessionRecording.unloadPersistedData().then((function() { 34426 // expired recording was successfully flushed, we can clean it up from the registry 34427 return this.idb.removeItem(serializedRecording['tabId']); 34428 }).bind(this)).catch(this.handleError.bind(this)); 34429 }).bind(this)); 34430 return $a44aab89caa44953$var$PromisePolyfill.all(unloadPromises); 34431 }).bind(this)).catch(this.handleError.bind(this)); 34432}; 34433var $a44aab89caa44953$var$logger$2 = $a44aab89caa44953$var$console_with_prefix('recorder'); 34434/** 34435 * Recorder API: bundles rrweb and and exposes methods to start and stop recordings. 34436 * @param {Object} [options.mixpanelInstance] - reference to the core MixpanelLib 34437*/ var $a44aab89caa44953$var$MixpanelRecorder = function(mixpanelInstance, rrwebRecord, sharedLockStorage) { 34438 this.mixpanelInstance = mixpanelInstance; 34439 this.rrwebRecord = rrwebRecord || $a44aab89caa44953$var$record; 34440 this.sharedLockStorage = sharedLockStorage; 34441 /** 34442 * @member {import('./registry').RecordingRegistry} 34443 */ this.recordingRegistry = new $a44aab89caa44953$var$RecordingRegistry({ 34444 mixpanelInstance: this.mixpanelInstance, 34445 errorReporter: $a44aab89caa44953$var$logger$2.error, 34446 sharedLockStorage: sharedLockStorage 34447 }); 34448 this._flushInactivePromise = this.recordingRegistry.flushInactiveRecordings(); 34449 this.activeRecording = null; 34450 this.stopRecordingInProgress = false;
34451}; 34452$a44aab89caa44953$var$MixpanelRecorder.prototype.startRecording = function(options) { 34453 options = options || {}; 34454 if (this.activeRecording && !this.activeRecording.isRrwebStopped()) { 34455 $a44aab89caa44953$var$logger$2.log('Recording already in progress, skipping startRecording.'); 34456 return; 34457 } 34458 var onIdleTimeout = (function() { 34459 $a44aab89caa44953$var$logger$2.log('Idle timeout reached, restarting recording.'); 34460 this.resetRecording(); 34461 }).bind(this); 34462 var onMaxLengthReached = (function() { 34463 $a44aab89caa44953$var$logger$2.log('Max recording length reached, stopping recording.'); 34464 this.resetRecording(); 34465 }).bind(this); 34466 var onBatchSent = (function() { 34467 this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()); 34468 this['__flushPromise'] = this.activeRecording.batcher._flushPromise; 34469 }).bind(this); 34470 /** 34471 * @type {import('./session-recording').SessionRecordingOptions} 34472 */ var sessionRecordingOptions = { 34473 mixpanelInstance: this.mixpanelInstance, 34474 onBatchSent: onBatchSent, 34475 onIdleTimeout: onIdleTimeout, 34476 onMaxLengthReached: onMaxLengthReached, 34477 replayId: $a44aab89caa44953$var$_.UUID(), 34478 rrwebRecord: this.rrwebRecord, 34479 sharedLockStorage: this.sharedLockStorage 34480 }; 34481 if (options.activeSerializedRecording) this.activeRecording = $a44aab89caa44953$var$SessionRecording.deserialize(options.activeSerializedRecording, sessionRecordingOptions); 34482 else this.activeRecording = new $a44aab89caa44953$var$SessionRecording(sessionRecordingOptions); 34483 this.activeRecording.startRecording(options.shouldStopBatcher); 34484 return this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()); 34485}; 34486$a44aab89caa44953$var$MixpanelRecorder.prototype.stopRecording = function() { 34487 // Prevents activeSerializedRecording from being reused when stopping the recording. 34488 this.stopRecordingInProgress = true; 34489 return this._stopCurrentRecording(false, true).then((function() { 34490 return this.recordingRegistry.clearActiveRecording(); 34491 }).bind(this)).then((function() { 34492 this.stopRecordingInProgress = false; 34493 }).bind(this)); 34494}; 34495$a44aab89caa44953$var$MixpanelRecorder.prototype.pauseRecording = function() { 34496 return this._stopCurrentRecording(false); 34497}; 34498$a44aab89caa44953$var$MixpanelRecorder.prototype._stopCurrentRecording = function(skipFlush, disableActiveRecording) { 34499 if (this.activeRecording) { 34500 var stopRecordingPromise = this.activeRecording.stopRecording(skipFlush); 34501 if (disableActiveRecording) this.activeRecording = null; 34502 return stopRecordingPromise; 34503 } 34504 return $a44aab89caa44953$var$PromisePolyfill.resolve(); 34505}; 34506$a44aab89caa44953$var$MixpanelRecorder.prototype.resumeRecording = function(startNewIfInactive) { 34507 if (this.activeRecording && this.activeRecording.isRrwebStopped()) { 34508 this.activeRecording.startRecording(false); 34509 return $a44aab89caa44953$var$PromisePolyfill.resolve(null); 34510 } 34511 return this.recordingRegistry.getActiveRecording().then((function(activeSerializedRecording) { 34512 if (activeSerializedRecording && !this.stopRecordingInProgress) return this.startRecording({ 34513 activeSerializedRecording: activeSerializedRecording 34514 }); 34515 else if (startNewIfInactive) return this.startRecording({ 34516 shouldStopBatcher: false 34517 }); 34518 else { 34519 $a44aab89caa44953$var$logger$2.log('No resumable recording found.'); 34520 return null; 34521 } 34522 }).bind(this)); 34523}; 34524$a44aab89caa44953$var$MixpanelRecorder.prototype.resetRecording = function() { 34525 this.stopRecording(); 34526 this.startRecording({ 34527 shouldStopBatcher: true 34528 }); 34529}; 34530$a44aab89caa44953$var$MixpanelRecorder.prototype.getActiveReplayId = function() { 34531 if (this.activeRecording && !this.activeRecording.isRrwebStopped()) return this.activeRecording.replayId; 34532 else return null; 34533}; 34534// getter so that older mixpanel-core versions can still retrieve the replay ID 34535// when pulling the latest recorder bundle from the CDN 34536Object.defineProperty($a44aab89caa44953$var$MixpanelRecorder.prototype, 'replayId', { 34537 get: function() { 34538 return this.getActiveReplayId(); 34539 } 34540}); 34541$a44aab89caa44953$var$win['__mp_recorder'] = $a44aab89caa44953$var$MixpanelRecorder; 34542// stateless utils 34543// mostly from https://github.com/mixpanel/mixpanel-js/blob/989ada50f518edab47b9c4fd9535f9fbd5ec5fc0/src/autotrack-utils.js 34544var $a44aab89caa44953$var$EV_CHANGE = 'change'; 34545var $a44aab89caa44953$var$EV_CLICK = 'click'; 34546var $a44aab89caa44953$var$EV_HASHCHANGE = 'hashchange'; 34547var $a44aab89caa44953$var$EV_MP_LOCATION_CHANGE = 'mp_locationchange'; 34548var $a44aab89caa44953$var$EV_POPSTATE = 'popstate'; 34549// TODO scrollend isn't available in Safari: document or polyfill?
34550var $a44aab89caa44953$var$EV_SCROLLEND = 'scrollend'; 34551var $a44aab89caa44953$var$EV_SUBMIT = 'submit'; 34552var $a44aab89caa44953$var$CLICK_EVENT_PROPS = [ 34553 'clientX', 34554 'clientY', 34555 'offsetX', 34556 'offsetY', 34557 'pageX', 34558 'pageY', 34559 'screenX', 34560 'screenY', 34561 'x', 34562 'y' 34563]; 34564var $a44aab89caa44953$var$OPT_IN_CLASSES = [ 34565 'mp-include' 34566]; 34567var $a44aab89caa44953$var$OPT_OUT_CLASSES = [ 34568 'mp-no-track' 34569]; 34570var $a44aab89caa44953$var$SENSITIVE_DATA_CLASSES = $a44aab89caa44953$var$OPT_OUT_CLASSES.concat([ 34571 'mp-sensitive' 34572]); 34573var $a44aab89caa44953$var$TRACKED_ATTRS = [ 34574 'aria-label', 34575 'aria-labelledby', 34576 'aria-describedby', 34577 'href', 34578 'name', 34579 'role', 34580 'title', 34581 'type' 34582]; 34583var $a44aab89caa44953$var$logger$1 = $a44aab89caa44953$var$console_with_prefix('autocapture'); 34584function $a44aab89caa44953$var$getClasses(el) { 34585 var classes = {}; 34586 var classList = $a44aab89caa44953$var$getClassName(el).split(' '); 34587 for(var i = 0; i < classList.length; i++){ 34588 var cls = classList[i]; 34589 if (cls) classes[cls] = true; 34590 } 34591 return classes; 34592} 34593/* 34594 * Get the className of an element, accounting for edge cases where element.className is an object 34595 * @param {Element} el - element to get the className of 34596 * @returns {string} the element's class 34597 */ function $a44aab89caa44953$var$getClassName(el) { 34598 switch(typeof el.className){ 34599 case 'string': 34600 return el.className; 34601 case 'object': 34602 return el.className.baseVal || el.getAttribute('class') || ''; 34603 default: 34604 return ''; 34605 } 34606} 34607function $a44aab89caa44953$var$getPreviousElementSibling(el) { 34608 if (el.previousElementSibling) return el.previousElementSibling; 34609 else { 34610 do el = el.previousSibling; 34611 while (el && !$a44aab89caa44953$var$isElementNode(el)); 34612 return el; 34613 } 34614} 34615function $a44aab89caa44953$var$getPropertiesFromElement(el, ev, blockAttrsSet, extraAttrs, allowElementCallback, allowSelectors) { 34616 var props = { 34617 '$classes': $a44aab89caa44953$var$getClassName(el).split(' '), 34618 '$tag_name': el.tagName.toLowerCase() 34619 }; 34620 var elId = el.id; 34621 if (elId) props['$id'] = elId; 34622 if ($a44aab89caa44953$var$shouldTrackElementDetails(el, ev, allowElementCallback, allowSelectors)) $a44aab89caa44953$var$_.each($a44aab89caa44953$var$TRACKED_ATTRS.concat(extraAttrs), function(attr) { 34623 if (el.hasAttribute(attr) && !blockAttrsSet[attr]) { 34624 var attrVal = el.getAttribute(attr); 34625 if ($a44aab89caa44953$var$shouldTrackValue(attrVal)) props['$attr-' + attr] = attrVal; 34626 } 34627 }); 34628 var nthChild = 1; 34629 var nthOfType = 1; 34630 var currentElem = el; 34631 while(currentElem = $a44aab89caa44953$var$getPreviousElementSibling(currentElem)){ 34632 nthChild++; 34633 if (currentElem.tagName === el.tagName) nthOfType++; 34634 } 34635 props['$nth_child'] = nthChild; 34636 props['$nth_of_type'] = nthOfType; 34637 return props; 34638} 34639function $a44aab89caa44953$var$getPropsForDOMEvent(ev, config) { 34640 var allowElementCallback = config.allowElementCallback; 34641 var allowSelectors = config.allowSelectors || []; 34642 var blockAttrs = config.blockAttrs || []; 34643 var blockElementCallback = config.blockElementCallback; 34644 var blockSelectors = config.blockSelectors || []; 34645 var captureTextContent = config.captureTextContent || false; 34646 var captureExtraAttrs = config.captureExtraAttrs || [];
34647 var capturedForHeatMap = config.capturedForHeatMap || false; 34648 // convert array to set every time, as the config may have changed 34649 var blockAttrsSet = {}; 34650 $a44aab89caa44953$var$_.each(blockAttrs, function(attr) { 34651 blockAttrsSet[attr] = true; 34652 }); 34653 var props = null; 34654 var target = typeof ev.target === 'undefined' ? ev.srcElement : ev.target; 34655 if ($a44aab89caa44953$var$isTextNode(target)) target = target.parentNode; 34656 if ($a44aab89caa44953$var$shouldTrackDomEvent(target, ev) && $a44aab89caa44953$var$isElementAllowed(target, ev, allowElementCallback, allowSelectors) && !$a44aab89caa44953$var$isElementBlocked(target, ev, blockElementCallback, blockSelectors)) { 34657 var targetElementList = [ 34658 target 34659 ]; 34660 var curEl = target; 34661 while(curEl.parentNode && !$a44aab89caa44953$var$isTag(curEl, 'body')){ 34662 targetElementList.push(curEl.parentNode); 34663 curEl = curEl.parentNode; 34664 } 34665 var elementsJson = []; 34666 var href, explicitNoTrack = false; 34667 $a44aab89caa44953$var$_.each(targetElementList, function(el) { 34668 var shouldTrackDetails = $a44aab89caa44953$var$shouldTrackElementDetails(el, ev, allowElementCallback, allowSelectors); 34669 // if the element or a parent element is an anchor tag 34670 // include the href as a property 34671 if (!blockAttrsSet['href'] && el.tagName.toLowerCase() === 'a') { 34672 href = el.getAttribute('href'); 34673 href = shouldTrackDetails && $a44aab89caa44953$var$shouldTrackValue(href) && href; 34674 } 34675 if ($a44aab89caa44953$var$isElementBlocked(el, ev, blockElementCallback, blockSelectors)) explicitNoTrack = true; 34676 elementsJson.push($a44aab89caa44953$var$getPropertiesFromElement(el, ev, blockAttrsSet, captureExtraAttrs, allowElementCallback, allowSelectors)); 34677 }, this); 34678 if (!explicitNoTrack) { 34679 var docElement = $a44aab89caa44953$var$document$1['documentElement']; 34680 props = { 34681 '$event_type': ev.type, 34682 '$host': $a44aab89caa44953$var$win.location.host, 34683 '$pathname': $a44aab89caa44953$var$win.location.pathname, 34684 '$elements': elementsJson, 34685 '$el_attr__href': href, 34686 '$viewportHeight': Math.max(docElement['clientHeight'], $a44aab89caa44953$var$win['innerHeight'] || 0), 34687 '$viewportWidth': Math.max(docElement['clientWidth'], $a44aab89caa44953$var$win['innerWidth'] || 0), 34688 '$pageHeight': $a44aab89caa44953$var$document$1['body']['offsetHeight'] || 0, 34689 '$pageWidth': $a44aab89caa44953$var$document$1['body']['offsetWidth'] || 0 34690 }; 34691 $a44aab89caa44953$var$_.each(captureExtraAttrs, function(attr) { 34692 if (!blockAttrsSet[attr] && target.hasAttribute(attr)) { 34693 var attrVal = target.getAttribute(attr); 34694 if ($a44aab89caa44953$var$shouldTrackValue(attrVal)) props['$el_attr__' + attr] = attrVal; 34695 } 34696 }); 34697 if (captureTextContent) { 34698 elementText = $a44aab89caa44953$var$getSafeText(target, ev, allowElementCallback, allowSelectors); 34699 if (elementText && elementText.length) props['$el_text'] = elementText; 34700 } 34701 if (ev.type === $a44aab89caa44953$var$EV_CLICK) { 34702 $a44aab89caa44953$var$_.each($a44aab89caa44953$var$CLICK_EVENT_PROPS, function(prop) { 34703 if (prop in ev) props['$' + prop] = ev[prop]; 34704 }); 34705 if (capturedForHeatMap) props['$captured_for_heatmap'] = true; 34706 target = $a44aab89caa44953$var$guessRealClickTarget(ev); 34707 } 34708 // prioritize text content from "real" click target if different from original target 34709 if (captureTextContent) { 34710 var elementText = $a44aab89caa44953$var$getSafeText(target, ev, allowElementCallback, allowSelectors); 34711 if (elementText && elementText.length) props['$el_text'] = elementText; 34712 } 34713 if (target) { 34714 // target may have been recalculated; check allowlists and blocklists again 34715 if (!$a44aab89caa44953$var$isElementAllowed(target, ev, allowElementCallback, allowSelectors) || $a44aab89caa44953$var$isElementBlocked(target, ev, blockElementCallback, blockSelectors)) return null; 34716 var targetProps = $a44aab89caa44953$var$getPropertiesFromElement(target, ev, blockAttrsSet, captureExtraAttrs, allowElementCallback, allowSelectors); 34717 props['$target'] = targetProps; 34718 // pull up more props onto main event props 34719 props['$el_classes'] = targetProps['$classes']; 34720 $a44aab89caa44953$var$_.extend(props, $a44aab89caa44953$var$_.strip_empty_properties({ 34721 '$el_id': targetProps['$id'], 34722 '$el_tag_name': targetProps['$tag_name'] 34723 })); 34724 } 34725 } 34726 } 34727 return props; 34728} 34729/** 34730 * Get the direct text content of an element, protecting against sensitive data collection. 34731 * Concats textContent of each of the element's text node children; this avoids potential 34732 * collection of sensitive data that could happen if we used element.textContent and the 34733 * element had sensitive child elements, since element.textContent includes child content. 34734 * Scrubs values that look like they could be sensitive (i.e. cc or ssn number). 34735 * @param {Element} el - element to get the text of 34736 * @param {Array<string>} allowSelectors - CSS selectors for elements that should be included 34737 * @returns {string} the element's direct text content 34738 */ function $a44aab89caa44953$var$getSafeText(el, ev, allowElementCallback, allowSelectors) { 34739 var elText = ''; 34740 if ($a44aab89caa44953$var$shouldTrackElementDetails(el, ev, allowElementCallback, allowSelectors) && el.childNodes && el.childNodes.length) $a44aab89caa44953$var$_.each(el.childNodes, function(child) { 34741 if ($a44aab89caa44953$var$isTextNode(child) && child.textContent) elText += $a44aab89caa44953$var$_.trim(child.textContent)// scrub potentially sensitive values 34742 .split(/(\s+)/).filter($a44aab89caa44953$var$shouldTrackValue).join('')// normalize whitespace 34743 .replace(/[\r\n]/g, ' ').replace(/[ ]+/g, ' ')// truncate 34744 .substring(0, 255); 34745 }); 34746 return $a44aab89caa44953$var$_.trim(elText); 34747} 34748function $a44aab89caa44953$var$guessRealClickTarget(ev) { 34749 var target = ev.target; 34750 var composedPath = ev['composedPath'](); 34751 for(var i = 0; i < composedPath.length; i++){ 34752 var node = composedPath[i]; 34753 if ($a44aab89caa44953$var$isTag(node, 'a') || $a44aab89caa44953$var$isTag(node, 'button') || $a44aab89caa44953$var$isTag(node, 'input') || $a44aab89caa44953$var$isTag(node, 'select') || node.getAttribute && node.getAttribute('role') === 'button') { 34754 target = node; 34755 break; 34756 } 34757 if (node === target) break; 34758 } 34759 return target; 34760} 34761function $a44aab89caa44953$var$isElementAllowed(el, ev, allowElementCallback, allowSelectors) { 34762 if (allowElementCallback) try { 34763 if (!allowElementCallback(el, ev)) return false;
34764 } catch (err) { 34765 $a44aab89caa44953$var$logger$1.critical('Error while checking element in allowElementCallback', err); 34766 return false; 34767 } 34768 if (!allowSelectors.length) // no allowlist; all elements are fair game 34769 return true; 34770 for(var i = 0; i < allowSelectors.length; i++){ 34771 var sel = allowSelectors[i]; 34772 try { 34773 if (el['matches'](sel)) return true; 34774 } catch (err) { 34775 $a44aab89caa44953$var$logger$1.critical('Error while checking selector: ' + sel, err); 34776 } 34777 } 34778 return false; 34779} 34780function $a44aab89caa44953$var$isElementBlocked(el, ev, blockElementCallback, blockSelectors) { 34781 var i; 34782 if (blockElementCallback) try { 34783 if (blockElementCallback(el, ev)) return true; 34784 } catch (err) { 34785 $a44aab89caa44953$var$logger$1.critical('Error while checking element in blockElementCallback', err); 34786 return true; 34787 } 34788 if (blockSelectors && blockSelectors.length) // programmatically prevent tracking of elements that match CSS selectors 34789 for(i = 0; i < blockSelectors.length; i++){ 34790 var sel = blockSelectors[i]; 34791 try { 34792 if (el['matches'](sel)) return true; 34793 } catch (err) { 34794 $a44aab89caa44953$var$logger$1.critical('Error while checking selector: ' + sel, err); 34795 } 34796 } 34797 // allow users to programmatically prevent tracking of elements by adding default classes such as 'mp-no-track' 34798 var classes = $a44aab89caa44953$var$getClasses(el); 34799 for(i = 0; i < $a44aab89caa44953$var$OPT_OUT_CLASSES.length; i++){ 34800 if (classes[$a44aab89caa44953$var$OPT_OUT_CLASSES[i]]) return true; 34801 } 34802 return false; 34803} 34804/* 34805 * Check whether a DOM node has nodeType Node.ELEMENT_NODE 34806 * @param {Node} node - node to check 34807 * @returns {boolean} whether node is of the correct nodeType 34808 */ function $a44aab89caa44953$var$isElementNode(node) { 34809 return node && node.nodeType === 1; // Node.ELEMENT_NODE - use integer constant for browser portability 34810} 34811/* 34812 * Check whether an element is of a given tag type. 34813 * Due to potential reference discrepancies (such as the webcomponents.js polyfill), 34814 * we want to match tagNames instead of specific references because something like 34815 * element === document.body won't always work because element might not be a native 34816 * element. 34817 * @param {Element} el - element to check 34818 * @param {string} tag - tag name (e.g., "div") 34819 * @returns {boolean} whether el is of the given tag type 34820 */ function $a44aab89caa44953$var$isTag(el, tag) { 34821 return el && el.tagName && el.tagName.toLowerCase() === tag.toLowerCase(); 34822} 34823/* 34824 * Check whether a DOM node is a TEXT_NODE 34825 * @param {Node} node - node to check 34826 * @returns {boolean} whether node is of type Node.TEXT_NODE 34827 */ function $a44aab89caa44953$var$isTextNode(node) { 34828 return node && node.nodeType === 3; // Node.TEXT_NODE - use integer constant for browser portability 34829} 34830function $a44aab89caa44953$var$minDOMApisSupported() { 34831 try { 34832 var testEl = $a44aab89caa44953$var$document$1.createElement('div'); 34833 return !!testEl['matches']; 34834 } catch (err) { 34835 return false; 34836 } 34837} 34838/* 34839 * Check whether a DOM event should be "tracked" or if it may contain sensitive data 34840 * using a variety of heuristics. 34841 * @param {Element} el - element to check 34842 * @param {Event} ev - event to check 34843 * @returns {boolean} whether the event should be tracked 34844 */ function $a44aab89caa44953$var$shouldTrackDomEvent(el, ev) { 34845 if (!el || $a44aab89caa44953$var$isTag(el, 'html') || !$a44aab89caa44953$var$isElementNode(el)) return false; 34846 var tag = el.tagName.toLowerCase(); 34847 switch(tag){ 34848 case 'form': 34849 return ev.type === $a44aab89caa44953$var$EV_SUBMIT; 34850 case 'input': 34851 if ([ 34852 'button', 34853 'submit' 34854 ].indexOf(el.getAttribute('type')) === -1) return ev.type === $a44aab89caa44953$var$EV_CHANGE; 34855 else return ev.type === $a44aab89caa44953$var$EV_CLICK; 34856 case 'select': 34857 case 'textarea': 34858 return ev.type === $a44aab89caa44953$var$EV_CHANGE; 34859 default: 34860 return ev.type === $a44aab89caa44953$var$EV_CLICK; 34861 } 34862} 34863/* 34864 * Check whether a DOM element should be "tracked" or if it may contain sensitive data 34865 * using a variety of heuristics. 34866 * @param {Element} el - element to check 34867 * @param {Array<string>} allowSelectors - CSS selectors for elements that should be included 34868 * @returns {boolean} whether the element should be tracked 34869 */ function $a44aab89caa44953$var$shouldTrackElementDetails(el, ev, allowElementCallback, allowSelectors) { 34870 var i; 34871 if (!$a44aab89caa44953$var$isElementAllowed(el, ev, allowElementCallback, allowSelectors)) return false;
34872 for(var curEl = el; curEl.parentNode && !$a44aab89caa44953$var$isTag(curEl, 'body'); curEl = curEl.parentNode){ 34873 var classes = $a44aab89caa44953$var$getClasses(curEl); 34874 for(i = 0; i < $a44aab89caa44953$var$SENSITIVE_DATA_CLASSES.length; i++){ 34875 if (classes[$a44aab89caa44953$var$SENSITIVE_DATA_CLASSES[i]]) return false; 34876 } 34877 } 34878 var elClasses = $a44aab89caa44953$var$getClasses(el); 34879 for(i = 0; i < $a44aab89caa44953$var$OPT_IN_CLASSES.length; i++){ 34880 if (elClasses[$a44aab89caa44953$var$OPT_IN_CLASSES[i]]) return true; 34881 } 34882 // don't send data from inputs or similar elements since there will always be 34883 // a risk of clientside javascript placing sensitive data in attributes 34884 if ($a44aab89caa44953$var$isTag(el, 'input') || $a44aab89caa44953$var$isTag(el, 'select') || $a44aab89caa44953$var$isTag(el, 'textarea') || el.getAttribute('contenteditable') === 'true') return false; 34885 // don't include hidden or password fields 34886 var type = el.type || ''; 34887 if (typeof type === 'string') switch(type.toLowerCase()){ 34888 case 'hidden': 34889 return false; 34890 case 'password': 34891 return false; 34892 } 34893 // filter out data from fields that look like sensitive fields 34894 var name = el.name || el.id || ''; 34895 if (typeof name === 'string') { 34896 var sensitiveNameRegex = /^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i; 34897 if (sensitiveNameRegex.test(name.replace(/[^a-zA-Z0-9]/g, ''))) return false; 34898 } 34899 return true; 34900} 34901/* 34902 * Check whether a string value should be "tracked" or if it may contain sensitive data 34903 * using a variety of heuristics. 34904 * @param {string} value - string value to check 34905 * @returns {boolean} whether the element should be tracked 34906 */ function $a44aab89caa44953$var$shouldTrackValue(value) { 34907 if (value === null || $a44aab89caa44953$var$_.isUndefined(value)) return false; 34908 if (typeof value === 'string') { 34909 value = $a44aab89caa44953$var$_.trim(value); 34910 // check to see if input value looks like a credit card number 34911 // see: https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9781449327453/ch04s20.html 34912 var ccRegex = /^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/; 34913 if (ccRegex.test((value || '').replace(/[- ]/g, ''))) return false; 34914 // check to see if input value looks like a social security number 34915 var ssnRegex = /(^\d{3}-?\d{2}-?\d{4}$)/; 34916 if (ssnRegex.test(value)) return false; 34917 } 34918 return true; 34919} 34920/** @const */ var $a44aab89caa44953$var$DEFAULT_RAGE_CLICK_THRESHOLD_PX = 30; 34921/** @const */ var $a44aab89caa44953$var$DEFAULT_RAGE_CLICK_TIMEOUT_MS = 1000; 34922/** @const */ var $a44aab89caa44953$var$DEFAULT_RAGE_CLICK_CLICK_COUNT = 4; 34923function $a44aab89caa44953$var$RageClickTracker() { 34924 this.clicks = []; 34925} 34926$a44aab89caa44953$var$RageClickTracker.prototype.isRageClick = function(x, y, options) { 34927 options = options || {}; 34928 var thresholdPx = options['threshold_px'] || $a44aab89caa44953$var$DEFAULT_RAGE_CLICK_THRESHOLD_PX; 34929 var timeoutMs = options['timeout_ms'] || $a44aab89caa44953$var$DEFAULT_RAGE_CLICK_TIMEOUT_MS; 34930 var clickCount = options['click_count'] || $a44aab89caa44953$var$DEFAULT_RAGE_CLICK_CLICK_COUNT; 34931 var timestamp = Date.now(); 34932 var lastClick = this.clicks[this.clicks.length - 1]; 34933 if (lastClick && timestamp - lastClick.timestamp < timeoutMs && Math.sqrt(Math.pow(x - lastClick.x, 2) + Math.pow(y - lastClick.y, 2)) < thresholdPx) { 34934 this.clicks.push({ 34935 x: x, 34936 y: y, 34937 timestamp: timestamp 34938 }); 34939 if (this.clicks.length >= clickCount) { 34940 this.clicks = []; 34941 return true; 34942 } 34943 } else this.clicks = [ 34944 { 34945 x: x, 34946 y: y, 34947 timestamp: timestamp 34948 } 34949 ]; 34950 return false; 34951}; 34952var $a44aab89caa44953$var$AUTOCAPTURE_CONFIG_KEY = 'autocapture'; 34953var $a44aab89caa44953$var$LEGACY_PAGEVIEW_CONFIG_KEY = 'track_pageview'; 34954var $a44aab89caa44953$var$PAGEVIEW_OPTION_FULL_URL = 'full-url'; 34955var $a44aab89caa44953$var$PAGEVIEW_OPTION_URL_WITH_PATH_AND_QUERY_STRING = 'url-with-path-and-query-string'; 34956var $a44aab89caa44953$var$PAGEVIEW_OPTION_URL_WITH_PATH = 'url-with-path'; 34957var $a44aab89caa44953$var$CONFIG_ALLOW_ELEMENT_CALLBACK = 'allow_element_callback'; 34958var $a44aab89caa44953$var$CONFIG_ALLOW_SELECTORS = 'allow_selectors'; 34959var $a44aab89caa44953$var$CONFIG_ALLOW_URL_REGEXES = 'allow_url_regexes'; 34960var $a44aab89caa44953$var$CONFIG_BLOCK_ATTRS = 'block_attrs'; 34961var $a44aab89caa44953$var$CONFIG_BLOCK_ELEMENT_CALLBACK = 'block_element_callback'; 34962var $a44aab89caa44953$var$CONFIG_BLOCK_SELECTORS = 'block_selectors'; 34963var $a44aab89caa44953$var$CONFIG_BLOCK_URL_REGEXES = 'block_url_regexes';
vendor: 4,288 bytes, lines 34964-35039
34964var $a44aab89caa44953$var$CONFIG_CAPTURE_EXTRA_ATTRS = 'capture_extra_attrs'; 34965var $a44aab89caa44953$var$CONFIG_CAPTURE_TEXT_CONTENT = 'capture_text_content'; 34966var $a44aab89caa44953$var$CONFIG_SCROLL_CAPTURE_ALL = 'scroll_capture_all'; 34967var $a44aab89caa44953$var$CONFIG_SCROLL_CHECKPOINTS = 'scroll_depth_percent_checkpoints'; 34968var $a44aab89caa44953$var$CONFIG_TRACK_CLICK = 'click'; 34969var $a44aab89caa44953$var$CONFIG_TRACK_INPUT = 'input'; 34970var $a44aab89caa44953$var$CONFIG_TRACK_PAGEVIEW = 'pageview'; 34971var $a44aab89caa44953$var$CONFIG_TRACK_RAGE_CLICK = 'rage_click'; 34972var $a44aab89caa44953$var$CONFIG_TRACK_SCROLL = 'scroll'; 34973var $a44aab89caa44953$var$CONFIG_TRACK_SUBMIT = 'submit'; 34974var $a44aab89caa44953$var$CONFIG_DEFAULTS$1 = {}; 34975$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_ALLOW_SELECTORS] = []; 34976$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_ALLOW_URL_REGEXES] = []; 34977$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_BLOCK_ATTRS] = []; 34978$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_BLOCK_ELEMENT_CALLBACK] = null; 34979$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_BLOCK_SELECTORS] = []; 34980$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_BLOCK_URL_REGEXES] = []; 34981$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_CAPTURE_EXTRA_ATTRS] = []; 34982$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_CAPTURE_TEXT_CONTENT] = false; 34983$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_SCROLL_CAPTURE_ALL] = false; 34984$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_SCROLL_CHECKPOINTS] = [ 34985 25, 34986 50, 34987 75, 34988 100 34989]; 34990$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_TRACK_CLICK] = true; 34991$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_TRACK_INPUT] = true; 34992$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_TRACK_PAGEVIEW] = $a44aab89caa44953$var$PAGEVIEW_OPTION_FULL_URL; 34993$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_TRACK_RAGE_CLICK] = true; 34994$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_TRACK_SCROLL] = true; 34995$a44aab89caa44953$var$CONFIG_DEFAULTS$1[$a44aab89caa44953$var$CONFIG_TRACK_SUBMIT] = true; 34996var $a44aab89caa44953$var$DEFAULT_PROPS = { 34997 '$mp_autocapture': true 34998}; 34999var $a44aab89caa44953$var$MP_EV_CLICK = '$mp_click'; 35000var $a44aab89caa44953$var$MP_EV_INPUT = '$mp_input_change'; 35001var $a44aab89caa44953$var$MP_EV_RAGE_CLICK = '$mp_rage_click'; 35002var $a44aab89caa44953$var$MP_EV_SCROLL = '$mp_scroll'; 35003var $a44aab89caa44953$var$MP_EV_SUBMIT = '$mp_submit'; 35004/** 35005 * Autocapture: manages automatic event tracking 35006 * @constructor 35007 */ var $a44aab89caa44953$var$Autocapture = function(mp) { 35008 this.mp = mp; 35009}; 35010$a44aab89caa44953$var$Autocapture.prototype.init = function() { 35011 if (!$a44aab89caa44953$var$minDOMApisSupported()) { 35012 $a44aab89caa44953$var$logger$1.critical('Autocapture unavailable: missing required DOM APIs'); 35013 return; 35014 } 35015 this.initPageviewTracking(); 35016 this.initClickTracking(); 35017 this.initInputTracking(); 35018 this.initScrollTracking(); 35019 this.initSubmitTracking(); 35020 this.initRageClickTracking(); 35021}; 35022$a44aab89caa44953$var$Autocapture.prototype.getFullConfig = function() { 35023 var autocaptureConfig = this.mp.get_config($a44aab89caa44953$var$AUTOCAPTURE_CONFIG_KEY); 35024 if (!autocaptureConfig) // Autocapture is completely off 35025 return {}; 35026 else if ($a44aab89caa44953$var$_.isObject(autocaptureConfig)) return $a44aab89caa44953$var$_.extend({}, $a44aab89caa44953$var$CONFIG_DEFAULTS$1, autocaptureConfig); 35027 else // Autocapture config is non-object truthy value, return default 35028 return $a44aab89caa44953$var$CONFIG_DEFAULTS$1; 35029}; 35030$a44aab89caa44953$var$Autocapture.prototype.getConfig = function(key) { 35031 return this.getFullConfig()[key]; 35032}; 35033$a44aab89caa44953$var$Autocapture.prototype.currentUrlBlocked = function() { 35034 var i; 35035 var currentUrl = $a44aab89caa44953$var$_.info.currentUrl(); 35036 var allowUrlRegexes = this.getConfig($a44aab89caa44953$var$CONFIG_ALLOW_URL_REGEXES) || []; 35037 if (allowUrlRegexes.length) { 35038 // we're using an allowlist, only track if current URL matches 35039 var allowed = false;
35040 for(i = 0; i < allowUrlRegexes.length; i++){ 35041 var allowRegex = allowUrlRegexes[i]; 35042 try { 35043 if (currentUrl.match(allowRegex)) { 35044 allowed = true; 35045 break; 35046 } 35047 } catch (err) { 35048 $a44aab89caa44953$var$logger$1.critical('Error while checking block URL regex: ' + allowRegex, err); 35049 return true; 35050 } 35051 } 35052 if (!allowed) // wasn't allowed by any regex 35053 return true; 35054 } 35055 var blockUrlRegexes = this.getConfig($a44aab89caa44953$var$CONFIG_BLOCK_URL_REGEXES) || []; 35056 if (!blockUrlRegexes || !blockUrlRegexes.length) return false; 35057 for(i = 0; i < blockUrlRegexes.length; i++)try { 35058 if (currentUrl.match(blockUrlRegexes[i])) return true; 35059 } catch (err) { 35060 $a44aab89caa44953$var$logger$1.critical('Error while checking block URL regex: ' + blockUrlRegexes[i], err); 35061 return true; 35062 } 35063 return false; 35064}; 35065$a44aab89caa44953$var$Autocapture.prototype.pageviewTrackingConfig = function() { 35066 // supports both autocapture config and old track_pageview config 35067 if (this.mp.get_config($a44aab89caa44953$var$AUTOCAPTURE_CONFIG_KEY)) return this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_PAGEVIEW); 35068 else return this.mp.get_config($a44aab89caa44953$var$LEGACY_PAGEVIEW_CONFIG_KEY); 35069}; 35070// helper for event handlers 35071$a44aab89caa44953$var$Autocapture.prototype.trackDomEvent = function(ev, mpEventName) { 35072 if (this.currentUrlBlocked()) return; 35073 var isCapturedForHeatMap = this.mp.is_recording_heatmap_data() && (mpEventName === $a44aab89caa44953$var$MP_EV_CLICK && !this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_CLICK) || mpEventName === $a44aab89caa44953$var$MP_EV_RAGE_CLICK && !this._getRageClickConfig()); 35074 var props = $a44aab89caa44953$var$getPropsForDOMEvent(ev, { 35075 allowElementCallback: this.getConfig($a44aab89caa44953$var$CONFIG_ALLOW_ELEMENT_CALLBACK), 35076 allowSelectors: this.getConfig($a44aab89caa44953$var$CONFIG_ALLOW_SELECTORS), 35077 blockAttrs: this.getConfig($a44aab89caa44953$var$CONFIG_BLOCK_ATTRS), 35078 blockElementCallback: this.getConfig($a44aab89caa44953$var$CONFIG_BLOCK_ELEMENT_CALLBACK), 35079 blockSelectors: this.getConfig($a44aab89caa44953$var$CONFIG_BLOCK_SELECTORS), 35080 captureExtraAttrs: this.getConfig($a44aab89caa44953$var$CONFIG_CAPTURE_EXTRA_ATTRS), 35081 captureTextContent: this.getConfig($a44aab89caa44953$var$CONFIG_CAPTURE_TEXT_CONTENT), 35082 capturedForHeatMap: isCapturedForHeatMap 35083 }); 35084 if (props) { 35085 $a44aab89caa44953$var$_.extend(props, $a44aab89caa44953$var$DEFAULT_PROPS); 35086 this.mp.track(mpEventName, props); 35087 } 35088}; 35089$a44aab89caa44953$var$Autocapture.prototype._getRageClickConfig = function() { 35090 var config = this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_RAGE_CLICK); 35091 if (!config) return null; // rage click tracking disabled 35092 if (config === true) return {}; // use defaults 35093 if (typeof config === 'object') return config; // use custom configuration 35094 return {}; // fallback to defaults for any other truthy value 35095}; 35096$a44aab89caa44953$var$Autocapture.prototype.initClickTracking = function() { 35097 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_CLICK, this.listenerClick); 35098 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_CLICK) && !this.mp.get_config('record_heatmap_data')) return; 35099 $a44aab89caa44953$var$logger$1.log('Initializing click tracking'); 35100 this.listenerClick = $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_CLICK, (function(ev) { 35101 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_CLICK) && !this.mp.is_recording_heatmap_data()) return; 35102 this.trackDomEvent(ev, $a44aab89caa44953$var$MP_EV_CLICK); 35103 }).bind(this)); 35104}; 35105$a44aab89caa44953$var$Autocapture.prototype.initInputTracking = function() { 35106 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_CHANGE, this.listenerChange); 35107 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_INPUT)) return; 35108 $a44aab89caa44953$var$logger$1.log('Initializing input tracking'); 35109 this.listenerChange = $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_CHANGE, (function(ev) { 35110 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_INPUT)) return; 35111 this.trackDomEvent(ev, $a44aab89caa44953$var$MP_EV_INPUT); 35112 }).bind(this)); 35113}; 35114$a44aab89caa44953$var$Autocapture.prototype.initPageviewTracking = function() { 35115 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_POPSTATE, this.listenerPopstate); 35116 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_HASHCHANGE, this.listenerHashchange); 35117 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_MP_LOCATION_CHANGE, this.listenerLocationchange); 35118 if (!this.pageviewTrackingConfig()) return; 35119 $a44aab89caa44953$var$logger$1.log('Initializing pageview tracking'); 35120 var previousTrackedUrl = ''; 35121 var tracked = false;
35122 if (!this.currentUrlBlocked()) tracked = this.mp.track_pageview($a44aab89caa44953$var$DEFAULT_PROPS); 35123 if (tracked) previousTrackedUrl = $a44aab89caa44953$var$_.info.currentUrl(); 35124 this.listenerPopstate = $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_POPSTATE, function() { 35125 $a44aab89caa44953$var$win.dispatchEvent(new Event($a44aab89caa44953$var$EV_MP_LOCATION_CHANGE)); 35126 }); 35127 this.listenerHashchange = $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_HASHCHANGE, function() { 35128 $a44aab89caa44953$var$win.dispatchEvent(new Event($a44aab89caa44953$var$EV_MP_LOCATION_CHANGE)); 35129 }); 35130 var nativePushState = $a44aab89caa44953$var$win.history.pushState; 35131 if (typeof nativePushState === 'function') $a44aab89caa44953$var$win.history.pushState = function(state, unused, url) { 35132 nativePushState.call($a44aab89caa44953$var$win.history, state, unused, url); 35133 $a44aab89caa44953$var$win.dispatchEvent(new Event($a44aab89caa44953$var$EV_MP_LOCATION_CHANGE)); 35134 }; 35135 var nativeReplaceState = $a44aab89caa44953$var$win.history.replaceState; 35136 if (typeof nativeReplaceState === 'function') $a44aab89caa44953$var$win.history.replaceState = function(state, unused, url) { 35137 nativeReplaceState.call($a44aab89caa44953$var$win.history, state, unused, url); 35138 $a44aab89caa44953$var$win.dispatchEvent(new Event($a44aab89caa44953$var$EV_MP_LOCATION_CHANGE)); 35139 }; 35140 this.listenerLocationchange = $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_MP_LOCATION_CHANGE, $a44aab89caa44953$var$safewrap((function() { 35141 if (this.currentUrlBlocked()) return; 35142 var currentUrl = $a44aab89caa44953$var$_.info.currentUrl(); 35143 var shouldTrack = false; 35144 var didPathChange = currentUrl.split('#')[0].split('?')[0] !== previousTrackedUrl.split('#')[0].split('?')[0]; 35145 var trackPageviewOption = this.pageviewTrackingConfig(); 35146 if (trackPageviewOption === $a44aab89caa44953$var$PAGEVIEW_OPTION_FULL_URL) shouldTrack = currentUrl !== previousTrackedUrl; 35147 else if (trackPageviewOption === $a44aab89caa44953$var$PAGEVIEW_OPTION_URL_WITH_PATH_AND_QUERY_STRING) shouldTrack = currentUrl.split('#')[0] !== previousTrackedUrl.split('#')[0]; 35148 else if (trackPageviewOption === $a44aab89caa44953$var$PAGEVIEW_OPTION_URL_WITH_PATH) shouldTrack = didPathChange; 35149 if (shouldTrack) { 35150 var tracked = this.mp.track_pageview($a44aab89caa44953$var$DEFAULT_PROPS); 35151 if (tracked) previousTrackedUrl = currentUrl; 35152 if (didPathChange) { 35153 this.lastScrollCheckpoint = 0; 35154 $a44aab89caa44953$var$logger$1.log('Path change: re-initializing scroll depth checkpoints'); 35155 } 35156 } 35157 }).bind(this))); 35158}; 35159$a44aab89caa44953$var$Autocapture.prototype.initRageClickTracking = function() { 35160 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_CLICK, this.listenerRageClick); 35161 var rageClickConfig = this._getRageClickConfig(); 35162 if (!rageClickConfig && !this.mp.get_config('record_heatmap_data')) return; 35163 $a44aab89caa44953$var$logger$1.log('Initializing rage click tracking'); 35164 if (!this._rageClickTracker) this._rageClickTracker = new $a44aab89caa44953$var$RageClickTracker(); 35165 this.listenerRageClick = (function(ev) { 35166 var currentRageClickConfig = this._getRageClickConfig(); 35167 if (!currentRageClickConfig && !this.mp.is_recording_heatmap_data()) return; 35168 if (this.currentUrlBlocked()) return; 35169 if (this._rageClickTracker.isRageClick(ev['pageX'], ev['pageY'], currentRageClickConfig)) this.trackDomEvent(ev, $a44aab89caa44953$var$MP_EV_RAGE_CLICK); 35170 }).bind(this); 35171 $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_CLICK, this.listenerRageClick); 35172}; 35173$a44aab89caa44953$var$Autocapture.prototype.initScrollTracking = function() { 35174 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_SCROLLEND, this.listenerScroll); 35175 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_SCROLL)) return; 35176 $a44aab89caa44953$var$logger$1.log('Initializing scroll tracking'); 35177 this.lastScrollCheckpoint = 0; 35178 this.listenerScroll = $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_SCROLLEND, $a44aab89caa44953$var$safewrap((function() { 35179 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_SCROLL)) return; 35180 if (this.currentUrlBlocked()) return; 35181 var shouldTrack = this.getConfig($a44aab89caa44953$var$CONFIG_SCROLL_CAPTURE_ALL); 35182 var scrollCheckpoints = (this.getConfig($a44aab89caa44953$var$CONFIG_SCROLL_CHECKPOINTS) || []).slice().sort(function(a, b) { 35183 return a - b; 35184 }); 35185 var scrollTop = $a44aab89caa44953$var$win.scrollY; 35186 var props = $a44aab89caa44953$var$_.extend({ 35187 '$scroll_top': scrollTop 35188 }, $a44aab89caa44953$var$DEFAULT_PROPS); 35189 try { 35190 var scrollHeight = $a44aab89caa44953$var$document$1.body.scrollHeight; 35191 var scrollPercentage = Math.round(scrollTop / (scrollHeight - $a44aab89caa44953$var$win.innerHeight) * 100); 35192 props['$scroll_height'] = scrollHeight; 35193 props['$scroll_percentage'] = scrollPercentage; 35194 if (scrollPercentage > this.lastScrollCheckpoint) for(var i = 0; i < scrollCheckpoints.length; i++){ 35195 var checkpoint = scrollCheckpoints[i]; 35196 if (scrollPercentage >= checkpoint && this.lastScrollCheckpoint < checkpoint) { 35197 props['$scroll_checkpoint'] = checkpoint; 35198 this.lastScrollCheckpoint = checkpoint; 35199 shouldTrack = true; 35200 } 35201 } 35202 } catch (err) { 35203 $a44aab89caa44953$var$logger$1.critical('Error while calculating scroll percentage', err); 35204 } 35205 if (shouldTrack) this.mp.track($a44aab89caa44953$var$MP_EV_SCROLL, props); 35206 }).bind(this))); 35207}; 35208$a44aab89caa44953$var$Autocapture.prototype.initSubmitTracking = function() { 35209 $a44aab89caa44953$var$win.removeEventListener($a44aab89caa44953$var$EV_SUBMIT, this.listenerSubmit); 35210 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_SUBMIT)) return; 35211 $a44aab89caa44953$var$logger$1.log('Initializing submit tracking'); 35212 this.listenerSubmit = $a44aab89caa44953$var$win.addEventListener($a44aab89caa44953$var$EV_SUBMIT, (function(ev) { 35213 if (!this.getConfig($a44aab89caa44953$var$CONFIG_TRACK_SUBMIT)) return; 35214 this.trackDomEvent(ev, $a44aab89caa44953$var$MP_EV_SUBMIT); 35215 }).bind(this)); 35216}; 35217// TODO integrate error_reporter from mixpanel instance 35218$a44aab89caa44953$var$safewrapClass($a44aab89caa44953$var$Autocapture); 35219var $a44aab89caa44953$var$fetch = $a44aab89caa44953$var$win['fetch']; 35220var $a44aab89caa44953$var$logger = $a44aab89caa44953$var$console_with_prefix('flags'); 35221var $a44aab89caa44953$var$FLAGS_CONFIG_KEY = 'flags';
35222var $a44aab89caa44953$var$CONFIG_CONTEXT = 'context'; 35223var $a44aab89caa44953$var$CONFIG_DEFAULTS = {}; 35224$a44aab89caa44953$var$CONFIG_DEFAULTS[$a44aab89caa44953$var$CONFIG_CONTEXT] = {}; 35225/** 35226 * FeatureFlagManager: support for Mixpanel's feature flagging product 35227 * @constructor 35228 */ var $a44aab89caa44953$var$FeatureFlagManager = function(initOptions) { 35229 this.getFullApiRoute = initOptions.getFullApiRoute; 35230 this.getMpConfig = initOptions.getConfigFunc; 35231 this.setMpConfig = initOptions.setConfigFunc; 35232 this.getMpProperty = initOptions.getPropertyFunc; 35233 this.track = initOptions.trackingFunc; 35234}; 35235$a44aab89caa44953$var$FeatureFlagManager.prototype.init = function() { 35236 if (!$a44aab89caa44953$var$minApisSupported()) { 35237 $a44aab89caa44953$var$logger.critical('Feature Flags unavailable: missing minimum required APIs'); 35238 return; 35239 } 35240 this.flags = null; 35241 this.fetchFlags(); 35242 this.trackedFeatures = new Set(); 35243}; 35244$a44aab89caa44953$var$FeatureFlagManager.prototype.getFullConfig = function() { 35245 var ffConfig = this.getMpConfig($a44aab89caa44953$var$FLAGS_CONFIG_KEY); 35246 if (!ffConfig) // flags are completely off 35247 return {}; 35248 else if ($a44aab89caa44953$var$_.isObject(ffConfig)) return $a44aab89caa44953$var$_.extend({}, $a44aab89caa44953$var$CONFIG_DEFAULTS, ffConfig); 35249 else // config is non-object truthy value, return default 35250 return $a44aab89caa44953$var$CONFIG_DEFAULTS; 35251}; 35252$a44aab89caa44953$var$FeatureFlagManager.prototype.getConfig = function(key) { 35253 return this.getFullConfig()[key]; 35254}; 35255$a44aab89caa44953$var$FeatureFlagManager.prototype.isSystemEnabled = function() { 35256 return !!this.getMpConfig($a44aab89caa44953$var$FLAGS_CONFIG_KEY); 35257}; 35258$a44aab89caa44953$var$FeatureFlagManager.prototype.updateContext = function(newContext, options) { 35259 if (!this.isSystemEnabled()) { 35260 $a44aab89caa44953$var$logger.critical('Feature Flags not enabled, cannot update context'); 35261 return Promise.resolve(); 35262 } 35263 var ffConfig = this.getMpConfig($a44aab89caa44953$var$FLAGS_CONFIG_KEY); 35264 if (!$a44aab89caa44953$var$_.isObject(ffConfig)) ffConfig = {}; 35265 var oldContext = options && options['replace'] ? {} : this.getConfig($a44aab89caa44953$var$CONFIG_CONTEXT); 35266 ffConfig[$a44aab89caa44953$var$CONFIG_CONTEXT] = $a44aab89caa44953$var$_.extend({}, oldContext, newContext); 35267 this.setMpConfig($a44aab89caa44953$var$FLAGS_CONFIG_KEY, ffConfig); 35268 return this.fetchFlags(); 35269}; 35270$a44aab89caa44953$var$FeatureFlagManager.prototype.areFlagsReady = function() { 35271 if (!this.isSystemEnabled()) $a44aab89caa44953$var$logger.error('Feature Flags not enabled'); 35272 return !!this.flags; 35273}; 35274$a44aab89caa44953$var$FeatureFlagManager.prototype.fetchFlags = function() { 35275 if (!this.isSystemEnabled()) return Promise.resolve(); 35276 var distinctId = this.getMpProperty('distinct_id'); 35277 var deviceId = this.getMpProperty('$device_id'); 35278 $a44aab89caa44953$var$logger.log('Fetching flags for distinct ID: ' + distinctId); 35279 var reqParams = { 35280 'context': $a44aab89caa44953$var$_.extend({ 35281 'distinct_id': distinctId, 35282 'device_id': deviceId 35283 }, this.getConfig($a44aab89caa44953$var$CONFIG_CONTEXT)) 35284 }; 35285 this._fetchInProgressStartTime = Date.now(); 35286 this.fetchPromise = $a44aab89caa44953$var$win['fetch'](this.getFullApiRoute(), { 35287 'method': 'POST', 35288 'headers': { 35289 'Authorization': 'Basic ' + btoa(this.getMpConfig('token') + ':'), 35290 'Content-Type': 'application/octet-stream' 35291 }, 35292 'body': JSON.stringify(reqParams) 35293 }).then((function(response) { 35294 this.markFetchComplete(); 35295 return response.json().then((function(responseBody) { 35296 var responseFlags = responseBody['flags']; 35297 if (!responseFlags) throw new Error('No flags in API response'); 35298 var flags = new Map(); 35299 $a44aab89caa44953$var$_.each(responseFlags, function(data, key) { 35300 flags.set(key, { 35301 'key': data['variant_key'], 35302 'value': data['variant_value'] 35303 }); 35304 }); 35305 this.flags = flags; 35306 }).bind(this)).catch((function(error) { 35307 this.markFetchComplete(); 35308 $a44aab89caa44953$var$logger.error(error); 35309 }).bind(this)); 35310 }).bind(this)).catch((function(error) { 35311 this.markFetchComplete(); 35312 $a44aab89caa44953$var$logger.error(error); 35313 }).bind(this)); 35314 return this.fetchPromise; 35315}; 35316$a44aab89caa44953$var$FeatureFlagManager.prototype.markFetchComplete = function() { 35317 if (!this._fetchInProgressStartTime) { 35318 $a44aab89caa44953$var$logger.error('Fetch in progress started time not set, cannot mark fetch complete'); 35319 return; 35320 } 35321 this._fetchStartTime = this._fetchInProgressStartTime; 35322 this._fetchCompleteTime = Date.now(); 35323 this._fetchLatency = this._fetchCompleteTime - this._fetchStartTime; 35324 this._fetchInProgressStartTime = null; 35325}; 35326$a44aab89caa44953$var$FeatureFlagManager.prototype.getVariant = function(featureName, fallback) { 35327 if (!this.fetchPromise) return new Promise(function(resolve) { 35328 $a44aab89caa44953$var$logger.critical('Feature Flags not initialized'); 35329 resolve(fallback); 35330 }); 35331 return this.fetchPromise.then((function() { 35332 return this.getVariantSync(featureName, fallback); 35333 }).bind(this)).catch(function(error) { 35334 $a44aab89caa44953$var$logger.error(error); 35335 return fallback; 35336 }); 35337}; 35338$a44aab89caa44953$var$FeatureFlagManager.prototype.getVariantSync = function(featureName, fallback) { 35339 if (!this.areFlagsReady()) { 35340 $a44aab89caa44953$var$logger.log('Flags not loaded yet'); 35341 return fallback; 35342 } 35343 var feature = this.flags.get(featureName); 35344 if (!feature) { 35345 $a44aab89caa44953$var$logger.log('No flag found: "' + featureName + '"'); 35346 return fallback; 35347 } 35348 this.trackFeatureCheck(featureName, feature); 35349 return feature; 35350}; 35351$a44aab89caa44953$var$FeatureFlagManager.prototype.getVariantValue = function(featureName, fallbackValue) { 35352 return this.getVariant(featureName, { 35353 'value': fallbackValue 35354 }).then(function(feature) { 35355 return feature['value']; 35356 }).catch(function(error) { 35357 $a44aab89caa44953$var$logger.error(error); 35358 return fallbackValue; 35359 }); 35360}; 35361// TODO remove deprecated method 35362$a44aab89caa44953$var$FeatureFlagManager.prototype.getFeatureData = function(featureName, fallbackValue) { 35363 $a44aab89caa44953$var$logger.critical('mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value(
35363) instead.'); 35364 return this.getVariantValue(featureName, fallbackValue); 35365}; 35366$a44aab89caa44953$var$FeatureFlagManager.prototype.getVariantValueSync = function(featureName, fallbackValue) { 35367 return this.getVariantSync(featureName, { 35368 'value': fallbackValue 35369 })['value']; 35370}; 35371$a44aab89caa44953$var$FeatureFlagManager.prototype.isEnabled = function(featureName, fallbackValue) { 35372 return this.getVariantValue(featureName).then((function() { 35373 return this.isEnabledSync(featureName, fallbackValue); 35374 }).bind(this)).catch(function(error) { 35375 $a44aab89caa44953$var$logger.error(error); 35376 return fallbackValue; 35377 }); 35378}; 35379$a44aab89caa44953$var$FeatureFlagManager.prototype.isEnabledSync = function(featureName, fallbackValue) { 35380 fallbackValue = fallbackValue || false; 35381 var val = this.getVariantValueSync(featureName, fallbackValue); 35382 if (val !== true && val !== false) { 35383 $a44aab89caa44953$var$logger.error('Feature flag "' + featureName + '" value: ' + val + ' is not a boolean; returning fallback value: ' + fallbackValue); 35384 val = fallbackValue; 35385 } 35386 return val; 35387}; 35388$a44aab89caa44953$var$FeatureFlagManager.prototype.trackFeatureCheck = function(featureName, feature) { 35389 if (this.trackedFeatures.has(featureName)) return; 35390 this.trackedFeatures.add(featureName); 35391 this.track('$experiment_started', { 35392 'Experiment name': featureName, 35393 'Variant name': feature['key'], 35394 '$experiment_type': 'feature_flag', 35395 'Variant fetch start time': new Date(this._fetchStartTime).toISOString(), 35396 'Variant fetch complete time': new Date(this._fetchCompleteTime).toISOString(), 35397 'Variant fetch latency (ms)': this._fetchLatency 35398 }); 35399}; 35400function $a44aab89caa44953$var$minApisSupported() { 35401 return !!$a44aab89caa44953$var$fetch && typeof Promise !== 'undefined' && typeof Map !== 'undefined' && typeof Set !== 'undefined'; 35402} 35403$a44aab89caa44953$var$safewrapClass($a44aab89caa44953$var$FeatureFlagManager); 35404$a44aab89caa44953$var$FeatureFlagManager.prototype['are_flags_ready'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.areFlagsReady; 35405$a44aab89caa44953$var$FeatureFlagManager.prototype['get_variant'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.getVariant; 35406$a44aab89caa44953$var$FeatureFlagManager.prototype['get_variant_sync'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.getVariantSync; 35407$a44aab89caa44953$var$FeatureFlagManager.prototype['get_variant_value'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.getVariantValue; 35408$a44aab89caa44953$var$FeatureFlagManager.prototype['get_variant_value_sync'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.getVariantValueSync; 35409$a44aab89caa44953$var$FeatureFlagManager.prototype['is_enabled'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.isEnabled; 35410$a44aab89caa44953$var$FeatureFlagManager.prototype['is_enabled_sync'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.isEnabledSync; 35411$a44aab89caa44953$var$FeatureFlagManager.prototype['update_context'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.updateContext; 35412// Deprecated method 35413$a44aab89caa44953$var$FeatureFlagManager.prototype['get_feature_data'] = $a44aab89caa44953$var$FeatureFlagManager.prototype.getFeatureData; 35414/* eslint camelcase: "off" */ /** 35415 * DomTracker Object 35416 * @constructor 35417 */ var $a44aab89caa44953$var$DomTracker = function() {}; 35418// interface 35419$a44aab89caa44953$var$DomTracker.prototype.create_properties = function() {}; 35420$a44aab89caa44953$var$DomTracker.prototype.event_handler = function() {}; 35421$a44aab89caa44953$var$DomTracker.prototype.after_track_handler = function() {}; 35422$a44aab89caa44953$var$DomTracker.prototype.init = function(mixpanel_instance) { 35423 this.mp = mixpanel_instance; 35424 return this; 35425}; 35426/** 35427 * @param {Object|string} query 35428 * @param {string} event_name 35429 * @param {Object=} properties 35430 * @param {function=} user_callback 35431 */ $a44aab89caa44953$var$DomTracker.prototype.track = function(query, event_name, properties, user_callback) { 35432 var that = this; 35433 var elements = $a44aab89caa44953$var$_.dom_query(query); 35434 if (elements.length === 0) { 35435 $a44aab89caa44953$var$console$1.error('The DOM query (' + query + ') returned 0 elements'); 35436 return; 35437 } 35438 $a44aab89caa44953$var$_.each(elements, function(element) { 35439 $a44aab89caa44953$var$_.register_event(element, this.override_event, function(e) { 35440 var options = {}; 35441 var props = that.create_properties(properties, this); 35442 var timeout = that.mp.get_config('track_links_timeout'); 35443 that.event_handler(e, this, options); 35444 // in case the mixpanel servers don't get back to us in time 35445 window.setTimeout(that.track_callback(user_callback, props, options, true), timeout); 35446 // fire the tracking event 35447 that.mp.track(event_name, props, that.track_callback(user_callback, props, options)); 35448 }); 35449 }, this); 35450 return true; 35451}; 35452/** 35453 * @param {function} user_callback 35454 * @param {Object} props 35455 * @param {boolean=} timeout_occured 35456 */ $a44aab89caa44953$var$DomTracker.prototype.track_callback = function(user_callback, props, options, timeout_occured) { 35457 timeout_occured = timeout_occured || false; 35458 var that = this; 35459 return function() { 35460 // options is referenced from both callbacks, so we can have 35461 // a 'lock' of sorts to ensure only one fires 35462 if (options.callback_fired) return; 35463 options.callback_fired = true; 35464 if (user_callback && user_callback(timeout_occured, props) === false) // user can prevent the default functionality by 35465 // returning false from their callback 35466 return; 35467 that.after_track_handler(props, options, timeout_occured); 35468 }; 35469}; 35470$a44aab89caa44953$var$DomTracker.prototype.create_properties = function(properties, element) { 35471 var props; 35472 if (typeof properties === 'function') props = properties(element); 35473 else props = $a44aab89caa44953$var$_.extend({}, properties); 35474 return props; 35475}; 35476/** 35477 * LinkTracker Object 35478 * @constructor 35479 * @extends DomTracker 35480 */ var $a44aab89caa44953$var$LinkTracker = function() { 35481 this.override_event = 'click'; 35482}; 35483$a44aab89caa44953$var$_.inherit($a44aab89caa44953$var$LinkTracker, $a44aab89caa44953$var$DomTracker); 35484$a44aab89caa44953$var$LinkTracker.prototype.create_properties = function(properties, element) { 35485 var props = $a44aab89caa44953$var$LinkTracker.superclass.create_properties.apply(this, arguments); 35486 if (element.href) props['url'] = element.href; 35487 return props; 35488}; 35489$a44aab89caa44953$var$LinkTracker.prototype.event_handler = function(evt, element, options) { 35490 options.new_tab = evt.which === 2 || evt.metaKey || evt.ctrlKey || element.target === '_blank'; 35491 options.href = element.href; 35492 if (!options.new_tab) evt.preventDefault(); 35493}; 35494$a44aab89caa44953$var$LinkTracker.prototype.after_track_handler = function(props, options) { 35495 if (options.new_tab) return; 35496 setTimeout(function() { 35497 window.location = options.href; 35498 }, 0); 35499}; 35500/** 35501 * FormTracker Object 35502 * @constructor 35503 * @extends DomTracker 35504 */ var $a44aab89caa44953$var$FormTracker = function() { 35505 this.override_event = 'submit'; 35506}; 35507$a44aab89caa44953$var$_.inherit($a44aab89caa44953$var$FormTracker, $a44aab89caa44953$var$DomTracker); 35508$a44aab89caa44953$var$FormTracker.prototype.event_handler = function(evt, element, options) { 35509 options.element = element; 35510 evt.preventDefault(); 35511}; 35512$a44aab89caa44953$var$FormTracker.prototype.after_track_handler = function(props, options) { 35513 setTimeout(function() { 35514 options.element.submit(); 35515 }, 0); 35516}; 35517/* eslint camelcase: "off" */ /** @const */ var $a44aab89caa44953$var$SET_ACTION = '$set'; 35518/** @const */ var $a44aab89caa44953$var$SET_ONCE_ACTION = '$set_once'; 35519/** @const */ var $a44aab89caa44953$var$UNSET_ACTION = '$unset'; 35520/** @const */ var $a44aab89caa44953$var$ADD_ACTION = '$add';
vendor: 16,384 bytes, lines 35521-35890
35521/** @const */ var $a44aab89caa44953$var$APPEND_ACTION = '$append'; 35522/** @const */ var $a44aab89caa44953$var$UNION_ACTION = '$union'; 35523/** @const */ var $a44aab89caa44953$var$REMOVE_ACTION = '$remove'; 35524/** @const */ var $a44aab89caa44953$var$DELETE_ACTION = '$delete'; 35525// Common internal methods for mixpanel.people and mixpanel.group APIs. 35526// These methods shouldn't involve network I/O. 35527var $a44aab89caa44953$var$apiActions = { 35528 set_action: function(prop, to) { 35529 var data = {}; 35530 var $set = {}; 35531 if ($a44aab89caa44953$var$_.isObject(prop)) $a44aab89caa44953$var$_.each(prop, function(v, k) { 35532 if (!this._is_reserved_property(k)) $set[k] = v; 35533 }, this); 35534 else $set[prop] = to; 35535 data[$a44aab89caa44953$var$SET_ACTION] = $set; 35536 return data; 35537 }, 35538 unset_action: function(prop) { 35539 var data = {}; 35540 var $unset = []; 35541 if (!$a44aab89caa44953$var$_.isArray(prop)) prop = [ 35542 prop 35543 ]; 35544 $a44aab89caa44953$var$_.each(prop, function(k) { 35545 if (!this._is_reserved_property(k)) $unset.push(k); 35546 }, this); 35547 data[$a44aab89caa44953$var$UNSET_ACTION] = $unset; 35548 return data; 35549 }, 35550 set_once_action: function(prop, to) { 35551 var data = {}; 35552 var $set_once = {}; 35553 if ($a44aab89caa44953$var$_.isObject(prop)) $a44aab89caa44953$var$_.each(prop, function(v, k) { 35554 if (!this._is_reserved_property(k)) $set_once[k] = v; 35555 }, this); 35556 else $set_once[prop] = to; 35557 data[$a44aab89caa44953$var$SET_ONCE_ACTION] = $set_once; 35558 return data; 35559 }, 35560 union_action: function(list_name, values) { 35561 var data = {}; 35562 var $union = {}; 35563 if ($a44aab89caa44953$var$_.isObject(list_name)) $a44aab89caa44953$var$_.each(list_name, function(v, k) { 35564 if (!this._is_reserved_property(k)) $union[k] = $a44aab89caa44953$var$_.isArray(v) ? v : [ 35565 v 35566 ]; 35567 }, this); 35568 else $union[list_name] = $a44aab89caa44953$var$_.isArray(values) ? values : [ 35569 values 35570 ]; 35571 data[$a44aab89caa44953$var$UNION_ACTION] = $union; 35572 return data; 35573 }, 35574 append_action: function(list_name, value) { 35575 var data = {}; 35576 var $append = {}; 35577 if ($a44aab89caa44953$var$_.isObject(list_name)) $a44aab89caa44953$var$_.each(list_name, function(v, k) { 35578 if (!this._is_reserved_property(k)) $append[k] = v; 35579 }, this); 35580 else $append[list_name] = value; 35581 data[$a44aab89caa44953$var$APPEND_ACTION] = $append; 35582 return data; 35583 }, 35584 remove_action: function(list_name, value) { 35585 var data = {}; 35586 var $remove = {}; 35587 if ($a44aab89caa44953$var$_.isObject(list_name)) $a44aab89caa44953$var$_.each(list_name, function(v, k) { 35588 if (!this._is_reserved_property(k)) $remove[k] = v; 35589 }, this); 35590 else $remove[list_name] = value; 35591 data[$a44aab89caa44953$var$REMOVE_ACTION] = $remove; 35592 return data; 35593 }, 35594 delete_action: function() { 35595 var data = {}; 35596 data[$a44aab89caa44953$var$DELETE_ACTION] = ''; 35597 return data; 35598 } 35599}; 35600/* eslint camelcase: "off" */ /** 35601 * Mixpanel Group Object 35602 * @constructor 35603 */ var $a44aab89caa44953$var$MixpanelGroup = function() {}; 35604$a44aab89caa44953$var$_.extend($a44aab89caa44953$var$MixpanelGroup.prototype, $a44aab89caa44953$var$apiActions); 35605$a44aab89caa44953$var$MixpanelGroup.prototype._init = function(mixpanel_instance, group_key, group_id) { 35606 this._mixpanel = mixpanel_instance; 35607 this._group_key = group_key; 35608 this._group_id = group_id; 35609}; 35610/** 35611 * Set properties on a group. 35612 * 35613 * ### Usage: 35614 * 35615 * mixpanel.get_group('company', 'mixpanel').set('Location', '405 Howard'); 35616 * 35617 * // or set multiple properties at once 35618 * mixpanel.get_group('company', 'mixpanel').set({ 35619 * 'Location': '405 Howard', 35620 * 'Founded' : 2009, 35621 * }); 35622 * // properties can be strings, integers, dates, or lists 35623 * 35624 * @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values. 35625 * @param {*} [to] A value to set on the given property name 35626 * @param {Function} [callback] If provided, the callback will be called after the tracking event 35627 */ $a44aab89caa44953$var$MixpanelGroup.prototype.set = $a44aab89caa44953$var$addOptOutCheckMixpanelGroup(function(prop, to, callback) { 35628 var data = this.set_action(prop, to); 35629 if ($a44aab89caa44953$var$_.isObject(prop)) callback = to; 35630 return this._send_request(data, callback); 35631}); 35632/** 35633 * Set properties on a group, only if they do not yet exist. 35634 * This will not overwrite previous group property values, unlike 35635 * group.set(). 35636 * 35637 * ### Usage: 35638 * 35639 * mixpanel.get_group('company', 'mixpanel').set_once('Location', '405 Howard'); 35640 * 35641 * // or set multiple properties at once 35642 * mixpanel.get_group('company', 'mixpanel').set_once({ 35643 * 'Location': '405 Howard', 35644 * 'Founded' : 2009, 35645 * }); 35646 * // properties can be strings, integers, lists or dates 35647 * 35648 * @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values. 35649 * @param {*} [to] A value to set on the given property name 35650 * @param {Function} [callback] If provided, the callback will be called after the tracking event 35651 */ $a44aab89caa44953$var$MixpanelGroup.prototype.set_once = $a44aab89caa44953$var$addOptOutCheckMixpanelGroup(function(prop, to, callback) { 35652 var data = this.set_once_action(prop, to); 35653 if ($a44aab89caa44953$var$_.isObject(prop)) callback = to; 35654 return this._send_request(data, callback); 35655}); 35656/** 35657 * Unset properties on a group permanently. 35658 * 35659 * ### Usage: 35660 * 35661 * mixpanel.get_group('company', 'mixpanel').unset('Founded'); 35662 * 35663 * @param {String} prop The name of the property. 35664 * @param {Function} [callback] If provided, the callback will be called after the tracking event 35665 */ $a44aab89caa44953$var$MixpanelGroup.prototype.unset = $a44aab89caa44953$var$addOptOutCheckMixpanelGroup(function(prop, callback) { 35666 var data = this.unset_action(prop); 35667 return this._send_request(data, callback); 35668}); 35669/** 35670 * Merge a given list with a list-valued group property, excluding duplicate values. 35671 * 35672 * ### Usage: 35673 * 35674 * // merge a value to a list, creating it if needed 35675 * mixpanel.get_group('company', 'mixpanel').union('Location', ['San Francisco', 'London']); 35676 * 35677 * @param {String} list_name Name of the property. 35678 * @param {Array} values Values to merge with the given property 35679 * @param {Function} [callback] If provided, the callback will be called after the tracking event 35680 */ $a44aab89caa44953$var$MixpanelGroup.prototype.union = $a44aab89caa44953$var$addOptOutCheckMixpanelGroup(function(list_name, values, callback) { 35681 if ($a44aab89caa44953$var$_.isObject(list_name)) callback = values; 35682 var data = this.union_action(list_name, values); 35683 return this._send_request(data, callback); 35684}); 35685/** 35686 * Permanently delete a group. 35687 * 35688 * ### Usage: 35689 * 35690 * mixpanel.get_group('company', 'mixpanel').delete(); 35691 * 35692 * @param {Function} [callback] If provided, the callback will be called after the tracking event 35693 */ $a44aab89caa44953$var$MixpanelGroup.prototype['delete'] = $a44aab89caa44953$var$addOptOutCheckMixpanelGroup(function(callback) { 35694 // bracket notation above prevents a minification error related to reserved words 35695 var data = this.delete_action(); 35696 return this._send_request(data, callback); 35697}); 35698/** 35699 * Remove a property from a group. The value will be ignored if doesn't exist. 35700 * 35701 * ### Usage: 35702 * 35703 * mixpanel.get_group('company', 'mixpanel').remove('Location', 'London'); 35704 * 35705 * @param {String} list_name Name of the property. 35706 * @param {Object} value Value to remove from the given group property 35707 * @param {Function} [callback] If provided, the callback will be called after the tracking event 35708 */ $a44aab89caa44953$var$MixpanelGroup.prototype.remove = $a44aab89caa44953$var$addOptOutCheckMixpanelGroup(function(list_name, value, callback) { 35709 var data = this.remove_action(list_name, value); 35710 return this._send_request(data, callback); 35711}); 35712$a44aab89caa44953$var$MixpanelGroup.prototype._send_request = function(data, callback) { 35713 data['$group_key'] = this._group_key; 35714 data['$group_id'] = this._group_id; 35715 data['$token'] = this._get_config('token'); 35716 var date_encoded_data = $a44aab89caa44953$var$_.encodeDates(data); 35717 return this._mixpanel._track_or_batch({ 35718 type: 'groups', 35719 data: date_encoded_data, 35720 endpoint: this._mixpanel.get_api_host('groups') + '/' + this._get_config('api_routes')['groups'], 35721 batcher: this._mixpanel.request_batchers.groups 35722 }, callback); 35723}; 35724$a44aab89caa44953$var$MixpanelGroup.prototype._is_reserved_property = function(prop) { 35725 return prop === '$group_key' || prop === '$group_id'; 35726}; 35727$a44aab89caa44953$var$MixpanelGroup.prototype._get_config = function(conf) { 35728 return this._mixpanel.get_config(conf); 35729}; 35730$a44aab89caa44953$var$MixpanelGroup.prototype.toString = function() { 35731 return this._mixpanel.toString() + '.group.' + this._group_key + '.' + this._group_id; 35732}; 35733// MixpanelGroup Exports 35734$a44aab89caa44953$var$MixpanelGroup.prototype['remove'] = $a44aab89caa44953$var$MixpanelGroup.prototype.remove; 35735$a44aab89caa44953$var$MixpanelGroup.prototype['set'] = $a44aab89caa44953$var$MixpanelGroup.prototype.set; 35736$a44aab89caa44953$var$MixpanelGroup.prototype['set_once'] = $a44aab89caa44953$var$MixpanelGroup.prototype.set_once; 35737$a44aab89caa44953$var$MixpanelGroup.prototype['union'] = $a44aab89caa44953$var$MixpanelGroup.prototype.union; 35738$a44aab89caa44953$var$MixpanelGroup.prototype['unset'] = $a44aab89caa44953$var$MixpanelGroup.prototype.unset; 35739$a44aab89caa44953$var$MixpanelGroup.prototype['toString'] = $a44aab89caa44953$var$MixpanelGroup.prototype.toString; 35740/* eslint camelcase: "off" */ /** 35741 * Mixpanel People Object 35742 * @constructor 35743 */ var $a44aab89caa44953$var$MixpanelPeople = function() {}; 35744$a44aab89caa44953$var$_.extend($a44aab89caa44953$var$MixpanelPeople.prototype, $a44aab89caa44953$var$apiActions); 35745$a44aab89caa44953$var$MixpanelPeople.prototype._init = function(mixpanel_instance) { 35746 this._mixpanel = mixpanel_instance; 35747}; 35748/* 35749* Set properties on a user record. 35750* 35751* ### Usage: 35752* 35753* mixpanel.people.set('gender', 'm'); 35754* 35755* // or set multiple properties at once 35756* mixpanel.people.set({ 35757* 'Company': 'Acme', 35758* 'Plan': 'Premium', 35759* 'Upgrade date': new Date() 35760* }); 35761* // properties can be strings, integers, dates, or lists 35762* 35763* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values. 35764* @param {*} [to] A value to set on the given property name 35765* @param {Function} [callback] If provided, the callback will be called after tracking the event. 35766*/ $a44aab89caa44953$var$MixpanelPeople.prototype.set = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function(prop, to, callback) { 35767 var data = this.set_action(prop, to); 35768 if ($a44aab89caa44953$var$_.isObject(prop)) callback = to; 35769 // make sure that the referrer info has been updated and saved 35770 if (this._get_config('save_referrer')) this._mixpanel['persistence'].update_referrer_info(document.referrer); 35771 // update $set object with default people properties 35772 data[$a44aab89caa44953$var$SET_ACTION] = $a44aab89caa44953$var$_.extend({}, $a44aab89caa44953$var$_.info.people_properties(), data[$a44aab89caa44953$var$SET_ACTION]); 35773 return this._send_request(data, callback); 35774}); 35775/* 35776* Set properties on a user record, only if they do not yet exist. 35777* This will not overwrite previous people property values, unlike 35778* people.set(). 35779* 35780* ### Usage: 35781* 35782* mixpanel.people.set_once('First Login Date', new Date()); 35783* 35784* // or set multiple properties at once 35785* mixpanel.people.set_once({ 35786* 'First Login Date': new Date(), 35787* 'Starting Plan': 'Premium' 35788* }); 35789* 35790* // properties can be strings, integers or dates 35791* 35792* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values. 35793* @param {*} [to] A value to set on the given property name 35794* @param {Function} [callback] If provided, the callback will be called after tracking the event. 35795*/ $a44aab89caa44953$var$MixpanelPeople.prototype.set_once = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function(prop, to, callback) { 35796 var data = this.set_once_action(prop, to); 35797 if ($a44aab89caa44953$var$_.isObject(prop)) callback = to; 35798 return this._send_request(data, callback); 35799}); 35800/* 35801* Unset properties on a user record (permanently removes the properties and their values from a profile). 35802* 35803* ### Usage: 35804* 35805* mixpanel.people.unset('gender'); 35806* 35807* // or unset multiple properties at once 35808* mixpanel.people.unset(['gender', 'Company']); 35809* 35810* @param {Array|String} prop If a string, this is the name of the property. If an array, this is a list of property names. 35811* @param {Function} [callback] If provided, the callback will be called after tracking the event. 35812*/ $a44aab89caa44953$var$MixpanelPeople.prototype.unset = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function(prop, callback) { 35813 var data = this.unset_action(prop); 35814 return this._send_request(data, callback); 35815}); 35816/* 35817* Increment/decrement numeric people analytics properties. 35818* 35819* ### Usage: 35820* 35821* mixpanel.people.increment('page_views', 1); 35822* 35823* // or, for convenience, if you're just incrementing a counter by 35824* // 1, you can simply do 35825* mixpanel.people.increment('page_views'); 35826* 35827* // to decrement a counter, pass a negative number 35828* mixpanel.people.increment('credits_left', -1); 35829* 35830* // like mixpanel.people.set(), you can increment multiple 35831* // properties at once: 35832* mixpanel.people.increment({ 35833* counter1: 1, 35834* counter2: 6 35835* }); 35836* 35837* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and numeric values. 35838* @param {Number} [by] An amount to increment the given property 35839* @param {Function} [callback] If provided, the callback will be called after tracking the event. 35840*/ $a44aab89caa44953$var$MixpanelPeople.prototype.increment = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function(prop, by, callback) { 35841 var data = {}; 35842 var $add = {}; 35843 if ($a44aab89caa44953$var$_.isObject(prop)) { 35844 $a44aab89caa44953$var$_.each(prop, function(v, k) { 35845 if (!this._is_reserved_property(k)) { 35846 if (isNaN(parseFloat(v))) { 35847 $a44aab89caa44953$var$console$1.error('Invalid increment value passed to mixpanel.people.increment - must be a number'); 35848 return; 35849 } else $add[k] = v; 35850 } 35851 }, this); 35852 callback = by; 35853 } else { 35854 // convenience: mixpanel.people.increment('property'); will 35855 // increment 'property' by 1 35856 if ($a44aab89caa44953$var$_.isUndefined(by)) by = 1; 35857 $add[prop] = by; 35858 } 35859 data[$a44aab89caa44953$var$ADD_ACTION] = $add; 35860 return this._send_request(data, callback); 35861}); 35862/* 35863* Append a value to a list-valued people analytics property. 35864* 35865* ### Usage: 35866* 35867* // append a value to a list, creating it if needed 35868* mixpanel.people.append('pages_visited', 'homepage'); 35869* 35870* // like mixpanel.people.set(), you can append multiple 35871* // properties at once: 35872* mixpanel.people.append({ 35873* list1: 'bob', 35874* list2: 123 35875* }); 35876* 35877* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values. 35878* @param {*} [value] value An item to append to the list 35879* @param {Function} [callback] If provided, the callback will be called after tracking the event. 35880*/ $a44aab89caa44953$var$MixpanelPeople.prototype.append = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function(list_name, value, callback) { 35881 if ($a44aab89caa44953$var$_.isObject(list_name)) callback = value; 35882 var data = this.append_action(list_name, value); 35883 return this._send_request(data, callback); 35884}); 35885/* 35886* Remove a value from a list-valued people analytics property. 35887* 35888* ### Usage: 35889* 35890* mixpanel.people.remove('School', 'UCB
35890'); 35891* 35892* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values. 35893* @param {*} [value] value Item to remove from the list 35894* @param {Function} [callback] If provided, the callback will be called after tracking the event. 35895*/ $a44aab89caa44953$var$MixpanelPeople.prototype.remove = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function(list_name, value, callback) { 35896 if ($a44aab89caa44953$var$_.isObject(list_name)) callback = value; 35897 var data = this.remove_action(list_name, value); 35898 return this._send_request(data, callback); 35899}); 35900/* 35901* Merge a given list with a list-valued people analytics property, 35902* excluding duplicate values. 35903* 35904* ### Usage: 35905* 35906* // merge a value to a list, creating it if needed 35907* mixpanel.people.union('pages_visited', 'homepage'); 35908* 35909* // like mixpanel.people.set(), you can append multiple 35910* // properties at once: 35911* mixpanel.people.union({ 35912* list1: 'bob', 35913* list2: 123 35914* }); 35915* 35916* // like mixpanel.people.append(), you can append multiple 35917* // values to the same list: 35918* mixpanel.people.union({ 35919* list1: ['bob', 'billy'] 35920* }); 35921* 35922* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values. 35923* @param {*} [value] Value / values to merge with the given property 35924* @param {Function} [callback] If provided, the callback will be called after tracking the event. 35925*/ $a44aab89caa44953$var$MixpanelPeople.prototype.union = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function(list_name, values, callback) { 35926 if ($a44aab89caa44953$var$_.isObject(list_name)) callback = values; 35927 var data = this.union_action(list_name, values); 35928 return this._send_request(data, callback); 35929}); 35930/* 35931 * Record that you have charged the current user a certain amount
35932 * of money. Charges recorded with track_charge() will appear in the 35933 * Mixpanel revenue report. 35934 * 35935 * ### Usage: 35936 * 35937 * // charge a user $50 35938 * mixpanel.people.track_charge(50); 35939 * 35940 * // charge a user $30.50 on the 2nd of january 35941 * mixpanel.people.track_charge(30.50, { 35942 * '$time': new Date('jan 1 2012') 35943 * }); 35944 * 35945 * @param {Number} amount The amount of money charged to the current user 35946 * @param {Object} [properties] An associative array of properties associated with the charge 35947 * @param {Function} [callback] If provided, the callback will be called when the server responds 35948 * @deprecated 35949 */ $a44aab89caa44953$var$MixpanelPeople.prototype.track_charge = $a44aab89caa44953$var$addOptOutCheckMixpanelPeople(function() { 35950 $a44aab89caa44953$var$console$1.error('mixpanel.people.track_charge() is deprecated and no longer has any effect.'); 35951}); 35952/* 35953 * Permanently clear all revenue report transactions from the 35954 * current user's people analytics profile. 35955 * 35956 * ### Usage: 35957 * 35958 * mixpanel.people.clear_charges(); 35959 * 35960 * @param {Function} [callback] If provided, the callback will be called after tracking the event. 35961 * @deprecated 35962 */ $a44aab89caa44953$var$MixpanelPeople.prototype.clear_charges = function(callback) { 35963 return this.set('$transactions', [], callback); 35964}; 35965/* 35966* Permanently deletes the current people analytics profile from 35967* Mixpanel (using the current distinct_id). 35968* 35969* ### Usage: 35970* 35971* // remove the all data you have stored about the current user 35972* mixpanel.people.delete_user(); 35973* 35974*/ $a44aab89caa44953$var$MixpanelPeople.prototype.delete_user = function() { 35975 if (!this._identify_called()) { 35976 $a44aab89caa44953$var$console$1.error('mixpanel.people.delete_user() requires you to call identify() first'); 35977 return; 35978 } 35979 var data = { 35980 '$delete': this._mixpanel.get_distinct_id() 35981 }; 35982 return this._send_request(data); 35983}; 35984$a44aab89caa44953$var$MixpanelPeople.prototype.toString = function() { 35985 return this._mixpanel.toString() + '.people'; 35986}; 35987$a44aab89caa44953$var$MixpanelPeople.prototype._send_request = function(data, callback) { 35988 data['$token'] = this._get_config('token'); 35989 data['$distinct_id'] = this._mixpanel.get_distinct_id(); 35990 var device_id = this._mixpanel.get_property('$device_id'); 35991 var user_id = this._mixpanel.get_property('$user_id'); 35992 var had_persisted_distinct_id = this._mixpanel.get_property('$had_persisted_distinct_id'); 35993 if (device_id) data['$device_id'] = device_id; 35994 if (user_id) data['$user_id'] = user_id; 35995 if (had_persisted_distinct_id) data['$had_persisted_distinct_id'] = had_persisted_distinct_id; 35996 var date_encoded_data = $a44aab89caa44953$var$_.encodeDates(data); 35997 if (!this._identify_called()) { 35998 this._enqueue(data); 35999 if (!$a44aab89caa44953$var$_.isUndefined(callback)) { 36000 if (this._get_config('verbose')) callback({ 36001 status: -1, 36002 error: null 36003 }); 36004 else callback(-1); 36005 } 36006 return $a44aab89caa44953$var$_.truncate(date_encoded_data, 255); 36007 } 36008 return this._mixpanel._track_or_batch({ 36009 type: 'people', 36010 data: date_encoded_data, 36011 endpoint: this._mixpanel.get_api_host('people') + '/' + this._get_config('api_routes')['engage'], 36012 batcher: this._mixpanel.request_batchers.people 36013 }, callback); 36014}; 36015$a44aab89caa44953$var$MixpanelPeople.prototype._get_config = function(conf_var) { 36016 return this._mixpanel.get_config(conf_var); 36017}; 36018$a44aab89caa44953$var$MixpanelPeople.prototype._identify_called = function() { 36019 return this._mixpanel._flags.identify_called === true; 36020}; 36021// Queue up engage operations if identify hasn't been called yet. 36022$a44aab89caa44953$var$MixpanelPeople.prototype._enqueue = function(data) { 36023 if ($a44aab89caa44953$var$SET_ACTION in data) this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$SET_ACTION, data); 36024 else if ($a44aab89caa44953$var$SET_ONCE_ACTION in data) this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$SET_ONCE_ACTION, data); 36025 else if ($a44aab89caa44953$var$UNSET_ACTION in data) this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$UNSET_ACTION, data); 36026 else if ($a44aab89caa44953$var$ADD_ACTION in data) this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$ADD_ACTION, data); 36027 else if ($a44aab89caa44953$var$APPEND_ACTION in data) this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$APPEND_ACTION, data); 36028 else if ($a44aab89caa44953$var$REMOVE_ACTION in data) this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$REMOVE_ACTION, data); 36029 else if ($a44aab89caa44953$var$UNION_ACTION in data) this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$UNION_ACTION, data); 36030 else $a44aab89caa44953$var$console$1.error('Invalid call to _enqueue():', data); 36031}; 36032$a44aab89caa44953$var$MixpanelPeople.prototype._flush_one_queue = function(action, action_method, callback, queue_to_params_fn) { 36033 var _this = this; 36034 var queued_data = $a44aab89caa44953$var$_.extend({}, this._mixpanel['persistence'].load_queue(action)); 36035 var action_params = queued_data; 36036 if (!$a44aab89caa44953$var$_.isUndefined(queued_data) && $a44aab89caa44953$var$_.isObject(queued_data) && !$a44aab89caa44953$var$_.isEmptyObject(queued_data)) { 36037 _this._mixpanel['persistence']._pop_from_people_queue(action, queued_data); 36038 _this._mixpanel['persistence'].save(); 36039 if (queue_to_params_fn) action_params = queue_to_params_fn(queued_data); 36040 action_method.call(_this, action_params, function(response, data) { 36041 // on bad response, we want to add it back to the queue 36042 if (response === 0) _this._mixpanel['persistence']._add_to_people_queue(action, queued_data); 36043 if (!$a44aab89caa44953$var$_.isUndefined(callback)) callback(response, data); 36044 }); 36045 } 36046}; 36047// Flush queued engage operations - order does not matter, 36048// and there are network level race conditions anyway 36049$a44aab89caa44953$var$MixpanelPeople.prototype._flush = function(_set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback) { 36050 var _this = this; 36051 this._flush_one_queue($a44aab89caa44953$var$SET_ACTION, this.set, _set_callback); 36052 this._flush_one_queue($a44aab89caa44953$var$SET_ONCE_ACTION, this.set_once, _set_once_callback); 36053 this._flush_one_queue($a44aab89caa44953$var$UNSET_ACTION, this.unset, _unset_callback, function(queue) { 36054 return $a44aab89caa44953$var$_.keys(queue); 36055 }); 36056 this._flush_one_queue($a44aab89caa44953$var$ADD_ACTION, this.increment, _add_callback); 36057 this._flush_one_queue($a44aab89caa44953$var$UNION_ACTION, this.union, _union_callback); 36058 // we have to fire off each $append individually since there is 36059 // no concat method server side 36060 var $append_queue = this._mixpanel['persistence'].load_queue($a44aab89caa44953$var$APPEND_ACTION); 36061 if (!$a44aab89caa44953$var$_.isUndefined($append_queue) && $a44aab89caa44953$var$_.isArray($append_queue) && $append_queue.length) { 36062 var $append_item; 36063 var append_callback = function(response, data) { 36064 if (response === 0) _this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$APPEND_ACTION, $append_item); 36065 if (!$a44aab89caa44953$var$_.isUndefined(_append_callback)) _append_callback(response, data); 36066 }; 36067 for(var i = $append_queue.length - 1; i >= 0; i--){ 36068 $append_queue = this._mixpanel['persistence'].load_queue($a44aab89caa44953$var$APPEND_ACTION); 36069 $append_item = $append_queue.pop(); 36070 _this._mixpanel['persistence'].save(); 36071 if (!$a44aab89caa44953$var$_.isEmptyObject($append_item)) _this.append($append_item, append_callback); 36072 } 36073 } 36074 // same for $remove 36075 var $remove_queue = this._mixpanel['persistence'].load_queue($a44aab89caa44953$var$REMOVE_ACTION); 36076 if (!$a44aab89caa44953$var$_.isUndefined($remove_queue) && $a44aab89caa44953$var$_.isArray($remove_queue) && $remove_queue.length) { 36077 var $remove_item; 36078 var remove_callback = function(response, data) { 36079 if (response === 0) _this._mixpanel['persistence']._add_to_people_queue($a44aab89caa44953$var$REMOVE_ACTION, $remove_item); 36080 if (!$a44aab89caa44953$var$_.isUndefined(_remove_callback)) _remove_callback(response, data); 36081 }; 36082 for(var j = $remove_queue.length - 1; j >= 0; j--){ 36083 $remove_queue = this._mixpanel['persistence'].load_queue($a44aab89caa44953$var$REMOVE_ACTION); 36084 $remove_item = $remove_queue.pop(); 36085 _this._mixpanel['persistence'].save(); 36086 if (!$a44aab89caa44953$var$_.isEmptyObject($remove_item)) _this.remove($remove_item, remove_callback); 36087 } 36088 } 36089}; 36090$a44aab89caa44953$var$MixpanelPeople.prototype._is_reserved_property = function(prop) { 36091 return prop === '$distinct_id' || prop === '$token' || prop === '$device_id' || prop === '$user_id' || prop === '$had_persisted_distinct_id'; 36092}; 36093// MixpanelPeople Exports 36094$a44aab89caa44953$var$MixpanelPeople.prototype['set'] = $a44aab89caa44953$var$MixpanelPeople.prototype.set; 36095$a44aab89caa44953$var$MixpanelPeople.prototype['set_once'] = $a44aab89caa44953$var$MixpanelPeople.prototype.set_once; 36096$a44aab89caa44953$var$MixpanelPeople.prototype['unset'] = $a44aab89caa44953$var$MixpanelPeople.prototype.unset; 36097$a44aab89caa44953$var$MixpanelPeople.prototype['increment'] = $a44aab89caa44953$var$MixpanelPeople.prototype.increment; 36098$a44aab89caa44953$var$MixpanelPeople.prototype['append'] = $a44aab89caa44953$var$MixpanelPeople.prototype.append; 36099$a44aab89caa44953$var$MixpanelPeople.prototype['remove'] = $a44aab89caa44953$var$MixpanelPeople.prototype.remove; 36100$a44aab89caa44953$var$MixpanelPeople.prototype['union'] = $a44aab89caa44953$var$MixpanelPeople.prototype.union; 36101$a44aab89caa44953$var$MixpanelPeople.prototype['track_charge'] = $a44aab89caa44953$var$MixpanelPeople.prototype.track_charge; 36102$a44aab89caa44953$var$MixpanelPeople.prototype['clear_charges'] = $a44aab89caa44953$var$MixpanelPeople.prototype.clear_charges; 36103$a44aab89caa44953$var$MixpanelPeople.prototype['delete_user'] = $a44aab89caa44953$var$MixpanelPeople.prototype.delete_user; 36104$a44aab89caa44953$var$MixpanelPeople.prototype['toString'] = $a44aab89caa44953$var$MixpanelPeople.prototype.toString; 36105/* eslint camelcase: "off" */ /* 36106 * Constants 36107 */ /** @const */ var $a44aab89caa44953$var$SET_QUEUE_KEY = '__mps'; 36108/** @const */ var $a44aab89caa44953$var$SET_ONCE_QUEUE_KEY = '__mpso'; 36109/** @const */ var $a44aab89caa44953$var$UNSET_QUEUE_KEY = '__mpus'; 36110/** @const */ var $a44aab89caa44953$var$ADD_QUEUE_KEY = '__mpa'; 36111/** @const */ var $a44aab89caa44953$var$APPEND_QUEUE_KEY = '__mpap'; 36112/** @const */ var $a44aab89caa44953$var$REMOVE_QUEUE_KEY = '__mpr'; 36113/** @const */ var $a44aab89caa44953$var$UNION_QUEUE_KEY = '__mpu'; 36114// This key is deprecated, but we want to check for it to see whether aliasing is allowed. 36115/** @const */ var $a44aab89caa44953$var$PEOPLE_DISTINCT_ID_KEY = '$people_distinct_id'; 36116/** @const */ var $a44aab89caa44953$var$ALIAS_ID_KEY = '__alias'; 36117/** @const */ var $a44aab89caa44953$var$EVENT_TIMERS_KEY = '__timers'; 36118/** @const */ var $a44aab89caa44953$var$RESERVED_PROPERTIES = [ 36119 $a44aab89caa44953$var$SET_QUEUE_KEY, 36120 $a44aab89caa44953$var$SET_ONCE_QUEUE_KEY, 36121 $a44aab89caa44953$var$UNSET_QUEUE_KEY, 36122 $a44aab89caa44953$var$ADD_QUEUE_KEY, 36123 $a44aab89caa44953$var$APPEND_QUEUE_KEY, 36124 $a44aab89caa44953$var$REMOVE_QUEUE_KEY, 36125 $a44aab89caa44953$var$UNION_QUEUE_KEY, 36126 $a44aab89caa44953$var$PEOPLE_DISTINCT_ID_KEY, 36127 $a44aab89caa44953$var$ALIAS_ID_KEY, 36128 $a44aab89caa44953$var$EVENT_TIMERS_KEY 36129]; 36130/** 36131 * Mixpanel Persistence Object 36132 * @constructor 36133 */ var $a44aab89caa44953$var$MixpanelPersistence = function(config) { 36134 this['props'] = {}; 36135 this.campaign_params_saved = false;
36136 if (config['persistence_name']) this.name = 'mp_' + config['persistence_name']; 36137 else this.name = 'mp_' + config['token'] + '_mixpanel'; 36138 var storage_type = config['persistence']; 36139 if (storage_type !== 'cookie' && storage_type !== 'localStorage') { 36140 $a44aab89caa44953$var$console$1.critical('Unknown persistence type ' + storage_type + '; falling back to cookie'); 36141 storage_type = config['persistence'] = 'cookie'; 36142 } 36143 if (storage_type === 'localStorage' && $a44aab89caa44953$var$_.localStorage.is_supported()) this.storage = $a44aab89caa44953$var$_.localStorage; 36144 else this.storage = $a44aab89caa44953$var$_.cookie; 36145 this.load(); 36146 this.update_config(config); 36147 this.upgrade(); 36148 this.save(); 36149}; 36150$a44aab89caa44953$var$MixpanelPersistence.prototype.properties = function() { 36151 var p = {}; 36152 this.load(); 36153 // Filter out reserved properties 36154 $a44aab89caa44953$var$_.each(this['props'], function(v, k) { 36155 if (!$a44aab89caa44953$var$_.include($a44aab89caa44953$var$RESERVED_PROPERTIES, k)) p[k] = v; 36156 }); 36157 return p; 36158}; 36159$a44aab89caa44953$var$MixpanelPersistence.prototype.load = function() { 36160 if (this.disabled) return; 36161 var entry = this.storage.parse(this.name); 36162 if (entry) this['props'] = $a44aab89caa44953$var$_.extend({}, entry); 36163}; 36164$a44aab89caa44953$var$MixpanelPersistence.prototype.upgrade = function() { 36165 var old_cookie, old_localstorage; 36166 // if transferring from cookie to localStorage or vice-versa, copy existing 36167 // super properties over to new storage mode 36168 if (this.storage === $a44aab89caa44953$var$_.localStorage) { 36169 old_cookie = $a44aab89caa44953$var$_.cookie.parse(this.name); 36170 $a44aab89caa44953$var$_.cookie.remove(this.name); 36171 $a44aab89caa44953$var$_.cookie.remove(this.name, true); 36172 if (old_cookie) this.register_once(old_cookie); 36173 } else if (this.storage === $a44aab89caa44953$var$_.cookie) { 36174 old_localstorage = $a44aab89caa44953$var$_.localStorage.parse(this.name); 36175 $a44aab89caa44953$var$_.localStorage.remove(this.name); 36176 if (old_localstorage) this.register_once(old_localstorage); 36177 } 36178}; 36179$a44aab89caa44953$var$MixpanelPersistence.prototype.save = function() { 36180 if (this.disabled) return; 36181 this.storage.set(this.name, $a44aab89caa44953$var$JSONStringify(this['props']), this.expire_days, this.cross_subdomain, this.secure, this.cross_site, this.cookie_domain); 36182}; 36183$a44aab89caa44953$var$MixpanelPersistence.prototype.load_prop = function(key) { 36184 this.load(); 36185 return this['props'][key]; 36186}; 36187$a44aab89caa44953$var$MixpanelPersistence.prototype.remove = function() { 36188 // remove both domain and subdomain cookies 36189 this.storage.remove(this.name, false, this.cookie_domain); 36190 this.storage.remove(this.name, true, this.cookie_domain); 36191}; 36192// removes the storage entry and deletes all loaded data 36193// forced name for tests 36194$a44aab89caa44953$var$MixpanelPersistence.prototype.clear = function() { 36195 this.remove(); 36196 this['props'] = {}; 36197}; 36198/** 36199* @param {Object} props 36200* @param {*=} default_value 36201* @param {number=} days 36202*/ $a44aab89caa44953$var$MixpanelPersistence.prototype.register_once = function(props, default_value, days) { 36203 if ($a44aab89caa44953$var$_.isObject(props)) { 36204 if (typeof default_value === 'undefined') default_value = 'None'; 36205 this.expire_days = typeof days === 'undefined' ? this.default_expiry : days; 36206 this.load(); 36207 $a44aab89caa44953$var$_.each(props, function(val, prop) { 36208 if (!this['props'].hasOwnProperty(prop) || this['props'][prop] === default_value) this['props'][prop] = val; 36209 }, this); 36210 this.save(); 36211 return true; 36212 } 36213 return false; 36214}; 36215/** 36216* @param {Object} props 36217* @param {number=} days 36218*/ $a44aab89caa44953$var$MixpanelPersistence.prototype.register = function(props, days) { 36219 if ($a44aab89caa44953$var$_.isObject(props)) { 36220 this.expire_days = typeof days === 'undefined' ? this.default_expiry : days; 36221 this.load(); 36222 $a44aab89caa44953$var$_.extend(this['props'], props); 36223 this.save(); 36224 return true; 36225 } 36226 return false;
36227}; 36228$a44aab89caa44953$var$MixpanelPersistence.prototype.unregister = function(prop) { 36229 this.load(); 36230 if (prop in this['props']) { 36231 delete this['props'][prop]; 36232 this.save(); 36233 } 36234}; 36235$a44aab89caa44953$var$MixpanelPersistence.prototype.update_search_keyword = function(referrer) { 36236 this.register($a44aab89caa44953$var$_.info.searchInfo(referrer)); 36237}; 36238// EXPORTED METHOD, we test this directly. 36239$a44aab89caa44953$var$MixpanelPersistence.prototype.update_referrer_info = function(referrer) { 36240 // If referrer doesn't exist, we want to note the fact that it was type-in traffic. 36241 this.register_once({ 36242 '$initial_referrer': referrer || '$direct', 36243 '$initial_referring_domain': $a44aab89caa44953$var$_.info.referringDomain(referrer) || '$direct' 36244 }, ''); 36245}; 36246$a44aab89caa44953$var$MixpanelPersistence.prototype.get_referrer_info = function() { 36247 return $a44aab89caa44953$var$_.strip_empty_properties({ 36248 '$initial_referrer': this['props']['$initial_referrer'], 36249 '$initial_referring_domain': this['props']['$initial_referring_domain'] 36250 }); 36251}; 36252$a44aab89caa44953$var$MixpanelPersistence.prototype.update_config = function(config) { 36253 this.default_expiry = this.expire_days = config['cookie_expiration']; 36254 this.set_disabled(config['disable_persistence']); 36255 this.set_cookie_domain(config['cookie_domain']); 36256 this.set_cross_site(config['cross_site_cookie']); 36257 this.set_cross_subdomain(config['cross_subdomain_cookie']); 36258 this.set_secure(config['secure_cookie']); 36259}; 36260$a44aab89caa44953$var$MixpanelPersistence.prototype.set_disabled = function(disabled) { 36261 this.disabled = disabled; 36262 if (this.disabled) this.remove(); 36263 else this.save(); 36264}; 36265$a44aab89caa44953$var$MixpanelPersistence.prototype.set_cookie_domain = function(cookie_domain) { 36266 if (cookie_domain !== this.cookie_domain) { 36267 this.remove(); 36268 this.cookie_domain = cookie_domain; 36269 this.save(); 36270 } 36271}; 36272$a44aab89caa44953$var$MixpanelPersistence.prototype.set_cross_site = function(cross_site) { 36273 if (cross_site !== this.cross_site) { 36274 this.cross_site = cross_site; 36275 this.remove(); 36276 this.save(); 36277 } 36278}; 36279$a44aab89caa44953$var$MixpanelPersistence.prototype.set_cross_subdomain = function(cross_subdomain) { 36280 if (cross_subdomain !== this.cross_subdomain) { 36281 this.cross_subdomain = cross_subdomain; 36282 this.remove(); 36283 this.save(); 36284 } 36285}; 36286$a44aab89caa44953$var$MixpanelPersistence.prototype.get_cross_subdomain = function() { 36287 return this.cross_subdomain; 36288}; 36289$a44aab89caa44953$var$MixpanelPersistence.prototype.set_secure = function(secure) { 36290 if (secure !== this.secure) { 36291 this.secure = secure ? true : false; 36292 this.remove(); 36293 this.save(); 36294 } 36295}; 36296$a44aab89caa44953$var$MixpanelPersistence.prototype._add_to_people_queue = function(queue, data) { 36297 var q_key = this._get_queue_key(queue), q_data = data[queue], set_q = this._get_or_create_queue($a44aab89caa44953$var$SET_ACTION), set_once_q = this._get_or_create_queue($a44aab89caa44953$var$SET_ONCE_ACTION), unset_q = this._get_or_create_queue($a44aab89caa44953$var$UNSET_ACTION), add_q = this._get_or_create_queue($a44aab89caa44953$var$ADD_ACTION), union_q = this._get_or_create_queue($a44aab89caa44953$var$UNION_ACTION), remove_q = this._get_or_create_queue($a44aab89caa44953$var$REMOVE_ACTION, []), append_q = this._get_or_create_queue($a44aab89caa44953$var$APPEND_ACTION, []); 36298 if (q_key === $a44aab89caa44953$var$SET_QUEUE_KEY) { 36299 // Update the set queue - we can override any existing values 36300 $a44aab89caa44953$var$_.extend(set_q, q_data); 36301 // if there was a pending increment, override it 36302 // with the set. 36303 this._pop_from_people_queue($a44aab89caa44953$var$ADD_ACTION, q_data); 36304 // if there was a pending union, override it 36305 // with the set. 36306 this._pop_from_people_queue($a44aab89caa44953$var$UNION_ACTION, q_data); 36307 this._pop_from_people_queue($a44aab89caa44953$var$UNSET_ACTION, q_data); 36308 } else if (q_key === $a44aab89caa44953$var$SET_ONCE_QUEUE_KEY) { 36309 // only queue the data if there is not already a set_once call for it. 36310 $a44aab89caa44953$var$_.each(q_data, function(v, k) { 36311 if (!(k in set_once_q)) set_once_q[k] = v; 36312 }); 36313 this._pop_from_people_queue($a44aab89caa44953$var$UNSET_ACTION, q_data); 36314 } else if (q_key === $a44aab89caa44953$var$UNSET_QUEUE_KEY) $a44aab89caa44953$var$_.each(q_data, function(prop) { 36315 // undo previously-queued actions on this key 36316 $a44aab89caa44953$var$_.each([ 36317 set_q, 36318 set_once_q, 36319 add_q, 36320 union_q 36321 ], function(enqueued_obj) { 36322 if (prop in enqueued_obj) delete enqueued_obj[prop]; 36323 }); 36324 $a44aab89caa44953$var$_.each(append_q, function(append_obj) { 36325 if (prop in append_obj) delete append_obj[prop]; 36326 }); 36327 unset_q[prop] = true; 36328 }); 36329 else if (q_key === $a44aab89caa44953$var$ADD_QUEUE_KEY) { 36330 $a44aab89caa44953$var$_.each(q_data, function(v, k) { 36331 // If it exists in the set queue, increment 36332 // the value 36333 if (k in set_q) set_q[k] += v; 36334 else { 36335 // If it doesn't exist, update the add 36336 // queue 36337 if (!(k in add_q)) add_q[k] = 0; 36338 add_q[k] += v; 36339 } 36340 }, this); 36341 this._pop_from_people_queue($a44aab89caa44953$var$UNSET_ACTION, q_data); 36342 } else if (q_key === $a44aab89caa44953$var$UNION_QUEUE_KEY) { 36343 $a44aab89caa44953$var$_.each(q_data, function(v, k) { 36344 if ($a44aab89caa44953$var$_.isArray(v)) { 36345 if (!(k in union_q)) union_q[k] = []; 36346 // Prevent duplicate values 36347 $a44aab89caa44953$var$_.each(v, function(item) { 36348 if (!$a44aab89caa44953$var$_.include(union_q[k], item)) union_q[k].push(item); 36349 }); 36350 } 36351 }); 36352 this._pop_from_people_queue($a44aab89caa44953$var$UNSET_ACTION, q_data); 36353 } else if (q_key === $a44aab89caa44953$var$REMOVE_QUEUE_KEY) { 36354 remove_q.push(q_data); 36355 this._pop_from_people_queue($a44aab89caa44953$var$APPEND_ACTION, q_data); 36356 } else if (q_key === $a44aab89caa44953$var$APPEND_QUEUE_KEY) { 36357 append_q.push(q_data); 36358 this._pop_from_people_queue($a44aab89caa44953$var$UNSET_ACTION, q_data); 36359 } 36360 $a44aab89caa44953$var$console$1.log('MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):'); 36361 $a44aab89caa44953$var$console$1.log(data); 36362 this.save(); 36363}; 36364$a44aab89caa44953$var$MixpanelPersistence.prototype._pop_from_people_queue = function(queue, data) { 36365 var q = this['props'][this._get_queue_key(queue)]; 36366 if (!$a44aab89caa44953$var$_.isUndefined(q)) $a44aab89caa44953$var$_.each(data, function(v, k) { 36367 if (queue === $a44aab89caa44953$var$APPEND_ACTION || queue === $a44aab89caa44953$var$REMOVE_ACTION) // list actions: only remove if both k+v match 36368 // e.g. remove should not override append in a case like 36369 // append({foo: 'bar'}); remove({foo: 'qux'}) 36370 $a44aab89caa44953$var$_.each(q, function(queued_action) { 36371 if (queued_action[k] === v) delete queued_action[k]; 36372 }); 36373 else delete q[k]; 36374 }, this); 36375}; 36376$a44aab89caa44953$var$MixpanelPersistence.prototype.load_queue = function(queue) { 36377 return this.load_prop(this._get_queue_key(queue)); 36378}; 36379$a44aab89caa44953$var$MixpanelPersistence.prototype._get_queue_key = function(queue) { 36380 if (queue === $a44aab89caa44953$var$SET_ACTION) return $a44aab89caa44953$var$SET_QUEUE_KEY; 36381 else if (queue === $a44aab89caa44953$var$SET_ONCE_ACTION) return $a44aab89caa44953$var$SET_ONCE_QUEUE_KEY; 36382 else if (queue === $a44aab89caa44953$var$UNSET_ACTION) return $a44aab89caa44953$var$UNSET_QUEUE_KEY; 36383 else if (queue === $a44aab89caa44953$var$ADD_ACTION) return $a44aab89caa44953$var$ADD_QUEUE_KEY; 36384 else if (queue === $a44aab89caa44953$var$APPEND_ACTION) return $a44aab89caa44953$var$APPEND_QUEUE_KEY; 36385 else if (queue === $a44aab89caa44953$var$REMOVE_ACTION) return $a44aab89caa44953$var$REMOVE_QUEUE_KEY; 36386 else if (queue === $a44aab89caa44953$var$UNION_ACTION) return $a44aab89caa44953$var$UNION_QUEUE_KEY; 36387 else $a44aab89caa44953$var$console$1.error('Invalid queue:', queue); 36388}; 36389$a44aab89caa44953$var$MixpanelPersistence.prototype._get_or_create_queue = function(queue, default_val) { 36390 var key = this._get_queue_key(queue); 36391 default_val = $a44aab89caa44953$var$_.isUndefined(default_val) ? {} : default_val; 36392 return this['props'][key] || (this['props'][key] = default_val); 36393}; 36394$a44aab89caa44953$var$MixpanelPersistence.prototype.set_event_timer = function(event_name, timestamp) { 36395 var timers = this.load_prop($a44aab89caa44953$var$EVENT_TIMERS_KEY) || {}; 36396 timers[event_name] = timestamp; 36397 this['props'][$a44aab89caa44953$var$EVENT_TIMERS_KEY] = timers; 36398 this.save(); 36399}; 36400$a44aab89caa44953$var$MixpanelPersistence.prototype.remove_event_timer = function(event_name) { 36401 var timers = this.load_prop($a44aab89caa44953$var$EVENT_TIMERS_KEY) || {}; 36402 var timestamp = timers[event_name]; 36403 if (!$a44aab89caa44953$var$_.isUndefined(timestamp)) { 36404 delete this['props'][$a44aab89caa44953$var$EVENT_TIMERS_KEY][event_name]; 36405 this.save(); 36406 } 36407 return timestamp; 36408}; 36409/* eslint camelcase: "off" */ /* 36410 * Mixpanel JS Library 36411 * 36412 * Copyright 2012, Mixpanel, Inc. All Rights Reserved 36413 * http://mixpanel.com/ 36414 * 36415 * Includes portions of Underscore.js 36416 * http://documentcloud.github.com/underscore/ 36417 * (c) 2011 Jeremy Ashkenas, DocumentCloud Inc. 36418 * Released under the MIT License. 36419 */ /* 36420SIMPLE STYLE GUIDE: 36421 36422this.x === public function 36423this._x === internal - only use within this file 36424this.__x === private - only use within the class 36425 36426Globals should be all caps 36427*/ var $a44aab89caa44953$var$init_type; // MODULE or SNIPPET loader
36428// allow bundlers to specify how extra code (recorder bundle) should be loaded 36429// eslint-disable-next-line no-unused-vars 36430var $a44aab89caa44953$var$load_extra_bundle = function(src, _onload) { 36431 throw new Error(src + ' not available in this build.'); 36432}; 36433var $a44aab89caa44953$var$mixpanel_master; // main mixpanel instance / object 36434var $a44aab89caa44953$var$INIT_MODULE = 0; 36435var $a44aab89caa44953$var$INIT_SNIPPET = 1; 36436var $a44aab89caa44953$var$IDENTITY_FUNC = function(x) { 36437 return x; 36438}; 36439/** @const */ var $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME = 'mixpanel'; 36440/** @const */ var $a44aab89caa44953$var$PAYLOAD_TYPE_BASE64 = 'base64'; 36441/** @const */ var $a44aab89caa44953$var$PAYLOAD_TYPE_JSON = 'json'; 36442/** @const */ var $a44aab89caa44953$var$DEVICE_ID_PREFIX = '$device:'; 36443/* 36444 * Dynamic... constants? Is that an oxymoron? 36445 */ // http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/ 36446// https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#withCredentials 36447var $a44aab89caa44953$var$USE_XHR = $a44aab89caa44953$var$win.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest(); 36448// IE<10 does not support cross-origin XHR's but script tags 36449// with defer won't block window.onload; ENQUEUE_REQUESTS 36450// should only be true for Opera<12 36451var $a44aab89caa44953$var$ENQUEUE_REQUESTS = !$a44aab89caa44953$var$USE_XHR && $a44aab89caa44953$var$userAgent.indexOf('MSIE') === -1 && $a44aab89caa44953$var$userAgent.indexOf('Mozilla') === -1; 36452// save reference to navigator.sendBeacon so it can be minified 36453var $a44aab89caa44953$var$sendBeacon = null; 36454if ($a44aab89caa44953$var$navigator['sendBeacon']) $a44aab89caa44953$var$sendBeacon = function() { 36455 // late reference to navigator.sendBeacon to allow patching/spying 36456 return $a44aab89caa44953$var$navigator['sendBeacon'].apply($a44aab89caa44953$var$navigator, arguments); 36457}; 36458var $a44aab89caa44953$var$DEFAULT_API_ROUTES = { 36459 'track': 'track/', 36460 'engage': 'engage/', 36461 'groups': 'groups/', 36462 'record': 'record/', 36463 'flags': 'flags/' 36464}; 36465/* 36466 * Module-level globals 36467 */ var $a44aab89caa44953$var$DEFAULT_CONFIG = { 36468 'api_host': 'https://api-js.mixpanel.com', 36469 'api_hosts': {}, 36470 'api_routes': $a44aab89caa44953$var$DEFAULT_API_ROUTES, 36471 'api_extra_query_params': {}, 36472 'api_method': 'POST', 36473 'api_transport': 'XHR', 36474 'api_payload_format': $a44aab89caa44953$var$PAYLOAD_TYPE_BASE64, 36475 'app_host': 'https://mixpanel.com', 36476 'autocapture': false, 36477 'cdn': 'https://cdn.mxpnl.com', 36478 'cross_site_cookie': false, 36479 'cross_subdomain_cookie': true, 36480 'error_reporter': $a44aab89caa44953$var$NOOP_FUNC, 36481 'flags': false, 36482 'persistence': 'cookie', 36483 'persistence_name': '', 36484 'cookie_domain': '', 36485 'cookie_name': '', 36486 'loaded': $a44aab89caa44953$var$NOOP_FUNC, 36487 'mp_loader': null, 36488 'track_marketing': true, 36489 'track_pageview': false, 36490 'skip_first_touch_marketing': false, 36491 'store_google': true, 36492 'stop_utm_persistence': false, 36493 'save_referrer': true, 36494 'test': false, 36495 'verbose': false, 36496 'img': false, 36497 'debug': false, 36498 'track_links_timeout': 300, 36499 'cookie_expiration': 365, 36500 'upgrade': false, 36501 'disable_persistence': false, 36502 'disable_cookie': false, 36503 'secure_cookie': false, 36504 'ip': true, 36505 'opt_out_tracking_by_default': false, 36506 'opt_out_persistence_by_default': false, 36507 'opt_out_tracking_persistence_type': 'localStorage', 36508 'opt_out_tracking_cookie_prefix': null, 36509 'property_blacklist': [], 36510 'xhr_headers': {}, 36511 'ignore_dnt': false, 36512 'batch_requests': true, 36513 'batch_size': 50, 36514 'batch_flush_interval_ms': 5000, 36515 'batch_request_timeout_ms': 90000, 36516 'batch_autostart': true, 36517 'hooks': {}, 36518 'record_block_class': new RegExp('^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$'), 36519 'record_block_selector': 'img, video, audio', 36520 'record_canvas': false, 36521 'record_collect_fonts': false, 36522 'record_heatmap_data': false, 36523 'record_idle_timeout_ms': 1800000, 36524 'record_mask_text_class': new RegExp('^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$'), 36525 'record_mask_text_selector': '*', 36526 'record_max_ms': $a44aab89caa44953$var$MAX_RECORDING_MS, 36527 'record_min_ms': 0, 36528 'record_sessions_percent': 0, 36529 'recorder_src': 'https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js' 36530}; 36531var $a44aab89caa44953$var$DOM_LOADED = false;
36532/** 36533 * Mixpanel Library Object 36534 * @constructor 36535 */ var $a44aab89caa44953$var$MixpanelLib = function() {}; 36536/** 36537 * create_mplib(token:string, config:object, name:string) 36538 * 36539 * This function is used by the init method of MixpanelLib objects 36540 * as well as the main initializer at the end of the JSLib (that 36541 * initializes document.mixpanel as well as any additional instances 36542 * declared before this file has loaded). 36543 */ var $a44aab89caa44953$var$create_mplib = function(token, config, name) { 36544 var instance, target = name === $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME ? $a44aab89caa44953$var$mixpanel_master : $a44aab89caa44953$var$mixpanel_master[name]; 36545 if (target && $a44aab89caa44953$var$init_type === $a44aab89caa44953$var$INIT_MODULE) instance = target; 36546 else { 36547 if (target && !$a44aab89caa44953$var$_.isArray(target)) { 36548 $a44aab89caa44953$var$console$1.error('You have already initialized ' + name); 36549 return; 36550 } 36551 instance = new $a44aab89caa44953$var$MixpanelLib(); 36552 } 36553 instance._cached_groups = {}; // cache groups in a pool 36554 instance._init(token, config, name); 36555 instance['people'] = new $a44aab89caa44953$var$MixpanelPeople(); 36556 instance['people']._init(instance); 36557 if (!instance.get_config('skip_first_touch_marketing')) { 36558 // We need null UTM params in the object because 36559 // UTM parameters act as a tuple. If any UTM param 36560 // is present, then we set all UTM params including 36561 // empty ones together 36562 var utm_params = $a44aab89caa44953$var$_.info.campaignParams(null); 36563 var initial_utm_params = {}; 36564 var has_utm = false; 36565 $a44aab89caa44953$var$_.each(utm_params, function(utm_value, utm_key) { 36566 initial_utm_params['initial_' + utm_key] = utm_value; 36567 if (utm_value) has_utm = true; 36568 }); 36569 if (has_utm) instance['people'].set_once(initial_utm_params); 36570 } 36571 // if any instance on the page has debug = true, we set the 36572 // global debug to be true 36573 $a44aab89caa44953$var$Config.DEBUG = $a44aab89caa44953$var$Config.DEBUG || instance.get_config('debug'); 36574 // if target is not defined, we called init after the lib already 36575 // loaded, so there won't be an array of things to execute 36576 if (!$a44aab89caa44953$var$_.isUndefined(target) && $a44aab89caa44953$var$_.isArray(target)) { 36577 // Crunch through the people queue first - we queue this data up & 36578 // flush on identify, so it's better to do all these operations first 36579 instance._execute_array.call(instance['people'], target['people']); 36580 instance._execute_array(target); 36581 } 36582 return instance; 36583}; 36584// Initialization methods 36585/** 36586 * This function initializes a new instance of the Mixpanel tracking object. 36587 * All new instances are added to the main mixpanel object as sub properties (such as 36588 * mixpanel.library_name) and also returned by this function. To define a 36589 * second instance on the page, you would call: 36590 * 36591 * mixpanel.init('new token', { your: 'config' }, 'library_name'); 36592 * 36593 * and use it like so: 36594 * 36595 * mixpanel.library_name.track(...); 36596 * 36597 * @param {String} token Your Mixpanel API token 36598 * @param {Object} [config] A dictionary of config options to override. <a href="https://github.com/mixpanel/mixpanel-js/blob/v2.46.0/src/mixpanel-core.js#L88-L127">See a list of default config options</a>. 36599 * @param {String} [name] The name for the new mixpanel instance that you want created 36600 */ $a44aab89caa44953$var$MixpanelLib.prototype.init = function(token, config, name) { 36601 if ($a44aab89caa44953$var$_.isUndefined(name)) { 36602 this.report_error('You must name your new library: init(token, config, name)'); 36603 return; 36604 } 36605 if (name === $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME) { 36606 this.report_error('You must initialize the main mixpanel object right after you include the Mixpanel js snippet'); 36607 return; 36608 } 36609 var instance = $a44aab89caa44953$var$create_mplib(token, config, name); 36610 $a44aab89caa44953$var$mixpanel_master[name] = instance; 36611 instance._loaded(); 36612 return instance; 36613}; 36614// mixpanel._init(token:string, config:object, name:string) 36615// 36616// This function sets up the current instance of the mixpanel 36617// library. The difference between this method and the init(...) 36618// method is this one initializes the actual instance, whereas the 36619// init(...) method sets up a new library and calls _init on it. 36620// 36621$a44aab89caa44953$var$MixpanelLib.prototype._init = function(token, config, name) { 36622 config = config || {}; 36623 this['__loaded'] = true; 36624 this['config'] = {}; 36625 var variable_features = {}; 36626 // default to JSON payload for standard mixpanel.com API hosts 36627 if (!('api_payload_format' in config)) { 36628 var api_host = config['api_host'] || $a44aab89caa44953$var$DEFAULT_CONFIG['api_host']; 36629 if (api_host.match(/\.mixpanel\.com/)) variable_features['api_payload_format'] = $a44aab89caa44953$var$PAYLOAD_TYPE_JSON; 36630 } 36631 this.set_config($a44aab89caa44953$var$_.extend({}, $a44aab89caa44953$var$DEFAULT_CONFIG, variable_features, config, { 36632 'name': name, 36633 'token': token, 36634 'callback_fn': (name === $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME ? name : $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME + '.' + name) + '._jsc' 36635 })); 36636 this['_jsc'] = $a44aab89caa44953$var$NOOP_FUNC; 36637 this.__dom_loaded_queue = []; 36638 this.__request_queue = []; 36639 this.__disabled_events = []; 36640 this._flags = { 36641 'disable_all_events': false, 36642 'identify_called': false 36643 }; 36644 // set up request queueing/batching 36645 this.request_batchers = {}; 36646 this._batch_requests = this.get_config('batch_requests'); 36647 if (this._batch_requests) { 36648 if (!$a44aab89caa44953$var$_.localStorage.is_supported(true) || !$a44aab89caa44953$var$USE_XHR) { 36649 this._batch_requests = false;
36650 $a44aab89caa44953$var$console$1.log('Turning off Mixpanel request-queueing; needs XHR and localStorage support'); 36651 $a44aab89caa44953$var$_.each(this.get_batcher_configs(), function(batcher_config) { 36652 $a44aab89caa44953$var$console$1.log('Clearing batch queue ' + batcher_config.queue_key); 36653 $a44aab89caa44953$var$_.localStorage.remove(batcher_config.queue_key); 36654 }); 36655 } else { 36656 this.init_batchers(); 36657 if ($a44aab89caa44953$var$sendBeacon && $a44aab89caa44953$var$win.addEventListener) { 36658 // Before page closes or hides (user tabs away etc), attempt to flush any events 36659 // queued up via navigator.sendBeacon. Since sendBeacon doesn't report success/failure, 36660 // events will not be removed from the persistent store; if the site is loaded again, 36661 // the events will be flushed again on startup and deduplicated on the Mixpanel server 36662 // side. 36663 // There is no reliable way to capture only page close events, so we lean on the 36664 // visibilitychange and pagehide events as recommended at 36665 // https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event#usage_notes. 36666 // These events fire when the user clicks away from the current page/tab, so will occur 36667 // more frequently than page unload, but are the only mechanism currently for capturing 36668 // this scenario somewhat reliably. 36669 var flush_on_unload = $a44aab89caa44953$var$_.bind(function() { 36670 if (!this.request_batchers.events.stopped) this.request_batchers.events.flush({ 36671 unloading: true 36672 }); 36673 }, this); 36674 $a44aab89caa44953$var$win.addEventListener('pagehide', function(ev) { 36675 if (ev['persisted']) flush_on_unload(); 36676 }); 36677 $a44aab89caa44953$var$win.addEventListener('visibilitychange', function() { 36678 if ($a44aab89caa44953$var$document$1['visibilityState'] === 'hidden') flush_on_unload(); 36679 }); 36680 } 36681 } 36682 } 36683 this['persistence'] = this['cookie'] = new $a44aab89caa44953$var$MixpanelPersistence(this['config']); 36684 this.unpersisted_superprops = {}; 36685 this._gdpr_init(); 36686 var uuid = $a44aab89caa44953$var$_.UUID(); 36687 if (!this.get_distinct_id()) // There is no need to set the distinct id 36688 // or the device id if something was already stored 36689 // in the persitence 36690 this.register_once({ 36691 'distinct_id': $a44aab89caa44953$var$DEVICE_ID_PREFIX + uuid, 36692 '$device_id': uuid 36693 }, ''); 36694 this.flags = new $a44aab89caa44953$var$FeatureFlagManager({ 36695 getFullApiRoute: $a44aab89caa44953$var$_.bind(function() { 36696 return this.get_api_host('flags') + '/' + this.get_config('api_routes')['flags']; 36697 }, this), 36698 getConfigFunc: $a44aab89caa44953$var$_.bind(this.get_config, this), 36699 setConfigFunc: $a44aab89caa44953$var$_.bind(this.set_config, this), 36700 getPropertyFunc: $a44aab89caa44953$var$_.bind(this.get_property, this), 36701 trackingFunc: $a44aab89caa44953$var$_.bind(this.track, this) 36702 }); 36703 this.flags.init(); 36704 this['flags'] = this.flags; 36705 this.autocapture = new $a44aab89caa44953$var$Autocapture(this); 36706 this.autocapture.init(); 36707 this._init_tab_id(); 36708 this._check_and_start_session_recording(); 36709}; 36710/** 36711 * Assigns a unique UUID to this tab / window by leveraging sessionStorage. 36712 * This is primarily used for session recording, where data must be isolated to the current tab. 36713 */ $a44aab89caa44953$var$MixpanelLib.prototype._init_tab_id = function() { 36714 if (this.get_config('disable_persistence')) $a44aab89caa44953$var$console$1.log('Tab ID initialization skipped due to disable_persistence config'); 36715 else if ($a44aab89caa44953$var$_.sessionStorage.is_supported()) try { 36716 var key_suffix = this.get_config('name') + '_' + this.get_config('token'); 36717 var tab_id_key = 'mp_tab_id_' + key_suffix; 36718 // A flag is used to determine if sessionStorage is copied over and we need to generate a new tab ID. 36719 // This enforces a unique ID in the cases like duplicated tab, window.open(...) 36720 var should_generate_new_tab_id_key = 'mp_gen_new_tab_id_' + key_suffix; 36721 if ($a44aab89caa44953$var$_.sessionStorage.get(should_generate_new_tab_id_key) || !$a44aab89caa44953$var$_.sessionStorage.get(tab_id_key)) $a44aab89caa44953$var$_.sessionStorage.set(tab_id_key, '$tab-' + $a44aab89caa44953$var$_.UUID()); 36722 $a44aab89caa44953$var$_.sessionStorage.set(should_generate_new_tab_id_key, '1'); 36723 this.tab_id = $a44aab89caa44953$var$_.sessionStorage.get(tab_id_key); 36724 // Remove the flag when the tab is unloaded to indicate the stored tab ID can be reused. This event is not reliable to detect all page unloads, 36725 // but reliable in cases where the user remains in the tab e.g. a refresh or href navigation. 36726 // If the flag is absent, this indicates to the next SDK instance that we can reuse the stored tab_id. 36727 $a44aab89caa44953$var$win.addEventListener('beforeunload', function() { 36728 $a44aab89caa44953$var$_.sessionStorage.remove(should_generate_new_tab_id_key); 36729 }); 36730 } catch (err) { 36731 this.report_error('Error initializing tab id', err); 36732 } 36733 else this.report_error('Session storage is not supported, cannot keep track of unique tab ID.'); 36734}; 36735$a44aab89caa44953$var$MixpanelLib.prototype.get_tab_id = function() { 36736 return this.tab_id || null; 36737}; 36738$a44aab89caa44953$var$MixpanelLib.prototype._should_load_recorder = function() { 36739 if (this.get_config('disable_persistence')) { 36740 $a44aab89caa44953$var$console$1.log('Load recorder check skipped due to disable_persistence config'); 36741 return Promise.resolve(false); 36742 } 36743 var recording_registry_idb = new $a44aab89caa44953$var$IDBStorageWrapper($a44aab89caa44953$var$RECORDING_REGISTRY_STORE_NAME); 36744 var tab_id = this.get_tab_id(); 36745 return recording_registry_idb.init().then(function() { 36746 return recording_registry_idb.getAll(); 36747 }).then(function(recordings) { 36748 for(var i = 0; i < recordings.length; i++){ 36749 // if there are expired recordings in the registry, we should load the recorder to flush them
36750 // if there's a recording for this tab id, we should load the recorder to continue the recording 36751 if ($a44aab89caa44953$var$isRecordingExpired(recordings[i]) || recordings[i]['tabId'] === tab_id) return true; 36752 } 36753 return false; 36754 }).catch($a44aab89caa44953$var$_.bind(function(err) { 36755 this.report_error('Error checking recording registry', err); 36756 }, this)); 36757}; 36758$a44aab89caa44953$var$MixpanelLib.prototype._check_and_start_session_recording = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(force_start) { 36759 if (!$a44aab89caa44953$var$win['MutationObserver']) { 36760 $a44aab89caa44953$var$console$1.critical('Browser does not support MutationObserver; skipping session recording'); 36761 return; 36762 } 36763 var loadRecorder = $a44aab89caa44953$var$_.bind(function(startNewIfInactive) { 36764 var handleLoadedRecorder = $a44aab89caa44953$var$_.bind(function() { 36765 this._recorder = this._recorder || new $a44aab89caa44953$var$win['__mp_recorder'](this); 36766 this._recorder['resumeRecording'](startNewIfInactive); 36767 }, this); 36768 if ($a44aab89caa44953$var$_.isUndefined($a44aab89caa44953$var$win['__mp_recorder'])) $a44aab89caa44953$var$load_extra_bundle(this.get_config('recorder_src'), handleLoadedRecorder); 36769 else handleLoadedRecorder(); 36770 }, this); 36771 /** 36772 * If the user is sampled or start_session_recording is called, we always load the recorder since it's guaranteed a recording should start. 36773 * Otherwise, if the recording registry has any records then it's likely there's a recording in progress or orphaned data that needs to be flushed. 36774 */ var is_sampled = this.get_config('record_sessions_percent') > 0 && Math.random() * 100 <= this.get_config('record_sessions_percent'); 36775 if (force_start || is_sampled) loadRecorder(true); 36776 else this._should_load_recorder().then(function(shouldLoad) { 36777 if (shouldLoad) loadRecorder(false); 36778 }); 36779}); 36780$a44aab89caa44953$var$MixpanelLib.prototype.start_session_recording = function() { 36781 this._check_and_start_session_recording(true); 36782}; 36783$a44aab89caa44953$var$MixpanelLib.prototype.stop_session_recording = function() { 36784 if (this._recorder) return this._recorder['stopRecording'](); 36785 return Promise.resolve(); 36786}; 36787$a44aab89caa44953$var$MixpanelLib.prototype.pause_session_recording = function() { 36788 if (this._recorder) return this._recorder['pauseRecording'](); 36789 return Promise.resolve(); 36790}; 36791$a44aab89caa44953$var$MixpanelLib.prototype.resume_session_recording = function() { 36792 if (this._recorder) return this._recorder['resumeRecording'](); 36793 return Promise.resolve(); 36794}; 36795$a44aab89caa44953$var$MixpanelLib.prototype.is_recording_heatmap_data = function() { 36796 return this._get_session_replay_id() && this.get_config('record_heatmap_data'); 36797}; 36798$a44aab89caa44953$var$MixpanelLib.prototype.get_session_recording_properties = function() { 36799 var props = {}; 36800 var replay_id = this._get_session_replay_id(); 36801 if (replay_id) props['$mp_replay_id'] = replay_id; 36802 return props; 36803}; 36804$a44aab89caa44953$var$MixpanelLib.prototype.get_session_replay_url = function() { 36805 var replay_url = null; 36806 var replay_id = this._get_session_replay_id(); 36807 if (replay_id) { 36808 var query_params = $a44aab89caa44953$var$_.HTTPBuildQuery({ 36809 'replay_id': replay_id, 36810 'distinct_id': this.get_distinct_id(), 36811 'token': this.get_config('token') 36812 }); 36813 replay_url = 'https://mixpanel.com/projects/replay-redirect?' + query_params; 36814 } 36815 return replay_url; 36816}; 36817$a44aab89caa44953$var$MixpanelLib.prototype._get_session_replay_id = function() { 36818 var replay_id = null; 36819 if (this._recorder) replay_id = this._recorder['replayId']; 36820 return replay_id || null; 36821}; 36822// "private" public method to reach into the recorder in test cases 36823$a44aab89caa44953$var$MixpanelLib.prototype.__get_recorder = function() { 36824 return this._recorder; 36825}; 36826// Private methods 36827$a44aab89caa44953$var$MixpanelLib.prototype._loaded = function() { 36828 this.get_config('loaded')(this); 36829 this._set_default_superprops(); 36830 this['people'].set_once(this['persistence'].get_referrer_info()); 36831 // `store_google` is now deprecated and previously stored UTM parameters are cleared 36832 // from persistence by default. 36833 if (this.get_config('store_google') && this.get_config('stop_utm_persistence')) { 36834 var utm_params = $a44aab89caa44953$var$_.info.campaignParams(null); 36835 $a44aab89caa44953$var$_.each(utm_params, (function(_utm_value, utm_key) { 36836 // We need to unregister persisted UTM parameters so old values 36837 // are not mixed with the new UTM parameters 36838 this.unregister(utm_key); 36839 }).bind(this)); 36840 } 36841}; 36842// update persistence with info on referrer, UTM params, etc 36843$a44aab89caa44953$var$MixpanelLib.prototype._set_default_superprops = function() { 36844 this['persistence'].update_search_keyword($a44aab89caa44953$var$document$1.referrer); 36845 // Registering super properties for UTM persistence by 'store_google' is deprecated. 36846 if (this.get_config('store_google') && !this.get_config('stop_utm_persistence')) this.register($a44aab89caa44953$var$_.info.campaignParams()); 36847 if (this.get_config('save_referrer')) this['persistence'].update_referrer_info($a44aab89caa44953$var$document$1.referrer); 36848}; 36849$a44aab89caa44953$var$MixpanelLib.prototype._dom_loaded = function() { 36850 $a44aab89caa44953$var$_.each(this.__dom_loaded_queue, function(item) { 36851 this._track_dom.apply(this, item); 36852 }, this); 36853 if (!this.has_opted_out_tracking()) $a44aab89caa44953$var$_.each(this.__request_queue, function(item) { 36854 this._send_request.apply(this, item); 36855 }, this); 36856 delete this.__dom_loaded_queue; 36857 delete this.__request_queue; 36858}; 36859$a44aab89caa44953$var$MixpanelLib.prototype._track_dom = function(DomClass, args) { 36860 if (this.get_config('img')) { 36861 this.report_error('You can\'t use DOM tracking functions with img = true.'); 36862 return false;
36863 } 36864 if (!$a44aab89caa44953$var$DOM_LOADED) { 36865 this.__dom_loaded_queue.push([ 36866 DomClass, 36867 args 36868 ]); 36869 return false; 36870 } 36871 var dt = new DomClass().init(this); 36872 return dt.track.apply(dt, args); 36873}; 36874/** 36875 * _prepare_callback() should be called by callers of _send_request for use 36876 * as the callback argument. 36877 * 36878 * If there is no callback, this returns null. 36879 * If we are going to make XHR/XDR requests, this returns a function. 36880 * If we are going to use script tags, this returns a string to use as the 36881 * callback GET param. 36882 */ $a44aab89caa44953$var$MixpanelLib.prototype._prepare_callback = function(callback, data) { 36883 if ($a44aab89caa44953$var$_.isUndefined(callback)) return null; 36884 if ($a44aab89caa44953$var$USE_XHR) { 36885 var callback_function = function(response) { 36886 callback(response, data); 36887 }; 36888 return callback_function; 36889 } else { 36890 // if the user gives us a callback, we store as a random 36891 // property on this instances jsc function and update our 36892 // callback string to reflect that. 36893 var jsc = this['_jsc']; 36894 var randomized_cb = '' + Math.floor(Math.random() * 100000000); 36895 var callback_string = this.get_config('callback_fn') + '[' + randomized_cb + ']'; 36896 jsc[randomized_cb] = function(response) { 36897 delete jsc[randomized_cb]; 36898 callback(response, data); 36899 }; 36900 return callback_string; 36901 } 36902}; 36903$a44aab89caa44953$var$MixpanelLib.prototype._send_request = function(url, data, options, callback) { 36904 var succeeded = true; 36905 if ($a44aab89caa44953$var$ENQUEUE_REQUESTS) { 36906 this.__request_queue.push(arguments); 36907 return succeeded; 36908 } 36909 var DEFAULT_OPTIONS = { 36910 method: this.get_config('api_method'), 36911 transport: this.get_config('api_transport'), 36912 verbose: this.get_config('verbose') 36913 }; 36914 var body_data = null; 36915 if (!callback && ($a44aab89caa44953$var$_.isFunction(options) || typeof options === 'string')) { 36916 callback = options; 36917 options = null; 36918 } 36919 options = $a44aab89caa44953$var$_.extend(DEFAULT_OPTIONS, options || {}); 36920 if (!$a44aab89caa44953$var$USE_XHR) options.method = 'GET'; 36921 var use_post = options.method === 'POST'; 36922 var use_sendBeacon = $a44aab89caa44953$var$sendBeacon && use_post && options.transport.toLowerCase() === 'sendbeacon'; 36923 // needed to correctly format responses 36924 var verbose_mode = options.verbose; 36925 if (data['verbose']) verbose_mode = true; 36926 if (this.get_config('test')) data['test'] = 1; 36927 if (verbose_mode) data['verbose'] = 1; 36928 if (this.get_config('img')) data['img'] = 1; 36929 if (!$a44aab89caa44953$var$USE_XHR) { 36930 if (callback) data['callback'] = callback; 36931 else if (verbose_mode || this.get_config('test')) // Verbose output (from verbose mode, or an error in test mode) is a json blob, 36932 // which by itself is not valid javascript. Without a callback, this verbose output will 36933 // cause an error when returned via jsonp, so we force a no-op callback param. 36934 // See the ECMA script spec: http://www.ecma-international.org/ecma-262/5.1/#sec-12.4 36935 data['callback'] = '(function(){})'; 36936 } 36937 data['ip'] = this.get_config('ip') ? 1 : 0; 36938 data['_'] = new Date().getTime().toString(); 36939 if (use_post) { 36940 body_data = 'data=' + encodeURIComponent(data['data']); 36941 delete data['data']; 36942 } 36943 $a44aab89caa44953$var$_.extend(data, this.get_config('api_extra_query_params')); 36944 url += '?' + $a44aab89caa44953$var$_.HTTPBuildQuery(data); 36945 var lib = this; 36946 if ('img' in data) { 36947 var img = $a44aab89caa44953$var$document$1.createElement('img'); 36948 img.src = url; 36949 $a44aab89caa44953$var$document$1.body.appendChild(img); 36950 } else if (use_sendBeacon) { 36951 try { 36952 succeeded = $a44aab89caa44953$var$sendBeacon(url, body_data); 36953 } catch (e) { 36954 lib.report_error(e); 36955 succeeded = false; 36956 } 36957 try { 36958 if (callback) callback(succeeded ? 1 : 0); 36959 } catch (e) { 36960 lib.report_error(e); 36961 } 36962 } else if ($a44aab89caa44953$var$USE_XHR) try { 36963 var req = new XMLHttpRequest(); 36964 req.open(options.method, url, true); 36965 var headers = this.get_config('xhr_headers'); 36966 if (use_post) headers['Content-Type'] = 'application/x-www-form-urlencoded'; 36967 $a44aab89caa44953$var$_.each(headers, function(headerValue, headerName) { 36968 req.setRequestHeader(headerName, headerValue); 36969 }); 36970 if (options.timeout_ms && typeof req.timeout !== 'undefined') { 36971 req.timeout = options.timeout_ms; 36972 var start_time = new Date().getTime(); 36973 } 36974 // send the mp_optout cookie 36975 // withCredentials cannot be modified until after calling .open on Android and Mobile Safari 36976 req.withCredentials = true; 36977 req.onreadystatechange = function() { 36978 if (req.readyState === 4) { 36979 if (req.status === 200) { 36980 if (callback) { 36981 if (verbose_mode) { 36982 var response; 36983 try { 36984 response = $a44aab89caa44953$var$_.JSONDecode(req.responseText); 36985 } catch (e) { 36986 lib.report_error(e); 36987 if (options.ignore_json_errors) response = req.responseText; 36988 else return; 36989 } 36990 callback(response); 36991 } else callback(Number(req.responseText)); 36992 } 36993 } else { 36994 var error; 36995 if (req.timeout && !req.status && new Date().getTime() - start_time >= req.timeout) error = 'timeout'; 36996 else error = 'Bad HTTP status: ' + req.status + ' ' + req.statusText; 36997 lib.report_error(error); 36998 if (callback) { 36999 if (verbose_mode) { 37000 var response_headers = req['responseHeaders'] || {}; 37001 callback({ 37002 status: 0, 37003 httpStatusCode: req['status'], 37004 error: error, 37005 retryAfter: response_headers['Retry-After'] 37006 }); 37007 } else callback(0); 37008 } 37009 } 37010 } 37011 }; 37012 req.send(body_data); 37013 } catch (e) { 37014 lib.report_error(e); 37015 succeeded = false;
37016 } 37017 else { 37018 var script = $a44aab89caa44953$var$document$1.createElement('script'); 37019 script.type = 'text/javascript'; 37020 script.async = true; 37021 script.defer = true; 37022 script.src = url; 37023 var s = $a44aab89caa44953$var$document$1.getElementsByTagName('script')[0]; 37024 s.parentNode.insertBefore(script, s); 37025 } 37026 return succeeded; 37027}; 37028/** 37029 * _execute_array() deals with processing any mixpanel function 37030 * calls that were called before the Mixpanel library were loaded 37031 * (and are thus stored in an array so they can be called later) 37032 * 37033 * Note: we fire off all the mixpanel function calls && user defined 37034 * functions BEFORE we fire off mixpanel tracking calls. This is so 37035 * identify/register/set_config calls can properly modify early 37036 * tracking calls. 37037 * 37038 * @param {Array} array 37039 */ $a44aab89caa44953$var$MixpanelLib.prototype._execute_array = function(array) { 37040 var fn_name, alias_calls = [], other_calls = [], tracking_calls = []; 37041 $a44aab89caa44953$var$_.each(array, function(item) { 37042 if (item) { 37043 fn_name = item[0]; 37044 if ($a44aab89caa44953$var$_.isArray(fn_name)) tracking_calls.push(item); // chained call e.g. mixpanel.get_group().set() 37045 else if (typeof item === 'function') item.call(this); 37046 else if ($a44aab89caa44953$var$_.isArray(item) && fn_name === 'alias') alias_calls.push(item); 37047 else if ($a44aab89caa44953$var$_.isArray(item) && fn_name.indexOf('track') !== -1 && typeof this[fn_name] === 'function') tracking_calls.push(item); 37048 else other_calls.push(item); 37049 } 37050 }, this); 37051 var execute = function(calls, context) { 37052 $a44aab89caa44953$var$_.each(calls, function(item) { 37053 if ($a44aab89caa44953$var$_.isArray(item[0])) { 37054 // chained call 37055 var caller = context; 37056 $a44aab89caa44953$var$_.each(item, function(call) { 37057 caller = caller[call[0]].apply(caller, call.slice(1)); 37058 }); 37059 } else this[item[0]].apply(this, item.slice(1)); 37060 }, context); 37061 }; 37062 execute(alias_calls, this); 37063 execute(other_calls, this); 37064 execute(tracking_calls, this); 37065}; 37066// request queueing utils 37067$a44aab89caa44953$var$MixpanelLib.prototype.are_batchers_initialized = function() { 37068 return !!this.request_batchers.events; 37069}; 37070$a44aab89caa44953$var$MixpanelLib.prototype.get_batcher_configs = function() { 37071 var queue_prefix = '__mpq_' + this.get_config('token'); 37072 this._batcher_configs = this._batcher_configs || { 37073 events: { 37074 type: 'events', 37075 api_name: 'track', 37076 queue_key: queue_prefix + '_ev' 37077 }, 37078 people: { 37079 type: 'people', 37080 api_name: 'engage', 37081 queue_key: queue_prefix + '_pp' 37082 }, 37083 groups: { 37084 type: 'groups', 37085 api_name: 'groups', 37086 queue_key: queue_prefix + '_gr' 37087 } 37088 }; 37089 return this._batcher_configs; 37090}; 37091$a44aab89caa44953$var$MixpanelLib.prototype.init_batchers = function() { 37092 if (!this.are_batchers_initialized()) { 37093 var batcher_for = $a44aab89caa44953$var$_.bind(function(attrs) { 37094 return new $a44aab89caa44953$var$RequestBatcher(attrs.queue_key, { 37095 libConfig: this['config'], 37096 errorReporter: this.get_config('error_reporter'), 37097 sendRequestFunc: $a44aab89caa44953$var$_.bind(function(data, options, cb) { 37098 var api_routes = this.get_config('api_routes'); 37099 this._send_request(this.get_api_host(attrs.api_name) + '/' + api_routes[attrs.api_name], this._encode_data_for_request(data), options, this._prepare_callback(cb, data)); 37100 }, this), 37101 beforeSendHook: $a44aab89caa44953$var$_.bind(function(item) { 37102 return this._run_hook('before_send_' + attrs.type, item); 37103 }, this), 37104 stopAllBatchingFunc: $a44aab89caa44953$var$_.bind(this.stop_batch_senders, this), 37105 usePersistence: true 37106 }); 37107 }, this); 37108 var batcher_configs = this.get_batcher_configs(); 37109 this.request_batchers = { 37110 events: batcher_for(batcher_configs.events), 37111 people: batcher_for(batcher_configs.people), 37112 groups: batcher_for(batcher_configs.groups) 37113 }; 37114 } 37115 if (this.get_config('batch_autostart')) this.start_batch_senders(); 37116}; 37117$a44aab89caa44953$var$MixpanelLib.prototype.start_batch_senders = function() { 37118 this._batchers_were_started = true; 37119 if (this.are_batchers_initialized()) { 37120 this._batch_requests = true; 37121 $a44aab89caa44953$var$_.each(this.request_batchers, function(batcher) { 37122 batcher.start(); 37123 }); 37124 } 37125}; 37126$a44aab89caa44953$var$MixpanelLib.prototype.stop_batch_senders = function() { 37127 this._batch_requests = false;
37128 $a44aab89caa44953$var$_.each(this.request_batchers, function(batcher) { 37129 batcher.stop(); 37130 batcher.clear(); 37131 }); 37132}; 37133/** 37134 * push() keeps the standard async-array-push 37135 * behavior around after the lib is loaded. 37136 * This is only useful for external integrations that 37137 * do not wish to rely on our convenience methods 37138 * (created in the snippet). 37139 * 37140 * ### Usage: 37141 * mixpanel.push(['register', { a: 'b' }]); 37142 * 37143 * @param {Array} item A [function_name, args...] array to be executed 37144 */ $a44aab89caa44953$var$MixpanelLib.prototype.push = function(item) { 37145 this._execute_array([ 37146 item 37147 ]); 37148}; 37149/** 37150 * Disable events on the Mixpanel object. If passed no arguments, 37151 * this function disables tracking of any event. If passed an 37152 * array of event names, those events will be disabled, but other 37153 * events will continue to be tracked. 37154 * 37155 * Note: this function does not stop other mixpanel functions from 37156 * firing, such as register() or people.set(). 37157 * 37158 * @param {Array} [events] An array of event names to disable 37159 */ $a44aab89caa44953$var$MixpanelLib.prototype.disable = function(events) { 37160 if (typeof events === 'undefined') this._flags.disable_all_events = true; 37161 else this.__disabled_events = this.__disabled_events.concat(events); 37162}; 37163$a44aab89caa44953$var$MixpanelLib.prototype._encode_data_for_request = function(data) { 37164 var encoded_data = $a44aab89caa44953$var$JSONStringify(data); 37165 if (this.get_config('api_payload_format') === $a44aab89caa44953$var$PAYLOAD_TYPE_BASE64) encoded_data = $a44aab89caa44953$var$_.base64Encode(encoded_data); 37166 return { 37167 'data': encoded_data 37168 }; 37169}; 37170// internal method for handling track vs batch-enqueue logic 37171$a44aab89caa44953$var$MixpanelLib.prototype._track_or_batch = function(options, callback) { 37172 var truncated_data = $a44aab89caa44953$var$_.truncate(options.data, 255); 37173 var endpoint = options.endpoint; 37174 var batcher = options.batcher; 37175 var should_send_immediately = options.should_send_immediately; 37176 var send_request_options = options.send_request_options || {}; 37177 callback = callback || $a44aab89caa44953$var$NOOP_FUNC; 37178 var request_enqueued_or_initiated = true; 37179 var send_request_immediately = $a44aab89caa44953$var$_.bind(function() { 37180 if (!send_request_options.skip_hooks) truncated_data = this._run_hook('before_send_' + options.type, truncated_data); 37181 if (truncated_data) { 37182 $a44aab89caa44953$var$console$1.log('MIXPANEL REQUEST:'); 37183 $a44aab89caa44953$var$console$1.log(truncated_data); 37184 return this._send_request(endpoint, this._encode_data_for_request(truncated_data), send_request_options, this._prepare_callback(callback, truncated_data)); 37185 } else return null; 37186 }, this); 37187 if (this._batch_requests && !should_send_immediately) batcher.enqueue(truncated_data).then(function(succeeded) { 37188 if (succeeded) callback(1, truncated_data); 37189 else send_request_immediately(); 37190 }); 37191 else request_enqueued_or_initiated = send_request_immediately(); 37192 return request_enqueued_or_initiated && truncated_data; 37193}; 37194/** 37195 * Track an event. This is the most important and 37196 * frequently used Mixpanel function. 37197 * 37198 * ### Usage: 37199 * 37200 * // track an event named 'Registered' 37201 * mixpanel.track('Registered', {'Gender': 'Male', 'Age': 21}); 37202 * 37203 * // track an event using navigator.sendBeacon 37204 * mixpanel.track('Left page', {'duration_seconds': 35}, {transport: 'sendBeacon'}); 37205 * 37206 * To track link clicks or form submissions, see track_links() or track_forms(). 37207 * 37208 * @param {String} event_name The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc. 37209 * @param {Object} [properties] A set of properties to include with the event you're sending. These describe the user who did the event or details about the event itself. 37210 * @param {Object} [options] Optional configuration for this track request. 37211 * @param {String} [options.transport] Transport method for network request ('xhr' or 'sendBeacon'). 37212 * @param {Boolean} [options.send_immediately] Whether to bypass batching/queueing and send track request immediately. 37213 * @param {Function} [callback] If provided, the callback function will be called after tracking the event. 37214 * @returns {Boolean|Object} If the tracking request was successfully initiated/queued, an object 37215 * with the tracking payload sent to the API server is returned; otherwise false. 37216 */ $a44aab89caa44953$var$MixpanelLib.prototype.track = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(event_name, properties, options, callback) { 37217 if (!callback && typeof options === 'function') { 37218 callback = options; 37219 options = null; 37220 } 37221 options = options || {}; 37222 var transport = options['transport']; // external API, don't minify 'transport' prop 37223 if (transport) options.transport = transport;
37223 // 'transport' prop name can be minified internally 37224 var should_send_immediately = options['send_immediately']; 37225 if (typeof callback !== 'function') callback = $a44aab89caa44953$var$NOOP_FUNC; 37226 if ($a44aab89caa44953$var$_.isUndefined(event_name)) { 37227 this.report_error('No event name provided to mixpanel.track'); 37228 return; 37229 } 37230 if (this._event_is_disabled(event_name)) { 37231 callback(0); 37232 return; 37233 } 37234 // set defaults 37235 properties = $a44aab89caa44953$var$_.extend({}, properties); 37236 properties['token'] = this.get_config('token'); 37237 // set $duration if time_event was previously called for this event 37238 var start_timestamp = this['persistence'].remove_event_timer(event_name); 37239 if (!$a44aab89caa44953$var$_.isUndefined(start_timestamp)) { 37240 var duration_in_ms = new Date().getTime() - start_timestamp; 37241 properties['$duration'] = parseFloat((duration_in_ms / 1000).toFixed(3)); 37242 } 37243 this._set_default_superprops(); 37244 var marketing_properties = this.get_config('track_marketing') ? $a44aab89caa44953$var$_.info.marketingParams() : {}; 37245 // note: extend writes to the first object, so lets make sure we 37246 // don't write to the persistence properties object and info 37247 // properties object by passing in a new object 37248 // update properties with pageview info and super-properties 37249 properties = $a44aab89caa44953$var$_.extend({}, $a44aab89caa44953$var$_.info.properties({ 37250 'mp_loader': this.get_config('mp_loader') 37251 }), marketing_properties, this['persistence'].properties(), this.unpersisted_superprops, this.get_session_recording_properties(), properties); 37252 var property_blacklist = this.get_config('property_blacklist'); 37253 if ($a44aab89caa44953$var$_.isArray(property_blacklist)) $a44aab89caa44953$var$_.each(property_blacklist, function(blacklisted_prop) { 37254 delete properties[blacklisted_prop]; 37255 }); 37256 else this.report_error('Invalid value for property_blacklist config: ' + property_blacklist); 37257 var data = { 37258 'event': event_name, 37259 'properties': properties 37260 }; 37261 var ret = this._track_or_batch({ 37262 type: 'events', 37263 data: data, 37264 endpoint: this.get_api_host('events') + '/' + this.get_config('api_routes')['track'], 37265 batcher: this.request_batchers.events, 37266 should_send_immediately: should_send_immediately, 37267 send_request_options: options 37268 }, callback); 37269 return ret; 37270}); 37271/** 37272 * Register the current user into one/many groups. 37273 * 37274 * ### Usage: 37275 * 37276 * mixpanel.set_group('company', ['mixpanel', 'google']) // an array of IDs 37277 * mixpanel.set_group('company', 'mixpanel') 37278 * mixpanel.set_group('company', 128746312) 37279 * 37280 * @param {String} group_key Group key 37281 * @param {Array|String|Number} group_ids An array of group IDs, or a singular group ID 37282 * @param {Function} [callback] If provided, the callback will be called after tracking the event. 37283 * 37284 */ $a44aab89caa44953$var$MixpanelLib.prototype.set_group = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(group_key, group_ids, callback) { 37285 if (!$a44aab89caa44953$var$_.isArray(group_ids)) group_ids = [ 37286 group_ids 37287 ]; 37288 var prop = {}; 37289 prop[group_key] = group_ids; 37290 this.register(prop); 37291 return this['people'].set(group_key, group_ids, callback); 37292}); 37293/** 37294 * Add a new group for this user. 37295 * 37296 * ### Usage: 37297 * 37298 * mixpanel.add_group('company', 'mixpanel') 37299 * 37300 * @param {String} group_key Group key 37301 * @param {*} group_id A valid Mixpanel property type 37302 * @param {Function} [callback] If provided, the callback will be called after tracking the event. 37303 */ $a44aab89caa44953$var$MixpanelLib.prototype.add_group = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(group_key, group_id, callback) { 37304 var old_values = this.get_property(group_key); 37305 var prop = {}; 37306 if (old_values === undefined) { 37307 prop[group_key] = [ 37308 group_id 37309 ]; 37310 this.register(prop); 37311 } else if (old_values.indexOf(group_id) === -1) { 37312 old_values.push(group_id); 37313 prop[group_key] = old_values; 37314 this.register(prop); 37315 } 37316 return this['people'].union(group_key, group_id, callback); 37317}); 37318/** 37319 * Remove a group from this user. 37320 * 37321 * ### Usage: 37322 * 37323 * mixpanel.remove_group('company', 'mixpanel') 37324 * 37325 * @param {String} group_key Group key 37326 * @param {*} group_id A valid Mixpanel property type 37327 * @param {Function} [callback] If provided, the callback will be called after tracking the event. 37328 */ $a44aab89caa44953$var$MixpanelLib.prototype.remove_group = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(group_key, group_id, callback) { 37329 var old_value = this.get_property(group_key); 37330 // if the value doesn't exist, the persistent store is unchanged 37331 if (old_value !== undefined) { 37332 var idx = old_value.indexOf(group_id); 37333 if (idx > -1) { 37334 old_value.splice(idx, 1); 37335 this.register({ 37336 group_key: old_value 37337 }); 37338 } 37339 if (old_value.length === 0) this.unregister(group_key); 37340 } 37341 return this['people'].remove(group_key, group_id, callback); 37342}); 37343/** 37344 * Track an event with specific groups. 37345 * 37346 * ### Usage: 37347 * 37348 * mixpanel.track_with_groups('purchase', {'product': 'iphone'}, {'University': ['UCB', 'UCLA']}) 37349 * 37350 * @param {String} event_name The name of the event (see `mixpanel.track()`) 37351 * @param {Object=} properties A set of properties to include with the event you're sending (see `mixpanel.track()`) 37352 * @param {Object=} groups An object mapping group name keys to one or more values 37353 * @param {Function} [callback] If provided, the callback will be called after tracking the event. 37354 */ $a44aab89caa44953$var$MixpanelLib.prototype.track_with_groups = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(event_name, properties, groups, callback) { 37355 var tracking_props = $a44aab89caa44953$var$_.extend({}, properties || {}); 37356 $a44aab89caa44953$var$_.each(groups, function(v, k) { 37357 if (v !== null && v !== undefined) tracking_props[k] = v; 37358 }); 37359 return this.track(event_name, tracking_props, callback); 37360}); 37361$a44aab89caa44953$var$MixpanelLib.prototype._create_map_key = function(group_key, group_id) { 37362 return group_key + '_' + JSON.stringify(group_id); 37363}; 37364$a44aab89caa44953$var$MixpanelLib.prototype._remove_group_from_cache = function(group_key, group_id) { 37365 delete this._cached_groups[this._create_map_key(group_key, group_id)]; 37366}; 37367/** 37368 * Look up reference to a Mixpanel group 37369 * 37370 * ### Usage: 37371 * 37372 * mixpanel.get_group(group_key, group_id) 37373 * 37374 * @param {String} group_key Group key 37375 * @param {Object} group_id A valid Mixpanel property type 37376 * @returns {Object} A MixpanelGroup identifier 37377 */ $a44aab89caa44953$var$MixpanelLib.prototype.get_group = function(group_key, group_id) { 37378 var map_key = this._create_map_key(group_key, group_id); 37379 var group = this._cached_groups[map_key]; 37380 if (group === undefined || group._group_key !== group_key || group._group_id !== group_id) { 37381 group = new $a44aab89caa44953$var$MixpanelGroup(); 37382 group._init(this, group_key, group_id); 37383 this._cached_groups[map_key] = group; 37384 } 37385 return group; 37386}; 37387/** 37388 * Track a default Mixpanel page view event, which includes extra default event properties to 37389 * improve page view data. 37390 * 37391 * ### Usage: 37392 * 37393 * // track a default $mp_web_page_view event 37394 * mixpanel.track_pageview(); 37395 * 37396 * // track a page view event with additional event properties 37397 * mixpanel.track_pageview({'ab_test_variant': 'card-layout-b'}); 37398 * 37399 * // example approach to track page views on different page types as event properties 37400 * mixpanel.track_pageview({'page': 'pricing'}); 37401 * mixpanel.track_pageview({'page': 'homepage'}); 37402 * 37403 * // UNCOMMON: Tracking a page view event with a custom event_name option. NOT expected to be used for 37404 * // individual pages on the same site or product. Use cases for custom event_name may be page 37405 * // views on different products or internal applications that are considered completely separate 37406 * mixpanel.track_pageview({'page': 'customer-search'}
37406, {'event_name': '[internal] Admin Page View'}); 37407 * 37408 * ### Notes: 37409 * 37410 * The `config.track_pageview` option for <a href="#mixpanelinit">mixpanel.init()</a> 37411 * may be turned on for tracking page loads automatically. 37412 * 37413 * // track only page loads 37414 * mixpanel.init(PROJECT_TOKEN, {track_pageview: true}); 37415 * 37416 * // track when the URL changes in any manner 37417 * mixpanel.init(PROJECT_TOKEN, {track_pageview: 'full-url'}); 37418 * 37419 * // track when the URL changes, ignoring any changes in the hash part 37420 * mixpanel.init(PROJECT_TOKEN, {track_pageview: 'url-with-path-and-query-string'}); 37421 * 37422 * // track when the path changes, ignoring any query parameter or hash changes 37423 * mixpanel.init(PROJECT_TOKEN, {track_pageview: 'url-with-path'}); 37424 * 37425 * @param {Object} [properties] An optional set of additional properties to send with the page view event 37426 * @param {Object} [options] Page view tracking options 37427 * @param {String} [options.event_name] - Alternate name for the tracking event 37428 * @returns {Boolean|Object} If the tracking request was successfully initiated/queued, an object 37429 * with the tracking payload sent to the API server is returned; otherwise false. 37430 */ $a44aab89caa44953$var$MixpanelLib.prototype.track_pageview = $a44aab89caa44953$var$addOptOutCheckMixpanelLib(function(properties, options) { 37431 if (typeof properties !== 'object') properties = {}; 37432 options = options || {}; 37433 var event_name = options['event_name'] || '$mp_web_page_view'; 37434 var default_page_properties = $a44aab89caa44953$var$_.extend($a44aab89caa44953$var$_.info.mpPageViewProperties(), $a44aab89caa44953$var$_.info.campaignParams(), $a44aab89caa44953$var$_.info.clickParams()); 37435 var event_properties = $a44aab89caa44953$var$_.extend({}, default_page_properties, properties); 37436 return this.track(event_name, event_properties); 37437}); 37438/** 37439 * Track clicks on a set of document elements. Selector must be a 37440 * valid query. Elements must exist on the page at the time track_links is called. 37441 * 37442 * ### Usage: 37443 * 37444 * // track click for link id #nav 37445 * mixpanel.track_links('#nav', 'Clicked Nav Link'); 37446 * 37447 * ### Notes: 37448 * 37449 * This function will wait up to 300 ms for the Mixpanel 37450 * servers to respond. If they have not responded by that time 37451 * it will head to the link without ensuring that your event 37452 * has been tracked. To configure this timeout please see the 37453 * set_config() documentation below. 37454 * 37455 * If you pass a function in as the properties argument, the 37456 * function will receive the DOMElement that triggered the 37457 * event as an argument. You are expected to return an object 37458 * from the function; any properties defined on this object 37459 * will be sent to mixpanel as event properties. 37460 * 37461 * @type {Function} 37462 * @param {Object|String} query A valid DOM query, element or jQuery-esque list 37463 * @param {String} event_name The name of the event to track 37464 * @param {Object|Function} [properties] A properties object or function that returns a dictionary of properties when passed a DOMElement 37465 */ $a44aab89caa44953$var$MixpanelLib.prototype.track_links = function() { 37466 return this._track_dom.call(this, $a44aab89caa44953$var$LinkTracker, arguments); 37467}; 37468/** 37469 * Track form submissions. Selector must be a valid query. 37470 * 37471 * ### Usage: 37472 * 37473 * // track submission for form id 'register' 37474 * mixpanel.track_forms('#register', 'Created Account'); 37475 * 37476 * ### Notes: 37477 * 37478 * This function will wait up to 300 ms for the mixpanel 37479 * servers to respond, if they have not responded by that time 37480 * it will head to the link without ensuring that your event 37481 * has been tracked. To configure this timeout please see the 37482 * set_config() documentation below. 37483 * 37484 * If you pass a function in as the properties argument, the 37485 * function will receive the DOMElement that triggered the 37486 * event as an argument. You are expected to return an object 37487 * from the function; any properties defined on this object 37488 * will be sent to mixpanel as event properties. 37489 * 37490 * @type {Function} 37491 * @param {Object|String} query A valid DOM query, element or jQuery-esque list 37492 * @param {String} event_name The name of the event to track 37493 * @param {Object|Function} [properties] This can be a set of properties, or a function that returns a set of properties after being passed a DOMElement 37494 */ $a44aab89caa44953$var$MixpanelLib.prototype.track_forms = function() { 37495 return this._track_dom.call(this, $a44aab89caa44953$var$FormTracker, arguments); 37496}; 37497/** 37498 * Time an event by including the time between this call and a
37499 * later 'track' call for the same event in the properties sent 37500 * with the event. 37501 * 37502 * ### Usage: 37503 * 37504 * // time an event named 'Registered' 37505 * mixpanel.time_event('Registered'); 37506 * mixpanel.track('Registered', {'Gender': 'Male', 'Age': 21}); 37507 * 37508 * When called for a particular event name, the next track call for that event 37509 * name will include the elapsed time between the 'time_event' and 'track' 37510 * calls. This value is stored as seconds in the '$duration' property. 37511 * 37512 * @param {String} event_name The name of the event. 37513 */ $a44aab89caa44953$var$MixpanelLib.prototype.time_event = function(event_name) { 37514 if ($a44aab89caa44953$var$_.isUndefined(event_name)) { 37515 this.report_error('No event name provided to mixpanel.time_event'); 37516 return; 37517 } 37518 if (this._event_is_disabled(event_name)) return; 37519 this['persistence'].set_event_timer(event_name, new Date().getTime()); 37520}; 37521var $a44aab89caa44953$var$REGISTER_DEFAULTS = { 37522 'persistent': true 37523}; 37524/** 37525 * Helper to parse options param for register methods, maintaining 37526 * legacy support for plain "days" param instead of options object 37527 * @param {Number|Object} [days_or_options] 'days' option (Number), or Options object for register methods 37528 * @returns {Object} options object 37529 */ var $a44aab89caa44953$var$options_for_register = function(days_or_options) { 37530 var options; 37531 if ($a44aab89caa44953$var$_.isObject(days_or_options)) options = days_or_options; 37532 else if (!$a44aab89caa44953$var$_.isUndefined(days_or_options)) options = { 37533 'days': days_or_options 37534 }; 37535 else options = {}; 37536 return $a44aab89caa44953$var$_.extend({}, $a44aab89caa44953$var$REGISTER_DEFAULTS, options); 37537}; 37538/** 37539 * Register a set of super properties, which are included with all 37540 * events. This will overwrite previous super property values. 37541 * 37542 * ### Usage: 37543 * 37544 * // register 'Gender' as a super property 37545 * mixpanel.register({'Gender': 'Female'}); 37546 * 37547 * // register several super properties when a user signs up 37548 * mixpanel.register({ 37549 * 'Email': '[email protected]', 37550 * 'Account Type': 'Free' 37551 * }); 37552 * 37553 * // register only for the current pageload 37554 * mixpanel.register({'Name': 'Pat'}, {persistent: false}); 37555 * 37556 * @param {Object} properties An associative array of properties to store about the user 37557 * @param {Number|Object} [days_or_options] Options object or number of days since the user's last visit to store the super properties (only valid for persisted props) 37558 * @param {boolean} [days_or_options.days] - number of days since the user's last visit to store the super properties (only valid for persisted props) 37559 * @param {boolean} [days_or_options.persistent=true] - whether to put in persistent storage (cookie/localStorage) 37560 */ $a44aab89caa44953$var$MixpanelLib.prototype.register = function(props, days_or_options) { 37561 var options = $a44aab89caa44953$var$options_for_register(days_or_options); 37562 if (options['persistent']) this['persistence'].register(props, options['days']); 37563 else $a44aab89caa44953$var$_.extend(this.unpersisted_superprops, props); 37564}; 37565/** 37566 * Register a set of super properties only once. This will not 37567 * overwrite previous super property values, unlike register(). 37568 * 37569 * ### Usage: 37570 * 37571 * // register a super property for the first time only 37572 * mixpanel.register_once({ 37573 * 'First Login Date': new Date().toISOString() 37574 * }); 37575 * 37576 * // register once, only for the current pageload 37577 * mixpanel.register_once({ 37578 * 'First interaction time': new Date().toISOString() 37579 * }, 'None', {persistent: false}); 37580 * 37581 * ### Notes: 37582 * 37583 * If default_value is specified, current super properties 37584 * with that value will be overwritten. 37585 * 37586 * @param {Object} properties An associative array of properties to store about the user 37587 * @param {*} [default_value] Value to override if already set in super properties (ex: 'False') Default: 'None' 37588 * @param {Number|Object} [days_or_options] Options object or number of days since the user's last visit to store the super properties (only valid for persisted props) 37589 * @param {boolean} [days_or_options.days] - number of days since the user's last visit to store the super properties (only valid for persisted props) 37590 * @param {boolean} [days_or_options.persistent=true] - whether to put in persistent storage (cookie/localStorage) 37591 */ $a44aab89caa44953$var$MixpanelLib.prototype.register_once = function(props, default_value, days_or_options) { 37592 var options = $a44aab89caa44953$var$options_for_register(days_or_options); 37593 if (options['persistent']) this['persistence'].register_once(props, default_value, options['days']); 37594 else { 37595 if (typeof default_value === 'undefined') default_value = 'None'; 37596 $a44aab89caa44953$var$_.each(props, function(val, prop) { 37597 if (!this.unpersisted_superprops.hasOwnProperty(prop) || this.unpersisted_superprops[prop] === default_value) this.unpersisted_superprops[prop] = val; 37598 }, this); 37599 } 37600}; 37601/** 37602 * Delete a super property stored with the current user. 37603 * 37604 * @param {String} property The name of the super property to remove 37605 * @param {Object} [options] 37606 * @param {boolean} [options.persistent=true] - whether to look in persistent storage (cookie/localStorage) 37607 */ $a44aab89caa44953$var$MixpanelLib.prototype.unregister = function(property, options) { 37608 options = $a44aab89caa44953$var$options_for_register(options); 37609 if (options['persistent']) this['persistence'].unregister(property); 37610 else delete this.unpersisted_superprops[property]; 37611}; 37612$a44aab89caa44953$var$MixpanelLib.prototype._register_single = function(prop, value) { 37613 var props = {}; 37614 props[prop] = value; 37615 this.register(props); 37616}; 37617/** 37618 * Identify a user with a unique ID to track user activity across 37619 * devices, tie a user to their events, and create a user profile. 37620 * If you never call this method, unique visitors are tracked using 37621 * a UUID generated the first time they visit the site. 37622 * 37623 * Call identify when you know the identity of the current user, 37624 * typically after login or signup. We recommend against using 37625 * identify for anonymous visitors to your site. 37626 * 37627 * ### Notes: 37628 * If your project has 37629 * <a href="https://help.mixpanel.com/hc/en-us/articles/360039133851">ID Merge</a> 37630 * enabled, the identify method will connect pre- and 37631 * post-authentication events when appropriate. 37632 * 37633 * If your project does not have ID Merge enabled, identify will 37634 * change the user's local distinct_id to the unique ID you pass. 37635 * Events tracked prior to authentication will not be connected 37636 * to the same user identity. If ID Merge is disabled, alias can 37637 * be used to connect pre- and post-registration events. 37638 * 37639 * @param {String} [unique_id] A string that uniquely identifies a user. If not provided, the distinct_id currently in the persistent store (cookie or localStorage) will be used. 37640 */ $a44aab89caa44953$var$MixpanelLib.prototype.identify = function(new_distinct_id, _set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback) { 37641 // Optional Parameters
vendor: 4,721 bytes, lines 37642-37743
37642 // _set_callback:function A callback to be run if and when the People set queue is flushed 37643 // _add_callback:function A callback to be run if and when the People add queue is flushed 37644 // _append_callback:function A callback to be run if and when the People append queue is flushed 37645 // _set_once_callback:function A callback to be run if and when the People set_once queue is flushed 37646 // _union_callback:function A callback to be run if and when the People union queue is flushed 37647 // _unset_callback:function A callback to be run if and when the People unset queue is flushed 37648 var previous_distinct_id = this.get_distinct_id(); 37649 if (new_distinct_id && previous_distinct_id !== new_distinct_id) { 37650 // we allow the following condition if previous distinct_id is same as new_distinct_id 37651 // so that you can force flush people updates for anonymous profiles. 37652 if (typeof new_distinct_id === 'string' && new_distinct_id.indexOf($a44aab89caa44953$var$DEVICE_ID_PREFIX) === 0) { 37653 this.report_error('distinct_id cannot have $device: prefix'); 37654 return -1; 37655 } 37656 this.register({ 37657 '$user_id': new_distinct_id 37658 }); 37659 } 37660 if (!this.get_property('$device_id')) { 37661 // The persisted distinct id might not actually be a device id at all 37662 // it might be a distinct id of the user from before 37663 var device_id = previous_distinct_id; 37664 this.register_once({ 37665 '$had_persisted_distinct_id': true, 37666 '$device_id': device_id 37667 }, ''); 37668 } 37669 // identify only changes the distinct id if it doesn't match either the existing or the alias; 37670 // if it's new, blow away the alias as well. 37671 if (new_distinct_id !== previous_distinct_id && new_distinct_id !== this.get_property($a44aab89caa44953$var$ALIAS_ID_KEY)) { 37672 this.unregister($a44aab89caa44953$var$ALIAS_ID_KEY); 37673 this.register({ 37674 'distinct_id': new_distinct_id 37675 }); 37676 } 37677 this._flags.identify_called = true; 37678 // Flush any queued up people requests 37679 this['people']._flush(_set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback); 37680 // send an $identify event any time the distinct_id is changing - logic on the server 37681 // will determine whether or not to do anything with it. 37682 if (new_distinct_id !== previous_distinct_id) this.track('$identify', { 37683 'distinct_id': new_distinct_id, 37684 '$anon_distinct_id': previous_distinct_id 37685 }, { 37686 skip_hooks: true 37687 }); 37688 // check feature flags again if distinct id has changed 37689 if (new_distinct_id !== previous_distinct_id) this.flags.fetchFlags(); 37690}; 37691/** 37692 * Clears super properties and generates a new random distinct_id for this instance. 37693 * Useful for clearing data when a user logs out. 37694 */ $a44aab89caa44953$var$MixpanelLib.prototype.reset = function() { 37695 this.stop_session_recording(); 37696 this['persistence'].clear(); 37697 this._flags.identify_called = false; 37698 var uuid = $a44aab89caa44953$var$_.UUID(); 37699 this.register_once({ 37700 'distinct_id': $a44aab89caa44953$var$DEVICE_ID_PREFIX + uuid, 37701 '$device_id': uuid 37702 }, ''); 37703 this._check_and_start_session_recording(); 37704}; 37705/** 37706 * Returns the current distinct id of the user. This is either the id automatically 37707 * generated by the library or the id that has been passed by a call to identify(). 37708 * 37709 * ### Notes: 37710 * 37711 * get_distinct_id() can only be called after the Mixpanel library has finished loading. 37712 * init() has a loaded function available to handle this automatically. For example: 37713 * 37714 * // set distinct_id after the mixpanel library has loaded 37715 * mixpanel.init('YOUR PROJECT TOKEN', { 37716 * loaded: function(mixpanel) { 37717 * distinct_id = mixpanel.get_distinct_id(); 37718 * } 37719 * }); 37720 */ $a44aab89caa44953$var$MixpanelLib.prototype.get_distinct_id = function() { 37721 return this.get_property('distinct_id'); 37722}; 37723/** 37724 * The alias method creates an alias which Mixpanel will use to 37725 * remap one id to another. Multiple aliases can point to the 37726 * same identifier. 37727 * 37728 * The following is a valid use of alias: 37729 * 37730 * mixpanel.alias('new_id', 'existing_id'); 37731 * // You can add multiple id aliases to the existing ID 37732 * mixpanel.alias('newer_id', 'existing_id'); 37733 * 37734 * Aliases can also be chained - the following is a valid example: 37735 * 37736 * mixpanel.alias('new_id', 'existing_id'); 37737 * // chain newer_id - new_id - existing_id 37738 * mixpanel.alias('newer_id', 'new_id'); 37739 * 37740 * Aliases cannot point to multiple identifiers - the following 37741 * example will not work: 37742 * 37743 * mixpanel.alias('new_id', 'existing_id');
37744 * // this is invalid as 'new_id' already points to 'existing_id' 37745 * mixpanel.alias('new_id', 'newer_id'); 37746 * 37747 * ### Notes: 37748 * 37749 * If your project does not have 37750 * <a href="https://help.mixpanel.com/hc/en-us/articles/360039133851">ID Merge</a> 37751 * enabled, the best practice is to call alias once when a unique 37752 * ID is first created for a user (e.g., when a user first registers 37753 * for an account). Do not use alias multiple times for a single 37754 * user without ID Merge enabled. 37755 * 37756 * @param {String} alias A unique identifier that you want to use for this user in the future. 37757 * @param {String} [original] The current identifier being used for this user. 37758 */ $a44aab89caa44953$var$MixpanelLib.prototype.alias = function(alias, original) { 37759 // If the $people_distinct_id key exists in persistence, there has been a previous 37760 // mixpanel.people.identify() call made for this user. It is VERY BAD to make an alias with 37761 // this ID, as it will duplicate users. 37762 if (alias === this.get_property($a44aab89caa44953$var$PEOPLE_DISTINCT_ID_KEY)) { 37763 this.report_error('Attempting to create alias for existing People user - aborting.'); 37764 return -2; 37765 } 37766 var _this = this; 37767 if ($a44aab89caa44953$var$_.isUndefined(original)) original = this.get_distinct_id(); 37768 if (alias !== original) { 37769 this._register_single($a44aab89caa44953$var$ALIAS_ID_KEY, alias); 37770 return this.track('$create_alias', { 37771 'alias': alias, 37772 'distinct_id': original 37773 }, { 37774 skip_hooks: true 37775 }, function() { 37776 // Flush the people queue 37777 _this.identify(alias); 37778 }); 37779 } else { 37780 this.report_error('alias matches current distinct_id - skipping api call.'); 37781 this.identify(alias); 37782 return -1; 37783 } 37784}; 37785/** 37786 * Provide a string to recognize the user by. The string passed to 37787 * this method will appear in the Mixpanel Streams product rather 37788 * than an automatically generated name. Name tags do not have to 37789 * be unique. 37790 * 37791 * This value will only be included in Streams data. 37792 * 37793 * @param {String} name_tag A human readable name for the user 37794 * @deprecated 37795 */ $a44aab89caa44953$var$MixpanelLib.prototype.name_tag = function(name_tag) { 37796 this._register_single('mp_name_tag', name_tag); 37797}; 37798/** 37799 * Update the configuration of a mixpanel library instance. 37800 * 37801 * The default config is: 37802 * 37803 * { 37804 * // host for requests (customizable for e.g. a local proxy) 37805 * api_host: 'https://api-js.mixpanel.com', 37806 * 37807 * // endpoints for different types of requests 37808 * api_routes: { 37809 * track: 'track/', 37810 * engage: 'engage/', 37811 * groups: 'groups/', 37812 * } 37813 * 37814 * // HTTP method for tracking requests 37815 * api_method: 'POST' 37816 * 37817 * // transport for sending requests ('XHR' or 'sendBeacon') 37818 * // NB: sendBeacon should only be used for scenarios such as 37819 * // page unload where a "best-effort" attempt to send is 37820 * // acceptable; the sendBeacon API does not support callbacks 37821 * // or any way to know the result of the request. Mixpanel 37822 * // tracking via sendBeacon will not support any event- 37823 * // batching or retry mechanisms. 37824 * api_transport: 'XHR' 37825 * 37826 * // request-batching/queueing/retry 37827 * batch_requests: true, 37828 * 37829 * // maximum number of events/updates to send in a single 37830 * // network request 37831 * batch_size: 50, 37832 * 37833 * // milliseconds to wait between sending batch requests 37834 * batch_flush_interval_ms: 5000, 37835 * 37836 * // milliseconds to wait for network responses to batch requests 37837 * // before they are considered timed-out and retried 37838 * batch_request_timeout_ms: 90000, 37839 * 37840 * // override value for cookie domain, only useful for ensuring 37841 * // correct cross-subdomain cookies on unusual domains like 37842 * // subdomain.mainsite.avocat.fr; NB this cannot be used to 37843 * // set cookies on a different domain than the current origin 37844 * cookie_domain: '' 37845 * 37846 * // super properties cookie expiration (in days) 37847 * cookie_expiration: 365 37848 * 37849 * // if true, cookie will be set with SameSite=None; Secure 37850 * // this is only useful in special situations, like embedded 37851 * // 3rd-party iframes that set up a Mixpanel instance 37852 * cross_site_cookie: false 37853 * 37854 * // super properties span subdomains 37855 * cross_subdomain_cookie: true 37856 * 37857 * // debug mode 37858 * debug: false 37859 * 37860 * // if this is true, the mixpanel cookie or localStorage entry 37861 * // will be deleted, and no user persistence will take place 37862 * disable_persistence: false 37863 * 37864 * // if this is true, Mixpanel will automatically determine 37865 * // City, Region and Country data using the IP address of 37866 * //the client 37867 * ip: true 37868 * 37869 * // opt users out of tracking by this Mixpanel instance by default 37870 * opt_out_tracking_by_default: false 37871 * 37872 * // opt users out of browser data storage by this Mixpanel instance by default 37873 * opt_out_persistence_by_default: false 37874 * 37875 * // persistence mechanism used by opt-in/opt-out methods - cookie 37876 * // or localStorage - falls back to cookie if localStorage is unavailable 37877 * opt_out_tracking_persistence_type: 'localStorage' 37878 * 37879 * // customize the name of cookie/localStorage set by opt-in/opt-out methods 37880 * opt_out_tracking_cookie_prefix: null 37881 * 37882 * // type of persistent store for super properties (cookie/ 37883 * // localStorage) if set to 'localStorage', any existing 37884 * // mixpanel cookie value with the same persistence_name 37885 * // will be transferred to localStorage and deleted 37886 * persistence: 'cookie' 37887 * 37888 * // name for super properties persistent store 37889 * persistence_name: '' 37890 * 37891 * // names of properties/superproperties which should never 37892 * // be sent with track() calls 37893 * property_blacklist: [] 37894 * 37895 * // if this is true, mixpanel cookies will be marked as 37896 * // secure, meaning they will only be transmitted over https 37897 * secure_cookie: false 37898 * 37899 * // disables enriching user profiles with first touch marketing data 37900 * skip_first_touch_marketing: false 37901 * 37902 * // the amount of time track_links will 37903 * // wait for Mixpanel's servers to respond 37904 * track_links_timeout: 300 37905 * 37906 * // adds any UTM parameters and click IDs present on the page to any events fired 37907 * track_marketing: true 37908 * 37909 * // enables automatic page view tracking using default page view events through 37910 * // the track_pageview() method 37911 * track_pageview: false 37912 * 37913 * // if you set upgrade to be true, the library will check for 37914 * // a cookie from our old js library and import super 37915 * // properties from it, then the old cookie is deleted 37916 * // The upgrade config option only works in the initialization, 37917 * // so make sure you set it when you create the library. 37918 * upgrade: false 37919 * 37920 * // extra HTTP request headers to set for each API request, in 37921 * // the format {'Header-Name': value} 37922 * xhr_headers: {} 37923 * 37924 * // whether to ignore or respect the web browser's Do Not Track setting 37925 * ignore_dnt: false 37926 * } 37927 * 37928 * 37929 * @param {Object} config A dictionary of new configuration values to update 37930 */ $a44aab89caa44953$var$MixpanelLib.prototype.set_config = function(config) { 37931 if ($a44aab89caa44953$var$_.isObject(config)) { 37932 $a44aab89caa44953$var$_.extend(this['config'], config); 37933 var new_batch_size = config['batch_size']; 37934 if (new_batch_size) $a44aab89caa44953$var$_.each(this.request_batchers, function(batcher) { 37935 batcher.resetBatchSize(); 37936 }); 37937 if (!this.get_config('persistence_name')) this['config']['persistence_name'] = this['config']['cookie_name']; 37938 if (!this.get_config('disable_persistence')) this['config']['disable_persistence'] = this['config']['disable_cookie']; 37939 if (this['persistence']) this['persistence'].update_config(this['config']); 37940 $a44aab89caa44953$var$Config.DEBUG = $a44aab89caa44953$var$Config.DEBUG || this.get_config('debug'); 37941 if (('autocapture' in config || 'record_heatmap_data' in config) && this.autocapture) this.autocapture.init(); 37942 } 37943}; 37944/** 37945 * returns the current config object for the library. 37946 */ $a44aab89caa44953$var$MixpanelLib.prototype.get_config = function(prop_name) { 37947 return this['config'][prop_name]; 37948}; 37949/** 37950 * Fetch a hook function from config, with safe default, and run it 37951 * against the given arguments 37952 * @param {string} hook_name which hook to retrieve 37953 * @returns {any|null}
37953 return value of user-provided hook, or null if nothing was returned 37954 */ $a44aab89caa44953$var$MixpanelLib.prototype._run_hook = function(hook_name) { 37955 var ret = (this['config']['hooks'][hook_name] || $a44aab89caa44953$var$IDENTITY_FUNC).apply(this, $a44aab89caa44953$var$slice.call(arguments, 1)); 37956 if (typeof ret === 'undefined') { 37957 this.report_error(hook_name + ' hook did not return a value'); 37958 ret = null; 37959 } 37960 return ret; 37961}; 37962/** 37963 * Returns the value of the super property named property_name. If no such 37964 * property is set, get_property() will return the undefined value. 37965 * 37966 * ### Notes: 37967 * 37968 * get_property() can only be called after the Mixpanel library has finished loading. 37969 * init() has a loaded function available to handle this automatically. For example: 37970 * 37971 * // grab value for 'user_id' after the mixpanel library has loaded 37972 * mixpanel.init('YOUR PROJECT TOKEN', { 37973 * loaded: function(mixpanel) { 37974 * user_id = mixpanel.get_property('user_id'); 37975 * } 37976 * }); 37977 * 37978 * @param {String} property_name The name of the super property you want to retrieve 37979 */ $a44aab89caa44953$var$MixpanelLib.prototype.get_property = function(property_name) { 37980 return this['persistence'].load_prop([ 37981 property_name 37982 ]); 37983}; 37984/** 37985 * Get the API host for a specific endpoint type, falling back to the default api_host if not specified 37986 * 37987 * @param {String} endpoint_type The type of endpoint (e.g., "events", "people", "groups") 37988 * @returns {String} The API host to use for this endpoint 37989 */ $a44aab89caa44953$var$MixpanelLib.prototype.get_api_host = function(endpoint_type) { 37990 return this.get_config('api_hosts')[endpoint_type] || this.get_config('api_host'); 37991}; 37992$a44aab89caa44953$var$MixpanelLib.prototype.toString = function() { 37993 var name = this.get_config('name'); 37994 if (name !== $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME) name = $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME + '.' + name; 37995 return name; 37996}; 37997$a44aab89caa44953$var$MixpanelLib.prototype._event_is_disabled = function(event_name) { 37998 return $a44aab89caa44953$var$_.isBlockedUA($a44aab89caa44953$var$userAgent) || this._flags.disable_all_events || $a44aab89caa44953$var$_.include(this.__disabled_events, event_name); 37999}; 38000// perform some housekeeping around GDPR opt-in/out state 38001$a44aab89caa44953$var$MixpanelLib.prototype._gdpr_init = function() { 38002 var is_localStorage_requested = this.get_config('opt_out_tracking_persistence_type') === 'localStorage'; 38003 // try to convert opt-in/out cookies to localStorage if possible 38004 if (is_localStorage_requested && $a44aab89caa44953$var$_.localStorage.is_supported()) { 38005 if (!this.has_opted_in_tracking() && this.has_opted_in_tracking({ 38006 'persistence_type': 'cookie' 38007 })) this.opt_in_tracking({ 38008 'enable_persistence': false 38009 }); 38010 if (!this.has_opted_out_tracking() && this.has_opted_out_tracking({ 38011 'persistence_type': 'cookie' 38012 })) this.opt_out_tracking({ 38013 'clear_persistence': false 38014 }); 38015 this.clear_opt_in_out_tracking({ 38016 'persistence_type': 'cookie', 38017 'enable_persistence': false 38018 }); 38019 } 38020 // check whether the user has already opted out - if so, clear & disable persistence 38021 if (this.has_opted_out_tracking()) this._gdpr_update_persistence({ 38022 'clear_persistence': true 38023 }); 38024 else if (!this.has_opted_in_tracking() && (this.get_config('opt_out_tracking_by_default') || $a44aab89caa44953$var$_.cookie.get('mp_optout'))) { 38025 $a44aab89caa44953$var$_.cookie.remove('mp_optout'); 38026 this.opt_out_tracking({ 38027 'clear_persistence': this.get_config('opt_out_persistence_by_default') 38028 }); 38029 } 38030}; 38031/** 38032 * Enable or disable persistence based on options 38033 * only enable/disable if persistence is not already in this state 38034 * @param {boolean} [options.clear_persistence] If true, will delete all data stored by the sdk in persistence and disable it 38035 * @param {boolean} [options.enable_persistence] If true, will re-enable sdk persistence 38036 */ $a44aab89caa44953$var$MixpanelLib.prototype._gdpr_update_persistence = function(options) { 38037 var disabled; 38038 if (options && options['clear_persistence']) disabled = true; 38039 else if (options && options['enable_persistence']) disabled = false;
38040 else return; 38041 if (!this.get_config('disable_persistence') && this['persistence'].disabled !== disabled) this['persistence'].set_disabled(disabled); 38042 if (disabled) { 38043 this.stop_batch_senders(); 38044 this.stop_session_recording(); 38045 } else // only start batchers after opt-in if they have previously been started 38046 // in order to avoid unintentionally starting up batching for the first time 38047 if (this._batchers_were_started) this.start_batch_senders(); 38048}; 38049// call a base gdpr function after constructing the appropriate token and options args 38050$a44aab89caa44953$var$MixpanelLib.prototype._gdpr_call_func = function(func, options) { 38051 options = $a44aab89caa44953$var$_.extend({ 38052 'track': $a44aab89caa44953$var$_.bind(this.track, this), 38053 'persistence_type': this.get_config('opt_out_tracking_persistence_type'), 38054 'cookie_prefix': this.get_config('opt_out_tracking_cookie_prefix'), 38055 'cookie_expiration': this.get_config('cookie_expiration'), 38056 'cross_site_cookie': this.get_config('cross_site_cookie'), 38057 'cross_subdomain_cookie': this.get_config('cross_subdomain_cookie'), 38058 'cookie_domain': this.get_config('cookie_domain'), 38059 'secure_cookie': this.get_config('secure_cookie'), 38060 'ignore_dnt': this.get_config('ignore_dnt') 38061 }, options); 38062 // check if localStorage can be used for recording opt out status, fall back to cookie if not 38063 if (!$a44aab89caa44953$var$_.localStorage.is_supported()) options['persistence_type'] = 'cookie'; 38064 return func(this.get_config('token'), { 38065 track: options['track'], 38066 trackEventName: options['track_event_name'], 38067 trackProperties: options['track_properties'], 38068 persistenceType: options['persistence_type'], 38069 persistencePrefix: options['cookie_prefix'], 38070 cookieDomain: options['cookie_domain'], 38071 cookieExpiration: options['cookie_expiration'], 38072 crossSiteCookie: options['cross_site_cookie'], 38073 crossSubdomainCookie: options['cross_subdomain_cookie'], 38074 secureCookie: options['secure_cookie'], 38075 ignoreDnt: options['ignore_dnt'] 38076 }); 38077}; 38078/** 38079 * Opt the user in to data tracking and cookies/localstorage for this Mixpanel instance 38080 * 38081 * ### Usage: 38082 * 38083 * // opt user in 38084 * mixpanel.opt_in_tracking(); 38085 * 38086 * // opt user in with specific event name, properties, cookie configuration 38087 * mixpanel.opt_in_tracking({ 38088 * track_event_name: 'User opted in', 38089 * track_event_properties: { 38090 * 'Email': '[email protected]' 38091 * }, 38092 * cookie_expiration: 30, 38093 * secure_cookie: true 38094 * }); 38095 * 38096 * @param {Object} [options] A dictionary of config options to override 38097 * @param {function} [options.track] Function used for tracking a Mixpanel event to record the opt-in action (default is this Mixpanel instance's track method) 38098 * @param {string} [options.track_event_name=$opt_in] Event name to be used for tracking the opt-in action 38099 * @param {Object} [options.track_properties] Set of properties to be tracked along with the opt-in action 38100 * @param {boolean} [options.enable_persistence=true] If true, will re-enable sdk persistence 38101 * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - co
38101okie or localStorage - falls back to cookie if localStorage is unavailable 38102 * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name 38103 * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config) 38104 * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config) 38105 * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config) 38106 * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config) 38107 * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config) 38108 */ $a44aab89caa44953$var$MixpanelLib.prototype.opt_in_tracking = function(options) { 38109 options = $a44aab89caa44953$var$_.extend({ 38110 'enable_persistence': true 38111 }, options); 38112 this._gdpr_call_func($a44aab89caa44953$var$optIn, options); 38113 this._gdpr_update_persistence(options); 38114}; 38115/** 38116 * Opt the user out of data tracking and cookies/localstorage for this Mixpanel instance 38117 * 38118 * ### Usage: 38119 * 38120 * // opt user out 38121 * mixpanel.opt_out_tracking(); 38122 * 38123 * // opt user out with different cookie configuration from Mixpanel instance 38124 * mixpanel.opt_out_tracking({ 38125 * cookie_expiration: 30, 38126 * secure_cookie: true 38127 * }); 38128 * 38129 * @param {Object} [options] A dictionary of config options to override 38130 * @param {boolean} [options.delete_user=true] If true, will delete the currently identified user's profile and clear all charges after opting the user out 38131 * @param {boolean} [options.clear_persistence=true] If true, will delete all data stored by the sdk in persistence 38132 * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - co
38132okie or localStorage - falls back to cookie if localStorage is unavailable 38133 * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name 38134 * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config) 38135 * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config) 38136 * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config) 38137 * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config) 38138 * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config) 38139 */ $a44aab89caa44953$var$MixpanelLib.prototype.opt_out_tracking = function(options) { 38140 options = $a44aab89caa44953$var$_.extend({ 38141 'clear_persistence': true, 38142 'delete_user': true 38143 }, options); 38144 // delete user and clear charges since these methods may be disabled by opt-out 38145 if (options['delete_user'] && this['people'] && this['people']._identify_called()) { 38146 this['people'].delete_user(); 38147 this['people'].clear_charges(); 38148 } 38149 this._gdpr_call_func($a44aab89caa44953$var$optOut, options); 38150 this._gdpr_update_persistence(options); 38151}; 38152/** 38153 * Check whether the user has opted in to data tracking and cookies/localstorage for this Mixpanel instance 38154 * 38155 * ### Usage: 38156 * 38157 * var has_opted_in = mixpanel.has_opted_in_tracking(); 38158 * // use has_opted_in value 38159 * 38160 * @param {Object} [options] A dictionary of config options to override 38161 * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - co
38161okie or localStorage - falls back to cookie if localStorage is unavailable 38162 * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name 38163 * @returns {boolean} current opt-in status 38164 */ $a44aab89caa44953$var$MixpanelLib.prototype.has_opted_in_tracking = function(options) { 38165 return this._gdpr_call_func($a44aab89caa44953$var$hasOptedIn, options); 38166}; 38167/** 38168 * Check whether the user has opted out of data tracking and cookies/localstorage for this Mixpanel instance 38169 * 38170 * ### Usage: 38171 * 38172 * var has_opted_out = mixpanel.has_opted_out_tracking(); 38173 * // use has_opted_out value 38174 * 38175 * @param {Object} [options] A dictionary of config options to override 38176 * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable 38177 * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name 38178 * @returns {boolean} current opt-out status 38179 */ $a44aab89caa44953$var$MixpanelLib.prototype.has_opted_out_tracking = function(options) { 38180 return this._gdpr_call_func($a44aab89caa44953$var$hasOptedOut, options); 38181}; 38182/** 38183 * Clear the user's opt in/out status of data tracking and cookies/localstorage for this Mixpanel instance 38184 * 38185 * ### Usage: 38186 * 38187 * // clear user's opt-in/out status 38188 * mixpanel.clear_opt_in_out_tracking(); 38189 * 38190 * // clear user's opt-in/out status with specific cookie configuration - should match 38191 * // configuration used when opt_in_tracking/opt_out_tracking methods were called. 38192 * mixpanel.clear_opt_in_out_tracking({ 38193 * cookie_expiration: 30, 38194 * secure_cookie: true 38195 * }); 38196 * 38197 * @param {Object} [options] A dictionary of config options to override 38198 * @param {boolean} [options.enable_persistence=true] If true, will re-enable sdk persistence 38199 * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - co
38199okie or localStorage - falls back to cookie if localStorage is unavailable 38200 * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name 38201 * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config) 38202 * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config) 38203 * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config) 38204 * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config) 38205 * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config) 38206 */ $a44aab89caa44953$var$MixpanelLib.prototype.clear_opt_in_out_tracking = function(options) { 38207 options = $a44aab89caa44953$var$_.extend({ 38208 'enable_persistence': true 38209 }, options); 38210 this._gdpr_call_func($a44aab89caa44953$var$clearOptInOut, options); 38211 this._gdpr_update_persistence(options); 38212}; 38213$a44aab89caa44953$var$MixpanelLib.prototype.report_error = function(msg, err) { 38214 $a44aab89caa44953$var$console$1.error.apply($a44aab89caa44953$var$console$1.error, arguments); 38215 try { 38216 if (!err && !(msg instanceof Error)) msg = new Error(msg); 38217 this.get_config('error_reporter')(msg, err); 38218 } catch (err) { 38219 $a44aab89caa44953$var$console$1.error(err); 38220 } 38221}; 38222// EXPORTS (for closure compiler) 38223// MixpanelLib Exports 38224$a44aab89caa44953$var$MixpanelLib.prototype['init'] = $a44aab89caa44953$var$MixpanelLib.prototype.init; 38225$a44aab89caa44953$var$MixpanelLib.prototype['reset'] = $a44aab89caa44953$var$MixpanelLib.prototype.reset; 38226$a44aab89caa44953$var$MixpanelLib.prototype['disable'] = $a44aab89caa44953$var$MixpanelLib.prototype.disable; 38227$a44aab89caa44953$var$MixpanelLib.prototype['time_event'] = $a44aab89caa44953$var$MixpanelLib.prototype.time_event; 38228$a44aab89caa44953$var$MixpanelLib.prototype['track'] = $a44aab89caa44953$var$MixpanelLib.prototype.track; 38229$a44aab89caa44953$var$MixpanelLib.prototype['track_links'] = $a44aab89caa44953$var$MixpanelLib.prototype.track_links; 38230$a44aab89caa44953$var$MixpanelLib.prototype['track_forms'] = $a44aab89caa44953$var$MixpanelLib.prototype.track_forms; 38231$a44aab89caa44953$var$MixpanelLib.prototype['track_pageview'] = $a44aab89caa44953$var$MixpanelLib.prototype.track_pageview; 38232$a44aab89caa44953$var$MixpanelLib.prototype['register'] = $a44aab89caa44953$var$MixpanelLib.prototype.register; 38233$a44aab89caa44953$var$MixpanelLib.prototype['register_once'] = $a44aab89caa44953$var$MixpanelLib.prototype.register_once; 38234$a44aab89caa44953$var$MixpanelLib.prototype['unregister'] = $a44aab89caa44953$var$MixpanelLib.prototype.unregister; 38235$a44aab89caa44953$var$MixpanelLib.prototype['identify'] = $a44aab89caa44953$var$MixpanelLib.prototype.identify; 38236$a44aab89caa44953$var$MixpanelLib.prototype['alias'] = $a44aab89caa44953$var$MixpanelLib.prototype.alias; 38237$a44aab89caa44953$var$MixpanelLib.prototype['name_tag'] = $a44aab89caa44953$var$MixpanelLib.prototype.name_tag; 38238$a44aab89caa44953$var$MixpanelLib.prototype['set_config'] = $a44aab89caa44953$var$MixpanelLib.prototype.set_config; 38239$a44aab89caa44953$var$MixpanelLib.prototype['get_config'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_config; 38240$a44aab89caa44953$var$MixpanelLib.prototype['get_api_host'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_api_host; 38241$a44aab89caa44953$var$MixpanelLib.prototype['get_property'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_property; 38242$a44aab89caa44953$var$MixpanelLib.prototype['get_distinct_id'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_distinct_id; 38243$a44aab89caa44953$var$MixpanelLib.prototype['toString'] = $a44aab89caa44953$var$MixpanelLib.prototype.toString; 38244$a44aab89caa44953$var$MixpanelLib.prototype['opt_out_tracking'] = $a44aab89caa44953$var$MixpanelLib.prototype.opt_out_tracking; 38245$a44aab89caa44953$var$MixpanelLib.prototype['opt_in_tracking'] = $a44aab89caa44953$var$MixpanelLib.prototype.opt_in_tracking; 38246$a44aab89caa44953$var$MixpanelLib.prototype['has_opted_out_tracking'] = $a44aab89caa44953$var$MixpanelLib.prototype.has_opted_out_tracking; 38247$a44aab89caa44953$var$MixpanelLib.prototype['has_opted_in_tracking'] = $a44aab89caa44953$var$MixpanelLib.prototype.has_opted_in_tracking; 38248$a44aab89caa44953$var$MixpanelLib.prototype['clear_opt_in_out_tracking'] = $a44aab89caa44953$var$MixpanelLib.prototype.clear_opt_in_out_tracking; 38249$a44aab89caa44953$var$MixpanelLib.prototype['get_group'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_group; 38250$a44aab89caa44953$var$MixpanelLib.prototype['set_group'] = $a44aab89caa44953$var$MixpanelLib.prototype.set_group; 38251$a44aab89caa44953$var$MixpanelLib.prototype['add_group'] = $a44aab89caa44953$var$MixpanelLib.prototype.add_group; 38252$a44aab89caa44953$var$MixpanelLib.prototype['remove_group'] = $a44aab89caa44953$var$MixpanelLib.prototype.remove_group; 38253$a44aab89caa44953$var$MixpanelLib.prototype['track_with_groups'] = $a44aab89caa44953$var$MixpanelLib.prototype.track_with_groups; 38254$a44aab89caa44953$var$MixpanelLib.prototype['start_batch_senders'] = $a44aab89caa44953$var$MixpanelLib.prototype.start_batch_senders; 38255$a44aab89caa44953$var$MixpanelLib.prototype['stop_batch_senders'] = $a44aab89caa44953$var$MixpanelLib.prototype.stop_batch_senders; 38256$a44aab89caa44953$var$MixpanelLib.prototype['start_session_recording'] = $a44aab89caa44953$var$MixpanelLib.prototype.start_session_recording; 38257$a44aab89caa44953$var$MixpanelLib.prototype['stop_session_recording'] = $a44aab89caa44953$var$MixpanelLib.prototype.stop_session_recording; 38258$a44aab89caa44953$var$MixpanelLib.prototype['pause_session_recording'] = $a44aab89caa44953$var$MixpanelLib.prototype.pause_session_recording; 38259$a44aab89caa44953$var$MixpanelLib.prototype['resume_session_recording'] = $a44aab89caa44953$var$MixpanelLib.prototype.resume_session_recording; 38260$a44aab89caa44953$var$MixpanelLib.prototype['get_session_recording_properties'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_session_recording_properties; 38261$a44aab89caa44953$var$MixpanelLib.prototype['get_session_replay_url'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_session_replay_url; 38262$a44aab89caa44953$var$MixpanelLib.prototype['get_tab_id'] = $a44aab89caa44953$var$MixpanelLib.prototype.get_tab_id; 38263$a44aab89caa44953$var$MixpanelLib.prototype['DEFAULT_API_ROUTES']
38263= $a44aab89caa44953$var$DEFAULT_API_ROUTES; 38264// Exports intended only for testing 38265$a44aab89caa44953$var$MixpanelLib.prototype['__get_recorder'] = $a44aab89caa44953$var$MixpanelLib.prototype.__get_recorder; 38266// MixpanelPersistence Exports 38267$a44aab89caa44953$var$MixpanelPersistence.prototype['properties'] = $a44aab89caa44953$var$MixpanelPersistence.prototype.properties; 38268$a44aab89caa44953$var$MixpanelPersistence.prototype['update_search_keyword'] = $a44aab89caa44953$var$MixpanelPersistence.prototype.update_search_keyword; 38269$a44aab89caa44953$var$MixpanelPersistence.prototype['update_referrer_info'] = $a44aab89caa44953$var$MixpanelPersistence.prototype.update_referrer_info; 38270$a44aab89caa44953$var$MixpanelPersistence.prototype['get_cross_subdomain'] = $a44aab89caa44953$var$MixpanelPersistence.prototype.get_cross_subdomain; 38271$a44aab89caa44953$var$MixpanelPersistence.prototype['clear'] = $a44aab89caa44953$var$MixpanelPersistence.prototype.clear; 38272var $a44aab89caa44953$var$instances = {}; 38273var $a44aab89caa44953$var$extend_mp = function() { 38274 // add all the sub mixpanel instances 38275 $a44aab89caa44953$var$_.each($a44aab89caa44953$var$instances, function(instance, name) { 38276 if (name !== $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME) $a44aab89caa44953$var$mixpanel_master[name] = instance; 38277 }); 38278 // add private functions as _ 38279 $a44aab89caa44953$var$mixpanel_master['_'] = $a44aab89caa44953$var$_; 38280}; 38281var $a44aab89caa44953$var$override_mp_init_func = function() { 38282 // we override the snippets init function to handle the case where a 38283 // user initializes the mixpanel library after the script loads & runs 38284 $a44aab89caa44953$var$mixpanel_master['init'] = function(token, config, name) { 38285 if (name) { 38286 // initialize a sub library 38287 if (!$a44aab89caa44953$var$mixpanel_master[name]) { 38288 $a44aab89caa44953$var$mixpanel_master[name] = $a44aab89caa44953$var$instances[name] = $a44aab89caa44953$var$create_mplib(token, config, name); 38289 $a44aab89caa44953$var$mixpanel_master[name]._loaded(); 38290 } 38291 return $a44aab89caa44953$var$mixpanel_master[name]; 38292 } else { 38293 var instance = $a44aab89caa44953$var$mixpanel_master; 38294 if ($a44aab89caa44953$var$instances[$a44aab89caa44953$var$PRIMARY_INSTANCE_NAME]) // main mixpanel lib already initialized 38295 instance = $a44aab89caa44953$var$instances[$a44aab89caa44953$var$PRIMARY_INSTANCE_NAME]; 38296 else if (token) { 38297 // intialize the main mixpanel lib 38298 instance = $a44aab89caa44953$var$create_mplib(token, config, $a44aab89caa44953$var$PRIMARY_INSTANCE_NAME); 38299 instance._loaded(); 38300 $a44aab89caa44953$var$instances[$a44aab89caa44953$var$PRIMARY_INSTANCE_NAME] = instance; 38301 } 38302 $a44aab89caa44953$var$mixpanel_master = instance; 38303 if ($a44aab89caa44953$var$init_type === $a44aab89caa44953$var$INIT_SNIPPET) $a44aab89caa44953$var$win[$a44aab89caa44953$var$PRIMARY_INSTANCE_NAME] = $a44aab89caa44953$var$mixpanel_master; 38304 $a44aab89caa44953$var$extend_mp(); 38305 } 38306 }; 38307}; 38308var $a44aab89caa44953$var$add_dom_loaded_handler = function() { 38309 // Cross browser DOM Loaded support 38310 function dom_loaded_handler() { 38311 // function flag since we only want to execute this once 38312 if (dom_loaded_handler.done) return; 38313 dom_loaded_handler.done = true; 38314 $a44aab89caa44953$var$DOM_LOADED = true; 38315 $a44aab89caa44953$var$ENQUEUE_REQUESTS = false; 38316 $a44aab89caa44953$var$_.each($a44aab89caa44953$var$instances, function(inst) { 38317 inst._dom_loaded(); 38318 }); 38319 } 38320 function do_scroll_check() { 38321 try { 38322 $a44aab89caa44953$var$document$1.documentElement.doScroll('left'); 38323 } catch (e) { 38324 setTimeout(do_scroll_check, 1); 38325 return; 38326 } 38327 dom_loaded_handler(); 38328 } 38329 if ($a44aab89caa44953$var$document$1.addEventListener) { 38330 if ($a44aab89caa44953$var$document$1.readyState === 'complete') // safari 4 can fire the DOMContentLoaded event before loading all 38331 // external JS (including this file). you will see some copypasta 38332 // on the internet that checks for 'complete' and 'loaded', but 38333 // 'loaded' is an IE thing 38334 dom_loaded_handler(); 38335 else $a44aab89caa44953$var$document$1.addEventListener('DOMContentLoaded', dom_loaded_handler, false); 38336 } else if ($a44aab89caa44953$var$document$1.attachEvent) { 38337 // IE 38338 $a44aab89caa44953$var$document$1.attachEvent('onreadystatechange', dom_loaded_handler); 38339 // check to make sure we arn't in a frame 38340 var toplevel = false;
38341 try { 38342 toplevel = $a44aab89caa44953$var$win.frameElement === null; 38343 } catch (e) { 38344 // noop 38345 } 38346 if ($a44aab89caa44953$var$document$1.documentElement.doScroll && toplevel) do_scroll_check(); 38347 } 38348 // fallback handler, always will work 38349 $a44aab89caa44953$var$_.register_event($a44aab89caa44953$var$win, 'load', dom_loaded_handler, true); 38350}; 38351function $a44aab89caa44953$var$init_as_module(bundle_loader) { 38352 $a44aab89caa44953$var$load_extra_bundle = bundle_loader; 38353 $a44aab89caa44953$var$init_type = $a44aab89caa44953$var$INIT_MODULE; 38354 $a44aab89caa44953$var$mixpanel_master = new $a44aab89caa44953$var$MixpanelLib(); 38355 $a44aab89caa44953$var$override_mp_init_func(); 38356 $a44aab89caa44953$var$mixpanel_master['init'](); 38357 $a44aab89caa44953$var$add_dom_loaded_handler(); 38358 return $a44aab89caa44953$var$mixpanel_master; 38359} 38360// For loading separate bundles asynchronously via script tag 38361// so that we don't load them until they are needed at runtime. 38362// For builds that have everything in one bundle, no extra work. 38363function $a44aab89caa44953$var$loadNoop(_src, onload) { 38364 onload(); 38365} 38366/* eslint camelcase: "off" */ var $a44aab89caa44953$export$2e2bcd8739ae039 = $a44aab89caa44953$var$init_as_module($a44aab89caa44953$var$loadNoop); 38367 38368 38369const $f653274e6d3f2024$var$MIXPANEL_TOKEN = '408cecb5746382b0c04ee22f00cc00c4'; 38370class $f653274e6d3f2024$export$2e2bcd8739ae039 { 38371 static init() { 38372 try { 38373 (0, $a44aab89caa44953$export$2e2bcd8739ae039).init($f653274e6d3f2024$var$MIXPANEL_TOKEN); 38374 $f653274e6d3f2024$export$2e2bcd8739ae039.isInitiated = true; 38375 } catch (error) { 38376 console.error('mixpanel init error:', error); 38377 } 38378 } 38379 static track(name, props) { 38380 if (!$f653274e6d3f2024$export$2e2bcd8739ae039.isInitiated) return; 38381 try { 38382 (0, $a44aab89caa44953$export$2e2bcd8739ae039).track(name, (0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, props, $f653274e6d3f2024$export$2e2bcd8739ae039.contextProps), { 38383 appName: 'signup_widget' 38384 })); 38385 } catch (error) { 38386 console.error('mixpanel track error:', error); 38387 } 38388 } 38389 static setContextProps(props) { 38390 Object.keys(props).forEach((key)=>{ 38391 $f653274e6d3f2024$export$2e2bcd8739ae039.contextProps[key] = props[key]; 38392 }); 38393 } 38394 static removeContextProps(keys) { 38395 keys.forEach((key)=>{ 38396 delete $f653274e6d3f2024$export$2e2bcd8739ae039.contextProps[key]; 38397 }); 38398 } 38399} 38400$f653274e6d3f2024$export$2e2bcd8739ae039.isInitiated = false; 38401$f653274e6d3f2024$export$2e2bcd8739ae039.contextProps = {}; 38402 38403 38404var $17942357208700c2$export$37eca6ee283e0240 = /*#__PURE__*/ function(MixpanelEventList) { 38405 MixpanelEventList["LOGIN_CLICKED"] = "LOGIN_CLICKED"; 38406 MixpanelEventList["EMAIL_SIGNUP_CLICKED"] = "EMAIL_SIGNUP_CLICKED"; 38407 MixpanelEventList["GOOGLE_SIGNUP_CLICKED"] = "GOOGLE_SIGNUP_CLICKED"; 38408 return MixpanelEventList; 38409}({}); 38410 38411 38412const $45f143bf33d138c0$export$ce870d8cba7c4ac0 = ()=>{ 38413 console.log('document.cookie:', document.cookie.replace(/(?:(?:^|.*;\s*)hubspotutk\s*\=\s*([^;]*).*$)|^.*$/, '$1')); 38414 // eslint-disable-next-line no-useless-escape 38415 return document.cookie.replace(/(?:(?:^|.*;\s*)hubspotutk\s*\=\s*([^;]*).*$)|^.*$/, '$1'); 38416}; 38417 38418 38419function $c10fcb7f9515237e$export$3c27964bdf7ca185(data) { 38420 window.dataLayer = window.dataLayer || []; 38421 window.dataLayer.push(data); 38422} 38423 38424 38425// Centralized environment config for the signup-form widget. 38426// 38427// The widget is embedded on the marketing site, so environment is derived from 38428// the hostname at runtime: only the live prod host (`www.explorium.ai`) uses the 38429// prod stack. Everything else (localhost, previews, dev subdomains) uses dev. 38430const $e5b2c97eef831061$var$PROD_HOST = 'www.explorium.ai'; 38431const $e5b2c97eef831061$var$PROD_CONFIG = { 38432 // Cloudflare Turnstile site key. 38433 turnstileSiteKey: '0x4AAAAAAB-rT10svTu6wm-p', 38434 // Custom Auth0 domain used for SSO (auth0-js WebAuth). 38435 auth0Domain: 'auth.explorium.ai', 38436 // Platform base URL for identity-service (OTP) calls. 38437 platformUrl: 'https://app.explorium.ai' 38438}; 38439const $e5b2c97eef831061$var$DEV_CONFIG = { 38440 turnstileSiteKey: '0x4AAAAAAB-qUOj0fgkZJSrn', 38441 auth0Domain: 'auth-dev.explorium.ai', 38442 platformUrl: 'https://platform-dev-us-app.explorium.ai' 38443}; 38444const $e5b2c97eef831061$var$isProd = ()=>window.location.hostname === $e5b2c97eef831061$var$PROD_HOST; 38445const $e5b2c97eef831061$export$44487a86467333c3 = ()=>$e5b2c97eef831061$var$isProd() ? $e5b2c97eef831061$var$PROD_CONFIG : $e5b2c97eef831061$var$DEV_CONFIG; 38446 38447 38448const $fbea2876631f13de$var$OTP_APP_NAME = "direct-data";
38449const $fbea2876631f13de$export$5f19683c868a137a = { 38450 sendOtp: async (email, captchaToken)=>{ 38451 await (0, (/*@__PURE__*/$parcel$interopDefault($a8518210ce2c4217$exports))).post(`${(0, $e5b2c97eef831061$export$44487a86467333c3)().platformUrl}/api/identity-service/otp/${$fbea2876631f13de$var$OTP_APP_NAME}/send`, { 38452 email: email, 38453 captcha_token: captchaToken !== null && captchaToken !== void 0 ? captchaToken : undefined 38454 }, { 38455 withCredentials: false, 38456 headers: { 38457 app_name: $fbea2876631f13de$var$OTP_APP_NAME 38458 } 38459 }); 38460 }, 38461 ssoSignup: async (clientId, redirectUri, authorizationParams)=>{ 38462 var _window_attribution; 38463 // Use buildSignupData to get all tracking parameters and data 38464 const signupData = (0, $ae59e8ec7b666bff$export$7d306ca8b72b6792)('', '', '', clientId, redirectUri); 38465 (0, $c10fcb7f9515237e$export$3c27964bdf7ca185)({ 38466 event: "website_signup", 38467 step: "form_submit", 38468 type: "sso", 38469 section: "homepage-hero", 38470 action: "Signup", 38471 content_name: window.location.href 38472 }); 38473 var webAuth = new (0, $90f323912e688b98$export$2e2bcd8739ae039).WebAuth({ 38474 domain: (0, $e5b2c97eef831061$export$44487a86467333c3)().auth0Domain, 38475 clientID: clientId, 38476 redirectUri: redirectUri, 38477 responseType: 'token id_token', 38478 scope: 'openid profile email' 38479 }); 38480 webAuth.authorize((0, $ca7d1670581030c8$export$71511d61b312f219)((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, (_window_attribution = window.attribution) === null || _window_attribution === void 0 ? void 0 : _window_attribution.extractParams()), { 38481 connection: 'google-oauth2', 38482 state: 'sso-google', 38483 gaClientId: (0, $f3a60463a4b81705$export$e8d539af66b54c0b)() 38484 }), signupData, authorizationParams)); 38485 (0, $f653274e6d3f2024$export$2e2bcd8739ae039).track((0, $17942357208700c2$export$37eca6ee283e0240).GOOGLE_SIGNUP_CLICKED, (0, $ca7d1670581030c8$export$71511d61b312f219)({ 38486 clientId: clientId, 38487 hubspotToken: (0, $45f143bf33d138c0$export$ce870d8cba7c4ac0)(), 38488 gaClientId: (0, $f3a60463a4b81705$export$e8d539af66b54c0b)() 38489 }, signupData)); 38490 }, 38491 createAccount: async (email, fullName, password, clientId, redirectUri, authorizationParams, otpcode, captchaToken)=>{ 38492 var _window_attribution; 38493 const signupData = (0, $ae59e8ec7b666bff$export$7d306ca8b72b6792)(email, fullName, password, clientId, redirectUri); 38494 (0, $c10fcb7f9515237e$export$3c27964bdf7ca185)({ 38495 event: "website_signup", 38496 step: "form_submit", 38497 type: "email", 38498 section: "homepage-hero", 38499 action: "Signup", 38500 content_name: window.location.href 38501 }); 38502 const { data: { success: success } } = await (0, (/*@__PURE__*/$parcel$interopDefault($a8518210ce2c4217$exports))).post('https://auth-api.explorium.ai/signup/email', (0, $ca7d1670581030c8$export$71511d61b312f219)((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, (_window_attribution = window.attribution) === null || _window_attribution === void 0 ? void 0 : _window_attribution.extractParams()), { 38503 gaClientId: (0, $f3a60463a4b81705$export$e8d539af66b54c0b)() 38504 }), signupData), { 38505 otpcode: otpcode, 38506 captcha_token: captchaToken !== null && captchaToken !== void 0 ? captchaToken : undefined 38507 }), authorizationParams), { 38508 withCredentials: false 38509 }); 38510 if (!success) return { 38511 success: false 38512 }; 38513 (0, $f653274e6d3f2024$export$2e2bcd8739ae039).track((0, $17942357208700c2$export$37eca6ee283e0240).EMAIL_SIGNUP_CLICKED, (0, $ca7d1670581030c8$export$71511d61b312f219)({ 38514 fullName: fullName, 38515 clientId: clientId, 38516 hubspotToken: (0, $45f143bf33d138c0$export$ce870d8cba7c4ac0)(), 38517 gaClientId: (0, $f3a60463a4b81705$export$e8d539af66b54c0b)() 38518 }, signupData)); 38519 return { 38520 success: true 38521 }; 38522 } 38523}; 38524 38525 38526 38527 38528const $8f4cb599cfbbdc50$var$TURNSTILE_SCRIPT_SRC = 'https://challenges.cloudflare.com/turnstile/v0/api.js';
38529// Cast the injected global to a minimal shape (no @types dependency here). 38530const $8f4cb599cfbbdc50$var$getTurnstile = ()=>window.turnstile; 38531const $8f4cb599cfbbdc50$var$ensureTurnstileScript = ()=>{ 38532 if (document.querySelector(`script[src="${$8f4cb599cfbbdc50$var$TURNSTILE_SCRIPT_SRC}"]`)) return; 38533 const script = document.createElement('script'); 38534 script.src = $8f4cb599cfbbdc50$var$TURNSTILE_SCRIPT_SRC; 38535 script.async = true; 38536 script.defer = true; 38537 document.head.appendChild(script); 38538}; 38539const $8f4cb599cfbbdc50$var$TurnstileWidget = ({ onSuccess: onSuccess, onError: onError, onExpire: onExpire })=>{ 38540 const ref = (0, $fYIks.useRef)(null); 38541 const mountedRef = (0, $fYIks.useRef)(false); 38542 (0, $fYIks.useEffect)(()=>{ 38543 const renderWidget = ()=>{ 38544 const turnstile = $8f4cb599cfbbdc50$var$getTurnstile(); 38545 if (!ref.current || mountedRef.current || !turnstile) return false; 38546 mountedRef.current = true; 38547 turnstile.render(ref.current, { 38548 sitekey: (0, $e5b2c97eef831061$export$44487a86467333c3)().turnstileSiteKey, 38549 callback: onSuccess, 38550 'error-callback': onError, 38551 'expired-callback': onExpire 38552 }); 38553 return true; 38554 }; 38555 // The script is injected async, so poll until the global is available. 38556 if (renderWidget()) return; 38557 const interval = setInterval(()=>{ 38558 if (renderWidget()) clearInterval(interval); 38559 }, 200); 38560 return ()=>clearInterval(interval); 38561 // eslint-disable-next-line react-hooks/exhaustive-deps 38562 }, []); 38563 return /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 38564 ref: ref, 38565 className: "turnstile-container" 38566 }); 38567}; 38568// Password validation function 38569const $8f4cb599cfbbdc50$var$validatePassword = (password)=>{ 38570 const errors = []; 38571 if (!password) return [ 38572 'Password is required' 38573 ]; 38574 if (password.length < 8) errors.push('At least 8 characters'); 38575 if (!/[a-z]/.test(password)) errors.push('One lowercase letter'); 38576 if (!/\d/.test(password)) errors.push('One number'); 38577 return errors; 38578}; 38579// Helper function to validate full name 38580const $8f4cb599cfbbdc50$var$validateFullName = (fullName)=>{ 38581 if (!fullName || fullName.trim().length === 0) return 'First and last name is required'; 38582 const trimmedName = fullName.trim(); 38583 const nameParts = trimmedName.split(/\s+/); 38584 // Check if only one name part is provided 38585 if (nameParts.length < 2) return 'Please enter your full name (first and last name)'; 38586 // Check if any part is too short (less than 2 characters) 38587 if (nameParts.some((part)=>part.length < 2)) return 'Please enter a valid first and last name'; 38588 return null; 38589}; 38590// Simple validation schema without zod 38591const $8f4cb599cfbbdc50$var$validateForm = (data)=>{ 38592 const errors = {}; 38593 const fullNameError = $8f4cb599cfbbdc50$var$validateFullName(data.fullName); 38594 if (fullNameError) errors.fullName = fullNameError; 38595 if (!data.email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(data.email)) errors.email = 'Please enter a valid email address'; 38596 const passwordErrors = $8f4cb599cfbbdc50$var$validatePassword(data.password); 38597 if (passwordErrors.length > 0) errors.password = `Password must contain: ${passwordErrors.join(', ')}`; 38598 if (!data.confirmPassword) errors.confirmPassword = 'Please confirm your password'; 38599 else if (data.password !== data.confirmPassword) errors.confirmPassword = 'Passwords do not match'; 38600 if (!data.termsAccepted) errors.termsAccepted = 'You must accept the terms and conditions'; 38601 return errors; 38602}; 38603function $8f4cb599cfbbdc50$var$getSignupErrorMessage(error) { 38604 if ((0, (/*@__PURE__*/$parcel$interopDefault($a8518210ce2c4217$exports))).isAxiosError(error)) { 38605 var _error_response, _error_config, _error_config1; 38606 const segments = []; 38607 const data = (_error_response = error.response) === null || _error_response === void 0 ? void 0 : _error_response.data; 38608 if (typeof (data === null || data === void 0 ? void 0 : data.message) === 'string' && data.message.trim()) segments.push(data.message); 38609 if (typeof (data === null || data === void 0 ? void 0 : data.error) === 'string' && data.error.trim()) segments.push(data.error); 38610 if (typeof (data === null || data === void 0 ? void 0 : data.detail) === 'string' && data.detail.trim()) segments.push(data.detail); 38611 else if (Array.isArray(data === null || data === void 0 ? void 0 : data.detail)) { 38612 const msgs = data === null || data === void 0 ? void 0 : data.detail.map((d)=>
38612d === null || d === void 0 ? void 0 : d.msg).filter(Boolean); 38613 if (msgs === null || msgs === void 0 ? void 0 : msgs.length) segments.push(msgs.join('; ')); 38614 } 38615 if (!segments.length) segments.push(error.message); 38616 if (error.code) segments.push(`code=${error.code}`); 38617 if (error.response) segments.push(`status=${error.response.status}${error.response.statusText ? ` ${error.response.statusText}` : ''}`); 38618 else if (error.request) segments.push('no response received (network error or timeout)'); 38619 var _error_config_method, _error_config_url; 38620 if (((_error_config = error.config) === null || _error_config === void 0 ? void 0 : _error_config.method) || ((_error_config1 = error.config) === null || _error_config1 === void 0 ? void 0 : _error_config1.url)) segments.push(`request=${((_error_config_method = error.config.method) !== null && _error_config_method !== void 0 ? _error_config_method : '?').toUpperCase()} ${(_error_config_url = error.config.url) !== null && _error_config_url !== void 0 ? _error_config_url : '?'}`); 38621 return segments.join(" \u2014 "); 38622 } 38623 if (error instanceof Error) { 38624 const segments = [
38625 `${error.name}: ${error.message}` 38626 ]; 38627 const cause = error.cause; 38628 if (cause) segments.push(`cause=${String(cause)}`); 38629 if (error.stack) { 38630 var _error_stack_split_; 38631 const firstFrame = (_error_stack_split_ = error.stack.split('\n')[1]) === null || _error_stack_split_ === void 0 ? void 0 : _error_stack_split_.trim(); 38632 if (firstFrame) segments.push(`at ${firstFrame}`); 38633 } 38634 return segments.join(" \u2014 "); 38635 } 38636 if (error && typeof error === 'object') try { 38637 return JSON.stringify(error); 38638 } catch (e) { 38639 return String(error); 38640 } 38641 return String(error); 38642} 38643const $8f4cb599cfbbdc50$export$cc15cfe224a6a69b = ({ clientId: clientId, onClose: onClose, authorizationParams: authorizationParams, redirectUri: redirectUri, mainTitle: mainTitle, mainSubtitle: mainSubtitle })=>{ 38644 const [isLoading, setIsLoading] = (0, $fYIks.useState)(false); 38645 const [error, setError] = (0, $fYIks.useState)(null); 38646 const [formErrors, setFormErrors] = (0, $fYIks.useState)({}); 38647 const [isSuccess, setIsSuccess] = (0, $fYIks.useState)(false); 38648 const [userEmail, setUserEmail] = (0, $fYIks.useState)(''); 38649 const [showPassword, setShowPassword] = (0, $fYIks.useState)(false); 38650 const [showConfirmPassword, setShowConfirmPassword] = (0, $fYIks.useState)(false); 38651 const [currentStep, setCurrentStep] = (0, $fYIks.useState)(1); 38652 const [step1Email, setStep1Email] = (0, $fYIks.useState)(''); 38653 const [captchaToken, setCaptchaToken] = (0, $fYIks.useState)(null); 38654 const [captchaError, setCaptchaError] = (0, $fYIks.useState)(null); 38655 const [pendingAccount, setPendingAccount] = (0, $fYIks.useState)(null); 38656 const [otpCode, setOtpCode] = (0, $fYIks.useState)(''); 38657 const [otpError, setOtpError] = (0, $fYIks.useState)(null); 38658 const [otpNotice, setOtpNotice] = (0, $fYIks.useState)(null); 38659 const [isResendingOtp, setIsResendingOtp] = (0, $fYIks.useState)(false); 38660 // Load the Cloudflare Turnstile script once when the form mounts. 38661 (0, $fYIks.useEffect)(()=>{ 38662 $8f4cb599cfbbdc50$var$ensureTurnstileScript(); 38663 }, []); 38664 const onCaptchaVerify = (token)=>{ 38665 setCaptchaToken(token); 38666 setCaptchaError(null); 38667 }; 38668 const onCaptchaError = ()=>{ 38669 setCaptchaToken(null); 38670 setCaptchaError('Please complete the captcha to continue'); 38671 }; 38672 const onCaptchaExpire = ()=>{ 38673 setCaptchaToken(null); 38674 setCaptchaError('Captcha expired. Please try again.'); 38675 }; 38676 const { register: register, handleSubmit: handleSubmit, formState: { errors: errors }, watch: watch, setValue: setValue } = (0, $c855b811fd5e8ae6$export$87c0cf8eb5a167e0)({ 38677 defaultValues: { 38678 fullName: '', 38679 email: '', 38680 password: '', 38681 confirmPassword: '', 38682 termsAccepted: false 38683 } 38684 }); 38685 const termsAccepted = watch('termsAccepted'); 38686 // Step 1 validation 38687 const validateStep1 = (email)=>{ 38688 const errors = {}; 38689 if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) errors.email = 'Please enter a valid email address'; 38690 return errors; 38691 }; 38692 // Handle Step 1 email submission 38693 const handleStep1Submit = (e)=>{ 38694 e.preventDefault(); 38695 if (step1Email.toLowerCase().endsWith('@gmail.com')) { 38696 handleGoogleSignup(); 38697 return; 38698 } 38699 const errors = validateStep1(step1Email); 38700 // Check if terms are accepted before proceeding 38701 if (!termsAccepted) { 38702 setFormErrors((0, $4ead65f8391fca5a$export$71511d61b312f219)((0, $ca7d1670581030c8$export$71511d61b312f219)({}, errors), { 38703 termsAccepted: 'You must accept the terms and conditions' 38704 })); 38705 return; 38706 } 38707 if (Object.keys(errors).length > 0) { 38708 setFormErrors(errors); 38709 return; 38710 } 38711 setFormErrors({}); 38712 setValue('email', step1Email); 38713 setCurrentStep(2); 38714 }; 38715 // Step 2 submit: validate, require captcha, then send the OTP and move to step 3. 38716 const onSubmit = async (data)=>{ 38717 // Validate form 38718 const validationErrors = $8f4cb599cfbbdc50$var$validateForm(data);
38719 if (Object.keys(validationErrors).length > 0) { 38720 setFormErrors(validationErrors); 38721 return; 38722 } 38723 // __x_captcha_token >> Workaround for automation testing. 38724 if (!captchaToken && !window.__x_captcha_token) { 38725 setCaptchaError('Please complete the captcha to continue'); 38726 return; 38727 } 38728 setFormErrors({}); 38729 setIsLoading(true); 38730 setError(null); 38731 try { 38732 await (0, $fbea2876631f13de$export$5f19683c868a137a).sendOtp(data.email, captchaToken); 38733 setPendingAccount(data); 38734 setOtpCode(''); 38735 setOtpError(null); 38736 setOtpNotice(null); 38737 setCurrentStep(3); 38738 } catch (err) { 38739 var _getTurnstile; 38740 console.error('[Signup] Error sending signup OTP:', $8f4cb599cfbbdc50$var$getSignupErrorMessage(err)); 38741 setError('Failed to send verification code. Please try again.'); 38742 setCaptchaToken(null); 38743 (_getTurnstile = $8f4cb599cfbbdc50$var$getTurnstile()) === null || _getTurnstile === void 0 ? void 0 : _getTurnstile.reset(); 38744 } finally{ 38745 setIsLoading(false); 38746 } 38747 }; 38748 // Step 3 submit: verify OTP code and create the account. 38749 const onOtpSubmit = async (e)=>{ 38750 e.preventDefault(); 38751 if (!pendingAccount) { 38752 setOtpError('Something went wrong. Please go back and try again.'); 38753 return; 38754 } 38755 if (!otpCode.trim()) { 38756 setOtpError('Verification code is required'); 38757 return; 38758 } 38759 setIsLoading(true); 38760 setOtpError(null); 38761 try { 38762 const result = await (0, $fbea2876631f13de$export$5f19683c868a137a).createAccount(pendingAccount.email, pendingAccount.fullName, pendingAccount.password, clientId, redirectUri, authorizationParams, otpCode.trim(), captchaToken); 38763 if (result.success) { 38764 setUserEmail(pendingAccount.email); 38765 setIsSuccess(true); 38766 } else setOtpError('Signup failed. Please try again.'); 38767 } catch (err) { 38768 console.error('[Signup] Error creating account with OTP:', $8f4cb599cfbbdc50$var$getSignupErrorMessage(err)); 38769 setOtpError('An error occurred. Please try again.'); 38770 } finally{ 38771 setIsLoading(false); 38772 } 38773 }; 38774 const onResendOtp = async ()=>{ 38775 if (!pendingAccount) return; 38776 setIsResendingOtp(true); 38777 setOtpError(null); 38778 setOtpNotice(null); 38779 try { 38780 await (0, $fbea2876631f13de$export$5f19683c868a137a).sendOtp(pendingAccount.email, captchaToken); 38781 setOtpNotice('We sent a new code. If you do not see it, please check your spam folder too.'); 38782 } catch (err) { 38783 console.error('[Signup] Error resending signup OTP:', $8f4cb599cfbbdc50$var$getSignupErrorMessage(err)); 38784 setOtpError('Failed to resend verification code. Please try again.'); 38785 } finally{ 38786 setIsResendingOtp(false); 38787 } 38788 }; 38789 const handleGoogleSignup = ()=>{ 38790 // Check if terms are accepted before proceeding 38791 if (!termsAccepted) { 38792 setFormErrors({ 38793 termsAccepted: 'You must accept the terms and conditions' 38794 }); 38795 return; 38796 } 38797 (0, $fbea2876631f13de$export$5f19683c868a137a).ssoSignup(clientId, redirectUri, authorizationParams); 38798 }; 38799 const allErrors = (0, $ca7d1670581030c8$export$71511d61b312f219)({}, errors, formErrors); 38800 if (isSuccess) return /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 38801 className: "signup-form-overlay", 38802 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38803 className: "signup-form-modal success-modal", 38804 children: [ 38805 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 38806 className: "signup-form-close", 38807 onClick: onClose, 38808 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("svg", { 38809 width: "24", 38810 height: "24",
vendor: 1,910 bytes, lines 38811-38848
38811 viewBox: "0 0 24 24", 38812 fill: "none", 38813 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 38814 d: "M18 6L6 18M6 6L18 18", 38815 stroke: "currentColor", 38816 strokeWidth: "2", 38817 strokeLinecap: "round", 38818 strokeLinejoin: "round" 38819 }) 38820 }) 38821 }), 38822 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38823 className: "success-content", 38824 children: [ 38825 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("h2", { 38826 className: "success-title", 38827 children: "Email Verification Sent" 38828 }), 38829 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("p", { 38830 className: "success-message", 38831 children: "We\u2019ve sent a verification link to your email. Please open it to confirm your account. If you don\u2019t see it, check your spam or promotions folder." 38832 }) 38833 ] 38834 }) 38835 ] 38836 }) 38837 }); 38838 return /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 38839 className: "signup-form-overlay", 38840 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38841 className: "signup-form-modal", 38842 children: [ 38843 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 38844 className: "signup-form-close", 38845 onClick: onClose, 38846 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("svg", { 38847 width: "24", 38848 height: "24",
38849 viewBox: "0 0 24 24", 38850 fill: "none", 38851 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 38852 d: "M18 6L6 18M6 6L18 18", 38853 stroke: "currentColor", 38854 strokeWidth: "2", 38855 strokeLinecap: "round", 38856 strokeLinejoin: "round" 38857 }) 38858 }) 38859 }), 38860 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38861 className: "signup-form-header", 38862 children: [ 38863 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("h1", { 38864 className: "signup-form-title", 38865 children: mainTitle || 'sign up for free' 38866 }), 38867 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("p", { 38868 className: "signup-form-subtitle", 38869 children: mainSubtitle || 'Try Explorium AgentSource today. No credit card required.' 38870 }) 38871 ] 38872 }), 38873 currentStep === 1 && /* Step 1: Email and Google Signup */ /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("form", { 38874 onSubmit: handleStep1Submit, 38875 className: "signup-form", 38876 children: [ 38877 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38878 className: "form-field", 38879 children: [ 38880 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("input", { 38881 type: "email", 38882 placeholder: "*Your business email", 38883 className: `form-input ${allErrors.email ? 'error' : ''}`, 38884 value: step1Email, 38885 onChange: (e)=>setStep1Email(e.target.value) 38886 }), 38887 allErrors.email && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 38888 className: "error-message", 38889 children: allErrors.email 38890 }) 38891 ] 38892 }), 38893 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 38894 className: "button-container", 38895 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 38896 type: "submit", 38897 className: "submit-button", 38898 disabled: isLoading, 38899 children: "Sign up with your email" 38900 }) 38901 }), 38902 error && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 38903 className: "error-message global-error", 38904 children: error 38905 }), 38906 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 38907 className: "divider", 38908 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 38909 children: "or" 38910 }) 38911 }), 38912 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 38913 className: "button-container", 38914 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("button", { 38915 type: "button", 38916 className: "google-signup-button", 38917 onClick: handleGoogleSignup, 38918 children: [ 38919 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("svg", { 38920 className: "google-logo", 38921 width: "24", 38922 height: "24",
38923 viewBox: "0 0 20 20", 38924 fill: "none", 38925 children: [ 38926 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 38927 d: "M18.1712 8.36794H17.5V8.33335H9.99999V11.6667H14.7096C14.0225 13.6071 12.1762 15 9.99999 15C7.23874 15 4.99999 12.7613 4.99999 10C4.99999 7.23877 7.23874 5.00002 9.99999 5.00002C11.2746 5.00002 12.4342 5.48085 13.3171 6.26627L15.6742 3.90919C14.1858 2.5221 12.195 1.66669 9.99999 1.66669C5.39791 1.66669 1.66666 5.39794 1.66666 10C1.66666 14.6021 5.39791 18.3334 9.99999 18.3334C14.6021 18.3334 18.3333 14.6021 18.3333 10C18.3333 9.44127 18.2758 8.89585 18.1712 8.36794Z", 38928 fill: "#FFC107" 38929 }), 38930 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 38931 d: "M2.6275 6.12127L5.36542 8.12919C6.10625 6.29502 7.90042 5.00002 10 5.00002C11.2746 5.00002 12.4342 5.48085 13.3171 6.26627L15.6742 3.90919C14.1858 2.5221 12.195 1.66669 10 1.66669C6.79917 1.66669 4.02334 3.47377 2.6275 6.12127Z", 38932 fill: "#FF3D00" 38933 }), 38934 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 38935 d: "M9.99999 18.3333C12.1525 18.3333 14.1083 17.5096 15.5871 16.17L13.0079 13.9875C12.1431 14.6451 11.0864 15.0008 9.99999 15C7.83249 15 5.99207 13.6179 5.29874 11.6891L2.58124 13.7829C3.9604 16.4816 6.76124 18.3333 9.99999 18.3333Z", 38936 fill: "#4CAF50" 38937 }), 38938 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 38939 d: "M18.1712 8.3679H17.5V8.33331H10V11.6666H14.7096C14.3809 12.5902 13.7889 13.3971 13.0067 13.9879L13.0079 13.9871L15.5871 16.1696C15.4046 16.3354 18.3333 14.1666 18.3333 9.99998C18.3333 9.44123 18.2758 8.89581 18.1712 8.3679Z", 38940 fill: "#1976D2" 38941 }) 38942 ] 38943 }), 38944 "Sign up with Google" 38945 ] 38946 }) 38947 }), 38948 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38949 className: "form-field checkbox-field", 38950 children: [ 38951 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38952 className: "checkbox-label", 38953 children: [ 38954 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("input", (0, $ca7d1670581030c8$export$71511d61b312f219)({ 38955 type: "checkbox", 38956 className: "checkbox-input" 38957 }, register('termsAccepted'))), 38958 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38959 className: "checkbox-text", 38960 children: [ 38961 "I agree to Explorium's", 38962 ' ', 38963 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("a", { 38964 href: "https://www.explorium.ai/explorium-website-terms-of-use", 38965 target: "_blank", 38966 rel: "noopener noreferrer", 38967 children: "Terms and Conditions" 38968 }), 38969 ' ', 38970 "and", 38971 ' ', 38972 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("a", { 38973 href: "https://www.explorium.ai/privacy-policy", 38974 target: "_blank", 38975 rel: "noopener noreferrer", 38976 children: "Privacy Policy" 38977 }), 38978 "." 38979 ] 38980 }) 38981 ] 38982 }), 38983 allErrors.termsAccepted && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 38984 className: "error-message", 38985 children: allErrors.termsAccepted 38986 }) 38987 ] 38988 }) 38989 ] 38990 }), 38991 currentStep === 2 && /* Step 2: Full Name, Password, and Confirm Password */ /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("form", { 38992 onSubmit: handleSubmit(onSubmit), 38993 className: "signup-form", 38994 children: [ 38995 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 38996 className: "form-field", 38997 children: [ 38998 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("input", (0, $ca7d1670581030c8$export$71511d61b312f219)({ 38999 type: "text", 39000 placeholder: "*Full Name", 39001 className: `form-input ${allErrors.fullName ? 'error' : ''}` 39002 }, register('fullName'))), 39003 allErrors.fullName && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 39004 className: "error-message", 39005 children: allErrors.fullName 39006 }) 39007 ] 39008 }), 39009 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 39010 className: "form-field", 39011 children: [ 39012 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 39013 className: "password-input-container", 39014 children: [ 39015 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("input", (0, $ca7d1670581030c8$export$71511d61b312f219)({ 39016 type: showPassword ? 'text' : 'password', 39017 placeholder: "*Password", 39018 className: `form-input ${allErrors.password ? 'error' : ''}` 39019 }, register('password'))), 39020 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 39021 type: "button", 39022 className: "password-toggle", 39023 onClick: ()=>setShowPassword(!showPassword), 39024 children: showPassword ? /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("svg", { 39025 width: "20", 39026 height: "20",
39027 viewBox: "0 0 24 24", 39028 fill: "none", 39029 children: [ 39030 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 39031 d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24", 39032 stroke: "currentColor", 39033 strokeWidth: "2", 39034 strokeLinecap: "round", 39035 strokeLinejoin: "round" 39036 }), 39037 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("line", { 39038 x1: "1", 39039 y1: "1", 39040 x2: "23", 39041 y2: "23", 39042 stroke: "currentColor", 39043 strokeWidth: "2", 39044 strokeLinecap: "round", 39045 strokeLinejoin: "round" 39046 }) 39047 ] 39048 }) : /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("svg", { 39049 width: "20", 39050 height: "20",
39051 viewBox: "0 0 24 24", 39052 fill: "none", 39053 children: [ 39054 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 39055 d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z", 39056 stroke: "currentColor", 39057 strokeWidth: "2", 39058 strokeLinecap: "round", 39059 strokeLinejoin: "round" 39060 }), 39061 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("circle", { 39062 cx: "12", 39063 cy: "12", 39064 r: "3", 39065 stroke: "currentColor", 39066 strokeWidth: "2", 39067 strokeLinecap: "round", 39068 strokeLinejoin: "round" 39069 }) 39070 ] 39071 }) 39072 }) 39073 ] 39074 }), 39075 allErrors.password && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 39076 className: "error-message", 39077 children: allErrors.password 39078 }) 39079 ] 39080 }), 39081 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 39082 className: "form-field", 39083 children: [ 39084 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 39085 className: "password-input-container", 39086 children: [ 39087 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("input", (0, $ca7d1670581030c8$export$71511d61b312f219)({ 39088 type: showConfirmPassword ? 'text' : 'password', 39089 placeholder: "*Confirm Password", 39090 className: `form-input ${allErrors.confirmPassword ? 'error' : ''}` 39091 }, register('confirmPassword'))), 39092 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 39093 type: "button", 39094 className: "password-toggle", 39095 onClick: ()=>setShowConfirmPassword(!showConfirmPassword), 39096 children: showConfirmPassword ? /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("svg", { 39097 width: "20", 39098 height: "20",
39099 viewBox: "0 0 24 24", 39100 fill: "none", 39101 children: [ 39102 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 39103 d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24", 39104 stroke: "currentColor", 39105 strokeWidth: "2", 39106 strokeLinecap: "round", 39107 strokeLinejoin: "round" 39108 }), 39109 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("line", { 39110 x1: "1", 39111 y1: "1", 39112 x2: "23", 39113 y2: "23", 39114 stroke: "currentColor", 39115 strokeWidth: "2", 39116 strokeLinecap: "round", 39117 strokeLinejoin: "round" 39118 }) 39119 ] 39120 }) : /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("svg", { 39121 width: "20", 39122 height: "20",
39123 viewBox: "0 0 24 24", 39124 fill: "none", 39125 children: [ 39126 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("path", { 39127 d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z", 39128 stroke: "currentColor", 39129 strokeWidth: "2", 39130 strokeLinecap: "round", 39131 strokeLinejoin: "round" 39132 }), 39133 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("circle", { 39134 cx: "12", 39135 cy: "12", 39136 r: "3", 39137 stroke: "currentColor", 39138 strokeWidth: "2", 39139 strokeLinecap: "round", 39140 strokeLinejoin: "round" 39141 }) 39142 ] 39143 }) 39144 }) 39145 ] 39146 }), 39147 allErrors.confirmPassword && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 39148 className: "error-message", 39149 children: allErrors.confirmPassword 39150 }) 39151 ] 39152 }), 39153 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 39154 className: "form-field turnstile-field", 39155 children: [ 39156 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)($8f4cb599cfbbdc50$var$TurnstileWidget, { 39157 onSuccess: onCaptchaVerify, 39158 onError: onCaptchaError, 39159 onExpire: onCaptchaExpire 39160 }), 39161 captchaError && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 39162 className: "error-message", 39163 children: captchaError 39164 }) 39165 ] 39166 }), 39167 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 39168 className: "button-container", 39169 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 39170 type: "submit", 39171 className: "submit-button", 39172 disabled: isLoading, 39173 children: isLoading ? 'Sending code...' : 'Continue' 39174 }) 39175 }), 39176 error && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 39177 className: "error-message global-error", 39178 children: error 39179 }) 39180 ] 39181 }), 39182 currentStep === 3 && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("form", { 39183 onSubmit: onOtpSubmit, 39184 className: "signup-form", 39185 children: [ 39186 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("p", { 39187 className: "signup-form-subtitle", 39188 children: [ 39189 "We sent a verification code to ", 39190 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("strong", { 39191 children: pendingAccount === null || pendingAccount === void 0 ? void 0 : pendingAccount.email 39192 }), 39193 ". Enter it below to continue." 39194 ] 39195 }), 39196 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 39197 className: "form-field", 39198 children: [ 39199 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("input", { 39200 type: "text", 39201 inputMode: "numeric", 39202 autoComplete: "one-time-code", 39203 placeholder: "Enter the code from your email", 39204 className: `form-input ${otpError ? 'error' : ''}`, 39205 value: otpCode, 39206 onChange: (e)=>setOtpCode(e.target.value) 39207 }), 39208 otpError && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 39209 className: "error-message", 39210 children: otpError 39211 }), 39212 otpNotice && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("span", { 39213 className: "otp-notice", 39214 children: otpNotice 39215 }) 39216 ] 39217 }), 39218 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 39219 className: "button-container", 39220 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 39221 type: "submit", 39222 className: "submit-button", 39223 disabled: isLoading, 39224 children: isLoading ? 'Verifying...' : 'Verify code' 39225 }) 39226 }), 39227 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsxs)("div", { 39228 className: "otp-actions", 39229 children: [ 39230 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 39231 type: "button", 39232 className: "link-button", 39233 onClick: onResendOtp, 39234 disabled: isResendingOtp, 39235 children: isResendingOtp ? 'Sending...' : "Didn't get the code? Resend" 39236 }), 39237 /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("button", { 39238 type: "button", 39239 className: "link-button", 39240 onClick: ()=>{ 39241 setCurrentStep(2); 39242 setOtpError(null); 39243 setOtpNotice(null); 39244 setOtpCode(''); 39245 // No getTurnstile()?.reset() here â the widget unmounts on this step change and remounts fresh. 39246 setCaptchaToken(null); 39247 }, 39248 children: "Back to account details" 39249 }) 39250 ] 39251 }) 39252 ] 39253 }) 39254 ] 39255 }) 39256 }); 39257}; 39258 39259 39260 39261function $4452a8c5ec946ead$var$App({ mainTitle: mainTitle, mainSubtitle: mainSubtitle }) { 39262 // Initialize state based on URL check to prevent flash on first render 39263 const [showSignupForm, setShowSignupForm] = (0, $fYIks.useState)(()=>{ 39264 const config = (0, $ae59e8ec7b666bff$export$74e3474e86f2ede7)(); 39265 return config !== null; 39266 }); 39267 const [signupConfig, setSignupConfig] = (0, $fYIks.useState)(()=>{ 39268 return (0, $ae59e8ec7b666bff$export$74e3474e86f2ede7)(); 39269 }); 39270 // Check URL on mount and when URL changes 39271 (0, $fYIks.useEffect)(()=>{ 39272 const checkUrl = ()=>{ 39273 const config = (0, $ae59e8ec7b666bff$export$74e3474e86f2ede7)(); 39274 if (config) { 39275 setSignupConfig(config); 39276 setShowSignupForm(true); 39277 } else { 39278 // Don't show signup form if no matching hash found 39279 setSignupConfig(null); 39280 setShowSignupForm(false); 39281 } 39282 }; 39283 // Check on mount 39284 checkUrl(); 39285 // Listen for URL changes 39286 const handleHashChange = ()=>checkUrl(); 39287 const handlePopState = ()=>checkUrl(); 39288 window.addEventListener('hashchange', handleHashChange); 39289 window.addEventListener('popstate', handlePopState); 39290 return ()=>{ 39291 window.removeEventListener('hashchange', handleHashChange); 39292 window.removeEventListener('popstate', handlePopState); 39293 }; 39294 }, []); 39295 const handleClose = ()=>{ 39296 setShowSignupForm(false); 39297 if (window.location.hash) { 39298 const newUrl = window.location.href.split('#')[0]; 39299 window.history.replaceState({}, document.title, newUrl); 39300 } 39301 }; 39302 return /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)("div", { 39303 className: "App", 39304 children: showSignupForm && signupConfig && /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)((0, $8f4cb599cfbbdc50$export$cc15cfe224a6a69b), { 39305 clientId: signupConfig.clientId, 39306 redirectUri: signupConfig.redirectUri, 39307 onClose: handleClose, 39308 mainTitle: mainTitle, 39309 mainSubtitle: mainSubtitle 39310 }) 39311 }); 39312} 39313var $4452a8c5ec946ead$export$2e2bcd8739ae039 = $4452a8c5ec946ead$var$App; 39314 39315 39316 39317function $0719fd65cad234e2$var$renderSignupWidget(divId, mainTitle, mainSubtitle) { 39318 const SignupWidget = document.getElementById(divId); 39319 if (!SignupWidget) { 39320 console.error(`Element with id '${divId}' not found`); 39321 return false;
39322 } 39323 try { 39324 const root = (0, $2738edde298c9f1e$export$882461b6382ed46c)(SignupWidget); 39325 root.render(/*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)((0, (/*@__PURE__*/$parcel$interopDefault($fYIks))).StrictMode, { 39326 children: /*#__PURE__*/ (0, $393491384ce93f5d$exports.jsx)((0, $4452a8c5ec946ead$export$2e2bcd8739ae039), { 39327 mainTitle: mainTitle, 39328 mainSubtitle: mainSubtitle 39329 }) 39330 })); 39331 (0, $f653274e6d3f2024$export$2e2bcd8739ae039).init(); 39332 return true; 39333 } catch (error) { 39334 console.error(`Failed to render widget in element with id '${divId}':`, error); 39335 return false; 39336 } 39337} 39338// Widget API functions 39339function $0719fd65cad234e2$var$renderSignupForm(divId) { 39340 return $0719fd65cad234e2$var$renderSignupWidget(divId); 39341} 39342function $0719fd65cad234e2$var$renderSignupFormById(divId) { 39343 return $0719fd65cad234e2$var$renderSignupWidget(divId); 39344} 39345// Auto-load widgets when DOM is ready 39346function $0719fd65cad234e2$var$autoLoadWidgets() { 39347 console.log('explorium-signup-widget: Checking for existing widgets...'); 39348 // @ts-ignore 39349 if (!window.loadedSignupWidget && document.getElementById('explorium-signup-widget')) { 39350 console.log('explorium-signup-widget: Found widget 1, rendering...'); 39351 const success = $0719fd65cad234e2$var$renderSignupWidget('explorium-signup-widget'); 39352 if (success) // @ts-ignore 39353 window.loadedSignupWidget = true; 39354 } 39355 // @ts-ignore 39356 if (!window.loadedSignupWidget2 && document.getElementById('explorium-signup-widget-2')) { 39357 console.log('explorium-signup-widget: Found widget 2, rendering...'); 39358 const success = $0719fd65cad234e2$var$renderSignupWidget('explorium-signup-widget-2'); 39359 if (success) // @ts-ignore 39360 window.loadedSignupWidget2 = true; 39361 } 39362} 39363// Wait for DOM to be ready 39364if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', ()=>{ 39365 $0719fd65cad234e2$var$autoLoadWidgets(); 39366}); 39367else // DOM is already ready 39368$0719fd65cad234e2$var$autoLoadWidgets(); 39369// Also try to load widgets after a short delay to catch any late-arriving elements 39370setTimeout($0719fd65cad234e2$var$autoLoadWidgets, 100); 39371// Expose widget API on window object 39372Object.assign(window, { 39373 renderSignupForm: $0719fd65cad234e2$var$renderSignupForm, 39374 renderSignupFormById: $0719fd65cad234e2$var$renderSignupFormById, 39375 renderSignupWidget: $0719fd65cad234e2$var$renderSignupWidget, 39376 autoLoadWidgets: $0719fd65cad234e2$var$autoLoadWidgets 39377}); 39378console.log('explorium-signup-widget: Script loaded, API exposed on window object'); 39379 39380})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.