1import{c as s,d as v,e as y}from"./chunk-3AYKN44I.js";import{o as _}from"./chunk-2KXXDWPR.js";import{M as D,P as M}from"./chunk-KQEDLGWJ.js";import{Ka as m,La as f,Mb as g,Pa as h,ua as c,za as r}from"./chunk-NGQXYJ5Y.js";var b={capture:!0},A=["focus","mousedown","mouseenter","touchstart"],l="mat-ripple-loader-uninitialized",u="mat-ripple-loader-class-name",T="mat-ripple-loader-centered",o="mat-ripple-loader-disabled",C=(()=>{class i{_document=r(f);_animationsDisabled=_();_globalRippleOptions=r(y,{optional:!0});_platform=r(D);_ngZone=r(h);_injector=r(m);_eventCleanups;_hosts=new Map;constructor(){let e=r(g).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>A.map(t=>e.listen(this._document,t,this._onInteraction,b)))}ngOnDestroy(){let e=this._hosts.keys();for(let t of e)this.destroyRipple(t);this._eventCleanups.forEach(t=>t())}configureRipple(e,t){e.setAttribute(l,this._globalRippleOptions?.namespace??""),(t.className||!e.hasAttribute(u))&&e.setAttribute(u,t.className||""),t.centered&&e.setAttribute(T,""),t.disabled&&e.setAttribute(o,"")}setDisabled(e,t){let n=this._hosts.get(e);n?(n.target.rippleDisabled=t,!t&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(e))):t?e.setAttribute(o,""):e.removeAttribute(o)}_onInteraction=e=>{let t=M(e);if(t instanceof HTMLElement){let n=t.closest(`[${l}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let t=this._document.createElement("span");t.classList.add("mat-ripple",e.getAttribute(u)),e.append(t);let n=this._globalRippleOptions,w=this._animationsDisabled?0:n?.animation?.enterDuration??s.enterDuration,I=this._animationsDisabled?0:n?.animation?.exitDuration??s.exitDuration,a={rippleDisabled:this._animationsDisabled||n?.disabled||e.hasAttribute(o),rippleConfig:{centered:e.hasAttribute(T),terminateOnPointerUp:n?.terminateOnPointerUp,animation:{enterDuration:w,exitDuration:I}}},p=new v(a,this._ngZone,t,this._platform,this._injector),d=!a.rippleDisabled;d&&p.setupTriggerEvents(e),this._hosts.set(e,{target:a,renderer:p,hasSetUpEvents:d}),e.removeAttribute(l)}destroyRipple(e){let t=this._hosts.get(e);t&&(t.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{C as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.