@memlab/lens 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +4 -4
- package/dist/memlens.lib.bundle.js +7 -11
- package/dist/memlens.lib.bundle.min.js +1 -1
- package/dist/memlens.run.bundle.js +10 -15
- package/dist/memlens.run.bundle.min.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -152,7 +152,7 @@ npm run test:e2e
|
|
|
152
152
|
### Learn more
|
|
153
153
|
|
|
154
154
|
Please check out this
|
|
155
|
-
[tutorial page](https://
|
|
155
|
+
[tutorial page](https://meta.github.io/memlab/docs/guides/visually-debug-memory-leaks-with-memlens)
|
|
156
156
|
on how to use MemLens (a debugging utility) to visualize memory leaks in the
|
|
157
157
|
browser for easier memory debugging.
|
|
158
158
|
|
package/dist/index.js
CHANGED
|
@@ -77,17 +77,17 @@ module.exports = require("path");
|
|
|
77
77
|
/******/ });
|
|
78
78
|
/************************************************************************/
|
|
79
79
|
/******/ // The module cache
|
|
80
|
-
/******/
|
|
80
|
+
/******/ const __webpack_module_cache__ = {};
|
|
81
81
|
/******/
|
|
82
82
|
/******/ // The require function
|
|
83
83
|
/******/ function __webpack_require__(moduleId) {
|
|
84
84
|
/******/ // Check if module is in cache
|
|
85
|
-
/******/
|
|
85
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
86
86
|
/******/ if (cachedModule !== undefined) {
|
|
87
87
|
/******/ return cachedModule.exports;
|
|
88
88
|
/******/ }
|
|
89
89
|
/******/ // Create a new module (and put it into the cache)
|
|
90
|
-
/******/
|
|
90
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
91
91
|
/******/ // no module.id needed
|
|
92
92
|
/******/ // no module.loaded needed
|
|
93
93
|
/******/ exports: {}
|
|
@@ -105,7 +105,7 @@ module.exports = require("path");
|
|
|
105
105
|
/******/ // startup
|
|
106
106
|
/******/ // Load entry module and return exports
|
|
107
107
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
108
|
-
/******/
|
|
108
|
+
/******/ let __webpack_exports__ = __webpack_require__(783);
|
|
109
109
|
/******/ module.exports = __webpack_exports__;
|
|
110
110
|
/******/
|
|
111
111
|
/******/ })()
|
|
@@ -148,16 +148,12 @@ class DOMObserver {
|
|
|
148
148
|
if ((0, visual_utils_1.isVisualizerElement)(element)) {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
if (
|
|
151
|
+
if (true) {
|
|
152
152
|
const diff = __classPrivateFieldGet(this, _DOMObserver_instances, "m", _DOMObserver_gatherAllElementsInRemovedSubtree).call(this, element);
|
|
153
153
|
newlyAdded = [...newlyAdded, ...diff];
|
|
154
154
|
}
|
|
155
|
-
else
|
|
156
|
-
|
|
157
|
-
__classPrivateFieldGet(this, _DOMObserver_trackedElements, "f").push(ref);
|
|
158
|
-
__classPrivateFieldGet(this, _DOMObserver_trackedElementSet, "f").add(element);
|
|
159
|
-
newlyAdded.push(ref);
|
|
160
|
-
}
|
|
155
|
+
else // removed by dead control flow
|
|
156
|
+
{}
|
|
161
157
|
};
|
|
162
158
|
mutationsList.forEach(mutation => {
|
|
163
159
|
mutation.addedNodes.forEach(updateCallback);
|
|
@@ -1729,17 +1725,17 @@ function debounce(callback, delay) {
|
|
|
1729
1725
|
/******/ });
|
|
1730
1726
|
/************************************************************************/
|
|
1731
1727
|
/******/ // The module cache
|
|
1732
|
-
/******/
|
|
1728
|
+
/******/ const __webpack_module_cache__ = {};
|
|
1733
1729
|
/******/
|
|
1734
1730
|
/******/ // The require function
|
|
1735
1731
|
/******/ function __webpack_require__(moduleId) {
|
|
1736
1732
|
/******/ // Check if module is in cache
|
|
1737
|
-
/******/
|
|
1733
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
1738
1734
|
/******/ if (cachedModule !== undefined) {
|
|
1739
1735
|
/******/ return cachedModule.exports;
|
|
1740
1736
|
/******/ }
|
|
1741
1737
|
/******/ // Create a new module (and put it into the cache)
|
|
1742
|
-
/******/
|
|
1738
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
1743
1739
|
/******/ // no module.id needed
|
|
1744
1740
|
/******/ // no module.loaded needed
|
|
1745
1741
|
/******/ exports: {}
|
|
@@ -1757,7 +1753,7 @@ function debounce(callback, delay) {
|
|
|
1757
1753
|
/******/ // startup
|
|
1758
1754
|
/******/ // Load entry module and return exports
|
|
1759
1755
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
1760
|
-
/******/
|
|
1756
|
+
/******/ let __webpack_exports__ = __webpack_require__(235);
|
|
1761
1757
|
/******/
|
|
1762
1758
|
/******/ return __webpack_exports__;
|
|
1763
1759
|
/******/ })()
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* SOFTWARE.
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MemLens=t():e.MemLens=t()}(self,()=>(()=>{"use strict";var e={346(e,t){t.config=t.of=t.lF=void 0,t.lF={scanIntervalMs:1e3,maxComponentStackDepth:100,memoryMeasurementIntervalMs:5e3},t.of={enableMutationObserver:!0,enableMemoryTracking:!0,enableComponentStack:!0,enableConsoleLogs:null===window||void 0===window?void 0:window.TEST_MEMORY_SCAN},t.config={performance:t.lF,features:t.of}},54(e,t,n){var i,s,o,r,a,l,c,f,u,d,h,p,v=this&&this.__classPrivateFieldSet||function(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DOMObserver=void 0;const w=n(313),g=n(498),b=(0,w.isWeakAPINative)(),y=void 0!==window.MutationObserver;t.DOMObserver=class{constructor(){i.add(this),s.set(this,void 0),o.set(this,void 0),r.set(this,void 0),a.set(this,void 0),l.set(this,void 0),c.set(this,void 0),f.set(this,void 0),v(this,s,0,"f"),v(this,o,0,"f"),v(this,a,[],"f"),v(this,l,new WeakSet,"f"),v(this,f,[],"f"),this.startMonitoring()}register(e){m(this,f,"f").push(e)}startMonitoring(){if(!b||!y)return;if(null!=m(this,r,"f"))return;v(this,r,new MutationObserver(e=>{let t=[];const n=e=>{if(null==e)return;if(e.nodeType!=Node.ELEMENT_NODE)return;const n=e;if(!(0,g.isVisualizerElement)(n)){const e=m(this,i,"m",p).call(this,n);t=[...t,...e]}};e.forEach(e=>{e.addedNodes.forEach(n),e.removedNodes.forEach(n)}),m(this,f,"f").forEach(e=>e(t))}),"f");const e=()=>{var t;document.body?null===(t=m(this,r,"f"))||void 0===t||t.observe(document.body,{childList:!0,subtree:!0}):setTimeout(e,0)};e(),v(this,c,window.setInterval(()=>{m(this,i,"m",u).call(this)},3e3),"f")}stopMonitoring(){null!=m(this,r,"f")&&(m(this,r,"f").disconnect(),v(this,r,null,"f")),null!=m(this,c,"f")&&(window.clearInterval(m(this,c,"f")),v(this,c,null,"f"))}getDOMElements(){return[...m(this,a,"f")]}getStats(){try{v(this,s,m(this,i,"m",d).call(this),"f"),v(this,o,m(this,i,"m",h).call(this),"f")}catch(e){}return{elements:m(this,s,"f"),detachedElements:m(this,o,"f")}}},s=new WeakMap,o=new WeakMap,r=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,i=new WeakSet,u=function(){const e=[],t=new Set;for(const n of m(this,a,"f")){const i=n.deref();null==i||t.has(i)||(e.push(n),t.add(i))}v(this,a,e,"f")},d=function(){var e,t;return v(this,s,null!==(t=null===(e=null===document||void 0===document?void 0:document.getElementsByTagName("*"))||void 0===e?void 0:e.length)&&void 0!==t?t:0,"f")},h=function(){let e=0;for(const t of m(this,a,"f")){const n=t.deref();n&&!1===n.isConnected&&++e}return v(this,o,e,"f")},p=function(e){const t=[e],n=new Set,i=[];for(;t.length>0;){const e=t.pop();if(null==e||n.has(e))continue;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE)continue;const s=e;if((0,g.isVisualizerElement)(s))continue;if(n.add(s),!m(this,l,"f").has(s)){const e=new WeakRef(s);m(this,a,"f").push(e),m(this,l,"f").add(s),i.push(e)}const o=s.childNodes;for(let e=0;e<o.length;++e)t.push(o[e])}return i}},953(e,t,n){var i,s,o,r,a,l,c,f=this&&this.__classPrivateFieldSet||function(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n},u=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.EventListenerTracker=void 0;const d=n(737),h=n(313);class p{constructor(){i.add(this),s.set(this,void 0),o.set(this,void 0),r.set(this,void 0),a.set(this,void 0),f(this,s,new h.WeakMapPlus({fallback:"noop",cleanupMs:100}),"f"),f(this,o,new Map,"f"),f(this,r,EventTarget.prototype.addEventListener,"f"),f(this,a,EventTarget.prototype.removeEventListener,"f"),u(this,i,"m",l).call(this)}static getInstance(){return p.instance||(p.instance=new p),p.instance}addListener(e,t,n,i){e.addEventListener(t,n,i)}removeListener(e,t,n,i){e.removeEventListener(t,n,i)}scan(e){const t=new Map;for(const[n,i]of u(this,s,"f").entries())if(n instanceof Element&&!n.isConnected)for(const s of i){if(!s.cb.deref())continue;const i=e(new WeakRef(n));t.has(i)||t.set(i,[]);const o=t.get(i);let r=null==o?void 0:o.find(e=>e.type===s.type);r||(r={type:s.type,count:0,entries:[]},null==o||o.push(r)),r.count++,r.entries.push(new WeakRef(s))}return f(this,o,t,"f"),t}getDetachedListeners(){return u(this,o,"f")}destroy(){u(this,i,"m",c).call(this),u(this,s,"f").destroy(),u(this,o,"f").clear(),p.instance=null}}t.EventListenerTracker=p,s=new WeakMap,o=new WeakMap,r=new WeakMap,a=new WeakMap,i=new WeakSet,l=function(){const e=this;EventTarget.prototype.addEventListener=function(t,n,i){var o;if(u(e,r,"f").call(this,t,n,i),this instanceof Element){const r=(0,d.getFiberNodeFromElement)(this),a={type:t,cb:new WeakRef(n),options:i,fiber:r?new WeakRef(r):void 0},l=null!==(o=u(e,s,"f").get(this))&&void 0!==o?o:[];l.push(a),u(e,s,"f").set(this,l)}},EventTarget.prototype.removeEventListener=function(t,n,i){if(u(e,a,"f").call(this,t,n,i),this instanceof Element){const o=u(e,s,"f").get(this);if(o){const r=o.findIndex(e=>e.type===t&&e.cb.deref()===n&&e.options===i);-1!==r&&o.splice(r,1),0===o.length?u(e,s,"f").delete(this):u(e,s,"f").set(this,o)}}}},c=function(){EventTarget.prototype.addEventListener=u(this,r,"f"),EventTarget.prototype.removeEventListener=u(this,a,"f")},p.instance=null},302(e,t,n){var i,s=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),r=0;r<n.length;r++)"default"!==n[r]&&s(t,e,n[r]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(476)),l=n(737),c=n(847);t.default=class{scan(e,t){var n;const i=new Set,s=new Set,o=new Map,r=new Map,f=new Set,u=new Set,d=[];let h=0,p=0;function v(e){(0,l.traverseFiber)(e,e=>{if(u.has(e))return!0;u.add(e);const t=(0,l.getDisplayNameOfFiberNode)(e);return null!=t&&(0,c.isValidComponentName)(t)?(s.add(t),a.addCountbyKey(o,t,1),!0):void 0},!0)}for(const s of e){const e=s.deref();if(null==e)continue;if(++h,!e.isConnected){if(t.has(e)){const i=(null!==(n=t.get(e))&&void 0!==n?n:[])[0];e.__component_name=i,a.addCountbyKey(r,i,1)}++p}const o=(0,l.getFiberNodeFromElement)(e);if(null==o)continue;v(o);const c=(0,l.getTopMostFiberWithChild)(o);null!=c&&(i.has(c)||(i.add(c),(0,l.traverseFiber)(c,e=>{if(f.has(e))return!0;f.add(e),d.push(new WeakRef(e)),v(e)},!1)))}return f.clear(),u.clear(),i.clear(),{components:s,componentToFiberNodeCount:o,totalElements:h,totalDetachedElements:p,detachedComponentToFiberNodeCount:r,fiberNodes:d,leakedFibers:[]}}}},282(e,t,n){var i,s,o,r,a,l,c,f,u,d,h,p,v,m,w,g,b,y,M,k,E,W,_,O,S,T=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),N=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),F=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&T(t,e,n[s]);return N(t,e),t}),I=this&&this.__classPrivateFieldSet||function(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n},C=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},P=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n},j=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const D=F(n(476)),L=j(n(302)),R=n(737),x=n(54),A=n(346),z=n(953);class ${constructor(e={}){var t,n,i,b;s.add(this),o.set(this,void 0),r.set(this,void 0),a.set(this,void 0),l.set(this,void 0),c.set(this,void 0),f.set(this,void 0),u.set(this,void 0),d.set(this,void 0),h.set(this,void 0),p.set(this,void 0),v.set(this,void 0),m.set(this,void 0),w.set(this,void 0),g.set(this,void 0),I(this,o,[],"f"),I(this,r,!1,"f"),I(this,l,new WeakMap,"f"),I(this,c,new WeakMap,"f"),I(this,f,[],"f"),I(this,w,e.trackEventListenerLeaks?z.EventListenerTracker.getInstance():null,"f"),I(this,a,null,"f"),I(this,g,!1,"f"),I(this,u,new L.default,"f"),I(this,d,null!==(t=e.isDevMode)&&void 0!==t&&t,"f"),I(this,h,null!==(n=e.subscribers)&&void 0!==n?n:[],"f"),I(this,p,null!==(i=e.extensions)&&void 0!==i?i:[],"f"),I(this,v,null!==(b=e.scanIntervalMs)&&void 0!==b?b:A.config.performance.scanIntervalMs,"f")}subscribe(e){return C(this,h,"f").push(e),()=>this.unsubscribe(e)}unsubscribe(e){I(this,h,C(this,h,"f").filter(t=>t!==e),"f")}registerExtension(e){return C(this,p,"f").push(e),()=>this.unregisterExtension(e)}unregisterExtension(e){I(this,p,C(this,p,"f").filter(t=>t!==e),"f")}start(){C(this,g,"f")?console.warn("[Memory] ReactMemoryScan has been disposed and cannot be started again"):(I(this,r,!0,"f"),I(this,a,setInterval(C(this,s,"m",E).bind(this),C(this,v,"f")),"f"),A.config.features.enableMutationObserver&&(null==C(this,m,"f")&&I(this,m,new x.DOMObserver,"f"),C(this,m,"f").startMonitoring()),console.log("[Memory] Tracking React and DOM memory..."))}pause(){I(this,r,!1,"f")}stop(){I(this,r,!1,"f"),null!==C(this,a,"f")&&(clearInterval(C(this,a,"f")),I(this,a,null,"f")),I(this,o,[],"f"),I(this,f,[],"f"),C(this,m,"f")&&(C(this,m,"f").stopMonitoring(),I(this,m,null,"f")),I(this,l,new WeakMap,"f"),I(this,c,new WeakMap,"f"),console.log("[Memory] ReactMemoryScan stopped")}dispose(){this.stop(),I(this,h,[],"f");for(const e of C(this,p,"f"))e&&"function"==typeof e.cleanup&&e.cleanup();I(this,p,[],"f"),C(this,w,"f")&&(C(this,w,"f").destroy(),I(this,w,null,"f")),I(this,g,!0,"f"),console.log("[Memory] ReactMemoryScan disposed")}recordBoundingRectangles(e){for(const t of e){const e=t.deref();if(null==e||C(this,l,"f").has(e))continue;const n=D.getBoundingClientRect(e);null!=n&&C(this,l,"f").set(e,n)}}getDetachedDOMInfo(){var e;const t=[];for(const n of C(this,o,"f")){const i=n.deref();if(null==i||i.isConnected)continue;const s=i;if(null==s.detachedElementId){const e=$.nextElementId++;s.detachedElementIdStr=`memory-id-${e}@`,s.detachedElementId=e}const o=null!==(e=C(this,c,"f").get(i))&&void 0!==e?e:[];t.push({element:n,boundingRect:C(this,l,"f").get(i),componentStack:o})}return t}isDevMode(){return C(this,d,"f")}getCachedComponentName(e){var t;const n="<Unknown>",i=e.deref();if(null==i)return n;const s=C(this,c,"f").get(i);return null==s?n:null!==(t=s[0])&&void 0!==t?t:n}updateFiberNodes(e){const t=new WeakSet;for(const e of C(this,f,"f")){const n=e.deref();null!=n&&t.add(n)}const n=new WeakSet;for(const t of e){const e=t.deref();null!=e&&n.add(e)}const i=[],o=[];for(const e of C(this,f,"f")){const t=e.deref();null!=t&&(n.has(t)?(o.push(e),null==t.return&&i.push(e)):i.push(e))}for(const n of e){const e=n.deref();null!=e&&(t.has(e)||o.push(n))}return I(this,f,o,"f"),C(this,s,"m",b).call(this,"known fibers: ",C(this,f,"f").length),C(this,s,"m",b).call(this,"leaked fibers: ",i.length),i}packLeakedFibers(e){const t=[];for(const n of e)t.push(new B(n));return t}scan(){const e=Date.now();C(this,s,"m",O).call(this);const t=C(this,o,"f"),n=C(this,s,"m",_).call(this);C(this,s,"m",W).call(this,n),this.recordBoundingRectangles(n),D.updateWeakRefList(t,n);const i=C(this,u,"f").scan(t,C(this,c,"f")),r=this.updateFiberNodes(i.fiberNodes);i.leakedFibers=r,i.eventListenerLeaks=C(this,s,"m",S).call(this),window.leakedFibers=this.packLeakedFibers(r);const a=Date.now();return C(this,s,"m",b).call(this,`scan took ${a-e}ms`),i}}o=new WeakMap,r=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,w=new WeakMap,g=new WeakMap,s=new WeakSet,b=function(...e){C(this,d,"f")&&A.config.features.enableConsoleLogs&&D.consoleLog(...e)},y=function(e){for(const t of C(this,h,"f"))t(e);const t=e.end-e.start;C(this,s,"m",b).call(this,"duration: ",`${t} ms`);const{scanner:n,leakedFibers:i,fiberNodes:o}=e,r=P(e,["scanner","leakedFibers","fiberNodes"]);C(this,s,"m",b).call(this,r)},M=function(){for(const e of C(this,p,"f"))null==e||e.beforeScan()},k=function(e){for(const t of C(this,p,"f"))null==t||t.afterScan(e)},E=function(){if(!C(this,r,"f"))return;C(this,s,"m",M).call(this);const e=performance.now(),t=this.scan(),n=performance.now(),i=Object.assign(Object.assign({},t),{start:e,end:n,scanner:this});C(this,s,"m",y).call(this,i),C(this,s,"m",k).call(this,i)},W=function(e){for(const t of e){const e=t.deref();if(null==e||C(this,c,"f").has(e))continue;const n=(0,R.getFiberNodeFromElement)(e);null!=n&&C(this,c,"f").set(e,(0,R.getReactComponentStack)(n))}},_=function(){return null==C(this,m,"f")?D.getDOMElements():[...D.getDOMElements(),...C(this,m,"f").getDOMElements()]},O=function(){null!=(null===window||void 0===window?void 0:window.gc)&&window.gc()},S=function(){var e;if(null==C(this,w,"f"))return[];const t=C(this,w,"f").scan(this.getCachedComponentName.bind(this)),n=[];for(const[i,s]of t.entries()){const t=new Map;for(const n of s){const i=null!==(e=t.get(n.type))&&void 0!==e?e:0;t.set(n.type,i+1)}for(const[e,s]of t.entries())n.push({type:e,componentName:i,count:s})}return n},$.nextElementId=0,t.default=$;class B{constructor(e){this.leakedFiber=e}}},847(e,t){t.isValidComponentName=function(e){return null!=e&&!n.has(e)};const n=new Set},235(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createReactMemoryScan=function(e={}){return new s.default(e)};const s=i(n(282))},737(e,t,n){t.traverseFiber=t.getTopMostFiberWithChild=t.dD=t.bv=t.Fm=t.JA=t.NT=t.UT=t.DQ=t.W=t.IZ=t.i$=t.Wb=void 0,t.getFiberNodeFromElement=function(e){for(const t of o){const n=r(e).find(e=>e.startsWith(t));if(n)return e[n]}return null},t.getReactComponentStack=function(e){const t=[],n=new Set;let i=e;for(;i&&!n.has(i);){n.add(i);const e=a(i);e&&t.push(e),i=i.return}return t},t.getDisplayNameOfFiberNode=a;const i=n(476),s=n(847);t.Wb=5,t.i$=26,t.IZ=27,t.W=2,t.DQ=4096,t.UT=4,t.NT=16,t.JA=32,t.Fm=1024,t.bv=8192,t.W,t.UT,t.NT,t.JA,t.DQ,t.bv,t.Fm,t.dD=e=>e.tag===t.Wb||e.tag===t.i$||e.tag===t.IZ||"string"==typeof e.type,t.getTopMostFiberWithChild=e=>{let n=null;return(0,t.traverseFiber)(e,function(e){null!=e.child&&(n=e)},!0),n},t.traverseFiber=(e,n,i=!1)=>{if(!e)return null;if(!0===n(e))return e;let s=i?e.return:e.child;for(;s;){const e=(0,t.traverseFiber)(s,n,i);if(e)return e;s=i?null:s.sibling}return null};const o=["__reactFiber$","__reactInternalInstance$","_reactRootContainer"],r=Object.getOwnPropertyNames.bind(Object);function a(e){var t,n,o,r;const a=null!==(t=e.type)&&void 0!==t?t:e.elementType;let l=null!==(n=null==a?void 0:a.displayName)&&void 0!==n?n:null==a?void 0:a.name;if(null==l)if(null==a?void 0:a.render){const e=null==a?void 0:a.render;l=null!==(o=null==e?void 0:e.displayName)&&void 0!==o?o:null==e?void 0:e.name}else(null==a?void 0:a.type)&&(l=null!==(r=a.type.displayName)&&void 0!==r?r:a.type.name);l||"function"!=typeof a||(l=a.name);const c=(0,i.getMeaningfulName)(function(e){if("string"!=typeof e)return null;if(!e.includes("[")||!e.includes("]"))return e;const t=e.indexOf("["),n=e.indexOf("]");if(t>n)return e;const i=e.substring(t+1,n);return i.startsWith("from ")?i.substring(5):i}(l));return(0,s.isValidComponentName)(c)?c:null}},476(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getDOMElements=function(){const e=Array.from(document.querySelectorAll("*")),t=[];for(const n of e)(0,i.isVisualizerElement)(n)||t.push(new WeakRef(n));return t},t.getDOMElementCount=function(){const e=Array.from(document.querySelectorAll("*"));let t=0;for(const n of e)(0,i.isVisualizerElement)(n)||++t;return t},t.getMeaningfulName=function(e){return null==e||s(e)?null:e},t.isMinifiedName=s,t.addCountbyKey=function(e,t,n){var i;e.set(t,(null!==(i=e.get(t))&&void 0!==i?i:0)+n)},t.updateWeakRefList=function(e,t){!function(e){const t=[];for(const n of e)null!=n.deref()&&t.push(n);for(;e.length>0;)e.pop();for(const n of t)e.push(n)}(e);const n=function(e){const t=new Set;for(const n of e)t.add(n.deref());return t}(e);for(const i of t){const t=i.deref();null==t||n.has(t)||(n.add(t),e.push(new WeakRef(t)))}return e},t.getBoundingClientRect=function(e){if(null==e)return null;if("function"!=typeof e.getBoundingClientRect)return null;let t=null;try{t=e.getBoundingClientRect()}catch(e){}if(null==t)return null;const n=window.scrollY,i=window.scrollX,s={};return s.bottom=t.bottom,s.height=t.height,s.left=t.left,s.right=t.right,s.top=t.top,s.width=t.width,s.x=t.x,s.y=t.y,s.scrollLeft=i,s.scrollTop=n,s},t.consoleLog=function(...e){r.apply(o,e)},t.hasRunInSession=function(){if(!l())return!1;try{return"true"===sessionStorage.getItem(a)}catch(e){return!1}},t.setRunInSession=function(){if(l())try{sessionStorage.setItem(a,"true")}catch(e){}};const i=n(498);function s(e){return!(e.length>=5)&&(e.length<=3||!/[^a-zA-Z0-9$_]/.test(e)&&!/^[A-Z][a-z]+([A-Z][a-z]*)*$|^[a-z]+([A-Z][a-z]*)*$/.test(e))}const o=console,r=o.log,a="memory_lens_session";function l(){try{const e="__memory_lens_session_test__";return sessionStorage.setItem(e,"1"),sessionStorage.removeItem(e),!0}catch(e){return!1}}},313(e,t){var n,i,s;t.WeakMapPlus=void 0,t.isWeakAPINative=function(){return d};const o="undefined"!=typeof window?window:self,r=null!==(n=o.WeakMap)&&void 0!==n?n:null,a=null!==r&&"function"==typeof r.toString&&"function WeakMap() { [native code] }"===h(r.toString()),l=null!==(i=o.WeakSet)&&void 0!==i?i:null,c=null!==l&&"function"==typeof l.toString&&"function WeakSet() { [native code] }"===h(l.toString()),f=null!==(s=o.WeakRef)&&void 0!==s?s:null,u=null!==f&&"function"==typeof f.toString&&"function WeakRef() { [native code] }"===h(f.toString()),d=a&&c&&u;function h(e){return"function"==typeof e.replace?e.replace(/\n/g," ").replace(/\s+/g," "):null}class p{constructor(e={}){this.strongMap=null,this.noopMap=!1,this.entriesMap=new Map,this.keyToId=new WeakMap;const{fallback:t="strong",cleanupMs:n=1e3}=e;this.isWeak=d,this.fallbackMode=t,this.isWeak?this.cleanupInterval=setInterval(()=>this.cleanup(),n):("strong"===t?this.strongMap=new Map:"noop"===t&&(this.noopMap=!0),this.cleanupInterval=-1)}getOrCreateId(e){let t=this.keyToId.get(e);return t||(t=Symbol(),this.keyToId.set(e,t)),t}set(e,t){var n;if(!this.isWeak)return this.noopMap||null===(n=this.strongMap)||void 0===n||n.set(e,t),this;const i=this.getOrCreateId(e);return this.entriesMap.set(i,{ref:new WeakRef(e),value:t}),this}get(e){var t,n;if(!this.isWeak){if(this.noopMap)return;return null===(t=this.strongMap)||void 0===t?void 0:t.get(e)}const i=this.keyToId.get(e);if(!i)return;const s=this.entriesMap.get(i);return(null===(n=null==s?void 0:s.ref)||void 0===n?void 0:n.deref())?null==s?void 0:s.value:void 0}has(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.has(e))&&void 0!==n&&n;const i=this.keyToId.get(e);if(!i)return!1;const s=this.entriesMap.get(i);return!(!s||!s.ref.deref())}delete(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.delete(e))&&void 0!==n&&n;const i=this.keyToId.get(e);return!!i&&(this.keyToId.delete(e),this.entriesMap.delete(i))}*liveEntries(){for(const[,e]of this.entriesMap){const t=e.ref.deref();t&&(yield[t,e.value])}}entries(){var e,t;return this.isWeak?this.liveEntries():this.noopMap?[][Symbol.iterator]():null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.entries())&&void 0!==t?t:[][Symbol.iterator]()}keys(){return function*(e){for(const[t]of e.entries())yield t}(this)}values(){return function*(e){for(const[,t]of e.entries())yield t}(this)}[Symbol.iterator](){return this.entries()}get size(){var e,t;if(!this.isWeak)return this.noopMap?0:null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.size)&&void 0!==t?t:0;let n=0;for(const e of this.liveEntries())n++;return n}getFallbackMode(){return this.fallbackMode}cleanup(){if(this.isWeak)for(const[e,t]of this.entriesMap)t.ref.deref()||this.entriesMap.delete(e)}destroy(){this.isWeak&&clearInterval(this.cleanupInterval)}}t.WeakMapPlus=p},498(e,t){t.isVisualizerElement=function(e){return"true"===e.getAttribute(n)};const n="data-visualizer";new WeakMap}},t={};return function n(i){var s=t[i];if(void 0!==s)return s.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}(235)})());
|
|
26
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MemLens=t():e.MemLens=t()}(self,()=>(()=>{"use strict";var e={346(e,t){t.config=t.of=t.lF=void 0,t.lF={scanIntervalMs:1e3,maxComponentStackDepth:100,memoryMeasurementIntervalMs:5e3},t.of={enableMutationObserver:!0,enableMemoryTracking:!0,enableComponentStack:!0,enableConsoleLogs:null===window||void 0===window?void 0:window.TEST_MEMORY_SCAN},t.config={performance:t.lF,features:t.of}},54(e,t,n){var i,s,o,r,a,l,c,f,u,d,h,p,v=this&&this.__classPrivateFieldSet||function(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DOMObserver=void 0;const w=n(313),g=n(498),b=(0,w.isWeakAPINative)(),y=void 0!==window.MutationObserver;t.DOMObserver=class{constructor(){i.add(this),s.set(this,void 0),o.set(this,void 0),r.set(this,void 0),a.set(this,void 0),l.set(this,void 0),c.set(this,void 0),f.set(this,void 0),v(this,s,0,"f"),v(this,o,0,"f"),v(this,a,[],"f"),v(this,l,new WeakSet,"f"),v(this,f,[],"f"),this.startMonitoring()}register(e){m(this,f,"f").push(e)}startMonitoring(){if(!b||!y)return;if(null!=m(this,r,"f"))return;v(this,r,new MutationObserver(e=>{let t=[];const n=e=>{if(null==e)return;if(e.nodeType!=Node.ELEMENT_NODE)return;const n=e;if(!(0,g.isVisualizerElement)(n)){const e=m(this,i,"m",p).call(this,n);t=[...t,...e]}};e.forEach(e=>{e.addedNodes.forEach(n),e.removedNodes.forEach(n)}),m(this,f,"f").forEach(e=>e(t))}),"f");const e=()=>{var t;document.body?null===(t=m(this,r,"f"))||void 0===t||t.observe(document.body,{childList:!0,subtree:!0}):setTimeout(e,0)};e(),v(this,c,window.setInterval(()=>{m(this,i,"m",u).call(this)},3e3),"f")}stopMonitoring(){null!=m(this,r,"f")&&(m(this,r,"f").disconnect(),v(this,r,null,"f")),null!=m(this,c,"f")&&(window.clearInterval(m(this,c,"f")),v(this,c,null,"f"))}getDOMElements(){return[...m(this,a,"f")]}getStats(){try{v(this,s,m(this,i,"m",d).call(this),"f"),v(this,o,m(this,i,"m",h).call(this),"f")}catch(e){}return{elements:m(this,s,"f"),detachedElements:m(this,o,"f")}}},s=new WeakMap,o=new WeakMap,r=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,i=new WeakSet,u=function(){const e=[],t=new Set;for(const n of m(this,a,"f")){const i=n.deref();null==i||t.has(i)||(e.push(n),t.add(i))}v(this,a,e,"f")},d=function(){var e,t;return v(this,s,null!==(t=null===(e=null===document||void 0===document?void 0:document.getElementsByTagName("*"))||void 0===e?void 0:e.length)&&void 0!==t?t:0,"f")},h=function(){let e=0;for(const t of m(this,a,"f")){const n=t.deref();n&&!1===n.isConnected&&++e}return v(this,o,e,"f")},p=function(e){const t=[e],n=new Set,i=[];for(;t.length>0;){const e=t.pop();if(null==e||n.has(e))continue;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE)continue;const s=e;if((0,g.isVisualizerElement)(s))continue;if(n.add(s),!m(this,l,"f").has(s)){const e=new WeakRef(s);m(this,a,"f").push(e),m(this,l,"f").add(s),i.push(e)}const o=s.childNodes;for(let e=0;e<o.length;++e)t.push(o[e])}return i}},953(e,t,n){var i,s,o,r,a,l,c,f=this&&this.__classPrivateFieldSet||function(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n},u=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.EventListenerTracker=void 0;const d=n(737),h=n(313);class p{constructor(){i.add(this),s.set(this,void 0),o.set(this,void 0),r.set(this,void 0),a.set(this,void 0),f(this,s,new h.WeakMapPlus({fallback:"noop",cleanupMs:100}),"f"),f(this,o,new Map,"f"),f(this,r,EventTarget.prototype.addEventListener,"f"),f(this,a,EventTarget.prototype.removeEventListener,"f"),u(this,i,"m",l).call(this)}static getInstance(){return p.instance||(p.instance=new p),p.instance}addListener(e,t,n,i){e.addEventListener(t,n,i)}removeListener(e,t,n,i){e.removeEventListener(t,n,i)}scan(e){const t=new Map;for(const[n,i]of u(this,s,"f").entries())if(n instanceof Element&&!n.isConnected)for(const s of i){if(!s.cb.deref())continue;const i=e(new WeakRef(n));t.has(i)||t.set(i,[]);const o=t.get(i);let r=null==o?void 0:o.find(e=>e.type===s.type);r||(r={type:s.type,count:0,entries:[]},null==o||o.push(r)),r.count++,r.entries.push(new WeakRef(s))}return f(this,o,t,"f"),t}getDetachedListeners(){return u(this,o,"f")}destroy(){u(this,i,"m",c).call(this),u(this,s,"f").destroy(),u(this,o,"f").clear(),p.instance=null}}t.EventListenerTracker=p,s=new WeakMap,o=new WeakMap,r=new WeakMap,a=new WeakMap,i=new WeakSet,l=function(){const e=this;EventTarget.prototype.addEventListener=function(t,n,i){var o;if(u(e,r,"f").call(this,t,n,i),this instanceof Element){const r=(0,d.getFiberNodeFromElement)(this),a={type:t,cb:new WeakRef(n),options:i,fiber:r?new WeakRef(r):void 0},l=null!==(o=u(e,s,"f").get(this))&&void 0!==o?o:[];l.push(a),u(e,s,"f").set(this,l)}},EventTarget.prototype.removeEventListener=function(t,n,i){if(u(e,a,"f").call(this,t,n,i),this instanceof Element){const o=u(e,s,"f").get(this);if(o){const r=o.findIndex(e=>e.type===t&&e.cb.deref()===n&&e.options===i);-1!==r&&o.splice(r,1),0===o.length?u(e,s,"f").delete(this):u(e,s,"f").set(this,o)}}}},c=function(){EventTarget.prototype.addEventListener=u(this,r,"f"),EventTarget.prototype.removeEventListener=u(this,a,"f")},p.instance=null},302(e,t,n){var i,s=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),r=0;r<n.length;r++)"default"!==n[r]&&s(t,e,n[r]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(476)),l=n(737),c=n(847);t.default=class{scan(e,t){var n;const i=new Set,s=new Set,o=new Map,r=new Map,f=new Set,u=new Set,d=[];let h=0,p=0;function v(e){(0,l.traverseFiber)(e,e=>{if(u.has(e))return!0;u.add(e);const t=(0,l.getDisplayNameOfFiberNode)(e);return null!=t&&(0,c.isValidComponentName)(t)?(s.add(t),a.addCountbyKey(o,t,1),!0):void 0},!0)}for(const s of e){const e=s.deref();if(null==e)continue;if(++h,!e.isConnected){if(t.has(e)){const i=(null!==(n=t.get(e))&&void 0!==n?n:[])[0];e.__component_name=i,a.addCountbyKey(r,i,1)}++p}const o=(0,l.getFiberNodeFromElement)(e);if(null==o)continue;v(o);const c=(0,l.getTopMostFiberWithChild)(o);null!=c&&(i.has(c)||(i.add(c),(0,l.traverseFiber)(c,e=>{if(f.has(e))return!0;f.add(e),d.push(new WeakRef(e)),v(e)},!1)))}return f.clear(),u.clear(),i.clear(),{components:s,componentToFiberNodeCount:o,totalElements:h,totalDetachedElements:p,detachedComponentToFiberNodeCount:r,fiberNodes:d,leakedFibers:[]}}}},282(e,t,n){var i,s,o,r,a,l,c,f,u,d,h,p,v,m,w,g,b,y,M,k,E,W,_,O,S,T=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),N=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),F=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&T(t,e,n[s]);return N(t,e),t}),I=this&&this.__classPrivateFieldSet||function(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n},C=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},P=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n},j=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const D=F(n(476)),L=j(n(302)),R=n(737),x=n(54),A=n(346),z=n(953);class ${constructor(e={}){var t,n,i,b;s.add(this),o.set(this,void 0),r.set(this,void 0),a.set(this,void 0),l.set(this,void 0),c.set(this,void 0),f.set(this,void 0),u.set(this,void 0),d.set(this,void 0),h.set(this,void 0),p.set(this,void 0),v.set(this,void 0),m.set(this,void 0),w.set(this,void 0),g.set(this,void 0),I(this,o,[],"f"),I(this,r,!1,"f"),I(this,l,new WeakMap,"f"),I(this,c,new WeakMap,"f"),I(this,f,[],"f"),I(this,w,e.trackEventListenerLeaks?z.EventListenerTracker.getInstance():null,"f"),I(this,a,null,"f"),I(this,g,!1,"f"),I(this,u,new L.default,"f"),I(this,d,null!==(t=e.isDevMode)&&void 0!==t&&t,"f"),I(this,h,null!==(n=e.subscribers)&&void 0!==n?n:[],"f"),I(this,p,null!==(i=e.extensions)&&void 0!==i?i:[],"f"),I(this,v,null!==(b=e.scanIntervalMs)&&void 0!==b?b:A.config.performance.scanIntervalMs,"f")}subscribe(e){return C(this,h,"f").push(e),()=>this.unsubscribe(e)}unsubscribe(e){I(this,h,C(this,h,"f").filter(t=>t!==e),"f")}registerExtension(e){return C(this,p,"f").push(e),()=>this.unregisterExtension(e)}unregisterExtension(e){I(this,p,C(this,p,"f").filter(t=>t!==e),"f")}start(){C(this,g,"f")?console.warn("[Memory] ReactMemoryScan has been disposed and cannot be started again"):(I(this,r,!0,"f"),I(this,a,setInterval(C(this,s,"m",E).bind(this),C(this,v,"f")),"f"),A.config.features.enableMutationObserver&&(null==C(this,m,"f")&&I(this,m,new x.DOMObserver,"f"),C(this,m,"f").startMonitoring()),console.log("[Memory] Tracking React and DOM memory..."))}pause(){I(this,r,!1,"f")}stop(){I(this,r,!1,"f"),null!==C(this,a,"f")&&(clearInterval(C(this,a,"f")),I(this,a,null,"f")),I(this,o,[],"f"),I(this,f,[],"f"),C(this,m,"f")&&(C(this,m,"f").stopMonitoring(),I(this,m,null,"f")),I(this,l,new WeakMap,"f"),I(this,c,new WeakMap,"f"),console.log("[Memory] ReactMemoryScan stopped")}dispose(){this.stop(),I(this,h,[],"f");for(const e of C(this,p,"f"))e&&"function"==typeof e.cleanup&&e.cleanup();I(this,p,[],"f"),C(this,w,"f")&&(C(this,w,"f").destroy(),I(this,w,null,"f")),I(this,g,!0,"f"),console.log("[Memory] ReactMemoryScan disposed")}recordBoundingRectangles(e){for(const t of e){const e=t.deref();if(null==e||C(this,l,"f").has(e))continue;const n=D.getBoundingClientRect(e);null!=n&&C(this,l,"f").set(e,n)}}getDetachedDOMInfo(){var e;const t=[];for(const n of C(this,o,"f")){const i=n.deref();if(null==i||i.isConnected)continue;const s=i;if(null==s.detachedElementId){const e=$.nextElementId++;s.detachedElementIdStr=`memory-id-${e}@`,s.detachedElementId=e}const o=null!==(e=C(this,c,"f").get(i))&&void 0!==e?e:[];t.push({element:n,boundingRect:C(this,l,"f").get(i),componentStack:o})}return t}isDevMode(){return C(this,d,"f")}getCachedComponentName(e){var t;const n="<Unknown>",i=e.deref();if(null==i)return n;const s=C(this,c,"f").get(i);return null==s?n:null!==(t=s[0])&&void 0!==t?t:n}updateFiberNodes(e){const t=new WeakSet;for(const e of C(this,f,"f")){const n=e.deref();null!=n&&t.add(n)}const n=new WeakSet;for(const t of e){const e=t.deref();null!=e&&n.add(e)}const i=[],o=[];for(const e of C(this,f,"f")){const t=e.deref();null!=t&&(n.has(t)?(o.push(e),null==t.return&&i.push(e)):i.push(e))}for(const n of e){const e=n.deref();null!=e&&(t.has(e)||o.push(n))}return I(this,f,o,"f"),C(this,s,"m",b).call(this,"known fibers: ",C(this,f,"f").length),C(this,s,"m",b).call(this,"leaked fibers: ",i.length),i}packLeakedFibers(e){const t=[];for(const n of e)t.push(new B(n));return t}scan(){const e=Date.now();C(this,s,"m",O).call(this);const t=C(this,o,"f"),n=C(this,s,"m",_).call(this);C(this,s,"m",W).call(this,n),this.recordBoundingRectangles(n),D.updateWeakRefList(t,n);const i=C(this,u,"f").scan(t,C(this,c,"f")),r=this.updateFiberNodes(i.fiberNodes);i.leakedFibers=r,i.eventListenerLeaks=C(this,s,"m",S).call(this),window.leakedFibers=this.packLeakedFibers(r);const a=Date.now();return C(this,s,"m",b).call(this,`scan took ${a-e}ms`),i}}o=new WeakMap,r=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,w=new WeakMap,g=new WeakMap,s=new WeakSet,b=function(...e){C(this,d,"f")&&A.config.features.enableConsoleLogs&&D.consoleLog(...e)},y=function(e){for(const t of C(this,h,"f"))t(e);const t=e.end-e.start;C(this,s,"m",b).call(this,"duration: ",`${t} ms`);const{scanner:n,leakedFibers:i,fiberNodes:o}=e,r=P(e,["scanner","leakedFibers","fiberNodes"]);C(this,s,"m",b).call(this,r)},M=function(){for(const e of C(this,p,"f"))null==e||e.beforeScan()},k=function(e){for(const t of C(this,p,"f"))null==t||t.afterScan(e)},E=function(){if(!C(this,r,"f"))return;C(this,s,"m",M).call(this);const e=performance.now(),t=this.scan(),n=performance.now(),i=Object.assign(Object.assign({},t),{start:e,end:n,scanner:this});C(this,s,"m",y).call(this,i),C(this,s,"m",k).call(this,i)},W=function(e){for(const t of e){const e=t.deref();if(null==e||C(this,c,"f").has(e))continue;const n=(0,R.getFiberNodeFromElement)(e);null!=n&&C(this,c,"f").set(e,(0,R.getReactComponentStack)(n))}},_=function(){return null==C(this,m,"f")?D.getDOMElements():[...D.getDOMElements(),...C(this,m,"f").getDOMElements()]},O=function(){null!=(null===window||void 0===window?void 0:window.gc)&&window.gc()},S=function(){var e;if(null==C(this,w,"f"))return[];const t=C(this,w,"f").scan(this.getCachedComponentName.bind(this)),n=[];for(const[i,s]of t.entries()){const t=new Map;for(const n of s){const i=null!==(e=t.get(n.type))&&void 0!==e?e:0;t.set(n.type,i+1)}for(const[e,s]of t.entries())n.push({type:e,componentName:i,count:s})}return n},$.nextElementId=0,t.default=$;class B{constructor(e){this.leakedFiber=e}}},847(e,t){t.isValidComponentName=function(e){return null!=e&&!n.has(e)};const n=new Set},235(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createReactMemoryScan=function(e={}){return new s.default(e)};const s=i(n(282))},737(e,t,n){t.traverseFiber=t.getTopMostFiberWithChild=t.dD=t.bv=t.Fm=t.JA=t.NT=t.UT=t.DQ=t.W=t.IZ=t.i$=t.Wb=void 0,t.getFiberNodeFromElement=function(e){for(const t of o){const n=r(e).find(e=>e.startsWith(t));if(n)return e[n]}return null},t.getReactComponentStack=function(e){const t=[],n=new Set;let i=e;for(;i&&!n.has(i);){n.add(i);const e=a(i);e&&t.push(e),i=i.return}return t},t.getDisplayNameOfFiberNode=a;const i=n(476),s=n(847);t.Wb=5,t.i$=26,t.IZ=27,t.W=2,t.DQ=4096,t.UT=4,t.NT=16,t.JA=32,t.Fm=1024,t.bv=8192,t.W,t.UT,t.NT,t.JA,t.DQ,t.bv,t.Fm,t.dD=e=>e.tag===t.Wb||e.tag===t.i$||e.tag===t.IZ||"string"==typeof e.type,t.getTopMostFiberWithChild=e=>{let n=null;return(0,t.traverseFiber)(e,function(e){null!=e.child&&(n=e)},!0),n},t.traverseFiber=(e,n,i=!1)=>{if(!e)return null;if(!0===n(e))return e;let s=i?e.return:e.child;for(;s;){const e=(0,t.traverseFiber)(s,n,i);if(e)return e;s=i?null:s.sibling}return null};const o=["__reactFiber$","__reactInternalInstance$","_reactRootContainer"],r=Object.getOwnPropertyNames.bind(Object);function a(e){var t,n,o,r;const a=null!==(t=e.type)&&void 0!==t?t:e.elementType;let l=null!==(n=null==a?void 0:a.displayName)&&void 0!==n?n:null==a?void 0:a.name;if(null==l)if(null==a?void 0:a.render){const e=null==a?void 0:a.render;l=null!==(o=null==e?void 0:e.displayName)&&void 0!==o?o:null==e?void 0:e.name}else(null==a?void 0:a.type)&&(l=null!==(r=a.type.displayName)&&void 0!==r?r:a.type.name);l||"function"!=typeof a||(l=a.name);const c=(0,i.getMeaningfulName)(function(e){if("string"!=typeof e)return null;if(!e.includes("[")||!e.includes("]"))return e;const t=e.indexOf("["),n=e.indexOf("]");if(t>n)return e;const i=e.substring(t+1,n);return i.startsWith("from ")?i.substring(5):i}(l));return(0,s.isValidComponentName)(c)?c:null}},476(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getDOMElements=function(){const e=Array.from(document.querySelectorAll("*")),t=[];for(const n of e)(0,i.isVisualizerElement)(n)||t.push(new WeakRef(n));return t},t.getDOMElementCount=function(){const e=Array.from(document.querySelectorAll("*"));let t=0;for(const n of e)(0,i.isVisualizerElement)(n)||++t;return t},t.getMeaningfulName=function(e){return null==e||s(e)?null:e},t.isMinifiedName=s,t.addCountbyKey=function(e,t,n){var i;e.set(t,(null!==(i=e.get(t))&&void 0!==i?i:0)+n)},t.updateWeakRefList=function(e,t){!function(e){const t=[];for(const n of e)null!=n.deref()&&t.push(n);for(;e.length>0;)e.pop();for(const n of t)e.push(n)}(e);const n=function(e){const t=new Set;for(const n of e)t.add(n.deref());return t}(e);for(const i of t){const t=i.deref();null==t||n.has(t)||(n.add(t),e.push(new WeakRef(t)))}return e},t.getBoundingClientRect=function(e){if(null==e)return null;if("function"!=typeof e.getBoundingClientRect)return null;let t=null;try{t=e.getBoundingClientRect()}catch(e){}if(null==t)return null;const n=window.scrollY,i=window.scrollX,s={};return s.bottom=t.bottom,s.height=t.height,s.left=t.left,s.right=t.right,s.top=t.top,s.width=t.width,s.x=t.x,s.y=t.y,s.scrollLeft=i,s.scrollTop=n,s},t.consoleLog=function(...e){r.apply(o,e)},t.hasRunInSession=function(){if(!l())return!1;try{return"true"===sessionStorage.getItem(a)}catch(e){return!1}},t.setRunInSession=function(){if(l())try{sessionStorage.setItem(a,"true")}catch(e){}};const i=n(498);function s(e){return!(e.length>=5)&&(e.length<=3||!/[^a-zA-Z0-9$_]/.test(e)&&!/^[A-Z][a-z]+([A-Z][a-z]*)*$|^[a-z]+([A-Z][a-z]*)*$/.test(e))}const o=console,r=o.log,a="memory_lens_session";function l(){try{const e="__memory_lens_session_test__";return sessionStorage.setItem(e,"1"),sessionStorage.removeItem(e),!0}catch(e){return!1}}},313(e,t){var n,i,s;t.WeakMapPlus=void 0,t.isWeakAPINative=function(){return d};const o="undefined"!=typeof window?window:self,r=null!==(n=o.WeakMap)&&void 0!==n?n:null,a=null!==r&&"function"==typeof r.toString&&"function WeakMap() { [native code] }"===h(r.toString()),l=null!==(i=o.WeakSet)&&void 0!==i?i:null,c=null!==l&&"function"==typeof l.toString&&"function WeakSet() { [native code] }"===h(l.toString()),f=null!==(s=o.WeakRef)&&void 0!==s?s:null,u=null!==f&&"function"==typeof f.toString&&"function WeakRef() { [native code] }"===h(f.toString()),d=a&&c&&u;function h(e){return"function"==typeof e.replace?e.replace(/\n/g," ").replace(/\s+/g," "):null}class p{constructor(e={}){this.strongMap=null,this.noopMap=!1,this.entriesMap=new Map,this.keyToId=new WeakMap;const{fallback:t="strong",cleanupMs:n=1e3}=e;this.isWeak=d,this.fallbackMode=t,this.isWeak?this.cleanupInterval=setInterval(()=>this.cleanup(),n):("strong"===t?this.strongMap=new Map:"noop"===t&&(this.noopMap=!0),this.cleanupInterval=-1)}getOrCreateId(e){let t=this.keyToId.get(e);return t||(t=Symbol(),this.keyToId.set(e,t)),t}set(e,t){var n;if(!this.isWeak)return this.noopMap||null===(n=this.strongMap)||void 0===n||n.set(e,t),this;const i=this.getOrCreateId(e);return this.entriesMap.set(i,{ref:new WeakRef(e),value:t}),this}get(e){var t,n;if(!this.isWeak){if(this.noopMap)return;return null===(t=this.strongMap)||void 0===t?void 0:t.get(e)}const i=this.keyToId.get(e);if(!i)return;const s=this.entriesMap.get(i);return(null===(n=null==s?void 0:s.ref)||void 0===n?void 0:n.deref())?null==s?void 0:s.value:void 0}has(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.has(e))&&void 0!==n&&n;const i=this.keyToId.get(e);if(!i)return!1;const s=this.entriesMap.get(i);return!(!s||!s.ref.deref())}delete(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.delete(e))&&void 0!==n&&n;const i=this.keyToId.get(e);return!!i&&(this.keyToId.delete(e),this.entriesMap.delete(i))}*liveEntries(){for(const[,e]of this.entriesMap){const t=e.ref.deref();t&&(yield[t,e.value])}}entries(){var e,t;return this.isWeak?this.liveEntries():this.noopMap?[][Symbol.iterator]():null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.entries())&&void 0!==t?t:[][Symbol.iterator]()}keys(){return function*(e){for(const[t]of e.entries())yield t}(this)}values(){return function*(e){for(const[,t]of e.entries())yield t}(this)}[Symbol.iterator](){return this.entries()}get size(){var e,t;if(!this.isWeak)return this.noopMap?0:null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.size)&&void 0!==t?t:0;let n=0;for(const e of this.liveEntries())n++;return n}getFallbackMode(){return this.fallbackMode}cleanup(){if(this.isWeak)for(const[e,t]of this.entriesMap)t.ref.deref()||this.entriesMap.delete(e)}destroy(){this.isWeak&&clearInterval(this.cleanupInterval)}}t.WeakMapPlus=p},498(e,t){t.isVisualizerElement=function(e){return"true"===e.getAttribute(n)};const n="data-visualizer";new WeakMap}};const t={};return function n(i){const s=t[i];if(void 0!==s)return s.exports;const o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}(235)})());
|
|
@@ -138,16 +138,12 @@ class DOMObserver {
|
|
|
138
138
|
if ((0, visual_utils_1.isVisualizerElement)(element)) {
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
if (
|
|
141
|
+
if (true) {
|
|
142
142
|
const diff = __classPrivateFieldGet(this, _DOMObserver_instances, "m", _DOMObserver_gatherAllElementsInRemovedSubtree).call(this, element);
|
|
143
143
|
newlyAdded = [...newlyAdded, ...diff];
|
|
144
144
|
}
|
|
145
|
-
else
|
|
146
|
-
|
|
147
|
-
__classPrivateFieldGet(this, _DOMObserver_trackedElements, "f").push(ref);
|
|
148
|
-
__classPrivateFieldGet(this, _DOMObserver_trackedElementSet, "f").add(element);
|
|
149
|
-
newlyAdded.push(ref);
|
|
150
|
-
}
|
|
145
|
+
else // removed by dead control flow
|
|
146
|
+
{}
|
|
151
147
|
};
|
|
152
148
|
mutationsList.forEach(mutation => {
|
|
153
149
|
mutation.addedNodes.forEach(updateCallback);
|
|
@@ -1024,12 +1020,11 @@ class DOMVisualizationExtension extends basic_extension_1.BasicExtension {
|
|
|
1024
1020
|
constructor(scanner) {
|
|
1025
1021
|
super(scanner);
|
|
1026
1022
|
_DOMVisualizationExtension_domVirtualizer.set(this, void 0);
|
|
1027
|
-
if (
|
|
1023
|
+
if (true) {
|
|
1028
1024
|
__classPrivateFieldSet(this, _DOMVisualizationExtension_domVirtualizer, new dom_element_visualizer_interactive_1.default(), "f");
|
|
1029
1025
|
}
|
|
1030
|
-
else
|
|
1031
|
-
|
|
1032
|
-
}
|
|
1026
|
+
else // removed by dead control flow
|
|
1027
|
+
{}
|
|
1033
1028
|
}
|
|
1034
1029
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1035
1030
|
afterScan(_analysisResult) {
|
|
@@ -2747,17 +2742,17 @@ function debounce(callback, delay) {
|
|
|
2747
2742
|
/******/ });
|
|
2748
2743
|
/************************************************************************/
|
|
2749
2744
|
/******/ // The module cache
|
|
2750
|
-
/******/
|
|
2745
|
+
/******/ const __webpack_module_cache__ = {};
|
|
2751
2746
|
/******/
|
|
2752
2747
|
/******/ // The require function
|
|
2753
2748
|
/******/ function __webpack_require__(moduleId) {
|
|
2754
2749
|
/******/ // Check if module is in cache
|
|
2755
|
-
/******/
|
|
2750
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
2756
2751
|
/******/ if (cachedModule !== undefined) {
|
|
2757
2752
|
/******/ return cachedModule.exports;
|
|
2758
2753
|
/******/ }
|
|
2759
2754
|
/******/ // Create a new module (and put it into the cache)
|
|
2760
|
-
/******/
|
|
2755
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
2761
2756
|
/******/ // no module.id needed
|
|
2762
2757
|
/******/ // no module.loaded needed
|
|
2763
2758
|
/******/ exports: {}
|
|
@@ -2775,7 +2770,7 @@ function debounce(callback, delay) {
|
|
|
2775
2770
|
/******/ // startup
|
|
2776
2771
|
/******/ // Load entry module and return exports
|
|
2777
2772
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
2778
|
-
/******/
|
|
2773
|
+
/******/ let __webpack_exports__ = __webpack_require__(933);
|
|
2779
2774
|
/******/
|
|
2780
2775
|
/******/ })()
|
|
2781
2776
|
;
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* SOFTWARE.
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
(()=>{"use strict";var e={346(e,t){t.config=t.of=t.lF=void 0,t.lF={scanIntervalMs:1e3,maxComponentStackDepth:100,memoryMeasurementIntervalMs:5e3},t.of={enableMutationObserver:!0,enableMemoryTracking:!0,enableComponentStack:!0,enableConsoleLogs:null===window||void 0===window?void 0:window.TEST_MEMORY_SCAN},t.config={performance:t.lF,features:t.of}},54(e,t,n){var s,i,o,r,l,a,c,d,u,f,h,p,v=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DOMObserver=void 0;const y=n(313),w=n(498),g=(0,y.isWeakAPINative)(),b=void 0!==window.MutationObserver;t.DOMObserver=class{constructor(){s.add(this),i.set(this,void 0),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),a.set(this,void 0),c.set(this,void 0),d.set(this,void 0),v(this,i,0,"f"),v(this,o,0,"f"),v(this,l,[],"f"),v(this,a,new WeakSet,"f"),v(this,d,[],"f"),this.startMonitoring()}register(e){m(this,d,"f").push(e)}startMonitoring(){if(!g||!b)return;if(null!=m(this,r,"f"))return;v(this,r,new MutationObserver(e=>{let t=[];const n=e=>{if(null==e)return;if(e.nodeType!=Node.ELEMENT_NODE)return;const n=e;if(!(0,w.isVisualizerElement)(n)){const e=m(this,s,"m",p).call(this,n);t=[...t,...e]}};e.forEach(e=>{e.addedNodes.forEach(n),e.removedNodes.forEach(n)}),m(this,d,"f").forEach(e=>e(t))}),"f");const e=()=>{var t;document.body?null===(t=m(this,r,"f"))||void 0===t||t.observe(document.body,{childList:!0,subtree:!0}):setTimeout(e,0)};e(),v(this,c,window.setInterval(()=>{m(this,s,"m",u).call(this)},3e3),"f")}stopMonitoring(){null!=m(this,r,"f")&&(m(this,r,"f").disconnect(),v(this,r,null,"f")),null!=m(this,c,"f")&&(window.clearInterval(m(this,c,"f")),v(this,c,null,"f"))}getDOMElements(){return[...m(this,l,"f")]}getStats(){try{v(this,i,m(this,s,"m",f).call(this),"f"),v(this,o,m(this,s,"m",h).call(this),"f")}catch(e){}return{elements:m(this,i,"f"),detachedElements:m(this,o,"f")}}},i=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,a=new WeakMap,c=new WeakMap,d=new WeakMap,s=new WeakSet,u=function(){const e=[],t=new Set;for(const n of m(this,l,"f")){const s=n.deref();null==s||t.has(s)||(e.push(n),t.add(s))}v(this,l,e,"f")},f=function(){var e,t;return v(this,i,null!==(t=null===(e=null===document||void 0===document?void 0:document.getElementsByTagName("*"))||void 0===e?void 0:e.length)&&void 0!==t?t:0,"f")},h=function(){let e=0;for(const t of m(this,l,"f")){const n=t.deref();n&&!1===n.isConnected&&++e}return v(this,o,e,"f")},p=function(e){const t=[e],n=new Set,s=[];for(;t.length>0;){const e=t.pop();if(null==e||n.has(e))continue;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE)continue;const i=e;if((0,w.isVisualizerElement)(i))continue;if(n.add(i),!m(this,a,"f").has(i)){const e=new WeakRef(i);m(this,l,"f").push(e),m(this,a,"f").add(i),s.push(e)}const o=i.childNodes;for(let e=0;e<o.length;++e)t.push(o[e])}return s}},953(e,t,n){var s,i,o,r,l,a,c,d=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},u=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.EventListenerTracker=void 0;const f=n(737),h=n(313);class p{constructor(){s.add(this),i.set(this,void 0),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),d(this,i,new h.WeakMapPlus({fallback:"noop",cleanupMs:100}),"f"),d(this,o,new Map,"f"),d(this,r,EventTarget.prototype.addEventListener,"f"),d(this,l,EventTarget.prototype.removeEventListener,"f"),u(this,s,"m",a).call(this)}static getInstance(){return p.instance||(p.instance=new p),p.instance}addListener(e,t,n,s){e.addEventListener(t,n,s)}removeListener(e,t,n,s){e.removeEventListener(t,n,s)}scan(e){const t=new Map;for(const[n,s]of u(this,i,"f").entries())if(n instanceof Element&&!n.isConnected)for(const i of s){if(!i.cb.deref())continue;const s=e(new WeakRef(n));t.has(s)||t.set(s,[]);const o=t.get(s);let r=null==o?void 0:o.find(e=>e.type===i.type);r||(r={type:i.type,count:0,entries:[]},null==o||o.push(r)),r.count++,r.entries.push(new WeakRef(i))}return d(this,o,t,"f"),t}getDetachedListeners(){return u(this,o,"f")}destroy(){u(this,s,"m",c).call(this),u(this,i,"f").destroy(),u(this,o,"f").clear(),p.instance=null}}t.EventListenerTracker=p,i=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,s=new WeakSet,a=function(){const e=this;EventTarget.prototype.addEventListener=function(t,n,s){var o;if(u(e,r,"f").call(this,t,n,s),this instanceof Element){const r=(0,f.getFiberNodeFromElement)(this),l={type:t,cb:new WeakRef(n),options:s,fiber:r?new WeakRef(r):void 0},a=null!==(o=u(e,i,"f").get(this))&&void 0!==o?o:[];a.push(l),u(e,i,"f").set(this,a)}},EventTarget.prototype.removeEventListener=function(t,n,s){if(u(e,l,"f").call(this,t,n,s),this instanceof Element){const o=u(e,i,"f").get(this);if(o){const r=o.findIndex(e=>e.type===t&&e.cb.deref()===n&&e.options===s);-1!==r&&o.splice(r,1),0===o.length?u(e,i,"f").delete(this):u(e,i,"f").set(this,o)}}}},c=function(){EventTarget.prototype.addEventListener=u(this,r,"f"),EventTarget.prototype.removeEventListener=u(this,l,"f")},p.instance=null},302(e,t,n){var s,i=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,i)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||(s=function(e){return s=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},s(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=s(e),r=0;r<n.length;r++)"default"!==n[r]&&i(t,e,n[r]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const l=r(n(476)),a=n(737),c=n(847);t.default=class{scan(e,t){var n;const s=new Set,i=new Set,o=new Map,r=new Map,d=new Set,u=new Set,f=[];let h=0,p=0;function v(e){(0,a.traverseFiber)(e,e=>{if(u.has(e))return!0;u.add(e);const t=(0,a.getDisplayNameOfFiberNode)(e);return null!=t&&(0,c.isValidComponentName)(t)?(i.add(t),l.addCountbyKey(o,t,1),!0):void 0},!0)}for(const i of e){const e=i.deref();if(null==e)continue;if(++h,!e.isConnected){if(t.has(e)){const s=(null!==(n=t.get(e))&&void 0!==n?n:[])[0];e.__component_name=s,l.addCountbyKey(r,s,1)}++p}const o=(0,a.getFiberNodeFromElement)(e);if(null==o)continue;v(o);const c=(0,a.getTopMostFiberWithChild)(o);null!=c&&(s.has(c)||(s.add(c),(0,a.traverseFiber)(c,e=>{if(d.has(e))return!0;d.add(e),f.push(new WeakRef(e)),v(e)},!1)))}return d.clear(),u.clear(),s.clear(),{components:i,componentToFiberNodeCount:o,totalElements:h,totalDetachedElements:p,detachedComponentToFiberNodeCount:r,fiberNodes:f,leakedFibers:[]}}}},282(e,t,n){var s,i,o,r,l,a,c,d,u,f,h,p,v,m,y,w,g,b,M,E,k,_,x,S,O,W=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,i)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),I=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),C=this&&this.__importStar||(s=function(e){return s=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},s(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=s(e),i=0;i<n.length;i++)"default"!==n[i]&&W(t,e,n[i]);return I(t,e),t}),T=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},P=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},D=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n},R=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const F=C(n(476)),L=R(n(302)),N=n(737),z=n(54),j=n(346),$=n(953);class V{constructor(e={}){var t,n,s,g;i.add(this),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),a.set(this,void 0),c.set(this,void 0),d.set(this,void 0),u.set(this,void 0),f.set(this,void 0),h.set(this,void 0),p.set(this,void 0),v.set(this,void 0),m.set(this,void 0),y.set(this,void 0),w.set(this,void 0),T(this,o,[],"f"),T(this,r,!1,"f"),T(this,a,new WeakMap,"f"),T(this,c,new WeakMap,"f"),T(this,d,[],"f"),T(this,y,e.trackEventListenerLeaks?$.EventListenerTracker.getInstance():null,"f"),T(this,l,null,"f"),T(this,w,!1,"f"),T(this,u,new L.default,"f"),T(this,f,null!==(t=e.isDevMode)&&void 0!==t&&t,"f"),T(this,h,null!==(n=e.subscribers)&&void 0!==n?n:[],"f"),T(this,p,null!==(s=e.extensions)&&void 0!==s?s:[],"f"),T(this,v,null!==(g=e.scanIntervalMs)&&void 0!==g?g:j.config.performance.scanIntervalMs,"f")}subscribe(e){return P(this,h,"f").push(e),()=>this.unsubscribe(e)}unsubscribe(e){T(this,h,P(this,h,"f").filter(t=>t!==e),"f")}registerExtension(e){return P(this,p,"f").push(e),()=>this.unregisterExtension(e)}unregisterExtension(e){T(this,p,P(this,p,"f").filter(t=>t!==e),"f")}start(){P(this,w,"f")?console.warn("[Memory] ReactMemoryScan has been disposed and cannot be started again"):(T(this,r,!0,"f"),T(this,l,setInterval(P(this,i,"m",k).bind(this),P(this,v,"f")),"f"),j.config.features.enableMutationObserver&&(null==P(this,m,"f")&&T(this,m,new z.DOMObserver,"f"),P(this,m,"f").startMonitoring()),console.log("[Memory] Tracking React and DOM memory..."))}pause(){T(this,r,!1,"f")}stop(){T(this,r,!1,"f"),null!==P(this,l,"f")&&(clearInterval(P(this,l,"f")),T(this,l,null,"f")),T(this,o,[],"f"),T(this,d,[],"f"),P(this,m,"f")&&(P(this,m,"f").stopMonitoring(),T(this,m,null,"f")),T(this,a,new WeakMap,"f"),T(this,c,new WeakMap,"f"),console.log("[Memory] ReactMemoryScan stopped")}dispose(){this.stop(),T(this,h,[],"f");for(const e of P(this,p,"f"))e&&"function"==typeof e.cleanup&&e.cleanup();T(this,p,[],"f"),P(this,y,"f")&&(P(this,y,"f").destroy(),T(this,y,null,"f")),T(this,w,!0,"f"),console.log("[Memory] ReactMemoryScan disposed")}recordBoundingRectangles(e){for(const t of e){const e=t.deref();if(null==e||P(this,a,"f").has(e))continue;const n=F.getBoundingClientRect(e);null!=n&&P(this,a,"f").set(e,n)}}getDetachedDOMInfo(){var e;const t=[];for(const n of P(this,o,"f")){const s=n.deref();if(null==s||s.isConnected)continue;const i=s;if(null==i.detachedElementId){const e=V.nextElementId++;i.detachedElementIdStr=`memory-id-${e}@`,i.detachedElementId=e}const o=null!==(e=P(this,c,"f").get(s))&&void 0!==e?e:[];t.push({element:n,boundingRect:P(this,a,"f").get(s),componentStack:o})}return t}isDevMode(){return P(this,f,"f")}getCachedComponentName(e){var t;const n="<Unknown>",s=e.deref();if(null==s)return n;const i=P(this,c,"f").get(s);return null==i?n:null!==(t=i[0])&&void 0!==t?t:n}updateFiberNodes(e){const t=new WeakSet;for(const e of P(this,d,"f")){const n=e.deref();null!=n&&t.add(n)}const n=new WeakSet;for(const t of e){const e=t.deref();null!=e&&n.add(e)}const s=[],o=[];for(const e of P(this,d,"f")){const t=e.deref();null!=t&&(n.has(t)?(o.push(e),null==t.return&&s.push(e)):s.push(e))}for(const n of e){const e=n.deref();null!=e&&(t.has(e)||o.push(n))}return T(this,d,o,"f"),P(this,i,"m",g).call(this,"known fibers: ",P(this,d,"f").length),P(this,i,"m",g).call(this,"leaked fibers: ",s.length),s}packLeakedFibers(e){const t=[];for(const n of e)t.push(new A(n));return t}scan(){const e=Date.now();P(this,i,"m",S).call(this);const t=P(this,o,"f"),n=P(this,i,"m",x).call(this);P(this,i,"m",_).call(this,n),this.recordBoundingRectangles(n),F.updateWeakRefList(t,n);const s=P(this,u,"f").scan(t,P(this,c,"f")),r=this.updateFiberNodes(s.fiberNodes);s.leakedFibers=r,s.eventListenerLeaks=P(this,i,"m",O).call(this),window.leakedFibers=this.packLeakedFibers(r);const l=Date.now();return P(this,i,"m",g).call(this,`scan took ${l-e}ms`),s}}o=new WeakMap,r=new WeakMap,l=new WeakMap,a=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,y=new WeakMap,w=new WeakMap,i=new WeakSet,g=function(...e){P(this,f,"f")&&j.config.features.enableConsoleLogs&&F.consoleLog(...e)},b=function(e){for(const t of P(this,h,"f"))t(e);const t=e.end-e.start;P(this,i,"m",g).call(this,"duration: ",`${t} ms`);const{scanner:n,leakedFibers:s,fiberNodes:o}=e,r=D(e,["scanner","leakedFibers","fiberNodes"]);P(this,i,"m",g).call(this,r)},M=function(){for(const e of P(this,p,"f"))null==e||e.beforeScan()},E=function(e){for(const t of P(this,p,"f"))null==t||t.afterScan(e)},k=function(){if(!P(this,r,"f"))return;P(this,i,"m",M).call(this);const e=performance.now(),t=this.scan(),n=performance.now(),s=Object.assign(Object.assign({},t),{start:e,end:n,scanner:this});P(this,i,"m",b).call(this,s),P(this,i,"m",E).call(this,s)},_=function(e){for(const t of e){const e=t.deref();if(null==e||P(this,c,"f").has(e))continue;const n=(0,N.getFiberNodeFromElement)(e);null!=n&&P(this,c,"f").set(e,(0,N.getReactComponentStack)(n))}},x=function(){return null==P(this,m,"f")?F.getDOMElements():[...F.getDOMElements(),...P(this,m,"f").getDOMElements()]},S=function(){null!=(null===window||void 0===window?void 0:window.gc)&&window.gc()},O=function(){var e;if(null==P(this,y,"f"))return[];const t=P(this,y,"f").scan(this.getCachedComponentName.bind(this)),n=[];for(const[s,i]of t.entries()){const t=new Map;for(const n of i){const s=null!==(e=t.get(n.type))&&void 0!==e?e:0;t.set(n.type,s+1)}for(const[e,i]of t.entries())n.push({type:e,componentName:s,count:i})}return n},V.nextElementId=0,t.default=V;class A{constructor(e){this.leakedFiber=e}}},847(e,t){t.isValidComponentName=function(e){return null!=e&&!n.has(e)};const n=new Set},860(e,t){t.BasicExtension=void 0,t.BasicExtension=class{constructor(e){this.scanner=e}beforeScan(){}afterScan(e){}}},23(e,t,n){var s,i=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DOMVisualizationExtension=void 0,r(n(150));const l=r(n(271)),a=n(860);class c extends a.BasicExtension{constructor(e){super(e),s.set(this,void 0),i(this,s,new l.default,"f")}afterScan(e){var t;const n=this.scanner;if(n.isDevMode()){const e=n.getDetachedDOMInfo();null===(t=o(this,s,"f"))||void 0===t||t.repaint(e)}}cleanup(){o(this,s,"f")&&"function"==typeof o(this,s,"f").cleanup&&o(this,s,"f").cleanup(),i(this,s,null,"f")}}t.DOMVisualizationExtension=c,s=new WeakMap},933(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=s(n(282)),o=n(23),r=n(476);if(!(0,r.hasRunInSession)()){const e=new i.default({isDevMode:!0}),t=new o.DOMVisualizationExtension(e);e.registerExtension(t),e.start(),(0,r.setRunInSession)()}},979(e,t){t.IntersectionObserverManager=void 0;class n{constructor(){this.observedElements=new Map,this.observer=new IntersectionObserver(e=>{e.forEach(e=>{const t=e.target,n=this.observedElements.get(t);n&&n(e)})},{threshold:0,rootMargin:"50px"})}static getInstance(){return n.instance||(n.instance=new n),n.instance}observe(e,t){const n=e.deref();null!=n&&(this.observedElements.set(n,t),this.observer.observe(n))}unobserve(e){const t=e.deref();null!=t&&(this.observedElements.delete(t),this.observer.unobserve(t))}}t.IntersectionObserverManager=n},737(e,t,n){t.traverseFiber=t.getTopMostFiberWithChild=t.dD=t.bv=t.Fm=t.JA=t.NT=t.UT=t.DQ=t.W=t.IZ=t.i$=t.Wb=void 0,t.getFiberNodeFromElement=function(e){for(const t of o){const n=r(e).find(e=>e.startsWith(t));if(n)return e[n]}return null},t.getReactComponentStack=function(e){const t=[],n=new Set;let s=e;for(;s&&!n.has(s);){n.add(s);const e=l(s);e&&t.push(e),s=s.return}return t},t.getDisplayNameOfFiberNode=l;const s=n(476),i=n(847);t.Wb=5,t.i$=26,t.IZ=27,t.W=2,t.DQ=4096,t.UT=4,t.NT=16,t.JA=32,t.Fm=1024,t.bv=8192,t.W,t.UT,t.NT,t.JA,t.DQ,t.bv,t.Fm,t.dD=e=>e.tag===t.Wb||e.tag===t.i$||e.tag===t.IZ||"string"==typeof e.type,t.getTopMostFiberWithChild=e=>{let n=null;return(0,t.traverseFiber)(e,function(e){null!=e.child&&(n=e)},!0),n},t.traverseFiber=(e,n,s=!1)=>{if(!e)return null;if(!0===n(e))return e;let i=s?e.return:e.child;for(;i;){const e=(0,t.traverseFiber)(i,n,s);if(e)return e;i=s?null:i.sibling}return null};const o=["__reactFiber$","__reactInternalInstance$","_reactRootContainer"],r=Object.getOwnPropertyNames.bind(Object);function l(e){var t,n,o,r;const l=null!==(t=e.type)&&void 0!==t?t:e.elementType;let a=null!==(n=null==l?void 0:l.displayName)&&void 0!==n?n:null==l?void 0:l.name;if(null==a)if(null==l?void 0:l.render){const e=null==l?void 0:l.render;a=null!==(o=null==e?void 0:e.displayName)&&void 0!==o?o:null==e?void 0:e.name}else(null==l?void 0:l.type)&&(a=null!==(r=l.type.displayName)&&void 0!==r?r:l.type.name);a||"function"!=typeof l||(a=l.name);const c=(0,s.getMeaningfulName)(function(e){if("string"!=typeof e)return null;if(!e.includes("[")||!e.includes("]"))return e;const t=e.indexOf("["),n=e.indexOf("]");if(t>n)return e;const s=e.substring(t+1,n);return s.startsWith("from ")?s.substring(5):s}(a));return(0,i.isValidComponentName)(c)?c:null}},476(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getDOMElements=function(){const e=Array.from(document.querySelectorAll("*")),t=[];for(const n of e)(0,s.isVisualizerElement)(n)||t.push(new WeakRef(n));return t},t.getDOMElementCount=function(){const e=Array.from(document.querySelectorAll("*"));let t=0;for(const n of e)(0,s.isVisualizerElement)(n)||++t;return t},t.getMeaningfulName=function(e){return null==e||i(e)?null:e},t.isMinifiedName=i,t.addCountbyKey=function(e,t,n){var s;e.set(t,(null!==(s=e.get(t))&&void 0!==s?s:0)+n)},t.updateWeakRefList=function(e,t){!function(e){const t=[];for(const n of e)null!=n.deref()&&t.push(n);for(;e.length>0;)e.pop();for(const n of t)e.push(n)}(e);const n=function(e){const t=new Set;for(const n of e)t.add(n.deref());return t}(e);for(const s of t){const t=s.deref();null==t||n.has(t)||(n.add(t),e.push(new WeakRef(t)))}return e},t.getBoundingClientRect=function(e){if(null==e)return null;if("function"!=typeof e.getBoundingClientRect)return null;let t=null;try{t=e.getBoundingClientRect()}catch(e){}if(null==t)return null;const n=window.scrollY,s=window.scrollX,i={};return i.bottom=t.bottom,i.height=t.height,i.left=t.left,i.right=t.right,i.top=t.top,i.width=t.width,i.x=t.x,i.y=t.y,i.scrollLeft=s,i.scrollTop=n,i},t.consoleLog=function(...e){r.apply(o,e)},t.hasRunInSession=function(){if(!a())return!1;try{return"true"===sessionStorage.getItem(l)}catch(e){return!1}},t.setRunInSession=function(){if(a())try{sessionStorage.setItem(l,"true")}catch(e){}};const s=n(498);function i(e){return!(e.length>=5)&&(e.length<=3||!/[^a-zA-Z0-9$_]/.test(e)&&!/^[A-Z][a-z]+([A-Z][a-z]*)*$|^[a-z]+([A-Z][a-z]*)*$/.test(e))}const o=console,r=o.log,l="memory_lens_session";function a(){try{const e="__memory_lens_session_test__";return sessionStorage.setItem(e,"1"),sessionStorage.removeItem(e),!0}catch(e){return!1}}},313(e,t){var n,s,i;t.WeakMapPlus=void 0,t.isWeakAPINative=function(){return f};const o="undefined"!=typeof window?window:self,r=null!==(n=o.WeakMap)&&void 0!==n?n:null,l=null!==r&&"function"==typeof r.toString&&"function WeakMap() { [native code] }"===h(r.toString()),a=null!==(s=o.WeakSet)&&void 0!==s?s:null,c=null!==a&&"function"==typeof a.toString&&"function WeakSet() { [native code] }"===h(a.toString()),d=null!==(i=o.WeakRef)&&void 0!==i?i:null,u=null!==d&&"function"==typeof d.toString&&"function WeakRef() { [native code] }"===h(d.toString()),f=l&&c&&u;function h(e){return"function"==typeof e.replace?e.replace(/\n/g," ").replace(/\s+/g," "):null}class p{constructor(e={}){this.strongMap=null,this.noopMap=!1,this.entriesMap=new Map,this.keyToId=new WeakMap;const{fallback:t="strong",cleanupMs:n=1e3}=e;this.isWeak=f,this.fallbackMode=t,this.isWeak?this.cleanupInterval=setInterval(()=>this.cleanup(),n):("strong"===t?this.strongMap=new Map:"noop"===t&&(this.noopMap=!0),this.cleanupInterval=-1)}getOrCreateId(e){let t=this.keyToId.get(e);return t||(t=Symbol(),this.keyToId.set(e,t)),t}set(e,t){var n;if(!this.isWeak)return this.noopMap||null===(n=this.strongMap)||void 0===n||n.set(e,t),this;const s=this.getOrCreateId(e);return this.entriesMap.set(s,{ref:new WeakRef(e),value:t}),this}get(e){var t,n;if(!this.isWeak){if(this.noopMap)return;return null===(t=this.strongMap)||void 0===t?void 0:t.get(e)}const s=this.keyToId.get(e);if(!s)return;const i=this.entriesMap.get(s);return(null===(n=null==i?void 0:i.ref)||void 0===n?void 0:n.deref())?null==i?void 0:i.value:void 0}has(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.has(e))&&void 0!==n&&n;const s=this.keyToId.get(e);if(!s)return!1;const i=this.entriesMap.get(s);return!(!i||!i.ref.deref())}delete(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.delete(e))&&void 0!==n&&n;const s=this.keyToId.get(e);return!!s&&(this.keyToId.delete(e),this.entriesMap.delete(s))}*liveEntries(){for(const[,e]of this.entriesMap){const t=e.ref.deref();t&&(yield[t,e.value])}}entries(){var e,t;return this.isWeak?this.liveEntries():this.noopMap?[][Symbol.iterator]():null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.entries())&&void 0!==t?t:[][Symbol.iterator]()}keys(){return function*(e){for(const[t]of e.entries())yield t}(this)}values(){return function*(e){for(const[,t]of e.entries())yield t}(this)}[Symbol.iterator](){return this.entries()}get size(){var e,t;if(!this.isWeak)return this.noopMap?0:null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.size)&&void 0!==t?t:0;let n=0;for(const e of this.liveEntries())n++;return n}getFallbackMode(){return this.fallbackMode}cleanup(){if(this.isWeak)for(const[e,t]of this.entriesMap)t.ref.deref()||this.entriesMap.delete(e)}destroy(){this.isWeak&&clearInterval(this.cleanupInterval)}}t.WeakMapPlus=p},904(e,t,n){t.createComponentStackPanel=function(e){const t=(0,s.createVisualizerElement)("div");t.style.width="100%",t.style.maxHeight="80vh",t.style.background="rgba(0, 0, 0, 0.5)",t.style.borderTop="1px solid rgba(255, 255, 255, 0.1)",t.style.display="none",t.style.flexDirection="column",t.style.padding="8px",t.style.boxSizing="border-box",t.style.borderRadius="8px",t.style.overflowY="scroll",t.style.overflowX="hidden",t.style.textShadow="none",t.style.font="9px Inter, system-ui, -apple-system, sans-serif",t.style.color="white",t.id="memory-visualization-component-stack-panel";let n=!1;return t.addEventListener("mouseenter",()=>{n=!0}),t.addEventListener("mouseleave",()=>{n=!1}),e((0,s.debounce)(e=>{var i;if(n)return;if(t.innerHTML="",null==e.selectedElementId||!(null===(i=e.selectedReactComponentStack)||void 0===i?void 0:i.length))return void(t.style.display="none");t.style.display="flex";const o=(0,s.createVisualizerElement)("div");o.textContent="Component Stack:",o.style.fontWeight="bold",o.style.marginBottom="8px",t.appendChild(o);let r=0;e.selectedReactComponentStack.forEach(e=>{const n=(0,s.createVisualizerElement)("div");n.style.marginBottom="4px",n.textContent=e,t.appendChild(n),++r}),0===r&&o.remove()},1)),t};const s=n(498)},341(e,t,n){t.createControlWidget=function(e,t,n){const l=(0,s.createVisualizerElement)("div");l.style.position="fixed",l.style.top="50px",l.style.right="50px",l.style.width="400px",l.style.background="rgba(0, 0, 0, 0.7)",l.style.border="none",l.style.borderRadius="8px",l.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.3)",l.style.zIndex="999999999",l.style.display="flex",l.style.flexDirection="column",l.style.textShadow="none",l.style.boxSizing="border-box",l.style.font="9px Inter, system-ui, -apple-system, sans-serif",l.id="memory-visualization-control-widget";const a=(0,s.createVisualizerElement)("div");a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="flex-start",a.style.padding="0 8px",a.style.height="36px",l.appendChild(a);const c=(0,r.createComponentStackPanel)(n);l.appendChild(c),function(e){let t=!1,n=0,s=0;e.addEventListener("mousedown",i=>{i.target.closest("#memory-visualization-control-widget > div:first-child")&&(t=!0,n=i.clientX-e.offsetLeft,s=i.clientY-e.offsetTop,e.style.cursor="move")}),document.addEventListener("mousemove",i=>{t&&(e.style.left=i.clientX-n+"px",e.style.top=i.clientY-s+"px",e.style.right="")}),document.addEventListener("mouseup",()=>{t=!1,e.style.cursor="default"})}(l);const d=(0,o.createToggleButton)(e,t);a.appendChild(d);const u=(0,i.createStatusText)(n);return a.appendChild(u),l};const s=n(498),i=n(775),o=n(946),r=n(904)},701(e,t,n){t.createOverlayRectangle=function(e,t,n,s,o,c,d){var u,f;const h=t.boundingRect;if(!h)return null;const p=(0,i.createVisualizerElement)("div");p.style.position="absolute",p.style.width=`${h.width}px`,p.style.height=`${h.height}px`,p.style.top=`${h.top+h.scrollTop}px`,p.style.left=`${h.left+h.scrollLeft}px`,p.style.border="1px dotted rgba(75, 192, 192, 0.8)",p.style.borderRadius="1px",p.style.zIndex=d.toString();const v=null!==(f=(null!==(u=t.componentStack)&&void 0!==u?u:[])[0])&&void 0!==f?f:"";let m=!1,y=!1;const w=new WeakRef(p);return(0,i.addTrackedListener)(w,"mouseover",()=>{var t;const n=`memory-id-${e}@`;l.remove(),null===(t=w.deref())||void 0===t||t.appendChild(l),l.textContent=`${v} (${n})`,l.style.display="inline-block",s(e)}),(0,i.addTrackedListener)(w,"mouseout",()=>{l.style.display="none",l.remove(),o(e)}),(0,i.addTrackedListener)(w,"click",()=>{c(e)}),p.__selected=()=>{y=!0,a(w,{selected:y,pinned:m})},p.__unselected=()=>{y=!1,a(w,{selected:y,pinned:m})},p.__pinned=()=>{m=!0,a(w,{selected:y,pinned:m})},p.__unpinned=()=>{m=!1,a(w,{selected:y,pinned:m})},r.observe(w,e=>{e.isIntersecting?p.style.visibility="visible":p.style.visibility="hidden"}),p.__cleanup=()=>{const e=w.deref();null!=e&&((0,i.removeAllListeners)(w),r.unobserve(w),e.__cleanup=null,e.__selected=null,e.__unselected=null,e.__pinned=null,e.__unpinned=null)},n.appendChild(p),w};const s=n(979),i=n(498),o=""+(Math.pow(2,30)-1),r=s.IntersectionObserverManager.getInstance(),l=function(){const e=(0,i.createVisualizerElement)("div");return e.style.color="white",e.style.background="rgba(75, 192, 192, 0.8)",e.style.textShadow="none",e.style.font="9px Inter, system-ui, -apple-system, sans-serif",e.style.padding="2px 6px",e.style.borderRadius="2px",e.style.whiteSpace="nowrap",e.style.position="absolute",e.style.bottom="100%",e.style.left="0",e.style.marginBottom="2px",e.style.display="none",e.style.zIndex=o,e}();function a(e,t){const n=e.deref();if(null==n)return;const{pinned:s,selected:i}=t;s?(n.style.border="1px solid rgba(255, 215, 0, 0.9)",n.style.background="rgba(255, 215, 0, 0.08)"):i?(n.style.border="1px solid rgba(75, 192, 192, 0.8)",n.style.background="rgba(75, 192, 192, 0.02)"):(n.style.border="1px dotted rgba(75, 192, 192, 0.8)",n.style.background="")}},775(e,t,n){t.createStatusText=function(e){const t=(0,s.createVisualizerElement)("div");return t.style.marginLeft="10px",t.style.color="white",t.style.fontSize="10px",t.style.fontFamily="Inter, system-ui, sans-serif",t.style.overflow="hidden",t.style.whiteSpace="nowrap",t.style.textOverflow="ellipsis",t.textContent="",e(e=>{var n,s,o,r;const l=window.performance,a=null==l?void 0:l.memory,c=null!==(n=null==a?void 0:a.usedJSHeapSize)&&void 0!==n?n:0,d=null!==(s=null==a?void 0:a.totalJSHeapSize)&&void 0!==s?s:0,u=null!==(o=e.totalDOMElementsCount)&&void 0!==o?o:0,f=null!==(r=e.detachedDOMElementsCount)&&void 0!==r?r:0;t.textContent=`DOM: ${u} total, ${f} detached | Heap: ${i(c)} / ${i(d)}`}),t};const s=n(498);function i(e){if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["B","KB","MB","GB"][t]}},946(e,t,n){t.createToggleButton=function(e,t){const n=(0,s.createVisualizerElement)("div");n.style.width="40px",n.style.height="24px",n.style.borderRadius="9999px",n.style.backgroundColor="#34C759",n.style.cursor="pointer",n.style.position="relative",n.style.transition="background-color 0.3s ease";const i=(0,s.createVisualizerElement)("div");return i.style.width="18px",i.style.height="18px",i.style.backgroundColor="white",i.style.borderRadius="50%",i.style.position="absolute",i.style.top="3px",i.style.left="3px",i.style.transition="left 0.25s ease",n.appendChild(i),n.addEventListener("click",()=>{t.value=!t.value,t.value?(e.style.display="none",e.style.pointerEvents="none",e.style.userSelect="none",i.style.left="19px",n.style.backgroundColor="#FF3B30"):(e.style.display="block",e.style.pointerEvents="auto",e.style.userSelect="auto",i.style.left="3px",n.style.backgroundColor="#34C759")}),n};const s=n(498)},368(e,t,n){t.createOverlayDiv=function(){const e=(0,s.createVisualizerElement)("div");return e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.id="memory-visualization-overlay",e};const s=n(498)},271(e,t,n){var s,i,o,r,l,a,c,d,u,f,h,p,v,m,y,w,g,b,M=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},E=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},k=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const _=k(n(150)),x=n(368),S=n(341),O=n(701),W=n(476),I=n(498);class C extends _.default{constructor(){super(),s.add(this),i.set(this,void 0),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),a.set(this,void 0),c.set(this,void 0),d.set(this,[]),M(this,c,{value:!1},"f"),M(this,o,(0,x.createOverlayDiv)(),"f"),(0,I.tryToAttachOverlay)(E(this,o,"f")),M(this,r,(0,S.createControlWidget)(E(this,o,"f"),E(this,c,"f"),e=>{E(this,d,"f").push(e)}),"f"),(0,I.tryToAttachOverlay)(E(this,r,"f")),M(this,i,new Map,"f"),M(this,a,E(this,s,"m",f).call(this),"f"),M(this,l,new Set,"f"),E(this,s,"m",u).call(this)}repaint(e){E(this,o,"f").remove(),E(this,s,"m",y).call(this,e),E(this,s,"m",g).call(this,e),E(this,s,"m",b).call(this),(0,I.tryToAttachOverlay)(E(this,o,"f"))}cleanup(){E(this,o,"f")&&E(this,o,"f").remove(),E(this,r,"f")&&E(this,r,"f").remove(),E(this,i,"f").clear(),E(this,l,"f").clear(),M(this,d,[],"f"),super.cleanup()}}i=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,a=new WeakMap,c=new WeakMap,d=new WeakMap,s=new WeakSet,u=function(){document.addEventListener("keydown",e=>{"d"!==e.key&&"D"!==e.key||null!=E(this,a,"f").selectedElementId&&E(this,l,"f").add(E(this,a,"f").selectedElementId)})},f=function(){const e={detachedDOMElementsCount:0,totalDOMElementsCount:(0,W.getDOMElementCount)(),selectedElementId:null,selectedReactComponentStack:[],pinnedElementId:null,setPinnedElementId:t=>{var n,i;if(e.pinnedElementId==t)return;const o=E(this,s,"m",h).call(this,e.pinnedElementId);null===(n=null==o?void 0:o.__unpinned)||void 0===n||n.call(o);const r=E(this,s,"m",h).call(this,t);null===(i=null==r?void 0:r.__pinned)||void 0===i||i.call(r),e.pinnedElementId=t}};return e},h=function(e){if(null==e)return null;const t=E(this,i,"f").get(e);return null==t?null:t.visualizerElementRef.deref()},p=function(e){const t=new Set;for(const n of e){const e=n.element.deref();if(null==e)continue;const s=e.detachedElementId;null!=s&&t.add(s)}return t},v=function(e,t){const n=E(this,i,"f").get(e);if(null==n)return;const s=new Set;let o=n.elementInfo.element.deref();for(;o&&!o.isConnected;){const e=o.detachedElementId,n=parseInt(e,10);if(s.has(n))break;s.add(n);const r=E(this,i,"f").get(n);if(null==r)break;const l=r.visualizerElementRef.deref();if(null==l)break;t(l),o=o.parentElement}},m=function(e){var t;const n=E(this,i,"f").get(e);if(E(this,i,"f").delete(e),null==n)return;const s=n.visualizerElementRef.deref();null!=s&&(null===(t=null==s?void 0:s.__cleanup)||void 0===t||t.call(s),s.remove())},y=function(e){for(const[e,t]of E(this,i,"f").entries())null!=e&&null==t.elementInfo.element.deref()&&E(this,s,"m",m).call(this,e);const t=E(this,s,"m",p).call(this,e);for(const[e]of E(this,i,"f").entries())null!=e&&(t.has(e)&&!E(this,l,"f").has(e)||E(this,s,"m",m).call(this,e))},w=function(e){var t;const n=e.element.deref();if(null==n)return 0;const s=n.detachedElementId;if(null==s)return 0;const i=null!==(t=e.boundingRect)&&void 0!==t?t:{width:50,height:50};let o=9999;return o+=parseInt(s,10),o+=Math.floor(1e7/(i.width*i.height)),o},g=function(e){for(const t of e){const e=t.element.deref();if(null==e)continue;const n=e.detachedElementId;if(null==n)continue;if(E(this,l,"f").has(n))continue;if(E(this,i,"f").has(n))continue;if(null==e)continue;if(e.isConnected)continue;const r=E(this,s,"m",w).call(this,t),c=(0,O.createOverlayRectangle)(n,t,E(this,o,"f"),e=>{E(this,a,"f").selectedElementId=e,E(this,s,"m",b).call(this),null!=e&&E(this,s,"m",v).call(this,e,e=>{var t;null===(t=null==e?void 0:e.__selected)||void 0===t||t.call(e)})},e=>{E(this,a,"f").selectedElementId===e&&(E(this,a,"f").selectedElementId=null,E(this,s,"m",b).call(this)),null!=e&&E(this,s,"m",v).call(this,e,e=>{var t;null===(t=null==e?void 0:e.__unselected)||void 0===t||t.call(e)})},e=>{E(this,a,"f").pinnedElementId===e?E(this,a,"f").setPinnedElementId(null):E(this,a,"f").setPinnedElementId(e),E(this,s,"m",b).call(this)},r);if(null==c||null==c.deref())return null;const d={elementInfo:t,visualizerElementRef:c};E(this,i,"f").set(n,d)}},b=function(){var e,t,n;const s=E(this,a,"f");null!=s.pinnedElementId&&(s.selectedElementId=s.pinnedElementId),s.detachedDOMElementsCount=E(this,i,"f").size,s.totalDOMElementsCount=(0,W.getDOMElementCount)();const o=null===(t=E(this,i,"f").get(null!==(e=s.selectedElementId)&&void 0!==e?e:-1))||void 0===t?void 0:t.elementInfo;s.selectedReactComponentStack=null!==(n=null==o?void 0:o.componentStack)&&void 0!==n?n:[];for(const e of E(this,d,"f"))e(Object.assign({},E(this,a,"f")))},t.default=C},150(e,t,n){var s,i,o,r,l,a,c,d,u=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},f=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0});const h=n(498);i=new WeakMap,s=new WeakSet,o=function(e){if(!f(this,i,"f")){const e=f(this,s,"m",l).call(this);u(this,i,e,"f")}f(this,s,"m",c).call(this,e)},r=function(e){document.body&&document.body.appendChild(e)},l=function(){const e=(0,h.createVisualizerElement)("canvas");return e.id="overlayCanvas",f(this,s,"m",r).call(this,e),e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="none",e.style.zIndex="99999",e.width=window.innerWidth,e.height=window.innerHeight,e},a=function(e){const{boundingRect:t}=e;return JSON.stringify({boundingRect:t})},c=function(e){const t=f(this,i,"f");if(!t)return;const n=t.getContext("2d");if(null==n)return;n.strokeStyle="rgba(75, 192, 192, 0.8)",n.lineWidth=2,n.fillStyle="rgba(75, 192, 192, 0.05)",n.font="11px Inter, system-ui, -apple-system, sans-serif";const o=new Set;e.forEach(e=>{var t;const i=e.boundingRect;if(null==i)return;const r=f(this,s,"m",a).call(this,e);if(o.has(r))return;o.add(r),n.fillRect(i.left,i.top,i.width,i.height),n.strokeRect(i.left,i.top,i.width,i.height);const l=null===(t=e.componentStack)||void 0===t?void 0:t[0];if(l){const t=e.element.deref(),s=null==t?void 0:t.detachedElementId,o=`${l}${s?` (${s})`:""}`;n.fillStyle="rgba(74, 131, 224, 1)",n.fillText(o,i.left+5,i.top+15),n.fillStyle="rgba(75, 192, 192, 0.05)"}})},d=function(){var e;const t=f(this,i,"f");if(t){const n=t.getContext("2d");null==n||n.clearRect(0,0,t.width,t.height),null===(e=t.parentNode)||void 0===e||e.removeChild(t)}u(this,i,null,"f")},t.default=class{constructor(){s.add(this),i.set(this,void 0),u(this,i,null,"f")}cleanup(){f(this,s,"m",d).call(this)}repaint(e){f(this,s,"m",d).call(this),f(this,s,"m",o).call(this,e)}}},498(e,t){t.isVisualizerElement=function(e){return"true"===e.getAttribute(n)},t.createVisualizerElement=function(e){const t=document.createElement(e);return function(e){e.setAttribute(n,"true"),e.setAttribute("data-visualcompletion","ignore")}(t),t},t.tryToAttachOverlay=function(e){document.body&&document.body.appendChild(e)},t.addTrackedListener=function(e,t,n,i){var o;const r=e.deref();r&&(r.addEventListener(t,n,i),s.has(r)||s.set(r,[]),null===(o=s.get(r))||void 0===o||o.push({type:t,cb:n,options:i}))},t.removeAllListeners=function(e){const t=e.deref();if(!t)return;const n=s.get(t);if(n){for(const{type:e,cb:s,options:i}of n)t.removeEventListener(e,s,i);s.delete(t)}},t.debounce=function(e,t){let n=null;return(...s)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}};const n="data-visualizer",s=new WeakMap}},t={};!function n(s){var i=t[s];if(void 0!==i)return i.exports;var o=t[s]={exports:{}};return e[s].call(o.exports,o,o.exports,n),o.exports}(933)})();
|
|
26
|
+
(()=>{"use strict";var e={346(e,t){t.config=t.of=t.lF=void 0,t.lF={scanIntervalMs:1e3,maxComponentStackDepth:100,memoryMeasurementIntervalMs:5e3},t.of={enableMutationObserver:!0,enableMemoryTracking:!0,enableComponentStack:!0,enableConsoleLogs:null===window||void 0===window?void 0:window.TEST_MEMORY_SCAN},t.config={performance:t.lF,features:t.of}},54(e,t,n){var s,i,o,r,l,a,c,d,u,f,h,p,v=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DOMObserver=void 0;const y=n(313),w=n(498),g=(0,y.isWeakAPINative)(),b=void 0!==window.MutationObserver;t.DOMObserver=class{constructor(){s.add(this),i.set(this,void 0),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),a.set(this,void 0),c.set(this,void 0),d.set(this,void 0),v(this,i,0,"f"),v(this,o,0,"f"),v(this,l,[],"f"),v(this,a,new WeakSet,"f"),v(this,d,[],"f"),this.startMonitoring()}register(e){m(this,d,"f").push(e)}startMonitoring(){if(!g||!b)return;if(null!=m(this,r,"f"))return;v(this,r,new MutationObserver(e=>{let t=[];const n=e=>{if(null==e)return;if(e.nodeType!=Node.ELEMENT_NODE)return;const n=e;if(!(0,w.isVisualizerElement)(n)){const e=m(this,s,"m",p).call(this,n);t=[...t,...e]}};e.forEach(e=>{e.addedNodes.forEach(n),e.removedNodes.forEach(n)}),m(this,d,"f").forEach(e=>e(t))}),"f");const e=()=>{var t;document.body?null===(t=m(this,r,"f"))||void 0===t||t.observe(document.body,{childList:!0,subtree:!0}):setTimeout(e,0)};e(),v(this,c,window.setInterval(()=>{m(this,s,"m",u).call(this)},3e3),"f")}stopMonitoring(){null!=m(this,r,"f")&&(m(this,r,"f").disconnect(),v(this,r,null,"f")),null!=m(this,c,"f")&&(window.clearInterval(m(this,c,"f")),v(this,c,null,"f"))}getDOMElements(){return[...m(this,l,"f")]}getStats(){try{v(this,i,m(this,s,"m",f).call(this),"f"),v(this,o,m(this,s,"m",h).call(this),"f")}catch(e){}return{elements:m(this,i,"f"),detachedElements:m(this,o,"f")}}},i=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,a=new WeakMap,c=new WeakMap,d=new WeakMap,s=new WeakSet,u=function(){const e=[],t=new Set;for(const n of m(this,l,"f")){const s=n.deref();null==s||t.has(s)||(e.push(n),t.add(s))}v(this,l,e,"f")},f=function(){var e,t;return v(this,i,null!==(t=null===(e=null===document||void 0===document?void 0:document.getElementsByTagName("*"))||void 0===e?void 0:e.length)&&void 0!==t?t:0,"f")},h=function(){let e=0;for(const t of m(this,l,"f")){const n=t.deref();n&&!1===n.isConnected&&++e}return v(this,o,e,"f")},p=function(e){const t=[e],n=new Set,s=[];for(;t.length>0;){const e=t.pop();if(null==e||n.has(e))continue;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE)continue;const i=e;if((0,w.isVisualizerElement)(i))continue;if(n.add(i),!m(this,a,"f").has(i)){const e=new WeakRef(i);m(this,l,"f").push(e),m(this,a,"f").add(i),s.push(e)}const o=i.childNodes;for(let e=0;e<o.length;++e)t.push(o[e])}return s}},953(e,t,n){var s,i,o,r,l,a,c,d=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},u=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.EventListenerTracker=void 0;const f=n(737),h=n(313);class p{constructor(){s.add(this),i.set(this,void 0),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),d(this,i,new h.WeakMapPlus({fallback:"noop",cleanupMs:100}),"f"),d(this,o,new Map,"f"),d(this,r,EventTarget.prototype.addEventListener,"f"),d(this,l,EventTarget.prototype.removeEventListener,"f"),u(this,s,"m",a).call(this)}static getInstance(){return p.instance||(p.instance=new p),p.instance}addListener(e,t,n,s){e.addEventListener(t,n,s)}removeListener(e,t,n,s){e.removeEventListener(t,n,s)}scan(e){const t=new Map;for(const[n,s]of u(this,i,"f").entries())if(n instanceof Element&&!n.isConnected)for(const i of s){if(!i.cb.deref())continue;const s=e(new WeakRef(n));t.has(s)||t.set(s,[]);const o=t.get(s);let r=null==o?void 0:o.find(e=>e.type===i.type);r||(r={type:i.type,count:0,entries:[]},null==o||o.push(r)),r.count++,r.entries.push(new WeakRef(i))}return d(this,o,t,"f"),t}getDetachedListeners(){return u(this,o,"f")}destroy(){u(this,s,"m",c).call(this),u(this,i,"f").destroy(),u(this,o,"f").clear(),p.instance=null}}t.EventListenerTracker=p,i=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,s=new WeakSet,a=function(){const e=this;EventTarget.prototype.addEventListener=function(t,n,s){var o;if(u(e,r,"f").call(this,t,n,s),this instanceof Element){const r=(0,f.getFiberNodeFromElement)(this),l={type:t,cb:new WeakRef(n),options:s,fiber:r?new WeakRef(r):void 0},a=null!==(o=u(e,i,"f").get(this))&&void 0!==o?o:[];a.push(l),u(e,i,"f").set(this,a)}},EventTarget.prototype.removeEventListener=function(t,n,s){if(u(e,l,"f").call(this,t,n,s),this instanceof Element){const o=u(e,i,"f").get(this);if(o){const r=o.findIndex(e=>e.type===t&&e.cb.deref()===n&&e.options===s);-1!==r&&o.splice(r,1),0===o.length?u(e,i,"f").delete(this):u(e,i,"f").set(this,o)}}}},c=function(){EventTarget.prototype.addEventListener=u(this,r,"f"),EventTarget.prototype.removeEventListener=u(this,l,"f")},p.instance=null},302(e,t,n){var s,i=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,i)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||(s=function(e){return s=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},s(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=s(e),r=0;r<n.length;r++)"default"!==n[r]&&i(t,e,n[r]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const l=r(n(476)),a=n(737),c=n(847);t.default=class{scan(e,t){var n;const s=new Set,i=new Set,o=new Map,r=new Map,d=new Set,u=new Set,f=[];let h=0,p=0;function v(e){(0,a.traverseFiber)(e,e=>{if(u.has(e))return!0;u.add(e);const t=(0,a.getDisplayNameOfFiberNode)(e);return null!=t&&(0,c.isValidComponentName)(t)?(i.add(t),l.addCountbyKey(o,t,1),!0):void 0},!0)}for(const i of e){const e=i.deref();if(null==e)continue;if(++h,!e.isConnected){if(t.has(e)){const s=(null!==(n=t.get(e))&&void 0!==n?n:[])[0];e.__component_name=s,l.addCountbyKey(r,s,1)}++p}const o=(0,a.getFiberNodeFromElement)(e);if(null==o)continue;v(o);const c=(0,a.getTopMostFiberWithChild)(o);null!=c&&(s.has(c)||(s.add(c),(0,a.traverseFiber)(c,e=>{if(d.has(e))return!0;d.add(e),f.push(new WeakRef(e)),v(e)},!1)))}return d.clear(),u.clear(),s.clear(),{components:i,componentToFiberNodeCount:o,totalElements:h,totalDetachedElements:p,detachedComponentToFiberNodeCount:r,fiberNodes:f,leakedFibers:[]}}}},282(e,t,n){var s,i,o,r,l,a,c,d,u,f,h,p,v,m,y,w,g,b,M,E,k,_,x,S,O,W=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,i)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),I=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),C=this&&this.__importStar||(s=function(e){return s=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},s(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=s(e),i=0;i<n.length;i++)"default"!==n[i]&&W(t,e,n[i]);return I(t,e),t}),T=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},P=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},D=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n},R=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const F=C(n(476)),L=R(n(302)),N=n(737),z=n(54),j=n(346),$=n(953);class V{constructor(e={}){var t,n,s,g;i.add(this),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),a.set(this,void 0),c.set(this,void 0),d.set(this,void 0),u.set(this,void 0),f.set(this,void 0),h.set(this,void 0),p.set(this,void 0),v.set(this,void 0),m.set(this,void 0),y.set(this,void 0),w.set(this,void 0),T(this,o,[],"f"),T(this,r,!1,"f"),T(this,a,new WeakMap,"f"),T(this,c,new WeakMap,"f"),T(this,d,[],"f"),T(this,y,e.trackEventListenerLeaks?$.EventListenerTracker.getInstance():null,"f"),T(this,l,null,"f"),T(this,w,!1,"f"),T(this,u,new L.default,"f"),T(this,f,null!==(t=e.isDevMode)&&void 0!==t&&t,"f"),T(this,h,null!==(n=e.subscribers)&&void 0!==n?n:[],"f"),T(this,p,null!==(s=e.extensions)&&void 0!==s?s:[],"f"),T(this,v,null!==(g=e.scanIntervalMs)&&void 0!==g?g:j.config.performance.scanIntervalMs,"f")}subscribe(e){return P(this,h,"f").push(e),()=>this.unsubscribe(e)}unsubscribe(e){T(this,h,P(this,h,"f").filter(t=>t!==e),"f")}registerExtension(e){return P(this,p,"f").push(e),()=>this.unregisterExtension(e)}unregisterExtension(e){T(this,p,P(this,p,"f").filter(t=>t!==e),"f")}start(){P(this,w,"f")?console.warn("[Memory] ReactMemoryScan has been disposed and cannot be started again"):(T(this,r,!0,"f"),T(this,l,setInterval(P(this,i,"m",k).bind(this),P(this,v,"f")),"f"),j.config.features.enableMutationObserver&&(null==P(this,m,"f")&&T(this,m,new z.DOMObserver,"f"),P(this,m,"f").startMonitoring()),console.log("[Memory] Tracking React and DOM memory..."))}pause(){T(this,r,!1,"f")}stop(){T(this,r,!1,"f"),null!==P(this,l,"f")&&(clearInterval(P(this,l,"f")),T(this,l,null,"f")),T(this,o,[],"f"),T(this,d,[],"f"),P(this,m,"f")&&(P(this,m,"f").stopMonitoring(),T(this,m,null,"f")),T(this,a,new WeakMap,"f"),T(this,c,new WeakMap,"f"),console.log("[Memory] ReactMemoryScan stopped")}dispose(){this.stop(),T(this,h,[],"f");for(const e of P(this,p,"f"))e&&"function"==typeof e.cleanup&&e.cleanup();T(this,p,[],"f"),P(this,y,"f")&&(P(this,y,"f").destroy(),T(this,y,null,"f")),T(this,w,!0,"f"),console.log("[Memory] ReactMemoryScan disposed")}recordBoundingRectangles(e){for(const t of e){const e=t.deref();if(null==e||P(this,a,"f").has(e))continue;const n=F.getBoundingClientRect(e);null!=n&&P(this,a,"f").set(e,n)}}getDetachedDOMInfo(){var e;const t=[];for(const n of P(this,o,"f")){const s=n.deref();if(null==s||s.isConnected)continue;const i=s;if(null==i.detachedElementId){const e=V.nextElementId++;i.detachedElementIdStr=`memory-id-${e}@`,i.detachedElementId=e}const o=null!==(e=P(this,c,"f").get(s))&&void 0!==e?e:[];t.push({element:n,boundingRect:P(this,a,"f").get(s),componentStack:o})}return t}isDevMode(){return P(this,f,"f")}getCachedComponentName(e){var t;const n="<Unknown>",s=e.deref();if(null==s)return n;const i=P(this,c,"f").get(s);return null==i?n:null!==(t=i[0])&&void 0!==t?t:n}updateFiberNodes(e){const t=new WeakSet;for(const e of P(this,d,"f")){const n=e.deref();null!=n&&t.add(n)}const n=new WeakSet;for(const t of e){const e=t.deref();null!=e&&n.add(e)}const s=[],o=[];for(const e of P(this,d,"f")){const t=e.deref();null!=t&&(n.has(t)?(o.push(e),null==t.return&&s.push(e)):s.push(e))}for(const n of e){const e=n.deref();null!=e&&(t.has(e)||o.push(n))}return T(this,d,o,"f"),P(this,i,"m",g).call(this,"known fibers: ",P(this,d,"f").length),P(this,i,"m",g).call(this,"leaked fibers: ",s.length),s}packLeakedFibers(e){const t=[];for(const n of e)t.push(new A(n));return t}scan(){const e=Date.now();P(this,i,"m",S).call(this);const t=P(this,o,"f"),n=P(this,i,"m",x).call(this);P(this,i,"m",_).call(this,n),this.recordBoundingRectangles(n),F.updateWeakRefList(t,n);const s=P(this,u,"f").scan(t,P(this,c,"f")),r=this.updateFiberNodes(s.fiberNodes);s.leakedFibers=r,s.eventListenerLeaks=P(this,i,"m",O).call(this),window.leakedFibers=this.packLeakedFibers(r);const l=Date.now();return P(this,i,"m",g).call(this,`scan took ${l-e}ms`),s}}o=new WeakMap,r=new WeakMap,l=new WeakMap,a=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,y=new WeakMap,w=new WeakMap,i=new WeakSet,g=function(...e){P(this,f,"f")&&j.config.features.enableConsoleLogs&&F.consoleLog(...e)},b=function(e){for(const t of P(this,h,"f"))t(e);const t=e.end-e.start;P(this,i,"m",g).call(this,"duration: ",`${t} ms`);const{scanner:n,leakedFibers:s,fiberNodes:o}=e,r=D(e,["scanner","leakedFibers","fiberNodes"]);P(this,i,"m",g).call(this,r)},M=function(){for(const e of P(this,p,"f"))null==e||e.beforeScan()},E=function(e){for(const t of P(this,p,"f"))null==t||t.afterScan(e)},k=function(){if(!P(this,r,"f"))return;P(this,i,"m",M).call(this);const e=performance.now(),t=this.scan(),n=performance.now(),s=Object.assign(Object.assign({},t),{start:e,end:n,scanner:this});P(this,i,"m",b).call(this,s),P(this,i,"m",E).call(this,s)},_=function(e){for(const t of e){const e=t.deref();if(null==e||P(this,c,"f").has(e))continue;const n=(0,N.getFiberNodeFromElement)(e);null!=n&&P(this,c,"f").set(e,(0,N.getReactComponentStack)(n))}},x=function(){return null==P(this,m,"f")?F.getDOMElements():[...F.getDOMElements(),...P(this,m,"f").getDOMElements()]},S=function(){null!=(null===window||void 0===window?void 0:window.gc)&&window.gc()},O=function(){var e;if(null==P(this,y,"f"))return[];const t=P(this,y,"f").scan(this.getCachedComponentName.bind(this)),n=[];for(const[s,i]of t.entries()){const t=new Map;for(const n of i){const s=null!==(e=t.get(n.type))&&void 0!==e?e:0;t.set(n.type,s+1)}for(const[e,i]of t.entries())n.push({type:e,componentName:s,count:i})}return n},V.nextElementId=0,t.default=V;class A{constructor(e){this.leakedFiber=e}}},847(e,t){t.isValidComponentName=function(e){return null!=e&&!n.has(e)};const n=new Set},860(e,t){t.BasicExtension=void 0,t.BasicExtension=class{constructor(e){this.scanner=e}beforeScan(){}afterScan(e){}}},23(e,t,n){var s,i=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DOMVisualizationExtension=void 0,r(n(150));const l=r(n(271)),a=n(860);class c extends a.BasicExtension{constructor(e){super(e),s.set(this,void 0),i(this,s,new l.default,"f")}afterScan(e){var t;const n=this.scanner;if(n.isDevMode()){const e=n.getDetachedDOMInfo();null===(t=o(this,s,"f"))||void 0===t||t.repaint(e)}}cleanup(){o(this,s,"f")&&"function"==typeof o(this,s,"f").cleanup&&o(this,s,"f").cleanup(),i(this,s,null,"f")}}t.DOMVisualizationExtension=c,s=new WeakMap},933(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=s(n(282)),o=n(23),r=n(476);if(!(0,r.hasRunInSession)()){const e=new i.default({isDevMode:!0}),t=new o.DOMVisualizationExtension(e);e.registerExtension(t),e.start(),(0,r.setRunInSession)()}},979(e,t){t.IntersectionObserverManager=void 0;class n{constructor(){this.observedElements=new Map,this.observer=new IntersectionObserver(e=>{e.forEach(e=>{const t=e.target,n=this.observedElements.get(t);n&&n(e)})},{threshold:0,rootMargin:"50px"})}static getInstance(){return n.instance||(n.instance=new n),n.instance}observe(e,t){const n=e.deref();null!=n&&(this.observedElements.set(n,t),this.observer.observe(n))}unobserve(e){const t=e.deref();null!=t&&(this.observedElements.delete(t),this.observer.unobserve(t))}}t.IntersectionObserverManager=n},737(e,t,n){t.traverseFiber=t.getTopMostFiberWithChild=t.dD=t.bv=t.Fm=t.JA=t.NT=t.UT=t.DQ=t.W=t.IZ=t.i$=t.Wb=void 0,t.getFiberNodeFromElement=function(e){for(const t of o){const n=r(e).find(e=>e.startsWith(t));if(n)return e[n]}return null},t.getReactComponentStack=function(e){const t=[],n=new Set;let s=e;for(;s&&!n.has(s);){n.add(s);const e=l(s);e&&t.push(e),s=s.return}return t},t.getDisplayNameOfFiberNode=l;const s=n(476),i=n(847);t.Wb=5,t.i$=26,t.IZ=27,t.W=2,t.DQ=4096,t.UT=4,t.NT=16,t.JA=32,t.Fm=1024,t.bv=8192,t.W,t.UT,t.NT,t.JA,t.DQ,t.bv,t.Fm,t.dD=e=>e.tag===t.Wb||e.tag===t.i$||e.tag===t.IZ||"string"==typeof e.type,t.getTopMostFiberWithChild=e=>{let n=null;return(0,t.traverseFiber)(e,function(e){null!=e.child&&(n=e)},!0),n},t.traverseFiber=(e,n,s=!1)=>{if(!e)return null;if(!0===n(e))return e;let i=s?e.return:e.child;for(;i;){const e=(0,t.traverseFiber)(i,n,s);if(e)return e;i=s?null:i.sibling}return null};const o=["__reactFiber$","__reactInternalInstance$","_reactRootContainer"],r=Object.getOwnPropertyNames.bind(Object);function l(e){var t,n,o,r;const l=null!==(t=e.type)&&void 0!==t?t:e.elementType;let a=null!==(n=null==l?void 0:l.displayName)&&void 0!==n?n:null==l?void 0:l.name;if(null==a)if(null==l?void 0:l.render){const e=null==l?void 0:l.render;a=null!==(o=null==e?void 0:e.displayName)&&void 0!==o?o:null==e?void 0:e.name}else(null==l?void 0:l.type)&&(a=null!==(r=l.type.displayName)&&void 0!==r?r:l.type.name);a||"function"!=typeof l||(a=l.name);const c=(0,s.getMeaningfulName)(function(e){if("string"!=typeof e)return null;if(!e.includes("[")||!e.includes("]"))return e;const t=e.indexOf("["),n=e.indexOf("]");if(t>n)return e;const s=e.substring(t+1,n);return s.startsWith("from ")?s.substring(5):s}(a));return(0,i.isValidComponentName)(c)?c:null}},476(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getDOMElements=function(){const e=Array.from(document.querySelectorAll("*")),t=[];for(const n of e)(0,s.isVisualizerElement)(n)||t.push(new WeakRef(n));return t},t.getDOMElementCount=function(){const e=Array.from(document.querySelectorAll("*"));let t=0;for(const n of e)(0,s.isVisualizerElement)(n)||++t;return t},t.getMeaningfulName=function(e){return null==e||i(e)?null:e},t.isMinifiedName=i,t.addCountbyKey=function(e,t,n){var s;e.set(t,(null!==(s=e.get(t))&&void 0!==s?s:0)+n)},t.updateWeakRefList=function(e,t){!function(e){const t=[];for(const n of e)null!=n.deref()&&t.push(n);for(;e.length>0;)e.pop();for(const n of t)e.push(n)}(e);const n=function(e){const t=new Set;for(const n of e)t.add(n.deref());return t}(e);for(const s of t){const t=s.deref();null==t||n.has(t)||(n.add(t),e.push(new WeakRef(t)))}return e},t.getBoundingClientRect=function(e){if(null==e)return null;if("function"!=typeof e.getBoundingClientRect)return null;let t=null;try{t=e.getBoundingClientRect()}catch(e){}if(null==t)return null;const n=window.scrollY,s=window.scrollX,i={};return i.bottom=t.bottom,i.height=t.height,i.left=t.left,i.right=t.right,i.top=t.top,i.width=t.width,i.x=t.x,i.y=t.y,i.scrollLeft=s,i.scrollTop=n,i},t.consoleLog=function(...e){r.apply(o,e)},t.hasRunInSession=function(){if(!a())return!1;try{return"true"===sessionStorage.getItem(l)}catch(e){return!1}},t.setRunInSession=function(){if(a())try{sessionStorage.setItem(l,"true")}catch(e){}};const s=n(498);function i(e){return!(e.length>=5)&&(e.length<=3||!/[^a-zA-Z0-9$_]/.test(e)&&!/^[A-Z][a-z]+([A-Z][a-z]*)*$|^[a-z]+([A-Z][a-z]*)*$/.test(e))}const o=console,r=o.log,l="memory_lens_session";function a(){try{const e="__memory_lens_session_test__";return sessionStorage.setItem(e,"1"),sessionStorage.removeItem(e),!0}catch(e){return!1}}},313(e,t){var n,s,i;t.WeakMapPlus=void 0,t.isWeakAPINative=function(){return f};const o="undefined"!=typeof window?window:self,r=null!==(n=o.WeakMap)&&void 0!==n?n:null,l=null!==r&&"function"==typeof r.toString&&"function WeakMap() { [native code] }"===h(r.toString()),a=null!==(s=o.WeakSet)&&void 0!==s?s:null,c=null!==a&&"function"==typeof a.toString&&"function WeakSet() { [native code] }"===h(a.toString()),d=null!==(i=o.WeakRef)&&void 0!==i?i:null,u=null!==d&&"function"==typeof d.toString&&"function WeakRef() { [native code] }"===h(d.toString()),f=l&&c&&u;function h(e){return"function"==typeof e.replace?e.replace(/\n/g," ").replace(/\s+/g," "):null}class p{constructor(e={}){this.strongMap=null,this.noopMap=!1,this.entriesMap=new Map,this.keyToId=new WeakMap;const{fallback:t="strong",cleanupMs:n=1e3}=e;this.isWeak=f,this.fallbackMode=t,this.isWeak?this.cleanupInterval=setInterval(()=>this.cleanup(),n):("strong"===t?this.strongMap=new Map:"noop"===t&&(this.noopMap=!0),this.cleanupInterval=-1)}getOrCreateId(e){let t=this.keyToId.get(e);return t||(t=Symbol(),this.keyToId.set(e,t)),t}set(e,t){var n;if(!this.isWeak)return this.noopMap||null===(n=this.strongMap)||void 0===n||n.set(e,t),this;const s=this.getOrCreateId(e);return this.entriesMap.set(s,{ref:new WeakRef(e),value:t}),this}get(e){var t,n;if(!this.isWeak){if(this.noopMap)return;return null===(t=this.strongMap)||void 0===t?void 0:t.get(e)}const s=this.keyToId.get(e);if(!s)return;const i=this.entriesMap.get(s);return(null===(n=null==i?void 0:i.ref)||void 0===n?void 0:n.deref())?null==i?void 0:i.value:void 0}has(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.has(e))&&void 0!==n&&n;const s=this.keyToId.get(e);if(!s)return!1;const i=this.entriesMap.get(s);return!(!i||!i.ref.deref())}delete(e){var t,n;if(!this.isWeak)return!this.noopMap&&null!==(n=null===(t=this.strongMap)||void 0===t?void 0:t.delete(e))&&void 0!==n&&n;const s=this.keyToId.get(e);return!!s&&(this.keyToId.delete(e),this.entriesMap.delete(s))}*liveEntries(){for(const[,e]of this.entriesMap){const t=e.ref.deref();t&&(yield[t,e.value])}}entries(){var e,t;return this.isWeak?this.liveEntries():this.noopMap?[][Symbol.iterator]():null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.entries())&&void 0!==t?t:[][Symbol.iterator]()}keys(){return function*(e){for(const[t]of e.entries())yield t}(this)}values(){return function*(e){for(const[,t]of e.entries())yield t}(this)}[Symbol.iterator](){return this.entries()}get size(){var e,t;if(!this.isWeak)return this.noopMap?0:null!==(t=null===(e=this.strongMap)||void 0===e?void 0:e.size)&&void 0!==t?t:0;let n=0;for(const e of this.liveEntries())n++;return n}getFallbackMode(){return this.fallbackMode}cleanup(){if(this.isWeak)for(const[e,t]of this.entriesMap)t.ref.deref()||this.entriesMap.delete(e)}destroy(){this.isWeak&&clearInterval(this.cleanupInterval)}}t.WeakMapPlus=p},904(e,t,n){t.createComponentStackPanel=function(e){const t=(0,s.createVisualizerElement)("div");t.style.width="100%",t.style.maxHeight="80vh",t.style.background="rgba(0, 0, 0, 0.5)",t.style.borderTop="1px solid rgba(255, 255, 255, 0.1)",t.style.display="none",t.style.flexDirection="column",t.style.padding="8px",t.style.boxSizing="border-box",t.style.borderRadius="8px",t.style.overflowY="scroll",t.style.overflowX="hidden",t.style.textShadow="none",t.style.font="9px Inter, system-ui, -apple-system, sans-serif",t.style.color="white",t.id="memory-visualization-component-stack-panel";let n=!1;return t.addEventListener("mouseenter",()=>{n=!0}),t.addEventListener("mouseleave",()=>{n=!1}),e((0,s.debounce)(e=>{var i;if(n)return;if(t.innerHTML="",null==e.selectedElementId||!(null===(i=e.selectedReactComponentStack)||void 0===i?void 0:i.length))return void(t.style.display="none");t.style.display="flex";const o=(0,s.createVisualizerElement)("div");o.textContent="Component Stack:",o.style.fontWeight="bold",o.style.marginBottom="8px",t.appendChild(o);let r=0;e.selectedReactComponentStack.forEach(e=>{const n=(0,s.createVisualizerElement)("div");n.style.marginBottom="4px",n.textContent=e,t.appendChild(n),++r}),0===r&&o.remove()},1)),t};const s=n(498)},341(e,t,n){t.createControlWidget=function(e,t,n){const l=(0,s.createVisualizerElement)("div");l.style.position="fixed",l.style.top="50px",l.style.right="50px",l.style.width="400px",l.style.background="rgba(0, 0, 0, 0.7)",l.style.border="none",l.style.borderRadius="8px",l.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.3)",l.style.zIndex="999999999",l.style.display="flex",l.style.flexDirection="column",l.style.textShadow="none",l.style.boxSizing="border-box",l.style.font="9px Inter, system-ui, -apple-system, sans-serif",l.id="memory-visualization-control-widget";const a=(0,s.createVisualizerElement)("div");a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="flex-start",a.style.padding="0 8px",a.style.height="36px",l.appendChild(a);const c=(0,r.createComponentStackPanel)(n);l.appendChild(c),function(e){let t=!1,n=0,s=0;e.addEventListener("mousedown",i=>{i.target.closest("#memory-visualization-control-widget > div:first-child")&&(t=!0,n=i.clientX-e.offsetLeft,s=i.clientY-e.offsetTop,e.style.cursor="move")}),document.addEventListener("mousemove",i=>{t&&(e.style.left=i.clientX-n+"px",e.style.top=i.clientY-s+"px",e.style.right="")}),document.addEventListener("mouseup",()=>{t=!1,e.style.cursor="default"})}(l);const d=(0,o.createToggleButton)(e,t);a.appendChild(d);const u=(0,i.createStatusText)(n);return a.appendChild(u),l};const s=n(498),i=n(775),o=n(946),r=n(904)},701(e,t,n){t.createOverlayRectangle=function(e,t,n,s,o,c,d){var u,f;const h=t.boundingRect;if(!h)return null;const p=(0,i.createVisualizerElement)("div");p.style.position="absolute",p.style.width=`${h.width}px`,p.style.height=`${h.height}px`,p.style.top=`${h.top+h.scrollTop}px`,p.style.left=`${h.left+h.scrollLeft}px`,p.style.border="1px dotted rgba(75, 192, 192, 0.8)",p.style.borderRadius="1px",p.style.zIndex=d.toString();const v=null!==(f=(null!==(u=t.componentStack)&&void 0!==u?u:[])[0])&&void 0!==f?f:"";let m=!1,y=!1;const w=new WeakRef(p);return(0,i.addTrackedListener)(w,"mouseover",()=>{var t;const n=`memory-id-${e}@`;l.remove(),null===(t=w.deref())||void 0===t||t.appendChild(l),l.textContent=`${v} (${n})`,l.style.display="inline-block",s(e)}),(0,i.addTrackedListener)(w,"mouseout",()=>{l.style.display="none",l.remove(),o(e)}),(0,i.addTrackedListener)(w,"click",()=>{c(e)}),p.__selected=()=>{y=!0,a(w,{selected:y,pinned:m})},p.__unselected=()=>{y=!1,a(w,{selected:y,pinned:m})},p.__pinned=()=>{m=!0,a(w,{selected:y,pinned:m})},p.__unpinned=()=>{m=!1,a(w,{selected:y,pinned:m})},r.observe(w,e=>{e.isIntersecting?p.style.visibility="visible":p.style.visibility="hidden"}),p.__cleanup=()=>{const e=w.deref();null!=e&&((0,i.removeAllListeners)(w),r.unobserve(w),e.__cleanup=null,e.__selected=null,e.__unselected=null,e.__pinned=null,e.__unpinned=null)},n.appendChild(p),w};const s=n(979),i=n(498),o=""+(Math.pow(2,30)-1),r=s.IntersectionObserverManager.getInstance(),l=function(){const e=(0,i.createVisualizerElement)("div");return e.style.color="white",e.style.background="rgba(75, 192, 192, 0.8)",e.style.textShadow="none",e.style.font="9px Inter, system-ui, -apple-system, sans-serif",e.style.padding="2px 6px",e.style.borderRadius="2px",e.style.whiteSpace="nowrap",e.style.position="absolute",e.style.bottom="100%",e.style.left="0",e.style.marginBottom="2px",e.style.display="none",e.style.zIndex=o,e}();function a(e,t){const n=e.deref();if(null==n)return;const{pinned:s,selected:i}=t;s?(n.style.border="1px solid rgba(255, 215, 0, 0.9)",n.style.background="rgba(255, 215, 0, 0.08)"):i?(n.style.border="1px solid rgba(75, 192, 192, 0.8)",n.style.background="rgba(75, 192, 192, 0.02)"):(n.style.border="1px dotted rgba(75, 192, 192, 0.8)",n.style.background="")}},775(e,t,n){t.createStatusText=function(e){const t=(0,s.createVisualizerElement)("div");return t.style.marginLeft="10px",t.style.color="white",t.style.fontSize="10px",t.style.fontFamily="Inter, system-ui, sans-serif",t.style.overflow="hidden",t.style.whiteSpace="nowrap",t.style.textOverflow="ellipsis",t.textContent="",e(e=>{var n,s,o,r;const l=window.performance,a=null==l?void 0:l.memory,c=null!==(n=null==a?void 0:a.usedJSHeapSize)&&void 0!==n?n:0,d=null!==(s=null==a?void 0:a.totalJSHeapSize)&&void 0!==s?s:0,u=null!==(o=e.totalDOMElementsCount)&&void 0!==o?o:0,f=null!==(r=e.detachedDOMElementsCount)&&void 0!==r?r:0;t.textContent=`DOM: ${u} total, ${f} detached | Heap: ${i(c)} / ${i(d)}`}),t};const s=n(498);function i(e){if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["B","KB","MB","GB"][t]}},946(e,t,n){t.createToggleButton=function(e,t){const n=(0,s.createVisualizerElement)("div");n.style.width="40px",n.style.height="24px",n.style.borderRadius="9999px",n.style.backgroundColor="#34C759",n.style.cursor="pointer",n.style.position="relative",n.style.transition="background-color 0.3s ease";const i=(0,s.createVisualizerElement)("div");return i.style.width="18px",i.style.height="18px",i.style.backgroundColor="white",i.style.borderRadius="50%",i.style.position="absolute",i.style.top="3px",i.style.left="3px",i.style.transition="left 0.25s ease",n.appendChild(i),n.addEventListener("click",()=>{t.value=!t.value,t.value?(e.style.display="none",e.style.pointerEvents="none",e.style.userSelect="none",i.style.left="19px",n.style.backgroundColor="#FF3B30"):(e.style.display="block",e.style.pointerEvents="auto",e.style.userSelect="auto",i.style.left="3px",n.style.backgroundColor="#34C759")}),n};const s=n(498)},368(e,t,n){t.createOverlayDiv=function(){const e=(0,s.createVisualizerElement)("div");return e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.id="memory-visualization-overlay",e};const s=n(498)},271(e,t,n){var s,i,o,r,l,a,c,d,u,f,h,p,v,m,y,w,g,b,M=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},E=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},k=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const _=k(n(150)),x=n(368),S=n(341),O=n(701),W=n(476),I=n(498);class C extends _.default{constructor(){super(),s.add(this),i.set(this,void 0),o.set(this,void 0),r.set(this,void 0),l.set(this,void 0),a.set(this,void 0),c.set(this,void 0),d.set(this,[]),M(this,c,{value:!1},"f"),M(this,o,(0,x.createOverlayDiv)(),"f"),(0,I.tryToAttachOverlay)(E(this,o,"f")),M(this,r,(0,S.createControlWidget)(E(this,o,"f"),E(this,c,"f"),e=>{E(this,d,"f").push(e)}),"f"),(0,I.tryToAttachOverlay)(E(this,r,"f")),M(this,i,new Map,"f"),M(this,a,E(this,s,"m",f).call(this),"f"),M(this,l,new Set,"f"),E(this,s,"m",u).call(this)}repaint(e){E(this,o,"f").remove(),E(this,s,"m",y).call(this,e),E(this,s,"m",g).call(this,e),E(this,s,"m",b).call(this),(0,I.tryToAttachOverlay)(E(this,o,"f"))}cleanup(){E(this,o,"f")&&E(this,o,"f").remove(),E(this,r,"f")&&E(this,r,"f").remove(),E(this,i,"f").clear(),E(this,l,"f").clear(),M(this,d,[],"f"),super.cleanup()}}i=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,a=new WeakMap,c=new WeakMap,d=new WeakMap,s=new WeakSet,u=function(){document.addEventListener("keydown",e=>{"d"!==e.key&&"D"!==e.key||null!=E(this,a,"f").selectedElementId&&E(this,l,"f").add(E(this,a,"f").selectedElementId)})},f=function(){const e={detachedDOMElementsCount:0,totalDOMElementsCount:(0,W.getDOMElementCount)(),selectedElementId:null,selectedReactComponentStack:[],pinnedElementId:null,setPinnedElementId:t=>{var n,i;if(e.pinnedElementId==t)return;const o=E(this,s,"m",h).call(this,e.pinnedElementId);null===(n=null==o?void 0:o.__unpinned)||void 0===n||n.call(o);const r=E(this,s,"m",h).call(this,t);null===(i=null==r?void 0:r.__pinned)||void 0===i||i.call(r),e.pinnedElementId=t}};return e},h=function(e){if(null==e)return null;const t=E(this,i,"f").get(e);return null==t?null:t.visualizerElementRef.deref()},p=function(e){const t=new Set;for(const n of e){const e=n.element.deref();if(null==e)continue;const s=e.detachedElementId;null!=s&&t.add(s)}return t},v=function(e,t){const n=E(this,i,"f").get(e);if(null==n)return;const s=new Set;let o=n.elementInfo.element.deref();for(;o&&!o.isConnected;){const e=o.detachedElementId,n=parseInt(e,10);if(s.has(n))break;s.add(n);const r=E(this,i,"f").get(n);if(null==r)break;const l=r.visualizerElementRef.deref();if(null==l)break;t(l),o=o.parentElement}},m=function(e){var t;const n=E(this,i,"f").get(e);if(E(this,i,"f").delete(e),null==n)return;const s=n.visualizerElementRef.deref();null!=s&&(null===(t=null==s?void 0:s.__cleanup)||void 0===t||t.call(s),s.remove())},y=function(e){for(const[e,t]of E(this,i,"f").entries())null!=e&&null==t.elementInfo.element.deref()&&E(this,s,"m",m).call(this,e);const t=E(this,s,"m",p).call(this,e);for(const[e]of E(this,i,"f").entries())null!=e&&(t.has(e)&&!E(this,l,"f").has(e)||E(this,s,"m",m).call(this,e))},w=function(e){var t;const n=e.element.deref();if(null==n)return 0;const s=n.detachedElementId;if(null==s)return 0;const i=null!==(t=e.boundingRect)&&void 0!==t?t:{width:50,height:50};let o=9999;return o+=parseInt(s,10),o+=Math.floor(1e7/(i.width*i.height)),o},g=function(e){for(const t of e){const e=t.element.deref();if(null==e)continue;const n=e.detachedElementId;if(null==n)continue;if(E(this,l,"f").has(n))continue;if(E(this,i,"f").has(n))continue;if(null==e)continue;if(e.isConnected)continue;const r=E(this,s,"m",w).call(this,t),c=(0,O.createOverlayRectangle)(n,t,E(this,o,"f"),e=>{E(this,a,"f").selectedElementId=e,E(this,s,"m",b).call(this),null!=e&&E(this,s,"m",v).call(this,e,e=>{var t;null===(t=null==e?void 0:e.__selected)||void 0===t||t.call(e)})},e=>{E(this,a,"f").selectedElementId===e&&(E(this,a,"f").selectedElementId=null,E(this,s,"m",b).call(this)),null!=e&&E(this,s,"m",v).call(this,e,e=>{var t;null===(t=null==e?void 0:e.__unselected)||void 0===t||t.call(e)})},e=>{E(this,a,"f").pinnedElementId===e?E(this,a,"f").setPinnedElementId(null):E(this,a,"f").setPinnedElementId(e),E(this,s,"m",b).call(this)},r);if(null==c||null==c.deref())return null;const d={elementInfo:t,visualizerElementRef:c};E(this,i,"f").set(n,d)}},b=function(){var e,t,n;const s=E(this,a,"f");null!=s.pinnedElementId&&(s.selectedElementId=s.pinnedElementId),s.detachedDOMElementsCount=E(this,i,"f").size,s.totalDOMElementsCount=(0,W.getDOMElementCount)();const o=null===(t=E(this,i,"f").get(null!==(e=s.selectedElementId)&&void 0!==e?e:-1))||void 0===t?void 0:t.elementInfo;s.selectedReactComponentStack=null!==(n=null==o?void 0:o.componentStack)&&void 0!==n?n:[];for(const e of E(this,d,"f"))e(Object.assign({},E(this,a,"f")))},t.default=C},150(e,t,n){var s,i,o,r,l,a,c,d,u=this&&this.__classPrivateFieldSet||function(e,t,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(e,n):i?i.value=n:t.set(e,n),n},f=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0});const h=n(498);i=new WeakMap,s=new WeakSet,o=function(e){if(!f(this,i,"f")){const e=f(this,s,"m",l).call(this);u(this,i,e,"f")}f(this,s,"m",c).call(this,e)},r=function(e){document.body&&document.body.appendChild(e)},l=function(){const e=(0,h.createVisualizerElement)("canvas");return e.id="overlayCanvas",f(this,s,"m",r).call(this,e),e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="none",e.style.zIndex="99999",e.width=window.innerWidth,e.height=window.innerHeight,e},a=function(e){const{boundingRect:t}=e;return JSON.stringify({boundingRect:t})},c=function(e){const t=f(this,i,"f");if(!t)return;const n=t.getContext("2d");if(null==n)return;n.strokeStyle="rgba(75, 192, 192, 0.8)",n.lineWidth=2,n.fillStyle="rgba(75, 192, 192, 0.05)",n.font="11px Inter, system-ui, -apple-system, sans-serif";const o=new Set;e.forEach(e=>{var t;const i=e.boundingRect;if(null==i)return;const r=f(this,s,"m",a).call(this,e);if(o.has(r))return;o.add(r),n.fillRect(i.left,i.top,i.width,i.height),n.strokeRect(i.left,i.top,i.width,i.height);const l=null===(t=e.componentStack)||void 0===t?void 0:t[0];if(l){const t=e.element.deref(),s=null==t?void 0:t.detachedElementId,o=`${l}${s?` (${s})`:""}`;n.fillStyle="rgba(74, 131, 224, 1)",n.fillText(o,i.left+5,i.top+15),n.fillStyle="rgba(75, 192, 192, 0.05)"}})},d=function(){var e;const t=f(this,i,"f");if(t){const n=t.getContext("2d");null==n||n.clearRect(0,0,t.width,t.height),null===(e=t.parentNode)||void 0===e||e.removeChild(t)}u(this,i,null,"f")},t.default=class{constructor(){s.add(this),i.set(this,void 0),u(this,i,null,"f")}cleanup(){f(this,s,"m",d).call(this)}repaint(e){f(this,s,"m",d).call(this),f(this,s,"m",o).call(this,e)}}},498(e,t){t.isVisualizerElement=function(e){return"true"===e.getAttribute(n)},t.createVisualizerElement=function(e){const t=document.createElement(e);return function(e){e.setAttribute(n,"true"),e.setAttribute("data-visualcompletion","ignore")}(t),t},t.tryToAttachOverlay=function(e){document.body&&document.body.appendChild(e)},t.addTrackedListener=function(e,t,n,i){var o;const r=e.deref();r&&(r.addEventListener(t,n,i),s.has(r)||s.set(r,[]),null===(o=s.get(r))||void 0===o||o.push({type:t,cb:n,options:i}))},t.removeAllListeners=function(e){const t=e.deref();if(!t)return;const n=s.get(t);if(n){for(const{type:e,cb:s,options:i}of n)t.removeEventListener(e,s,i);s.delete(t)}},t.debounce=function(e,t){let n=null;return(...s)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}};const n="data-visualizer",s=new WeakMap}};const t={};!function n(s){const i=t[s];if(void 0!==i)return i.exports;const o=t[s]={exports:{}};return e[s].call(o.exports,o,o.exports,n),o.exports}(933)})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memlab/lens",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "MemLens is a tool for inspecting memory leaks in browser",
|
|
6
6
|
"author": "Liang Gong <lgong@meta.com>",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/
|
|
40
|
+
"url": "git+https://github.com/meta/memlab.git",
|
|
41
41
|
"directory": "packages/lens"
|
|
42
42
|
},
|
|
43
43
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/
|
|
44
|
+
"url": "https://github.com/meta/memlab/issues"
|
|
45
45
|
},
|
|
46
|
-
"homepage": "https://github.com/
|
|
46
|
+
"homepage": "https://github.com/meta/memlab#readme"
|
|
47
47
|
}
|