{"version":3,"file":"drag-drop.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/clone-node.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/dom-rect.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/parent-position-tracker.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/root-node.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/styling.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-drop-registry.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/transition-duration.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/preview-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-utils.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/sorting/single-axis-sort-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/sorting/mixed-sort-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drop-list-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-drop.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-parent.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/assertions.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag-handle.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/config.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drop-list-group.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drop-list.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag-preview.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag-placeholder.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-drop-module.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/** Creates a deep clone of an element. */\nexport function deepCloneNode(node: HTMLElement): HTMLElement {\n  const clone = node.cloneNode(true) as HTMLElement;\n  const descendantsWithId = clone.querySelectorAll('[id]');\n  const nodeName = node.nodeName.toLowerCase();\n\n  // Remove the `id` to avoid having multiple elements with the same id on the page.\n  clone.removeAttribute('id');\n\n  for (let i = 0; i < descendantsWithId.length; i++) {\n    descendantsWithId[i].removeAttribute('id');\n  }\n\n  if (nodeName === 'canvas') {\n    transferCanvasData(node as HTMLCanvasElement, clone as HTMLCanvasElement);\n  } else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n    transferInputData(node as HTMLInputElement, clone as HTMLInputElement);\n  }\n\n  transferData('canvas', node, clone, transferCanvasData);\n  transferData('input, textarea, select', node, clone, transferInputData);\n  return clone;\n}\n\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData<T extends Element>(\n  selector: string,\n  node: HTMLElement,\n  clone: HTMLElement,\n  callback: (source: T, clone: T) => void,\n) {\n  const descendantElements = node.querySelectorAll<T>(selector);\n\n  if (descendantElements.length) {\n    const cloneElements = clone.querySelectorAll<T>(selector);\n\n    for (let i = 0; i < descendantElements.length; i++) {\n      callback(descendantElements[i], cloneElements[i]);\n    }\n  }\n}\n\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n\n/** Transfers the data of one input element to another. */\nfunction transferInputData(\n  source: Element & {value: string},\n  clone: Element & {value: string; name: string; type: string},\n) {\n  // Browsers throw an error when assigning the value of a file input programmatically.\n  if (clone.type !== 'file') {\n    clone.value = source.value;\n  }\n\n  // Radio button `name` attributes must be unique for radio button groups\n  // otherwise original radio buttons can lose their checked state\n  // once the clone is inserted in the DOM.\n  if (clone.type === 'radio' && clone.name) {\n    clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n  }\n}\n\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source: HTMLCanvasElement, clone: HTMLCanvasElement) {\n  const context = clone.getContext('2d');\n\n  if (context) {\n    // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n    // We can't do much about it so just ignore the error.\n    try {\n      context.drawImage(source, 0, 0);\n    } catch {}\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\n/** Gets a mutable version of an element's bounding `DOMRect`. */\nexport function getMutableClientRect(element: Element): DOMRect {\n  const rect = element.getBoundingClientRect();\n\n  // We need to clone the `clientRect` here, because all the values on it are readonly\n  // and we need to be able to update them. Also we can't use a spread here, because\n  // the values on a `DOMRect` aren't own properties. See:\n  // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n  return {\n    top: rect.top,\n    right: rect.right,\n    bottom: rect.bottom,\n    left: rect.left,\n    width: rect.width,\n    height: rect.height,\n    x: rect.x,\n    y: rect.y,\n  } as DOMRect;\n}\n\n/**\n * Checks whether some coordinates are within a `DOMRect`.\n * @param clientRect DOMRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nexport function isInsideClientRect(clientRect: DOMRect, x: number, y: number) {\n  const {top, bottom, left, right} = clientRect;\n  return y >= top && y <= bottom && x >= left && x <= right;\n}\n\n/**\n * Checks if the child element is overflowing from its parent.\n * @param parentRect - The bounding rect of the parent element.\n * @param childRect - The bounding rect of the child element.\n */\nexport function isOverflowingParent(parentRect: DOMRect, childRect: DOMRect): boolean {\n  // check for horizontal overflow (left and right)\n  const isLeftOverflowing = childRect.left < parentRect.left;\n  const isRightOverflowing = childRect.left + childRect.width > parentRect.right;\n\n  // check for vertical overflow (top and bottom)\n  const isTopOverflowing = childRect.top < parentRect.top;\n  const isBottomOverflowing = childRect.top + childRect.height > parentRect.bottom;\n\n  return isLeftOverflowing || isRightOverflowing || isTopOverflowing || isBottomOverflowing;\n}\n\n/**\n * Updates the top/left positions of a `DOMRect`, as well as their bottom/right counterparts.\n * @param domRect `DOMRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nexport function adjustDomRect(\n  domRect: {\n    top: number;\n    bottom: number;\n    left: number;\n    right: number;\n    width: number;\n    height: number;\n  },\n  top: number,\n  left: number,\n) {\n  domRect.top += top;\n  domRect.bottom = domRect.top + domRect.height;\n\n  domRect.left += left;\n  domRect.right = domRect.left + domRect.width;\n}\n\n/**\n * Checks whether the pointer coordinates are close to a DOMRect.\n * @param rect DOMRect to check against.\n * @param threshold Threshold around the DOMRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nexport function isPointerNearDomRect(\n  rect: DOMRect,\n  threshold: number,\n  pointerX: number,\n  pointerY: number,\n): boolean {\n  const {top, right, bottom, left, width, height} = rect;\n  const xThreshold = width * threshold;\n  const yThreshold = height * threshold;\n\n  return (\n    pointerY > top - yThreshold &&\n    pointerY < bottom + yThreshold &&\n    pointerX > left - xThreshold &&\n    pointerX < right + xThreshold\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 {_getEventTarget} from '../../platform';\nimport {getMutableClientRect, adjustDomRect} from './dom-rect';\n\n/** Object holding the scroll position of something. */\ninterface ScrollPosition {\n  top: number;\n  left: number;\n}\n\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nexport class ParentPositionTracker {\n  /** Cached positions of the scrollable parent elements. */\n  readonly positions = new Map<\n    Document | HTMLElement,\n    {\n      scrollPosition: ScrollPosition;\n      clientRect?: DOMRect;\n    }\n  >();\n\n  constructor(private _document: Document) {}\n\n  /** Clears the cached positions. */\n  clear() {\n    this.positions.clear();\n  }\n\n  /** Caches the positions. Should be called at the beginning of a drag sequence. */\n  cache(elements: readonly HTMLElement[]) {\n    this.clear();\n    this.positions.set(this._document, {\n      scrollPosition: this.getViewportScrollPosition(),\n    });\n\n    elements.forEach(element => {\n      this.positions.set(element, {\n        scrollPosition: {top: element.scrollTop, left: element.scrollLeft},\n        clientRect: getMutableClientRect(element),\n      });\n    });\n  }\n\n  /** Handles scrolling while a drag is taking place. */\n  handleScroll(event: Event): ScrollPosition | null {\n    const target = _getEventTarget<HTMLElement | Document>(event)!;\n    const cachedPosition = this.positions.get(target);\n\n    if (!cachedPosition) {\n      return null;\n    }\n\n    const scrollPosition = cachedPosition.scrollPosition;\n    let newTop: number;\n    let newLeft: number;\n\n    if (target === this._document) {\n      const viewportScrollPosition = this.getViewportScrollPosition();\n      newTop = viewportScrollPosition.top;\n      newLeft = viewportScrollPosition.left;\n    } else {\n      newTop = (target as HTMLElement).scrollTop;\n      newLeft = (target as HTMLElement).scrollLeft;\n    }\n\n    const topDifference = scrollPosition.top - newTop;\n    const leftDifference = scrollPosition.left - newLeft;\n\n    // Go through and update the cached positions of the scroll\n    // parents that are inside the element that was scrolled.\n    this.positions.forEach((position, node) => {\n      if (position.clientRect && target !== node && target.contains(node)) {\n        adjustDomRect(position.clientRect, topDifference, leftDifference);\n      }\n    });\n\n    scrollPosition.top = newTop;\n    scrollPosition.left = newLeft;\n\n    return {top: topDifference, left: leftDifference};\n  }\n\n  /**\n   * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n   * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n   * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n   * if the element is offset by something like the `BlockScrollStrategy`.\n   */\n  getViewportScrollPosition() {\n    return {top: window.scrollY, left: window.scrollX};\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 {EmbeddedViewRef} from '@angular/core';\n\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nexport function getRootNode(viewRef: EmbeddedViewRef<any>, _document: Document): HTMLElement {\n  const rootNodes: Node[] = viewRef.rootNodes;\n\n  if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n    return rootNodes[0] as HTMLElement;\n  }\n\n  const wrapper = _document.createElement('div');\n  rootNodes.forEach(node => wrapper.appendChild(node));\n  return wrapper;\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\n/**\n * Extended CSSStyleDeclaration that includes a couple of drag-related\n * properties that aren't in the built-in TS typings.\n */\nexport interface DragCSSStyleDeclaration extends CSSStyleDeclaration {\n  msScrollSnapType: string;\n  scrollSnapType: string;\n  webkitTapHighlightColor: string;\n}\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nexport function extendStyles(\n  dest: CSSStyleDeclaration,\n  source: Record<string, string>,\n  importantProperties?: Set<string>,\n) {\n  for (let key in source) {\n    if (source.hasOwnProperty(key)) {\n      const value = source[key];\n\n      if (value) {\n        dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n      } else {\n        dest.removeProperty(key);\n      }\n    }\n  }\n\n  return dest;\n}\n\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nexport function toggleNativeDragInteractions(element: HTMLElement, enable: boolean) {\n  const userSelect = enable ? '' : 'none';\n\n  extendStyles(element.style, {\n    'touch-action': enable ? '' : 'none',\n    '-webkit-user-drag': enable ? '' : 'none',\n    '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n    'user-select': userSelect,\n    '-ms-user-select': userSelect,\n    '-webkit-user-select': userSelect,\n    '-moz-user-select': userSelect,\n  });\n}\n\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nexport function toggleVisibility(\n  element: HTMLElement,\n  enable: boolean,\n  importantProperties?: Set<string>,\n) {\n  extendStyles(\n    element.style,\n    {\n      position: enable ? '' : 'fixed',\n      top: enable ? '' : '0',\n      opacity: enable ? '' : '0',\n      left: enable ? '' : '-999em',\n    },\n    importantProperties,\n  );\n}\n\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nexport function combineTransforms(transform: string, initialTransform?: string): string {\n  return initialTransform && initialTransform != 'none'\n    ? transform + ' ' + initialTransform\n    : transform;\n}\n\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nexport function matchElementSize(target: HTMLElement, sourceRect: DOMRect): void {\n  target.style.width = `${sourceRect.width}px`;\n  target.style.height = `${sourceRect.height}px`;\n  target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nexport function getTransform(x: number, y: number): string {\n  // Round the transforms since some browsers will\n  // blur the elements for sub-pixel transforms.\n  return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\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 {\n  ChangeDetectionStrategy,\n  Component,\n  Injectable,\n  ListenerOptions,\n  NgZone,\n  OnDestroy,\n  RendererFactory2,\n  ViewEncapsulation,\n  WritableSignal,\n  inject,\n  signal,\n  DOCUMENT,\n} from '@angular/core';\n\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {Observable, Observer, Subject, merge} from 'rxjs';\nimport type {DropListRef} from './drop-list-ref';\nimport type {DragRef} from './drag-ref';\nimport type {CdkDrag} from './directives/drag';\n\n/** Event options that can be used to bind a capturing event. */\nconst capturingEventOptions = {\n  capture: true,\n};\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = {\n  passive: false,\n  capture: true,\n};\n\n/**\n * Component used to load the drag&drop reset styles.\n * @docs-private\n */\n@Component({\n  styleUrl: 'resets.css',\n  encapsulation: ViewEncapsulation.None,\n  template: '',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {'cdk-drag-resets-container': ''},\n})\nexport class _ResetsLoader {}\n\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class DragDropRegistry implements OnDestroy {\n  private _ngZone = inject(NgZone);\n  private _document = inject(DOCUMENT);\n  private _styleLoader = inject(_CdkPrivateStyleLoader);\n  private _renderer = inject(RendererFactory2).createRenderer(null, null);\n  private _cleanupDocumentTouchmove: (() => void) | undefined;\n  private _scroll: Subject<Event> = new Subject<Event>();\n\n  /** Registered drop container instances. */\n  private _dropInstances = new Set<DropListRef>();\n\n  /** Registered drag item instances. */\n  private _dragInstances = new Set<DragRef>();\n\n  /** Drag item instances that are currently being dragged. */\n  private _activeDragInstances: WritableSignal<DragRef[]> = signal([]);\n\n  /** Keeps track of the event listeners that we've bound to the `document`. */\n  private _globalListeners: (() => void)[] | undefined;\n\n  /**\n   * Predicate function to check if an item is being dragged.  Moved out into a property,\n   * because it'll be called a lot and we don't want to create a new function every time.\n   */\n  private _draggingPredicate = (item: DragRef) => item.isDragging();\n\n  /**\n   * Map tracking DOM nodes and their corresponding drag directives. Note that this is different\n   * from looking through the `_dragInstances` and getting their root node, because the root node\n   * isn't necessarily the node that the directive is set on.\n   */\n  private _domNodesToDirectives: WeakMap<Node, CdkDrag> | null = null;\n\n  /**\n   * Emits the `touchmove` or `mousemove` events that are dispatched\n   * while the user is dragging a drag item instance.\n   */\n  readonly pointerMove: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n  /**\n   * Emits the `touchend` or `mouseup` events that are dispatched\n   * while the user is dragging a drag item instance.\n   */\n  readonly pointerUp: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /** Adds a drop container to the registry. */\n  registerDropContainer(drop: DropListRef) {\n    if (!this._dropInstances.has(drop)) {\n      this._dropInstances.add(drop);\n    }\n  }\n\n  /** Adds a drag item instance to the registry. */\n  registerDragItem(drag: DragRef) {\n    this._dragInstances.add(drag);\n\n    // The `touchmove` event gets bound once, ahead of time, because WebKit\n    // won't preventDefault on a dynamically-added `touchmove` listener.\n    // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n    if (this._dragInstances.size === 1) {\n      this._ngZone.runOutsideAngular(() => {\n        // The event handler has to be explicitly active,\n        // because newer browsers make it passive by default.\n        this._cleanupDocumentTouchmove?.();\n        this._cleanupDocumentTouchmove = this._renderer.listen(\n          this._document,\n          'touchmove',\n          this._persistentTouchmoveListener,\n          activeCapturingEventOptions,\n        );\n      });\n    }\n  }\n\n  /** Removes a drop container from the registry. */\n  removeDropContainer(drop: DropListRef) {\n    this._dropInstances.delete(drop);\n  }\n\n  /** Removes a drag item instance from the registry. */\n  removeDragItem(drag: DragRef) {\n    this._dragInstances.delete(drag);\n    this.stopDragging(drag);\n\n    if (this._dragInstances.size === 0) {\n      this._cleanupDocumentTouchmove?.();\n    }\n  }\n\n  /**\n   * Starts the dragging sequence for a drag instance.\n   * @param drag Drag instance which is being dragged.\n   * @param event Event that initiated the dragging.\n   */\n  startDragging(drag: DragRef, event: TouchEvent | MouseEvent) {\n    // Do not process the same drag twice to avoid memory leaks and redundant listeners\n    if (this._activeDragInstances().indexOf(drag) > -1) {\n      return;\n    }\n\n    this._styleLoader.load(_ResetsLoader);\n    this._activeDragInstances.update(instances => [...instances, drag]);\n\n    if (this._activeDragInstances().length === 1) {\n      // We explicitly bind __active__ listeners here, because newer browsers will default to\n      // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n      // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n      const isTouchEvent = event.type.startsWith('touch');\n      const endEventHandler = (e: Event) => this.pointerUp.next(e as TouchEvent | MouseEvent);\n\n      const toBind: [name: string, handler: (event: Event) => void, options: ListenerOptions][] = [\n        // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n        // the document. See https://github.com/angular/components/issues/17144.\n        ['scroll', (e: Event) => this._scroll.next(e), capturingEventOptions],\n\n        // Preventing the default action on `mousemove` isn't enough to disable text selection\n        // on Safari so we need to prevent the selection event as well. Alternatively this can\n        // be done by setting `user-select: none` on the `body`, however it has causes a style\n        // recalculation which can be expensive on pages with a lot of elements.\n        ['selectstart', this._preventDefaultWhileDragging, activeCapturingEventOptions],\n      ];\n\n      if (isTouchEvent) {\n        toBind.push(\n          ['touchend', endEventHandler, capturingEventOptions],\n          ['touchcancel', endEventHandler, capturingEventOptions],\n        );\n      } else {\n        toBind.push(['mouseup', endEventHandler, capturingEventOptions]);\n      }\n\n      // We don't have to bind a move event for touch drag sequences, because\n      // we already have a persistent global one bound from `registerDragItem`.\n      if (!isTouchEvent) {\n        toBind.push([\n          'mousemove',\n          (e: Event) => this.pointerMove.next(e as MouseEvent),\n          activeCapturingEventOptions,\n        ]);\n      }\n\n      this._ngZone.runOutsideAngular(() => {\n        this._globalListeners = toBind.map(([name, handler, options]) =>\n          this._renderer.listen(this._document, name, handler, options),\n        );\n      });\n    }\n  }\n\n  /** Stops dragging a drag item instance. */\n  stopDragging(drag: DragRef) {\n    this._activeDragInstances.update(instances => {\n      const index = instances.indexOf(drag);\n      if (index > -1) {\n        instances.splice(index, 1);\n        return [...instances];\n      }\n      return instances;\n    });\n\n    if (this._activeDragInstances().length === 0) {\n      this._clearGlobalListeners();\n    }\n  }\n\n  /** Gets whether a drag item instance is currently being dragged. */\n  isDragging(drag: DragRef) {\n    return this._activeDragInstances().indexOf(drag) > -1;\n  }\n\n  /**\n   * Gets a stream that will emit when any element on the page is scrolled while an item is being\n   * dragged.\n   * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n   *   Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n   *   be used to include an additional top-level listener at the shadow root level.\n   */\n  scrolled(shadowRoot?: DocumentOrShadowRoot | null): Observable<Event> {\n    const streams: Observable<Event>[] = [this._scroll];\n\n    if (shadowRoot && shadowRoot !== this._document) {\n      // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,\n      // because we want to guarantee that the event is bound outside of the `NgZone`. With\n      // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n      streams.push(\n        new Observable((observer: Observer<Event>) => {\n          return this._ngZone.runOutsideAngular(() => {\n            const cleanup = this._renderer.listen(\n              shadowRoot as ShadowRoot,\n              'scroll',\n              (event: Event) => {\n                if (this._activeDragInstances().length) {\n                  observer.next(event);\n                }\n              },\n              capturingEventOptions,\n            );\n\n            return () => {\n              cleanup();\n            };\n          });\n        }),\n      );\n    }\n\n    return merge(...streams);\n  }\n\n  /**\n   * Tracks the DOM node which has a draggable directive.\n   * @param node Node to track.\n   * @param dragRef Drag directive set on the node.\n   */\n  registerDirectiveNode(node: Node, dragRef: CdkDrag): void {\n    this._domNodesToDirectives ??= new WeakMap();\n    this._domNodesToDirectives.set(node, dragRef);\n  }\n\n  /**\n   * Stops tracking a draggable directive node.\n   * @param node Node to stop tracking.\n   */\n  removeDirectiveNode(node: Node): void {\n    this._domNodesToDirectives?.delete(node);\n  }\n\n  /**\n   * Gets the drag directive corresponding to a specific DOM node, if any.\n   * @param node Node for which to do the lookup.\n   */\n  getDragDirectiveForNode(node: Node): CdkDrag | null {\n    return this._domNodesToDirectives?.get(node) || null;\n  }\n\n  ngOnDestroy() {\n    this._dragInstances.forEach(instance => this.removeDragItem(instance));\n    this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n    this._domNodesToDirectives = null;\n    this._clearGlobalListeners();\n    this.pointerMove.complete();\n    this.pointerUp.complete();\n  }\n\n  /**\n   * Event listener that will prevent the default browser action while the user is dragging.\n   * @param event Event whose default action should be prevented.\n   */\n  private _preventDefaultWhileDragging = (event: Event) => {\n    if (this._activeDragInstances().length > 0) {\n      event.preventDefault();\n    }\n  };\n\n  /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n  private _persistentTouchmoveListener = (event: TouchEvent) => {\n    if (this._activeDragInstances().length > 0) {\n      // Note that we only want to prevent the default action after dragging has actually started.\n      // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n      // but it could be pushed back if the user has set up a drag delay or threshold.\n      if (this._activeDragInstances().some(this._draggingPredicate)) {\n        event.preventDefault();\n      }\n\n      this.pointerMove.next(event);\n    }\n  };\n\n  /** Clears out the global event listeners from the `document`. */\n  private _clearGlobalListeners() {\n    this._globalListeners?.forEach(cleanup => cleanup());\n    this._globalListeners = undefined;\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\n/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value: string): number {\n  // Some browsers will return it in seconds, whereas others will return milliseconds.\n  const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n  return parseFloat(value) * multiplier;\n}\n\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nexport function getTransformTransitionDurationInMs(element: HTMLElement): number {\n  const computedStyle = getComputedStyle(element);\n  const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n  const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n\n  // If there's no transition for `all` or `transform`, we shouldn't do anything.\n  if (!property) {\n    return 0;\n  }\n\n  // Get the index of the property that we're interested in and match\n  // it up to the same index in `transition-delay` and `transition-duration`.\n  const propertyIndex = transitionedProperties.indexOf(property);\n  const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n  const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n\n  return (\n    parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n    parseCssTimeUnitsToMs(rawDelays[propertyIndex])\n  );\n}\n\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle: CSSStyleDeclaration, name: string): string[] {\n  const value = computedStyle.getPropertyValue(name);\n  return value.split(',').map(part => part.trim());\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 {EmbeddedViewRef, Renderer2, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {\n  extendStyles,\n  getTransform,\n  matchElementSize,\n  toggleNativeDragInteractions,\n} from './dom/styling';\nimport {deepCloneNode} from './dom/clone-node';\nimport {getRootNode} from './dom/root-node';\nimport {getTransformTransitionDurationInMs} from './dom/transition-duration';\n\n/** Template that can be used to create a drag preview element. */\nexport interface DragPreviewTemplate<T = any> {\n  matchSize?: boolean;\n  template: TemplateRef<T> | null;\n  viewContainer: ViewContainerRef;\n  context: T;\n}\n\n/** Inline styles to be set as `!important` while dragging. */\nconst importantProperties = new Set([\n  // Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n  'position',\n]);\n\nexport class PreviewRef {\n  /** Reference to the view of the preview element. */\n  private _previewEmbeddedView: EmbeddedViewRef<any> | null = null;\n\n  /** Reference to the preview element. */\n  private _preview!: HTMLElement;\n\n  get element(): HTMLElement {\n    return this._preview;\n  }\n\n  constructor(\n    private _document: Document,\n    private _rootElement: HTMLElement,\n    private _direction: Direction,\n    private _initialDomRect: DOMRect,\n    private _previewTemplate: DragPreviewTemplate | null,\n    private _previewClass: string | string[] | null,\n    private _pickupPositionOnPage: {\n      x: number;\n      y: number;\n    },\n    private _initialTransform: string | null,\n    private _zIndex: number,\n    private _renderer: Renderer2,\n  ) {}\n\n  attach(parent: HTMLElement): void {\n    this._preview = this._createPreview();\n    parent.appendChild(this._preview);\n\n    // The null check is necessary for browsers that don't support the popover API.\n    // Note that we use a string access for compatibility with Closure.\n    if (supportsPopover(this._preview)) {\n      this._preview['showPopover']();\n    }\n  }\n\n  destroy(): void {\n    this._preview.remove();\n    this._previewEmbeddedView?.destroy();\n    this._preview = this._previewEmbeddedView = null!;\n  }\n\n  setTransform(value: string): void {\n    this._preview.style.transform = value;\n  }\n\n  getBoundingClientRect(): DOMRect {\n    return this._preview.getBoundingClientRect();\n  }\n\n  addClass(className: string): void {\n    this._preview.classList.add(className);\n  }\n\n  getTransitionDuration(): number {\n    return getTransformTransitionDurationInMs(this._preview);\n  }\n\n  addEventListener(name: string, handler: (event: any) => void): () => void {\n    return this._renderer.listen(this._preview, name, handler);\n  }\n\n  private _createPreview(): HTMLElement {\n    const previewConfig = this._previewTemplate;\n    const previewClass = this._previewClass;\n    const previewTemplate = previewConfig ? previewConfig.template : null;\n    let preview: HTMLElement;\n\n    if (previewTemplate && previewConfig) {\n      // Measure the element before we've inserted the preview\n      // since the insertion could throw off the measurement.\n      const rootRect = previewConfig.matchSize ? this._initialDomRect : null;\n      const viewRef = previewConfig.viewContainer.createEmbeddedView(\n        previewTemplate,\n        previewConfig.context,\n      );\n      viewRef.detectChanges();\n      preview = getRootNode(viewRef, this._document);\n      this._previewEmbeddedView = viewRef;\n      if (previewConfig.matchSize) {\n        matchElementSize(preview, rootRect!);\n      } else {\n        preview.style.transform = getTransform(\n          this._pickupPositionOnPage.x,\n          this._pickupPositionOnPage.y,\n        );\n      }\n    } else {\n      preview = deepCloneNode(this._rootElement);\n      matchElementSize(preview, this._initialDomRect!);\n\n      if (this._initialTransform) {\n        preview.style.transform = this._initialTransform;\n      }\n    }\n\n    extendStyles(\n      preview.style,\n      {\n        // It's important that we disable the pointer events on the preview, because\n        // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n        'pointer-events': 'none',\n        // If the preview has a margin, it can throw off our positioning so we reset it. The reset\n        // value for `margin-right` needs to be `auto` when opened as a popover, because our\n        // positioning is always top/left based, but native popover seems to position itself\n        // to the top/right if `<html>` or `<body>` have `dir=\"rtl\"` (see #29604). Setting it\n        // to `auto` pushed it to the top/left corner in RTL and is a noop in LTR.\n        'margin': supportsPopover(preview) ? '0 auto 0 0' : '0',\n        'position': 'fixed',\n        'top': '0',\n        'left': '0',\n        'z-index': this._zIndex + '',\n      },\n      importantProperties,\n    );\n\n    toggleNativeDragInteractions(preview, false);\n    preview.classList.add('cdk-drag-preview');\n    preview.setAttribute('popover', 'manual');\n    preview.setAttribute('dir', this._direction);\n\n    if (previewClass) {\n      if (Array.isArray(previewClass)) {\n        previewClass.forEach(className => preview.classList.add(className));\n      } else {\n        preview.classList.add(previewClass);\n      }\n    }\n\n    return preview;\n  }\n}\n\n/** Checks whether a specific element supports the popover API. */\nfunction supportsPopover(element: HTMLElement): boolean {\n  return 'showPopover' in element;\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 {isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader} from '../a11y';\nimport {Direction} from '../bidi';\nimport {coerceElement} from '../coercion';\nimport {_getEventTarget, _getShadowRoot} from '../platform';\nimport {ViewportRuler} from '../scrolling';\nimport {\n  DOCUMENT,\n  ElementRef,\n  EmbeddedViewRef,\n  Injector,\n  NgZone,\n  Renderer2,\n  RendererFactory2,\n  TemplateRef,\n  ViewContainerRef,\n  signal,\n} from '@angular/core';\nimport {Observable, Subject, Subscription} from 'rxjs';\nimport {deepCloneNode} from './dom/clone-node';\nimport {adjustDomRect, getMutableClientRect, isOverflowingParent} from './dom/dom-rect';\nimport {ParentPositionTracker} from './dom/parent-position-tracker';\nimport {getRootNode} from './dom/root-node';\nimport {\n  DragCSSStyleDeclaration,\n  combineTransforms,\n  getTransform,\n  toggleNativeDragInteractions,\n  toggleVisibility,\n} from './dom/styling';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport type {DropListRef} from './drop-list-ref';\nimport {DragPreviewTemplate, PreviewRef} from './preview-ref';\n\n/** Object that can be used to configure the behavior of DragRef. */\nexport interface DragRefConfig {\n  /**\n   * Minimum amount of pixels that the user should\n   * drag, before the CDK initiates a drag sequence.\n   */\n  dragStartThreshold: number;\n\n  /**\n   * Amount the pixels the user should drag before the CDK\n   * considers them to have changed the drag direction.\n   */\n  pointerDirectionChangeThreshold: number;\n\n  /** `z-index` for the absolutely-positioned elements that are created by the drag item. */\n  zIndex?: number;\n\n  /** Ref that the current drag item is nested in. */\n  parentDragRef?: DragRef;\n}\n\n/** Function that can be used to constrain the position of a dragged element. */\nexport type DragConstrainPosition = (\n  userPointerPosition: Point,\n  dragRef: DragRef,\n  dimensions: DOMRect,\n  pickupPositionInElement: Point,\n) => Point;\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = {passive: true};\n\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = {passive: false};\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = {\n  passive: false,\n  capture: true,\n};\n\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n\n/** Class applied to the drag placeholder. */\nconst PLACEHOLDER_CLASS = 'cdk-drag-placeholder';\n\n// TODO(crisbeto): add an API for moving a draggable up/down the\n// list programmatically. Useful for keyboard controls.\n\n/** Template that can be used to create a drag helper element (e.g. a preview or a placeholder). */\ninterface DragHelperTemplate<T = any> {\n  template: TemplateRef<T> | null;\n  viewContainer: ViewContainerRef;\n  context: T;\n}\n\n/** Point on the page or within an element. */\nexport interface Point {\n  x: number;\n  y: number;\n}\n\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = new Set([\n  // Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n  'position',\n]);\n\n/**\n * Possible places into which the preview of a drag item can be inserted.\n * - `global` - Preview will be inserted at the bottom of the `<body>`. The advantage is that\n * you don't have to worry about `overflow: hidden` or `z-index`, but the item won't retain\n * its inherited styles.\n * - `parent` - Preview will be inserted into the parent of the drag item. The advantage is that\n * inherited styles will be preserved, but it may be clipped by `overflow: hidden` or not be\n * visible due to `z-index`. Furthermore, the preview is going to have an effect over selectors\n * like `:nth-child` and some flexbox configurations.\n * - `ElementRef<HTMLElement> | HTMLElement` - Preview will be inserted into a specific element.\n * Same advantages and disadvantages as `parent`.\n */\nexport type PreviewContainer = 'global' | 'parent' | ElementRef<HTMLElement> | HTMLElement;\n\n/**\n * Creates a `DragRef` for an element, turning it into a draggable item.\n * @param injector Injector used to resolve dependencies.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\nexport function createDragRef<T = unknown>(\n  injector: Injector,\n  element: ElementRef<HTMLElement> | HTMLElement,\n  config: DragRefConfig = {\n    dragStartThreshold: 5,\n    pointerDirectionChangeThreshold: 5,\n  },\n): DragRef<T> {\n  const renderer =\n    injector.get(Renderer2, null, {optional: true}) ||\n    injector.get(RendererFactory2).createRenderer(null, null);\n\n  return new DragRef(\n    element,\n    config,\n    injector.get(DOCUMENT),\n    injector.get(NgZone),\n    injector.get(ViewportRuler),\n    injector.get(DragDropRegistry),\n    renderer,\n  );\n}\n\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nexport class DragRef<T = any> {\n  private _rootElementCleanups: (() => void)[] | undefined;\n  private _cleanupShadowRootSelectStart: (() => void) | undefined;\n\n  /** Element displayed next to the user's pointer while the element is dragged. */\n  private _preview: PreviewRef | null = null;\n\n  /** Container into which to insert the preview. */\n  private _previewContainer: PreviewContainer | undefined;\n\n  /** Reference to the view of the placeholder element. */\n  private _placeholderRef: EmbeddedViewRef<any> | null = null;\n\n  /** Element that is rendered instead of the draggable item while it is being sorted. */\n  private _placeholder!: HTMLElement;\n\n  /** Coordinates within the element at which the user picked up the element. */\n  private _pickupPositionInElement!: Point;\n\n  /** Coordinates on the page at which the user picked up the element. */\n  private _pickupPositionOnPage!: Point;\n\n  /**\n   * Marker node used to save the place in the DOM where the element was\n   * picked up so that it can be restored at the end of the drag sequence.\n   */\n  private _marker!: Comment;\n\n  /**\n   * Element indicating the position from which the item was picked up initially.\n   */\n  private _anchor: HTMLElement | null = null;\n\n  /**\n   * CSS `transform` applied to the element when it isn't being dragged. We need a\n   * passive transform in order for the dragged element to retain its new position\n   * after the user has stopped dragging and because we need to know the relative\n   * position in case they start dragging again. This corresponds to `element.style.transform`.\n   */\n  private _passiveTransform: Point = {x: 0, y: 0};\n\n  /** CSS `transform` that is applied to the element while it's being dragged. */\n  private _activeTransform: Point = {x: 0, y: 0};\n\n  /** Inline `transform` value that the element had before the first dragging sequence. */\n  private _initialTransform?: string;\n\n  /**\n   * Whether the dragging sequence has been started. Doesn't\n   * necessarily mean that the element has been moved.\n   */\n  private _hasStartedDragging = signal(false);\n\n  /** Whether the element has moved since the user started dragging it. */\n  private _hasMoved = false;\n\n  /** Drop container in which the DragRef resided when dragging began. */\n  private _initialContainer!: DropListRef;\n\n  /** Index at which the item started in its initial container. */\n  private _initialIndex!: number;\n\n  /** Cached positions of scrollable parent elements. */\n  private _parentPositions: ParentPositionTracker;\n\n  /** Emits when the item is being moved. */\n  private readonly _moveEvents = new Subject<{\n    source: DragRef;\n    pointerPosition: {x: number; y: number};\n    event: MouseEvent | TouchEvent;\n    distance: Point;\n    delta: {x: -1 | 0 | 1; y: -1 | 0 | 1};\n  }>();\n\n  /** Keeps track of the direction in which the user is dragging along each axis. */\n  private _pointerDirectionDelta!: {x: -1 | 0 | 1; y: -1 | 0 | 1};\n\n  /** Pointer position at which the last change in the delta occurred. */\n  private _pointerPositionAtLastDirectionChange!: Point;\n\n  /** Position of the pointer at the last pointer event. */\n  private _lastKnownPointerPosition!: Point;\n\n  /**\n   * Root DOM node of the drag instance. This is the element that will\n   * be moved around as the user is dragging.\n   */\n  private _rootElement!: HTMLElement;\n\n  /**\n   * Nearest ancestor SVG, relative to which coordinates are calculated if dragging SVGElement\n   */\n  private _ownerSVGElement: SVGSVGElement | null = null;\n\n  /**\n   * Inline style value of `-webkit-tap-highlight-color` at the time the\n   * dragging was started. Used to restore the value once we're done dragging.\n   */\n  private _rootElementTapHighlight!: string;\n\n  /** Subscription to pointer movement events. */\n  private _pointerMoveSubscription = Subscription.EMPTY;\n\n  /** Subscription to the event that is dispatched when the user lifts their pointer. */\n  private _pointerUpSubscription = Subscription.EMPTY;\n\n  /** Subscription to the viewport being scrolled. */\n  private _scrollSubscription = Subscription.EMPTY;\n\n  /** Subscription to the viewport being resized. */\n  private _resizeSubscription = Subscription.EMPTY;\n\n  /**\n   * Time at which the last touch event occurred. Used to avoid firing the same\n   * events multiple times on touch devices where the browser will fire a fake\n   * mouse event for each touch event, after a certain time.\n   */\n  private _lastTouchEventTime!: number;\n\n  /** Time at which the last dragging sequence was started. */\n  private _dragStartTime!: number;\n\n  /** Cached reference to the boundary element. */\n  private _boundaryElement: HTMLElement | null = null;\n\n  /** Whether the native dragging interactions have been enabled on the root element. */\n  private _nativeInteractionsEnabled = true;\n\n  /** Client rect of the root element when the dragging sequence has started. */\n  private _initialDomRect?: DOMRect;\n\n  /** Cached dimensions of the preview element. Should be read via `_getPreviewRect`. */\n  private _previewRect?: DOMRect;\n\n  /** Cached dimensions of the boundary element. */\n  private _boundaryRect?: DOMRect;\n\n  /** Element that will be used as a template to create the draggable item's preview. */\n  private _previewTemplate?: DragPreviewTemplate | null;\n\n  /** Template for placeholder element rendered to show where a draggable would be dropped. */\n  private _placeholderTemplate?: DragHelperTemplate | null;\n\n  /** Elements that can be used to drag the draggable item. */\n  private _handles: HTMLElement[] = [];\n\n  /** Registered handles that are currently disabled. */\n  private _disabledHandles = new Set<HTMLElement>();\n\n  /** Droppable container that the draggable is a part of. */\n  private _dropContainer?: DropListRef;\n\n  /** Layout direction of the item. */\n  private _direction: Direction = 'ltr';\n\n  /** Ref that the current drag item is nested in. */\n  private _parentDragRef: DragRef<unknown> | null = null;\n\n  /**\n   * Cached shadow root that the element is placed in. `null` means that the element isn't in\n   * the shadow DOM and `undefined` means that it hasn't been resolved yet. Should be read via\n   * `_getShadowRoot`, not directly.\n   */\n  private _cachedShadowRoot: ShadowRoot | null | undefined;\n\n  /** Axis along which dragging is locked. */\n  lockAxis: 'x' | 'y' | null = null;\n\n  /**\n   * Amount of milliseconds to wait after the user has put their\n   * pointer down before starting to drag the element.\n   */\n  dragStartDelay: number | {touch: number; mouse: number} = 0;\n\n  /** Class to be added to the preview element. */\n  previewClass: string | string[] | undefined;\n\n  /**\n   * If the parent of the dragged element has a `scale` transform, it can throw off the\n   * positioning when the user starts dragging. Use this input to notify the CDK of the scale.\n   */\n  scale: number = 1;\n\n  /** Whether starting to drag this element is disabled. */\n  get disabled(): boolean {\n    return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n  }\n  set disabled(value: boolean) {\n    if (value !== this._disabled) {\n      this._disabled = value;\n      this._toggleNativeDragInteractions();\n      this._handles.forEach(handle => toggleNativeDragInteractions(handle, value));\n    }\n  }\n  private _disabled = false;\n\n  /** Emits as the drag sequence is being prepared. */\n  readonly beforeStarted = new Subject<void>();\n\n  /** Emits when the user starts dragging the item. */\n  readonly started = new Subject<{source: DragRef; event: MouseEvent | TouchEvent}>();\n\n  /** Emits when the user has released a drag item, before any animations have started. */\n  readonly released = new Subject<{source: DragRef; event: MouseEvent | TouchEvent}>();\n\n  /** Emits when the user stops dragging an item in the container. */\n  readonly ended = new Subject<{\n    source: DragRef;\n    distance: Point;\n    dropPoint: Point;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /** Emits when the user has moved the item into a new container. */\n  readonly entered = new Subject<{container: DropListRef; item: DragRef; currentIndex: number}>();\n\n  /** Emits when the user removes the item its container by dragging it into another container. */\n  readonly exited = new Subject<{container: DropListRef; item: DragRef}>();\n\n  /** Emits when the user drops the item inside a container. */\n  readonly dropped = new Subject<{\n    previousIndex: number;\n    currentIndex: number;\n    item: DragRef;\n    container: DropListRef;\n    previousContainer: DropListRef;\n    distance: Point;\n    dropPoint: Point;\n    isPointerOverContainer: boolean;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /**\n   * Emits as the user is dragging the item. Use with caution,\n   * because this event will fire for every pixel that the user has dragged.\n   */\n  readonly moved: Observable<{\n    source: DragRef;\n    pointerPosition: {x: number; y: number};\n    event: MouseEvent | TouchEvent;\n    distance: Point;\n    delta: {x: -1 | 0 | 1; y: -1 | 0 | 1};\n  }> = this._moveEvents;\n\n  /** Arbitrary data that can be attached to the drag item. */\n  data!: T;\n\n  /**\n   * Function that can be used to customize the logic of how the position of the drag item\n   * is limited while it's being dragged. Gets called with a point containing the current position\n   * of the user's pointer on the page, a reference to the item being dragged and its dimensions.\n   * Should return a point describing where the item should be rendered.\n   */\n  constrainPosition?: DragConstrainPosition;\n\n  constructor(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    private _config: DragRefConfig,\n    private _document: Document,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n    private _dragDropRegistry: DragDropRegistry,\n    private _renderer: Renderer2,\n  ) {\n    this.withRootElement(element).withParent(_config.parentDragRef || null);\n    this._parentPositions = new ParentPositionTracker(_document);\n    _dragDropRegistry.registerDragItem(this);\n  }\n\n  /**\n   * Returns the element that is being used as a placeholder\n   * while the current element is being dragged.\n   */\n  getPlaceholderElement(): HTMLElement {\n    return this._placeholder;\n  }\n\n  /** Returns the root draggable element. */\n  getRootElement(): HTMLElement {\n    return this._rootElement;\n  }\n\n  /**\n   * Gets the currently-visible element that represents the drag item.\n   * While dragging this is the placeholder, otherwise it's the root element.\n   */\n  getVisibleElement(): HTMLElement {\n    return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n  }\n\n  /** Registers the handles that can be used to drag the element. */\n  withHandles(handles: (HTMLElement | ElementRef<HTMLElement>)[]): this {\n    this._handles = handles.map(handle => coerceElement(handle));\n    this._handles.forEach(handle => toggleNativeDragInteractions(handle, this.disabled));\n    this._toggleNativeDragInteractions();\n\n    // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n    // the set, rather than iterate over it and filter out the destroyed handles, because while\n    // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n    // use an array internally which may throw an error.\n    const disabledHandles = new Set<HTMLElement>();\n    this._disabledHandles.forEach(handle => {\n      if (this._handles.indexOf(handle) > -1) {\n        disabledHandles.add(handle);\n      }\n    });\n    this._disabledHandles = disabledHandles;\n    return this;\n  }\n\n  /**\n   * Registers the template that should be used for the drag preview.\n   * @param template Template that from which to stamp out the preview.\n   */\n  withPreviewTemplate(template: DragPreviewTemplate | null): this {\n    this._previewTemplate = template;\n    return this;\n  }\n\n  /**\n   * Registers the template that should be used for the drag placeholder.\n   * @param template Template that from which to stamp out the placeholder.\n   */\n  withPlaceholderTemplate(template: DragHelperTemplate | null): this {\n    this._placeholderTemplate = template;\n    return this;\n  }\n\n  /**\n   * Sets an alternate drag root element. The root element is the element that will be moved as\n   * the user is dragging. Passing an alternate root element is useful when trying to enable\n   * dragging on an element that you might not have access to.\n   */\n  withRootElement(rootElement: ElementRef<HTMLElement> | HTMLElement): this {\n    const element = coerceElement(rootElement);\n\n    if (element !== this._rootElement) {\n      this._removeRootElementListeners();\n      const renderer = this._renderer;\n      this._rootElementCleanups = this._ngZone.runOutsideAngular(() => [\n        renderer.listen(element, 'mousedown', this._pointerDown, activeEventListenerOptions),\n        renderer.listen(element, 'touchstart', this._pointerDown, passiveEventListenerOptions),\n        renderer.listen(element, 'dragstart', this._nativeDragStart, activeEventListenerOptions),\n      ]);\n      this._initialTransform = undefined;\n      this._rootElement = element;\n    }\n\n    if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n      this._ownerSVGElement = this._rootElement.ownerSVGElement;\n    }\n\n    return this;\n  }\n\n  /**\n   * Element to which the draggable's position will be constrained.\n   */\n  withBoundaryElement(boundaryElement: ElementRef<HTMLElement> | HTMLElement | null): this {\n    this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;\n    this._resizeSubscription.unsubscribe();\n    if (boundaryElement) {\n      this._resizeSubscription = this._viewportRuler\n        .change(10)\n        .subscribe(() => this._containInsideBoundaryOnResize());\n    }\n    return this;\n  }\n\n  /** Sets the parent ref that the ref is nested in.  */\n  withParent(parent: DragRef<unknown> | null): this {\n    this._parentDragRef = parent;\n    return this;\n  }\n\n  /** Removes the dragging functionality from the DOM element. */\n  dispose() {\n    this._removeRootElementListeners();\n\n    // Do this check before removing from the registry since it'll\n    // stop being considered as dragged once it is removed.\n    if (this.isDragging()) {\n      // Since we move out the element to the end of the body while it's being\n      // dragged, we have to make sure that it's removed if it gets destroyed.\n      this._rootElement?.remove();\n    }\n\n    this._marker?.remove();\n    this._destroyPreview();\n    this._destroyPlaceholder();\n    this._dragDropRegistry.removeDragItem(this);\n    this._removeListeners();\n    this.beforeStarted.complete();\n    this.started.complete();\n    this.released.complete();\n    this.ended.complete();\n    this.entered.complete();\n    this.exited.complete();\n    this.dropped.complete();\n    this._moveEvents.complete();\n    this._handles = [];\n    this._disabledHandles.clear();\n    this._dropContainer = undefined;\n    this._resizeSubscription.unsubscribe();\n    this._parentPositions.clear();\n    this._boundaryElement =\n      this._rootElement =\n      this._ownerSVGElement =\n      this._placeholderTemplate =\n      this._previewTemplate =\n      this._marker =\n      this._parentDragRef =\n        null!;\n  }\n\n  /** Checks whether the element is currently being dragged. */\n  isDragging(): boolean {\n    return this._hasStartedDragging() && this._dragDropRegistry.isDragging(this);\n  }\n\n  /** Resets a standalone drag item to its initial position. */\n  reset(): void {\n    this._rootElement.style.transform = this._initialTransform || '';\n    this._activeTransform = {x: 0, y: 0};\n    this._passiveTransform = {x: 0, y: 0};\n  }\n\n  /** Resets drag item to end of boundary element. */\n  resetToBoundary(): void {\n    if (\n      // can be null if the drag item was never dragged.\n      this._boundaryElement &&\n      this._rootElement &&\n      // check if we are overflowing off our boundary element\n      isOverflowingParent(\n        this._boundaryElement.getBoundingClientRect(),\n        this._rootElement.getBoundingClientRect(),\n      )\n    ) {\n      const parentRect = this._boundaryElement.getBoundingClientRect();\n      const childRect = this._rootElement.getBoundingClientRect();\n\n      let offsetX = 0;\n      let offsetY = 0;\n\n      // check if we are overflowing from left or right\n      if (childRect.left < parentRect.left) {\n        offsetX = parentRect.left - childRect.left;\n      } else if (childRect.right > parentRect.right) {\n        offsetX = parentRect.right - childRect.right;\n      }\n\n      // check if we are overflowing from top or bottom\n      if (childRect.top < parentRect.top) {\n        offsetY = parentRect.top - childRect.top;\n      } else if (childRect.bottom > parentRect.bottom) {\n        offsetY = parentRect.bottom - childRect.bottom;\n      }\n\n      const currentLeft = this._activeTransform.x;\n      const currentTop = this._activeTransform.y;\n\n      let x = currentLeft + offsetX,\n        y = currentTop + offsetY;\n\n      this._rootElement.style.transform = getTransform(x, y);\n      this._activeTransform = {x, y};\n      this._passiveTransform = {x, y};\n    }\n  }\n\n  /**\n   * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n   * @param handle Handle element that should be disabled.\n   */\n  disableHandle(handle: HTMLElement) {\n    if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n      this._disabledHandles.add(handle);\n      toggleNativeDragInteractions(handle, true);\n    }\n  }\n\n  /**\n   * Enables a handle, if it has been disabled.\n   * @param handle Handle element to be enabled.\n   */\n  enableHandle(handle: HTMLElement) {\n    if (this._disabledHandles.has(handle)) {\n      this._disabledHandles.delete(handle);\n      toggleNativeDragInteractions(handle, this.disabled);\n    }\n  }\n\n  /** Sets the layout direction of the draggable item. */\n  withDirection(direction: Direction): this {\n    this._direction = direction;\n    return this;\n  }\n\n  /** Sets the container that the item is part of. */\n  _withDropContainer(container: DropListRef) {\n    this._dropContainer = container;\n  }\n\n  /**\n   * Gets the current position in pixels the draggable outside of a drop container.\n   */\n  getFreeDragPosition(): Readonly<Point> {\n    const position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n    return {x: position.x, y: position.y};\n  }\n\n  /**\n   * Sets the current position in pixels the draggable outside of a drop container.\n   * @param value New position to be set.\n   */\n  setFreeDragPosition(value: Point): this {\n    this._activeTransform = {x: 0, y: 0};\n    this._passiveTransform.x = value.x;\n    this._passiveTransform.y = value.y;\n\n    if (!this._dropContainer) {\n      this._applyRootElementTransform(value.x, value.y);\n    }\n\n    return this;\n  }\n\n  /**\n   * Sets the container into which to insert the preview element.\n   * @param value Container into which to insert the preview.\n   */\n  withPreviewContainer(value: PreviewContainer): this {\n    this._previewContainer = value;\n    return this;\n  }\n\n  /** Updates the item's sort order based on the last-known pointer position. */\n  _sortFromLastPointerPosition() {\n    const position = this._lastKnownPointerPosition;\n\n    if (position && this._dropContainer) {\n      this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n    }\n  }\n\n  /** Unsubscribes from the global subscriptions. */\n  private _removeListeners() {\n    this._pointerMoveSubscription.unsubscribe();\n    this._pointerUpSubscription.unsubscribe();\n    this._scrollSubscription.unsubscribe();\n    this._cleanupShadowRootSelectStart?.();\n    this._cleanupShadowRootSelectStart = undefined;\n  }\n\n  /** Destroys the preview element and its ViewRef. */\n  private _destroyPreview() {\n    this._preview?.destroy();\n    this._preview = null;\n  }\n\n  /** Destroys the placeholder element and its ViewRef. */\n  private _destroyPlaceholder() {\n    this._anchor?.remove();\n    this._placeholder?.remove();\n    this._placeholderRef?.destroy();\n    this._placeholder = this._anchor = this._placeholderRef = null!;\n  }\n\n  /** Handler for the `mousedown`/`touchstart` events. */\n  private _pointerDown = (event: MouseEvent | TouchEvent) => {\n    this.beforeStarted.next();\n\n    // Delegate the event based on whether it started from a handle or the element itself.\n    if (this._handles.length) {\n      const targetHandle = this._getTargetHandle(event);\n\n      if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n        this._initializeDragSequence(targetHandle, event);\n      }\n    } else if (!this.disabled) {\n      this._initializeDragSequence(this._rootElement, event);\n    }\n  };\n\n  /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n  private _pointerMove = (event: MouseEvent | TouchEvent) => {\n    const pointerPosition = this._getPointerPositionOnPage(event);\n\n    if (!this._hasStartedDragging()) {\n      const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n      const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n      const isOverThreshold = distanceX + distanceY >= this._config.dragStartThreshold;\n\n      // Only start dragging after the user has moved more than the minimum distance in either\n      // direction. Note that this is preferable over doing something like `skip(minimumDistance)`\n      // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n      // per pixel of movement (e.g. if the user moves their pointer quickly).\n      if (isOverThreshold) {\n        const isDelayElapsed = Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n        const container = this._dropContainer;\n\n        if (!isDelayElapsed) {\n          this._endDragSequence(event);\n          return;\n        }\n\n        // Prevent other drag sequences from starting while something in the container is still\n        // being dragged. This can happen while we're waiting for the drop animation to finish\n        // and can cause errors, because some elements might still be moving around.\n        if (!container || (!container.isDragging() && !container.isReceiving())) {\n          // Prevent the default action as soon as the dragging sequence is considered as\n          // \"started\" since waiting for the next event can allow the device to begin scrolling.\n          if (event.cancelable) {\n            event.preventDefault();\n          }\n          this._hasStartedDragging.set(true);\n          this._ngZone.run(() => this._startDragSequence(event));\n        }\n      }\n\n      return;\n    }\n\n    // We prevent the default action down here so that we know that dragging has started. This is\n    // important for touch devices where doing this too early can unnecessarily block scrolling,\n    // if there's a dragging delay.\n    if (event.cancelable) {\n      event.preventDefault();\n    }\n\n    const constrainedPointerPosition = this._getConstrainedPointerPosition(pointerPosition);\n    this._hasMoved = true;\n    this._lastKnownPointerPosition = pointerPosition;\n    this._updatePointerDirectionDelta(constrainedPointerPosition);\n\n    if (this._dropContainer) {\n      this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n    } else {\n      // If there's a position constraint function, we want the element's top/left to be at the\n      // specific position on the page. Use the initial position as a reference if that's the case.\n      const offset = this.constrainPosition ? this._initialDomRect! : this._pickupPositionOnPage;\n      const activeTransform = this._activeTransform;\n      activeTransform.x = constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n      activeTransform.y = constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n      this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n    }\n\n    // Since this event gets fired for every pixel while dragging, we only\n    // want to fire it if the consumer opted into it. Also we have to\n    // re-enter the zone because we run all of the events on the outside.\n    if (this._moveEvents.observers.length) {\n      this._ngZone.run(() => {\n        this._moveEvents.next({\n          source: this,\n          pointerPosition: constrainedPointerPosition,\n          event,\n          distance: this._getDragDistance(constrainedPointerPosition),\n          delta: this._pointerDirectionDelta,\n        });\n      });\n    }\n  };\n\n  /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n  private _pointerUp = (event: MouseEvent | TouchEvent) => {\n    this._endDragSequence(event);\n  };\n\n  /**\n   * Clears subscriptions and stops the dragging sequence.\n   * @param event Browser event object that ended the sequence.\n   */\n  private _endDragSequence(event: MouseEvent | TouchEvent) {\n    // Note that here we use `isDragging` from the service, rather than from `this`.\n    // The difference is that the one from the service reflects whether a dragging sequence\n    // has been initiated, whereas the one on `this` includes whether the user has passed\n    // the minimum dragging threshold.\n    if (!this._dragDropRegistry.isDragging(this)) {\n      return;\n    }\n\n    this._removeListeners();\n    this._dragDropRegistry.stopDragging(this);\n    this._toggleNativeDragInteractions();\n\n    if (this._handles) {\n      (this._rootElement.style as DragCSSStyleDeclaration).webkitTapHighlightColor =\n        this._rootElementTapHighlight;\n    }\n\n    if (!this._hasStartedDragging()) {\n      return;\n    }\n\n    this.released.next({source: this, event});\n\n    if (this._dropContainer) {\n      // Stop scrolling immediately, instead of waiting for the animation to finish.\n      this._dropContainer._stopScrolling();\n      this._animatePreviewToPlaceholder().then(() => {\n        this._cleanupDragArtifacts(event);\n        this._cleanupCachedDimensions();\n        this._dragDropRegistry.stopDragging(this);\n      });\n    } else {\n      // Convert the active transform into a passive one. This means that next time\n      // the user starts dragging the item, its position will be calculated relatively\n      // to the new passive transform.\n      this._passiveTransform.x = this._activeTransform.x;\n      const pointerPosition = this._getPointerPositionOnPage(event);\n      this._passiveTransform.y = this._activeTransform.y;\n      this._ngZone.run(() => {\n        this.ended.next({\n          source: this,\n          distance: this._getDragDistance(pointerPosition),\n          dropPoint: pointerPosition,\n          event,\n        });\n      });\n      this._cleanupCachedDimensions();\n      this._dragDropRegistry.stopDragging(this);\n    }\n  }\n\n  /** Starts the dragging sequence. */\n  private _startDragSequence(event: MouseEvent | TouchEvent) {\n    if (isTouchEvent(event)) {\n      this._lastTouchEventTime = Date.now();\n    }\n\n    this._toggleNativeDragInteractions();\n\n    // Needs to happen before the root element is moved.\n    const shadowRoot = this._getShadowRoot();\n    const dropContainer = this._dropContainer;\n\n    if (shadowRoot) {\n      // In some browsers the global `selectstart` that we maintain in the `DragDropRegistry`\n      // doesn't cross the shadow boundary so we have to prevent it at the shadow root (see #28792).\n      this._ngZone.runOutsideAngular(() => {\n        this._cleanupShadowRootSelectStart = this._renderer.listen(\n          shadowRoot,\n          'selectstart',\n          shadowDomSelectStart,\n          activeCapturingEventOptions,\n        );\n      });\n    }\n\n    if (dropContainer) {\n      const element = this._rootElement;\n      const parent = element.parentNode as HTMLElement;\n      const placeholder = (this._placeholder = this._createPlaceholderElement());\n      const marker = (this._marker =\n        this._marker ||\n        this._document.createComment(\n          typeof ngDevMode === 'undefined' || ngDevMode ? 'cdk-drag-marker' : '',\n        ));\n\n      // Insert a marker node so that we can restore the element's position in the DOM.\n      parent.insertBefore(marker, element);\n\n      // There's no risk of transforms stacking when inside a drop container so\n      // we can keep the initial transform up to date any time dragging starts.\n      this._initialTransform = element.style.transform || '';\n\n      // Create the preview after the initial transform has\n      // been cached, because it can be affected by the transform.\n      this._preview = new PreviewRef(\n        this._document,\n        this._rootElement,\n        this._direction,\n        this._initialDomRect!,\n        this._previewTemplate || null,\n        this.previewClass || null,\n        this._pickupPositionOnPage,\n        this._initialTransform,\n        this._config.zIndex || 1000,\n        this._renderer,\n      );\n      this._preview.attach(this._getPreviewInsertionPoint(parent, shadowRoot));\n\n      // We move the element out at the end of the body and we make it hidden, because keeping it in\n      // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n      // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n      toggleVisibility(element, false, dragImportantProperties);\n      this._document.body.appendChild(parent.replaceChild(placeholder, element));\n      this.started.next({source: this, event}); // Emit before notifying the container.\n      dropContainer.start();\n      this._initialContainer = dropContainer;\n      this._initialIndex = dropContainer.getItemIndex(this);\n    } else {\n      this.started.next({source: this, event});\n      this._initialContainer = this._initialIndex = undefined!;\n    }\n\n    // Important to run after we've called `start` on the parent container\n    // so that it has had time to resolve its scrollable parents.\n    this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n  }\n\n  /**\n   * Sets up the different variables and subscriptions\n   * that will be necessary for the dragging sequence.\n   * @param referenceElement Element that started the drag sequence.\n   * @param event Browser event object that started the sequence.\n   */\n  private _initializeDragSequence(referenceElement: HTMLElement, event: MouseEvent | TouchEvent) {\n    // Stop propagation if the item is inside another\n    // draggable so we don't start multiple drag sequences.\n    if (this._parentDragRef) {\n      event.stopPropagation();\n    }\n\n    const isDragging = this.isDragging();\n    const isTouchSequence = isTouchEvent(event);\n    const isAuxiliaryMouseButton = !isTouchSequence && (event as MouseEvent).button !== 0;\n    const rootElement = this._rootElement;\n    const target = _getEventTarget(event);\n    const isSyntheticEvent =\n      !isTouchSequence &&\n      this._lastTouchEventTime &&\n      this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n    const isFakeEvent = isTouchSequence\n      ? isFakeTouchstartFromScreenReader(event as TouchEvent)\n      : isFakeMousedownFromScreenReader(event as MouseEvent);\n\n    // If the event started from an element with the native HTML drag&drop, it'll interfere\n    // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n    // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n    // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n    // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n    // events from firing on touch devices.\n    if (target && (target as HTMLElement).draggable && event.type === 'mousedown') {\n      event.preventDefault();\n    }\n\n    // Abort if the user is already dragging or is using a mouse button other than the primary one.\n    if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {\n      return;\n    }\n\n    // If we've got handles, we need to disable the tap highlight on the entire root element,\n    // otherwise iOS will still add it, even though all the drag interactions on the handle\n    // are disabled.\n    if (this._handles.length) {\n      const rootStyles = rootElement.style as DragCSSStyleDeclaration;\n      this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n      rootStyles.webkitTapHighlightColor = 'transparent';\n    }\n\n    this._hasMoved = false;\n    this._hasStartedDragging.set(this._hasMoved);\n\n    // Avoid multiple subscriptions and memory leaks when multi touch\n    // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n    this._removeListeners();\n    this._initialDomRect = this._rootElement.getBoundingClientRect();\n    this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n    this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n    this._scrollSubscription = this._dragDropRegistry\n      .scrolled(this._getShadowRoot())\n      .subscribe(scrollEvent => this._updateOnScroll(scrollEvent));\n\n    if (this._boundaryElement) {\n      this._boundaryRect = getMutableClientRect(this._boundaryElement);\n    }\n\n    // If we have a custom preview we can't know ahead of time how large it'll be so we position\n    // it next to the cursor. The exception is when the consumer has opted into making the preview\n    // the same size as the root element, in which case we do know the size.\n    const previewTemplate = this._previewTemplate;\n    this._pickupPositionInElement =\n      previewTemplate && previewTemplate.template && !previewTemplate.matchSize\n        ? {x: 0, y: 0}\n        : this._getPointerPositionInElement(this._initialDomRect, referenceElement, event);\n    const pointerPosition =\n      (this._pickupPositionOnPage =\n      this._lastKnownPointerPosition =\n        this._getPointerPositionOnPage(event));\n    this._pointerDirectionDelta = {x: 0, y: 0};\n    this._pointerPositionAtLastDirectionChange = {x: pointerPosition.x, y: pointerPosition.y};\n    this._dragStartTime = Date.now();\n    this._dragDropRegistry.startDragging(this, event);\n  }\n\n  /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n  private _cleanupDragArtifacts(event: MouseEvent | TouchEvent) {\n    // Restore the element's visibility and insert it at its old position in the DOM.\n    // It's important that we maintain the position, because moving the element around in the DOM\n    // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n    // while moving the existing elements in all other cases.\n    toggleVisibility(this._rootElement, true, dragImportantProperties);\n    this._marker.parentNode!.replaceChild(this._rootElement, this._marker);\n\n    this._destroyPreview();\n    this._destroyPlaceholder();\n    this._initialDomRect =\n      this._boundaryRect =\n      this._previewRect =\n      this._initialTransform =\n        undefined;\n\n    // Re-enter the NgZone since we bound `document` events on the outside.\n    this._ngZone.run(() => {\n      const container = this._dropContainer!;\n      const currentIndex = container.getItemIndex(this);\n      const pointerPosition = this._getPointerPositionOnPage(event);\n      const distance = this._getDragDistance(pointerPosition);\n      const isPointerOverContainer = container._isOverContainer(\n        pointerPosition.x,\n        pointerPosition.y,\n      );\n\n      this.ended.next({source: this, distance, dropPoint: pointerPosition, event});\n      this.dropped.next({\n        item: this,\n        currentIndex,\n        previousIndex: this._initialIndex,\n        container: container,\n        previousContainer: this._initialContainer,\n        isPointerOverContainer,\n        distance,\n        dropPoint: pointerPosition,\n        event,\n      });\n      container.drop(\n        this,\n        currentIndex,\n        this._initialIndex,\n        this._initialContainer,\n        isPointerOverContainer,\n        distance,\n        pointerPosition,\n        event,\n      );\n      this._dropContainer = this._initialContainer;\n    });\n  }\n\n  /**\n   * Updates the item's position in its drop container, or moves it\n   * into a new one, depending on its current drag position.\n   */\n  private _updateActiveDropContainer({x, y}: Point, {x: rawX, y: rawY}: Point) {\n    // Drop container that draggable has been moved into.\n    let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n\n    // If we couldn't find a new container to move the item into, and the item has left its\n    // initial container, check whether the it's over the initial container. This handles the\n    // case where two containers are connected one way and the user tries to undo dragging an\n    // item into a new container.\n    if (\n      !newContainer &&\n      this._dropContainer !== this._initialContainer &&\n      this._initialContainer._isOverContainer(x, y)\n    ) {\n      newContainer = this._initialContainer;\n    }\n\n    if (newContainer && newContainer !== this._dropContainer) {\n      this._ngZone.run(() => {\n        const exitIndex = this._dropContainer!.getItemIndex(this);\n        const nextItemElement =\n          this._dropContainer!.getItemAtIndex(exitIndex + 1)?.getVisibleElement() || null;\n\n        // Notify the old container that the item has left.\n        this.exited.next({item: this, container: this._dropContainer!});\n        this._dropContainer!.exit(this);\n        this._conditionallyInsertAnchor(newContainer, this._dropContainer!, nextItemElement);\n        // Notify the new container that the item has entered.\n        this._dropContainer = newContainer!;\n        this._dropContainer.enter(\n          this,\n          x,\n          y,\n          // If we're re-entering the initial container and sorting is disabled,\n          // put item the into its starting index to begin with.\n          newContainer === this._initialContainer && newContainer.sortingDisabled\n            ? this._initialIndex\n            : undefined,\n        );\n        this.entered.next({\n          item: this,\n          container: newContainer!,\n          currentIndex: newContainer!.getItemIndex(this),\n        });\n      });\n    }\n\n    // Dragging may have been interrupted as a result of the events above.\n    if (this.isDragging()) {\n      this._dropContainer!._startScrollingIfNecessary(rawX, rawY);\n      this._dropContainer!._sortItem(this, x, y, this._pointerDirectionDelta);\n\n      if (this.constrainPosition) {\n        this._applyPreviewTransform(x, y);\n      } else {\n        this._applyPreviewTransform(\n          x - this._pickupPositionInElement.x,\n          y - this._pickupPositionInElement.y,\n        );\n      }\n    }\n  }\n\n  /**\n   * Animates the preview element from its current position to the location of the drop placeholder.\n   * @returns Promise that resolves when the animation completes.\n   */\n  private _animatePreviewToPlaceholder(): Promise<void> {\n    // If the user hasn't moved yet, the transitionend event won't fire.\n    if (!this._hasMoved) {\n      return Promise.resolve();\n    }\n\n    const placeholderRect = this._placeholder.getBoundingClientRect();\n\n    // Apply the class that adds a transition to the preview.\n    this._preview!.addClass('cdk-drag-animating');\n\n    // Move the preview to the placeholder position.\n    this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n\n    // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n    // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n    // apply its style, we take advantage of the available info to figure out whether we need to\n    // bind the event in the first place.\n    const duration = this._preview!.getTransitionDuration();\n\n    if (duration === 0) {\n      return Promise.resolve();\n    }\n\n    return this._ngZone.runOutsideAngular(() => {\n      return new Promise(resolve => {\n        const handler = (event: TransitionEvent) => {\n          if (\n            !event ||\n            (this._preview &&\n              _getEventTarget(event) === this._preview.element &&\n              event.propertyName === 'transform')\n          ) {\n            cleanupListener();\n            resolve();\n            clearTimeout(timeout);\n          }\n        };\n\n        // If a transition is short enough, the browser might not fire the `transitionend` event.\n        // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n        // fire if the transition hasn't completed when it was supposed to.\n        const timeout = setTimeout(handler as Function, duration * 1.5);\n        const cleanupListener = this._preview!.addEventListener('transitionend', handler);\n      });\n    });\n  }\n\n  /** Creates an element that will be shown instead of the current element while dragging. */\n  private _createPlaceholderElement(): HTMLElement {\n    const placeholderConfig = this._placeholderTemplate;\n    const placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n    let placeholder: HTMLElement;\n\n    if (placeholderTemplate) {\n      this._placeholderRef = placeholderConfig!.viewContainer.createEmbeddedView(\n        placeholderTemplate,\n        placeholderConfig!.context,\n      );\n      this._placeholderRef.detectChanges();\n      placeholder = getRootNode(this._placeholderRef, this._document);\n    } else {\n      placeholder = deepCloneNode(this._rootElement);\n    }\n\n    // Stop pointer events on the preview so the user can't\n    // interact with it while the preview is animating.\n    placeholder.style.pointerEvents = 'none';\n    placeholder.classList.add(PLACEHOLDER_CLASS);\n    return placeholder;\n  }\n\n  /**\n   * Figures out the coordinates at which an element was picked up.\n   * @param referenceElement Element that initiated the dragging.\n   * @param event Event that initiated the dragging.\n   */\n  private _getPointerPositionInElement(\n    elementRect: DOMRect,\n    referenceElement: HTMLElement,\n    event: MouseEvent | TouchEvent,\n  ): Point {\n    const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n    const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n    const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n    const scrollPosition = this._getViewportScrollPosition();\n    const x = point.pageX - referenceRect.left - scrollPosition.left;\n    const y = point.pageY - referenceRect.top - scrollPosition.top;\n\n    return {\n      x: referenceRect.left - elementRect.left + x,\n      y: referenceRect.top - elementRect.top + y,\n    };\n  }\n\n  /** Determines the point of the page that was touched by the user. */\n  private _getPointerPositionOnPage(event: MouseEvent | TouchEvent): Point {\n    const scrollPosition = this._getViewportScrollPosition();\n    const point = isTouchEvent(event)\n      ? // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n        // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n        // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n        // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n        // throwing an error. The value returned here will be incorrect, but since this only\n        // breaks inside a developer tool and the value is only used for secondary information,\n        // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n        event.touches[0] || event.changedTouches[0] || {pageX: 0, pageY: 0}\n      : event;\n\n    const x = point.pageX - scrollPosition.left;\n    const y = point.pageY - scrollPosition.top;\n\n    // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n    // coordinate system\n    if (this._ownerSVGElement) {\n      const svgMatrix = this._ownerSVGElement.getScreenCTM();\n      if (svgMatrix) {\n        const svgPoint = this._ownerSVGElement.createSVGPoint();\n        svgPoint.x = x;\n        svgPoint.y = y;\n        return svgPoint.matrixTransform(svgMatrix.inverse());\n      }\n    }\n\n    return {x, y};\n  }\n\n  /** Gets the pointer position on the page, accounting for any position constraints. */\n  private _getConstrainedPointerPosition(point: Point): Point {\n    const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n    let {x, y} = this.constrainPosition\n      ? this.constrainPosition(point, this, this._initialDomRect!, this._pickupPositionInElement)\n      : point;\n\n    if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n      y =\n        this._pickupPositionOnPage.y -\n        (this.constrainPosition ? this._pickupPositionInElement.y : 0);\n    } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n      x =\n        this._pickupPositionOnPage.x -\n        (this.constrainPosition ? this._pickupPositionInElement.x : 0);\n    }\n\n    if (this._boundaryRect) {\n      // If not using a custom constrain we need to account for the pickup position in the element\n      // otherwise we do not need to do this, as it has already been accounted for\n      const {x: pickupX, y: pickupY} = !this.constrainPosition\n        ? this._pickupPositionInElement\n        : {x: 0, y: 0};\n\n      const boundaryRect = this._boundaryRect;\n      const {width: previewWidth, height: previewHeight} = this._getPreviewRect();\n      const minY = boundaryRect.top + pickupY;\n      const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n      const minX = boundaryRect.left + pickupX;\n      const maxX = boundaryRect.right - (previewWidth - pickupX);\n\n      x = clamp(x, minX, maxX);\n      y = clamp(y, minY, maxY);\n    }\n\n    return {x, y};\n  }\n\n  /** Updates the current drag delta, based on the user's current pointer position on the page. */\n  private _updatePointerDirectionDelta(pointerPositionOnPage: Point) {\n    const {x, y} = pointerPositionOnPage;\n    const delta = this._pointerDirectionDelta;\n    const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n\n    // Amount of pixels the user has dragged since the last time the direction changed.\n    const changeX = Math.abs(x - positionSinceLastChange.x);\n    const changeY = Math.abs(y - positionSinceLastChange.y);\n\n    // Because we handle pointer events on a per-pixel basis, we don't want the delta\n    // to change for every pixel, otherwise anything that depends on it can look erratic.\n    // To make the delta more consistent, we track how much the user has moved since the last\n    // delta change and we only update it after it has reached a certain threshold.\n    if (changeX > this._config.pointerDirectionChangeThreshold) {\n      delta.x = x > positionSinceLastChange.x ? 1 : -1;\n      positionSinceLastChange.x = x;\n    }\n\n    if (changeY > this._config.pointerDirectionChangeThreshold) {\n      delta.y = y > positionSinceLastChange.y ? 1 : -1;\n      positionSinceLastChange.y = y;\n    }\n\n    return delta;\n  }\n\n  /** Toggles the native drag interactions, based on how many handles are registered. */\n  private _toggleNativeDragInteractions() {\n    if (!this._rootElement || !this._handles) {\n      return;\n    }\n\n    const shouldEnable = this._handles.length > 0 || !this.isDragging();\n\n    if (shouldEnable !== this._nativeInteractionsEnabled) {\n      this._nativeInteractionsEnabled = shouldEnable;\n      toggleNativeDragInteractions(this._rootElement, shouldEnable);\n    }\n  }\n\n  /** Removes the manually-added event listeners from the root element. */\n  private _removeRootElementListeners() {\n    this._rootElementCleanups?.forEach(cleanup => cleanup());\n    this._rootElementCleanups = undefined;\n  }\n\n  /**\n   * Applies a `transform` to the root element, taking into account any existing transforms on it.\n   * @param x New transform value along the X axis.\n   * @param y New transform value along the Y axis.\n   */\n  private _applyRootElementTransform(x: number, y: number) {\n    const scale = 1 / this.scale;\n    const transform = getTransform(x * scale, y * scale);\n    const styles = this._rootElement.style;\n\n    // Cache the previous transform amount only after the first drag sequence, because\n    // we don't want our own transforms to stack on top of each other.\n    // Should be excluded none because none + translate3d(x, y, x) is invalid css\n    if (this._initialTransform == null) {\n      this._initialTransform =\n        styles.transform && styles.transform != 'none' ? styles.transform : '';\n    }\n\n    // Preserve the previous `transform` value, if there was one. Note that we apply our own\n    // transform before the user's, because things like rotation can affect which direction\n    // the element will be translated towards.\n    styles.transform = combineTransforms(transform, this._initialTransform);\n  }\n\n  /**\n   * Applies a `transform` to the preview, taking into account any existing transforms on it.\n   * @param x New transform value along the X axis.\n   * @param y New transform value along the Y axis.\n   */\n  private _applyPreviewTransform(x: number, y: number) {\n    // Only apply the initial transform if the preview is a clone of the original element, otherwise\n    // it could be completely different and the transform might not make sense anymore.\n    const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;\n    const transform = getTransform(x, y);\n    this._preview!.setTransform(combineTransforms(transform, initialTransform));\n  }\n\n  /**\n   * Gets the distance that the user has dragged during the current drag sequence.\n   * @param currentPosition Current position of the user's pointer.\n   */\n  private _getDragDistance(currentPosition: Point): Point {\n    const pickupPosition = this._pickupPositionOnPage;\n\n    if (pickupPosition) {\n      return {x: currentPosition.x - pickupPosition.x, y: currentPosition.y - pickupPosition.y};\n    }\n\n    return {x: 0, y: 0};\n  }\n\n  /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n  private _cleanupCachedDimensions() {\n    this._boundaryRect = this._previewRect = undefined;\n    this._parentPositions.clear();\n  }\n\n  /**\n   * Checks whether the element is still inside its boundary after the viewport has been resized.\n   * If not, the position is adjusted so that the element fits again.\n   */\n  private _containInsideBoundaryOnResize() {\n    let {x, y} = this._passiveTransform;\n\n    if ((x === 0 && y === 0) || this.isDragging() || !this._boundaryElement) {\n      return;\n    }\n\n    // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n    const elementRect = this._rootElement.getBoundingClientRect();\n    const boundaryRect = this._boundaryElement.getBoundingClientRect();\n\n    // It's possible that the element got hidden away after dragging (e.g. by switching to a\n    // different tab). Don't do anything in this case so we don't clear the user's position.\n    if (\n      (boundaryRect.width === 0 && boundaryRect.height === 0) ||\n      (elementRect.width === 0 && elementRect.height === 0)\n    ) {\n      return;\n    }\n\n    const leftOverflow = boundaryRect.left - elementRect.left;\n    const rightOverflow = elementRect.right - boundaryRect.right;\n    const topOverflow = boundaryRect.top - elementRect.top;\n    const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n\n    // If the element has become wider than the boundary, we can't\n    // do much to make it fit so we just anchor it to the left.\n    if (boundaryRect.width > elementRect.width) {\n      if (leftOverflow > 0) {\n        x += leftOverflow;\n      }\n\n      if (rightOverflow > 0) {\n        x -= rightOverflow;\n      }\n    } else {\n      x = 0;\n    }\n\n    // If the element has become taller than the boundary, we can't\n    // do much to make it fit so we just anchor it to the top.\n    if (boundaryRect.height > elementRect.height) {\n      if (topOverflow > 0) {\n        y += topOverflow;\n      }\n\n      if (bottomOverflow > 0) {\n        y -= bottomOverflow;\n      }\n    } else {\n      y = 0;\n    }\n\n    if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n      this.setFreeDragPosition({y, x});\n    }\n  }\n\n  /** Gets the drag start delay, based on the event type. */\n  private _getDragStartDelay(event: MouseEvent | TouchEvent): number {\n    const value = this.dragStartDelay;\n\n    if (typeof value === 'number') {\n      return value;\n    } else if (isTouchEvent(event)) {\n      return value.touch;\n    }\n\n    return value ? value.mouse : 0;\n  }\n\n  /** Updates the internal state of the draggable element when scrolling has occurred. */\n  private _updateOnScroll(event: Event) {\n    const scrollDifference = this._parentPositions.handleScroll(event);\n\n    if (scrollDifference) {\n      const target = _getEventTarget<HTMLElement | Document>(event)!;\n\n      // DOMRect dimensions are based on the scroll position of the page and its parent\n      // node so we have to update the cached boundary DOMRect if the user has scrolled.\n      if (\n        this._boundaryRect &&\n        target !== this._boundaryElement &&\n        target.contains(this._boundaryElement)\n      ) {\n        adjustDomRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n      }\n\n      this._pickupPositionOnPage.x += scrollDifference.left;\n      this._pickupPositionOnPage.y += scrollDifference.top;\n\n      // If we're in free drag mode, we have to update the active transform, because\n      // it isn't relative to the viewport like the preview inside a drop list.\n      if (!this._dropContainer) {\n        this._activeTransform.x -= scrollDifference.left;\n        this._activeTransform.y -= scrollDifference.top;\n        this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n      }\n    }\n  }\n\n  /** Gets the scroll position of the viewport. */\n  private _getViewportScrollPosition() {\n    return (\n      this._parentPositions.positions.get(this._document)?.scrollPosition ||\n      this._parentPositions.getViewportScrollPosition()\n    );\n  }\n\n  /**\n   * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n   * than saving it in property directly on init, because we want to resolve it as late as possible\n   * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n   * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n   */\n  private _getShadowRoot(): ShadowRoot | null {\n    if (this._cachedShadowRoot === undefined) {\n      this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n    }\n\n    return this._cachedShadowRoot;\n  }\n\n  /** Gets the element into which the drag preview should be inserted. */\n  private _getPreviewInsertionPoint(\n    initialParent: HTMLElement,\n    shadowRoot: ShadowRoot | null,\n  ): HTMLElement {\n    const previewContainer = this._previewContainer || 'global';\n\n    if (previewContainer === 'parent') {\n      return initialParent;\n    }\n\n    if (previewContainer === 'global') {\n      const documentRef = this._document;\n\n      // We can't use the body if the user is in fullscreen mode,\n      // because the preview will render under the fullscreen element.\n      // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n      return (\n        shadowRoot ||\n        documentRef.fullscreenElement ||\n        (documentRef as any).webkitFullscreenElement ||\n        (documentRef as any).mozFullScreenElement ||\n        (documentRef as any).msFullscreenElement ||\n        documentRef.body\n      );\n    }\n\n    return coerceElement(previewContainer);\n  }\n\n  /** Lazily resolves and returns the dimensions of the preview. */\n  private _getPreviewRect(): DOMRect {\n    // Cache the preview element rect if we haven't cached it already or if\n    // we cached it too early before the element dimensions were computed.\n    if (!this._previewRect || (!this._previewRect.width && !this._previewRect.height)) {\n      this._previewRect = this._preview\n        ? this._preview!.getBoundingClientRect()\n        : this._initialDomRect!;\n    }\n\n    return this._previewRect;\n  }\n\n  /** Handles a native `dragstart` event. */\n  private _nativeDragStart = (event: DragEvent) => {\n    if (this._handles.length) {\n      const targetHandle = this._getTargetHandle(event);\n\n      if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n        event.preventDefault();\n      }\n    } else if (!this.disabled) {\n      // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n      // but some cases like dragging of links can slip through (see #24403).\n      event.preventDefault();\n    }\n  };\n\n  /** Gets a handle that is the target of an event. */\n  private _getTargetHandle(event: Event): HTMLElement | undefined {\n    return this._handles.find(handle => {\n      return event.target && (event.target === handle || handle.contains(event.target as Node));\n    });\n  }\n\n  /** Inserts the anchor element, if it's valid. */\n  private _conditionallyInsertAnchor(\n    newContainer: DropListRef,\n    exitContainer: DropListRef,\n    nextItemElement: HTMLElement | null,\n  ) {\n    // Remove the anchor when returning to the initial container.\n    if (newContainer === this._initialContainer) {\n      this._anchor?.remove();\n      this._anchor = null;\n    } else if (exitContainer === this._initialContainer && exitContainer.hasAnchor) {\n      // Insert the anchor when leaving the initial container.\n      const anchor = (this._anchor ??= deepCloneNode(this._placeholder));\n      anchor.classList.remove(PLACEHOLDER_CLASS);\n      anchor.classList.add('cdk-drag-anchor');\n\n      // Clear the transform since the single-axis strategy uses transforms to sort the items.\n      anchor.style.transform = '';\n\n      // When the item leaves the initial container, the container's DOM will be restored to\n      // its original state, except for the dragged item which is removed. Insert the anchor in\n      // the position from which the item left so that the list looks consistent.\n      if (nextItemElement) {\n        nextItemElement.before(anchor);\n      } else {\n        coerceElement(exitContainer.element).appendChild(anchor);\n      }\n    }\n  }\n}\n\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp(value: number, min: number, max: number) {\n  return Math.max(min, Math.min(max, value));\n}\n\n/** Determines 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/** Callback invoked for `selectstart` events inside the shadow DOM. */\nfunction shadowDomSelectStart(event: Event) {\n  event.preventDefault();\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\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nexport function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void {\n  const from = clamp(fromIndex, array.length - 1);\n  const to = clamp(toIndex, array.length - 1);\n\n  if (from === to) {\n    return;\n  }\n\n  const target = array[from];\n  const delta = to < from ? -1 : 1;\n\n  for (let i = from; i !== to; i += delta) {\n    array[i] = array[i + delta];\n  }\n\n  array[to] = target;\n}\n\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nexport function transferArrayItem<T = any>(\n  currentArray: T[],\n  targetArray: T[],\n  currentIndex: number,\n  targetIndex: number,\n): void {\n  const from = clamp(currentIndex, currentArray.length - 1);\n  const to = clamp(targetIndex, targetArray.length);\n\n  if (currentArray.length) {\n    targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n  }\n}\n\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nexport function copyArrayItem<T = any>(\n  currentArray: T[],\n  targetArray: T[],\n  currentIndex: number,\n  targetIndex: number,\n): void {\n  const to = clamp(targetIndex, targetArray.length);\n\n  if (currentArray.length) {\n    targetArray.splice(to, 0, currentArray[currentIndex]);\n  }\n}\n\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value: number, max: number): number {\n  return Math.max(0, Math.min(max, value));\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 {Direction} from '../../bidi';\nimport {DragDropRegistry} from '../drag-drop-registry';\nimport {moveItemInArray} from '../drag-utils';\nimport {combineTransforms} from '../dom/styling';\nimport {adjustDomRect, getMutableClientRect, isInsideClientRect} from '../dom/dom-rect';\nimport {DropListSortStrategy, SortPredicate} from './drop-list-sort-strategy';\nimport type {DragRef} from '../drag-ref';\n\n/**\n * Entry in the position cache for draggable items.\n * @docs-private\n */\ninterface CachedItemPosition<T> {\n  /** Instance of the drag item. */\n  drag: T;\n  /** Dimensions of the item. */\n  clientRect: DOMRect;\n  /** Amount by which the item has been moved since dragging started. */\n  offset: number;\n  /** Inline transform that the drag item had when dragging started. */\n  initialTransform: string;\n}\n\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nexport class SingleAxisSortStrategy implements DropListSortStrategy {\n  /** Root element container of the drop list. */\n  private _element!: HTMLElement;\n\n  /** Function used to determine if an item can be sorted into a specific index. */\n  private _sortPredicate!: SortPredicate<DragRef>;\n\n  /** Cache of the dimensions of all the items inside the container. */\n  private _itemPositions: CachedItemPosition<DragRef>[] = [];\n\n  /**\n   * Draggable items that are currently active inside the container. Includes the items\n   * that were there at the start of the sequence, as well as any items that have been dragged\n   * in, but haven't been dropped yet.\n   */\n  private _activeDraggables!: DragRef[];\n\n  /** Direction in which the list is oriented. */\n  orientation: 'vertical' | 'horizontal' = 'vertical';\n\n  /** Layout direction of the drop list. */\n  direction: Direction = 'ltr';\n\n  constructor(private _dragDropRegistry: DragDropRegistry) {}\n\n  /**\n   * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n   * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n   * overlap with the swapped item after the swapping occurred.\n   */\n  private _previousSwap = {\n    drag: null as DragRef | null,\n    delta: 0,\n    overlaps: false,\n  };\n\n  /**\n   * To be called when the drag sequence starts.\n   * @param items Items that are currently in the list.\n   */\n  start(items: readonly DragRef[]) {\n    this.withItems(items);\n  }\n\n  /**\n   * To be called when an item is being sorted.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  sort(item: DragRef, pointerX: number, pointerY: number, pointerDelta: {x: number; y: number}) {\n    const siblings = this._itemPositions;\n    const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n\n    if (newIndex === -1 && siblings.length > 0) {\n      return null;\n    }\n\n    const isHorizontal = this.orientation === 'horizontal';\n    const currentIndex = siblings.findIndex(currentItem => currentItem.drag === item);\n    const siblingAtNewPosition = siblings[newIndex];\n    const currentPosition = siblings[currentIndex].clientRect;\n    const newPosition = siblingAtNewPosition.clientRect;\n    const delta = currentIndex > newIndex ? 1 : -1;\n\n    // How many pixels the item's placeholder should be offset.\n    const itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n\n    // How many pixels all the other items should be offset.\n    const siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n\n    // Save the previous order of the items before moving the item to its new index.\n    // We use this to check whether an item has been moved as a result of the sorting.\n    const oldOrder = siblings.slice();\n\n    // Shuffle the array in place.\n    moveItemInArray(siblings, currentIndex, newIndex);\n\n    siblings.forEach((sibling, index) => {\n      // Don't do anything if the position hasn't changed.\n      if (oldOrder[index] === sibling) {\n        return;\n      }\n\n      const isDraggedItem = sibling.drag === item;\n      const offset = isDraggedItem ? itemOffset : siblingOffset;\n      const elementToOffset = isDraggedItem\n        ? item.getPlaceholderElement()\n        : sibling.drag.getRootElement();\n\n      // Update the offset to reflect the new position.\n      sibling.offset += offset;\n\n      const transformAmount = Math.round(sibling.offset * (1 / sibling.drag.scale));\n\n      // Since we're moving the items with a `transform`, we need to adjust their cached\n      // client rects to reflect their new position, as well as swap their positions in the cache.\n      // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n      // elements may be mid-animation which will give us a wrong result.\n      if (isHorizontal) {\n        // Round the transforms since some browsers will\n        // blur the elements, for sub-pixel transforms.\n        elementToOffset.style.transform = combineTransforms(\n          `translate3d(${transformAmount}px, 0, 0)`,\n          sibling.initialTransform,\n        );\n        adjustDomRect(sibling.clientRect, 0, offset);\n      } else {\n        elementToOffset.style.transform = combineTransforms(\n          `translate3d(0, ${transformAmount}px, 0)`,\n          sibling.initialTransform,\n        );\n        adjustDomRect(sibling.clientRect, offset, 0);\n      }\n    });\n\n    // Note that it's important that we do this after the client rects have been adjusted.\n    this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n    this._previousSwap.drag = siblingAtNewPosition.drag;\n    this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n\n    return {previousIndex: currentIndex, currentIndex: newIndex};\n  }\n\n  /**\n   * Called when an item is being moved into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(item: DragRef, pointerX: number, pointerY: number, index?: number): void {\n    const activeDraggables = this._activeDraggables;\n    const currentIndex = activeDraggables.indexOf(item);\n    const placeholder = item.getPlaceholderElement();\n\n    // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n    // into another container and back again), we have to ensure that it isn't duplicated.\n    // Note that we need to run this early so the code further below isn't thrown off.\n    if (currentIndex > -1) {\n      activeDraggables.splice(currentIndex, 1);\n    }\n\n    const newIndex =\n      index == null || index < 0\n        ? // We use the coordinates of where the item entered the drop\n          // zone to figure out at which index it should be inserted.\n          this._getItemIndexFromPointerPosition(item, pointerX, pointerY)\n        : index;\n\n    let newPositionReference: DragRef | undefined = activeDraggables[newIndex];\n\n    // If the item at the new position is the same as the item that is being dragged,\n    // it means that we're trying to restore the item to its initial position. In this\n    // case we should use the next item from the list as the reference.\n    if (newPositionReference === item) {\n      newPositionReference = activeDraggables[newIndex + 1];\n    }\n\n    // If we didn't find a new position reference, it means that either the item didn't start off\n    // in this container, or that the item requested to be inserted at the end of the list.\n    if (\n      !newPositionReference &&\n      (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) &&\n      this._shouldEnterAsFirstChild(pointerX, pointerY)\n    ) {\n      newPositionReference = activeDraggables[0];\n    }\n\n    // Don't use items that are being dragged as a reference, because\n    // their element has been moved down to the bottom of the body.\n    if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n      const element = newPositionReference.getRootElement();\n      element.parentElement!.insertBefore(placeholder, element);\n      activeDraggables.splice(newIndex, 0, item);\n    } else {\n      this._element.appendChild(placeholder);\n      activeDraggables.push(item);\n    }\n\n    // The transform needs to be cleared so it doesn't throw off the measurements.\n    placeholder.style.transform = '';\n\n    // Note that usually `start` is called together with `enter` when an item goes into a new\n    // container. This will cache item positions, but we need to refresh them since the amount\n    // of items has changed.\n    this._cacheItemPositions();\n  }\n\n  /** Sets the items that are currently part of the list. */\n  withItems(items: readonly DragRef[]): void {\n    this._activeDraggables = items.slice();\n    this._cacheItemPositions();\n  }\n\n  /** Assigns a sort predicate to the strategy. */\n  withSortPredicate(predicate: SortPredicate<DragRef>): void {\n    this._sortPredicate = predicate;\n  }\n\n  /** Resets the strategy to its initial state before dragging was started. */\n  reset() {\n    // TODO(crisbeto): may have to wait for the animations to finish.\n    this._activeDraggables?.forEach(item => {\n      const rootElement = item.getRootElement();\n\n      if (rootElement) {\n        const initialTransform = this._itemPositions.find(p => p.drag === item)?.initialTransform;\n        rootElement.style.transform = initialTransform || '';\n      }\n    });\n\n    this._itemPositions = [];\n    this._activeDraggables = [];\n    this._previousSwap.drag = null;\n    this._previousSwap.delta = 0;\n    this._previousSwap.overlaps = false;\n  }\n\n  /**\n   * Gets a snapshot of items currently in the list.\n   * Can include items that we dragged in from another list.\n   */\n  getActiveItemsSnapshot(): readonly DragRef[] {\n    return this._activeDraggables;\n  }\n\n  /** Gets the index of a specific item. */\n  getItemIndex(item: DragRef): number {\n    return this._getVisualItemPositions().findIndex(currentItem => currentItem.drag === item);\n  }\n\n  /** Gets the item at a specific index. */\n  getItemAtIndex(index: number): DragRef | null {\n    return this._getVisualItemPositions()[index]?.drag || null;\n  }\n\n  /** Used to notify the strategy that the scroll position has changed. */\n  updateOnScroll(topDifference: number, leftDifference: number) {\n    // Since we know the amount that the user has scrolled we can shift all of the\n    // client rectangles ourselves. This is cheaper than re-measuring everything and\n    // we can avoid inconsistent behavior where we might be measuring the element before\n    // its position has changed.\n    this._itemPositions.forEach(({clientRect}) => {\n      adjustDomRect(clientRect, topDifference, leftDifference);\n    });\n\n    // We need two loops for this, because we want all of the cached\n    // positions to be up-to-date before we re-sort the item.\n    this._itemPositions.forEach(({drag}) => {\n      if (this._dragDropRegistry.isDragging(drag)) {\n        // We need to re-sort the item manually, because the pointer move\n        // events won't be dispatched while the user is scrolling.\n        drag._sortFromLastPointerPosition();\n      }\n    });\n  }\n\n  withElementContainer(container: HTMLElement): void {\n    this._element = container;\n  }\n\n  /** Refreshes the position cache of the items and sibling containers. */\n  private _cacheItemPositions() {\n    const isHorizontal = this.orientation === 'horizontal';\n\n    this._itemPositions = this._activeDraggables\n      .map(drag => {\n        const elementToMeasure = drag.getVisibleElement();\n        return {\n          drag,\n          offset: 0,\n          initialTransform: elementToMeasure.style.transform || '',\n          clientRect: getMutableClientRect(elementToMeasure),\n        };\n      })\n      .sort((a, b) => {\n        return isHorizontal\n          ? a.clientRect.left - b.clientRect.left\n          : a.clientRect.top - b.clientRect.top;\n      });\n  }\n\n  private _getVisualItemPositions() {\n    // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n    // The rest of the logic still stands no matter what orientation we're in, however\n    // we need to invert the array when determining the index.\n    return this.orientation === 'horizontal' && this.direction === 'rtl'\n      ? this._itemPositions.slice().reverse()\n      : this._itemPositions;\n  }\n\n  /**\n   * Gets the offset in pixels by which the item that is being dragged should be moved.\n   * @param currentPosition Current position of the item.\n   * @param newPosition Position of the item where the current item should be moved.\n   * @param delta Direction in which the user is moving.\n   */\n  private _getItemOffsetPx(currentPosition: DOMRect, newPosition: DOMRect, delta: 1 | -1) {\n    const isHorizontal = this.orientation === 'horizontal';\n    let itemOffset = isHorizontal\n      ? newPosition.left - currentPosition.left\n      : newPosition.top - currentPosition.top;\n\n    // Account for differences in the item width/height.\n    if (delta === -1) {\n      itemOffset += isHorizontal\n        ? newPosition.width - currentPosition.width\n        : newPosition.height - currentPosition.height;\n    }\n\n    return itemOffset;\n  }\n\n  /**\n   * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n   * @param currentIndex Index of the item currently being dragged.\n   * @param siblings All of the items in the list.\n   * @param delta Direction in which the user is moving.\n   */\n  private _getSiblingOffsetPx(\n    currentIndex: number,\n    siblings: CachedItemPosition<DragRef>[],\n    delta: 1 | -1,\n  ) {\n    const isHorizontal = this.orientation === 'horizontal';\n    const currentPosition = siblings[currentIndex].clientRect;\n    const immediateSibling = siblings[currentIndex + delta * -1];\n    let siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n\n    if (immediateSibling) {\n      const start = isHorizontal ? 'left' : 'top';\n      const end = isHorizontal ? 'right' : 'bottom';\n\n      // Get the spacing between the start of the current item and the end of the one immediately\n      // after it in the direction in which the user is dragging, or vice versa. We add it to the\n      // offset in order to push the element to where it will be when it's inline and is influenced\n      // by the `margin` of its siblings.\n      if (delta === -1) {\n        siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n      } else {\n        siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n      }\n    }\n\n    return siblingOffset;\n  }\n\n  /**\n   * Checks if pointer is entering in the first position\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   */\n  private _shouldEnterAsFirstChild(pointerX: number, pointerY: number) {\n    if (!this._activeDraggables.length) {\n      return false;\n    }\n\n    const itemPositions = this._itemPositions;\n    const isHorizontal = this.orientation === 'horizontal';\n\n    // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n    // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n    const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n    if (reversed) {\n      const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n      return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n    } else {\n      const firstItemRect = itemPositions[0].clientRect;\n      return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n    }\n  }\n\n  /**\n   * Gets the index of an item in the drop container, based on the position of the user's pointer.\n   * @param item Item that is being sorted.\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   * @param delta Direction in which the user is moving their pointer.\n   */\n  private _getItemIndexFromPointerPosition(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    delta?: {x: number; y: number},\n  ): number {\n    const isHorizontal = this.orientation === 'horizontal';\n    const index = this._itemPositions.findIndex(({drag, clientRect}) => {\n      // Skip the item itself.\n      if (drag === item) {\n        return false;\n      }\n\n      if (delta) {\n        const direction = isHorizontal ? delta.x : delta.y;\n\n        // If the user is still hovering over the same item as last time, their cursor hasn't left\n        // the item after we made the swap, and they didn't change the direction in which they're\n        // dragging, we don't consider it a direction swap.\n        if (\n          drag === this._previousSwap.drag &&\n          this._previousSwap.overlaps &&\n          direction === this._previousSwap.delta\n        ) {\n          return false;\n        }\n      }\n\n      return isHorizontal\n        ? // Round these down since most browsers report client rects with\n          // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n          pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right)\n        : pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n    });\n\n    return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\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 {_getShadowRoot} from '../../platform';\nimport {moveItemInArray} from '../drag-utils';\nimport {DropListSortStrategy, SortPredicate} from './drop-list-sort-strategy';\nimport {DragDropRegistry} from '../drag-drop-registry';\nimport type {DragRef} from '../drag-ref';\n\n/**\n * Strategy that only supports sorting on a list that might wrap.\n * Items are reordered by moving their DOM nodes around.\n * @docs-private\n */\nexport class MixedSortStrategy implements DropListSortStrategy {\n  /** Root element container of the drop list. */\n  private _element!: HTMLElement;\n\n  /** Function used to determine if an item can be sorted into a specific index. */\n  private _sortPredicate!: SortPredicate<DragRef>;\n\n  /** Lazily-resolved root node containing the list. Use `_getRootNode` to read this. */\n  private _rootNode: DocumentOrShadowRoot | undefined;\n\n  /**\n   * Draggable items that are currently active inside the container. Includes the items\n   * that were there at the start of the sequence, as well as any items that have been dragged\n   * in, but haven't been dropped yet.\n   */\n  private _activeItems!: DragRef[];\n\n  /**\n   * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n   * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n   * overlap with the swapped item after the swapping occurred.\n   */\n  private _previousSwap = {\n    drag: null as DragRef | null,\n    deltaX: 0,\n    deltaY: 0,\n    overlaps: false,\n  };\n\n  /**\n   * Keeps track of the relationship between a node and its next sibling. This information\n   * is used to restore the DOM to the order it was in before dragging started.\n   */\n  private _relatedNodes: [node: Node, nextSibling: Node | null][] = [];\n\n  constructor(\n    private _document: Document,\n    private _dragDropRegistry: DragDropRegistry,\n  ) {}\n\n  /**\n   * To be called when the drag sequence starts.\n   * @param items Items that are currently in the list.\n   */\n  start(items: readonly DragRef[]): void {\n    const childNodes = this._element.childNodes;\n    this._relatedNodes = [];\n\n    for (let i = 0; i < childNodes.length; i++) {\n      const node = childNodes[i];\n      this._relatedNodes.push([node, node.nextSibling]);\n    }\n\n    this.withItems(items);\n  }\n\n  /**\n   * To be called when an item is being sorted.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  sort(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    pointerDelta: {x: number; y: number},\n  ): {previousIndex: number; currentIndex: number} | null {\n    const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY);\n    const previousSwap = this._previousSwap;\n\n    if (newIndex === -1 || this._activeItems[newIndex] === item) {\n      return null;\n    }\n\n    const toSwapWith = this._activeItems[newIndex];\n\n    // Prevent too many swaps over the same item.\n    if (\n      previousSwap.drag === toSwapWith &&\n      previousSwap.overlaps &&\n      previousSwap.deltaX === pointerDelta.x &&\n      previousSwap.deltaY === pointerDelta.y\n    ) {\n      return null;\n    }\n\n    const previousIndex = this.getItemIndex(item);\n    const current = item.getPlaceholderElement();\n    const overlapElement = toSwapWith.getRootElement();\n\n    if (newIndex > previousIndex) {\n      overlapElement.after(current);\n    } else {\n      overlapElement.before(current);\n    }\n\n    moveItemInArray(this._activeItems, previousIndex, newIndex);\n\n    const newOverlapElement = this._getRootNode().elementFromPoint(pointerX, pointerY);\n    // Note: it's tempting to save the entire `pointerDelta` object here, however that'll\n    // break this functionality, because the same object is passed for all `sort` calls.\n    previousSwap.deltaX = pointerDelta.x;\n    previousSwap.deltaY = pointerDelta.y;\n    previousSwap.drag = toSwapWith;\n    previousSwap.overlaps =\n      overlapElement === newOverlapElement || overlapElement.contains(newOverlapElement);\n\n    return {\n      previousIndex,\n      currentIndex: newIndex,\n    };\n  }\n\n  /**\n   * Called when an item is being moved into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(item: DragRef, pointerX: number, pointerY: number, index?: number): void {\n    // Remove the item from current set of items first so that it doesn't throw off the indexes\n    // further down in this method. See https://github.com/angular/components/issues/31505\n    const currentIndex = this._activeItems.indexOf(item);\n\n    if (currentIndex > -1) {\n      this._activeItems.splice(currentIndex, 1);\n    }\n\n    let enterIndex =\n      index == null || index < 0\n        ? this._getItemIndexFromPointerPosition(item, pointerX, pointerY)\n        : index;\n\n    // In some cases (e.g. when the container has padding) we might not be able to figure\n    // out which item to insert the dragged item next to, because the pointer didn't overlap\n    // with anything. In that case we find the item that's closest to the pointer.\n    if (enterIndex === -1) {\n      enterIndex = this._getClosestItemIndexToPointer(item, pointerX, pointerY);\n    }\n\n    const targetItem = this._activeItems[enterIndex] as DragRef | undefined;\n\n    if (targetItem && !this._dragDropRegistry.isDragging(targetItem)) {\n      this._activeItems.splice(enterIndex, 0, item);\n      targetItem.getRootElement().before(item.getPlaceholderElement());\n    } else {\n      this._activeItems.push(item);\n      this._element.appendChild(item.getPlaceholderElement());\n    }\n  }\n\n  /** Sets the items that are currently part of the list. */\n  withItems(items: readonly DragRef[]): void {\n    this._activeItems = items.slice();\n  }\n\n  /** Assigns a sort predicate to the strategy. */\n  withSortPredicate(predicate: SortPredicate<DragRef>): void {\n    this._sortPredicate = predicate;\n  }\n\n  /** Resets the strategy to its initial state before dragging was started. */\n  reset(): void {\n    const root = this._element;\n    const previousSwap = this._previousSwap;\n\n    // Moving elements around in the DOM can break things like the `@for` loop, because it\n    // uses comment nodes to know where to insert elements. To avoid such issues, we restore\n    // the DOM nodes in the list to their original order when the list is reset.\n    // Note that this could be simpler if we just saved all the nodes, cleared the root\n    // and then appended them in the original order. We don't do it, because it can break\n    // down depending on when the snapshot was taken. E.g. we may end up snapshotting the\n    // placeholder element which is removed after dragging.\n    for (let i = this._relatedNodes.length - 1; i > -1; i--) {\n      const [node, nextSibling] = this._relatedNodes[i];\n      if (node.parentNode === root && node.nextSibling !== nextSibling) {\n        if (nextSibling === null) {\n          root.appendChild(node);\n        } else if (nextSibling.parentNode === root) {\n          root.insertBefore(node, nextSibling);\n        }\n      }\n    }\n\n    this._relatedNodes = [];\n    this._activeItems = [];\n    previousSwap.drag = null;\n    previousSwap.deltaX = previousSwap.deltaY = 0;\n    previousSwap.overlaps = false;\n  }\n\n  /**\n   * Gets a snapshot of items currently in the list.\n   * Can include items that we dragged in from another list.\n   */\n  getActiveItemsSnapshot(): readonly DragRef[] {\n    return this._activeItems;\n  }\n\n  /** Gets the index of a specific item. */\n  getItemIndex(item: DragRef): number {\n    return this._activeItems.indexOf(item);\n  }\n\n  /** Gets the item at a specific index. */\n  getItemAtIndex(index: number): DragRef | null {\n    return this._activeItems[index] || null;\n  }\n\n  /** Used to notify the strategy that the scroll position has changed. */\n  updateOnScroll(): void {\n    this._activeItems.forEach(item => {\n      if (this._dragDropRegistry.isDragging(item)) {\n        // We need to re-sort the item manually, because the pointer move\n        // events won't be dispatched while the user is scrolling.\n        item._sortFromLastPointerPosition();\n      }\n    });\n  }\n\n  withElementContainer(container: HTMLElement): void {\n    if (container !== this._element) {\n      this._element = container;\n      this._rootNode = undefined;\n    }\n  }\n\n  /**\n   * Gets the index of an item in the drop container, based on the position of the user's pointer.\n   * @param item Item that is being sorted.\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   * @param delta Direction in which the user is moving their pointer.\n   */\n  private _getItemIndexFromPointerPosition(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n  ): number {\n    const elementAtPoint = this._getRootNode().elementFromPoint(\n      Math.floor(pointerX),\n      Math.floor(pointerY),\n    );\n    const index = elementAtPoint\n      ? this._activeItems.findIndex(item => {\n          const root = item.getRootElement();\n          return elementAtPoint === root || root.contains(elementAtPoint);\n        })\n      : -1;\n    return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n  }\n\n  /** Lazily resolves the list's root node. */\n  private _getRootNode(): DocumentOrShadowRoot {\n    // Resolve the root node lazily to ensure that the drop list is in its final place in the DOM.\n    if (!this._rootNode) {\n      this._rootNode = _getShadowRoot(this._element) || this._document;\n    }\n    return this._rootNode;\n  }\n\n  /**\n   * Finds the index of the item that's closest to the item being dragged.\n   * @param item Item being dragged.\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   */\n  private _getClosestItemIndexToPointer(item: DragRef, pointerX: number, pointerY: number): number {\n    if (this._activeItems.length === 0) {\n      return -1;\n    }\n\n    if (this._activeItems.length === 1) {\n      return 0;\n    }\n\n    let minDistance = Infinity;\n    let minIndex = -1;\n\n    // Find the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between each\n    // item and the pointer, and return the smallest one. Note that this is a bit flawed in that DOM\n    // nodes are rectangles, not points, so we use the top/left coordinates. It should be enough\n    // for our purposes.\n    for (let i = 0; i < this._activeItems.length; i++) {\n      const current = this._activeItems[i];\n      if (current !== item) {\n        const {x, y} = current.getRootElement().getBoundingClientRect();\n        const distance = Math.hypot(pointerX - x, pointerY - y);\n\n        if (distance < minDistance) {\n          minDistance = distance;\n          minIndex = i;\n        }\n      }\n    }\n\n    return minIndex;\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 {DOCUMENT, ElementRef, Injector, NgZone} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {coerceElement} from '../coercion';\nimport {ViewportRuler} from '../scrolling';\nimport {_getShadowRoot} from '../platform';\nimport {Subject, Subscription, interval, animationFrameScheduler} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport type {DragRef, Point} from './drag-ref';\nimport {isPointerNearDomRect, isInsideClientRect} from './dom/dom-rect';\nimport {ParentPositionTracker} from './dom/parent-position-tracker';\nimport {DragCSSStyleDeclaration} from './dom/styling';\nimport {DropListSortStrategy} from './sorting/drop-list-sort-strategy';\nimport {SingleAxisSortStrategy} from './sorting/single-axis-sort-strategy';\nimport {MixedSortStrategy} from './sorting/mixed-sort-strategy';\nimport {DropListOrientation} from './directives/config';\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n\n/** Vertical direction in which we can auto-scroll. */\nenum AutoScrollVerticalDirection {\n  NONE,\n  UP,\n  DOWN,\n}\n\n/** Horizontal direction in which we can auto-scroll. */\nenum AutoScrollHorizontalDirection {\n  NONE,\n  LEFT,\n  RIGHT,\n}\n\n/**\n * Creates a `DropListRef` for an element, turning it into a drop list.\n * @param injector Injector used to resolve dependencies.\n * @param element Element to which to attach the drop list functionality.\n */\nexport function createDropListRef<T = unknown>(\n  injector: Injector,\n  element: ElementRef<HTMLElement> | HTMLElement,\n): DropListRef<T> {\n  return new DropListRef(\n    element,\n    injector.get(DragDropRegistry),\n    injector.get(DOCUMENT),\n    injector.get(NgZone),\n    injector.get(ViewportRuler),\n  );\n}\n\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nexport class DropListRef<T = any> {\n  /** Element that the drop list is attached to. */\n  element: HTMLElement | ElementRef<HTMLElement>;\n\n  /** Whether starting a dragging sequence from this container is disabled. */\n  disabled: boolean = false;\n\n  /** Whether sorting items within the list is disabled. */\n  sortingDisabled: boolean = false;\n\n  /** Locks the position of the draggable elements inside the container along the specified axis. */\n  lockAxis: 'x' | 'y' | null = null;\n\n  /**\n   * Whether auto-scrolling the view when the user\n   * moves their pointer close to the edges is disabled.\n   */\n  autoScrollDisabled: boolean = false;\n\n  /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n  autoScrollStep: number = 2;\n\n  /**\n   * Whether the items in the list should leave an anchor node when leaving the initial container.\n   */\n  hasAnchor: boolean = false;\n\n  /**\n   * Function that is used to determine whether an item\n   * is allowed to be moved into a drop container.\n   */\n  enterPredicate: (drag: DragRef, drop: DropListRef) => boolean = () => true;\n\n  /** Function that is used to determine whether an item can be sorted into a particular index. */\n  sortPredicate: (index: number, drag: DragRef, drop: DropListRef) => boolean = () => true;\n\n  /** Emits right before dragging has started. */\n  readonly beforeStarted = new Subject<void>();\n\n  /**\n   * Emits when the user has moved a new drag item into this container.\n   */\n  readonly entered = new Subject<{item: DragRef; container: DropListRef; currentIndex: number}>();\n\n  /**\n   * Emits when the user removes an item from the container\n   * by dragging it into another container.\n   */\n  readonly exited = new Subject<{item: DragRef; container: DropListRef}>();\n\n  /** Emits when the user drops an item inside the container. */\n  readonly dropped = new Subject<{\n    item: DragRef;\n    currentIndex: number;\n    previousIndex: number;\n    container: DropListRef;\n    previousContainer: DropListRef;\n    isPointerOverContainer: boolean;\n    distance: Point;\n    dropPoint: Point;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /** Emits as the user is swapping items while actively dragging. */\n  readonly sorted = new Subject<{\n    previousIndex: number;\n    currentIndex: number;\n    container: DropListRef;\n    item: DragRef;\n  }>();\n\n  /** Emits when a dragging sequence is started in a list connected to the current one. */\n  readonly receivingStarted = new Subject<{\n    receiver: DropListRef;\n    initiator: DropListRef;\n    items: DragRef[];\n  }>();\n\n  /** Emits when a dragging sequence is stopped from a list connected to the current one. */\n  readonly receivingStopped = new Subject<{\n    receiver: DropListRef;\n    initiator: DropListRef;\n  }>();\n\n  /** Arbitrary data that can be attached to the drop list. */\n  data!: T;\n\n  /** Element that is the direct parent of the drag items. */\n  private _container!: HTMLElement;\n\n  /** Whether an item in the list is being dragged. */\n  private _isDragging = false;\n\n  /** Keeps track of the positions of any parent scrollable elements. */\n  private _parentPositions: ParentPositionTracker;\n\n  /** Strategy being used to sort items within the list. */\n  private _sortStrategy!: DropListSortStrategy;\n\n  /** Cached `DOMRect` of the drop list. */\n  private _domRect: DOMRect | undefined;\n\n  /** Draggable items in the container. */\n  private _draggables: readonly DragRef[] = [];\n\n  /** Drop lists that are connected to the current one. */\n  private _siblings: readonly DropListRef[] = [];\n\n  /** Connected siblings that currently have a dragged item. */\n  private _activeSiblings = new Set<DropListRef>();\n\n  /** Subscription to the window being scrolled. */\n  private _viewportScrollSubscription = Subscription.EMPTY;\n\n  /** Vertical direction in which the list is currently scrolling. */\n  private _verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n\n  /** Horizontal direction in which the list is currently scrolling. */\n  private _horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n  /** Node that is being auto-scrolled. */\n  private _scrollNode!: HTMLElement | Window;\n\n  /** Used to signal to the current auto-scroll sequence when to stop. */\n  private readonly _stopScrollTimers = new Subject<void>();\n\n  /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n  private _cachedShadowRoot: DocumentOrShadowRoot | null = null;\n\n  /** Reference to the document. */\n  private _document: Document;\n\n  /** Elements that can be scrolled while the user is dragging. */\n  private _scrollableElements: HTMLElement[] = [];\n\n  /** Initial value for the element's `scroll-snap-type` style. */\n  private _initialScrollSnap!: string;\n\n  /** Direction of the list's layout. */\n  private _direction: Direction = 'ltr';\n\n  constructor(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    private _dragDropRegistry: DragDropRegistry,\n    _document: any,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n  ) {\n    const coercedElement = (this.element = coerceElement(element));\n    this._document = _document;\n    this.withOrientation('vertical').withElementContainer(coercedElement);\n    _dragDropRegistry.registerDropContainer(this);\n    this._parentPositions = new ParentPositionTracker(_document);\n  }\n\n  /** Removes the drop list functionality from the DOM element. */\n  dispose() {\n    this._stopScrolling();\n    this._stopScrollTimers.complete();\n    this._viewportScrollSubscription.unsubscribe();\n    this.beforeStarted.complete();\n    this.entered.complete();\n    this.exited.complete();\n    this.dropped.complete();\n    this.sorted.complete();\n    this.receivingStarted.complete();\n    this.receivingStopped.complete();\n    this._activeSiblings.clear();\n    this._scrollNode = null!;\n    this._parentPositions.clear();\n    this._dragDropRegistry.removeDropContainer(this);\n  }\n\n  /** Whether an item from this list is currently being dragged. */\n  isDragging() {\n    return this._isDragging;\n  }\n\n  /** Starts dragging an item. */\n  start(): void {\n    this._draggingStarted();\n    this._notifyReceivingSiblings();\n  }\n\n  /**\n   * Attempts to move an item into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(item: DragRef, pointerX: number, pointerY: number, index?: number): void {\n    this._draggingStarted();\n\n    // If sorting is disabled, we want the item to return to its starting\n    // position if the user is returning it to its initial container.\n    if (index == null && this.sortingDisabled) {\n      index = this._draggables.indexOf(item);\n    }\n\n    this._sortStrategy.enter(item, pointerX, pointerY, index);\n\n    // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n    // can change when the sort strategy moves the item around inside `enter`.\n    this._cacheParentPositions();\n\n    // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n    this._notifyReceivingSiblings();\n    this.entered.next({item, container: this, currentIndex: this.getItemIndex(item)});\n  }\n\n  /**\n   * Removes an item from the container after it was dragged into another container by the user.\n   * @param item Item that was dragged out.\n   */\n  exit(item: DragRef): void {\n    this._reset();\n    this.exited.next({item, container: this});\n  }\n\n  /**\n   * Drops an item into this container.\n   * @param item Item being dropped into the container.\n   * @param currentIndex Index at which the item should be inserted.\n   * @param previousIndex Index of the item when dragging started.\n   * @param previousContainer Container from which the item got dragged in.\n   * @param isPointerOverContainer Whether the user's pointer was over the\n   *    container when the item was dropped.\n   * @param distance Distance the user has dragged since the start of the dragging sequence.\n   * @param event Event that triggered the dropping sequence.\n   *\n   * @breaking-change 15.0.0 `previousIndex` and `event` parameters to become required.\n   */\n  drop(\n    item: DragRef,\n    currentIndex: number,\n    previousIndex: number,\n    previousContainer: DropListRef,\n    isPointerOverContainer: boolean,\n    distance: Point,\n    dropPoint: Point,\n    event: MouseEvent | TouchEvent = {} as any,\n  ): void {\n    this._reset();\n    this.dropped.next({\n      item,\n      currentIndex,\n      previousIndex,\n      container: this,\n      previousContainer,\n      isPointerOverContainer,\n      distance,\n      dropPoint,\n      event,\n    });\n  }\n\n  /**\n   * Sets the draggable items that are a part of this list.\n   * @param items Items that are a part of this list.\n   */\n  withItems(items: DragRef[]): this {\n    const previousItems = this._draggables;\n    this._draggables = items;\n    items.forEach(item => item._withDropContainer(this));\n\n    if (this.isDragging()) {\n      const draggedItems = previousItems.filter(item => item.isDragging());\n\n      // If all of the items being dragged were removed\n      // from the list, abort the current drag sequence.\n      if (draggedItems.every(item => items.indexOf(item) === -1)) {\n        this._reset();\n      } else {\n        this._sortStrategy.withItems(this._draggables);\n      }\n    }\n\n    return this;\n  }\n\n  /** Sets the layout direction of the drop list. */\n  withDirection(direction: Direction): this {\n    this._direction = direction;\n    if (this._sortStrategy instanceof SingleAxisSortStrategy) {\n      this._sortStrategy.direction = direction;\n    }\n    return this;\n  }\n\n  /**\n   * Sets the containers that are connected to this one. When two or more containers are\n   * connected, the user will be allowed to transfer items between them.\n   * @param connectedTo Other containers that the current containers should be connected to.\n   */\n  connectedTo(connectedTo: DropListRef[]): this {\n    this._siblings = connectedTo.slice();\n    return this;\n  }\n\n  /**\n   * Sets the orientation of the container.\n   * @param orientation New orientation for the container.\n   */\n  withOrientation(orientation: DropListOrientation): this {\n    if (orientation === 'mixed') {\n      this._sortStrategy = new MixedSortStrategy(this._document, this._dragDropRegistry);\n    } else {\n      const strategy = new SingleAxisSortStrategy(this._dragDropRegistry);\n      strategy.direction = this._direction;\n      strategy.orientation = orientation;\n      this._sortStrategy = strategy;\n    }\n    this._sortStrategy.withElementContainer(this._container);\n    this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));\n    return this;\n  }\n\n  /**\n   * Sets which parent elements are can be scrolled while the user is dragging.\n   * @param elements Elements that can be scrolled.\n   */\n  withScrollableParents(elements: HTMLElement[]): this {\n    const element = this._container;\n\n    // We always allow the current element to be scrollable\n    // so we need to ensure that it's in the array.\n    this._scrollableElements =\n      elements.indexOf(element) === -1 ? [element, ...elements] : elements.slice();\n    return this;\n  }\n\n  /**\n   * Configures the drop list so that a different element is used as the container for the\n   * dragged items. This is useful for the cases when one might not have control over the\n   * full DOM that sets up the dragging.\n   * Note that the alternate container needs to be a descendant of the drop list.\n   * @param container New element container to be assigned.\n   */\n  withElementContainer(container: HTMLElement): this {\n    if (container === this._container) {\n      return this;\n    }\n\n    const element = coerceElement(this.element);\n\n    if (\n      (typeof ngDevMode === 'undefined' || ngDevMode) &&\n      container !== element &&\n      !element.contains(container)\n    ) {\n      throw new Error(\n        'Invalid DOM structure for drop list. Alternate container element must be a descendant of the drop list.',\n      );\n    }\n\n    const oldContainerIndex = this._scrollableElements.indexOf(this._container);\n    const newContainerIndex = this._scrollableElements.indexOf(container);\n\n    if (oldContainerIndex > -1) {\n      this._scrollableElements.splice(oldContainerIndex, 1);\n    }\n\n    if (newContainerIndex > -1) {\n      this._scrollableElements.splice(newContainerIndex, 1);\n    }\n\n    if (this._sortStrategy) {\n      this._sortStrategy.withElementContainer(container);\n    }\n\n    this._cachedShadowRoot = null;\n    this._scrollableElements.unshift(container);\n    this._container = container;\n    return this;\n  }\n\n  /** Gets the scrollable parents that are registered with this drop container. */\n  getScrollableParents(): readonly HTMLElement[] {\n    return this._scrollableElements;\n  }\n\n  /**\n   * Figures out the index of an item in the container.\n   * @param item Item whose index should be determined.\n   */\n  getItemIndex(item: DragRef): number {\n    return this._isDragging\n      ? this._sortStrategy.getItemIndex(item)\n      : this._draggables.indexOf(item);\n  }\n\n  /**\n   * Gets the item at a specific index.\n   * @param index Index at which to retrieve the item.\n   */\n  getItemAtIndex(index: number): DragRef | null {\n    return this._isDragging\n      ? this._sortStrategy.getItemAtIndex(index)\n      : this._draggables[index] || null;\n  }\n\n  /**\n   * Whether the list is able to receive the item that\n   * is currently being dragged inside a connected drop list.\n   */\n  isReceiving(): boolean {\n    return this._activeSiblings.size > 0;\n  }\n\n  /**\n   * Sorts an item inside the container based on its position.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  _sortItem(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    pointerDelta: {x: number; y: number},\n  ): void {\n    // Don't sort the item if sorting is disabled or it's out of range.\n    if (\n      this.sortingDisabled ||\n      !this._domRect ||\n      !isPointerNearDomRect(this._domRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)\n    ) {\n      return;\n    }\n\n    const result = this._sortStrategy.sort(item, pointerX, pointerY, pointerDelta);\n\n    if (result) {\n      this.sorted.next({\n        previousIndex: result.previousIndex,\n        currentIndex: result.currentIndex,\n        container: this,\n        item,\n      });\n    }\n  }\n\n  /**\n   * Checks whether the user's pointer is close to the edges of either the\n   * viewport or the drop list and starts the auto-scroll sequence.\n   * @param pointerX User's pointer position along the x axis.\n   * @param pointerY User's pointer position along the y axis.\n   */\n  _startScrollingIfNecessary(pointerX: number, pointerY: number) {\n    if (this.autoScrollDisabled) {\n      return;\n    }\n\n    let scrollNode: HTMLElement | Window | undefined;\n    let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n    let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n    // Check whether we should start scrolling any of the parent containers.\n    this._parentPositions.positions.forEach((position, element) => {\n      // We have special handling for the `document` below. Also this would be\n      // nicer with a  for...of loop, but it requires changing a compiler flag.\n      if (element === this._document || !position.clientRect || scrollNode) {\n        return;\n      }\n\n      if (isPointerNearDomRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n        [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(\n          element as HTMLElement,\n          position.clientRect,\n          this._direction,\n          pointerX,\n          pointerY,\n        );\n\n        if (verticalScrollDirection || horizontalScrollDirection) {\n          scrollNode = element as HTMLElement;\n        }\n      }\n    });\n\n    // Otherwise check if we can start scrolling the viewport.\n    if (!verticalScrollDirection && !horizontalScrollDirection) {\n      const {width, height} = this._viewportRuler.getViewportSize();\n      const domRect = {\n        width,\n        height,\n        top: 0,\n        right: width,\n        bottom: height,\n        left: 0,\n      } as DOMRect;\n      verticalScrollDirection = getVerticalScrollDirection(domRect, pointerY);\n      horizontalScrollDirection = getHorizontalScrollDirection(domRect, pointerX);\n      scrollNode = window;\n    }\n\n    if (\n      scrollNode &&\n      (verticalScrollDirection !== this._verticalScrollDirection ||\n        horizontalScrollDirection !== this._horizontalScrollDirection ||\n        scrollNode !== this._scrollNode)\n    ) {\n      this._verticalScrollDirection = verticalScrollDirection;\n      this._horizontalScrollDirection = horizontalScrollDirection;\n      this._scrollNode = scrollNode;\n\n      if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n        this._ngZone.runOutsideAngular(this._startScrollInterval);\n      } else {\n        this._stopScrolling();\n      }\n    }\n  }\n\n  /** Stops any currently-running auto-scroll sequences. */\n  _stopScrolling() {\n    this._stopScrollTimers.next();\n  }\n\n  /** Starts the dragging sequence within the list. */\n  private _draggingStarted() {\n    const styles = this._container.style as DragCSSStyleDeclaration;\n    this.beforeStarted.next();\n    this._isDragging = true;\n\n    if (\n      (typeof ngDevMode === 'undefined' || ngDevMode) &&\n      // Prevent the check from running on apps not using an alternate container. Ideally we\n      // would always run it, but introducing it at this stage would be a breaking change.\n      this._container !== coerceElement(this.element)\n    ) {\n      for (const drag of this._draggables) {\n        if (!drag.isDragging() && drag.getVisibleElement().parentNode !== this._container) {\n          throw new Error(\n            'Invalid DOM structure for drop list. All items must be placed directly inside of the element container.',\n          );\n        }\n      }\n    }\n\n    // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n    // scrolling. The browser seems to round the value based on the snapping points which means\n    // that we can't increment/decrement the scroll position.\n    this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n    styles.scrollSnapType = styles.msScrollSnapType = 'none';\n    this._sortStrategy.start(this._draggables);\n    this._cacheParentPositions();\n    this._viewportScrollSubscription.unsubscribe();\n    this._listenToScrollEvents();\n  }\n\n  /** Caches the positions of the configured scrollable parents. */\n  private _cacheParentPositions() {\n    this._parentPositions.cache(this._scrollableElements);\n\n    // The list element is always in the `scrollableElements`\n    // so we can take advantage of the cached `DOMRect`.\n    this._domRect = this._parentPositions.positions.get(this._container)!.clientRect!;\n  }\n\n  /** Resets the container to its initial state. */\n  private _reset() {\n    this._isDragging = false;\n    const styles = this._container.style as DragCSSStyleDeclaration;\n    styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n\n    this._siblings.forEach(sibling => sibling._stopReceiving(this));\n    this._sortStrategy.reset();\n    this._stopScrolling();\n    this._viewportScrollSubscription.unsubscribe();\n    this._parentPositions.clear();\n  }\n\n  /** Starts the interval that'll auto-scroll the element. */\n  private _startScrollInterval = () => {\n    this._stopScrolling();\n\n    interval(0, animationFrameScheduler)\n      .pipe(takeUntil(this._stopScrollTimers))\n      .subscribe(() => {\n        const node = this._scrollNode;\n        const scrollStep = this.autoScrollStep;\n\n        if (this._verticalScrollDirection === AutoScrollVerticalDirection.UP) {\n          node.scrollBy(0, -scrollStep);\n        } else if (this._verticalScrollDirection === AutoScrollVerticalDirection.DOWN) {\n          node.scrollBy(0, scrollStep);\n        }\n\n        if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.LEFT) {\n          node.scrollBy(-scrollStep, 0);\n        } else if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.RIGHT) {\n          node.scrollBy(scrollStep, 0);\n        }\n      });\n  };\n\n  /**\n   * Checks whether the user's pointer is positioned over the container.\n   * @param x Pointer position along the X axis.\n   * @param y Pointer position along the Y axis.\n   */\n  _isOverContainer(x: number, y: number): boolean {\n    return this._domRect != null && isInsideClientRect(this._domRect, x, y);\n  }\n\n  /**\n   * Figures out whether an item should be moved into a sibling\n   * drop container, based on its current position.\n   * @param item Drag item that is being moved.\n   * @param x Position of the item along the X axis.\n   * @param y Position of the item along the Y axis.\n   */\n  _getSiblingContainerFromPosition(item: DragRef, x: number, y: number): DropListRef | undefined {\n    return this._siblings.find(sibling => sibling._canReceive(item, x, y));\n  }\n\n  /**\n   * Checks whether the drop list can receive the passed-in item.\n   * @param item Item that is being dragged into the list.\n   * @param x Position of the item along the X axis.\n   * @param y Position of the item along the Y axis.\n   */\n  _canReceive(item: DragRef, x: number, y: number): boolean {\n    if (\n      !this._domRect ||\n      !isInsideClientRect(this._domRect, x, y) ||\n      !this.enterPredicate(item, this)\n    ) {\n      return false;\n    }\n\n    const elementFromPoint = this._getShadowRoot().elementFromPoint(x, y) as HTMLElement | null;\n\n    // If there's no element at the pointer position, then\n    // the client rect is probably scrolled out of the view.\n    if (!elementFromPoint) {\n      return false;\n    }\n\n    // The `DOMRect`, that we're using to find the container over which the user is\n    // hovering, doesn't give us any information on whether the element has been scrolled\n    // out of the view or whether it's overlapping with other containers. This means that\n    // we could end up transferring the item into a container that's invisible or is positioned\n    // below another one. We use the result from `elementFromPoint` to get the top-most element\n    // at the pointer position and to find whether it's one of the intersecting drop containers.\n    return elementFromPoint === this._container || this._container.contains(elementFromPoint);\n  }\n\n  /**\n   * Called by one of the connected drop lists when a dragging sequence has started.\n   * @param sibling Sibling in which dragging has started.\n   */\n  _startReceiving(sibling: DropListRef, items: DragRef[]) {\n    const activeSiblings = this._activeSiblings;\n\n    if (\n      !activeSiblings.has(sibling) &&\n      items.every(item => {\n        // Note that we have to add an exception to the `enterPredicate` for items that started off\n        // in this drop list. The drag ref has logic that allows an item to return to its initial\n        // container, if it has left the initial container and none of the connected containers\n        // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n        return this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1;\n      })\n    ) {\n      activeSiblings.add(sibling);\n      this._cacheParentPositions();\n      this._listenToScrollEvents();\n      this.receivingStarted.next({\n        initiator: sibling,\n        receiver: this,\n        items,\n      });\n    }\n  }\n\n  /**\n   * Called by a connected drop list when dragging has stopped.\n   * @param sibling Sibling whose dragging has stopped.\n   */\n  _stopReceiving(sibling: DropListRef) {\n    this._activeSiblings.delete(sibling);\n    this._viewportScrollSubscription.unsubscribe();\n    this.receivingStopped.next({initiator: sibling, receiver: this});\n  }\n\n  /**\n   * Starts listening to scroll events on the viewport.\n   * Used for updating the internal state of the list.\n   */\n  private _listenToScrollEvents() {\n    this._viewportScrollSubscription = this._dragDropRegistry\n      .scrolled(this._getShadowRoot())\n      .subscribe(event => {\n        if (this.isDragging()) {\n          const scrollDifference = this._parentPositions.handleScroll(event);\n\n          if (scrollDifference) {\n            this._sortStrategy.updateOnScroll(scrollDifference.top, scrollDifference.left);\n          }\n        } else if (this.isReceiving()) {\n          this._cacheParentPositions();\n        }\n      });\n  }\n\n  /**\n   * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n   * than saving it in property directly on init, because we want to resolve it as late as possible\n   * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n   * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n   */\n  private _getShadowRoot(): DocumentOrShadowRoot {\n    if (!this._cachedShadowRoot) {\n      const shadowRoot = _getShadowRoot(this._container);\n      this._cachedShadowRoot = shadowRoot || this._document;\n    }\n\n    return this._cachedShadowRoot;\n  }\n\n  /** Notifies any siblings that may potentially receive the item. */\n  private _notifyReceivingSiblings() {\n    const draggedItems = this._sortStrategy\n      .getActiveItemsSnapshot()\n      .filter(item => item.isDragging());\n    this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n  }\n}\n\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect: DOMRect, pointerY: number) {\n  const {top, bottom, height} = clientRect;\n  const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n\n  if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n    return AutoScrollVerticalDirection.UP;\n  } else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n    return AutoScrollVerticalDirection.DOWN;\n  }\n\n  return AutoScrollVerticalDirection.NONE;\n}\n\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(clientRect: DOMRect, pointerX: number) {\n  const {left, right, width} = clientRect;\n  const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n\n  if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n    return AutoScrollHorizontalDirection.LEFT;\n  } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n    return AutoScrollHorizontalDirection.RIGHT;\n  }\n\n  return AutoScrollHorizontalDirection.NONE;\n}\n\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param direction Layout direction of the drop list.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(\n  element: HTMLElement,\n  clientRect: DOMRect,\n  direction: Direction,\n  pointerX: number,\n  pointerY: number,\n): [AutoScrollVerticalDirection, AutoScrollHorizontalDirection] {\n  const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n  const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n  let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n  let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n  // Note that we here we do some extra checks for whether the element is actually scrollable in\n  // a certain direction and we only assign the scroll direction if it is. We do this so that we\n  // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n  // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n  if (computedVertical) {\n    const scrollTop = element.scrollTop;\n\n    if (computedVertical === AutoScrollVerticalDirection.UP) {\n      if (scrollTop > 0) {\n        verticalScrollDirection = AutoScrollVerticalDirection.UP;\n      }\n    } else if (element.scrollHeight - scrollTop > element.clientHeight) {\n      verticalScrollDirection = AutoScrollVerticalDirection.DOWN;\n    }\n  }\n\n  if (computedHorizontal) {\n    const scrollLeft = element.scrollLeft;\n\n    if (direction === 'rtl') {\n      if (computedHorizontal === AutoScrollHorizontalDirection.RIGHT) {\n        // In RTL `scrollLeft` will be negative when scrolled.\n        if (scrollLeft < 0) {\n          horizontalScrollDirection = AutoScrollHorizontalDirection.RIGHT;\n        }\n      } else if (element.scrollWidth + scrollLeft > element.clientWidth) {\n        horizontalScrollDirection = AutoScrollHorizontalDirection.LEFT;\n      }\n    } else {\n      if (computedHorizontal === AutoScrollHorizontalDirection.LEFT) {\n        if (scrollLeft > 0) {\n          horizontalScrollDirection = AutoScrollHorizontalDirection.LEFT;\n        }\n      } else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n        horizontalScrollDirection = AutoScrollHorizontalDirection.RIGHT;\n      }\n    }\n  }\n\n  return [verticalScrollDirection, horizontalScrollDirection];\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 {Injectable, ElementRef, inject, Injector} from '@angular/core';\nimport {createDragRef, DragRef, DragRefConfig} from './drag-ref';\nimport {createDropListRef, DropListRef} from './drop-list-ref';\n\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n * @deprecated Use the `createDragRef` or `createDropListRef` function for better tree shaking.\n * Will be removed in v23.\n * @breaking-change 23.0.0\n */\n@Injectable({providedIn: 'root'})\nexport class DragDrop {\n  private _injector = inject(Injector);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /**\n   * Turns an element into a draggable item.\n   * @param element Element to which to attach the dragging functionality.\n   * @param config Object used to configure the dragging behavior.\n   * @deprecated Use the `createDragRef` function that provides better tree shaking.\n   * @breaking-change 23.0.0\n   */\n  createDrag<T = any>(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    config?: DragRefConfig,\n  ): DragRef<T> {\n    return createDragRef(this._injector, element, config);\n  }\n\n  /**\n   * Turns an element into a drop list.\n   * @param element Element to which to attach the drop list functionality.\n   * @deprecated Use the `createDropListRef` function that provides better tree shaking.\n   * @breaking-change 23.0.0\n   */\n  createDropList<T = any>(element: ElementRef<HTMLElement> | HTMLElement): DropListRef<T> {\n    return createDropListRef(this._injector, element);\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 {InjectionToken} from '@angular/core';\nimport type {CdkDrag} from './directives/drag';\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nexport const CDK_DRAG_PARENT = new InjectionToken<CdkDrag>('CDK_DRAG_PARENT');\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\n/**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nexport function assertElementNode(node: Node, name: string): asserts node is HTMLElement {\n  if (node.nodeType !== 1) {\n    throw Error(\n      `${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`,\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 */\n\nimport {\n  AfterViewInit,\n  Directive,\n  ElementRef,\n  InjectionToken,\n  Input,\n  OnDestroy,\n  booleanAttribute,\n  inject,\n} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport type {CdkDrag} from './drag';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\nimport {assertElementNode} from './assertions';\nimport {DragDropRegistry} from '../drag-drop-registry';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_HANDLE = new InjectionToken<CdkDragHandle>('CdkDragHandle');\n\n/** Handle that can be used to drag a CdkDrag instance. */\n@Directive({\n  selector: '[cdkDragHandle]',\n  host: {\n    'class': 'cdk-drag-handle',\n  },\n  providers: [{provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle}],\n})\nexport class CdkDragHandle implements AfterViewInit, OnDestroy {\n  element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  private _parentDrag = inject<CdkDrag>(CDK_DRAG_PARENT, {optional: true, skipSelf: true});\n  private _dragDropRegistry = inject(DragDropRegistry);\n\n  /** Emits when the state of the handle has changed. */\n  readonly _stateChanges = new Subject<CdkDragHandle>();\n\n  /** Whether starting to drag through this handle is disabled. */\n  @Input({alias: 'cdkDragHandleDisabled', transform: booleanAttribute})\n  get disabled(): boolean {\n    return this._disabled;\n  }\n  set disabled(value: boolean) {\n    this._disabled = value;\n    this._stateChanges.next(this);\n  }\n  private _disabled = false;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      assertElementNode(this.element.nativeElement, 'cdkDragHandle');\n    }\n\n    this._parentDrag?._addHandle(this);\n  }\n\n  ngAfterViewInit() {\n    if (!this._parentDrag) {\n      let parent = this.element.nativeElement.parentElement;\n      while (parent) {\n        const ref = this._dragDropRegistry.getDragDirectiveForNode(parent);\n        if (ref) {\n          this._parentDrag = ref;\n          ref._addHandle(this);\n          break;\n        }\n        parent = parent.parentElement;\n      }\n    }\n  }\n\n  ngOnDestroy() {\n    this._parentDrag?._removeHandle(this);\n    this._stateChanges.complete();\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 {InjectionToken} from '@angular/core';\nimport {DragRefConfig, DragConstrainPosition} from '../drag-ref';\n\n/** Possible values that can be used to configure the drag start delay. */\nexport type DragStartDelay = number | {touch: number; mouse: number};\n\n/** Possible axis along which dragging can be locked. */\nexport type DragAxis = 'x' | 'y';\n\n/** Possible orientations for a drop list. */\nexport type DropListOrientation = 'horizontal' | 'vertical' | 'mixed';\n\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nexport const CDK_DRAG_CONFIG = new InjectionToken<DragDropConfig>('CDK_DRAG_CONFIG');\n\n/**\n * Object that can be used to configure the drag\n * items and drop lists within a module or a component.\n */\nexport interface DragDropConfig extends Partial<DragRefConfig> {\n  lockAxis?: DragAxis | null;\n  dragStartDelay?: DragStartDelay;\n  constrainPosition?: DragConstrainPosition;\n  previewClass?: string | string[];\n  boundaryElement?: string;\n  rootElementSelector?: string;\n  draggingDisabled?: boolean;\n  sortingDisabled?: boolean;\n  listAutoScrollDisabled?: boolean;\n  listOrientation?: DropListOrientation;\n  zIndex?: number;\n  previewContainer?: 'global' | 'parent';\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 {Directionality} from '../../bidi';\nimport {\n  Directive,\n  ElementRef,\n  EventEmitter,\n  Input,\n  NgZone,\n  OnDestroy,\n  Output,\n  ViewContainerRef,\n  OnChanges,\n  SimpleChanges,\n  ChangeDetectorRef,\n  InjectionToken,\n  booleanAttribute,\n  afterNextRender,\n  AfterViewInit,\n  inject,\n  Injector,\n  numberAttribute,\n} from '@angular/core';\nimport {coerceElement, coerceNumberProperty} from '../../coercion';\nimport {BehaviorSubject, Observable, Observer, Subject, merge} from 'rxjs';\nimport {startWith, take, map, takeUntil, switchMap, tap} from 'rxjs/operators';\nimport type {\n  CdkDragDrop,\n  CdkDragEnd,\n  CdkDragEnter,\n  CdkDragExit,\n  CdkDragMove,\n  CdkDragStart,\n  CdkDragRelease,\n} from '../drag-events';\nimport {CDK_DRAG_HANDLE, CdkDragHandle} from './drag-handle';\nimport {CdkDragPlaceholder} from './drag-placeholder';\nimport {CdkDragPreview} from './drag-preview';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\nimport {DragRef, Point, PreviewContainer, DragConstrainPosition, createDragRef} from '../drag-ref';\nimport type {CdkDropList} from './drop-list';\nimport {CDK_DRAG_CONFIG, DragDropConfig, DragStartDelay, DragAxis} from './config';\nimport {assertElementNode} from './assertions';\nimport {DragDropRegistry} from '../drag-drop-registry';\n\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DROP_LIST = new InjectionToken<CdkDropList>('CdkDropList');\n\n/** Element that can be moved inside a CdkDropList container. */\n@Directive({\n  selector: '[cdkDrag]',\n  exportAs: 'cdkDrag',\n  host: {\n    'class': 'cdk-drag',\n    '[class.cdk-drag-disabled]': 'disabled',\n    '[class.cdk-drag-dragging]': '_dragRef.isDragging()',\n  },\n  providers: [{provide: CDK_DRAG_PARENT, useExisting: CdkDrag}],\n})\nexport class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {\n  element = inject<ElementRef<HTMLElement>>(ElementRef);\n  dropContainer = inject<CdkDropList>(CDK_DROP_LIST, {optional: true, skipSelf: true})!;\n  private _ngZone = inject(NgZone);\n  private _viewContainerRef = inject(ViewContainerRef);\n  private _dir = inject(Directionality, {optional: true});\n  private _changeDetectorRef = inject(ChangeDetectorRef);\n  private _selfHandle = inject<CdkDragHandle>(CDK_DRAG_HANDLE, {optional: true, self: true});\n  private _parentDrag = inject<CdkDrag>(CDK_DRAG_PARENT, {optional: true, skipSelf: true});\n  private _dragDropRegistry = inject(DragDropRegistry);\n\n  private readonly _destroyed = new Subject<void>();\n  private _handles = new BehaviorSubject<CdkDragHandle[]>([]);\n  private _previewTemplate: CdkDragPreview | null = null;\n  private _placeholderTemplate: CdkDragPlaceholder | null = null;\n\n  /** Reference to the underlying drag instance. */\n  _dragRef: DragRef<CdkDrag<T>>;\n\n  /** Arbitrary data to attach to this drag instance. */\n  @Input('cdkDragData') data!: T;\n\n  /** Locks the position of the dragged element along the specified axis. */\n  @Input('cdkDragLockAxis') lockAxis: DragAxis | null = null;\n\n  /**\n   * Selector that will be used to determine the root draggable element, starting from\n   * the `cdkDrag` element and going up the DOM. Passing an alternate root element is useful\n   * when trying to enable dragging on an element that you might not have access to.\n   */\n  @Input('cdkDragRootElement') rootElementSelector!: string;\n\n  /**\n   * Node or selector that will be used to determine the element to which the draggable's\n   * position will be constrained. If a string is passed in, it'll be used as a selector that\n   * will be matched starting from the element's parent and going up the DOM until a match\n   * has been found.\n   */\n  @Input('cdkDragBoundary') boundaryElement!: string | ElementRef<HTMLElement> | HTMLElement;\n\n  /**\n   * Amount of milliseconds to wait after the user has put their\n   * pointer down before starting to drag the element.\n   */\n  @Input('cdkDragStartDelay') dragStartDelay!: DragStartDelay;\n\n  /**\n   * Sets the position of a `CdkDrag` that is outside of a drop container.\n   * Can be used to restore the element's position for a returning user.\n   */\n  @Input('cdkDragFreeDragPosition') freeDragPosition!: Point;\n\n  /** Whether starting to drag this element is disabled. */\n  @Input({alias: 'cdkDragDisabled', transform: booleanAttribute})\n  get disabled(): boolean {\n    return this._disabled || !!(this.dropContainer && this.dropContainer.disabled);\n  }\n  set disabled(value: boolean) {\n    this._disabled = value;\n    this._dragRef.disabled = this._disabled;\n  }\n  private _disabled = false;\n\n  /**\n   * Function that can be used to customize the logic of how the position of the drag item\n   * is limited while it's being dragged. Gets called with a point containing the current position\n   * of the user's pointer on the page, a reference to the item being dragged and its dimensions.\n   * Should return a point describing where the item should be rendered.\n   */\n  @Input('cdkDragConstrainPosition') constrainPosition?: DragConstrainPosition;\n\n  /** Class to be added to the preview element. */\n  @Input('cdkDragPreviewClass') previewClass!: string | string[];\n\n  /**\n   * Configures the place into which the preview of the item will be inserted. Can be configured\n   * globally through `CDK_DROP_LIST`. Possible values:\n   * - `global` - Preview will be inserted at the bottom of the `<body>`. The advantage is that\n   * you don't have to worry about `overflow: hidden` or `z-index`, but the item won't retain\n   * its inherited styles.\n   * - `parent` - Preview will be inserted into the parent of the drag item. The advantage is that\n   * inherited styles will be preserved, but it may be clipped by `overflow: hidden` or not be\n   * visible due to `z-index`. Furthermore, the preview is going to have an effect over selectors\n   * like `:nth-child` and some flexbox configurations.\n   * - `ElementRef<HTMLElement> | HTMLElement` - Preview will be inserted into a specific element.\n   * Same advantages and disadvantages as `parent`.\n   */\n  @Input('cdkDragPreviewContainer') previewContainer!: PreviewContainer;\n\n  /**\n   * If the parent of the dragged element has a `scale` transform, it can throw off the\n   * positioning when the user starts dragging. Use this input to notify the CDK of the scale.\n   */\n  @Input({alias: 'cdkDragScale', transform: numberAttribute})\n  scale: number = 1;\n\n  /** Emits when the user starts dragging the item. */\n  @Output('cdkDragStarted') readonly started: EventEmitter<CdkDragStart> =\n    new EventEmitter<CdkDragStart>();\n\n  /** Emits when the user has released a drag item, before any animations have started. */\n  @Output('cdkDragReleased') readonly released: EventEmitter<CdkDragRelease> =\n    new EventEmitter<CdkDragRelease>();\n\n  /** Emits when the user stops dragging an item in the container. */\n  @Output('cdkDragEnded') readonly ended: EventEmitter<CdkDragEnd> = new EventEmitter<CdkDragEnd>();\n\n  /** Emits when the user has moved the item into a new container. */\n  @Output('cdkDragEntered') readonly entered: EventEmitter<CdkDragEnter<any>> = new EventEmitter<\n    CdkDragEnter<any>\n  >();\n\n  /** Emits when the user removes the item its container by dragging it into another container. */\n  @Output('cdkDragExited') readonly exited: EventEmitter<CdkDragExit<any>> = new EventEmitter<\n    CdkDragExit<any>\n  >();\n\n  /** Emits when the user drops the item inside a container. */\n  @Output('cdkDragDropped') readonly dropped: EventEmitter<CdkDragDrop<any>> = new EventEmitter<\n    CdkDragDrop<any>\n  >();\n\n  /**\n   * Emits as the user is dragging the item. Use with caution,\n   * because this event will fire for every pixel that the user has dragged.\n   */\n  @Output('cdkDragMoved')\n  readonly moved: Observable<CdkDragMove<T>> = new Observable(\n    (observer: Observer<CdkDragMove<T>>) => {\n      const subscription = this._dragRef.moved\n        .pipe(\n          map(movedEvent => ({\n            source: this,\n            pointerPosition: movedEvent.pointerPosition,\n            event: movedEvent.event,\n            delta: movedEvent.delta,\n            distance: movedEvent.distance,\n          })),\n        )\n        .subscribe(observer);\n\n      return () => {\n        subscription.unsubscribe();\n      };\n    },\n  );\n\n  private _injector = inject(Injector);\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const dropContainer = this.dropContainer;\n    const config = inject<DragDropConfig>(CDK_DRAG_CONFIG, {optional: true});\n\n    this._dragRef = createDragRef(this._injector, this.element, {\n      dragStartThreshold:\n        config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n      pointerDirectionChangeThreshold:\n        config && config.pointerDirectionChangeThreshold != null\n          ? config.pointerDirectionChangeThreshold\n          : 5,\n      zIndex: config?.zIndex,\n    });\n    this._dragRef.data = this;\n    this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement, this);\n\n    if (config) {\n      this._assignDefaults(config);\n    }\n\n    // Note that usually the container is assigned when the drop list is picks up the item, but in\n    // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n    // where there are no items on the first change detection pass, but the items get picked up as\n    // soon as the user triggers another pass by dragging. This is a problem, because the item would\n    // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n    // is too late since the two modes save different kinds of information. We work around it by\n    // assigning the drop container both from here and the list.\n    if (dropContainer) {\n      dropContainer.addItem(this);\n\n      // The drop container reads this so we need to sync it here.\n      dropContainer._dropListRef.beforeStarted.pipe(takeUntil(this._destroyed)).subscribe(() => {\n        this._dragRef.scale = this.scale;\n      });\n    }\n\n    this._syncInputs(this._dragRef);\n    this._handleEvents(this._dragRef);\n  }\n\n  /**\n   * Returns the element that is being used as a placeholder\n   * while the current element is being dragged.\n   */\n  getPlaceholderElement(): HTMLElement {\n    return this._dragRef.getPlaceholderElement();\n  }\n\n  /** Returns the root draggable element. */\n  getRootElement(): HTMLElement {\n    return this._dragRef.getRootElement();\n  }\n\n  /** Resets a standalone drag item to its initial position. */\n  reset(): void {\n    this._dragRef.reset();\n  }\n\n  /** Resets drag item to end of boundary element. */\n  resetToBoundary() {\n    this._dragRef.resetToBoundary();\n  }\n\n  /**\n   * Gets the pixel coordinates of the draggable outside of a drop container.\n   */\n  getFreeDragPosition(): Readonly<Point> {\n    return this._dragRef.getFreeDragPosition();\n  }\n\n  /**\n   * Sets the current position in pixels the draggable outside of a drop container.\n   * @param value New position to be set.\n   */\n  setFreeDragPosition(value: Point): void {\n    this._dragRef.setFreeDragPosition(value);\n  }\n\n  ngAfterViewInit() {\n    // We need to wait until after render, in order for the reference\n    // element to be in the proper place in the DOM. This is mostly relevant\n    // for draggable elements inside portals since they get stamped out in\n    // their original DOM position, and then they get transferred to the portal.\n    afterNextRender(\n      () => {\n        this._updateRootElement();\n        this._setupHandlesListener();\n        this._dragRef.scale = this.scale;\n\n        if (this.freeDragPosition) {\n          this._dragRef.setFreeDragPosition(this.freeDragPosition);\n        }\n      },\n      {injector: this._injector},\n    );\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    const rootSelectorChange = changes['rootElementSelector'];\n    const positionChange = changes['freeDragPosition'];\n\n    // We don't have to react to the first change since it's being\n    // handled in the `afterNextRender` queued up in the constructor.\n    if (rootSelectorChange && !rootSelectorChange.firstChange) {\n      this._updateRootElement();\n    }\n\n    // Scale affects the free drag position so we need to sync it up here.\n    this._dragRef.scale = this.scale;\n\n    // Skip the first change since it's being handled in the `afterNextRender` queued up in the\n    // constructor.\n    if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n      this._dragRef.setFreeDragPosition(this.freeDragPosition);\n    }\n  }\n\n  ngOnDestroy() {\n    if (this.dropContainer) {\n      this.dropContainer.removeItem(this);\n    }\n\n    this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement);\n\n    // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n    this._ngZone.runOutsideAngular(() => {\n      this._handles.complete();\n      this._destroyed.next();\n      this._destroyed.complete();\n      this._dragRef.dispose();\n    });\n  }\n\n  _addHandle(handle: CdkDragHandle) {\n    const handles = this._handles.getValue();\n    handles.push(handle);\n    this._handles.next(handles);\n  }\n\n  _removeHandle(handle: CdkDragHandle) {\n    const handles = this._handles.getValue();\n    const index = handles.indexOf(handle);\n\n    if (index > -1) {\n      handles.splice(index, 1);\n      this._handles.next(handles);\n    }\n  }\n\n  _setPreviewTemplate(preview: CdkDragPreview) {\n    this._previewTemplate = preview;\n  }\n\n  _resetPreviewTemplate(preview: CdkDragPreview) {\n    if (preview === this._previewTemplate) {\n      this._previewTemplate = null;\n    }\n  }\n\n  _setPlaceholderTemplate(placeholder: CdkDragPlaceholder) {\n    this._placeholderTemplate = placeholder;\n  }\n\n  _resetPlaceholderTemplate(placeholder: CdkDragPlaceholder) {\n    if (placeholder === this._placeholderTemplate) {\n      this._placeholderTemplate = null;\n    }\n  }\n\n  /** Syncs the root element with the `DragRef`. */\n  private _updateRootElement() {\n    const element = this.element.nativeElement as HTMLElement;\n    let rootElement = element;\n    if (this.rootElementSelector) {\n      rootElement =\n        element.closest !== undefined\n          ? (element.closest(this.rootElementSelector) as HTMLElement)\n          : // Comment tag doesn't have closest method, so use parent's one.\n            (element.parentElement?.closest(this.rootElementSelector) as HTMLElement);\n    }\n\n    if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      assertElementNode(rootElement, 'cdkDrag');\n    }\n\n    this._dragRef.withRootElement(rootElement || element);\n  }\n\n  /** Gets the boundary element, based on the `boundaryElement` value. */\n  private _getBoundaryElement() {\n    const boundary = this.boundaryElement;\n\n    if (!boundary) {\n      return null;\n    }\n\n    if (typeof boundary === 'string') {\n      return this.element.nativeElement.closest<HTMLElement>(boundary);\n    }\n\n    return coerceElement(boundary);\n  }\n\n  /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n  private _syncInputs(ref: DragRef<CdkDrag<T>>) {\n    ref.beforeStarted.subscribe(() => {\n      if (!ref.isDragging()) {\n        const dir = this._dir;\n        const dragStartDelay = this.dragStartDelay;\n        const placeholder = this._placeholderTemplate\n          ? {\n              template: this._placeholderTemplate.templateRef,\n              context: this._placeholderTemplate.data,\n              viewContainer: this._viewContainerRef,\n            }\n          : null;\n        const preview = this._previewTemplate\n          ? {\n              template: this._previewTemplate.templateRef,\n              context: this._previewTemplate.data,\n              matchSize: this._previewTemplate.matchSize,\n              viewContainer: this._viewContainerRef,\n            }\n          : null;\n\n        ref.disabled = this.disabled;\n        ref.lockAxis = this.lockAxis;\n        ref.scale = this.scale;\n        ref.dragStartDelay =\n          typeof dragStartDelay === 'object' && dragStartDelay\n            ? dragStartDelay\n            : coerceNumberProperty(dragStartDelay);\n        ref.constrainPosition = this.constrainPosition;\n        ref.previewClass = this.previewClass;\n        ref\n          .withBoundaryElement(this._getBoundaryElement())\n          .withPlaceholderTemplate(placeholder)\n          .withPreviewTemplate(preview)\n          .withPreviewContainer(this.previewContainer || 'global');\n\n        if (dir) {\n          ref.withDirection(dir.value);\n        }\n      }\n    });\n\n    // This only needs to be resolved once.\n    ref.beforeStarted.pipe(take(1)).subscribe(() => {\n      // If we managed to resolve a parent through DI, use it.\n      if (this._parentDrag) {\n        ref.withParent(this._parentDrag._dragRef);\n        return;\n      }\n\n      // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n      // the item was projected into another item by something like `ngTemplateOutlet`.\n      let parent = this.element.nativeElement.parentElement;\n      while (parent) {\n        const parentDrag = this._dragDropRegistry.getDragDirectiveForNode(parent);\n        if (parentDrag) {\n          ref.withParent(parentDrag._dragRef);\n          break;\n        }\n        parent = parent.parentElement;\n      }\n    });\n  }\n\n  /** Handles the events from the underlying `DragRef`. */\n  private _handleEvents(ref: DragRef<CdkDrag<T>>) {\n    ref.started.subscribe(startEvent => {\n      this.started.emit({source: this, event: startEvent.event});\n\n      // Since all of these events run outside of change detection,\n      // we need to ensure that everything is marked correctly.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.released.subscribe(releaseEvent => {\n      this.released.emit({source: this, event: releaseEvent.event});\n    });\n\n    ref.ended.subscribe(endEvent => {\n      this.ended.emit({\n        source: this,\n        distance: endEvent.distance,\n        dropPoint: endEvent.dropPoint,\n        event: endEvent.event,\n      });\n\n      // Since all of these events run outside of change detection,\n      // we need to ensure that everything is marked correctly.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.entered.subscribe(enterEvent => {\n      this.entered.emit({\n        container: enterEvent.container.data,\n        item: this,\n        currentIndex: enterEvent.currentIndex,\n      });\n    });\n\n    ref.exited.subscribe(exitEvent => {\n      this.exited.emit({\n        container: exitEvent.container.data,\n        item: this,\n      });\n    });\n\n    ref.dropped.subscribe(dropEvent => {\n      this.dropped.emit({\n        previousIndex: dropEvent.previousIndex,\n        currentIndex: dropEvent.currentIndex,\n        previousContainer: dropEvent.previousContainer.data,\n        container: dropEvent.container.data,\n        isPointerOverContainer: dropEvent.isPointerOverContainer,\n        item: this,\n        distance: dropEvent.distance,\n        dropPoint: dropEvent.dropPoint,\n        event: dropEvent.event,\n      });\n    });\n  }\n\n  /** Assigns the default input values based on a provided config object. */\n  private _assignDefaults(config: DragDropConfig) {\n    const {\n      lockAxis,\n      dragStartDelay,\n      constrainPosition,\n      previewClass,\n      boundaryElement,\n      draggingDisabled,\n      rootElementSelector,\n      previewContainer,\n    } = config;\n\n    this.disabled = draggingDisabled == null ? false : draggingDisabled;\n    this.dragStartDelay = dragStartDelay || 0;\n    this.lockAxis = lockAxis || null;\n\n    if (constrainPosition) {\n      this.constrainPosition = constrainPosition;\n    }\n\n    if (previewClass) {\n      this.previewClass = previewClass;\n    }\n\n    if (boundaryElement) {\n      this.boundaryElement = boundaryElement;\n    }\n\n    if (rootElementSelector) {\n      this.rootElementSelector = rootElementSelector;\n    }\n\n    if (previewContainer) {\n      this.previewContainer = previewContainer;\n    }\n  }\n\n  /** Sets up the listener that syncs the handles with the drag ref. */\n  private _setupHandlesListener() {\n    // Listen for any newly-added handles.\n    this._handles\n      .pipe(\n        // Sync the new handles with the DragRef.\n        tap(handles => {\n          const handleElements = handles.map(handle => handle.element);\n\n          // Usually handles are only allowed to be a descendant of the drag element, but if\n          // the consumer defined a different drag root, we should allow the drag element\n          // itself to be a handle too.\n          if (this._selfHandle && this.rootElementSelector) {\n            handleElements.push(this.element);\n          }\n\n          this._dragRef.withHandles(handleElements);\n        }),\n        // Listen if the state of any of the handles changes.\n        switchMap((handles: CdkDragHandle[]) => {\n          return merge(\n            ...handles.map(item => item._stateChanges.pipe(startWith(item))),\n          ) as Observable<CdkDragHandle>;\n        }),\n        takeUntil(this._destroyed),\n      )\n      .subscribe(handleInstance => {\n        // Enabled/disable the handle that changed in the DragRef.\n        const dragRef = this._dragRef;\n        const handle = handleInstance.element.nativeElement;\n        handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\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 */\n\nimport {Directive, OnDestroy, Input, InjectionToken, booleanAttribute} from '@angular/core';\n\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DROP_LIST_GROUP = new InjectionToken<CdkDropListGroup<unknown>>(\n  'CdkDropListGroup',\n);\n\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\n@Directive({\n  selector: '[cdkDropListGroup]',\n  exportAs: 'cdkDropListGroup',\n  providers: [{provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup}],\n})\nexport class CdkDropListGroup<T> implements OnDestroy {\n  /** Drop lists registered inside the group. */\n  readonly _items = new Set<T>();\n\n  /** Whether starting a dragging sequence from inside this group is disabled. */\n  @Input({alias: 'cdkDropListGroupDisabled', transform: booleanAttribute})\n  disabled: boolean = false;\n\n  ngOnDestroy() {\n    this._items.clear();\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 {NumberInput, coerceArray, coerceNumberProperty} from '../../coercion';\nimport {\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  Output,\n  Directive,\n  ChangeDetectorRef,\n  booleanAttribute,\n  inject,\n  Injector,\n} from '@angular/core';\nimport {Directionality} from '../../bidi';\nimport {_IdGenerator} from '../../a11y';\nimport {ScrollDispatcher} from '../../scrolling';\nimport {CDK_DROP_LIST, CdkDrag} from './drag';\nimport {CdkDragDrop, CdkDragEnter, CdkDragExit, CdkDragSortEvent} from '../drag-events';\nimport {CDK_DROP_LIST_GROUP, CdkDropListGroup} from './drop-list-group';\nimport {createDropListRef, DropListRef} from '../drop-list-ref';\nimport {DragRef} from '../drag-ref';\nimport {DropListOrientation, DragAxis, DragDropConfig, CDK_DRAG_CONFIG} from './config';\nimport {merge, Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {assertElementNode} from './assertions';\n\n/** Container that wraps a set of draggable items. */\n@Directive({\n  selector: '[cdkDropList], cdk-drop-list',\n  exportAs: 'cdkDropList',\n  providers: [\n    // Prevent child drop lists from picking up the same group as their parent.\n    {provide: CDK_DROP_LIST_GROUP, useValue: undefined},\n    {provide: CDK_DROP_LIST, useExisting: CdkDropList},\n  ],\n  host: {\n    'class': 'cdk-drop-list',\n    '[attr.id]': 'id',\n    '[class.cdk-drop-list-disabled]': 'disabled',\n    '[class.cdk-drop-list-dragging]': '_dropListRef.isDragging()',\n    '[class.cdk-drop-list-receiving]': '_dropListRef.isReceiving()',\n  },\n})\nexport class CdkDropList<T = any> implements OnDestroy {\n  element = inject<ElementRef<HTMLElement>>(ElementRef);\n  private _changeDetectorRef = inject(ChangeDetectorRef);\n  private _scrollDispatcher = inject(ScrollDispatcher);\n  private _dir = inject(Directionality, {optional: true});\n  private _group = inject<CdkDropListGroup<CdkDropList>>(CDK_DROP_LIST_GROUP, {\n    optional: true,\n    skipSelf: true,\n  });\n\n  /** Refs that have been synced with the drop ref most recently. */\n  private _latestSortedRefs: DragRef[] | undefined;\n\n  /** Emits when the list has been destroyed. */\n  private readonly _destroyed = new Subject<void>();\n\n  /** Whether the element's scrollable parents have been resolved. */\n  private _scrollableParentsResolved = false;\n\n  /** Keeps track of the drop lists that are currently on the page. */\n  private static _dropLists: CdkDropList[] = [];\n\n  /** Reference to the underlying drop list instance. */\n  _dropListRef: DropListRef<CdkDropList<T>>;\n\n  /**\n   * Other draggable containers that this container is connected to and into which the\n   * container's items can be transferred. Can either be references to other drop containers,\n   * or their unique IDs.\n   */\n  @Input('cdkDropListConnectedTo')\n  connectedTo: (CdkDropList | string)[] | CdkDropList | string = [];\n\n  /** Arbitrary data to attach to this container. */\n  @Input('cdkDropListData') data!: T;\n\n  /** Direction in which the list is oriented. */\n  @Input('cdkDropListOrientation') orientation: DropListOrientation = 'vertical';\n\n  /**\n   * Unique ID for the drop zone. Can be used as a reference\n   * in the `connectedTo` of another `CdkDropList`.\n   */\n  @Input() id: string = inject(_IdGenerator).getId('cdk-drop-list-');\n\n  /** Locks the position of the draggable elements inside the container along the specified axis. */\n  @Input('cdkDropListLockAxis') lockAxis: DragAxis | null = null;\n\n  /** Whether starting a dragging sequence from this container is disabled. */\n  @Input({alias: 'cdkDropListDisabled', transform: booleanAttribute})\n  get disabled(): boolean {\n    return this._disabled || (!!this._group && this._group.disabled);\n  }\n  set disabled(value: boolean) {\n    // Usually we sync the directive and ref state right before dragging starts, in order to have\n    // a single point of failure and to avoid having to use setters for everything. `disabled` is\n    // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n    // the user in a disabled state, so we also need to sync it as it's being set.\n    this._dropListRef.disabled = this._disabled = value;\n  }\n  private _disabled = false;\n\n  /** Whether sorting within this drop list is disabled. */\n  @Input({alias: 'cdkDropListSortingDisabled', transform: booleanAttribute})\n  sortingDisabled: boolean = false;\n\n  /**\n   * Function that is used to determine whether an item\n   * is allowed to be moved into a drop container.\n   */\n  @Input('cdkDropListEnterPredicate')\n  enterPredicate: (drag: CdkDrag, drop: CdkDropList) => boolean = () => true;\n\n  /** Functions that is used to determine whether an item can be sorted into a particular index. */\n  @Input('cdkDropListSortPredicate')\n  sortPredicate: (index: number, drag: CdkDrag, drop: CdkDropList) => boolean = () => true;\n\n  /** Whether to auto-scroll the view when the user moves their pointer close to the edges. */\n  @Input({alias: 'cdkDropListAutoScrollDisabled', transform: booleanAttribute})\n  autoScrollDisabled: boolean = false;\n\n  /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n  @Input('cdkDropListAutoScrollStep')\n  autoScrollStep: NumberInput;\n\n  /**\n   * Selector that will be used to resolve an alternate element container for the drop list.\n   * Passing an alternate container is useful for the cases where one might not have control\n   * over the parent node of the draggable items within the list (e.g. due to content projection).\n   * This allows for usages like:\n   *\n   * ```\n   * <div cdkDropList cdkDropListElementContainer=\".inner\">\n   *   <div class=\"inner\">\n   *     <div cdkDrag></div>\n   *   </div>\n   * </div>\n   * ```\n   */\n  @Input('cdkDropListElementContainer') elementContainerSelector: string | null = null;\n\n  /**\n   * By default when an item leaves its initial container, its placeholder will be transferred\n   * to the new container. If that's not desirable for your use case, you can enable this option\n   * which will clone the placeholder and leave it inside the original container. If the item is\n   * returned to the initial container, the anchor element will be removed automatically.\n   *\n   * The cloned placeholder can be styled by targeting the `cdk-drag-anchor` class.\n   *\n   * This option is useful in combination with `cdkDropListSortingDisabled` to implement copying\n   * behavior in a drop list.\n   */\n  @Input({alias: 'cdkDropListHasAnchor', transform: booleanAttribute})\n  hasAnchor: boolean = false;\n\n  /** Emits when the user drops an item inside the container. */\n  @Output('cdkDropListDropped')\n  readonly dropped: EventEmitter<CdkDragDrop<T, any>> = new EventEmitter<CdkDragDrop<T, any>>();\n\n  /**\n   * Emits when the user has moved a new drag item into this container.\n   */\n  @Output('cdkDropListEntered')\n  readonly entered: EventEmitter<CdkDragEnter<T>> = new EventEmitter<CdkDragEnter<T>>();\n\n  /**\n   * Emits when the user removes an item from the container\n   * by dragging it into another container.\n   */\n  @Output('cdkDropListExited')\n  readonly exited: EventEmitter<CdkDragExit<T>> = new EventEmitter<CdkDragExit<T>>();\n\n  /** Emits as the user is swapping items while actively dragging. */\n  @Output('cdkDropListSorted')\n  readonly sorted: EventEmitter<CdkDragSortEvent<T>> = new EventEmitter<CdkDragSortEvent<T>>();\n\n  /**\n   * Keeps track of the items that are registered with this container. Historically we used to\n   * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n   * well which means that we can't handle cases like dragging the headers of a `mat-table`\n   * correctly. What we do instead is to have the items register themselves with the container\n   * and then we sort them based on their position in the DOM.\n   */\n  private _unsortedItems = new Set<CdkDrag>();\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const config = inject<DragDropConfig>(CDK_DRAG_CONFIG, {optional: true});\n    const injector = inject(Injector);\n\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      assertElementNode(this.element.nativeElement, 'cdkDropList');\n    }\n\n    this._dropListRef = createDropListRef(injector, this.element);\n    this._dropListRef.data = this;\n\n    if (config) {\n      this._assignDefaults(config);\n    }\n\n    this._dropListRef.enterPredicate = (drag: DragRef<CdkDrag>, drop: DropListRef<CdkDropList>) => {\n      return this.enterPredicate(drag.data, drop.data);\n    };\n\n    this._dropListRef.sortPredicate = (\n      index: number,\n      drag: DragRef<CdkDrag>,\n      drop: DropListRef<CdkDropList>,\n    ) => {\n      return this.sortPredicate(index, drag.data, drop.data);\n    };\n\n    this._setupInputSyncSubscription(this._dropListRef);\n    this._handleEvents(this._dropListRef);\n    CdkDropList._dropLists.push(this);\n\n    if (this._group) {\n      this._group._items.add(this);\n    }\n  }\n\n  /** Registers an items with the drop list. */\n  addItem(item: CdkDrag): void {\n    this._unsortedItems.add(item);\n    item._dragRef._withDropContainer(this._dropListRef);\n\n    // Only sync the items while dragging since this method is\n    // called when items are being initialized one-by-one.\n    if (this._dropListRef.isDragging()) {\n      this._syncItemsWithRef(this.getSortedItems().map(item => item._dragRef));\n    }\n  }\n\n  /** Removes an item from the drop list. */\n  removeItem(item: CdkDrag): void {\n    this._unsortedItems.delete(item);\n\n    // This method might be called on destroy so we always want to sync with the ref.\n    // Note that we reuse the last set of synced items, rather than re-sorting the whole\n    // list, because it can slow down re-renders of large lists (see #30737).\n    if (this._latestSortedRefs) {\n      const index = this._latestSortedRefs.indexOf(item._dragRef);\n\n      if (index > -1) {\n        this._latestSortedRefs.splice(index, 1);\n        this._syncItemsWithRef(this._latestSortedRefs);\n      }\n    }\n  }\n\n  /** Gets the registered items in the list, sorted by their position in the DOM. */\n  getSortedItems(): CdkDrag[] {\n    return Array.from(this._unsortedItems).sort((a: CdkDrag, b: CdkDrag) => {\n      const documentPosition = a._dragRef\n        .getVisibleElement()\n        .compareDocumentPosition(b._dragRef.getVisibleElement());\n\n      // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n      // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n      // tslint:disable-next-line:no-bitwise\n      return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n    });\n  }\n\n  ngOnDestroy() {\n    const index = CdkDropList._dropLists.indexOf(this);\n\n    if (index > -1) {\n      CdkDropList._dropLists.splice(index, 1);\n    }\n\n    if (this._group) {\n      this._group._items.delete(this);\n    }\n\n    this._latestSortedRefs = undefined;\n    this._unsortedItems.clear();\n    this._dropListRef.dispose();\n    this._destroyed.next();\n    this._destroyed.complete();\n  }\n\n  /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n  private _setupInputSyncSubscription(ref: DropListRef<CdkDropList>) {\n    if (this._dir) {\n      this._dir.change\n        .pipe(startWith(this._dir.value), takeUntil(this._destroyed))\n        .subscribe(value => ref.withDirection(value));\n    }\n\n    ref.beforeStarted.subscribe(() => {\n      const siblings = coerceArray(this.connectedTo).map(drop => {\n        if (typeof drop === 'string') {\n          const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n\n          if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n          }\n\n          return correspondingDropList!;\n        }\n\n        return drop;\n      });\n\n      if (this._group) {\n        this._group._items.forEach(drop => {\n          if (siblings.indexOf(drop) === -1) {\n            siblings.push(drop);\n          }\n        });\n      }\n\n      // Note that we resolve the scrollable parents here so that we delay the resolution\n      // as long as possible, ensuring that the element is in its final place in the DOM.\n      if (!this._scrollableParentsResolved) {\n        const scrollableParents = this._scrollDispatcher\n          .getAncestorScrollContainers(this.element)\n          .map(scrollable => scrollable.getElementRef().nativeElement);\n        this._dropListRef.withScrollableParents(scrollableParents);\n\n        // Only do this once since it involves traversing the DOM and the parents\n        // shouldn't be able to change without the drop list being destroyed.\n        this._scrollableParentsResolved = true;\n      }\n\n      if (this.elementContainerSelector) {\n        const container = this.element.nativeElement.querySelector(this.elementContainerSelector);\n\n        if (!container && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw new Error(\n            `CdkDropList could not find an element container matching the selector \"${this.elementContainerSelector}\"`,\n          );\n        }\n\n        ref.withElementContainer(container as HTMLElement);\n      }\n\n      ref.disabled = this.disabled;\n      ref.lockAxis = this.lockAxis;\n      ref.sortingDisabled = this.sortingDisabled;\n      ref.autoScrollDisabled = this.autoScrollDisabled;\n      ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n      ref.hasAnchor = this.hasAnchor;\n      ref\n        .connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef))\n        .withOrientation(this.orientation);\n    });\n  }\n\n  /** Handles events from the underlying DropListRef. */\n  private _handleEvents(ref: DropListRef<CdkDropList>) {\n    ref.beforeStarted.subscribe(() => {\n      this._syncItemsWithRef(this.getSortedItems().map(item => item._dragRef));\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.entered.subscribe(event => {\n      this.entered.emit({\n        container: this,\n        item: event.item.data,\n        currentIndex: event.currentIndex,\n      });\n    });\n\n    ref.exited.subscribe(event => {\n      this.exited.emit({\n        container: this,\n        item: event.item.data,\n      });\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.sorted.subscribe(event => {\n      this.sorted.emit({\n        previousIndex: event.previousIndex,\n        currentIndex: event.currentIndex,\n        container: this,\n        item: event.item.data,\n      });\n    });\n\n    ref.dropped.subscribe(dropEvent => {\n      this.dropped.emit({\n        previousIndex: dropEvent.previousIndex,\n        currentIndex: dropEvent.currentIndex,\n        previousContainer: dropEvent.previousContainer.data,\n        container: dropEvent.container.data,\n        item: dropEvent.item.data,\n        isPointerOverContainer: dropEvent.isPointerOverContainer,\n        distance: dropEvent.distance,\n        dropPoint: dropEvent.dropPoint,\n        event: dropEvent.event,\n      });\n\n      // Mark for check since all of these events run outside of change\n      // detection and we're not guaranteed for something else to have triggered it.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    merge(ref.receivingStarted, ref.receivingStopped).subscribe(() =>\n      this._changeDetectorRef.markForCheck(),\n    );\n  }\n\n  /** Assigns the default input values based on a provided config object. */\n  private _assignDefaults(config: DragDropConfig) {\n    const {lockAxis, draggingDisabled, sortingDisabled, listAutoScrollDisabled, listOrientation} =\n      config;\n\n    this.disabled = draggingDisabled == null ? false : draggingDisabled;\n    this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n    this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n    this.orientation = listOrientation || 'vertical';\n    this.lockAxis = lockAxis || null;\n  }\n\n  /** Syncs up the registered drag items with underlying drop list ref. */\n  private _syncItemsWithRef(items: DragRef[]) {\n    this._latestSortedRefs = items;\n    this._dropListRef.withItems(items);\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 {\n  Directive,\n  InjectionToken,\n  Input,\n  OnDestroy,\n  TemplateRef,\n  booleanAttribute,\n  inject,\n} from '@angular/core';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_PREVIEW = new InjectionToken<CdkDragPreview>('CdkDragPreview');\n\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\n@Directive({\n  selector: 'ng-template[cdkDragPreview]',\n  providers: [{provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview}],\n})\nexport class CdkDragPreview<T = any> implements OnDestroy {\n  templateRef = inject<TemplateRef<T>>(TemplateRef);\n\n  private _drag = inject(CDK_DRAG_PARENT, {optional: true});\n\n  /** Context data to be added to the preview template instance. */\n  @Input() data!: T;\n\n  /** Whether the preview should preserve the same size as the item that is being dragged. */\n  @Input({transform: booleanAttribute}) matchSize: boolean = false;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    this._drag?._setPreviewTemplate(this);\n  }\n\n  ngOnDestroy(): void {\n    this._drag?._resetPreviewTemplate(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 {Directive, TemplateRef, Input, InjectionToken, inject, OnDestroy} from '@angular/core';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_PLACEHOLDER = new InjectionToken<CdkDragPlaceholder>('CdkDragPlaceholder');\n\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\n@Directive({\n  selector: 'ng-template[cdkDragPlaceholder]',\n  providers: [{provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder}],\n})\nexport class CdkDragPlaceholder<T = any> implements OnDestroy {\n  templateRef = inject<TemplateRef<T>>(TemplateRef);\n\n  private _drag = inject(CDK_DRAG_PARENT, {optional: true});\n\n  /** Context data to be added to the placeholder template instance. */\n  @Input() data!: T;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    this._drag?._setPlaceholderTemplate(this);\n  }\n\n  ngOnDestroy(): void {\n    this._drag?._resetPlaceholderTemplate(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 {NgModule} from '@angular/core';\nimport {CdkScrollableModule} from '../scrolling';\nimport {CdkDropList} from './directives/drop-list';\nimport {CdkDropListGroup} from './directives/drop-list-group';\nimport {CdkDrag} from './directives/drag';\nimport {CdkDragHandle} from './directives/drag-handle';\nimport {CdkDragPreview} from './directives/drag-preview';\nimport {CdkDragPlaceholder} from './directives/drag-placeholder';\nimport {DragDrop} from './drag-drop';\n\nconst DRAG_DROP_DIRECTIVES = [\n  CdkDropList,\n  CdkDropListGroup,\n  CdkDrag,\n  CdkDragHandle,\n  CdkDragPreview,\n  CdkDragPlaceholder,\n];\n\n@NgModule({\n  imports: DRAG_DROP_DIRECTIVES,\n  exports: [CdkScrollableModule, ...DRAG_DROP_DIRECTIVES],\n  providers: [DragDrop],\n})\nexport class DragDropModule {}\n\n// Re-export needed by the Angular compiler.\n// See: https://github.com/angular/components/issues/30663.\n// Note: These exports need to be stable and shouldn't be renamed unnecessarily because\n// consuming libraries might have references to them in their own partial compilation output.\nexport {CdkScrollable as ɵɵCdkScrollable} from '../scrolling';\n"],"names":["deepCloneNode","node","clone","cloneNode","descendantsWithId","querySelectorAll","nodeName","toLowerCase","removeAttribute","i","length","transferCanvasData","transferInputData","transferData","selector","callback","descendantElements","cloneElements","cloneUniqueId","source","type","value","name","context","getContext","drawImage","getMutableClientRect","element","rect","getBoundingClientRect","top","right","bottom","left","width","height","x","y","isInsideClientRect","clientRect","isOverflowingParent","parentRect","childRect","isLeftOverflowing","isRightOverflowing","isTopOverflowing","isBottomOverflowing","adjustDomRect","domRect","isPointerNearDomRect","threshold","pointerX","pointerY","xThreshold","yThreshold","ParentPositionTracker","_document","positions","Map","constructor","clear","cache","elements","set","scrollPosition","getViewportScrollPosition","forEach","scrollTop","scrollLeft","handleScroll","event","target","_getEventTarget","cachedPosition","get","newTop","newLeft","viewportScrollPosition","topDifference","leftDifference","position","contains","window","scrollY","scrollX","getRootNode","viewRef","rootNodes","nodeType","ELEMENT_NODE","wrapper","createElement","appendChild","extendStyles","dest","importantProperties","key","hasOwnProperty","setProperty","has","removeProperty","toggleNativeDragInteractions","enable","userSelect","style","toggleVisibility","opacity","combineTransforms","transform","initialTransform","matchElementSize","sourceRect","getTransform","Math","round","capturingEventOptions","capture","activeCapturingEventOptions","passive","_ResetsLoader","deps","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","template","host","DragDropRegistry","_ngZone","inject","NgZone","DOCUMENT","_styleLoader","_CdkPrivateStyleLoader","_renderer","RendererFactory2","createRenderer","_cleanupDocumentTouchmove","_scroll","Subject","_dropInstances","Set","_dragInstances","_activeDragInstances","signal","_globalListeners","_draggingPredicate","item","isDragging","_domNodesToDirectives","pointerMove","pointerUp","registerDropContainer","drop","add","registerDragItem","drag","size","runOutsideAngular","listen","_persistentTouchmoveListener","removeDropContainer","delete","removeDragItem","stopDragging","startDragging","indexOf","load","update","instances","isTouchEvent","startsWith","endEventHandler","e","next","toBind","_preventDefaultWhileDragging","push","map","handler","options","index","splice","_clearGlobalListeners","scrolled","shadowRoot","streams","Observable","observer","cleanup","merge","registerDirectiveNode","dragRef","WeakMap","removeDirectiveNode","getDragDirectiveForNode","ngOnDestroy","instance","complete","preventDefault","some","undefined","Injectable","ɵprov","ɵɵngDeclareInjectable","ngImport","providedIn","parseCssTimeUnitsToMs","multiplier","parseFloat","getTransformTransitionDurationInMs","computedStyle","getComputedStyle","transitionedProperties","parseCssPropertyValue","property","find","prop","propertyIndex","rawDurations","rawDelays","getPropertyValue","split","part","trim","PreviewRef","_rootElement","_direction","_initialDomRect","_previewTemplate","_previewClass","_pickupPositionOnPage","_initialTransform","_zIndex","_previewEmbeddedView","_preview","attach","parent","_createPreview","supportsPopover","destroy","remove","setTransform","addClass","className","classList","getTransitionDuration","addEventListener","previewConfig","previewClass","previewTemplate","preview","rootRect","matchSize","viewContainer","createEmbeddedView","detectChanges","setAttribute","Array","isArray","passiveEventListenerOptions","activeEventListenerOptions","MOUSE_EVENT_IGNORE_TIME","PLACEHOLDER_CLASS","dragImportantProperties","createDragRef","injector","config","dragStartThreshold","pointerDirectionChangeThreshold","renderer","Renderer2","optional","DragRef","ViewportRuler","_config","_viewportRuler","_dragDropRegistry","_rootElementCleanups","_cleanupShadowRootSelectStart","_previewContainer","_placeholderRef","_placeholder","_pickupPositionInElement","_marker","_anchor","_passiveTransform","_activeTransform","_hasStartedDragging","_hasMoved","_initialContainer","_initialIndex","_parentPositions","_moveEvents","_pointerDirectionDelta","_pointerPositionAtLastDirectionChange","_lastKnownPointerPosition","_ownerSVGElement","_rootElementTapHighlight","_pointerMoveSubscription","Subscription","EMPTY","_pointerUpSubscription","_scrollSubscription","_resizeSubscription","_lastTouchEventTime","_dragStartTime","_boundaryElement","_nativeInteractionsEnabled","_previewRect","_boundaryRect","_placeholderTemplate","_handles","_disabledHandles","_dropContainer","_parentDragRef","_cachedShadowRoot","lockAxis","dragStartDelay","scale","disabled","_disabled","_toggleNativeDragInteractions","handle","beforeStarted","started","released","ended","entered","exited","dropped","moved","data","constrainPosition","withRootElement","withParent","parentDragRef","getPlaceholderElement","getRootElement","getVisibleElement","withHandles","handles","coerceElement","disabledHandles","withPreviewTemplate","withPlaceholderTemplate","rootElement","_removeRootElementListeners","_pointerDown","_nativeDragStart","SVGElement","ownerSVGElement","withBoundaryElement","boundaryElement","unsubscribe","change","subscribe","_containInsideBoundaryOnResize","dispose","_destroyPreview","_destroyPlaceholder","_removeListeners","reset","resetToBoundary","offsetX","offsetY","currentLeft","currentTop","disableHandle","enableHandle","withDirection","direction","_withDropContainer","container","getFreeDragPosition","setFreeDragPosition","_applyRootElementTransform","withPreviewContainer","_sortFromLastPointerPosition","_updateActiveDropContainer","_getConstrainedPointerPosition","targetHandle","_getTargetHandle","_initializeDragSequence","_pointerMove","pointerPosition","_getPointerPositionOnPage","distanceX","abs","distanceY","isOverThreshold","isDelayElapsed","Date","now","_getDragStartDelay","_endDragSequence","isReceiving","cancelable","run","_startDragSequence","constrainedPointerPosition","_updatePointerDirectionDelta","offset","activeTransform","observers","distance","_getDragDistance","delta","_pointerUp","webkitTapHighlightColor","_stopScrolling","_animatePreviewToPlaceholder","then","_cleanupDragArtifacts","_cleanupCachedDimensions","dropPoint","_getShadowRoot","dropContainer","shadowDomSelectStart","parentNode","placeholder","_createPlaceholderElement","marker","createComment","ngDevMode","insertBefore","zIndex","_getPreviewInsertionPoint","body","replaceChild","start","getItemIndex","getScrollableParents","referenceElement","stopPropagation","isTouchSequence","isAuxiliaryMouseButton","button","isSyntheticEvent","isFakeEvent","isFakeTouchstartFromScreenReader","isFakeMousedownFromScreenReader","draggable","rootStyles","scrollEvent","_updateOnScroll","_getPointerPositionInElement","currentIndex","isPointerOverContainer","_isOverContainer","previousIndex","previousContainer","rawX","rawY","newContainer","_getSiblingContainerFromPosition","exitIndex","nextItemElement","getItemAtIndex","exit","_conditionallyInsertAnchor","enter","sortingDisabled","_startScrollingIfNecessary","_sortItem","_applyPreviewTransform","Promise","resolve","placeholderRect","duration","propertyName","cleanupListener","clearTimeout","timeout","setTimeout","placeholderConfig","placeholderTemplate","pointerEvents","elementRect","handleElement","referenceRect","point","targetTouches","_getViewportScrollPosition","pageX","pageY","touches","changedTouches","svgMatrix","getScreenCTM","svgPoint","createSVGPoint","matrixTransform","inverse","dropContainerLock","pickupX","pickupY","boundaryRect","previewWidth","previewHeight","_getPreviewRect","minY","maxY","minX","maxX","clamp","pointerPositionOnPage","positionSinceLastChange","changeX","changeY","shouldEnable","currentPosition","pickupPosition","leftOverflow","rightOverflow","topOverflow","bottomOverflow","touch","mouse","scrollDifference","initialParent","previewContainer","documentRef","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","exitContainer","hasAnchor","anchor","before","min","max","moveItemInArray","array","fromIndex","toIndex","from","to","transferArrayItem","currentArray","targetArray","targetIndex","copyArrayItem","SingleAxisSortStrategy","_element","_sortPredicate","_itemPositions","_activeDraggables","orientation","_previousSwap","overlaps","items","withItems","sort","pointerDelta","siblings","newIndex","_getItemIndexFromPointerPosition","isHorizontal","findIndex","currentItem","siblingAtNewPosition","newPosition","itemOffset","_getItemOffsetPx","siblingOffset","_getSiblingOffsetPx","oldOrder","slice","sibling","isDraggedItem","elementToOffset","transformAmount","activeDraggables","newPositionReference","_shouldEnterAsFirstChild","parentElement","_cacheItemPositions","withSortPredicate","predicate","p","getActiveItemsSnapshot","_getVisualItemPositions","updateOnScroll","withElementContainer","elementToMeasure","a","b","reverse","immediateSibling","end","itemPositions","reversed","lastItemRect","firstItemRect","floor","MixedSortStrategy","_rootNode","_activeItems","deltaX","deltaY","_relatedNodes","childNodes","nextSibling","previousSwap","toSwapWith","current","overlapElement","after","newOverlapElement","_getRootNode","elementFromPoint","enterIndex","_getClosestItemIndexToPointer","targetItem","root","elementAtPoint","minDistance","Infinity","minIndex","hypot","DROP_PROXIMITY_THRESHOLD","SCROLL_PROXIMITY_THRESHOLD","AutoScrollVerticalDirection","AutoScrollHorizontalDirection","createDropListRef","DropListRef","autoScrollDisabled","autoScrollStep","enterPredicate","sortPredicate","sorted","receivingStarted","receivingStopped","_container","_isDragging","_sortStrategy","_domRect","_draggables","_siblings","_activeSiblings","_viewportScrollSubscription","_verticalScrollDirection","NONE","_horizontalScrollDirection","_scrollNode","_stopScrollTimers","_scrollableElements","_initialScrollSnap","coercedElement","withOrientation","_draggingStarted","_notifyReceivingSiblings","_cacheParentPositions","_reset","previousItems","draggedItems","filter","every","connectedTo","strategy","withScrollableParents","Error","oldContainerIndex","newContainerIndex","unshift","result","scrollNode","verticalScrollDirection","horizontalScrollDirection","getElementScrollDirections","getViewportSize","getVerticalScrollDirection","getHorizontalScrollDirection","_startScrollInterval","msScrollSnapType","scrollSnapType","_listenToScrollEvents","_stopReceiving","interval","animationFrameScheduler","pipe","takeUntil","scrollStep","UP","scrollBy","DOWN","LEFT","RIGHT","_canReceive","_startReceiving","activeSiblings","initiator","receiver","computedVertical","computedHorizontal","scrollHeight","clientHeight","scrollWidth","clientWidth","DragDrop","_injector","Injector","createDrag","createDropList","CDK_DRAG_PARENT","InjectionToken","assertElementNode","CDK_DRAG_HANDLE","CdkDragHandle","ElementRef","_parentDrag","skipSelf","_stateChanges","nativeElement","_addHandle","ngAfterViewInit","ref","_removeHandle","Directive","ɵdir","ɵɵngDeclareDirective","isStandalone","inputs","booleanAttribute","classAttribute","providers","provide","useExisting","Input","alias","CDK_DRAG_CONFIG","CDK_DROP_LIST","CdkDrag","_viewContainerRef","ViewContainerRef","_dir","Directionality","_changeDetectorRef","ChangeDetectorRef","_selfHandle","self","_destroyed","BehaviorSubject","_dragRef","rootElementSelector","freeDragPosition","EventEmitter","subscription","movedEvent","_assignDefaults","addItem","_dropListRef","_syncInputs","_handleEvents","afterNextRender","_updateRootElement","_setupHandlesListener","ngOnChanges","changes","rootSelectorChange","positionChange","firstChange","removeItem","getValue","_setPreviewTemplate","_resetPreviewTemplate","_setPlaceholderTemplate","_resetPlaceholderTemplate","closest","_getBoundaryElement","boundary","dir","templateRef","coerceNumberProperty","take","parentDrag","startEvent","emit","markForCheck","releaseEvent","endEvent","enterEvent","exitEvent","dropEvent","draggingDisabled","tap","handleElements","switchMap","startWith","handleInstance","numberAttribute","exportAs","usesOnChanges","Output","CDK_DROP_LIST_GROUP","CdkDropListGroup","_items","CdkDropList","_scrollDispatcher","ScrollDispatcher","_group","_latestSortedRefs","_scrollableParentsResolved","_dropLists","id","_IdGenerator","getId","elementContainerSelector","_unsortedItems","_setupInputSyncSubscription","_syncItemsWithRef","getSortedItems","documentPosition","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","coerceArray","correspondingDropList","list","console","warn","scrollableParents","getAncestorScrollContainers","scrollable","getElementRef","querySelector","listAutoScrollDisabled","listOrientation","outputs","properties","useValue","CDK_DRAG_PREVIEW","CdkDragPreview","TemplateRef","_drag","CDK_DRAG_PLACEHOLDER","CdkDragPlaceholder","DRAG_DROP_DIRECTIVES","DragDropModule","NgModule","ɵmod","ɵɵngDeclareNgModule","exports","CdkScrollableModule","ɵinj","ɵɵngDeclareInjector","imports"],"mappings":";;;;;;;;;;;;;;;;;;;;AASM,SAAUA,aAAaA,CAACC,IAAiB,EAAA;AAC7C,EAAA,MAAMC,KAAK,GAAGD,IAAI,CAACE,SAAS,CAAC,IAAI,CAAgB;AACjD,EAAA,MAAMC,iBAAiB,GAAGF,KAAK,CAACG,gBAAgB,CAAC,MAAM,CAAC;EACxD,MAAMC,QAAQ,GAAGL,IAAI,CAACK,QAAQ,CAACC,WAAW,EAAE;AAG5CL,EAAAA,KAAK,CAACM,eAAe,CAAC,IAAI,CAAC;AAE3B,EAAA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,iBAAiB,CAACM,MAAM,EAAED,CAAC,EAAE,EAAE;AACjDL,IAAAA,iBAAiB,CAACK,CAAC,CAAC,CAACD,eAAe,CAAC,IAAI,CAAC;AAC5C,EAAA;EAEA,IAAIF,QAAQ,KAAK,QAAQ,EAAE;AACzBK,IAAAA,kBAAkB,CAACV,IAAyB,EAAEC,KAA0B,CAAC;AAC3E,EAAA,CAAA,MAAO,IAAII,QAAQ,KAAK,OAAO,IAAIA,QAAQ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