From 7ae84ead8114cf5cefeb80969baa6b7ccac70c1b Mon Sep 17 00:00:00 2001 From: vzaidman Date: Thu, 23 Apr 2020 13:56:30 +0300 Subject: [PATCH] v4.1.2 --- dist/cjs/whyDidYouRender.js | 4 ++-- dist/cjs/whyDidYouRender.min.js | 4 ++-- dist/esm/whyDidYouRender.js | 4 ++-- dist/esm/whyDidYouRender.min.js | 4 ++-- dist/no-classes-transpile/cjs/whyDidYouRender.js | 4 ++-- dist/no-classes-transpile/cjs/whyDidYouRender.min.js | 4 ++-- dist/no-classes-transpile/esm/whyDidYouRender.js | 4 ++-- dist/no-classes-transpile/esm/whyDidYouRender.min.js | 4 ++-- dist/no-classes-transpile/umd/whyDidYouRender.js | 4 ++-- dist/no-classes-transpile/umd/whyDidYouRender.min.js | 4 ++-- dist/umd/whyDidYouRender.js | 4 ++-- dist/umd/whyDidYouRender.min.js | 4 ++-- package.json | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dist/cjs/whyDidYouRender.js b/dist/cjs/whyDidYouRender.js index 7e5b54a..2bcbaa0 100644 --- a/dist/cjs/whyDidYouRender.js +++ b/dist/cjs/whyDidYouRender.js @@ -1,8 +1,8 @@ /** - * @welldone-software/why-did-you-render 4.1.1 + * @welldone-software/why-did-you-render 4.1.2 * MIT Licensed * Generated by Vitali Zaidman (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ 'use strict'; diff --git a/dist/cjs/whyDidYouRender.min.js b/dist/cjs/whyDidYouRender.min.js index a5897c6..d4356f5 100644 --- a/dist/cjs/whyDidYouRender.min.js +++ b/dist/cjs/whyDidYouRender.min.js @@ -1,8 +1,8 @@ /** - * @welldone-software/why-did-you-render 4.1.1 + * @welldone-software/why-did-you-render 4.1.2 * MIT Licensed * Generated by Vitali Zaidman (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("lodash/get")),r=e(require("lodash/isString")),n=e(require("lodash/reduce")),o=e(require("lodash/has")),a=e(require("lodash/keys")),i=e(require("lodash/isSet")),c=e(require("lodash/isFunction")),s=e(require("lodash/isRegExp")),f=e(require("lodash/isDate")),u=e(require("lodash/isPlainObject")),p=e(require("lodash/isArray")),l=e(require("lodash/defaults"));function d(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}var E,j="different",C="deepEquals",x="date",P="regex",T="reactElement",H="function",Y="function"==typeof Symbol&&Symbol.for,M=Y?Symbol.for("react.memo"):60115,A=Y?Symbol.for("react.forward_ref"):60112,I=(y(E={},j,"different objects."),y(E,C,"different objects that are equal by value."),y(E,x,"different date objects with the same value."),y(E,P,"different regular expressions with the same value."),y(E,T,"different React elements with the same displayName."),y(E,H,"different functions with the same name."),E),W=!1;function L(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prefixMessage,a=e.diffObjType,i=e.differences,c=e.values,s=e.options;i&&i.length>0?(s.consoleLog(y({},r,t),"".concat(o," of ").concat(a," changes:")),i.forEach((function(e){var t=e.pathString,r=e.diffType,o=e.prevValue,i=e.nextValue;s.consoleGroup("%c".concat("hook"===a?"[hook ".concat(n," result]"):"".concat(a,"."),"%c").concat(t,"%c"),"color:".concat(s.diffNameColor,";"),"color:".concat(s.diffPathColor,";"),"color:default;"),s.consoleLog("".concat(I[r]," (more info at ").concat(n?"http://bit.ly/wdyr3":"http://bit.ly/wdyr02",")")),s.consoleLog(y({},"prev ".concat(t),o),"!==",y({},"next ".concat(t),i)),s.consoleGroupEnd()}))):i&&(s.consoleLog(y({},r,t),"".concat(o," the ").concat(a," object itself changed but its values are all equal."),"props"===a?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat("http://bit.ly/wdyr02")),s.consoleLog("prev ".concat(a,":"),c.prev," !== ",c.next,":next ".concat(a)))}function q(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,s=e.nextState,f=e.nextHook,u=e.reason,p=e.options,l=e.ownerDataMap;if(function(e,t,r){return!W&&(!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===j}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===j}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===j})))))}(u,t,p)){p.consoleGroup("%c".concat(r),"color: ".concat(p.titleColor,";"));var d="Re-rendered because";if(u.propsDifferences&&(L({Component:t,displayName:r,prefixMessage:d,diffObjType:"props",differences:u.propsDifferences,values:{prev:o,next:c},options:p}),d="And because"),u.stateDifferences&&L({Component:t,displayName:r,prefixMessage:d,diffObjType:"state",differences:u.stateDifferences,values:{prev:a,next:s},options:p}),u.hookDifferences&&L({Component:t,displayName:r,prefixMessage:d,diffObjType:"hook",differences:u.hookDifferences,values:{prev:i,next:f},hookName:n,options:p}),u.propsDifferences&&u.ownerDifferences){var h=l.get(o),m=l.get(c);p.consoleGroup("Rendered by ".concat(m.displayName));var v="Re-rendered because";u.ownerDifferences.propsDifferences&&(L({Component:m.Component,displayName:m.displayName,prefixMessage:v,diffObjType:"props",differences:u.ownerDifferences.propsDifferences,values:{prev:h.props,next:m.props},options:p}),v="And because"),u.ownerDifferences.stateDifferences&&L({Component:m.Component,displayName:m.displayName,prefixMessage:v,diffObjType:"state",differences:u.ownerDifferences.stateDifferences,values:{prev:h.state,next:m.state},options:p}),u.ownerDifferences.hookDifferences&&u.ownerDifferences.hookDifferences.forEach((function(e,t){var r=e.hookName,n=e.differences;return L({Component:m.Component,displayName:m.displayName,prefixMessage:v,diffObjType:"hook",differences:n,values:{prev:h.hooks[t].result,next:m.hooks[t].result},hookName:r,options:p})})),p.consoleGroupEnd()}u.propsDifferences||u.stateDifferences||u.hookDifferences||p.consoleLog(y({},r,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat("http://bit.ly/wdyr02")),p.consoleGroupEnd()}}function F(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(t){"idle"===t&&(W=!0,setTimeout((function(){W=!1}),e))})),q}var U=function(){};function G(e){return e.displayName||e.name||e.type&&G(e.type)||e.render&&G(e.render)||(r(e)?e:void 0)}var V="undefined"!=typeof Element,$="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,B=function(e){return e.$$typeof===$};function z(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==j}function J(e,t,r){try{var n=[];return function e(t,r,n){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(t===r)return!0;if(!t||!r)return z(t,r,n,l,j);if(p(t)&&p(r)){var d=t.length;if(d!==r.length)return z(R(t),R(r),n,l,j);for(var y=!0,h=d;0!=h--;)e(t[h],r[h],n,"".concat(l,"[").concat(h,"]"))||(y=!1);return z(R(t),R(r),n,l,y?C:j)}if(i(t)&&i(r)){if(t.size!==r.size)return z(new Set(t),new Set(r),n,l,j);var v,b=N(t);try{for(b.s();!(v=b.n()).done;){var g=v.value;if(!r.has(g))return z(new Set(t),new Set(r),n,l,j)}}catch(e){b.e(e)}finally{b.f()}return z(new Set(t),new Set(r),n,l,C)}if(f(t)&&f(r))return t.getTime()===r.getTime()?z(new Date(t),new Date(r),n,l,x):z(new Date(t),new Date(r),n,l,j);if(s(t)&&s(r))return t.toString()===r.toString()?z(t,r,n,l,P):z(t,r,n,l,j);if(V&&t instanceof Element&&r instanceof Element)return z(t,r,n,l,j);if(B(t)&&B(r)){if(t.type!==r.type)return z(t,r,n,l,j);var D=e(t.props,r.props,n,"".concat(l,".props"));return z(t,r,n,l,D?T:j)}if(c(t)&&c(r))return t.name===r.name?z(t,r,n,l,H):z(t,r,n,l,j);if(u(t)&&u(r)){var w=a(t),k=w.length;if(k!==a(r).length)return z(m({},t),m({},r),n,l,j);for(var O=k;0!=O--;)if(!o(r,w[O]))return z(m({},t),m({},r),n,l,j);for(var _=!0,S=k;0!=S--;){var E=w[S];e(t[E],r[E],n,"".concat(l,".").concat(E))||(_=!1)}return z(m({},t),m({},r),n,l,_?C:j)}return z(t,r,n,l,j)}(e,t,n,r),n}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var K={};function Q(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.shallow,a=void 0===o||o;if(e===t)return!1;if(!a)return J(e,t);var i=e||K,c=t||K,s=Object.keys(m({},i,{},c));return n(s,(function(e,t){var r=J(i[t],c[t],t);return r&&(e=[].concat(R(e),R(r))),e}),[])}function X(e,t,r,n,o,a,i){var c=i.get(e),s=i.get(n);return{propsDifferences:Q(e,n),stateDifferences:Q(t,o),hookDifferences:Q(r,a,{shallow:!1}),ownerDifferences:null!=c&&null!=s&&{propsDifferences:Q(c.props,s.props),stateDifferences:Q(c.state,s.state),hookDifferences:c.hooks.map((function(e,t){return{hookName:e.hookName,differences:Q(e.result,s.hooks[t].result,{shallow:!1})}}))}}}function Z(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,s=e.nextState,f=e.nextHook,u=e.options,p=e.ownerDataMap;return{Component:t,displayName:r,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:c,nextState:s,nextHook:f,options:u,ownerDataMap:p,reason:X(o,a,i,c,s,f,p)}}function ee(e){return e.prototype&&!!e.prototype.isReactComponent}function te(e){return e.$$typeof===M}function re(e){return e.$$typeof===A}function ne(e){var t=e.Component,r=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some((function(t){return t.test(e)}))}(r,n)&&(!1!==t.whyDidYouRender&&((!a||!t.whyDidYouRender||!1!==t.whyDidYouRender.trackHooks)&&!!(t.whyDidYouRender||n.trackAllPureComponents&&(t&&t.prototype instanceof o.PureComponent||te(t))||function(e,t){return t.include&&t.include.length>0&&t.include.some((function(t){return t.test(e)}))}(r,n))))}function oe(e,t,r,n,o){var a=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(u,r);var a,i,c,s,f=(a=u,function(){var e,t=v(a);if(g()){var r=v(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return w(this,e)});function u(t,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=f.call(this,t,r))._WDYR={renderNumber:0};var o=k(v(u.prototype),"render",D(n))||n.render;return o!==e.prototype.render&&(n.render=function(){return u.prototype.render.apply(D(n)),o()}),n}return i=u,(c=[{key:"render",value:function(){return this._WDYR.renderNumber++,"isStrictMode"in this._WDYR||(this._WDYR.isStrictMode=function(e){for(var t=e&&e._reactInternalFiber;t;){if(1&t.mode)return!0;t=t.return}return!1}(this)),this._WDYR.isStrictMode&&this._WDYR.renderNumber%2==1||(this._WDYR.prevProps&&n.notifier(Z({Component:e,displayName:t,prevProps:this._WDYR.prevProps,prevState:this._WDYR.prevState,nextProps:this.props,nextState:this.state,options:n,ownerDataMap:o})),this._WDYR.prevProps=this.props,this._WDYR.prevState=this.state),k(v(u.prototype),"render",this)?k(v(u.prototype),"render",this).call(this):null}}])&&d(i.prototype,c),s&&d(i,s),u}(e);try{a.displayName=t}catch(e){}return l(a,e),a}function ae(e,t,r,n,o,a){var i="string"==typeof e?function(e,t){return function(r){return t.createElement(e,r)}}(e,n):e;function c(){var e=arguments[0],c=n.useRef(),s=c.current;if(c.current=e,s){var f=Z({Component:i,displayName:r,prevProps:s,nextProps:e,options:o,ownerDataMap:a}),u=f.reason.propsDifferences&&!(t&&0===f.reason.propsDifferences.length);u&&o.notifier(f)}return i.apply(void 0,arguments)}try{c.displayName=r}catch(e){}return c.ComponentForHooksTracking=i,l(c,i),c}var ie=Symbol("initial-hook-value");function ce(e,r,n,o,a,i,c){var s=r.path,f=s?t(n,s):n;c.current.push({hookName:e,result:f});var u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current,p=o.useRef(ie);if(!u)return n;var l=u.type.ComponentForHooksTracking||u.type,d=G(l);if(!ne({Component:l,displayName:d,options:a,React:o,isHookChange:!0}))return n;var y=p.current;if(p.current=n,y!==ie){var h=Z({Component:l,displayName:d,hookName:e,prevHook:s?t(y,s):y,nextHook:f,options:a,ownerDataMap:i});h.reason.hookDifferences&&a.notifier(h)}return n}function se(e,t,r,n,o,a){return te(t)?function e(t,r,n,o,a){var i=t.type,c=ee(i),s=re(i),f=te(i),u=s?i.render:i,p=c?oe(u,r,0,o,a):f?e(u,r,n,o,a):ae(u,!0,r,n,o,a);try{p.displayName=G(u)}catch(e){}p.ComponentForHooksTracking=t,l(p,u);var d=n.memo(s?n.forwardRef(p):p,t.compare);try{d.displayName=r}catch(e){}return l(d,t),d}(t,r,n,o,a):re(t)?function(e,t,r,n,o){var a=e.render,i=te(a),c=i?a.type:a,s=ae(c,i,t,r,n,o);s.displayName=G(c),s.ComponentForHooksTracking=c,l(s,c);var f=r.forwardRef(i?r.memo(s,a.compare):s);try{f.displayName=t}catch(e){}return l(f,e),f}(t,r,n,o,a):ee(t)?oe(t,r,0,o,a):ae(t,!1,r,n,o,a)}function fe(e,t,r,n,o,a){if(e.has(t))return e.get(t);var i=se(0,t,r,n,o,a);return e.set(t,i),i}var ue={useState:{path:"0"},useReducer:{path:"0"},useContext:!0,useMemo:!0};function pe(e,t){var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=U);var n=e.notifier||F("hotReloadBufferMs"in e?e.hotReloadBufferMs:500);return m({include:null,exclude:null,notifier:n,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1,logOwnerReasons:!1,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(t),n=e.createElement,o=e.createFactory,a=new WeakMap,i=new WeakMap,c={current:[]},s=null;if(Object.defineProperty(e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return s},set:function(e){s=e,c.current=[]}}),e.createElement=function(t){for(var o=null,s=null,f=null,u=arguments.length,p=new Array(u>1?u-1:0),l=1;l (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ import _get$1 from 'lodash/get'; diff --git a/dist/esm/whyDidYouRender.min.js b/dist/esm/whyDidYouRender.min.js index 48f4e5f..b5a069b 100644 --- a/dist/esm/whyDidYouRender.min.js +++ b/dist/esm/whyDidYouRender.min.js @@ -1,8 +1,8 @@ /** - * @welldone-software/why-did-you-render 4.1.1 + * @welldone-software/why-did-you-render 4.1.2 * MIT Licensed * Generated by Vitali Zaidman (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ import e from"lodash/get";import t from"lodash/isString";import r from"lodash/reduce";import n from"lodash/has";import o from"lodash/keys";import a from"lodash/isSet";import i from"lodash/isFunction";import c from"lodash/isRegExp";import s from"lodash/isDate";import f from"lodash/isPlainObject";import u from"lodash/isArray";import p from"lodash/defaults";function l(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}var N,E="different",j="deepEquals",C="date",x="regex",P="reactElement",T="function",H="function"==typeof Symbol&&Symbol.for,Y=H?Symbol.for("react.memo"):60115,M=H?Symbol.for("react.forward_ref"):60112,A=(d(N={},E,"different objects."),d(N,j,"different objects that are equal by value."),d(N,C,"different date objects with the same value."),d(N,x,"different regular expressions with the same value."),d(N,P,"different React elements with the same displayName."),d(N,T,"different functions with the same name."),N),I=!1;function W(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prefixMessage,a=e.diffObjType,i=e.differences,c=e.values,s=e.options;i&&i.length>0?(s.consoleLog(d({},r,t),"".concat(o," of ").concat(a," changes:")),i.forEach((function(e){var t=e.pathString,r=e.diffType,o=e.prevValue,i=e.nextValue;s.consoleGroup("%c".concat("hook"===a?"[hook ".concat(n," result]"):"".concat(a,"."),"%c").concat(t,"%c"),"color:".concat(s.diffNameColor,";"),"color:".concat(s.diffPathColor,";"),"color:default;"),s.consoleLog("".concat(A[r]," (more info at ").concat(n?"http://bit.ly/wdyr3":"http://bit.ly/wdyr02",")")),s.consoleLog(d({},"prev ".concat(t),o),"!==",d({},"next ".concat(t),i)),s.consoleGroupEnd()}))):i&&(s.consoleLog(d({},r,t),"".concat(o," the ").concat(a," object itself changed but its values are all equal."),"props"===a?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat("http://bit.ly/wdyr02")),s.consoleLog("prev ".concat(a,":"),c.prev," !== ",c.next,":next ".concat(a)))}function L(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,s=e.nextState,f=e.nextHook,u=e.reason,p=e.options,l=e.ownerDataMap;if(function(e,t,r){return!I&&(!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===E}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===E}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===E})))))}(u,t,p)){p.consoleGroup("%c".concat(r),"color: ".concat(p.titleColor,";"));var m="Re-rendered because";if(u.propsDifferences&&(W({Component:t,displayName:r,prefixMessage:m,diffObjType:"props",differences:u.propsDifferences,values:{prev:o,next:c},options:p}),m="And because"),u.stateDifferences&&W({Component:t,displayName:r,prefixMessage:m,diffObjType:"state",differences:u.stateDifferences,values:{prev:a,next:s},options:p}),u.hookDifferences&&W({Component:t,displayName:r,prefixMessage:m,diffObjType:"hook",differences:u.hookDifferences,values:{prev:i,next:f},hookName:n,options:p}),u.propsDifferences&&u.ownerDifferences){var y=l.get(o),h=l.get(c);p.consoleGroup("Rendered by ".concat(h.displayName));var v="Re-rendered because";u.ownerDifferences.propsDifferences&&(W({Component:h.Component,displayName:h.displayName,prefixMessage:v,diffObjType:"props",differences:u.ownerDifferences.propsDifferences,values:{prev:y.props,next:h.props},options:p}),v="And because"),u.ownerDifferences.stateDifferences&&W({Component:h.Component,displayName:h.displayName,prefixMessage:v,diffObjType:"state",differences:u.ownerDifferences.stateDifferences,values:{prev:y.state,next:h.state},options:p}),u.ownerDifferences.hookDifferences&&u.ownerDifferences.hookDifferences.forEach((function(e,t){var r=e.hookName,n=e.differences;return W({Component:h.Component,displayName:h.displayName,prefixMessage:v,diffObjType:"hook",differences:n,values:{prev:y.hooks[t].result,next:h.hooks[t].result},hookName:r,options:p})})),p.consoleGroupEnd()}u.propsDifferences||u.stateDifferences||u.hookDifferences||p.consoleLog(d({},r,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat("http://bit.ly/wdyr02")),p.consoleGroupEnd()}}function F(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(t){"idle"===t&&(I=!0,setTimeout((function(){I=!1}),e))})),L}var U=function(){};function G(e){return e.displayName||e.name||e.type&&G(e.type)||e.render&&G(e.render)||(t(e)?e:void 0)}var V="undefined"!=typeof Element,$="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,B=function(e){return e.$$typeof===$};function q(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==E}function z(e,t,r){try{var p=[];return function e(t,r,p){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(t===r)return!0;if(!t||!r)return q(t,r,p,l,E);if(u(t)&&u(r)){var d=t.length;if(d!==r.length)return q(O(t),O(r),p,l,E);for(var m=!0,h=d;0!=h--;)e(t[h],r[h],p,"".concat(l,"[").concat(h,"]"))||(m=!1);return q(O(t),O(r),p,l,m?j:E)}if(a(t)&&a(r)){if(t.size!==r.size)return q(new Set(t),new Set(r),p,l,E);var v,b=S(t);try{for(b.s();!(v=b.n()).done;){var g=v.value;if(!r.has(g))return q(new Set(t),new Set(r),p,l,E)}}catch(e){b.e(e)}finally{b.f()}return q(new Set(t),new Set(r),p,l,j)}if(s(t)&&s(r))return t.getTime()===r.getTime()?q(new Date(t),new Date(r),p,l,C):q(new Date(t),new Date(r),p,l,E);if(c(t)&&c(r))return t.toString()===r.toString()?q(t,r,p,l,x):q(t,r,p,l,E);if(V&&t instanceof Element&&r instanceof Element)return q(t,r,p,l,E);if(B(t)&&B(r)){if(t.type!==r.type)return q(t,r,p,l,E);var D=e(t.props,r.props,p,"".concat(l,".props"));return q(t,r,p,l,D?P:E)}if(i(t)&&i(r))return t.name===r.name?q(t,r,p,l,T):q(t,r,p,l,E);if(f(t)&&f(r)){var w=o(t),k=w.length;if(k!==o(r).length)return q(y({},t),y({},r),p,l,E);for(var R=k;0!=R--;)if(!n(r,w[R]))return q(y({},t),y({},r),p,l,E);for(var _=!0,N=k;0!=N--;){var H=w[N];e(t[H],r[H],p,"".concat(l,".").concat(H))||(_=!1)}return q(y({},t),y({},r),p,l,_?j:E)}return q(t,r,p,l,E)}(e,t,p,r),p}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var J={};function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.shallow,a=void 0===o||o;if(e===t)return!1;if(!a)return z(e,t);var i=e||J,c=t||J,s=Object.keys(y({},i,{},c));return r(s,(function(e,t){var r=z(i[t],c[t],t);return r&&(e=[].concat(O(e),O(r))),e}),[])}function Q(e,t,r,n,o,a,i){var c=i.get(e),s=i.get(n);return{propsDifferences:K(e,n),stateDifferences:K(t,o),hookDifferences:K(r,a,{shallow:!1}),ownerDifferences:null!=c&&null!=s&&{propsDifferences:K(c.props,s.props),stateDifferences:K(c.state,s.state),hookDifferences:c.hooks.map((function(e,t){return{hookName:e.hookName,differences:K(e.result,s.hooks[t].result,{shallow:!1})}}))}}}function X(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,s=e.nextState,f=e.nextHook,u=e.options,p=e.ownerDataMap;return{Component:t,displayName:r,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:c,nextState:s,nextHook:f,options:u,ownerDataMap:p,reason:Q(o,a,i,c,s,f,p)}}function Z(e){return e.prototype&&!!e.prototype.isReactComponent}function ee(e){return e.$$typeof===Y}function te(e){return e.$$typeof===M}function re(e){var t=e.Component,r=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some((function(t){return t.test(e)}))}(r,n)&&(!1!==t.whyDidYouRender&&((!a||!t.whyDidYouRender||!1!==t.whyDidYouRender.trackHooks)&&!!(t.whyDidYouRender||n.trackAllPureComponents&&(t&&t.prototype instanceof o.PureComponent||ee(t))||function(e,t){return t.include&&t.include.length>0&&t.include.some((function(t){return t.test(e)}))}(r,n))))}function ne(e,t,r,n,o){var a=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(u,r);var a,i,c,s,f=(a=u,function(){var e,t=h(a);if(b()){var r=h(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return D(this,e)});function u(t,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=f.call(this,t,r))._WDYR={renderNumber:0};var o=w(h(u.prototype),"render",g(n))||n.render;return o!==e.prototype.render&&(n.render=function(){return u.prototype.render.apply(g(n)),o()}),n}return i=u,(c=[{key:"render",value:function(){return this._WDYR.renderNumber++,"isStrictMode"in this._WDYR||(this._WDYR.isStrictMode=function(e){for(var t=e&&e._reactInternalFiber;t;){if(1&t.mode)return!0;t=t.return}return!1}(this)),this._WDYR.isStrictMode&&this._WDYR.renderNumber%2==1||(this._WDYR.prevProps&&n.notifier(X({Component:e,displayName:t,prevProps:this._WDYR.prevProps,prevState:this._WDYR.prevState,nextProps:this.props,nextState:this.state,options:n,ownerDataMap:o})),this._WDYR.prevProps=this.props,this._WDYR.prevState=this.state),w(h(u.prototype),"render",this)?w(h(u.prototype),"render",this).call(this):null}}])&&l(i.prototype,c),s&&l(i,s),u}(e);try{a.displayName=t}catch(e){}return p(a,e),a}function oe(e,t,r,n,o,a){var i="string"==typeof e?function(e,t){return function(r){return t.createElement(e,r)}}(e,n):e;function c(){var e=arguments[0],c=n.useRef(),s=c.current;if(c.current=e,s){var f=X({Component:i,displayName:r,prevProps:s,nextProps:e,options:o,ownerDataMap:a}),u=f.reason.propsDifferences&&!(t&&0===f.reason.propsDifferences.length);u&&o.notifier(f)}return i.apply(void 0,arguments)}try{c.displayName=r}catch(e){}return c.ComponentForHooksTracking=i,p(c,i),c}var ae=Symbol("initial-hook-value");function ie(t,r,n,o,a,i,c){var s=r.path,f=s?e(n,s):n;c.current.push({hookName:t,result:f});var u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current,p=o.useRef(ae);if(!u)return n;var l=u.type.ComponentForHooksTracking||u.type,d=G(l);if(!re({Component:l,displayName:d,options:a,React:o,isHookChange:!0}))return n;var m=p.current;if(p.current=n,m!==ae){var y=X({Component:l,displayName:d,hookName:t,prevHook:s?e(m,s):m,nextHook:f,options:a,ownerDataMap:i});y.reason.hookDifferences&&a.notifier(y)}return n}function ce(e,t,r,n,o,a){return ee(t)?function e(t,r,n,o,a){var i=t.type,c=Z(i),s=te(i),f=ee(i),u=s?i.render:i,l=c?ne(u,r,0,o,a):f?e(u,r,n,o,a):oe(u,!0,r,n,o,a);try{l.displayName=G(u)}catch(e){}l.ComponentForHooksTracking=t,p(l,u);var d=n.memo(s?n.forwardRef(l):l,t.compare);try{d.displayName=r}catch(e){}return p(d,t),d}(t,r,n,o,a):te(t)?function(e,t,r,n,o){var a=e.render,i=ee(a),c=i?a.type:a,s=oe(c,i,t,r,n,o);s.displayName=G(c),s.ComponentForHooksTracking=c,p(s,c);var f=r.forwardRef(i?r.memo(s,a.compare):s);try{f.displayName=t}catch(e){}return p(f,e),f}(t,r,n,o,a):Z(t)?ne(t,r,0,o,a):oe(t,!1,r,n,o,a)}function se(e,t,r,n,o,a){if(e.has(t))return e.get(t);var i=ce(0,t,r,n,o,a);return e.set(t,i),i}var fe={useState:{path:"0"},useReducer:{path:"0"},useContext:!0,useMemo:!0};function ue(e,t){var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=U);var n=e.notifier||F("hotReloadBufferMs"in e?e.hotReloadBufferMs:500);return y({include:null,exclude:null,notifier:n,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1,logOwnerReasons:!1,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(t),n=e.createElement,o=e.createFactory,a=new WeakMap,i=new WeakMap,c={current:[]},s=null;if(Object.defineProperty(e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return s},set:function(e){s=e,c.current=[]}}),e.createElement=function(t){for(var o=null,s=null,f=null,u=arguments.length,p=new Array(u>1?u-1:0),l=1;l (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ 'use strict'; diff --git a/dist/no-classes-transpile/cjs/whyDidYouRender.min.js b/dist/no-classes-transpile/cjs/whyDidYouRender.min.js index 908385e..ff47ccc 100644 --- a/dist/no-classes-transpile/cjs/whyDidYouRender.min.js +++ b/dist/no-classes-transpile/cjs/whyDidYouRender.min.js @@ -1,8 +1,8 @@ /** - * @welldone-software/why-did-you-render 4.1.1 + * @welldone-software/why-did-you-render 4.1.2 * MIT Licensed * Generated by Vitali Zaidman (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=e(require("lodash/get")),t=e(require("lodash/isString")),n=e(require("lodash/reduce")),o=e(require("lodash/has")),a=e(require("lodash/keys")),i=e(require("lodash/isSet")),s=e(require("lodash/isFunction")),c=e(require("lodash/isRegExp")),f=e(require("lodash/isDate")),u=e(require("lodash/isPlainObject")),p=e(require("lodash/isArray")),l=e(require("lodash/defaults"));function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function y(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}var w,k="different",R="deepEquals",N="date",O="regex",S="reactElement",_="function",E="function"==typeof Symbol&&Symbol.for,C=E?Symbol.for("react.memo"):60115,x=E?Symbol.for("react.forward_ref"):60112,j=(d(w={},k,"different objects."),d(w,R,"different objects that are equal by value."),d(w,N,"different date objects with the same value."),d(w,O,"different regular expressions with the same value."),d(w,S,"different React elements with the same displayName."),d(w,_,"different functions with the same name."),w),T=!1;function P(e){var r=e.Component,t=e.displayName,n=e.hookName,o=e.prefixMessage,a=e.diffObjType,i=e.differences,s=e.values,c=e.options;i&&i.length>0?(c.consoleLog(d({},t,r),"".concat(o," of ").concat(a," changes:")),i.forEach((function(e){var r=e.pathString,t=e.diffType,o=e.prevValue,i=e.nextValue;c.consoleGroup("%c".concat("hook"===a?"[hook ".concat(n," result]"):"".concat(a,"."),"%c").concat(r,"%c"),"color:".concat(c.diffNameColor,";"),"color:".concat(c.diffPathColor,";"),"color:default;"),c.consoleLog("".concat(j[t]," (more info at ").concat(n?"http://bit.ly/wdyr3":"http://bit.ly/wdyr02",")")),c.consoleLog(d({},"prev ".concat(r),o),"!==",d({},"next ".concat(r),i)),c.consoleGroupEnd()}))):i&&(c.consoleLog(d({},t,r),"".concat(o," the ").concat(a," object itself changed but its values are all equal."),"props"===a?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat("http://bit.ly/wdyr02")),c.consoleLog("prev ".concat(a,":"),s.prev," !== ",s.next,":next ".concat(a)))}function H(e){var r=e.Component,t=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,s=e.nextProps,c=e.nextState,f=e.nextHook,u=e.reason,p=e.options,l=e.ownerDataMap;if(function(e,r,t){return!T&&(!!t.logOnDifferentValues||(!(!r.whyDidYouRender||!r.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===k}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===k}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===k})))))}(u,r,p)){p.consoleGroup("%c".concat(t),"color: ".concat(p.titleColor,";"));var m="Re-rendered because";if(u.propsDifferences&&(P({Component:r,displayName:t,prefixMessage:m,diffObjType:"props",differences:u.propsDifferences,values:{prev:o,next:s},options:p}),m="And because"),u.stateDifferences&&P({Component:r,displayName:t,prefixMessage:m,diffObjType:"state",differences:u.stateDifferences,values:{prev:a,next:c},options:p}),u.hookDifferences&&P({Component:r,displayName:t,prefixMessage:m,diffObjType:"hook",differences:u.hookDifferences,values:{prev:i,next:f},hookName:n,options:p}),u.propsDifferences&&u.ownerDifferences){var y=l.get(o),h=l.get(s);p.consoleGroup("Rendered by ".concat(h.displayName));var v="Re-rendered because";u.ownerDifferences.propsDifferences&&(P({Component:h.Component,displayName:h.displayName,prefixMessage:v,diffObjType:"props",differences:u.ownerDifferences.propsDifferences,values:{prev:y.props,next:h.props},options:p}),v="And because"),u.ownerDifferences.stateDifferences&&P({Component:h.Component,displayName:h.displayName,prefixMessage:v,diffObjType:"state",differences:u.ownerDifferences.stateDifferences,values:{prev:y.state,next:h.state},options:p}),u.ownerDifferences.hookDifferences&&u.ownerDifferences.hookDifferences.forEach((function(e,r){var t=e.hookName,n=e.differences;return P({Component:h.Component,displayName:h.displayName,prefixMessage:v,diffObjType:"hook",differences:n,values:{prev:y.hooks[r].result,next:h.hooks[r].result},hookName:t,options:p})})),p.consoleGroupEnd()}u.propsDifferences||u.stateDifferences||u.hookDifferences||p.consoleLog(d({},t,r),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat("http://bit.ly/wdyr02")),p.consoleGroupEnd()}}function Y(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(r){"idle"===r&&(T=!0,setTimeout((function(){T=!1}),e))})),H}var M=function(){};function A(e){return e.displayName||e.name||e.type&&A(e.type)||e.render&&A(e.render)||(t(e)?e:void 0)}var I="undefined"!=typeof Element,W="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,L=function(e){return e.$$typeof===W};function q(e,r,t,n,o){return t.push({diffType:o,pathString:n,prevValue:e,nextValue:r}),o!==k}function F(e,r,t){try{var n=[];return function e(r,t,n){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(r===t)return!0;if(!r||!t)return q(r,t,n,l,k);if(p(r)&&p(t)){var d=r.length;if(d!==t.length)return q(v(r),v(t),n,l,k);for(var m=!0,h=d;0!=h--;)e(r[h],t[h],n,"".concat(l,"[").concat(h,"]"))||(m=!1);return q(v(r),v(t),n,l,m?R:k)}if(i(r)&&i(t)){if(r.size!==t.size)return q(new Set(r),new Set(t),n,l,k);var g,b=D(r);try{for(b.s();!(g=b.n()).done;){var w=g.value;if(!t.has(w))return q(new Set(r),new Set(t),n,l,k)}}catch(e){b.e(e)}finally{b.f()}return q(new Set(r),new Set(t),n,l,R)}if(f(r)&&f(t))return r.getTime()===t.getTime()?q(new Date(r),new Date(t),n,l,N):q(new Date(r),new Date(t),n,l,k);if(c(r)&&c(t))return r.toString()===t.toString()?q(r,t,n,l,O):q(r,t,n,l,k);if(I&&r instanceof Element&&t instanceof Element)return q(r,t,n,l,k);if(L(r)&&L(t)){if(r.type!==t.type)return q(r,t,n,l,k);var E=e(r.props,t.props,n,"".concat(l,".props"));return q(r,t,n,l,E?S:k)}if(s(r)&&s(t))return r.name===t.name?q(r,t,n,l,_):q(r,t,n,l,k);if(u(r)&&u(t)){var C=a(r),x=C.length;if(x!==a(t).length)return q(y({},r),y({},t),n,l,k);for(var j=x;0!=j--;)if(!o(t,C[j]))return q(y({},r),y({},t),n,l,k);for(var T=!0,P=x;0!=P--;){var H=C[P];e(r[H],t[H],n,"".concat(l,".").concat(H))||(T=!1)}return q(y({},r),y({},t),n,l,T?R:k)}return q(r,t,n,l,k)}(e,r,n,t),n}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var U={};function G(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.shallow,a=void 0===o||o;if(e===r)return!1;if(!a)return F(e,r);var i=e||U,s=r||U,c=Object.keys(y({},i,{},s));return n(c,(function(e,r){var t=F(i[r],s[r],r);return t&&(e=[].concat(v(e),v(t))),e}),[])}function V(e,r,t,n,o,a,i){var s=i.get(e),c=i.get(n);return{propsDifferences:G(e,n),stateDifferences:G(r,o),hookDifferences:G(t,a,{shallow:!1}),ownerDifferences:null!=s&&null!=c&&{propsDifferences:G(s.props,c.props),stateDifferences:G(s.state,c.state),hookDifferences:s.hooks.map((function(e,r){return{hookName:e.hookName,differences:G(e.result,c.hooks[r].result,{shallow:!1})}}))}}}function $(e){var r=e.Component,t=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,s=e.nextProps,c=e.nextState,f=e.nextHook,u=e.options,p=e.ownerDataMap;return{Component:r,displayName:t,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:s,nextState:c,nextHook:f,options:u,ownerDataMap:p,reason:V(o,a,i,s,c,f,p)}}function B(e){return e.prototype&&!!e.prototype.isReactComponent}function z(e){return e.$$typeof===C}function J(e){return e.$$typeof===x}function K(e){var r=e.Component,t=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,r){return r.exclude&&r.exclude.length>0&&r.exclude.some((function(r){return r.test(e)}))}(t,n)&&(!1!==r.whyDidYouRender&&((!a||!r.whyDidYouRender||!1!==r.whyDidYouRender.trackHooks)&&!!(r.whyDidYouRender||n.trackAllPureComponents&&(r&&r.prototype instanceof o.PureComponent||z(r))||function(e,r){return r.include&&r.include.length>0&&r.include.some((function(r){return r.test(e)}))}(t,n))))}function Q(e,r,t,n,o){class a extends e{constructor(r,t){var n;super(r,t),n=this,this._WDYR={renderNumber:0};var o=super.render||this.render;o!==e.prototype.render&&(this.render=function(){return a.prototype.render.apply(n),o()})}render(){return this._WDYR.renderNumber++,"isStrictMode"in this._WDYR||(this._WDYR.isStrictMode=function(e){for(var r=e&&e._reactInternalFiber;r;){if(1&r.mode)return!0;r=r.return}return!1}(this)),this._WDYR.isStrictMode&&this._WDYR.renderNumber%2==1||(this._WDYR.prevProps&&n.notifier($({Component:e,displayName:r,prevProps:this._WDYR.prevProps,prevState:this._WDYR.prevState,nextProps:this.props,nextState:this.state,options:n,ownerDataMap:o})),this._WDYR.prevProps=this.props,this._WDYR.prevState=this.state),super.render?super.render():null}}try{a.displayName=r}catch(e){}return l(a,e),a}function X(e,r,t,n,o,a){var i="string"==typeof e?function(e,r){return function(t){return r.createElement(e,t)}}(e,n):e;function s(){var e=arguments[0],s=n.useRef(),c=s.current;if(s.current=e,c){var f=$({Component:i,displayName:t,prevProps:c,nextProps:e,options:o,ownerDataMap:a}),u=f.reason.propsDifferences&&!(r&&0===f.reason.propsDifferences.length);u&&o.notifier(f)}return i.apply(void 0,arguments)}try{s.displayName=t}catch(e){}return s.ComponentForHooksTracking=i,l(s,i),s}var Z=Symbol("initial-hook-value");function ee(e,t,n,o,a,i,s){var c=t.path,f=c?r(n,c):n;s.current.push({hookName:e,result:f});var u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current,p=o.useRef(Z);if(!u)return n;var l=u.type.ComponentForHooksTracking||u.type,d=A(l);if(!K({Component:l,displayName:d,options:a,React:o,isHookChange:!0}))return n;var m=p.current;if(p.current=n,m!==Z){var y=$({Component:l,displayName:d,hookName:e,prevHook:c?r(m,c):m,nextHook:f,options:a,ownerDataMap:i});y.reason.hookDifferences&&a.notifier(y)}return n}function re(e,r,t,n,o,a){return z(r)?function e(r,t,n,o,a){var i=r.type,s=B(i),c=J(i),f=z(i),u=c?i.render:i,p=s?Q(u,t,0,o,a):f?e(u,t,n,o,a):X(u,!0,t,n,o,a);try{p.displayName=A(u)}catch(e){}p.ComponentForHooksTracking=r,l(p,u);var d=n.memo(c?n.forwardRef(p):p,r.compare);try{d.displayName=t}catch(e){}return l(d,r),d}(r,t,n,o,a):J(r)?function(e,r,t,n,o){var a=e.render,i=z(a),s=i?a.type:a,c=X(s,i,r,t,n,o);c.displayName=A(s),c.ComponentForHooksTracking=s,l(c,s);var f=t.forwardRef(i?t.memo(c,a.compare):c);try{f.displayName=r}catch(e){}return l(f,e),f}(r,t,n,o,a):B(r)?Q(r,t,0,o,a):X(r,!1,t,n,o,a)}function te(e,r,t,n,o,a){if(e.has(r))return e.get(r);var i=re(0,r,t,n,o,a);return e.set(r,i),i}var ne={useState:{path:"0"},useReducer:{path:"0"},useContext:!0,useMemo:!0};function oe(e,r){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=console.group,t=console.groupEnd;e.collapseGroups?r=console.groupCollapsed:e.onlyLogs&&(r=console.log,t=M);var n=e.notifier||Y("hotReloadBufferMs"in e?e.hotReloadBufferMs:500);return y({include:null,exclude:null,notifier:n,onlyLogs:!1,consoleLog:console.log,consoleGroup:r,consoleGroupEnd:t,logOnDifferentValues:!1,logOwnerReasons:!1,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(r),n=e.createElement,o=e.createFactory,a=new WeakMap,i=new WeakMap,s={current:[]},c=null;if(Object.defineProperty(e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return c},set:function(e){c=e,s.current=[]}}),e.createElement=function(r){for(var o=null,c=null,f=null,u=arguments.length,p=new Array(u>1?u-1:0),l=1;l (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ import _get from 'lodash/get'; diff --git a/dist/no-classes-transpile/esm/whyDidYouRender.min.js b/dist/no-classes-transpile/esm/whyDidYouRender.min.js index f8ef421..6915ec1 100644 --- a/dist/no-classes-transpile/esm/whyDidYouRender.min.js +++ b/dist/no-classes-transpile/esm/whyDidYouRender.min.js @@ -1,8 +1,8 @@ /** - * @welldone-software/why-did-you-render 4.1.1 + * @welldone-software/why-did-you-render 4.1.2 * MIT Licensed * Generated by Vitali Zaidman (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ import e from"lodash/get";import r from"lodash/isString";import t from"lodash/reduce";import n from"lodash/has";import o from"lodash/keys";import a from"lodash/isSet";import i from"lodash/isFunction";import s from"lodash/isRegExp";import c from"lodash/isDate";import f from"lodash/isPlainObject";import u from"lodash/isArray";import p from"lodash/defaults";function l(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function m(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}var D,w="different",k="deepEquals",R="date",N="regex",O="reactElement",S="function",_="function"==typeof Symbol&&Symbol.for,E=_?Symbol.for("react.memo"):60115,C=_?Symbol.for("react.forward_ref"):60112,x=(l(D={},w,"different objects."),l(D,k,"different objects that are equal by value."),l(D,R,"different date objects with the same value."),l(D,N,"different regular expressions with the same value."),l(D,O,"different React elements with the same displayName."),l(D,S,"different functions with the same name."),D),j=!1;function T(e){var r=e.Component,t=e.displayName,n=e.hookName,o=e.prefixMessage,a=e.diffObjType,i=e.differences,s=e.values,c=e.options;i&&i.length>0?(c.consoleLog(l({},t,r),"".concat(o," of ").concat(a," changes:")),i.forEach((function(e){var r=e.pathString,t=e.diffType,o=e.prevValue,i=e.nextValue;c.consoleGroup("%c".concat("hook"===a?"[hook ".concat(n," result]"):"".concat(a,"."),"%c").concat(r,"%c"),"color:".concat(c.diffNameColor,";"),"color:".concat(c.diffPathColor,";"),"color:default;"),c.consoleLog("".concat(x[t]," (more info at ").concat(n?"http://bit.ly/wdyr3":"http://bit.ly/wdyr02",")")),c.consoleLog(l({},"prev ".concat(r),o),"!==",l({},"next ".concat(r),i)),c.consoleGroupEnd()}))):i&&(c.consoleLog(l({},t,r),"".concat(o," the ").concat(a," object itself changed but its values are all equal."),"props"===a?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat("http://bit.ly/wdyr02")),c.consoleLog("prev ".concat(a,":"),s.prev," !== ",s.next,":next ".concat(a)))}function P(e){var r=e.Component,t=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,s=e.nextProps,c=e.nextState,f=e.nextHook,u=e.reason,p=e.options,d=e.ownerDataMap;if(function(e,r,t){return!j&&(!!t.logOnDifferentValues||(!(!r.whyDidYouRender||!r.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===w}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===w}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===w})))))}(u,r,p)){p.consoleGroup("%c".concat(t),"color: ".concat(p.titleColor,";"));var m="Re-rendered because";if(u.propsDifferences&&(T({Component:r,displayName:t,prefixMessage:m,diffObjType:"props",differences:u.propsDifferences,values:{prev:o,next:s},options:p}),m="And because"),u.stateDifferences&&T({Component:r,displayName:t,prefixMessage:m,diffObjType:"state",differences:u.stateDifferences,values:{prev:a,next:c},options:p}),u.hookDifferences&&T({Component:r,displayName:t,prefixMessage:m,diffObjType:"hook",differences:u.hookDifferences,values:{prev:i,next:f},hookName:n,options:p}),u.propsDifferences&&u.ownerDifferences){var h=d.get(o),y=d.get(s);p.consoleGroup("Rendered by ".concat(y.displayName));var v="Re-rendered because";u.ownerDifferences.propsDifferences&&(T({Component:y.Component,displayName:y.displayName,prefixMessage:v,diffObjType:"props",differences:u.ownerDifferences.propsDifferences,values:{prev:h.props,next:y.props},options:p}),v="And because"),u.ownerDifferences.stateDifferences&&T({Component:y.Component,displayName:y.displayName,prefixMessage:v,diffObjType:"state",differences:u.ownerDifferences.stateDifferences,values:{prev:h.state,next:y.state},options:p}),u.ownerDifferences.hookDifferences&&u.ownerDifferences.hookDifferences.forEach((function(e,r){var t=e.hookName,n=e.differences;return T({Component:y.Component,displayName:y.displayName,prefixMessage:v,diffObjType:"hook",differences:n,values:{prev:h.hooks[r].result,next:y.hooks[r].result},hookName:t,options:p})})),p.consoleGroupEnd()}u.propsDifferences||u.stateDifferences||u.hookDifferences||p.consoleLog(l({},t,r),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat("http://bit.ly/wdyr02")),p.consoleGroupEnd()}}function H(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(r){"idle"===r&&(j=!0,setTimeout((function(){j=!1}),e))})),P}var Y=function(){};function M(e){return e.displayName||e.name||e.type&&M(e.type)||e.render&&M(e.render)||(r(e)?e:void 0)}var A="undefined"!=typeof Element,I="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,W=function(e){return e.$$typeof===I};function L(e,r,t,n,o){return t.push({diffType:o,pathString:n,prevValue:e,nextValue:r}),o!==w}function F(e,r,t){try{var p=[];return function e(r,t,p){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(r===t)return!0;if(!r||!t)return L(r,t,p,l,w);if(u(r)&&u(t)){var d=r.length;if(d!==t.length)return L(y(r),y(t),p,l,w);for(var h=!0,v=d;0!=v--;)e(r[v],t[v],p,"".concat(l,"[").concat(v,"]"))||(h=!1);return L(y(r),y(t),p,l,h?k:w)}if(a(r)&&a(t)){if(r.size!==t.size)return L(new Set(r),new Set(t),p,l,w);var g,D=b(r);try{for(D.s();!(g=D.n()).done;){var _=g.value;if(!t.has(_))return L(new Set(r),new Set(t),p,l,w)}}catch(e){D.e(e)}finally{D.f()}return L(new Set(r),new Set(t),p,l,k)}if(c(r)&&c(t))return r.getTime()===t.getTime()?L(new Date(r),new Date(t),p,l,R):L(new Date(r),new Date(t),p,l,w);if(s(r)&&s(t))return r.toString()===t.toString()?L(r,t,p,l,N):L(r,t,p,l,w);if(A&&r instanceof Element&&t instanceof Element)return L(r,t,p,l,w);if(W(r)&&W(t)){if(r.type!==t.type)return L(r,t,p,l,w);var E=e(r.props,t.props,p,"".concat(l,".props"));return L(r,t,p,l,E?O:w)}if(i(r)&&i(t))return r.name===t.name?L(r,t,p,l,S):L(r,t,p,l,w);if(f(r)&&f(t)){var C=o(r),x=C.length;if(x!==o(t).length)return L(m({},r),m({},t),p,l,w);for(var j=x;0!=j--;)if(!n(t,C[j]))return L(m({},r),m({},t),p,l,w);for(var T=!0,P=x;0!=P--;){var H=C[P];e(r[H],t[H],p,"".concat(l,".").concat(H))||(T=!1)}return L(m({},r),m({},t),p,l,T?k:w)}return L(r,t,p,l,w)}(e,r,p,t),p}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var U={};function G(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.shallow,a=void 0===o||o;if(e===r)return!1;if(!a)return F(e,r);var i=e||U,s=r||U,c=Object.keys(m({},i,{},s));return t(c,(function(e,r){var t=F(i[r],s[r],r);return t&&(e=[].concat(y(e),y(t))),e}),[])}function V(e,r,t,n,o,a,i){var s=i.get(e),c=i.get(n);return{propsDifferences:G(e,n),stateDifferences:G(r,o),hookDifferences:G(t,a,{shallow:!1}),ownerDifferences:null!=s&&null!=c&&{propsDifferences:G(s.props,c.props),stateDifferences:G(s.state,c.state),hookDifferences:s.hooks.map((function(e,r){return{hookName:e.hookName,differences:G(e.result,c.hooks[r].result,{shallow:!1})}}))}}}function $(e){var r=e.Component,t=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,s=e.nextProps,c=e.nextState,f=e.nextHook,u=e.options,p=e.ownerDataMap;return{Component:r,displayName:t,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:s,nextState:c,nextHook:f,options:u,ownerDataMap:p,reason:V(o,a,i,s,c,f,p)}}function B(e){return e.prototype&&!!e.prototype.isReactComponent}function q(e){return e.$$typeof===E}function z(e){return e.$$typeof===C}function J(e){var r=e.Component,t=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,r){return r.exclude&&r.exclude.length>0&&r.exclude.some((function(r){return r.test(e)}))}(t,n)&&(!1!==r.whyDidYouRender&&((!a||!r.whyDidYouRender||!1!==r.whyDidYouRender.trackHooks)&&!!(r.whyDidYouRender||n.trackAllPureComponents&&(r&&r.prototype instanceof o.PureComponent||q(r))||function(e,r){return r.include&&r.include.length>0&&r.include.some((function(r){return r.test(e)}))}(t,n))))}function K(e,r,t,n,o){class a extends e{constructor(r,t){var n;super(r,t),n=this,this._WDYR={renderNumber:0};var o=super.render||this.render;o!==e.prototype.render&&(this.render=function(){return a.prototype.render.apply(n),o()})}render(){return this._WDYR.renderNumber++,"isStrictMode"in this._WDYR||(this._WDYR.isStrictMode=function(e){for(var r=e&&e._reactInternalFiber;r;){if(1&r.mode)return!0;r=r.return}return!1}(this)),this._WDYR.isStrictMode&&this._WDYR.renderNumber%2==1||(this._WDYR.prevProps&&n.notifier($({Component:e,displayName:r,prevProps:this._WDYR.prevProps,prevState:this._WDYR.prevState,nextProps:this.props,nextState:this.state,options:n,ownerDataMap:o})),this._WDYR.prevProps=this.props,this._WDYR.prevState=this.state),super.render?super.render():null}}try{a.displayName=r}catch(e){}return p(a,e),a}function Q(e,r,t,n,o,a){var i="string"==typeof e?function(e,r){return function(t){return r.createElement(e,t)}}(e,n):e;function s(){var e=arguments[0],s=n.useRef(),c=s.current;if(s.current=e,c){var f=$({Component:i,displayName:t,prevProps:c,nextProps:e,options:o,ownerDataMap:a}),u=f.reason.propsDifferences&&!(r&&0===f.reason.propsDifferences.length);u&&o.notifier(f)}return i.apply(void 0,arguments)}try{s.displayName=t}catch(e){}return s.ComponentForHooksTracking=i,p(s,i),s}var X=Symbol("initial-hook-value");function Z(r,t,n,o,a,i,s){var c=t.path,f=c?e(n,c):n;s.current.push({hookName:r,result:f});var u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current,p=o.useRef(X);if(!u)return n;var l=u.type.ComponentForHooksTracking||u.type,d=M(l);if(!J({Component:l,displayName:d,options:a,React:o,isHookChange:!0}))return n;var m=p.current;if(p.current=n,m!==X){var h=$({Component:l,displayName:d,hookName:r,prevHook:c?e(m,c):m,nextHook:f,options:a,ownerDataMap:i});h.reason.hookDifferences&&a.notifier(h)}return n}function ee(e,r,t,n,o,a){return q(r)?function e(r,t,n,o,a){var i=r.type,s=B(i),c=z(i),f=q(i),u=c?i.render:i,l=s?K(u,t,0,o,a):f?e(u,t,n,o,a):Q(u,!0,t,n,o,a);try{l.displayName=M(u)}catch(e){}l.ComponentForHooksTracking=r,p(l,u);var d=n.memo(c?n.forwardRef(l):l,r.compare);try{d.displayName=t}catch(e){}return p(d,r),d}(r,t,n,o,a):z(r)?function(e,r,t,n,o){var a=e.render,i=q(a),s=i?a.type:a,c=Q(s,i,r,t,n,o);c.displayName=M(s),c.ComponentForHooksTracking=s,p(c,s);var f=t.forwardRef(i?t.memo(c,a.compare):c);try{f.displayName=r}catch(e){}return p(f,e),f}(r,t,n,o,a):B(r)?K(r,t,0,o,a):Q(r,!1,t,n,o,a)}function re(e,r,t,n,o,a){if(e.has(r))return e.get(r);var i=ee(0,r,t,n,o,a);return e.set(r,i),i}var te={useState:{path:"0"},useReducer:{path:"0"},useContext:!0,useMemo:!0};function ne(e,r){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=console.group,t=console.groupEnd;e.collapseGroups?r=console.groupCollapsed:e.onlyLogs&&(r=console.log,t=Y);var n=e.notifier||H("hotReloadBufferMs"in e?e.hotReloadBufferMs:500);return m({include:null,exclude:null,notifier:n,onlyLogs:!1,consoleLog:console.log,consoleGroup:r,consoleGroupEnd:t,logOnDifferentValues:!1,logOwnerReasons:!1,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(r),n=e.createElement,o=e.createFactory,a=new WeakMap,i=new WeakMap,s={current:[]},c=null;if(Object.defineProperty(e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return c},set:function(e){c=e,s.current=[]}}),e.createElement=function(r){for(var o=null,c=null,f=null,u=arguments.length,p=new Array(u>1?u-1:0),l=1;l (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ (function (global, factory) { diff --git a/dist/no-classes-transpile/umd/whyDidYouRender.min.js b/dist/no-classes-transpile/umd/whyDidYouRender.min.js index a13cb36..45f0071 100644 --- a/dist/no-classes-transpile/umd/whyDidYouRender.min.js +++ b/dist/no-classes-transpile/umd/whyDidYouRender.min.js @@ -1,8 +1,8 @@ /** - * @welldone-software/why-did-you-render 4.1.1 + * @welldone-software/why-did-you-render 4.1.2 * MIT Licensed * Generated by Vitali Zaidman (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).whyDidYouRender=t()}(this,(function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,i=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}var u=Array.isArray,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e,t){return e(t={exports:{}},t.exports),t.exports}var l="object"==typeof f&&f&&f.Object===Object&&f,p="object"==typeof self&&self&&self.Object===Object&&self,v=l||p||Function("return this")(),h=v.Symbol,d=Object.prototype,y=d.hasOwnProperty,b=d.toString,m=h?h.toStringTag:void 0;var g=function(e){var t=y.call(e,m),r=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=b.call(e);return n&&(t?e[m]=r:delete e[m]),o},_=Object.prototype.toString;var j=function(e){return _.call(e)},w=h?h.toStringTag:void 0;var O=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?g(e):j(e)};var D=function(e){return null!=e&&"object"==typeof e};var k=function(e){return"symbol"==typeof e||D(e)&&"[object Symbol]"==O(e)},S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,R=/^\w*$/;var E=function(e,t){if(u(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!k(e))||(R.test(e)||!S.test(e)||null!=t&&e in Object(t))};var N=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var x,C=function(e){if(!N(e))return!1;var t=O(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},P=v["__core-js_shared__"],A=(x=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"";var T=function(e){return!!A&&A in e},M=Function.prototype.toString;var Y=function(e){if(null!=e){try{return M.call(e)}catch(e){}try{return e+""}catch(e){}}return""},H=/^\[object .+?Constructor\]$/,z=Function.prototype,I=Object.prototype,L=z.toString,W=I.hasOwnProperty,F=RegExp("^"+L.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var U=function(e){return!(!N(e)||T(e))&&(C(e)?F:H).test(Y(e))};var $=function(e,t){return null==e?void 0:e[t]};var V=function(e,t){var r=$(e,t);return U(r)?r:void 0},B=V(Object,"create");var G=function(){this.__data__=B?B(null):{},this.size=0};var q=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},J=Object.prototype.hasOwnProperty;var K=function(e){var t=this.__data__;if(B){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return J.call(t,e)?t[e]:void 0},Q=Object.prototype.hasOwnProperty;var X=function(e){var t=this.__data__;return B?void 0!==t[e]:Q.call(t,e)};var Z=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1};var fe=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function se(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t0?(f.consoleLog(e({},n,r),"".concat(a," of ").concat(i," changes:")),c.forEach((function(t){var r=t.pathString,n=t.diffType,a=t.prevValue,c=t.nextValue;f.consoleGroup("%c".concat("hook"===i?"[hook ".concat(o," result]"):"".concat(i,"."),"%c").concat(r,"%c"),"color:".concat(f.diffNameColor,";"),"color:".concat(f.diffPathColor,";"),"color:default;"),f.consoleLog("".concat(Be[n]," (more info at ").concat(o?"http://bit.ly/wdyr3":"http://bit.ly/wdyr02",")")),f.consoleLog(e({},"prev ".concat(r),a),"!==",e({},"next ".concat(r),c)),f.consoleGroupEnd()}))):c&&(f.consoleLog(e({},n,r),"".concat(a," the ").concat(i," object itself changed but its values are all equal."),"props"===i?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat("http://bit.ly/wdyr02")),f.consoleLog("prev ".concat(i,":"),u.prev," !== ",u.next,":next ".concat(i)))}function Je(t){var r=t.Component,n=t.displayName,o=t.hookName,a=t.prevProps,i=t.prevState,c=t.prevHook,u=t.nextProps,f=t.nextState,s=t.nextHook,l=t.reason,p=t.options,v=t.ownerDataMap;if(function(e,t,r){return!Ge&&(!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===He}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===He}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===He})))))}(l,r,p)){p.consoleGroup("%c".concat(n),"color: ".concat(p.titleColor,";"));var h="Re-rendered because";if(l.propsDifferences&&(qe({Component:r,displayName:n,prefixMessage:h,diffObjType:"props",differences:l.propsDifferences,values:{prev:a,next:u},options:p}),h="And because"),l.stateDifferences&&qe({Component:r,displayName:n,prefixMessage:h,diffObjType:"state",differences:l.stateDifferences,values:{prev:i,next:f},options:p}),l.hookDifferences&&qe({Component:r,displayName:n,prefixMessage:h,diffObjType:"hook",differences:l.hookDifferences,values:{prev:c,next:s},hookName:o,options:p}),l.propsDifferences&&l.ownerDifferences){var d=v.get(a),y=v.get(u);p.consoleGroup("Rendered by ".concat(y.displayName));var b="Re-rendered because";l.ownerDifferences.propsDifferences&&(qe({Component:y.Component,displayName:y.displayName,prefixMessage:b,diffObjType:"props",differences:l.ownerDifferences.propsDifferences,values:{prev:d.props,next:y.props},options:p}),b="And because"),l.ownerDifferences.stateDifferences&&qe({Component:y.Component,displayName:y.displayName,prefixMessage:b,diffObjType:"state",differences:l.ownerDifferences.stateDifferences,values:{prev:d.state,next:y.state},options:p}),l.ownerDifferences.hookDifferences&&l.ownerDifferences.hookDifferences.forEach((function(e,t){var r=e.hookName,n=e.differences;return qe({Component:y.Component,displayName:y.displayName,prefixMessage:b,diffObjType:"hook",differences:n,values:{prev:d.hooks[t].result,next:y.hooks[t].result},hookName:r,options:p})})),p.consoleGroupEnd()}l.propsDifferences||l.stateDifferences||l.hookDifferences||p.consoleLog(e({},n,r),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat("http://bit.ly/wdyr02")),p.consoleGroupEnd()}}function Ke(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(t){"idle"===t&&(Ge=!0,setTimeout((function(){Ge=!1}),e))})),Je}var Qe=function(){};var Xe=function(e){return"string"==typeof e||!u(e)&&D(e)&&"[object String]"==O(e)};function Ze(e){return e.displayName||e.name||e.type&&Ze(e.type)||e.render&&Ze(e.render)||(Xe(e)?e:void 0)}var et=function(e,t,r,n){var o=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++o]);++o-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},vt={};vt["[object Float32Array]"]=vt["[object Float64Array]"]=vt["[object Int8Array]"]=vt["[object Int16Array]"]=vt["[object Int32Array]"]=vt["[object Uint8Array]"]=vt["[object Uint8ClampedArray]"]=vt["[object Uint16Array]"]=vt["[object Uint32Array]"]=!0,vt["[object Arguments]"]=vt["[object Array]"]=vt["[object ArrayBuffer]"]=vt["[object Boolean]"]=vt["[object DataView]"]=vt["[object Date]"]=vt["[object Error]"]=vt["[object Function]"]=vt["[object Map]"]=vt["[object Number]"]=vt["[object Object]"]=vt["[object RegExp]"]=vt["[object Set]"]=vt["[object String]"]=vt["[object WeakMap]"]=!1;var ht=function(e){return D(e)&&pt(e.length)&&!!vt[O(e)]};var dt=function(e){return function(t){return e(t)}},yt=s((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r&&l.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a})),bt=yt&&yt.isTypedArray,mt=bt?dt(bt):ht,gt=Object.prototype.hasOwnProperty;var _t=function(e,t){var r=u(e),n=!r&&ct(e),o=!r&&!n&&ft(e),a=!r&&!n&&!o&&mt(e),i=r||n||o||a,c=i?rt(e.length,String):[],f=c.length;for(var s in e)!t&&!gt.call(e,s)||i&&("length"==s||o&&("offset"==s||"parent"==s)||a&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||lt(s,f))||c.push(s);return c},jt=Object.prototype;var wt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||jt)};var Ot=function(e,t){return function(r){return e(t(r))}},Dt=Ot(Object.keys,Object),kt=Object.prototype.hasOwnProperty;var St=function(e){if(!wt(e))return Dt(e);var t=[];for(var r in Object(e))kt.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Rt=function(e){return null!=e&&pt(e.length)&&!C(e)};var Et=function(e){return Rt(e)?_t(e):St(e)};var Nt=function(e,t){return function(r,n){if(null==r)return r;if(!Rt(r))return e(r,n);for(var o=r.length,a=t?o:-1,i=Object(r);(t?a--:++ac))return!1;var f=a.get(e);if(f&&a.get(t))return f==t;var s=-1,l=!0,p=2&r?new Lt:void 0;for(a.set(e,t),a.set(t,e);++s3&&void 0!==arguments[3]?arguments[3]:"";if(t===n)return!0;if(!t||!n)return on(t,n,a,i,He);if(u(t)&&u(n)){var f=t.length;if(f!==n.length)return on(o(t),o(n),a,i,He);for(var s=!0,l=f;0!=l--;)e(t[l],n[l],a,"".concat(i,"[").concat(l,"]"))||(s=!1);return on(o(t),o(n),a,i,s?ze:He)}if(Wr(t)&&Wr(n)){if(t.size!==n.size)return on(new Set(t),new Set(n),a,i,He);var p,v=c(t);try{for(v.s();!(p=v.n()).done;){var h=p.value;if(!n.has(h))return on(new Set(t),new Set(n),a,i,He)}}catch(e){v.e(e)}finally{v.f()}return on(new Set(t),new Set(n),a,i,ze)}if(Gr(t)&&Gr(n))return t.getTime()===n.getTime()?on(new Date(t),new Date(n),a,i,Ie):on(new Date(t),new Date(n),a,i,He);if($r(t)&&$r(n))return t.toString()===n.toString()?on(t,n,a,i,Le):on(t,n,a,i,He);if(tn&&t instanceof Element&&n instanceof Element)return on(t,n,a,i,He);if(nn(t)&&nn(n)){if(t.type!==n.type)return on(t,n,a,i,He);var d=e(t.props,n.props,a,"".concat(i,".props"));return on(t,n,a,i,d?We:He)}if(C(t)&&C(n))return t.name===n.name?on(t,n,a,i,Fe):on(t,n,a,i,He);if(en(t)&&en(n)){var y=Et(t),b=y.length;if(b!==Et(n).length)return on(r({},t),r({},n),a,i,He);for(var m=b;0!=m--;)if(!zr(n,y[m]))return on(r({},t),r({},n),a,i,He);for(var g=!0,_=b;0!=_--;){var j=y[_];e(t[j],n[j],a,"".concat(i,".").concat(j))||(g=!1)}return on(r({},t),r({},n),a,i,g?ze:He)}return on(t,n,a,i,He)}(e,t,a,n),a}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var cn={};function un(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.shallow,i=void 0===a||a;if(e===t)return!1;if(!i)return an(e,t);var c=e||cn,u=t||cn,f=Object.keys(r({},c,{},u));return Mr(f,(function(e,t){var r=an(c[t],u[t],t);return r&&(e=[].concat(o(e),o(r))),e}),[])}function fn(e,t,r,n,o,a,i){var c=i.get(e),u=i.get(n);return{propsDifferences:un(e,n),stateDifferences:un(t,o),hookDifferences:un(r,a,{shallow:!1}),ownerDifferences:null!=c&&null!=u&&{propsDifferences:un(c.props,u.props),stateDifferences:un(c.state,u.state),hookDifferences:c.hooks.map((function(e,t){return{hookName:e.hookName,differences:un(e.result,u.hooks[t].result,{shallow:!1})}}))}}}function sn(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,u=e.nextState,f=e.nextHook,s=e.options,l=e.ownerDataMap;return{Component:t,displayName:r,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:c,nextState:u,nextHook:f,options:s,ownerDataMap:l,reason:fn(o,a,i,c,u,f,l)}}function ln(e){return e.prototype&&!!e.prototype.isReactComponent}function pn(e){return e.$$typeof===$e}function vn(e){return e.$$typeof===Ve}function hn(e){var t=e.Component,r=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some((function(t){return t.test(e)}))}(r,n)&&(!1!==t.whyDidYouRender&&((!a||!t.whyDidYouRender||!1!==t.whyDidYouRender.trackHooks)&&!!(t.whyDidYouRender||n.trackAllPureComponents&&(t&&t.prototype instanceof o.PureComponent||pn(t))||function(e,t){return t.include&&t.include.length>0&&t.include.some((function(t){return t.test(e)}))}(r,n))))}var dn=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},yn=Math.max;var bn=function(e,t,r){return t=yn(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=yn(n.length-t,0),i=Array(a);++o0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(_n);var On=function(e,t){return wn(bn(e,t,Nr),e+"")};var Dn=function(e,t,r){if(!N(r))return!1;var n=typeof t;return!!("number"==n?Rt(r)&<(t,r.length):"string"==n&&t in r)&&ne(r[t],e)};var kn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},Sn=Object.prototype.hasOwnProperty;var Rn=function(e){if(!N(e))return kn(e);var t=wt(e),r=[];for(var n in e)("constructor"!=n||!t&&Sn.call(e,n))&&r.push(n);return r};var En=function(e){return Rt(e)?_t(e,!0):Rn(e)},Nn=Object.prototype,xn=Nn.hasOwnProperty,Cn=On((function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&Dn(t[0],t[1],o)&&(n=1);++r0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,n=console.groupEnd;e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,n=Qe);var o=e.notifier||Ke("hotReloadBufferMs"in e?e.hotReloadBufferMs:500);return r({include:null,exclude:null,notifier:o,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:n,logOnDifferentValues:!1,logOwnerReasons:!1,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(t),i=e.createElement,c=e.createFactory,u=new WeakMap,f=new WeakMap,s={current:[]},l=null;if(Object.defineProperty(e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return l},set:function(e){l=e,s.current=[]}}),e.createElement=function(t){for(var r=null,n=null,o=null,c=arguments.length,l=new Array(c>1?c-1:0),p=1;p (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ (function (global, factory) { diff --git a/dist/umd/whyDidYouRender.min.js b/dist/umd/whyDidYouRender.min.js index 090050d..839934c 100644 --- a/dist/umd/whyDidYouRender.min.js +++ b/dist/umd/whyDidYouRender.min.js @@ -1,8 +1,8 @@ /** - * @welldone-software/why-did-you-render 4.1.1 + * @welldone-software/why-did-you-render 4.1.2 * MIT Licensed * Generated by Vitali Zaidman (https://github.com/vzaidman) - * Generated at 2020-04-21 + * Generated at 2020-04-23 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).whyDidYouRender=t()}(this,(function(){"use strict";function e(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}var h=Array.isArray,d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(e,t){return e(t={exports:{}},t.exports),t.exports}var m="object"==typeof d&&d&&d.Object===Object&&d,g="object"==typeof self&&self&&self.Object===Object&&self,_=m||g||Function("return this")(),j=_.Symbol,w=Object.prototype,O=w.hasOwnProperty,D=w.toString,k=j?j.toStringTag:void 0;var S=function(e){var t=O.call(e,k),r=e[k];try{e[k]=void 0;var n=!0}catch(e){}var o=D.call(e);return n&&(t?e[k]=r:delete e[k]),o},R=Object.prototype.toString;var E=function(e){return R.call(e)},N=j?j.toStringTag:void 0;var x=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":N&&N in Object(e)?S(e):E(e)};var P=function(e){return null!=e&&"object"==typeof e};var C=function(e){return"symbol"==typeof e||P(e)&&"[object Symbol]"==x(e)},A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/;var M=function(e,t){if(h(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!C(e))||(T.test(e)||!A.test(e)||null!=t&&e in Object(t))};var Y=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var H,z=function(e){if(!Y(e))return!1;var t=x(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},I=_["__core-js_shared__"],L=(H=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"";var W=function(e){return!!L&&L in e},F=Function.prototype.toString;var U=function(e){if(null!=e){try{return F.call(e)}catch(e){}try{return e+""}catch(e){}}return""},$=/^\[object .+?Constructor\]$/,V=Function.prototype,B=Object.prototype,G=V.toString,q=B.hasOwnProperty,J=RegExp("^"+G.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var K=function(e){return!(!Y(e)||W(e))&&(z(e)?J:$).test(U(e))};var Q=function(e,t){return null==e?void 0:e[t]};var X=function(e,t){var r=Q(e,t);return K(r)?r:void 0},Z=X(Object,"create");var ee=function(){this.__data__=Z?Z(null):{},this.size=0};var te=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re=Object.prototype.hasOwnProperty;var ne=function(e){var t=this.__data__;if(Z){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return re.call(t,e)?t[e]:void 0},oe=Object.prototype.hasOwnProperty;var ae=function(e){var t=this.__data__;return Z?void 0!==t[e]:oe.call(t,e)};var ie=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z&&void 0===t?"__lodash_hash_undefined__":t,this};function ce(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1};var de=function(e,t){var r=this.__data__,n=le(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function be(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t0?(f.consoleLog(t({},n,r),"".concat(a," of ").concat(i," changes:")),c.forEach((function(e){var r=e.pathString,n=e.diffType,a=e.prevValue,c=e.nextValue;f.consoleGroup("%c".concat("hook"===i?"[hook ".concat(o," result]"):"".concat(i,"."),"%c").concat(r,"%c"),"color:".concat(f.diffNameColor,";"),"color:".concat(f.diffPathColor,";"),"color:default;"),f.consoleLog("".concat(Ze[n]," (more info at ").concat(o?"http://bit.ly/wdyr3":"http://bit.ly/wdyr02",")")),f.consoleLog(t({},"prev ".concat(r),a),"!==",t({},"next ".concat(r),c)),f.consoleGroupEnd()}))):c&&(f.consoleLog(t({},n,r),"".concat(a," the ").concat(i," object itself changed but its values are all equal."),"props"===i?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat("http://bit.ly/wdyr02")),f.consoleLog("prev ".concat(i,":"),u.prev," !== ",u.next,":next ".concat(i)))}function rt(e){var r=e.Component,n=e.displayName,o=e.hookName,a=e.prevProps,i=e.prevState,c=e.prevHook,u=e.nextProps,f=e.nextState,s=e.nextHook,l=e.reason,p=e.options,v=e.ownerDataMap;if(function(e,t,r){return!et&&(!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===$e}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===$e}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===$e})))))}(l,r,p)){p.consoleGroup("%c".concat(n),"color: ".concat(p.titleColor,";"));var y="Re-rendered because";if(l.propsDifferences&&(tt({Component:r,displayName:n,prefixMessage:y,diffObjType:"props",differences:l.propsDifferences,values:{prev:a,next:u},options:p}),y="And because"),l.stateDifferences&&tt({Component:r,displayName:n,prefixMessage:y,diffObjType:"state",differences:l.stateDifferences,values:{prev:i,next:f},options:p}),l.hookDifferences&&tt({Component:r,displayName:n,prefixMessage:y,diffObjType:"hook",differences:l.hookDifferences,values:{prev:c,next:s},hookName:o,options:p}),l.propsDifferences&&l.ownerDifferences){var h=v.get(a),d=v.get(u);p.consoleGroup("Rendered by ".concat(d.displayName));var b="Re-rendered because";l.ownerDifferences.propsDifferences&&(tt({Component:d.Component,displayName:d.displayName,prefixMessage:b,diffObjType:"props",differences:l.ownerDifferences.propsDifferences,values:{prev:h.props,next:d.props},options:p}),b="And because"),l.ownerDifferences.stateDifferences&&tt({Component:d.Component,displayName:d.displayName,prefixMessage:b,diffObjType:"state",differences:l.ownerDifferences.stateDifferences,values:{prev:h.state,next:d.state},options:p}),l.ownerDifferences.hookDifferences&&l.ownerDifferences.hookDifferences.forEach((function(e,t){var r=e.hookName,n=e.differences;return tt({Component:d.Component,displayName:d.displayName,prefixMessage:b,diffObjType:"hook",differences:n,values:{prev:h.hooks[t].result,next:d.hooks[t].result},hookName:r,options:p})})),p.consoleGroupEnd()}l.propsDifferences||l.stateDifferences||l.hookDifferences||p.consoleLog(t({},n,r),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat("http://bit.ly/wdyr02")),p.consoleGroupEnd()}}function nt(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(t){"idle"===t&&(et=!0,setTimeout((function(){et=!1}),e))})),rt}var ot=function(){};var at=function(e){return"string"==typeof e||!h(e)&&P(e)&&"[object String]"==x(e)};function it(e){return e.displayName||e.name||e.type&&it(e.type)||e.render&&it(e.render)||(at(e)?e:void 0)}var ct=function(e,t,r,n){var o=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++o]);++o-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},_t={};_t["[object Float32Array]"]=_t["[object Float64Array]"]=_t["[object Int8Array]"]=_t["[object Int16Array]"]=_t["[object Int32Array]"]=_t["[object Uint8Array]"]=_t["[object Uint8ClampedArray]"]=_t["[object Uint16Array]"]=_t["[object Uint32Array]"]=!0,_t["[object Arguments]"]=_t["[object Array]"]=_t["[object ArrayBuffer]"]=_t["[object Boolean]"]=_t["[object DataView]"]=_t["[object Date]"]=_t["[object Error]"]=_t["[object Function]"]=_t["[object Map]"]=_t["[object Number]"]=_t["[object Object]"]=_t["[object RegExp]"]=_t["[object Set]"]=_t["[object String]"]=_t["[object WeakMap]"]=!1;var jt=function(e){return P(e)&>(e.length)&&!!_t[x(e)]};var wt=function(e){return function(t){return e(t)}},Ot=b((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r&&m.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a})),Dt=Ot&&Ot.isTypedArray,kt=Dt?wt(Dt):jt,St=Object.prototype.hasOwnProperty;var Rt=function(e,t){var r=h(e),n=!r&&yt(e),o=!r&&!n&&dt(e),a=!r&&!n&&!o&&kt(e),i=r||n||o||a,c=i?ft(e.length,String):[],u=c.length;for(var f in e)!t&&!St.call(e,f)||i&&("length"==f||o&&("offset"==f||"parent"==f)||a&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||mt(f,u))||c.push(f);return c},Et=Object.prototype;var Nt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Et)};var xt=function(e,t){return function(r){return e(t(r))}},Pt=xt(Object.keys,Object),Ct=Object.prototype.hasOwnProperty;var At=function(e){if(!Nt(e))return Pt(e);var t=[];for(var r in Object(e))Ct.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Tt=function(e){return null!=e&>(e.length)&&!z(e)};var Mt=function(e){return Tt(e)?Rt(e):At(e)};var Yt=function(e,t){return function(r,n){if(null==r)return r;if(!Tt(r))return e(r,n);for(var o=r.length,a=t?o:-1,i=Object(r);(t?a--:++ac))return!1;var f=a.get(e);if(f&&a.get(t))return f==t;var s=-1,l=!0,p=2&r?new Gt:void 0;for(a.set(e,t),a.set(t,e);++s3&&void 0!==arguments[3]?arguments[3]:"";if(t===r)return!0;if(!t||!r)return pn(t,r,o,a,$e);if(h(t)&&h(r)){var i=t.length;if(i!==r.length)return pn(l(t),l(r),o,a,$e);for(var c=!0,u=i;0!=u--;)e(t[u],r[u],o,"".concat(a,"[").concat(u,"]"))||(c=!1);return pn(l(t),l(r),o,a,c?Ve:$e)}if(qr(t)&&qr(r)){if(t.size!==r.size)return pn(new Set(t),new Set(r),o,a,$e);var f,s=y(t);try{for(s.s();!(f=s.n()).done;){var p=f.value;if(!r.has(p))return pn(new Set(t),new Set(r),o,a,$e)}}catch(e){s.e(e)}finally{s.f()}return pn(new Set(t),new Set(r),o,a,Ve)}if(en(t)&&en(r))return t.getTime()===r.getTime()?pn(new Date(t),new Date(r),o,a,Be):pn(new Date(t),new Date(r),o,a,$e);if(Qr(t)&&Qr(r))return t.toString()===r.toString()?pn(t,r,o,a,Ge):pn(t,r,o,a,$e);if(fn&&t instanceof Element&&r instanceof Element)return pn(t,r,o,a,$e);if(ln(t)&&ln(r)){if(t.type!==r.type)return pn(t,r,o,a,$e);var v=e(t.props,r.props,o,"".concat(a,".props"));return pn(t,r,o,a,v?qe:$e)}if(z(t)&&z(r))return t.name===r.name?pn(t,r,o,a,Je):pn(t,r,o,a,$e);if(un(t)&&un(r)){var d=Mt(t),b=d.length;if(b!==Mt(r).length)return pn(n({},t),n({},r),o,a,$e);for(var m=b;0!=m--;)if(!Vr(r,d[m]))return pn(n({},t),n({},r),o,a,$e);for(var g=!0,_=b;0!=_--;){var j=d[_];e(t[j],r[j],o,"".concat(a,".").concat(j))||(g=!1)}return pn(n({},t),n({},r),o,a,g?Ve:$e)}return pn(t,r,o,a,$e)}(e,t,o,r),o}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var yn={};function hn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.shallow,a=void 0===o||o;if(e===t)return!1;if(!a)return vn(e,t);var i=e||yn,c=t||yn,u=Object.keys(n({},i,{},c));return Fr(u,(function(e,t){var r=vn(i[t],c[t],t);return r&&(e=[].concat(l(e),l(r))),e}),[])}function dn(e,t,r,n,o,a,i){var c=i.get(e),u=i.get(n);return{propsDifferences:hn(e,n),stateDifferences:hn(t,o),hookDifferences:hn(r,a,{shallow:!1}),ownerDifferences:null!=c&&null!=u&&{propsDifferences:hn(c.props,u.props),stateDifferences:hn(c.state,u.state),hookDifferences:c.hooks.map((function(e,t){return{hookName:e.hookName,differences:hn(e.result,u.hooks[t].result,{shallow:!1})}}))}}}function bn(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,u=e.nextState,f=e.nextHook,s=e.options,l=e.ownerDataMap;return{Component:t,displayName:r,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:c,nextState:u,nextHook:f,options:s,ownerDataMap:l,reason:dn(o,a,i,c,u,f,l)}}function mn(e){return e.prototype&&!!e.prototype.isReactComponent}function gn(e){return e.$$typeof===Qe}function _n(e){return e.$$typeof===Xe}function jn(e){var t=e.Component,r=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some((function(t){return t.test(e)}))}(r,n)&&(!1!==t.whyDidYouRender&&((!a||!t.whyDidYouRender||!1!==t.whyDidYouRender.trackHooks)&&!!(t.whyDidYouRender||n.trackAllPureComponents&&(t&&t.prototype instanceof o.PureComponent||gn(t))||function(e,t){return t.include&&t.include.length>0&&t.include.some((function(t){return t.test(e)}))}(r,n))))}var wn=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},On=Math.max;var Dn=function(e,t,r){return t=On(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=On(n.length-t,0),i=Array(a);++o0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Rn);var xn=function(e,t){return Nn(Dn(e,t,Yr),e+"")};var Pn=function(e,t,r){if(!Y(r))return!1;var n=typeof t;return!!("number"==n?Tt(r)&&mt(t,r.length):"string"==n&&t in r)&&se(r[t],e)};var Cn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},An=Object.prototype.hasOwnProperty;var Tn=function(e){if(!Y(e))return Cn(e);var t=Nt(e),r=[];for(var n in e)("constructor"!=n||!t&&An.call(e,n))&&r.push(n);return r};var Mn=function(e){return Tt(e)?Rt(e,!0):Tn(e)},Yn=Object.prototype,Hn=Yn.hasOwnProperty,zn=xn((function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&Pn(t[0],t[1],o)&&(n=1);++r0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=ot);var o=e.notifier||nt("hotReloadBufferMs"in e?e.hotReloadBufferMs:500);return n({include:null,exclude:null,notifier:o,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1,logOwnerReasons:!1,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(t),o=e.createElement,a=e.createFactory,i=new WeakMap,c=new WeakMap,u={current:[]},f=null;if(Object.defineProperty(e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return f},set:function(e){f=e,u.current=[]}}),e.createElement=function(t){for(var n=null,a=null,f=null,s=arguments.length,l=new Array(s>1?s-1:0),p=1;p