{"version":3,"file":"mtxSlider.mjs","sources":["../../../projects/extensions/slider/slider.ts","../../../projects/extensions/slider/slider.html","../../../projects/extensions/slider/slider-module.ts","../../../projects/extensions/slider/mtxSlider.ts"],"sourcesContent":["import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n  BooleanInput,\n  coerceBooleanProperty,\n  coerceNumberProperty,\n  NumberInput,\n} from '@angular/cdk/coercion';\nimport {\n  DOWN_ARROW,\n  END,\n  HOME,\n  LEFT_ARROW,\n  PAGE_DOWN,\n  PAGE_UP,\n  RIGHT_ARROW,\n  UP_ARROW,\n} from '@angular/cdk/keycodes';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport {\n  Attribute,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  Inject,\n  Input,\n  NgZone,\n  OnDestroy,\n  OnInit,\n  Optional,\n  Output,\n  ViewChild,\n  ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n  CanColor,\n  CanDisable,\n  HasTabIndex,\n  mixinColor,\n  mixinDisabled,\n  mixinTabIndex,\n} from '@angular/material/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { Subscription } from 'rxjs';\n\nconst activeEventOptions = normalizePassiveListenerOptions({ passive: false });\n\n/**\n * Visually, a 30px separation between tick marks looks best. This is very subjective but it is\n * the default separation we chose.\n */\nconst MIN_AUTO_TICK_SEPARATION = 30;\n\n/** The thumb gap size for a disabled slider. */\nconst DISABLED_THUMB_GAP = 0;\n\n/** The thumb gap size for a non-active slider at its minimum value. */\nconst MIN_VALUE_NONACTIVE_THUMB_GAP = 7;\n\n/** The thumb gap size for an active slider at its minimum value. */\nconst MIN_VALUE_ACTIVE_THUMB_GAP = 10;\n\n/**\n * Provider Expression that allows mtx-slider to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)] and [formControl].\n */\nexport const MTX_SLIDER_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => MtxSlider),\n  multi: true,\n};\n\n/** A simple change event emitted by the MtxSlider component. */\nexport class MtxSliderChange {\n  /** The MtxSlider that changed. */\n  source!: MtxSlider;\n\n  /** The new value of the source slider. */\n  value!: number | number[] | null;\n}\n\n// Boilerplate for applying mixins to MtxSlider.\n/** @docs-private */\nconst _MtxSliderBase = mixinTabIndex(\n  mixinColor(\n    mixinDisabled(\n      class {\n        constructor(public _elementRef: ElementRef) {}\n      }\n    ),\n    'accent'\n  )\n);\n\n/**\n * Allows users to select from a range of values by moving the slider thumb. It is similar in\n * behavior to the native `<input type=\"range\">` element.\n */\n@Component({\n  selector: 'mtx-slider',\n  exportAs: 'mtxSlider',\n  providers: [MTX_SLIDER_VALUE_ACCESSOR],\n  host: {\n    '(focus)': '_onFocus()',\n    '(blur)': '_onBlur()',\n    '(click)': '_onClick($event)',\n    '(keydown)': '_onKeydown($event)',\n    '(keyup)': '_onKeyup()',\n    '(mouseenter)': '_onMouseenter()',\n\n    // On Safari starting to slide temporarily triggers text selection mode which\n    // show the wrong cursor. We prevent it by stopping the `selectstart` event.\n    '(selectstart)': '$event.preventDefault()',\n    'class': 'mtx-slider mat-focus-indicator',\n    'role': 'slider',\n    '[tabIndex]': 'tabIndex',\n    '[attr.aria-disabled]': 'disabled',\n    '[attr.aria-valuemax]': 'max',\n    '[attr.aria-valuemin]': 'min',\n    '[attr.aria-valuenow]': 'value',\n\n    // NVDA and Jaws appear to announce the `aria-valuenow` by calculating its percentage based\n    // on its value between `aria-valuemin` and `aria-valuemax`. Due to how decimals are handled,\n    // it can cause the slider to read out a very long value like 0.20000068 if the current value\n    // is 0.2 with a min of 0 and max of 1. We work around the issue by setting `aria-valuetext`\n    // to the same value that we set on the slider's thumb which will be truncated.\n    '[attr.aria-valuetext]': 'valueText == null ? displayValue : valueText',\n    '[attr.aria-orientation]': 'vertical ? \"vertical\" : \"horizontal\"',\n    '[class.mtx-slider-disabled]': 'disabled',\n    '[class.mtx-slider-has-ticks]': 'tickInterval',\n    '[class.mtx-slider-horizontal]': '!vertical',\n    '[class.mtx-slider-axis-inverted]': '_invertAxis',\n    '[class.mtx-slider-sliding]': '_isSliding',\n    '[class.mtx-slider-thumb-label-showing]': 'thumbLabel',\n    '[class.mtx-slider-vertical]': 'vertical',\n    '[class.mtx-slider-min-value]': '_isMinValue',\n    '[class.mtx-range-slider]': 'isRangeSlider()',\n    '[class.mtx-slider-hide-last-tick]': 'disabled || _isMinValue && _thumbGap && _invertAxis',\n    '[class._mtx-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n  },\n  templateUrl: 'slider.html',\n  styleUrls: ['slider.scss'],\n  inputs: ['disabled', 'color', 'tabIndex'],\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxSlider\n  extends _MtxSliderBase\n  implements ControlValueAccessor, OnDestroy, CanDisable, CanColor, OnInit, HasTabIndex\n{\n  /** Whether the slider is inverted. */\n  @Input()\n  get invert(): boolean {\n    return this._invert;\n  }\n  set invert(value: boolean) {\n    this._invert = coerceBooleanProperty(value);\n  }\n  private _invert = false;\n\n  /** The maximum value that the slider can have. */\n  @Input()\n  get max(): number {\n    return this._max;\n  }\n  set max(v: number) {\n    this._max = coerceNumberProperty(v, this._max);\n    this._percent = this._calculatePercentage(this._value);\n\n    // Since this also modifies the percentage, we need to let the change detection know.\n    this._changeDetectorRef.markForCheck();\n  }\n  private _max: number = 100;\n\n  /** The minimum value that the slider can have. */\n  @Input()\n  get min(): number {\n    return this._min;\n  }\n  set min(v: number) {\n    this._min = coerceNumberProperty(v, this._min);\n\n    // If the value wasn't explicitly set by the user, set it to the min.\n    if (this._value === null) {\n      this.value = this._min;\n    }\n    this._percent = this._calculatePercentage(this._value);\n\n    // Since this also modifies the percentage, we need to let the change detection know.\n    this._changeDetectorRef.markForCheck();\n  }\n  private _min: number = 0;\n\n  /** The values at which the thumb will snap. */\n  @Input()\n  get step(): number {\n    return this._step;\n  }\n  set step(v: number) {\n    this._step = coerceNumberProperty(v, this._step);\n\n    if (this._step % 1 !== 0) {\n      this._roundToDecimal = this._step.toString().split('.').pop()!.length;\n    }\n\n    // Since this could modify the label, we need to notify the change detection.\n    this._changeDetectorRef.markForCheck();\n  }\n  private _step: number = 1;\n\n  /** Whether or not to show the thumb label. */\n  @Input()\n  get thumbLabel(): boolean {\n    return this._thumbLabel;\n  }\n  set thumbLabel(value: boolean) {\n    this._thumbLabel = coerceBooleanProperty(value);\n  }\n  private _thumbLabel: boolean = false;\n\n  /**\n   * How often to show ticks. Relative to the step so that a tick always appears on a step.\n   * Ex: Tick interval of 4 with a step of 3 will draw a tick every 4 steps (every 12 values).\n   */\n  @Input()\n  get tickInterval() {\n    return this._tickInterval;\n  }\n  set tickInterval(value: 'auto' | number) {\n    if (value === 'auto') {\n      this._tickInterval = 'auto';\n    } else if (typeof value === 'number' || typeof value === 'string') {\n      this._tickInterval = coerceNumberProperty(value, this._tickInterval as number);\n    } else {\n      this._tickInterval = 0;\n    }\n  }\n  private _tickInterval: 'auto' | number = 0;\n\n  /** Value of the slider. */\n  @Input()\n  get value(): number | number[] | null {\n    // If the value needs to be read and it is still uninitialized, initialize it to the min.\n    if (this._value === null) {\n      this.value = this._min;\n    }\n    return this._value;\n  }\n  set value(v: number | number[] | null) {\n    if (\n      v !== this._value ||\n      (v instanceof Array &&\n        this._value != null &&\n        (v[0] !== (this._value as number[])[0] || v[1] !== (this._value as number[])[1]))\n    ) {\n      let value: number | number[] | null = null;\n      if (v instanceof Array) {\n        value = [coerceNumberProperty(v[0]), coerceNumberProperty(v[1])];\n        value = [Math.min(value[0], value[1]), Math.max(value[1], value[0])];\n      } else {\n        value = coerceNumberProperty(v);\n      }\n\n      // While incrementing by a decimal we can end up with values like 33.300000000000004.\n      // Truncate it to ensure that it matches the label and to make it easier to work with.\n      if (this._roundToDecimal) {\n        if (v instanceof Array) {\n          value = [\n            parseFloat((value as number[])[0].toFixed(this._roundToDecimal)),\n            parseFloat((value as number[])[1].toFixed(this._roundToDecimal)),\n          ];\n        } else {\n          value = parseFloat(Number(value).toFixed(this._roundToDecimal));\n        }\n      }\n\n      this._value = value;\n      this._percent = this._calculatePercentage(this._value);\n\n      // Since this also modifies the percentage, we need to let the change detection know.\n      this._changeDetectorRef.markForCheck();\n    }\n  }\n  private _value: number | number[] | null = null;\n\n  /**\n   * Function that will be used to format the value before it is displayed\n   * in the thumb label. Can be used to format very large number in order\n   * for them to fit into the slider thumb.\n   */\n  @Input() displayWith!: (value: number | null) => string | number;\n\n  /** Text corresponding to the slider's value. Used primarily for improved accessibility. */\n  @Input() valueText!: string;\n\n  /** Whether the slider is vertical. */\n  @Input()\n  get vertical(): boolean {\n    return this._vertical;\n  }\n  set vertical(value: boolean) {\n    this._vertical = coerceBooleanProperty(value);\n  }\n  private _vertical = false;\n\n  /** Event emitted when the slider value has changed. */\n  @Output() readonly change: EventEmitter<MtxSliderChange> = new EventEmitter<MtxSliderChange>();\n\n  /** Event emitted when the slider thumb moves. */\n  @Output() readonly input: EventEmitter<MtxSliderChange> = new EventEmitter<MtxSliderChange>();\n\n  /**\n   * Emits when the raw value of the slider changes. This is here primarily\n   * to facilitate the two-way binding for the `value` input.\n   * @docs-private\n   */\n  @Output() readonly valueChange: EventEmitter<number | number[] | null> = new EventEmitter<\n    number | number[] | null\n  >();\n\n  /** The value to be used for display purposes. */\n  get displayValue(): string | number {\n    if (this.value == null) {\n      return '';\n    }\n    if (this.displayWith) {\n      if (this.value instanceof Array) {\n        return this.displayWith(this.value[0]);\n      } else {\n        return this.displayWith(this.value);\n      }\n    }\n\n    // Note that this could be improved further by rounding something like 0.999 to 1 or\n    // 0.899 to 0.9, however it is very performance sensitive, because it gets called on\n    // every change detection cycle.\n    if (this.value instanceof Array) {\n      if (\n        this._roundToDecimal &&\n        this.value &&\n        (this.value[0] % 1 !== 0 || this.value[1] % 1 !== 0)\n      ) {\n        return this.value[0].toFixed(this._roundToDecimal);\n      }\n    } else {\n      if (this._roundToDecimal && this.value && this.value % 1 !== 0) {\n        return this.value.toFixed(this._roundToDecimal);\n      }\n    }\n\n    if (this.value instanceof Array) {\n      return this.value[0] || 0;\n    } else {\n      return this.value || 0;\n    }\n  }\n\n  /** The value to be used for display purposes. */\n  get displayValueRight(): string | number {\n    if (this.value == null) {\n      return '';\n    }\n    if (this.displayWith) {\n      return this.displayWith((this.value as number[])[1]);\n    }\n\n    // Note that this could be improved further by rounding something like 0.999 to 1 or\n    // 0.899 to 0.9, however it is very performance sensitive, because it gets called on\n    // every change detection cycle.\n    if (\n      this._roundToDecimal &&\n      this.value &&\n      this.value != null &&\n      (this.value as number[])[1] % 1 !== 0\n    ) {\n      return (this.value as number[])[1].toFixed(this._roundToDecimal);\n    }\n\n    return (this.value as number[])[1] || 0;\n  }\n\n  /** set focus to the host element */\n  focus() {\n    this._focusHostElement();\n  }\n\n  /** blur the host element */\n  blur() {\n    this._blurHostElement();\n  }\n\n  /** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n  onTouched: () => any = () => {};\n\n  /** The percentage of the slider that coincides with the value. */\n  get percent(): number | number[] {\n    return this._clamp(this._percent);\n  }\n\n  private _percent: number | number[] = 0;\n\n  /**\n   * Whether or not the thumb is sliding.\n   * Used to determine if there should be a transition for the thumb and fill track.\n   */\n  _isSliding: boolean = false;\n\n  /**\n   * Whether or not the slider is active (clicked or sliding).\n   * Used to shrink and grow the thumb as according to the Material Design spec.\n   */\n  _isActive: boolean = false;\n\n  /**\n   * Whether the axis of the slider is inverted.\n   * (i.e. whether moving the thumb in the positive x or y direction decreases the slider's\n   *  value).\n   */\n  get _invertAxis() {\n    // Standard non-inverted mode for a vertical slider should be dragging the thumb from bottom\n    // to top. However from a y-axis standpoint this is inverted.\n    return this.vertical ? !this.invert : this.invert;\n  }\n\n  /** Whether the slider is at its minimum value. */\n  get _isMinValue() {\n    if (this.value instanceof Array) {\n      return (this.percent as number[])[0] === 0;\n    } else {\n      return this.percent === 0;\n    }\n  }\n\n  /**\n   * The amount of space to leave between the slider thumb and the track fill & track background\n   * elements.\n   */\n  get _thumbGap() {\n    if (this.disabled) {\n      return DISABLED_THUMB_GAP;\n    }\n    if (this._isMinValue && !this.thumbLabel) {\n      return this._isActive ? MIN_VALUE_ACTIVE_THUMB_GAP : MIN_VALUE_NONACTIVE_THUMB_GAP;\n    }\n    return 0;\n  }\n\n  /** CSS styles for the track background element. */\n  get _trackBackgroundStylesLeft(): { [key: string]: string } {\n    const axis = this.vertical ? 'Y' : 'X';\n    let scale: string = '';\n    if (this.percent instanceof Array) {\n      scale = this.vertical ? `1, ${this.percent[0]}, 1` : `${this.percent[0]}, 1, 1`;\n    } else {\n      scale = this.vertical ? `1, ${this.percent}, 1` : `${this.percent}, 1, 1`;\n    }\n    const sign = this._shouldInvertMouseCoords() ? '' : '-';\n\n    return {\n      // scale3d avoids some rendering issues in Chrome. See #12071.\n      transform: `translate${axis}(${sign}${this._thumbGap}px) scale3d(${scale})`,\n    };\n  }\n\n  get _trackBackgroundStylesRight(): { [key: string]: string } {\n    const axis = this.vertical ? 'Y' : 'X';\n    let scale: string = '';\n    if (this.percent instanceof Array) {\n      scale = this.vertical ? `1, ${1 - this.percent[1]}, 1` : `${1 - this.percent[1]}, 1, 1`;\n    } else {\n      scale = this.vertical ? `1, ${1 - this.percent}, 1` : `${1 - this.percent}, 1, 1`;\n    }\n    const sign = this._shouldInvertMouseCoords() ? '-' : '';\n    return {\n      // scale3d avoids some rendering issues in Chrome. See #12071.\n      transform: `translate${axis}(${sign}${this._thumbGap}px) scale3d(${scale})`,\n    };\n  }\n\n  /** CSS styles for the track fill element. */\n  get _trackFillStyles(): { [key: string]: string } {\n    const axis = this.vertical ? 'Y' : 'X';\n    let scale: string = '';\n    if (this.percent instanceof Array) {\n      scale = this.vertical\n        ? `1, ${this.percent[1] - this.percent[0]}, 1`\n        : `${this.percent[1] - this.percent[0]}, 1, 1`;\n    } else {\n      scale = this.vertical ? `1, ${this.percent}, 1` : `${this.percent}, 1, 1`;\n    }\n\n    const invertOffset =\n      this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;\n    let offset: number = 0;\n    if (this.percent instanceof Array) {\n      offset = (invertOffset ? 1 - this.percent[1] : this.percent[0]) * 100;\n    } else {\n      offset = 0;\n    }\n    const sign = this._shouldInvertMouseCoords() ? '' : '-';\n\n    if (this.isRangeSlider()) {\n      return {\n        // scale3d avoids some rendering issues in Chrome. See #12071.\n        transform: `translate${axis}(${offset}%) scale3d(${scale})`,\n      };\n    } else {\n      return {\n        // scale3d avoids some rendering issues in Chrome. See #12071.\n        transform: `translate${axis}(${sign}${this._thumbGap}px) scale3d(${scale})`,\n      };\n    }\n  }\n\n  /** CSS styles for the ticks container element. */\n  get _ticksContainerStyles(): { [key: string]: string } {\n    const axis = this.vertical ? 'Y' : 'X';\n    // For a horizontal slider in RTL languages we push the ticks container off the left edge\n    // instead of the right edge to avoid causing a horizontal scrollbar to appear.\n    const sign = !this.vertical && this._getDirection() === 'rtl' ? '' : '-';\n    const offset = (this._tickIntervalPercent / 2) * 100;\n    return {\n      transform: `translate${axis}(${sign}${offset}%)`,\n    };\n  }\n\n  /** CSS styles for the ticks element. */\n  get _ticksStyles(): { [key: string]: string } {\n    const tickSize = this._tickIntervalPercent * 100;\n    const backgroundSize = this.vertical ? `2px ${tickSize}%` : `${tickSize}% 2px`;\n    const axis = this.vertical ? 'Y' : 'X';\n    // Depending on the direction we pushed the ticks container, push the ticks the opposite\n    // direction to re-center them but clip off the end edge. In RTL languages we need to flip\n    // the ticks 180 degrees so we're really cutting off the end edge abd not the start.\n    const sign = !this.vertical && this._getDirection() === 'rtl' ? '-' : '';\n    const rotate = !this.vertical && this._getDirection() === 'rtl' ? ' rotate(180deg)' : '';\n    const styles: { [key: string]: string } = {\n      backgroundSize,\n      // Without translateZ ticks sometimes jitter as the slider moves on Chrome & Firefox.\n      transform: `translateZ(0) translate${axis}(${sign}${tickSize / 2}%)${rotate}`,\n    };\n\n    if (this._isMinValue && this._thumbGap) {\n      const side = this.vertical\n        ? this._invertAxis\n          ? 'Bottom'\n          : 'Top'\n        : this._invertAxis\n        ? 'Right'\n        : 'Left';\n      styles[`padding${side}`] = `${this._thumbGap}px`;\n    }\n\n    return styles;\n  }\n\n  get _thumbContainerStylesLeft(): { [key: string]: string } {\n    const axis = this.vertical ? 'Y' : 'X';\n    // For a horizontal slider in RTL languages we push the thumb container off the left edge\n    // instead of the right edge to avoid causing a horizontal scrollbar to appear.\n    const invertOffset =\n      this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;\n    let offset: number = 0;\n    if (this.percent instanceof Array) {\n      offset = (invertOffset ? this.percent[0] : 1 - this.percent[0]) * 100;\n    } else {\n      offset = (invertOffset ? this.percent : 1 - this.percent) * 100;\n    }\n    return {\n      transform: `translate${axis}(-${offset}%)`,\n    };\n  }\n\n  get _thumbContainerStylesRight(): { [key: string]: string } {\n    const axis = this.vertical ? 'Y' : 'X';\n    // For a horizontal slider in RTL languages we push the thumb container off the left edge\n    // instead of the right edge to avoid causing a horizontal scrollbar to appear.\n    const invertOffset =\n      this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;\n    let offset: number = 0;\n    if (this.percent instanceof Array) {\n      offset = (invertOffset ? this.percent[1] : 1 - this.percent[1]) * 100;\n    } else {\n      offset = (invertOffset ? this.percent : 1 - this.percent) * 100;\n    }\n    return {\n      transform: `translate${axis}(-${offset}%)`,\n    };\n  }\n\n  /** The size of a tick interval as a percentage of the size of the track. */\n  private _tickIntervalPercent: number = 0;\n\n  /** The dimensions of the slider. */\n  private _sliderDimensions: ClientRect | null = null;\n\n  private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n  /** Decimal places to round to, based on the step amount. */\n  private _roundToDecimal!: number;\n\n  /** Subscription to the Directionality change EventEmitter. */\n  private _dirChangeSubscription = Subscription.EMPTY;\n\n  /** The value of the slider when the slide start event fires. */\n  private _valueOnSlideStart!: number | number[] | null;\n\n  /** Position of the pointer when the dragging started. */\n  private _pointerPositionOnStart!: { x: number; y: number } | null;\n\n  /** Reference to the inner slider wrapper element. */\n  @ViewChild('sliderWrapper') private _sliderWrapper!: ElementRef;\n\n  /** The slider thumb which is currently used (left or right) */\n  private _currentSliderDir = 'l';\n\n  /**\n   * Whether mouse events should be converted to a slider position by calculating their distance\n   * from the right or bottom edge of the slider as opposed to the top or left.\n   */\n  private _shouldInvertMouseCoords() {\n    return this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;\n  }\n\n  /** The language direction for this slider element. */\n  private _getDirection() {\n    return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n  }\n\n  constructor(\n    elementRef: ElementRef,\n    private _focusMonitor: FocusMonitor,\n    private _changeDetectorRef: ChangeDetectorRef,\n    @Optional() private _dir: Directionality,\n    @Attribute('tabindex') tabIndex: string,\n    // @breaking-change 7.0.0 `_animationMode` parameter to be made required.\n    @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n    private _ngZone?: NgZone\n  ) {\n    super(elementRef);\n\n    this.tabIndex = parseInt(tabIndex, 10) || 0;\n\n    this._runOutsizeZone(() => {\n      const element = elementRef.nativeElement;\n      element.addEventListener('mousedown', this._pointerDown, activeEventOptions);\n      element.addEventListener('touchstart', this._pointerDown, activeEventOptions);\n    });\n  }\n\n  ngOnInit() {\n    this._focusMonitor.monitor(this._elementRef, true).subscribe((origin: FocusOrigin) => {\n      this._isActive = !!origin && origin !== 'keyboard';\n      this._changeDetectorRef.detectChanges();\n    });\n    if (this._dir) {\n      this._dirChangeSubscription = this._dir.change.subscribe(() => {\n        this._changeDetectorRef.markForCheck();\n      });\n    }\n  }\n\n  ngOnDestroy() {\n    const element = this._elementRef.nativeElement;\n    element.removeEventListener('mousedown', this._pointerDown, activeEventOptions);\n    element.removeEventListener('touchstart', this._pointerDown, activeEventOptions);\n    this._removeGlobalEvents();\n    this._focusMonitor.stopMonitoring(this._elementRef);\n    this._dirChangeSubscription.unsubscribe();\n  }\n\n  _onMouseenter() {\n    if (this.disabled) {\n      return;\n    }\n\n    // We save the dimensions of the slider here so we can use them to update the spacing of the\n    // ticks and determine where on the slider click and slide events happen.\n    this._sliderDimensions = this._getSliderDimensions();\n    this._updateTickIntervalPercent();\n  }\n\n  _onClick(event: MouseEvent) {\n    if (this.disabled) {\n      return;\n    }\n\n    let oldValue;\n    if (this.value instanceof Array) {\n      oldValue = [this.value[0], this.value[1]];\n    } else {\n      oldValue = this.value;\n    }\n\n    this._isSliding = false;\n    this._focusHostElement();\n\n    if (!this._sliderDimensions) {\n      return;\n    }\n    const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;\n    const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;\n    const posComponent = this.vertical ? event.clientY : event.clientX;\n\n    // The exact value is calculated from the event and used to find the closest snap value.\n    let percent = Number(this._clamp((posComponent - offset) / size));\n\n    if (this._shouldInvertMouseCoords()) {\n      percent = 1 - percent;\n    }\n\n    if (\n      percent <=\n      (this.percent as number[])[0] +\n        ((this.percent as number[])[1] - (this.percent as number[])[0]) / 2\n    ) {\n      this._currentSliderDir = 'l';\n    } else {\n      this._currentSliderDir = 'r';\n    }\n\n    if (this._currentSliderDir === 'l') {\n      this._updateValueFromPositionLeft({ x: event.clientX, y: event.clientY });\n    } else {\n      this._updateValueFromPositionRight({ x: event.clientX, y: event.clientY });\n    }\n\n    // Emit a change and input event if the value changed.\n    if (this.value instanceof Array) {\n      if (\n        (oldValue as number[])[0] !== this.value[0] ||\n        (oldValue as number[])[1] !== this.value[1]\n      ) {\n        this._emitInputEvent();\n        this._emitChangeEvent();\n      }\n    } else {\n      if (oldValue !== this.value) {\n        this._emitInputEvent();\n        this._emitChangeEvent();\n      }\n    }\n  }\n\n  _onFocus() {\n    // We save the dimensions of the slider here so we can use them to update the spacing of the\n    // ticks and determine where on the slider click and slide events happen.\n    this._sliderDimensions = this._getSliderDimensions();\n    this._updateTickIntervalPercent();\n  }\n\n  _onBlur() {\n    this.onTouched();\n  }\n\n  _onKeydown(event: KeyboardEvent) {\n    if (this.disabled) {\n      return;\n    }\n\n    let oldValue;\n    if (this.value instanceof Array) {\n      oldValue = [this.value[0], this.value[1]];\n    } else {\n      oldValue = this.value;\n    }\n\n    switch (event.keyCode) {\n      case PAGE_UP:\n        this._increment(10);\n        break;\n      case PAGE_DOWN:\n        this._increment(-10);\n        break;\n      case END:\n        this.value = this.max;\n        break;\n      case HOME:\n        this.value = this.min;\n        break;\n      case LEFT_ARROW:\n        // NOTE: For a sighted user it would make more sense that when they press an arrow\n        // key on an inverted slider the thumb moves in that direction. However for a blind\n        // user, nothing about the slider indicates that it is inverted. They will expect\n        // left to be decrement, regardless of how it appears on the screen. For speakers\n        // ofRTL languages, they probably expect left to mean increment. Therefore we flip\n        // the meaning of the side arrow keys for RTL. For inverted sliders we prefer a\n        // good a11y experience to having it \"look right\" for sighted users, therefore we do\n        // not swap the meaning.\n        this._increment(this._getDirection() === 'rtl' ? 1 : -1);\n        break;\n      case UP_ARROW:\n        this._increment(1);\n        break;\n      case RIGHT_ARROW:\n        // See comment on LEFT_ARROW about the conditions under which we flip the meaning.\n        this._increment(this._getDirection() === 'rtl' ? -1 : 1);\n        break;\n      case DOWN_ARROW:\n        this._increment(-1);\n        break;\n      default:\n        // Return if the key is not one that we explicitly handle to avoid calling\n        // preventDefault on it.\n        return;\n    }\n\n    if (this.value instanceof Array) {\n      if (\n        (oldValue as number[])[0] !== this.value[0] ||\n        (oldValue as number[])[1] !== this.value[1]\n      ) {\n        this._emitInputEvent();\n        this._emitChangeEvent();\n      }\n    } else {\n      if (oldValue !== this.value) {\n        this._emitInputEvent();\n        this._emitChangeEvent();\n      }\n    }\n\n    this._isSliding = true;\n    event.preventDefault();\n  }\n\n  _onKeyup() {\n    this._isSliding = false;\n  }\n\n  /** Called when the user has put their pointer down on the slider. */\n  private _pointerDown = (event: TouchEvent | MouseEvent) => {\n    // Don't do anything if the slider is disabled or the\n    // user is using anything other than the main mouse button.\n    if (this.disabled || this._isSliding || (!isTouchEvent(event) && event.button !== 0)) {\n      return;\n    }\n\n    this.calculateInitialSlideDirection(event);\n\n    this._runInsideZone(() => {\n      const oldValue = this.value;\n      const pointerPosition = getPointerPositionOnPage(event);\n      this._isSliding = true;\n      event.preventDefault();\n      this._focusHostElement();\n      this._onMouseenter(); // Simulate mouseenter in case this is a mobile device.\n      this._bindGlobalEvents(event);\n      this._focusHostElement();\n\n      // TODO:\n      // this._updateValueFromPosition(pointerPosition);\n      if (this.value instanceof Array) {\n        if (this._currentSliderDir === 'l') {\n          this._updateValueFromPositionLeft(pointerPosition);\n        } else if (this._currentSliderDir === 'r') {\n          this._updateValueFromPositionRight(pointerPosition);\n        }\n      } else {\n        this._updateValueFromPositionLeft(pointerPosition);\n      }\n\n      this._valueOnSlideStart = this.value;\n      this._pointerPositionOnStart = pointerPosition;\n\n      // Emit a change and input event if the value changed.\n      if (oldValue !== this.value) {\n        this._emitInputEvent();\n        this._emitChangeEvent();\n      }\n    });\n  };\n\n  /**\n   * Called when the user has moved their pointer after\n   * starting to drag. Bound on the document level.\n   */\n  private _pointerMove = (event: TouchEvent | MouseEvent) => {\n    if (this._isSliding) {\n      this.calculateInitialSlideDirection(event);\n\n      // Prevent the slide from selecting anything else.\n      event.preventDefault();\n      const oldValue = this.value;\n\n      // TODO:\n      // this._updateValueFromPosition(getPointerPositionOnPage(event));\n      const pointerPosition = getPointerPositionOnPage(event);\n      if (this._currentSliderDir === 'l') {\n        this._updateValueFromPositionLeft(pointerPosition);\n      } else if (this._currentSliderDir === 'r') {\n        this._updateValueFromPositionRight(pointerPosition);\n      } else {\n        if (!this.isRangeSlider()) {\n          this._updateValueFromPositionLeft(pointerPosition);\n        }\n      }\n\n      // Native range elements always emit `input` events when the value changed while sliding.\n      if (oldValue !== this.value) {\n        this._emitInputEvent();\n      }\n    }\n  };\n\n  /** Called when the user has lifted their pointer. Bound on the document level. */\n  private _pointerUp = (event: TouchEvent | MouseEvent) => {\n    if (this._isSliding) {\n      const pointerPositionOnStart = this._pointerPositionOnStart;\n      const currentPointerPosition = getPointerPositionOnPage(event);\n\n      event.preventDefault();\n      this._removeGlobalEvents();\n      this._valueOnSlideStart = this._pointerPositionOnStart = null;\n      this._isSliding = false;\n\n      if (\n        this._valueOnSlideStart !== this.value &&\n        !this.disabled &&\n        pointerPositionOnStart &&\n        (pointerPositionOnStart.x !== currentPointerPosition.x ||\n          pointerPositionOnStart.y !== currentPointerPosition.y)\n      ) {\n        this._emitChangeEvent();\n      }\n    }\n  };\n\n  /**\n   * Binds our global move and end events. They're bound at the document level and only while\n   * dragging so that the user doesn't have to keep their pointer exactly over the slider\n   * as they're swiping across the screen.\n   */\n  private _bindGlobalEvents(triggerEvent: TouchEvent | MouseEvent) {\n    if (typeof document !== 'undefined' && document) {\n      const isTouch = isTouchEvent(triggerEvent);\n      const moveEventName = isTouch ? 'touchmove' : 'mousemove';\n      const endEventName = isTouch ? 'touchend' : 'mouseup';\n      document.body.addEventListener(moveEventName, this._pointerMove, activeEventOptions);\n      document.body.addEventListener(endEventName, this._pointerUp, activeEventOptions);\n    }\n  }\n\n  /** Removes any global event listeners that we may have added. */\n  private _removeGlobalEvents() {\n    if (typeof document !== 'undefined' && document) {\n      document.body.removeEventListener('mousemove', this._pointerMove, activeEventOptions);\n      document.body.removeEventListener('mouseup', this._pointerUp, activeEventOptions);\n      document.body.removeEventListener('touchmove', this._pointerMove, activeEventOptions);\n      document.body.removeEventListener('touchend', this._pointerUp, activeEventOptions);\n    }\n  }\n\n  /** Increments the slider by the given number of steps (negative number decrements). */\n  private _increment(numSteps: number) {\n    if (this.value instanceof Array) {\n      this.value = this._clamp(\n        [(this.value[0] || 0) + this.step * numSteps, (this.value[1] || 0) + this.step * numSteps],\n        this.min,\n        this.max\n      );\n    } else {\n      this.value = this._clamp((this.value || 0) + this.step * numSteps, this.min, this.max);\n    }\n  }\n\n  /** Calculate the new value from the new physical location. The value will always be snapped. */\n  private _updateValueFromPosition(pos: { x: number; y: number }) {\n    if (!this._sliderDimensions) {\n      return;\n    }\n\n    const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;\n    const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;\n    const posComponent = this.vertical ? pos.y : pos.x;\n\n    // The exact value is calculated from the event and used to find the closest snap value.\n    let percent = this._clamp((posComponent - offset) / size);\n\n    if (this._shouldInvertMouseCoords()) {\n      percent = 1 - (percent as any);\n    }\n\n    // Since the steps may not divide cleanly into the max value, if the user\n    // slid to 0 or 100 percent, we jump to the min/max value. This approach\n    // is slightly more intuitive than using `Math.ceil` below, because it\n    // follows the user's pointer closer.\n    if (percent === 0) {\n      this.value = this.min;\n    } else if (percent === 1) {\n      this.value = this.max;\n    } else {\n      const exactValue = this._calculateValue(percent);\n\n      // This calculation finds the closest step by finding the closest\n      // whole number divisible by the step relative to the min.\n      const closestValue =\n        Math.round(((exactValue as any) - this.min) / this.step) * this.step + this.min;\n\n      // The value needs to snap to the min and max.\n      this.value = this._clamp(closestValue, this.min, this.max);\n    }\n  }\n\n  /** Calculate the new value from the new physical location. The value will always be snapped. */\n  private _updateValueFromPositionLeft(pos: { x: number; y: number }) {\n    if (!this._sliderDimensions) {\n      return;\n    }\n\n    const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;\n    const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;\n    const posComponent = this.vertical ? pos.y : pos.x;\n\n    // The exact value is calculated from the event and used to find the closest snap value.\n    let percent = Number(this._clamp((posComponent - offset) / size));\n\n    if (this._shouldInvertMouseCoords()) {\n      percent = 1 - percent;\n    }\n\n    // Since the steps may not divide cleanly into the max value, if the user\n    // slid to 0 or 100 percent, we jump to the min/max value. This approach\n    // is slightly more intuitive than using `Math.ceil` below, because it\n    // follows the user's pointer closer.\n    if (percent === 0) {\n      if (this.value instanceof Array) {\n        this.value = [this.min, this.value[1]];\n      } else {\n        this.value = this.min;\n      }\n    } else if (percent === 1) {\n      if (this.value instanceof Array) {\n        this.value = [this.max, this.value[1]];\n      } else {\n        this.value = this.max;\n      }\n    } else {\n      const exactValue = this._calculateValue(percent);\n\n      // This calculation finds the closest step by finding the closest\n      // whole number divisible by the step relative to the min.\n      const closestValue =\n        Math.round((Number(exactValue) - this.min) / this.step) * this.step + this.min;\n\n      // The value needs to snap to the min and max.\n      if (this.value instanceof Array) {\n        this.value = [Number(this._clamp(closestValue, this.min, this.max)), this.value[1]];\n      } else {\n        this.value = this._clamp(closestValue, this.min, this.max);\n      }\n    }\n  }\n\n  /** Calculate the new value from the new physical location. The value will always be snapped. */\n  private _updateValueFromPositionRight(pos: { x: number; y: number }) {\n    if (!this._sliderDimensions) {\n      return;\n    }\n\n    const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;\n    const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;\n    const posComponent = this.vertical ? pos.y : pos.x;\n\n    // The exact value is calculated from the event and used to find the closest snap value.\n    let percent = Number(this._clamp((posComponent - offset) / size));\n\n    if (this._shouldInvertMouseCoords()) {\n      percent = 1 - percent;\n    }\n\n    // Since the steps may not divide cleanly into the max value, if the user\n    // slid to 0 or 100 percent, we jump to the min/max value. This approach\n    // is slightly more intuitive than using `Math.ceil` below, because it\n    // follows the user's pointer closer.\n    if (percent === 0) {\n      if (this.value instanceof Array) {\n        this.value = [this.value[0], this.min];\n      } else {\n        this.value = this.min;\n      }\n    } else if (percent === 1) {\n      if (this.value instanceof Array) {\n        this.value = [this.value[0], this.max];\n      } else {\n        this.value = this.max;\n      }\n    } else {\n      const exactValue = this._calculateValue(percent);\n\n      // This calculation finds the closest step by finding the closest\n      // whole number divisible by the step relative to the min.\n      const closestValue =\n        Math.round((Number(exactValue) - this.min) / this.step) * this.step + this.min;\n\n      // The value needs to snap to the min and max.\n      if (this.value instanceof Array) {\n        this.value = [this.value[0], Number(this._clamp(closestValue, this.min, this.max))];\n      } else {\n        this.value = this._clamp(closestValue, this.min, this.max);\n      }\n    }\n  }\n\n  /** Emits a change event if the current value is different from the last emitted value. */\n  private _emitChangeEvent() {\n    this._controlValueAccessorChangeFn(this.value);\n    this.valueChange.emit(this.value);\n    this.change.emit(this._createChangeEvent());\n  }\n\n  /** Emits an input event when the current value is different from the last emitted value. */\n  private _emitInputEvent() {\n    this.input.emit(this._createChangeEvent());\n  }\n\n  /** Updates the amount of space between ticks as a percentage of the width of the slider. */\n  private _updateTickIntervalPercent() {\n    if (!this.tickInterval || !this._sliderDimensions) {\n      return;\n    }\n\n    if (this.tickInterval === 'auto') {\n      const trackSize = this.vertical\n        ? this._sliderDimensions.height\n        : this._sliderDimensions.width;\n      const pixelsPerStep = (trackSize * this.step) / (this.max - this.min);\n      const stepsPerTick = Math.ceil(MIN_AUTO_TICK_SEPARATION / pixelsPerStep);\n      const pixelsPerTick = stepsPerTick * this.step;\n      this._tickIntervalPercent = pixelsPerTick / trackSize;\n    } else {\n      this._tickIntervalPercent = (this.tickInterval * this.step) / (this.max - this.min);\n    }\n  }\n\n  /** Creates a slider change object from the specified value. */\n  private _createChangeEvent(value = this.value): MtxSliderChange {\n    const event = new MtxSliderChange();\n\n    event.source = this;\n    event.value = value;\n\n    return event;\n  }\n\n  /** Calculates the percentage of the slider that a value is. */\n  private _calculatePercentage(value: number | number[] | null) {\n    if (value instanceof Array) {\n      return [\n        ((value[0] || 0) - this.min) / (this.max - this.min),\n        ((value[1] || 0) - this.min) / (this.max - this.min),\n      ];\n    } else {\n      return ((value || 0) - this.min) / (this.max - this.min);\n    }\n  }\n\n  /** Calculates the value a percentage of the slider corresponds to. */\n  private _calculateValue(percentage: number | number[]) {\n    if (percentage instanceof Array) {\n      return [\n        this.min + percentage[0] * (this.max - this.min),\n        this.min + percentage[1] * (this.max - this.min),\n      ];\n    } else {\n      return this.min + percentage * (this.max - this.min);\n    }\n  }\n\n  /** Return a number between two numbers. */\n  private _clamp(value: number | number[], min = 0, max = 1) {\n    if (value instanceof Array) {\n      return [Math.max(min, Math.min(value[0], max)), Math.max(min, Math.min(value[1], max))];\n    } else {\n      return Math.max(min, Math.min(value, max));\n    }\n  }\n\n  /**\n   * Get the bounding client rect of the slider track element.\n   * The track is used rather than the native element to ignore the extra space that the thumb can\n   * take up.\n   */\n  private _getSliderDimensions() {\n    return this._sliderWrapper ? this._sliderWrapper.nativeElement.getBoundingClientRect() : null;\n  }\n\n  /**\n   * Focuses the native element.\n   * Currently only used to allow a blur event to fire but will be used with keyboard input later.\n   */\n  private _focusHostElement() {\n    this._elementRef.nativeElement.focus();\n  }\n\n  /** Blurs the native element. */\n  private _blurHostElement() {\n    this._elementRef.nativeElement.blur();\n  }\n\n  /** Runs a callback outside of the NgZone, if possible. */\n  private _runOutsizeZone(fn: () => any) {\n    // @breaking-change 9.0.0 Remove this function once `_ngZone` is a required parameter.\n    this._ngZone ? this._ngZone.runOutsideAngular(fn) : fn();\n  }\n\n  /** Runs a callback inside of the NgZone, if possible. */\n  private _runInsideZone(fn: () => any) {\n    // @breaking-change 9.0.0 Remove this function once `_ngZone` is a required parameter.\n    this._ngZone ? this._ngZone.run(fn) : fn();\n  }\n\n  /**\n   * Sets the model value. Implemented as part of ControlValueAccessor.\n   * @param value\n   */\n  writeValue(value: any) {\n    this.value = value;\n  }\n\n  /**\n   * Registers a callback to be triggered when the value has changed.\n   * Implemented as part of ControlValueAccessor.\n   * @param fn Callback to be registered.\n   */\n  registerOnChange(fn: (value: any) => void) {\n    this._controlValueAccessorChangeFn = fn;\n  }\n\n  /**\n   * Registers a callback to be triggered when the component is touched.\n   * Implemented as part of ControlValueAccessor.\n   * @param fn Callback to be registered.\n   */\n  registerOnTouched(fn: any) {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets whether the component should be disabled.\n   * Implemented as part of ControlValueAccessor.\n   * @param isDisabled\n   */\n  setDisabledState(isDisabled: boolean) {\n    this.disabled = isDisabled;\n  }\n\n  isRangeSlider(): boolean {\n    return this.value instanceof Array;\n  }\n\n  private calculateInitialSlideDirection(event: MouseEvent | TouchEvent) {\n    if (!this._sliderDimensions) {\n      return;\n    }\n    const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;\n    const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;\n    const pointerPosition = getPointerPositionOnPage(event);\n    const posComponent = this.vertical ? pointerPosition.y : pointerPosition.x;\n\n    // The exact value is calculated from the event and used to find the closest snap value.\n    let percent = Number(this._clamp((posComponent - offset) / size));\n\n    if (this._shouldInvertMouseCoords()) {\n      percent = 1 - percent;\n    }\n\n    if (\n      percent <=\n      (this.percent as number[])[0] +\n        ((this.percent as number[])[1] - (this.percent as number[])[0]) / 2\n    ) {\n      this._currentSliderDir = 'l';\n    } else {\n      this._currentSliderDir = 'r';\n    }\n  }\n\n  static ngAcceptInputType_invert: BooleanInput;\n  static ngAcceptInputType_max: NumberInput;\n  static ngAcceptInputType_min: NumberInput;\n  static ngAcceptInputType_step: NumberInput;\n  static ngAcceptInputType_thumbLabel: BooleanInput;\n  static ngAcceptInputType_tickInterval: NumberInput;\n  static ngAcceptInputType_value: NumberInput | NumberInput[];\n  static ngAcceptInputType_vertical: BooleanInput;\n  static ngAcceptInputType_disabled: BooleanInput;\n  static ngAcceptInputType_tabIndex: NumberInput;\n}\n\n/** Returns whether an event is a touch event. */\nfunction isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\n  // This function is called for every pixel that the user has dragged so we need it to be\n  // as fast as possible. Since we only bind mouse events and touch events, we can assume\n  // that if the event's name starts with `t`, it's a touch event.\n  return event.type[0] === 't';\n}\n\n/** Gets the coordinates of a touch or mouse event relative to the viewport. */\nfunction getPointerPositionOnPage(event: MouseEvent | TouchEvent) {\n  // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n  const point = isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : event;\n  return { x: point.clientX, y: point.clientY };\n}\n","<div class=\"mtx-slider-wrapper\" #sliderWrapper>\n  <div class=\"mtx-slider-track-wrapper\">\n    <div *ngIf=\"isRangeSlider()\"\n         class=\"mtx-slider-track-background mtx-slider-track-background-left\"\n         [ngStyle]=\"_trackBackgroundStylesLeft\"></div>\n    <div class=\"mtx-slider-track-background mtx-slider-track-background-right\"\n         [ngStyle]=\"_trackBackgroundStylesRight\"></div>\n    <div class=\"mtx-slider-track-fill\" [ngClass]=\"{'mtx-range-slider-fill': isRangeSlider()}\"\n         [ngStyle]=\"_trackFillStyles\"></div>\n  </div>\n  <div class=\"mtx-slider-ticks-container\" [ngStyle]=\"_ticksContainerStyles\">\n    <div class=\"mtx-slider-ticks\" [ngStyle]=\"_ticksStyles\"></div>\n  </div>\n  <div class=\"mtx-slider-thumb-container\" #leftSlider\n       [ngStyle]=\"_thumbContainerStylesLeft\">\n    <div class=\"mtx-slider-focus-ring\"></div>\n    <div class=\"mtx-slider-thumb left\"></div>\n    <div class=\"mtx-slider-thumb-label\">\n      <span class=\"mtx-slider-thumb-label-text\">{{displayValue}}</span>\n    </div>\n  </div>\n  <div *ngIf=\"isRangeSlider()\"\n       class=\"mtx-slider-thumb-container\" #rightSlider\n       [ngStyle]=\"_thumbContainerStylesRight\">\n    <div class=\"mtx-slider-focus-ring\"></div>\n    <div class=\"mtx-slider-thumb right\"></div>\n    <div class=\"mtx-slider-thumb-label\">\n      <span class=\"mtx-slider-thumb-label-text\">{{displayValueRight}}</span>\n    </div>\n  </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MtxSlider } from './slider';\n\n@NgModule({\n  imports: [CommonModule, MatCommonModule],\n  exports: [MtxSlider, MatCommonModule],\n  declarations: [MtxSlider],\n})\nexport class MtxSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAiDA,MA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