Auf der anderen Seite: So ist das Leben (评论: 在人生的另一边)


澄江堂扫地僧

评论
在人生的另一边


4
2022-05-09 01:48:09

这篇影评可能有剧透

来自豆瓣App


„,“

„,“

„,“

„].join(„“);$(„body“).delegate(„a.create-review, .top-tab .btn“,“click“,function(e){e.preventDefault();var o=$(this),a=o;if(o.hasClass(„cls_abnormal“)&&window._USER_ABNORMAL)return void(show_abnormal&&show_abnormal());o.attr(„href“)||(a=o.find(„a“));var n=$(„div.popup-container“),t=a.attr(„data-isverify“),r=a.attr(„data-verify-url“);if(t&&“false“!=t.toLowerCase())if($(„.topic-block“).length){var l=document.createElement(„div“);l.id=“gallery-topics-selection“,document.body.appendChild(l),window.renderGalleryTopicsSelection()}else location.href=a.attr(„href“);else n.size()
‚).appendTo(„body“);o[0].submit()}})}();;
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var t={};return n.m=e,n.c=t,n.p=““,n(0)}(function(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))switch(typeof e[n]){case“function“:break;case“object“:e[n]=function(n){var t=n.slice(1),r=e[n[0]];return function(e,n,o){r.apply(this,[e,n,o].concat(t))}}(e[n]);break;default:e[n]=e[e[n]]}return e}([function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar _vote = __webpack_require__(70);nnvar _vote2 = _interopRequireDefault(_vote);nnvar _comment = __webpack_require__(68);nnvar _comment2 = _interopRequireDefault(_comment);nnvar _ad_insert = __webpack_require__(71);nnvar _ad_insert2 = _interopRequireDefault(_ad_insert);nnfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }nn(function () {n var adInsert = new _ad_insert2.default();n if (document.readyState !== ‚loading‘) {n (0, _vote2.default)(document);n window.reviewObj && (0, _comment2.default)(document);n } else if (document.addEventListener) {n document.addEventListener(‚DOMContentLoaded‘, function () {n (0, _vote2.default)(document);n window.reviewObj && (0, _comment2.default)(document);n $(‚.comment-item‘).each(function (index, ele) {n // 长评回复 4 位展示信息流广告n if (index === 2) {n $(ele).after(adInsert.html());n }n });n }, false);n } else {n window.attachEvent(‚onreadystatechange‘, function () {n if (document.readyState !== ‚loading‘) {n (0, _vote2.default)(document);n window.reviewObj && (0, _comment2.default)(document);n }n });n }n window.onload = function () {n adInsert.getAd();n };n})(); /* global reviewObj */nn// index page jsnn//////////////////n// WEBPACK FOOTERn// ./src/js/review.jsn// module id = 0n// module chunks = 0n//# sourceURL=webpack:///./src/js/review.js?“)},function(module,exports){eval(„‚use strict‘;nnfunction unwrapExports (x) {ntreturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, ‚default‘) ? x[‚default‘] : x;n}nnfunction createCommonjsModule(fn, module) {ntreturn module = { exports: {} }, fn(module, module.exports), module.exports;n}nnvar _global = createCommonjsModule(function (module) {n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028nvar global = module.exports = typeof window != ‚undefined‘ && window.Math == Mathn ? window : typeof self != ‚undefined‘ && self.Math == Math ? selfn // eslint-disable-next-line no-new-funcn : Function(‚return this‘)();nif (typeof __g == ’number‘) __g = global; // eslint-disable-line no-undefn});nnvar _core = createCommonjsModule(function (module) {nvar core = module.exports = { version: ‚2.6.8‘ };nif (typeof __e == ’number‘) __e = core; // eslint-disable-line no-undefn});nvar _core_1 = _core.version;nnvar _aFunction = function (it) {n if (typeof it != ‚function‘) throw TypeError(it + ‚ is not a function!‘);n return it;n};nn// optional / simple context bindingnnvar _ctx = function (fn, that, length) {n _aFunction(fn);n if (that === undefined) return fn;n switch (length) {n case 1: return function (a) {n return fn.call(that, a);n };n case 2: return function (a, b) {n return fn.call(that, a, b);n };n case 3: return function (a, b, c) {n return fn.call(that, a, b, c);n };n }n return function (/* …args */) {n return fn.apply(that, arguments);n };n};nnvar _isObject = function (it) {n return typeof it === ‚object‘ ? it !== null : typeof it === ‚function‘;n};nnvar _anObject = function (it) {n if (!_isObject(it)) throw TypeError(it + ‚ is not an object!‘);n return it;n};nnvar _fails = function (exec) {n try {n return !!exec();n } catch (e) {n return true;n }n};nn// Thank’s IE8 for his funny definePropertynvar _descriptors = !_fails(function () {n return Object.defineProperty({}, ‚a‘, { get: function () { return 7; } }).a != 7;n});nnvar document$1 = _global.document;n// typeof document.createElement is ‚object‘ in old IEnvar is = _isObject(document$1) && _isObject(document$1.createElement);nvar _domCreate = function (it) {n return is ? document$1.createElement(it) : {};n};nnvar _ie8DomDefine = !_descriptors && !_fails(function () {n return Object.defineProperty(_domCreate(‚div‘), ‚a‘, { get: function () { return 7; } }).a != 7;n});nn// 7.1.1 ToPrimitive(input [, PreferredType])nn// instead of the ES6 spec version, we didn’t implement @@toPrimitive casen// and the second argument – flag – preferred type is a stringnvar _toPrimitive = function (it, S) {n if (!_isObject(it)) return it;n var fn, val;n if (S && typeof (fn = it.toString) == ‚function‘ && !_isObject(val = fn.call(it))) return val;n if (typeof (fn = it.valueOf) == ‚function‘ && !_isObject(val = fn.call(it))) return val;n if (!S && typeof (fn = it.toString) == ‚function‘ && !_isObject(val = fn.call(it))) return val;n throw TypeError(„Can’t convert object to primitive value“);n};nnvar dP = Object.defineProperty;nnvar f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {n _anObject(O);n P = _toPrimitive(P, true);n _anObject(Attributes);n if (_ie8DomDefine) try {n return dP(O, P, Attributes);n } catch (e) { /* empty */ }n if (‚get‘ in Attributes || ’set‘ in Attributes) throw TypeError(‚Accessors not supported!‘);n if (‚value‘ in Attributes) O[P] = Attributes.value;n return O;n};nnvar _objectDp = {ntf: fn};nnvar _propertyDesc = function (bitmap, value) {n return {n enumerable: !(bitmap & 1),n configurable: !(bitmap & 2),n writable: !(bitmap & 4),n value: valuen };n};nnvar _hide = _descriptors ? function (object, key, value) {n return _objectDp.f(object, key, _propertyDesc(1, value));n} : function (object, key, value) {n object[key] = value;n return object;n};nnvar hasOwnProperty = {}.hasOwnProperty;nvar _has = function (it, key) {n return hasOwnProperty.call(it, key);n};nnvar PROTOTYPE = ‚prototype‘;nnvar $export = function (type, name, source) {n var IS_FORCED = type & $export.F;n var IS_GLOBAL = type & $export.G;n var IS_STATIC = type & $export.S;n var IS_PROTO = type & $export.P;n var IS_BIND = type & $export.B;n var IS_WRAP = type & $export.W;n var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});n var expProto = exports[PROTOTYPE];n var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];n var key, own, out;n if (IS_GLOBAL) source = name;n for (key in source) {n // contains in nativen own = !IS_FORCED && target && target[key] !== undefined;n if (own && _has(exports, key)) continue;n // export native or passedn out = own ? target[key] : source[key];n // prevent global pollution for namespacesn exports[key] = IS_GLOBAL && typeof target[key] != ‚function‘ ? source[key]n // bind timers to global for call from export contextn : IS_BIND && own ? _ctx(out, _global)n // wrap global constructors for prevent change them in libraryn : IS_WRAP && target[key] == out ? (function (C) {n var F = function (a, b, c) {n if (this instanceof C) {n switch (arguments.length) {n case 0: return new C();n case 1: return new C(a);n case 2: return new C(a, b);n } return new C(a, b, c);n } return C.apply(this, arguments);n };n F[PROTOTYPE] = C[PROTOTYPE];n return F;n // make static versions for prototype methodsn })(out) : IS_PROTO && typeof out == ‚function‘ ? _ctx(Function.call, out) : out;n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%n if (IS_PROTO) {n (exports.virtual || (exports.virtual = {}))[key] = out;n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%n if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);n }n }n};n// type bitmapn$export.F = 1; // forcedn$export.G = 2; // globaln$export.S = 4; // staticn$export.P = 8; // proton$export.B = 16; // bindn$export.W = 32; // wrapn$export.U = 64; // safen$export.R = 128; // real proto method for `library`nvar _export = $export;nnvar toString = {}.toString;nnvar _cof = function (it) {n return toString.call(it).slice(8, -1);n};nn// fallback for non-array-like ES3 and non-enumerable old V8 stringsnn// eslint-disable-next-line no-prototype-builtinsnvar _iobject = Object(‚z‘).propertyIsEnumerable(0) ? Object : function (it) {n return _cof(it) == ‚String‘ ? it.split(“) : Object(it);n};nn// 7.2.1 RequireObjectCoercible(argument)nvar _defined = function (it) {n if (it == undefined) throw TypeError(„Can’t call method on “ + it);n return it;n};nn// to indexed object, toObject with fallback for non-array-like ES3 stringsnnnvar _toIobject = function (it) {n return _iobject(_defined(it));n};nn// 7.1.4 ToIntegernvar ceil = Math.ceil;nvar floor = Math.floor;nvar _toInteger = function (it) {n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);n};nn// 7.1.15 ToLengthnnvar min = Math.min;nvar _toLength = function (it) {n return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) – 1 == 9007199254740991n};nnvar max = Math.max;nvar min$1 = Math.min;nvar _toAbsoluteIndex = function (index, length) {n index = _toInteger(index);n return index Array#indexOfn// true -> Array#includesnnnnvar _arrayIncludes = function (IS_INCLUDES) {n return function ($this, el, fromIndex) {n var O = _toIobject($this);n var length = _toLength(O.length);n var index = _toAbsoluteIndex(fromIndex, length);n var value;n // Array#includes uses SameValueZero equality algorithmn // eslint-disable-next-line no-self-comparen if (IS_INCLUDES && el != el) while (length > index) {n value = O[index++];n // eslint-disable-next-line no-self-comparen if (value != value) return true;n // Array#indexOf ignores holes, Array#includes – notn } else for (;length > index; index++) if (IS_INCLUDES || index in O) {n if (O[index] === el) return IS_INCLUDES || index || 0;n } return !IS_INCLUDES && -1;n };n};nnvar _library = true;nnvar _shared = createCommonjsModule(function (module) {nvar SHARED = ‚__core-js_shared__‘;nvar store = _global[SHARED] || (_global[SHARED] = {});nn(module.exports = function (key, value) {n return store[key] || (store[key] = value !== undefined ? value : {});n})(‚versions‘, []).push({n version: _core.version,n mode: ‚pure‘,n copyright: ‚© 2019 Denis Pushkarev (zloirock.ru)’n});n});nnvar id = 0;nvar px = Math.random();nvar _uid = function (key) {n return ‚Symbol(‚.concat(key === undefined ? “ : key, ‚)_‘, (++id + px).toString(36));n};nnvar shared = _shared(‚keys‘);nnvar _sharedKey = function (key) {n return shared[key] || (shared[key] = _uid(key));n};nnvar arrayIndexOf = _arrayIncludes(false);nvar IE_PROTO = _sharedKey(‚IE_PROTO‘);nnvar _objectKeysInternal = function (object, names) {n var O = _toIobject(object);n var i = 0;n var result = [];n var key;n for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);n // Don’t enum bug & hidden keysn while (names.length > i) if (_has(O, key = names[i++])) {n ~arrayIndexOf(result, key) || result.push(key);n }n return result;n};nn// IE 8- don’t enum bug keysnvar _enumBugKeys = (n ‚constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf’n).split(‚,‘);nn// 19.1.2.14 / 15.2.3.14 Object.keys(O)nnnnvar _objectKeys = Object.keys || function keys(O) {n return _objectKeysInternal(O, _enumBugKeys);n};nnvar _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {n _anObject(O);n var keys = _objectKeys(Properties);n var length = keys.length;n var i = 0;n var P;n while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);n return O;n};nnvar document$2 = _global.document;nvar _html = document$2 && document$2.documentElement;nn// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])nnnnvar IE_PROTO$1 = _sharedKey(‚IE_PROTO‘);nvar Empty = function () { /* empty */ };nvar PROTOTYPE$1 = ‚prototype‘;nn// Create object with fake `null` prototype: use iframe Object with cleared prototypenvar createDict = function () {n // Thrash, waste and sodomy: IE GC bugn var iframe = _domCreate(‚iframe‘);n var i = _enumBugKeys.length;n var lt = “;n var iframeDocument;n iframe.style.display = ’none‘;n _html.appendChild(iframe);n iframe.src = ‚javascript:‘; // eslint-disable-line no-script-urln // createDict = iframe.contentWindow.Object;n // html.removeChild(iframe);n iframeDocument = iframe.contentWindow.document;n iframeDocument.open();n iframeDocument.write(lt + ’script‘ + gt + ‚document.F=Object‘ + lt + ‚/script‘ + gt);n iframeDocument.close();n createDict = iframeDocument.F;n while (i–) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];n return createDict();n};nnvar _objectCreate = Object.create || function create(O, Properties) {n var result;n if (O !== null) {n Empty[PROTOTYPE$1] = _anObject(O);n result = new Empty();n Empty[PROTOTYPE$1] = null;n // add „__proto__“ for Object.getPrototypeOf polyfilln result[IE_PROTO$1] = O;n } else result = createDict();n return Properties === undefined ? result : _objectDps(result, Properties);n};nn// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])n_export(_export.S, ‚Object‘, { create: _objectCreate });nnvar $Object = _core.Object;nvar create = function create(P, D) {n return $Object.create(P, D);n};nnvar create$1 = create;nnfunction _inheritsLoose(subClass, superClass) {n subClass.prototype = create$1(superClass.prototype);n subClass.prototype.constructor = subClass;n subClass.__proto__ = superClass;n}nnvar inheritsLoose = _inheritsLoose;nnfunction styleInject(css, ref) {n if ( ref === void 0 ) ref = {};n var insertAt = ref.insertAt;nn if (!css || typeof document === ‚undefined‘) { return; }nn var head = document.head || document.getElementsByTagName(‚head‘)[0];n var style = document.createElement(’style‘);n style.type = ‚text/css‘;nn if (insertAt === ‚top‘) {n if (head.firstChild) {n head.insertBefore(style, head.firstChild);n } else {n head.appendChild(style);n }n } else {n head.appendChild(style);n }nn if (style.styleSheet) {n style.styleSheet.cssText = css;n } else {n style.appendChild(document.createTextNode(css));n }n}nnvar reactIs_development = createCommonjsModule(function (module, exports) {nnnn{n (function() {nnObject.defineProperty(exports, ‚__esModule‘, { value: true });nn// The Symbol used to tag the ReactElement-like types. If there is no native Symboln// nor polyfill, then a plain number is used for performance.nvar hasSymbol = typeof Symbol === ‚function‘ && Symbol.for;nnvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for(‚react.element‘) : 0xeac7;nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for(‚react.portal‘) : 0xeaca;nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for(‚react.fragment‘) : 0xeacb;nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for(‚react.strict_mode‘) : 0xeacc;nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for(‚react.profiler‘) : 0xead2;nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for(‚react.provider‘) : 0xeacd;nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for(‚react.context‘) : 0xeace;nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for(‚react.async_mode‘) : 0xeacf;nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for(‚react.concurrent_mode‘) : 0xeacf;nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for(‚react.forward_ref‘) : 0xead0;nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for(‚react.suspense‘) : 0xead1;nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for(‚react.memo‘) : 0xead3;nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for(‚react.lazy‘) : 0xead4;nnfunction isValidElementType(type) {n return typeof type === ’string‘ || typeof type === ‚function‘ ||n // Note: its typeof might be other than ’symbol‘ or ’number‘ if it’s a polyfill.n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === ‚object‘ && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);n}nn/**n * Forked from fbjs/warning:n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.jsn *n * Only change is we use console.warn instead of console.error,n * and do nothing when ‚console‘ is not supported.n * This really simplifies the code.n * —n * Similar to invariant but only logs a warning if the condition is not met.n * This can be used to log issues in development environments in criticaln * paths. Removing the logging code for production environments will keep then * same logic and follow the same code paths.n */nnvar lowPriorityWarning = function () {};nn{n var printWarning = function (format) {n for (var _len = arguments.length, args = Array(_len > 1 ? _len – 1 : 0), _key = 1; _key 2 ? _len2 – 2 : 0), _key2 = 2; _key2 >‘;nn // Important!n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.n var ReactPropTypes = {n array: createPrimitiveTypeChecker(‚array‘),n bool: createPrimitiveTypeChecker(‚boolean‘),n func: createPrimitiveTypeChecker(‚function‘),n number: createPrimitiveTypeChecker(’number‘),n object: createPrimitiveTypeChecker(‚object‘),n string: createPrimitiveTypeChecker(’string‘),n symbol: createPrimitiveTypeChecker(’symbol‘),nn any: createAnyTypeChecker(),n arrayOf: createArrayOfTypeChecker,n element: createElementTypeChecker(),n elementType: createElementTypeTypeChecker(),n instanceOf: createInstanceTypeChecker,n node: createNodeChecker(),n objectOf: createObjectOfTypeChecker,n oneOf: createEnumTypeChecker,n oneOfType: createUnionTypeChecker,n shape: createShapeTypeChecker,n exact: createStrictShapeTypeChecker,n };nn /**n * inlined Object.is polyfill to avoid requiring consumers ship their ownn * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isn */n /*eslint-disable no-self-compare*/n function is(x, y) {n // SameValue algorithmn if (x === y) {n // Steps 1-5, 7-10n // Steps 6.b-6.e: +0 != -0n return x !== 0 || 1 / x === 1 / y;n } else {n // Step 6.a: NaN == NaNn return x !== x && y !== y;n }n }n /*eslint-enable no-self-compare*/nn /**n * We use an Error-like object for backward compatibility as people may calln * PropTypes directly and inspect their output. However, we don’t use realn * Errors anymore. We don’t inspect their stack anyway, and creating themn * is prohibitively expensive if they are created too often, such as whatn * happens in oneOfType() for any type before the one that matched.n */n function PropTypeError(message) {n this.message = message;n this.stack = “;n }n // Make `instanceof Error` still work for returned errors.n PropTypeError.prototype = Error.prototype;nn function createChainableTypeChecker(validate) {n {n var manualPropTypeCallCache = {};n var manualPropTypeWarningCount = 0;n }n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {n componentName = componentName || ANONYMOUS;n propFullName = propFullName || propName;nn if (secret !== ReactPropTypesSecret_1) {n if (throwOnDirectAccess) {n // New behavior only for users of `prop-types` packagen var err = new Error(n ‚Calling PropTypes validators directly is not supported by the `prop-types` package. ‚ +n ‚Use `PropTypes.checkPropTypes()` to call them. ‚ +n ‚Read more at http://fb.me/use-check-prop-types’n );n err.name = ‚Invariant Violation‘;n throw err;n } else if (typeof console !== ‚undefined‘) {n // Old behavior for people using React.PropTypesn var cacheKey = componentName + ‚:‘ + propName;n if (n !manualPropTypeCallCache[cacheKey] &&n // Avoid spamming the console because they are often not actionable except for lib authorsn manualPropTypeWarningCount 1) {n printWarning$1(n ‚Invalid arguments supplied to oneOf, expected an array, got ‚ + arguments.length + ‚ arguments. ‚ +n ‚A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).’n );n } else {n printWarning$1(‚Invalid argument supplied to oneOf, expected an array.‘);n }n }n return emptyFunctionThatReturnsNull;n }nn function validate(props, propName, componentName, location, propFullName) {n var propValue = props[propName];n for (var i = 0; i undefinedn * typeof document -> undefinedn *n * react-native:n * navigator.product -> ‚ReactNative’n */nfunction isStandardBrowserEnv() {n if (typeof navigator !== ‚undefined‘ && navigator.product === ‚ReactNative‘) {n return false;n }n return (n typeof window !== ‚undefined‘ &&n typeof document !== ‚undefined’n );n}nn/**n * Iterate over an Array or an Object invoking a function for each item.n *n * If `obj` is an Array callback will be called passingn * the value, index, and complete array for each item.n *n * If ‚obj‘ is an Object callback will be called passingn * the value, key, and complete object for each property.n *n * @param {Object|Array} obj The object to iteraten * @param {Function} fn The callback to invoke for each itemn */nfunction forEach(obj, fn) {n // Don’t bother if no value providedn if (obj === null || typeof obj === ‚undefined‘) {n return;n }nn // Force an array if not already something iterablen if (typeof obj !== ‚object‘) {n /*eslint no-param-reassign:0*/n obj = [obj];n }nn if (isArray(obj)) {n // Iterate over array valuesn for (var i = 0, l = obj.length; i index) {n var S = __chunk_1.IObject(arguments[index++]);n var keys = getSymbols ? __chunk_1.$keys(S).concat(getSymbols(S)) : __chunk_1.$keys(S);n var length = keys.length;n var j = 0;n var key;n while (length > j) {n key = keys[j++];n if (!__chunk_1.DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];n }n } return T;n} : $assign;nn// 19.1.3.1 Object.assign(target, source)nnn__chunk_1.$export(__chunk_1.$export.S + __chunk_1.$export.F, ‚Object‘, { assign: _objectAssign });nnvar assign = __chunk_1.core.Object.assign;nnvar assign$1 = assign;nn// most Object methods by ES6 should accept primitivesnnnnvar _objectSap = function (KEY, exec) {n var fn = (__chunk_1.core.Object || {})[KEY] || Object[KEY];n var exp = {};n exp[KEY] = exec(fn);n __chunk_1.$export(__chunk_1.$export.S + __chunk_1.$export.F * __chunk_1.fails(function () { fn(1); }), ‚Object‘, exp);n};nn// 19.1.2.14 Object.keys(O)nnnn_objectSap(‚keys‘, function () {n return function keys(it) {n return __chunk_1.$keys(_toObject(it));n };n});nnvar keys = __chunk_1.core.Object.keys;nnvar keys$1 = keys;nnexports._Object$assign = assign$1;nexports._Object$keys = keys$1;nexports.assign = assign$1;nexports.toObject = _toObject;n//# sourceMappingURL=chunk-ff3464e9.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-ff3464e9.jsn// module id = 6n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-ff3464e9.js?“)},function(module,exports){eval(„var cid = 1;nnfunction buildParams(params) {n var result = [];nn for (var i in params) {n result.push(encodeURIComponent(i) + ‚=‘ + encodeURIComponent(params[i]));n }nn return result.join(‚&‘);n}nnmodule.exports = function jsonpAdapter(config) {n return new Promise(function(resolve, reject) {n var script = document.createElement(’script‘);n var src = config.url;nn if (config.params) {n var params = buildParams(config.params);nn if (params) {n src += (src.indexOf(‚?‘) >= 0 ? ‚&‘ : ‚?‘) + params;n }n }nn script.async = true;nn function remove() {n if (script) {n script.onload = script.onreadystatechange = script.onerror = null;nn if (script.parentNode) {n script.parentNode.removeChild(script);n }nn script = null;n }n }nn var jsonp = ‚axiosJsonpCallback‘ + cid++;n var old = window[jsonp];n var isAbort = false;nn window[jsonp] = function(responseData) {n window[jsonp] = old;nn if (isAbort) {n return;n }n n var response = {n data: responseData,n status: 200n }nn resolve(response);n };nn var additionalParams = {n _: (new Date().getTime())n };n n additionalParams[config.callbackParamName || ‚callback‘] = jsonp;nn src += (src.indexOf(‚?‘) >= 0 ? ‚&‘ : ‚?‘) + buildParams(additionalParams);nn script.onload = script.onreadystatechange = function() {n if (!script.readyState || /loaded|complete/.test(script.readyState)) {n remove();n }n };nn script.onerror = function() {n remove();nn reject(new Error(‚Network Error‘));n };nn if (config.cancelToken) {n config.cancelToken.promise.then(function(cancel) {n if (!script) {n return;n }nn isAbort = true;nn reject(cancel);n });n } nn script.src = src;nn document.head.appendChild(script);n });n};nn//////////////////n// WEBPACK FOOTERn// ./~/axios-jsonp/lib/index.jsn// module id = 7n// module chunks = 0n//# sourceURL=webpack:///./~/axios-jsonp/lib/index.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar __chunk_1 = __webpack_require__(1);nnvar $JSON = __chunk_1.core.JSON || (__chunk_1.core.JSON = { stringify: JSON.stringify });nvar stringify = function stringify(it) { // eslint-disable-line no-unused-varsn return $JSON.stringify.apply($JSON, arguments);n};nnvar stringify$1 = stringify;nnexports._JSON$stringify = stringify$1;n//# sourceMappingURL=chunk-77a36b54.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-77a36b54.jsn// module id = 8n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-77a36b54.js?“)},function(module,exports,__webpack_require__){eval(„/* WEBPACK VAR INJECTION */(function(process) {‚use strict‘;nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‚object‘) && ‚default‘ in ex) ? ex[‚default‘] : ex; }nnvar __chunk_1 = __webpack_require__(1);nvar __chunk_2 = __webpack_require__(6);nvar feUtils = __webpack_require__(10);nvar Cookies = _interopDefault(__webpack_require__(5));nvar jsonpAdapter = _interopDefault(__webpack_require__(7));nn// 7.2.2 IsArray(argument)nnvar _isArray = Array.isArray || function isArray(arg) {n return __chunk_1.require$$1(arg) == ‚Array‘;n};nn// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)nnn__chunk_1.$export(__chunk_1.$export.S, ‚Array‘, { isArray: _isArray });nnvar isArray = __chunk_1.core.Array.isArray;nnvar isArray$1 = isArray;nn// true -> String#atn// false -> String#codePointAtnvar _stringAt = function (TO_STRING) {n return function (that, pos) {n var s = String(__chunk_1.defined(that));n var i = __chunk_1.toInteger(pos);n var l = s.length;n var a, b;n if (i = l) return TO_STRING ? “ : undefined;n a = s.charCodeAt(i);n return a 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) 0xdfffn ? TO_STRING ? s.charAt(i) : an : TO_STRING ? s.slice(i, i + 2) : (a – 0xd800 = O.length) return { value: undefined, done: true };n point = $at(O, index);n this._i += point.length;n return { value: point, done: false };n});nnvar _iterStep = function (done, value) {n return { value: value, done: !!done };n};nn// 22.1.3.4 Array.prototype.entries()n// 22.1.3.13 Array.prototype.keys()n// 22.1.3.29 Array.prototype.values()n// 22.1.3.30 Array.prototype[@@iterator]()nvar es6_array_iterator = _iterDefine(Array, ‚Array‘, function (iterated, kind) {n this._t = __chunk_1.toIObject(iterated); // targetn this._i = 0; // next indexn this._k = kind; // kindn// 22.1.5.2.1 %ArrayIteratorPrototype%.next()n}, function () {n var O = this._t;n var kind = this._k;n var index = this._i++;n if (!O || index >= O.length) {n this._t = undefined;n return _iterStep(1);n }n if (kind == ‚keys‘) return _iterStep(0, index);n if (kind == ‚values‘) return _iterStep(0, O[index]);n return _iterStep(0, [index, O[index]]);n}, ‚values‘);nn// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)n_iterators.Arguments = _iterators.Array;nnvar TO_STRING_TAG = _wks(‚toStringTag‘);nnvar DOMIterables = (‚CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,‘ +n ‚DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,‘ +n ‚MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,‘ +n ‚SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,‘ +n ‚TextTrackList,TouchList‘).split(‚,‘);nnfor (var i = 0; i index; index++) {n result = entries ? f(__chunk_1.anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);n if (result === BREAK || result === RETURN) return result;n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {n result = _iterCall(iterator, f, step.value, entries);n if (result === BREAK || result === RETURN) return result;n }n};nexports.BREAK = BREAK;nexports.RETURN = RETURN;n});nn// 7.3.20 SpeciesConstructor(O, defaultConstructor)nnnvar SPECIES = _wks(’species‘);nvar _speciesConstructor = function (O, D) {n var C = __chunk_1.anObject(O).constructor;n var S;n return C === undefined || (S = __chunk_1.anObject(C)[SPECIES]) == undefined ? D : __chunk_1.aFunction(S);n};nn// fast apply, http://jsperf.lnkit.com/fast-apply/5nvar _invoke = function (fn, args, that) {n var un = that === undefined;n switch (args.length) {n case 0: return un ? fn()n : fn.call(that);n case 1: return un ? fn(args[0])n : fn.call(that, args[0]);n case 2: return un ? fn(args[0], args[1])n : fn.call(that, args[0], args[1]);n case 3: return un ? fn(args[0], args[1], args[2])n : fn.call(that, args[0], args[1], args[2]);n case 4: return un ? fn(args[0], args[1], args[2], args[3])n : fn.call(that, args[0], args[1], args[2], args[3]);n } return fn.apply(that, args);n};nnvar process$1 = __chunk_1.global.process;nvar setTask = __chunk_1.global.setImmediate;nvar clearTask = __chunk_1.global.clearImmediate;nvar MessageChannel = __chunk_1.global.MessageChannel;nvar Dispatch = __chunk_1.global.Dispatch;nvar counter = 0;nvar queue = {};nvar ONREADYSTATECHANGE = ‚onreadystatechange‘;nvar defer, channel, port;nvar run = function () {n var id = +this;n // eslint-disable-next-line no-prototype-builtinsn if (queue.hasOwnProperty(id)) {n var fn = queue[id];n delete queue[id];n fn();n }n};nvar listener = function (event) {n run.call(event.data);n};n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:nif (!setTask || !clearTask) {n setTask = function setImmediate(fn) {n var args = [];n var i = 1;n while (arguments.length > i) args.push(arguments[i++]);n queue[++counter] = function () {n // eslint-disable-next-line no-new-funcn _invoke(typeof fn == ‚function‘ ? fn : Function(fn), args);n };n defer(counter);n return counter;n };n clearTask = function clearImmediate(id) {n delete queue[id];n };n // Node.js 0.8-n if (__chunk_1.require$$1(process$1) == ‚process‘) {n defer = function (id) {n process$1.nextTick(__chunk_1.ctx(run, id, 1));n };n // Sphere (JS game engine) Dispatch APIn } else if (Dispatch && Dispatch.now) {n defer = function (id) {n Dispatch.now(__chunk_1.ctx(run, id, 1));n };n // Browsers with MessageChannel, includes WebWorkersn } else if (MessageChannel) {n channel = new MessageChannel();n port = channel.port2;n channel.port1.onmessage = listener;n defer = __chunk_1.ctx(port.postMessage, port, 1);n // Browsers with postMessage, skip WebWorkersn // IE8 has postMessage, but it’s sync & typeof its postMessage is ‚object’n } else if (__chunk_1.global.addEventListener && typeof postMessage == ‚function‘ && !__chunk_1.global.importScripts) {n defer = function (id) {n __chunk_1.global.postMessage(id + “, ‚*‘);n };n __chunk_1.global.addEventListener(‚message‘, listener, false);n // IE8-n } else if (ONREADYSTATECHANGE in __chunk_1.cel(’script‘)) {n defer = function (id) {n __chunk_1.html.appendChild(__chunk_1.cel(’script‘))[ONREADYSTATECHANGE] = function () {n __chunk_1.html.removeChild(this);n run.call(id);n };n };n // Rest old browsersn } else {n defer = function (id) {n setTimeout(__chunk_1.ctx(run, id, 1), 0);n };n }n}nvar _task = {n set: setTask,n clear: clearTaskn};nnvar macrotask = _task.set;nvar Observer = __chunk_1.global.MutationObserver || __chunk_1.global.WebKitMutationObserver;nvar process$2 = __chunk_1.global.process;nvar Promise = __chunk_1.global.Promise;nvar isNode = __chunk_1.require$$1(process$2) == ‚process‘;nnvar _microtask = function () {n var head, last, notify;nn var flush = function () {n var parent, fn;n if (isNode && (parent = process$2.domain)) parent.exit();n while (head) {n fn = head.fn;n head = head.next;n try {n fn();n } catch (e) {n if (head) notify();n else last = undefined;n throw e;n }n } last = undefined;n if (parent) parent.enter();n };nn // Node.jsn if (isNode) {n notify = function () {n process$2.nextTick(flush);n };n // browsers with MutationObserver, except iOS Safari – https://github.com/zloirock/core-js/issues/339n } else if (Observer && !(__chunk_1.global.navigator && __chunk_1.global.navigator.standalone)) {n var toggle = true;n var node = document.createTextNode(“);n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-newn notify = function () {n node.data = toggle = !toggle;n };n // environments with maybe non-completely correct, but existent Promisen } else if (Promise && Promise.resolve) {n // Promise.resolve without an argument throws an error in LG WebOS 2n var promise = Promise.resolve(undefined);n notify = function () {n promise.then(flush);n };n // for other environments – macrotask based on:n // – setImmediaten // – MessageChanneln // – window.postMessagn // – onreadystatechangen // – setTimeoutn } else {n notify = function () {n // strange IE + webpack dev server bug – use .call(global)n macrotask.call(__chunk_1.global, flush);n };n }nn return function (fn) {n var task = { fn: fn, next: undefined };n if (last) last.next = task;n if (!head) {n head = task;n notify();n } last = task;n };n};nn// 25.4.1.5 NewPromiseCapability(C)nnnfunction PromiseCapability(C) {n var resolve, reject;n this.promise = new C(function ($$resolve, $$reject) {n if (resolve !== undefined || reject !== undefined) throw TypeError(‚Bad Promise constructor‘);n resolve = $$resolve;n reject = $$reject;n });n this.resolve = __chunk_1.aFunction(resolve);n this.reject = __chunk_1.aFunction(reject);n}nnvar f = function (C) {n return new PromiseCapability(C);n};nnvar _newPromiseCapability = {ntf: fn};nnvar _perform = function (exec) {n try {n return { e: false, v: exec() };n } catch (e) {n return { e: true, v: e };n }n};nnvar navigator = __chunk_1.global.navigator;nnvar _userAgent = navigator && navigator.userAgent || “;nnvar _promiseResolve = function (C, x) {n __chunk_1.anObject(C);n if (__chunk_1.isObject(x) && x.constructor === C) return x;n var promiseCapability = _newPromiseCapability.f(C);n var resolve = promiseCapability.resolve;n resolve(x);n return promiseCapability.promise;n};nnvar _redefineAll = function (target, src, safe) {n for (var key in src) {n if (safe && target[key]) target[key] = src[key];n else __chunk_1.hide(target, key, src[key]);n } return target;n};nnvar SPECIES$1 = _wks(’species‘);nnvar _setSpecies = function (KEY) {n var C = typeof __chunk_1.core[KEY] == ‚function‘ ? __chunk_1.core[KEY] : __chunk_1.global[KEY];n if (__chunk_1.DESCRIPTORS && C && !C[SPECIES$1]) __chunk_1.dP.f(C, SPECIES$1, {n configurable: true,n get: function () { return this; }n });n};nnvar ITERATOR$3 = _wks(‚iterator‘);nvar SAFE_CLOSING = false;nntry {n var riter = [7][ITERATOR$3]();n riter[‚return‘] = function () { SAFE_CLOSING = true; };n} catch (e) { /* empty */ }nnvar _iterDetect = function (exec, skipClosing) {n if (!skipClosing && !SAFE_CLOSING) return false;n var safe = false;n try {n var arr = [7];n var iter = arr[ITERATOR$3]();n iter.next = function () { return { done: safe = true }; };n arr[ITERATOR$3] = function () { return iter; };n exec(arr);n } catch (e) { /* empty */ }n return safe;n};nnvar task = _task.set;nvar microtask = _microtask();nnnnnvar PROMISE = ‚Promise‘;nvar TypeError$1 = __chunk_1.global.TypeError;nvar process$3 = __chunk_1.global.process;nvar versions = process$3 && process$3.versions;nvar v8 = versions && versions.v8 || “;nvar $Promise = __chunk_1.global[PROMISE];nvar isNode$1 = _classof(process$3) == ‚process‘;nvar empty = function () { /* empty */ };nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;nvar newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f;nnvar USE_NATIVE = !!function () {n try {n // correct subclassing with @@species supportn var promise = $Promise.resolve(1);n var FakePromise = (promise.constructor = {})[_wks(’species‘)] = function (exec) {n exec(empty, empty);n };n // unhandled rejections tracking support, NodeJS Promise without it fails @@species testn return (isNode$1 || typeof PromiseRejectionEvent == ‚function‘)n && promise.then(empty) instanceof FakePromisen // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenablesn // https://bugs.chromium.org/p/chromium/issues/detail?id=830565n // we can’t detect it synchronously, so just check versionsn && v8.indexOf(‚6.6‘) !== 0n && _userAgent.indexOf(‚Chrome/66‘) === -1;n } catch (e) { /* empty */ }n}();nn// helpersnvar isThenable = function (it) {n var then;n return __chunk_1.isObject(it) && typeof (then = it.then) == ‚function‘ ? then : false;n};nvar notify = function (promise, isReject) {n if (promise._n) return;n promise._n = true;n var chain = promise._c;n microtask(function () {n var value = promise._v;n var ok = promise._s == 1;n var i = 0;n var run = function (reaction) {n var handler = ok ? reaction.ok : reaction.fail;n var resolve = reaction.resolve;n var reject = reaction.reject;n var domain = reaction.domain;n var result, then, exited;n try {n if (handler) {n if (!ok) {n if (promise._h == 2) onHandleUnhandled(promise);n promise._h = 1;n }n if (handler === true) result = value;n else {n if (domain) domain.enter();n result = handler(value); // may thrown if (domain) {n domain.exit();n exited = true;n }n }n if (result === reaction.promise) {n reject(TypeError$1(‚Promise-chain cycle‘));n } else if (then = isThenable(result)) {n then.call(result, resolve, reject);n } else resolve(result);n } else reject(value);n } catch (e) {n if (domain && !exited) domain.exit();n reject(e);n }n };n while (chain.length > i) run(chain[i++]); // variable length – can’t use forEachn promise._c = [];n promise._n = false;n if (isReject && !promise._h) onUnhandled(promise);n });n};nvar onUnhandled = function (promise) {n task.call(__chunk_1.global, function () {n var value = promise._v;n var unhandled = isUnhandled(promise);n var result, handler, console;n if (unhandled) {n result = _perform(function () {n if (isNode$1) {n process$3.emit(‚unhandledRejection‘, value, promise);n } else if (handler = __chunk_1.global.onunhandledrejection) {n handler({ promise: promise, reason: value });n } else if ((console = __chunk_1.global.console) && console.error) {n console.error(‚Unhandled promise rejection‘, value);n }n });n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS – shouldn promise._h = isNode$1 || isUnhandled(promise) ? 2 : 1;n } promise._a = undefined;n if (unhandled && result.e) throw result.v;n });n};nvar isUnhandled = function (promise) {n return promise._h !== 1 && (promise._a || promise._c).length === 0;n};nvar onHandleUnhandled = function (promise) {n task.call(__chunk_1.global, function () {n var handler;n if (isNode$1) {n process$3.emit(‚rejectionHandled‘, promise);n } else if (handler = __chunk_1.global.onrejectionhandled) {n handler({ promise: promise, reason: promise._v });n }n });n};nvar $reject = function (value) {n var promise = this;n if (promise._d) return;n promise._d = true;n promise = promise._w || promise; // unwrapn promise._v = value;n promise._s = 2;n if (!promise._a) promise._a = promise._c.slice();n notify(promise, true);n};nvar $resolve = function (value) {n var promise = this;n var then;n if (promise._d) return;n promise._d = true;n promise = promise._w || promise; // unwrapn try {n if (promise === value) throw TypeError$1(„Promise can’t be resolved itself“);n if (then = isThenable(value)) {n microtask(function () {n var wrapper = { _w: promise, _d: false }; // wrapn try {n then.call(value, __chunk_1.ctx($resolve, wrapper, 1), __chunk_1.ctx($reject, wrapper, 1));n } catch (e) {n $reject.call(wrapper, e);n }n });n } else {n promise._v = value;n promise._s = 1;n notify(promise, false);n }n } catch (e) {n $reject.call({ _w: promise, _d: false }, e); // wrapn }n};nn// constructor polyfillnif (!USE_NATIVE) {n // 25.4.3.1 Promise(executor)n $Promise = function Promise(executor) {n _anInstance(this, $Promise, PROMISE, ‚_h‘);n __chunk_1.aFunction(executor);n Internal.call(this);n try {n executor(__chunk_1.ctx($resolve, this, 1), __chunk_1.ctx($reject, this, 1));n } catch (err) {n $reject.call(this, err);n }n };n // eslint-disable-next-line no-unused-varsn Internal = function Promise(executor) {n this._c = []; // /g, ‚>‘).replace(/“/g, ‚“‚);n}nfunction encodeURIStr(str) {n // eslint-disable-next-line no-array-constructorn var regexs = new Array(new RegExp(‚%‘, ‚g‘), new RegExp(‚,‘, ‚g‘), new RegExp(‚/‘, ‚g‘), new RegExp(‚\\?‘, ‚g‘), new RegExp(‚:‘, ‚g‘), new RegExp(‚@‘, ‚g‘), new RegExp(‚&‘, ‚g‘), new RegExp(‚=‘, ‚g‘), new RegExp(‚\\+‘, ‚g‘), new RegExp(‚\\$‘, ‚g‘), new RegExp(‚#‘, ‚g‘)); // eslint-disable-next-line no-array-constructornn var replaces = new Array(‚%25‘, ‚%2C‘, ‚%2F‘, ‚%3F‘, ‚%3A‘, ‚%40‘, ‚%26‘, ‚%3D‘, ‚%2B‘, ‚%24‘, ‚%23‘);n regexs.forEach(function (reg, index) {n str = str.replace(reg, replaces[index]);n });n return str;n}nfunction extractText(text, entities, needEscape) {n if (needEscape === void 0) {n needEscape = true;n }nn var urls = entities.urls;n var userMentions = entities.user_mentions;n var topics = entities.topics;n var htmlList = [];n var entityList = [];n var result_text = “;n var start = 0;n var end = 0;n var begin = 0;n var plaintext = “;nn var renderUserMentionsTpl = function renderUserMentionsTpl(entity) {n var uid = entity.uid,n screen_name = entity.screen_name;nn var _screen_name = needEscape ? escapeHTML(screen_name) : screen_name;nn var tmpl = “
“ + _screen_name + „„;n return tmpl;n };nn var renderUrlsTpl = function renderUrlsTpl(entity) {n var url = entity.url,n expanded_url = entity.expanded_url;nn var _url = (needEscape ? escapeHTML(url) : url) || expanded_url;nn var tmpl = “
“ + _url + „„;n return tmpl;n };nn var renderTopicTpl = function renderTopicTpl(entity) {n var encoded_text = entity.encoded_text;nn var _encoded_text = encoded_text || (needEscape ? escapeHTML(text) : text);nn var tmpl = “
“ + _encoded_text + „„;n return tmpl;n };nn if (urls && isArray$1(urls)) {n entityList = urls;n }nn if (userMentions && isArray$1(userMentions)) {n entityList = entityList.concat(userMentions);n }nn if (topics && isArray$1(topics)) {n entityList = entityList.concat(topics);n }nn entityList.sort(function (a, b) {n return a.indices[0] – b.indices[0];n });nn if (entityList.length === 0) {n return needEscape ? escapeHTML(text) : text;n }nn entityList.forEach(function (entity, index) {n if (entity.uid) {n htmlList[index] = renderUserMentionsTpl(entity);n } else if (entity.url) {n htmlList[index] = renderUrlsTpl(entity);n } else {n entity.encoded_text = entity.encoded_text || encodeURIStr(needEscape ? escapeHTML(entity.text) : entity.text);n htmlList[index] = renderTopicTpl(entity);n }nn begin = index ? end : 0; // eslint-disable-next-line prefer-destructuringnn start = entity.indices[0]; // eslint-disable-next-line prefer-destructuringnn end = entity.indices[1];n plaintext = text.substring(begin, start);n result_text = result_text + (needEscape ? escapeHTML(plaintext) : plaintext) + htmlList[index];nn if (index === entityList.length – 1) {n result_text += needEscape ? escapeHTML(text.substring(end)) : text.substring(end);n }n });n return result_text;n}nn/*n * @Author: hanjiyunn * @Date: 2020-08-04 09:58:04n * @Last Modified by: hanjiyunn * @Last Modified time: 2022-03-28 17:32:52n */nvar MAX_STATUS_LENGTH = 140; // 转发到广播时,最多 140 字nnvar MAX_STATUS_COMMENTS_LENGTH = 280; // 广播下的回复,最多 280 字nnvar STATUS = ’status‘;nvar HTTPS_SHORT_DOUBAN = ‚https://douc.cc‘;nvar URL_RE = /(http|https):\/\/[-._/a-zA-Z0-9~?%#=@:&;*+]+\b[?#/*]*/;nvar FRODO_API_PREFIX = IS_DEV ? “ : ‚https://m.douban.com/rexxar‘;nnexports.CommentsAPI = CommentsAPI;nexports.HTTPS_SHORT_DOUBAN = HTTPS_SHORT_DOUBAN;nexports.IS_DEV = IS_DEV;nexports.MAX_STATUS_COMMENTS_LENGTH = MAX_STATUS_COMMENTS_LENGTH;nexports.MAX_STATUS_LENGTH = MAX_STATUS_LENGTH;nexports.STATUS = STATUS;nexports.URL_RE = URL_RE;nexports.extractText = extractText;n//# sourceMappingURL=chunk-f64b2c7b.js.mapnn/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27)))nn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-f64b2c7b.jsn// module id = 9n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-f64b2c7b.js?“);
},function(module,exports,__webpack_require__){eval(‚“use strict“;nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {n if (k2 === undefined) k2 = k;n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });n}) : (function(o, m, k, k2) {n if (k2 === undefined) k2 = k;n o[k2] = m[k];n}));nvar __exportStar = (this && this.__exportStar) || function(m, exports) {n for (var p in m) if (p !== „default“ && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);n};nObject.defineProperty(exports, „__esModule“, { value: true });n__exportStar(__webpack_require__(102), exports);n__exportStar(__webpack_require__(113), exports);n__exportStar(__webpack_require__(21), exports);n__exportStar(__webpack_require__(104), exports);n__exportStar(__webpack_require__(127), exports);n//# sourceMappingURL=index.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/index.jsn// module id = 10n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/index.js?‘)},function(module,exports){eval(„‚use strict‘;nn/*n * @Author: hanjiyunn * @Date: 2019-05-27 00:45:09n * @Last Modified by: hanjiyunn * @Last Modified time: 2019-05-27 00:45:43n */nvar DEFAULT = ‚default‘;nvar PENDING = ‚pending‘;nvar FAIL = ‚fail‘;nvar SUCCESS = ’success‘;nnexports.DEFAULT = DEFAULT;nexports.FAIL = FAIL;nexports.PENDING = PENDING;nexports.SUCCESS = SUCCESS;n//# sourceMappingURL=chunk-5571dd26.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-5571dd26.jsn// module id = 11n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-5571dd26.js?“)},function(module,exports,__webpack_require__){eval(“use strict‘;nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‚object‘) && ‚default‘ in ex) ? ex[‚default‘] : ex; }nnvar __chunk_1 = __webpack_require__(1);nvar React = __webpack_require__(2);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);nvar __chunk_4 = __webpack_require__(9);nvar __chunk_6 = __webpack_require__(8);nnfunction _assertThisInitialized(self) {n if (self === void 0) {n throw new ReferenceError(„this hasn’t been initialised – super() hasn’t been called“);n }nn return self;n}nnvar assertThisInitialized = _assertThisInitialized;nnvar css = „.form-input-wrapper {\n position: relative;\n border: 1px solid #D9D9D9;\n border-radius: 3px;\n}\n\n.suggest-wrap {\n position: absolute;\n top: 30px;\n min-width: 120px;\n border: 1px solid #c5c7d2;\n border-radius: 3px;\n font-size: 13px;\n background: #fff;\n display: none;\n z-index: 99;\n}\n.suggest-wrap.show {\n display: block;\n}\n.suggest-wrap ul {\n padding: 3px 0;\n margin: 0;\n}\n.suggest-wrap li {\n padding: 5px 7px;\n line-height: 20px;\n cursor: pointer;\n text-align: left;\n}\n.suggest-wrap li a {\n color: #333;\n}\n.suggest-wrap li a:hover {\n background: transparent;\n}\n.suggest-wrap li.on {\n background: #e9f0f8;\n}\n.suggest-wrap li img {\n height: 20px;\n width: 20px;\n float: left;\n margin-right: 5px;\n vertical-align: middle;\n}\n\n.form-pre {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n padding: 10px 8px;\n margin: 0;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n z-index: -1;\n font: 13px Helvetica, Arial, sans-serif;\n color: #f00;\n}\n.form-pre code {\n font: 13px Helvetica, Arial, sans-serif;\n}\n\n.form-area {\n display: block;\n width: 100%;\n border: 0;\n box-sizing: border-box;\n margin: 0;\n padding: 10px 8px;\n outline: none;\n font-size: 13px;\n}\n\n.form-input {\n border: 0;\n padding: 0;\n flex: 1;\n outline: none;\n font-size: 13px;\n}\n\n.img-uploader-wrapper {\n cursor: pointer;\n margin: 10px;\n line-height: 1;\n}\n.img-uploader-wrapper .upload-icon {\n display: inline-block;\n width: 18px;\n vertical-align: middle;\n}\n.img-uploader-wrapper label {\n display: inline-block;\n vertical-align: middle;\n margin-left: 4px;\n font-size: 13px;\n color: #999;\n line-height: 18px;\n cursor: pointer;\n}\n.img-uploader-wrapper .img-upload-input {\n position: absolute;\n left: 0;\n width: 80px;\n opacity: 0;\n z-index: 2;\n}\n.img-uploader-wrapper .remove-img {\n vertical-align: middle;\n color: #999;\n}\n.img-uploader-wrapper .img-preview {\n display: inline-block;\n margin-right: 5px;\n overflow: hidden;\n vertical-align: middle;\n}\n.img-uploader-wrapper .img-preview img {\n max-height: 48px;\n max-width: 48px;\n vertical-align: middle;\n}“;n__chunk_1.styleInject(css);nnvar userSelectPropTypes = {n type: __chunk_1.PropTypes.string,n inputType: __chunk_1.PropTypes.string,n text: __chunk_1.PropTypes.string,n maxLength: __chunk_1.PropTypes.number,n username: __chunk_1.PropTypes.string,n canAtSb: __chunk_1.PropTypes.bool,n replyUsers: __chunk_1.PropTypes.array,n handleChange: __chunk_1.PropTypes.funcn};nvar userSelectDefaultProps = {n type: ‚comment‘,n // 区分是comment回复还是reply回复n inputType: ‚input‘,n // 区分是input=text 还是用的textarean text: “,n maxLength: 0,n // 最长回复,为 0 时不限制长度n username: “,n // input=text需要知道用户名n canAtSb: false,n // 是否能at某个人,目前仅话题可以n replyUsers: [],n // at某人时供选择的已过滤的用户列表n handleSelectUser: function handleSelectUser() {}n};nnvar UserSelect =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(UserSelect, _Component);nn function UserSelect(props) {n var _this;nn _this = _Component.call(this, props) || this;n _this.state = {n text: props.text,n // 文本框输入内容n cursor_text: “,n // 光标之前的文本,n isShowTag: false,n // @用户时,是否显示用户列表内容n focusedIndex: 0,n // @用户时,当前选中的用户n replyUsers: props.replyUsers,n // @用户时,用户列表n objUsers: {},n // 存放@用户的uid及次数、用户名n pre_html: ‚
 ‚,n // 内容同输入框内容,主要获取当前鼠标位置n posStyle: {n // @用户时,用户列表的位置n top: 0,n left: 0n },n uploaded: props.uploaded,n // 是否已经上传n preview_img: “ // 上传图片后的预览图nn };n _this.setPreRef = _this.setPreRef.bind(assertThisInitialized(_this));n _this.setWrapperRef = _this.setWrapperRef.bind(assertThisInitialized(_this));n _this.handleClickOutside = _this.handleClickOutside.bind(assertThisInitialized(_this));n return _this;n }nn var _proto = UserSelect.prototype;nn _proto.componentDidMount = function componentDidMount() {n document.addEventListener(‚mousedown‘, this.handleClickOutside); // 自动 focus 输入框nn if (this.props.type === ‚reply‘) {n this._input.focus();n }n };nn _proto.componentWillUnmount = function componentWillUnmount() {n document.removeEventListener(‚mousedown‘, this.handleClickOutside);n };nn _proto.componentDidUpdate = function componentDidUpdate(prevProps) {n if (this.props.text !== prevProps.text) {n this.setSelectPos();n }n };nn _proto.setPreRef = function setPreRef(node) {n if (node) {n this.preRef = node;n }n };nn _proto.setWrapperRef = function setWrapperRef(node) {n this.wrapperRef = node;n };nn _proto.setSelectPos = function setSelectPos() {n var pos_top;n var pos_left;n var pre_top;n var preEl = this.preRef;n var code = preEl && preEl.querySelector(‚code‘);n var inputEl = this._input;n pos_top = code && code.offsetTop || 0;n pos_left = code && code.offsetLeft || 0;n pre_top = inputEl && inputEl.scrollTop;n var max_width = inputEl && inputEl.offsetWidth;nn if (max_width – pos_left  “ + val.slice(cur_pos)n });nn if (cursor_text.split(‚ ‚).pop().indexOf(‚@‘) 1) {n if (!canRequest) {n this.setState({n isShowTag: false,n canRequest: truen });n return;n }nn var search_text = val.slice(last_leadChar_pos + 1, cur_pos);n var obj = {n word: search_text,n count: 5,n alt: ‚xd’n };n __chunk_4.CommentsAPI.getShuo(obj).then(function (res) {n var reg_btag = //g;n var users = res.users;n var new_users = users.map(function (user) {n return JSON.parse(__chunk_6._JSON$stringify(user).replace(reg_btag, “));n });nn if (users.length > 0) {n _this3.setState({n isShowTag: true,n replyUsers: new_users,n search_text: search_textn });n } else {n _this3.setState({n canRequest: false,n isShowTag: falsen });n }n }).catch(function (err) {n console.log(err);n });n }n };nn _proto.handleKeyDown = function handleKeyDown(e) {n var _this4 = this;nn var _this$state3 = this.state,n text = _this$state3.text,n replyUsers = _this$state3.replyUsers,n isShowTag = _this$state3.isShowTag,n objUsers = _this$state3.objUsers;n var focusedIndex = this.state.focusedIndex;n var newIndex = 0;n var t;nn if (replyUsers.length 0) {n newIndex = focusedIndex – 1;n } else {n newIndex = replyUsers.length – 1;n }nn _this4.setState({n focusedIndex: newIndexn });n }nn break;n // down arrownn case 40:n if (isShowTag) {n e.preventDefault();nn if (focusedIndex -1);n var keyIsESC = event.keyCode && event.keyCode === 27;n var selectedSomething = window.getSelection().toString().length > 0;nn if (this.valueIsEmpty() && (isClickingBlank && !selectedSomething || keyIsESC)) {n handleHideReplyEditor();n }n };nn _proto.handleAddReply = function handleAddReply(e) {n var _this2 = this;nn if (e) {n e.preventDefault();n e.stopPropagation();n }nn var _this$state = this.state,n value = _this$state.value,n objUsers = _this$state.objUsers,n showCaptcha = _this$state.showCaptcha,n captchaObj = _this$state.captchaObj,n captchaSolution = _this$state.captchaSolution,n submittingStatus = _this$state.submittingStatus;n var _this$props = this.props,n id = _this$props.id,n handleAddReply = _this$props.handleAddReply;nn if (submittingStatus === __chunk_5.PENDING) {n return;n }nn this.setState({n submittingStatus: __chunk_5.PENDINGn });n /*n * 这里注释掉并且只保留了一个空的 successCallback 是因为n * 提交成功后,整个 ReplyEditor 就消失了, unmount 了,组件里面的 state 被销毁了,n * 再 setState 也没意义了,而且可能会报错。n */nn var successCallback = function successCallback() {// 提交成功后,清空输入框、清空验证码相关、清空之前勾选的「转发到广播」n // this.setState({n // value: “,n // showCaptcha: false, //n // captchaObj: null,n // captchaErrorMsg: “,n // captchaSolution: “,n // checked: falsen // })n };nn var failCallback = function failCallback(code, data, errorMsg) {n if (code === 1001 && data) {n _this2.setState({n submittingStatus: __chunk_5.FAIL,n showCaptcha: true,n captchaObj: data,n captchaErrorMsg: errorMsg === ‚验证码错误‘ ? “ : errorMsgn }); // 需要答题nn } else if (code === 1003 && data.exam_topic) {n _this2.setState({n submittingStatus: __chunk_5.FAILn }, function () {n openExam && openExam(data.exam_topic, data.flow, _this2.handleAddReply.bind(_this2));n });n } else {n _this2.setState({n submittingStatus: __chunk_5.FAILn });n }n };nn var submit_text = value;nn for (var k in objUsers) {n submit_text = submit_text.replace(new RegExp(„@“ + objUsers[k].username + “ „, ‚g‘), „@“ + k + “ „);n }nn var newRelpy = {n rv_comment: submit_text,n ref_cid: id,n // 被回应的 idn sync_to_mb: false // 是否用同步到广播n // 如果需要输入验证码,则附上验证码的输入结果和相应的 idnn };nn if (captchaObj || showCaptcha) {n newRelpy[‚captcha-id‘] = captchaObj.captcha_id;n newRelpy[‚captcha-solution‘] = captchaSolution;n }nn handleAddReply(newRelpy, successCallback, failCallback);n };nn _proto.handleChange = function handleChange(val, objUsers) {n this.setState({n value: val,n objUsers: objUsers,n textWithTinyUrl: val && val.replace(new RegExp(__chunk_4.URL_RE, ‚gm‘), __chunk_4.HTTPS_SHORT_DOUBAN + „XXXXXX“) || “n });n };nn _proto.valueIsEmpty = function valueIsEmpty() {n var value = this.state.value;n return !value || value.trim().length === 0;n };nn _proto.handleCaptchaSolutionChange = function handleCaptchaSolutionChange(e) {n this.setState({n captchaSolution: e.target.valuen });n };nn _proto.render = function render() {n var _this$state2 = this.state,n value = _this$state2.value,n textWithTinyUrl = _this$state2.textWithTinyUrl,n showCaptcha = _this$state2.showCaptcha,n captchaObj = _this$state2.captchaObj,n captchaSolution = _this$state2.captchaSolution,n captchaErrorMsg = _this$state2.captchaErrorMsg,n submittingStatus = _this$state2.submittingStatus,n isShowTag = _this$state2.isShowTag,n replyUsers = _this$state2.replyUsers,n focusedIndex = _this$state2.focusedIndex;n var _this$props2 = this.props,n btnText = _this$props2.btnText,n username = _this$props2.username,n type = _this$props2.type,n canAtSb = _this$props2.canAtSb,n config = _this$props2.config,n maxLength = _this$props2.maxLength;n var cls = __chunk_3.classnames(‚reply-editor‘, {n ’show-captcha‘: showCaptcha && captchaObjn });n var submitBtn = React__default.createElement(„button“, {n type: „submit“,n disabled: submittingStatus === __chunk_5.PENDING,n className: __chunk_3.classnames(‚comment-form-btn‘, {n disabled: submittingStatus === __chunk_5.PENDINGn })n }, submittingStatus === __chunk_5.PENDING ? ‚提交中‘ : btnText);n var maxLen = 0; // 广播下的回复字数最多 280,其他的不限字数nn if (config.service && config.service === __chunk_4.STATUS) {n maxLen = __chunk_4.MAX_STATUS_COMMENTS_LENGTH;n } else {n maxLen = maxLength;n }nn return React__default.createElement(„div“, {n className: clsn }, React__default.createElement(„form“, {n onSubmit: this.handleAddReply.bind(this)n }, React__default.createElement(userSelect.UserSelect, {n type: type,n inputType: „text“,n text: value,n username: username,n replyUsers: replyUsers,n maxLength: maxLen,n canAtSb: canAtSb,n handleChange: this.handleChange.bind(this)n }), showCaptcha && captchaObj ? React__default.createElement(„div“, {n className: „reply-form-foot“n }, React__default.createElement(„div“, {n className: „captcha-wrapper“n }, React__default.createElement(„img“, {n className: „captcha-img“,n src: captchaObj.captcha_img,n onClick: this.handleAddReply.bind(this)n }), React__default.createElement(„input“, {n type: „text“,n placeholder: „\u8BF7\u8F93\u5165\u5DE6\u56FE\u7684\u9A8C\u8BC1\u7801“,n value: captchaSolution,n className: „captcha-input“,n onChange: this.handleCaptchaSolutionChange.bind(this)n }), React__default.createElement(„div“, {n className: „captcha-error-msg“n }, captchaErrorMsg ? „*“ + captchaErrorMsg : “)), submitBtn) : submitBtn, maxLen && maxLen – textWithTinyUrl.length = maxLenn })n }, textWithTinyUrl.length, „/“, maxLen) : null));n };nn return ReplyEditor;n}(React.Component);nnReplyEditor.propTypes = replyEditorPropTypes;nReplyEditor.defaultProps = replyEditorDefaultProps;nnexports.default = ReplyEditor;nexports.replyEditorDefaultProps = replyEditorDefaultProps;nexports.replyEditorPropTypes = replyEditorPropTypes;n//# sourceMappingURL=reply-editor.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/reply-editor.jsn// module id = 14n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/reply-editor.js?“);
},function(module,exports,__webpack_require__){eval(“use strict‘;nnObject.defineProperty(exports, ‚__esModule‘, { value: true });nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‚object‘) && ‚default‘ in ex) ? ex[‚default‘] : ex; }nnvar __chunk_1 = __webpack_require__(1);n__webpack_require__(6);n__webpack_require__(10);nvar React = __webpack_require__(2);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);n__webpack_require__(5);n__webpack_require__(12);nvar replyEditor = __webpack_require__(14);nvar __chunk_4 = __webpack_require__(9);n__webpack_require__(7);n__webpack_require__(11);n__webpack_require__(8);nnvar css = „@charset \“UTF-8\“;\n/**\n * @Desc 评论的相关操作动作,包括:回应、删除、投诉\n *\n * @Author wangyanhong\n * @Date 2019-05-15\n */\n.comment-action-bar {\n color: #bbb;\n font-size: 13px;\n text-align: right;\n min-height: 21px;\n}\n\n.comment-source,\n.dev .comment-source {\n float: left;\n}\n.comment-source a:link,\n.dev .comment-source a:link {\n color: #bbb;\n}\n.comment-source a:visited,\n.dev .comment-source a:visited {\n color: #bbb;\n}\n.comment-source a:hover,\n.dev .comment-source a:hover {\n background: #bbb;\n color: #fff;\n}\n\n.action-bar-group,\n.dev .action-bar-group {\n visibility: hidden;\n}\n.action-bar-group.hover,\n.dev .action-bar-group.hover {\n visibility: visible;\n}\n.action-bar-group a:link,\n.dev .action-bar-group a:link {\n margin-left: 10px;\n color: #bbb;\n cursor: pointer;\n}\n.action-bar-group a:hover,\n.dev .action-bar-group a:hover {\n color: #fff;\n background: #bbb;\n}“;n__chunk_1.styleInject(css);nnvar commentActionsPropTypes = {n config: __chunk_1.PropTypes.object,n comment: __chunk_1.PropTypes.object.isRequired,n type: __chunk_1.PropTypes.string,n isHovering: __chunk_1.PropTypes.bool,n replyEditorVisible: __chunk_1.PropTypes.bool,n canAtSb: __chunk_1.PropTypes.bool,n maxLength: __chunk_1.PropTypes.number,n replyUsers: __chunk_1.PropTypes.array,n handleHideReplyEditor: __chunk_1.PropTypes.func,n handleShowReplyEditor: __chunk_1.PropTypes.func,n handleDeleteComment: __chunk_1.PropTypes.func,n handleAddReply: __chunk_1.PropTypes.func,n handleShowReportDialog: __chunk_1.PropTypes.funcn};nvar commentActionsDefaultProps = {n config: null,n comment: null,n type: ‚comment‘,n // ‚comment‘ 或者 ‚reply’,默认 ‚comment’n isHovering: false,n replyEditorVisible: true,n canAtSb: false,n maxLength: 0,n replyUsers: [],n handleHideReplyEditor: function handleHideReplyEditor() {},n handleShowReplyEditor: function handleShowReplyEditor() {},n handleDeleteComment: function handleDeleteComment() {},n handleAddReply: function handleAddReply() {},n handleShowReportDialog: function handleShowReportDialog() {}n};nnvar ActionBar =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(ActionBar, _Component);nn function ActionBar() {n return _Component.apply(this, arguments) || this;n }nn var _proto = ActionBar.prototype;nn _proto.handleShowReportDialog = function handleShowReportDialog(e) {n e.preventDefault();n var _this$props = this.props,n handleShowReportDialog = _this$props.handleShowReportDialog,n id = _this$props.comment.id;n handleShowReportDialog(id);n };nn _proto.handleDeleteComment = function handleDeleteComment(e) {n var _this$props2 = this.props,n handleDeleteComment = _this$props2.handleDeleteComment,n id = _this$props2.comment.id;n handleDeleteComment(id);n };nn _proto.render = function render() {n var _this$props3 = this.props,n config = _this$props3.config,n comment = _this$props3.comment,n isHovering = _this$props3.isHovering,n replyEditorVisible = _this$props3.replyEditorVisible,n canAtSb = _this$props3.canAtSb,n replyUsers = _this$props3.replyUsers,n handleShowReplyEditor = _this$props3.handleShowReplyEditor,n handleHideReplyEditor = _this$props3.handleHideReplyEditor,n handleAddReply = _this$props3.handleAddReply,n type = _this$props3.type,n maxLength = _this$props3.maxLength;nn if (!comment || !config) {n return null;n } // 用户未登录,不显示操作按钮nnn var user = __chunk_4.IS_DEV ? config.user : window._COMMENTS_CONFIG ? window._COMMENTS_CONFIG.user : null;n var author = comment.author,n id = comment.id;n var replyLimit = __chunk_4.IS_DEV ? config.target.reply_limit : window._COMMENTS_CONFIG.target.reply_limit;n var canAddComment = __chunk_4.IS_DEV ? config.target.can_add_comment : window._COMMENTS_CONFIG.target.can_add_comment;n return React__default.createElement(„div“, {n className: „comment-action-bar“n }, user ? React__default.createElement(„div“, {n className: __chunk_3.classnames(‚action-bar-group‘, {n hover: isHoveringn })n }, !canAddComment ? replyLimit === ‚F‘ && !author.is_friend ? React__default.createElement(„span“, null, „\uFF08\u4EC5\u5141\u8BB8\u53D1\u5E03\u8005\u5173\u6CE8\u4EBA\u56DE\u5E94\uFF09“) : React__default.createElement(„span“, null, „\uFF08\u5DF2\u7ECF\u7981\u6B62\u56DE\u5E94\uFF09“) : React__default.createElement(„a“, {n rel: „nofollow“,n title: „\u56DE\u5E94“ + author.name,n href: „javascript:;“,n style: {n display: replyEditorVisible ? ’none‘ : ‚inline’n },n onClick: handleShowReplyEditorn }, „\u56DE\u5E94“), user.is_admin || user.id === author.id || user.can_delete_all_comments ? React__default.createElement(„a“, {n rel: „nofollow“,n title: „\u5220\u9664“,n href: „javascript:;“,n onClick: this.handleDeleteComment.bind(this)n }, „\u5220\u9664“) : null, React__default.createElement(„a“, {n rel: „nofollow“,n „data-cid“: comment.id,n title: „\u6295\u8BC9“,n href: „javascript:;“,n className: „report-comment-btn“,n onClick: this.handleShowReportDialog.bind(this)n }, „\u6295\u8BC9“)) : null, replyEditorVisible ? React__default.createElement(replyEditor.default, {n id: id.toString(),n config: config,n username: author.name,n type: type,n canAtSb: canAtSb,n maxLength: maxLength,n replyUsers: replyUsers,n handleHideReplyEditor: handleHideReplyEditor,n handleAddReply: handleAddReplyn }) : null);n };nn return ActionBar;n}(React.Component);nnActionBar.propTypes = commentActionsPropTypes;nActionBar.defaultProps = commentActionsDefaultProps;nnexports.commentActionsDefaultProps = commentActionsDefaultProps;nexports.commentActionsPropTypes = commentActionsPropTypes;nexports.default = ActionBar;n//# sourceMappingURL=action-bar.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/action-bar.jsn// module id = 15n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/action-bar.js?‘)},function(module,exports,__webpack_require__){eval(„/**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict‘;nnvar printWarning = function() {};nnif (true) {n var ReactPropTypesSecret = __webpack_require__(45);n var loggedTypeFailures = {};n var has = __webpack_require__(46);nn printWarning = function(text) {n var message = ‚Warning: ‚ + text;n if (typeof console !== ‚undefined‘) {n console.error(message);n }n try {n // — Welcome to debugging React —n // This error was thrown as a convenience so that you can use this stackn // to find the callsite that caused this warning to fire.n throw new Error(message);n } catch (x) { /**/ }n };n}nn/**n * Assert that the values match with the type specs.n * Error messages are memorized and will only be shown once.n *n * @param {object} typeSpecs Map of name to a ReactPropTypen * @param {object} values Runtime values that need to be type-checkedn * @param {string} location e.g. „prop“, „context“, „child context“n * @param {string} componentName Name of the component for error messages.n * @param {?Function} getStack Returns the component stack.n * @privaten */nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {n if (true) {n for (var typeSpecName in typeSpecs) {n if (has(typeSpecs, typeSpecName)) {n var error;n // Prop type validation may throw. In case they do, we don’t want ton // fail the render phase where it didn’t fail before. So we log it.n // After these have been cleaned up, we’ll let them throw.n try {n // This is intentionally an invariant that gets caught. It’s the samen // behavior as without this statement except with a better message.n if (typeof typeSpecs[typeSpecName] !== ‚function‘) {n var err = Error(n (componentName || ‚React class‘) + ‚: ‚ + location + ‚ type `‘ + typeSpecName + ‚` is invalid; ‚ +n ‚it must be a function, usually from the `prop-types` package, but received `‘ + typeof typeSpecs[typeSpecName] + ‚`.‘ +n ‚This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.’n );n err.name = ‚Invariant Violation‘;n throw err;n }n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);n } catch (ex) {n error = ex;n }n if (error && !(error instanceof Error)) {n printWarning(n (componentName || ‚React class‘) + ‚: type specification of ‚ +n location + ‚ `‘ + typeSpecName + ‚` is invalid; the type checker ‚ +n ‚function must return `null` or an `Error` but returned a ‚ + typeof error + ‚. ‚ +n ‚You may have forgotten to pass an argument to the type checker ‚ +n ‚creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ‚ +n ’shape all require an argument).’n );n }n if (error instanceof Error && !(error.message in loggedTypeFailures)) {n // Only monitor this failure once because there tends to be a lot of then // same error.n loggedTypeFailures[error.message] = true;nn var stack = getStack ? getStack() : “;nn printWarning(n ‚Failed ‚ + location + ‚ type: ‚ + error.message + (stack != null ? stack : “)n );n }n }n }n }n}nn/**n * Resets warning cache when testing.n *n * @privaten */ncheckPropTypes.resetWarningCache = function() {n if (true) {n loggedTypeFailures = {};n }n}nnmodule.exports = checkPropTypes;nnn//////////////////n// WEBPACK FOOTERn// ./~/prop-types/checkPropTypes.jsn// module id = 16n// module chunks = 0n//# sourceURL=webpack:///./~/prop-types/checkPropTypes.js?“)},function(module,exports,__webpack_require__){eval(“use strict‘;nnObject.defineProperty(exports, ‚__esModule‘, { value: true });nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‚object‘) && ‚default‘ in ex) ? ex[‚default‘] : ex; }nnvar __chunk_1 = __webpack_require__(1);n__webpack_require__(6);n__webpack_require__(10);nvar React = __webpack_require__(2);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);nvar actionBar = __webpack_require__(15);n__webpack_require__(5);n__webpack_require__(12);n__webpack_require__(14);nvar __chunk_4 = __webpack_require__(9);n__webpack_require__(7);n__webpack_require__(11);nvar __chunk_6 = __webpack_require__(8);nnvar css = „/*\n* @Author: hanjiyun\n* @Date: 2019-05-13 22:55:26\n* @Last Modified by: hanjiyun\n* @Last Modified time: 2019-06-19 21:00:10\n*/\n/*\n* @Author: hanjiyun\n* @Date: 2019-05-14 21:32:06\n* @Last Modified by: hanjiyun\n* @Last Modified time: 2022-03-30 16:32:26\n*/\n.comment-item .reply-item {\n padding-top: 5px;\n}\n.comment-item .reply-item .avatar-small {\n height: 24px;\n width: 24px;\n margin-right: 10px;\n}\n.comment-item .reply-item .meta-header {\n background: none;\n padding: 3px 0;\n margin-bottom: 0;\n}\n.comment-item .reply-item .mention-user {\n margin-right: 5px;\n}“;n__chunk_1.styleInject(css);nnvar replyItemPropTypes = {n config: __chunk_1.PropTypes.object,n commentId: __chunk_1.PropTypes.string,n type: __chunk_1.PropTypes.string,n target: __chunk_1.PropTypes.object,n reply: __chunk_1.PropTypes.object,n canAtSb: __chunk_1.PropTypes.bool,n replyUsers: __chunk_1.PropTypes.array,n handleAddReply: __chunk_1.PropTypes.func,n handleDeleteReply: __chunk_1.PropTypes.func,n handleShowReportDialog: __chunk_1.PropTypes.func,n needEscape: __chunk_1.PropTypes.booln};nvar replyItemDefaultProps = {n config: null,n commentId: “,n type: ‚reply‘,n target: null,n reply: null,n canAtSb: false,n replyUsers: [],n handleAddReply: function handleAddReply() {},n handleDeleteReply: function handleDeleteReply() {},n handleShowReportDialog: function handleShowReportDialog() {},n needEscape: truen};nnvar ReplyItem =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(ReplyItem, _Component);nn function ReplyItem(props) {n var _this;nn _this = _Component.call(this, props) || this;n _this.state = {n reply: props.reply,n isShowActions: true,n isHover: false,n replyEditorVisible: false,n addedNewItem: false,n // 一级评论下是否添加了新的二级回应n isFolded: props.reply && props.reply.is_folded // 是否展开被折叠的评论nn };n return _this;n }nn ReplyItem.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {n if (__chunk_6._JSON$stringify(nextProps.reply) !== __chunk_6._JSON$stringify(prevState.reply)) {n return {n reply: nextProps.replyn };n }nn return null;n };nn var _proto = ReplyItem.prototype;nn _proto.handleShowReplyEditor = function handleShowReplyEditor() {n this.setState({n replyEditorVisible: truen });n };nn _proto.handleHideReplyEditor = function handleHideReplyEditor() {n this.setState({n replyEditorVisible: falsen });n } // 添加回应n // 隐藏输入框,附带上当前回应列表所属的 comment id ,传给上级n ;nn _proto.handleAddReply = function handleAddReply(newRelpy, successCallback, failCallback) {n var _this2 = this;nn var handleAddReply = this.props.handleAddReply;nn var hideReplyListEditorCallback = function hideReplyListEditorCallback() {n _this2.handleHideReplyEditor();n };nn handleAddReply(newRelpy, successCallback, failCallback, hideReplyListEditorCallback);n };nn _proto.handleDeleteComment = function handleDeleteComment() {n var reply = this.state.reply;n var handleDeleteReply = this.props.handleDeleteReply;nn if (window.confirm(„\u771F\u7684\u8981\u5220\u9664“ + reply.author.name + „\u7684\u8FD9\u6761\u56DE\u5E94\u5417\uFF1F“)) {n handleDeleteReply(reply.id);n this.setState({n isShowActions: falsen });n }n };nn _proto.handleHover = function handleHover(e) {n e.stopPropagation();n this.setState({n isHover: truen });n };nn _proto.handleLeave = function handleLeave(e) {n e.stopPropagation();n this.setState({n isHover: falsen });n };nn _proto.handleFold = function handleFold() {n this.setState({n isFolded: falsen });n };nn _proto.render = function render() {n var _this$props = this.props,n target = _this$props.target,n commentId = _this$props.commentId,n needEscape = _this$props.needEscape;n var _this$state = this.state,n reply = _this$state.reply,n isFolded = _this$state.isFolded;nn if (!reply) {n return null;n }nn var text = reply.text,n create_time = reply.create_time,n is_folded = reply.is_folded,n author = reply.author,n has_ref = reply.has_ref,n ref_comment = reply.ref_comment,n entities = reply.entities,n folded_reason_text = reply.folded_reason_text,n folded_reason_url = reply.folded_reason_url;n var cls = __chunk_3.classnames(‚item‘, ‚reply-item‘, {n ‚latest-reply‘: reply.is_latestn }); // data-*的作用用于 antispam获取值,https://github.intra.douban.com/antispam/hyjal/blob/master/static/js/app/raikiri/comment.js#L187nn return React__default.createElement(„div“, {n className: cls,n „data-cid“: reply.id,n „data-target_id“: target.id,n „data-target_kind“: target.kindn }, React__default.createElement(„div“, {n className: „comment-item-body“,n onMouseOver: this.handleHover.bind(this),n onMouseOut: this.handleLeave.bind(this)n }, React__default.createElement(„div“, {n className: „author-avatar avatar-small“n }, React__default.createElement(„a“, {n href: author.url,n title: author.namen }, React__default.createElement(„img“, {n src: author.avatar,n alt: author.namen }))), React__default.createElement(„div“, {n className: „comment-main“n }, React__default.createElement(„div“, {n className: „meta-header“n }, React__default.createElement(„a“, {n href: author.url,n title: author.namen }, author.name), author.signature ? React__default.createElement(„span“, null, „(“ + author.signature + „)“) : null, React__default.createElement(„time“, {n dateTime: create_timen }, create_time)), React__default.createElement(„div“, {n className: __chunk_3.classnames(„comment-content“, {n hide: isFoldedn })n }, ref_comment && ref_comment.author && ref_comment.id !== commentId && !reply.is_deleted ? React__default.createElement(„a“, {n href: ref_comment.author.url,n title: ref_comment.author.name,n className: „mention-user“n }, „@“, ref_comment.author.name) : null, !reply.is_deleted ? React__default.createElement(„span“, {n dangerouslySetInnerHTML: {n __html: __chunk_4.extractText(text, entities, needEscape)n }n }) : ‚[该回复已被删除]‘, is_folded ? React__default.createElement(„div“, {n className: „folded-text“n }, folded_reason_text, folded_reason_url ? React__default.createElement(React.Fragment, null, „\uFF0C“, React__default.createElement(„a“, {n target: „_blank“,n href: folded_reason_url,n className: „folded-reason-url“n }, „\u4E86\u89E3\u89C4\u5219“)) : null) : null), isFolded ? React__default.createElement(„p“, {n className: „comment-folded“n }, React__default.createElement(„span“, null, „[\u8BE5\u56DE\u590D\u5DF2\u88AB\u6298\u53E0]“), React__default.createElement(„a“, {n href: „javascript:;“,n onClick: this.handleFold.bind(this)n }, „\u5C55\u5F00“)) : null, this.renderActions())));n };nn _proto.renderActions = function renderActions() {n var _this$state2 = this.state,n isHover = _this$state2.isHover,n replyEditorVisible = _this$state2.replyEditorVisible,n isShowActions = _this$state2.isShowActions,n reply = _this$state2.reply;n var _this$props2 = this.props,n config = _this$props2.config,n type = _this$props2.type,n canAtSb = _this$props2.canAtSb,n replyUsers = _this$props2.replyUsers,n handleShowReportDialog = _this$props2.handleShowReportDialog;nn if (!isShowActions || reply.is_folded || reply.is_deleted) {n return null;n }nn return React__default.createElement(actionBar.default, {n config: config,n type: type,n isHovering: isHover,n comment: reply,n replyEditorVisible: replyEditorVisible,n canAtSb: canAtSb,n replyUsers: replyUsers,n handleHideReplyEditor: this.handleHideReplyEditor.bind(this),n handleShowReplyEditor: this.handleShowReplyEditor.bind(this),n handleDeleteComment: this.handleDeleteComment.bind(this),n handleAddReply: this.handleAddReply.bind(this),n handleShowReportDialog: handleShowReportDialogn });n };nn return ReplyItem;n}(React.Component);nnReplyItem.propTypes = replyItemPropTypes;nReplyItem.defaultProps = replyItemDefaultProps;nnexports.default = ReplyItem;nexports.replyItemDefaultProps = replyItemDefaultProps;nexports.replyItemPropTypes = replyItemPropTypes;n//# sourceMappingURL=reply-item.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/reply-item.jsn// module id = 17n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/reply-item.js?‘)},[146,78],function(module,exports,__webpack_require__){eval(„var ReactDOM = __webpack_require__(83);nvar scroll = __webpack_require__(142);nnfunction calculateScrollOffset(element, offset, alignment) {n var body = document.body,n html = document.documentElement;n var elementRect = element.getBoundingClientRect();n var clientHeight = html.clientHeight;n var documentHeight = Math.max( body.scrollHeight, body.offsetHeight, n html.clientHeight, html.scrollHeight, html.offsetHeight );n offset = offset || 0; // additional offset to topn var scrollPosition;n switch(alignment) {n case ‚top‘: scrollPosition = elementRect.top; break;n case ‚middle‘: scrollPosition = elementRect.bottom – clientHeight / 2 – elementRect.height / 2; break;n case ‚bottom‘: scrollPosition = elementRect.bottom – clientHeight; break;n default: scrollPosition = elementRect.bottom – clientHeight / 2 – elementRect.height / 2; break; //defaul to middlen }n var maxScrollPosition = documentHeight – clientHeight;n return Math.min(scrollPosition + offset + window.pageYOffset,n maxScrollPosition);n}nnmodule.exports = function (ref, options) {n options = options || {n offset: 0,n align: ‚middle’n };n var element = ReactDOM.findDOMNode(ref);n if (element === null) return 0;n return scroll(0, calculateScrollOffset(element, options.offset, options.align), options);n};nn//////////////////n// WEBPACK FOOTERn// ./~/comments/~/react-scroll-to-component/index.jsn// module id = 19n// module chunks = 0n//# sourceURL=webpack:///./~/comments/~/react-scroll-to-component/index.js?“)},function(module,exports,__webpack_require__){eval(“use strict‘;nnObject.defineProperty(exports, ‚__esModule‘, { value: true });nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‚object‘) && ‚default‘ in ex) ? ex[‚default‘] : ex; }nnvar __chunk_1 = __webpack_require__(1);n__webpack_require__(6);n__webpack_require__(10);nvar React = __webpack_require__(2);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);nvar ReactDOM = _interopDefault(__webpack_require__(18));nvar scrollToComponent = _interopDefault(__webpack_require__(19));n__webpack_require__(15);n__webpack_require__(5);n__webpack_require__(12);n__webpack_require__(14);nvar __chunk_4 = __webpack_require__(9);n__webpack_require__(7);n__webpack_require__(11);n__webpack_require__(8);nvar replyItem = __webpack_require__(17);nnvar css = „/*\n* @Author: hanjiyun\n* @Date: 2019-05-14 21:32:06\n* @Last Modified by: hanjiyun\n* @Last Modified time: 2022-03-30 16:32:26\n*/\n.replies-list-control-btn, .replies-list-control .fold-btn, .replies-list-control .give-me-more {\n height: 20px;\n padding: 1px 3px 1px 0;\n line-height: 1;\n color: #37A;\n border: 0;\n outline: none;\n font-size: 13px;\n cursor: pointer;\n background-color: transparent;\n}\n.replies-list-control-btn::after, .replies-list-control .fold-btn::after, .replies-list-control .give-me-more::after {\n border: solid #37a;\n border-width: 0 1px 1px 0;\n display: inline-block;\n padding: 3px;\n transform: rotate(45deg);\n content: \“\“;\n display: inline-block;\n margin-left: 6px;\n margin-top: -4px;\n vertical-align: middle;\n}\n.replies-list-control-btn:hover, .replies-list-control .fold-btn:hover, .replies-list-control .give-me-more:hover {\n color: #fff;\n background: #37a;\n}\n.replies-list-control-btn:hover::after, .replies-list-control .fold-btn:hover::after, .replies-list-control .give-me-more:hover::after {\n border-color: #fff;\n}\n\n.reply-list {\n padding-left: 68px;\n}\n\n.replies-list-control {\n display: flex;\n height: 20px;\n justify-content: space-between;\n align-items: center;\n padding-top: 5px;\n}\n.replies-list-control .give-me-more.invisible {\n visibility: hidden;\n}\n.replies-list-control .fold-btn {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.replies-list-control .fold-btn::after {\n border: solid #37a;\n border-width: 0 1px 1px 0;\n display: inline-block;\n padding: 3px;\n transform: rotate(-135deg);\n margin-top: 2px;\n}\n.replies-list-control .fold-btn.fixed {\n position: fixed;\n bottom: 10px;\n height: 30px;\n width: 90px;\n z-index: 2;\n background: #f7f7f7;\n border-radius: 3px;\n border: 1px solid #dfdfdf;\n}\n.replies-list-control .fold-btn.fixed:hover {\n background: #f1f1f1;\n color: #37a;\n}\n.replies-list-control .fold-btn.fixed:hover::after {\n border-color: #37a;\n}“;n__chunk_1.styleInject(css);nnvar replyListPropTypes = {n config: __chunk_1.PropTypes.object,n commentId: __chunk_1.PropTypes.string.isRequired,n target: __chunk_1.PropTypes.object,n replies: __chunk_1.PropTypes.array,n canAtSb: __chunk_1.PropTypes.bool,n replyUsers: __chunk_1.PropTypes.array,n total: __chunk_1.PropTypes.number,n // replies 总数n count: __chunk_1.PropTypes.number,n // 展开请求更多回应时,每次请求多少条n truncation: __chunk_1.PropTypes.number,n // replies 超过 n 条时,只显示 n 条,其余需要手动展开n upThreshold: __chunk_1.PropTypes.number,n // 超过第 n 条时,显示「收起回应」n downThreshold: __chunk_1.PropTypes.number,n // 小于第 n 条时,一拿才那个「收起回应」n handleAddReply: __chunk_1.PropTypes.func,n handleDelete: __chunk_1.PropTypes.func,n handleLoadMoreReplies: __chunk_1.PropTypes.func,n handleFoldReplies: __chunk_1.PropTypes.func,n handleShowReportDialog: __chunk_1.PropTypes.func,n needEscape: __chunk_1.PropTypes.booln};nvar replyListDefaultProps = {n config: null,n commentId: “,n target: null,n replies: [],n total: 0,n canAtSb: false,n replyUsers: [],n truncation: 3,n // 默认最多展示 3 条n count: __chunk_4.IS_DEV ? 5 : 50,n // 每次加载多少条n upThreshold: 10,n // 页面向上滚动时,回应列表的第 10 条出现后时显示「收起回应」n downThreshold: 5,n // 页面向下滚动时,回应列表的第 5 条出现后时隐藏「收起回应」n handleAddReply: function handleAddReply() {},n handleDelete: function handleDelete() {},n handleLoadMoreReplies: function handleLoadMoreReplies() {},n handleFoldReplies: function handleFoldReplies() {},n handleShowReportDialog: function handleShowReportDialog() {},n needEscape: falsen};nnvar ReplyList =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(ReplyList, _Component);nn function ReplyList(props) {n var _this;nn _this = _Component.call(this, props) || this;n _this.listRef = null;n _this.listHeightBeforeLoading = 0;n _this.increasedListHeight = 0;n _this.controlBarRef = null;n _this.downSensorItemRef = React__default.createRef();n _this.state = {n total: props.total,n remaining: props.total + props.replies.filter(function (reply) {n return reply.is_deleted;n }).length – props.truncation,n repliesStart: props.truncation,n // 默认从第 3 条开始取n isLoadingReplies: false,n foldRepliesBtnVisible: false // 是否显示「收起回应」按钮nn };n return _this;n }nn var _proto = ReplyList.prototype;nn _proto.render = function render() {n var _this2 = this;nn var _this$state = this.state,n total = _this$state.total,n remaining = _this$state.remaining,n isLoadingReplies = _this$state.isLoadingReplies,n foldRepliesBtnVisible = _this$state.foldRepliesBtnVisible,n foldRepliesBtnOutofViewport = _this$state.foldRepliesBtnOutofViewport;n var _this$props = this.props,n replies = _this$props.replies,n truncation = _this$props.truncation,n upThreshold = _this$props.upThreshold;nn if (!replies || replies.length === 0) {n return null;n }nn return React__default.createElement(„div“, {n className: „reply-list“,n ref: function ref(ele) {n _this2.listRef = ele; // 存一下展开前的列表高度nn setTimeout(function () {n _this2.listHeightBeforeLoading = _this2.geListDomHeight();n }, 150);n }n }, this.renderList(), total >= truncation && remaining > 0 || foldRepliesBtnVisible ? // 暂时去掉n //
n React__default.createElement(„div“, {n className: „replies-list-control“,n ref: function ref(ele) {n _this2.controlBarRef = ele;n }n }, isLoadingReplies ? React__default.createElement(„div“, null, „\u52A0\u8F7D\u4E2D“) : this.renderRepliesLoader(), foldRepliesBtnVisible && replies.length > upThreshold ? React__default.createElement(„button“, {n className: __chunk_3.classnames(‚fold-btn‘, {n // 如果按钮没有隐藏,且没在窗口内,并且没有被滚动出顶部(在窗口底部以下)n fixed: foldRepliesBtnVisible && !foldRepliesBtnOutofViewport && this.controlBarRef && this.controlBarRef.getBoundingClientRect().top > 0n }),n style: {n left: this.controlBarRef ? this.controlBarRef.getBoundingClientRect().left + this.controlBarRef.getBoundingClientRect().width – 90 : 0 // 90 是按钮自身的宽度nn },n onClick: this.handleFoldReplies.bind(this)n }, „\u6536\u8D77\u56DE\u5E94“) : null) // n : null);n };nn _proto.renderList = function renderList() {n var _this3 = this;nn var _this$props2 = this.props,n config = _this$props2.config,n commentId = _this$props2.commentId,n target = _this$props2.target,n replies = _this$props2.replies,n canAtSb = _this$props2.canAtSb,n replyUsers = _this$props2.replyUsers,n upThreshold = _this$props2.upThreshold,n downThreshold = _this$props2.downThreshold,n handleAddReply = _this$props2.handleAddReply,n handleShowReportDialog = _this$props2.handleShowReportDialog,n needEscape = _this$props2.needEscape;n return replies.map(function (reply, index) {n /* 2021-12-10 暂时去掉 VisibilitySensorn // 监测第 5 、 11 条的显示状态n const isScrollUpSensorItem = index + 1 === upThresholdn const isScrollDownSensorItem = index + 1 === downThresholdn if (isScrollUpSensorItem || isScrollDownSensorItem) {n const onChange = isScrollUpSensorItem ? this.upSensorItemInViewport.bind(this, reply) : isScrollDownSensorItem ? this.downSensorItemInViewport.bind(this, reply) : () => {}n return (n
n n n )n }n */n return React__default.createElement(replyItem.default, {n config: config,n commentId: commentId,n type: „reply“,n key: „_“ + reply.id + „_reply_“ + index,n target: target,n reply: reply,n canAtSb: canAtSb,n replyUsers: replyUsers,n handleAddReply: handleAddReply,n handleDeleteReply: _this3.handleDeleteReply.bind(_this3),n handleShowReportDialog: handleShowReportDialog,n needEscape: needEscapen });n });n } // 计算回应列表的高度n ;nn _proto.geListDomHeight = function geListDomHeight() {n return this.listRef ? ReactDOM.findDOMNode(this.listRef).getBoundingClientRect().height : 0;n } // TODO 需要优化n // 计算当前回应列表中有多少条没有被删除的回应n ;nn _proto.getSurvivedReplisNum = function getSurvivedReplisNum() {n var _this$state2 = this.state,n total = _this$state2.total,n repliesStart = _this$state2.repliesStart;n var _this$props3 = this.props,n replies = _this$props3.replies,n truncation = _this$props3.truncation;n var deleted = replies.filter(function (reply) {n return reply.is_deleted;n }).length;n return total + deleted – repliesStart;n } // 删除某条回应后,需要重新计算「展开更多 n 条」回应n ;nn _proto.handleDeleteReply = function handleDeleteReply(id) {n var _this$state3 = this.state,n total = _this$state3.total,n repliesStart = _this$state3.repliesStart;n var _this$props4 = this.props,n handleDelete = _this$props4.handleDelete,n commentId = _this$props4.commentId,n count = _this$props4.count;n var parentCommentId = commentId;n handleDelete(id, parentCommentId);n } // 渲染「展开更多 n 条回应」按钮n ;nn _proto.renderRepliesLoader = function renderRepliesLoader() {n var count = this.props.count;n var remaining = this.state.remaining;n var cls = __chunk_3.classnames(‚give-me-more‘, {n invisible: remaining 0) {n this.setState({n foldRepliesBtnVisible: falsen });n }n };nn return ReplyList;n}(React.Component);nnReplyList.propTypes = replyListPropTypes;nReplyList.defaultProps = replyListDefaultProps;nnexports.default = ReplyList;nexports.replyListDefaultProps = replyListDefaultProps;nexports.replyListPropTypes = replyListPropTypes;n//# sourceMappingURL=reply-list.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/reply-list.jsn// module id = 20n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/reply-list.js?‘);
},function(module,exports,__webpack_require__){eval(‚“use strict“;nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {n if (k2 === undefined) k2 = k;n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });n}) : (function(o, m, k, k2) {n if (k2 === undefined) k2 = k;n o[k2] = m[k];n}));nvar __exportStar = (this && this.__exportStar) || function(m, exports) {n for (var p in m) if (p !== „default“ && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);n};nObject.defineProperty(exports, „__esModule“, { value: true });n__exportStar(__webpack_require__(124), exports);n__exportStar(__webpack_require__(120), exports);n__exportStar(__webpack_require__(26), exports);n__exportStar(__webpack_require__(122), exports);n__exportStar(__webpack_require__(123), exports);n__exportStar(__webpack_require__(121), exports);n__exportStar(__webpack_require__(118), exports);n__exportStar(__webpack_require__(119), exports);n__exportStar(__webpack_require__(43), exports);n//# sourceMappingURL=index.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/index.jsn// module id = 21n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/index.js?‘)},function(module,exports,__webpack_require__){eval(„/* WEBPACK VAR INJECTION */(function(process) {‚use strict‘;nnvar utils = __webpack_require__(3);nvar normalizeHeaderName = __webpack_require__(64);nnvar DEFAULT_CONTENT_TYPE = {n ‚Content-Type‘: ‚application/x-www-form-urlencoded’n};nnfunction setContentTypeIfUnset(headers, value) {n if (!utils.isUndefined(headers) && utils.isUndefined(headers[‚Content-Type‘])) {n headers[‚Content-Type‘] = value;n }n}nnfunction getDefaultAdapter() {n var adapter;n if (typeof XMLHttpRequest !== ‚undefined‘) {n // For browsers use XHR adaptern adapter = __webpack_require__(28);n } else if (typeof process !== ‚undefined‘) {n // For node use HTTP adaptern adapter = __webpack_require__(28);n }n return adapter;n}nnvar defaults = {n adapter: getDefaultAdapter(),nn transformRequest: [function transformRequest(data, headers) {n normalizeHeaderName(headers, ‚Content-Type‘);n if (utils.isFormData(data) ||n utils.isArrayBuffer(data) ||n utils.isBuffer(data) ||n utils.isStream(data) ||n utils.isFile(data) ||n utils.isBlob(data)n ) {n return data;n }n if (utils.isArrayBufferView(data)) {n return data.buffer;n }n if (utils.isURLSearchParams(data)) {n setContentTypeIfUnset(headers, ‚application/x-www-form-urlencoded;charset=utf-8‘);n return data.toString();n }n if (utils.isObject(data)) {n setContentTypeIfUnset(headers, ‚application/json;charset=utf-8′);n return JSON.stringify(data);n }n return data;n }],nn transformResponse: [function transformResponse(data) {n /*eslint no-param-reassign:0*/n if (typeof data === ’string‘) {n try {n data = JSON.parse(data);n } catch (e) { /* Ignore */ }n }n return data;n }],nn /**n * A timeout in milliseconds to abort a request. If set to 0 (default) an * timeout is not created.n */n timeout: 0,nn xsrfCookieName: ‚XSRF-TOKEN‘,n xsrfHeaderName: ‚X-XSRF-TOKEN‘,nn maxContentLength: -1,nn validateStatus: function validateStatus(status) {n return status >= 200 && status String#trimLeftn// 2 -> String#trimRightn// 3 -> String#trimnvar trim = exporter.trim = function (string, TYPE) {n string = String(__chunk_1.defined(string));n if (TYPE & 1) string = string.replace(ltrim, “);n if (TYPE & 2) string = string.replace(rtrim, “);n return string;n};nnvar _stringTrim = exporter;nnvar $parseInt = __chunk_1.global.parseInt;nvar $trim = _stringTrim.trim;nnvar hex = /^[-+]?0[xX]/;nnvar _parseInt = $parseInt(_stringWs + ’08‘) !== 8 || $parseInt(_stringWs + ‚0x16‘) !== 22 ? function parseInt(str, radix) {n var string = $trim(String(str), 3);n return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));n} : $parseInt;nn// 18.2.5 parseInt(string, radix)n__chunk_1.$export(__chunk_1.$export.G + __chunk_1.$export.F * (parseInt != _parseInt), { parseInt: _parseInt });nnvar _parseInt$1 = __chunk_1.core.parseInt;nnvar _parseInt$2 = _parseInt$1;nnvar css = „/*\n* @Author: hanjiyun\n* @Date: 2019-05-13 22:55:26\n * @Last Modified by: hanjiyun\n * @Last Modified time: 2021-06-08 19:11:35\n*/\n/*\n* @Author: hanjiyun\n* @Date: 2019-05-14 21:32:06\n* @Last Modified by: hanjiyun\n* @Last Modified time: 2022-03-30 16:32:26\n*/\n.comment-item-body {\n display: flex;\n}\n.comment-item-body img {\n display: block;\n max-width: 100%;\n}\n.comment-item-body .comment-content {\n padding: 5px 0;\n word-wrap: break-word;\n word-break: break-word;\n white-space: pre-wrap;\n}\n.comment-item-body .comment-content .folded-text {\n padding: 5px 0;\n color: #c0c0c0;\n}\n.comment-item-body .comment-content a.folded-reason-url {\n color: #c0c0c0;\n border-bottom: 1px solid #c0c0c0;\n}\n.comment-item-body .comment-content a.folded-reason-url:hover {\n background: #bbb;\n color: #fff;\n border: 0;\n}\n.comment-item-body .comment-folded {\n margin-top: 10px;\n color: #c0c0c0;\n}\n.comment-item-body .comment-folded a {\n color: #c0c0c0;\n float: right;\n}\n.comment-item-body .comment-folded a:hover {\n background: #bbb;\n color: #fff;\n}\n\n.comment-item {\n margin-bottom: 15px;\n overflow: visible;\n}\n.comment-item .author-avatar {\n width: 48px;\n height: 48px;\n margin-right: 20px;\n}\n.comment-item .author-avatar img {\n display: block;\n max-width: 100%;\n}\n\n.comment-main {\n flex: 1;\n}\n\n.meta-header {\n background: #F3F5F7;\n padding: 3px 5px;\n margin-bottom: 5px;\n color: #999;\n}\n.meta-header span,\n.meta-header time {\n padding-left: 8px;\n}\n.meta-header time {\n font-size: 12px;\n}“;n__chunk_1.styleInject(css);nnvar baseItemPropTypes = {n config: __chunk_1.PropTypes.object,n bgColor: __chunk_1.PropTypes.string,n type: __chunk_1.PropTypes.string,n target: __chunk_1.PropTypes.object,n comment: __chunk_1.PropTypes.object,n canAtSb: __chunk_1.PropTypes.bool,n maxLength: __chunk_1.PropTypes.number,n replyUsers: __chunk_1.PropTypes.array,n handleAddReply: __chunk_1.PropTypes.func,n handleDelete: __chunk_1.PropTypes.func,n handleLoadMoreReplies: __chunk_1.PropTypes.func,n handleShowReportDialog: __chunk_1.PropTypes.func,n needEscape: __chunk_1.PropTypes.booln};nvar baseItemDefaultProps = {n config: null,n bgColor: “,n type: ‚comment‘,n target: null,n comment: null,n canAtSb: false,n maxLength: 0,n replyUsers: [],n handleAddReply: function handleAddReply() {},n handleDelete: function handleDelete() {},n handleLoadMoreReplies: function handleLoadMoreReplies() {},n handleShowReportDialog: function handleShowReportDialog() {},n needEscape: truen};nnvar BaseItem =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(BaseItem, _Component);nn function BaseItem(props) {n var _this;nn _this = _Component.call(this, props) || this;n _this.replyListRef = React__default.createRef();n _this.state = {n comment: props.comment,n isShowActions: true,n isHover: false,n replyEditorVisible: false,n isFolded: props.comment && props.comment.is_folded // 是否展开被折叠的评论nn };n return _this;n }nn var _proto = BaseItem.prototype;nn _proto.handleShowReplyEditor = function handleShowReplyEditor() {n this.setState({n replyEditorVisible: truen });n };nn _proto.handleHideReplyEditor = function handleHideReplyEditor() {n this.setState({n replyEditorVisible: falsen });n } // 滚动定位到刚刚发布那条二级回应n ;nn _proto.scrollToLatestReply = function scrollToLatestReply() {n var replyListNode = ReactDOM.findDOMNode(this.replyListRef.current);nn if (replyListNode instanceof HTMLElement) {n var latestReplyNode = replyListNode.querySelector(‚.latest-reply‘);n scrollToComponent(latestReplyNode, {n // offset: -20, // 再补上 -20 距离n align: ‚middle‘,n duration: 400n });n }n };nn _proto.handleAddReply = function handleAddReply(newRelpy, successCallback, failCallback, hideReplyListEditorCallback) {n var _this2 = this;nn var _this$props = this.props,n handleAddReply = _this$props.handleAddReply,n comment = _this$props.comment;n var commentId = comment.id; // 用于提交成功后隐藏输入框的回调nn var hideReplyEditorCallback = function hideReplyEditorCallback() {n _this2.handleHideReplyEditor(); // 如果需要隐藏回应列表中的输入框n // eslint-disable-next-line no-unused-expressionsnnn hideReplyListEditorCallback && hideReplyListEditorCallback();n }; // 用于滚动定位到刚刚发布那条二级回应的回调nnn var scrollToLatestReplyCallback = function scrollToLatestReplyCallback() {// this.scrollToLatestReply()n };nn handleAddReply(newRelpy, successCallback, failCallback, commentId, hideReplyEditorCallback, scrollToLatestReplyCallback);n };nn _proto.handleDeleteComment = function handleDeleteComment() {n var _this$props2 = this.props,n comment = _this$props2.comment,n handleDelete = _this$props2.handleDelete;nn if (window.confirm(„\u771F\u7684\u8981\u5220\u9664“ + comment.author.name + „\u7684\u8FD9\u6761\u56DE\u5E94\u5417\uFF1F“)) {n handleDelete(comment.id);n }n };nn _proto.handleHover = function handleHover(e) {n e.stopPropagation();n this.setState({n isHover: truen });n };nn _proto.handleLeave = function handleLeave(e) {n e.stopPropagation();n this.setState({n isHover: falsen });n };nn _proto.handleFold = function handleFold() {n this.setState({n isFolded: falsen });n };nn _proto.render = function render() {n var isFolded = this.state.isFolded;n var _this$props3 = this.props,n target = _this$props3.target,n comment = _this$props3.comment,n bgColor = _this$props3.bgColor,n needEscape = _this$props3.needEscape; // 被标记为了已删除,并且下面没有 replis, 不显示nn if (!comment || comment.is_deleted && comment.total_replies === 0 && comment.replies.length === 0) {n return null;n }nn var text = comment.text,n create_time = comment.create_time,n is_folded = comment.is_folded,n author = comment.author,n ref_comment = comment.ref_comment,n entities = comment.entities,n folded_reason_text = comment.folded_reason_text,n folded_reason_url = comment.folded_reason_url;n var cls = __chunk_3.classnames(‚item‘, ‚comment-item‘, {n ‚latest-comment‘: comment.is_latestn }); // data-*的作用用于 antispam获取值,https://github.intra.douban.com/antispam/hyjal/blob/master/static/js/app/raikiri/comment.js#L187nn return React__default.createElement(„div“, {n className: cls,n „data-cid“: comment.id,n „data-target_id“: target.id,n „data-target_kind“: target.kindn }, React__default.createElement(„div“, {n className: „comment-item-body“,n onMouseOver: this.handleHover.bind(this),n onMouseOut: this.handleLeave.bind(this)n }, React__default.createElement(„div“, {n className: „author-avatar“n }, React__default.createElement(„a“, {n href: author.url,n title: author.namen }, React__default.createElement(„img“, {n src: author.avatar,n alt: author.namen }))), React__default.createElement(„div“, {n className: „comment-main“n }, React__default.createElement(„div“, {n className: „meta-header“,n style: {n backgroundColor: bgColorn }n }, React__default.createElement(„a“, {n href: „https://www.douban.com/people/“ + author.id,n title: author.namen }, author.name), author.signature ? React__default.createElement(„span“, null, „(“ + author.signature + „)“) : null, React__default.createElement(„time“, {n dateTime: create_timen }, create_time)), React__default.createElement(„div“, {n className: __chunk_3.classnames(„comment-content“, {n hide: isFoldedn })n }, ref_comment && ref_comment.author ? React__default.createElement(„a“, {n href: ref_comment.author.url,n title: ref_comment.author.name,n className: „mention-user“n }, „@“, ref_comment.author.name) : null, !comment.is_deleted ? React__default.createElement(„span“, {n dangerouslySetInnerHTML: {n __html: __chunk_4.extractText(text, entities, needEscape)n }n }) : ‚[该回复已被删除]‘, is_folded ? React__default.createElement(„div“, {n className: „folded-text“n }, folded_reason_text, folded_reason_url ? React__default.createElement(React.Fragment, null, „\uFF0C“, React__default.createElement(„a“, {n target: „_blank“,n href: folded_reason_url,n className: „folded-reason-url“n }, „\u4E86\u89E3\u89C4\u5219“)) : null) : null), isFolded ? React__default.createElement(„p“, {n className: „comment-folded“n }, React__default.createElement(„span“, null, „[\u8BE5\u56DE\u590D\u5DF2\u88AB\u6298\u53E0]“), React__default.createElement(„a“, {n href: „javascript:;“,n onClick: this.handleFold.bind(this)n }, „\u5C55\u5F00“)) : null, this.renderActions())), this.renderReplyList());n };nn _proto.renderActions = function renderActions() {n var _this$state = this.state,n isHover = _this$state.isHover,n replyEditorVisible = _this$state.replyEditorVisible,n isShowActions = _this$state.isShowActions;n var _this$props4 = this.props,n config = _this$props4.config,n type = _this$props4.type,n handleShowReportDialog = _this$props4.handleShowReportDialog,n comment = _this$props4.comment,n canAtSb = _this$props4.canAtSb,n replyUsers = _this$props4.replyUsers,n maxLength = _this$props4.maxLength;nn if (!isShowActions || comment.is_folded || comment.is_deleted) {n return null;n }nn return React__default.createElement(actionBar.default, {n config: config,n type: type,n isHovering: isHover,n comment: comment,n replyEditorVisible: replyEditorVisible,n canAtSb: canAtSb,n maxLength: maxLength,n replyUsers: replyUsers,n handleHideReplyEditor: this.handleHideReplyEditor.bind(this),n handleShowReplyEditor: this.handleShowReplyEditor.bind(this),n handleDeleteComment: this.handleDeleteComment.bind(this),n handleAddReply: this.handleAddReply.bind(this),n handleShowReportDialog: handleShowReportDialogn });n };nn _proto.renderReplyList = function renderReplyList() {n var _this$props5 = this.props,n config = _this$props5.config,n target = _this$props5.target,n comment = _this$props5.comment,n truncation = _this$props5.truncation,n type = _this$props5.type,n canAtSb = _this$props5.canAtSb,n replyUsers = _this$props5.replyUsers,n handleDelete = _this$props5.handleDelete,n handleLoadMoreReplies = _this$props5.handleLoadMoreReplies,n handleFoldReplies = _this$props5.handleFoldReplies,n handleShowReportDialog = _this$props5.handleShowReportDialog,n needEscape = _this$props5.needEscape;nn if (type === ‚reply‘) {n return null;n }nn return React__default.createElement(replyList.default, {n config: config,n ref: this.replyListRef,n commentId: comment.id.toString(),n target: target,n replies: comment.replies,n truncation: truncation,n total: _parseInt$2(comment.total_replies, 10),n canAtSb: canAtSb,n replyUsers: replyUsers,n handleAddReply: this.handleAddReply.bind(this),n handleDelete: handleDelete,n handleFoldReplies: handleFoldReplies,n handleLoadMoreReplies: handleLoadMoreReplies,n handleShowReportDialog: handleShowReportDialog,n needEscape: needEscapen });n };nn return BaseItem;n}(React.Component);nnBaseItem.propTypes = baseItemPropTypes;nBaseItem.defaultProps = baseItemDefaultProps;nnexports.baseItemDefaultProps = baseItemDefaultProps;nexports.baseItemPropTypes = baseItemPropTypes;nexports.default = BaseItem;n//# sourceMappingURL=base-item.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/base-item.jsn// module id = 23n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/base-item.js?‘)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnObject.defineProperty(exports, „__esModule“, {n value: truen});nnvar _propTypes = __webpack_require__(44);nnvar _propTypes2 = _interopRequireDefault(_propTypes);nnfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }nnexports.default = {n message: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]).isRequired,n action: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.string, _propTypes2.default.node]),n onClick: _propTypes2.default.func,n style: _propTypes2.default.bool,n actionStyle: _propTypes2.default.object,n titleStyle: _propTypes2.default.object,n barStyle: _propTypes2.default.object,n activeBarStyle: _propTypes2.default.object,n dismissAfter: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.number]),n onDismiss: _propTypes2.default.func,n className: _propTypes2.default.string,n activeClassName: _propTypes2.default.string,n isActive: _propTypes2.default.bool,n title: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.node])n};nn//////////////////n// WEBPACK FOOTERn// ./~/comments/~/react-notification/dist/defaultPropTypes.jsn// module id = 24n// module chunks = 0n//# sourceURL=webpack:///./~/comments/~/react-notification/dist/defaultPropTypes.js?“)},[147,81],function(module,exports){eval(„“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.Is = exports.isArray = exports.isEmpty = exports.isFn = exports.isBool = exports.isNil = exports.isUndefined = exports.isNull = exports.isStr = exports.isObj = exports.isNum = void 0;n/**n * is primitive numbern * @param valn */nfunction isNum(val) {n return typeof val === ’number‘;n}nexports.isNum = isNum;n/**n * is object (not null)n * @param valn */nfunction isObj(val) {n return typeof val === ‚object‘ && val !== null;n}nexports.isObj = isObj;n/**n * is primitive stringn * @param valn */nfunction isStr(val) {n return typeof val === ’string‘;n}nexports.isStr = isStr;n/**n * is nulln * @param valn */nfunction isNull(val) {n return val === null;n}nexports.isNull = isNull;n/**n * is undefinedn * @param valn */nfunction isUndefined(val) {n return typeof val === ‚undefined‘;n}nexports.isUndefined = isUndefined;n/**n * is null or undefinedn * @param valn */nfunction isNil(val) {n return isNull(val) || isUndefined(val);n}nexports.isNil = isNil;n/**n * is primitive booleann * @param valn */nfunction isBool(val) {n return typeof val === ‚boolean‘;n}nexports.isBool = isBool;n/**n * is primitive functionn * @param valn */nfunction isFn(val) {n return typeof val === ‚function‘;n}nexports.isFn = isFn;n/**n * is empty string/array or null or undefinedn * @param valn */nfunction isEmpty(val) {n if (exports.isArray(val) || isStr(val)) {n return !val.length;n }n else if (isNil(val)) {n return true;n }n return false;n}nexports.isEmpty = isEmpty;n/**n * alias to Array.isArrayn */nexports.isArray = Array.isArray.bind(Array);n/**n * js 变量类型判断工具函数n */nexports.Is = {n isArray: exports.isArray,n isNum: isNum,n isObj: isObj,n isStr: isStr,n isNull: isNull,n isUndefined: isUndefined,n isNil: isNil,n isBool: isBool,n isEmpty: isEmpty,n isFn: isFn,n};n//# sourceMappingURL=is.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/is.jsn// module id = 26n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/is.js?“)},function(module,exports){eval(„// shim for using process in browsernvar process = module.exports = {};nn// cached from whatever global is present so that test runners that stub itn// don’t break things. But we need to wrap it in a try catch in case it isn// wrapped in strict mode code which doesn’t define any globals. It’s inside an// function because try/catches deoptimize in certain engines.nnvar cachedSetTimeout;nvar cachedClearTimeout;nnfunction defaultSetTimout() {n throw new Error(’setTimeout has not been defined‘);n}nfunction defaultClearTimeout () {n throw new Error(‚clearTimeout has not been defined‘);n}n(function () {n try {n if (typeof setTimeout === ‚function‘) {n cachedSetTimeout = setTimeout;n } else {n cachedSetTimeout = defaultSetTimout;n }n } catch (e) {n cachedSetTimeout = defaultSetTimout;n }n try {n if (typeof clearTimeout === ‚function‘) {n cachedClearTimeout = clearTimeout;n } else {n cachedClearTimeout = defaultClearTimeout;n }n } catch (e) {n cachedClearTimeout = defaultClearTimeout;n }n} ())nfunction runTimeout(fun) {n if (cachedSetTimeout === setTimeout) {n //normal enviroments in sane situationsn return setTimeout(fun, 0);n }n // if setTimeout wasn’t available but was latter definedn if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {n cachedSetTimeout = setTimeout;n return setTimeout(fun, 0);n }n try {n // when when somebody has screwed with setTimeout but no I.E. maddnessn return cachedSetTimeout(fun, 0);n } catch(e){n try {n // When we are in I.E. but the script has been evaled so I.E. doesn’t trust the global object when called normallyn return cachedSetTimeout.call(null, fun, 0);n } catch(e){n // same as above but when it’s a version of I.E. that must have the global object for ‚this‘, hopfully our context correct otherwise it will throw a global errorn return cachedSetTimeout.call(this, fun, 0);n }n }nnn}nfunction runClearTimeout(marker) {n if (cachedClearTimeout === clearTimeout) {n //normal enviroments in sane situationsn return clearTimeout(marker);n }n // if clearTimeout wasn’t available but was latter definedn if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {n cachedClearTimeout = clearTimeout;n return clearTimeout(marker);n }n try {n // when when somebody has screwed with setTimeout but no I.E. maddnessn return cachedClearTimeout(marker);n } catch (e){n try {n // When we are in I.E. but the script has been evaled so I.E. doesn’t trust the global object when called normallyn return cachedClearTimeout.call(null, marker);n } catch (e){n // same as above but when it’s a version of I.E. that must have the global object for ‚this‘, hopfully our context correct otherwise it will throw a global error.n // Some versions of I.E. have different rules for clearTimeout vs setTimeoutn return cachedClearTimeout.call(this, marker);n }n }nnnn}nvar queue = [];nvar draining = false;nvar currentQueue;nvar queueIndex = -1;nnfunction cleanUpNextTick() {n if (!draining || !currentQueue) {n return;n }n draining = false;n if (currentQueue.length) {n queue = currentQueue.concat(queue);n } else {n queueIndex = -1;n }n if (queue.length) {n drainQueue();n }n}nnfunction drainQueue() {n if (draining) {n return;n }n var timeout = runTimeout(cleanUpNextTick);n draining = true;nn var len = queue.length;n while(len) {n currentQueue = queue;n queue = [];n while (++queueIndex 1) {n for (var i = 1; i \u6211\u6765\u56DE\u5E94“);n }nn var disabled = !canComment || submittingStatus === __chunk_5.PENDING;n var submitBtn = React__default.createElement(„button“, {n type: „submit“,n disabled: disabled,n className: __chunk_3.classnames(‚comment-form-btn‘, {n disabled: disabledn })n }, submittingStatus === __chunk_5.PENDING ? ‚提交中‘ : btnText);n var maxLen = 0; // 如果要转发到广播,最多 140nn if (checked) {n maxLen = __chunk_4.MAX_STATUS_LENGTH; // 广播下的回复字数最多 280,其他的不限字数n } else if (config.service && config.service === __chunk_4.STATUS) {n maxLen = __chunk_4.MAX_STATUS_COMMENTS_LENGTH;n } else {n maxLen = maxLength;n }nn return React__default.createElement(„div“, {n className: „comment-editor“n }, React__default.createElement(Avatar, {n url: „https://www.douban.com/people/“ + user.id,n avatar: user.avatar,n size: 48n }), canComment ? React__default.createElement(„form“, {n className: „form-field“,n onSubmit: this.handleAddComment.bind(this)n }, React__default.createElement(userSelect.UserSelect, {n inputType: „area“,n text: text,n maxLength: maxLen,n uploadFile: upload_file,n uploaded: uploaded,n replyUsers: replyUsers,n canAtSb: canAtSb,n canUploadFile: canUploadFile,n handleChange: this.handleChange.bind(this),n handleChangeFile: this.handleChangeFile.bind(this)n }), React__default.createElement(„div“, {n className: „form-foot“n }, React__default.createElement(„div“, {n className: „form-foot-item“n }, enableSyncToStatus ? React__default.createElement(„label“, null, React__default.createElement(„input“, {n type: „checkbox“,n name: „sync_to_mb“,n checked: checked,n onChange: function onChange() {n return _this3.handleChecked();n }n }), „\u8F6C\u53D1\u5230\u5E7F\u64AD“) : null), React__default.createElement(„div“, {n className: __chunk_3.classnames(‚form-foot-item‘, ‚limit-count‘, {n overflow: text.length >= maxLenn })n }, maxLen && maxLen – textWithTinyUrl.length ’n};nnvar Paginator =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(Paginator, _Component);nn function Paginator() {n return _Component.apply(this, arguments) || this;n }nn var _proto = Paginator.prototype;nn _proto.getTotalPages = function getTotalPages() {n var _this$props = this.props,n count = _this$props.count,n total = _this$props.total;n return Math.floor(total / count) + (total % count > 0 ? 1 : 0);n };nn _proto.updateUrl = function updateUrl(newPage) {n var _window = window,n location = _window.location;n var origin = location.origin;n var pathname = location.pathname;n var hash = location.hash;n return „“ + origin + pathname + „?start=“ + newPage + (hash || ‚#comments‘);n };nn _proto.renderItem = function renderItem(page) {n var count = this.props.count; // TODO:n // 1. 可以根据 app 和 service 组合出 url,但要考虑到有的业务线 app 名称不是直接用做二级域名n // 小组: https://www.douban.com/group/topic/111111n // 相册: https://www.douban.com/photos/album/68394634/?start=18n // 2. query 可以用 getQuery() 动态获取后设置,而不是像这样写死,比如可能会有其他的参数n // 长评: https://movie.douban.com/review/9832773/?tab=comments#commentsnn var pageLink = this.updateUrl((page – 1) * count);n return React__default.createElement(„a“, {n href: pageLink,n key: „_page_“ + pagen }, page);n };nn _proto.renderItems = function renderItems(currentPage) {n var winglen = 4;n var total = this.getTotalPages();n var break1 = currentPage > winglen * 2 + 2;n var break2 = total – currentPage > winglen * 2 + 1;n var start = break1 ? Math.min(currentPage – winglen, total – winglen * 2) : 1;n var end = break2 ? Math.max(currentPage + winglen, winglen * 2 + 1) : total;n var pageItemList = [];nn if (break1) {n pageItemList.push(this.renderItem(1));n pageItemList.push(this.renderItem(2));n pageItemList.push(React__default.createElement(„span“, {n className: „break“,n key: „break_1″n }, „…“));n }nn for (var i = start; i = total) {n current = total;n } // TODO: use getQuery()nnn var prevLink = this.updateUrl((current – 2) * count);n var nextLink = this.updateUrl(current * count);n return React__default.createElement(„div“, {n className: „paginator“n }, current !== 1 ? React__default.createElement(„a“, {n className: „prev“,n href: prevLinkn }, prevText) : React__default.createElement(„span“, {n className: „prev“n }, prevText), this.renderItems(current), current !== total ? React__default.createElement(„a“, {n className: „next“,n href: nextLinkn }, nextText) : React__default.createElement(„span“, {n className: „next“n }, nextText));n };nn return Paginator;n}(React.Component);nnPaginator.propTypes = paginatorPropTypes;nPaginator.defaultProps = paginatorDefaultProps;nnexports.default = Paginator;nexports.paginatorDefaultProps = paginatorDefaultProps;nexports.paginatorPropTypes = paginatorPropTypes;n//# sourceMappingURL=paginator.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/paginator.jsn// module id = 36n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/paginator.js?‘)},function(module,exports,__webpack_require__){eval(“use strict‘;nnObject.defineProperty(exports, ‚__esModule‘, { value: true });nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‚object‘) && ‚default‘ in ex) ? ex[‚default‘] : ex; }nnvar __chunk_1 = __webpack_require__(1);nvar __chunk_2 = __webpack_require__(6);nvar React = __webpack_require__(2);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);nnvar css = „@charset \“UTF-8\“;\n/**\n * @Desc 投诉弹窗\n *\n * @Author wangyanhong\n * @Date 2019-05-15\n */\n.report-dialog {\n width: 380px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 999;\n}\n.report-dialog-shd {\n border-radius: 5px;\n position: absolute;\n left: -8px;\n top: -8px;\n width: 100%;\n height: 100%;\n padding: 8px;\n background: #666;\n opacity: 0.4;\n}\n.report-dialog-content {\n position: relative;\n z-index: 2;\n background: #fff;\n border: 1px solid #bbb;\n border-radius: 4px;\n}\n.report-dialog-close {\n position: absolute;\n top: 13px;\n right: 12px;\n padding: 0 3px;\n z-index: 1;\n font: 11px/1.2 \“Comic Sans MS\“, sans-serif;\n}\n.report-hd {\n padding: 10px 10px 6px;\n background: #ebf5eb;\n font-size: 14px;\n -moz-border-radius: 4px;\n border-radius: 4px 4px 0 0;\n}\n.report-hd h3 {\n margin: 0;\n line-height: 1.8;\n color: #072;\n font-size: 15px;\n font-weight: normal;\n background: none;\n}\n.report-bd {\n padding: 20px 20px 20px 40px;\n font-size: 13px;\n color: #0E0E0E;\n}\n.report-bd ul, .report-bd li {\n padding: 0;\n margin: 0;\n}\n.report-bd a {\n text-decoration: none;\n}\n.report-bd a:hover {\n background: transparent;\n}\n.report-bd .extra-options {\n border-top: 1px solid #dfdfdf;\n margin-top: 16px;\n padding-top: 16px;\n}\n.report-bd .extra-options .link {\n color: #0E0E0E;\n font-size: 13px;\n height: 18px;\n line-height: 18px;\n}\n.report-bd .extra-options .link:after {\n content: \“\“;\n display: inline-block;\n vertical-align: middle;\n width: 18px;\n height: 18px;\n margin-top: -1px;\n margin-left: 4px;\n background: url(\“https://img9.doubanio.com/f/shire/c0c3478524c9338ace2ea316b6a74d1dc493d748/pics/icon/more@2x.png\“) no-repeat center;\n background-size: contain;\n}\n.report-bd .extra-options .desc {\n font-size: 13px;\n color: #9B9B9B;\n}\n.report .bn-flat {\n text-align: center;\n}\n.report .bn-flat .btn-report {\n display: inline-block;\n height: 25px;\n border-width: 1px;\n border-style: solid;\n border-color: #bbb #bbb #999;\n padding: 0 14px;\n color: #333;\n font-size: 12px;\n line-height: 25px;\n cursor: pointer;\n border-radius: 3px;\n -webkit-appearance: none;\n background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fcfcfc), color-stop(1, #e9e9e9));\n}\n\n.loading-wrapper {\n display: flex;\n align-items: center;\n}\n\n.loading-icon {\n display: inline-block;\n width: 16px;\n height: 16px;\n margin-right: 10px;\n background: url(\“//img3.doubanio.com/img/files/file-1578038285.gif\“) center center no-repeat;\n background-size: 16px;\n}“;n__chunk_1.styleInject(css);nnvar reportPropTypes = {n isShowDialog: __chunk_1.PropTypes.bool,n isFetchingReportReasons: __chunk_1.PropTypes.bool,n handleHideReportDialog: __chunk_1.PropTypes.func,n handleSubmitReport: __chunk_1.PropTypes.funcn};nvar reportDefaultProps = {n isShowDialog: false,n isFetchingReportReasons: false,n reasons: [],n handleHideReportDialog: function handleHideReportDialog() {},n handleSubmitReport: function handleSubmitReport() {}n};nnvar Report =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(Report, _Component);nn function Report() {n var _this;nn for (var _len = arguments.length, args = new Array(_len), _key = 0; _key -1) {n REASONS = __chunk_2._Object$assign(REASONS, {n 11: ‚与作品或讨论区主题无关’n });n }nn var showableReasons = __chunk_2._Object$keys(REASONS).sort(function (k_a, k_b) {n var i_a = REASON_SORT_BY.indexOf(Number(k_a));n var i_b = REASON_SORT_BY.indexOf(Number(k_b));nn if (i_a === -1) {n return 1;n }nn if (i_b === -1) {n return -1;n }nn return i_a – i_b;n }).map(function (key) {n return {n name: REASONS[key],n key: keyn };n }).concat({n name: ‚其他原因‘,n key: ‚other’n });nn return React__default.createElement(„ul“, null, showableReasons.map(function (reason) {n return React__default.createElement(„li“, {n key: reason.keyn }, React__default.createElement(„label“, null, React__default.createElement(„input“, {n type: „radio“,n name: „reason“,n value: reason.key,n checked: _this2.state.selected == reason.key,n onChange: function onChange(e) {n return _this2.handleChange(e);n }n }), reason.name));n }));n };nn _proto.renderReportSuccess = function renderReportSuccess() {n return React__default.createElement(„div“, null, „\u6295\u8BC9\u5DF2\u7ECF\u63D0\u4EA4\u7ED9\u7BA1\u7406\u5458\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u5904\u7406\u3002“);n };nn _proto.render = function render() {n var _this3 = this;nn var _this$props2 = this.props,n isShowDialog = _this$props2.isShowDialog,n isReported = _this$props2.isReported,n handleHideReportDialog = _this$props2.handleHideReportDialog;n return React__default.createElement(„div“, {n className: __chunk_3.classnames(‚report-dialog‘, {n hide: !isShowDialogn })n }, React__default.createElement(„span“, {n className: „report-dialog-shd“n }), React__default.createElement(„div“, {n className: „report-dialog-content“n }, React__default.createElement(„a“, {n href: „javascript:;“,n className: „report-dialog-close“,n onClick: handleHideReportDialogn }, „X“), React__default.createElement(„div“, {n className: „report-hd“n }, React__default.createElement(„h3“, null, isReported ? ‚提交成功‘ : ‚选择投诉原因‘)), React__default.createElement(„div“, {n className: „report-bd“n }, isReported ? this.renderReportSuccess() : React__default.createElement(„form“, {n onSubmit: function onSubmit(e) {n return _this3.handleSubmitReport(e);n }n }, this.renderReportHtml(), React__default.createElement(„div“, {n className: „extra-options“n }, React__default.createElement(„a“, {n href: „https://help.douban.com/complaint/“,n target: „_blank“,n className: „link“n }, „\u4FB5\u72AF\u6211\u7684\u6743\u76CA“), React__default.createElement(„p“, {n className: „desc“n }, „\u6284\u88AD\u6216\u672A\u7ECF\u6388\u6743\u8F6C\u8F7D\u6211\u7684\u5185\u5BB9\u3001\u4FB5\u72AF\u6211\u7684\u4E2A\u4EBA\u6743\u76CA\u3001\u4FB5\u72AF\u6211\u7684\u4F01\u4E1A\u6743\u76CA“)), React__default.createElement(„div“, {n className: „report-btns“n }, React__default.createElement(„button“, {n className: „report-btn comment-form-btn“n }, „\u6295\u8BC9“))))));n };nn return Report;n}(React.Component);nnReport.propTypes = reportPropTypes;nReport.defaultProps = reportDefaultProps;nnexports.default = Report;nexports.reportDefaultProps = reportDefaultProps;nexports.reportPropTypes = reportPropTypes;n//# sourceMappingURL=report.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/report.jsn// module id = 37n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/report.js?‘);
},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnObject.defineProperty(exports, „__esModule“, {n value: truen});nnvar _notification = __webpack_require__(39);nnObject.defineProperty(exports, ‚Notification‘, {n enumerable: true,n get: function get() {n return _interopRequireDefault(_notification).default;n }n});nnvar _notificationStack = __webpack_require__(79);nnObject.defineProperty(exports, ‚NotificationStack‘, {n enumerable: true,n get: function get() {n return _interopRequireDefault(_notificationStack).default;n }n});nnfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }nn//////////////////n// WEBPACK FOOTERn// ./~/comments/~/react-notification/dist/index.jsn// module id = 38n// module chunks = 0n//# sourceURL=webpack:///./~/comments/~/react-notification/dist/index.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnObject.defineProperty(exports, „__esModule“, {n value: truen});nnvar _extends = Object.assign || function (target) { for (var i = 1; i …)n * const fetchDataJob = new Job(async () => {n * const data = await fetchData()n * let user = await fetchLoginUserJob.wait() // 等待 fetchLoginUserJob 执行完成n * // handle data & user, e.g. log data & user.idn * log(‚viewpage‘, { id: data.id, userId: user && user.id})n * })n * // 同时执行两个异步函数,n * fetchLoginUserJob.call()n * fetchDataJob.call()n *n */nvar Job = /** @class */ (function () {n function Job(_job) {n this._job = _job;n this._lastDeps = [];n this._mitt = mitt_1.default();n }n Object.defineProperty(Job.prototype, „result“, {n get: function () {n return this._result;n },n enumerable: false,n configurable: truen });n /**n * 等待执行结果,该方法不会触发执行, 但是会返回一个只有调用过 once/call 才会 resolve 的 Promisen */n Job.prototype.wait = function () {n var _this = this;n if (this._result) {n return this._result;n }n return new Promise(function (res) {n var cb = function (r) {n _this.off(‚exec‘, cb);n res(r);n };n _this.on(‚exec‘, cb);n });n };n Job.prototype.on = function (event, cb) {n this._mitt.on(event, cb);n };n Job.prototype.off = function (event, cb) {n this._mitt.off(event, cb);n };n /** 如果已经执行过,则直接返回上一次执行的 Promise, 否则先执行再返回 Promise */n Job.prototype.once = function () {n if (!this._result) {n this.call();n }n return this._result;n };n Job.prototype.only = function (job, deps) {n if (is_1.isFn(job)) {n this._job = job;n deps = deps || [];n }n else {n deps = job;n }n if (shallow_equal_1.shallowEqualArrays(this._lastDeps, deps)) {n return this.once();n }n this._lastDeps = deps;n return this.call();n };n /** 执行并返回 Promise */n Job.prototype.call = function () {n this._result = Promise.resolve(this._job());n this._mitt.emit(‚exec‘, this._result);n return this._result;n };n return Job;n}());nexports.Job = Job;n//# sourceMappingURL=job.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/async/job.jsn// module id = 42n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/async/job.js?“)},function(module,exports,__webpack_require__){eval(‚“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.shallowEqualArrays = exports.shallowEqualObjects = void 0;nvar shallowEqual = __webpack_require__(145);n/**n * 用于 React 的浅比较对象n * @param an * @param bn */nfunction shallowEqualObjects(a, b) {n return shallowEqual.shallowEqualObjects(a, b);n}nexports.shallowEqualObjects = shallowEqualObjects;n/**n * 用于 React 的浅比较数组n * @param an * @param bn */nfunction shallowEqualArrays(a, b) {n return shallowEqual.shallowEqualArrays(a, b);n}nexports.shallowEqualArrays = shallowEqualArrays;n//# sourceMappingURL=shallow-equal.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/shallow-equal.jsn// module id = 43n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/shallow-equal.js?‘)},function(module,exports,__webpack_require__){eval(„/**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nnif (true) {n var ReactIs = __webpack_require__(48);nn // By explicitly using `prop-types` you are opting into new development behavior.n // http://fb.me/prop-types-in-prodn var throwOnDirectAccess = true;n module.exports = __webpack_require__(134)(ReactIs.isElement, throwOnDirectAccess);n} else {n // By explicitly using `prop-types` you are opting into new production behavior.n // http://fb.me/prop-types-in-prodn module.exports = require(‚./factoryWithThrowingShims‘)();n}nnn//////////////////n// WEBPACK FOOTERn// ./~/prop-types/index.jsn// module id = 44n// module chunks = 0n//# sourceURL=webpack:///./~/prop-types/index.js?“)},function(module,exports){eval(„/**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict‘;nnvar ReactPropTypesSecret = ‚SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED‘;nnmodule.exports = ReactPropTypesSecret;nnn//////////////////n// WEBPACK FOOTERn// ./~/prop-types/lib/ReactPropTypesSecret.jsn// module id = 45n// module chunks = 0n//# sourceURL=webpack:///./~/prop-types/lib/ReactPropTypesSecret.js?“)},function(module,exports){eval(„module.exports = Function.call.bind(Object.prototype.hasOwnProperty);nnn//////////////////n// WEBPACK FOOTERn// ./~/prop-types/lib/has.jsn// module id = 46n// module chunks = 0n//# sourceURL=webpack:///./~/prop-types/lib/has.js?“)},[146,135],function(module,exports,__webpack_require__){eval(„‚use strict‘;nnif (false) {n module.exports = require(‚./cjs/react-is.production.min.js‘);n} else {n module.exports = __webpack_require__(136);n}nnn//////////////////n// WEBPACK FOOTERn// ./~/react-is/index.jsn// module id = 48n// module chunks = 0n//# sourceURL=webpack:///./~/react-is/index.js?“)},[147,137],function(module,exports,__webpack_require__){eval(„module.exports = __webpack_require__(51);nn//////////////////n// WEBPACK FOOTERn// ./~/axios/index.jsn// module id = 50n// module chunks = 0n//# sourceURL=webpack:///./~/axios/index.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nvar bind = __webpack_require__(32);nvar Axios = __webpack_require__(53);nvar defaults = __webpack_require__(22);nn/**n * Create an instance of Axiosn *n * @param {Object} defaultConfig The default config for the instancen * @return {Axios} A new instance of Axiosn */nfunction createInstance(defaultConfig) {n var context = new Axios(defaultConfig);n var instance = bind(Axios.prototype.request, context);nn // Copy axios.prototype to instancen utils.extend(instance, Axios.prototype, context);nn // Copy context to instancen utils.extend(instance, context);nn return instance;n}nn// Create the default instance to be exportednvar axios = createInstance(defaults);nn// Expose Axios class to allow class inheritancenaxios.Axios = Axios;nn// Factory for creating new instancesnaxios.create = function create(instanceConfig) {n return createInstance(utils.merge(defaults, instanceConfig));n};nn// Expose Cancel & CancelTokennaxios.Cancel = __webpack_require__(29);naxios.CancelToken = __webpack_require__(52);naxios.isCancel = __webpack_require__(30);nn// Expose all/spreadnaxios.all = function all(promises) {n return Promise.all(promises);n};naxios.spread = __webpack_require__(66);nnmodule.exports = axios;nn// Allow use of default import syntax in TypeScriptnmodule.exports.default = axios;nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/axios.jsn// module id = 51n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/axios.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar Cancel = __webpack_require__(29);nn/**n * A `CancelToken` is an object that can be used to request cancellation of an operation.n *n * @classn * @param {Function} executor The executor function.n */nfunction CancelToken(executor) {n if (typeof executor !== ‚function‘) {n throw new TypeError(‚executor must be a function.‘);n }nn var resolvePromise;n this.promise = new Promise(function promiseExecutor(resolve) {n resolvePromise = resolve;n });nn var token = this;n executor(function cancel(message) {n if (token.reason) {n // Cancellation has already been requestedn return;n }nn token.reason = new Cancel(message);n resolvePromise(token.reason);n });n}nn/**n * Throws a `Cancel` if cancellation has been requested.n */nCancelToken.prototype.throwIfRequested = function throwIfRequested() {n if (this.reason) {n throw this.reason;n }n};nn/**n * Returns an object that contains a new `CancelToken` and a function that, when called,n * cancels the `CancelToken`.n */nCancelToken.source = function source() {n var cancel;n var token = new CancelToken(function executor(c) {n cancel = c;n });n return {n token: token,n cancel: canceln };n};nnmodule.exports = CancelToken;nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/cancel/CancelToken.jsn// module id = 52n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/cancel/CancelToken.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar defaults = __webpack_require__(22);nvar utils = __webpack_require__(3);nvar InterceptorManager = __webpack_require__(54);nvar dispatchRequest = __webpack_require__(55);nn/**n * Create a new instance of Axiosn *n * @param {Object} instanceConfig The default config for the instancen */nfunction Axios(instanceConfig) {n this.defaults = instanceConfig;n this.interceptors = {n request: new InterceptorManager(),n response: new InterceptorManager()n };n}nn/**n * Dispatch a requestn *n * @param {Object} config The config specific for this request (merged with this.defaults)n */nAxios.prototype.request = function request(config) {n /*eslint no-param-reassign:0*/n // Allow for axios(‚example/url'[, config]) a la fetch APIn if (typeof config === ’string‘) {n config = utils.merge({n url: arguments[0]n }, arguments[1]);n }nn config = utils.merge(defaults, {method: ‚get‘}, this.defaults, config);n config.method = config.method.toLowerCase();nn // Hook up interceptors middlewaren var chain = [dispatchRequest, undefined];n var promise = Promise.resolve(config);nn this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {n chain.unshift(interceptor.fulfilled, interceptor.rejected);n });nn this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {n chain.push(interceptor.fulfilled, interceptor.rejected);n });nn while (chain.length) {n promise = promise.then(chain.shift(), chain.shift());n }nn return promise;n};nn// Provide aliases for supported request methodsnutils.forEach([‚delete‘, ‚get‘, ‚head‘, ‚options‘], function forEachMethodNoData(method) {n /*eslint func-names:0*/n Axios.prototype[method] = function(url, config) {n return this.request(utils.merge(config || {}, {n method: method,n url: urln }));n };n});nnutils.forEach([‚post‘, ‚put‘, ‚patch‘], function forEachMethodWithData(method) {n /*eslint func-names:0*/n Axios.prototype[method] = function(url, data, config) {n return this.request(utils.merge(config || {}, {n method: method,n url: url,n data: datan }));n };n});nnmodule.exports = Axios;nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/core/Axios.jsn// module id = 53n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/core/Axios.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nnfunction InterceptorManager() {n this.handlers = [];n}nn/**n * Add a new interceptor to the stackn *n * @param {Function} fulfilled The function to handle `then` for a `Promise`n * @param {Function} rejected The function to handle `reject` for a `Promise`n *n * @return {Number} An ID used to remove interceptor latern */nInterceptorManager.prototype.use = function use(fulfilled, rejected) {n this.handlers.push({n fulfilled: fulfilled,n rejected: rejectedn });n return this.handlers.length – 1;n};nn/**n * Remove an interceptor from the stackn *n * @param {Number} id The ID that was returned by `use`n */nInterceptorManager.prototype.eject = function eject(id) {n if (this.handlers[id]) {n this.handlers[id] = null;n }n};nn/**n * Iterate over all the registered interceptorsn *n * This method is particularly useful for skipping over anyn * interceptors that may have become `null` calling `eject`.n *n * @param {Function} fn The function to call for each interceptorn */nInterceptorManager.prototype.forEach = function forEach(fn) {n utils.forEach(this.handlers, function forEachHandler(h) {n if (h !== null) {n fn(h);n }n });n};nnmodule.exports = InterceptorManager;nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/core/InterceptorManager.jsn// module id = 54n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/core/InterceptorManager.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nvar transformData = __webpack_require__(58);nvar isCancel = __webpack_require__(30);nvar defaults = __webpack_require__(22);nvar isAbsoluteURL = __webpack_require__(62);nvar combineURLs = __webpack_require__(60);nn/**n * Throws a `Cancel` if cancellation has been requested.n */nfunction throwIfCancellationRequested(config) {n if (config.cancelToken) {n config.cancelToken.throwIfRequested();n }n}nn/**n * Dispatch a request to the server using the configured adapter.n *n * @param {object} config The config that is to be used for the requestn * @returns {Promise} The Promise to be fulfilledn */nmodule.exports = function dispatchRequest(config) {n throwIfCancellationRequested(config);nn // Support baseURL confign if (config.baseURL && !isAbsoluteURL(config.url)) {n config.url = combineURLs(config.baseURL, config.url);n }nn // Ensure headers existn config.headers = config.headers || {};nn // Transform request datan config.data = transformData(n config.data,n config.headers,n config.transformRequestn );nn // Flatten headersn config.headers = utils.merge(n config.headers.common || {},n config.headers[config.method] || {},n config.headers || {}n );nn utils.forEach(n [‚delete‘, ‚get‘, ‚head‘, ‚post‘, ‚put‘, ‚patch‘, ‚common‘],n function cleanHeaderConfig(method) {n delete config.headers[method];n }n );nn var adapter = config.adapter || defaults.adapter;nn return adapter(config).then(function onAdapterResolution(response) {n throwIfCancellationRequested(config);nn // Transform response datan response.data = transformData(n response.data,n response.headers,n config.transformResponsen );nn return response;n }, function onAdapterRejection(reason) {n if (!isCancel(reason)) {n throwIfCancellationRequested(config);nn // Transform response datan if (reason && reason.response) {n reason.response.data = transformData(n reason.response.data,n reason.response.headers,n config.transformResponsen );n }n }nn return Promise.reject(reason);n });n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/core/dispatchRequest.jsn// module id = 55n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/core/dispatchRequest.js?“)},function(module,exports){eval(„‚use strict‘;nn/**n * Update an Error with the specified config, error code, and response.n *n * @param {Error} error The error to update.n * @param {Object} config The config.n * @param {string} [code] The error code (for example, ‚ECONNABORTED‘).n * @param {Object} [request] The request.n * @param {Object} [response] The response.n * @returns {Error} The error.n */nmodule.exports = function enhanceError(error, config, code, request, response) {n error.config = config;n if (code) {n error.code = code;n }n error.request = request;n error.response = response;n return error;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/core/enhanceError.jsn// module id = 56n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/core/enhanceError.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar createError = __webpack_require__(31);nn/**n * Resolve or reject a Promise based on response status.n *n * @param {Function} resolve A function that resolves the promise.n * @param {Function} reject A function that rejects the promise.n * @param {object} response The response.n */nmodule.exports = function settle(resolve, reject, response) {n var validateStatus = response.config.validateStatus;n // Note: status is not exposed by XDomainRequestn if (!response.status || !validateStatus || validateStatus(response.status)) {n resolve(response);n } else {n reject(createError(n ‚Request failed with status code ‚ + response.status,n response.config,n null,n response.request,n responsen ));n }n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/core/settle.jsn// module id = 57n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/core/settle.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nn/**n * Transform the data for a request or a responsen *n * @param {Object|String} data The data to be transformedn * @param {Array} headers The headers for the request or responsen * @param {Array|Function} fns A single function or Array of functionsn * @returns {*} The resulting transformed datan */nmodule.exports = function transformData(data, headers, fns) {n /*eslint no-param-reassign:0*/n utils.forEach(fns, function transform(fn) {n data = fn(data, headers);n });nn return data;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/core/transformData.jsn// module id = 58n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/core/transformData.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nnfunction encode(val) {n return encodeURIComponent(val).n replace(/%40/gi, ‚@‘).n replace(/%3A/gi, ‚:‘).n replace(/%24/g, ‚$‘).n replace(/%2C/gi, ‚,‘).n replace(/%20/g, ‚+‘).n replace(/%5B/gi, ‚[‚).n replace(/%5D/gi, ‚]‘);n}nn/**n * Build a URL by appending params to the endn *n * @param {string} url The base of the url (e.g., http://www.google.com)n * @param {object} [params] The params to be appendedn * @returns {string} The formatted urln */nmodule.exports = function buildURL(url, params, paramsSerializer) {n /*eslint no-param-reassign:0*/n if (!params) {n return url;n }nn var serializedParams;n if (paramsSerializer) {n serializedParams = paramsSerializer(params);n } else if (utils.isURLSearchParams(params)) {n serializedParams = params.toString();n } else {n var parts = [];nn utils.forEach(params, function serialize(val, key) {n if (val === null || typeof val === ‚undefined‘) {n return;n }nn if (utils.isArray(val)) {n key = key + ‚[]‘;n } else {n val = [val];n }nn utils.forEach(val, function parseValue(v) {n if (utils.isDate(v)) {n v = v.toISOString();n } else if (utils.isObject(v)) {n v = JSON.stringify(v);n }n parts.push(encode(key) + ‚=‘ + encode(v));n });n });nn serializedParams = parts.join(‚&‘);n }nn if (serializedParams) {n url += (url.indexOf(‚?‘) === -1 ? ‚?‘ : ‚&‘) + serializedParams;n }nn return url;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/buildURL.jsn// module id = 59n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/buildURL.js?“);
},function(module,exports){eval(„‚use strict‘;nn/**n * Creates a new URL by combining the specified URLsn *n * @param {string} baseURL The base URLn * @param {string} relativeURL The relative URLn * @returns {string} The combined URLn */nmodule.exports = function combineURLs(baseURL, relativeURL) {n return relativeURLn ? baseURL.replace(/\/+$/, “) + ‚/‘ + relativeURL.replace(/^\/+/, “)n : baseURL;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/combineURLs.jsn// module id = 60n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/combineURLs.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nnmodule.exports = (n utils.isStandardBrowserEnv() ?nn // Standard browser envs support document.cookien (function standardBrowserEnv() {n return {n write: function write(name, value, expires, path, domain, secure) {n var cookie = [];n cookie.push(name + ‚=‘ + encodeURIComponent(value));nn if (utils.isNumber(expires)) {n cookie.push(‚expires=‘ + new Date(expires).toGMTString());n }nn if (utils.isString(path)) {n cookie.push(‚path=‘ + path);n }nn if (utils.isString(domain)) {n cookie.push(‚domain=‘ + domain);n }nn if (secure === true) {n cookie.push(’secure‘);n }nn document.cookie = cookie.join(‚; ‚);n },nn read: function read(name) {n var match = document.cookie.match(new RegExp(‚(^|;\\s*)(‚ + name + ‚)=([^;]*)‘));n return (match ? decodeURIComponent(match[3]) : null);n },nn remove: function remove(name) {n this.write(name, “, Date.now() – 86400000);n }n };n })() :nn // Non standard browser env (web workers, react-native) lack needed support.n (function nonStandardBrowserEnv() {n return {n write: function write() {},n read: function read() { return null; },n remove: function remove() {}n };n })()n);nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/cookies.jsn// module id = 61n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/cookies.js?“)},function(module,exports){eval(“use strict‘;nn/**n * Determines whether the specified URL is absoluten *n * @param {string} url The URL to testn * @returns {boolean} True if the specified URL is absolute, otherwise falsen */nmodule.exports = function isAbsoluteURL(url) {n // A URL is considered absolute if it begins with “
://“ or „//“ (protocol-relative URL).n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followedn // by any combination of letters, digits, plus, period, or hyphen.n return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/isAbsoluteURL.jsn// module id = 62n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/isAbsoluteURL.js?‘)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nnmodule.exports = (n utils.isStandardBrowserEnv() ?nn // Standard browser envs have full support of the APIs needed to testn // whether the request URL is of the same origin as current location.n (function standardBrowserEnv() {n var msie = /(msie|trident)/i.test(navigator.userAgent);n var urlParsingNode = document.createElement(‚a‘);n var originURL;nn /**n * Parse a URL to discover it’s componentsn *n * @param {String} url The URL to be parsedn * @returns {Object}n */n function resolveURL(url) {n var href = url;nn if (msie) {n // IE needs attribute set twice to normalize propertiesn urlParsingNode.setAttribute(‚href‘, href);n href = urlParsingNode.href;n }nn urlParsingNode.setAttribute(‚href‘, href);nn // urlParsingNode provides the UrlUtils interface – http://url.spec.whatwg.org/#urlutilsn return {n href: urlParsingNode.href,n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, “) : “,n host: urlParsingNode.host,n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, “) : “,n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, “) : “,n hostname: urlParsingNode.hostname,n port: urlParsingNode.port,n pathname: (urlParsingNode.pathname.charAt(0) === ‚/‘) ?n urlParsingNode.pathname :n ‚/‘ + urlParsingNode.pathnamen };n }nn originURL = resolveURL(window.location.href);nn /**n * Determine if a URL shares the same origin as the current locationn *n * @param {String} requestURL The URL to testn * @returns {boolean} True if URL shares the same origin, otherwise falsen */n return function isURLSameOrigin(requestURL) {n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;n return (parsed.protocol === originURL.protocol &&n parsed.host === originURL.host);n };n })() :nn // Non standard browser envs (web workers, react-native) lack needed support.n (function nonStandardBrowserEnv() {n return function isURLSameOrigin() {n return true;n };n })()n);nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/isURLSameOrigin.jsn// module id = 63n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/isURLSameOrigin.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nnmodule.exports = function normalizeHeaderName(headers, normalizedName) {n utils.forEach(headers, function processHeader(value, name) {n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {n headers[normalizedName] = value;n delete headers[name];n }n });n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/normalizeHeaderName.jsn// module id = 64n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/normalizeHeaderName.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar utils = __webpack_require__(3);nn// Headers whose duplicates are ignored by noden// c.f. https://nodejs.org/api/http.html#http_message_headersnvar ignoreDuplicateOf = [n ‚age‘, ‚authorization‘, ‚content-length‘, ‚content-type‘, ‚etag‘,n ‚expires‘, ‚from‘, ‚host‘, ‚if-modified-since‘, ‚if-unmodified-since‘,n ‚last-modified‘, ‚location‘, ‚max-forwards‘, ‚proxy-authorization‘,n ‚referer‘, ‚retry-after‘, ‚user-agent’n];nn/**n * Parse headers into an objectn *n * „`n * Date: Wed, 27 Aug 2014 08:58:49 GMTn * Content-Type: application/jsonn * Connection: keep-aliven * Transfer-Encoding: chunkedn * „`n *n * @param {String} headers Headers needing to be parsedn * @returns {Object} Headers parsed into an objectn */nmodule.exports = function parseHeaders(headers) {n var parsed = {};n var key;n var val;n var i;nn if (!headers) { return parsed; }nn utils.forEach(headers.split(‚\n‘), function parser(line) {n i = line.indexOf(‚:‘);n key = utils.trim(line.substr(0, i)).toLowerCase();n val = utils.trim(line.substr(i + 1));nn if (key) {n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {n return;n }n if (key === ’set-cookie‘) {n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);n } else {n parsed[key] = parsed[key] ? parsed[key] + ‚, ‚ + val : val;n }n }n });nn return parsed;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/parseHeaders.jsn// module id = 65n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/parseHeaders.js?“)},function(module,exports){eval(„‚use strict‘;nn/**n * Syntactic sugar for invoking a function and expanding an array for arguments.n *n * Common use case would be to use `Function.prototype.apply`.n *n * „`jsn * function f(x, y, z) {}n * var args = [1, 2, 3];n * f.apply(null, args);n * „`n *n * With `spread` this example can be re-written.n *n * „`jsn * spread(function(x, y, z) {})([1, 2, 3]);n * „`n *n * @param {Function} callbackn * @returns {Function}n */nmodule.exports = function spread(callback) {n return function wrap(arr) {n return callback.apply(null, arr);n };n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/spread.jsn// module id = 66n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/spread.js?“)},function(module,exports){eval(„/*!n * Determine if an object is a Buffern *n * @author Feross Aboukhadijeh n * @license MITn */nnmodule.exports = function isBuffer (obj) {n return obj != null && obj.constructor != null &&n typeof obj.constructor.isBuffer === ‚function‘ && obj.constructor.isBuffer(obj)n}nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/~/is-buffer/index.jsn// module id = 67n// module chunks = 0n//# sourceURL=webpack:///./~/axios/~/is-buffer/index.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnvar _react = __webpack_require__(49);nnvar _react2 = _interopRequireDefault(_react);nnvar _reactDom = __webpack_require__(47);nnvar _reactDom2 = _interopRequireDefault(_reactDom);nnvar _comments = __webpack_require__(77);nnfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }nnmodule.exports = function () {n if (window._COMMENTS_CONFIG) {n _reactDom2.default.render(_react2.default.createElement(_comments.CommentApp, { config: window._COMMENTS_CONFIG || {} }), document.getElementById(‚comments‘));n }n};nn//////////////////n// WEBPACK FOOTERn// ./src/js/_comment.jsn// module id = 68n// module chunks = 0n//# sourceURL=webpack:///./src/js/_comment.js?“)},,function(module,exports){eval(„‚use strict‘;nn/* global $, alert, get_cookie */nnvar initVote = function initVote() {n var CONST_REVIEW_VOTE = {n ‚useful_count‘: [‚有用‘, ‚/j/review/{REVIEW_ID}/useful‘],n ‚useless_count‘: [‚没用‘, ‚/j/review/{REVIEW_ID}/useless‘],n ’spoiler‘: [‚剧透提醒已提交,谢谢‘, ‚/j/review/{REVIEW_ID}/spoiler‘]n };nn var regDisabled = /disabled/,n regVoteType = /(\w+_count)/,n regSpoiler = /spoiler/,n ck = get_cookie(‚ck‘);nn var votePanels = document.querySelectorAll(‚.main-panel-useful‘),n votePanel = null,n rid = “;nn var isAuthor = function isAuthor(votePanel) {n return votePanel && votePanel.getAttribute(‚data-is_owner‘) === ‚true‘;n };nn var canVote = function canVote(votePanel) {n return votePanel && votePanel.getAttribute(‚data-can_vote‘) === ‚true‘;n };nn var isTV = function isTV(votePanel) {n return votePanel && votePanel.getAttribute(‚data-is_tv‘) === ‚true‘;n };nn var handleVote = function handleVote(e) {n if (!ck) {n return;n }n e.stopPropagation();n if (window._USER_ABNORMAL) {n window.show_abnormal && window.show_abnormal();n return;n }nn var target = e.target;n var cn = target.className;n var match = cn.match(regVoteType) || cn.match(regSpoiler);n var type = “;n var API_VOTE = “;n var voteTxt = “;nn if (cn.match(regDisabled)) {n return;n }nn if (match) {n if (isAuthor(e.currentTarget)) {n return alert(‚不能给自己投票噢‘);n }nn if (!canVote(e.currentTarget)) {n var txt = isTV(e.currentTarget) ? ‚该剧尚未播出,不能投票噢‘ : ‚该电影还未上映,不能投票噢‘;n return alert(txt);n }nn type = match[0]; // ‚useful‘, ‚useless‘, ’spoiler’n voteTxt = CONST_REVIEW_VOTE[type][0];n API_VOTE = CONST_REVIEW_VOTE[type][1];n rid = e.currentTarget.getAttribute(‚data-rid‘);n API_VOTE = API_VOTE.replace(‚{REVIEW_ID}‘, rid);n } else if (!match || !rid) {n return;n }nn var voteReq = $.post(API_VOTE, { ‚ck‘: ck }, function (res) {n if (res.r == 0) {n if (type === ’spoiler‘) {n return handleSpoiler();n }n countVote(res, type);n }n });nn voteReq.fail(function () {n alert(‚网络错误‘);n }).always(function () {n // console.log(‚vote ‚)n });n };nn var handleSpoiler = function handleSpoiler(type) {n // 在 列表 中,通过 `review-${rid}-content` 寻找对应的节点n var reviewElem = document.getElementById(‚review-‚ + rid + ‚-content‘) || document.getElementById(rid);n var spoilerElem = reviewElem.querySelector(‚.spoiler‘);n spoilerElem.innerText = CONST_REVIEW_VOTE[’spoiler‘][0];n spoilerElem.className = spoilerElem.className.replace(’not-reported‘, ‚disabled‘);n };nn var countVote = function countVote(res, type) {n var reviewElem = document.getElementById(‚review-‚ + rid + ‚-content‘) || document.getElementById(rid);n for (var i in CONST_REVIEW_VOTE) {n if (res[i] !== undefined) {n var countTxt = CONST_REVIEW_VOTE[i][0] + ‚ ‚ + res[i];n var countElem = reviewElem.querySelector(‚.‘ + i);n var _cn = countElem.className;nn // 从没投过票 || 已经投票过n if (i === type) {n countElem.classList.add(‚disabled‘);n } else {n countElem.classList.remove(‚disabled‘);n }n countElem.innerHTML = countTxt;n }n }n };nn var len = votePanels.length;n if (len === 1) {n votePanel = votePanels[0];n rid = votePanel.getAttribute(‚data-rid‘);n votePanel && votePanel.addEventListener(‚click‘, handleVote, false);n } else {n for (var i = 0; i 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_CONFIG;nn _classCallCheck(this, AdInsert);nn var name = config.name,n slots = config.slots;nn this.current = slots[0];n this.name = name;n this.slots = slots || [];n }nn _createClass(AdInsert, [{n key: ‚html‘,n value: function html() {n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};n var _config$tag = config.tag,n tag = _config$tag === undefined ? ‚div‘ : _config$tag,n _config$className = config.className,n className = _config$className === undefined ? ‚Theme-item Advertisement‘ : _config$className,n _config$style = config.style,n style = _config$style === undefined ? “ : _config$style,n _config$postFix = config.postFix,n postFix = _config$postFix === undefined ? “ : _config$postFix;nn var slotName = this.current;n var slotDiv = “ + tag + ‚>‘;n return slotDiv;n }n }, {n key: ‚getAd‘,n value: function getAd() {n var slotName = this.current;n if (window.getDoubanAD) {n try {n var slots = this.slots;n var slotNameIndex = slots.indexOf(slotName);n var nextSlotIndex = slots.length > slotNameIndex + 1 ? slotNameIndex + 1 : 0;n var nextSlotName = slots[nextSlotIndex];n window.getDoubanAD(slotName);n this.current = nextSlotName;n } catch (e) {n console && console.log(e);n }n }n }n }]);nn return AdInsert;n}();nnexports.default = AdInsert;nn//////////////////n// WEBPACK FOOTERn// ./src/js/ad_insert.jsn// module id = 71n// module chunks = 0n//# sourceURL=webpack:///./src/js/ad_insert.js?“)},function(module,exports){eval(„‚use strict’nnexports.byteLength = byteLengthnexports.toByteArray = toByteArraynexports.fromByteArray = fromByteArraynnvar lookup = []nvar revLookup = []nvar Arr = typeof Uint8Array !== ‚undefined‘ ? Uint8Array : Arraynnvar code = ‚ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’nfor (var i = 0, len = code.length; i 0) {n throw new Error(‚Invalid string. Length must be a multiple of 4‘)n }nn // Trim off extra bytes after placeholder bytes are foundn // See: https://github.com/beatgammit/base64-js/issues/42n var validLen = b64.indexOf(‚=‘)n if (validLen === -1) validLen = lennn var placeHoldersLen = validLen === lenn ? 0n : 4 – (validLen % 4)nn return [validLen, placeHoldersLen]n}nn// base64 is 4/3 + up to two characters of the original datanfunction byteLength (b64) {n var lens = getLens(b64)n var validLen = lens[0]n var placeHoldersLen = lens[1]n return ((validLen + placeHoldersLen) * 3 / 4) – placeHoldersLenn}nnfunction _byteLength (b64, validLen, placeHoldersLen) {n return ((validLen + placeHoldersLen) * 3 / 4) – placeHoldersLenn}nnfunction toByteArray (b64) {n var tmpn var lens = getLens(b64)n var validLen = lens[0]n var placeHoldersLen = lens[1]nn var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))nn var curByte = 0nn // if there are placeholders, only get up to the last complete 4 charsn var len = placeHoldersLen > 0n ? validLen – 4n : validLennn for (var i = 0; i > 16) & 0xFFn arr[curByte++] = (tmp >> 8) & 0xFFn arr[curByte++] = tmp & 0xFFn }nn if (placeHoldersLen === 2) {n tmp =n (revLookup[b64.charCodeAt(i)] > 4)n arr[curByte++] = tmp & 0xFFn }nn if (placeHoldersLen === 1) {n tmp =n (revLookup[b64.charCodeAt(i)] > 2)n arr[curByte++] = (tmp >> 8) & 0xFFn arr[curByte++] = tmp & 0xFFn }nn return arrn}nnfunction tripletToBase64 (num) {n return lookup[num >> 18 & 0x3F] +n lookup[num >> 12 & 0x3F] +n lookup[num >> 6 & 0x3F] +n lookup[num & 0x3F]n}nnfunction encodeChunk (uint8, start, end) {n var tmpn var output = []n for (var i = start; i len2 ? len2 : (i + maxChunkLength)n ))n }nn // pad the end with zeros, but make sure to not forget the extra bytesn if (extraBytes === 1) {n tmp = uint8[len – 1]n parts.push(n lookup[tmp >> 2] +n lookup[(tmp > 10] +n lookup[(tmp >> 4) & 0x3F] +n lookup[(tmp n * @license MITn */n/* eslint-disable no-proto */nn’use strict’nnvar base64 = __webpack_require__(72)nvar ieee754 = __webpack_require__(129)nvar isArray = __webpack_require__(131)nnexports.Buffer = Buffernexports.SlowBuffer = SlowBuffernexports.INSPECT_MAX_BYTES = 50nn/**n * If `Buffer.TYPED_ARRAY_SUPPORT`:n * === true Use Uint8Array implementation (fastest)n * === false Use Object implementation (most compatible, even IE6)n *n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,n * Opera 11.6+, iOS 4.2+.n *n * Due to various browser bugs, sometimes the Object implementation will be used evenn * when the browser supports typed arrays.n *n * Note:n *n * – Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.n *n * – Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.n *n * – IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays ofn * incorrect length in some situations.nn * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so theyn * get the Object implementation, which is slower but behaves correctly.n */nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefinedn ? global.TYPED_ARRAY_SUPPORTn : typedArraySupport()nn/*n * Export kMaxLength after typed array support is determined.n */nexports.kMaxLength = kMaxLength()nnfunction typedArraySupport () {n try {n var arr = new Uint8Array(1)n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}n return arr.foo() === 42 && // typed array instances can be augmentedn typeof arr.subarray === ‚function‘ && // chrome 9-10 lack `subarray`n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`n } catch (e) {n return falsen }n}nnfunction kMaxLength () {n return Buffer.TYPED_ARRAY_SUPPORTn ? 0x7fffffffn : 0x3fffffffn}nnfunction createBuffer (that, length) {n if (kMaxLength() = kMaxLength()) {n throw new RangeError(‚Attempt to allocate Buffer larger than maximum ‚ +n ’size: 0x‘ + kMaxLength().toString(16) + ‚ bytes‘)n }n return length | 0n}nnfunction SlowBuffer (length) {n if (+length != length) { // eslint-disable-line eqeqeqn length = 0n }n return Buffer.alloc(+length)n}nnBuffer.isBuffer = function isBuffer (b) {n return !!(b != null && b._isBuffer)n}nnBuffer.compare = function compare (a, b) {n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {n throw new TypeError(‚Arguments must be Buffers‘)n }nn if (a === b) return 0nn var x = a.lengthn var y = b.lengthnn for (var i = 0, len = Math.min(x, y); i >> 1n case ‚base64‘:n return base64ToBytes(string).lengthn default:n if (loweredCase) return utf8ToBytes(string).length // assume utf8n encoding = (“ + encoding).toLowerCase()n loweredCase = truen }n }n}nBuffer.byteLength = byteLengthnnfunction slowToString (encoding, start, end) {n var loweredCase = falsenn // No need to verify that „this.length this.length. Done here to prevent potential uint32n // coercion fail below.n if (start > this.length) {n return “n }nn if (end === undefined || end > this.length) {n end = this.lengthn }nn if (end >>= 0n start >>>= 0nn if (end 0) {n str = this.toString(‚hex‘, 0, max).match(/.{2}/g).join(‚ ‚)n if (this.length > max) str += ‚ … ’n }n return “n}nnBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {n if (!Buffer.isBuffer(target)) {n throw new TypeError(‚Argument must be a Buffer‘)n }nn if (start === undefined) {n start = 0n }n if (end === undefined) {n end = target ? target.length : 0n }n if (thisStart === undefined) {n thisStart = 0n }n if (thisEnd === undefined) {n thisEnd = this.lengthn }nn if (start target.length || thisStart this.length) {n throw new RangeError(‚out of range index‘)n }nn if (thisStart >= thisEnd && start >= end) {n return 0n }n if (thisStart >= thisEnd) {n return -1n }n if (start >= end) {n return 1n }nn start >>>= 0n end >>>= 0n thisStart >>>= 0n thisEnd >>>= 0nn if (this === target) return 0nn var x = thisEnd – thisStartn var y = end – startn var len = Math.min(x, y)nn var thisCopy = this.slice(thisStart, thisEnd)n var targetCopy = target.slice(start, end)nn for (var i = 0; i = `byteOffset`,n// OR the last index of `val` in `buffer` at offset 0x7fffffff) {n byteOffset = 0x7fffffffn } else if (byteOffset = buffer.length) {n if (dir) return -1n else byteOffset = buffer.length – 1n } else if (byteOffset arrLength) byteOffset = arrLength – valLengthn for (i = byteOffset; i >= 0; i–) {n var found = truen for (var j = 0; j remaining) {n length = remainingn }n }nn // must be an even number of digitsn var strLen = string.lengthn if (strLen % 2 !== 0) throw new TypeError(‚Invalid hex string‘)nn if (length > strLen / 2) {n length = strLen / 2n }n for (var i = 0; i remaining) length = remainingnn if ((string.length > 0 && (length this.length) {n throw new RangeError(‚Attempt to write outside buffer bounds‘)n }nn if (!encoding) encoding = ‚utf8’nn var loweredCase = falsen for (;;) {n switch (encoding) {n case ‚hex‘:n return hexWrite(this, string, offset, length)nn case ‚utf8‘:n case ‚utf-8‘:n return utf8Write(this, string, offset, length)nn case ‚ascii‘:n return asciiWrite(this, string, offset, length)nn case ‚latin1‘:n case ‚binary‘:n return latin1Write(this, string, offset, length)nn case ‚base64‘:n // Warning: maxLength not taken into account in base64Writen return base64Write(this, string, offset, length)nn case ‚ucs2‘:n case ‚ucs-2‘:n case ‚utf16le‘:n case ‚utf-16le‘:n return ucs2Write(this, string, offset, length)nn default:n if (loweredCase) throw new TypeError(‚Unknown encoding: ‚ + encoding)n encoding = (“ + encoding).toLowerCase()n loweredCase = truen }n }n}nnBuffer.prototype.toJSON = function toJSON () {n return {n type: ‚Buffer‘,n data: Array.prototype.slice.call(this._arr || this, 0)n }n}nnfunction base64Slice (buf, start, end) {n if (start === 0 && end === buf.length) {n return base64.fromByteArray(buf)n } else {n return base64.fromByteArray(buf.slice(start, end))n }n}nnfunction utf8Slice (buf, start, end) {n end = Math.min(buf.length, end)n var res = []nn var i = startn while (i 0xEF) ? 4n : (firstByte > 0xDF) ? 3n : (firstByte > 0xBF) ? 2n : 1nn if (i + bytesPerSequence 0x7F) {n codePoint = tempCodePointn }n }n breakn case 3:n secondByte = buf[i + 1]n thirdByte = buf[i + 2]n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {n tempCodePoint = (firstByte & 0xF) 0x7FF && (tempCodePoint 0xDFFF)) {n codePoint = tempCodePointn }n }n breakn case 4:n secondByte = buf[i + 1]n thirdByte = buf[i + 2]n fourthByte = buf[i + 3]n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {n tempCodePoint = (firstByte & 0xF) 0xFFFF && tempCodePoint 0xFFFF) {n // encode to utf16 (surrogate pair dance)n codePoint -= 0x10000n res.push(codePoint >>> 10 & 0x3FF | 0xD800)n codePoint = 0xDC00 | codePoint & 0x3FFn }nn res.push(codePoint)n i += bytesPerSequencen }nn return decodeCodePointsArray(res)n}nn// Based on http://stackoverflow.com/a/22747272/680742, the browser withn// the lowest limit is Chrome, with 0x10000 args.n// We go 1 magnitude less, for safetynvar MAX_ARGUMENTS_LENGTH = 0x1000nnfunction decodeCodePointsArray (codePoints) {n var len = codePoints.lengthn if (len len) end = lennn var out = “n for (var i = start; i len) {n start = lenn }nn if (end len) {n end = lenn }nn if (end length) throw new RangeError(‚Trying to access beyond buffer length‘)n}nnBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {n offset = offset | 0n byteLength = byteLength | 0n if (!noAssert) checkOffset(offset, byteLength, this.length)nn var val = this[offset]n var mul = 1n var i = 0n while (++i 0 && (mul *= 0x100)) {n val += this[offset + –byteLength] * muln }nn return valn}nnBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {n if (!noAssert) checkOffset(offset, 1, this.length)n return this[offset]n}nnBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {n if (!noAssert) checkOffset(offset, 2, this.length)n return this[offset] | (this[offset + 1] = mul) val -= Math.pow(2, 8 * byteLength)nn return valn}nnBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {n offset = offset | 0n byteLength = byteLength | 0n if (!noAssert) checkOffset(offset, byteLength, this.length)nn var i = byteLengthn var mul = 1n var val = this[offset + –i]n while (i > 0 && (mul *= 0x100)) {n val += this[offset + –i] * muln }n mul *= 0x80nn if (val >= mul) val -= Math.pow(2, 8 * byteLength)nn return valn}nnBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {n if (!noAssert) checkOffset(offset, 1, this.length)n if (!(this[offset] & 0x80)) return (this[offset])n return ((0xff – this[offset] + 1) * -1)n}nnBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {n if (!noAssert) checkOffset(offset, 2, this.length)n var val = this[offset] | (this[offset + 1] max || value buf.length) throw new RangeError(‚Index out of range‘)n}nnBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {n value = +valuen offset = offset | 0n byteLength = byteLength | 0n if (!noAssert) {n var maxBytes = Math.pow(2, 8 * byteLength) – 1n checkInt(this, value, offset, byteLength, maxBytes, 0)n }nn var mul = 1n var i = 0n this[offset] = value & 0xFFn while (++i = 0 && (mul *= 0x100)) {n this[offset + i] = (value / mul) & 0xFFn }nn return offset + byteLengthn}nnBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)n this[offset] = (value & 0xff)n return offset + 1n}nnfunction objectWriteUInt16 (buf, value, offset, littleEndian) {n if (value >>n (littleEndian ? i : 1 – i) * 8n }n}nnBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value & 0xff)n this[offset + 1] = (value >>> 8)n } else {n objectWriteUInt16(this, value, offset, true)n }n return offset + 2n}nnBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value >>> 8)n this[offset + 1] = (value & 0xff)n } else {n objectWriteUInt16(this, value, offset, false)n }n return offset + 2n}nnfunction objectWriteUInt32 (buf, value, offset, littleEndian) {n if (value >> (littleEndian ? i : 3 – i) * 8) & 0xffn }n}nnBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset + 3] = (value >>> 24)n this[offset + 2] = (value >>> 16)n this[offset + 1] = (value >>> 8)n this[offset] = (value & 0xff)n } else {n objectWriteUInt32(this, value, offset, true)n }n return offset + 4n}nnBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value >>> 24)n this[offset + 1] = (value >>> 16)n this[offset + 2] = (value >>> 8)n this[offset + 3] = (value & 0xff)n } else {n objectWriteUInt32(this, value, offset, false)n }n return offset + 4n}nnBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) {n var limit = Math.pow(2, 8 * byteLength – 1)nn checkInt(this, value, offset, byteLength, limit – 1, -limit)n }nn var i = 0n var mul = 1n var sub = 0n this[offset] = value & 0xFFn while (++i > 0) – sub & 0xFFn }nn return offset + byteLengthn}nnBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) {n var limit = Math.pow(2, 8 * byteLength – 1)nn checkInt(this, value, offset, byteLength, limit – 1, -limit)n }nn var i = byteLength – 1n var mul = 1n var sub = 0n this[offset + i] = value & 0xFFn while (–i >= 0 && (mul *= 0x100)) {n if (value > 0) – sub & 0xFFn }nn return offset + byteLengthn}nnBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)n if (value >> 8)n } else {n objectWriteUInt16(this, value, offset, true)n }n return offset + 2n}nnBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value >>> 8)n this[offset + 1] = (value & 0xff)n } else {n objectWriteUInt16(this, value, offset, false)n }n return offset + 2n}nnBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value & 0xff)n this[offset + 1] = (value >>> 8)n this[offset + 2] = (value >>> 16)n this[offset + 3] = (value >>> 24)n } else {n objectWriteUInt32(this, value, offset, true)n }n return offset + 4n}nnBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)n if (value >> 24)n this[offset + 1] = (value >>> 16)n this[offset + 2] = (value >>> 8)n this[offset + 3] = (value & 0xff)n } else {n objectWriteUInt32(this, value, offset, false)n }n return offset + 4n}nnfunction checkIEEE754 (buf, value, offset, ext, max, min) {n if (offset + ext > buf.length) throw new RangeError(‚Index out of range‘)n if (offset = target.length) targetStart = target.lengthn if (!targetStart) targetStart = 0n if (end > 0 && end = this.length) throw new RangeError(’sourceStart out of bounds‘)n if (end this.length) end = this.lengthn if (target.length – targetStart = 0; –i) {n target[i + targetStart] = this[i + start]n }n } else if (len >> 0n end = end === undefined ? this.length : end >>> 0nn if (!val) val = 0nn var in if (typeof val === ’number‘) {n for (i = start; i 0xD7FF && codePoint 0xDBFF) {n // unexpected trailn if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)n continuen } else if (i + 1 === length) {n // unpaired leadn if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)n continuen }nn // valid leadn leadSurrogate = codePointnn continuen }nn // 2 leads in a rown if (codePoint -1) bytes.push(0xEF, 0xBF, 0xBD)n leadSurrogate = codePointn continuen }nn // valid surrogate pairn codePoint = (leadSurrogate – 0xD800 -1) bytes.push(0xEF, 0xBF, 0xBD)n }nn leadSurrogate = nullnn // encode utf8n if (codePoint > 0x6 | 0xC0,n codePoint & 0x3F | 0x80n )n } else if (codePoint > 0xC | 0xE0,n codePoint >> 0x6 & 0x3F | 0x80,n codePoint & 0x3F | 0x80n )n } else if (codePoint > 0x12 | 0xF0,n codePoint >> 0xC & 0x3F | 0x80,n codePoint >> 0x6 & 0x3F | 0x80,n codePoint & 0x3F | 0x80n )n } else {n throw new Error(‚Invalid code point‘)n }n }nn return bytesn}nnfunction asciiToBytes (str) {n var byteArray = []n for (var i = 0; i > 8n lo = c % 256n byteArray.push(lo)n byteArray.push(hi)n }nn return byteArrayn}nnfunction base64ToBytes (str) {n return base64.toByteArray(base64clean(str))n}nnfunction blitBuffer (src, dst, offset, length) {n for (var i = 0; i = dst.length) || (i >= src.length)) breakn dst[i + offset] = src[i]n }n return in}nnfunction isnan (val) {n return val !== val // eslint-disable-line no-self-comparen}nn/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))nn//////////////////n// WEBPACK FOOTERn// ./~/buffer/index.jsn// module id = 73n// module chunks = 0n//# sourceURL=webpack:///./~/buffer/index.js?“);
},function(module,exports,__webpack_require__){eval(„var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!n Copyright (c) 2018 Jed Watson.n Licensed under the MIT License (MIT), seen http://jedwatson.github.io/classnamesn*/n/* global define */nn(function () {nt’use strict‘;nntvar hasOwn = {}.hasOwnProperty;nntfunction classNames() {nttvar classes = [];nnttfor (var i = 0; i count) ; // TODO: 自动跳到下一页n // 1001 需要输入验证码nn } else if (resp.code === 1001) {n _this4.setState({n addCommentStatus: __chunk_5.FAILn });nn if (typeof failCallback === ‚function‘) {n failCallback(resp.code, resp.data, resp.msg);n } // 1002 需要跳转到审核页面nn } else if (resp.code === 1002) {n _this4.setState({n addCommentStatus: __chunk_5.FAILn });nn setTimeout(function () {n window.location.href = resp.data.url;n }, 500); // 1003 需要答题n } else if (resp.code === 1003 && resp.data.exam_topic) {n _this4.setState({n addCommentStatus: __chunk_5.FAILn });nn if (typeof failCallback === ‚function‘) {n failCallback(resp.code, resp.data, resp.msg);n } // 1000 回应内容不能为空 || 回应包含被禁止的内容n // 1003 没有回应权限nn } else {n if (typeof failCallback === ‚function‘) {n failCallback(resp.code, resp.data, resp.msg);n }nn throw resp.msg;n }n }).catch(function (error) {n console.error(‚出错了!‘, error);nn if (typeof failCallback === ‚function‘) {n failCallback(error);n }nn _this4.setState({n addCommentStatus: __chunk_5.FAIL,n notificationVisible: true,n notificationMsg: typeof error === ’string‘ ? error : ‚添加回应出错了’n });n });n } // 新增二级回应n // 如果有 commentId ,说明新增的 reply 是针对 comment 的回应,n // 而不是针对comment 下面 reply 的回应n ;nn _proto.handleAddReply = function handleAddReply(newReply, successCallback, failCallback, commentId, hideReplyEditorCallback, scrollToLatestReplyCallback) {n var _this5 = this;nn var _this$state3 = this.state,n addReplyStatus = _this$state3.addReplyStatus,n comments = _this$state3.comments;nn if (addReplyStatus === __chunk_5.PENDING) {n return;n }nn if (window._USER_ABNORMAL) {n if (typeof window.show_abnormal === ‚function‘) {n window.show_abnormal();n }nn return;n }nn __chunk_4.CommentsAPI.addReply(newReply).then(function (resp) {n // 提交成功n if (resp.code === 0) {n // 提交成功后,刷新页面n // 标记为最新回应,用于滚动定位n var latestReply = resp.data || resp;n latestReply.is_latest = true; // 暂时占位用nn latestReply.is_temporary = true;nn var _comments = comments.map(function (comment, index) {n // 先全部清除一遍标记n comment.replies.map(function (reply) {n var _reply = _extends_1({}, reply);nn delete _reply.is_latest;n return _reply;n }); // 再添加nn if (comment.id === commentId) {n comment.replies.push(latestReply);n return comment;n }nn return comment;n });nn _this5.setState({n addReplyStatus: __chunk_5.SUCCESS,n comments: _commentsn });nn if (typeof successCallback === ‚function‘) {n successCallback();n }nn if (typeof hideReplyEditorCallback === ‚function‘) {n hideReplyEditorCallback();n } // 不再定位到最后的回复n // setTimeout(() => {n // if (typeof scrollToLatestReplyCallback === ‚function‘) {n // scrollToLatestReplyCallback()n // }n // }, 400)n // 1001 需要输入验证码nn } else if (resp.code === 1001) {n _this5.setState({n addReplyStatus: __chunk_5.FAILn });nn console.warn(‚出错了‘, resp.msg);nn if (typeof failCallback === ‚function‘) {n failCallback(resp.code, resp.data, resp.msg);n } // 1002 需要跳转到审核页面nn } else if (resp.code === 1002) {n console.warn(‚出错了‘, resp.msg);nn _this5.setState({n addReplyStatus: __chunk_5.FAILn });nn setTimeout(function () {n window.location.href = resp.data.url;n }, 500); // 1003 需答题n } else if (resp.code === 1003 && resp.data.exam_topic) {n _this5.setState({n addReplyStatus: __chunk_5.FAILn });nn if (typeof failCallback === ‚function‘) {n failCallback(resp.code, resp.data, resp.msg);n } // 1000 回应内容不能为空 || 回应包含被禁止的内容n // 1003 没有回应权限nn } else {n console.warn(‚出错了‘, resp.msg);nn if (typeof failCallback === ‚function‘) {n failCallback(resp.code, resp.data, resp.msg);n }nn throw resp.msg;n }n }).catch(function (error) {n console.error(‚出错了!‘, error);nn if (typeof failCallback === ‚function‘) {n failCallback(error);n }nn _this5.setState({n addReplyStatus: __chunk_5.FAIL,n notificationVisible: true,n notificationMsg: typeof error === ’string‘ ? error : ‚添加回应出错了’n });n });n } // 删除一级和二级回应, 如果有 parentCommentId ,说明删除的是二级回应 replyn ;nn _proto.handleDelete = function handleDelete(id, parentCommentId) {n var _this6 = this;nn var _this$state4 = this.state,n comments = _this$state4.comments,n truncation = _this$state4.truncation;nn if (window._USER_ABNORMAL && typeof window.show_abnormal === ‚function‘) {n window.show_abnormal();n return;n }nn __chunk_4.CommentsAPI.delete({n cid: idn }).then(function (resp) {n // 新版接口都是返回 code,这个接口是旧的,返回的还是 resp.r, 所以做下兼容处理n if (resp.code === 0 || resp.r === 0) {n var _comments = comments;nn if (!parentCommentId) {n _comments = comments.map(function (comment) {n var _comment = _extends_1({}, comment);nn if (_comment.id === id) {n if (comment.total_replies > 0) {n _comment.text = ‚「该回应已被删除」‘;n }nn _comment.is_deleted = true;n return _comment;n }nn return _comment;n });n } else {n _comments = comments.map(function (comment) {n if (comment.id === parentCommentId) {n var _replies = comment.replies.map(function (reply) {n var _reply = _extends_1({}, reply);nn if (_reply.id === id) {n // 不管这条回应有没有被再次回应过,都直接删掉n // reply.text = ‚「该回应已被删除」’n _reply.is_deleted = true;n }nn return _reply;n });nn comment.replies = cloneDeep(_replies);n return comment;n }nn return comment;n });n }nn _this6.setState({n comments: _comments,n truncation: truncation – 1n });n }n }).catch(function (error) {n console.error(‚删除失败‘, error);nn _this6.setState({n notificationVisible: true,n notificationMsg: typeof error === ’string‘ ? error : ‚删除出错了’n });n });n } // 收起回应n ;nn _proto.handleFoldReplies = function handleFoldReplies(commentId, callback) {n var _this$state5 = this.state,n comments = _this$state5.comments,n truncation = _this$state5.truncation;nn var _comments = comments.map(function (comment) {n var _comment = _extends_1({}, comment);nn if (_comment.id === commentId) {n // 重新回到 3 条n _comment.replies = _comment.replies.slice(0, truncation);n return _comment;n }nn return _comment;n });nn this.setState({n comments: _commentsn });nn if (typeof callback === ‚function‘) {n callback();n }n } // 展开更多回应n ;nn _proto.handleLoadMoreReplies = function handleLoadMoreReplies(commentId, params, successCallback, failCallback) {n var _this7 = this;nn var comments = this.state.comments;n __chunk_4.CommentsAPI.getReplies(_extends_1({n commentId: commentIdn }, params)).then(function (data) {n // 这个接口没有返回 code,所以直接判断 data 了n if (data) {n var _comments = comments.map(function (comment) {n var _comment = _extends_1({}, comment);nn if (_comment.id === commentId) {n // TODO: 如果之前新增了回应,需要把刚拿到的 replies 插入到新增回应的上方,以保持新增回应一直在最下。(好像是有这么个需求??)nn /*n * 有这么一个情况:n * 如果有「展开更多」时,添加了的回应,然后再n * 点击「展开更多」拿到新的数据后,需要把之前添加的回应从旧的 repliesn * 列表里过滤掉,否则旧的里有刚加的回应、新数据n * 也里有刚加的回应,就重复了。n */n _comment.replies = _comment.replies.filter(function (reply) {n return !reply.is_temporary;n }).concat(data.replies || []);n return _comment;n }nn return _comment;n });nn _this7.setState({n comments: _commentsn });nn successCallback(data);n }n }).catch(function (error) {n console.error(‚请求更多回应时加载失败‘, error);nn _this7.setState({n notificationVisible: true,n notificationMsg: typeof error === ’string‘ ? error : ‚请求出错了’n });nn failCallback(error);n });n };nn _proto.render = function render() {n var config = this.props.config;n var _this$state6 = this.state,n comments = _this$state6.comments,n truncation = _this$state6.truncation,n isShowDialog = _this$state6.isShowDialog,n notificationVisible = _this$state6.notificationVisible,n notificationMsg = _this$state6.notificationMsg,n isReported = _this$state6.isReported,n reportReasons = _this$state6.reportReasons,n isFetchingReportReasons = _this$state6.isFetchingReportReasons;nn if (!config) {n return null;n }nn var app = config.app,n service = config.service,n total = config.total,n start = config.start,n count = config.count,n target = config.target,n options = config.options,n needEscape = config.needEscape;n var defaultBgColor = {n note: ‚f1faf1‘,n movie: ‚#f3f5f7‘,n book: ‚#f8f8f4‘,n music: ‚#f4f7f3’n };n var bgColor = options.bg_color ? options.bg_color : defaultBgColor[app] || ‚#f3f5f7‘;n return React__default.createElement(„div“, {n className: __chunk_3.classnames(‚comments-app-wrapper‘, {n dev: __chunk_4.IS_DEVn })n }, target.hidden_nonfriend_comments ? React__default.createElement(„div“, {n className: „comment-tips“n }, „\u7531\u4E8E\u53D1\u5E03\u8005\u7684\u8BBE\u7F6E\uFF0C\u4E0D\u5C55\u793A\u6240\u6709\u4EBA\u7684\u56DE\u5E94“) : null, React__default.createElement(commentList.default, {n config: config,n bgColor: bgColor,n target: target,n comments: comments,n needEscape: needEscape,n canAtSb: options.can_at_sb,n maxLength: options.max_length,n replyUsers: this.getReplyUsers(),n truncation: truncation,n handleAddComment: this.handleAddComment.bind(this),n handleAddReply: this.handleAddReply.bind(this),n handleDelete: this.handleDelete.bind(this),n handleFoldReplies: this.handleFoldReplies.bind(this),n handleLoadMoreReplies: this.handleLoadMoreReplies.bind(this),n handleShowReportDialog: this.handleShowReportDialog.bind(this)n }), total > count ? React__default.createElement(paginator.default, {n app: app,n service: service,n total: total,n start: start,n count: countn }) : null, this.renderCommentEditor(), React__default.createElement(report.default, {n reasons: reportReasons,n isShowDialog: isShowDialog,n isFetchingReportReasons: isFetchingReportReasons,n isReported: isReported,n reportType: options.report_type || ‚comment‘,n handleHideReportDialog: this.handleHideReportDialog.bind(this),n handleSubmitReport: this.handleSubmitReport.bind(this)n }), React__default.createElement(reactNotification.Notification, {n style: false,n className: „comment-notification-bar“,n activeClassName: „actived“,n action: „“,n isActive: notificationVisible,n message: typeof notificationMsg === ’string‘ ? notificationMsg : ‚服务器开小差‘,n dismissAfter: 1500,n title: „“,n onDismiss: this.handleHideNotification.bind(this)n }));n };nn _proto.renderCommentEditor = function renderCommentEditor() {n var config = this.props.config;n var total = config.total,n start = config.start,n count = config.count,n user = config.user,n author = config.author,n target = config.target,n options = config.options;n var currentPage = Math.floor(start / count) + 1; // 当前页数nn var totalPage = Math.floor(total / count) + (total % count > 0 ? 1 : 0); // 总页数nn var currentPageIsTheEndPage = currentPage >= totalPage; // 如果设置了只在末页显示输入框,但当前页并不是末页,则不显示输入框nn if (options.only_comment_at_the_end_of_pages && !currentPageIsTheEndPage) {n return null;n }nn return React__default.createElement(commentEditor.default, {n config: config,n author: author,n enableSyncToStatus: options.enable_comment_sync_to_status,n user: user,n maxLength: options.max_length || 0,n canComment: target.can_add_comment,n forbiddenCommentMessage: target.forbidden_comment_message,n canAtSb: options.can_at_sb,n replyUsers: this.getReplyUsers(),n onlyFriendCanComment: target.reply_limit === ‚F‘,n canUploadFile: options.can_upload_file,n handleAddComment: this.handleAddComment.bind(this)n });n };nn _proto.getReplyUsers = function getReplyUsers() {n var _this$props$config = this.props.config,n user = _this$props$config.user,n comments = _this$props$config.comments;nn if (!user || !comments) {n return [];n }nn var replyUsers = [];n var pushed = {};n var userItem;n pushed[user.uid] = 1;n comments.forEach(function (comment) {n // comment = comments[index]n if (replyUsers.length > 5) return;n userItem = comment.author;nn if (userItem) {n var _userItem = userItem,n uid = _userItem.uid,n name = _userItem.name,n avatar = _userItem.avatar;nn if (!(uid in pushed)) {n replyUsers.push({n uid: uid,n username: name,n avatar: avatarn });n pushed[uid] = 1;n }n }n });n return replyUsers;n };nn return CommentApp;n}(React.Component);nnCommentApp.propTypes = commentAppPropTypes;nCommentApp.defaultProps = commentAppDefaultProps;nnexports.commentAppDefaultProps = commentAppDefaultProps;nexports.commentAppPropTypes = commentAppPropTypes;nexports.default = CommentApp;n//# sourceMappingURL=comment-app.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/comment-app.jsn// module id = 76n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/comment-app.js?“)},function(module,exports,__webpack_require__){eval(„‚use strict‘;nnObject.defineProperty(exports, ‚__esModule‘, { value: true });nn__webpack_require__(1);n__webpack_require__(6);nvar commentApp = __webpack_require__(76);n__webpack_require__(10);n__webpack_require__(2);n__webpack_require__(4);n__webpack_require__(33);n__webpack_require__(38);nvar commentList = __webpack_require__(35);nvar baseItem = __webpack_require__(23);n__webpack_require__(18);n__webpack_require__(19);nvar actionBar = __webpack_require__(15);n__webpack_require__(5);nvar userSelect = __webpack_require__(12);nvar replyEditor = __webpack_require__(14);n__webpack_require__(9);n__webpack_require__(7);n__webpack_require__(11);n__webpack_require__(8);nvar replyList = __webpack_require__(20);nvar replyItem = __webpack_require__(17);nvar commentEditor = __webpack_require__(34);nvar paginator = __webpack_require__(36);nvar report = __webpack_require__(37);nn/*n * @Author: hanjiyunn * @Date: 2019-05-13 12:48:47n * @Last Modified by: hanjiyunn * @Last Modified time: 2019-05-26 04:23:37n */nnexports.CommentApp = commentApp.default;nexports.commentAppDefaultProps = commentApp.commentAppDefaultProps;nexports.commentAppPropTypes = commentApp.commentAppPropTypes;nexports.CommentList = commentList.default;nexports.commentListDefaultProps = commentList.commentListDefaultProps;nexports.commentListPropTypes = commentList.commentListPropTypes;nexports.BaseItem = baseItem.default;nexports.baseItemDefaultProps = baseItem.baseItemDefaultProps;nexports.baseItemPropTypes = baseItem.baseItemPropTypes;nexports.ActionBar = actionBar.default;nexports.commentActionsDefaultProps = actionBar.commentActionsDefaultProps;nexports.commentActionsPropTypes = actionBar.commentActionsPropTypes;nexports.UserSelect = userSelect.UserSelect;nexports.userSelectDefaultProps = userSelect.userSelectDefaultProps;nexports.userSelectPropTypes = userSelect.userSelectPropTypes;nexports.ReplyEditor = replyEditor.default;nexports.replyEditorDefaultProps = replyEditor.replyEditorDefaultProps;nexports.replyEditorPropTypes = replyEditor.replyEditorPropTypes;nexports.ReplyList = replyList.default;nexports.replyListDefaultProps = replyList.replyListDefaultProps;nexports.replyListPropTypes = replyList.replyListPropTypes;nexports.ReplyItem = replyItem.default;nexports.replyItemDefaultProps = replyItem.replyItemDefaultProps;nexports.replyItemPropTypes = replyItem.replyItemPropTypes;nexports.CommentEditor = commentEditor.default;nexports.commentEditorDefaultProps = commentEditor.commentEditorDefaultProps;nexports.commentEditorPropTypes = commentEditor.commentEditorPropTypes;nexports.Paginator = paginator.default;nexports.paginatorDefaultProps = paginator.paginatorDefaultProps;nexports.paginatorPropTypes = paginator.paginatorPropTypes;nexports.Report = report.default;nexports.reportDefaultProps = report.reportDefaultProps;nexports.reportPropTypes = report.reportPropTypes;n//# sourceMappingURL=index.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/index.jsn// module id = 77n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/index.js?“);
},function(module,exports,__webpack_require__){eval(„/** @license React v17.0.2n * react-dom.development.jsn *n * Copyright (c) Facebook, Inc. and its affiliates.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict‘;nnif (true) {n (function() {n’use strict‘;nnvar React = __webpack_require__(2);nvar _assign = __webpack_require__(13);nvar Scheduler = __webpack_require__(93);nvar tracing = __webpack_require__(94);nnvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;nn// by calls to these methods by a Babel plugin.n//n// In PROD (or in packages without access to React internals),n// they are left as they are instead.nnfunction warn(format) {n {n for (var _len = arguments.length, args = new Array(_len > 1 ? _len – 1 : 0), _key = 1; _key 1 ? _len2 – 1 : 0), _key2 = 1; _key2 2 && (name[0] === ‚o‘ || name[0] === ‚O‘) && (name[1] === ’n‘ || name[1] === ‚N‘)) {n return true;n }nn return false;n}nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {n if (propertyInfo !== null && propertyInfo.type === RESERVED) {n return false;n }nn switch (typeof value) {n case ‚function‘: // $FlowIssue symbol is perfectly valid herenn case ’symbol‘:n // eslint-disable-linen return true;nn case ‚boolean‘:n {n if (isCustomComponentTag) {n return false;n }nn if (propertyInfo !== null) {n return !propertyInfo.acceptsBooleans;n } else {n var prefix = name.toLowerCase().slice(0, 5);n return prefix !== ‚data-‚ && prefix !== ‚aria-‚;n }n }nn default:n return false;n }n}nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {n if (value === null || typeof value === ‚undefined‘) {n return true;n }nn if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {n return true;n }nn if (isCustomComponentTag) {n return false;n }nn if (propertyInfo !== null) {nn switch (propertyInfo.type) {n case BOOLEAN:n return !value;nn case OVERLOADED_BOOLEAN:n return value === false;nn case NUMERIC:n return isNaN(value);nn case POSITIVE_NUMERIC:n return isNaN(value) || value = 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {n // We expect at least one stack frame to be shared.n // Typically this will be the root most one. However, stack frames may ben // cut off due to maximum stack limits. In this case, one maybe cut offn // earlier than the other. We assume that the sample is longer or the samen // and there for cut off earlier. So we should find the root most frame inn // the sample somewhere in the control.n c–;n }nn for (; s >= 1 && c >= 0; s–, c–) {n // Next we find the first one that isn’t the same which should be then // frame that called our sample function and the control.n if (sampleLines[s] !== controlLines[c]) {n // In V8, the first line is describing the message but other VMs don’t.n // If we’re about to return the first line, and the control is also on the samen // line, that’s a pretty good indicator that our sample threw at same line asn // the control. I.e. before we entered the sample frame. So we ignore this result.n // This can happen if you passed a class to function component, or non-function.n if (s !== 1 || c !== 1) {n do {n s–;n c–; // We may still have similar intermediate frames from the construct call.n // The next one that isn’t the same should be our match though.nn if (c = 1 && c >= 0);n }nn break;n }n }n }n } finally {n reentry = false;nn {n ReactCurrentDispatcher.current = previousDispatcher;n reenableLogs();n }nn Error.prepareStackTrace = previousPrepareStackTrace;n } // Fallback to just using the name if we couldn’t make it throw.nnn var name = fn ? fn.displayName || fn.name : “;n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : “;nn {n if (typeof fn === ‚function‘) {n componentFrameCache.set(fn, syntheticFrame);n }n }nn return syntheticFrame;n}nnfunction describeClassComponentFrame(ctor, source, ownerFn) {n {n return describeNativeComponentFrame(ctor, true);n }n}nfunction describeFunctionComponentFrame(fn, source, ownerFn) {n {n return describeNativeComponentFrame(fn, false);n }n}nnfunction shouldConstruct(Component) {n var prototype = Component.prototype;n return !!(prototype && prototype.isReactComponent);n}nnfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {nn if (type == null) {n return “;n }nn if (typeof type === ‚function‘) {n {n return describeNativeComponentFrame(type, shouldConstruct(type));n }n }nn if (typeof type === ’string‘) {n return describeBuiltInComponentFrame(type);n }nn switch (type) {n case REACT_SUSPENSE_TYPE:n return describeBuiltInComponentFrame(‚Suspense‘);nn case REACT_SUSPENSE_LIST_TYPE:n return describeBuiltInComponentFrame(‚SuspenseList‘);n }nn if (typeof type === ‚object‘) {n switch (type.$$typeof) {n case REACT_FORWARD_REF_TYPE:n return describeFunctionComponentFrame(type.render);nn case REACT_MEMO_TYPE:n // Memo may contain any component type so we recursively resolve it.n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);nn case REACT_BLOCK_TYPE:n return describeFunctionComponentFrame(type._render);nn case REACT_LAZY_TYPE:n {n var lazyComponent = type;n var payload = lazyComponent._payload;n var init = lazyComponent._init;nn try {n // Lazy may contain any component type so we recursively resolve it.n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);n } catch (x) {}n }n }n }nn return “;n}nnfunction describeFiber(fiber) {n var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;n var source = fiber._debugSource ;nn switch (fiber.tag) {n case HostComponent:n return describeBuiltInComponentFrame(fiber.type);nn case LazyComponent:n return describeBuiltInComponentFrame(‚Lazy‘);nn case SuspenseComponent:n return describeBuiltInComponentFrame(‚Suspense‘);nn case SuspenseListComponent:n return describeBuiltInComponentFrame(‚SuspenseList‘);nn case FunctionComponent:n case IndeterminateComponent:n case SimpleMemoComponent:n return describeFunctionComponentFrame(fiber.type);nn case ForwardRef:n return describeFunctionComponentFrame(fiber.type.render);nn case Block:n return describeFunctionComponentFrame(fiber.type._render);nn case ClassComponent:n return describeClassComponentFrame(fiber.type);nn default:n return “;n }n}nnfunction getStackByFiberInDevAndProd(workInProgress) {n try {n var info = “;n var node = workInProgress;nn do {n info += describeFiber(node);n node = node.return;n } while (node);nn return info;n } catch (x) {n return ‚\nError generating stack: ‚ + x.message + ‚\n‘ + x.stack;n }n}nnfunction getWrappedName(outerType, innerType, wrapperName) {n var functionName = innerType.displayName || innerType.name || “;n return outerType.displayName || (functionName !== “ ? wrapperName + „(“ + functionName + „)“ : wrapperName);n}nnfunction getContextName(type) {n return type.displayName || ‚Context‘;n}nnfunction getComponentName(type) {n if (type == null) {n // Host root, text node or just invalid type.n return null;n }nn {n if (typeof type.tag === ’number‘) {n error(‚Received an unexpected object in getComponentName(). ‚ + ‚This is likely a bug in React. Please file an issue.‘);n }n }nn if (typeof type === ‚function‘) {n return type.displayName || type.name || null;n }nn if (typeof type === ’string‘) {n return type;n }nn switch (type) {n case REACT_FRAGMENT_TYPE:n return ‚Fragment‘;nn case REACT_PORTAL_TYPE:n return ‚Portal‘;nn case REACT_PROFILER_TYPE:n return ‚Profiler‘;nn case REACT_STRICT_MODE_TYPE:n return ‚StrictMode‘;nn case REACT_SUSPENSE_TYPE:n return ‚Suspense‘;nn case REACT_SUSPENSE_LIST_TYPE:n return ‚SuspenseList‘;n }nn if (typeof type === ‚object‘) {n switch (type.$$typeof) {n case REACT_CONTEXT_TYPE:n var context = type;n return getContextName(context) + ‚.Consumer‘;nn case REACT_PROVIDER_TYPE:n var provider = type;n return getContextName(provider._context) + ‚.Provider‘;nn case REACT_FORWARD_REF_TYPE:n return getWrappedName(type, type.render, ‚ForwardRef‘);nn case REACT_MEMO_TYPE:n return getComponentName(type.type);nn case REACT_BLOCK_TYPE:n return getComponentName(type._render);nn case REACT_LAZY_TYPE:n {n var lazyComponent = type;n var payload = lazyComponent._payload;n var init = lazyComponent._init;nn try {n return getComponentName(init(payload));n } catch (x) {n return null;n }n }n }n }nn return null;n}nnvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;nvar current = null;nvar isRendering = false;nfunction getCurrentFiberOwnerNameInDevOrNull() {n {n if (current === null) {n return null;n }nn var owner = current._debugOwner;nn if (owner !== null && typeof owner !== ‚undefined‘) {n return getComponentName(owner.type);n }n }nn return null;n}nnfunction getCurrentFiberStackInDev() {n {n if (current === null) {n return “;n } // Safe because if current fiber exists, we are reconciling,n // and it is guaranteed to be the work-in-progress version.nnn return getStackByFiberInDevAndProd(current);n }n}nnfunction resetCurrentFiber() {n {n ReactDebugCurrentFrame.getCurrentStack = null;n current = null;n isRendering = false;n }n}nfunction setCurrentFiber(fiber) {n {n ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;n current = fiber;n isRendering = false;n }n}nfunction setIsRendering(rendering) {n {n isRendering = rendering;n }n}nfunction getIsRendering() {n {n return isRendering;n }n}nn// Flow does not allow string concatenation of most non-string types. To workn// around this limitation, we use an opaque type that can only be obtained byn// passing the value through getToStringValue first.nfunction toString(value) {n return “ + value;n}nfunction getToStringValue(value) {n switch (typeof value) {n case ‚boolean‘:n case ’number‘:n case ‚object‘:n case ’string‘:n case ‚undefined‘:n return value;nn default:n // function, symbol are assigned as empty stringsn return “;n }n}nnvar hasReadOnlyValue = {n button: true,n checkbox: true,n image: true,n hidden: true,n radio: true,n reset: true,n submit: truen};nfunction checkControlledValueProps(tagName, props) {n {n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {n error(‚You provided a `value` prop to a form field without an ‚ + ‚`onChange` handler. This will render a read-only field. If ‚ + ‚the field should be mutable use `defaultValue`. Otherwise, ‚ + ’set either `onChange` or `readOnly`.‘);n }nn if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {n error(‚You provided a `checked` prop to a form field without an ‚ + ‚`onChange` handler. This will render a read-only field. If ‚ + ‚the field should be mutable use `defaultChecked`. Otherwise, ‚ + ’set either `onChange` or `readOnly`.‘);n }n }n}nnfunction isCheckable(elem) {n var type = elem.type;n var nodeName = elem.nodeName;n return nodeName && nodeName.toLowerCase() === ‚input‘ && (type === ‚checkbox‘ || type === ‚radio‘);n}nnfunction getTracker(node) {n return node._valueTracker;n}nnfunction detachTracker(node) {n node._valueTracker = null;n}nnfunction getValueFromNode(node) {n var value = “;nn if (!node) {n return value;n }nn if (isCheckable(node)) {n value = node.checked ? ‚true‘ : ‚false‘;n } else {n value = node.value;n }nn return value;n}nnfunction trackValueOnNode(node) {n var valueField = isCheckable(node) ? ‚checked‘ : ‚value‘;n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);n var currentValue = “ + node[valueField]; // if someone has already defined a value or Safari, then bailn // and don’t track value will cause over reporting of changes,n // but it’s better then a hard failuren // (needed for certain tests that spyOn input values and Safari)nn if (node.hasOwnProperty(valueField) || typeof descriptor === ‚undefined‘ || typeof descriptor.get !== ‚function‘ || typeof descriptor.set !== ‚function‘) {n return;n }nn var get = descriptor.get,n set = descriptor.set;n Object.defineProperty(node, valueField, {n configurable: true,n get: function () {n return get.call(this);n },n set: function (value) {n currentValue = “ + value;n set.call(this, value);n }n }); // We could’ve passed this the first timen // but it triggers a bug in IE11 and Edge 14/15.n // Calling defineProperty() again should be equivalent.n // https://github.com/facebook/react/issues/11768nn Object.defineProperty(node, valueField, {n enumerable: descriptor.enumerablen });n var tracker = {n getValue: function () {n return currentValue;n },n setValue: function (value) {n currentValue = “ + value;n },n stopTracking: function () {n detachTracker(node);n delete node[valueField];n }n };n return tracker;n}nnfunction track(node) {n if (getTracker(node)) {n return;n } // TODO: Once it’s just Fiber we can move this to node._wrapperStatennn node._valueTracker = trackValueOnNode(node);n}nfunction updateValueIfChanged(node) {n if (!node) {n return false;n }nn var tracker = getTracker(node); // if there is no tracker at this point it’s unlikelyn // that trying again will succeednn if (!tracker) {n return true;n }nn var lastValue = tracker.getValue();n var nextValue = getValueFromNode(node);nn if (nextValue !== lastValue) {n tracker.setValue(nextValue);n return true;n }nn return false;n}nnfunction getActiveElement(doc) {n doc = doc || (typeof document !== ‚undefined‘ ? document : undefined);nn if (typeof doc === ‚undefined‘) {n return null;n }nn try {n return doc.activeElement || doc.body;n } catch (e) {n return doc.body;n }n}nnvar didWarnValueDefaultValue = false;nvar didWarnCheckedDefaultChecked = false;nvar didWarnControlledToUncontrolled = false;nvar didWarnUncontrolledToControlled = false;nnfunction isControlled(props) {n var usesChecked = props.type === ‚checkbox‘ || props.type === ‚radio‘;n return usesChecked ? props.checked != null : props.value != null;n}n/**n * Implements an host component that allows setting these optionaln * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.n *n * If `checked` or `value` are not supplied (or null/undefined), user actionsn * that affect the checked state or value will trigger updates to the element.n *n * If they are supplied (and not null/undefined), the rendered element will notn * trigger updates to the element. Instead, the props must change in order forn * the rendered element to be updated.n *n * The rendered element will be initialized as unchecked (or `defaultChecked`)n * with an empty value (or `defaultValue`).n *n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.htmln */nnnfunction getHostProps(element, props) {n var node = element;n var checked = props.checked;nn var hostProps = _assign({}, props, {n defaultChecked: undefined,n defaultValue: undefined,n value: undefined,n checked: checked != null ? checked : node._wrapperState.initialCheckedn });nn return hostProps;n}nfunction initWrapperState(element, props) {n {n checkControlledValueProps(‚input‘, props);nn if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {n error(‚%s contains an input of type %s with both checked and defaultChecked props. ‚ + ‚Input elements must be either controlled or uncontrolled ‚ + ‚(specify either the checked prop, or the defaultChecked prop, but not ‚ + ‚both). Decide between using a controlled or uncontrolled input ‚ + ‚element and remove one of these props. More info: ‚ + ‚https://reactjs.org/link/controlled-components‘, getCurrentFiberOwnerNameInDevOrNull() || ‚A component‘, props.type);nn didWarnCheckedDefaultChecked = true;n }nn if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {n error(‚%s contains an input of type %s with both value and defaultValue props. ‚ + ‚Input elements must be either controlled or uncontrolled ‚ + ‚(specify either the value prop, or the defaultValue prop, but not ‚ + ‚both). Decide between using a controlled or uncontrolled input ‚ + ‚element and remove one of these props. More info: ‚ + ‚https://reactjs.org/link/controlled-components‘, getCurrentFiberOwnerNameInDevOrNull() || ‚A component‘, props.type);nn didWarnValueDefaultValue = true;n }n }nn var node = element;n var defaultValue = props.defaultValue == null ? “ : props.defaultValue;n node._wrapperState = {n initialChecked: props.checked != null ? props.checked : props.defaultChecked,n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),n controlled: isControlled(props)n };n}nfunction updateChecked(element, props) {n var node = element;n var checked = props.checked;nn if (checked != null) {n setValueForProperty(node, ‚checked‘, checked, false);n }n}nfunction updateWrapper(element, props) {n var node = element;nn {n var controlled = isControlled(props);nn if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {n error(‚A component is changing an uncontrolled input to be controlled. ‚ + ‚This is likely caused by the value changing from undefined to ‚ + ‚a defined value, which should not happen. ‚ + ‚Decide between using a controlled or uncontrolled input ‚ + ‚element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components‘);nn didWarnUncontrolledToControlled = true;n }nn if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {n error(‚A component is changing a controlled input to be uncontrolled. ‚ + ‚This is likely caused by the value changing from a defined to ‚ + ‚undefined, which should not happen. ‚ + ‚Decide between using a controlled or uncontrolled input ‚ + ‚element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components‘);nn didWarnControlledToUncontrolled = true;n }n }nn updateChecked(element, props);n var value = getToStringValue(props.value);n var type = props.type;nn if (value != null) {n if (type === ’number‘) {n if (value === 0 && node.value === “ || // We explicitly want to coerce to number here if possible.n // eslint-disable-next-linen node.value != value) {n node.value = toString(value);n }n } else if (node.value !== toString(value)) {n node.value = toString(value);n }n } else if (type === ’submit‘ || type === ‚reset‘) {n // Submit/reset inputs need the attribute removed completely to avoidn // blank-text buttons.n node.removeAttribute(‚value‘);n return;n }nn {n // When syncing the value attribute, the value comes from a cascade ofn // properties:n // 1. The value React propertyn // 2. The defaultValue React propertyn // 3. Otherwise there should be no changen if (props.hasOwnProperty(‚value‘)) {n setDefaultValue(node, props.type, value);n } else if (props.hasOwnProperty(‚defaultValue‘)) {n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));n }n }nn {n // When syncing the checked attribute, it only changes when it needsn // to be removed, such as transitioning from a checkbox into a text inputn if (props.checked == null && props.defaultChecked != null) {n node.defaultChecked = !!props.defaultChecked;n }n }n}nfunction postMountWrapper(element, props, isHydrating) {n var node = element; // Do not assign value if it is already set. This prevents user text inputn // from being lost during SSR hydration.nn if (props.hasOwnProperty(‚value‘) || props.hasOwnProperty(‚defaultValue‘)) {n var type = props.type;n var isButton = type === ’submit‘ || type === ‚reset‘; // Avoid setting value attribute on submit/reset inputs as it overrides then // default value provided by the browser. See: #12872nn if (isButton && (props.value === undefined || props.value === null)) {n return;n }nn var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text inputn // from being lost during SSR hydration.nn if (!isHydrating) {n {n // When syncing the value attribute, the value property should usen // the wrapperState._initialValue property. This uses:n //n // 1. The value React property when presentn // 2. The defaultValue React property when presentn // 3. An empty stringn if (initialValue !== node.value) {n node.value = initialValue;n }n }n }nn {n // Otherwise, the value attribute is synchronized to the property,n // so we assign defaultValue to the same thing as the value propertyn // assignment step above.n node.defaultValue = initialValue;n }n } // Normally, we’d just do `node.checked = node.checked` upon initial mount, less this bugn // this is needed to work around a chrome bug where setting defaultCheckedn // will sometimes influence the value of checked (even after detachment).n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416n // We need to temporarily unset name to avoid disrupting radio button groups.nnn var name = node.name;nn if (name !== “) {n node.name = “;n }nn {n // When syncing the checked attribute, both the checked property andn // attribute are assigned at the same time using defaultChecked. This uses:n //n // 1. The checked React property when presentn // 2. The defaultChecked React property when presentn // 3. Otherwise, falsen node.defaultChecked = !node.defaultChecked;n node.defaultChecked = !!node._wrapperState.initialChecked;n }nn if (name !== “) {n node.name = name;n }n}nfunction restoreControlledState(element, props) {n var node = element;n updateWrapper(node, props);n updateNamedCousins(node, props);n}nnfunction updateNamedCousins(rootNode, props) {n var name = props.name;nn if (props.type === ‚radio‘ && name != null) {n var queryRoot = rootNode;nn while (queryRoot.parentNode) {n queryRoot = queryRoot.parentNode;n } // If `rootNode.form` was non-null, then we could try `form.elements`,n // but that sometimes behaves strangely in IE8. We could also try usingn // `form.getElementsByName`, but that will only return direct childrenn // and won’t include inputs that use the HTML5 `form=` attribute. Sincen // the input might not even be in a form. It might not even be in then // document. Let’s just use the local `querySelectorAll` to ensure we don’tn // miss anything.nnn var group = queryRoot.querySelectorAll(‚input[name=‘ + JSON.stringify(“ + name) + ‚][type=“radio“]‘);nn for (var i = 0; i is not a valid email address“.n//n// Here we check to see if the defaultValue has actually changed, avoiding these problemsn// when the user is inputting textn//n// https://github.com/facebook/react/issues/7253nnnfunction setDefaultValue(node, type, value) {n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.jsn type !== ’number‘ || getActiveElement(node.ownerDocument) !== node) {n if (value == null) {n node.defaultValue = toString(node._wrapperState.initialValue);n } else if (node.defaultValue !== toString(value)) {n node.defaultValue = toString(value);n }n }n}nnvar didWarnSelectedSetOnOption = false;nvar didWarnInvalidChild = false;nnfunction flattenChildren(children) {n var content = “; // Flatten children. We’ll warn if they are invalidn // during validateProps() which runs for hydration too.n // Note that this would throw on non-element objects.n // Elements are stringified (which is normally irrelevantn // but matters for ).nn React.Children.forEach(children, function (child) {n if (child == null) {n return;n }nn content += child; // Note: we don’t warn about invalid children here.n // Instead, this is done separately below so thatn // it happens during the hydration code path too.n });n return content;n}n/**n * Implements an host component that warns when `selected` is set.n */nnnfunction validateProps(element, props) {n {n // This mirrors the code path above, but runs for hydration too.n // Warn about invalid children here so that client and hydration are consistent.n // TODO: this seems like it could cause a DEV-only throw for hydrationn // if children contains a non-element object. We should try to avoid that.n if (typeof props.children === ‚object‘ && props.children !== null) {n React.Children.forEach(props.children, function (child) {n if (child == null) {n return;n }nn if (typeof child === ’string‘ || typeof child === ’number‘) {n return;n }nn if (typeof child.type !== ’string‘) {n return;n }nn if (!didWarnInvalidChild) {n didWarnInvalidChild = true;nn error(‚Only strings and numbers are supported as
children.‘);n }n });n } // TODO: Remove support for `selected` in
.nnn if (props.selected != null && !didWarnSelectedSetOnOption) {n error(‚Use the `defaultValue` or `value` props on instead of ‚ + ’setting `selected` on .‘);nn didWarnSelectedSetOnOption = true;n }n }n}nfunction postMountWrapper$1(element, props) {n // value=““ should make a value attribute (#6219)n if (props.value != null) {n element.setAttribute(‚value‘, toString(getToStringValue(props.value)));n }n}nfunction getHostProps$1(element, props) {n var hostProps = _assign({n children: undefinedn }, props);nn var content = flattenChildren(props.children);nn if (content) {n hostProps.children = content;n }nn return hostProps;n}nnvar didWarnValueDefaultValue$1;nn{n didWarnValueDefaultValue$1 = false;n}nnfunction getDeclarationErrorAddendum() {n var ownerName = getCurrentFiberOwnerNameInDevOrNull();nn if (ownerName) {n return ‚\n\nCheck the render method of `‘ + ownerName + ‚`.‘;n }nn return “;n}nnvar valuePropNames = [‚value‘, ‚defaultValue‘];n/**n * Validation function for `value` and `defaultValue`.n */nnfunction checkSelectPropTypes(props) {n {n checkControlledValueProps(’select‘, props);nn for (var i = 0; i must be an array if ‚ + ‚`multiple` is true.%s‘, propName, getDeclarationErrorAddendum());n } else if (!props.multiple && isArray) {n error(‚The `%s` prop supplied to must be a scalar ‚ + ‚value if `multiple` is false.%s‘, propName, getDeclarationErrorAddendum());n }n }n }n}nnfunction updateOptions(node, multiple, propValue, setDefaultSelected) {n var options = node.options;nn if (multiple) {n var selectedValues = propValue;n var selectedValue = {};nn for (var i = 0; i host component that allows optionally setting then * props `value` and `defaultValue`. If `multiple` is false, the prop must be an * stringable. If `multiple` is true, the prop must be an array of stringables.n *n * If `value` is not supplied (or null/undefined), user actions that change then * selected option will trigger updates to the rendered options.n *n * If it is supplied (and not null/undefined), the rendered options will notn * update in response to user actions. Instead, the `value` prop must change inn * order for the rendered options to update.n *n * If `defaultValue` is provided, any options with the supplied values will ben * selected.n */nnnfunction getHostProps$2(element, props) {n return _assign({}, props, {n value: undefinedn });n}nfunction initWrapperState$1(element, props) {n var node = element;nn {n checkSelectPropTypes(props);n }nn node._wrapperState = {n wasMultiple: !!props.multiplen };nn {n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {n error(‚Select elements must be either controlled or uncontrolled ‚ + ‚(specify either the value prop, or the defaultValue prop, but not ‚ + ‚both). Decide between using a controlled or uncontrolled select ‚ + ‚element and remove one of these props. More info: ‚ + ‚https://reactjs.org/link/controlled-components‘);nn didWarnValueDefaultValue$1 = true;n }n }n}nfunction postMountWrapper$2(element, props) {n var node = element;n node.multiple = !!props.multiple;n var value = props.value;nn if (value != null) {n updateOptions(node, !!props.multiple, value, false);n } else if (props.defaultValue != null) {n updateOptions(node, !!props.multiple, props.defaultValue, true);n }n}nfunction postUpdateWrapper(element, props) {n var node = element;n var wasMultiple = node._wrapperState.wasMultiple;n node._wrapperState.wasMultiple = !!props.multiple;n var value = props.value;nn if (value != null) {n updateOptions(node, !!props.multiple, value, false);n } else if (wasMultiple !== !!props.multiple) {n // For simplicity, reapply `defaultValue` if `multiple` is toggled.n if (props.defaultValue != null) {n updateOptions(node, !!props.multiple, props.defaultValue, true);n } else {n // Revert the select back to its default unselected state.n updateOptions(node, !!props.multiple, props.multiple ? [] : “, false);n }n }n}nfunction restoreControlledState$1(element, props) {n var node = element;n var value = props.value;nn if (value != null) {n updateOptions(node, !!props.multiple, value, false);n }n}nnvar didWarnValDefaultVal = false;nn/**n * Implements a

is invalid but we don’t warnn // because it still parses correctly; we do warn for other cases like nestedn //

tags where the beginning of the second element implicitly closes then // first, causing a confusing mess.n // https://html.spec.whatwg.org/multipage/syntax.html#specialn var specialTags = [‚address‘, ‚applet‘, ‚area‘, ‚article‘, ‚aside‘, ‚base‘, ‚basefont‘, ‚bgsound‘, ‚blockquote‘, ‚body‘, ‚br‘, ‚button‘, ‚caption‘, ‚center‘, ‚col‘, ‚colgroup‘, ‚dd‘, ‚details‘, ‚dir‘, ‚div‘, ‚dl‘, ‚dt‘, ‚embed‘, ‚fieldset‘, ‚figcaption‘, ‚figure‘, ‚footer‘, ‚form‘, ‚frame‘, ‚frameset‘, ‚h1‘, ‚h2‘, ‚h3‘, ‚h4‘, ‚h5‘, ‚h6‘, ‚head‘, ‚header‘, ‚hgroup‘, ‚hr‘, ‚html‘, ‚iframe‘, ‚img‘, ‚input‘, ‚isindex‘, ‚li‘, ‚link‘, ‚listing‘, ‚main‘, ‚marquee‘, ‚menu‘, ‚menuitem‘, ‚meta‘, ’nav‘, ’noembed‘, ’noframes‘, ’noscript‘, ‚object‘, ‚ol‘, ‚p‘, ‚param‘, ‚plaintext‘, ‚pre‘, ’script‘, ’section‘, ’select‘, ’source‘, ’style‘, ’summary‘, ‚table‘, ‚tbody‘, ‚td‘, ‚template‘, ‚textarea‘, ‚tfoot‘, ‚th‘, ‚thead‘, ‚title‘, ‚tr‘, ‚track‘, ‚ul‘, ‚wbr‘, ‚xmp‘]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scopenn var inScopeTags = [‚applet‘, ‚caption‘, ‚html‘, ‚table‘, ‚td‘, ‚th‘, ‚marquee‘, ‚object‘, ‚template‘, // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-pointn // TODO: Distinguish by namespace here — for

, including it heren // errs on the side of fewer warningsn ‚foreignObject‘, ‚desc‘, ‚title‘]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scopenn var buttonScopeTags = inScopeTags.concat([‚button‘]); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tagsnn var impliedEndTags = [‚dd‘, ‚dt‘, ‚li‘, ‚option‘, ‚optgroup‘, ‚p‘, ‚rp‘, ‚rt‘];n var emptyAncestorInfo = {n current: null,n formTag: null,n aTagInScope: null,n buttonTagInScope: null,n nobrTagInScope: null,n pTagInButtonScope: null,n listItemTagAutoclosing: null,n dlItemTagAutoclosing: nulln };nn updatedAncestorInfo = function (oldInfo, tag) {n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);nn var info = {n tag: tagn };nn if (inScopeTags.indexOf(tag) !== -1) {n ancestorInfo.aTagInScope = null;n ancestorInfo.buttonTagInScope = null;n ancestorInfo.nobrTagInScope = null;n }nn if (buttonScopeTags.indexOf(tag) !== -1) {n ancestorInfo.pTagInButtonScope = null;n } // See rules for ‚li‘, ‚dd‘, ‚dt‘ start tags inn // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbodynnn if (specialTags.indexOf(tag) !== -1 && tag !== ‚address‘ && tag !== ‚div‘ && tag !== ‚p‘) {n ancestorInfo.listItemTagAutoclosing = null;n ancestorInfo.dlItemTagAutoclosing = null;n }nn ancestorInfo.current = info;nn if (tag === ‚form‘) {n ancestorInfo.formTag = info;n }nn if (tag === ‚a‘) {n ancestorInfo.aTagInScope = info;n }nn if (tag === ‚button‘) {n ancestorInfo.buttonTagInScope = info;n }nn if (tag === ’nobr‘) {n ancestorInfo.nobrTagInScope = info;n }nn if (tag === ‚p‘) {n ancestorInfo.pTagInButtonScope = info;n }nn if (tag === ‚li‘) {n ancestorInfo.listItemTagAutoclosing = info;n }nn if (tag === ‚dd‘ || tag === ‚dt‘) {n ancestorInfo.dlItemTagAutoclosing = info;n }nn return ancestorInfo;n };n /**n * Returns whethern */nnn var isTagValidWithParent = function (tag, parentTag) {n // First, let’s check if we’re in an unusual parsing mode…n switch (parentTag) {n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselectn case ’select‘:n return tag === ‚option‘ || tag === ‚optgroup‘ || tag === ‚#text‘;nn case ‚optgroup‘:n return tag === ‚option‘ || tag === ‚#text‘;n // Strictly speaking, seeing an doesn’t mean we’re in a n // butnn case ‚option‘:n return tag === ‚#text‘;n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intdn // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaptionn // No special behavior since these rules fall back to „in body“ mode forn // all except special table nodes which cause bad parsing behavior anyway.n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intrnn case ‚tr‘:n return tag === ‚th‘ || tag === ‚td‘ || tag === ’style‘ || tag === ’script‘ || tag === ‚template‘;n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbodynn case ‚tbody‘:n case ‚thead‘:n case ‚tfoot‘:n return tag === ‚tr‘ || tag === ’style‘ || tag === ’script‘ || tag === ‚template‘;n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroupnn case ‚colgroup‘:n return tag === ‚col‘ || tag === ‚template‘;n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intablenn case ‚table‘:n return tag === ‚caption‘ || tag === ‚colgroup‘ || tag === ‚tbody‘ || tag === ‚tfoot‘ || tag === ‚thead‘ || tag === ’style‘ || tag === ’script‘ || tag === ‚template‘;n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inheadnn case ‚head‘:n return tag === ‚base‘ || tag === ‚basefont‘ || tag === ‚bgsound‘ || tag === ‚link‘ || tag === ‚meta‘ || tag === ‚title‘ || tag === ’noscript‘ || tag === ’noframes‘ || tag === ’style‘ || tag === ’script‘ || tag === ‚template‘;n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-elementnn case ‚html‘:n return tag === ‚head‘ || tag === ‚body‘ || tag === ‚frameset‘;nn case ‚frameset‘:n return tag === ‚frame‘;nn case ‚#document‘:n return tag === ‚html‘;n } // Probably in the „in body“ parsing mode, so we outlaw only tag combosn // where the parsing rules cause implicit opens or closes to be added.n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbodynnn switch (tag) {n case ‚h1‘:n case ‚h2‘:n case ‚h3‘:n case ‚h4‘:n case ‚h5‘:n case ‚h6‘:n return parentTag !== ‚h1‘ && parentTag !== ‚h2‘ && parentTag !== ‚h3‘ && parentTag !== ‚h4‘ && parentTag !== ‚h5‘ && parentTag !== ‚h6‘;nn case ‚rp‘:n case ‚rt‘:n return impliedEndTags.indexOf(parentTag) === -1;nn case ‚body‘:n case ‚caption‘:n case ‚col‘:n case ‚colgroup‘:n case ‚frameset‘:n case ‚frame‘:n case ‚head‘:n case ‚html‘:n case ‚tbody‘:n case ‚td‘:n case ‚tfoot‘:n case ‚th‘:n case ‚thead‘:n case ‚tr‘:n // These tags are only valid with a few parents that have special childn // parsing rules — if we’re down here, then none of those matched andn // so we allow it only if we don’t know what the parent is, as all othern // cases are invalid.n return parentTag == null;n }nn return true;n };n /**n * Returns whethern */nnn var findInvalidAncestorForTag = function (tag, ancestorInfo) {n switch (tag) {n case ‚address‘:n case ‚article‘:n case ‚aside‘:n case ‚blockquote‘:n case ‚center‘:n case ‚details‘:n case ‚dialog‘:n case ‚dir‘:n case ‚div‘:n case ‚dl‘:n case ‚fieldset‘:n case ‚figcaption‘:n case ‚figure‘:n case ‚footer‘:n case ‚header‘:n case ‚hgroup‘:n case ‚main‘:n case ‚menu‘:n case ’nav‘:n case ‚ol‘:n case ‚p‘:n case ’section‘:n case ’summary‘:n case ‚ul‘:n case ‚pre‘:n case ‚listing‘:n case ‚table‘:n case ‚hr‘:n case ‚xmp‘:n case ‚h1‘:n case ‚h2‘:n case ‚h3‘:n case ‚h4‘:n case ‚h5‘:n case ‚h6‘:n return ancestorInfo.pTagInButtonScope;nn case ‚form‘:n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;nn case ‚li‘:n return ancestorInfo.listItemTagAutoclosing;nn case ‚dd‘:n case ‚dt‘:n return ancestorInfo.dlItemTagAutoclosing;nn case ‚button‘:n return ancestorInfo.buttonTagInScope;nn case ‚a‘:n // Spec says something about storing a list of markers, but it soundsn // equivalent to this check.n return ancestorInfo.aTagInScope;nn case ’nobr‘:n return ancestorInfo.nobrTagInScope;n }nn return null;n };nn var didWarn$1 = {};nn validateDOMNesting = function (childTag, childText, ancestorInfo) {n ancestorInfo = ancestorInfo || emptyAncestorInfo;n var parentInfo = ancestorInfo.current;n var parentTag = parentInfo && parentInfo.tag;nn if (childText != null) {n if (childTag != null) {n error(‚validateDOMNesting: when childText is passed, childTag should be null‘);n }nn childTag = ‚#text‘;n }nn var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);n var invalidParentOrAncestor = invalidParent || invalidAncestor;nn if (!invalidParentOrAncestor) {n return;n }nn var ancestorTag = invalidParentOrAncestor.tag;n var warnKey = !!invalidParent + ‚|‘ + childTag + ‚|‘ + ancestorTag;nn if (didWarn$1[warnKey]) {n return;n }nn didWarn$1[warnKey] = true;n var tagDisplayName = childTag;n var whitespaceInfo = “;nn if (childTag === ‚#text‘) {n if (/\S/.test(childText)) {n tagDisplayName = ‚Text nodes‘;n } else {n tagDisplayName = ‚Whitespace text nodes‘;n whitespaceInfo = “ Make sure you don’t have any extra whitespace between tags on “ + ‚each line of your source code.‘;n }n } else {n tagDisplayName = “;n }nn if (invalidParent) {n var info = “;nn if (ancestorTag === ‚table‘ && childTag === ‚tr‘) {n info += ‚ Add a </p> <tbody>, </p> <thead> or </thead> </tbody> <tfoot> to your code to match the DOM tree generated by ‚ + ‚the browser.‘;n }nn error(‚validateDOMNesting(…): %s cannot appear as a child of .%s%s‘, tagDisplayName, ancestorTag, whitespaceInfo, info);n } else {n error(‚validateDOMNesting(…): %s cannot appear as a descendant of ‚ + ‚.‘, tagDisplayName, ancestorTag);n }n };n}nnvar SUPPRESS_HYDRATION_WARNING$1;nn{n SUPPRESS_HYDRATION_WARNING$1 = ’suppressHydrationWarning‘;n}nnvar SUSPENSE_START_DATA = ‚$‘;nvar SUSPENSE_END_DATA = ‚/$‘;nvar SUSPENSE_PENDING_START_DATA = ‚$?‘;nvar SUSPENSE_FALLBACK_START_DATA = ‚$!‘;nvar STYLE$1 = ’style‘;nvar eventsEnabled = null;nvar selectionInformation = null;nnfunction shouldAutoFocusHostComponent(type, props) {n switch (type) {n case ‚button‘:n case ‚input‘:n case ’select‘:n case ‚textarea‘:n return !!props.autoFocus;n }nn return false;n}nfunction getRootHostContext(rootContainerInstance) {n var type;n var namespace;n var nodeType = rootContainerInstance.nodeType;nn switch (nodeType) {n case DOCUMENT_NODE:n case DOCUMENT_FRAGMENT_NODE:n {n type = nodeType === DOCUMENT_NODE ? ‚#document‘ : ‚#fragment‘;n var root = rootContainerInstance.documentElement;n namespace = root ? root.namespaceURI : getChildNamespace(null, “);n break;n }nn default:n {n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;n var ownNamespace = container.namespaceURI || null;n type = container.tagName;n namespace = getChildNamespace(ownNamespace, type);n break;n }n }nn {n var validatedTag = type.toLowerCase();n var ancestorInfo = updatedAncestorInfo(null, validatedTag);n return {n namespace: namespace,n ancestorInfo: ancestorInfon };n }n}nfunction getChildHostContext(parentHostContext, type, rootContainerInstance) {n {n var parentHostContextDev = parentHostContext;n var namespace = getChildNamespace(parentHostContextDev.namespace, type);n var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);n return {n namespace: namespace,n ancestorInfo: ancestorInfon };n }n}nfunction getPublicInstance(instance) {n return instance;n}nfunction prepareForCommit(containerInfo) {n eventsEnabled = isEnabled();n selectionInformation = getSelectionInformation();n var activeInstance = null;nn setEnabled(false);n return activeInstance;n}nfunction resetAfterCommit(containerInfo) {n restoreSelection(selectionInformation);n setEnabled(eventsEnabled);n eventsEnabled = null;n selectionInformation = null;n}nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {n var parentNamespace;nn {n // TODO: take namespace into account when validating.n var hostContextDev = hostContext;n validateDOMNesting(type, null, hostContextDev.ancestorInfo);nn if (typeof props.children === ’string‘ || typeof props.children === ’number‘) {n var string = “ + props.children;n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);n validateDOMNesting(null, string, ownAncestorInfo);n }nn parentNamespace = hostContextDev.namespace;n }nn var domElement = createElement(type, props, rootContainerInstance, parentNamespace);n precacheFiberNode(internalInstanceHandle, domElement);n updateFiberProps(domElement, props);n return domElement;n}nfunction appendInitialChild(parentInstance, child) {n parentInstance.appendChild(child);n}nfunction finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {n setInitialProperties(domElement, type, props, rootContainerInstance);n return shouldAutoFocusHostComponent(type, props);n}nfunction prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {n {n var hostContextDev = hostContext;nn if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === ’string‘ || typeof newProps.children === ’number‘)) {n var string = “ + newProps.children;n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);n validateDOMNesting(null, string, ownAncestorInfo);n }n }nn return diffProperties(domElement, type, oldProps, newProps);n}nfunction shouldSetTextContent(type, props) {n return type === ‚textarea‘ || type === ‚option‘ || type === ’noscript‘ || typeof props.children === ’string‘ || typeof props.children === ’number‘ || typeof props.dangerouslySetInnerHTML === ‚object‘ && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;n}nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {n {n var hostContextDev = hostContext;n validateDOMNesting(null, text, hostContextDev.ancestorInfo);n }nn var textNode = createTextNode(text, rootContainerInstance);n precacheFiberNode(internalInstanceHandle, textNode);n return textNode;n}n// if a component just imports ReactDOM (e.g. for findDOMNode).n// Some environments might not have setTimeout or clearTimeout.nnvar scheduleTimeout = typeof setTimeout === ‚function‘ ? setTimeout : undefined;nvar cancelTimeout = typeof clearTimeout === ‚function‘ ? clearTimeout : undefined;nvar noTimeout = -1; // ——————-nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {n // Despite the naming that might imply otherwise, this method onlyn // fires if there is an `Update` effect scheduled during mounting.n // This happens if `finalizeInitialChildren` returns `true` (which itn // does to implement the `autoFocus` attribute on the client). Butn // there are also other cases when this might happen (such as patchingn // up text content during hydration mismatch). So we’ll check this again.n if (shouldAutoFocusHostComponent(type, newProps)) {n domElement.focus();n }n}nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {n // Update the props handle so that we know which props are the ones withn // with current event handlers.n updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.nn updateProperties(domElement, updatePayload, type, oldProps, newProps);n}nfunction resetTextContent(domElement) {n setTextContent(domElement, “);n}nfunction commitTextUpdate(textInstance, oldText, newText) {n textInstance.nodeValue = newText;n}nfunction appendChild(parentInstance, child) {n parentInstance.appendChild(child);n}nfunction appendChildToContainer(container, child) {n var parentNode;nn if (container.nodeType === COMMENT_NODE) {n parentNode = container.parentNode;n parentNode.insertBefore(child, container);n } else {n parentNode = container;n parentNode.appendChild(child);n } // This container might be used for a portal.n // If something inside a portal is clicked, that click should bubblen // through the React tree. However, on Mobile Safari the click wouldn // never bubble through the *DOM* tree unless an ancestor with onclickn // event exists. So we wouldn’t see it and dispatch it.n // This is why we ensure that non React root containers have inline onclickn // defined.n // https://github.com/facebook/react/issues/11918nnn var reactRootContainer = container._reactRootContainer;nn if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {n // TODO: This cast may not be sound for SVG, MathML or custom elements.n trapClickOnNonInteractiveElement(parentNode);n }n}nfunction insertBefore(parentInstance, child, beforeChild) {n parentInstance.insertBefore(child, beforeChild);n}nfunction insertInContainerBefore(container, child, beforeChild) {n if (container.nodeType === COMMENT_NODE) {n container.parentNode.insertBefore(child, beforeChild);n } else {n container.insertBefore(child, beforeChild);n }n}nnfunction removeChild(parentInstance, child) {n parentInstance.removeChild(child);n}nfunction removeChildFromContainer(container, child) {n if (container.nodeType === COMMENT_NODE) {n container.parentNode.removeChild(child);n } else {n container.removeChild(child);n }n}nfunction hideInstance(instance) {n // TODO: Does this work for all element types? What about MathML? Should wen // pass host context to this method?n instance = instance;n var style = instance.style;nn if (typeof style.setProperty === ‚function‘) {n style.setProperty(‚display‘, ’none‘, ‚important‘);n } else {n style.display = ’none‘;n }n}nfunction hideTextInstance(textInstance) {n textInstance.nodeValue = “;n}nfunction unhideInstance(instance, props) {n instance = instance;n var styleProp = props[STYLE$1];n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty(‚display‘) ? styleProp.display : null;n instance.style.display = dangerousStyleValue(‚display‘, display);n}nfunction unhideTextInstance(textInstance, text) {n textInstance.nodeValue = text;n}nfunction clearContainer(container) {n if (container.nodeType === ELEMENT_NODE) {n container.textContent = “;n } else if (container.nodeType === DOCUMENT_NODE) {n var body = container.body;nn if (body != null) {n body.textContent = “;n }n }n} // ——————-nfunction canHydrateInstance(instance, type, props) {n if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {n return null;n } // This has now been refined to an element node.nnn return instance;n}nfunction canHydrateTextInstance(instance, text) {n if (text === “ || instance.nodeType !== TEXT_NODE) {n // Empty strings are not parsed by HTML so there won’t be a correct match here.n return null;n } // This has now been refined to a text node.nnn return instance;n}nfunction isSuspenseInstancePending(instance) {n return instance.data === SUSPENSE_PENDING_START_DATA;n}nfunction isSuspenseInstanceFallback(instance) {n return instance.data === SUSPENSE_FALLBACK_START_DATA;n}nnfunction getNextHydratable(node) {n // Skip non-hydratable nodes.n for (; node != null; node = node.nextSibling) {n var nodeType = node.nodeType;nn if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {n break;n }n }nn return node;n}nnfunction getNextHydratableSibling(instance) {n return getNextHydratable(instance.nextSibling);n}nfunction getFirstHydratableChild(parentInstance) {n return getNextHydratable(parentInstance.firstChild);n}nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the eventsn // get attached.nn updateFiberProps(instance, props);n var parentNamespace;nn {n var hostContextDev = hostContext;n parentNamespace = hostContextDev.namespace;n }nn return diffHydratedProperties(instance, type, props, parentNamespace);n}nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle) {n precacheFiberNode(internalInstanceHandle, textInstance);n return diffHydratedText(textInstance, text);n}nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.n // There might be nested nodes so we need to keep track of hown // deep we are and only break out when we’re back on top.nn var depth = 0;nn while (node) {n if (node.nodeType === COMMENT_NODE) {n var data = node.data;nn if (data === SUSPENSE_END_DATA) {n if (depth === 0) {n return getNextHydratableSibling(node);n } else {n depth–;n }n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {n depth++;n }n }nn node = node.nextSibling;n } // TODO: Warn, we didn’t find the end comment boundary.nnn return null;n} // Returns the SuspenseInstance if this node is a direct child of an// SuspenseInstance. I.e. if its previous sibling is a Comment withn// SUSPENSE_x_START_DATA. Otherwise, null.nnfunction getParentSuspenseInstance(targetInstance) {n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.n // There might be nested nodes so we need to keep track of hown // deep we are and only break out when we’re back on top.nn var depth = 0;nn while (node) {n if (node.nodeType === COMMENT_NODE) {n var data = node.data;nn if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {n if (depth === 0) {n return node;n } else {n depth–;n }n } else if (data === SUSPENSE_END_DATA) {n depth++;n }n }nn node = node.previousSibling;n }nn return null;n}nfunction commitHydratedContainer(container) {n // Retry if any event replaying was blocked on this.n retryIfBlockedOn(container);n}nfunction commitHydratedSuspenseInstance(suspenseInstance) {n // Retry if any event replaying was blocked on this.n retryIfBlockedOn(suspenseInstance);n}nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {n {n warnForUnmatchedText(textInstance, text);n }n}nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {n warnForUnmatchedText(textInstance, text);n }n}nfunction didNotHydrateContainerInstance(parentContainer, instance) {n {n if (instance.nodeType === ELEMENT_NODE) {n warnForDeletedHydratableElement(parentContainer, instance);n } else if (instance.nodeType === COMMENT_NODE) ; else {n warnForDeletedHydratableText(parentContainer, instance);n }n }n}nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {n if (instance.nodeType === ELEMENT_NODE) {n warnForDeletedHydratableElement(parentInstance, instance);n } else if (instance.nodeType === COMMENT_NODE) ; else {n warnForDeletedHydratableText(parentInstance, instance);n }n }n}nfunction didNotFindHydratableContainerInstance(parentContainer, type, props) {n {n warnForInsertedHydratedElement(parentContainer, type);n }n}nfunction didNotFindHydratableContainerTextInstance(parentContainer, text) {n {n warnForInsertedHydratedText(parentContainer, text);n }n}nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {n warnForInsertedHydratedElement(parentInstance, type);n }n}nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {n warnForInsertedHydratedText(parentInstance, text);n }n}nfunction didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;n}nvar clientId = 0;nfunction makeClientIdInDEV(warnOnAccessInDEV) {n var id = ‚r:‘ + (clientId++).toString(36);n return {n toString: function () {n warnOnAccessInDEV();n return id;n },n valueOf: function () {n warnOnAccessInDEV();n return id;n }n };n}nfunction isOpaqueHydratingObject(value) {n return value !== null && typeof value === ‚object‘ && value.$$typeof === REACT_OPAQUE_ID_TYPE;n}nfunction makeOpaqueHydratingObject(attemptToReadValue) {n return {n $$typeof: REACT_OPAQUE_ID_TYPE,n toString: attemptToReadValue,n valueOf: attemptToReadValuen };n}nfunction preparePortalMount(portalInstance) {n {n listenToAllSupportedEvents(portalInstance);n }n}nnvar randomKey = Math.random().toString(36).slice(2);nvar internalInstanceKey = ‚__reactFiber$‘ + randomKey;nvar internalPropsKey = ‚__reactProps$‘ + randomKey;nvar internalContainerInstanceKey = ‚__reactContainer$‘ + randomKey;nvar internalEventHandlersKey = ‚__reactEvents$‘ + randomKey;nfunction precacheFiberNode(hostInst, node) {n node[internalInstanceKey] = hostInst;n}nfunction markContainerAsRoot(hostRoot, node) {n node[internalContainerInstanceKey] = hostRoot;n}nfunction unmarkContainerAsRoot(node) {n node[internalContainerInstanceKey] = null;n}nfunction isContainerMarkedAsRoot(node) {n return !!node[internalContainerInstanceKey];n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.n// If the target node is part of a hydrated or not yet rendered subtree, thenn// this may also return a SuspenseComponent or HostRoot to indicate that.n// Conceptually the HostRoot fiber is a child of the Container node. So if youn// pass the Container node as the targetNode, you will not actually get then// HostRoot back. To get to the HostRoot, you need to pass a child of it.n// The same thing applies to Suspense boundaries.nnfunction getClosestInstanceFromNode(targetNode) {n var targetInst = targetNode[internalInstanceKey];nn if (targetInst) {n // Don’t return HostRoot or SuspenseComponent here.n return targetInst;n } // If the direct event target isn’t a React owned DOM node, we need to lookn // to see if one of its parents is a React owned DOM node.nnn var parentNode = targetNode.parentNode;nn while (parentNode) {n // We’ll check if this is a container root that could includen // React nodes in the future. We need to check this first becausen // if we’re a child of a dehydrated container, we need to firstn // find that inner container before moving on to finding the parentn // instance. Note that we don’t check this field on the targetNoden // itself because the fibers are conceptually between the containern // node and the first child. It isn’t surrounding the container node.n // If it’s not a container, we check if it’s an instance.n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];nn if (targetInst) {n // Since this wasn’t the direct target of the event, we might haven // stepped past dehydrated DOM nodes to get here. However they couldn // also have been non-React nodes. We need to answer which one.n // If we the instance doesn’t have any children, then there can’t ben // a nested suspense boundary within it. So we can use this as a fastn // bailout. Most of the time, when people add non-React children ton // the tree, it is using a ref to a child-less DOM node.n // Normally we’d only need to check one of the fibers because if itn // has ever gone from having children to deleting them or vice versan // it would have deleted the dehydrated boundary nested inside already.n // However, since the HostRoot starts out with an alternate it mightn // have one on the alternate so we need to check in case this was an // root.n var alternate = targetInst.alternate;nn if (targetInst.child !== null || alternate !== null && alternate.child !== null) {n // Next we need to figure out if the node that skipped past isn // nested within a dehydrated boundary and if so, which one.n var suspenseInstance = getParentSuspenseInstance(targetNode);nn while (suspenseInstance !== null) {n // We found a suspense instance. That means that we haven’tn // hydrated it yet. Even though we leave the comments in then // DOM after hydrating, and there are boundaries in the DOMn // that could already be hydrated, we wouldn’t have found themn // through this pass since if the target is hydrated it wouldn // have had an internalInstanceKey on it.n // Let’s get the fiber associated with the SuspenseComponentn // as the deepest instance.n var targetSuspenseInst = suspenseInstance[internalInstanceKey];nn if (targetSuspenseInst) {n return targetSuspenseInst;n } // If we don’t find a Fiber on the comment, it might be becausen // we haven’t gotten to hydrate it yet. There might still be an // parent boundary that hasn’t above this one so we need to findn // the outer most that is known.nnn suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don’t find one, then that should mean that the parentn // host component also hasn’t hydrated yet. We can return itn // below since it will bail out on the isMounted check later.n }n }nn return targetInst;n }nn targetNode = parentNode;n parentNode = targetNode.parentNode;n }nn return null;n}n/**n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponentn * instance, or null if the node was not rendered by this React.n */nnfunction getInstanceFromNode(node) {n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];nn if (inst) {n if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {n return inst;n } else {n return null;n }n }nn return null;n}n/**n * Given a ReactDOMComponent or ReactDOMTextComponent, return the correspondingn * DOM node.n */nnfunction getNodeFromInstance(inst) {n if (inst.tag === HostComponent || inst.tag === HostText) {n // In Fiber this, is just the state node right now. We assume it will ben // a host component or host text.n return inst.stateNode;n } // Without this first invariant, passing a non-DOM-component triggers the nextn // invariant for a missing parent, which is super confusing.nnn {n {n throw Error( „getNodeFromInstance: Invalid argument.“ );n }n }n}nfunction getFiberCurrentPropsFromNode(node) {n return node[internalPropsKey] || null;n}nfunction updateFiberProps(node, props) {n node[internalPropsKey] = props;n}nfunction getEventListenerSet(node) {n var elementListenerSet = node[internalEventHandlersKey];nn if (elementListenerSet === undefined) {n elementListenerSet = node[internalEventHandlersKey] = new Set();n }nn return elementListenerSet;n}nnvar loggedTypeFailures = {};nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;nnfunction setCurrentlyValidatingElement(element) {n {n if (element) {n var owner = element._owner;n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);n } else {n ReactDebugCurrentFrame$1.setExtraStackFrame(null);n }n }n}nnfunction checkPropTypes(typeSpecs, values, location, componentName, element) {n {n // $FlowFixMe This is okay but Flow doesn’t know it.n var has = Function.call.bind(Object.prototype.hasOwnProperty);nn for (var typeSpecName in typeSpecs) {n if (has(typeSpecs, typeSpecName)) {n var error$1 = void 0; // Prop type validation may throw. In case they do, we don’t want ton // fail the render phase where it didn’t fail before. So we log it.n // After these have been cleaned up, we’ll let them throw.nn try {n // This is intentionally an invariant that gets caught. It’s the samen // behavior as without this statement except with a better message.n if (typeof typeSpecs[typeSpecName] !== ‚function‘) {n var err = Error((componentName || ‚React class‘) + ‚: ‚ + location + ‚ type `‘ + typeSpecName + ‚` is invalid; ‚ + ‚it must be a function, usually from the `prop-types` package, but received `‘ + typeof typeSpecs[typeSpecName] + ‚`.‘ + ‚This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.‘);n err.name = ‚Invariant Violation‘;n throw err;n }nn error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ‚SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED‘);n } catch (ex) {n error$1 = ex;n }nn if (error$1 && !(error$1 instanceof Error)) {n setCurrentlyValidatingElement(element);nn error(‚%s: type specification of %s‘ + ‚ `%s` is invalid; the type checker ‚ + ‚function must return `null` or an `Error` but returned a %s. ‚ + ‚You may have forgotten to pass an argument to the type checker ‚ + ‚creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ‚ + ’shape all require an argument).‘, componentName || ‚React class‘, location, typeSpecName, typeof error$1);nn setCurrentlyValidatingElement(null);n }nn if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {n // Only monitor this failure once because there tends to be a lot of then // same error.n loggedTypeFailures[error$1.message] = true;n setCurrentlyValidatingElement(element);nn error(‚Failed %s type: %s‘, location, error$1.message);nn setCurrentlyValidatingElement(null);n }n }n }n }n}nnvar valueStack = [];nvar fiberStack;nn{n fiberStack = [];n}nnvar index = -1;nnfunction createCursor(defaultValue) {n return {n current: defaultValuen };n}nnfunction pop(cursor, fiber) {n if (index 0) {n pendingComponentWillMountWarnings.forEach(function (fiber) {n componentWillMountUniqueNames.add(getComponentName(fiber.type) || ‚Component‘);n didWarnAboutUnsafeLifecycles.add(fiber.type);n });n pendingComponentWillMountWarnings = [];n }nn var UNSAFE_componentWillMountUniqueNames = new Set();nn if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {n UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || ‚Component‘);n didWarnAboutUnsafeLifecycles.add(fiber.type);n });n pendingUNSAFE_ComponentWillMountWarnings = [];n }nn var componentWillReceivePropsUniqueNames = new Set();nn if (pendingComponentWillReceivePropsWarnings.length > 0) {n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {n componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || ‚Component‘);n didWarnAboutUnsafeLifecycles.add(fiber.type);n });n pendingComponentWillReceivePropsWarnings = [];n }nn var UNSAFE_componentWillReceivePropsUniqueNames = new Set();nn if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || ‚Component‘);n didWarnAboutUnsafeLifecycles.add(fiber.type);n });n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];n }nn var componentWillUpdateUniqueNames = new Set();nn if (pendingComponentWillUpdateWarnings.length > 0) {n pendingComponentWillUpdateWarnings.forEach(function (fiber) {n componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || ‚Component‘);n didWarnAboutUnsafeLifecycles.add(fiber.type);n });n pendingComponentWillUpdateWarnings = [];n }nn var UNSAFE_componentWillUpdateUniqueNames = new Set();nn if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {n UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || ‚Component‘);n didWarnAboutUnsafeLifecycles.add(fiber.type);n });n pendingUNSAFE_ComponentWillUpdateWarnings = [];n } // Finally, we flush all the warningsn // UNSAFE_ ones before the deprecated ones, since they’ll be ‚louder’nnn if (UNSAFE_componentWillMountUniqueNames.size > 0) {n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);nn error(‚Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ‚ + ‚See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n‘ + ‚* Move code with side effects to componentDidMount, and set initial state in the constructor.\n‘ + ‚\nPlease update the following components: %s‘, sortedNames);n }nn if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);nn error(‚Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ‚ + ‚and may indicate bugs in your code. ‚ + ‚See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n‘ + ‚* Move data fetching code or side effects to componentDidUpdate.\n‘ + „* If you’re updating state whenever props change, “ + ‚refactor your code to use memoization techniques or move it to ‚ + ’static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n‘ + ‚\nPlease update the following components: %s‘, _sortedNames);n }nn if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);nn error(‚Using UNSAFE_componentWillUpdate in strict mode is not recommended ‚ + ‚and may indicate bugs in your code. ‚ + ‚See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n‘ + ‚* Move data fetching code or side effects to componentDidUpdate.\n‘ + ‚\nPlease update the following components: %s‘, _sortedNames2);n }nn if (componentWillMountUniqueNames.size > 0) {n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);nn warn(‚componentWillMount has been renamed, and is not recommended for use. ‚ + ‚See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n‘ + ‚* Move code with side effects to componentDidMount, and set initial state in the constructor.\n‘ + ‚* Rename componentWillMount to UNSAFE_componentWillMount to suppress ‚ + ‚this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ‚ + ‚To rename all deprecated lifecycles to their new names, you can run ‚ + ‚`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n‘ + ‚\nPlease update the following components: %s‘, _sortedNames3);n }nn if (componentWillReceivePropsUniqueNames.size > 0) {n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);nn warn(‚componentWillReceiveProps has been renamed, and is not recommended for use. ‚ + ‚See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n‘ + ‚* Move data fetching code or side effects to componentDidUpdate.\n‘ + „* If you’re updating state whenever props change, refactor your “ + ‚code to use memoization techniques or move it to ‚ + ’static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n‘ + ‚* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ‚ + ‚this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ‚ + ‚To rename all deprecated lifecycles to their new names, you can run ‚ + ‚`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n‘ + ‚\nPlease update the following components: %s‘, _sortedNames4);n }nn if (componentWillUpdateUniqueNames.size > 0) {n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);nn warn(‚componentWillUpdate has been renamed, and is not recommended for use. ‚ + ‚See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n‘ + ‚* Move data fetching code or side effects to componentDidUpdate.\n‘ + ‚* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ‚ + ‚this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ‚ + ‚To rename all deprecated lifecycles to their new names, you can run ‚ + ‚`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n‘ + ‚\nPlease update the following components: %s‘, _sortedNames5);n }n };nn var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.nn var didWarnAboutLegacyContext = new Set();nn ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {n var strictRoot = findStrictRoot(fiber);nn if (strictRoot === null) {n error(‚Expected to find a StrictMode component in a strict mode tree. ‚ + ‚This error is likely caused by a bug in React. Please file an issue.‘);nn return;n } // Dedup strategy: Warn once per component.nnn if (didWarnAboutLegacyContext.has(fiber.type)) {n return;n }nn var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);nn if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === ‚function‘) {n if (warningsForRoot === undefined) {n warningsForRoot = [];n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);n }nn warningsForRoot.push(fiber);n }n };nn ReactStrictModeWarnings.flushLegacyContextWarning = function () {n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {n if (fiberArray.length === 0) {n return;n }nn var firstFiber = fiberArray[0];n var uniqueNames = new Set();n fiberArray.forEach(function (fiber) {n uniqueNames.add(getComponentName(fiber.type) || ‚Component‘);n didWarnAboutLegacyContext.add(fiber.type);n });n var sortedNames = setToSortedString(uniqueNames);nn try {n setCurrentFiber(firstFiber);nn error(‚Legacy context API has been detected within a strict-mode tree.‘ + ‚\n\nThe old API will be supported in all 16.x releases, but applications ‚ + ‚using it should migrate to the new version.‘ + ‚\n\nPlease update the following components: %s‘ + ‚\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context‘, sortedNames);n } finally {n resetCurrentFiber();n }n });n };nn ReactStrictModeWarnings.discardPendingWarnings = function () {n pendingComponentWillMountWarnings = [];n pendingUNSAFE_ComponentWillMountWarnings = [];n pendingComponentWillReceivePropsWarnings = [];n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];n pendingComponentWillUpdateWarnings = [];n pendingUNSAFE_ComponentWillUpdateWarnings = [];n pendingLegacyContextWarning = new Map();n };n}nnfunction resolveDefaultProps(Component, baseProps) {n if (Component && Component.defaultProps) {n // Resolve default props. Taken from ReactElementn var props = _assign({}, baseProps);nn var defaultProps = Component.defaultProps;nn for (var propName in defaultProps) {n if (props[propName] === undefined) {n props[propName] = defaultProps[propName];n }n }nn return props;n }nn return baseProps;n}nn// Max 31 bit integer. The max integer size in V8 for 32-bit systems.n// Math.pow(2, 30) – 1n// 0b111111111111111111111111111111nvar MAX_SIGNED_31_BIT_INT = 1073741823;nnvar valueCursor = createCursor(null);nvar rendererSigil;nn{n // Use this to detect multiple renderers using the same contextn rendererSigil = {};n}nnvar currentlyRenderingFiber = null;nvar lastContextDependency = null;nvar lastContextWithAllBitsObserved = null;nvar isDisallowedContextReadInDEV = false;nfunction resetContextDependencies() {n // This is called right before React yields execution, to ensure `readContext`n // cannot be called outside the render phase.n currentlyRenderingFiber = null;n lastContextDependency = null;n lastContextWithAllBitsObserved = null;nn {n isDisallowedContextReadInDEV = false;n }n}nfunction enterDisallowedContextReadInDEV() {n {n isDisallowedContextReadInDEV = true;n }n}nfunction exitDisallowedContextReadInDEV() {n {n isDisallowedContextReadInDEV = false;n }n}nfunction pushProvider(providerFiber, nextValue) {n var context = providerFiber.type._context;nn {n push(valueCursor, context._currentValue, providerFiber);n context._currentValue = nextValue;nn {n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {n error(‚Detected multiple renderers concurrently rendering the ‚ + ’same context provider. This is currently unsupported.‘);n }nn context._currentRenderer = rendererSigil;n }n }n}nfunction popProvider(providerFiber) {n var currentValue = valueCursor.current;n pop(valueCursor, providerFiber);n var context = providerFiber.type._context;nn {n context._currentValue = currentValue;n }n}nfunction calculateChangedBits(context, newValue, oldValue) {n if (objectIs(oldValue, newValue)) {n // No changen return 0;n } else {n var changedBits = typeof context._calculateChangedBits === ‚function‘ ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;nn {n if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {n error(‚calculateChangedBits: Expected the return value to be a ‚ + ’31-bit integer. Instead received: %s‘, changedBits);n }n }nn return changedBits | 0;n }n}nfunction scheduleWorkOnParentPath(parent, renderLanes) {n // Update the child lanes of all the ancestors, including the alternates.n var node = parent;nn while (node !== null) {n var alternate = node.alternate;nn if (!isSubsetOfLanes(node.childLanes, renderLanes)) {n node.childLanes = mergeLanes(node.childLanes, renderLanes);nn if (alternate !== null) {n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);n }n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);n } else {n // Neither alternate was updated, which means the rest of then // ancestor path already has sufficient priority.n break;n }nn node = node.return;n }n}nfunction propagateContextChange(workInProgress, context, changedBits, renderLanes) {n var fiber = workInProgress.child;nn if (fiber !== null) {n // Set the return pointer of the child to the work-in-progress fiber.n fiber.return = workInProgress;n }nn while (fiber !== null) {n var nextFiber = void 0; // Visit this fiber.nn var list = fiber.dependencies;nn if (list !== null) {n nextFiber = fiber.child;n var dependency = list.firstContext;nn while (dependency !== null) {n // Check if the context matches.n if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {n // Match! Schedule an update on this fiber.n if (fiber.tag === ClassComponent) {n // Schedule a force update on the work-in-progress.n var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));n update.tag = ForceUpdate; // TODO: Because we don’t have a work-in-progress, this will add then // update to the current fiber, too, which means it will persist even ifn // this render is thrown away. Since it’s a race condition, not sure it’sn // worth fixing.nn enqueueUpdate(fiber, update);n }nn fiber.lanes = mergeLanes(fiber.lanes, renderLanes);n var alternate = fiber.alternate;nn if (alternate !== null) {n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);n }nn scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.nn list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing then // dependency list.nn break;n }nn dependency = dependency.next;n }n } else if (fiber.tag === ContextProvider) {n // Don’t scan deeper if this is a matching providern nextFiber = fiber.type === workInProgress.type ? null : fiber.child;n } else {n // Traverse down.n nextFiber = fiber.child;n }nn if (nextFiber !== null) {n // Set the return pointer of the child to the work-in-progress fiber.n nextFiber.return = fiber;n } else {n // No child. Traverse to next sibling.n nextFiber = fiber;nn while (nextFiber !== null) {n if (nextFiber === workInProgress) {n // We’re back to the root of this subtree. Exit.n nextFiber = null;n break;n }nn var sibling = nextFiber.sibling;nn if (sibling !== null) {n // Set the return pointer of the sibling to the work-in-progress fiber.n sibling.return = nextFiber.return;n nextFiber = sibling;n break;n } // No more siblings. Traverse up.nnn nextFiber = nextFiber.return;n }n }nn fiber = nextFiber;n }n}nfunction prepareToReadContext(workInProgress, renderLanes) {n currentlyRenderingFiber = workInProgress;n lastContextDependency = null;n lastContextWithAllBitsObserved = null;n var dependencies = workInProgress.dependencies;nn if (dependencies !== null) {n var firstContext = dependencies.firstContext;nn if (firstContext !== null) {n if (includesSomeLane(dependencies.lanes, renderLanes)) {n // Context list has a pending update. Mark that this fiber performed work.n markWorkInProgressReceivedUpdate();n } // Reset the work-in-progress listnnn dependencies.firstContext = null;n }n }n}nfunction readContext(context, observedBits) {n {n // This warning would fire if you read context inside a Hook like useMemo.n // Unlike the class check below, it’s not enforced in production for perf.n if (isDisallowedContextReadInDEV) {n error(‚Context can only be read while React is rendering. ‚ + ‚In classes, you can read it in the render method or getDerivedStateFromProps. ‚ + ‚In function components, you can read it directly in the function body, but not ‚ + ‚inside Hooks like useReducer() or useMemo().‘);n }n }nn if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {n var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.nn if (typeof observedBits !== ’number‘ || observedBits === MAX_SIGNED_31_BIT_INT) {n // Observe all updates.n lastContextWithAllBitsObserved = context;n resolvedObservedBits = MAX_SIGNED_31_BIT_INT;n } else {n resolvedObservedBits = observedBits;n }nn var contextItem = {n context: context,n observedBits: resolvedObservedBits,n next: nulln };nn if (lastContextDependency === null) {n if (!(currentlyRenderingFiber !== null)) {n {n throw Error( „Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().“ );n }n } // This is the first dependency for this component. Create a new list.nnn lastContextDependency = contextItem;n currentlyRenderingFiber.dependencies = {n lanes: NoLanes,n firstContext: contextItem,n responders: nulln };n } else {n // Append a new context item.n lastContextDependency = lastContextDependency.next = contextItem;n }n }nn return context._currentValue ;n}nnvar UpdateState = 0;nvar ReplaceState = 1;nvar ForceUpdate = 2;nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.n// It should only be read right after calling `processUpdateQueue`, vian// `checkHasForceUpdateAfterProcessing`.nnvar hasForceUpdate = false;nvar didWarnUpdateInsideUpdate;nvar currentlyProcessingQueue;nn{n didWarnUpdateInsideUpdate = false;n currentlyProcessingQueue = null;n}nnfunction initializeUpdateQueue(fiber) {n var queue = {n baseState: fiber.memoizedState,n firstBaseUpdate: null,n lastBaseUpdate: null,n shared: {n pending: nulln },n effects: nulln };n fiber.updateQueue = queue;n}nfunction cloneUpdateQueue(current, workInProgress) {n // Clone the update queue from current. Unless it’s already a clone.n var queue = workInProgress.updateQueue;n var currentQueue = current.updateQueue;nn if (queue === currentQueue) {n var clone = {n baseState: currentQueue.baseState,n firstBaseUpdate: currentQueue.firstBaseUpdate,n lastBaseUpdate: currentQueue.lastBaseUpdate,n shared: currentQueue.shared,n effects: currentQueue.effectsn };n workInProgress.updateQueue = clone;n }n}nfunction createUpdate(eventTime, lane) {n var update = {n eventTime: eventTime,n lane: lane,n tag: UpdateState,n payload: null,n callback: null,n next: nulln };n return update;n}nfunction enqueueUpdate(fiber, update) {n var updateQueue = fiber.updateQueue;nn if (updateQueue === null) {n // Only occurs if the fiber has been unmounted.n return;n }nn var sharedQueue = updateQueue.shared;n var pending = sharedQueue.pending;nn if (pending === null) {n // This is the first update. Create a circular list.n update.next = update;n } else {n update.next = pending.next;n pending.next = update;n }nn sharedQueue.pending = update;nn {n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {n error(‚An update (setState, replaceState, or forceUpdate) was scheduled ‚ + ‚from inside an update function. Update functions should be pure, ‚ + ‚with zero side-effects. Consider using componentDidUpdate or a ‚ + ‚callback.‘);nn didWarnUpdateInsideUpdate = true;n }n }n}nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {n // Captured updates are updates that are thrown by a child during the rendern // phase. They should be discarded if the render is aborted. Therefore,n // we should only put them on the work-in-progress queue, not the current one.n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.nn var current = workInProgress.alternate;nn if (current !== null) {n var currentQueue = current.updateQueue;nn if (queue === currentQueue) {n // The work-in-progress queue is the same as current. This happens whenn // we bail out on a parent fiber that then captures an error thrown byn // a child. Since we want to append the update only to the work-inn // -progress queue, we need to clone the updates. We usually clone duringn // processUpdateQueue, but that didn’t happen in this case because wen // skipped over the parent when we bailed out.n var newFirst = null;n var newLast = null;n var firstBaseUpdate = queue.firstBaseUpdate;nn if (firstBaseUpdate !== null) {n // Loop through the updates and clone them.n var update = firstBaseUpdate;nn do {n var clone = {n eventTime: update.eventTime,n lane: update.lane,n tag: update.tag,n payload: update.payload,n callback: update.callback,n next: nulln };nn if (newLast === null) {n newFirst = newLast = clone;n } else {n newLast.next = clone;n newLast = clone;n }nn update = update.next;n } while (update !== null); // Append the captured update the end of the cloned list.nnn if (newLast === null) {n newFirst = newLast = capturedUpdate;n } else {n newLast.next = capturedUpdate;n newLast = capturedUpdate;n }n } else {n // There are no base updates.n newFirst = newLast = capturedUpdate;n }nn queue = {n baseState: currentQueue.baseState,n firstBaseUpdate: newFirst,n lastBaseUpdate: newLast,n shared: currentQueue.shared,n effects: currentQueue.effectsn };n workInProgress.updateQueue = queue;n return;n }n } // Append the update to the end of the list.nnn var lastBaseUpdate = queue.lastBaseUpdate;nn if (lastBaseUpdate === null) {n queue.firstBaseUpdate = capturedUpdate;n } else {n lastBaseUpdate.next = capturedUpdate;n }nn queue.lastBaseUpdate = capturedUpdate;n}nnfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {n switch (update.tag) {n case ReplaceState:n {n var payload = update.payload;nn if (typeof payload === ‚function‘) {n // Updater functionn {n enterDisallowedContextReadInDEV();n }nn var nextState = payload.call(instance, prevState, nextProps);nn {n if ( workInProgress.mode & StrictMode) {n disableLogs();nn try {n payload.call(instance, prevState, nextProps);n } finally {n reenableLogs();n }n }nn exitDisallowedContextReadInDEV();n }nn return nextState;n } // State objectnnn return payload;n }nn case CaptureUpdate:n {n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;n }n // Intentional fallthroughnn case UpdateState:n {n var _payload = update.payload;n var partialState;nn if (typeof _payload === ‚function‘) {n // Updater functionn {n enterDisallowedContextReadInDEV();n }nn partialState = _payload.call(instance, prevState, nextProps);nn {n if ( workInProgress.mode & StrictMode) {n disableLogs();nn try {n _payload.call(instance, prevState, nextProps);n } finally {n reenableLogs();n }n }nn exitDisallowedContextReadInDEV();n }n } else {n // Partial state objectn partialState = _payload;n }nn if (partialState === null || partialState === undefined) {n // Null and undefined are treated as no-ops.n return prevState;n } // Merge the partial state and the previous state.nnn return _assign({}, prevState, partialState);n }nn case ForceUpdate:n {n hasForceUpdate = true;n return prevState;n }n }nn return prevState;n}nnfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {n // This is always non-null on a ClassComponent or HostRootn var queue = workInProgress.updateQueue;n hasForceUpdate = false;nn {n currentlyProcessingQueue = queue.shared;n }nn var firstBaseUpdate = queue.firstBaseUpdate;n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.nn var pendingQueue = queue.shared.pending;nn if (pendingQueue !== null) {n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between firstn // and last so that it’s non-circular.nn var lastPendingUpdate = pendingQueue;n var firstPendingUpdate = lastPendingUpdate.next;n lastPendingUpdate.next = null; // Append pending updates to base queuenn if (lastBaseUpdate === null) {n firstBaseUpdate = firstPendingUpdate;n } else {n lastBaseUpdate.next = firstPendingUpdate;n }nn lastBaseUpdate = lastPendingUpdate; // If there’s a current queue, and it’s different from the base queue, thenn // we need to transfer the updates to that queue, too. Because the basen // queue is a singly-linked list with no cycles, we can append to bothn // lists and take advantage of structural sharing.n // TODO: Pass `current` as argumentnn var current = workInProgress.alternate;nn if (current !== null) {n // This is always non-null on a ClassComponent or HostRootn var currentQueue = current.updateQueue;n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;nn if (currentLastBaseUpdate !== lastBaseUpdate) {n if (currentLastBaseUpdate === null) {n currentQueue.firstBaseUpdate = firstPendingUpdate;n } else {n currentLastBaseUpdate.next = firstPendingUpdate;n }nn currentQueue.lastBaseUpdate = lastPendingUpdate;n }n }n } // These values may change as we process the queue.nnn if (firstBaseUpdate !== null) {n // Iterate through the list of updates to compute the result.n var newState = queue.baseState; // TODO: Don’t need to accumulate this. Instead, we can remove renderLanesn // from the original lanes.nn var newLanes = NoLanes;n var newBaseState = null;n var newFirstBaseUpdate = null;n var newLastBaseUpdate = null;n var update = firstBaseUpdate;nn do {n var updateLane = update.lane;n var updateEventTime = update.eventTime;nn if (!isSubsetOfLanes(renderLanes, updateLane)) {n // Priority is insufficient. Skip this update. If this is the firstn // skipped update, the previous update/state is the new basen // update/state.n var clone = {n eventTime: updateEventTime,n lane: updateLane,n tag: update.tag,n payload: update.payload,n callback: update.callback,n next: nulln };nn if (newLastBaseUpdate === null) {n newFirstBaseUpdate = newLastBaseUpdate = clone;n newBaseState = newState;n } else {n newLastBaseUpdate = newLastBaseUpdate.next = clone;n } // Update the remaining priority in the queue.nnn newLanes = mergeLanes(newLanes, updateLane);n } else {n // This update does have sufficient priority.n if (newLastBaseUpdate !== null) {n var _clone = {n eventTime: updateEventTime,n // This update is going to be committed so we never want uncommitn // it. Using NoLane works because 0 is a subset of all bitmasks, son // this will never be skipped by the check above.n lane: NoLane,n tag: update.tag,n payload: update.payload,n callback: update.callback,n next: nulln };n newLastBaseUpdate = newLastBaseUpdate.next = _clone;n } // Process this update.nnn newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);n var callback = update.callback;nn if (callback !== null) {n workInProgress.flags |= Callback;n var effects = queue.effects;nn if (effects === null) {n queue.effects = [update];n } else {n effects.push(update);n }n }n }nn update = update.next;nn if (update === null) {n pendingQueue = queue.shared.pending;nn if (pendingQueue === null) {n break;n } else {n // An update was scheduled from inside a reducer. Add the newn // pending updates to the end of the list and keep processing.n var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but wen // unravel them when transferring them to the base queue.nn var _firstPendingUpdate = _lastPendingUpdate.next;n _lastPendingUpdate.next = null;n update = _firstPendingUpdate;n queue.lastBaseUpdate = _lastPendingUpdate;n queue.shared.pending = null;n }n }n } while (true);nn if (newLastBaseUpdate === null) {n newBaseState = newState;n }nn queue.baseState = newBaseState;n queue.firstBaseUpdate = newFirstBaseUpdate;n queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.n // This should be fine because the only two other things that contribute ton // expiration time are props and context. We’re already in the middle of then // begin phase by the time we start processing the queue, so we’ve alreadyn // dealt with the props. Context in components that specifyn // shouldComponentUpdate is tricky; but we’ll have to account forn // that regardless.nn markSkippedUpdateLanes(newLanes);n workInProgress.lanes = newLanes;n workInProgress.memoizedState = newState;n }nn {n currentlyProcessingQueue = null;n }n}nnfunction callCallback(callback, context) {n if (!(typeof callback === ‚function‘)) {n {n throw Error( „Invalid argument passed as callback. Expected a function. Instead received: “ + callback );n }n }nn callback.call(context);n}nnfunction resetHasForceUpdateBeforeProcessing() {n hasForceUpdate = false;n}nfunction checkHasForceUpdateAfterProcessing() {n return hasForceUpdate;n}nfunction commitUpdateQueue(finishedWork, finishedQueue, instance) {n // Commit the effectsn var effects = finishedQueue.effects;n finishedQueue.effects = null;nn if (effects !== null) {n for (var i = 0; i nn if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {n didWarnAboutInvalidateContextType.add(ctor);n var addendum = “;nn if (contextType === undefined) {n addendum = ‚ However, it is set to undefined. ‚ + ‚This can be caused by a typo or by mixing up named and default imports. ‚ + ‚This can also happen due to a circular dependency, so ‚ + ‚try moving the createContext() call to a separate file.‘;n } else if (typeof contextType !== ‚object‘) {n addendum = ‚ However, it is set to a ‚ + typeof contextType + ‚.‘;n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {n addendum = ‚ Did you accidentally pass the Context.Provider instead?‘;n } else if (contextType._context !== undefined) {n // n addendum = ‚ Did you accidentally pass the Context.Consumer instead?‘;n } else {n addendum = ‚ However, it is set to an object with keys {‚ + Object.keys(contextType).join(‚, ‚) + ‚}.‘;n }nn error(‚%s defines an invalid contextType. ‚ + ‚contextType should point to the Context object returned by React.createContext().%s‘, getComponentName(ctor) || ‚Component‘, addendum);n }n }n }nn if (typeof contextType === ‚object‘ && contextType !== null) {n context = readContext(contextType);n } else {n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);n var contextTypes = ctor.contextTypes;n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;n } // Instantiate twice to help detect side-effects.nnn {n if ( workInProgress.mode & StrictMode) {n disableLogs();nn try {n new ctor(props, context); // eslint-disable-line no-newn } finally {n reenableLogs();n }n }n }nn var instance = new ctor(props, context);n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;n adoptClassInstance(workInProgress, instance);nn {n if (typeof ctor.getDerivedStateFromProps === ‚function‘ && state === null) {n var componentName = getComponentName(ctor) || ‚Component‘;nn if (!didWarnAboutUninitializedState.has(componentName)) {n didWarnAboutUninitializedState.add(componentName);nn error(‚`%s` uses `getDerivedStateFromProps` but its initial state is ‚ + ‚%s. This is not recommended. Instead, define the initial state by ‚ + ‚assigning an object to `this.state` in the constructor of `%s`. ‚ + ‚This ensures that `getDerivedStateFromProps` arguments have a consistent shape.‘, componentName, instance.state === null ? ’null‘ : ‚undefined‘, componentName);n }n } // If new component APIs are defined, „unsafe“ lifecycles won’t be called.n // Warn about these lifecycles if they are present.n // Don’t warn about react-lifecycles-compat polyfilled methods though.nnn if (typeof ctor.getDerivedStateFromProps === ‚function‘ || typeof instance.getSnapshotBeforeUpdate === ‚function‘) {n var foundWillMountName = null;n var foundWillReceivePropsName = null;n var foundWillUpdateName = null;nn if (typeof instance.componentWillMount === ‚function‘ && instance.componentWillMount.__suppressDeprecationWarning !== true) {n foundWillMountName = ‚componentWillMount‘;n } else if (typeof instance.UNSAFE_componentWillMount === ‚function‘) {n foundWillMountName = ‚UNSAFE_componentWillMount‘;n }nn if (typeof instance.componentWillReceiveProps === ‚function‘ && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {n foundWillReceivePropsName = ‚componentWillReceiveProps‘;n } else if (typeof instance.UNSAFE_componentWillReceiveProps === ‚function‘) {n foundWillReceivePropsName = ‚UNSAFE_componentWillReceiveProps‘;n }nn if (typeof instance.componentWillUpdate === ‚function‘ && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {n foundWillUpdateName = ‚componentWillUpdate‘;n } else if (typeof instance.UNSAFE_componentWillUpdate === ‚function‘) {n foundWillUpdateName = ‚UNSAFE_componentWillUpdate‘;n }nn if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {n var _componentName = getComponentName(ctor) || ‚Component‘;nn var newApiName = typeof ctor.getDerivedStateFromProps === ‚function‘ ? ‚getDerivedStateFromProps()‘ : ‚getSnapshotBeforeUpdate()‘;nn if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);nn error(‚Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n‘ + ‚%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n‘ + ‚The above lifecycles should be removed. Learn more about this warning here:\n‘ + ‚https://reactjs.org/link/unsafe-component-lifecycles‘, _componentName, newApiName, foundWillMountName !== null ? „\n “ + foundWillMountName : “, foundWillReceivePropsName !== null ? „\n “ + foundWillReceivePropsName : “, foundWillUpdateName !== null ? „\n “ + foundWillUpdateName : “);n }n }n }n } // Cache unmasked context so we can avoid recreating masked context unless necessary.n // ReactFiberContext usually updates this cache but can’t for newly-created instances.nnn if (isLegacyContextConsumer) {n cacheContext(workInProgress, unmaskedContext, context);n }nn return instance;n}nnfunction callComponentWillMount(workInProgress, instance) {n var oldState = instance.state;nn if (typeof instance.componentWillMount === ‚function‘) {n instance.componentWillMount();n }nn if (typeof instance.UNSAFE_componentWillMount === ‚function‘) {n instance.UNSAFE_componentWillMount();n }nn if (oldState !== instance.state) {n {n error(‚%s.componentWillMount(): Assigning directly to this.state is ‚ + „deprecated (except inside a component’s “ + ‚constructor). Use setState instead.‘, getComponentName(workInProgress.type) || ‚Component‘);n }nn classComponentUpdater.enqueueReplaceState(instance, instance.state, null);n }n}nnfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {n var oldState = instance.state;nn if (typeof instance.componentWillReceiveProps === ‚function‘) {n instance.componentWillReceiveProps(newProps, nextContext);n }nn if (typeof instance.UNSAFE_componentWillReceiveProps === ‚function‘) {n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);n }nn if (instance.state !== oldState) {n {n var componentName = getComponentName(workInProgress.type) || ‚Component‘;nn if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {n didWarnAboutStateAssignmentForComponent.add(componentName);nn error(‚%s.componentWillReceiveProps(): Assigning directly to ‚ + „this.state is deprecated (except inside a component’s “ + ‚constructor). Use setState instead.‘, componentName);n }n }nn classComponentUpdater.enqueueReplaceState(instance, instance.state, null);n }n} // Invokes the mount life-cycles on a previously never rendered instance.nnnfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {n {n checkClassInstance(workInProgress, ctor, newProps);n }nn var instance = workInProgress.stateNode;n instance.props = newProps;n instance.state = workInProgress.memoizedState;n instance.refs = emptyRefsObject;n initializeUpdateQueue(workInProgress);n var contextType = ctor.contextType;nn if (typeof contextType === ‚object‘ && contextType !== null) {n instance.context = readContext(contextType);n } else {n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);n instance.context = getMaskedContext(workInProgress, unmaskedContext);n }nn {n if (instance.state === newProps) {n var componentName = getComponentName(ctor) || ‚Component‘;nn if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {n didWarnAboutDirectlyAssigningPropsToState.add(componentName);nn error(‚%s: It is not recommended to assign props directly to state ‚ + „because updates to props won’t be reflected in state. “ + ‚In most cases, it is better to use props directly.‘, componentName);n }n }nn if (workInProgress.mode & StrictMode) {n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);n }nn {n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);n }n }nn processUpdateQueue(workInProgress, newProps, instance, renderLanes);n instance.state = workInProgress.memoizedState;n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;nn if (typeof getDerivedStateFromProps === ‚function‘) {n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);n instance.state = workInProgress.memoizedState;n } // In order to support react-lifecycles-compat polyfilled components,n // Unsafe lifecycles should not be invoked for components using the new APIs.nnn if (typeof ctor.getDerivedStateFromProps !== ‚function‘ && typeof instance.getSnapshotBeforeUpdate !== ‚function‘ && (typeof instance.UNSAFE_componentWillMount === ‚function‘ || typeof instance.componentWillMount === ‚function‘)) {n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let’sn // process them now.nn processUpdateQueue(workInProgress, newProps, instance, renderLanes);n instance.state = workInProgress.memoizedState;n }nn if (typeof instance.componentDidMount === ‚function‘) {n workInProgress.flags |= Update;n }n}nnfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {n var instance = workInProgress.stateNode;n var oldProps = workInProgress.memoizedProps;n instance.props = oldProps;n var oldContext = instance.context;n var contextType = ctor.contextType;n var nextContext = emptyContextObject;nn if (typeof contextType === ‚object‘ && contextType !== null) {n nextContext = readContext(contextType);n } else {n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);n }nn var getDerivedStateFromProps = ctor.getDerivedStateFromProps;n var hasNewLifecycles = typeof getDerivedStateFromProps === ‚function‘ || typeof instance.getSnapshotBeforeUpdate === ‚function‘; // Note: During these life-cycles, instance.props/instance.state are whatn // ever the previously attempted to render – not the „current“. However,n // during componentDidUpdate we pass the „current“ props.n // In order to support react-lifecycles-compat polyfilled components,n // Unsafe lifecycles should not be invoked for components using the new APIs.nn if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === ‚function‘ || typeof instance.componentWillReceiveProps === ‚function‘)) {n if (oldProps !== newProps || oldContext !== nextContext) {n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);n }n }nn resetHasForceUpdateBeforeProcessing();n var oldState = workInProgress.memoizedState;n var newState = instance.state = oldState;n processUpdateQueue(workInProgress, newProps, instance, renderLanes);n newState = workInProgress.memoizedState;nn if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {n // If an update was already in progress, we should schedule an Updaten // effect even though we’re bailing out, so that cWU/cDU are called.n if (typeof instance.componentDidMount === ‚function‘) {n workInProgress.flags |= Update;n }nn return false;n }nn if (typeof getDerivedStateFromProps === ‚function‘) {n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);n newState = workInProgress.memoizedState;n }nn var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);nn if (shouldUpdate) {n // In order to support react-lifecycles-compat polyfilled components,n // Unsafe lifecycles should not be invoked for components using the new APIs.n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === ‚function‘ || typeof instance.componentWillMount === ‚function‘)) {n if (typeof instance.componentWillMount === ‚function‘) {n instance.componentWillMount();n }nn if (typeof instance.UNSAFE_componentWillMount === ‚function‘) {n instance.UNSAFE_componentWillMount();n }n }nn if (typeof instance.componentDidMount === ‚function‘) {n workInProgress.flags |= Update;n }n } else {n // If an update was already in progress, we should schedule an Updaten // effect even though we’re bailing out, so that cWU/cDU are called.n if (typeof instance.componentDidMount === ‚function‘) {n workInProgress.flags |= Update;n } // If shouldComponentUpdate returned false, we should still update then // memoized state to indicate that this work can be reused.nnn workInProgress.memoizedProps = newProps;n workInProgress.memoizedState = newState;n } // Update the existing instance’s state, props, and context pointers evenn // if shouldComponentUpdate returns false.nnn instance.props = newProps;n instance.state = newState;n instance.context = nextContext;n return shouldUpdate;n} // Invokes the update life-cycles and returns false if it shouldn’t rerender.nnnfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {n var instance = workInProgress.stateNode;n cloneUpdateQueue(current, workInProgress);n var unresolvedOldProps = workInProgress.memoizedProps;n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);n instance.props = oldProps;n var unresolvedNewProps = workInProgress.pendingProps;n var oldContext = instance.context;n var contextType = ctor.contextType;n var nextContext = emptyContextObject;nn if (typeof contextType === ‚object‘ && contextType !== null) {n nextContext = readContext(contextType);n } else {n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);n }nn var getDerivedStateFromProps = ctor.getDerivedStateFromProps;n var hasNewLifecycles = typeof getDerivedStateFromProps === ‚function‘ || typeof instance.getSnapshotBeforeUpdate === ‚function‘; // Note: During these life-cycles, instance.props/instance.state are whatn // ever the previously attempted to render – not the „current“. However,n // during componentDidUpdate we pass the „current“ props.n // In order to support react-lifecycles-compat polyfilled components,n // Unsafe lifecycles should not be invoked for components using the new APIs.nn if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === ‚function‘ || typeof instance.componentWillReceiveProps === ‚function‘)) {n if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);n }n }nn resetHasForceUpdateBeforeProcessing();n var oldState = workInProgress.memoizedState;n var newState = instance.state = oldState;n processUpdateQueue(workInProgress, newProps, instance, renderLanes);n newState = workInProgress.memoizedState;nn if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {n // If an update was already in progress, we should schedule an Updaten // effect even though we’re bailing out, so that cWU/cDU are called.n if (typeof instance.componentDidUpdate === ‚function‘) {n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {n workInProgress.flags |= Update;n }n }nn if (typeof instance.getSnapshotBeforeUpdate === ‚function‘) {n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {n workInProgress.flags |= Snapshot;n }n }nn return false;n }nn if (typeof getDerivedStateFromProps === ‚function‘) {n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);n newState = workInProgress.memoizedState;n }nn var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);nn if (shouldUpdate) {n // In order to support react-lifecycles-compat polyfilled components,n // Unsafe lifecycles should not be invoked for components using the new APIs.n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === ‚function‘ || typeof instance.componentWillUpdate === ‚function‘)) {n if (typeof instance.componentWillUpdate === ‚function‘) {n instance.componentWillUpdate(newProps, newState, nextContext);n }nn if (typeof instance.UNSAFE_componentWillUpdate === ‚function‘) {n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);n }n }nn if (typeof instance.componentDidUpdate === ‚function‘) {n workInProgress.flags |= Update;n }nn if (typeof instance.getSnapshotBeforeUpdate === ‚function‘) {n workInProgress.flags |= Snapshot;n }n } else {n // If an update was already in progress, we should schedule an Updaten // effect even though we’re bailing out, so that cWU/cDU are called.n if (typeof instance.componentDidUpdate === ‚function‘) {n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {n workInProgress.flags |= Update;n }n }nn if (typeof instance.getSnapshotBeforeUpdate === ‚function‘) {n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {n workInProgress.flags |= Snapshot;n }n } // If shouldComponentUpdate returned false, we should still update then // memoized props/state to indicate that this work can be reused.nnn workInProgress.memoizedProps = newProps;n workInProgress.memoizedState = newState;n } // Update the existing instance’s state, props, and context pointers evenn // if shouldComponentUpdate returns false.nnn instance.props = newProps;n instance.state = newState;n instance.context = nextContext;n return shouldUpdate;n}nnvar didWarnAboutMaps;nvar didWarnAboutGenerators;nvar didWarnAboutStringRefs;nvar ownerHasKeyUseWarning;nvar ownerHasFunctionTypeWarning;nnvar warnForMissingKey = function (child, returnFiber) {};nn{n didWarnAboutMaps = false;n didWarnAboutGenerators = false;n didWarnAboutStringRefs = {};n /**n * Warn if there’s no key explicitly set on dynamic arrays of children orn * object keys are not valid. This allows us to keep track of children betweenn * updates.n */nn ownerHasKeyUseWarning = {};n ownerHasFunctionTypeWarning = {};nn warnForMissingKey = function (child, returnFiber) {n if (child === null || typeof child !== ‚object‘) {n return;n }nn if (!child._store || child._store.validated || child.key != null) {n return;n }nn if (!(typeof child._store === ‚object‘)) {n {n throw Error( „React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn child._store.validated = true;n var componentName = getComponentName(returnFiber.type) || ‚Component‘;nn if (ownerHasKeyUseWarning[componentName]) {n return;n }nn ownerHasKeyUseWarning[componentName] = true;nn error(‚Each child in a list should have a unique ‚ + ‚“key“ prop. See https://reactjs.org/link/warning-keys for ‚ + ‚more information.‘);n };n}nnvar isArray$1 = Array.isArray;nnfunction coerceRef(returnFiber, current, element) {n var mixedRef = element.ref;nn if (mixedRef !== null && typeof mixedRef !== ‚function‘ && typeof mixedRef !== ‚object‘) {n {n // TODO: Clean this up once we turn on the string ref warning forn // everyone, because the strict mode case will no longer be relevantn if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refsn // because these cannot be automatically converted to an arrow functionn // using a codemod. Therefore, we don’t have to warn about string refs again.n !(element._owner && element._self && element._owner.stateNode !== element._self)) {n var componentName = getComponentName(returnFiber.type) || ‚Component‘;nn if (!didWarnAboutStringRefs[componentName]) {n {n error(‚A string ref, „%s“, has been found within a strict mode tree. ‚ + ‚String refs are a source of potential bugs and should be avoided. ‚ + ‚We recommend using useRef() or createRef() instead. ‚ + ‚Learn more about using refs safely here: ‚ + ‚https://reactjs.org/link/strict-mode-string-ref‘, mixedRef);n }nn didWarnAboutStringRefs[componentName] = true;n }n }n }nn if (element._owner) {n var owner = element._owner;n var inst;nn if (owner) {n var ownerFiber = owner;nn if (!(ownerFiber.tag === ClassComponent)) {n {n throw Error( „Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref“ );n }n }nn inst = ownerFiber.stateNode;n }nn if (!inst) {n {n throw Error( „Missing owner for string ref “ + mixedRef + „. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn var stringRef = “ + mixedRef; // Check if previous string ref matches new string refnn if (current !== null && current.ref !== null && typeof current.ref === ‚function‘ && current.ref._stringRef === stringRef) {n return current.ref;n }nn var ref = function (value) {n var refs = inst.refs;nn if (refs === emptyRefsObject) {n // This is a lazy pooled frozen object, so we need to initialize.n refs = inst.refs = {};n }nn if (value === null) {n delete refs[stringRef];n } else {n refs[stringRef] = value;n }n };nn ref._stringRef = stringRef;n return ref;n } else {n if (!(typeof mixedRef === ’string‘)) {n {n throw Error( „Expected ref to be a function, a string, an object returned by React.createRef(), or null.“ );n }n }nn if (!element._owner) {n {n throw Error( „Element ref was specified as a string (“ + mixedRef + „) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component’s render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.“ );n }n }n }n }nn return mixedRef;n}nnfunction throwOnInvalidObjectType(returnFiber, newChild) {n if (returnFiber.type !== ‚textarea‘) {n {n {n throw Error( „Objects are not valid as a React child (found: “ + (Object.prototype.toString.call(newChild) === ‚[object Object]‘ ? ‚object with keys {‚ + Object.keys(newChild).join(‚, ‚) + ‚}‘ : newChild) + „). If you meant to render a collection of children, use an array instead.“ );n }n }n }n}nnfunction warnOnFunctionType(returnFiber) {n {n var componentName = getComponentName(returnFiber.type) || ‚Component‘;nn if (ownerHasFunctionTypeWarning[componentName]) {n return;n }nn ownerHasFunctionTypeWarning[componentName] = true;nn error(‚Functions are not valid as a React child. This may happen if ‚ + ‚you return a Component instead of from render. ‚ + ‚Or maybe you meant to call this function rather than return it.‘);n }n} // We avoid inlining this to avoid potential deopts from using try/catch.n// to be able to optimize each path individually by branching early. This needsn// a compiler or we can do it manually. Helpers that don’t need this branchingn// live outside of this function.nnnfunction ChildReconciler(shouldTrackSideEffects) {n function deleteChild(returnFiber, childToDelete) {n if (!shouldTrackSideEffects) {n // Noop.n return;n } // Deletions are added in reversed order so we add it to the front.n // At this point, the return fiber’s effect list is empty except forn // deletions, so we can just append the deletion to the list. The remainingn // effects aren’t added until the complete phase. Once we implementn // resuming, this may not be true.nnn var last = returnFiber.lastEffect;nn if (last !== null) {n last.nextEffect = childToDelete;n returnFiber.lastEffect = childToDelete;n } else {n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;n }nn childToDelete.nextEffect = null;n childToDelete.flags = Deletion;n }nn function deleteRemainingChildren(returnFiber, currentFirstChild) {n if (!shouldTrackSideEffects) {n // Noop.n return null;n } // TODO: For the shouldClone case, this could be micro-optimized a bit byn // assuming that after the first child we’ve already added everything.nnn var childToDelete = currentFirstChild;nn while (childToDelete !== null) {n deleteChild(returnFiber, childToDelete);n childToDelete = childToDelete.sibling;n }nn return null;n }nn function mapRemainingChildren(returnFiber, currentFirstChild) {n // Add the remaining children to a temporary map so that we can find them byn // keys quickly. Implicit (null) keys get added to this set with their indexn // instead.n var existingChildren = new Map();n var existingChild = currentFirstChild;nn while (existingChild !== null) {n if (existingChild.key !== null) {n existingChildren.set(existingChild.key, existingChild);n } else {n existingChildren.set(existingChild.index, existingChild);n }nn existingChild = existingChild.sibling;n }nn return existingChildren;n }nn function useFiber(fiber, pendingProps) {n // We currently set sibling to null and index to 0 here because it is easyn // to forget to do before returning it. E.g. for the single child case.n var clone = createWorkInProgress(fiber, pendingProps);n clone.index = 0;n clone.sibling = null;n return clone;n }nn function placeChild(newFiber, lastPlacedIndex, newIndex) {n newFiber.index = newIndex;nn if (!shouldTrackSideEffects) {n // Noop.n return lastPlacedIndex;n }nn var current = newFiber.alternate;nn if (current !== null) {n var oldIndex = current.index;nn if (oldIndex newIdx) {n nextOldFiber = oldFiber;n oldFiber = null;n } else {n nextOldFiber = oldFiber.sibling;n }nn var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);nn if (newFiber === null) {n // TODO: This breaks on empty slots like null children. That’sn // unfortunate because it triggers the slow path all the time. We needn // a better way to communicate whether this was a miss or null,n // boolean, undefined, etc.n if (oldFiber === null) {n oldFiber = nextOldFiber;n }nn break;n }nn if (shouldTrackSideEffects) {n if (oldFiber && newFiber.alternate === null) {n // We matched the slot, but we didn’t reuse the existing fiber, so wen // need to delete the existing child.n deleteChild(returnFiber, oldFiber);n }n }nn lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);nn if (previousNewFiber === null) {n // TODO: Move out of the loop. This only happens for the first run.n resultingFirstChild = newFiber;n } else {n // TODO: Defer siblings if we’re not at the right index for this slot.n // I.e. if we had null values before, then we want to defer thisn // for each null value. However, we also don’t want to call updateSlotn // with the previous one.n previousNewFiber.sibling = newFiber;n }nn previousNewFiber = newFiber;n oldFiber = nextOldFiber;n }nn if (newIdx === newChildren.length) {n // We’ve reached the end of the new children. We can delete the rest.n deleteRemainingChildren(returnFiber, oldFiber);n return resultingFirstChild;n }nn if (oldFiber === null) {n // If we don’t have any more existing children we can choose a fast pathn // since the rest will all be insertions.n for (; newIdx newIdx) {n nextOldFiber = oldFiber;n oldFiber = null;n } else {n nextOldFiber = oldFiber.sibling;n }nn var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);nn if (newFiber === null) {n // TODO: This breaks on empty slots like null children. That’sn // unfortunate because it triggers the slow path all the time. We needn // a better way to communicate whether this was a miss or null,n // boolean, undefined, etc.n if (oldFiber === null) {n oldFiber = nextOldFiber;n }nn break;n }nn if (shouldTrackSideEffects) {n if (oldFiber && newFiber.alternate === null) {n // We matched the slot, but we didn’t reuse the existing fiber, so wen // need to delete the existing child.n deleteChild(returnFiber, oldFiber);n }n }nn lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);nn if (previousNewFiber === null) {n // TODO: Move out of the loop. This only happens for the first run.n resultingFirstChild = newFiber;n } else {n // TODO: Defer siblings if we’re not at the right index for this slot.n // I.e. if we had null values before, then we want to defer thisn // for each null value. However, we also don’t want to call updateSlotn // with the previous one.n previousNewFiber.sibling = newFiber;n }nn previousNewFiber = newFiber;n oldFiber = nextOldFiber;n }nn if (step.done) {n // We’ve reached the end of the new children. We can delete the rest.n deleteRemainingChildren(returnFiber, oldFiber);n return resultingFirstChild;n }nn if (oldFiber === null) {n // If we don’t have any more existing children we can choose a fast pathn // since the rest will all be insertions.n for (; !step.done; newIdx++, step = newChildren.next()) {n var _newFiber3 = createChild(returnFiber, step.value, lanes);nn if (_newFiber3 === null) {n continue;n }nn lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);nn if (previousNewFiber === null) {n // TODO: Move out of the loop. This only happens for the first run.n resultingFirstChild = _newFiber3;n } else {n previousNewFiber.sibling = _newFiber3;n }nn previousNewFiber = _newFiber3;n }nn return resultingFirstChild;n } // Add all children to a key map for quick lookups.nnn var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.nn for (; !step.done; newIdx++, step = newChildren.next()) {n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);nn if (_newFiber4 !== null) {n if (shouldTrackSideEffects) {n if (_newFiber4.alternate !== null) {n // The new fiber is a work in progress, but if there exists an // current, that means that we reused the fiber. We need to deleten // it from the child list so that we don’t add it to the deletionn // list.n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);n }n }nn lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);nn if (previousNewFiber === null) {n resultingFirstChild = _newFiber4;n } else {n previousNewFiber.sibling = _newFiber4;n }nn previousNewFiber = _newFiber4;n }n }nn if (shouldTrackSideEffects) {n // Any existing children that weren’t consumed above were deleted. We needn // to add them to the deletion list.n existingChildren.forEach(function (child) {n return deleteChild(returnFiber, child);n });n }nn return resultingFirstChild;n }nn function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {n // There’s no need to check for keys on text nodes since we don’t have an // way to define them.n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {n // We already have an existing node so let’s just update it and deleten // the rest.n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);n var existing = useFiber(currentFirstChild, textContent);n existing.return = returnFiber;n return existing;n } // The existing first child is not a text node so we need to create onen // and delete the existing ones.nnn deleteRemainingChildren(returnFiber, currentFirstChild);n var created = createFiberFromText(textContent, returnFiber.mode, lanes);n created.return = returnFiber;n return created;n }nn function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {n var key = element.key;n var child = currentFirstChild;nn while (child !== null) {n // TODO: If key === null and child.key === null, then this only applies ton // the first item in the list.n if (child.key === key) {n switch (child.tag) {n case Fragment:n {n if (element.type === REACT_FRAGMENT_TYPE) {n deleteRemainingChildren(returnFiber, child.sibling);n var existing = useFiber(child, element.props.children);n existing.return = returnFiber;nn {n existing._debugSource = element._source;n existing._debugOwner = element._owner;n }nn return existing;n }nn break;n }nn case Block:nn // We intentionally fallthrough here if enableBlocksAPI is not on.n // eslint-disable-next-lined no-fallthroughnn default:n {n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:n isCompatibleFamilyForHotReloading(child, element) )) {n deleteRemainingChildren(returnFiber, child.sibling);nn var _existing3 = useFiber(child, element.props);nn _existing3.ref = coerceRef(returnFiber, child, element);n _existing3.return = returnFiber;nn {n _existing3._debugSource = element._source;n _existing3._debugOwner = element._owner;n }nn return _existing3;n }nn break;n }n } // Didn’t match.nnn deleteRemainingChildren(returnFiber, child);n break;n } else {n deleteChild(returnFiber, child);n }nn child = child.sibling;n }nn if (element.type === REACT_FRAGMENT_TYPE) {n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);n created.return = returnFiber;n return created;n } else {n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);nn _created4.ref = coerceRef(returnFiber, currentFirstChild, element);n _created4.return = returnFiber;n return _created4;n }n }nn function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {n var key = portal.key;n var child = currentFirstChild;nn while (child !== null) {n // TODO: If key === null and child.key === null, then this only applies ton // the first item in the list.n if (child.key === key) {n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {n deleteRemainingChildren(returnFiber, child.sibling);n var existing = useFiber(child, portal.children || []);n existing.return = returnFiber;n return existing;n } else {n deleteRemainingChildren(returnFiber, child);n break;n }n } else {n deleteChild(returnFiber, child);n }nn child = child.sibling;n }nn var created = createFiberFromPortal(portal, returnFiber.mode, lanes);n created.return = returnFiber;n return created;n } // This API will tag the children with the side-effect of the reconciliationn // itself. They will be added to the side-effect list as we pass through then // children and the parent.nnn function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {n // This function is not recursive.n // If the top level item is an array, we treat it as a set of children,n // not as a fragment. Nested arrays on the other hand will be treated asn // fragment nodes. Recursion happens at the normal flow.n // Handle top level unkeyed fragments as if they were arrays.n // This leads to an ambiguity between {[…]}> and …>.n // We treat the ambiguous cases above the same.n var isUnkeyedTopLevelFragment = typeof newChild === ‚object‘ && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;nn if (isUnkeyedTopLevelFragment) {n newChild = newChild.props.children;n } // Handle object typesnnn var isObject = typeof newChild === ‚object‘ && newChild !== null;nn if (isObject) {n switch (newChild.$$typeof) {n case REACT_ELEMENT_TYPE:n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));nn case REACT_PORTAL_TYPE:n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));nn }n }nn if (typeof newChild === ’string‘ || typeof newChild === ’number‘) {n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, “ + newChild, lanes));n }nn if (isArray$1(newChild)) {n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);n }nn if (getIteratorFn(newChild)) {n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);n }nn if (isObject) {n throwOnInvalidObjectType(returnFiber, newChild);n }nn {n if (typeof newChild === ‚function‘) {n warnOnFunctionType(returnFiber);n }n }nn if (typeof newChild === ‚undefined‘ && !isUnkeyedTopLevelFragment) {n // If the new child is undefined, and the return fiber is a compositen // component, throw an error. If Fiber return types are disabled,n // we already threw above.n switch (returnFiber.tag) {n case ClassComponent:n {n {n var instance = returnFiber.stateNode;nn if (instance.render._isMockFunction) {n // We allow auto-mocks to proceed as if they’re returning null.n break;n }n }n }n // Intentionally fall through to the next case, which handles bothn // functions and classesn // eslint-disable-next-lined no-fallthroughnn case Block:n case FunctionComponent:n case ForwardRef:n case SimpleMemoComponent:n {n {n {n throw Error( (getComponentName(returnFiber.type) || ‚Component‘) + „(…): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.“ );n }n }n }n }n } // Remaining cases are all treated as empty.nnn return deleteRemainingChildren(returnFiber, currentFirstChild);n }nn return reconcileChildFibers;n}nnvar reconcileChildFibers = ChildReconciler(true);nvar mountChildFibers = ChildReconciler(false);nfunction cloneChildFibers(current, workInProgress) {n if (!(current === null || workInProgress.child === current.child)) {n {n throw Error( „Resuming work not yet implemented.“ );n }n }nn if (workInProgress.child === null) {n return;n }nn var currentChild = workInProgress.child;n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);n workInProgress.child = newChild;n newChild.return = workInProgress;nn while (currentChild.sibling !== null) {n currentChild = currentChild.sibling;n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);n newChild.return = workInProgress;n }nn newChild.sibling = null;n} // Reset a workInProgress child set to prepare it for a second pass.nnfunction resetChildFibers(workInProgress, lanes) {n var child = workInProgress.child;nn while (child !== null) {n resetWorkInProgress(child, lanes);n child = child.sibling;n }n}nnvar NO_CONTEXT = {};nvar contextStackCursor$1 = createCursor(NO_CONTEXT);nvar contextFiberStackCursor = createCursor(NO_CONTEXT);nvar rootInstanceStackCursor = createCursor(NO_CONTEXT);nnfunction requiredContext(c) {n if (!(c !== NO_CONTEXT)) {n {n throw Error( „Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn return c;n}nnfunction getRootHostContainer() {n var rootInstance = requiredContext(rootInstanceStackCursor.current);n return rootInstance;n}nnfunction pushHostContainer(fiber, nextRootInstance) {n // Push current root instance onto the stack;n // This allows us to reset root when portals are popped.n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.n // This enables us to pop only Fibers that provide unique contexts.nn push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.n // However, we can’t just call getRootHostContext() and push it becausen // we’d have a different number of entries on the stack depending onn // whether getRootHostContext() throws somewhere in renderer code or not.n // So we push an empty value first. This lets us safely unwind on errors.nn push(contextStackCursor$1, NO_CONTEXT, fiber);n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn’t throw, replace it.nn pop(contextStackCursor$1, fiber);n push(contextStackCursor$1, nextRootContext, fiber);n}nnfunction popHostContainer(fiber) {n pop(contextStackCursor$1, fiber);n pop(contextFiberStackCursor, fiber);n pop(rootInstanceStackCursor, fiber);n}nnfunction getHostContext() {n var context = requiredContext(contextStackCursor$1.current);n return context;n}nnfunction pushHostContext(fiber) {n var rootInstance = requiredContext(rootInstanceStackCursor.current);n var context = requiredContext(contextStackCursor$1.current);n var nextContext = getChildHostContext(context, fiber.type); // Don’t push this Fiber’s context unless it’s unique.nn if (context === nextContext) {n return;n } // Track the context and the Fiber that provided it.n // This enables us to pop only Fibers that provide unique contexts.nnn push(contextFiberStackCursor, fiber, fiber);n push(contextStackCursor$1, nextContext, fiber);n}nnfunction popHostContext(fiber) {n // Do not pop unless this Fiber provided the current context.n // pushHostContext() only pushes Fibers that provide unique contexts.n if (contextFiberStackCursor.current !== fiber) {n return;n }nn pop(contextStackCursor$1, fiber);n pop(contextFiberStackCursor, fiber);n}nnvar DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits isn// inherited deeply down the subtree. The upper bits only affectn// this immediate suspense boundary and gets reset each newn// boundary or suspense list.nnvar SubtreeSuspenseContextMask = 1; // Subtree Flags:n// InvisibleParentSuspenseContext indicates that one of our parent Suspensen// boundaries is not currently showing visible main content.n// Either because it is already showing a fallback or is not mounted at all.n// We can use this to determine if it is desirable to trigger a fallback atn// the parent. If not, then we might need to trigger undesirable boundariesn// and/or suspend the commit to avoid hiding the parent content.nnvar InvisibleParentSuspenseContext = 1; // Shallow Flags:n// ForceSuspenseFallback can be used by SuspenseList to force newly addedn// items into their fallback state during one of the render passes.nnvar ForceSuspenseFallback = 2;nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);nfunction hasSuspenseContext(parentContext, flag) {n return (parentContext & flag) !== 0;n}nfunction setDefaultShallowSuspenseContext(parentContext) {n return parentContext & SubtreeSuspenseContextMask;n}nfunction setShallowSuspenseContext(parentContext, shallowContext) {n return parentContext & SubtreeSuspenseContextMask | shallowContext;n}nfunction addSubtreeSuspenseContext(parentContext, subtreeContext) {n return parentContext | subtreeContext;n}nfunction pushSuspenseContext(fiber, newContext) {n push(suspenseStackCursor, newContext, fiber);n}nfunction popSuspenseContext(fiber) {n pop(suspenseStackCursor, fiber);n}nnfunction shouldCaptureSuspense(workInProgress, hasInvisibleParent) {n // If it was the primary children that just suspended, capture and render then // fallback. Otherwise, don’t capture and bubble to the next boundary.n var nextState = workInProgress.memoizedState;nn if (nextState !== null) {n if (nextState.dehydrated !== null) {n // A dehydrated boundary always captures.n return true;n }nn return false;n }nn var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.nn if (props.fallback === undefined) {n return false;n } // Regular boundaries always capture.nnn if (props.unstable_avoidThisFallback !== true) {n return true;n } // If it’s a boundary we should avoid, then we prefer to bubble up to then // parent boundary if it is currently invisible.nnn if (hasInvisibleParent) {n return false;n } // If the parent is not able to handle it, we must handle it.nnn return true;n}nfunction findFirstSuspended(row) {n var node = row;nn while (node !== null) {n if (node.tag === SuspenseComponent) {n var state = node.memoizedState;nn if (state !== null) {n var dehydrated = state.dehydrated;nn if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {n return node;n }n }n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can’t be trusted because it don’tn // keep track of whether it suspended or not.n node.memoizedProps.revealOrder !== undefined) {n var didSuspend = (node.flags & DidCapture) !== NoFlags;nn if (didSuspend) {n return node;n }n } else if (node.child !== null) {n node.child.return = node;n node = node.child;n continue;n }nn if (node === row) {n return null;n }nn while (node.sibling === null) {n if (node.return === null || node.return === row) {n return null;n }nn node = node.return;n }nn node.sibling.return = node.return;n node = node.sibling;n }nn return null;n}nnvar NoFlags$1 =n/* */n0; // Represents whether effect should fire.nnvar HasEffect =n/* */n1; // Represents the phase in which the effect (not the clean-up) fires.nnvar Layout =n/* */n2;nvar Passive$1 =n/* */n4;nn// This may have been an insertion or a hydration.nnvar hydrationParentFiber = null;nvar nextHydratableInstance = null;nvar isHydrating = false;nnfunction enterHydrationState(fiber) {nn var parentInstance = fiber.stateNode.containerInfo;n nextHydratableInstance = getFirstHydratableChild(parentInstance);n hydrationParentFiber = fiber;n isHydrating = true;n return true;n}nnfunction deleteHydratableInstance(returnFiber, instance) {n {n switch (returnFiber.tag) {n case HostRoot:n didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);n break;nn case HostComponent:n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);n break;n }n }nn var childToDelete = createFiberFromHostInstanceForDeletion();n childToDelete.stateNode = instance;n childToDelete.return = returnFiber;n childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,n // these children are not part of the reconciliation list of children.n // Even if we abort and rereconcile the children, that will try to hydraten // again and the nodes are still in the host tree so these will ben // recreated.nn if (returnFiber.lastEffect !== null) {n returnFiber.lastEffect.nextEffect = childToDelete;n returnFiber.lastEffect = childToDelete;n } else {n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;n }n}nnfunction insertNonHydratedInstance(returnFiber, fiber) {n fiber.flags = fiber.flags & ~Hydrating | Placement;nn {n switch (returnFiber.tag) {n case HostRoot:n {n var parentContainer = returnFiber.stateNode.containerInfo;nn switch (fiber.tag) {n case HostComponent:n var type = fiber.type;n var props = fiber.pendingProps;n didNotFindHydratableContainerInstance(parentContainer, type);n break;nn case HostText:n var text = fiber.pendingProps;n didNotFindHydratableContainerTextInstance(parentContainer, text);n break;n }nn break;n }nn case HostComponent:n {n var parentType = returnFiber.type;n var parentProps = returnFiber.memoizedProps;n var parentInstance = returnFiber.stateNode;nn switch (fiber.tag) {n case HostComponent:n var _type = fiber.type;n var _props = fiber.pendingProps;n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);n break;nn case HostText:n var _text = fiber.pendingProps;n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);n break;nn case SuspenseComponent:n didNotFindHydratableSuspenseInstance(parentType, parentProps);n break;n }nn break;n }nn default:n return;n }n }n}nnfunction tryHydrate(fiber, nextInstance) {n switch (fiber.tag) {n case HostComponent:n {n var type = fiber.type;n var props = fiber.pendingProps;n var instance = canHydrateInstance(nextInstance, type);nn if (instance !== null) {n fiber.stateNode = instance;n return true;n }nn return false;n }nn case HostText:n {n var text = fiber.pendingProps;n var textInstance = canHydrateTextInstance(nextInstance, text);nn if (textInstance !== null) {n fiber.stateNode = textInstance;n return true;n }nn return false;n }nn case SuspenseComponent:n {nn return false;n }nn default:n return false;n }n}nnfunction tryToClaimNextHydratableInstance(fiber) {n if (!isHydrating) {n return;n }nn var nextInstance = nextHydratableInstance;nn if (!nextInstance) {n // Nothing to hydrate. Make it an insertion.n insertNonHydratedInstance(hydrationParentFiber, fiber);n isHydrating = false;n hydrationParentFiber = fiber;n return;n }nn var firstAttemptedInstance = nextInstance;nn if (!tryHydrate(fiber, nextInstance)) {n // If we can’t hydrate this instance let’s try the next one.n // We use this as a heuristic. It’s based on intuition and not data so itn // might be flawed or unnecessary.n nextInstance = getNextHydratableSibling(firstAttemptedInstance);nn if (!nextInstance || !tryHydrate(fiber, nextInstance)) {n // Nothing to hydrate. Make it an insertion.n insertNonHydratedInstance(hydrationParentFiber, fiber);n isHydrating = false;n hydrationParentFiber = fiber;n return;n } // We matched the next one, we’ll now assume that the first one wasn // superfluous and we’ll delete it. Since we can’t eagerly delete itn // we’ll have to schedule a deletion. To do that, this node needs a dummyn // fiber associated with it.nnn deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);n }nn hydrationParentFiber = fiber;n nextHydratableInstance = getFirstHydratableChild(nextInstance);n}nnfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {nn var instance = fiber.stateNode;n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.nn fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if theren // is a new ref we mark this as an update.nn if (updatePayload !== null) {n return true;n }nn return false;n}nnfunction prepareToHydrateHostTextInstance(fiber) {nn var textInstance = fiber.stateNode;n var textContent = fiber.memoizedProps;n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);nn {n if (shouldUpdate) {n // We assume that prepareToHydrateHostTextInstance is called in a context where then // hydration parent is the parent host component of this host text.n var returnFiber = hydrationParentFiber;nn if (returnFiber !== null) {n switch (returnFiber.tag) {n case HostRoot:n {n var parentContainer = returnFiber.stateNode.containerInfo;n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);n break;n }nn case HostComponent:n {n var parentType = returnFiber.type;n var parentProps = returnFiber.memoizedProps;n var parentInstance = returnFiber.stateNode;n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);n break;n }n }n }n }n }nn return shouldUpdate;n}nnfunction skipPastDehydratedSuspenseInstance(fiber) {nn var suspenseState = fiber.memoizedState;n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;nn if (!suspenseInstance) {n {n throw Error( „Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);n}nnfunction popToNextHostParent(fiber) {n var parent = fiber.return;nn while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {n parent = parent.return;n }nn hydrationParentFiber = parent;n}nnfunction popHydrationState(fiber) {nn if (fiber !== hydrationParentFiber) {n // We’re deeper than the current hydration context, inside an insertedn // tree.n return false;n }nn if (!isHydrating) {n // If we’re not currently hydrating but we’re in a hydration context, thenn // we were an insertion and now need to pop up reenter hydration of ourn // siblings.n popToNextHostParent(fiber);n isHydrating = true;n return false;n }nn var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.n // We only do this deeper than head and body since they tend to have randomn // other nodes in them. We also ignore components with pure text content inn // side of them.n // TODO: Better heuristic.nn if (fiber.tag !== HostComponent || type !== ‚head‘ && type !== ‚body‘ && !shouldSetTextContent(type, fiber.memoizedProps)) {n var nextInstance = nextHydratableInstance;nn while (nextInstance) {n deleteHydratableInstance(fiber, nextInstance);n nextInstance = getNextHydratableSibling(nextInstance);n }n }nn popToNextHostParent(fiber);nn if (fiber.tag === SuspenseComponent) {n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);n } else {n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;n }nn return true;n}nnfunction resetHydrationState() {nn hydrationParentFiber = null;n nextHydratableInstance = null;n isHydrating = false;n}nnfunction getIsHydrating() {n return isHydrating;n}nn// and should be reset before starting a new render.n// This tracks which mutable sources need to be reset after a render.nnvar workInProgressSources = [];nvar rendererSigil$1;nn{n // Used to detect multiple renderers using the same mutable source.n rendererSigil$1 = {};n}nnfunction markSourceAsDirty(mutableSource) {n workInProgressSources.push(mutableSource);n}nfunction resetWorkInProgressVersions() {n for (var i = 0; i NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {n var prevTransition = ReactCurrentBatchConfig$1.transition;n ReactCurrentBatchConfig$1.transition = 1;nn try {n setPending(false);n callback();n } finally {n ReactCurrentBatchConfig$1.transition = prevTransition;n }n });n }n}nnfunction mountTransition() {n var _mountState2 = mountState(false),n isPending = _mountState2[0],n setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`n // never changes.nnn var start = startTransition.bind(null, setPending);n mountRef(start);n return [start, isPending];n}nnfunction updateTransition() {n var _updateState2 = updateState(),n isPending = _updateState2[0];nn var startRef = updateRef();n var start = startRef.current;n return [start, isPending];n}nnfunction rerenderTransition() {n var _rerenderState2 = rerenderState(),n isPending = _rerenderState2[0];nn var startRef = updateRef();n var start = startRef.current;n return [start, isPending];n}nnvar isUpdatingOpaqueValueInRenderPhase = false;nfunction getIsUpdatingOpaqueValueInRenderPhaseInDEV() {n {n return isUpdatingOpaqueValueInRenderPhase;n }n}nnfunction warnOnOpaqueIdentifierAccessInDEV(fiber) {n {n // TODO: Should warn in effects and callbacks, toon var name = getComponentName(fiber.type) || ‚Unknown‘;nn if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {n error(‚The object passed back from useOpaqueIdentifier is meant to be ‚ + ‚passed through to attributes only. Do not read the ‚ + ‚value directly.‘);nn didWarnAboutUseOpaqueIdentifier[name] = true;n }n }n}nnfunction mountOpaqueIdentifier() {n var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;nn if (getIsHydrating()) {n var didUpgrade = false;n var fiber = currentlyRenderingFiber$1;nn var readValue = function () {n if (!didUpgrade) {n // Only upgrade once. This works even inside the render phase becausen // the update is added to a shared queue, which outlasts then // in-progress render.n didUpgrade = true;nn {n isUpdatingOpaqueValueInRenderPhase = true;n setId(makeId());n isUpdatingOpaqueValueInRenderPhase = false;n warnOnOpaqueIdentifierAccessInDEV(fiber);n }n }nn {n {n throw Error( „The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.“ );n }n }n };nn var id = makeOpaqueHydratingObject(readValue);n var setId = mountState(id)[1];nn if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {n currentlyRenderingFiber$1.flags |= Update | Passive;n pushEffect(HasEffect | Passive$1, function () {n setId(makeId());n }, undefined, null);n }nn return id;n } else {n var _id = makeId();nn mountState(_id);n return _id;n }n}nnfunction updateOpaqueIdentifier() {n var id = updateState()[0];n return id;n}nnfunction rerenderOpaqueIdentifier() {n var id = rerenderState()[0];n return id;n}nnfunction dispatchAction(fiber, queue, action) {n {n if (typeof arguments[3] === ‚function‘) {n error(„State updates from the useState() and useReducer() Hooks don’t support the “ + ’second callback argument. To execute a side effect after ‚ + ‚rendering, declare it in the component body with useEffect().‘);n }n }nn var eventTime = requestEventTime();n var lane = requestUpdateLane(fiber);n var update = {n lane: lane,n action: action,n eagerReducer: null,n eagerState: null,n next: nulln }; // Append the update to the end of the list.nn var pending = queue.pending;nn if (pending === null) {n // This is the first update. Create a circular list.n update.next = update;n } else {n update.next = pending.next;n pending.next = update;n }nn queue.pending = update;n var alternate = fiber.alternate;nn if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {n // This is a render phase update. Stash it in a lazily-created map ofn // queue -> linked list of updates. After this render pass, we’ll restartn // and apply the stashed updates on top of the work-in-progress hook.n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;n } else {n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {n // The queue is currently empty, which means we can eagerly compute then // next state before entering the render phase. If the new state is then // same as the current state, we may be able to bail out entirely.n var lastRenderedReducer = queue.lastRenderedReducer;nn if (lastRenderedReducer !== null) {n var prevDispatcher;nn {n prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;n }nn try {n var currentState = queue.lastRenderedState;n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to computen // it, on the update object. If the reducer hasn’t changed by then // time we enter the render phase, then the eager state can be usedn // without calling the reducer again.nn update.eagerReducer = lastRenderedReducer;n update.eagerState = eagerState;nn if (objectIs(eagerState, currentState)) {n // Fast path. We can bail out without scheduling React to re-render.n // It’s still possible that we’ll need to rebase this update later,n // if the component re-renders for a different reason and by thatn // time the reducer has changed.n return;n }n } catch (error) {// Suppress the error. It will throw again in the render phase.n } finally {n {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n }n }n }nn {n // $FlowExpectedError – jest isn’t a global, and isn’t recognized outside of testsn if (‚undefined‘ !== typeof jest) {n warnIfNotScopedWithMatchingAct(fiber);n warnIfNotCurrentlyActingUpdatesInDev(fiber);n }n }nn scheduleUpdateOnFiber(fiber, lane, eventTime);n }n}nnvar ContextOnlyDispatcher = {n readContext: readContext,n useCallback: throwInvalidHookError,n useContext: throwInvalidHookError,n useEffect: throwInvalidHookError,n useImperativeHandle: throwInvalidHookError,n useLayoutEffect: throwInvalidHookError,n useMemo: throwInvalidHookError,n useReducer: throwInvalidHookError,n useRef: throwInvalidHookError,n useState: throwInvalidHookError,n useDebugValue: throwInvalidHookError,n useDeferredValue: throwInvalidHookError,n useTransition: throwInvalidHookError,n useMutableSource: throwInvalidHookError,n useOpaqueIdentifier: throwInvalidHookError,n unstable_isNewReconciler: enableNewReconcilern};nvar HooksDispatcherOnMountInDEV = null;nvar HooksDispatcherOnMountWithHookTypesInDEV = null;nvar HooksDispatcherOnUpdateInDEV = null;nvar HooksDispatcherOnRerenderInDEV = null;nvar InvalidNestedHooksDispatcherOnMountInDEV = null;nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;nn{n var warnInvalidContextAccess = function () {n error(‚Context can only be read while React is rendering. ‚ + ‚In classes, you can read it in the render method or getDerivedStateFromProps. ‚ + ‚In function components, you can read it directly in the function body, but not ‚ + ‚inside Hooks like useReducer() or useMemo().‘);n };nn var warnInvalidHookAccess = function () {n error(‚Do not call Hooks inside useEffect(…), useMemo(…), or other built-in Hooks. ‚ + ‚You can only call Hooks at the top level of your React function. ‚ + ‚For more information, see ‚ + ‚https://reactjs.org/link/rules-of-hooks‘);n };nn HooksDispatcherOnMountInDEV = {n readContext: function (context, observedBits) {n return readContext(context, observedBits);n },n useCallback: function (callback, deps) {n currentHookNameInDev = ‚useCallback‘;n mountHookTypesDev();n checkDepsAreArrayDev(deps);n return mountCallback(callback, deps);n },n useContext: function (context, observedBits) {n currentHookNameInDev = ‚useContext‘;n mountHookTypesDev();n return readContext(context, observedBits);n },n useEffect: function (create, deps) {n currentHookNameInDev = ‚useEffect‘;n mountHookTypesDev();n checkDepsAreArrayDev(deps);n return mountEffect(create, deps);n },n useImperativeHandle: function (ref, create, deps) {n currentHookNameInDev = ‚useImperativeHandle‘;n mountHookTypesDev();n checkDepsAreArrayDev(deps);n return mountImperativeHandle(ref, create, deps);n },n useLayoutEffect: function (create, deps) {n currentHookNameInDev = ‚useLayoutEffect‘;n mountHookTypesDev();n checkDepsAreArrayDev(deps);n return mountLayoutEffect(create, deps);n },n useMemo: function (create, deps) {n currentHookNameInDev = ‚useMemo‘;n mountHookTypesDev();n checkDepsAreArrayDev(deps);n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountMemo(create, deps);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useReducer: function (reducer, initialArg, init) {n currentHookNameInDev = ‚useReducer‘;n mountHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountReducer(reducer, initialArg, init);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useRef: function (initialValue) {n currentHookNameInDev = ‚useRef‘;n mountHookTypesDev();n return mountRef(initialValue);n },n useState: function (initialState) {n currentHookNameInDev = ‚useState‘;n mountHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountState(initialState);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useDebugValue: function (value, formatterFn) {n currentHookNameInDev = ‚useDebugValue‘;n mountHookTypesDev();n return mountDebugValue();n },n useDeferredValue: function (value) {n currentHookNameInDev = ‚useDeferredValue‘;n mountHookTypesDev();n return mountDeferredValue(value);n },n useTransition: function () {n currentHookNameInDev = ‚useTransition‘;n mountHookTypesDev();n return mountTransition();n },n useMutableSource: function (source, getSnapshot, subscribe) {n currentHookNameInDev = ‚useMutableSource‘;n mountHookTypesDev();n return mountMutableSource(source, getSnapshot, subscribe);n },n useOpaqueIdentifier: function () {n currentHookNameInDev = ‚useOpaqueIdentifier‘;n mountHookTypesDev();n return mountOpaqueIdentifier();n },n unstable_isNewReconciler: enableNewReconcilern };n HooksDispatcherOnMountWithHookTypesInDEV = {n readContext: function (context, observedBits) {n return readContext(context, observedBits);n },n useCallback: function (callback, deps) {n currentHookNameInDev = ‚useCallback‘;n updateHookTypesDev();n return mountCallback(callback, deps);n },n useContext: function (context, observedBits) {n currentHookNameInDev = ‚useContext‘;n updateHookTypesDev();n return readContext(context, observedBits);n },n useEffect: function (create, deps) {n currentHookNameInDev = ‚useEffect‘;n updateHookTypesDev();n return mountEffect(create, deps);n },n useImperativeHandle: function (ref, create, deps) {n currentHookNameInDev = ‚useImperativeHandle‘;n updateHookTypesDev();n return mountImperativeHandle(ref, create, deps);n },n useLayoutEffect: function (create, deps) {n currentHookNameInDev = ‚useLayoutEffect‘;n updateHookTypesDev();n return mountLayoutEffect(create, deps);n },n useMemo: function (create, deps) {n currentHookNameInDev = ‚useMemo‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountMemo(create, deps);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useReducer: function (reducer, initialArg, init) {n currentHookNameInDev = ‚useReducer‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountReducer(reducer, initialArg, init);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useRef: function (initialValue) {n currentHookNameInDev = ‚useRef‘;n updateHookTypesDev();n return mountRef(initialValue);n },n useState: function (initialState) {n currentHookNameInDev = ‚useState‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountState(initialState);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useDebugValue: function (value, formatterFn) {n currentHookNameInDev = ‚useDebugValue‘;n updateHookTypesDev();n return mountDebugValue();n },n useDeferredValue: function (value) {n currentHookNameInDev = ‚useDeferredValue‘;n updateHookTypesDev();n return mountDeferredValue(value);n },n useTransition: function () {n currentHookNameInDev = ‚useTransition‘;n updateHookTypesDev();n return mountTransition();n },n useMutableSource: function (source, getSnapshot, subscribe) {n currentHookNameInDev = ‚useMutableSource‘;n updateHookTypesDev();n return mountMutableSource(source, getSnapshot, subscribe);n },n useOpaqueIdentifier: function () {n currentHookNameInDev = ‚useOpaqueIdentifier‘;n updateHookTypesDev();n return mountOpaqueIdentifier();n },n unstable_isNewReconciler: enableNewReconcilern };n HooksDispatcherOnUpdateInDEV = {n readContext: function (context, observedBits) {n return readContext(context, observedBits);n },n useCallback: function (callback, deps) {n currentHookNameInDev = ‚useCallback‘;n updateHookTypesDev();n return updateCallback(callback, deps);n },n useContext: function (context, observedBits) {n currentHookNameInDev = ‚useContext‘;n updateHookTypesDev();n return readContext(context, observedBits);n },n useEffect: function (create, deps) {n currentHookNameInDev = ‚useEffect‘;n updateHookTypesDev();n return updateEffect(create, deps);n },n useImperativeHandle: function (ref, create, deps) {n currentHookNameInDev = ‚useImperativeHandle‘;n updateHookTypesDev();n return updateImperativeHandle(ref, create, deps);n },n useLayoutEffect: function (create, deps) {n currentHookNameInDev = ‚useLayoutEffect‘;n updateHookTypesDev();n return updateLayoutEffect(create, deps);n },n useMemo: function (create, deps) {n currentHookNameInDev = ‚useMemo‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return updateMemo(create, deps);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useReducer: function (reducer, initialArg, init) {n currentHookNameInDev = ‚useReducer‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return updateReducer(reducer, initialArg, init);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useRef: function (initialValue) {n currentHookNameInDev = ‚useRef‘;n updateHookTypesDev();n return updateRef();n },n useState: function (initialState) {n currentHookNameInDev = ‚useState‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return updateState(initialState);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useDebugValue: function (value, formatterFn) {n currentHookNameInDev = ‚useDebugValue‘;n updateHookTypesDev();n return updateDebugValue();n },n useDeferredValue: function (value) {n currentHookNameInDev = ‚useDeferredValue‘;n updateHookTypesDev();n return updateDeferredValue(value);n },n useTransition: function () {n currentHookNameInDev = ‚useTransition‘;n updateHookTypesDev();n return updateTransition();n },n useMutableSource: function (source, getSnapshot, subscribe) {n currentHookNameInDev = ‚useMutableSource‘;n updateHookTypesDev();n return updateMutableSource(source, getSnapshot, subscribe);n },n useOpaqueIdentifier: function () {n currentHookNameInDev = ‚useOpaqueIdentifier‘;n updateHookTypesDev();n return updateOpaqueIdentifier();n },n unstable_isNewReconciler: enableNewReconcilern };n HooksDispatcherOnRerenderInDEV = {n readContext: function (context, observedBits) {n return readContext(context, observedBits);n },n useCallback: function (callback, deps) {n currentHookNameInDev = ‚useCallback‘;n updateHookTypesDev();n return updateCallback(callback, deps);n },n useContext: function (context, observedBits) {n currentHookNameInDev = ‚useContext‘;n updateHookTypesDev();n return readContext(context, observedBits);n },n useEffect: function (create, deps) {n currentHookNameInDev = ‚useEffect‘;n updateHookTypesDev();n return updateEffect(create, deps);n },n useImperativeHandle: function (ref, create, deps) {n currentHookNameInDev = ‚useImperativeHandle‘;n updateHookTypesDev();n return updateImperativeHandle(ref, create, deps);n },n useLayoutEffect: function (create, deps) {n currentHookNameInDev = ‚useLayoutEffect‘;n updateHookTypesDev();n return updateLayoutEffect(create, deps);n },n useMemo: function (create, deps) {n currentHookNameInDev = ‚useMemo‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;nn try {n return updateMemo(create, deps);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useReducer: function (reducer, initialArg, init) {n currentHookNameInDev = ‚useReducer‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;nn try {n return rerenderReducer(reducer, initialArg, init);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useRef: function (initialValue) {n currentHookNameInDev = ‚useRef‘;n updateHookTypesDev();n return updateRef();n },n useState: function (initialState) {n currentHookNameInDev = ‚useState‘;n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;nn try {n return rerenderState(initialState);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useDebugValue: function (value, formatterFn) {n currentHookNameInDev = ‚useDebugValue‘;n updateHookTypesDev();n return updateDebugValue();n },n useDeferredValue: function (value) {n currentHookNameInDev = ‚useDeferredValue‘;n updateHookTypesDev();n return rerenderDeferredValue(value);n },n useTransition: function () {n currentHookNameInDev = ‚useTransition‘;n updateHookTypesDev();n return rerenderTransition();n },n useMutableSource: function (source, getSnapshot, subscribe) {n currentHookNameInDev = ‚useMutableSource‘;n updateHookTypesDev();n return updateMutableSource(source, getSnapshot, subscribe);n },n useOpaqueIdentifier: function () {n currentHookNameInDev = ‚useOpaqueIdentifier‘;n updateHookTypesDev();n return rerenderOpaqueIdentifier();n },n unstable_isNewReconciler: enableNewReconcilern };n InvalidNestedHooksDispatcherOnMountInDEV = {n readContext: function (context, observedBits) {n warnInvalidContextAccess();n return readContext(context, observedBits);n },n useCallback: function (callback, deps) {n currentHookNameInDev = ‚useCallback‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountCallback(callback, deps);n },n useContext: function (context, observedBits) {n currentHookNameInDev = ‚useContext‘;n warnInvalidHookAccess();n mountHookTypesDev();n return readContext(context, observedBits);n },n useEffect: function (create, deps) {n currentHookNameInDev = ‚useEffect‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountEffect(create, deps);n },n useImperativeHandle: function (ref, create, deps) {n currentHookNameInDev = ‚useImperativeHandle‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountImperativeHandle(ref, create, deps);n },n useLayoutEffect: function (create, deps) {n currentHookNameInDev = ‚useLayoutEffect‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountLayoutEffect(create, deps);n },n useMemo: function (create, deps) {n currentHookNameInDev = ‚useMemo‘;n warnInvalidHookAccess();n mountHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountMemo(create, deps);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useReducer: function (reducer, initialArg, init) {n currentHookNameInDev = ‚useReducer‘;n warnInvalidHookAccess();n mountHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountReducer(reducer, initialArg, init);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useRef: function (initialValue) {n currentHookNameInDev = ‚useRef‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountRef(initialValue);n },n useState: function (initialState) {n currentHookNameInDev = ‚useState‘;n warnInvalidHookAccess();n mountHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;nn try {n return mountState(initialState);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useDebugValue: function (value, formatterFn) {n currentHookNameInDev = ‚useDebugValue‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountDebugValue();n },n useDeferredValue: function (value) {n currentHookNameInDev = ‚useDeferredValue‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountDeferredValue(value);n },n useTransition: function () {n currentHookNameInDev = ‚useTransition‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountTransition();n },n useMutableSource: function (source, getSnapshot, subscribe) {n currentHookNameInDev = ‚useMutableSource‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountMutableSource(source, getSnapshot, subscribe);n },n useOpaqueIdentifier: function () {n currentHookNameInDev = ‚useOpaqueIdentifier‘;n warnInvalidHookAccess();n mountHookTypesDev();n return mountOpaqueIdentifier();n },n unstable_isNewReconciler: enableNewReconcilern };n InvalidNestedHooksDispatcherOnUpdateInDEV = {n readContext: function (context, observedBits) {n warnInvalidContextAccess();n return readContext(context, observedBits);n },n useCallback: function (callback, deps) {n currentHookNameInDev = ‚useCallback‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateCallback(callback, deps);n },n useContext: function (context, observedBits) {n currentHookNameInDev = ‚useContext‘;n warnInvalidHookAccess();n updateHookTypesDev();n return readContext(context, observedBits);n },n useEffect: function (create, deps) {n currentHookNameInDev = ‚useEffect‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateEffect(create, deps);n },n useImperativeHandle: function (ref, create, deps) {n currentHookNameInDev = ‚useImperativeHandle‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateImperativeHandle(ref, create, deps);n },n useLayoutEffect: function (create, deps) {n currentHookNameInDev = ‚useLayoutEffect‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateLayoutEffect(create, deps);n },n useMemo: function (create, deps) {n currentHookNameInDev = ‚useMemo‘;n warnInvalidHookAccess();n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return updateMemo(create, deps);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useReducer: function (reducer, initialArg, init) {n currentHookNameInDev = ‚useReducer‘;n warnInvalidHookAccess();n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return updateReducer(reducer, initialArg, init);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useRef: function (initialValue) {n currentHookNameInDev = ‚useRef‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateRef();n },n useState: function (initialState) {n currentHookNameInDev = ‚useState‘;n warnInvalidHookAccess();n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return updateState(initialState);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useDebugValue: function (value, formatterFn) {n currentHookNameInDev = ‚useDebugValue‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateDebugValue();n },n useDeferredValue: function (value) {n currentHookNameInDev = ‚useDeferredValue‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateDeferredValue(value);n },n useTransition: function () {n currentHookNameInDev = ‚useTransition‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateTransition();n },n useMutableSource: function (source, getSnapshot, subscribe) {n currentHookNameInDev = ‚useMutableSource‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateMutableSource(source, getSnapshot, subscribe);n },n useOpaqueIdentifier: function () {n currentHookNameInDev = ‚useOpaqueIdentifier‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateOpaqueIdentifier();n },n unstable_isNewReconciler: enableNewReconcilern };n InvalidNestedHooksDispatcherOnRerenderInDEV = {n readContext: function (context, observedBits) {n warnInvalidContextAccess();n return readContext(context, observedBits);n },n useCallback: function (callback, deps) {n currentHookNameInDev = ‚useCallback‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateCallback(callback, deps);n },n useContext: function (context, observedBits) {n currentHookNameInDev = ‚useContext‘;n warnInvalidHookAccess();n updateHookTypesDev();n return readContext(context, observedBits);n },n useEffect: function (create, deps) {n currentHookNameInDev = ‚useEffect‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateEffect(create, deps);n },n useImperativeHandle: function (ref, create, deps) {n currentHookNameInDev = ‚useImperativeHandle‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateImperativeHandle(ref, create, deps);n },n useLayoutEffect: function (create, deps) {n currentHookNameInDev = ‚useLayoutEffect‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateLayoutEffect(create, deps);n },n useMemo: function (create, deps) {n currentHookNameInDev = ‚useMemo‘;n warnInvalidHookAccess();n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return updateMemo(create, deps);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useReducer: function (reducer, initialArg, init) {n currentHookNameInDev = ‚useReducer‘;n warnInvalidHookAccess();n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return rerenderReducer(reducer, initialArg, init);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useRef: function (initialValue) {n currentHookNameInDev = ‚useRef‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateRef();n },n useState: function (initialState) {n currentHookNameInDev = ‚useState‘;n warnInvalidHookAccess();n updateHookTypesDev();n var prevDispatcher = ReactCurrentDispatcher$1.current;n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;nn try {n return rerenderState(initialState);n } finally {n ReactCurrentDispatcher$1.current = prevDispatcher;n }n },n useDebugValue: function (value, formatterFn) {n currentHookNameInDev = ‚useDebugValue‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateDebugValue();n },n useDeferredValue: function (value) {n currentHookNameInDev = ‚useDeferredValue‘;n warnInvalidHookAccess();n updateHookTypesDev();n return rerenderDeferredValue(value);n },n useTransition: function () {n currentHookNameInDev = ‚useTransition‘;n warnInvalidHookAccess();n updateHookTypesDev();n return rerenderTransition();n },n useMutableSource: function (source, getSnapshot, subscribe) {n currentHookNameInDev = ‚useMutableSource‘;n warnInvalidHookAccess();n updateHookTypesDev();n return updateMutableSource(source, getSnapshot, subscribe);n },n useOpaqueIdentifier: function () {n currentHookNameInDev = ‚useOpaqueIdentifier‘;n warnInvalidHookAccess();n updateHookTypesDev();n return rerenderOpaqueIdentifier();n },n unstable_isNewReconciler: enableNewReconcilern };n}nnvar now$1 = Scheduler.unstable_now;nvar commitTime = 0;nvar profilerStartTime = -1;nnfunction getCommitTime() {n return commitTime;n}nnfunction recordCommitTime() {nn commitTime = now$1();n}nnfunction startProfilerTimer(fiber) {nn profilerStartTime = now$1();nn if (fiber.actualStartTime = 0) {n var elapsedTime = now$1() – profilerStartTime;n fiber.actualDuration += elapsedTime;nn if (overrideBaseTime) {n fiber.selfBaseDuration = elapsedTime;n }nn profilerStartTime = -1;n }n}nnfunction transferActualDuration(fiber) {n // Transfer time spent rendering these children so we don’t lose itn // after we rerender. This is used as a helper in special casesn // where we should count the work of multiple passes.n var child = fiber.child;nn while (child) {n fiber.actualDuration += child.actualDuration;n child = child.sibling;n }n}nnvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;nvar didReceiveUpdate = false;nvar didWarnAboutBadClass;nvar didWarnAboutModulePatternComponent;nvar didWarnAboutContextTypeOnFunctionComponent;nvar didWarnAboutGetDerivedStateOnFunctionComponent;nvar didWarnAboutFunctionRefs;nvar didWarnAboutReassigningProps;nvar didWarnAboutRevealOrder;nvar didWarnAboutTailOptions;nn{n didWarnAboutBadClass = {};n didWarnAboutModulePatternComponent = {};n didWarnAboutContextTypeOnFunctionComponent = {};n didWarnAboutGetDerivedStateOnFunctionComponent = {};n didWarnAboutFunctionRefs = {};n didWarnAboutReassigningProps = false;n didWarnAboutRevealOrder = {};n didWarnAboutTailOptions = {};n}nnfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {n if (current === null) {n // If this is a fresh new component that hasn’t been rendered yet, wen // won’t update its child set by applying minimal side-effects. Instead,n // we will add them all to the child before it gets rendered. That meansn // we can optimize this reconciliation pass by not tracking side-effects.n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);n } else {n // If the current child is the same as the work in progress, it means thatn // we haven’t yet started any work on these children. Therefore, we usen // the clone algorithm to create a copy of all the current children.n // If we had any progressed work already, that is invalid at this point son // let’s throw it out.n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);n }n}nnfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {n // This function is fork of reconcileChildren. It’s used in cases where wen // want to reconcile without matching against the existing set. This has then // effect of all current children being unmounted; even if the type and keyn // are the same, the old child is unmounted and a new child is created.n //n // To do this, we’re going to go through the reconcile algorithm twice. Inn // the first pass, we schedule a deletion for all the current children byn // passing null.n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that wen // pass null in place of where we usually pass the current child set. This hasn // the effect of remounting all children regardless of whether theirn // identities match.nn workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);n}nnfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {n // TODO: current can be non-null here even if the componentn // hasn’t yet mounted. This happens after the first render suspends.n // We’ll need to figure out if this is fine or can cause issues.n {n if (workInProgress.type !== workInProgress.elementType) {n // Lazy component props can’t be validated in createElementn // because they’re only guaranteed to be resolved here.n var innerPropTypes = Component.propTypes;nn if (innerPropTypes) {n checkPropTypes(innerPropTypes, nextProps, // Resolved propsn ‚prop‘, getComponentName(Component));n }n }n }nn var render = Component.render;n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponentnn var nextChildren;n prepareToReadContext(workInProgress, renderLanes);nn {n ReactCurrentOwner$1.current = workInProgress;n setIsRendering(true);n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);nn if ( workInProgress.mode & StrictMode) {n disableLogs();nn try {n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);n } finally {n reenableLogs();n }n }nn setIsRendering(false);n }nn if (current !== null && !didReceiveUpdate) {n bailoutHooks(current, workInProgress, renderLanes);n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n } // React DevTools reads this flag.nnn workInProgress.flags |= PerformedWork;n reconcileChildren(current, workInProgress, nextChildren, renderLanes);n return workInProgress.child;n}nnfunction updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {n if (current === null) {n var type = Component.type;nn if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn’t resolve outer props either.n Component.defaultProps === undefined) {n var resolvedType = type;nn {n resolvedType = resolveFunctionForHotReloading(type);n } // If this is a plain function component without default props,n // and with only the default shallow comparison, we upgrade itn // to a SimpleMemoComponent to allow fast path updates.nnn workInProgress.tag = SimpleMemoComponent;n workInProgress.type = resolvedType;nn {n validateFunctionComponentInDev(workInProgress, type);n }nn return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);n }nn {n var innerPropTypes = type.propTypes;nn if (innerPropTypes) {n // Inner memo component props aren’t currently validated in createElement.n // We could move it there, but we’d still need this for lazy code path.n checkPropTypes(innerPropTypes, nextProps, // Resolved propsn ‚prop‘, getComponentName(type));n }n }nn var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);n child.ref = workInProgress.ref;n child.return = workInProgress;n workInProgress.child = child;n return child;n }nn {n var _type = Component.type;n var _innerPropTypes = _type.propTypes;nn if (_innerPropTypes) {n // Inner memo component props aren’t currently validated in createElement.n // We could move it there, but we’d still need this for lazy code path.n checkPropTypes(_innerPropTypes, nextProps, // Resolved propsn ‚prop‘, getComponentName(_type));n }n }nn var currentChild = current.child; // This is always exactly one childnn if (!includesSomeLane(updateLanes, renderLanes)) {n // This will be the props with resolved defaultProps,n // unlike current.memoizedProps which will be the unresolved ones.n var prevProps = currentChild.memoizedProps; // Default to shallow comparisonnn var compare = Component.compare;n compare = compare !== null ? compare : shallowEqual;nn if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n }n } // React DevTools reads this flag.nnn workInProgress.flags |= PerformedWork;n var newChild = createWorkInProgress(currentChild, nextProps);n newChild.ref = workInProgress.ref;n newChild.return = workInProgress;n workInProgress.child = newChild;n return newChild;n}nnfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {n // TODO: current can be non-null here even if the componentn // hasn’t yet mounted. This happens when the inner render suspends.n // We’ll need to figure out if this is fine or can cause issues.n {n if (workInProgress.type !== workInProgress.elementType) {n // Lazy component props can’t be validated in createElementn // because they’re only guaranteed to be resolved here.n var outerMemoType = workInProgress.elementType;nn if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {n // We warn when you define propTypes on lazy()n // so let’s just skip over it to find memo() outer wrapper.n // Inner props for memo are validated later.n var lazyComponent = outerMemoType;n var payload = lazyComponent._payload;n var init = lazyComponent._init;nn try {n outerMemoType = init(payload);n } catch (x) {n outerMemoType = null;n } // Inner propTypes will be validated in the function component path.nnn var outerPropTypes = outerMemoType && outerMemoType.propTypes;nn if (outerPropTypes) {n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)n ‚prop‘, getComponentName(outerMemoType));n }n }n }n }nn if (current !== null) {n var prevProps = current.memoizedProps;nn if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.n workInProgress.type === current.type )) {n didReceiveUpdate = false;nn if (!includesSomeLane(renderLanes, updateLanes)) {n // The pending lanes were cleared at the beginning of beginWork. We’ren // about to bail out, but there might be other lanes that weren’tn // included in the current render. Usually, the priority level of then // remaining updates is accumlated during the evaluation of then // component (i.e. when processing the update queue). But since sincen // we’re bailing out early *without* evaluating the component, we needn // to account for it here, too. Reset to the value of the current fiber.n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,n // because a MemoComponent fiber does not have hooks or an update queue;n // rather, it wraps around an inner component, which may or may notn // contains hooks.n // TODO: Move the reset at in beginWork out of the common path so thatn // this is no longer necessary.n workInProgress.lanes = current.lanes;n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {n // This is a special case that only exists for legacy mode.n // See https://github.com/facebook/react/pull/19216.n didReceiveUpdate = true;n }n }n }nn return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);n}nnfunction updateOffscreenComponent(current, workInProgress, renderLanes) {n var nextProps = workInProgress.pendingProps;n var nextChildren = nextProps.children;n var prevState = current !== null ? current.memoizedState : null;nn if (nextProps.mode === ‚hidden‘ || nextProps.mode === ‚unstable-defer-without-hiding‘) {n if ((workInProgress.mode & ConcurrentMode) === NoMode) {n // In legacy sync mode, don’t defer the subtree. Render it now.n // TODO: Figure out what we should do in Blocking mode.n var nextState = {n baseLanes: NoLanesn };n workInProgress.memoizedState = nextState;n pushRenderLanes(workInProgress, renderLanes);n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {n var nextBaseLanes;nn if (prevState !== null) {n var prevBaseLanes = prevState.baseLanes;n nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);n } else {n nextBaseLanes = renderLanes;n } // Schedule this fiber to re-render at offscreen priority. Then bailout.nnn {n markSpawnedWork(OffscreenLane);n }nn workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);n var _nextState = {n baseLanes: nextBaseLanesn };n workInProgress.memoizedState = _nextState; // We’re about to bail out, but we need to push this to the stack anywayn // to avoid a push/pop misalignment.nn pushRenderLanes(workInProgress, nextBaseLanes);n return null;n } else {n // Rendering at offscreen, so we can clear the base lanes.n var _nextState2 = {n baseLanes: NoLanesn };n workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.nn var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;n pushRenderLanes(workInProgress, subtreeRenderLanes);n }n } else {n var _subtreeRenderLanes;nn if (prevState !== null) {n _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we’re not hidden anymore, reset the statenn workInProgress.memoizedState = null;n } else {n // We weren’t previously hidden, and we still aren’t, so there’s nothingn // special to do. Need to push to the stack regardless, though, to avoidn // a push/pop misalignment.n _subtreeRenderLanes = renderLanes;n }nn pushRenderLanes(workInProgress, _subtreeRenderLanes);n }nn reconcileChildren(current, workInProgress, nextChildren, renderLanes);n return workInProgress.child;n} // Note: These happen to have identical begin phases, for now. We shouldn’t holdn// ourselves to this constraint, though. If the behavior diverges, we shouldn// fork the function.nnnvar updateLegacyHiddenComponent = updateOffscreenComponent;nnfunction updateFragment(current, workInProgress, renderLanes) {n var nextChildren = workInProgress.pendingProps;n reconcileChildren(current, workInProgress, nextChildren, renderLanes);n return workInProgress.child;n}nnfunction updateMode(current, workInProgress, renderLanes) {n var nextChildren = workInProgress.pendingProps.children;n reconcileChildren(current, workInProgress, nextChildren, renderLanes);n return workInProgress.child;n}nnfunction updateProfiler(current, workInProgress, renderLanes) {n {n workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.n // These are reset during render to allow the DevTools commit hook a chance to read them,nn var stateNode = workInProgress.stateNode;n stateNode.effectDuration = 0;n stateNode.passiveEffectDuration = 0;n }nn var nextProps = workInProgress.pendingProps;n var nextChildren = nextProps.children;n reconcileChildren(current, workInProgress, nextChildren, renderLanes);n return workInProgress.child;n}nnfunction markRef(current, workInProgress) {n var ref = workInProgress.ref;nn if (current === null && ref !== null || current !== null && current.ref !== ref) {n // Schedule a Ref effectn workInProgress.flags |= Ref;n }n}nnfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {n {n if (workInProgress.type !== workInProgress.elementType) {n // Lazy component props can’t be validated in createElementn // because they’re only guaranteed to be resolved here.n var innerPropTypes = Component.propTypes;nn if (innerPropTypes) {n checkPropTypes(innerPropTypes, nextProps, // Resolved propsn ‚prop‘, getComponentName(Component));n }n }n }nn var context;nn {n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);n context = getMaskedContext(workInProgress, unmaskedContext);n }nn var nextChildren;n prepareToReadContext(workInProgress, renderLanes);nn {n ReactCurrentOwner$1.current = workInProgress;n setIsRendering(true);n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);nn if ( workInProgress.mode & StrictMode) {n disableLogs();nn try {n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);n } finally {n reenableLogs();n }n }nn setIsRendering(false);n }nn if (current !== null && !didReceiveUpdate) {n bailoutHooks(current, workInProgress, renderLanes);n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n } // React DevTools reads this flag.nnn workInProgress.flags |= PerformedWork;n reconcileChildren(current, workInProgress, nextChildren, renderLanes);n return workInProgress.child;n}nnfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {n {n if (workInProgress.type !== workInProgress.elementType) {n // Lazy component props can’t be validated in createElementn // because they’re only guaranteed to be resolved here.n var innerPropTypes = Component.propTypes;nn if (innerPropTypes) {n checkPropTypes(innerPropTypes, nextProps, // Resolved propsn ‚prop‘, getComponentName(Component));n }n }n } // Push context providers early to prevent context stack mismatches.n // During mounting we don’t know the child context yet as the instance doesn’t exist.n // We will invalidate the child context in finishClassComponent() right after rendering.nnn var hasContext;nn if (isContextProvider(Component)) {n hasContext = true;n pushContextProvider(workInProgress);n } else {n hasContext = false;n }nn prepareToReadContext(workInProgress, renderLanes);n var instance = workInProgress.stateNode;n var shouldUpdate;nn if (instance === null) {n if (current !== null) {n // A class component without an instance only mounts if it suspendedn // inside a non-concurrent tree, in an inconsistent state. We want ton // treat it like a new mount, even though an empty version of it alreadyn // committed. Disconnect the alternate pointers.n current.alternate = null;n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effectnn workInProgress.flags |= Placement;n } // In the initial pass we might need to construct the instance.nnn constructClassInstance(workInProgress, Component, nextProps);n mountClassInstance(workInProgress, Component, nextProps, renderLanes);n shouldUpdate = true;n } else if (current === null) {n // In a resume, we’ll already have an instance we can reuse.n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);n } else {n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);n }nn var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);nn {n var inst = workInProgress.stateNode;nn if (shouldUpdate && inst.props !== nextProps) {n if (!didWarnAboutReassigningProps) {n error(‚It looks like %s is reassigning its own `this.props` while rendering. ‚ + ‚This is not supported and can lead to confusing bugs.‘, getComponentName(workInProgress.type) || ‚a component‘);n }nn didWarnAboutReassigningProps = true;n }n }nn return nextUnitOfWork;n}nnfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {n // Refs should update even if shouldComponentUpdate returns falsen markRef(current, workInProgress);n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;nn if (!shouldUpdate && !didCaptureError) {n // Context providers should defer to sCU for renderingn if (hasContext) {n invalidateContextProvider(workInProgress, Component, false);n }nn return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n }nn var instance = workInProgress.stateNode; // Rerendernn ReactCurrentOwner$1.current = workInProgress;n var nextChildren;nn if (didCaptureError && typeof Component.getDerivedStateFromError !== ‚function‘) {n // If we captured an error, but getDerivedStateFromError is not defined,n // unmount all the children. componentDidCatch will schedule an update ton // re-render a fallback. This is temporary until we migrate everyone ton // the new API.n // TODO: Warn in a future release.n nextChildren = null;nn {n stopProfilerTimerIfRunning();n }n } else {n {n setIsRendering(true);n nextChildren = instance.render();nn if ( workInProgress.mode & StrictMode) {n disableLogs();nn try {n instance.render();n } finally {n reenableLogs();n }n }nn setIsRendering(false);n }n } // React DevTools reads this flag.nnn workInProgress.flags |= PerformedWork;nn if (current !== null && didCaptureError) {n // If we’re recovering from an error, reconcile without reusing any ofn // the existing children. Conceptually, the normal children and the childrenn // that are shown on error are two different sets, so we shouldn’t reusen // normal children even if their identities match.n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);n } else {n reconcileChildren(current, workInProgress, nextChildren, renderLanes);n } // Memoize state using the values we just used to render.n // TODO: Restructure so we never read values from the instance.nnn workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.nn if (hasContext) {n invalidateContextProvider(workInProgress, Component, true);n }nn return workInProgress.child;n}nnfunction pushHostRootContext(workInProgress) {n var root = workInProgress.stateNode;nn if (root.pendingContext) {n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);n } else if (root.context) {n // Should always be setn pushTopLevelContextObject(workInProgress, root.context, false);n }nn pushHostContainer(workInProgress, root.containerInfo);n}nnfunction updateHostRoot(current, workInProgress, renderLanes) {n pushHostRootContext(workInProgress);n var updateQueue = workInProgress.updateQueue;nn if (!(current !== null && updateQueue !== null)) {n {n throw Error( „If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn var nextProps = workInProgress.pendingProps;n var prevState = workInProgress.memoizedState;n var prevChildren = prevState !== null ? prevState.element : null;n cloneUpdateQueue(current, workInProgress);n processUpdateQueue(workInProgress, nextProps, null, renderLanes);n var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this propertyn // being called „element“.nn var nextChildren = nextState.element;nn if (nextChildren === prevChildren) {n resetHydrationState();n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n }nn var root = workInProgress.stateNode;nn if (root.hydrate && enterHydrationState(workInProgress)) {n // If we don’t have any current children this might be the first pass.n // We always try to hydrate. If this isn’t a hydration pass there won’tn // be any children to hydrate which is effectively the same thing asn // not hydrating.n {n var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;nn if (mutableSourceEagerHydrationData != null) {n for (var i = 0; i component appears to have a render method, but doesn’t extend React.Component. “ + ‚This is likely to cause errors. Change %s to extend React.Component instead.‘, componentName, componentName);nn didWarnAboutBadClass[componentName] = true;n }n }nn if (workInProgress.mode & StrictMode) {n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);n }nn setIsRendering(true);n ReactCurrentOwner$1.current = workInProgress;n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);n setIsRendering(false);n } // React DevTools reads this flag.nnn workInProgress.flags |= PerformedWork;nn {n // Support for module components is deprecated and is removed behind a flag.n // Whether or not it would crash later, we want to show a good message in DEV first.n if (typeof value === ‚object‘ && value !== null && typeof value.render === ‚function‘ && value.$$typeof === undefined) {n var _componentName = getComponentName(Component) || ‚Unknown‘;nn if (!didWarnAboutModulePatternComponent[_componentName]) {n error(‚The component appears to be a function component that returns a class instance. ‚ + ‚Change %s to a class that extends React.Component instead. ‚ + „If you can’t use a class try assigning the prototype on the function as a workaround. “ + „`%s.prototype = React.Component.prototype`. Don’t use an arrow function since it “ + ‚cannot be called with `new` by React.‘, _componentName, _componentName, _componentName);nn didWarnAboutModulePatternComponent[_componentName] = true;n }n }n }nn if ( // Run these checks in production only if the flag is off.n // Eventually we’ll delete this branch altogether.n typeof value === ‚object‘ && value !== null && typeof value.render === ‚function‘ && value.$$typeof === undefined) {n {n var _componentName2 = getComponentName(Component) || ‚Unknown‘;nn if (!didWarnAboutModulePatternComponent[_componentName2]) {n error(‚The component appears to be a function component that returns a class instance. ‚ + ‚Change %s to a class that extends React.Component instead. ‚ + „If you can’t use a class try assigning the prototype on the function as a workaround. “ + „`%s.prototype = React.Component.prototype`. Don’t use an arrow function since it “ + ‚cannot be called with `new` by React.‘, _componentName2, _componentName2, _componentName2);nn didWarnAboutModulePatternComponent[_componentName2] = true;n }n } // Proceed under the assumption that this is a class instancennn workInProgress.tag = ClassComponent; // Throw out any hooks that were used.nn workInProgress.memoizedState = null;n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.n // During mounting we don’t know the child context yet as the instance doesn’t exist.n // We will invalidate the child context in finishClassComponent() right after rendering.nn var hasContext = false;nn if (isContextProvider(Component)) {n hasContext = true;n pushContextProvider(workInProgress);n } else {n hasContext = false;n }nn workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;n initializeUpdateQueue(workInProgress);n var getDerivedStateFromProps = Component.getDerivedStateFromProps;nn if (typeof getDerivedStateFromProps === ‚function‘) {n applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);n }nn adoptClassInstance(workInProgress, value);n mountClassInstance(workInProgress, Component, props, renderLanes);n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);n } else {n // Proceed under the assumption that this is a function componentn workInProgress.tag = FunctionComponent;nn {nn if ( workInProgress.mode & StrictMode) {n disableLogs();nn try {n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);n } finally {n reenableLogs();n }n }n }nn reconcileChildren(null, workInProgress, value, renderLanes);nn {n validateFunctionComponentInDev(workInProgress, Component);n }nn return workInProgress.child;n }n}nnfunction validateFunctionComponentInDev(workInProgress, Component) {n {n if (Component) {n if (Component.childContextTypes) {n error(‚%s(…): childContextTypes cannot be defined on a function component.‘, Component.displayName || Component.name || ‚Component‘);n }n }nn if (workInProgress.ref !== null) {n var info = “;n var ownerName = getCurrentFiberOwnerNameInDevOrNull();nn if (ownerName) {n info += ‚\n\nCheck the render method of `‘ + ownerName + ‚`.‘;n }nn var warningKey = ownerName || workInProgress._debugID || “;n var debugSource = workInProgress._debugSource;nn if (debugSource) {n warningKey = debugSource.fileName + ‚:‘ + debugSource.lineNumber;n }nn if (!didWarnAboutFunctionRefs[warningKey]) {n didWarnAboutFunctionRefs[warningKey] = true;nn error(‚Function components cannot be given refs. ‚ + ‚Attempts to access this ref will fail. ‚ + ‚Did you mean to use React.forwardRef()?%s‘, info);n }n }nn if (typeof Component.getDerivedStateFromProps === ‚function‘) {n var _componentName3 = getComponentName(Component) || ‚Unknown‘;nn if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {n error(‚%s: Function components do not support getDerivedStateFromProps.‘, _componentName3);nn didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;n }n }nn if (typeof Component.contextType === ‚object‘ && Component.contextType !== null) {n var _componentName4 = getComponentName(Component) || ‚Unknown‘;nn if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {n error(‚%s: Function components do not support contextType.‘, _componentName4);nn didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;n }n }n }n}nnvar SUSPENDED_MARKER = {n dehydrated: null,n retryLane: NoLanen};nnfunction mountSuspenseOffscreenState(renderLanes) {n return {n baseLanes: renderLanesn };n}nnfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {n return {n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)n };n} // TODO: Probably should inline this backnnnfunction shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {n // If we’re already showing a fallback, there are cases where we need ton // remain on that fallback regardless of whether the content has resolved.n // For example, SuspenseList coordinates when nested content appears.n if (current !== null) {n var suspenseState = current.memoizedState;nn if (suspenseState === null) {n // Currently showing content. Don’t hide it, even if ForceSuspenseFallackn // is true. More precise name might be „ForceRemainSuspenseFallback“.n // Note: This is a factoring smell. Can’t remain on a fallback if there’sn // no fallback to remain on.n return false;n }n } // Not currently showing content. Consult the Suspense context.nnn return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);n}nnfunction getRemainingWorkInPrimaryTree(current, renderLanes) {n // TODO: Should not remove render lanes that were pinged during this rendern return removeLanes(current.childLanes, renderLanes);n}nnfunction updateSuspenseComponent(current, workInProgress, renderLanes) {n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.nn {n if (shouldSuspend(workInProgress)) {n workInProgress.flags |= DidCapture;n }n }nn var suspenseContext = suspenseStackCursor.current;n var showFallback = false;n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;nn if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {n // Something in this boundary’s subtree already suspended. Switch ton // rendering the fallback children.n showFallback = true;n workInProgress.flags &= ~DidCapture;n } else {n // Attempting the main contentn if (current === null || current.memoizedState !== null) {n // This is a new mount or this boundary is already showing a fallback state.n // Mark this subtree context as having at least one invisible parent that couldn // handle the fallback state.n // Boundaries without fallbacks or should be avoided are not considered sincen // they cannot handle preferred fallback states.n if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);n }n }n }nn suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);n pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We’re about to reconcile the Suspensen // boundary’s children. This involves some custom reconcilation logic. Twon // main reasons this is so complicated.n //n // First, Legacy Mode has different semantics for backwards compatibility. Then // primary tree will commit in an inconsistent state, so when we do then // second pass to render the fallback, we do some exceedingly, uh, clevern // hacks to make that not totally break. Like transferring effects andn // deletions from hidden tree. In Concurrent Mode, it’s much simpler,n // because we bailout on the primary tree completely and leave it in its oldn // state, no effects. Same as what we do for Offscreen (except thatn // Offscreen doesn’t have the first render pass).n //n // Second is hydration. During hydration, the Suspense fiber has a slightlyn // different layout, where the child points to a dehydrated fragment, whichn // contains the DOM rendered by the server.n //n // Third, even if you set all that aside, Suspense is like error boundaries inn // that we first we try to render one tree, and if that fails, we render againn // and switch to a different tree. Like a try/catch block. So we have to trackn // which branch we’re currently rendering. Ideally we would model this usingn // a stack.nn if (current === null) {n // Initial mountn // If we’re currently hydrating, try to hydrate this boundary.n // But only if this has a fallback.n if (nextProps.fallback !== undefined) {n tryToClaimNextHydratableInstance(workInProgress); // This could’ve been a dehydrated suspense component.n }nn var nextPrimaryChildren = nextProps.children;n var nextFallbackChildren = nextProps.fallback;nn if (showFallback) {n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);n var primaryChildFragment = workInProgress.child;n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);n workInProgress.memoizedState = SUSPENDED_MARKER;n return fallbackFragment;n } else if (typeof nextProps.unstable_expectedLoadTime === ’number‘) {n // This is a CPU-bound tree. Skip this tree and show a placeholder ton // unblock the surrounding content. Then immediately retry after then // initial commit.n var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);nn var _primaryChildFragment = workInProgress.child;n _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);n workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this ton // get it started back up to attempt the next item. While in terms ofn // priority this work has the same priority as this current render, it’sn // not part of the same transition once the transition has committed. Ifn // it’s sync, we still want to yield so that it can be painted.n // Conceptually, this is really the same as pinging. We can use anyn // RetryLane even if it’s the one currently rendering since we’re leavingn // it behind on this node.nn workInProgress.lanes = SomeRetryLane;nn {n markSpawnedWork(SomeRetryLane);n }nn return _fallbackFragment;n } else {n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);n }n } else {n // This is an update.n // If the current fiber has a SuspenseState, that means it’s already showingn // a fallback.n var prevState = current.memoizedState;nn if (prevState !== null) {nn if (showFallback) {n var _nextFallbackChildren2 = nextProps.fallback;n var _nextPrimaryChildren2 = nextProps.children;nn var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);nn var _primaryChildFragment3 = workInProgress.child;n var prevOffscreenState = current.child.memoizedState;n _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);n _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);n workInProgress.memoizedState = SUSPENDED_MARKER;n return _fallbackChildFragment;n } else {n var _nextPrimaryChildren3 = nextProps.children;nn var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);nn workInProgress.memoizedState = null;n return _primaryChildFragment4;n }n } else {n // The current tree is not already showing a fallback.n if (showFallback) {n // Timed out.n var _nextFallbackChildren3 = nextProps.fallback;n var _nextPrimaryChildren4 = nextProps.children;nn var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);nn var _primaryChildFragment5 = workInProgress.child;n var _prevOffscreenState = current.child.memoizedState;n _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);n _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on then // fallback children.nn workInProgress.memoizedState = SUSPENDED_MARKER;n return _fallbackChildFragment2;n } else {n // Still haven’t timed out. Continue rendering the children, like wen // normally do.n var _nextPrimaryChildren5 = nextProps.children;nn var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);nn workInProgress.memoizedState = null;n return _primaryChildFragment6;n }n }n }n}nnfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {n var mode = workInProgress.mode;n var primaryChildProps = {n mode: ‚visible‘,n children: primaryChildrenn };n var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);n primaryChildFragment.return = workInProgress;n workInProgress.child = primaryChildFragment;n return primaryChildFragment;n}nnfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {n var mode = workInProgress.mode;n var progressedPrimaryFragment = workInProgress.child;n var primaryChildProps = {n mode: ‚hidden‘,n children: primaryChildrenn };n var primaryChildFragment;n var fallbackChildFragment;nn if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {n // In legacy mode, we commit the primary tree as if it successfullyn // completed, even though it’s in an inconsistent state.n primaryChildFragment = progressedPrimaryFragment;n primaryChildFragment.childLanes = NoLanes;n primaryChildFragment.pendingProps = primaryChildProps;nn if ( workInProgress.mode & ProfileMode) {n // Reset the durations from the first pass so they aren’t included in then // final amounts. This seems counterintuitive, since we’re intentionallyn // not measuring part of the render phase, but this makes it match what wen // do in Concurrent Mode.n primaryChildFragment.actualDuration = 0;n primaryChildFragment.actualStartTime = -1;n primaryChildFragment.selfBaseDuration = 0;n primaryChildFragment.treeBaseDuration = 0;n }nn fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);n } else {n primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);n }nn primaryChildFragment.return = workInProgress;n fallbackChildFragment.return = workInProgress;n primaryChildFragment.sibling = fallbackChildFragment;n workInProgress.child = primaryChildFragment;n return fallbackChildFragment;n}nnfunction createWorkInProgressOffscreenFiber(current, offscreenProps) {n // The props argument to `createWorkInProgress` is `any` typed, so we use thisn // wrapper function to constrain it.n return createWorkInProgress(current, offscreenProps);n}nnfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {n var currentPrimaryChildFragment = current.child;n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;n var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {n mode: ‚visible‘,n children: primaryChildrenn });nn if ((workInProgress.mode & BlockingMode) === NoMode) {n primaryChildFragment.lanes = renderLanes;n }nn primaryChildFragment.return = workInProgress;n primaryChildFragment.sibling = null;nn if (currentFallbackChildFragment !== null) {n // Delete the fallback child fragmentn currentFallbackChildFragment.nextEffect = null;n currentFallbackChildFragment.flags = Deletion;n workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;n }nn workInProgress.child = primaryChildFragment;n return primaryChildFragment;n}nnfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {n var mode = workInProgress.mode;n var currentPrimaryChildFragment = current.child;n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;n var primaryChildProps = {n mode: ‚hidden‘,n children: primaryChildrenn };n var primaryChildFragment;nn if ( // In legacy mode, we commit the primary tree as if it successfullyn // completed, even though it’s in an inconsistent state.n (mode & BlockingMode) === NoMode && // Make sure we’re on the second pass, i.e. the primary child fragment wasn // already cloned. In legacy mode, the only case where this isn’t true isn // when DevTools forces us to display a fallback; we skip the first rendern // pass entirely and go straight to rendering the fallback. (In Concurrentn // Mode, SuspenseList can also trigger this scenario, but this is a legacy-n // only codepath.)n workInProgress.child !== currentPrimaryChildFragment) {n var progressedPrimaryFragment = workInProgress.child;n primaryChildFragment = progressedPrimaryFragment;n primaryChildFragment.childLanes = NoLanes;n primaryChildFragment.pendingProps = primaryChildProps;nn if ( workInProgress.mode & ProfileMode) {n // Reset the durations from the first pass so they aren’t included in then // final amounts. This seems counterintuitive, since we’re intentionallyn // not measuring part of the render phase, but this makes it match what wen // do in Concurrent Mode.n primaryChildFragment.actualDuration = 0;n primaryChildFragment.actualStartTime = -1;n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;n } // The fallback fiber was added as a deletion effect during the first pass.n // However, since we’re going to remain on the fallback, we no longer wantn // to delete it. So we need to remove it from the list. Deletions are storedn // on the same list as effects. We want to keep the effects from the primaryn // tree. So we copy the primary child fragment’s effect list, which does notn // include the fallback deletion effect.nnn var progressedLastEffect = primaryChildFragment.lastEffect;nn if (progressedLastEffect !== null) {n workInProgress.firstEffect = primaryChildFragment.firstEffect;n workInProgress.lastEffect = progressedLastEffect;n progressedLastEffect.nextEffect = null;n } else {n // TODO: Reset this somewhere else? Lol legacy mode is so weird.n workInProgress.firstEffect = workInProgress.lastEffect = null;n }n } else {n primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);n }nn var fallbackChildFragment;nn if (currentFallbackChildFragment !== null) {n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);n } else {n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) alreadyn // mounted but this is a new fiber.nn fallbackChildFragment.flags |= Placement;n }nn fallbackChildFragment.return = workInProgress;n primaryChildFragment.return = workInProgress;n primaryChildFragment.sibling = fallbackChildFragment;n workInProgress.child = primaryChildFragment;n return fallbackChildFragment;n}nnfunction scheduleWorkOnFiber(fiber, renderLanes) {n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);n var alternate = fiber.alternate;nn if (alternate !== null) {n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);n }nn scheduleWorkOnParentPath(fiber.return, renderLanes);n}nnfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {n // Mark any Suspense boundaries with fallbacks as having work to do.n // If they were previously forced into fallbacks, they may now be ablen // to unblock.n var node = firstChild;nn while (node !== null) {n if (node.tag === SuspenseComponent) {n var state = node.memoizedState;nn if (state !== null) {n scheduleWorkOnFiber(node, renderLanes);n }n } else if (node.tag === SuspenseListComponent) {n // If the tail is hidden there might not be an Suspense boundariesn // to schedule work on. In this case we have to schedule it on then // list itself.n // We don’t have to traverse to the children of the list sincen // the list will propagate the change when it rerenders.n scheduleWorkOnFiber(node, renderLanes);n } else if (node.child !== null) {n node.child.return = node;n node = node.child;n continue;n }nn if (node === workInProgress) {n return;n }nn while (node.sibling === null) {n if (node.return === null || node.return === workInProgress) {n return;n }nn node = node.return;n }nn node.sibling.return = node.return;n node = node.sibling;n }n}nnfunction findLastContentRow(firstChild) {n // This is going to find the last row among these children that is alreadyn // showing content on the screen, as opposed to being in fallback state orn // new. If a row has multiple Suspense boundaries, any of them being in then // fallback state, counts as the whole row being in a fallback state.n // Note that the „rows“ will be workInProgress, but any nested childrenn // will still be current since we haven’t rendered them yet. The mountedn // order may not be the same as the new order. We use the new order.n var row = firstChild;n var lastContentRow = null;nn while (row !== null) {n var currentRow = row.alternate; // New rows can’t be content rows.nn if (currentRow !== null && findFirstSuspended(currentRow) === null) {n lastContentRow = row;n }nn row = row.sibling;n }nn return lastContentRow;n}nnfunction validateRevealOrder(revealOrder) {n {n if (revealOrder !== undefined && revealOrder !== ‚forwards‘ && revealOrder !== ‚backwards‘ && revealOrder !== ‚together‘ && !didWarnAboutRevealOrder[revealOrder]) {n didWarnAboutRevealOrder[revealOrder] = true;nn if (typeof revealOrder === ’string‘) {n switch (revealOrder.toLowerCase()) {n case ‚together‘:n case ‚forwards‘:n case ‚backwards‘:n {n error(‚“%s“ is not a valid value for revealOrder on . ‚ + ‚Use lowercase „%s“ instead.‘, revealOrder, revealOrder.toLowerCase());nn break;n }nn case ‚forward‘:n case ‚backward‘:n {n error(‚“%s“ is not a valid value for revealOrder on . ‚ + ‚React uses the -s suffix in the spelling. Use „%ss“ instead.‘, revealOrder, revealOrder.toLowerCase());nn break;n }nn default:n error(‚“%s“ is not a supported revealOrder on . ‚ + ‚Did you mean „together“, „forwards“ or „backwards“?‘, revealOrder);nn break;n }n } else {n error(‚%s is not a supported value for revealOrder on . ‚ + ‚Did you mean „together“, „forwards“ or „backwards“?‘, revealOrder);n }n }n }n}nnfunction validateTailOptions(tailMode, revealOrder) {n {n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {n if (tailMode !== ‚collapsed‘ && tailMode !== ‚hidden‘) {n didWarnAboutTailOptions[tailMode] = true;nn error(‚“%s“ is not a supported value for tail on . ‚ + ‚Did you mean „collapsed“ or „hidden“?‘, tailMode);n } else if (revealOrder !== ‚forwards‘ && revealOrder !== ‚backwards‘) {n didWarnAboutTailOptions[tailMode] = true;nn error(‚ is only valid if revealOrder is ‚ + ‚“forwards“ or „backwards“. ‚ + ‚Did you mean to specify revealOrder=“forwards“?‘, tailMode);n }n }n }n}nnfunction validateSuspenseListNestedChild(childSlot, index) {n {n var isArray = Array.isArray(childSlot);n var isIterable = !isArray && typeof getIteratorFn(childSlot) === ‚function‘;nn if (isArray || isIterable) {n var type = isArray ? ‚array‘ : ‚iterable‘;nn error(‚A nested %s was passed to row #%s in . Wrap it in ‚ + ‚an additional SuspenseList to configure its revealOrder: ‚ + ‚ … ‚ + ‚{%s} … ‚ + “, type, index, type);nn return false;n }n }nn return true;n}nnfunction validateSuspenseListChildren(children, revealOrder) {n {n if ((revealOrder === ‚forwards‘ || revealOrder === ‚backwards‘) && children !== undefined && children !== null && children !== false) {n if (Array.isArray(children)) {n for (var i = 0; i . ‚ + ‚This is not useful since it needs multiple rows. ‚ + ‚Did you mean to pass multiple children or an array?‘, revealOrder);n }n }n }n }n}nnfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {n var renderState = workInProgress.memoizedState;nn if (renderState === null) {n workInProgress.memoizedState = {n isBackwards: isBackwards,n rendering: null,n renderingStartTime: 0,n last: lastContentRow,n tail: tail,n tailMode: tailMode,n lastEffect: lastEffectBeforeRenderingn };n } else {n // We can reuse the existing object from previous renders.n renderState.isBackwards = isBackwards;n renderState.rendering = null;n renderState.renderingStartTime = 0;n renderState.last = lastContentRow;n renderState.tail = tail;n renderState.tailMode = tailMode;n renderState.lastEffect = lastEffectBeforeRendering;n }n} // This can end up rendering this component multiple passes.n// The first pass splits the children fibers into two sets. A head and tail.n// We first render the head. If anything is in fallback state, we do anothern// pass through beginWork to rerender all children (including the tail) withn// the force suspend context. If the first render didn’t have anything inn// in fallback state. Then we render each row in the tail one-by-one.n// That happens in the completeWork phase without going back to beginWork.nnnfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {n var nextProps = workInProgress.pendingProps;n var revealOrder = nextProps.revealOrder;n var tailMode = nextProps.tail;n var newChildren = nextProps.children;n validateRevealOrder(revealOrder);n validateTailOptions(tailMode, revealOrder);n validateSuspenseListChildren(newChildren, revealOrder);n reconcileChildren(current, workInProgress, newChildren, renderLanes);n var suspenseContext = suspenseStackCursor.current;n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);nn if (shouldForceFallback) {n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);n workInProgress.flags |= DidCapture;n } else {n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;nn if (didSuspendBefore) {n // If we previously forced a fallback, we need to schedule workn // on any nested boundaries to let them know to try to rendern // again. This is the same as context updating.n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);n }nn suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);n }nn pushSuspenseContext(workInProgress, suspenseContext);nn if ((workInProgress.mode & BlockingMode) === NoMode) {n // In legacy mode, SuspenseList doesn’t work so we justn // use make it a noop by treating it as the default revealOrder.n workInProgress.memoizedState = null;n } else {n switch (revealOrder) {n case ‚forwards‘:n {n var lastContentRow = findLastContentRow(workInProgress.child);n var tail;nn if (lastContentRow === null) {n // The whole list is part of the tail.n // TODO: We could fast path by just rendering the tail now.n tail = workInProgress.child;n workInProgress.child = null;n } else {n // Disconnect the tail rows after the content row.n // We’re going to render them separately later.n tail = lastContentRow.sibling;n lastContentRow.sibling = null;n }nn initSuspenseListRenderState(workInProgress, false, // isBackwardsn tail, lastContentRow, tailMode, workInProgress.lastEffect);n break;n }nn case ‚backwards‘:n {n // We’re going to find the first row that has existing content.n // At the same time we’re going to reverse the list of everythingn // we pass in the meantime. That’s going to be our tail in reversen // order.n var _tail = null;n var row = workInProgress.child;n workInProgress.child = null;nn while (row !== null) {n var currentRow = row.alternate; // New rows can’t be content rows.nn if (currentRow !== null && findFirstSuspended(currentRow) === null) {n // This is the beginning of the main content.n workInProgress.child = row;n break;n }nn var nextRow = row.sibling;n row.sibling = _tail;n _tail = row;n row = nextRow;n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.nnn initSuspenseListRenderState(workInProgress, true, // isBackwardsn _tail, null, // lastn tailMode, workInProgress.lastEffect);n break;n }nn case ‚together‘:n {n initSuspenseListRenderState(workInProgress, false, // isBackwardsn null, // tailn null, // lastn undefined, workInProgress.lastEffect);n break;n }nn default:n {n // The default reveal order is the same as not havingn // a boundary.n workInProgress.memoizedState = null;n }n }n }nn return workInProgress.child;n}nnfunction updatePortalComponent(current, workInProgress, renderLanes) {n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);n var nextChildren = workInProgress.pendingProps;nn if (current === null) {n // Portals are special because we don’t append the children during mountn // but at commit. Therefore we need to track insertions which the normaln // flow doesn’t do during mount. This doesn’t happen at the root becausen // the root always starts with a „current“ with a null child.n // TODO: Consider unifying this with how the root works.n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);n } else {n reconcileChildren(current, workInProgress, nextChildren, renderLanes);n }nn return workInProgress.child;n}nnvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;nnfunction updateContextProvider(current, workInProgress, renderLanes) {n var providerType = workInProgress.type;n var context = providerType._context;n var newProps = workInProgress.pendingProps;n var oldProps = workInProgress.memoizedProps;n var newValue = newProps.value;nn {n if (!(‚value‘ in newProps)) {n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {n hasWarnedAboutUsingNoValuePropOnContextProvider = true;nn error(‚The `value` prop is required for the „. Did you misspell it or forget to pass it?‘);n }n }nn var providerPropTypes = workInProgress.type.propTypes;nn if (providerPropTypes) {n checkPropTypes(providerPropTypes, newProps, ‚prop‘, ‚Context.Provider‘);n }n }nn pushProvider(workInProgress, newValue);nn if (oldProps !== null) {n var oldValue = oldProps.value;n var changedBits = calculateChangedBits(context, newValue, oldValue);nn if (changedBits === 0) {n // No change. Bailout early if children are the same.n if (oldProps.children === newProps.children && !hasContextChanged()) {n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n }n } else {n // The context value changed. Search for matching consumers and schedulen // them to update.n propagateContextChange(workInProgress, context, changedBits, renderLanes);n }n }nn var newChildren = newProps.children;n reconcileChildren(current, workInProgress, newChildren, renderLanes);n return workInProgress.child;n}nnvar hasWarnedAboutUsingContextAsConsumer = false;nnfunction updateContextConsumer(current, workInProgress, renderLanes) {n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. Inn // DEV mode, we create a separate object for Context.Consumer that actsn // like a proxy to Context. This proxy object adds unnecessary code in PRODn // so we use the old behaviour (Context.Consumer references Context) ton // reduce size and overhead. The separate object references context vian // a property called „_context“, which also gives us the ability to checkn // in DEV mode if this property exists or not and warn if it does not.nn {n if (context._context === undefined) {n // This may be because it’s a Context (rather than a Consumer).n // Or it may be because it’s older React where they’re the same thing.n // We only want to warn if we’re sure it’s a new React.n if (context !== context.Consumer) {n if (!hasWarnedAboutUsingContextAsConsumer) {n hasWarnedAboutUsingContextAsConsumer = true;nn error(‚Rendering directly is not supported and will be removed in ‚ + ‚a future major release. Did you mean to render instead?‘);n }n }n } else {n context = context._context;n }n }nn var newProps = workInProgress.pendingProps;n var render = newProps.children;nn {n if (typeof render !== ‚function‘) {n error(‚A context consumer was rendered with multiple children, or a child ‚ + „that isn’t a function. A context consumer expects a single child “ + ‚that is a function. If you did pass a function, make sure there ‚ + ‚is no trailing or leading whitespace around it.‘);n }n }nn prepareToReadContext(workInProgress, renderLanes);n var newValue = readContext(context, newProps.unstable_observedBits);n var newChildren;nn {n ReactCurrentOwner$1.current = workInProgress;n setIsRendering(true);n newChildren = render(newValue);n setIsRendering(false);n } // React DevTools reads this flag.nnn workInProgress.flags |= PerformedWork;n reconcileChildren(current, workInProgress, newChildren, renderLanes);n return workInProgress.child;n}nnfunction markWorkInProgressReceivedUpdate() {n didReceiveUpdate = true;n}nnfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {n if (current !== null) {n // Reuse previous dependenciesn workInProgress.dependencies = current.dependencies;n }nn {n // Don’t update „base“ render times for bailouts.n stopProfilerTimerIfRunning();n }nn markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.nn if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {n // The children don’t have any work either. We can skip them.n // TODO: Once we add back resuming, we should check if the children aren // a work-in-progress set. If so, we need to transfer their effects.n return null;n } else {n // This fiber doesn’t have work, but its subtree does. Clone the childn // fibers and continue.n cloneChildFibers(current, workInProgress);n return workInProgress.child;n }n}nnfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {n {n var returnFiber = oldWorkInProgress.return;nn if (returnFiber === null) {n throw new Error(‚Cannot swap the root fiber.‘);n } // Disconnect from the old current.n // It will get deleted.nnn current.alternate = null;n oldWorkInProgress.alternate = null; // Connect to the new tree.nn newWorkInProgress.index = oldWorkInProgress.index;n newWorkInProgress.sibling = oldWorkInProgress.sibling;n newWorkInProgress.return = oldWorkInProgress.return;n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.nn if (oldWorkInProgress === returnFiber.child) {n returnFiber.child = newWorkInProgress;n } else {n var prevSibling = returnFiber.child;nn if (prevSibling === null) {n throw new Error(‚Expected parent to have a child.‘);n }nn while (prevSibling.sibling !== oldWorkInProgress) {n prevSibling = prevSibling.sibling;nn if (prevSibling === null) {n throw new Error(‚Expected to find the previous sibling.‘);n }n }nn prevSibling.sibling = newWorkInProgress;n } // Delete the old fiber and place the new one.n // Since the old fiber is disconnected, we have to schedule it manually.nnn var last = returnFiber.lastEffect;nn if (last !== null) {n last.nextEffect = current;n returnFiber.lastEffect = current;n } else {n returnFiber.firstEffect = returnFiber.lastEffect = current;n }nn current.nextEffect = null;n current.flags = Deletion;n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.nn return newWorkInProgress;n }n}nnfunction beginWork(current, workInProgress, renderLanes) {n var updateLanes = workInProgress.lanes;nn {n if (workInProgress._debugNeedsRemount && current !== null) {n // This will restart the begin phase with a new fiber.n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));n }n }nn if (current !== null) {n var oldProps = current.memoizedProps;n var newProps = workInProgress.pendingProps;nn if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:n workInProgress.type !== current.type )) {n // If props or context changed, mark the fiber as having performed work.n // This may be unset if the props are determined to be equal later (memo).n didReceiveUpdate = true;n } else if (!includesSomeLane(renderLanes, updateLanes)) {n didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without enteringn // the begin phase. There’s still some bookkeeping we that needs to be donen // in this optimized path, mostly pushing stuff onto the stack.nn switch (workInProgress.tag) {n case HostRoot:n pushHostRootContext(workInProgress);n resetHydrationState();n break;nn case HostComponent:n pushHostContext(workInProgress);n break;nn case ClassComponent:n {n var Component = workInProgress.type;nn if (isContextProvider(Component)) {n pushContextProvider(workInProgress);n }nn break;n }nn case HostPortal:n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);n break;nn case ContextProvider:n {n var newValue = workInProgress.memoizedProps.value;n pushProvider(workInProgress, newValue);n break;n }nn case Profiler:n {n // Profiler should only call onRender when one of its descendants actually rendered.n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);nn if (hasChildWork) {n workInProgress.flags |= Update;n } // Reset effect durations for the next eventual effect phase.n // These are reset during render to allow the DevTools commit hook a chance to read them,nnn var stateNode = workInProgress.stateNode;n stateNode.effectDuration = 0;n stateNode.passiveEffectDuration = 0;n }nn break;nn case SuspenseComponent:n {n var state = workInProgress.memoizedState;nn if (state !== null) {n // whether to retry the primary children, or to skip over it andn // go straight to the fallback. Check the priority of the primaryn // child fragment.nnn var primaryChildFragment = workInProgress.child;n var primaryChildLanes = primaryChildFragment.childLanes;nn if (includesSomeLane(renderLanes, primaryChildLanes)) {n // The primary children have pending work. Use the normal pathn // to attempt to render the primary children again.n return updateSuspenseComponent(current, workInProgress, renderLanes);n } else {n // The primary child fragment does not have pending work markedn // on itn pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficientn // priority. Bailout.nn var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);nn if (child !== null) {n // The fallback children have pending work. Skip over then // primary children and work on the fallback.n return child.sibling;n } else {n return null;n }n }n } else {n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));n }nn break;n }nn case SuspenseListComponent:n {n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;nn var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);nn if (didSuspendBefore) {n if (_hasChildWork) {n // If something was in fallback state last time, and we have all then // same children then we’re still in progressive loading state.n // Something might get unblocked by state updates or retries in then // tree which will affect the tail. So we need to use the normaln // path to compute the correct tail.n return updateSuspenseListComponent(current, workInProgress, renderLanes);n } // If none of the children had any work, that means that none ofn // them got retried so they’ll still be blocked in the same wayn // as before. We can fast bail out.nnn workInProgress.flags |= DidCapture;n } // If nothing suspended before and we’re rendering the same children,n // then the tail doesn’t matter. Anything new that suspends will workn // in the „together“ mode, so we can continue from the state we had.nnn var renderState = workInProgress.memoizedState;nn if (renderState !== null) {n // Reset to the „together“ mode in case we’ve started a differentn // update in the past but didn’t complete it.n renderState.rendering = null;n renderState.tail = null;n renderState.lastEffect = null;n }nn pushSuspenseContext(workInProgress, suspenseStackCursor.current);nn if (_hasChildWork) {n break;n } else {n // If none of the children had any work, that means that none ofn // them got retried so they’ll still be blocked in the same wayn // as before. We can fast bail out.n return null;n }n }nn case OffscreenComponent:n case LegacyHiddenComponent:n {n // Need to check if the tree still needs to be deferred. This isn // almost identical to the logic used in the normal update path,n // so we’ll just enter that. The only difference is we’ll bail outn // at the next level instead of this one, because the child propsn // have not changed. Which is fine.n // TODO: Probably should refactor `beginWork` to split the bailoutn // path from the normal path. I’m tempted to do a labeled break heren // but I won’t :)n workInProgress.lanes = NoLanes;n return updateOffscreenComponent(current, workInProgress, renderLanes);n }n }nn return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);n } else {n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {n // This is a special case that only exists for legacy mode.n // See https://github.com/facebook/react/pull/19216.n didReceiveUpdate = true;n } else {n // An update was scheduled on this fiber, but there are no new propsn // nor legacy context. Set this to false. If an update queue or contextn // consumer produces a changed value, it will set this to true. Otherwise,n // the component will assume the children have not changed and bail out.n didReceiveUpdate = false;n }n }n } else {n didReceiveUpdate = false;n } // Before entering the begin phase, clear pending update priority.n // TODO: This assumes that we’re about to evaluate the component and processn // the update queue. However, there’s an exception: SimpleMemoComponentn // sometimes bails out later in the begin phase. This indicates that we shouldn // move this assignment out of the common path and into each branch.nnn workInProgress.lanes = NoLanes;nn switch (workInProgress.tag) {n case IndeterminateComponent:n {n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);n }nn case LazyComponent:n {n var elementType = workInProgress.elementType;n return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);n }nn case FunctionComponent:n {n var _Component = workInProgress.type;n var unresolvedProps = workInProgress.pendingProps;n var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);n return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);n }nn case ClassComponent:n {n var _Component2 = workInProgress.type;n var _unresolvedProps = workInProgress.pendingProps;nn var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);nn return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);n }nn case HostRoot:n return updateHostRoot(current, workInProgress, renderLanes);nn case HostComponent:n return updateHostComponent(current, workInProgress, renderLanes);nn case HostText:n return updateHostText(current, workInProgress);nn case SuspenseComponent:n return updateSuspenseComponent(current, workInProgress, renderLanes);nn case HostPortal:n return updatePortalComponent(current, workInProgress, renderLanes);nn case ForwardRef:n {n var type = workInProgress.type;n var _unresolvedProps2 = workInProgress.pendingProps;nn var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);nn return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);n }nn case Fragment:n return updateFragment(current, workInProgress, renderLanes);nn case Mode:n return updateMode(current, workInProgress, renderLanes);nn case Profiler:n return updateProfiler(current, workInProgress, renderLanes);nn case ContextProvider:n return updateContextProvider(current, workInProgress, renderLanes);nn case ContextConsumer:n return updateContextConsumer(current, workInProgress, renderLanes);nn case MemoComponent:n {n var _type2 = workInProgress.type;n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.nn var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);nn {n if (workInProgress.type !== workInProgress.elementType) {n var outerPropTypes = _type2.propTypes;nn if (outerPropTypes) {n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer onlyn ‚prop‘, getComponentName(_type2));n }n }n }nn _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);n }nn case SimpleMemoComponent:n {n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);n }nn case IncompleteClassComponent:n {n var _Component3 = workInProgress.type;n var _unresolvedProps4 = workInProgress.pendingProps;nn var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);nn return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);n }nn case SuspenseListComponent:n {n return updateSuspenseListComponent(current, workInProgress, renderLanes);n }nn case FundamentalComponent:n {nn break;n }nn case ScopeComponent:n {nn break;n }nn case Block:n {nn break;n }nn case OffscreenComponent:n {n return updateOffscreenComponent(current, workInProgress, renderLanes);n }nn case LegacyHiddenComponent:n {n return updateLegacyHiddenComponent(current, workInProgress, renderLanes);n }n }nn {n {n throw Error( „Unknown unit of work tag (“ + workInProgress.tag + „). This error is likely caused by a bug in React. Please file an issue.“ );n }n }n}nnfunction markUpdate(workInProgress) {n // Tag the fiber with an update effect. This turns a Placement inton // a PlacementAndUpdate.n workInProgress.flags |= Update;n}nnfunction markRef$1(workInProgress) {n workInProgress.flags |= Ref;n}nnvar appendAllChildren;nvar updateHostContainer;nvar updateHostComponent$1;nvar updateHostText$1;nn{n // Mutation moden appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {n // We only have the top Fiber that was created but we need recurse down itsn // children to find all the terminal nodes.n var node = workInProgress.child;nn while (node !== null) {n if (node.tag === HostComponent || node.tag === HostText) {n appendInitialChild(parent, node.stateNode);n } else if (node.tag === HostPortal) ; else if (node.child !== null) {n node.child.return = node;n node = node.child;n continue;n }nn if (node === workInProgress) {n return;n }nn while (node.sibling === null) {n if (node.return === null || node.return === workInProgress) {n return;n }nn node = node.return;n }nn node.sibling.return = node.return;n node = node.sibling;n }n };nn updateHostContainer = function (workInProgress) {// Noopn };nn updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {n // If we have an alternate, that means this is an update and we need ton // schedule a side-effect to do the updates.n var oldProps = current.memoizedProps;nn if (oldProps === newProps) {n // In mutation mode, this is sufficient for a bailout becausen // we won’t touch this node even if children changed.n return;n } // If we get updated because one of our children updated, we don’tn // have newProps so we’ll have to reuse them.n // TODO: Split the update API as separate for the props vs. children.n // Even better would be if children weren’t special cased at all tho.nnn var instance = workInProgress.stateNode;n var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a hostn // component is hitting the resume path. Figure out why. Possiblyn // related to `hidden`.nn var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.nn workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if theren // is a new ref we mark this as an update. All the work is done in commitWork.nn if (updatePayload) {n markUpdate(workInProgress);n }n };nn updateHostText$1 = function (current, workInProgress, oldText, newText) {n // If the text differs, mark it as an update. All the work in done in commitWork.n if (oldText !== newText) {n markUpdate(workInProgress);n }n };n}nnfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {n if (getIsHydrating()) {n // If we’re hydrating, we should consume as many items as we cann // so we don’t leave any behind.n return;n }nn switch (renderState.tailMode) {n case ‚hidden‘:n {n // Any insertions at the end of the tail list after this pointn // should be invisible. If there are already mounted boundariesn // anything before them are not considered for collapsing.n // Therefore we need to go through the whole tail to find ifn // there are any.n var tailNode = renderState.tail;n var lastTailNode = null;nn while (tailNode !== null) {n if (tailNode.alternate !== null) {n lastTailNode = tailNode;n }nn tailNode = tailNode.sibling;n } // Next we’re simply going to delete all insertions after then // last rendered item.nnn if (lastTailNode === null) {n // All remaining items in the tail are insertions.n renderState.tail = null;n } else {n // Detach the insertion after the last node that was alreadyn // inserted.n lastTailNode.sibling = null;n }nn break;n }nn case ‚collapsed‘:n {n // Any insertions at the end of the tail list after this pointn // should be invisible. If there are already mounted boundariesn // anything before them are not considered for collapsing.n // Therefore we need to go through the whole tail to find ifn // there are any.n var _tailNode = renderState.tail;n var _lastTailNode = null;nn while (_tailNode !== null) {n if (_tailNode.alternate !== null) {n _lastTailNode = _tailNode;n }nn _tailNode = _tailNode.sibling;n } // Next we’re simply going to delete all insertions after then // last rendered item.nnn if (_lastTailNode === null) {n // All remaining items in the tail are insertions.n if (!hasRenderedATailFallback && renderState.tail !== null) {n // We suspended during the head. We want to show at least onen // row at the tail. So we’ll keep on and cut off the rest.n renderState.tail.sibling = null;n } else {n renderState.tail = null;n }n } else {n // Detach the insertion after the last node that was alreadyn // inserted.n _lastTailNode.sibling = null;n }nn break;n }n }n}nnfunction completeWork(current, workInProgress, renderLanes) {n var newProps = workInProgress.pendingProps;nn switch (workInProgress.tag) {n case IndeterminateComponent:n case LazyComponent:n case SimpleMemoComponent:n case FunctionComponent:n case ForwardRef:n case Fragment:n case Mode:n case Profiler:n case ContextConsumer:n case MemoComponent:n return null;nn case ClassComponent:n {n var Component = workInProgress.type;nn if (isContextProvider(Component)) {n popContext(workInProgress);n }nn return null;n }nn case HostRoot:n {n popHostContainer(workInProgress);n popTopLevelContextObject(workInProgress);n resetWorkInProgressVersions();n var fiberRoot = workInProgress.stateNode;nn if (fiberRoot.pendingContext) {n fiberRoot.context = fiberRoot.pendingContext;n fiberRoot.pendingContext = null;n }nn if (current === null || current.child === null) {n // If we hydrated, pop so that we can delete any remaining childrenn // that weren’t hydrated.n var wasHydrated = popHydrationState(workInProgress);nn if (wasHydrated) {n // If we hydrated, then we’ll need to schedule an update forn // the commit side-effects on the root.n markUpdate(workInProgress);n } else if (!fiberRoot.hydrate) {n // Schedule an effect to clear this container at the start of the next commit.n // This handles the case of React rendering into a container with previous children.n // It’s also safe to do for updates too, because current.child would only be nulln // if the previous render was null (so the the container would already be empty).n workInProgress.flags |= Snapshot;n }n }nn updateHostContainer(workInProgress);n return null;n }nn case HostComponent:n {n popHostContext(workInProgress);n var rootContainerInstance = getRootHostContainer();n var type = workInProgress.type;nn if (current !== null && workInProgress.stateNode != null) {n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);nn if (current.ref !== workInProgress.ref) {n markRef$1(workInProgress);n }n } else {n if (!newProps) {n if (!(workInProgress.stateNode !== null)) {n {n throw Error( „We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.“ );n }n } // This can happen when we abort work.nnn return null;n }nn var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a contextn // „stack“ as the parent. Then append children as we go in beginWorkn // or completeWork depending on whether we want to add them top->down orn // bottom->up. Top->down is faster in IE11.nn var _wasHydrated = popHydrationState(workInProgress);nn if (_wasHydrated) {n // TODO: Move this and createInstance step into the beginPhasen // to consolidate.n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {n // If changes to the hydrated node need to be applied at then // commit-phase we mark this as such.n markUpdate(workInProgress);n }n } else {n var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);n appendAllChildren(instance, workInProgress, false, false);n workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.n // (eg DOM renderer supports auto-focus for certain elements).n // Make sure such renderers get scheduled for later work.nn if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {n markUpdate(workInProgress);n }n }nn if (workInProgress.ref !== null) {n // If there is a ref on a host node we need to schedule a callbackn markRef$1(workInProgress);n }n }nn return null;n }nn case HostText:n {n var newText = newProps;nn if (current && workInProgress.stateNode != null) {n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we needn // to schedule a side-effect to do the updates.nn updateHostText$1(current, workInProgress, oldText, newText);n } else {n if (typeof newText !== ’string‘) {n if (!(workInProgress.stateNode !== null)) {n {n throw Error( „We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.“ );n }n } // This can happen when we abort work.nn }nn var _rootContainerInstance = getRootHostContainer();nn var _currentHostContext = getHostContext();nn var _wasHydrated2 = popHydrationState(workInProgress);nn if (_wasHydrated2) {n if (prepareToHydrateHostTextInstance(workInProgress)) {n markUpdate(workInProgress);n }n } else {n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);n }n }nn return null;n }nn case SuspenseComponent:n {n popSuspenseContext(workInProgress);n var nextState = workInProgress.memoizedState;nn if ((workInProgress.flags & DidCapture) !== NoFlags) {n // Something suspended. Re-render with the fallback children.n workInProgress.lanes = renderLanes; // Do not reset the effect list.nn if ( (workInProgress.mode & ProfileMode) !== NoMode) {n transferActualDuration(workInProgress);n }nn return workInProgress;n }nn var nextDidTimeout = nextState !== null;n var prevDidTimeout = false;nn if (current === null) {n if (workInProgress.memoizedProps.fallback !== undefined) {n popHydrationState(workInProgress);n }n } else {n var prevState = current.memoizedState;n prevDidTimeout = prevState !== null;n }nn if (nextDidTimeout && !prevDidTimeout) {n // If this subtreee is running in blocking mode we can suspend,n // otherwise we won’t suspend.n // TODO: This will still suspend a synchronous tree if anythingn // in the concurrent tree already suspended during this render.n // This is a known bug.n if ((workInProgress.mode & BlockingMode) !== NoMode) {n // TODO: Move this back to throwException because this is too laten // if this is a large tree which is common for initial loads. Wen // don’t know if we should restart a render or not until we getn // this marker, and this is too late.n // If this render already had a ping or lower pri updates,n // and this is the first time we know we’re going to suspend wen // should be able to immediately restart from within throwException.n var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;nn if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {n // If this was in an invisible tree or a new render, then showingn // this boundary is ok.n renderDidSuspend();n } else {n // Otherwise, we’re going to have to hide content so we shouldn // suspend for longer if possible.n renderDidSuspendDelayIfPossible();n }n }n }nn {n // TODO: Only schedule updates if these values are non equal, i.e. it changed.n if (nextDidTimeout || prevDidTimeout) {n // If this boundary just timed out, schedule an effect to attach an // retry listener to the promise. This flag is also used to hide then // primary children. In mutation mode, we also need the flag ton // *unhide* children that were previously hidden, so check if thisn // is currently timed out, too.n workInProgress.flags |= Update;n }n }nn return null;n }nn case HostPortal:n popHostContainer(workInProgress);n updateHostContainer(workInProgress);nn if (current === null) {n preparePortalMount(workInProgress.stateNode.containerInfo);n }nn return null;nn case ContextProvider:n // Pop provider fibern popProvider(workInProgress);n return null;nn case IncompleteClassComponent:n {n // Same as class component case. I put it down here so that the tags aren // sequential to ensure this switch is compiled to a jump table.n var _Component = workInProgress.type;nn if (isContextProvider(_Component)) {n popContext(workInProgress);n }nn return null;n }nn case SuspenseListComponent:n {n popSuspenseContext(workInProgress);n var renderState = workInProgress.memoizedState;nn if (renderState === null) {n // We’re running in the default, „independent“ mode.n // We don’t do anything in this mode.n return null;n }nn var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;n var renderedTail = renderState.rendering;nn if (renderedTail === null) {n // We just rendered the head.n if (!didSuspendAlready) {n // This is the first pass. We need to figure out if anything is stilln // suspended in the rendered set.n // If new content unsuspended, but there’s still some content thatn // didn’t. Then we need to do a second pass that forces everythingn // to keep showing their fallbacks.n // We might be suspended if something in this render pass suspended, orn // something in the previous committed pass suspended. Otherwise,n // there’s no chance so we can skip the expensive call ton // findFirstSuspended.n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);nn if (!cannotBeSuspended) {n var row = workInProgress.child;nn while (row !== null) {n var suspended = findFirstSuspended(row);nn if (suspended !== null) {n didSuspendAlready = true;n workInProgress.flags |= DidCapture;n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed asn // part of the second pass. In that case nothing will subscribe ton // its thennables. Instead, we’ll transfer its thennables to then // SuspenseList so that it can retry if they resolve.n // There might be multiple of these in the list but since we’ren // going to wait for all of them anyway, it doesn’t really mattern // which ones gets to ping. In theory we could get clever and keepn // track of how many dependencies remain but it gets tricky becausen // in the meantime, we can add/remove/change items and dependencies.n // We might bail out of the loop before finding any but thatn // doesn’t matter since that means that the other boundaries thatn // we did find already has their listeners attached.nn var newThennables = suspended.updateQueue;nn if (newThennables !== null) {n workInProgress.updateQueue = newThennables;n workInProgress.flags |= Update;n } // Rerender the whole list, but this time, we’ll force fallbacksn // to stay in place.n // Reset the effect list before doing the second pass since that’s now invalid.nnn if (renderState.lastEffect === null) {n workInProgress.firstEffect = null;n }nn workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.nn resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediatelyn // rerender the children.nn pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));n return workInProgress.child;n }nn row = row.sibling;n }n }nn if (renderState.tail !== null && now() > getRenderTargetTime()) {n // We have already passed our CPU deadline but we still have rowsn // left in the tail. We’ll just give up further attempts to rendern // the main content and only render fallbacks.n workInProgress.flags |= DidCapture;n didSuspendAlready = true;n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping thisn // to get it started back up to attempt the next item. While in termsn // of priority this work has the same priority as this current render,n // it’s not part of the same transition once the transition hasn // committed. If it’s sync, we still want to yield so that it can ben // painted. Conceptually, this is really the same as pinging.n // We can use any RetryLane even if it’s the one currently renderingn // since we’re leaving it behind on this node.nn workInProgress.lanes = SomeRetryLane;nn {n markSpawnedWork(SomeRetryLane);n }n }n } else {n cutOffTailIfNeeded(renderState, false);n } // Next we’re going to render the tail.nn } else {n // Append the rendered row to the child list.n if (!didSuspendAlready) {n var _suspended = findFirstSuspended(renderedTail);nn if (_suspended !== null) {n workInProgress.flags |= DidCapture;n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn’tn // get lost if this row ends up dropped during a second pass.nn var _newThennables = _suspended.updateQueue;nn if (_newThennables !== null) {n workInProgress.updateQueue = _newThennables;n workInProgress.flags |= Update;n }nn cutOffTailIfNeeded(renderState, true); // This might have been modified.nn if (renderState.tail === null && renderState.tailMode === ‚hidden‘ && !renderedTail.alternate && !getIsHydrating() // We don’t cut it if we’re hydrating.n ) {n // We need to delete the row we just rendered.n // Reset the effect list to what it was before we rendered thisn // child. The nested children have already appended themselves.n var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.nn if (lastEffect !== null) {n lastEffect.nextEffect = null;n } // We’re done.nnn return null;n }n } else if ( // The time it took to render last row is greater than the remainingn // time we have to render. So rendering one more row would likelyn // exceed it.n now() * 2 – renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {n // We have now passed our CPU deadline and we’ll just give up furthern // attempts to render the main content and only render fallbacks.n // The assumption is that this is usually faster.n workInProgress.flags |= DidCapture;n didSuspendAlready = true;n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping thisn // to get it started back up to attempt the next item. While in termsn // of priority this work has the same priority as this current render,n // it’s not part of the same transition once the transition hasn // committed. If it’s sync, we still want to yield so that it can ben // painted. Conceptually, this is really the same as pinging.n // We can use any RetryLane even if it’s the one currently renderingn // since we’re leaving it behind on this node.nn workInProgress.lanes = SomeRetryLane;nn {n markSpawnedWork(SomeRetryLane);n }n }n }nn if (renderState.isBackwards) {n // The effect list of the backwards tail will have been addedn // to the end. This breaks the guarantee that life-cycles fire inn // sibling order but that isn’t a strong guarantee promised by React.n // Especially since these might also just pop in during future commits.n // Append to the beginning of the list.n renderedTail.sibling = workInProgress.child;n workInProgress.child = renderedTail;n } else {n var previousSibling = renderState.last;nn if (previousSibling !== null) {n previousSibling.sibling = renderedTail;n } else {n workInProgress.child = renderedTail;n }nn renderState.last = renderedTail;n }n }nn if (renderState.tail !== null) {n // We still have tail rows to render.n // Pop a row.n var next = renderState.tail;n renderState.rendering = next;n renderState.tail = next.sibling;n renderState.lastEffect = workInProgress.lastEffect;n renderState.renderingStartTime = now();n next.sibling = null; // Restore the context.n // TODO: We can probably just avoid popping it instead and onlyn // setting it the first time we go from not suspended to suspended.nn var suspenseContext = suspenseStackCursor.current;nn if (didSuspendAlready) {n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);n } else {n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);n }nn pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.nn return next;n }nn return null;n }nn case FundamentalComponent:n {nn break;n }nn case ScopeComponent:n {nn break;n }nn case Block:nn break;nn case OffscreenComponent:n case LegacyHiddenComponent:n {n popRenderLanes(workInProgress);nn if (current !== null) {n var _nextState = workInProgress.memoizedState;n var _prevState = current.memoizedState;n var prevIsHidden = _prevState !== null;n var nextIsHidden = _nextState !== null;nn if (prevIsHidden !== nextIsHidden && newProps.mode !== ‚unstable-defer-without-hiding‘) {n workInProgress.flags |= Update;n }n }nn return null;n }n }nn {n {n throw Error( „Unknown unit of work tag (“ + workInProgress.tag + „). This error is likely caused by a bug in React. Please file an issue.“ );n }n }n}nnfunction unwindWork(workInProgress, renderLanes) {n switch (workInProgress.tag) {n case ClassComponent:n {n var Component = workInProgress.type;nn if (isContextProvider(Component)) {n popContext(workInProgress);n }nn var flags = workInProgress.flags;nn if (flags & ShouldCapture) {n workInProgress.flags = flags & ~ShouldCapture | DidCapture;nn if ( (workInProgress.mode & ProfileMode) !== NoMode) {n transferActualDuration(workInProgress);n }nn return workInProgress;n }nn return null;n }nn case HostRoot:n {n popHostContainer(workInProgress);n popTopLevelContextObject(workInProgress);n resetWorkInProgressVersions();n var _flags = workInProgress.flags;nn if (!((_flags & DidCapture) === NoFlags)) {n {n throw Error( „The root failed to unmount after an error. This is likely a bug in React. Please file an issue.“ );n }n }nn workInProgress.flags = _flags & ~ShouldCapture | DidCapture;n return workInProgress;n }nn case HostComponent:n {n // TODO: popHydrationStaten popHostContext(workInProgress);n return null;n }nn case SuspenseComponent:n {n popSuspenseContext(workInProgress);nn var _flags2 = workInProgress.flags;nn if (_flags2 & ShouldCapture) {n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.nn if ( (workInProgress.mode & ProfileMode) !== NoMode) {n transferActualDuration(workInProgress);n }nn return workInProgress;n }nn return null;n }nn case SuspenseListComponent:n {n popSuspenseContext(workInProgress); // SuspenseList doesn’t actually catch anything. It should’ve beenn // caught by a nested boundary. If not, it should bubble through.nn return null;n }nn case HostPortal:n popHostContainer(workInProgress);n return null;nn case ContextProvider:n popProvider(workInProgress);n return null;nn case OffscreenComponent:n case LegacyHiddenComponent:n popRenderLanes(workInProgress);n return null;nn default:n return null;n }n}nnfunction unwindInterruptedWork(interruptedWork) {n switch (interruptedWork.tag) {n case ClassComponent:n {n var childContextTypes = interruptedWork.type.childContextTypes;nn if (childContextTypes !== null && childContextTypes !== undefined) {n popContext(interruptedWork);n }nn break;n }nn case HostRoot:n {n popHostContainer(interruptedWork);n popTopLevelContextObject(interruptedWork);n resetWorkInProgressVersions();n break;n }nn case HostComponent:n {n popHostContext(interruptedWork);n break;n }nn case HostPortal:n popHostContainer(interruptedWork);n break;nn case SuspenseComponent:n popSuspenseContext(interruptedWork);n break;nn case SuspenseListComponent:n popSuspenseContext(interruptedWork);n break;nn case ContextProvider:n popProvider(interruptedWork);n break;nn case OffscreenComponent:n case LegacyHiddenComponent:n popRenderLanes(interruptedWork);n break;n }n}nnfunction createCapturedValue(value, source) {n // If the value is an error, call this function immediately after it is thrownn // so the stack is accurate.n return {n value: value,n source: source,n stack: getStackByFiberInDevAndProd(source)n };n}nn// This module is forked in different environments.n// By default, return `true` to log errors to the console.n// Forks can return `false` if this isn’t desirable.nfunction showErrorDialog(boundary, errorInfo) {n return true;n}nnfunction logCapturedError(boundary, errorInfo) {n try {n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.n // This enables renderers like ReactNative to better manage redbox behavior.nn if (logError === false) {n return;n }nn var error = errorInfo.value;nn if (true) {n var source = errorInfo.source;n var stack = errorInfo.stack;n var componentStack = stack !== null ? stack : “; // Browsers support silencing uncaught errors by callingn // `preventDefault()` in window `error` handler.n // We record this information as an expando on the error.nn if (error != null && error._suppressLogging) {n if (boundary.tag === ClassComponent) {n // The error is recoverable and was silenced.n // Ignore it and don’t print the stack addendum.n // This is handy for testing error boundaries without noise.n return;n } // The error is fatal. Since the silencing might haven // been accidental, we’ll surface it anyway.n // However, the browser would have silenced the original errorn // so we’ll print it first, and then print the stack addendum.nnn console[‚error‘](error); // Don’t transform to our wrappern // For a more detailed description of this block, see:n // https://github.com/facebook/react/pull/13384n }nn var componentName = source ? getComponentName(source.type) : null;n var componentNameMessage = componentName ? „The above error occurred in the component:“ : ‚The above error occurred in one of your React components:‘;n var errorBoundaryMessage;n var errorBoundaryName = getComponentName(boundary.type);nn if (errorBoundaryName) {n errorBoundaryMessage = „React will try to recreate this component tree from scratch “ + („using the error boundary you provided, “ + errorBoundaryName + „.“);n } else {n errorBoundaryMessage = ‚Consider adding an error boundary to your tree to customize error handling behavior.\n‘ + ‚Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.‘;n }nn var combinedMessage = componentNameMessage + „\n“ + componentStack + „\n\n“ + („“ + errorBoundaryMessage); // In development, we provide our own message with just the component stack.n // We don’t include the original error message and JS stack because the browsern // has already printed it. Even if the application swallows the error, it is stilln // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.nn console[‚error‘](combinedMessage); // Don’t transform to our wrappern } else {n // In production, we print the error directly.n // This will include the message, the JS stack, and anything the browser wants to show.n // We pass the error object instead of custom message so that the browser displays the error natively.n console[‚error‘](error); // Don’t transform to our wrappern }n } catch (e) {n // This method must not throw, or React internal state will get messed up.n // If console.error is overridden, or logCapturedError() shows a dialog that throws,n // we want to report this error outside of the normal stack as a last resort.n // https://github.com/facebook/react/issues/13188n setTimeout(function () {n throw e;n });n }n}nnvar PossiblyWeakMap$1 = typeof WeakMap === ‚function‘ ? WeakMap : Map;nnfunction createRootErrorUpdate(fiber, errorInfo, lane) {n var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.nn update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this propertyn // being called „element“.nn update.payload = {n element: nulln };n var error = errorInfo.value;nn update.callback = function () {n onUncaughtError(error);n logCapturedError(fiber, errorInfo);n };nn return update;n}nnfunction createClassErrorUpdate(fiber, errorInfo, lane) {n var update = createUpdate(NoTimestamp, lane);n update.tag = CaptureUpdate;n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;nn if (typeof getDerivedStateFromError === ‚function‘) {n var error$1 = errorInfo.value;nn update.payload = function () {n logCapturedError(fiber, errorInfo);n return getDerivedStateFromError(error$1);n };n }nn var inst = fiber.stateNode;nn if (inst !== null && typeof inst.componentDidCatch === ‚function‘) {n update.callback = function callback() {n {n markFailedErrorBoundaryForHotReloading(fiber);n }nn if (typeof getDerivedStateFromError !== ‚function‘) {n // To preserve the preexisting retry behavior of error boundaries,n // we keep track of which ones already failed during this batch.n // This gets reset before we yield back to the browser.n // TODO: Warn in strict mode if getDerivedStateFromError isn // not defined.n markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method definednn logCapturedError(fiber, errorInfo);n }nn var error$1 = errorInfo.value;n var stack = errorInfo.stack;n this.componentDidCatch(error$1, {n componentStack: stack !== null ? stack : “n });nn {n if (typeof getDerivedStateFromError !== ‚function‘) {n // If componentDidCatch is the only error boundary method defined,n // then it needs to call setState to recover from errors.n // If no state update is scheduled then the boundary will swallow the error.n if (!includesSomeLane(fiber.lanes, SyncLane)) {n error(‚%s: Error boundaries should implement getDerivedStateFromError(). ‚ + ‚In that method, return a state update to display an error message or fallback UI.‘, getComponentName(fiber.type) || ‚Unknown‘);n }n }n }n };n } else {n update.callback = function () {n markFailedErrorBoundaryForHotReloading(fiber);n };n }nn return update;n}nnfunction attachPingListener(root, wakeable, lanes) {n // Attach a listener to the promise to „ping“ the root and retry. But only ifn // one does not already exist for the lanes we’re currently rendering (whichn // acts like a „thread ID“ here).n var pingCache = root.pingCache;n var threadIDs;nn if (pingCache === null) {n pingCache = root.pingCache = new PossiblyWeakMap$1();n threadIDs = new Set();n pingCache.set(wakeable, threadIDs);n } else {n threadIDs = pingCache.get(wakeable);nn if (threadIDs === undefined) {n threadIDs = new Set();n pingCache.set(wakeable, threadIDs);n }n }nn if (!threadIDs.has(lanes)) {n // Memoize using the thread ID to prevent redundant listeners.n threadIDs.add(lanes);n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);n wakeable.then(ping, ping);n }n}nnfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {n // The source fiber did not complete.n sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.nn sourceFiber.firstEffect = sourceFiber.lastEffect = null;nn if (value !== null && typeof value === ‚object‘ && typeof value.then === ‚function‘) {n // This is a wakeable.n var wakeable = value;nn if ((sourceFiber.mode & BlockingMode) === NoMode) {n // Reset the memoizedState to what it was before we attemptedn // to render it.n var currentSource = sourceFiber.alternate;nn if (currentSource) {n sourceFiber.updateQueue = currentSource.updateQueue;n sourceFiber.memoizedState = currentSource.memoizedState;n sourceFiber.lanes = currentSource.lanes;n } else {n sourceFiber.updateQueue = null;n sourceFiber.memoizedState = null;n }n }nn var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.nn var _workInProgress = returnFiber;nn do {n if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {n // Found the nearest boundary.n // Stash the promise on the boundary fiber. If the boundary times out, we’lln // attach another listener to flip the boundary back to its normal state.n var wakeables = _workInProgress.updateQueue;nn if (wakeables === null) {n var updateQueue = new Set();n updateQueue.add(wakeable);n _workInProgress.updateQueue = updateQueue;n } else {n wakeables.add(wakeable);n } // If the boundary is outside of blocking mode, we should *not*n // suspend the commit. Pretend as if the suspended component renderedn // null and keep rendering. In the commit phase, we’ll schedule an // subsequent synchronous update to re-render the Suspense.n //n // Note: It doesn’t matter whether the component that suspended wasn // inside a blocking mode tree. If the Suspense is outside of it, wen // should *not* suspend the commit.nnn if ((_workInProgress.mode & BlockingMode) === NoMode) {n _workInProgress.flags |= DidCapture;n sourceFiber.flags |= ForceUpdateForLegacySuspense; // We’re going to commit this fiber even though it didn’t complete.n // But we shouldn’t call any lifecycle methods or callbacks. Removen // all lifecycle effect tags.nn sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);nn if (sourceFiber.tag === ClassComponent) {n var currentSourceFiber = sourceFiber.alternate;nn if (currentSourceFiber === null) {n // This is a new mount. Change the tag so it’s not mistaken for an // completed class component. For example, we should not calln // componentWillUnmount if it is deleted.n sourceFiber.tag = IncompleteClassComponent;n } else {n // When we try rendering again, we should not reuse the current fiber,n // since it’s known to be in an inconsistent state. Use a force update ton // prevent a bail out.n var update = createUpdate(NoTimestamp, SyncLane);n update.tag = ForceUpdate;n enqueueUpdate(sourceFiber, update);n }n } // The source fiber did not complete. Mark it with Sync priority ton // indicate that it still has pending work.nnn sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.nn return;n } // Confirmed that the boundary is in a concurrent mode tree. Continuen // with the normal suspend path.n //n // After this we’ll use a set of heuristics to determine whether thisn // render pass will run to completion or restart or „suspend“ the commit.n // The actual logic for this is spread out in different places.n //n // This first principle is that if we’re going to suspend when we completen // a root, then we should also restart if we get an update or ping thatn // might unsuspend it, and vice versa. The only reason to suspend isn // because you think you might want to restart before committing. However,n // it doesn’t make sense to restart only while in the period we’re suspended.n //n // Restarting too aggressively is also not good because it starves out anyn // intermediate loading state. So we use heuristics to determine when.n // Suspense Heuristicsn //n // If nothing threw a Promise or all the same fallbacks are already showing,n // then don’t suspend/restart.n //n // If this is an initial render of a new tree of Suspense boundaries andn // those trigger a fallback, then don’t suspend/restart. We want to ensuren // that we can show the initial loading state as quickly as possible.n //n // If we hit a „Delayed“ case, such as when we’d switch from content back inton // a fallback, then we should always suspend/restart. Transitions applyn // to this case. If none is defined, JND is used instead.n //n // If we’re already showing a fallback and it gets „retried“, allowing us to shown // another level, but there’s still an inner boundary that would show a fallback,n // then we suspend/restart for 500ms since the last time we showed a fallbackn // anywhere in the tree. This effectively throttles progressive loading into an // consistent train of commits. This also gives us an opportunity to restart ton // get to the completed state slightly earlier.n //n // If there’s ambiguity due to batching it’s resolved in preference of:n // 1) „delayed“, 2) „initial render“, 3) „retry“.n //n // We want to ensure that a „busy“ state doesn’t get force committed. We want ton // ensure that new initial loading states can commit as soon as possible.nnn attachPingListener(root, wakeable, rootRenderLanes);n _workInProgress.flags |= ShouldCapture;n _workInProgress.lanes = rootRenderLanes;n return;n } // This boundary already captured during this render. Continue to the nextn // boundary.nnn _workInProgress = _workInProgress.return;n } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.n // TODO: Use invariant so the message is stripped in prod?nnn value = new Error((getComponentName(sourceFiber.type) || ‚A React component‘) + ‚ suspended while rendering, but no fallback UI was specified.\n‘ + ‚\n‘ + ‚Add a component higher in the tree to ‚ + ‚provide a loading indicator or placeholder to display.‘);n } // We didn’t find a boundary that could handle this type of exception. Startn // over and traverse parent path again, this time treating the exceptionn // as an error.nnn renderDidError();n value = createCapturedValue(value, sourceFiber);n var workInProgress = returnFiber;nn do {n switch (workInProgress.tag) {n case HostRoot:n {n var _errorInfo = value;n workInProgress.flags |= ShouldCapture;n var lane = pickArbitraryLane(rootRenderLanes);n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);nn var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);nn enqueueCapturedUpdate(workInProgress, _update);n return;n }nn case ClassComponent:n // Capture and retryn var errorInfo = value;n var ctor = workInProgress.type;n var instance = workInProgress.stateNode;nn if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === ‚function‘ || instance !== null && typeof instance.componentDidCatch === ‚function‘ && !isAlreadyFailedLegacyErrorBoundary(instance))) {n workInProgress.flags |= ShouldCapture;nn var _lane = pickArbitraryLane(rootRenderLanes);nn workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated statenn var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);nn enqueueCapturedUpdate(workInProgress, _update2);n return;n }nn break;n }nn workInProgress = workInProgress.return;n } while (workInProgress !== null);n}nnvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;nn{n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();n}nnvar PossiblyWeakSet = typeof WeakSet === ‚function‘ ? WeakSet : Set;nnvar callComponentWillUnmountWithTimer = function (current, instance) {n instance.props = current.memoizedProps;n instance.state = current.memoizedState;nn {n instance.componentWillUnmount();n }n}; // Capture errors so they don’t interrupt unmounting.nnnfunction safelyCallComponentWillUnmount(current, instance) {n {n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);nn if (hasCaughtError()) {n var unmountError = clearCaughtError();n captureCommitPhaseError(current, unmountError);n }n }n}nnfunction safelyDetachRef(current) {n var ref = current.ref;nn if (ref !== null) {n if (typeof ref === ‚function‘) {n {n invokeGuardedCallback(null, ref, null, null);nn if (hasCaughtError()) {n var refError = clearCaughtError();n captureCommitPhaseError(current, refError);n }n }n } else {n ref.current = null;n }n }n}nnfunction safelyCallDestroy(current, destroy) {n {n invokeGuardedCallback(null, destroy, null);nn if (hasCaughtError()) {n var error = clearCaughtError();n captureCommitPhaseError(current, error);n }n }n}nnfunction commitBeforeMutationLifeCycles(current, finishedWork) {n switch (finishedWork.tag) {n case FunctionComponent:n case ForwardRef:n case SimpleMemoComponent:n case Block:n {n return;n }nn case ClassComponent:n {n if (finishedWork.flags & Snapshot) {n if (current !== null) {n var prevProps = current.memoizedProps;n var prevState = current.memoizedState;n var instance = finishedWork.stateNode; // We could update instance props and state here,n // but instead we rely on them being set during last render.n // TODO: revisit this when we implement resuming.nn {n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {n if (instance.props !== finishedWork.memoizedProps) {n error(‚Expected %s props to match memoized props before ‚ + ‚getSnapshotBeforeUpdate. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.props`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }nn if (instance.state !== finishedWork.memoizedState) {n error(‚Expected %s state to match memoized state before ‚ + ‚getSnapshotBeforeUpdate. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.state`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }n }n }nn var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);nn {n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;nn if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {n didWarnSet.add(finishedWork.type);nn error(‚%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ‚ + ‚must be returned. You have returned undefined.‘, getComponentName(finishedWork.type));n }n }nn instance.__reactInternalSnapshotBeforeUpdate = snapshot;n }n }nn return;n }nn case HostRoot:n {n {n if (finishedWork.flags & Snapshot) {n var root = finishedWork.stateNode;n clearContainer(root.containerInfo);n }n }nn return;n }nn case HostComponent:n case HostText:n case HostPortal:n case IncompleteClassComponent:n // Nothing to do for these component typesn return;n }nn {n {n throw Error( „This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.“ );n }n }n}nnfunction commitHookEffectListUnmount(tag, finishedWork) {n var updateQueue = finishedWork.updateQueue;n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;nn if (lastEffect !== null) {n var firstEffect = lastEffect.next;n var effect = firstEffect;nn do {n if ((effect.tag & tag) === tag) {n // Unmountn var destroy = effect.destroy;n effect.destroy = undefined;nn if (destroy !== undefined) {n destroy();n }n }nn effect = effect.next;n } while (effect !== firstEffect);n }n}nnfunction commitHookEffectListMount(tag, finishedWork) {n var updateQueue = finishedWork.updateQueue;n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;nn if (lastEffect !== null) {n var firstEffect = lastEffect.next;n var effect = firstEffect;nn do {n if ((effect.tag & tag) === tag) {n // Mountn var create = effect.create;n effect.destroy = create();nn {n var destroy = effect.destroy;nn if (destroy !== undefined && typeof destroy !== ‚function‘) {n var addendum = void 0;nn if (destroy === null) {n addendum = ‚ You returned null. If your effect does not require clean ‚ + ‚up, return undefined (or nothing).‘;n } else if (typeof destroy.then === ‚function‘) {n addendum = ‚\n\nIt looks like you wrote useEffect(async () => …) or returned a Promise. ‚ + ‚Instead, write the async function inside your effect ‚ + ‚and call it immediately:\n\n‘ + ‚useEffect(() => {\n‘ + ‚ async function fetchData() {\n‘ + ‚ // You can await here\n‘ + ‚ const response = await MyAPI.getData(someId);\n‘ + ‚ // …\n‘ + ‚ }\n‘ + ‚ fetchData();\n‘ + „}, [someId]); // Or [] if effect doesn’t need props or state\n\n“ + ‚Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching‘;n } else {n addendum = ‚ You returned: ‚ + destroy;n }nn error(‚An effect function must not return anything besides a function, ‚ + ‚which is used for clean-up.%s‘, addendum);n }n }n }nn effect = effect.next;n } while (effect !== firstEffect);n }n}nnfunction schedulePassiveEffects(finishedWork) {n var updateQueue = finishedWork.updateQueue;n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;nn if (lastEffect !== null) {n var firstEffect = lastEffect.next;n var effect = firstEffect;nn do {n var _effect = effect,n next = _effect.next,n tag = _effect.tag;nn if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {n enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);n enqueuePendingPassiveHookEffectMount(finishedWork, effect);n }nn effect = next;n } while (effect !== firstEffect);n }n}nnfunction commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {n switch (finishedWork.tag) {n case FunctionComponent:n case ForwardRef:n case SimpleMemoComponent:n case Block:n {n // At this point layout effects have already been destroyed (during mutation phase).n // This is done to prevent sibling component effects from interfering with each other,n // e.g. a destroy function in one component should never override a ref setn // by a create function in another component during the same commit.n {n commitHookEffectListMount(Layout | HasEffect, finishedWork);n }nn schedulePassiveEffects(finishedWork);n return;n }nn case ClassComponent:n {n var instance = finishedWork.stateNode;nn if (finishedWork.flags & Update) {n if (current === null) {n // We could update instance props and state here,n // but instead we rely on them being set during last render.n // TODO: revisit this when we implement resuming.n {n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {n if (instance.props !== finishedWork.memoizedProps) {n error(‚Expected %s props to match memoized props before ‚ + ‚componentDidMount. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.props`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }nn if (instance.state !== finishedWork.memoizedState) {n error(‚Expected %s state to match memoized state before ‚ + ‚componentDidMount. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.state`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }n }n }nn {n instance.componentDidMount();n }n } else {n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);n var prevState = current.memoizedState; // We could update instance props and state here,n // but instead we rely on them being set during last render.n // TODO: revisit this when we implement resuming.nn {n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {n if (instance.props !== finishedWork.memoizedProps) {n error(‚Expected %s props to match memoized props before ‚ + ‚componentDidUpdate. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.props`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }nn if (instance.state !== finishedWork.memoizedState) {n error(‚Expected %s state to match memoized state before ‚ + ‚componentDidUpdate. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.state`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }n }n }nn {n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);n }n }n } // TODO: I think this is now always non-null by the time it reaches then // commit phase. Consider removing the type check.nnn var updateQueue = finishedWork.updateQueue;nn if (updateQueue !== null) {n {n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {n if (instance.props !== finishedWork.memoizedProps) {n error(‚Expected %s props to match memoized props before ‚ + ‚processing the update queue. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.props`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }nn if (instance.state !== finishedWork.memoizedState) {n error(‚Expected %s state to match memoized state before ‚ + ‚processing the update queue. ‚ + ‚This might either be because of a bug in React, or because ‚ + ‚a component reassigns its own `this.state`. ‚ + ‚Please file an issue.‘, getComponentName(finishedWork.type) || ‚instance‘);n }n }n } // We could update instance props and state here,n // but instead we rely on them being set during last render.n // TODO: revisit this when we implement resuming.nnn commitUpdateQueue(finishedWork, updateQueue, instance);n }nn return;n }nn case HostRoot:n {n // TODO: I think this is now always non-null by the time it reaches then // commit phase. Consider removing the type check.n var _updateQueue = finishedWork.updateQueue;nn if (_updateQueue !== null) {n var _instance = null;nn if (finishedWork.child !== null) {n switch (finishedWork.child.tag) {n case HostComponent:n _instance = getPublicInstance(finishedWork.child.stateNode);n break;nn case ClassComponent:n _instance = finishedWork.child.stateNode;n break;n }n }nn commitUpdateQueue(finishedWork, _updateQueue, _instance);n }nn return;n }nn case HostComponent:n {n var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mountedn // (eg DOM renderer may schedule auto-focus for inputs and form controls).n // These effects should only be committed when components are first mounted,n // aka when there is no current/alternate.nn if (current === null && finishedWork.flags & Update) {n var type = finishedWork.type;n var props = finishedWork.memoizedProps;n commitMount(_instance2, type, props);n }nn return;n }nn case HostText:n {n // We have no life-cycles associated with text.n return;n }nn case HostPortal:n {n // We have no life-cycles associated with portals.n return;n }nn case Profiler:n {n {n var _finishedWork$memoize2 = finishedWork.memoizedProps,n onCommit = _finishedWork$memoize2.onCommit,n onRender = _finishedWork$memoize2.onRender;n var effectDuration = finishedWork.stateNode.effectDuration;n var commitTime = getCommitTime();nn if (typeof onRender === ‚function‘) {n {n onRender(finishedWork.memoizedProps.id, current === null ? ‚mount‘ : ‚update‘, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);n }n }n }nn return;n }nn case SuspenseComponent:n {n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);n return;n }nn case SuspenseListComponent:n case IncompleteClassComponent:n case FundamentalComponent:n case ScopeComponent:n case OffscreenComponent:n case LegacyHiddenComponent:n return;n }nn {n {n throw Error( „This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.“ );n }n }n}nnfunction hideOrUnhideAllChildren(finishedWork, isHidden) {n {n // We only have the top Fiber that was inserted but we need to recurse down itsn // children to find all the terminal nodes.n var node = finishedWork;nn while (true) {n if (node.tag === HostComponent) {n var instance = node.stateNode;nn if (isHidden) {n hideInstance(instance);n } else {n unhideInstance(node.stateNode, node.memoizedProps);n }n } else if (node.tag === HostText) {n var _instance3 = node.stateNode;nn if (isHidden) {n hideTextInstance(_instance3);n } else {n unhideTextInstance(_instance3, node.memoizedProps);n }n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {n node.child.return = node;n node = node.child;n continue;n }nn if (node === finishedWork) {n return;n }nn while (node.sibling === null) {n if (node.return === null || node.return === finishedWork) {n return;n }nn node = node.return;n }nn node.sibling.return = node.return;n node = node.sibling;n }n }n}nnfunction commitAttachRef(finishedWork) {n var ref = finishedWork.ref;nn if (ref !== null) {n var instance = finishedWork.stateNode;n var instanceToUse;nn switch (finishedWork.tag) {n case HostComponent:n instanceToUse = getPublicInstance(instance);n break;nn default:n instanceToUse = instance;n } // Moved outside to ensure DCE works with this flagnn if (typeof ref === ‚function‘) {n ref(instanceToUse);n } else {n {n if (!ref.hasOwnProperty(‚current‘)) {n error(‚Unexpected ref object provided for %s. ‚ + ‚Use either a ref-setter function or React.createRef().‘, getComponentName(finishedWork.type));n }n }nn ref.current = instanceToUse;n }n }n}nnfunction commitDetachRef(current) {n var currentRef = current.ref;nn if (currentRef !== null) {n if (typeof currentRef === ‚function‘) {n currentRef(null);n } else {n currentRef.current = null;n }n }n} // User-originating errors (lifecycles and refs) should not interruptn// deletion, so don’t let them throw. Host-originating errors shouldn// interrupt deletion, so it’s okaynnnfunction commitUnmount(finishedRoot, current, renderPriorityLevel) {n onCommitUnmount(current);nn switch (current.tag) {n case FunctionComponent:n case ForwardRef:n case MemoComponent:n case SimpleMemoComponent:n case Block:n {n var updateQueue = current.updateQueue;nn if (updateQueue !== null) {n var lastEffect = updateQueue.lastEffect;nn if (lastEffect !== null) {n var firstEffect = lastEffect.next;n var effect = firstEffect;nn do {n var _effect2 = effect,n destroy = _effect2.destroy,n tag = _effect2.tag;nn if (destroy !== undefined) {n if ((tag & Passive$1) !== NoFlags$1) {n enqueuePendingPassiveHookEffectUnmount(current, effect);n } else {n {n safelyCallDestroy(current, destroy);n }n }n }nn effect = effect.next;n } while (effect !== firstEffect);n }n }nn return;n }nn case ClassComponent:n {n safelyDetachRef(current);n var instance = current.stateNode;nn if (typeof instance.componentWillUnmount === ‚function‘) {n safelyCallComponentWillUnmount(current, instance);n }nn return;n }nn case HostComponent:n {n safelyDetachRef(current);n return;n }nn case HostPortal:n {n // TODO: this is recursive.n // We are also not using this parent becausen // the portal will get pushed immediately.n {n unmountHostComponents(finishedRoot, current);n }nn return;n }nn case FundamentalComponent:n {nn return;n }nn case DehydratedFragment:n {nn return;n }nn case ScopeComponent:n {nn return;n }n }n}nnfunction commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {n // While we’re inside a removed host node we don’t want to calln // removeChild on the inner nodes because they’re removed by the topn // call anyway. We also want to call componentWillUnmount on alln // composites before this host node is removed from the tree. Thereforen // we do an inner loop while we’re still inside the host node.n var node = root;nn while (true) {n commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.n // Skip portals because commitUnmount() currently visits them recursively.nn if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.n // If we don’t use mutation we drill down into portals here instead.n node.tag !== HostPortal)) {n node.child.return = node;n node = node.child;n continue;n }nn if (node === root) {n return;n }nn while (node.sibling === null) {n if (node.return === null || node.return === root) {n return;n }nn node = node.return;n }nn node.sibling.return = node.return;n node = node.sibling;n }n}nnfunction detachFiberMutation(fiber) {n // Cut off the return pointers to disconnect it from the tree. Ideally, wen // should clear the child pointer of the parent alternate to let thisn // get GC:ed but we don’t know which for sure which parent is the currentn // one so we’ll settle for GC:ing the subtree of this child. This childn // itself will be GC:ed when the parent updates the next time.n // Note: we cannot null out sibling here, otherwise it can cause issuesn // with findDOMNode and how it requires the sibling field to carry outn // traversal in a later effect. See PR #16820. We now clear the siblingn // field after effects, see: detachFiberAfterEffects.n //n // Don’t disconnect stateNode now; it will be detached in detachFiberAfterEffects.n // It may be required if the current component is an error boundary,n // and one of its descendants throws while unmounting a passive effect.n fiber.alternate = null;n fiber.child = null;n fiber.dependencies = null;n fiber.firstEffect = null;n fiber.lastEffect = null;n fiber.memoizedProps = null;n fiber.memoizedState = null;n fiber.pendingProps = null;n fiber.return = null;n fiber.updateQueue = null;nn {n fiber._debugOwner = null;n }n}nnfunction getHostParentFiber(fiber) {n var parent = fiber.return;nn while (parent !== null) {n if (isHostParent(parent)) {n return parent;n }nn parent = parent.return;n }nn {n {n throw Error( „Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.“ );n }n }n}nnfunction isHostParent(fiber) {n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;n}nnfunction getHostSibling(fiber) {n // We’re going to search forward into the tree until we find a sibling hostn // node. Unfortunately, if multiple insertions are done in a row we have ton // search past them. This leads to exponential search for the next sibling.n // TODO: Find a more efficient way to do this.n var node = fiber;nn siblings: while (true) {n // If we didn’t find anything, let’s try the next sibling.n while (node.sibling === null) {n if (node.return === null || isHostParent(node.return)) {n // If we pop out of the root or hit the parent the fiber we are then // last sibling.n return null;n }nn node = node.return;n }nn node.sibling.return = node.return;n node = node.sibling;nn while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {n // If it is not host node and, we might have a host node inside it.n // Try to search down until we find one.n if (node.flags & Placement) {n // If we don’t have a child, try the siblings instead.n continue siblings;n } // If we don’t have a child, try the siblings instead.n // We also skip portals because they are not part of this host tree.nnn if (node.child === null || node.tag === HostPortal) {n continue siblings;n } else {n node.child.return = node;n node = node.child;n }n } // Check if this host node is stable or about to be placed.nnn if (!(node.flags & Placement)) {n // Found it!n return node.stateNode;n }n }n}nnfunction commitPlacement(finishedWork) {nnn var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.nn var parent;n var isContainer;n var parentStateNode = parentFiber.stateNode;nn switch (parentFiber.tag) {n case HostComponent:n parent = parentStateNode;n isContainer = false;n break;nn case HostRoot:n parent = parentStateNode.containerInfo;n isContainer = true;n break;nn case HostPortal:n parent = parentStateNode.containerInfo;n isContainer = true;n break;nn case FundamentalComponent:nn // eslint-disable-next-line-no-fallthroughnn default:n {n {n throw Error( „Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn }nn if (parentFiber.flags & ContentReset) {n // Reset the text content of the parent before doing any insertionsn resetTextContent(parent); // Clear ContentReset from the effect tagnn parentFiber.flags &= ~ContentReset;n }nn var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down itsn // children to find all the terminal nodes.nn if (isContainer) {n insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);n } else {n insertOrAppendPlacementNode(finishedWork, before, parent);n }n}nnfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {n var tag = node.tag;n var isHost = tag === HostComponent || tag === HostText;nn if (isHost || enableFundamentalAPI ) {n var stateNode = isHost ? node.stateNode : node.stateNode.instance;nn if (before) {n insertInContainerBefore(parent, stateNode, before);n } else {n appendChildToContainer(parent, stateNode);n }n } else if (tag === HostPortal) ; else {n var child = node.child;nn if (child !== null) {n insertOrAppendPlacementNodeIntoContainer(child, before, parent);n var sibling = child.sibling;nn while (sibling !== null) {n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);n sibling = sibling.sibling;n }n }n }n}nnfunction insertOrAppendPlacementNode(node, before, parent) {n var tag = node.tag;n var isHost = tag === HostComponent || tag === HostText;nn if (isHost || enableFundamentalAPI ) {n var stateNode = isHost ? node.stateNode : node.stateNode.instance;nn if (before) {n insertBefore(parent, stateNode, before);n } else {n appendChild(parent, stateNode);n }n } else if (tag === HostPortal) ; else {n var child = node.child;nn if (child !== null) {n insertOrAppendPlacementNode(child, before, parent);n var sibling = child.sibling;nn while (sibling !== null) {n insertOrAppendPlacementNode(sibling, before, parent);n sibling = sibling.sibling;n }n }n }n}nnfunction unmountHostComponents(finishedRoot, current, renderPriorityLevel) {n // We only have the top Fiber that was deleted but we need to recurse down itsn // children to find all the terminal nodes.n var node = current; // Each iteration, currentParent is populated with node’s host parent if notn // currentParentIsValid.nn var currentParentIsValid = false; // Note: these two variables *must* always be updated together.nn var currentParent;n var currentParentIsContainer;nn while (true) {n if (!currentParentIsValid) {n var parent = node.return;nn findParent: while (true) {n if (!(parent !== null)) {n {n throw Error( „Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn var parentStateNode = parent.stateNode;nn switch (parent.tag) {n case HostComponent:n currentParent = parentStateNode;n currentParentIsContainer = false;n break findParent;nn case HostRoot:n currentParent = parentStateNode.containerInfo;n currentParentIsContainer = true;n break findParent;nn case HostPortal:n currentParent = parentStateNode.containerInfo;n currentParentIsContainer = true;n break findParent;nn }nn parent = parent.return;n }nn currentParentIsValid = true;n }nn if (node.tag === HostComponent || node.tag === HostText) {n commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove then // node from the tree.nn if (currentParentIsContainer) {n removeChildFromContainer(currentParent, node.stateNode);n } else {n removeChild(currentParent, node.stateNode);n } // Don’t visit children because we already visited them.nn } else if (node.tag === HostPortal) {n if (node.child !== null) {n // When we go into a portal, it becomes the parent to remove from.n // We will reassign it back when we pop the portal on the way up.n currentParent = node.stateNode.containerInfo;n currentParentIsContainer = true; // Visit children because portals might contain host components.nn node.child.return = node;n node = node.child;n continue;n }n } else {n commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.nn if (node.child !== null) {n node.child.return = node;n node = node.child;n continue;n }n }nn if (node === current) {n return;n }nn while (node.sibling === null) {n if (node.return === null || node.return === current) {n return;n }nn node = node.return;nn if (node.tag === HostPortal) {n // When we go out of the portal, we need to restore the parent.n // Since we don’t keep a stack of them, we will search for it.n currentParentIsValid = false;n }n }nn node.sibling.return = node.return;n node = node.sibling;n }n}nnfunction commitDeletion(finishedRoot, current, renderPriorityLevel) {n {n // Recursively delete all host nodes from the parent.n // Detach refs and call componentWillUnmount() on the whole subtree.n unmountHostComponents(finishedRoot, current);n }nn var alternate = current.alternate;n detachFiberMutation(current);nn if (alternate !== null) {n detachFiberMutation(alternate);n }n}nnfunction commitWork(current, finishedWork) {nn switch (finishedWork.tag) {n case FunctionComponent:n case ForwardRef:n case MemoComponent:n case SimpleMemoComponent:n case Block:n {n // Layout effects are destroyed during the mutation phase so that alln // destroy functions for all fibers are called before any create functions.n // This prevents sibling component effects from interfering with each other,n // e.g. a destroy function in one component should never override a ref setn // by a create function in another component during the same commit.n {n commitHookEffectListUnmount(Layout | HasEffect, finishedWork);n }nn return;n }nn case ClassComponent:n {n return;n }nn case HostComponent:n {n var instance = finishedWork.stateNode;nn if (instance != null) {n // Commit the work prepared earlier.n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldPropsn // as the newProps. The updatePayload will contain the real change inn // this case.nn var oldProps = current !== null ? current.memoizedProps : newProps;n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.nn var updatePayload = finishedWork.updateQueue;n finishedWork.updateQueue = null;nn if (updatePayload !== null) {n commitUpdate(instance, updatePayload, type, oldProps, newProps);n }n }nn return;n }nn case HostText:n {n if (!(finishedWork.stateNode !== null)) {n {n throw Error( „This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.“ );n }n }nn var textInstance = finishedWork.stateNode;n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldPropsn // as the newProps. The updatePayload will contain the real change inn // this case.nn var oldText = current !== null ? current.memoizedProps : newText;n commitTextUpdate(textInstance, oldText, newText);n return;n }nn case HostRoot:n {n {n var _root = finishedWork.stateNode;nn if (_root.hydrate) {n // We’ve just hydrated. No need to hydrate again.n _root.hydrate = false;n commitHydratedContainer(_root.containerInfo);n }n }nn return;n }nn case Profiler:n {n return;n }nn case SuspenseComponent:n {n commitSuspenseComponent(finishedWork);n attachSuspenseRetryListeners(finishedWork);n return;n }nn case SuspenseListComponent:n {n attachSuspenseRetryListeners(finishedWork);n return;n }nn case IncompleteClassComponent:n {n return;n }nn case FundamentalComponent:n {nn break;n }nn case ScopeComponent:n {nn break;n }nn case OffscreenComponent:n case LegacyHiddenComponent:n {n var newState = finishedWork.memoizedState;n var isHidden = newState !== null;n hideOrUnhideAllChildren(finishedWork, isHidden);n return;n }n }nn {n {n throw Error( „This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.“ );n }n }n}nnfunction commitSuspenseComponent(finishedWork) {n var newState = finishedWork.memoizedState;nn if (newState !== null) {n markCommitTimeOfFallback();nn {n // Hide the Offscreen component that contains the primary children. TODO:n // Ideally, this effect would have been scheduled on the Offscreen fibern // itself. That’s how unhiding works: the Offscreen component schedules ann // effect on itself. However, in this case, the component didn’t complete,n // so the fiber was never added to the effect list in the normal path. Wen // could have appended it to the effect list in the Suspense component’sn // second pass, but doing it this way is less complicated. This would ben // simpler if we got rid of the effect list and traversed the tree, liken // we’re planning to do.n var primaryChildParent = finishedWork.child;n hideOrUnhideAllChildren(primaryChildParent, true);n }n }n}nnfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {nn var newState = finishedWork.memoizedState;nn if (newState === null) {n var current = finishedWork.alternate;nn if (current !== null) {n var prevState = current.memoizedState;nn if (prevState !== null) {n var suspenseInstance = prevState.dehydrated;nn if (suspenseInstance !== null) {n commitHydratedSuspenseInstance(suspenseInstance);n }n }n }n }n}nnfunction attachSuspenseRetryListeners(finishedWork) {n // If this boundary just timed out, then it will have a set of wakeables.n // For each wakeable, attach a listener so that when it resolves, Reactn // attempts to re-render the boundary in the primary (pre-timeout) state.n var wakeables = finishedWork.updateQueue;nn if (wakeables !== null) {n finishedWork.updateQueue = null;n var retryCache = finishedWork.stateNode;nn if (retryCache === null) {n retryCache = finishedWork.stateNode = new PossiblyWeakSet();n }nn wakeables.forEach(function (wakeable) {n // Memoize using the boundary fiber to prevent redundant listeners.n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);nn if (!retryCache.has(wakeable)) {n {n if (wakeable.__reactDoNotTraceInteractions !== true) {n retry = tracing.unstable_wrap(retry);n }n }nn retryCache.add(wakeable);n wakeable.then(retry, retry);n }n });n }n} // This function detects when a Suspense boundary goes from visible to hidden.n// It returns false if the boundary is already hidden.n// TODO: Use an effect tag.nnnfunction isSuspenseBoundaryBeingHidden(current, finishedWork) {n if (current !== null) {n var oldState = current.memoizedState;nn if (oldState === null || oldState.dehydrated !== null) {n var newState = finishedWork.memoizedState;n return newState !== null && newState.dehydrated === null;n }n }nn return false;n}nnfunction commitResetTextContent(current) {nn resetTextContent(current.stateNode);n}nnvar COMPONENT_TYPE = 0;nvar HAS_PSEUDO_CLASS_TYPE = 1;nvar ROLE_TYPE = 2;nvar TEST_NAME_TYPE = 3;nvar TEXT_TYPE = 4;nnif (typeof Symbol === ‚function‘ && Symbol.for) {n var symbolFor$1 = Symbol.for;n COMPONENT_TYPE = symbolFor$1(’selector.component‘);n HAS_PSEUDO_CLASS_TYPE = symbolFor$1(’selector.has_pseudo_class‘);n ROLE_TYPE = symbolFor$1(’selector.role‘);n TEST_NAME_TYPE = symbolFor$1(’selector.test_id‘);n TEXT_TYPE = symbolFor$1(’selector.text‘);n}nvar commitHooks = [];nfunction onCommitRoot$1() {n {n commitHooks.forEach(function (commitHook) {n return commitHook();n });n }n}nnvar ceil = Math.ceil;nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,n IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;nvar NoContext =n/* */n0;nvar BatchedContext =n/* */n1;nvar EventContext =n/* */n2;nvar DiscreteEventContext =n/* */n4;nvar LegacyUnbatchedContext =n/* */n8;nvar RenderContext =n/* */n16;nvar CommitContext =n/* */n32;nvar RetryAfterError =n/* */n64;nvar RootIncomplete = 0;nvar RootFatalErrored = 1;nvar RootErrored = 2;nvar RootSuspended = 3;nvar RootSuspendedWithDelay = 4;nvar RootCompleted = 5; // Describes where we are in the React execution stacknnvar executionContext = NoContext; // The root we’re working onnnvar workInProgressRoot = null; // The fiber we’re working onnnvar workInProgress = null; // The lanes we’re renderingnnvar workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtreen// This is a superset of the lanes we started working on at the root. The onlyn// case where it’s different from `workInProgressRootRenderLanes` is when wen// enter a subtree that is hidden and needs to be unhidden: Suspense andn// Offscreen component.n//n// Most things in the work loop should deal with workInProgressRootRenderLanes.n// Most things in begin/complete phases should deal with subtreeRenderLanes.nnvar subtreeRenderLanes = NoLanes;nvar subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.nnvar workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrownnnvar workInProgressRootFatalError = null; // „Included“ lanes refer to lanes that were worked on during this render. It’sn// slightly different than `renderLanes` because `renderLanes` can change as youn// enter and exit an Offscreen tree. This value is the combination of all rendern// lanes for the entire render phase.nnvar workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Onlyn// includes unprocessed updates, not work in bailed out children.nnvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.nnvar workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.nnvar workInProgressRootPingedLanes = NoLanes;nvar mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a trainn// model where we don’t commit new loading states in too quick succession.nnvar globalMostRecentFallbackTime = 0;nvar FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on renderingn// more and prefer CPU suspense heuristics instead.nnvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPUn// suspense heuristics and opt out of rendering more content.nnvar RENDER_TIMEOUT_MS = 500;nnfunction resetRenderTimer() {n workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;n}nnfunction getRenderTargetTime() {n return workInProgressRootRenderTargetTime;n}nvar nextEffect = null;nvar hasUncaughtError = false;nvar firstUncaughtError = null;nvar legacyErrorBoundariesThatAlreadyFailed = null;nvar rootDoesHavePassiveEffects = false;nvar rootWithPendingPassiveEffects = null;nvar pendingPassiveEffectsRenderPriority = NoPriority$1;nvar pendingPassiveEffectsLanes = NoLanes;nvar pendingPassiveHookEffectsMount = [];nvar pendingPassiveHookEffectsUnmount = [];nvar rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updatesnnvar NESTED_UPDATE_LIMIT = 50;nvar nestedUpdateCount = 0;nvar rootWithNestedUpdates = null;nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;nvar nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanesn// during the commit phase. This enables them to be traced across componentsn// that spawn new work during render. E.g. hidden boundaries, suspended SSRn// hydration or SuspenseList.n// TODO: Can use a bitmask instead of an arraynnvar spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat theirn// event times as simultaneous, even if the actual clock time has advancedn// between the first and second call.nnvar currentEventTime = NoTimestamp;nvar currentEventWipLanes = NoLanes;nvar currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.n// We warn about state updates for unmounted components differently in this case.nnvar isFlushingPassiveEffects = false;nvar focusedInstanceHandle = null;nvar shouldFireAfterActiveInstanceBlur = false;nfunction getWorkInProgressRoot() {n return workInProgressRoot;n}nfunction requestEventTime() {n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {n // We’re inside React, so it’s fine to read the actual time.n return now();n } // We’re not inside React, so we may be in the middle of a browser event.nnn if (currentEventTime !== NoTimestamp) {n // Use the same start time for all updates until we enter React again.n return currentEventTime;n } // This is the first update since React yielded. Compute a new start time.nnn currentEventTime = now();n return currentEventTime;n}nfunction requestUpdateLane(fiber) {n // Special casesn var mode = fiber.mode;nn if ((mode & BlockingMode) === NoMode) {n return SyncLane;n } else if ((mode & ConcurrentMode) === NoMode) {n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;n } // The algorithm for assigning an update to a lane should be stable for alln // updates at the same priority within the same event. To do this, the inputsn // to the algorithm must be the same. For example, we use the `renderLanes`n // to avoid choosing a lane that is already in the middle of rendering.n //n // However, the „included“ lanes could be mutated in between updates in then // same event, like if you perform an update inside `flushSync`. Or any othern // code path that might call `prepareFreshStack`.n //n // The trick we use is to cache the first of each of these inputs within ann // event. Then reset the cached values once we can be sure the event is over.n // Our heuristic for that is whenever we enter a concurrent work loop.n //n // We’ll do the same for `currentEventPendingLanes` below.nnn if (currentEventWipLanes === NoLanes) {n currentEventWipLanes = workInProgressRootIncludedLanes;n }nn var isTransition = requestCurrentTransition() !== NoTransition;nn if (isTransition) {n if (currentEventPendingLanes !== NoLanes) {n currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;n }nn return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);n } // TODO: Remove this dependency on the Scheduler priority.n // To do that, we’re replacing it with an update lane priority.nnn var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.n // This couples React to the Scheduler internals, so we’re replacing itn // with the currentUpdateLanePriority above. As an example of how thisn // could be problematic, if we’re not inside `Scheduler.runWithPriority`,n // then we’ll get the priority of the current running Scheduler task,n // which is probably not what we want.nn var lane;nn if ( // TODO: Temporary. We’re removing the concept of discrete updates.n (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {n lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);n } else {n var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);nn lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);n }nn return lane;n}nnfunction requestRetryLane(fiber) {n // This is a fork of `requestUpdateLane` designed specifically for Suspensen // „retries“ — a special update that attempts to flip a Suspense boundaryn // from its placeholder state to its primary/resolved state.n // Special casesn var mode = fiber.mode;nn if ((mode & BlockingMode) === NoMode) {n return SyncLane;n } else if ((mode & ConcurrentMode) === NoMode) {n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;n } // See `requestUpdateLane` for explanation of `currentEventWipLanes`nnn if (currentEventWipLanes === NoLanes) {n currentEventWipLanes = workInProgressRootIncludedLanes;n }nn return findRetryLane(currentEventWipLanes);n}nnfunction scheduleUpdateOnFiber(fiber, lane, eventTime) {n checkForNestedUpdates();n warnAboutRenderPhaseUpdatesInDEV(fiber);n var root = markUpdateLaneFromFiberToRoot(fiber, lane);nn if (root === null) {n warnAboutUpdateOnUnmountedFiberInDEV(fiber);n return null;n } // Mark that the root has a pending update.nnn markRootUpdated(root, lane, eventTime);nn if (root === workInProgressRoot) {n // Received an update to a tree that’s in the middle of rendering. Markn // that there was an interleaved update work on this root. Unless then // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a rendern // phase update. In that case, we don’t treat render phase updates as ifn // they were interleaved, for backwards compat reasons.n {n workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);n }nn if (workInProgressRootExitStatus === RootSuspendedWithDelay) {n // The root already suspended with a delay, which means this rendern // definitely won’t finish. Since we have a new update, let’s mark it asn // suspended now, right before marking the incoming update. This has then // effect of interrupting the current render and switching to the update.n // TODO: Make sure this doesn’t override pings that happen while we’ven // already started rendering.n markRootSuspended$1(root, workInProgressRootRenderLanes);n }n } // TODO: requestUpdateLanePriority also reads the priority. Pass then // priority as an argument to that function and this one.nnn var priorityLevel = getCurrentPriorityLevel();nn if (lane === SyncLane) {n if ( // Check if we’re inside unbatchedUpdatesn (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we’re not already renderingn (executionContext & (RenderContext | CommitContext)) === NoContext) {n // Register pending interactions on the root to avoid losing traced interaction data.n schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-edn // root inside of batchedUpdates should be synchronous, but layout updatesn // should be deferred until the end of the batch.nn performSyncWorkOnRoot(root);n } else {n ensureRootIsScheduled(root, eventTime);n schedulePendingInteractions(root, lane);nn if (executionContext === NoContext) {n // Flush the synchronous work now, unless we’re already working or insiden // a batch. This is intentionally inside scheduleUpdateOnFiber instead ofn // scheduleCallbackForFiber to preserve the ability to schedule a callbackn // without immediately flushing it. We only do this for user-initiatedn // updates, to preserve historical behavior of legacy mode.n resetRenderTimer();n flushSyncCallbackQueue();n }n }n } else {n // Schedule a discrete update but only if it’s not Sync.n if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are consideredn // discrete, even inside a discrete event.n priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {n // This is the result of a discrete event. Track the lowest priorityn // discrete update per root so we can flush them early, if needed.n if (rootsWithPendingDiscreteUpdates === null) {n rootsWithPendingDiscreteUpdates = new Set([root]);n } else {n rootsWithPendingDiscreteUpdates.add(root);n }n } // Schedule other updates after in case the callback is sync.nnn ensureRootIsScheduled(root, eventTime);n schedulePendingInteractions(root, lane);n } // We use this when assigning a lane for a transition insiden // `requestUpdateLane`. We assume it’s the same as the root being updated,n // since in the common case of a single root app it probably is. If it’s notn // the same root, then it’s not a huge deal, we just might batch more stuffn // together more than necessary.nnn mostRecentlyUpdatedRoot = root;n} // This is split into a separate function so we can mark a fiber with pendingn// work without treating it as a typical update that originates from an event;n// e.g. retrying a Suspense boundary isn’t an update, but it does schedule workn// on a fiber.nnfunction markUpdateLaneFromFiberToRoot(sourceFiber, lane) {n // Update the source fiber’s lanesn sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);n var alternate = sourceFiber.alternate;nn if (alternate !== null) {n alternate.lanes = mergeLanes(alternate.lanes, lane);n }nn {n if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);n }n } // Walk the parent path to the root and update the child expiration time.nnn var node = sourceFiber;n var parent = sourceFiber.return;nn while (parent !== null) {n parent.childLanes = mergeLanes(parent.childLanes, lane);n alternate = parent.alternate;nn if (alternate !== null) {n alternate.childLanes = mergeLanes(alternate.childLanes, lane);n } else {n {n if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);n }n }n }nn node = parent;n parent = parent.return;n }nn if (node.tag === HostRoot) {n var root = node.stateNode;n return root;n } else {n return null;n }n} // Use this function to schedule a task for a root. There’s only one task pern// root; if a task was already scheduled, we’ll check to make sure the priorityn// of the existing task is the same as the priority of the next level that then// root has work on. This function is called on every update, and right beforen// exiting a task.nnnfunction ensureRootIsScheduled(root, currentTime) {n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them asn // expired so we know to work on those next.nn markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.nn var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.nn var newCallbackPriority = returnNextLanesPriority();nn if (nextLanes === NoLanes) {n // Special case: There’s nothing to work on.n if (existingCallbackNode !== null) {n cancelCallback(existingCallbackNode);n root.callbackNode = null;n root.callbackPriority = NoLanePriority;n }nn return;n } // Check if there’s an existing task. We may be able to reuse it.nnn if (existingCallbackNode !== null) {n var existingCallbackPriority = root.callbackPriority;nn if (existingCallbackPriority === newCallbackPriority) {n // The priority hasn’t changed. We can reuse the existing task. Exit.n return;n } // The priority changed. Cancel the existing callback. We’ll schedule a newn // one below.nnn cancelCallback(existingCallbackNode);n } // Schedule a new callback.nnn var newCallbackNode;nn if (newCallbackPriority === SyncLanePriority) {n // Special case: Sync React callbacks are scheduled on a specialn // internal queuen newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));n } else if (newCallbackPriority === SyncBatchedLanePriority) {n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));n } else {n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));n }nn root.callbackPriority = newCallbackPriority;n root.callbackNode = newCallbackNode;n} // This is the entry point for every concurrent task, i.e. anything thatn// goes through Scheduler.nnnfunction performConcurrentWorkOnRoot(root) {n // Since we know we’re in a React event, we can clear the currentn // event time. The next update will compute a new event time.n currentEventTime = NoTimestamp;n currentEventWipLanes = NoLanes;n currentEventPendingLanes = NoLanes;nn if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {n {n throw Error( „Should not already be working.“ );n }n } // Flush any pending passive effects before deciding which lanes to work on,n // in case they schedule additional work.nnn var originalCallbackNode = root.callbackNode;n var didFlushPassiveEffects = flushPassiveEffects();nn if (didFlushPassiveEffects) {n // Something in the passive effect phase may have canceled the current task.n // Check if the task node for this root was changed.n if (root.callbackNode !== originalCallbackNode) {n // The current task was canceled. Exit. We don’t need to calln // `ensureRootIsScheduled` because the check above implies either thatn // there’s a new task, or that there’s no remaining work on this root.n return null;n }n } // Determine the next expiration time to work on, using the fields storedn // on the root.nnn var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);nn if (lanes === NoLanes) {n // Defensive coding. This is never expected to happen.n return null;n }nn var exitStatus = renderRootConcurrent(root, lanes);nn if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {n // The render included lanes that were updated during the render phase.n // For example, when unhiding a hidden tree, we include all the lanesn // that were previously skipped when the tree was hidden. That set ofn // lanes is a superset of the lanes we started rendering with.n //n // So we’ll throw out the current work and restart.n prepareFreshStack(root, NoLanes);n } else if (exitStatus !== RootIncomplete) {n if (exitStatus === RootErrored) {n executionContext |= RetryAfterError; // If an error occurred during hydration,n // discard server response and fall back to client side render.nn if (root.hydrate) {n root.hydrate = false;n clearContainer(root.containerInfo);n } // If something threw an error, try rendering one more time. We’ll rendern // synchronously to block concurrent data mutations, and we’ll includesn // all pending updates are included. If it still fails after the secondn // attempt, we’ll give up and commit the resulting tree.nnn lanes = getLanesToRetrySynchronouslyOnError(root);nn if (lanes !== NoLanes) {n exitStatus = renderRootSync(root, lanes);n }n }nn if (exitStatus === RootFatalErrored) {n var fatalError = workInProgressRootFatalError;n prepareFreshStack(root, NoLanes);n markRootSuspended$1(root, lanes);n ensureRootIsScheduled(root, now());n throw fatalError;n } // We now have a consistent tree. The next step is either to commit it,n // or, if something suspended, wait to commit it after a timeout.nnn var finishedWork = root.current.alternate;n root.finishedWork = finishedWork;n root.finishedLanes = lanes;n finishConcurrentRender(root, exitStatus, lanes);n }nn ensureRootIsScheduled(root, now());nn if (root.callbackNode === originalCallbackNode) {n // The task node scheduled for this root is the same one that’sn // currently executed. Need to return a continuation.n return performConcurrentWorkOnRoot.bind(null, root);n }nn return null;n}nnfunction finishConcurrentRender(root, exitStatus, lanes) {n switch (exitStatus) {n case RootIncomplete:n case RootFatalErrored:n {n {n {n throw Error( „Root did not complete. This is a bug in React.“ );n }n }n }n // Flow knows about invariant, so it complains if I add a breakn // statement, but eslint doesn’t know about invariant, so it complainsn // if I do. eslint-disable-next-line no-fallthroughnn case RootErrored:n {n // We should have already attempted to retry this tree. If we reachedn // this point, it errored again. Commit it.n commitRoot(root);n break;n }nn case RootSuspended:n {n markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if wen // should immediately commit it or wait a bit.nn if (includesOnlyRetries(lanes) && // do not delay if we’re inside an act() scopen !shouldForceFlushFallbacksInDEV()) {n // This render only included retries, no updates. Throttle committingn // retries so that we don’t show too many loading states too quickly.n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS – now(); // Don’t bother with a very short suspense time.nn if (msUntilTimeout > 10) {n var nextLanes = getNextLanes(root, NoLanes);nn if (nextLanes !== NoLanes) {n // There’s additional work on this root.n break;n }nn var suspendedLanes = root.suspendedLanes;nn if (!isSubsetOfLanes(suspendedLanes, lanes)) {n // We should prefer to render the fallback of at the lastn // suspended level. Ping the last suspended level to tryn // rendering it again.n // FIXME: What if the suspended lanes are Idle? Should not restart.n var eventTime = requestEventTime();n markRootPinged(root, suspendedLanes);n break;n } // The render is suspended, it hasn’t timed out, and there’s non // lower priority work to do. Instead of committing the fallbackn // immediately, wait for more data to arrive.nnn root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);n break;n }n } // The work expired. Commit immediately.nnn commitRoot(root);n break;n }nn case RootSuspendedWithDelay:n {n markRootSuspended$1(root, lanes);nn if (includesOnlyTransitions(lanes)) {n // This is a transition, so we should exit without committing an // placeholder and without scheduling a timeout. Delay indefinitelyn // until we receive more data.n break;n }nn if (!shouldForceFlushFallbacksInDEV()) {n // This is not a transition, but we did trigger an avoided state.n // Schedule a placeholder to display after a short delay, using the Justn // Noticeable Difference.n // TODO: Is the JND optimization worth the added complexity? If this isn // the only reason we track the event time, then probably not.n // Consider removing.n var mostRecentEventTime = getMostRecentEventTime(root, lanes);n var eventTimeMs = mostRecentEventTime;n var timeElapsedMs = now() – eventTimeMs;nn var _msUntilTimeout = jnd(timeElapsedMs) – timeElapsedMs; // Don’t bother with a very short suspense time.nnn if (_msUntilTimeout > 10) {n // Instead of committing the fallback immediately, wait for more datan // to arrive.n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);n break;n }n } // Commit the placeholder.nnn commitRoot(root);n break;n }nn case RootCompleted:n {n // The work completed. Ready to commit.n commitRoot(root);n break;n }nn default:n {n {n {n throw Error( „Unknown root exit status.“ );n }n }n }n }n}nnfunction markRootSuspended$1(root, suspendedLanes) {n // When suspending, we should always exclude lanes that were pinged or (moren // rarely, since we try to avoid it) updated during the render phase.n // TODO: Lol maybe there’s a better way to factor this besides thisn // obnoxiously named function :)n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);n markRootSuspended(root, suspendedLanes);n} // This is the entry point for synchronous tasks that don’t gon// through Schedulernnnfunction performSyncWorkOnRoot(root) {n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {n {n throw Error( „Should not already be working.“ );n }n }nn flushPassiveEffects();n var lanes;n var exitStatus;nn if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {n // There’s a partial tree, and at least one of its lanes has expired. Finishn // rendering it before rendering the rest of the expired work.n lanes = workInProgressRootRenderLanes;n exitStatus = renderRootSync(root, lanes);nn if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {n // The render included lanes that were updated during the render phase.n // For example, when unhiding a hidden tree, we include all the lanesn // that were previously skipped when the tree was hidden. That set ofn // lanes is a superset of the lanes we started rendering with.n //n // Note that this only happens when part of the tree is renderedn // concurrently. If the whole tree is rendered synchronously, then theren // are no interleaved events.n lanes = getNextLanes(root, lanes);n exitStatus = renderRootSync(root, lanes);n }n } else {n lanes = getNextLanes(root, NoLanes);n exitStatus = renderRootSync(root, lanes);n }nn if (root.tag !== LegacyRoot && exitStatus === RootErrored) {n executionContext |= RetryAfterError; // If an error occurred during hydration,n // discard server response and fall back to client side render.nn if (root.hydrate) {n root.hydrate = false;n clearContainer(root.containerInfo);n } // If something threw an error, try rendering one more time. We’ll rendern // synchronously to block concurrent data mutations, and we’ll includesn // all pending updates are included. If it still fails after the secondn // attempt, we’ll give up and commit the resulting tree.nnn lanes = getLanesToRetrySynchronouslyOnError(root);nn if (lanes !== NoLanes) {n exitStatus = renderRootSync(root, lanes);n }n }nn if (exitStatus === RootFatalErrored) {n var fatalError = workInProgressRootFatalError;n prepareFreshStack(root, NoLanes);n markRootSuspended$1(root, lanes);n ensureRootIsScheduled(root, now());n throw fatalError;n } // We now have a consistent tree. Because this is a sync render, wen // will commit it even if something suspended.nnn var finishedWork = root.current.alternate;n root.finishedWork = finishedWork;n root.finishedLanes = lanes;n commitRoot(root); // Before exiting, make sure there’s a callback scheduled for the nextn // pending level.nn ensureRootIsScheduled(root, now());n return null;n}nfunction flushDiscreteUpdates() {n // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.n // However, `act` uses `batchedUpdates`, so there’s no way to distinguishn // those two cases. Need to fix this before exposing flushDiscreteUpdatesn // as a public API.n if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {n {n if ((executionContext & RenderContext) !== NoContext) {n error(‚unstable_flushDiscreteUpdates: Cannot flush updates when React is ‚ + ‚already rendering.‘);n }n } // We’re already rendering, so we can’t synchronously flush pending work.n // This is probably a nested event dispatch triggered by a lifecycle/effect,n // like `el.focus()`. Exit.nnn return;n }nn flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so thatn // they fire before the next serial event.nn flushPassiveEffects();n}nnfunction flushPendingDiscreteUpdates() {n if (rootsWithPendingDiscreteUpdates !== null) {n // For each root with pending discrete updates, schedule a callback ton // immediately flush them.n var roots = rootsWithPendingDiscreteUpdates;n rootsWithPendingDiscreteUpdates = null;n roots.forEach(function (root) {n markDiscreteUpdatesExpired(root);n ensureRootIsScheduled(root, now());n });n } // Now flush the immediate queue.nnn flushSyncCallbackQueue();n}nnfunction batchedUpdates$1(fn, a) {n var prevExecutionContext = executionContext;n executionContext |= BatchedContext;nn try {n return fn(a);n } finally {n executionContext = prevExecutionContext;nn if (executionContext === NoContext) {n // Flush the immediate callbacks that were scheduled during this batchn resetRenderTimer();n flushSyncCallbackQueue();n }n }n}nfunction batchedEventUpdates$1(fn, a) {n var prevExecutionContext = executionContext;n executionContext |= EventContext;nn try {n return fn(a);n } finally {n executionContext = prevExecutionContext;nn if (executionContext === NoContext) {n // Flush the immediate callbacks that were scheduled during this batchn resetRenderTimer();n flushSyncCallbackQueue();n }n }n}nfunction discreteUpdates$1(fn, a, b, c, d) {n var prevExecutionContext = executionContext;n executionContext |= DiscreteEventContext;nn {n try {n return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));n } finally {n executionContext = prevExecutionContext;nn if (executionContext === NoContext) {n // Flush the immediate callbacks that were scheduled during this batchn resetRenderTimer();n flushSyncCallbackQueue();n }n }n }n}nfunction unbatchedUpdates(fn, a) {n var prevExecutionContext = executionContext;n executionContext &= ~BatchedContext;n executionContext |= LegacyUnbatchedContext;nn try {n return fn(a);n } finally {n executionContext = prevExecutionContext;nn if (executionContext === NoContext) {n // Flush the immediate callbacks that were scheduled during this batchn resetRenderTimer();n flushSyncCallbackQueue();n }n }n}nfunction flushSync(fn, a) {n var prevExecutionContext = executionContext;nn if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {n {n error(‚flushSync was called from inside a lifecycle method. React cannot ‚ + ‚flush when React is already rendering. Consider moving this call to ‚ + ‚a scheduler task or micro task.‘);n }nn return fn(a);n }nn executionContext |= BatchedContext;nn {n try {n if (fn) {n return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));n } else {n return undefined;n }n } finally {n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.n // Note that this will happen even if batchedUpdates is higher upn // the stack.nn flushSyncCallbackQueue();n }n }n}nfunction pushRenderLanes(fiber, lanes) {n push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);n subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);n workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);n}nfunction popRenderLanes(fiber) {n subtreeRenderLanes = subtreeRenderLanesCursor.current;n pop(subtreeRenderLanesCursor, fiber);n}nnfunction prepareFreshStack(root, lanes) {n root.finishedWork = null;n root.finishedLanes = NoLanes;n var timeoutHandle = root.timeoutHandle;nn if (timeoutHandle !== noTimeout) {n // The root previous suspended and scheduled a timeout to commit a fallbackn // state. Now that we have additional work, cancel the timeout.n root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check abovenn cancelTimeout(timeoutHandle);n }nn if (workInProgress !== null) {n var interruptedWork = workInProgress.return;nn while (interruptedWork !== null) {n unwindInterruptedWork(interruptedWork);n interruptedWork = interruptedWork.return;n }n }nn workInProgressRoot = root;n workInProgress = createWorkInProgress(root.current, null);n workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;n workInProgressRootExitStatus = RootIncomplete;n workInProgressRootFatalError = null;n workInProgressRootSkippedLanes = NoLanes;n workInProgressRootUpdatedLanes = NoLanes;n workInProgressRootPingedLanes = NoLanes;nn {n spawnedWorkDuringRender = null;n }nn {n ReactStrictModeWarnings.discardPendingWarnings();n }n}nnfunction handleError(root, thrownValue) {n do {n var erroredWork = workInProgress;nn try {n // Reset module-level state that was set during the render phase.n resetContextDependencies();n resetHooksAfterThrow();n resetCurrentFiber(); // TODO: I found and added this missing line while investigating an // separate issue. Write a regression test using string refs.nn ReactCurrentOwner$2.current = null;nn if (erroredWork === null || erroredWork.return === null) {n // Expected to be working on a non-root fiber. This is a fatal errorn // because there’s no ancestor that can handle it; the root isn // supposed to capture all errors that weren’t caught by an errorn // boundary.n workInProgressRootExitStatus = RootFatalErrored;n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the nextn // sibling, or the parent if there are no siblings. But since the rootn // has no siblings nor a parent, we set it to null. Usually this isn // handled by `completeUnitOfWork` or `unwindWork`, but since we’ren // intentionally not calling those, we need set it here.n // TODO: Consider calling `unwindWork` to pop the contexts.nn workInProgress = null;n return;n }nn if (enableProfilerTimer && erroredWork.mode & ProfileMode) {n // Record the time spent rendering before an error was thrown. Thisn // avoids inaccurate Profiler durations in the case of an // suspended render.n stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);n }nn throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);n completeUnitOfWork(erroredWork);n } catch (yetAnotherThrownValue) {n // Something in the return path also threw.n thrownValue = yetAnotherThrownValue;nn if (workInProgress === erroredWork && erroredWork !== null) {n // If this boundary has already errored, then we had trouble processingn // the error. Bubble it to the next boundary.n erroredWork = erroredWork.return;n workInProgress = erroredWork;n } else {n erroredWork = workInProgress;n }nn continue;n } // Return to the normal work loop.nnn return;n } while (true);n}nnfunction pushDispatcher() {n var prevDispatcher = ReactCurrentDispatcher$2.current;n ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;nn if (prevDispatcher === null) {n // The React isomorphic package does not include a default dispatcher.n // Instead the first renderer will lazily attach one, in order to given // nicer error messages.n return ContextOnlyDispatcher;n } else {n return prevDispatcher;n }n}nnfunction popDispatcher(prevDispatcher) {n ReactCurrentDispatcher$2.current = prevDispatcher;n}nnfunction pushInteractions(root) {n {n var prevInteractions = tracing.__interactionsRef.current;n tracing.__interactionsRef.current = root.memoizedInteractions;n return prevInteractions;n }n}nnfunction popInteractions(prevInteractions) {n {n tracing.__interactionsRef.current = prevInteractions;n }n}nnfunction markCommitTimeOfFallback() {n globalMostRecentFallbackTime = now();n}nfunction markSkippedUpdateLanes(lane) {n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);n}nfunction renderDidSuspend() {n if (workInProgressRootExitStatus === RootIncomplete) {n workInProgressRootExitStatus = RootSuspended;n }n}nfunction renderDidSuspendDelayIfPossible() {n if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {n workInProgressRootExitStatus = RootSuspendedWithDelay;n } // Check if there are updates that we skipped tree that might have unblockedn // this render.nnn if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {n // Mark the current render as suspended so that we switch to working onn // the updates that were skipped. Usually we only suspend at the end ofn // the render phase.n // TODO: We should probably always mark the root as suspended immediatelyn // (inside this function), since by suspending at the end of the rendern // phase introduces a potential mistake where we suspend lanes that weren // pinged or updated while we were rendering.n markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);n }n}nfunction renderDidError() {n if (workInProgressRootExitStatus !== RootCompleted) {n workInProgressRootExitStatus = RootErrored;n }n} // Called during render to determine if anything has suspended.n// Returns false if we’re not sure.nnfunction renderHasNotSuspendedYet() {n // If something errored or completed, we can’t really be sure,n // so those are false.n return workInProgressRootExitStatus === RootIncomplete;n}nnfunction renderRootSync(root, lanes) {n var prevExecutionContext = executionContext;n executionContext |= RenderContext;n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stackn // and prepare a fresh one. Otherwise we’ll continue where we left off.nn if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {n prepareFreshStack(root, lanes);n startWorkOnPendingInteractions(root, lanes);n }nn var prevInteractions = pushInteractions(root);nn do {n try {n workLoopSync();n break;n } catch (thrownValue) {n handleError(root, thrownValue);n }n } while (true);nn resetContextDependencies();nn {n popInteractions(prevInteractions);n }nn executionContext = prevExecutionContext;n popDispatcher(prevDispatcher);nn if (workInProgress !== null) {n // This is a sync render, so we should have finished the whole tree.n {n {n throw Error( „Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.“ );n }n }n }nnn workInProgressRoot = null;n workInProgressRootRenderLanes = NoLanes;n return workInProgressRootExitStatus;n} // The work loop is an extremely hot path. Tell Closure not to inline it.nn/** @noinline */nnnfunction workLoopSync() {n // Already timed out, so perform work without checking if we need to yield.n while (workInProgress !== null) {n performUnitOfWork(workInProgress);n }n}nnfunction renderRootConcurrent(root, lanes) {n var prevExecutionContext = executionContext;n executionContext |= RenderContext;n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stackn // and prepare a fresh one. Otherwise we’ll continue where we left off.nn if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {n resetRenderTimer();n prepareFreshStack(root, lanes);n startWorkOnPendingInteractions(root, lanes);n }nn var prevInteractions = pushInteractions(root);nn do {n try {n workLoopConcurrent();n break;n } catch (thrownValue) {n handleError(root, thrownValue);n }n } while (true);nn resetContextDependencies();nn {n popInteractions(prevInteractions);n }nn popDispatcher(prevDispatcher);n executionContext = prevExecutionContext;nnn if (workInProgress !== null) {nn return RootIncomplete;n } else {nnn workInProgressRoot = null;n workInProgressRootRenderLanes = NoLanes; // Return the final exit status.nn return workInProgressRootExitStatus;n }n}n/** @noinline */nnnfunction workLoopConcurrent() {n // Perform work until Scheduler asks us to yieldn while (workInProgress !== null && !shouldYield()) {n performUnitOfWork(workInProgress);n }n}nnfunction performUnitOfWork(unitOfWork) {n // The current, flushed, state of this fiber is the alternate. Ideallyn // nothing should rely on this, but relying on it here means that we don’tn // need an additional field on the work in progress.n var current = unitOfWork.alternate;n setCurrentFiber(unitOfWork);n var next;nn if ( (unitOfWork.mode & ProfileMode) !== NoMode) {n startProfilerTimer(unitOfWork);n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);n } else {n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);n }nn resetCurrentFiber();n unitOfWork.memoizedProps = unitOfWork.pendingProps;nn if (next === null) {n // If this doesn’t spawn new work, complete the current work.n completeUnitOfWork(unitOfWork);n } else {n workInProgress = next;n }nn ReactCurrentOwner$2.current = null;n}nnfunction completeUnitOfWork(unitOfWork) {n // Attempt to complete the current unit of work, then move to the nextn // sibling. If there are no more siblings, return to the parent fiber.n var completedWork = unitOfWork;nn do {n // The current, flushed, state of this fiber is the alternate. Ideallyn // nothing should rely on this, but relying on it here means that we don’tn // need an additional field on the work in progress.n var current = completedWork.alternate;n var returnFiber = completedWork.return; // Check if the work completed or if something threw.nn if ((completedWork.flags & Incomplete) === NoFlags) {n setCurrentFiber(completedWork);n var next = void 0;nn if ( (completedWork.mode & ProfileMode) === NoMode) {n next = completeWork(current, completedWork, subtreeRenderLanes);n } else {n startProfilerTimer(completedWork);n next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn’t error.nn stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);n }nn resetCurrentFiber();nn if (next !== null) {n // Completing this fiber spawned new work. Work on that next.n workInProgress = next;n return;n }nn resetChildLanes(completedWork);nn if (returnFiber !== null && // Do not append effects to parents if a sibling failed to completen (returnFiber.flags & Incomplete) === NoFlags) {n // Append all the effects of the subtree and this fiber onto the effectn // list of the parent. The completion order of the children affects then // side-effect order.n if (returnFiber.firstEffect === null) {n returnFiber.firstEffect = completedWork.firstEffect;n }nn if (completedWork.lastEffect !== null) {n if (returnFiber.lastEffect !== null) {n returnFiber.lastEffect.nextEffect = completedWork.firstEffect;n }nn returnFiber.lastEffect = completedWork.lastEffect;n } // If this fiber had side-effects, we append it AFTER the children’sn // side-effects. We can perform certain side-effects earlier if needed,n // by doing multiple passes over the effect list. We don’t want ton // schedule our own side-effect on our own list because if end upn // reusing children we’ll schedule this effect onto itself since we’ren // at the end.nnn var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effectn // list. PerformedWork effect is read by React DevTools but shouldn’t ben // committed.nn if (flags > PerformedWork) {n if (returnFiber.lastEffect !== null) {n returnFiber.lastEffect.nextEffect = completedWork;n } else {n returnFiber.firstEffect = completedWork;n }nn returnFiber.lastEffect = completedWork;n }n }n } else {n // This fiber did not complete because something threw. Pop values offn // the stack without entering the complete phase. If this is a boundary,n // capture values if possible.n var _next = unwindWork(completedWork); // Because this fiber did not complete, don’t reset its expiration time.nnn if (_next !== null) {n // If completing this work spawned new work, do that next. We’ll comen // back here again.n // Since we’re restarting, remove anything that is not a host effectn // from the effect tag.n _next.flags &= HostEffectMask;n workInProgress = _next;n return;n }nn if ( (completedWork.mode & ProfileMode) !== NoMode) {n // Record the render duration for the fiber that errored.n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.nn var actualDuration = completedWork.actualDuration;n var child = completedWork.child;nn while (child !== null) {n actualDuration += child.actualDuration;n child = child.sibling;n }nn completedWork.actualDuration = actualDuration;n }nn if (returnFiber !== null) {n // Mark the parent fiber as incomplete and clear its effect list.n returnFiber.firstEffect = returnFiber.lastEffect = null;n returnFiber.flags |= Incomplete;n }n }nn var siblingFiber = completedWork.sibling;nn if (siblingFiber !== null) {n // If there is more work to do in this returnFiber, do that next.n workInProgress = siblingFiber;n return;n } // Otherwise, return to the parentnnn completedWork = returnFiber; // Update the next thing we’re working on in case something throws.nn workInProgress = completedWork;n } while (completedWork !== null); // We’ve reached the root.nnn if (workInProgressRootExitStatus === RootIncomplete) {n workInProgressRootExitStatus = RootCompleted;n }n}nnfunction resetChildLanes(completedWork) {n if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`n // to switch statement in `completeWork`.n (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {n // The children of this component are hidden. Don’t bubble theirn // expiration times.n return;n }nn var newChildLanes = NoLanes; // Bubble up the earliest expiration time.nn if ( (completedWork.mode & ProfileMode) !== NoMode) {n // In profiling mode, resetChildExpirationTime is also used to resetn // profiler durations.n var actualDuration = completedWork.actualDuration;n var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value willn // only be updated if work is done on the fiber (i.e. it doesn’t bailout).n // When work is done, it should bubble to the parent’s actualDuration. Ifn // the fiber has not been cloned though, (meaning no work was done), thenn // this value will reflect the amount of time spent working on a previousn // render. In that case it should not bubble. We determine whether it wasn // cloned by comparing the child pointer.nn var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;n var child = completedWork.child;nn while (child !== null) {n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));nn if (shouldBubbleActualDurations) {n actualDuration += child.actualDuration;n }nn treeBaseDuration += child.treeBaseDuration;n child = child.sibling;n }nn var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;nn if (isTimedOutSuspense) {n // Don’t count time spent in a timed out Suspense subtree as part of the base duration.n var primaryChildFragment = completedWork.child;nn if (primaryChildFragment !== null) {n treeBaseDuration -= primaryChildFragment.treeBaseDuration;n }n }nn completedWork.actualDuration = actualDuration;n completedWork.treeBaseDuration = treeBaseDuration;n } else {n var _child = completedWork.child;nn while (_child !== null) {n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));n _child = _child.sibling;n }n }nn completedWork.childLanes = newChildLanes;n}nnfunction commitRoot(root) {n var renderPriorityLevel = getCurrentPriorityLevel();n runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));n return null;n}nnfunction commitRootImpl(root, renderPriorityLevel) {n do {n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, whichn // means `flushPassiveEffects` will sometimes result in additionaln // passive effects. So we need to keep flushing in a loop until there aren // no more pending effects.n // TODO: Might be better if `flushPassiveEffects` did not automaticallyn // flush synchronous work at the end, to avoid factoring hazards like this.n flushPassiveEffects();n } while (rootWithPendingPassiveEffects !== null);nn flushRenderPhaseStrictModeWarningsInDEV();nn if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {n {n throw Error( „Should not already be working.“ );n }n }nn var finishedWork = root.finishedWork;n var lanes = root.finishedLanes;nn if (finishedWork === null) {nn return null;n }nn root.finishedWork = null;n root.finishedLanes = NoLanes;nn if (!(finishedWork !== root.current)) {n {n throw Error( „Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.“ );n }n } // commitRoot never returns a continuation; it always finishes synchronously.n // So we can clear these now to allow a new callback to be scheduled.nnn root.callbackNode = null; // Update the first and last pending times on this root. The new firstn // pending time is whatever is left on the root fiber.nn var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);n markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call ofn // `flushDiscreteUpdates` starts a useless render pass which may cancelsn // a scheduled timeout.nn if (rootsWithPendingDiscreteUpdates !== null) {n if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {n rootsWithPendingDiscreteUpdates.delete(root);n }n }nn if (root === workInProgressRoot) {n // We can reset these now that they are finished.n workInProgressRoot = null;n workInProgress = null;n workInProgressRootRenderLanes = NoLanes;n } // Get the list of effects.nnn var firstEffect;nn if (finishedWork.flags > PerformedWork) {n // A fiber’s effect list consists only of its children, not itself. So ifn // the root has an effect, we need to add it to the end of the list. Then // resulting list is the set that would belong to the root’s parent, if itn // had one; that is, all the effects in the tree including the root.n if (finishedWork.lastEffect !== null) {n finishedWork.lastEffect.nextEffect = finishedWork;n firstEffect = finishedWork.firstEffect;n } else {n firstEffect = finishedWork;n }n } else {n // There is no effect on the root.n firstEffect = finishedWork.firstEffect;n }nn if (firstEffect !== null) {nn var prevExecutionContext = executionContext;n executionContext |= CommitContext;n var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecyclesnn ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate passn // of the effect list for each phase: all mutation effects come before alln // layout effects, and so on.n // The first phase a „before mutation“ phase. We use this phase to read then // state of the host tree right before we mutate it. This is wheren // getSnapshotBeforeUpdate is called.nn focusedInstanceHandle = prepareForCommit(root.containerInfo);n shouldFireAfterActiveInstanceBlur = false;n nextEffect = firstEffect;nn do {n {n invokeGuardedCallback(null, commitBeforeMutationEffects, null);nn if (hasCaughtError()) {n if (!(nextEffect !== null)) {n {n throw Error( „Should be working on an effect.“ );n }n }nn var error = clearCaughtError();n captureCommitPhaseError(nextEffect, error);n nextEffect = nextEffect.nextEffect;n }n }n } while (nextEffect !== null); // We no longer need to track the active instance fibernnn focusedInstanceHandle = null;nn {n // Mark the current commit time to be shared by all Profilers in thisn // batch. This enables them to be grouped later.n recordCommitTime();n } // The next phase is the mutation phase, where we mutate the host tree.nnn nextEffect = firstEffect;nn do {n {n invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);nn if (hasCaughtError()) {n if (!(nextEffect !== null)) {n {n throw Error( „Should be working on an effect.“ );n }n }nn var _error = clearCaughtError();nn captureCommitPhaseError(nextEffect, _error);n nextEffect = nextEffect.nextEffect;n }n }n } while (nextEffect !== null);nn resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come aftern // the mutation phase, so that the previous tree is still current duringn // componentWillUnmount, but before the layout phase, so that the finishedn // work is current during componentDidMount/Update.nn root.current = finishedWork; // The next phase is the layout phase, where we call effects that readn // the host tree after it’s been mutated. The idiomatic use case for this isn // layout, but class component lifecycles also fire here for legacy reasons.nn nextEffect = firstEffect;nn do {n {n invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);nn if (hasCaughtError()) {n if (!(nextEffect !== null)) {n {n throw Error( „Should be working on an effect.“ );n }n }nn var _error2 = clearCaughtError();nn captureCommitPhaseError(nextEffect, _error2);n nextEffect = nextEffect.nextEffect;n }n }n } while (nextEffect !== null);nn nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has ann // opportunity to paint.nn requestPaint();nn {n popInteractions(prevInteractions);n }nn executionContext = prevExecutionContext;n } else {n // No effects.n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there weren // no effects.n // TODO: Maybe there’s a better way to report this.nn {n recordCommitTime();n }n }nn var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;nn if (rootDoesHavePassiveEffects) {n // This commit has passive effects. Stash a reference to them. But don’tn // schedule a callback until after flushing layout work.n rootDoesHavePassiveEffects = false;n rootWithPendingPassiveEffects = root;n pendingPassiveEffectsLanes = lanes;n pendingPassiveEffectsRenderPriority = renderPriorityLevel;n } else {n // We are done with the effect chain at this point so let’s clear then // nextEffect pointers to assist with GC. If we have passive effects, we’lln // clear this in flushPassiveEffects.n nextEffect = firstEffect;nn while (nextEffect !== null) {n var nextNextEffect = nextEffect.nextEffect;n nextEffect.nextEffect = null;nn if (nextEffect.flags & Deletion) {n detachFiberAfterEffects(nextEffect);n }nn nextEffect = nextNextEffect;n }n } // Read this again, since an effect might have updated itnnn remainingLanes = root.pendingLanes; // Check if there’s remaining work on this rootnn if (remainingLanes !== NoLanes) {n {n if (spawnedWorkDuringRender !== null) {n var expirationTimes = spawnedWorkDuringRender;n spawnedWorkDuringRender = null;nn for (var i = 0; i NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;n pendingPassiveEffectsRenderPriority = NoPriority$1;nn {n return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);n }n }nn return false;n}nfunction enqueuePendingPassiveHookEffectMount(fiber, effect) {n pendingPassiveHookEffectsMount.push(effect, fiber);nn if (!rootDoesHavePassiveEffects) {n rootDoesHavePassiveEffects = true;n scheduleCallback(NormalPriority$1, function () {n flushPassiveEffects();n return null;n });n }n}nfunction enqueuePendingPassiveHookEffectUnmount(fiber, effect) {n pendingPassiveHookEffectsUnmount.push(effect, fiber);nn {n fiber.flags |= PassiveUnmountPendingDev;n var alternate = fiber.alternate;nn if (alternate !== null) {n alternate.flags |= PassiveUnmountPendingDev;n }n }nn if (!rootDoesHavePassiveEffects) {n rootDoesHavePassiveEffects = true;n scheduleCallback(NormalPriority$1, function () {n flushPassiveEffects();n return null;n });n }n}nnfunction invokePassiveEffectCreate(effect) {n var create = effect.create;n effect.destroy = create();n}nnfunction flushPassiveEffectsImpl() {n if (rootWithPendingPassiveEffects === null) {n return false;n }nn var root = rootWithPendingPassiveEffects;n var lanes = pendingPassiveEffectsLanes;n rootWithPendingPassiveEffects = null;n pendingPassiveEffectsLanes = NoLanes;nn if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {n {n throw Error( „Cannot flush passive effects while already rendering.“ );n }n }nn {n isFlushingPassiveEffects = true;n }nn var prevExecutionContext = executionContext;n executionContext |= CommitContext;n var prevInteractions = pushInteractions(root); // It’s important that ALL pending passive effect destroy functions are calledn // before ANY passive effect create functions are called.n // Otherwise effects in sibling components might interfere with each other.n // e.g. a destroy function in one component may unintentionally override a refn // value set by a create function in another component.n // Layout effects have the same constraint.n // First pass: Destroy stale passive effects.nn var unmountEffects = pendingPassiveHookEffectsUnmount;n pendingPassiveHookEffectsUnmount = [];nn for (var i = 0; i NESTED_UPDATE_LIMIT) {n nestedUpdateCount = 0;n rootWithNestedUpdates = null;nn {n {n throw Error( „Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.“ );n }n }n }nn {n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {n nestedPassiveUpdateCount = 0;nn error(‚Maximum update depth exceeded. This can happen when a component ‚ + „calls setState inside useEffect, but useEffect either doesn’t “ + ‚have a dependency array, or one of the dependencies changes on ‚ + ‚every render.‘);n }n }n}nnfunction flushRenderPhaseStrictModeWarningsInDEV() {n {n ReactStrictModeWarnings.flushLegacyContextWarning();nn {n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();n }n }n}nnvar didWarnStateUpdateForNotYetMountedComponent = null;nnfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {n {n if ((executionContext & RenderContext) !== NoContext) {n // We let the other warning about render phase updates deal with this one.n return;n }nn if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {n return;n }nn var tag = fiber.tag;nn if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {n // Only warn for user-defined components, not internal ones like Suspense.n return;n } // We show the whole stack but dedupe on the top component’s name becausen // the problematic code almost always lies inside that component.nnn var componentName = getComponentName(fiber.type) || ‚ReactComponent‘;nn if (didWarnStateUpdateForNotYetMountedComponent !== null) {n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {n return;n }nn didWarnStateUpdateForNotYetMountedComponent.add(componentName);n } else {n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);n }nn var previousFiber = current;nn try {n setCurrentFiber(fiber);nn error(„Can’t perform a React state update on a component that hasn’t mounted yet. “ + ‚This indicates that you have a side-effect in your render function that ‚ + ‚asynchronously later calls tries to update the component. Move this work to ‚ + ‚useEffect instead.‘);n } finally {n if (previousFiber) {n setCurrentFiber(fiber);n } else {n resetCurrentFiber();n }n }n }n}nnvar didWarnStateUpdateForUnmountedComponent = null;nnfunction warnAboutUpdateOnUnmountedFiberInDEV(fiber) {n {n var tag = fiber.tag;nn if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {n // Only warn for user-defined components, not internal ones like Suspense.n return;n } // If there are pending passive effects unmounts for this Fiber,n // we can assume that they would have prevented this update.nnn if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {n return;n } // We show the whole stack but dedupe on the top component’s name becausen // the problematic code almost always lies inside that component.nnn var componentName = getComponentName(fiber.type) || ‚ReactComponent‘;nn if (didWarnStateUpdateForUnmountedComponent !== null) {n if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {n return;n }nn didWarnStateUpdateForUnmountedComponent.add(componentName);n } else {n didWarnStateUpdateForUnmountedComponent = new Set([componentName]);n }nn if (isFlushingPassiveEffects) ; else {n var previousFiber = current;nn try {n setCurrentFiber(fiber);nn error(„Can’t perform a React state update on an unmounted component. This “ + ‚is a no-op, but it indicates a memory leak in your application. To ‚ + ‚fix, cancel all subscriptions and asynchronous tasks in %s.‘, tag === ClassComponent ? ‚the componentWillUnmount method‘ : ‚a useEffect cleanup function‘);n } finally {n if (previousFiber) {n setCurrentFiber(fiber);n } else {n resetCurrentFiber();n }n }n }n }n}nnvar beginWork$1;nn{n var dummyFiber = null;nn beginWork$1 = function (current, unitOfWork, lanes) {n // If a component throws an error, we replay it again in a synchronouslyn // dispatched event, so that the debugger will treat it as an uncaughtn // error See ReactErrorUtils for more information.n // Before entering the begin phase, copy the work-in-progress onto a dummyn // fiber. If beginWork throws, we’ll use this to reset the state.n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);nn try {n return beginWork(current, unitOfWork, lanes);n } catch (originalError) {n if (originalError !== null && typeof originalError === ‚object‘ && typeof originalError.then === ‚function‘) {n // Don’t replay promises. Treat everything else like an error.n throw originalError;n } // Keep this code in sync with handleError; any changes here must haven // corresponding changes there.nnn resetContextDependencies();n resetHooksAfterThrow(); // Don’t reset current debug fiber, since we’re about to work on then // same fiber again.n // Unwind the failed stack framenn unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.nn assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);nn if ( unitOfWork.mode & ProfileMode) {n // Reset the profiler timer.n startProfilerTimer(unitOfWork);n } // Run beginWork again.nnn invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);nn if (hasCaughtError()) {n var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.n // Rethrow this error instead of the original one.nn throw replayError;n } else {n // This branch is reachable if the render phase is impure.n throw originalError;n }n }n };n}nnvar didWarnAboutUpdateInRender = false;nvar didWarnAboutUpdateInRenderForAnotherComponent;nn{n didWarnAboutUpdateInRenderForAnotherComponent = new Set();n}nnfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {n {n if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {n switch (fiber.tag) {n case FunctionComponent:n case ForwardRef:n case SimpleMemoComponent:n {n var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || ‚Unknown‘; // Dedupe by the rendering component because it’s the one that needs to be fixed.nn var dedupeKey = renderingComponentName;nn if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);n var setStateComponentName = getComponentName(fiber.type) || ‚Unknown‘;nn error(‚Cannot update a component (`%s`) while rendering a ‚ + ‚different component (`%s`). To locate the bad setState() call inside `%s`, ‚ + ‚follow the stack trace as described in https://reactjs.org/link/setstate-in-render‘, setStateComponentName, renderingComponentName, renderingComponentName);n }nn break;n }nn case ClassComponent:n {n if (!didWarnAboutUpdateInRender) {n error(‚Cannot update during an existing state transition (such as ‚ + ‚within `render`). Render methods should be a pure ‚ + ‚function of props and state.‘);nn didWarnAboutUpdateInRender = true;n }nn break;n }n }n }n }n} // a ’shared‘ variable that changes when act() opens/closes in tests.nnnvar IsThisRendererActing = {n current: falsen};nfunction warnIfNotScopedWithMatchingAct(fiber) {n {n if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {n var previousFiber = current;nn try {n setCurrentFiber(fiber);nn error(„It looks like you’re using the wrong act() around your test interactions.\n“ + ‚Be sure to use the matching version of act() corresponding to your renderer:\n\n‘ + ‚// for react-dom:\n‘ + // Break up imports to avoid accidentally parsing them as dependencies.n ‚import {act} fr‘ + „om ‚react-dom/test-utils‘;\n“ + ‚// …\n‘ + ‚act(() => …);\n\n‘ + ‚// for react-test-renderer:\n‘ + // Break up imports to avoid accidentally parsing them as dependencies.n ‚import TestRenderer fr‘ + „om react-test-renderer‘;\n“ + ‚const {act} = TestRenderer;\n‘ + ‚// …\n‘ + ‚act(() => …);‘);n } finally {n if (previousFiber) {n setCurrentFiber(fiber);n } else {n resetCurrentFiber();n }n }n }n }n}nfunction warnIfNotCurrentlyActingEffectsInDEV(fiber) {n {n if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {n error(‚An update to %s ran an effect, but was not wrapped in act(…).\n\n‘ + ‚When testing, code that causes React state updates should be ‚ + ‚wrapped into act(…):\n\n‘ + ‚act(() => {\n‘ + ‚ /* fire events that update state */\n‘ + ‚});\n‘ + ‚/* assert on the output */\n\n‘ + „This ensures that you’re testing the behavior the user would see “ + ‚in the browser.‘ + ‚ Learn more at https://reactjs.org/link/wrap-tests-with-act‘, getComponentName(fiber.type));n }n }n}nnfunction warnIfNotCurrentlyActingUpdatesInDEV(fiber) {n {n if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {n var previousFiber = current;nn try {n setCurrentFiber(fiber);nn error(‚An update to %s inside a test was not wrapped in act(…).\n\n‘ + ‚When testing, code that causes React state updates should be ‚ + ‚wrapped into act(…):\n\n‘ + ‚act(() => {\n‘ + ‚ /* fire events that update state */\n‘ + ‚});\n‘ + ‚/* assert on the output */\n\n‘ + „This ensures that you’re testing the behavior the user would see “ + ‚in the browser.‘ + ‚ Learn more at https://reactjs.org/link/wrap-tests-with-act‘, getComponentName(fiber.type));n } finally {n if (previousFiber) {n setCurrentFiber(fiber);n } else {n resetCurrentFiber();n }n }n }n }n}nnvar warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.nnvar didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mockedn// scheduler is the actual recommendation. The alternative could be a testing build,n// a new lib, or whatever; we dunno just yet. This message is for early adoptersn// to get their tests right.nnfunction warnIfUnmockedScheduler(fiber) {n {n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {n didWarnAboutUnmockedScheduler = true;nn error(‚In Concurrent or Sync modes, the „scheduler“ module needs to be mocked ‚ + ‚to guarantee consistent behaviour across tests and browsers. ‚ + ‚For example, with jest: \n‘ + // Break up requires to avoid accidentally parsing them as dependencies.n „jest.mock(’scheduler‘, () => require“ + „(’scheduler/unstable_mock‘));\n\n“ + ‚For more info, visit https://reactjs.org/link/mock-scheduler‘);n }n }n }n}nnfunction computeThreadID(root, lane) {n // Interaction threads are unique per root and expiration time.n // NOTE: Intentionally unsound cast. All that matters is that it’s a numbern // and it represents a batch of work. Could make a helper function instead,n // but meh this is fine for now.n return lane * 1000 + root.interactionThreadID;n}nnfunction markSpawnedWork(lane) {nn if (spawnedWorkDuringRender === null) {n spawnedWorkDuringRender = [lane];n } else {n spawnedWorkDuringRender.push(lane);n }n}nnfunction scheduleInteractions(root, lane, interactions) {nn if (interactions.size > 0) {n var pendingInteractionMap = root.pendingInteractionMap;n var pendingInteractions = pendingInteractionMap.get(lane);nn if (pendingInteractions != null) {n interactions.forEach(function (interaction) {n if (!pendingInteractions.has(interaction)) {n // Update the pending async work count for previously unscheduled interaction.n interaction.__count++;n }nn pendingInteractions.add(interaction);n });n } else {n pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.nn interactions.forEach(function (interaction) {n interaction.__count++;n });n }nn var subscriber = tracing.__subscriberRef.current;nn if (subscriber !== null) {n var threadID = computeThreadID(root, lane);n subscriber.onWorkScheduled(interactions, threadID);n }n }n}nnfunction schedulePendingInteractions(root, lane) {nn scheduleInteractions(root, lane, tracing.__interactionsRef.current);n}nnfunction startWorkOnPendingInteractions(root, lanes) {n // we can accurately attribute time spent working on it, And so that cascadingn // work triggered during the render phase will be associated with it.nnn var interactions = new Set();n root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {n if (includesSomeLane(lanes, scheduledLane)) {n scheduledInteractions.forEach(function (interaction) {n return interactions.add(interaction);n });n }n }); // Store the current set of interactions on the FiberRoot for a few reasons:n // We can re-use it in hot functions like performConcurrentWorkOnRoot()n // without having to recalculate it. We will also use it in commitWork() ton // pass to any Profiler onRender() hooks. This also provides DevTools with an // way to access it when the onCommitRoot() hook is called.nn root.memoizedInteractions = interactions;nn if (interactions.size > 0) {n var subscriber = tracing.__subscriberRef.current;nn if (subscriber !== null) {n var threadID = computeThreadID(root, lanes);nn try {n subscriber.onWorkStarted(interactions, threadID);n } catch (error) {n // If the subscriber throws, rethrow it in a separate taskn scheduleCallback(ImmediatePriority$1, function () {n throw error;n });n }n }n }n}nnfunction finishPendingInteractions(root, committedLanes) {nn var remainingLanesAfterCommit = root.pendingLanes;n var subscriber;nn try {n subscriber = tracing.__subscriberRef.current;nn if (subscriber !== null && root.memoizedInteractions.size > 0) {n // FIXME: More than one lane can finish in a single commit.n var threadID = computeThreadID(root, committedLanes);n subscriber.onWorkStopped(root.memoizedInteractions, threadID);n }n } catch (error) {n // If the subscriber throws, rethrow it in a separate taskn scheduleCallback(ImmediatePriority$1, function () {n throw error;n });n } finally {n // Clear completed interactions from the pending Map.n // Unless the render was suspended or cascading work was scheduled,n // In which case– leave pending interactions until the subsequent render.n var pendingInteractionMap = root.pendingInteractionMap;n pendingInteractionMap.forEach(function (scheduledInteractions, lane) {n // Only decrement the pending interaction count if we’re done.n // If there’s still work at the current priority,n // That indicates that we are waiting for suspense data.n if (!includesSomeLane(remainingLanesAfterCommit, lane)) {n pendingInteractionMap.delete(lane);n scheduledInteractions.forEach(function (interaction) {n interaction.__count–;nn if (subscriber !== null && interaction.__count === 0) {n try {n subscriber.onInteractionScheduledWorkCompleted(interaction);n } catch (error) {n // If the subscriber throws, rethrow it in a separate taskn scheduleCallback(ImmediatePriority$1, function () {n throw error;n });n }n }n });n }n });n }n} // `act` testing APInnfunction shouldForceFlushFallbacksInDEV() {n // Never force flush in production. This function should get stripped out.n return actingUpdatesScopeDepth > 0;n}n// so we can tell if any async act() calls try to run in parallel.nnnvar actingUpdatesScopeDepth = 0;nnfunction detachFiberAfterEffects(fiber) {n fiber.sibling = null;n fiber.stateNode = null;n}nnvar resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.nnvar failedBoundaries = null;nvar setRefreshHandler = function (handler) {n {n resolveFamily = handler;n }n};nfunction resolveFunctionForHotReloading(type) {n {n if (resolveFamily === null) {n // Hot reloading is disabled.n return type;n }nn var family = resolveFamily(type);nn if (family === undefined) {n return type;n } // Use the latest known implementation.nnn return family.current;n }n}nfunction resolveClassForHotReloading(type) {n // No implementation differences.n return resolveFunctionForHotReloading(type);n}nfunction resolveForwardRefForHotReloading(type) {n {n if (resolveFamily === null) {n // Hot reloading is disabled.n return type;n }nn var family = resolveFamily(type);nn if (family === undefined) {n // Check if we’re dealing with a real forwardRef. Don’t want to crash early.n if (type !== null && type !== undefined && typeof type.render === ‚function‘) {n // ForwardRef is special because its resolved .type is an object,n // but it’s possible that we only have its inner render function in the map.n // If that inner render function is different, we’ll build a new forwardRef type.n var currentRender = resolveFunctionForHotReloading(type.render);nn if (type.render !== currentRender) {n var syntheticType = {n $$typeof: REACT_FORWARD_REF_TYPE,n render: currentRendern };nn if (type.displayName !== undefined) {n syntheticType.displayName = type.displayName;n }nn return syntheticType;n }n }nn return type;n } // Use the latest known implementation.nnn return family.current;n }n}nfunction isCompatibleFamilyForHotReloading(fiber, element) {n {n if (resolveFamily === null) {n // Hot reloading is disabled.n return false;n }nn var prevType = fiber.elementType;n var nextType = element.type; // If we got here, we know types aren’t === equal.nn var needsCompareFamilies = false;n var $$typeofNextType = typeof nextType === ‚object‘ && nextType !== null ? nextType.$$typeof : null;nn switch (fiber.tag) {n case ClassComponent:n {n if (typeof nextType === ‚function‘) {n needsCompareFamilies = true;n }nn break;n }nn case FunctionComponent:n {n if (typeof nextType === ‚function‘) {n needsCompareFamilies = true;n } else if ($$typeofNextType === REACT_LAZY_TYPE) {n // We don’t know the inner type yet.n // We’re going to assume that the lazy inner type is stable,n // and so it is sufficient to avoid reconciling it away.n // We’re not going to unwrap or actually use the new lazy type.n needsCompareFamilies = true;n }nn break;n }nn case ForwardRef:n {n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {n needsCompareFamilies = true;n } else if ($$typeofNextType === REACT_LAZY_TYPE) {n needsCompareFamilies = true;n }nn break;n }nn case MemoComponent:n case SimpleMemoComponent:n {n if ($$typeofNextType === REACT_MEMO_TYPE) {n // TODO: if it was but can no longer be simple,n // we shouldn’t set this.n needsCompareFamilies = true;n } else if ($$typeofNextType === REACT_LAZY_TYPE) {n needsCompareFamilies = true;n }nn break;n }nn default:n return false;n } // Check if both types have a family and it’s the same one.nnn if (needsCompareFamilies) {n // Note: memo() and forwardRef() we’ll compare outer rather than inner type.n // This means both of them need to be registered to preserve state.n // If we unwrapped and compared the inner types for wrappers instead,n // then we would risk falsely saying two separate memo(Foo)n // calls are equivalent because they wrap the same Foo function.n var prevFamily = resolveFamily(prevType);nn if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {n return true;n }n }nn return false;n }n}nfunction markFailedErrorBoundaryForHotReloading(fiber) {n {n if (resolveFamily === null) {n // Hot reloading is disabled.n return;n }nn if (typeof WeakSet !== ‚function‘) {n return;n }nn if (failedBoundaries === null) {n failedBoundaries = new WeakSet();n }nn failedBoundaries.add(fiber);n }n}nvar scheduleRefresh = function (root, update) {n {n if (resolveFamily === null) {n // Hot reloading is disabled.n return;n }nn var staleFamilies = update.staleFamilies,n updatedFamilies = update.updatedFamilies;n flushPassiveEffects();n flushSync(function () {n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);n });n }n};nvar scheduleRoot = function (root, element) {n {n if (root.context !== emptyContextObject) {n // Super edge case: root has a legacy _renderSubtree contextn // but we don’t know the parentComponent so we can’t pass it.n // Just ignore. We’ll delete this with _renderSubtree code path later.n return;n }nn flushPassiveEffects();n flushSync(function () {n updateContainer(element, root, null, null);n });n }n};nnfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {n {n var alternate = fiber.alternate,n child = fiber.child,n sibling = fiber.sibling,n tag = fiber.tag,n type = fiber.type;n var candidateType = null;nn switch (tag) {n case FunctionComponent:n case SimpleMemoComponent:n case ClassComponent:n candidateType = type;n break;nn case ForwardRef:n candidateType = type.render;n break;n }nn if (resolveFamily === null) {n throw new Error(‚Expected resolveFamily to be set during hot reload.‘);n }nn var needsRender = false;n var needsRemount = false;nn if (candidateType !== null) {n var family = resolveFamily(candidateType);nn if (family !== undefined) {n if (staleFamilies.has(family)) {n needsRemount = true;n } else if (updatedFamilies.has(family)) {n if (tag === ClassComponent) {n needsRemount = true;n } else {n needsRender = true;n }n }n }n }nn if (failedBoundaries !== null) {n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {n needsRemount = true;n }n }nn if (needsRemount) {n fiber._debugNeedsRemount = true;n }nn if (needsRemount || needsRender) {n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n }nn if (child !== null && !needsRemount) {n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);n }nn if (sibling !== null) {n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);n }n }n}nnvar findHostInstancesForRefresh = function (root, families) {n {n var hostInstances = new Set();n var types = new Set(families.map(function (family) {n return family.current;n }));n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);n return hostInstances;n }n};nnfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {n {n var child = fiber.child,n sibling = fiber.sibling,n tag = fiber.tag,n type = fiber.type;n var candidateType = null;nn switch (tag) {n case FunctionComponent:n case SimpleMemoComponent:n case ClassComponent:n candidateType = type;n break;nn case ForwardRef:n candidateType = type.render;n break;n }nn var didMatch = false;nn if (candidateType !== null) {n if (types.has(candidateType)) {n didMatch = true;n }n }nn if (didMatch) {n // We have a match. This only drills down to the closest host components.n // There’s no need to search deeper because for the purpose of givingn // visual feedback, „flashing“ outermost parent rectangles is sufficient.n findHostInstancesForFiberShallowly(fiber, hostInstances);n } else {n // If there’s no match, maybe there will be one further down in the child tree.n if (child !== null) {n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);n }n }nn if (sibling !== null) {n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);n }n }n}nnfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {n {n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);nn if (foundHostInstances) {n return;n } // If we didn’t find any host children, fallback to closest host parent.nnn var node = fiber;nn while (true) {n switch (node.tag) {n case HostComponent:n hostInstances.add(node.stateNode);n return;nn case HostPortal:n hostInstances.add(node.stateNode.containerInfo);n return;nn case HostRoot:n hostInstances.add(node.stateNode.containerInfo);n return;n }nn if (node.return === null) {n throw new Error(‚Expected to reach root first.‘);n }nn node = node.return;n }n }n}nnfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {n {n var node = fiber;n var foundHostInstances = false;nn while (true) {n if (node.tag === HostComponent) {n // We got a match.n foundHostInstances = true;n hostInstances.add(node.stateNode); // There may still be more, so keep searching.n } else if (node.child !== null) {n node.child.return = node;n node = node.child;n continue;n }nn if (node === fiber) {n return foundHostInstances;n }nn while (node.sibling === null) {n if (node.return === null || node.return === fiber) {n return foundHostInstances;n }nn node = node.return;n }nn node.sibling.return = node.return;n node = node.sibling;n }n }nn return false;n}nnvar hasBadMapPolyfill;nn{n hasBadMapPolyfill = false;nn try {n var nonExtensibleObject = Object.preventExtensions({});n /* eslint-disable no-new */nn new Map([[nonExtensibleObject, null]]);n new Set([nonExtensibleObject]);n /* eslint-enable no-new */n } catch (e) {n // TODO: Consider warning about bad polyfillsn hasBadMapPolyfill = true;n }n}nnvar debugCounter = 1;nnfunction FiberNode(tag, pendingProps, key, mode) {n // Instancen this.tag = tag;n this.key = key;n this.elementType = null;n this.type = null;n this.stateNode = null; // Fibernn this.return = null;n this.child = null;n this.sibling = null;n this.index = 0;n this.ref = null;n this.pendingProps = pendingProps;n this.memoizedProps = null;n this.updateQueue = null;n this.memoizedState = null;n this.dependencies = null;n this.mode = mode; // Effectsnn this.flags = NoFlags;n this.nextEffect = null;n this.firstEffect = null;n this.lastEffect = null;n this.lanes = NoLanes;n this.childLanes = NoLanes;n this.alternate = null;nn {n // Note: The following is done to avoid a v8 performance cliff.n //n // Initializing the fields below to smis and later updating them withn // double values will cause Fibers to end up having separate shapes.n // This behavior/bug has something to do with Object.preventExtension().n // Fortunately this only impacts DEV builds.n // Unfortunately it makes React unusably slow for some applications.n // To work around this, initialize the fields below with doubles.n //n // Learn more about this here:n // https://github.com/facebook/react/issues/14365n // https://bugs.chromium.org/p/v8/issues/detail?id=8538n this.actualDuration = Number.NaN;n this.actualStartTime = Number.NaN;n this.selfBaseDuration = Number.NaN;n this.treeBaseDuration = Number.NaN; // It’s okay to replace the initial doubles with smis after initialization.n // This won’t trigger the performance cliff mentioned above,n // and it simplifies other profiler code (including DevTools).nn this.actualDuration = 0;n this.actualStartTime = -1;n this.selfBaseDuration = 0;n this.treeBaseDuration = 0;n }nn {n // This isn’t directly used but is handy for debugging internals:n this._debugID = debugCounter++;n this._debugSource = null;n this._debugOwner = null;n this._debugNeedsRemount = false;n this._debugHookTypes = null;nn if (!hasBadMapPolyfill && typeof Object.preventExtensions === ‚function‘) {n Object.preventExtensions(this);n }n }n} // This is a constructor function, rather than a POJO constructor, stilln// please ensure we do the following:n// 1) Nobody should add any instance methods on this. Instance methods can ben// more difficult to predict when they get optimized and they are almostn// never inlined properly in static compilers.n// 2) Nobody should rely on `instanceof Fiber` for type testing. We shouldn// always know when it is a fiber.n// 3) We might want to experiment with using numeric keys since they are easiern// to optimize in a non-JIT environment.n// 4) We can easily go from a constructor to a createFiber object literal if thatn// is faster.n// 5) It should be easy to port this to a C struct and keep a C implementationn// compatible.nnnvar createFiber = function (tag, pendingProps, key, mode) {n // $FlowFixMe: the shapes are exact here but Flow doesn’t like constructorsn return new FiberNode(tag, pendingProps, key, mode);n};nnfunction shouldConstruct$1(Component) {n var prototype = Component.prototype;n return !!(prototype && prototype.isReactComponent);n}nnfunction isSimpleFunctionComponent(type) {n return typeof type === ‚function‘ && !shouldConstruct$1(type) && type.defaultProps === undefined;n}nfunction resolveLazyComponentTag(Component) {n if (typeof Component === ‚function‘) {n return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;n } else if (Component !== undefined && Component !== null) {n var $$typeof = Component.$$typeof;nn if ($$typeof === REACT_FORWARD_REF_TYPE) {n return ForwardRef;n }nn if ($$typeof === REACT_MEMO_TYPE) {n return MemoComponent;n }n }nn return IndeterminateComponent;n} // This is used to create an alternate fiber to do work on.nnfunction createWorkInProgress(current, pendingProps) {n var workInProgress = current.alternate;nn if (workInProgress === null) {n // We use a double buffering pooling technique because we know that we’lln // only ever need at most two versions of a tree. We pool the „other“ unusedn // node that we’re free to reuse. This is lazily created to avoid allocatingn // extra objects for things that are never updated. It also allow us ton // reclaim the extra memory if needed.n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);n workInProgress.elementType = current.elementType;n workInProgress.type = current.type;n workInProgress.stateNode = current.stateNode;nn {n // DEV-only fieldsn workInProgress._debugID = current._debugID;n workInProgress._debugSource = current._debugSource;n workInProgress._debugOwner = current._debugOwner;n workInProgress._debugHookTypes = current._debugHookTypes;n }nn workInProgress.alternate = current;n current.alternate = workInProgress;n } else {n workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.nn workInProgress.type = current.type; // We already have an alternate.n // Reset the effect tag.nn workInProgress.flags = NoFlags; // The effect list is no longer valid.nn workInProgress.nextEffect = null;n workInProgress.firstEffect = null;n workInProgress.lastEffect = null;nn {n // We intentionally reset, rather than copy, actualDuration & actualStartTime.n // This prevents time from endlessly accumulating in new commits.n // This has the downside of resetting values for different priority renders,n // But works for yielding (the common case) and should support resuming.n workInProgress.actualDuration = 0;n workInProgress.actualStartTime = -1;n }n }nn workInProgress.childLanes = current.childLanes;n workInProgress.lanes = current.lanes;n workInProgress.child = current.child;n workInProgress.memoizedProps = current.memoizedProps;n workInProgress.memoizedState = current.memoizedState;n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, son // it cannot be shared with the current fiber.nn var currentDependencies = current.dependencies;n workInProgress.dependencies = currentDependencies === null ? null : {n lanes: currentDependencies.lanes,n firstContext: currentDependencies.firstContextn }; // These will be overridden during the parent’s reconciliationnn workInProgress.sibling = current.sibling;n workInProgress.index = current.index;n workInProgress.ref = current.ref;nn {n workInProgress.selfBaseDuration = current.selfBaseDuration;n workInProgress.treeBaseDuration = current.treeBaseDuration;n }nn {n workInProgress._debugNeedsRemount = current._debugNeedsRemount;nn switch (workInProgress.tag) {n case IndeterminateComponent:n case FunctionComponent:n case SimpleMemoComponent:n workInProgress.type = resolveFunctionForHotReloading(current.type);n break;nn case ClassComponent:n workInProgress.type = resolveClassForHotReloading(current.type);n break;nn case ForwardRef:n workInProgress.type = resolveForwardRefForHotReloading(current.type);n break;n }n }nn return workInProgress;n} // Used to reuse a Fiber for a second pass.nnfunction resetWorkInProgress(workInProgress, renderLanes) {n // This resets the Fiber to what createFiber or createWorkInProgress wouldn // have set the values to before during the first pass. Ideally this wouldn’tn // be necessary but unfortunately many code paths reads from the workInProgressn // when they should be reading from current and writing to workInProgress.n // We assume pendingProps, index, key, ref, return are still untouched ton // avoid doing another reconciliation.n // Reset the effect tag but keep any Placement tags, since that’s somethingn // that child fiber is setting, not the reconciliation.n workInProgress.flags &= Placement; // The effect list is no longer valid.nn workInProgress.nextEffect = null;n workInProgress.firstEffect = null;n workInProgress.lastEffect = null;n var current = workInProgress.alternate;nn if (current === null) {n // Reset to createFiber’s initial values.n workInProgress.childLanes = NoLanes;n workInProgress.lanes = renderLanes;n workInProgress.child = null;n workInProgress.memoizedProps = null;n workInProgress.memoizedState = null;n workInProgress.updateQueue = null;n workInProgress.dependencies = null;n workInProgress.stateNode = null;nn {n // Note: We don’t reset the actualTime counts. It’s useful to accumulaten // actual time across multiple render passes.n workInProgress.selfBaseDuration = 0;n workInProgress.treeBaseDuration = 0;n }n } else {n // Reset to the cloned values that createWorkInProgress would’ve.n workInProgress.childLanes = current.childLanes;n workInProgress.lanes = current.lanes;n workInProgress.child = current.child;n workInProgress.memoizedProps = current.memoizedProps;n workInProgress.memoizedState = current.memoizedState;n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.nn workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, son // it cannot be shared with the current fiber.nn var currentDependencies = current.dependencies;n workInProgress.dependencies = currentDependencies === null ? null : {n lanes: currentDependencies.lanes,n firstContext: currentDependencies.firstContextn };nn {n // Note: We don’t reset the actualTime counts. It’s useful to accumulaten // actual time across multiple render passes.n workInProgress.selfBaseDuration = current.selfBaseDuration;n workInProgress.treeBaseDuration = current.treeBaseDuration;n }n }nn return workInProgress;n}nfunction createHostRootFiber(tag) {n var mode;nn if (tag === ConcurrentRoot) {n mode = ConcurrentMode | BlockingMode | StrictMode;n } else if (tag === BlockingRoot) {n mode = BlockingMode | StrictMode;n } else {n mode = NoMode;n }nn if ( isDevToolsPresent) {n // Always collect profile timings when DevTools are present.n // This enables DevTools to start capturing timing at any point–n // Without some nodes in the tree having empty base times.n mode |= ProfileMode;n }nn return createFiber(HostRoot, null, null, mode);n}nfunction createFiberFromTypeAndProps(type, // React$ElementTypenkey, pendingProps, owner, mode, lanes) {n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it’s not lazy.nn var resolvedType = type;nn if (typeof type === ‚function‘) {n if (shouldConstruct$1(type)) {n fiberTag = ClassComponent;nn {n resolvedType = resolveClassForHotReloading(resolvedType);n }n } else {n {n resolvedType = resolveFunctionForHotReloading(resolvedType);n }n }n } else if (typeof type === ’string‘) {n fiberTag = HostComponent;n } else {n getTag: switch (type) {n case REACT_FRAGMENT_TYPE:n return createFiberFromFragment(pendingProps.children, mode, lanes, key);nn case REACT_DEBUG_TRACING_MODE_TYPE:n fiberTag = Mode;n mode |= DebugTracingMode;n break;nn case REACT_STRICT_MODE_TYPE:n fiberTag = Mode;n mode |= StrictMode;n break;nn case REACT_PROFILER_TYPE:n return createFiberFromProfiler(pendingProps, mode, lanes, key);nn case REACT_SUSPENSE_TYPE:n return createFiberFromSuspense(pendingProps, mode, lanes, key);nn case REACT_SUSPENSE_LIST_TYPE:n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);nn case REACT_OFFSCREEN_TYPE:n return createFiberFromOffscreen(pendingProps, mode, lanes, key);nn case REACT_LEGACY_HIDDEN_TYPE:n return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);nn case REACT_SCOPE_TYPE:nn // eslint-disable-next-line no-fallthroughnn default:n {n if (typeof type === ‚object‘ && type !== null) {n switch (type.$$typeof) {n case REACT_PROVIDER_TYPE:n fiberTag = ContextProvider;n break getTag;nn case REACT_CONTEXT_TYPE:n // This is a consumern fiberTag = ContextConsumer;n break getTag;nn case REACT_FORWARD_REF_TYPE:n fiberTag = ForwardRef;nn {n resolvedType = resolveForwardRefForHotReloading(resolvedType);n }nn break getTag;nn case REACT_MEMO_TYPE:n fiberTag = MemoComponent;n break getTag;nn case REACT_LAZY_TYPE:n fiberTag = LazyComponent;n resolvedType = null;n break getTag;nn case REACT_BLOCK_TYPE:n fiberTag = Block;n break getTag;n }n }nn var info = “;nn {n if (type === undefined || typeof type === ‚object‘ && type !== null && Object.keys(type).length === 0) {n info += ‚ You likely forgot to export your component from the file ‚ + „it’s defined in, or you might have mixed up default and “ + ’named imports.‘;n }nn var ownerName = owner ? getComponentName(owner.type) : null;nn if (ownerName) {n info += ‚\n\nCheck the render method of `‘ + ownerName + ‚`.‘;n }n }nn {n {n throw Error( „Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: “ + (type == null ? type : typeof type) + „.“ + info );n }n }n }n }n }nn var fiber = createFiber(fiberTag, pendingProps, key, mode);n fiber.elementType = type;n fiber.type = resolvedType;n fiber.lanes = lanes;nn {n fiber._debugOwner = owner;n }nn return fiber;n}nfunction createFiberFromElement(element, mode, lanes) {n var owner = null;nn {n owner = element._owner;n }nn var type = element.type;n var key = element.key;n var pendingProps = element.props;n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);nn {n fiber._debugSource = element._source;n fiber._debugOwner = element._owner;n }nn return fiber;n}nfunction createFiberFromFragment(elements, mode, lanes, key) {n var fiber = createFiber(Fragment, elements, key, mode);n fiber.lanes = lanes;n return fiber;n}nnfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {n {n if (typeof pendingProps.id !== ’string‘) {n error(‚Profiler must specify an „id“ as a prop‘);n }n }nn var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn’t have a type. It has a tag.nn fiber.elementType = REACT_PROFILER_TYPE;n fiber.type = REACT_PROFILER_TYPE;n fiber.lanes = lanes;nn {n fiber.stateNode = {n effectDuration: 0,n passiveEffectDuration: 0n };n }nn return fiber;n}nnfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn’t have a type. It has a tag.n // This needs to be fixed in getComponentName so that it relies on the tagn // instead.nn fiber.type = REACT_SUSPENSE_TYPE;n fiber.elementType = REACT_SUSPENSE_TYPE;n fiber.lanes = lanes;n return fiber;n}nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);nn {n // TODO: The SuspenseListComponent fiber shouldn’t have a type. It has a tag.n // This needs to be fixed in getComponentName so that it relies on the tagn // instead.n fiber.type = REACT_SUSPENSE_LIST_TYPE;n }nn fiber.elementType = REACT_SUSPENSE_LIST_TYPE;n fiber.lanes = lanes;n return fiber;n}nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn’t have a type. It has a tag.n // This needs to be fixed in getComponentName so that it relies on the tagn // instead.nn {n fiber.type = REACT_OFFSCREEN_TYPE;n }nn fiber.elementType = REACT_OFFSCREEN_TYPE;n fiber.lanes = lanes;n return fiber;n}nfunction createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {n var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn’t have a type. It has a tag.n // This needs to be fixed in getComponentName so that it relies on the tagn // instead.nn {n fiber.type = REACT_LEGACY_HIDDEN_TYPE;n }nn fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;n fiber.lanes = lanes;n return fiber;n}nfunction createFiberFromText(content, mode, lanes) {n var fiber = createFiber(HostText, content, null, mode);n fiber.lanes = lanes;n return fiber;n}nfunction createFiberFromHostInstanceForDeletion() {n var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.nn fiber.elementType = ‚DELETED‘;n fiber.type = ‚DELETED‘;n return fiber;n}nfunction createFiberFromPortal(portal, mode, lanes) {n var pendingProps = portal.children !== null ? portal.children : [];n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);n fiber.lanes = lanes;n fiber.stateNode = {n containerInfo: portal.containerInfo,n pendingChildren: null,n // Used by persistent updatesn implementation: portal.implementationn };n return fiber;n} // Used for stashing WIP properties to replay failed work in DEV.nnfunction assignFiberPropertiesInDEV(target, source) {n if (target === null) {n // This Fiber’s initial properties will always be overwritten.n // We only use a Fiber to ensure the same hidden class so DEV isn’t slow.n target = createFiber(IndeterminateComponent, null, null, NoMode);n } // This is intentionally written as a list of all properties.n // We tried to use Object.assign() instead but this is called inn // the hottest path, and Object.assign() was too slow:n // https://github.com/facebook/react/issues/12502n // This code is DEV-only so size is not a concern.nnn target.tag = source.tag;n target.key = source.key;n target.elementType = source.elementType;n target.type = source.type;n target.stateNode = source.stateNode;n target.return = source.return;n target.child = source.child;n target.sibling = source.sibling;n target.index = source.index;n target.ref = source.ref;n target.pendingProps = source.pendingProps;n target.memoizedProps = source.memoizedProps;n target.updateQueue = source.updateQueue;n target.memoizedState = source.memoizedState;n target.dependencies = source.dependencies;n target.mode = source.mode;n target.flags = source.flags;n target.nextEffect = source.nextEffect;n target.firstEffect = source.firstEffect;n target.lastEffect = source.lastEffect;n target.lanes = source.lanes;n target.childLanes = source.childLanes;n target.alternate = source.alternate;nn {n target.actualDuration = source.actualDuration;n target.actualStartTime = source.actualStartTime;n target.selfBaseDuration = source.selfBaseDuration;n target.treeBaseDuration = source.treeBaseDuration;n }nn target._debugID = source._debugID;n target._debugSource = source._debugSource;n target._debugOwner = source._debugOwner;n target._debugNeedsRemount = source._debugNeedsRemount;n target._debugHookTypes = source._debugHookTypes;n return target;n}nnfunction FiberRootNode(containerInfo, tag, hydrate) {n this.tag = tag;n this.containerInfo = containerInfo;n this.pendingChildren = null;n this.current = null;n this.pingCache = null;n this.finishedWork = null;n this.timeoutHandle = noTimeout;n this.context = null;n this.pendingContext = null;n this.hydrate = hydrate;n this.callbackNode = null;n this.callbackPriority = NoLanePriority;n this.eventTimes = createLaneMap(NoLanes);n this.expirationTimes = createLaneMap(NoTimestamp);n this.pendingLanes = NoLanes;n this.suspendedLanes = NoLanes;n this.pingedLanes = NoLanes;n this.expiredLanes = NoLanes;n this.mutableReadLanes = NoLanes;n this.finishedLanes = NoLanes;n this.entangledLanes = NoLanes;n this.entanglements = createLaneMap(NoLanes);nn {n this.mutableSourceEagerHydrationData = null;n }nn {n this.interactionThreadID = tracing.unstable_getThreadID();n this.memoizedInteractions = new Set();n this.pendingInteractionMap = new Map();n }nn {n switch (tag) {n case BlockingRoot:n this._debugRootType = ‚createBlockingRoot()‘;n break;nn case ConcurrentRoot:n this._debugRootType = ‚createRoot()‘;n break;nn case LegacyRoot:n this._debugRootType = ‚createLegacyRoot()‘;n break;n }n }n}nnfunction createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {n var root = new FiberRootNode(containerInfo, tag, hydrate);n // stateNode is any.nnn var uninitializedFiber = createHostRootFiber(tag);n root.current = uninitializedFiber;n uninitializedFiber.stateNode = root;n initializeUpdateQueue(uninitializedFiber);n return root;n}nn// This ensures that the version used for server rendering matches the onen// that is eventually read during hydration.n// If they don’t match there’s a potential tear and a full deopt render is required.nnfunction registerMutableSourceForHydration(root, mutableSource) {n var getVersion = mutableSource._getVersion;n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.n // Retaining it forever may interfere with GC.nn if (root.mutableSourceEagerHydrationData == null) {n root.mutableSourceEagerHydrationData = [mutableSource, version];n } else {n root.mutableSourceEagerHydrationData.push(mutableSource, version);n }n}nnfunction createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.nimplementation) {n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;n return {n // This tag allow us to uniquely identify this as a React Portaln $$typeof: REACT_PORTAL_TYPE,n key: key == null ? null : “ + key,n children: children,n containerInfo: containerInfo,n implementation: implementationn };n}nnvar didWarnAboutNestedUpdates;nvar didWarnAboutFindNodeInStrictMode;nn{n didWarnAboutNestedUpdates = false;n didWarnAboutFindNodeInStrictMode = {};n}nnfunction getContextForSubtree(parentComponent) {n if (!parentComponent) {n return emptyContextObject;n }nn var fiber = get(parentComponent);n var parentContext = findCurrentUnmaskedContext(fiber);nn if (fiber.tag === ClassComponent) {n var Component = fiber.type;nn if (isContextProvider(Component)) {n return processChildContext(fiber, Component, parentContext);n }n }nn return parentContext;n}nnfunction findHostInstanceWithWarning(component, methodName) {n {n var fiber = get(component);nn if (fiber === undefined) {n if (typeof component.render === ‚function‘) {n {n {n throw Error( „Unable to find node on an unmounted component.“ );n }n }n } else {n {n {n throw Error( „Argument appears to not be a ReactComponent. Keys: “ + Object.keys(component) );n }n }n }n }nn var hostFiber = findCurrentHostFiber(fiber);nn if (hostFiber === null) {n return null;n }nn if (hostFiber.mode & StrictMode) {n var componentName = getComponentName(fiber.type) || ‚Component‘;nn if (!didWarnAboutFindNodeInStrictMode[componentName]) {n didWarnAboutFindNodeInStrictMode[componentName] = true;n var previousFiber = current;nn try {n setCurrentFiber(hostFiber);nn if (fiber.mode & StrictMode) {n error(‚%s is deprecated in StrictMode. ‚ + ‚%s was passed an instance of %s which is inside StrictMode. ‚ + ‚Instead, add a ref directly to the element you want to reference. ‚ + ‚Learn more about using refs safely here: ‚ + ‚https://reactjs.org/link/strict-mode-find-node‘, methodName, methodName, componentName);n } else {n error(‚%s is deprecated in StrictMode. ‚ + ‚%s was passed an instance of %s which renders StrictMode children. ‚ + ‚Instead, add a ref directly to the element you want to reference. ‚ + ‚Learn more about using refs safely here: ‚ + ‚https://reactjs.org/link/strict-mode-find-node‘, methodName, methodName, componentName);n }n } finally {n // Ideally this should reset to previous but this shouldn’t be called inn // render and there’s another warning for that anyway.n if (previousFiber) {n setCurrentFiber(previousFiber);n } else {n resetCurrentFiber();n }n }n }n }nn return hostFiber.stateNode;n }n}nnfunction createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {n return createFiberRoot(containerInfo, tag, hydrate);n}nfunction updateContainer(element, container, parentComponent, callback) {n {n onScheduleRoot(container, element);n }nn var current$1 = container.current;n var eventTime = requestEventTime();nn {n // $FlowExpectedError – jest isn’t a global, and isn’t recognized outside of testsn if (‚undefined‘ !== typeof jest) {n warnIfUnmockedScheduler(current$1);n warnIfNotScopedWithMatchingAct(current$1);n }n }nn var lane = requestUpdateLane(current$1);nn var context = getContextForSubtree(parentComponent);nn if (container.context === null) {n container.context = context;n } else {n container.pendingContext = context;n }nn {n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {n didWarnAboutNestedUpdates = true;nn error(‚Render methods should be a pure function of props and state; ‚ + ‚triggering nested component updates from render is not allowed. ‚ + ‚If necessary, trigger nested updates in componentDidUpdate.\n\n‘ + ‚Check the render method of %s.‘, getComponentName(current.type) || ‚Unknown‘);n }n }nn var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this propertyn // being called „element“.nn update.payload = {n element: elementn };n callback = callback === undefined ? null : callback;nn if (callback !== null) {n {n if (typeof callback !== ‚function‘) {n error(‚render(…): Expected the last optional `callback` argument to be a ‚ + ‚function. Instead received: %s.‘, callback);n }n }nn update.callback = callback;n }nn enqueueUpdate(current$1, update);n scheduleUpdateOnFiber(current$1, lane, eventTime);n return lane;n}nfunction getPublicRootInstance(container) {n var containerFiber = container.current;nn if (!containerFiber.child) {n return null;n }nn switch (containerFiber.child.tag) {n case HostComponent:n return getPublicInstance(containerFiber.child.stateNode);nn default:n return containerFiber.child.stateNode;n }n}nnfunction markRetryLaneImpl(fiber, retryLane) {n var suspenseState = fiber.memoizedState;nn if (suspenseState !== null && suspenseState.dehydrated !== null) {n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);n }n} // Increases the priority of thennables when they resolve within this boundary.nnnfunction markRetryLaneIfNotHydrated(fiber, retryLane) {n markRetryLaneImpl(fiber, retryLane);n var alternate = fiber.alternate;nn if (alternate) {n markRetryLaneImpl(alternate, retryLane);n }n}nnfunction attemptUserBlockingHydration$1(fiber) {n if (fiber.tag !== SuspenseComponent) {n // We ignore HostRoots here because we can’t increasen // their priority and they should not suspend on I/O,n // since you have to wrap anything that might suspend inn // Suspense.n return;n }nn var eventTime = requestEventTime();n var lane = InputDiscreteHydrationLane;n scheduleUpdateOnFiber(fiber, lane, eventTime);n markRetryLaneIfNotHydrated(fiber, lane);n}nfunction attemptContinuousHydration$1(fiber) {n if (fiber.tag !== SuspenseComponent) {n // We ignore HostRoots here because we can’t increasen // their priority and they should not suspend on I/O,n // since you have to wrap anything that might suspend inn // Suspense.n return;n }nn var eventTime = requestEventTime();n var lane = SelectiveHydrationLane;n scheduleUpdateOnFiber(fiber, lane, eventTime);n markRetryLaneIfNotHydrated(fiber, lane);n}nfunction attemptHydrationAtCurrentPriority$1(fiber) {n if (fiber.tag !== SuspenseComponent) {n // We ignore HostRoots here because we can’t increasen // their priority other than synchronously flush it.n return;n }nn var eventTime = requestEventTime();n var lane = requestUpdateLane(fiber);n scheduleUpdateOnFiber(fiber, lane, eventTime);n markRetryLaneIfNotHydrated(fiber, lane);n}nfunction runWithPriority$2(priority, fn) {nn try {n setCurrentUpdateLanePriority(priority);n return fn();n } finally {n }n}nfunction findHostInstanceWithNoPortals(fiber) {n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);nn if (hostFiber === null) {n return null;n }nn if (hostFiber.tag === FundamentalComponent) {n return hostFiber.stateNode.instance;n }nn return hostFiber.stateNode;n}nnvar shouldSuspendImpl = function (fiber) {n return false;n};nnfunction shouldSuspend(fiber) {n return shouldSuspendImpl(fiber);n}nvar overrideHookState = null;nvar overrideHookStateDeletePath = null;nvar overrideHookStateRenamePath = null;nvar overrideProps = null;nvar overridePropsDeletePath = null;nvar overridePropsRenamePath = null;nvar scheduleUpdate = null;nvar setSuspenseHandler = null;nn{n var copyWithDeleteImpl = function (obj, path, index) {n var key = path[index];n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);nn if (index + 1 === path.length) {n if (Array.isArray(updated)) {n updated.splice(key, 1);n } else {n delete updated[key];n }nn return updated;n } // $FlowFixMe number or string is fine herennn updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);n return updated;n };nn var copyWithDelete = function (obj, path) {n return copyWithDeleteImpl(obj, path, 0);n };nn var copyWithRenameImpl = function (obj, oldPath, newPath, index) {n var oldKey = oldPath[index];n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);nn if (index + 1 === oldPath.length) {n var newKey = newPath[index]; // $FlowFixMe number or string is fine herenn updated[newKey] = updated[oldKey];nn if (Array.isArray(updated)) {n updated.splice(oldKey, 1);n } else {n delete updated[oldKey];n }n } else {n // $FlowFixMe number or string is fine heren updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine heren obj[oldKey], oldPath, newPath, index + 1);n }nn return updated;n };nn var copyWithRename = function (obj, oldPath, newPath) {n if (oldPath.length !== newPath.length) {n warn(‚copyWithRename() expects paths of the same length‘);nn return;n } else {n for (var i = 0; i = path.length) {n return value;n }nn var key = path[index];n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine herenn updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);n return updated;n };nn var copyWithSet = function (obj, path, value) {n return copyWithSetImpl(obj, path, 0, value);n };nn var findHook = function (fiber, id) {n // For now, the „id“ of stateful hooks is just the stateful hook index.n // This may change in the future with e.g. nested hooks.n var currentHook = fiber.memoizedState;nn while (currentHook !== null && id > 0) {n currentHook = currentHook.next;n id–;n }nn return currentHook;n }; // Support DevTools editable values for useState and useReducer.nnn overrideHookState = function (fiber, id, path, value) {n var hook = findHook(fiber, id);nn if (hook !== null) {n var newState = copyWithSet(hook.memoizedState, path, value);n hook.memoizedState = newState;n hook.baseState = newState; // We aren’t actually adding an update to the queue,n // because there is no update we can add for useReducer hooks that won’t trigger an error.n // (There’s no appropriate action type for DevTools overrides.)n // As a result though, React will see the scheduled update as a noop and bailout.n // Shallow cloning props works as a workaround for now to bypass the bailout check.nn fiber.memoizedProps = _assign({}, fiber.memoizedProps);n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n }n };nn overrideHookStateDeletePath = function (fiber, id, path) {n var hook = findHook(fiber, id);nn if (hook !== null) {n var newState = copyWithDelete(hook.memoizedState, path);n hook.memoizedState = newState;n hook.baseState = newState; // We aren’t actually adding an update to the queue,n // because there is no update we can add for useReducer hooks that won’t trigger an error.n // (There’s no appropriate action type for DevTools overrides.)n // As a result though, React will see the scheduled update as a noop and bailout.n // Shallow cloning props works as a workaround for now to bypass the bailout check.nn fiber.memoizedProps = _assign({}, fiber.memoizedProps);n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n }n };nn overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {n var hook = findHook(fiber, id);nn if (hook !== null) {n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);n hook.memoizedState = newState;n hook.baseState = newState; // We aren’t actually adding an update to the queue,n // because there is no update we can add for useReducer hooks that won’t trigger an error.n // (There’s no appropriate action type for DevTools overrides.)n // As a result though, React will see the scheduled update as a noop and bailout.n // Shallow cloning props works as a workaround for now to bypass the bailout check.nn fiber.memoizedProps = _assign({}, fiber.memoizedProps);n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n }n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.nnn overrideProps = function (fiber, path, value) {n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);nn if (fiber.alternate) {n fiber.alternate.pendingProps = fiber.pendingProps;n }nn scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n };nn overridePropsDeletePath = function (fiber, path) {n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);nn if (fiber.alternate) {n fiber.alternate.pendingProps = fiber.pendingProps;n }nn scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n };nn overridePropsRenamePath = function (fiber, oldPath, newPath) {n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);nn if (fiber.alternate) {n fiber.alternate.pendingProps = fiber.pendingProps;n }nn scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n };nn scheduleUpdate = function (fiber) {n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);n };nn setSuspenseHandler = function (newShouldSuspendImpl) {n shouldSuspendImpl = newShouldSuspendImpl;n };n}nnfunction findHostInstanceByFiber(fiber) {n var hostFiber = findCurrentHostFiber(fiber);nn if (hostFiber === null) {n return null;n }nn return hostFiber.stateNode;n}nnfunction emptyFindFiberByHostInstance(instance) {n return null;n}nnfunction getCurrentFiberForDevTools() {n return current;n}nnfunction injectIntoDevTools(devToolsConfig) {n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;n return injectInternals({n bundleType: devToolsConfig.bundleType,n version: devToolsConfig.version,n rendererPackageName: devToolsConfig.rendererPackageName,n rendererConfig: devToolsConfig.rendererConfig,n overrideHookState: overrideHookState,n overrideHookStateDeletePath: overrideHookStateDeletePath,n overrideHookStateRenamePath: overrideHookStateRenamePath,n overrideProps: overrideProps,n overridePropsDeletePath: overridePropsDeletePath,n overridePropsRenamePath: overridePropsRenamePath,n setSuspenseHandler: setSuspenseHandler,n scheduleUpdate: scheduleUpdate,n currentDispatcherRef: ReactCurrentDispatcher,n findHostInstanceByFiber: findHostInstanceByFiber,n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,n // React Refreshn findHostInstancesForRefresh: findHostInstancesForRefresh ,n scheduleRefresh: scheduleRefresh ,n scheduleRoot: scheduleRoot ,n setRefreshHandler: setRefreshHandler ,n // Enables DevTools to append owner stacks to error messages in DEV mode.n getCurrentFiber: getCurrentFiberForDevTools n });n}nnfunction ReactDOMRoot(container, options) {n this._internalRoot = createRootImpl(container, ConcurrentRoot, options);n}nnfunction ReactDOMBlockingRoot(container, tag, options) {n this._internalRoot = createRootImpl(container, tag, options);n}nnReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {n var root = this._internalRoot;nn {n if (typeof arguments[1] === ‚function‘) {n error(‚render(…): does not support the second callback argument. ‚ + ‚To execute a side effect after rendering, declare it in a component body with useEffect().‘);n }nn var container = root.containerInfo;nn if (container.nodeType !== COMMENT_NODE) {n var hostInstance = findHostInstanceWithNoPortals(root.current);nn if (hostInstance) {n if (hostInstance.parentNode !== container) {n error(‚render(…): It looks like the React-rendered content of the ‚ + ‚root container was removed without using React. This is not ‚ + ’supported and will cause errors. Instead, call ‚ + „root.unmount() to empty a root’s container.“);n }n }n }n }nn updateContainer(children, root, null, null);n};nnReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {n {n if (typeof arguments[0] === ‚function‘) {n error(‚unmount(…): does not support a callback argument. ‚ + ‚To execute a side effect after rendering, declare it in a component body with useEffect().‘);n }n }nn var root = this._internalRoot;n var container = root.containerInfo;n updateContainer(null, root, null, function () {n unmarkContainerAsRoot(container);n });n};nnfunction createRootImpl(container, tag, options) {n // Tag is either LegacyRoot or Concurrent Rootn var hydrate = options != null && options.hydrate === true;n var hydrationCallbacks = options != null && options.hydrationOptions || null;n var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;n var root = createContainer(container, tag, hydrate);n markContainerAsRoot(root.current, container);n var containerNodeType = container.nodeType;nn {n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;n listenToAllSupportedEvents(rootContainerElement);n }nn if (mutableSources) {n for (var i = 0; i 2 && arguments[2] !== undefined ? arguments[2] : null;nn if (!isValidContainer(container)) {n {n throw Error( „Target container is not a DOM element.“ );n }n } // TODO: pass ReactDOM portal implementation as third argumentn // $FlowFixMe The Flow type is opaque but there’s no way to actually create it.nnn return createPortal(children, container, null, key);n}nnfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {nn return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);n}nnfunction unstable_createPortal(children, container) {n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;nn {n if (!didWarnAboutUnstableCreatePortal) {n didWarnAboutUnstableCreatePortal = true;nn warn(‚The ReactDOM.unstable_createPortal() alias has been deprecated, ‚ + ‚and will be removed in React 18+. Update your code to use ‚ + ‚ReactDOM.createPortal() instead. It has the exact same API, ‚ + ‚but without the „unstable_“ prefix.‘);n }n }nn return createPortal$1(children, container, key);n}nnvar Internals = {n // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.n // This is an array for better minification.n Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?n IsThisRendererActing]n};nvar foundDevTools = injectIntoDevTools({n findFiberByHostInstance: getClosestInstanceFromNode,n bundleType: 1 ,n version: ReactVersion,n rendererPackageName: ‚react-dom’n});nn{n if (!foundDevTools && canUseDOM && window.top === window.self) {n // If we’re in Chrome or Firefox, provide a download link if not installed.n if (navigator.userAgent.indexOf(‚Chrome‘) > -1 && navigator.userAgent.indexOf(‚Edge‘) === -1 || navigator.userAgent.indexOf(‚Firefox‘) > -1) {n var protocol = window.location.protocol; // Don’t warn in exotic cases like chrome-extension://.nn if (/^(https?|file):$/.test(protocol)) {n // eslint-disable-next-line react-internal/no-production-loggingn console.info(‚%cDownload the React DevTools ‚ + ‚for a better development experience: ‚ + ‚https://reactjs.org/link/react-devtools‘ + (protocol === ‚file:‘ ? ‚\nYou might need to use a local HTTP server (instead of file://): ‚ + ‚https://reactjs.org/link/react-devtools-faq‘ : “), ‚font-weight:bold‘);n }n }n }n}nnexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;nexports.createPortal = createPortal$1;nexports.findDOMNode = findDOMNode;nexports.flushSync = flushSync;nexports.hydrate = hydrate;nexports.render = render;nexports.unmountComponentAtNode = unmountComponentAtNode;nexports.unstable_batchedUpdates = batchedUpdates$1;nexports.unstable_createPortal = unstable_createPortal;nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;nexports.version = ReactVersion;n })();n}nnn//////////////////n// WEBPACK FOOTERn// ./~/comments/~/react-dom/cjs/react-dom.development.jsn// module id = 78n// module chunks = 0n//# sourceURL=webpack:///./~/comments/~/react-dom/cjs/react-dom.development.js?“);<br /> },function(module,exports,__webpack_require__){eval(„‚use strict‘;nnObject.defineProperty(exports, „__esModule“, {n value: truen});nnvar _extends = Object.assign || function (target) { for (var i = 1; i 1 ? _len – 1 : 0), _key = 1; _key 1 ? _len2 – 1 : 0), _key2 = 1; _key2 0 && typeof args[args.length – 1] === ’string‘ && args[args.length – 1].indexOf(‚\n in‘) === 0;nn if (!hasExistingStack) {n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;n var stack = ReactDebugCurrentFrame.getStackAddendum();nn if (stack !== “) {n format += ‚%s‘;n args = args.concat([stack]);n }n }nn var argsWithFormat = args.map(function (item) {n return “ + item;n }); // Careful: RN currently depends on this prefixnn argsWithFormat.unshift(‚Warning: ‚ + format); // We intentionally don’t use spread (or .apply) directly because itn // breaks IE9: https://github.com/facebook/react/issues/13610n // eslint-disable-next-line react-internal/no-production-loggingnn Function.prototype.apply.call(console[level], console, argsWithFormat);nn try {n // — Welcome to debugging React —n // This error was thrown as a convenience so that you can use this stackn // to find the callsite that caused this warning to fire.n var argIndex = 0;n var message = ‚Warning: ‚ + format.replace(/%s/g, function () {n return args[argIndex++];n });n throw new Error(message);n } catch (x) {}n }n}nnvar didWarnStateUpdateForUnmountedComponent = {};nnfunction warnNoop(publicInstance, callerName) {n {n var _constructor = publicInstance.constructor;n var componentName = _constructor && (_constructor.displayName || _constructor.name) || ‚ReactClass‘;n var warningKey = componentName + „.“ + callerName;nn if (didWarnStateUpdateForUnmountedComponent[warningKey]) {n return;n }nn error(„Can’t call %s on a component that is not yet mounted. “ + ‚This is a no-op, but it might indicate a bug in your application. ‚ + ‚Instead, assign to `this.state` directly or define a `state = {};` ‚ + ‚class property with the desired state in the %s component.‘, callerName, componentName);nn didWarnStateUpdateForUnmountedComponent[warningKey] = true;n }n}n/**n * This is the abstract API for an update queue.n */nnnvar ReactNoopUpdateQueue = {n /**n * Checks whether or not this composite component is mounted.n * @param {ReactClass} publicInstance The instance we want to test.n * @return {boolean} True if mounted, false otherwise.n * @protectedn * @finaln */n isMounted: function (publicInstance) {n return false;n },nn /**n * Forces an update. This should only be invoked when it is known withn * certainty that we are **not** in a DOM transaction.n *n * You may want to call this when you know that some deeper aspect of then * component’s state has changed but `setState` was not called.n *n * This will not invoke `shouldComponentUpdate`, but it will invoken * `componentWillUpdate` and `componentDidUpdate`.n *n * @param {ReactClass} publicInstance The instance that should rerender.n * @param {?function} callback Called after component is updated.n * @param {?string} callerName name of the calling function in the public API.n * @internaln */n enqueueForceUpdate: function (publicInstance, callback, callerName) {n warnNoop(publicInstance, ‚forceUpdate‘);n },nn /**n * Replaces all of the state. Always use this or `setState` to mutate state.n * You should treat `this.state` as immutable.n *n * There is no guarantee that `this.state` will be immediately updated, son * accessing `this.state` after calling this method may return the old value.n *n * @param {ReactClass} publicInstance The instance that should rerender.n * @param {object} completeState Next state.n * @param {?function} callback Called after component is updated.n * @param {?string} callerName name of the calling function in the public API.n * @internaln */n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {n warnNoop(publicInstance, ‚replaceState‘);n },nn /**n * Sets a subset of the state. This only exists because _pendingState isn * internal. This provides a merging strategy that is not available to deepn * properties which is confusing. TODO: Expose pendingState or don’t use itn * during the merge.n *n * @param {ReactClass} publicInstance The instance that should rerender.n * @param {object} partialState Next partial state to be merged with state.n * @param {?function} callback Called after component is updated.n * @param {?string} Name of the calling function in the public API.n * @internaln */n enqueueSetState: function (publicInstance, partialState, callback, callerName) {n warnNoop(publicInstance, ’setState‘);n }n};nnvar emptyObject = {};nn{n Object.freeze(emptyObject);n}n/**n * Base class helpers for the updating state of a component.n */nnnfunction Component(props, context, updater) {n this.props = props;n this.context = context; // If a component has string refs, we will assign a different object later.nn this.refs = emptyObject; // We initialize the default updater but the real one gets injected by then // renderer.nn this.updater = updater || ReactNoopUpdateQueue;n}nnComponent.prototype.isReactComponent = {};n/**n * Sets a subset of the state. Always use this to mutaten * state. You should treat `this.state` as immutable.n *n * There is no guarantee that `this.state` will be immediately updated, son * accessing `this.state` after calling this method may return the old value.n *n * There is no guarantee that calls to `setState` will run synchronously,n * as they may eventually be batched together. You can provide an optionaln * callback that will be executed when the call to setState is actuallyn * completed.n *n * When a function is provided to setState, it will be called at some point inn * the future (not synchronously). It will be called with the up to daten * component arguments (state, props, context). These values can be differentn * from this.* because your function may be called after receiveProps but beforen * shouldComponentUpdate, and this new state, props, and context will not yet ben * assigned to this.n *n * @param {object|function} partialState Next partial state or function ton * produce next partial state to be merged with current state.n * @param {?function} callback Called after state is updated.n * @finaln * @protectedn */nnComponent.prototype.setState = function (partialState, callback) {n if (!(typeof partialState === ‚object‘ || typeof partialState === ‚function‘ || partialState == null)) {n {n throw Error( „setState(…): takes an object of state variables to update or a function which returns an object of state variables.“ );n }n }nn this.updater.enqueueSetState(this, partialState, callback, ’setState‘);n};n/**n * Forces an update. This should only be invoked when it is known withn * certainty that we are **not** in a DOM transaction.n *n * You may want to call this when you know that some deeper aspect of then * component’s state has changed but `setState` was not called.n *n * This will not invoke `shouldComponentUpdate`, but it will invoken * `componentWillUpdate` and `componentDidUpdate`.n *n * @param {?function} callback Called after update is complete.n * @finaln * @protectedn */nnnComponent.prototype.forceUpdate = function (callback) {n this.updater.enqueueForceUpdate(this, callback, ‚forceUpdate‘);n};n/**n * Deprecated APIs. These APIs used to exist on classic React classes but sincen * we would like to deprecate them, we’re not going to move them over to thisn * modern base class. Instead, we define a getter that warns if it’s accessed.n */nnn{n var deprecatedAPIs = {n isMounted: [‚isMounted‘, ‚Instead, make sure to clean up subscriptions and pending requests in ‚ + ‚componentWillUnmount to prevent memory leaks.‘],n replaceState: [‚replaceState‘, ‚Refactor your code to use setState instead (see ‚ + ‚https://github.com/facebook/react/issues/3236).‘]n };nn var defineDeprecationWarning = function (methodName, info) {n Object.defineProperty(Component.prototype, methodName, {n get: function () {n warn(‚%s(…) is deprecated in plain JavaScript React classes. %s‘, info[0], info[1]);nn return undefined;n }n });n };nn for (var fnName in deprecatedAPIs) {n if (deprecatedAPIs.hasOwnProperty(fnName)) {n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);n }n }n}nnfunction ComponentDummy() {}nnComponentDummy.prototype = Component.prototype;n/**n * Convenience component with default shallow equality check for sCU.n */nnfunction PureComponent(props, context, updater) {n this.props = props;n this.context = context; // If a component has string refs, we will assign a different object later.nn this.refs = emptyObject;n this.updater = updater || ReactNoopUpdateQueue;n}nnvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.nn_assign(pureComponentPrototype, Component.prototype);nnpureComponentPrototype.isPureReactComponent = true;nn// an immutable object with a single mutable valuenfunction createRef() {n var refObject = {n current: nulln };nn {n Object.seal(refObject);n }nn return refObject;n}nnvar hasOwnProperty = Object.prototype.hasOwnProperty;nvar RESERVED_PROPS = {n key: true,n ref: true,n __self: true,n __source: truen};nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;nn{n didWarnAboutStringRefs = {};n}nnfunction hasValidRef(config) {n {n if (hasOwnProperty.call(config, ‚ref‘)) {n var getter = Object.getOwnPropertyDescriptor(config, ‚ref‘).get;nn if (getter && getter.isReactWarning) {n return false;n }n }n }nn return config.ref !== undefined;n}nnfunction hasValidKey(config) {n {n if (hasOwnProperty.call(config, ‚key‘)) {n var getter = Object.getOwnPropertyDescriptor(config, ‚key‘).get;nn if (getter && getter.isReactWarning) {n return false;n }n }n }nn return config.key !== undefined;n}nnfunction defineKeyPropWarningGetter(props, displayName) {n var warnAboutAccessingKey = function () {n {n if (!specialPropKeyWarningShown) {n specialPropKeyWarningShown = true;nn error(‚%s: `key` is not a prop. Trying to access it will result ‚ + ‚in `undefined` being returned. If you need to access the same ‚ + ‚value within the child component, you should pass it as a different ‚ + ‚prop. (https://fb.me/react-special-props)‘, displayName);n }n }n };nn warnAboutAccessingKey.isReactWarning = true;n Object.defineProperty(props, ‚key‘, {n get: warnAboutAccessingKey,n configurable: truen });n}nnfunction defineRefPropWarningGetter(props, displayName) {n var warnAboutAccessingRef = function () {n {n if (!specialPropRefWarningShown) {n specialPropRefWarningShown = true;nn error(‚%s: `ref` is not a prop. Trying to access it will result ‚ + ‚in `undefined` being returned. If you need to access the same ‚ + ‚value within the child component, you should pass it as a different ‚ + ‚prop. (https://fb.me/react-special-props)‘, displayName);n }n }n };nn warnAboutAccessingRef.isReactWarning = true;n Object.defineProperty(props, ‚ref‘, {n get: warnAboutAccessingRef,n configurable: truen });n}nnfunction warnIfStringRefCannotBeAutoConverted(config) {n {n if (typeof config.ref === ’string‘ && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {n var componentName = getComponentName(ReactCurrentOwner.current.type);nn if (!didWarnAboutStringRefs[componentName]) {n error(‚Component „%s“ contains the string ref „%s“. ‚ + ‚Support for string refs will be removed in a future major release. ‚ + ‚This case cannot be automatically converted to an arrow function. ‚ + ‚We ask you to manually fix this case by using useRef() or createRef() instead. ‚ + ‚Learn more about using refs safely here: ‚ + ‚https://fb.me/react-strict-mode-string-ref‘, getComponentName(ReactCurrentOwner.current.type), config.ref);nn didWarnAboutStringRefs[componentName] = true;n }n }n }n}n/**n * Factory method to create a new React element. This no longer adheres ton * the class pattern, so do not use new to call it. Also, instanceof checkn * will not work. Instead test $$typeof field against Symbol.for(‚react.element‘) to checkn * if something is a React Element.n *n * @param {*} typen * @param {*} propsn * @param {*} keyn * @param {string|object} refn * @param {*} ownern * @param {*} self A *temporary* helper to detect places where `this` isn * different from the `owner` when React.createElement is called, so that wen * can warn. We want to get rid of owner and replace string `ref`s with arrown * functions, and as long as `this` and owner are the same, there will be non * change in behavior.n * @param {*} source An annotation object (added by a transpiler or otherwise)n * indicating filename, line number, and/or other information.n * @internaln */nnnvar ReactElement = function (type, key, ref, self, source, owner, props) {n var element = {n // This tag allows us to uniquely identify this as a React Elementn $$typeof: REACT_ELEMENT_TYPE,n // Built-in properties that belong on the elementn type: type,n key: key,n ref: ref,n props: props,n // Record the component responsible for creating this element.n _owner: ownern };nn {n // The validation flag is currently mutative. We put it onn // an external backing store so that we can freeze the whole object.n // This can be replaced with a WeakMap once they are implemented inn // commonly used development environments.n element._store = {}; // To make comparing ReactElements easier for testing purposes, we maken // the validation flag non-enumerable (where possible, which shouldn // include every environment we run tests in), so the test frameworkn // ignores it.nn Object.defineProperty(element._store, ‚validated‘, {n configurable: false,n enumerable: false,n writable: true,n value: falsen }); // self and source are DEV only properties.nn Object.defineProperty(element, ‚_self‘, {n configurable: false,n enumerable: false,n writable: false,n value: selfn }); // Two elements created in two different places should be consideredn // equal for testing purposes and therefore we hide it from enumeration.nn Object.defineProperty(element, ‚_source‘, {n configurable: false,n enumerable: false,n writable: false,n value: sourcen });nn if (Object.freeze) {n Object.freeze(element.props);n Object.freeze(element);n }n }nn return element;n};n/**n * Create and return a new ReactElement of the given type.n * See https://reactjs.org/docs/react-api.html#createelementn */nnfunction createElement(type, config, children) {n var propName; // Reserved names are extractednn var props = {};n var key = null;n var ref = null;n var self = null;n var source = null;nn if (config != null) {n if (hasValidRef(config)) {n ref = config.ref;nn {n warnIfStringRefCannotBeAutoConverted(config);n }n }nn if (hasValidKey(config)) {n key = “ + config.key;n }nn self = config.__self === undefined ? null : config.__self;n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props objectnn for (propName in config) {n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {n props[propName] = config[propName];n }n }n } // Children can be more than one argument, and those are transferred onton // the newly allocated props object.nnn var childrenLength = arguments.length – 2;nn if (childrenLength === 1) {n props.children = children;n } else if (childrenLength > 1) {n var childArray = Array(childrenLength);nn for (var i = 0; i 1) {n var childArray = Array(childrenLength);nn for (var i = 0; i is not supported and will be removed in ‚ + ‚a future major release. Did you mean to render instead?‘);n }nn return context.Provider;n },n set: function (_Provider) {n context.Provider = _Provider;n }n },n _currentValue: {n get: function () {n return context._currentValue;n },n set: function (_currentValue) {n context._currentValue = _currentValue;n }n },n _currentValue2: {n get: function () {n return context._currentValue2;n },n set: function (_currentValue2) {n context._currentValue2 = _currentValue2;n }n },n _threadCount: {n get: function () {n return context._threadCount;n },n set: function (_threadCount) {n context._threadCount = _threadCount;n }n },n Consumer: {n get: function () {n if (!hasWarnedAboutUsingNestedContextConsumers) {n hasWarnedAboutUsingNestedContextConsumers = true;nn error(‚Rendering is not supported and will be removed in ‚ + ‚a future major release. Did you mean to render instead?‘);n }nn return context.Consumer;n }n }n }); // $FlowFixMe: Flow complains about missing properties because it doesn’t understand definePropertynn context.Consumer = Consumer;n }nn {n context._currentRenderer = null;n context._currentRenderer2 = null;n }nn return context;n}nnfunction lazy(ctor) {n var lazyType = {n $$typeof: REACT_LAZY_TYPE,n _ctor: ctor,n // React uses these fields to store the result.n _status: -1,n _result: nulln };nn {n // In production, this would just set it on the object.n var defaultProps;n var propTypes;n Object.defineProperties(lazyType, {n defaultProps: {n configurable: true,n get: function () {n return defaultProps;n },n set: function (newDefaultProps) {n error(‚React.lazy(…): It is not supported to assign `defaultProps` to ‚ + ‚a lazy component import. Either specify them where the component ‚ + ‚is defined, or create a wrapping component around it.‘);nn defaultProps = newDefaultProps; // Match production behavior more closely:nn Object.defineProperty(lazyType, ‚defaultProps‘, {n enumerable: truen });n }n },n propTypes: {n configurable: true,n get: function () {n return propTypes;n },n set: function (newPropTypes) {n error(‚React.lazy(…): It is not supported to assign `propTypes` to ‚ + ‚a lazy component import. Either specify them where the component ‚ + ‚is defined, or create a wrapping component around it.‘);nn propTypes = newPropTypes; // Match production behavior more closely:nn Object.defineProperty(lazyType, ‚propTypes‘, {n enumerable: truen });n }n }n });n }nn return lazyType;n}nnfunction forwardRef(render) {n {n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {n error(‚forwardRef requires a render function but received a `memo` ‚ + ‚component. Instead of forwardRef(memo(…)), use ‚ + ‚memo(forwardRef(…)).‘);n } else if (typeof render !== ‚function‘) {n error(‚forwardRef requires a render function but was given %s.‘, render === null ? ’null‘ : typeof render);n } else {n if (render.length !== 0 && render.length !== 2) {n error(‚forwardRef render functions accept exactly two parameters: props and ref. %s‘, render.length === 1 ? ‚Did you forget to use the ref parameter?‘ : ‚Any additional parameter will be undefined.‘);n }n }nn if (render != null) {n if (render.defaultProps != null || render.propTypes != null) {n error(‚forwardRef render functions do not support propTypes or defaultProps. ‚ + ‚Did you accidentally pass a React component?‘);n }n }n }nn return {n $$typeof: REACT_FORWARD_REF_TYPE,n render: rendern };n}nnfunction isValidElementType(type) {n return typeof type === ’string‘ || typeof type === ‚function‘ || // Note: its typeof might be other than ’symbol‘ or ’number‘ if it’s a polyfill.n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === ‚object‘ && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);n}nnfunction memo(type, compare) {n {n if (!isValidElementType(type)) {n error(‚memo: The first argument must be a component. Instead ‚ + ‚received: %s‘, type === null ? ’null‘ : typeof type);n }n }nn return {n $$typeof: REACT_MEMO_TYPE,n type: type,n compare: compare === undefined ? null : comparen };n}nnfunction resolveDispatcher() {n var dispatcher = ReactCurrentDispatcher.current;nn if (!(dispatcher !== null)) {n {n throw Error( „Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.“ );n }n }nn return dispatcher;n}nnfunction useContext(Context, unstable_observedBits) {n var dispatcher = resolveDispatcher();nn {n if (unstable_observedBits !== undefined) {n error(‚useContext() second argument is reserved for future ‚ + ‚use in React. Passing it is not supported. ‚ + ‚You passed: %s.%s‘, unstable_observedBits, typeof unstable_observedBits === ’number‘ && Array.isArray(arguments[2]) ? ‚\n\nDid you call array.map(useContext)? ‚ + ‚Calling Hooks inside a loop is not supported. ‚ + ‚Learn more at https://fb.me/rules-of-hooks‘ : “);n } // TODO: add a more generic warning for invalid values.nnn if (Context._context !== undefined) {n var realContext = Context._context; // Don’t deduplicate because this legitimately causes bugsn // and nobody should be using this in existing code.nn if (realContext.Consumer === Context) {n error(‚Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ‚ + ‚removed in a future major release. Did you mean to call useContext(Context) instead?‘);n } else if (realContext.Provider === Context) {n error(‚Calling useContext(Context.Provider) is not supported. ‚ + ‚Did you mean to call useContext(Context) instead?‘);n }n }n }nn return dispatcher.useContext(Context, unstable_observedBits);n}nfunction useState(initialState) {n var dispatcher = resolveDispatcher();n return dispatcher.useState(initialState);n}nfunction useReducer(reducer, initialArg, init) {n var dispatcher = resolveDispatcher();n return dispatcher.useReducer(reducer, initialArg, init);n}nfunction useRef(initialValue) {n var dispatcher = resolveDispatcher();n return dispatcher.useRef(initialValue);n}nfunction useEffect(create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useEffect(create, deps);n}nfunction useLayoutEffect(create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useLayoutEffect(create, deps);n}nfunction useCallback(callback, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useCallback(callback, deps);n}nfunction useMemo(create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useMemo(create, deps);n}nfunction useImperativeHandle(ref, create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useImperativeHandle(ref, create, deps);n}nfunction useDebugValue(value, formatterFn) {n {n var dispatcher = resolveDispatcher();n return dispatcher.useDebugValue(value, formatterFn);n }n}nnvar propTypesMisspellWarningShown;nn{n propTypesMisspellWarningShown = false;n}nnfunction getDeclarationErrorAddendum() {n if (ReactCurrentOwner.current) {n var name = getComponentName(ReactCurrentOwner.current.type);nn if (name) {n return ‚\n\nCheck the render method of `‘ + name + ‚`.‘;n }n }nn return “;n}nnfunction getSourceInfoErrorAddendum(source) {n if (source !== undefined) {n var fileName = source.fileName.replace(/^.*[\\\/]/, “);n var lineNumber = source.lineNumber;n return ‚\n\nCheck your code at ‚ + fileName + ‚:‘ + lineNumber + ‚.‘;n }nn return “;n}nnfunction getSourceInfoErrorAddendumForProps(elementProps) {n if (elementProps !== null && elementProps !== undefined) {n return getSourceInfoErrorAddendum(elementProps.__source);n }nn return “;n}n/**n * Warn if there’s no key explicitly set on dynamic arrays of children orn * object keys are not valid. This allows us to keep track of children betweenn * updates.n */nnnvar ownerHasKeyUseWarning = {};nnfunction getCurrentComponentErrorInfo(parentType) {n var info = getDeclarationErrorAddendum();nn if (!info) {n var parentName = typeof parentType === ’string‘ ? parentType : parentType.displayName || parentType.name;nn if (parentName) {n info = „\n\nCheck the top-level render call using .“;n }n }nn return info;n}n/**n * Warn if the element doesn’t have an explicit key assigned to it.n * This element is in an array. The array could grow and shrink or ben * reordered. All children that haven’t already been validated are required ton * have a „key“ property assigned to it. Error statuses are cached so a warningn * will only be shown once.n *n * @internaln * @param {ReactElement} element Element that requires a key.n * @param {*} parentType element’s parent’s type.n */nnnfunction validateExplicitKey(element, parentType) {n if (!element._store || element._store.validated || element.key != null) {n return;n }nn element._store.validated = true;n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);nn if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {n return;n }nn ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as an // property, it may be the creator of the child that’s responsible forn // assigning it a key.nn var childOwner = “;nn if (element && element._owner && element._owner !== ReactCurrentOwner.current) {n // Give the component that originally created this child.n childOwner = “ It was passed a child from “ + getComponentName(element._owner.type) + „.“;n }nn setCurrentlyValidatingElement(element);nn {n error(‚Each child in a list should have a unique „key“ prop.‘ + ‚%s%s See https://fb.me/react-warning-keys for more information.‘, currentComponentErrorInfo, childOwner);n }nn setCurrentlyValidatingElement(null);n}n/**n * Ensure that every element either is passed in a static location, in ann * array with an explicit keys property defined, or in an object literaln * with valid key property.n *n * @internaln * @param {ReactNode} node Statically passed child of any type.n * @param {*} parentType node’s parent’s type.n */nnnfunction validateChildKeys(node, parentType) {n if (typeof node !== ‚object‘) {n return;n }nn if (Array.isArray(node)) {n for (var i = 0; i „;n info = ‚ Did you accidentally export a JSX literal instead of a component?‘;n } else {n typeString = typeof type;n }nn {n error(‚React.createElement: type is invalid — expected a string (for ‚ + ‚built-in components) or a class/function (for composite ‚ + ‚components) but got: %s.%s‘, typeString, info);n }n }nn var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.n // TODO: Drop this when these are no longer allowed as the type argument.nn if (element == null) {n return element;n } // Skip key warning if the type isn’t valid since our key validation logicn // doesn’t expect a non-string/function type and can throw confusing errors.n // We don’t want exception behavior to differ between dev and prod.n // (Rendering will throw with a helpful message and as soon as the type isn // fixed, the key warnings will appear.)nnn if (validType) {n for (var i = 2; i 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;nn var interaction = {n __count: 1,n id: interactionIDCounter++,n name: name,n timestamp: timestampn };n var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.n // To do that, clone the current interactions.n // The previous set will be restored upon completion.nn var interactions = new Set(prevInteractions);n interactions.add(interaction);n exports.__interactionsRef.current = interactions;n var subscriber = exports.__subscriberRef.current;n var returnValue;nn try {n if (subscriber !== null) {n subscriber.onInteractionTraced(interaction);n }n } finally {n try {n if (subscriber !== null) {n subscriber.onWorkStarted(interactions, threadID);n }n } finally {n try {n returnValue = callback();n } finally {n exports.__interactionsRef.current = prevInteractions;nn try {n if (subscriber !== null) {n subscriber.onWorkStopped(interactions, threadID);n }n } finally {n interaction.__count–; // If no async work was scheduled for this interaction,n // Notify subscribers that it’s completed.nn if (subscriber !== null && interaction.__count === 0) {n subscriber.onInteractionScheduledWorkCompleted(interaction);n }n }n }n }n }nn return returnValue;n}nfunction unstable_wrap(callback) {n var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;nn var wrappedInteractions = exports.__interactionsRef.current;n var subscriber = exports.__subscriberRef.current;nn if (subscriber !== null) {n subscriber.onWorkScheduled(wrappedInteractions, threadID);n } // Update the pending async work count for the current interactions.n // Update after calling subscribers in case of error.nnn wrappedInteractions.forEach(function (interaction) {n interaction.__count++;n });n var hasRun = false;nn function wrapped() {n var prevInteractions = exports.__interactionsRef.current;n exports.__interactionsRef.current = wrappedInteractions;n subscriber = exports.__subscriberRef.current;nn try {n var returnValue;nn try {n if (subscriber !== null) {n subscriber.onWorkStarted(wrappedInteractions, threadID);n }n } finally {n try {n returnValue = callback.apply(undefined, arguments);n } finally {n exports.__interactionsRef.current = prevInteractions;nn if (subscriber !== null) {n subscriber.onWorkStopped(wrappedInteractions, threadID);n }n }n }nn return returnValue;n } finally {n if (!hasRun) {n // We only expect a wrapped function to be executed once,n // But in the event that it’s executed more than once–n // Only decrement the outstanding interaction counts once.n hasRun = true; // Update pending async counts for all wrapped interactions.n // If this was the last scheduled async work for any of them,n // Mark them as completed.nn wrappedInteractions.forEach(function (interaction) {n interaction.__count–;nn if (subscriber !== null && interaction.__count === 0) {n subscriber.onInteractionScheduledWorkCompleted(interaction);n }n });n }n }n }nn wrapped.cancel = function cancel() {n subscriber = exports.__subscriberRef.current;nn try {n if (subscriber !== null) {n subscriber.onWorkCanceled(wrappedInteractions, threadID);n }n } finally {n // Update pending async counts for all wrapped interactions.n // If this was the last scheduled async work for any of them,n // Mark them as completed.n wrappedInteractions.forEach(function (interaction) {n interaction.__count–;nn if (subscriber && interaction.__count === 0) {n subscriber.onInteractionScheduledWorkCompleted(interaction);n }n });n }n };nn return wrapped;n}nnvar subscribers = null;nn{n subscribers = new Set();n}nnfunction unstable_subscribe(subscriber) {n {n subscribers.add(subscriber);nn if (subscribers.size === 1) {n exports.__subscriberRef.current = {n onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,n onInteractionTraced: onInteractionTraced,n onWorkCanceled: onWorkCanceled,n onWorkScheduled: onWorkScheduled,n onWorkStarted: onWorkStarted,n onWorkStopped: onWorkStoppedn };n }n }n}nfunction unstable_unsubscribe(subscriber) {n {n subscribers.delete(subscriber);nn if (subscribers.size === 0) {n exports.__subscriberRef.current = null;n }n }n}nnfunction onInteractionTraced(interaction) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onInteractionTraced(interaction);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onInteractionScheduledWorkCompleted(interaction) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onInteractionScheduledWorkCompleted(interaction);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkScheduled(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkScheduled(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkStarted(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkStarted(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkStopped(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkStopped(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkCanceled(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkCanceled(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnexports.unstable_clear = unstable_clear;nexports.unstable_getCurrent = unstable_getCurrent;nexports.unstable_getThreadID = unstable_getThreadID;nexports.unstable_subscribe = unstable_subscribe;nexports.unstable_trace = unstable_trace;nexports.unstable_unsubscribe = unstable_unsubscribe;nexports.unstable_wrap = unstable_wrap;n })();n}nnn//////////////////n// WEBPACK FOOTERn// ./~/comments/~/react-scroll-to-component/~/scheduler/cjs/scheduler-tracing.development.jsn// module id = 86n// module chunks = 0n//# sourceURL=webpack:///./~/comments/~/react-scroll-to-component/~/scheduler/cjs/scheduler-tracing.development.js?“)},function(module,exports,__webpack_require__){eval(„/** @license React v0.19.1n * scheduler.development.jsn *n * Copyright (c) Facebook, Inc. and its affiliates.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict‘;nnnnif (true) {n (function() {n’use strict‘;nnvar enableSchedulerDebugging = false;nvar enableProfiling = true;nnvar requestHostCallback;nvar requestHostTimeout;nvar cancelHostTimeout;nvar shouldYieldToHost;nvar requestPaint;nnif ( // If Scheduler runs in a non-DOM environment, it falls back to a naiven// implementation using setTimeout.ntypeof window === ‚undefined‘ || // Check if MessageChannel is supported, too.ntypeof MessageChannel !== ‚function‘) {n // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,n // fallback to a naive implementation.n var _callback = null;n var _timeoutID = null;nn var _flushCallback = function () {n if (_callback !== null) {n try {n var currentTime = exports.unstable_now();n var hasRemainingTime = true;nn _callback(hasRemainingTime, currentTime);nn _callback = null;n } catch (e) {n setTimeout(_flushCallback, 0);n throw e;n }n }n };nn var initialTime = Date.now();nn exports.unstable_now = function () {n return Date.now() – initialTime;n };nn requestHostCallback = function (cb) {n if (_callback !== null) {n // Protect against re-entrancy.n setTimeout(requestHostCallback, 0, cb);n } else {n _callback = cb;n setTimeout(_flushCallback, 0);n }n };nn requestHostTimeout = function (cb, ms) {n _timeoutID = setTimeout(cb, ms);n };nn cancelHostTimeout = function () {n clearTimeout(_timeoutID);n };nn shouldYieldToHost = function () {n return false;n };nn requestPaint = exports.unstable_forceFrameRate = function () {};n} else {n // Capture local references to native APIs, in case a polyfill overrides them.n var performance = window.performance;n var _Date = window.Date;n var _setTimeout = window.setTimeout;n var _clearTimeout = window.clearTimeout;nn if (typeof console !== ‚undefined‘) {n // TODO: Scheduler no longer requires these methods to be polyfilled. Butn // maybe we want to continue warning if they don’t exist, to preserve then // option to rely on it in the future?n var requestAnimationFrame = window.requestAnimationFrame;n var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me linknn if (typeof requestAnimationFrame !== ‚function‘) {n // Using console[‚error‘] to evade Babel and ESLintn console[‚error‘](„This browser doesn’t support requestAnimationFrame. “ + ‚Make sure that you load a ‚ + ‚polyfill in older browsers. https://fb.me/react-polyfills‘);n }nn if (typeof cancelAnimationFrame !== ‚function‘) {n // Using console[‚error‘] to evade Babel and ESLintn console[‚error‘](„This browser doesn’t support cancelAnimationFrame. “ + ‚Make sure that you load a ‚ + ‚polyfill in older browsers. https://fb.me/react-polyfills‘);n }n }nn if (typeof performance === ‚object‘ && typeof performance.now === ‚function‘) {n exports.unstable_now = function () {n return performance.now();n };n } else {n var _initialTime = _Date.now();nn exports.unstable_now = function () {n return _Date.now() – _initialTime;n };n }nn var isMessageLoopRunning = false;n var scheduledHostCallback = null;n var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the mainn // thread, like user events. By default, it yields multiple times per frame.n // It does not attempt to align with frame boundaries, since most tasks don’tn // need to be frame aligned; for those that do, use requestAnimationFrame.nn var yieldInterval = 5;n var deadline = 0; // TODO: Make this configurablenn {n // `isInputPending` is not available. Since we have no way of knowing ifn // there’s pending input, always yield at the end of the frame.n shouldYieldToHost = function () {n return exports.unstable_now() >= deadline;n }; // Since we yield every frame regardless, `requestPaint` has no effect.nnn requestPaint = function () {};n }nn exports.unstable_forceFrameRate = function (fps) {n if (fps 125) {n // Using console[‚error‘] to evade Babel and ESLintn console[‚error‘](‚forceFrameRate takes a positive int between 0 and 125, ‚ + ‚forcing framerates higher than 125 fps is not unsupported‘);n return;n }nn if (fps > 0) {n yieldInterval = Math.floor(1000 / fps);n } else {n // reset the frameraten yieldInterval = 5;n }n };nn var performWorkUntilDeadline = function () {n if (scheduledHostCallback !== null) {n var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsyncn // cycle. This means there’s always time remaining at the beginning ofn // the message event.nn deadline = currentTime + yieldInterval;n var hasTimeRemaining = true;nn try {n var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);nn if (!hasMoreWork) {n isMessageLoopRunning = false;n scheduledHostCallback = null;n } else {n // If there’s more work, schedule the next message event at the endn // of the preceding one.n port.postMessage(null);n }n } catch (error) {n // If a scheduler task throws, exit the current browser task so then // error can be observed.n port.postMessage(null);n throw error;n }n } else {n isMessageLoopRunning = false;n } // Yielding to the browser will give it a chance to paint, so we cann };nn var channel = new MessageChannel();n var port = channel.port2;n channel.port1.onmessage = performWorkUntilDeadline;nn requestHostCallback = function (callback) {n scheduledHostCallback = callback;nn if (!isMessageLoopRunning) {n isMessageLoopRunning = true;n port.postMessage(null);n }n };nn requestHostTimeout = function (callback, ms) {n taskTimeoutID = _setTimeout(function () {n callback(exports.unstable_now());n }, ms);n };nn cancelHostTimeout = function () {n _clearTimeout(taskTimeoutID);nn taskTimeoutID = -1;n };n}nnfunction push(heap, node) {n var index = heap.length;n heap.push(node);n siftUp(heap, node, index);n}nfunction peek(heap) {n var first = heap[0];n return first === undefined ? null : first;n}nfunction pop(heap) {n var first = heap[0];nn if (first !== undefined) {n var last = heap.pop();nn if (last !== first) {n heap[0] = last;n siftDown(heap, last, 0);n }nn return first;n } else {n return null;n }n}nnfunction siftUp(heap, node, i) {n var index = i;nn while (true) {n var parentIndex = index – 1 >>> 1;n var parent = heap[parentIndex];nn if (parent !== undefined && compare(parent, node) > 0) {n // The parent is larger. Swap positions.n heap[parentIndex] = node;n heap[index] = parent;n index = parentIndex;n } else {n // The parent is smaller. Exit.n return;n }n }n}nnfunction siftDown(heap, node, i) {n var index = i;n var length = heap.length;nn while (index eventLogSize) {n eventLogSize *= 2;nn if (eventLogSize > MAX_EVENT_LOG_SIZE) {n // Using console[‚error‘] to evade Babel and ESLintn console[‚error‘](„Scheduler Profiling: Event log exceeded maximum size. Don’t “ + ‚forget to call `stopLoggingProfilingEvents()`.‘);n stopLoggingProfilingEvents();n return;n }nn var newEventLog = new Int32Array(eventLogSize * 4);n newEventLog.set(eventLog);n eventLogBuffer = newEventLog.buffer;n eventLog = newEventLog;n }nn eventLog.set(entries, offset);n }n}nnfunction startLoggingProfilingEvents() {n eventLogSize = INITIAL_EVENT_LOG_SIZE;n eventLogBuffer = new ArrayBuffer(eventLogSize * 4);n eventLog = new Int32Array(eventLogBuffer);n eventLogIndex = 0;n}nfunction stopLoggingProfilingEvents() {n var buffer = eventLogBuffer;n eventLogSize = 0;n eventLogBuffer = null;n eventLog = null;n eventLogIndex = 0;n return buffer;n}nfunction markTaskStart(task, ms) {n {n profilingState[QUEUE_SIZE]++;nn if (eventLog !== null) {n // performance.now returns a float, representing milliseconds. When then // event is logged, it’s coerced to an int. Convert to microseconds ton // maintain extra degrees of precision.n logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);n }n }n}nfunction markTaskCompleted(task, ms) {n {n profilingState[PRIORITY] = NoPriority;n profilingState[CURRENT_TASK_ID] = 0;n profilingState[QUEUE_SIZE]–;nn if (eventLog !== null) {n logEvent([TaskCompleteEvent, ms * 1000, task.id]);n }n }n}nfunction markTaskCanceled(task, ms) {n {n profilingState[QUEUE_SIZE]–;nn if (eventLog !== null) {n logEvent([TaskCancelEvent, ms * 1000, task.id]);n }n }n}nfunction markTaskErrored(task, ms) {n {n profilingState[PRIORITY] = NoPriority;n profilingState[CURRENT_TASK_ID] = 0;n profilingState[QUEUE_SIZE]–;nn if (eventLog !== null) {n logEvent([TaskErrorEvent, ms * 1000, task.id]);n }n }n}nfunction markTaskRun(task, ms) {n {n runIdCounter++;n profilingState[PRIORITY] = task.priorityLevel;n profilingState[CURRENT_TASK_ID] = task.id;n profilingState[CURRENT_RUN_ID] = runIdCounter;nn if (eventLog !== null) {n logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);n }n }n}nfunction markTaskYield(task, ms) {n {n profilingState[PRIORITY] = NoPriority;n profilingState[CURRENT_TASK_ID] = 0;n profilingState[CURRENT_RUN_ID] = 0;nn if (eventLog !== null) {n logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);n }n }n}nfunction markSchedulerSuspended(ms) {n {n mainThreadIdCounter++;nn if (eventLog !== null) {n logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);n }n }n}nfunction markSchedulerUnsuspended(ms) {n {n if (eventLog !== null) {n logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);n }n }n}nn/* eslint-disable no-var */n// Math.pow(2, 30) – 1n// 0b111111111111111111111111111111nnvar maxSigned31BitInt = 1073741823; // Times out immediatelynnvar IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times outnnvar USER_BLOCKING_PRIORITY = 250;nvar NORMAL_PRIORITY_TIMEOUT = 5000;nvar LOW_PRIORITY_TIMEOUT = 10000; // Never times outnnvar IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heapnnvar taskQueue = [];nvar timerQueue = []; // Incrementing id counter. Used to maintain insertion order.nnvar taskIdCounter = 1; // Pausing the scheduler is useful for debugging.nvar currentTask = null;nvar currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.nnvar isPerformingWork = false;nvar isHostCallbackScheduled = false;nvar isHostTimeoutScheduled = false;nnfunction advanceTimers(currentTime) {n // Check for tasks that are no longer delayed and add them to the queue.n var timer = peek(timerQueue);nn while (timer !== null) {n if (timer.callback === null) {n // Timer was cancelled.n pop(timerQueue);n } else if (timer.startTime currentTime && (!hasTimeRemaining || shouldYieldToHost())) {n // This currentTask hasn’t expired, and we’ve reached the deadline.n break;n }nn var callback = currentTask.callback;nn if (callback !== null) {n currentTask.callback = null;n currentPriorityLevel = currentTask.priorityLevel;n var didUserCallbackTimeout = currentTask.expirationTime 0) {n startTime = currentTime + delay;n } else {n startTime = currentTime;n }nn timeout = typeof options.timeout === ’number‘ ? options.timeout : timeoutForPriorityLevel(priorityLevel);n } else {n timeout = timeoutForPriorityLevel(priorityLevel);n startTime = currentTime;n }nn var expirationTime = startTime + timeout;n var newTask = {n id: taskIdCounter++,n callback: callback,n priorityLevel: priorityLevel,n startTime: startTime,n expirationTime: expirationTime,n sortIndex: -1n };nn {n newTask.isQueued = false;n }nn if (startTime > currentTime) {n // This is a delayed task.n newTask.sortIndex = startTime;n push(timerQueue, newTask);nn if (peek(taskQueue) === null && newTask === peek(timerQueue)) {n // All tasks are delayed, and this is the task with the earliest delay.n if (isHostTimeoutScheduled) {n // Cancel an existing timeout.n cancelHostTimeout();n } else {n isHostTimeoutScheduled = true;n } // Schedule a timeout.nnn requestHostTimeout(handleTimeout, startTime – currentTime);n }n } else {n newTask.sortIndex = expirationTime;n push(taskQueue, newTask);nn {n markTaskStart(newTask, currentTime);n newTask.isQueued = true;n } // Schedule a host callback, if needed. If we’re already performing work,n // wait until the next time we yield.nnn if (!isHostCallbackScheduled && !isPerformingWork) {n isHostCallbackScheduled = true;n requestHostCallback(flushWork);n }n }nn return newTask;n}nnfunction unstable_pauseExecution() {n}nnfunction unstable_continueExecution() {nn if (!isHostCallbackScheduled && !isPerformingWork) {n isHostCallbackScheduled = true;n requestHostCallback(flushWork);n }n}nnfunction unstable_getFirstCallbackNode() {n return peek(taskQueue);n}nnfunction unstable_cancelCallback(task) {n {n if (task.isQueued) {n var currentTime = exports.unstable_now();n markTaskCanceled(task, currentTime);n task.isQueued = false;n }n } // Null out the callback to indicate the task has been canceled. (Can’tn // remove from the queue because you can’t remove arbitrary nodes from ann // array based heap, only the first one.)nnn task.callback = null;n}nnfunction unstable_getCurrentPriorityLevel() {n return currentPriorityLevel;n}nnfunction unstable_shouldYield() {n var currentTime = exports.unstable_now();n advanceTimers(currentTime);n var firstTask = peek(taskQueue);n return firstTask !== currentTask && currentTask !== null && firstTask !== null && firstTask.callback !== null && firstTask.startTime 1 ? _len – 1 : 0), _key = 1; _key 1 ? _len2 – 1 : 0), _key2 = 1; _key2 1) {n var childArray = Array(childrenLength);nn for (var i = 0; i 1) {n var childArray = Array(childrenLength);nn for (var i = 0; i is not supported and will be removed in ‚ + ‚a future major release. Did you mean to render instead?‘);n }nn return context.Provider;n },n set: function (_Provider) {n context.Provider = _Provider;n }n },n _currentValue: {n get: function () {n return context._currentValue;n },n set: function (_currentValue) {n context._currentValue = _currentValue;n }n },n _currentValue2: {n get: function () {n return context._currentValue2;n },n set: function (_currentValue2) {n context._currentValue2 = _currentValue2;n }n },n _threadCount: {n get: function () {n return context._threadCount;n },n set: function (_threadCount) {n context._threadCount = _threadCount;n }n },n Consumer: {n get: function () {n if (!hasWarnedAboutUsingNestedContextConsumers) {n hasWarnedAboutUsingNestedContextConsumers = true;nn error(‚Rendering is not supported and will be removed in ‚ + ‚a future major release. Did you mean to render instead?‘);n }nn return context.Consumer;n }n },n displayName: {n get: function () {n return context.displayName;n },n set: function (displayName) {n if (!hasWarnedAboutDisplayNameOnConsumer) {n warn(‚Setting `displayName` on Context.Consumer has no effect. ‚ + „You should set it directly on the context with Context.displayName = ‚%s‘.“, displayName);nn hasWarnedAboutDisplayNameOnConsumer = true;n }n }n }n }); // $FlowFixMe: Flow complains about missing properties because it doesn’t understand definePropertynn context.Consumer = Consumer;n }nn {n context._currentRenderer = null;n context._currentRenderer2 = null;n }nn return context;n}nnvar Uninitialized = -1;nvar Pending = 0;nvar Resolved = 1;nvar Rejected = 2;nnfunction lazyInitializer(payload) {n if (payload._status === Uninitialized) {n var ctor = payload._result;n var thenable = ctor(); // Transition to the next state.nn var pending = payload;n pending._status = Pending;n pending._result = thenable;n thenable.then(function (moduleObject) {n if (payload._status === Pending) {n var defaultExport = moduleObject.default;nn {n if (defaultExport === undefined) {n error(‚lazy: Expected the result of a dynamic import() call. ‚ + ‚Instead received: %s\n\nYour code should look like: \n ‚ + // Break up imports to avoid accidentally parsing them as dependencies.n ‚const MyComponent = lazy(() => imp‘ + „ort(‚./MyComponent‘))“, moduleObject);n }n } // Transition to the next state.nnn var resolved = payload;n resolved._status = Resolved;n resolved._result = defaultExport;n }n }, function (error) {n if (payload._status === Pending) {n // Transition to the next state.n var rejected = payload;n rejected._status = Rejected;n rejected._result = error;n }n });n }nn if (payload._status === Resolved) {n return payload._result;n } else {n throw payload._result;n }n}nnfunction lazy(ctor) {n var payload = {n // We use these fields to store the result.n _status: -1,n _result: ctorn };n var lazyType = {n $$typeof: REACT_LAZY_TYPE,n _payload: payload,n _init: lazyInitializern };nn {n // In production, this would just set it on the object.n var defaultProps;n var propTypes; // $FlowFixMenn Object.defineProperties(lazyType, {n defaultProps: {n configurable: true,n get: function () {n return defaultProps;n },n set: function (newDefaultProps) {n error(‚React.lazy(…): It is not supported to assign `defaultProps` to ‚ + ‚a lazy component import. Either specify them where the component ‚ + ‚is defined, or create a wrapping component around it.‘);nn defaultProps = newDefaultProps; // Match production behavior more closely:n // $FlowFixMenn Object.defineProperty(lazyType, ‚defaultProps‘, {n enumerable: truen });n }n },n propTypes: {n configurable: true,n get: function () {n return propTypes;n },n set: function (newPropTypes) {n error(‚React.lazy(…): It is not supported to assign `propTypes` to ‚ + ‚a lazy component import. Either specify them where the component ‚ + ‚is defined, or create a wrapping component around it.‘);nn propTypes = newPropTypes; // Match production behavior more closely:n // $FlowFixMenn Object.defineProperty(lazyType, ‚propTypes‘, {n enumerable: truen });n }n }n });n }nn return lazyType;n}nnfunction forwardRef(render) {n {n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {n error(‚forwardRef requires a render function but received a `memo` ‚ + ‚component. Instead of forwardRef(memo(…)), use ‚ + ‚memo(forwardRef(…)).‘);n } else if (typeof render !== ‚function‘) {n error(‚forwardRef requires a render function but was given %s.‘, render === null ? ’null‘ : typeof render);n } else {n if (render.length !== 0 && render.length !== 2) {n error(‚forwardRef render functions accept exactly two parameters: props and ref. %s‘, render.length === 1 ? ‚Did you forget to use the ref parameter?‘ : ‚Any additional parameter will be undefined.‘);n }n }nn if (render != null) {n if (render.defaultProps != null || render.propTypes != null) {n error(‚forwardRef render functions do not support propTypes or defaultProps. ‚ + ‚Did you accidentally pass a React component?‘);n }n }n }nn var elementType = {n $$typeof: REACT_FORWARD_REF_TYPE,n render: rendern };nn {n var ownName;n Object.defineProperty(elementType, ‚displayName‘, {n enumerable: false,n configurable: true,n get: function () {n return ownName;n },n set: function (name) {n ownName = name;nn if (render.displayName == null) {n render.displayName = name;n }n }n });n }nn return elementType;n}nn// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.nnvar enableScopeAPI = false; // Experimental Create Event Handle API.nnfunction isValidElementType(type) {n if (typeof type === ’string‘ || typeof type === ‚function‘) {n return true;n } // Note: typeof might be other than ’symbol‘ or ’number‘ (e.g. if it’s a polyfill).nnn if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {n return true;n }nn if (typeof type === ‚object‘ && type !== null) {n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {n return true;n }n }nn return false;n}nnfunction memo(type, compare) {n {n if (!isValidElementType(type)) {n error(‚memo: The first argument must be a component. Instead ‚ + ‚received: %s‘, type === null ? ’null‘ : typeof type);n }n }nn var elementType = {n $$typeof: REACT_MEMO_TYPE,n type: type,n compare: compare === undefined ? null : comparen };nn {n var ownName;n Object.defineProperty(elementType, ‚displayName‘, {n enumerable: false,n configurable: true,n get: function () {n return ownName;n },n set: function (name) {n ownName = name;nn if (type.displayName == null) {n type.displayName = name;n }n }n });n }nn return elementType;n}nnfunction resolveDispatcher() {n var dispatcher = ReactCurrentDispatcher.current;nn if (!(dispatcher !== null)) {n {n throw Error( „Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.“ );n }n }nn return dispatcher;n}nnfunction useContext(Context, unstable_observedBits) {n var dispatcher = resolveDispatcher();nn {n if (unstable_observedBits !== undefined) {n error(‚useContext() second argument is reserved for future ‚ + ‚use in React. Passing it is not supported. ‚ + ‚You passed: %s.%s‘, unstable_observedBits, typeof unstable_observedBits === ’number‘ && Array.isArray(arguments[2]) ? ‚\n\nDid you call array.map(useContext)? ‚ + ‚Calling Hooks inside a loop is not supported. ‚ + ‚Learn more at https://reactjs.org/link/rules-of-hooks‘ : “);n } // TODO: add a more generic warning for invalid values.nnn if (Context._context !== undefined) {n var realContext = Context._context; // Don’t deduplicate because this legitimately causes bugsn // and nobody should be using this in existing code.nn if (realContext.Consumer === Context) {n error(‚Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ‚ + ‚removed in a future major release. Did you mean to call useContext(Context) instead?‘);n } else if (realContext.Provider === Context) {n error(‚Calling useContext(Context.Provider) is not supported. ‚ + ‚Did you mean to call useContext(Context) instead?‘);n }n }n }nn return dispatcher.useContext(Context, unstable_observedBits);n}nfunction useState(initialState) {n var dispatcher = resolveDispatcher();n return dispatcher.useState(initialState);n}nfunction useReducer(reducer, initialArg, init) {n var dispatcher = resolveDispatcher();n return dispatcher.useReducer(reducer, initialArg, init);n}nfunction useRef(initialValue) {n var dispatcher = resolveDispatcher();n return dispatcher.useRef(initialValue);n}nfunction useEffect(create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useEffect(create, deps);n}nfunction useLayoutEffect(create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useLayoutEffect(create, deps);n}nfunction useCallback(callback, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useCallback(callback, deps);n}nfunction useMemo(create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useMemo(create, deps);n}nfunction useImperativeHandle(ref, create, deps) {n var dispatcher = resolveDispatcher();n return dispatcher.useImperativeHandle(ref, create, deps);n}nfunction useDebugValue(value, formatterFn) {n {n var dispatcher = resolveDispatcher();n return dispatcher.useDebugValue(value, formatterFn);n }n}nn// Helpers to patch console.logs to avoid logging during side-effect freen// replaying on render function. This currently only patches the objectn// lazily which won’t cover if the log function was extracted eagerly.n// We could also eagerly patch the method.nvar disabledDepth = 0;nvar prevLog;nvar prevInfo;nvar prevWarn;nvar prevError;nvar prevGroup;nvar prevGroupCollapsed;nvar prevGroupEnd;nnfunction disabledLog() {}nndisabledLog.__reactDisabledLog = true;nfunction disableLogs() {n {n if (disabledDepth === 0) {n /* eslint-disable react-internal/no-production-logging */n prevLog = console.log;n prevInfo = console.info;n prevWarn = console.warn;n prevError = console.error;n prevGroup = console.group;n prevGroupCollapsed = console.groupCollapsed;n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099nn var props = {n configurable: true,n enumerable: true,n value: disabledLog,n writable: truen }; // $FlowFixMe Flow thinks console is immutable.nn Object.defineProperties(console, {n info: props,n log: props,n warn: props,n error: props,n group: props,n groupCollapsed: props,n groupEnd: propsn });n /* eslint-enable react-internal/no-production-logging */n }nn disabledDepth++;n }n}nfunction reenableLogs() {n {n disabledDepth–;nn if (disabledDepth === 0) {n /* eslint-disable react-internal/no-production-logging */n var props = {n configurable: true,n enumerable: true,n writable: truen }; // $FlowFixMe Flow thinks console is immutable.nn Object.defineProperties(console, {n log: _assign({}, props, {n value: prevLogn }),n info: _assign({}, props, {n value: prevInfon }),n warn: _assign({}, props, {n value: prevWarnn }),n error: _assign({}, props, {n value: prevErrorn }),n group: _assign({}, props, {n value: prevGroupn }),n groupCollapsed: _assign({}, props, {n value: prevGroupCollapsedn }),n groupEnd: _assign({}, props, {n value: prevGroupEndn })n });n /* eslint-enable react-internal/no-production-logging */n }nn if (disabledDepth = 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {n // We expect at least one stack frame to be shared.n // Typically this will be the root most one. However, stack frames may ben // cut off due to maximum stack limits. In this case, one maybe cut offn // earlier than the other. We assume that the sample is longer or the samen // and there for cut off earlier. So we should find the root most frame inn // the sample somewhere in the control.n c–;n }nn for (; s >= 1 && c >= 0; s–, c–) {n // Next we find the first one that isn’t the same which should be then // frame that called our sample function and the control.n if (sampleLines[s] !== controlLines[c]) {n // In V8, the first line is describing the message but other VMs don’t.n // If we’re about to return the first line, and the control is also on the samen // line, that’s a pretty good indicator that our sample threw at same line asn // the control. I.e. before we entered the sample frame. So we ignore this result.n // This can happen if you passed a class to function component, or non-function.n if (s !== 1 || c !== 1) {n do {n s–;n c–; // We may still have similar intermediate frames from the construct call.n // The next one that isn’t the same should be our match though.nn if (c = 1 && c >= 0);n }nn break;n }n }n }n } finally {n reentry = false;nn {n ReactCurrentDispatcher$1.current = previousDispatcher;n reenableLogs();n }nn Error.prepareStackTrace = previousPrepareStackTrace;n } // Fallback to just using the name if we couldn’t make it throw.nnn var name = fn ? fn.displayName || fn.name : “;n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : “;nn {n if (typeof fn === ‚function‘) {n componentFrameCache.set(fn, syntheticFrame);n }n }nn return syntheticFrame;n}nfunction describeFunctionComponentFrame(fn, source, ownerFn) {n {n return describeNativeComponentFrame(fn, false);n }n}nnfunction shouldConstruct(Component) {n var prototype = Component.prototype;n return !!(prototype && prototype.isReactComponent);n}nnfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {nn if (type == null) {n return “;n }nn if (typeof type === ‚function‘) {n {n return describeNativeComponentFrame(type, shouldConstruct(type));n }n }nn if (typeof type === ’string‘) {n return describeBuiltInComponentFrame(type);n }nn switch (type) {n case exports.Suspense:n return describeBuiltInComponentFrame(‚Suspense‘);nn case REACT_SUSPENSE_LIST_TYPE:n return describeBuiltInComponentFrame(‚SuspenseList‘);n }nn if (typeof type === ‚object‘) {n switch (type.$$typeof) {n case REACT_FORWARD_REF_TYPE:n return describeFunctionComponentFrame(type.render);nn case REACT_MEMO_TYPE:n // Memo may contain any component type so we recursively resolve it.n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);nn case REACT_BLOCK_TYPE:n return describeFunctionComponentFrame(type._render);nn case REACT_LAZY_TYPE:n {n var lazyComponent = type;n var payload = lazyComponent._payload;n var init = lazyComponent._init;nn try {n // Lazy may contain any component type so we recursively resolve it.n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);n } catch (x) {}n }n }n }nn return “;n}nnvar loggedTypeFailures = {};nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;nnfunction setCurrentlyValidatingElement(element) {n {n if (element) {n var owner = element._owner;n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);n } else {n ReactDebugCurrentFrame$1.setExtraStackFrame(null);n }n }n}nnfunction checkPropTypes(typeSpecs, values, location, componentName, element) {n {n // $FlowFixMe This is okay but Flow doesn’t know it.n var has = Function.call.bind(Object.prototype.hasOwnProperty);nn for (var typeSpecName in typeSpecs) {n if (has(typeSpecs, typeSpecName)) {n var error$1 = void 0; // Prop type validation may throw. In case they do, we don’t want ton // fail the render phase where it didn’t fail before. So we log it.n // After these have been cleaned up, we’ll let them throw.nn try {n // This is intentionally an invariant that gets caught. It’s the samen // behavior as without this statement except with a better message.n if (typeof typeSpecs[typeSpecName] !== ‚function‘) {n var err = Error((componentName || ‚React class‘) + ‚: ‚ + location + ‚ type `‘ + typeSpecName + ‚` is invalid; ‚ + ‚it must be a function, usually from the `prop-types` package, but received `‘ + typeof typeSpecs[typeSpecName] + ‚`.‘ + ‚This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.‘);n err.name = ‚Invariant Violation‘;n throw err;n }nn error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ‚SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED‘);n } catch (ex) {n error$1 = ex;n }nn if (error$1 && !(error$1 instanceof Error)) {n setCurrentlyValidatingElement(element);nn error(‚%s: type specification of %s‘ + ‚ `%s` is invalid; the type checker ‚ + ‚function must return `null` or an `Error` but returned a %s. ‚ + ‚You may have forgotten to pass an argument to the type checker ‚ + ‚creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ‚ + ’shape all require an argument).‘, componentName || ‚React class‘, location, typeSpecName, typeof error$1);nn setCurrentlyValidatingElement(null);n }nn if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {n // Only monitor this failure once because there tends to be a lot of then // same error.n loggedTypeFailures[error$1.message] = true;n setCurrentlyValidatingElement(element);nn error(‚Failed %s type: %s‘, location, error$1.message);nn setCurrentlyValidatingElement(null);n }n }n }n }n}nnfunction setCurrentlyValidatingElement$1(element) {n {n if (element) {n var owner = element._owner;n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);n setExtraStackFrame(stack);n } else {n setExtraStackFrame(null);n }n }n}nnvar propTypesMisspellWarningShown;nn{n propTypesMisspellWarningShown = false;n}nnfunction getDeclarationErrorAddendum() {n if (ReactCurrentOwner.current) {n var name = getComponentName(ReactCurrentOwner.current.type);nn if (name) {n return ‚\n\nCheck the render method of `‘ + name + ‚`.‘;n }n }nn return “;n}nnfunction getSourceInfoErrorAddendum(source) {n if (source !== undefined) {n var fileName = source.fileName.replace(/^.*[\\\/]/, “);n var lineNumber = source.lineNumber;n return ‚\n\nCheck your code at ‚ + fileName + ‚:‘ + lineNumber + ‚.‘;n }nn return “;n}nnfunction getSourceInfoErrorAddendumForProps(elementProps) {n if (elementProps !== null && elementProps !== undefined) {n return getSourceInfoErrorAddendum(elementProps.__source);n }nn return “;n}n/**n * Warn if there’s no key explicitly set on dynamic arrays of children orn * object keys are not valid. This allows us to keep track of children betweenn * updates.n */nnnvar ownerHasKeyUseWarning = {};nnfunction getCurrentComponentErrorInfo(parentType) {n var info = getDeclarationErrorAddendum();nn if (!info) {n var parentName = typeof parentType === ’string‘ ? parentType : parentType.displayName || parentType.name;nn if (parentName) {n info = „\n\nCheck the top-level render call using .“;n }n }nn return info;n}n/**n * Warn if the element doesn’t have an explicit key assigned to it.n * This element is in an array. The array could grow and shrink or ben * reordered. All children that haven’t already been validated are required ton * have a „key“ property assigned to it. Error statuses are cached so a warningn * will only be shown once.n *n * @internaln * @param {ReactElement} element Element that requires a key.n * @param {*} parentType element’s parent’s type.n */nnnfunction validateExplicitKey(element, parentType) {n if (!element._store || element._store.validated || element.key != null) {n return;n }nn element._store.validated = true;n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);nn if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {n return;n }nn ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as an // property, it may be the creator of the child that’s responsible forn // assigning it a key.nn var childOwner = “;nn if (element && element._owner && element._owner !== ReactCurrentOwner.current) {n // Give the component that originally created this child.n childOwner = “ It was passed a child from “ + getComponentName(element._owner.type) + „.“;n }nn {n setCurrentlyValidatingElement$1(element);nn error(‚Each child in a list should have a unique „key“ prop.‘ + ‚%s%s See https://reactjs.org/link/warning-keys for more information.‘, currentComponentErrorInfo, childOwner);nn setCurrentlyValidatingElement$1(null);n }n}n/**n * Ensure that every element either is passed in a static location, in ann * array with an explicit keys property defined, or in an object literaln * with valid key property.n *n * @internaln * @param {ReactNode} node Statically passed child of any type.n * @param {*} parentType node’s parent’s type.n */nnnfunction validateChildKeys(node, parentType) {n if (typeof node !== ‚object‘) {n return;n }nn if (Array.isArray(node)) {n for (var i = 0; i „;n info = ‚ Did you accidentally export a JSX literal instead of a component?‘;n } else {n typeString = typeof type;n }nn {n error(‚React.createElement: type is invalid — expected a string (for ‚ + ‚built-in components) or a class/function (for composite ‚ + ‚components) but got: %s.%s‘, typeString, info);n }n }nn var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.n // TODO: Drop this when these are no longer allowed as the type argument.nn if (element == null) {n return element;n } // Skip key warning if the type isn’t valid since our key validation logicn // doesn’t expect a non-string/function type and can throw confusing errors.n // We don’t want exception behavior to differ between dev and prod.n // (Rendering will throw with a helpful message and as soon as the type isn // fixed, the key warnings will appear.)nnn if (validType) {n for (var i = 2; i 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;nn var interaction = {n __count: 1,n id: interactionIDCounter++,n name: name,n timestamp: timestampn };n var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.n // To do that, clone the current interactions.n // The previous set will be restored upon completion.nn var interactions = new Set(prevInteractions);n interactions.add(interaction);n exports.__interactionsRef.current = interactions;n var subscriber = exports.__subscriberRef.current;n var returnValue;nn try {n if (subscriber !== null) {n subscriber.onInteractionTraced(interaction);n }n } finally {n try {n if (subscriber !== null) {n subscriber.onWorkStarted(interactions, threadID);n }n } finally {n try {n returnValue = callback();n } finally {n exports.__interactionsRef.current = prevInteractions;nn try {n if (subscriber !== null) {n subscriber.onWorkStopped(interactions, threadID);n }n } finally {n interaction.__count–; // If no async work was scheduled for this interaction,n // Notify subscribers that it’s completed.nn if (subscriber !== null && interaction.__count === 0) {n subscriber.onInteractionScheduledWorkCompleted(interaction);n }n }n }n }n }nn return returnValue;n}nfunction unstable_wrap(callback) {n var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;nn var wrappedInteractions = exports.__interactionsRef.current;n var subscriber = exports.__subscriberRef.current;nn if (subscriber !== null) {n subscriber.onWorkScheduled(wrappedInteractions, threadID);n } // Update the pending async work count for the current interactions.n // Update after calling subscribers in case of error.nnn wrappedInteractions.forEach(function (interaction) {n interaction.__count++;n });n var hasRun = false;nn function wrapped() {n var prevInteractions = exports.__interactionsRef.current;n exports.__interactionsRef.current = wrappedInteractions;n subscriber = exports.__subscriberRef.current;nn try {n var returnValue;nn try {n if (subscriber !== null) {n subscriber.onWorkStarted(wrappedInteractions, threadID);n }n } finally {n try {n returnValue = callback.apply(undefined, arguments);n } finally {n exports.__interactionsRef.current = prevInteractions;nn if (subscriber !== null) {n subscriber.onWorkStopped(wrappedInteractions, threadID);n }n }n }nn return returnValue;n } finally {n if (!hasRun) {n // We only expect a wrapped function to be executed once,n // But in the event that it’s executed more than once–n // Only decrement the outstanding interaction counts once.n hasRun = true; // Update pending async counts for all wrapped interactions.n // If this was the last scheduled async work for any of them,n // Mark them as completed.nn wrappedInteractions.forEach(function (interaction) {n interaction.__count–;nn if (subscriber !== null && interaction.__count === 0) {n subscriber.onInteractionScheduledWorkCompleted(interaction);n }n });n }n }n }nn wrapped.cancel = function cancel() {n subscriber = exports.__subscriberRef.current;nn try {n if (subscriber !== null) {n subscriber.onWorkCanceled(wrappedInteractions, threadID);n }n } finally {n // Update pending async counts for all wrapped interactions.n // If this was the last scheduled async work for any of them,n // Mark them as completed.n wrappedInteractions.forEach(function (interaction) {n interaction.__count–;nn if (subscriber && interaction.__count === 0) {n subscriber.onInteractionScheduledWorkCompleted(interaction);n }n });n }n };nn return wrapped;n}nnvar subscribers = null;nn{n subscribers = new Set();n}nnfunction unstable_subscribe(subscriber) {n {n subscribers.add(subscriber);nn if (subscribers.size === 1) {n exports.__subscriberRef.current = {n onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,n onInteractionTraced: onInteractionTraced,n onWorkCanceled: onWorkCanceled,n onWorkScheduled: onWorkScheduled,n onWorkStarted: onWorkStarted,n onWorkStopped: onWorkStoppedn };n }n }n}nfunction unstable_unsubscribe(subscriber) {n {n subscribers.delete(subscriber);nn if (subscribers.size === 0) {n exports.__subscriberRef.current = null;n }n }n}nnfunction onInteractionTraced(interaction) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onInteractionTraced(interaction);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onInteractionScheduledWorkCompleted(interaction) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onInteractionScheduledWorkCompleted(interaction);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkScheduled(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkScheduled(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkStarted(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkStarted(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkStopped(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkStopped(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnfunction onWorkCanceled(interactions, threadID) {n var didCatchError = false;n var caughtError = null;n subscribers.forEach(function (subscriber) {n try {n subscriber.onWorkCanceled(interactions, threadID);n } catch (error) {n if (!didCatchError) {n didCatchError = true;n caughtError = error;n }n }n });nn if (didCatchError) {n throw caughtError;n }n}nnexports.unstable_clear = unstable_clear;nexports.unstable_getCurrent = unstable_getCurrent;nexports.unstable_getThreadID = unstable_getThreadID;nexports.unstable_subscribe = unstable_subscribe;nexports.unstable_trace = unstable_trace;nexports.unstable_unsubscribe = unstable_unsubscribe;nexports.unstable_wrap = unstable_wrap;n })();n}nnn//////////////////n// WEBPACK FOOTERn// ./~/comments/~/scheduler/cjs/scheduler-tracing.development.jsn// module id = 91n// module chunks = 0n//# sourceURL=webpack:///./~/comments/~/scheduler/cjs/scheduler-tracing.development.js?“)},function(module,exports,__webpack_require__){eval(„/** @license React v0.20.2n * scheduler.development.jsn *n * Copyright (c) Facebook, Inc. and its affiliates.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict‘;nnif (true) {n (function() {n’use strict‘;nnvar enableSchedulerDebugging = false;nvar enableProfiling = false;nnvar requestHostCallback;nvar requestHostTimeout;nvar cancelHostTimeout;nvar requestPaint;nvar hasPerformanceNow = typeof performance === ‚object‘ && typeof performance.now === ‚function‘;nnif (hasPerformanceNow) {n var localPerformance = performance;nn exports.unstable_now = function () {n return localPerformance.now();n };n} else {n var localDate = Date;n var initialTime = localDate.now();nn exports.unstable_now = function () {n return localDate.now() – initialTime;n };n}nnif ( // If Scheduler runs in a non-DOM environment, it falls back to a naiven// implementation using setTimeout.ntypeof window === ‚undefined‘ || // Check if MessageChannel is supported, too.ntypeof MessageChannel !== ‚function‘) {n // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,n // fallback to a naive implementation.n var _callback = null;n var _timeoutID = null;nn var _flushCallback = function () {n if (_callback !== null) {n try {n var currentTime = exports.unstable_now();n var hasRemainingTime = true;nn _callback(hasRemainingTime, currentTime);nn _callback = null;n } catch (e) {n setTimeout(_flushCallback, 0);n throw e;n }n }n };nn requestHostCallback = function (cb) {n if (_callback !== null) {n // Protect against re-entrancy.n setTimeout(requestHostCallback, 0, cb);n } else {n _callback = cb;n setTimeout(_flushCallback, 0);n }n };nn requestHostTimeout = function (cb, ms) {n _timeoutID = setTimeout(cb, ms);n };nn cancelHostTimeout = function () {n clearTimeout(_timeoutID);n };nn exports.unstable_shouldYield = function () {n return false;n };nn requestPaint = exports.unstable_forceFrameRate = function () {};n} else {n // Capture local references to native APIs, in case a polyfill overrides them.n var _setTimeout = window.setTimeout;n var _clearTimeout = window.clearTimeout;nn if (typeof console !== ‚undefined‘) {n // TODO: Scheduler no longer requires these methods to be polyfilled. Butn // maybe we want to continue warning if they don’t exist, to preserve then // option to rely on it in the future?n var requestAnimationFrame = window.requestAnimationFrame;n var cancelAnimationFrame = window.cancelAnimationFrame;nn if (typeof requestAnimationFrame !== ‚function‘) {n // Using console[‚error‘] to evade Babel and ESLintn console[‚error‘](„This browser doesn’t support requestAnimationFrame. “ + ‚Make sure that you load a ‚ + ‚polyfill in older browsers. https://reactjs.org/link/react-polyfills‘);n }nn if (typeof cancelAnimationFrame !== ‚function‘) {n // Using console[‚error‘] to evade Babel and ESLintn console[‚error‘](„This browser doesn’t support cancelAnimationFrame. “ + ‚Make sure that you load a ‚ + ‚polyfill in older browsers. https://reactjs.org/link/react-polyfills‘);n }n }nn var isMessageLoopRunning = false;n var scheduledHostCallback = null;n var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the mainn // thread, like user events. By default, it yields multiple times per frame.n // It does not attempt to align with frame boundaries, since most tasks don’tn // need to be frame aligned; for those that do, use requestAnimationFrame.nn var yieldInterval = 5;n var deadline = 0; // TODO: Make this configurablenn {n // `isInputPending` is not available. Since we have no way of knowing ifn // there’s pending input, always yield at the end of the frame.n exports.unstable_shouldYield = function () {n return exports.unstable_now() >= deadline;n }; // Since we yield every frame regardless, `requestPaint` has no effect.nnn requestPaint = function () {};n }nn exports.unstable_forceFrameRate = function (fps) {n if (fps 125) {n // Using console[‚error‘] to evade Babel and ESLintn console[‚error‘](‚forceFrameRate takes a positive int between 0 and 125, ‚ + ‚forcing frame rates higher than 125 fps is not supported‘);n return;n }nn if (fps > 0) {n yieldInterval = Math.floor(1000 / fps);n } else {n // reset the frameraten yieldInterval = 5;n }n };nn var performWorkUntilDeadline = function () {n if (scheduledHostCallback !== null) {n var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsyncn // cycle. This means there’s always time remaining at the beginning ofn // the message event.nn deadline = currentTime + yieldInterval;n var hasTimeRemaining = true;nn try {n var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);nn if (!hasMoreWork) {n isMessageLoopRunning = false;n scheduledHostCallback = null;n } else {n // If there’s more work, schedule the next message event at the endn // of the preceding one.n port.postMessage(null);n }n } catch (error) {n // If a scheduler task throws, exit the current browser task so then // error can be observed.n port.postMessage(null);n throw error;n }n } else {n isMessageLoopRunning = false;n } // Yielding to the browser will give it a chance to paint, so we cann };nn var channel = new MessageChannel();n var port = channel.port2;n channel.port1.onmessage = performWorkUntilDeadline;nn requestHostCallback = function (callback) {n scheduledHostCallback = callback;nn if (!isMessageLoopRunning) {n isMessageLoopRunning = true;n port.postMessage(null);n }n };nn requestHostTimeout = function (callback, ms) {n taskTimeoutID = _setTimeout(function () {n callback(exports.unstable_now());n }, ms);n };nn cancelHostTimeout = function () {n _clearTimeout(taskTimeoutID);nn taskTimeoutID = -1;n };n}nnfunction push(heap, node) {n var index = heap.length;n heap.push(node);n siftUp(heap, node, index);n}nfunction peek(heap) {n var first = heap[0];n return first === undefined ? null : first;n}nfunction pop(heap) {n var first = heap[0];nn if (first !== undefined) {n var last = heap.pop();nn if (last !== first) {n heap[0] = last;n siftDown(heap, last, 0);n }nn return first;n } else {n return null;n }n}nnfunction siftUp(heap, node, i) {n var index = i;nn while (true) {n var parentIndex = index – 1 >>> 1;n var parent = heap[parentIndex];nn if (parent !== undefined && compare(parent, node) > 0) {n // The parent is larger. Swap positions.n heap[parentIndex] = node;n heap[index] = parent;n index = parentIndex;n } else {n // The parent is smaller. Exit.n return;n }n }n}nnfunction siftDown(heap, node, i) {n var index = i;n var length = heap.length;nn while (index currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) {n // This currentTask hasn’t expired, and we’ve reached the deadline.n break;n }nn var callback = currentTask.callback;nn if (typeof callback === ‚function‘) {n currentTask.callback = null;n currentPriorityLevel = currentTask.priorityLevel;n var didUserCallbackTimeout = currentTask.expirationTime 0) {n startTime = currentTime + delay;n } else {n startTime = currentTime;n }n } else {n startTime = currentTime;n }nn var timeout;nn switch (priorityLevel) {n case ImmediatePriority:n timeout = IMMEDIATE_PRIORITY_TIMEOUT;n break;nn case UserBlockingPriority:n timeout = USER_BLOCKING_PRIORITY_TIMEOUT;n break;nn case IdlePriority:n timeout = IDLE_PRIORITY_TIMEOUT;n break;nn case LowPriority:n timeout = LOW_PRIORITY_TIMEOUT;n break;nn case NormalPriority:n default:n timeout = NORMAL_PRIORITY_TIMEOUT;n break;n }nn var expirationTime = startTime + timeout;n var newTask = {n id: taskIdCounter++,n callback: callback,n priorityLevel: priorityLevel,n startTime: startTime,n expirationTime: expirationTime,n sortIndex: -1n };nn if (startTime > currentTime) {n // This is a delayed task.n newTask.sortIndex = startTime;n push(timerQueue, newTask);nn if (peek(taskQueue) === null && newTask === peek(timerQueue)) {n // All tasks are delayed, and this is the task with the earliest delay.n if (isHostTimeoutScheduled) {n // Cancel an existing timeout.n cancelHostTimeout();n } else {n isHostTimeoutScheduled = true;n } // Schedule a timeout.nnn requestHostTimeout(handleTimeout, startTime – currentTime);n }n } else {n newTask.sortIndex = expirationTime;n push(taskQueue, newTask);n // wait until the next time we yield.nnn if (!isHostCallbackScheduled && !isPerformingWork) {n isHostCallbackScheduled = true;n requestHostCallback(flushWork);n }n }nn return newTask;n}nnfunction unstable_pauseExecution() {n}nnfunction unstable_continueExecution() {nn if (!isHostCallbackScheduled && !isPerformingWork) {n isHostCallbackScheduled = true;n requestHostCallback(flushWork);n }n}nnfunction unstable_getFirstCallbackNode() {n return peek(taskQueue);n}nnfunction unstable_cancelCallback(task) {n // remove from the queue because you can’t remove arbitrary nodes from ann // array based heap, only the first one.)nnn task.callback = null;n}nnfunction unstable_getCurrentPriorityLevel() {n return currentPriorityLevel;n}nnvar unstable_requestPaint = requestPaint;nvar unstable_Profiling = null;nnexports.unstable_IdlePriority = IdlePriority;nexports.unstable_ImmediatePriority = ImmediatePriority;nexports.unstable_LowPriority = LowPriority;nexports.unstable_NormalPriority = NormalPriority;nexports.unstable_Profiling = unstable_Profiling;nexports.unstable_UserBlockingPriority = UserBlockingPriority;nexports.unstable_cancelCallback = unstable_cancelCallback;nexports.unstable_continueExecution = unstable_continueExecution;nexports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;nexports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;nexports.unstable_next = unstable_next;nexports.unstable_pauseExecution = unstable_pauseExecution;nexports.unstable_requestPaint = unstable_requestPaint;nexports.unstable_runWithPriority = unstable_runWithPriority;nexports.unstable_scheduleCallback = unstable_scheduleCallback;nexports.unstable_wrapCallback = unstable_wrapCallback;n })();n}nnn//////////////////n// WEBPACK FOOTERn// ./~/comments/~/scheduler/cjs/scheduler.development.jsn// module id = 92n// module chunks = 0n//# sourceURL=webpack:///./~/comments/~/scheduler/cjs/scheduler.development.js?“)},[149,92],[150,91],function(module,exports,__webpack_require__){eval(„/**n * Module dependencies.n */nnvar type;ntry {n type = __webpack_require__(40);n} catch (_) {n type = __webpack_require__(40);n}nn/**n * Module exports.n */nnmodule.exports = clone;nn/**n * Clones objects.n *n * @param {Mixed} any objectn * @api publicn */nnfunction clone(obj){n switch (type(obj)) {n case ‚object‘:n var copy = {};n for (var key in obj) {n if (obj.hasOwnProperty(key)) {n copy[key] = clone(obj[key]);n }n }n return copy;nn case ‚array‘:n var copy = new Array(obj.length);n for (var i = 0, l = obj.length; i = duration;nn // completen if (done) {n this._from = this._to;n this._update(this._to);n this._done = true;n this.emit(‚end‘);n return this;n }nn // tweenn var from = this._from;n var to = this._to;n var curr = this._curr;n var fn = this._ease;n var p = (now – this._start) / duration;n var n = fn(p);nn // arrayn if (this.isArray) {n for (var i = 0; i 0 && t[t.length – 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] = 1, but got:“ + _batchSize);n }n }n /**n * 在队列中加入一个 job 并且排队执行n * @param jobn * @param batchExec 修改批量执行方法,默认是 Promise.all, 如果是批量同步任务也可以直接同时执行(比如修改dom)n */n JobQueue.prototype.enqueue = function (job) {n var _this = this;n this._queue.push(job);n if (this._queue.length >= this._batchSize) {n var jobs_1 = this._queue;n this._queue = [];n this._result = Promise.resolve(this._result).then(function () {n return _this._batchExec(jobs_1);n });n }n return job;n };n JobQueue.prototype.enqueueMany = function (jobs) {n var _this = this;n jobs.forEach(function (j) { return _this.enqueue(j); });n return jobs;n };n /**n * 类似 Promise.all/race,只不过是按照顺序执行 promises, 如果有一个报错则停止n * @param promisesn */n JobQueue.sync = function (promises) {n return __awaiter(this, void 0, void 0, function () {n var result, _i, _a, p, _b, _c;n return __generator(this, function (_d) {n switch (_d.label) {n case 0:n result = [];n _i = 0, _a = Array.from(promises);n _d.label = 1;n case 1:n if (!(_i = 0 ? __assign({}, params) : __assign({}, data);n _url = Object.keys(_data).reduce(function (r, k) {n if (_data[k] === undefined ||n _data[k] === null ||n (typeof (_data[k]) !== ’string‘ && typeof (_data[k]) !== ’number‘)) {n return r;n }n var reg = new RegExp(„:“ + k, ‚g‘);n if (!r.match(reg)) {n return r;n }n // remove kn var val = _data[k];n delete _data[k];n return r.replace(reg, val);n }, _url);n var _conf = __assign({}, conf);n _conf.url = _url;n if ([‚get‘, ‚delete‘].indexOf(_method) >= 0) {n _conf.params = _data;n }n else {n _conf.data = _data;n }n return _conf;n};nexports.restfulTransformInterceptor = restfulTransformInterceptor;n//# sourceMappingURL=restful-transform.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/dom/axios/interceptors/restful-transform.jsn// module id = 110n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/dom/axios/interceptors/restful-transform.js?“)},function(module,exports,__webpack_require__){eval(„“use strict“;nvar __importDefault = (this && this.__importDefault) || function (mod) {n return (mod && mod.__esModule) ? mod : { „default“: mod };n};nObject.defineProperty(exports, „__esModule“, { value: true });nexports.classNameBuilder = void 0;nvar classnames_1 = __importDefault(__webpack_require__(74));n/**n * 创建一个带前缀的 classnames, 返回一个功能和 classnames 完全一致但是每个类名会带一个前缀的 classnames, 可以通过在类名前加 ! 取消前缀n * @param prefixesn * @examplen *n * let cx = classNameBuilder(‚prefix1‘, ‚prefix2‘)n * cx(‚aa‘, ‚bb‘) // => `prefix1-prefix2-aa prefix1-prefix2-bb`n * cx(‚aa‘, ‚!bb‘) // => `prefix1-prefix2-aa bb`n */nfunction classNameBuilder() {n var prefixes = [];n for (var _i = 0; _i (this, ‚userInfo‘)n * }n * const ms = new MyStore()n * const userInfo = ms.userInfo.get()n * userInfo.name = ‚aa’n * ms.userInfo.set(userInfo)n * ms.userInfo.remove()n * „`n */nvar Kv = /** @class */ (function () {n function Kv() {n }n Kv.prototype.get = function (key, defaults) {n try {n var store = localStorage.getItem(key);n if (store) {n var meta = JSON.parse(store);n if (meta && meta.expire && Date.now() > meta.expire) {n this.remove(key);n return defaults;n }n return lang_1.defaults(meta.data, defaults);n }n return defaults;n }n catch (error) {n console.warn(„cannot get key:“ + key, error);n return defaults;n }n };n Kv.prototype.set = function (key, val, options) {n try {n localStorage.setItem(key, JSON.stringify(__assign(__assign({}, options), { data: val })));n return true;n }n catch (error) {n console.error(error);n return false;n }n };n Kv.prototype.remove = function (key) {n try {n localStorage.removeItem(key);n }n catch (error) {n console.error(error);n }n };n return Kv;n}());nexports.Kv = Kv;n/**n * 封装了 Kv 对于某个 key 的读写删操作,可以作为自定义Kv类的属性n */nvar Field = /** @class */ (function () {n function Field(_kv, _key, _defaults) {n this._kv = _kv;n this._key = _key;n this._defaults = _defaults;n }n Field.prototype.get = function (defaults) {n if (defaults === void 0) { defaults = this._defaults; }n return this._kv.get(this._key, defaults);n };n Field.prototype.set = function (val, options) {n return this._kv.set(this._key, val, options);n };n Field.prototype.remove = function () {n return this._kv.remove(this._key);n };n return Field;n}());nexports.Field = Field;n//# sourceMappingURL=kv.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/dom/kv.jsn// module id = 114n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/dom/kv.js?‘)},function(module,exports){eval(‚“use strict“;n// from https://github.com/g13n/ua.js/blob/master/src/ua.jsnObject.defineProperty(exports, „__esModule“, { value: true });nexports.UA = exports.isFrodoPre = exports.isMiniProgram = exports.isFrodo = exports.isMobile = exports.isAndroid = exports.isIphoneX = exports.isIOS = exports.isBaidu = exports.isXiaomi = exports.isWeibo = exports.isWeixin = void 0;nfunction test(pattern) {n var userAgent = navigator.userAgent || “;n return pattern.test(userAgent);n}nfunction detect(pattern) {n return function () {n return test(pattern);n };n}n/**n * 是否是微信环境(非企业微信)n */nvar isWeixin = function () { return test(/micromessenger/i) && !test(/wxwork/gi); };nexports.isWeixin = isWeixin;n/** 是否是微博环境 */nexports.isWeibo = detect(/weibo/i);n/** 是否是小米浏览器 */nexports.isXiaomi = detect(/xiaomi/i);n/** 是否是百度浏览器或者手机百度 */nexports.isBaidu = detect(/baiduboxapp|baidubrowser/i);n/** 是否是iOS */nexports.isIOS = detect(/iphone|ipad|ipod/i);n/** 是否是iPhoneX */nvar isIphoneX = function () {n return test(/iphone/i) && (screen.height === 812 && screen.width === 375);n};nexports.isIphoneX = isIphoneX;n/** 是否是Android */nexports.isAndroid = detect(/android/i);n/** 是否是移动端 */nexports.isMobile = detect(/(iphone|ipod|((?:android)?.*?mobile)|blackberrynokia)/i);n/** 是否是豆瓣 App */nexports.isFrodo = detect(/com\.douban\.frodo/i);n/** 是否是微信小程序 */nexports.isMiniProgram = detect(/miniprogram/i);n/** 是否是 pre 版 App */nexports.isFrodoPre = detect(/(com\.douban\.frodo\/[\d.]+(dev|debug|test|beta|alpha))|(com\.douban\.frodo\.test)/i);n/**n * UA 判断工具函数n */nexports.UA = {n isWeixin: exports.isWeixin,n isWeibo: exports.isWeibo,n isXiaomi: exports.isXiaomi,n isBaidu: exports.isBaidu,n isIOS: exports.isIOS,n isIphoneX: exports.isIphoneX,n isAndroid: exports.isAndroid,n isMobile: exports.isMobile,n isFrodo: exports.isFrodo,n isMiniProgram: exports.isMiniProgram,n isFrodoPre: exports.isFrodoPre,n};n//# sourceMappingURL=ua.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/dom/ua.jsn// module id = 115n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/dom/ua.js?‘)},function(module,exports,__webpack_require__){eval(„“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.deleteQuery = exports.setQuery = exports.getQueryAll = exports.getQuery = exports.compileUrl = void 0;nvar lang_1 = __webpack_require__(21);nvar lang_2 = __webpack_require__(21);n/**n * 针对 url 的解析/修改操作推荐使用新规范n * URLSearchParams / URL 对象,低版本兼容可以考虑使用 polyfill:n * https://www.npmjs.com/package/url-polyfilln */n/**n *n * @param urln * @param datan * @examplen *n * compileUrl(‚/category/:id‘,{id:277})n * => ‚/category/277’n *n * compileUrl(‚/category/:id?type=:type‘,{id:277, type: ‚movie‘})n * => ‚/category/277?type=movie’n */nvar compileUrl = function (url, data) {n url = url.replace(/(\/|=|\&|\?)\:([\w]+)/g, function (_, prefix, key) {n return prefix + (lang_1.isNil(data[key]) ? “ : data[key]);n });n return url;n};nexports.compileUrl = compileUrl;n/**n * URL 不支持简写的形式,这里把域名和协议都填上n * @param urln */nfunction normalizeUrl(url) {n if (!/^\w+:/.test(url)) {n if (/^\/\//.test(url)) {n return location.protocol + url;n }n else if (/^\/\w+/.test(url)) {n return location.origin + url;n }n }n return url;n}n/**n * 从 url 中解析出 query 对象, 如果 key 出现多次只返回第一次n * @param urln */nfunction getQuery(url) {n url = normalizeUrl(url);n var urlObj = new URL(url);n var query = {};n urlObj.searchParams.forEach(function (v, k) {n if (!(k in query)) {n query[k] = v;n }n });n return query;n}nexports.getQuery = getQuery;n/**n * 从 url 中解析出 query 对象, 如果 key 出现多次则返回一个字符串数组n * @param urln */nfunction getQueryAll(url) {n url = normalizeUrl(url);n var urlObj = new URL(url);n var query = {};n urlObj.searchParams.forEach(function (v, k) {n query[k] = query[k] || [];n query[k].push(v);n });n return query;n}nexports.getQueryAll = getQueryAll;nfunction setQuery(url, name, value) {n url = normalizeUrl(url);n var urlObj = new URL(url);n if (lang_1.isStr(name)) {n if (!lang_1.isEmpty(value)) {n urlObj.searchParams.set(name, String(value));n }n }n else {n for (var _i = 0, _a = Object.keys(name); _i {n * return val && val.trim()n * },n * message: ‚请填写名称’n * },n * index: {n * validator: (val) => {n * return val && /^\d+$/gi,n * },n * message: ‚请填写正确的索引值’n * }n * }n * validate(formData, rules)n */nfunction validate(formData, rules) {n var result = true;n var error = “;n var key = “;n for (var k in rules) {n var rule = rules[k];n if (rule) {n var val = formData[k];n var validator = rule.validator;n var _validator = typeof validator === ’string‘ ? HELPERS[validator] : validator;n var r = _validator(val);n if (!r) {n result = false;n error = rule.message;n key = k;n return [result, key, error];n }n }n }n return [result, key, error];n}nexports.validate = validate;n//# sourceMappingURL=validate.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/dom/validate.jsn// module id = 117n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/dom/validate.js?“)},function(module,exports){eval(‚“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.uniqBy = exports.chunkBy = exports.groupBy = exports.flatten = exports.arrify = void 0;n/**n * 将一个元素变成只有一个元素的数组,如果该元素已经是数组则直接返回n * @param arrn * @examplen *n * arrify(1) // => [1]n * arrify([1]) // => [1]n */nfunction arrify(arr) {n if (Array.isArray(arr))n return arr;n return [arr];n}nexports.arrify = arrify;n/**n * 将一个嵌套数组扁平化一层,n * @param arrn * @examplen * flatten([[1], 2, 3]) // => [1, 2, 3]n * flatten([1, [2], 3]) // => [1, 2, 3]n * flatten([1, 2, 3]) // => [1, 2, 3]n *n */nfunction flatten(arr) {n var _a;n return (_a = []).concat.apply(_a, arr);n}nexports.flatten = flatten;n/**n * 将一个数组分组n *n * @param arrn * @param fnn * @examplen *n * groupBy([1, 2, 3, 4], t => t % 2) // => {0: [2, 4], 1: [1, 3]}n */nfunction groupBy(arr, fn) {n var group = {};n for (var i = 0; i 3) // => [[1,2,3],[4]]n *n */nfunction chunkBy(arr, count) {n if (arr.length = 0;n }n catch (error) {n return false;n }n})();n/**n * throw new errorn * orn * use console.error (in process.env.SILENCE=’1‘ | ‚true‘)n */nfunction errorLog(method, desc, filename) {n var text = method + „: “ + desc + „.“;n if (filename) {n text = text + “ in this file: “ + filename;n }n if (silence) {n console && console.error(text);n }n else {n throw new Error(text);n }n}nexports.errorLog = errorLog;n//# sourceMappingURL=error-log.js.mapn/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27)))nn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/error-log.jsn// module id = 120n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/error-log.js?‘)},function(module,exports){eval(‚“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.escapeRegExp = void 0;n// Adopted from lodash/escapeRegExp.jsn/**n * Used to match `RegExp`n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).n */nvar reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);n/**n * Escapes the `RegExp` special characters „^“, „$“, „\“, „.“, „*“, „+“,n * „?“, „(„, „)“, „[„, „]“, „{„, „}“, and „|“ in `string`.n *n * @param {string} [string=“] The string to escape.n * @returns {string} Returns the escaped string.n * @examplen *n * escapeRegExp(‚[lodash](https://lodash.com/)‘);n * // => ‚\[lodash\]\(https://lodash\.com/\)’n */nfunction escapeRegExp(string) {n return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, ‚\\$&‘) : string;n}nexports.escapeRegExp = escapeRegExp;n//# sourceMappingURL=escape-regexp.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/escape-regexp.jsn// module id = 121n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/escape-regexp.js?‘)},function(module,exports){eval(‚“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.hashStr = void 0;n// https://github.com/visionmedia/debug/blob/78ae6c94122a5c23263b6ea6def0d7ead474fc66/src/debug.js#L44n/**n * 简单快捷的hash算法n * @param strn */nfunction hashStr(str) {n var hash = 0;n for (var i = 0; i [0, 1, 2]n * range(-3) // => [1,2]n * range(1, 3) // => [1,2]n * range(1, 5, 2) // => [1,3,]n * range(1, 6, 2) // => [1,3,5]n */nfunction range(start, end, step) {n if (end === void 0) { end = NaN; }n if (step === void 0) { step = start 0) {n throw new TypeError(„step cannot greeter then 0: “ + step);n }n for (var i = start; i > end; i += step) {n result.push(i);n }n }n return result;n}nexports.range = range;n//# sourceMappingURL=range.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/range.jsn// module id = 123n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/range.js?‘)},function(module,exports){eval(‚“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.capitalize = exports.camelCase = void 0;n/**n * Foo Bar => FooBarn * foo-bar => fooBarn * –foo–bar => FooBarn * __foo__bar => FooBarn * @param namen */nfunction camelCase(name) {n var camelPattern = /[-_\s]+([a-zA-Z])/gi;n return namen .replace(camelPattern, function (_, c) { return c.toUpperCase(); });n}nexports.camelCase = camelCase;n/**n * 把单词变成首字母大写其余字母小写的形式n * @param strn */nfunction capitalize(str) {n return str[0].toUpperCase() + str.slice(1).toLowerCase();n}nexports.capitalize = capitalize;n//# sourceMappingURL=words.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/words.jsn// module id = 124n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/words.js?‘)},function(module,exports){eval(‚“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.createContainer = void 0;n/**n * create a containern * and append to bodyn * and return thisn **/nfunction createContainer(tag, root) {n if (tag === void 0) { tag = ‚div‘; }n if (root === void 0) { root = document.body; }n var container = document.createElement(tag);n root.appendChild(container);n return container;n}nexports.createContainer = createContainer;n//# sourceMappingURL=create-container.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/react/create-container.jsn// module id = 125n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/react/create-container.js?‘)},function(module,exports,__webpack_require__){eval(‚“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.getContainer = void 0;n/**n * 获取 react 组件实例的 dom 节点n * @param containern * @param defaultContainern */nfunction getContainer(container, defaultContainer) {n if (defaultContainer === void 0) { defaultContainer = document.body; }n var ReactDOM = __webpack_require__(47);n return ReactDOM.findDOMNode(container) || defaultContainer;n}nexports.getContainer = getContainer;n//# sourceMappingURL=get-container.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/react/get-container.jsn// module id = 126n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/react/get-container.js?‘)},function(module,exports,__webpack_require__){eval(‚“use strict“;nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {n if (k2 === undefined) k2 = k;n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });n}) : (function(o, m, k, k2) {n if (k2 === undefined) k2 = k;n o[k2] = m[k];n}));nvar __exportStar = (this && this.__exportStar) || function(m, exports) {n for (var p in m) if (p !== „default“ && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);n};nObject.defineProperty(exports, „__esModule“, { value: true });n__exportStar(__webpack_require__(126), exports);n__exportStar(__webpack_require__(125), exports);n__exportStar(__webpack_require__(128), exports);n//# sourceMappingURL=index.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/react/index.jsn// module id = 127n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/react/index.js?‘)},function(module,exports){eval(„“use strict“;nObject.defineProperty(exports, „__esModule“, { value: true });nexports.mountNode = void 0;n/**n * 创建 React 挂载 dom 节点n * @param selectorn * @param anchorn */nfunction mountNode(selector, anchor) {n if (anchor === void 0) { anchor = undefined; }n var node;n if (!selector) {n node = document.createElement(‚div‘);n document.body.appendChild(node);n return node;n }n if (typeof selector == ’string‘) {n node = document.querySelector(selector);n }n else {n node = selector;n }n var d = document.createElement(‚div‘);n switch (anchor) {n case ‚append‘:n node.appendChild(d);n return d;n case ‚before‘:n node.parentNode.insertBefore(d, node);n return d;n case ‚after‘:n if (node.nextSibling) {n node.parentNode.insertBefore(d, node.nextSibling);n }n else {n node.parentNode.appendChild(d);n }n return d;n }n return node;n}nexports.mountNode = mountNode;n;n//# sourceMappingURL=mount-node.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/react/mount-node.jsn// module id = 128n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/react/mount-node.js?“)},function(module,exports){eval(„exports.read = function (buffer, offset, isLE, mLen, nBytes) {n var e, mn var eLen = (nBytes * 8) – mLen – 1n var eMax = (1 > 1n var nBits = -7n var i = isLE ? (nBytes – 1) : 0n var d = isLE ? -1 : 1n var s = buffer[offset + i]nn i += dnn e = s & ((1 >= (-nBits)n nBits += eLenn for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}nn m = e & ((1 >= (-nBits)n nBits += mLenn for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}nn if (e === 0) {n e = 1 – eBiasn } else if (e === eMax) {n return m ? NaN : ((s ? -1 : 1) * Infinity)n } else {n m = m + Math.pow(2, mLen)n e = e – eBiasn }n return (s ? -1 : 1) * m * Math.pow(2, e – mLen)n}nnexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {n var e, m, cn var eLen = (nBytes * 8) – mLen – 1n var eMax = (1 > 1n var rt = (mLen === 23 ? Math.pow(2, -24) – Math.pow(2, -77) : 0)n var i = isLE ? 0 : (nBytes – 1)n var d = isLE ? 1 : -1n var s = value = 1) {n value += rt / cn } else {n value += rt * Math.pow(2, 1 – eBias)n }n if (value * c >= 2) {n e++n c /= 2n }nn if (e + eBias >= eMax) {n m = 0n e = eMaxn } else if (e + eBias >= 1) {n m = ((value * c) – 1) * Math.pow(2, mLen)n e = e + eBiasn } else {n m = value * Math.pow(2, eBias – 1) * Math.pow(2, mLen)n e = 0n }n }nn for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}nn e = (e 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}nn buffer[offset + i – d] |= s * 128n}nnn//////////////////n// WEBPACK FOOTERn// ./~/ieee754/index.jsn// module id = 129n// module chunks = 0n//# sourceURL=webpack:///./~/ieee754/index.js?“)},function(module,exports,__webpack_require__){eval(„/*!n * is-plain-object n *n * Copyright (c) 2014-2017, Jon Schlinkert.n * Released under the MIT License.n */nn’use strict‘;nnvar isObject = __webpack_require__(132);nnfunction isObjectObject(o) {n return isObject(o) === truen && Object.prototype.toString.call(o) === ‚[object Object]‘;n}nnmodule.exports = function isPlainObject(o) {n var ctor,prot;nn if (isObjectObject(o) === false) return false;nn // If has modified constructorn ctor = o.constructor;n if (typeof ctor !== ‚function‘) return false;nn // If has modified prototypen prot = ctor.prototype;n if (isObjectObject(prot) === false) return false;nn // If constructor does not have an Object-specific methodn if (prot.hasOwnProperty(‚isPrototypeOf‘) === false) {n return false;n }nn // Most likely a plain Objectn return true;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/is-plain-object/index.jsn// module id = 130n// module chunks = 0n//# sourceURL=webpack:///./~/is-plain-object/index.js?“)},function(module,exports){eval(„var toString = {}.toString;nnmodule.exports = Array.isArray || function (arr) {n return toString.call(arr) == ‚[object Array]‘;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/isarray/index.jsn// module id = 131n// module chunks = 0n//# sourceURL=webpack:///./~/isarray/index.js?“)},function(module,exports){eval(„/*!n * isobject n *n * Copyright (c) 2014-2017, Jon Schlinkert.n * Released under the MIT License.n */nn’use strict‘;nnmodule.exports = function isObject(val) {n return val != null && typeof val === ‚object‘ && Array.isArray(val) === false;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/isobject/index.jsn// module id = 132n// module chunks = 0n//# sourceURL=webpack:///./~/isobject/index.js?“)},function(module,exports){eval(‚module.exports=function(n){return{all:n=n||new Map,on:function(e,t){var i=n.get(e);i&&i.push(t)||n.set(e,[t])},off:function(e,t){var i=n.get(e);i&&i.splice(i.indexOf(t)>>>0,1)},emit:function(e,t){(n.get(e)||[]).slice().map(function(n){n(t)}),(n.get(„*“)||[]).slice().map(function(n){n(e,t)})}}};n//# sourceMappingURL=mitt.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/mitt/dist/mitt.jsn// module id = 133n// module chunks = 0n//# sourceURL=webpack:///./~/mitt/dist/mitt.js?‘)},function(module,exports,__webpack_require__){eval(„/**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict‘;nnvar ReactIs = __webpack_require__(48);nvar assign = __webpack_require__(13);nnvar ReactPropTypesSecret = __webpack_require__(45);nvar has = __webpack_require__(46);nvar checkPropTypes = __webpack_require__(16);nnvar printWarning = function() {};nnif (true) {n printWarning = function(text) {n var message = ‚Warning: ‚ + text;n if (typeof console !== ‚undefined‘) {n console.error(message);n }n try {n // — Welcome to debugging React —n // This error was thrown as a convenience so that you can use this stackn // to find the callsite that caused this warning to fire.n throw new Error(message);n } catch (x) {}n };n}nnfunction emptyFunctionThatReturnsNull() {n return null;n}nnmodule.exports = function(isValidElement, throwOnDirectAccess) {n /* global Symbol */n var ITERATOR_SYMBOL = typeof Symbol === ‚function‘ && Symbol.iterator;n var FAUX_ITERATOR_SYMBOL = ‚@@iterator‘; // Before Symbol spec.nn /**n * Returns the iterator method function contained on the iterable object.n *n * Be sure to invoke the function with the iterable as context:n *n * var iteratorFn = getIteratorFn(myIterable);n * if (iteratorFn) {n * var iterator = iteratorFn.call(myIterable);n * …n * }n *n * @param {?object} maybeIterablen * @return {?function}n */n function getIteratorFn(maybeIterable) {n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);n if (typeof iteratorFn === ‚function‘) {n return iteratorFn;n }n }nn /**n * Collection of methods that allow declaration and validation of props that aren * supplied to React components. Example usage:n *n * var Props = require(‚ReactPropTypes‘);n * var MyArticle = React.createClass({n * propTypes: {n * // An optional string prop named „description“.n * description: Props.string,n *n * // A required enum prop named „category“.n * category: Props.oneOf([‚News‘,’Photos‘]).isRequired,n *n * // A prop named „dialog“ that requires an instance of Dialog.n * dialog: Props.instanceOf(Dialog).isRequiredn * },n * render: function() { … }n * });n *n * A more formal specification of how these methods are used:n *n * type := array|bool|func|object|number|string|oneOf([…])|instanceOf(…)n * decl := ReactPropTypes.{type}(.isRequired)?n *n * Each and every declaration produces a function with the same signature. Thisn * allows the creation of custom validation functions. For example:n *n * var MyLink = React.createClass({n * propTypes: {n * // An optional string or URI prop named „href“.n * href: function(props, propName, componentName) {n * var propValue = props[propName];n * if (propValue != null && typeof propValue !== ’string‘ &&n * !(propValue instanceof URI)) {n * return new Error(n * ‚Expected a string or an URI for ‚ + propName + ‚ in ‚ +n * componentNamen * );n * }n * }n * },n * render: function() {…}n * });n *n * @internaln */nn var ANONYMOUS = ‚>‘;nn // Important!n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.n var ReactPropTypes = {n array: createPrimitiveTypeChecker(‚array‘),n bigint: createPrimitiveTypeChecker(‚bigint‘),n bool: createPrimitiveTypeChecker(‚boolean‘),n func: createPrimitiveTypeChecker(‚function‘),n number: createPrimitiveTypeChecker(’number‘),n object: createPrimitiveTypeChecker(‚object‘),n string: createPrimitiveTypeChecker(’string‘),n symbol: createPrimitiveTypeChecker(’symbol‘),nn any: createAnyTypeChecker(),n arrayOf: createArrayOfTypeChecker,n element: createElementTypeChecker(),n elementType: createElementTypeTypeChecker(),n instanceOf: createInstanceTypeChecker,n node: createNodeChecker(),n objectOf: createObjectOfTypeChecker,n oneOf: createEnumTypeChecker,n oneOfType: createUnionTypeChecker,n shape: createShapeTypeChecker,n exact: createStrictShapeTypeChecker,n };nn /**n * inlined Object.is polyfill to avoid requiring consumers ship their ownn * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isn */n /*eslint-disable no-self-compare*/n function is(x, y) {n // SameValue algorithmn if (x === y) {n // Steps 1-5, 7-10n // Steps 6.b-6.e: +0 != -0n return x !== 0 || 1 / x === 1 / y;n } else {n // Step 6.a: NaN == NaNn return x !== x && y !== y;n }n }n /*eslint-enable no-self-compare*/nn /**n * We use an Error-like object for backward compatibility as people may calln * PropTypes directly and inspect their output. However, we don’t use realn * Errors anymore. We don’t inspect their stack anyway, and creating themn * is prohibitively expensive if they are created too often, such as whatn * happens in oneOfType() for any type before the one that matched.n */n function PropTypeError(message, data) {n this.message = message;n this.data = data && typeof data === ‚object‘ ? data: {};n this.stack = “;n }n // Make `instanceof Error` still work for returned errors.n PropTypeError.prototype = Error.prototype;nn function createChainableTypeChecker(validate) {n if (true) {n var manualPropTypeCallCache = {};n var manualPropTypeWarningCount = 0;n }n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {n componentName = componentName || ANONYMOUS;n propFullName = propFullName || propName;nn if (secret !== ReactPropTypesSecret) {n if (throwOnDirectAccess) {n // New behavior only for users of `prop-types` packagen var err = new Error(n ‚Calling PropTypes validators directly is not supported by the `prop-types` package. ‚ +n ‚Use `PropTypes.checkPropTypes()` to call them. ‚ +n ‚Read more at http://fb.me/use-check-prop-types’n );n err.name = ‚Invariant Violation‘;n throw err;n } else if ((„process.env.NODE_ENV“) !== ‚production‘ && typeof console !== ‚undefined‘) {n // Old behavior for people using React.PropTypesn var cacheKey = componentName + ‚:‘ + propName;n if (n !manualPropTypeCallCache[cacheKey] &&n // Avoid spamming the console because they are often not actionable except for lib authorsn manualPropTypeWarningCount 1) {n printWarning(n ‚Invalid arguments supplied to oneOf, expected an array, got ‚ + arguments.length + ‚ arguments. ‚ +n ‚A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).’n );n } else {n printWarning(‚Invalid argument supplied to oneOf, expected an array.‘);n }n }n return emptyFunctionThatReturnsNull;n }nn function validate(props, propName, componentName, location, propFullName) {n var propValue = props[propName];n for (var i = 0; i 0) ? ‚, expected one of type [‚ + expectedTypes.join(‚, ‚) + ‚]‘: “;n return new PropTypeError(‚Invalid ‚ + location + ‚ `‘ + propFullName + ‚` supplied to ‚ + (‚`‘ + componentName + ‚`‘ + expectedTypesMessage + ‚.‘));n }n return createChainableTypeChecker(validate);n }nn function createNodeChecker() {n function validate(props, propName, componentName, location, propFullName) {n if (!isNode(props[propName])) {n return new PropTypeError(‚Invalid ‚ + location + ‚ `‘ + propFullName + ‚` supplied to ‚ + (‚`‘ + componentName + ‚`, expected a ReactNode.‘));n }n return null;n }n return createChainableTypeChecker(validate);n }nn function invalidValidatorError(componentName, location, propFullName, key, type) {n return new PropTypeError(n (componentName || ‚React class‘) + ‚: ‚ + location + ‚ type `‘ + propFullName + ‚.‘ + key + ‚` is invalid; ‚ +n ‚it must be a function, usually from the `prop-types` package, but received `‘ + type + ‚`.’n );n }nn function createShapeTypeChecker(shapeTypes) {n function validate(props, propName, componentName, location, propFullName) {n var propValue = props[propName];n var propType = getPropType(propValue);n if (propType !== ‚object‘) {n return new PropTypeError(‚Invalid ‚ + location + ‚ `‘ + propFullName + ‚` of type `‘ + propType + ‚` ‚ + (’supplied to `‘ + componentName + ‚`, expected `object`.‘));n }n for (var key in shapeTypes) {n var checker = shapeTypes[key];n if (typeof checker !== ‚function‘) {n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));n }n var error = checker(propValue, key, componentName, location, propFullName + ‚.‘ + key, ReactPropTypesSecret);n if (error) {n return error;n }n }n return null;n }n return createChainableTypeChecker(validate);n }nn function createStrictShapeTypeChecker(shapeTypes) {n function validate(props, propName, componentName, location, propFullName) {n var propValue = props[propName];n var propType = getPropType(propValue);n if (propType !== ‚object‘) {n return new PropTypeError(‚Invalid ‚ + location + ‚ `‘ + propFullName + ‚` of type `‘ + propType + ‚` ‚ + (’supplied to `‘ + componentName + ‚`, expected `object`.‘));n }n // We need to check all keys in case some are required but missing from props.n var allKeys = assign({}, props[propName], shapeTypes);n for (var key in allKeys) {n var checker = shapeTypes[key];n if (has(shapeTypes, key) && typeof checker !== ‚function‘) {n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));n }n if (!checker) {n return new PropTypeError(n ‚Invalid ‚ + location + ‚ `‘ + propFullName + ‚` key `‘ + key + ‚` supplied to `‘ + componentName + ‚`.‘ +n ‚\nBad object: ‚ + JSON.stringify(props[propName], null, ‚ ‚) +n ‚\nValid keys: ‚ + JSON.stringify(Object.keys(shapeTypes), null, ‚ ‚)n );n }n var error = checker(propValue, key, componentName, location, propFullName + ‚.‘ + key, ReactPropTypesSecret);n if (error) {n return error;n }n }n return null;n }nn return createChainableTypeChecker(validate);n }nn function isNode(propValue) {n switch (typeof propValue) {n case ’number‘:n case ’string‘:n case ‚undefined‘:n return true;n case ‚boolean‘:n return !propValue;n case ‚object‘:n if (Array.isArray(propValue)) {n return propValue.every(isNode);n }n if (propValue === null || isValidElement(propValue)) {n return true;n }nn var iteratorFn =