blob: 3bbb8ed66c83c1ad40457b82ed4059d776e46956 [file] [log] [blame]
"use strict";
/**
* @license Angular v12.0.0-next.0
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/Zone.__load_patch("ResizeObserver",(e,t,r)=>{const n=e.ResizeObserver;if(!n)return;const o=r.symbol("ResizeObserver");r.patchMethod(e,"ResizeObserver",e=>(e,r)=>{const s=r.length>0?r[0]:null;return s&&(r[0]=function(e,r){const n={},l=t.current;for(let t of e){let e=t.target[o];e||(e=l);let r=n[e.name];r||(n[e.name]=r={entries:[],zone:e}),r.entries.push(t)}Object.keys(n).forEach(e=>{const o=n[e];o.zone!==t.current?o.zone.run(s,this,[o.entries,r],"ResizeObserver"):s.call(this,o.entries,r)})}),r.length>0?new n(r[0]):new n}),r.patchMethod(n.prototype,"observe",e=>(r,n)=>{const s=n.length>0?n[0]:null;if(!s)return e.apply(r,n);let l=r[o];return l||(l=r[o]=[]),l.push(s),s[o]=t.current,e.apply(r,n)}),r.patchMethod(n.prototype,"unobserve",e=>(t,r)=>{const n=r.length>0?r[0]:null;if(!n)return e.apply(t,r);let s=t[o];if(s)for(let e=0;e<s.length;e++)if(s[e]===n){s.splice(e,1);break}return n[o]=void 0,e.apply(t,r)}),r.patchMethod(n.prototype,"disconnect",e=>(t,r)=>{const n=t[o];return n&&(n.forEach(e=>{e[o]=void 0}),t[o]=void 0),e.apply(t,r)})});