{"version":3,"file":"_ripple-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/ripple/ripple-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/ripple/ripple-event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/ripple/ripple-renderer.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/ripple/ripple.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Possible states for a ripple element. */\nexport enum RippleState {\n  FADING_IN,\n  VISIBLE,\n  FADING_OUT,\n  HIDDEN,\n}\n\nexport type RippleConfig = {\n  color?: string;\n  centered?: boolean;\n  radius?: number;\n  persistent?: boolean;\n  animation?: RippleAnimationConfig;\n  terminateOnPointerUp?: boolean;\n};\n\n/**\n * Interface that describes the configuration for the animation of a ripple.\n * There are two animation phases with different durations for the ripples.\n */\nexport interface RippleAnimationConfig {\n  /** Duration in milliseconds for the enter animation (expansion from point of contact). */\n  enterDuration?: number;\n  /** Duration in milliseconds for the exit animation (fade-out). */\n  exitDuration?: number;\n}\n\n/**\n * Reference to a previously launched ripple element.\n */\nexport class RippleRef {\n  /** Current state of the ripple. */\n  state: RippleState = RippleState.HIDDEN;\n\n  constructor(\n    private _renderer: {fadeOutRipple(ref: RippleRef): void},\n    /** Reference to the ripple HTML element. */\n    public element: HTMLElement,\n    /** Ripple configuration used for the ripple. */\n    public config: RippleConfig,\n    /* Whether animations are forcibly disabled for ripples through CSS. */\n    public _animationForciblyDisabledThroughCss = false,\n  ) {}\n\n  /** Fades out the ripple element. */\n  fadeOut() {\n    this._renderer.fadeOutRipple(this);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {normalizePassiveListenerOptions, _getEventTarget} from '@angular/cdk/platform';\nimport {NgZone} from '@angular/core';\n\n/** Options used to bind a passive capturing event. */\nconst passiveCapturingEventOptions = normalizePassiveListenerOptions({\n  passive: true,\n  capture: true,\n});\n\n/** Manages events through delegation so that as few event handlers as possible are bound. */\nexport class RippleEventManager {\n  private _events = new Map<string, Map<HTMLElement, Set<EventListenerObject>>>();\n\n  /** Adds an event handler. */\n  addHandler(ngZone: NgZone, name: string, element: HTMLElement, handler: EventListenerObject) {\n    const handlersForEvent = this._events.get(name);\n\n    if (handlersForEvent) {\n      const handlersForElement = handlersForEvent.get(element);\n\n      if (handlersForElement) {\n        handlersForElement.add(handler);\n      } else {\n        handlersForEvent.set(element, new Set([handler]));\n      }\n    } else {\n      this._events.set(name, new Map([[element, new Set([handler])]]));\n\n      ngZone.runOutsideAngular(() => {\n        document.addEventListener(name, this._delegateEventHandler, passiveCapturingEventOptions);\n      });\n    }\n  }\n\n  /** Removes an event handler. */\n  removeHandler(name: string, element: HTMLElement, handler: EventListenerObject) {\n    const handlersForEvent = this._events.get(name);\n\n    if (!handlersForEvent) {\n      return;\n    }\n\n    const handlersForElement = handlersForEvent.get(element);\n\n    if (!handlersForElement) {\n      return;\n    }\n\n    handlersForElement.delete(handler);\n\n    if (handlersForElement.size === 0) {\n      handlersForEvent.delete(element);\n    }\n\n    if (handlersForEvent.size === 0) {\n      this._events.delete(name);\n      document.removeEventListener(name, this._delegateEventHandler, passiveCapturingEventOptions);\n    }\n  }\n\n  /** Event handler that is bound and which dispatches the events to the different targets. */\n  private _delegateEventHandler = (event: Event) => {\n    const target = _getEventTarget(event);\n\n    if (target) {\n      this._events.get(event.type)?.forEach((handlers, element) => {\n        if (element === target || element.contains(target as Node)) {\n          handlers.forEach(handler => handler.handleEvent(event));\n        }\n      });\n    }\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {ElementRef, NgZone, Component, ViewEncapsulation, Injector} from '@angular/core';\nimport {Platform, normalizePassiveListenerOptions, _getEventTarget} from '@angular/cdk/platform';\nimport {isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader} from '@angular/cdk/a11y';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\nimport {RippleRef, RippleState, RippleConfig} from './ripple-ref';\nimport {RippleEventManager} from './ripple-event-manager';\n\n/**\n * Interface that describes the target for launching ripples.\n * It defines the ripple configuration and disabled state for interaction ripples.\n * @docs-private\n */\nexport interface RippleTarget {\n  /** Configuration for ripples that are launched on pointer down. */\n  rippleConfig: RippleConfig;\n  /** Whether ripples on pointer down should be disabled. */\n  rippleDisabled: boolean;\n}\n\n/** Interfaces the defines ripple element transition event listeners. */\ninterface RippleEventListeners {\n  onTransitionEnd: EventListener;\n  onTransitionCancel: EventListener;\n  fallbackTimer: ReturnType<typeof setTimeout> | null;\n}\n\n/**\n * Default ripple animation configuration for ripples without an explicit\n * animation config specified.\n */\nexport const defaultRippleAnimationConfig = {\n  enterDuration: 225,\n  exitDuration: 150,\n};\n\n/**\n * Timeout for ignoring mouse events. Mouse events will be temporary ignored after touch\n * events to avoid synthetic mouse events.\n */\nconst ignoreMouseEventsTimeout = 800;\n\n/** Options used to bind a passive capturing event. */\nconst passiveCapturingEventOptions = normalizePassiveListenerOptions({\n  passive: true,\n  capture: true,\n});\n\n/** Events that signal that the pointer is down. */\nconst pointerDownEvents = ['mousedown', 'touchstart'];\n\n/** Events that signal that the pointer is up. */\nconst pointerUpEvents = ['mouseup', 'mouseleave', 'touchend', 'touchcancel'];\n\n@Component({\n  template: '',\n  encapsulation: ViewEncapsulation.None,\n  styleUrl: 'ripple-structure.css',\n  host: {'mat-ripple-style-loader': ''},\n})\nexport class _MatRippleStylesLoader {}\n\n/**\n * Helper service that performs DOM manipulations. Not intended to be used outside this module.\n * The constructor takes a reference to the ripple directive's host element and a map of DOM\n * event handlers to be installed on the element that triggers ripple animations.\n * This will eventually become a custom renderer once Angular support exists.\n * @docs-private\n */\nexport class RippleRenderer implements EventListenerObject {\n  /** Element where the ripples are being added to. */\n  private _containerElement!: HTMLElement;\n\n  /** Element which triggers the ripple elements on mouse events. */\n  private _triggerElement: HTMLElement | null = null;\n\n  /** Whether the pointer is currently down or not. */\n  private _isPointerDown = false;\n\n  /**\n   * Map of currently active ripple references.\n   * The ripple reference is mapped to its element event listeners.\n   * The reason why `| null` is used is that event listeners are added only\n   * when the condition is truthy (see the `_startFadeOutTransition` method).\n   */\n  private _activeRipples = new Map<RippleRef, RippleEventListeners | null>();\n\n  /** Latest non-persistent ripple that was triggered. */\n  private _mostRecentTransientRipple: RippleRef | null = null;\n\n  /** Time in milliseconds when the last touchstart event happened. */\n  private _lastTouchStartEvent!: number;\n\n  /** Whether pointer-up event listeners have been registered. */\n  private _pointerUpEventsRegistered = false;\n\n  /**\n   * Cached dimensions of the ripple container. Set when the first\n   * ripple is shown and cleared once no more ripples are visible.\n   */\n  private _containerRect: DOMRect | null = null;\n\n  private static _eventManager = new RippleEventManager();\n\n  constructor(\n    private _target: RippleTarget,\n    private _ngZone: NgZone,\n    elementOrElementRef: HTMLElement | ElementRef<HTMLElement>,\n    private _platform: Platform,\n    injector?: Injector,\n  ) {\n    // Only do anything if we're on the browser.\n    if (_platform.isBrowser) {\n      this._containerElement = coerceElement(elementOrElementRef);\n    }\n\n    if (injector) {\n      injector.get(_CdkPrivateStyleLoader).load(_MatRippleStylesLoader);\n    }\n  }\n\n  /**\n   * Fades in a ripple at the given coordinates.\n   * @param x Coordinate within the element, along the X axis at which to start the ripple.\n   * @param y Coordinate within the element, along the Y axis at which to start the ripple.\n   * @param config Extra ripple options.\n   */\n  fadeInRipple(x: number, y: number, config: RippleConfig = {}): RippleRef {\n    const containerRect = (this._containerRect =\n      this._containerRect || this._containerElement.getBoundingClientRect());\n    const animationConfig = {...defaultRippleAnimationConfig, ...config.animation};\n\n    if (config.centered) {\n      x = containerRect.left + containerRect.width / 2;\n      y = containerRect.top + containerRect.height / 2;\n    }\n\n    const radius = config.radius || distanceToFurthestCorner(x, y, containerRect);\n    const offsetX = x - containerRect.left;\n    const offsetY = y - containerRect.top;\n    const enterDuration = animationConfig.enterDuration;\n\n    const ripple = document.createElement('div');\n    ripple.classList.add('mat-ripple-element');\n\n    ripple.style.left = `${offsetX - radius}px`;\n    ripple.style.top = `${offsetY - radius}px`;\n    ripple.style.height = `${radius * 2}px`;\n    ripple.style.width = `${radius * 2}px`;\n\n    // If a custom color has been specified, set it as inline style. If no color is\n    // set, the default color will be applied through the ripple theme styles.\n    if (config.color != null) {\n      ripple.style.backgroundColor = config.color;\n    }\n\n    ripple.style.transitionDuration = `${enterDuration}ms`;\n\n    this._containerElement.appendChild(ripple);\n\n    // By default the browser does not recalculate the styles of dynamically created\n    // ripple elements. This is critical to ensure that the `scale` animates properly.\n    // We enforce a style recalculation by calling `getComputedStyle` and *accessing* a property.\n    // See: https://gist.github.com/paulirish/5d52fb081b3570c81e3a\n    const computedStyles = window.getComputedStyle(ripple);\n    const userTransitionProperty = computedStyles.transitionProperty;\n    const userTransitionDuration = computedStyles.transitionDuration;\n\n    // Note: We detect whether animation is forcibly disabled through CSS (e.g. through\n    // `transition: none` or `display: none`). This is technically unexpected since animations are\n    // controlled through the animation config, but this exists for backwards compatibility. This\n    // logic does not need to be super accurate since it covers some edge cases which can be easily\n    // avoided by users.\n    const animationForciblyDisabledThroughCss =\n      userTransitionProperty === 'none' ||\n      // Note: The canonical unit for serialized CSS `<time>` properties is seconds. Additionally\n      // some browsers expand the duration for every property (in our case `opacity` and `transform`).\n      userTransitionDuration === '0s' ||\n      userTransitionDuration === '0s, 0s' ||\n      // If the container is 0x0, it's likely `display: none`.\n      (containerRect.width === 0 && containerRect.height === 0);\n\n    // Exposed reference to the ripple that will be returned.\n    const rippleRef = new RippleRef(this, ripple, config, animationForciblyDisabledThroughCss);\n\n    // Start the enter animation by setting the transform/scale to 100%. The animation will\n    // execute as part of this statement because we forced a style recalculation before.\n    // Note: We use a 3d transform here in order to avoid an issue in Safari where\n    // the ripples aren't clipped when inside the shadow DOM (see #24028).\n    ripple.style.transform = 'scale3d(1, 1, 1)';\n\n    rippleRef.state = RippleState.FADING_IN;\n\n    if (!config.persistent) {\n      this._mostRecentTransientRipple = rippleRef;\n    }\n\n    let eventListeners: RippleEventListeners | null = null;\n\n    // Do not register the `transition` event listener if fade-in and fade-out duration\n    // are set to zero. The events won't fire anyway and we can save resources here.\n    if (!animationForciblyDisabledThroughCss && (enterDuration || animationConfig.exitDuration)) {\n      this._ngZone.runOutsideAngular(() => {\n        const onTransitionEnd = () => {\n          // Clear the fallback timer since the transition fired correctly.\n          if (eventListeners) {\n            eventListeners.fallbackTimer = null;\n          }\n          clearTimeout(fallbackTimer);\n          this._finishRippleTransition(rippleRef);\n        };\n        const onTransitionCancel = () => this._destroyRipple(rippleRef);\n\n        // In some cases where there's a higher load on the browser, it can choose not to dispatch\n        // neither `transitionend` nor `transitioncancel` (see b/227356674). This timer serves as a\n        // fallback for such cases so that the ripple doesn't become stuck. We add a 100ms buffer\n        // because timers aren't precise. Note that another approach can be to transition the ripple\n        // to the `VISIBLE` state immediately above and to `FADING_IN` afterwards inside\n        // `transitionstart`. We go with the timer because it's one less event listener and\n        // it's less likely to break existing tests.\n        const fallbackTimer = setTimeout(onTransitionCancel, enterDuration + 100);\n\n        ripple.addEventListener('transitionend', onTransitionEnd);\n        // If the transition is cancelled (e.g. due to DOM removal), we destroy the ripple\n        // directly as otherwise we would keep it part of the ripple container forever.\n        // https://www.w3.org/TR/css-transitions-1/#:~:text=no%20longer%20in%20the%20document.\n        ripple.addEventListener('transitioncancel', onTransitionCancel);\n        eventListeners = {onTransitionEnd, onTransitionCancel, fallbackTimer};\n      });\n    }\n\n    // Add the ripple reference to the list of all active ripples.\n    this._activeRipples.set(rippleRef, eventListeners);\n\n    // In case there is no fade-in transition duration, we need to manually call the transition\n    // end listener because `transitionend` doesn't fire if there is no transition.\n    if (animationForciblyDisabledThroughCss || !enterDuration) {\n      this._finishRippleTransition(rippleRef);\n    }\n\n    return rippleRef;\n  }\n\n  /** Fades out a ripple reference. */\n  fadeOutRipple(rippleRef: RippleRef) {\n    // For ripples already fading out or hidden, this should be a noop.\n    if (rippleRef.state === RippleState.FADING_OUT || rippleRef.state === RippleState.HIDDEN) {\n      return;\n    }\n\n    const rippleEl = rippleRef.element;\n    const animationConfig = {...defaultRippleAnimationConfig, ...rippleRef.config.animation};\n\n    // This starts the fade-out transition and will fire the transition end listener that\n    // removes the ripple element from the DOM.\n    rippleEl.style.transitionDuration = `${animationConfig.exitDuration}ms`;\n    rippleEl.style.opacity = '0';\n    rippleRef.state = RippleState.FADING_OUT;\n\n    // In case there is no fade-out transition duration, we need to manually call the\n    // transition end listener because `transitionend` doesn't fire if there is no transition.\n    if (rippleRef._animationForciblyDisabledThroughCss || !animationConfig.exitDuration) {\n      this._finishRippleTransition(rippleRef);\n    }\n  }\n\n  /** Fades out all currently active ripples. */\n  fadeOutAll() {\n    this._getActiveRipples().forEach(ripple => ripple.fadeOut());\n  }\n\n  /** Fades out all currently active non-persistent ripples. */\n  fadeOutAllNonPersistent() {\n    this._getActiveRipples().forEach(ripple => {\n      if (!ripple.config.persistent) {\n        ripple.fadeOut();\n      }\n    });\n  }\n\n  /** Sets up the trigger event listeners */\n  setupTriggerEvents(elementOrElementRef: HTMLElement | ElementRef<HTMLElement>) {\n    const element = coerceElement(elementOrElementRef);\n\n    if (!this._platform.isBrowser || !element || element === this._triggerElement) {\n      return;\n    }\n\n    // Remove all previously registered event listeners from the trigger element.\n    this._removeTriggerEvents();\n    this._triggerElement = element;\n\n    // Use event delegation for the trigger events since they're\n    // set up during creation and are performance-sensitive.\n    pointerDownEvents.forEach(type => {\n      RippleRenderer._eventManager.addHandler(this._ngZone, type, element, this);\n    });\n  }\n\n  /**\n   * Handles all registered events.\n   * @docs-private\n   */\n  handleEvent(event: Event) {\n    if (event.type === 'mousedown') {\n      this._onMousedown(event as MouseEvent);\n    } else if (event.type === 'touchstart') {\n      this._onTouchStart(event as TouchEvent);\n    } else {\n      this._onPointerUp();\n    }\n\n    // If pointer-up events haven't been registered yet, do so now.\n    // We do this on-demand in order to reduce the total number of event listeners\n    // registered by the ripples, which speeds up the rendering time for large UIs.\n    if (!this._pointerUpEventsRegistered) {\n      // The events for hiding the ripple are bound directly on the trigger, because:\n      // 1. Some of them occur frequently (e.g. `mouseleave`) and any advantage we get from\n      // delegation will be diminished by having to look through all the data structures often.\n      // 2. They aren't as performance-sensitive, because they're bound only after the user\n      // has interacted with an element.\n      this._ngZone.runOutsideAngular(() => {\n        pointerUpEvents.forEach(type => {\n          this._triggerElement!.addEventListener(type, this, passiveCapturingEventOptions);\n        });\n      });\n\n      this._pointerUpEventsRegistered = true;\n    }\n  }\n\n  /** Method that will be called if the fade-in or fade-in transition completed. */\n  private _finishRippleTransition(rippleRef: RippleRef) {\n    if (rippleRef.state === RippleState.FADING_IN) {\n      this._startFadeOutTransition(rippleRef);\n    } else if (rippleRef.state === RippleState.FADING_OUT) {\n      this._destroyRipple(rippleRef);\n    }\n  }\n\n  /**\n   * Starts the fade-out transition of the given ripple if it's not persistent and the pointer\n   * is not held down anymore.\n   */\n  private _startFadeOutTransition(rippleRef: RippleRef) {\n    const isMostRecentTransientRipple = rippleRef === this._mostRecentTransientRipple;\n    const {persistent} = rippleRef.config;\n\n    rippleRef.state = RippleState.VISIBLE;\n\n    // When the timer runs out while the user has kept their pointer down, we want to\n    // keep only the persistent ripples and the latest transient ripple. We do this,\n    // because we don't want stacked transient ripples to appear after their enter\n    // animation has finished.\n    if (!persistent && (!isMostRecentTransientRipple || !this._isPointerDown)) {\n      rippleRef.fadeOut();\n    }\n  }\n\n  /** Destroys the given ripple by removing it from the DOM and updating its state. */\n  private _destroyRipple(rippleRef: RippleRef) {\n    const eventListeners = this._activeRipples.get(rippleRef) ?? null;\n    this._activeRipples.delete(rippleRef);\n\n    // Clear out the cached bounding rect if we have no more ripples.\n    if (!this._activeRipples.size) {\n      this._containerRect = null;\n    }\n\n    // If the current ref is the most recent transient ripple, unset it\n    // avoid memory leaks.\n    if (rippleRef === this._mostRecentTransientRipple) {\n      this._mostRecentTransientRipple = null;\n    }\n\n    rippleRef.state = RippleState.HIDDEN;\n    if (eventListeners !== null) {\n      rippleRef.element.removeEventListener('transitionend', eventListeners.onTransitionEnd);\n      rippleRef.element.removeEventListener('transitioncancel', eventListeners.onTransitionCancel);\n      if (eventListeners.fallbackTimer !== null) {\n        clearTimeout(eventListeners.fallbackTimer);\n      }\n    }\n    rippleRef.element.remove();\n  }\n\n  /** Function being called whenever the trigger is being pressed using mouse. */\n  private _onMousedown(event: MouseEvent) {\n    // Screen readers will fire fake mouse events for space/enter. Skip launching a\n    // ripple in this case for consistency with the non-screen-reader experience.\n    const isFakeMousedown = isFakeMousedownFromScreenReader(event);\n    const isSyntheticEvent =\n      this._lastTouchStartEvent &&\n      Date.now() < this._lastTouchStartEvent + ignoreMouseEventsTimeout;\n\n    if (!this._target.rippleDisabled && !isFakeMousedown && !isSyntheticEvent) {\n      this._isPointerDown = true;\n      this.fadeInRipple(event.clientX, event.clientY, this._target.rippleConfig);\n    }\n  }\n\n  /** Function being called whenever the trigger is being pressed using touch. */\n  private _onTouchStart(event: TouchEvent) {\n    if (!this._target.rippleDisabled && !isFakeTouchstartFromScreenReader(event)) {\n      // Some browsers fire mouse events after a `touchstart` event. Those synthetic mouse\n      // events will launch a second ripple if we don't ignore mouse events for a specific\n      // time after a touchstart event.\n      this._lastTouchStartEvent = Date.now();\n      this._isPointerDown = true;\n\n      // Use `changedTouches` so we skip any touches where the user put\n      // their finger down, but used another finger to tap the element again.\n      const touches = event.changedTouches as TouchList | undefined;\n\n      // According to the typings the touches should always be defined, but in some cases\n      // the browser appears to not assign them in tests which leads to flakes.\n      if (touches) {\n        for (let i = 0; i < touches.length; i++) {\n          this.fadeInRipple(touches[i].clientX, touches[i].clientY, this._target.rippleConfig);\n        }\n      }\n    }\n  }\n\n  /** Function being called whenever the trigger is being released. */\n  private _onPointerUp() {\n    if (!this._isPointerDown) {\n      return;\n    }\n\n    this._isPointerDown = false;\n\n    // Fade-out all ripples that are visible and not persistent.\n    this._getActiveRipples().forEach(ripple => {\n      // By default, only ripples that are completely visible will fade out on pointer release.\n      // If the `terminateOnPointerUp` option is set, ripples that still fade in will also fade out.\n      const isVisible =\n        ripple.state === RippleState.VISIBLE ||\n        (ripple.config.terminateOnPointerUp && ripple.state === RippleState.FADING_IN);\n\n      if (!ripple.config.persistent && isVisible) {\n        ripple.fadeOut();\n      }\n    });\n  }\n\n  private _getActiveRipples(): RippleRef[] {\n    return Array.from(this._activeRipples.keys());\n  }\n\n  /** Removes previously registered event listeners from the trigger element. */\n  _removeTriggerEvents() {\n    const trigger = this._triggerElement;\n\n    if (trigger) {\n      pointerDownEvents.forEach(type =>\n        RippleRenderer._eventManager.removeHandler(type, trigger, this),\n      );\n\n      if (this._pointerUpEventsRegistered) {\n        pointerUpEvents.forEach(type =>\n          trigger.removeEventListener(type, this, passiveCapturingEventOptions),\n        );\n\n        this._pointerUpEventsRegistered = false;\n      }\n    }\n  }\n}\n\n/**\n * Returns the distance from the point (x, y) to the furthest corner of a rectangle.\n */\nfunction distanceToFurthestCorner(x: number, y: number, rect: DOMRect) {\n  const distX = Math.max(Math.abs(x - rect.left), Math.abs(x - rect.right));\n  const distY = Math.max(Math.abs(y - rect.top), Math.abs(y - rect.bottom));\n  return Math.sqrt(distX * distX + distY * distY);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {\n  Directive,\n  ElementRef,\n  InjectionToken,\n  Input,\n  NgZone,\n  OnDestroy,\n  OnInit,\n  Injector,\n  inject,\n} from '@angular/core';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\nimport {RippleAnimationConfig, RippleConfig, RippleRef} from './ripple-ref';\nimport {RippleRenderer, RippleTarget} from './ripple-renderer';\nimport {_animationsDisabled} from '../animation/animation';\n\n/** Configurable options for `matRipple`. */\nexport interface RippleGlobalOptions {\n  /**\n   * Whether ripples should be disabled. Ripples can be still launched manually by using\n   * the `launch()` method. Therefore focus indicators will still show up.\n   */\n  disabled?: boolean;\n\n  /**\n   * Default configuration for the animation duration of the ripples. There are two phases with\n   * different durations for the ripples: `enter` and `leave`. The durations will be overwritten\n   * by the value of `matRippleAnimation` or if animations are disabled.\n   */\n  animation?: RippleAnimationConfig;\n\n  /**\n   * Whether ripples should start fading out immediately after the mouse or touch is released. By\n   * default, ripples will wait for the enter animation to complete and for mouse or touch release.\n   */\n  terminateOnPointerUp?: boolean;\n\n  /**\n   * A namespace to use for ripple loader to allow multiple instances to exist on the same page.\n   */\n  namespace?: string;\n}\n\n/** Injection token that can be used to specify the global ripple options. */\nexport const MAT_RIPPLE_GLOBAL_OPTIONS = new InjectionToken<RippleGlobalOptions>(\n  'mat-ripple-global-options',\n);\n\n@Directive({\n  selector: '[mat-ripple], [matRipple]',\n  exportAs: 'matRipple',\n  host: {\n    'class': 'mat-ripple',\n    '[class.mat-ripple-unbounded]': 'unbounded',\n  },\n})\nexport class MatRipple implements OnInit, OnDestroy, RippleTarget {\n  private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n  private _animationsDisabled = _animationsDisabled();\n\n  /** Custom color for all ripples. */\n  @Input('matRippleColor') color!: string;\n\n  /** Whether the ripples should be visible outside the component's bounds. */\n  @Input('matRippleUnbounded') unbounded: boolean = false;\n\n  /**\n   * Whether the ripple always originates from the center of the host element's bounds, rather\n   * than originating from the location of the click event.\n   */\n  @Input('matRippleCentered') centered: boolean = false;\n\n  /**\n   * If set, the radius in pixels of foreground ripples when fully expanded. If unset, the radius\n   * will be the distance from the center of the ripple to the furthest corner of the host element's\n   * bounding rectangle.\n   */\n  @Input('matRippleRadius') radius: number = 0;\n\n  /**\n   * Configuration for the ripple animation. Allows modifying the enter and exit animation\n   * duration of the ripples. The animation durations will be overwritten if animations are\n   * disabled.\n   */\n  @Input('matRippleAnimation') animation!: RippleAnimationConfig;\n\n  /**\n   * Whether click events will not trigger the ripple. Ripples can be still launched manually\n   * by using the `launch()` method.\n   */\n  @Input('matRippleDisabled')\n  get disabled() {\n    return this._disabled;\n  }\n  set disabled(value: boolean) {\n    if (value) {\n      this.fadeOutAllNonPersistent();\n    }\n    this._disabled = value;\n    this._setupTriggerEventsIfEnabled();\n  }\n  private _disabled: boolean = false;\n\n  /**\n   * The element that triggers the ripple when click events are received.\n   * Defaults to the directive's host element.\n   */\n  @Input('matRippleTrigger')\n  get trigger() {\n    return this._trigger || this._elementRef.nativeElement;\n  }\n  set trigger(trigger: HTMLElement) {\n    this._trigger = trigger;\n    this._setupTriggerEventsIfEnabled();\n  }\n  private _trigger!: HTMLElement;\n\n  /** Renderer for the ripple DOM manipulations. */\n  private _rippleRenderer: RippleRenderer;\n\n  /** Options that are set globally for all ripples. */\n  private _globalOptions: RippleGlobalOptions;\n\n  /** @docs-private Whether ripple directive is initialized and the input bindings are set. */\n  _isInitialized: boolean = false;\n\n  constructor() {\n    const ngZone = inject(NgZone);\n    const platform = inject(Platform);\n    const globalOptions = inject<RippleGlobalOptions>(MAT_RIPPLE_GLOBAL_OPTIONS, {optional: true});\n    const injector = inject(Injector);\n\n    // Note: cannot use `inject()` here, because this class\n    // gets instantiated manually in the ripple loader.\n    this._globalOptions = globalOptions || {};\n    this._rippleRenderer = new RippleRenderer(this, ngZone, this._elementRef, platform, injector);\n  }\n\n  ngOnInit() {\n    this._isInitialized = true;\n    this._setupTriggerEventsIfEnabled();\n  }\n\n  ngOnDestroy() {\n    this._rippleRenderer._removeTriggerEvents();\n  }\n\n  /** Fades out all currently showing ripple elements. */\n  fadeOutAll() {\n    this._rippleRenderer.fadeOutAll();\n  }\n\n  /** Fades out all currently showing non-persistent ripple elements. */\n  fadeOutAllNonPersistent() {\n    this._rippleRenderer.fadeOutAllNonPersistent();\n  }\n\n  /**\n   * Ripple configuration from the directive's input values.\n   * @docs-private Implemented as part of RippleTarget\n   */\n  get rippleConfig(): RippleConfig {\n    return {\n      centered: this.centered,\n      radius: this.radius,\n      color: this.color,\n      animation: {\n        ...this._globalOptions.animation,\n        ...(this._animationsDisabled ? {enterDuration: 0, exitDuration: 0} : {}),\n        ...this.animation,\n      },\n      terminateOnPointerUp: this._globalOptions.terminateOnPointerUp,\n    };\n  }\n\n  /**\n   * Whether ripples on pointer-down are disabled or not.\n   * @docs-private Implemented as part of RippleTarget\n   */\n  get rippleDisabled(): boolean {\n    return this.disabled || !!this._globalOptions.disabled;\n  }\n\n  /** Sets up the trigger event listeners if ripples are enabled. */\n  private _setupTriggerEventsIfEnabled() {\n    if (!this.disabled && this._isInitialized) {\n      this._rippleRenderer.setupTriggerEvents(this.trigger);\n    }\n  }\n\n  /**\n   * Launches a manual ripple using the specified ripple configuration.\n   * @param config Configuration for the manual ripple.\n   */\n  launch(config: RippleConfig): RippleRef;\n\n  /**\n   * Launches a manual ripple at the specified coordinates relative to the viewport.\n   * @param x Coordinate along the X axis at which to fade-in the ripple. Coordinate\n   *   should be relative to the viewport.\n   * @param y Coordinate along the Y axis at which to fade-in the ripple. Coordinate\n   *   should be relative to the viewport.\n   * @param config Optional ripple configuration for the manual ripple.\n   */\n  launch(x: number, y: number, config?: RippleConfig): RippleRef;\n\n  /** Launches a manual ripple at the specified coordinated or just by the ripple config. */\n  launch(configOrX: number | RippleConfig, y: number = 0, config?: RippleConfig): RippleRef {\n    if (typeof configOrX === 'number') {\n      return this._rippleRenderer.fadeInRipple(configOrX, y, {...this.rippleConfig, ...config});\n    } else {\n      return this._rippleRenderer.fadeInRipple(0, 0, {...this.rippleConfig, ...configOrX});\n    }\n  }\n}\n"],"names":["passiveCapturingEventOptions"],"mappings":";;;;;;;;IASY;AAAZ,CAAA,UAAY,WAAW,EAAA;EACrB,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