{"version":3,"file":"drag-drop.js","sources":["../../../../../../src/cdk/drag-drop/drag-styling.ts","../../../../../../src/cdk/drag-drop/transition-duration.ts","../../../../../../src/cdk/drag-drop/client-rect.ts","../../../../../../src/cdk/drag-drop/parent-position-tracker.ts","../../../../../../src/cdk/drag-drop/clone-node.ts","../../../../../../src/cdk/drag-drop/drag-ref.ts","../../../../../../src/cdk/drag-drop/drag-utils.ts","../../../../../../src/cdk/drag-drop/drop-list-ref.ts","../../../../../../src/cdk/drag-drop/drag-drop-registry.ts","../../../../../../src/cdk/drag-drop/drag-drop.ts","../../../../../../src/cdk/drag-drop/drag-parent.ts","../../../../../../src/cdk/drag-drop/drag-events.ts","../../../../../../src/cdk/drag-drop/directives/drop-list-group.ts","../../../../../../src/cdk/drag-drop/directives/config.ts","../../../../../../src/cdk/drag-drop/directives/assertions.ts","../../../../../../src/cdk/drag-drop/directives/drop-list.ts","../../../../../../src/cdk/drag-drop/directives/drag-handle.ts","../../../../../../src/cdk/drag-drop/directives/drag-placeholder.ts","../../../../../../src/cdk/drag-drop/directives/drag-preview.ts","../../../../../../src/cdk/drag-drop/directives/drag.ts","../../../../../../src/cdk/drag-drop/drag-drop-module.ts","../../../../../../src/cdk/drag-drop/public-api.ts","../../../../../../src/cdk/drag-drop/index.ts"],"names":["clamp"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;;;;AACA,SAAgB,YAAY,CAAC,IAAyB,EACzB,MAA8B,EAC9B,mBAAiC;AAC9D,IAAE,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC1B,QAAI,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;AACpC,YAAM,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChC,YACM,IAAI,KAAK,EAAE;AACjB,gBAAQ,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,CAAA,mBAAmB,aA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AC,QAAQ,CAAC,EAAE;AAC7D,YAAM,OAAO,cAAc,CAAC;AAC5B,SAAK;AACL,QACI,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC;AAClD,KAAG;AACH,IACE,OAAO,IAAI,CAAC;AACd;AACA;ACzjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAiCa,cAAc;AAAG;0CAtB7B,QAAQ,SAAC,kBACR,YAAY,EAAE;eACZ,WAAW,sBACX,gBAAgB,sBAChB;MAAO,sBACP,aAAa,sBACb;EAAc;MACd,kBAAkB;CACnB,kBACD,OAAO,EAAE,sBACP,mBAAmB,sBACnB,WAAW;cACX;MAAgB;WAChB,OAAO;QACP,aAAa;UACb,cAAc;QACd,kBAAkB;gBACnB,kBACD;QAAS,EAAE,sBACT;IAAQ,mBACT,cACF;;;;;;;;;;;;;;;;4YACI;AAAC;ACxCN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AAE2T","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.io/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 */\n export interface DragCSSStyleDeclaration extends CSSStyleDeclaration {\n msScrollSnapType: string;\n scrollSnapType: 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(dest: CSSStyleDeclaration,\n source: Record,\n importantProperties?: Set) {\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/**\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(element: HTMLElement,\n enable: boolean,\n importantProperties?: Set) {\n extendStyles(element.style, {\n position: enable ? '' : 'fixed',\n top: enable ? '' : '0',\n opacity: enable ? '' : '0',\n left: enable ? '' : '-999em'\n }, importantProperties);\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 * @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.io/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 parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\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.io/license\n */\n\n/** Gets a mutable version of an element's bounding `ClientRect`. */\nexport function getMutableClientRect(element: Element): ClientRect {\n const clientRect = 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 `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n return {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height\n };\n}\n\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect 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: ClientRect, 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 * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` 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 adjustClientRect(clientRect: ClientRect, top: number, left: number) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n}\n\n/**\n * Checks whether the pointer coordinates are close to a ClientRect.\n * @param rect ClientRect to check against.\n * @param threshold Threshold around the ClientRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nexport function isPointerNearClientRect(rect: ClientRect,\n threshold: number,\n pointerX: number,\n pointerY: number): boolean {\n const {top, right, bottom, left, width, height} = rect;\n const xThreshold = width * threshold;\n const yThreshold = height * threshold;\n\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold &&\n pointerX > left - xThreshold && pointerX < right + xThreshold;\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.io/license\n */\n\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {getMutableClientRect, adjustClientRect} from './client-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\n constructor(private _document: Document, private _viewportRuler: ViewportRuler) {}\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._viewportRuler.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(event)!;\n const cachedPosition = this.positions.get(target);\n\n if (!cachedPosition) {\n return null;\n }\n\n // Used when figuring out whether an element is inside the scroll parent. If the scrolled\n // parent is the `document`, we use the `documentElement`, because IE doesn't support\n // `contains` on the `document`.\n const scrolledParentNode = target === this._document ? target.documentElement : target;\n const scrollPosition = cachedPosition.scrollPosition;\n let newTop: number;\n let newLeft: number;\n\n if (target === this._document) {\n const viewportScrollPosition = this._viewportRuler!.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 && scrolledParentNode.contains(node)) {\n adjustClientRect(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 * @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.io/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(selector: string, node: HTMLElement, clone: HTMLElement,\n callback: (source: T, clone: T) => void) {\n const descendantElements = node.querySelectorAll(selector);\n\n if (descendantElements.length) {\n const cloneElements = clone.querySelectorAll(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(source: Element & {value: string},\n clone: Element & {value: string; name: string; type: string}) {\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.io/license\n */\n\nimport {EmbeddedViewRef, ElementRef, NgZone, ViewContainerRef, TemplateRef} from '@angular/core';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {Direction} from '@angular/cdk/bidi';\nimport {\n normalizePassiveListenerOptions,\n _getEventTarget,\n _getShadowRoot,\n} from '@angular/cdk/platform';\nimport {coerceBooleanProperty, coerceElement} from '@angular/cdk/coercion';\nimport {\n isFakeMousedownFromScreenReader,\n isFakeTouchstartFromScreenReader,\n} from '@angular/cdk/a11y';\nimport {Subscription, Subject, Observable} from 'rxjs';\nimport {DropListRefInternal as DropListRef} from './drop-list-ref';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport {\n combineTransforms,\n extendStyles,\n toggleNativeDragInteractions,\n toggleVisibility,\n} from './drag-styling';\nimport {getTransformTransitionDurationInMs} from './transition-duration';\nimport {getMutableClientRect, adjustClientRect} from './client-rect';\nimport {ParentPositionTracker} from './parent-position-tracker';\nimport {deepCloneNode} from './clone-node';\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/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({passive: true});\n\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = normalizePassiveListenerOptions({passive: false});\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// TODO(crisbeto): add an API for moving a draggable up/down the\n// list programmatically. Useful for keyboard controls.\n\n/**\n * Internal compile-time-only representation of a `DragRef`.\n * Used to avoid circular import issues between the `DragRef` and the `DropListRef`.\n * @docs-private\n */\nexport interface DragRefInternal extends DragRef {}\n\n/** Template that can be used to create a drag helper element (e.g. a preview or a placeholder). */\ninterface DragHelperTemplate {\n template: TemplateRef | null;\n viewContainer: ViewContainerRef;\n context: T;\n}\n\n/** Template that can be used to create a drag preview element. */\ninterface DragPreviewTemplate extends DragHelperTemplate {\n matchSize?: boolean;\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 ``. 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` - Preview will be inserted into a specific element.\n * Same advantages and disadvantages as `parent`.\n */\nexport type PreviewContainer = 'global' | 'parent' | ElementRef | HTMLElement;\n\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nexport class DragRef {\n /** Element displayed next to the user's pointer while the element is dragged. */\n private _preview: HTMLElement;\n\n /** Reference to the view of the preview element. */\n private _previewRef: EmbeddedViewRef | 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 | 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 * Anchor 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 _anchor: Comment;\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 = false;\n\n /** Whether the element has moved since the user started dragging it. */\n private _hasMoved: boolean;\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;\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 /** Cached dimensions of the preview element. */\n private _previewRect?: ClientRect;\n\n /** Cached dimensions of the boundary element. */\n private _boundaryRect?: ClientRect;\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();\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 | 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';\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 /** 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 const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._toggleNativeDragInteractions();\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, newValue));\n }\n }\n private _disabled = false;\n\n /** Emits as the drag sequence is being prepared. */\n readonly beforeStarted = new Subject();\n\n /** Emits when the user starts dragging the item. */\n readonly started = new Subject<{source: DragRef}>();\n\n /** Emits when the user has released a drag item, before any animations have started. */\n readonly released = new Subject<{source: DragRef}>();\n\n /** Emits when the user stops dragging an item in the container. */\n readonly ended = new Subject<{source: DragRef, distance: Point, dropPoint: Point}>();\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 }>();\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 and should return a point describing where the item should\n * be rendered.\n */\n constrainPosition?: (point: Point, dragRef: DragRef) => Point;\n\n constructor(\n element: ElementRef | HTMLElement,\n private _config: DragRefConfig,\n private _document: Document,\n private _ngZone: NgZone,\n private _viewportRuler: ViewportRuler,\n private _dragDropRegistry: DragDropRegistry) {\n\n this.withRootElement(element).withParent(_config.parentDragRef || null);\n this._parentPositions = new ParentPositionTracker(_document, _viewportRuler);\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)[]): 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();\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): this {\n const element = coerceElement(rootElement);\n\n if (element !== this._rootElement) {\n if (this._rootElement) {\n this._removeRootElementListeners(this._rootElement);\n }\n\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\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 | 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 | 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(this._rootElement);\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 removeNode(this._rootElement);\n }\n\n removeNode(this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\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 = this._rootElement = this._ownerSVGElement = this._placeholderTemplate =\n this._previewTemplate = this._anchor = this._parentDragRef = 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 /**\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 {\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 _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n this._scrollSubscription.unsubscribe();\n }\n\n /** Destroys the preview element and its ViewRef. */\n private _destroyPreview() {\n if (this._preview) {\n removeNode(this._preview);\n }\n\n if (this._previewRef) {\n this._previewRef.destroy();\n }\n\n this._preview = this._previewRef = null!;\n }\n\n /** Destroys the placeholder element and its ViewRef. */\n private _destroyPlaceholder() {\n if (this._placeholder) {\n removeNode(this._placeholder);\n }\n\n if (this._placeholderRef) {\n this._placeholderRef.destroy();\n }\n\n this._placeholder = 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._handles.find(handle => {\n const target = _getEventTarget(event);\n return !!target && (target === handle || handle.contains(target as HTMLElement));\n });\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 preferrable 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 event.preventDefault();\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence(event));\n }\n }\n\n return;\n }\n\n // We only need the preview dimensions if we have a boundary element.\n if (this._boundaryElement) {\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 || this._rootElement).getBoundingClientRect();\n }\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 event.preventDefault();\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 const activeTransform = this._activeTransform;\n activeTransform.x =\n constrainedPointerPosition.x - this._pickupPositionOnPage.x + this._passiveTransform.x;\n activeTransform.y =\n constrainedPointerPosition.y - this._pickupPositionOnPage.y + this._passiveTransform.y;\n\n this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n\n // Apply transform as attribute if dragging and svg element to work for IE\n if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n const appliedTransform = `translate(${activeTransform.x} ${activeTransform.y})`;\n this._rootElement.setAttribute('transform', appliedTransform);\n }\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._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n this._toggleNativeDragInteractions();\n\n if (this._handles) {\n this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;\n }\n\n if (!this._hasStartedDragging) {\n return;\n }\n\n this.released.next({source: this});\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 });\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 const dropContainer = this._dropContainer;\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 anchor = this._anchor = this._anchor || this._document.createComment('');\n\n // Needs to happen before the root element is moved.\n const shadowRoot = this._getShadowRoot();\n\n // Insert an anchor node so that we can restore the element's position in the DOM.\n parent.insertBefore(anchor, 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 = this._createPreviewElement();\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._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);\n this.started.next({source: this}); // 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});\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 = !isTouchSequence && this._lastTouchEventTime &&\n this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n const isFakeEvent = isTouchSequence ? 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 this._rootElementTapHighlight = rootElement.style.webkitTapHighlightColor || '';\n rootElement.style.webkitTapHighlightColor = 'transparent';\n }\n\n this._hasStartedDragging = this._hasMoved = false;\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._removeSubscriptions();\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 = previewTemplate && previewTemplate.template &&\n !previewTemplate.matchSize ? {x: 0, y: 0} :\n this._getPointerPositionInElement(referenceElement, event);\n const pointerPosition = this._pickupPositionOnPage = 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._anchor.parentNode!.replaceChild(this._rootElement, this._anchor);\n\n this._destroyPreview();\n this._destroyPlaceholder();\n this._boundaryRect = this._previewRect = this._initialTransform = 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, pointerPosition.y);\n\n this.ended.next({source: this, distance, dropPoint: pointerPosition});\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 });\n container.drop(this, currentIndex, this._initialIndex, this._initialContainer,\n isPointerOverContainer, distance, pointerPosition);\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 (!newContainer && this._dropContainer !== this._initialContainer &&\n this._initialContainer._isOverContainer(x, y)) {\n newContainer = this._initialContainer;\n }\n\n if (newContainer && newContainer !== this._dropContainer) {\n this._ngZone.run(() => {\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 // Notify the new container that the item has entered.\n this._dropContainer = newContainer!;\n this._dropContainer.enter(this, x, y, newContainer === this._initialContainer &&\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.sortingDisabled ? this._initialIndex : undefined);\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 this._applyPreviewTransform(\n x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n }\n }\n\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n private _createPreviewElement(): 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._rootElement.getBoundingClientRect() : null;\n const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate,\n previewConfig.context);\n viewRef.detectChanges();\n preview = getRootNode(viewRef, this._document);\n this._previewRef = viewRef;\n if (previewConfig.matchSize) {\n matchElementSize(preview, rootRect!);\n } else {\n preview.style.transform =\n getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n }\n } else {\n const element = this._rootElement;\n preview = deepCloneNode(element);\n matchElementSize(preview, element.getBoundingClientRect());\n\n if (this._initialTransform) {\n preview.style.transform = this._initialTransform;\n }\n }\n\n extendStyles(preview.style, {\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 // We have to reset the margin, because it can throw off positioning relative to the viewport.\n 'margin': '0',\n 'position': 'fixed',\n 'top': '0',\n 'left': '0',\n 'z-index': `${this._config.zIndex || 1000}`\n }, dragImportantProperties);\n\n toggleNativeDragInteractions(preview, false);\n preview.classList.add('cdk-drag-preview');\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 * 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 {\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.classList.add('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 = getTransformTransitionDurationInMs(this._preview);\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 (!event || (_getEventTarget(event) === this._preview &&\n event.propertyName === 'transform')) {\n this._preview?.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n }) as EventListenerOrEventListenerObject;\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 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 placeholder.classList.add('cdk-drag-placeholder');\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(referenceElement: HTMLElement,\n event: MouseEvent | TouchEvent): Point {\n const elementRect = this._rootElement.getBoundingClientRect();\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}) : 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\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 ? this.constrainPosition(point, this) : point;\n\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n y = this._pickupPositionOnPage.y;\n } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n x = this._pickupPositionOnPage.x;\n }\n\n if (this._boundaryRect) {\n const {x: pickupX, y: pickupY} = this._pickupPositionInElement;\n const boundaryRect = this._boundaryRect;\n const previewRect = this._previewRect!;\n const minY = boundaryRect.top + pickupY;\n const maxY = boundaryRect.bottom - (previewRect.height - pickupY);\n const minX = boundaryRect.left + pickupX;\n const maxX = boundaryRect.right - (previewRect.width - pickupX);\n\n x = clamp(x, minX, maxX);\n y = clamp(y, minY, maxY);\n }\n\n return {x, y};\n }\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(element: HTMLElement) {\n element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\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 transform = getTransform(x, y);\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 = this._rootElement.style.transform\n && this._rootElement.style.transform != 'none'\n ? this._rootElement.style.transform\n : '';\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 this._rootElement.style.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.style.transform = 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 const boundaryRect = this._boundaryElement.getBoundingClientRect();\n const elementRect = this._rootElement.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 ((boundaryRect.width === 0 && boundaryRect.height === 0) ||\n (elementRect.width === 0 && elementRect.height === 0)) {\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(event)!;\n\n // ClientRect dimensions are based on the scroll position of the page and its parent node so\n // we have to update the cached boundary ClientRect if the user has scrolled. Check for\n // the `document` specifically since IE doesn't support `contains` on it.\n if (this._boundaryRect && (target === this._document ||\n (target !== this._boundaryElement && target.contains(this._boundaryElement)))) {\n adjustClientRect(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 const cachedPosition = this._parentPositions.positions.get(this._document);\n return cachedPosition ? cachedPosition.scrollPosition :\n this._viewportRuler.getViewportScrollPosition();\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(initialParent: HTMLElement,\n shadowRoot: ShadowRoot | null): 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 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 return coerceElement(previewContainer);\n }\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 */\nfunction 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/** 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/**\n * Helper to remove a node from the DOM and to do all the necessary null checks.\n * @param node Node to be removed.\n */\nfunction removeNode(node: Node | null) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\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/**\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 */\nfunction getRootNode(viewRef: EmbeddedViewRef, _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/**\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 */\nfunction matchElementSize(target: HTMLElement, sourceRect: ClientRect): 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 * @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.io/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(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/**\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(currentArray: T[],\n targetArray: T[],\n currentIndex: number,\n targetIndex: number): 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(currentArray: T[],\n targetArray: T[],\n currentIndex: number,\n targetIndex: number): 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.io/license\n */\n\nimport {ElementRef, NgZone} from '@angular/core';\nimport {Direction} from '@angular/cdk/bidi';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {_getShadowRoot} from '@angular/cdk/platform';\nimport {Subject, Subscription, interval, animationFrameScheduler} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {moveItemInArray} from './drag-utils';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport {DragRefInternal as DragRef, Point} from './drag-ref';\nimport {\n isPointerNearClientRect,\n adjustClientRect,\n getMutableClientRect,\n isInsideClientRect,\n} from './client-rect';\nimport {ParentPositionTracker} from './parent-position-tracker';\nimport {combineTransforms, DragCSSStyleDeclaration} from './drag-styling';\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/**\n * Entry in the position cache for draggable items.\n * @docs-private\n */\ninterface CachedItemPosition {\n /** Instance of the drag item. */\n drag: DragRef;\n /** Dimensions of the item. */\n clientRect: ClientRect;\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/** Vertical direction in which we can auto-scroll. */\nconst enum AutoScrollVerticalDirection {NONE, UP, DOWN}\n\n/** Horizontal direction in which we can auto-scroll. */\nconst enum AutoScrollHorizontalDirection {NONE, LEFT, RIGHT}\n\n/**\n * Internal compile-time-only representation of a `DropListRef`.\n * Used to avoid circular import issues between the `DropListRef` and the `DragRef`.\n * @docs-private\n */\nexport interface DropListRefInternal extends DropListRef {}\n\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nexport class DropListRef {\n /** Element that the drop list is attached to. */\n element: HTMLElement | ElementRef;\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';\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 * 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 /** Functions 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();\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 }>();\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 /** Arbitrary data that can be attached to the drop list. */\n data: T;\n\n /** Whether an item in the list is being dragged. */\n private _isDragging = false;\n\n /** Cache of the dimensions of all the items inside the container. */\n private _itemPositions: CachedItemPosition[] = [];\n\n /** Keeps track of the positions of any parent scrollable elements. */\n private _parentPositions: ParentPositionTracker;\n\n /** Cached `ClientRect` of the drop list. */\n private _clientRect: ClientRect | undefined;\n\n /**\n * Draggable items that are currently active inside the container. Includes the items\n * from `_draggables`, as well as any items that have been dragged in, but haven't\n * been dropped yet.\n */\n private _activeDraggables: 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 occured and whether the user's pointer continued to\n * overlap with the swapped item after the swapping occurred.\n */\n private _previousSwap = {drag: null as DragRef | null, delta: 0, overlaps: false};\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 /** Direction in which the list is oriented. */\n private _orientation: 'horizontal' | 'vertical' = 'vertical';\n\n /** Connected siblings that currently have a dragged item. */\n private _activeSiblings = new Set();\n\n /** Layout direction of the drop list. */\n private _direction: Direction = 'ltr';\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();\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 constructor(\n element: ElementRef | HTMLElement,\n private _dragDropRegistry: DragDropRegistry,\n _document: any,\n private _ngZone: NgZone,\n private _viewportRuler: ViewportRuler) {\n this.element = coerceElement(element);\n this._document = _document;\n this.withScrollableParents([this.element]);\n _dragDropRegistry.registerDropContainer(this);\n this._parentPositions = new ParentPositionTracker(_document, _viewportRuler);\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._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 * Emits an event to indicate that the user moved 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 let newIndex: number;\n\n if (index == null) {\n newIndex = this.sortingDisabled ? this._draggables.indexOf(item) : -1;\n\n if (newIndex === -1) {\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 newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY);\n }\n } else {\n newIndex = index;\n }\n\n const activeDraggables = this._activeDraggables;\n const currentIndex = activeDraggables.indexOf(item);\n const placeholder = item.getPlaceholderElement();\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 // 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 if (currentIndex > -1) {\n activeDraggables.splice(currentIndex, 1);\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 if (this._shouldEnterAsFirstChild(pointerX, pointerY)) {\n const reference = activeDraggables[0].getRootElement();\n reference.parentNode!.insertBefore(placeholder, reference);\n activeDraggables.unshift(item);\n } else {\n coerceElement(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 the positions were already cached when we called `start` above,\n // but we need to refresh them since the amount of items has changed and also parent rects.\n this._cacheItemPositions();\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 */\n drop(item: DragRef, currentIndex: number, previousIndex: number, previousContainer: DropListRef,\n isPointerOverContainer: boolean, distance: Point, dropPoint: Point): 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 });\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._cacheItems();\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 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: 'vertical' | 'horizontal'): this {\n this._orientation = orientation;\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 = coerceElement(this.element);\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 /** 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 if (!this._isDragging) {\n return this._draggables.indexOf(item);\n }\n\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 const items = this._orientation === 'horizontal' && this._direction === 'rtl' ?\n this._itemPositions.slice().reverse() : this._itemPositions;\n\n return findIndex(items, currentItem => currentItem.drag === item);\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(item: DragRef, pointerX: number, pointerY: number,\n pointerDelta: {x: number, y: number}): void {\n // Don't sort the item if sorting is disabled or it's out of range.\n if (this.sortingDisabled || !this._clientRect ||\n !isPointerNearClientRect(this._clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n return;\n }\n\n const siblings = this._itemPositions;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n\n if (newIndex === -1 && siblings.length > 0) {\n return;\n }\n\n const isHorizontal = this._orientation === 'horizontal';\n const currentIndex = findIndex(siblings, 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 this.sorted.next({\n previousIndex: currentIndex,\n currentIndex: newIndex,\n container: this,\n item\n });\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 ? item.getPlaceholderElement() :\n sibling.drag.getRootElement();\n\n // Update the offset to reflect the new position.\n sibling.offset += offset;\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(${Math.round(sibling.offset)}px, 0, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, 0, offset);\n } else {\n elementToOffset.style.transform = combineTransforms(\n `translate3d(0, ${Math.round(sibling.offset)}px, 0)`, sibling.initialTransform);\n adjustClientRect(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\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 (isPointerNearClientRect(position.clientRect, DROP_PROXIMITY_THRESHOLD,\n pointerX, pointerY)) {\n [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(\n element as HTMLElement, position.clientRect, pointerX, pointerY);\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 clientRect = {width, height, top: 0, right: width, bottom: height, left: 0};\n verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);\n horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);\n scrollNode = window;\n }\n\n if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection ||\n horizontalScrollDirection !== this._horizontalScrollDirection ||\n scrollNode !== this._scrollNode)) {\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 = coerceElement(this.element).style as DragCSSStyleDeclaration;\n this.beforeStarted.next();\n this._isDragging = true;\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._cacheItems();\n this._viewportScrollSubscription.unsubscribe();\n this._listenToScrollEvents();\n }\n\n /** Caches the positions of the configured scrollable parents. */\n private _cacheParentPositions() {\n const element = coerceElement(this.element);\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 `ClientRect`.\n this._clientRect = this._parentPositions.positions.get(element)!.clientRect!;\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.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 }).sort((a, b) => {\n return isHorizontal ? a.clientRect.left - b.clientRect.left :\n a.clientRect.top - b.clientRect.top;\n });\n }\n\n /** Resets the container to its initial state. */\n private _reset() {\n this._isDragging = false;\n\n const styles = coerceElement(this.element).style as DragCSSStyleDeclaration;\n styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n\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\n .find(current => current.drag === item)?.initialTransform;\n rootElement.style.transform = initialTransform || '';\n }\n });\n this._siblings.forEach(sibling => sibling._stopReceiving(this));\n this._activeDraggables = [];\n this._itemPositions = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n this._previousSwap.overlaps = false;\n this._stopScrolling();\n this._viewportScrollSubscription.unsubscribe();\n this._parentPositions.clear();\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(currentIndex: number,\n siblings: CachedItemPosition[],\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 * 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: ClientRect, newPosition: ClientRect, delta: 1 | -1) {\n const isHorizontal = this._orientation === 'horizontal';\n let itemOffset = isHorizontal ? 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 ? newPosition.width - currentPosition.width :\n newPosition.height - currentPosition.height;\n }\n\n return itemOffset;\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(item: DragRef, pointerX: number, pointerY: number,\n delta?: {x: number, y: number}): number {\n const isHorizontal = this._orientation === 'horizontal';\n const index = findIndex(this._itemPositions, ({drag, clientRect}, _, array) => {\n if (drag === item) {\n // If there's only one item left in the container, it must be\n // the dragged item itself so we use it as a reference.\n return array.length < 2;\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 (drag === this._previousSwap.drag && this._previousSwap.overlaps &&\n direction === this._previousSwap.delta) {\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, this)) ? -1 : index;\n }\n\n /** Caches the current items in the list and their positions. */\n private _cacheItems(): void {\n this._activeDraggables = this._draggables.slice();\n this._cacheItemPositions();\n this._cacheParentPositions();\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 incrementVerticalScroll(node, -scrollStep);\n } else if (this._verticalScrollDirection === AutoScrollVerticalDirection.DOWN) {\n incrementVerticalScroll(node, scrollStep);\n }\n\n if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.LEFT) {\n incrementHorizontalScroll(node, -scrollStep);\n } else if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.RIGHT) {\n incrementHorizontalScroll(node, scrollStep);\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._clientRect != null && isInsideClientRect(this._clientRect, 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 (!this._clientRect || !isInsideClientRect(this._clientRect, x, y) ||\n !this.enterPredicate(item, this)) {\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 const nativeElement = coerceElement(this.element);\n\n // The `ClientRect`, 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 === nativeElement || nativeElement.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 (!activeSiblings.has(sibling) && 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 activeSiblings.add(sibling);\n this._cacheParentPositions();\n this._listenToScrollEvents();\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 }\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 // 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 adjustClientRect(clientRect, scrollDifference.top, scrollDifference.left);\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 } 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(coerceElement(this.element));\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._activeDraggables.filter(item => item.isDragging());\n this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n }\n}\n\n\n/**\n * Finds the index of an item that matches a predicate function. Used as an equivalent\n * of `Array.prototype.findIndex` which isn't part of the standard Google typings.\n * @param array Array in which to look for matches.\n * @param predicate Function used to determine whether an item is a match.\n */\nfunction findIndex(array: T[],\n predicate: (value: T, index: number, obj: T[]) => boolean): number {\n\n for (let i = 0; i < array.length; i++) {\n if (predicate(array[i], i, array)) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Increments the vertical scroll position of a node.\n * @param node Node whose scroll position should change.\n * @param amount Amount of pixels that the `node` should be scrolled.\n */\nfunction incrementVerticalScroll(node: HTMLElement | Window, amount: number) {\n if (node === window) {\n (node as Window).scrollBy(0, amount);\n } else {\n // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.\n (node as HTMLElement).scrollTop += amount;\n }\n}\n\n/**\n * Increments the horizontal scroll position of a node.\n * @param node Node whose scroll position should change.\n * @param amount Amount of pixels that the `node` should be scrolled.\n */\nfunction incrementHorizontalScroll(node: HTMLElement | Window, amount: number) {\n if (node === window) {\n (node as Window).scrollBy(amount, 0);\n } else {\n // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.\n (node as HTMLElement).scrollLeft += amount;\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: ClientRect, 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: ClientRect, 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 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(element: HTMLElement, clientRect: ClientRect, pointerX: number,\n pointerY: number): [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 (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 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.io/license\n */\n\nimport {Injectable, NgZone, OnDestroy, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {merge, Observable, Observer, Subject} from 'rxjs';\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = normalizePassiveListenerOptions({\n passive: false,\n capture: true\n});\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// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\n@Injectable({providedIn: 'root'})\nexport class DragDropRegistry implements OnDestroy {\n private _document: Document;\n\n /** Registered drop container instances. */\n private _dropInstances = new Set();\n\n /** Registered drag item instances. */\n private _dragInstances = new Set();\n\n /** Drag item instances that are currently being dragged. */\n private _activeDragInstances: I[] = [];\n\n /** Keeps track of the event listeners that we've bound to the `document`. */\n private _globalListeners = new Map void,\n options?: AddEventListenerOptions | boolean\n }>();\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: I) => item.isDragging();\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 = new Subject();\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 = new Subject();\n\n /**\n * Emits when the viewport has been scrolled while the user is dragging an item.\n * @deprecated To be turned into a private member. Use the `scrolled` method instead.\n * @breaking-change 13.0.0\n */\n readonly scroll: Subject = new Subject();\n\n constructor(\n private _ngZone: NgZone,\n @Inject(DOCUMENT) _document: any) {\n this._document = _document;\n }\n\n /** Adds a drop container to the registry. */\n registerDropContainer(drop: C) {\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: I) {\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._document.addEventListener('touchmove', this._persistentTouchmoveListener,\n activeCapturingEventOptions);\n });\n }\n }\n\n /** Removes a drop container from the registry. */\n removeDropContainer(drop: C) {\n this._dropInstances.delete(drop);\n }\n\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag: I) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._persistentTouchmoveListener,\n activeCapturingEventOptions);\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: I, 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._activeDragInstances.push(drag);\n\n if (this._activeDragInstances.length === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n\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 this._globalListeners\n .set(isTouchEvent ? 'touchend' : 'mouseup', {\n handler: (e: Event) => this.pointerUp.next(e as TouchEvent | MouseEvent),\n options: true\n })\n .set('scroll', {\n handler: (e: Event) => this.scroll.next(e),\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 options: true\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 .set('selectstart', {\n handler: this._preventDefaultWhileDragging,\n options: activeCapturingEventOptions\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 this._globalListeners.set('mousemove', {\n handler: (e: Event) => this.pointerMove.next(e as MouseEvent),\n options: activeCapturingEventOptions\n });\n }\n\n this._ngZone.runOutsideAngular(() => {\n this._globalListeners.forEach((config, name) => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n\n /** Stops dragging a drag item instance. */\n stopDragging(drag: I) {\n const index = this._activeDragInstances.indexOf(drag);\n\n if (index > -1) {\n this._activeDragInstances.splice(index, 1);\n\n if (this._activeDragInstances.length === 0) {\n this._clearGlobalListeners();\n }\n }\n }\n\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag: I) {\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 {\n const streams: Observable[] = [this.scroll];\n\n if (shadowRoot && shadowRoot !== this._document) {\n // Note that this is basically the same as `fromEvent` from rjxs, 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(new Observable((observer: Observer) => {\n return this._ngZone.runOutsideAngular(() => {\n const eventOptions = true;\n const callback = (event: Event) => {\n if (this._activeDragInstances.length) {\n observer.next(event);\n }\n };\n\n (shadowRoot as ShadowRoot).addEventListener('scroll', callback, eventOptions);\n\n return () => {\n (shadowRoot as ShadowRoot).removeEventListener('scroll', callback, eventOptions);\n };\n });\n }));\n }\n\n return merge(...streams);\n }\n\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\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((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n\n this._globalListeners.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.io/license\n */\n\nimport {Injectable, Inject, NgZone, ElementRef} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DragRef, DragRefConfig} from './drag-ref';\nimport {DropListRef} from './drop-list-ref';\nimport {DragDropRegistry} from './drag-drop-registry';\n\n/** Default configuration to be used when creating a `DragRef`. */\nconst DEFAULT_CONFIG = {\n dragStartThreshold: 5,\n pointerDirectionChangeThreshold: 5\n};\n\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\n@Injectable({providedIn: 'root'})\nexport class DragDrop {\n constructor(\n @Inject(DOCUMENT) private _document: any,\n private _ngZone: NgZone,\n private _viewportRuler: ViewportRuler,\n private _dragDropRegistry: DragDropRegistry) {}\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 */\n createDrag(element: ElementRef | HTMLElement,\n config: DragRefConfig = DEFAULT_CONFIG): DragRef {\n\n return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler,\n this._dragDropRegistry);\n }\n\n /**\n * Turns an element into a drop list.\n * @param element Element to which to attach the drop list functionality.\n */\n createDropList(element: ElementRef | HTMLElement): DropListRef {\n return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone,\n this._viewportRuler);\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.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\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<{}>('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.io/license\n */\n\nimport {CdkDrag} from './directives/drag';\nimport {CdkDropList} from './directives/drop-list';\n\n/** Event emitted when the user starts dragging a draggable. */\nexport interface CdkDragStart {\n /** Draggable that emitted the event. */\n source: CdkDrag;\n}\n\n/** Event emitted when the user releases an item, before any animations have started. */\nexport interface CdkDragRelease {\n /** Draggable that emitted the event. */\n source: CdkDrag;\n}\n\n/** Event emitted when the user stops dragging a draggable. */\nexport interface CdkDragEnd {\n /** Draggable that emitted the event. */\n source: CdkDrag;\n /** Distance in pixels that the user has dragged since the drag sequence started. */\n distance: {x: number, y: number};\n /** Position where the pointer was when the item was dropped */\n dropPoint: {x: number, y: number};\n}\n\n/** Event emitted when the user moves an item into a new drop container. */\nexport interface CdkDragEnter {\n /** Container into which the user has moved the item. */\n container: CdkDropList;\n /** Item that was moved into the container. */\n item: CdkDrag;\n /** Index at which the item has entered the container. */\n currentIndex: number;\n}\n\n/**\n * Event emitted when the user removes an item from a\n * drop container by moving it into another one.\n */\nexport interface CdkDragExit {\n /** Container from which the user has a removed an item. */\n container: CdkDropList;\n /** Item that was removed from the container. */\n item: CdkDrag;\n}\n\n\n/** Event emitted when the user drops a draggable item inside a drop container. */\nexport interface CdkDragDrop {\n /** Index of the item when it was picked up. */\n previousIndex: number;\n /** Current index of the item. */\n currentIndex: number;\n /** Item that is being dropped. */\n item: CdkDrag;\n /** Container in which the item was dropped. */\n container: CdkDropList;\n /** Container from which the item was picked up. Can be the same as the `container`. */\n previousContainer: CdkDropList;\n /** Whether the user's pointer was over the container when the item was dropped. */\n isPointerOverContainer: boolean;\n /** Distance in pixels that the user has dragged since the drag sequence started. */\n distance: {x: number, y: number};\n /** Position where the pointer was when the item was dropped */\n dropPoint: {x: number, y: number};\n}\n\n/** Event emitted as the user is dragging a draggable item. */\nexport interface CdkDragMove {\n /** Item that is being dragged. */\n source: CdkDrag;\n /** Position of the user's pointer on the page. */\n pointerPosition: {x: number, y: number};\n /** Native event that is causing the dragging. */\n event: MouseEvent | TouchEvent;\n /** Distance in pixels that the user has dragged since the drag sequence started. */\n distance: {x: number, y: number};\n /**\n * Indicates the direction in which the user is dragging the element along each axis.\n * `1` means that the position is increasing (e.g. the user is moving to the right or downwards),\n * whereas `-1` means that it's decreasing (they're moving to the left or upwards). `0` means\n * that the position hasn't changed.\n */\n delta: {x: -1 | 0 | 1, y: -1 | 0 | 1};\n}\n\n/** Event emitted when the user swaps the position of two drag items. */\nexport interface CdkDragSortEvent {\n /** Index from which the item was sorted previously. */\n previousIndex: number;\n /** Index that the item is currently in. */\n currentIndex: number;\n /** Container that the item belongs to. */\n container: CdkDropList;\n /** Item that is being sorted. */\n item: CdkDrag;\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.io/license\n */\n\nimport {Directive, OnDestroy, Input, InjectionToken} from '@angular/core';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\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 =\n new InjectionToken>('CdkDropListGroup');\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 implements OnDestroy {\n /** Drop lists registered inside the group. */\n readonly _items = new Set();\n\n /** Whether starting a dragging sequence from inside this group is disabled. */\n @Input('cdkDropListGroupDisabled')\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n ngOnDestroy() {\n this._items.clear();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\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.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport {DragRefConfig, Point, DragRef} 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/** Function that can be used to constrain the position of a dragged element. */\nexport type DragConstrainPosition = (point: Point, dragRef: DragRef) => Point;\n\n/** Possible orientations for a drop list. */\nexport type DropListOrientation = 'horizontal' | 'vertical';\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('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 {\n lockAxis?: DragAxis;\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.io/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(`${name} must be attached to an element node. ` +\n `Currently attached to \"${node.nodeName}\".`);\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.io/license\n */\n\nimport {\n BooleanInput,\n coerceArray,\n coerceNumberProperty,\n coerceBooleanProperty,\n NumberInput,\n} from '@angular/cdk/coercion';\nimport {\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n Optional,\n Directive,\n ChangeDetectorRef,\n SkipSelf,\n Inject,\n InjectionToken,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ScrollDispatcher} from '@angular/cdk/scrolling';\nimport {CdkDrag} from './drag';\nimport {CdkDragDrop, CdkDragEnter, CdkDragExit, CdkDragSortEvent} from '../drag-events';\nimport {CDK_DROP_LIST_GROUP, CdkDropListGroup} from './drop-list-group';\nimport {DropListRef} from '../drop-list-ref';\nimport {DragRef} from '../drag-ref';\nimport {DragDrop} from '../drag-drop';\nimport {DropListOrientation, DragAxis, DragDropConfig, CDK_DRAG_CONFIG} from './config';\nimport {Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {assertElementNode} from './assertions';\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n\n/**\n * Internal compile-time-only representation of a `CdkDropList`.\n * Used to avoid circular import issues between the `CdkDropList` and the `CdkDrag`.\n * @docs-private\n */\nexport interface CdkDropListInternal extends CdkDropList {}\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');\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 implements OnDestroy {\n /** Emits when the list has been destroyed. */\n private readonly _destroyed = new Subject();\n\n /** Whether the element's scrollable parents have been resolved. */\n private _scrollableParentsResolved: boolean;\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>;\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;\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 = `cdk-drop-list-${_uniqueIdCounter++}`;\n\n /** Locks the position of the draggable elements inside the container along the specified axis. */\n @Input('cdkDropListLockAxis') lockAxis: DragAxis;\n\n /** Whether starting a dragging sequence from this container is disabled. */\n @Input('cdkDropListDisabled')\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 = coerceBooleanProperty(value);\n }\n private _disabled: boolean;\n\n /** Whether sorting within this drop list is disabled. */\n @Input('cdkDropListSortingDisabled')\n sortingDisabled: boolean;\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('cdkDropListAutoScrollDisabled')\n autoScrollDisabled: boolean;\n\n /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n @Input('cdkDropListAutoScrollStep')\n autoScrollStep: number;\n\n /** Emits when the user drops an item inside the container. */\n @Output('cdkDropListDropped')\n readonly dropped: EventEmitter> = new EventEmitter>();\n\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n @Output('cdkDropListEntered')\n readonly entered: EventEmitter> = new EventEmitter>();\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> = new EventEmitter>();\n\n /** Emits as the user is swapping items while actively dragging. */\n @Output('cdkDropListSorted')\n readonly sorted: EventEmitter> = new EventEmitter>();\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();\n\n constructor(\n /** Element that the drop list is attached to. */\n public element: ElementRef, dragDrop: DragDrop,\n private _changeDetectorRef: ChangeDetectorRef,\n private _scrollDispatcher: ScrollDispatcher,\n @Optional() private _dir?: Directionality,\n @Optional() @Inject(CDK_DROP_LIST_GROUP) @SkipSelf()\n private _group?: CdkDropListGroup,\n @Optional() @Inject(CDK_DRAG_CONFIG) config?: DragDropConfig) {\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDropList');\n }\n\n this._dropListRef = dragDrop.createDropList(element);\n this._dropListRef.data = this;\n\n if (config) {\n this._assignDefaults(config);\n }\n\n this._dropListRef.enterPredicate = (drag: DragRef, drop: DropListRef) => {\n return this.enterPredicate(drag.data, drop.data);\n };\n\n this._dropListRef.sortPredicate =\n (index: number, drag: DragRef, drop: DropListRef) => {\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 (_group) {\n _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\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n\n /** Removes an item from the drop list. */\n removeItem(item: CdkDrag): void {\n this._unsortedItems.delete(item);\n\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\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 =\n a._dragRef.getVisibleElement().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._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) {\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 ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.sortingDisabled = coerceBooleanProperty(this.sortingDisabled);\n ref.autoScrollDisabled = coerceBooleanProperty(this.autoScrollDisabled);\n ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\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) {\n ref.beforeStarted.subscribe(() => {\n this._syncItemsWithRef();\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(event => {\n this.dropped.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n previousContainer: event.previousContainer.data,\n container: event.container.data,\n item: event.item.data,\n isPointerOverContainer: event.isPointerOverContainer,\n distance: event.distance,\n dropPoint: event.dropPoint\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\n /** Assigns the default input values based on a provided config object. */\n private _assignDefaults(config: DragDropConfig) {\n const {\n 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\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n }\n\n /** Syncs up the registered drag items with underlying drop list ref. */\n private _syncItemsWithRef() {\n this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_sortingDisabled: BooleanInput;\n static ngAcceptInputType_autoScrollDisabled: BooleanInput;\n static ngAcceptInputType_autoScrollStep: NumberInput;\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.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n Optional,\n SkipSelf,\n} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\nimport {assertElementNode} from './assertions';\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');\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 OnDestroy {\n /** Closest parent draggable instance. */\n _parentDrag: {} | undefined;\n\n /** Emits when the state of the handle has changed. */\n readonly _stateChanges = new Subject();\n\n /** Whether starting to drag through this handle is disabled. */\n @Input('cdkDragHandleDisabled')\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._stateChanges.next(this);\n }\n private _disabled = false;\n\n constructor(\n public element: ElementRef,\n @Inject(CDK_DRAG_PARENT) @Optional() @SkipSelf() parentDrag?: any) {\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDragHandle');\n }\n\n this._parentDrag = parentDrag;\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\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.io/license\n */\n\nimport {Directive, TemplateRef, Input, InjectionToken} from '@angular/core';\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');\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 {\n /** Context data to be added to the placeholder template instance. */\n @Input() data: T;\n constructor(public templateRef: TemplateRef) {}\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.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, InjectionToken, Input, TemplateRef} from '@angular/core';\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');\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 {\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()\n get matchSize(): boolean { return this._matchSize; }\n set matchSize(value: boolean) { this._matchSize = coerceBooleanProperty(value); }\n private _matchSize = false;\n\n constructor(public templateRef: TemplateRef) {}\n\n static ngAcceptInputType_matchSize: BooleanInput;\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.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n SkipSelf,\n ViewContainerRef,\n OnChanges,\n SimpleChanges,\n ChangeDetectorRef,\n Self,\n} from '@angular/core';\nimport {\n coerceBooleanProperty,\n coerceNumberProperty,\n coerceElement,\n BooleanInput\n} from '@angular/cdk/coercion';\nimport {Observable, Observer, Subject, merge} from 'rxjs';\nimport {startWith, take, map, takeUntil, switchMap, tap} from 'rxjs/operators';\nimport {\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 {CDK_DRAG_PLACEHOLDER, CdkDragPlaceholder} from './drag-placeholder';\nimport {CDK_DRAG_PREVIEW, CdkDragPreview} from './drag-preview';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\nimport {DragRef, Point, PreviewContainer} from '../drag-ref';\nimport {CDK_DROP_LIST, CdkDropListInternal as CdkDropList} from './drop-list';\nimport {DragDrop} from '../drag-drop';\nimport {CDK_DRAG_CONFIG, DragDropConfig, DragStartDelay, DragAxis} from './config';\nimport {assertElementNode} from './assertions';\n\nconst DRAG_HOST_CLASS = 'cdk-drag';\n\n/** Element that can be moved inside a CdkDropList container. */\n@Directive({\n selector: '[cdkDrag]',\n exportAs: 'cdkDrag',\n host: {\n 'class': DRAG_HOST_CLASS,\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 implements AfterViewInit, OnChanges, OnDestroy {\n private readonly _destroyed = new Subject();\n private static _dragInstances: CdkDrag[] = [];\n\n /** Reference to the underlying drag instance. */\n _dragRef: DragRef>;\n\n /** Elements that can be used to drag the draggable item. */\n @ContentChildren(CDK_DRAG_HANDLE, {descendants: true}) _handles: QueryList;\n\n /** Element that will be used as a template to create the draggable item's preview. */\n @ContentChild(CDK_DRAG_PREVIEW) _previewTemplate: CdkDragPreview;\n\n /** Template for placeholder element rendered to show where a draggable would be dropped. */\n @ContentChild(CDK_DRAG_PLACEHOLDER) _placeholderTemplate: CdkDragPlaceholder;\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;\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;\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: {x: number, y: number};\n\n /** Whether starting to drag this element is disabled. */\n @Input('cdkDragDisabled')\n get disabled(): boolean {\n return this._disabled || (this.dropContainer && this.dropContainer.disabled);\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._dragRef.disabled = this._disabled;\n }\n private _disabled: boolean;\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 and should return a point describing where the item should\n * be rendered.\n */\n @Input('cdkDragConstrainPosition') constrainPosition?: (point: Point, dragRef: DragRef) => Point;\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 ``. 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` - Preview will be inserted into a specific element.\n * Same advantages and disadvantages as `parent`.\n */\n @Input('cdkDragPreviewContainer') previewContainer: PreviewContainer;\n\n /** Emits when the user starts dragging the item. */\n @Output('cdkDragStarted') readonly started: EventEmitter =\n new EventEmitter();\n\n /** Emits when the user has released a drag item, before any animations have started. */\n @Output('cdkDragReleased') readonly released: EventEmitter =\n new EventEmitter();\n\n /** Emits when the user stops dragging an item in the container. */\n @Output('cdkDragEnded') readonly ended: EventEmitter = new EventEmitter();\n\n /** Emits when the user has moved the item into a new container. */\n @Output('cdkDragEntered') readonly entered: EventEmitter> =\n new EventEmitter>();\n\n /** Emits when the user removes the item its container by dragging it into another container. */\n @Output('cdkDragExited') readonly exited: EventEmitter> =\n new EventEmitter>();\n\n /** Emits when the user drops the item inside a container. */\n @Output('cdkDragDropped') readonly dropped: EventEmitter> =\n new EventEmitter>();\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> =\n new Observable((observer: Observer>) => {\n const subscription = this._dragRef.moved.pipe(map(movedEvent => ({\n source: this,\n pointerPosition: movedEvent.pointerPosition,\n event: movedEvent.event,\n delta: movedEvent.delta,\n distance: movedEvent.distance\n }))).subscribe(observer);\n\n return () => {\n subscription.unsubscribe();\n };\n });\n\n constructor(\n /** Element that the draggable is attached to. */\n public element: ElementRef,\n /** Droppable container that the draggable is a part of. */\n @Inject(CDK_DROP_LIST) @Optional() @SkipSelf() public dropContainer: CdkDropList,\n /**\n * @deprecated `_document` parameter no longer being used and will be removed.\n * @breaking-change 12.0.0\n */\n @Inject(DOCUMENT) _document: any, private _ngZone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n @Optional() @Inject(CDK_DRAG_CONFIG) config: DragDropConfig,\n @Optional() private _dir: Directionality, dragDrop: DragDrop,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Self() @Inject(CDK_DRAG_HANDLE) private _selfHandle?: CdkDragHandle,\n @Optional() @SkipSelf() @Inject(CDK_DRAG_PARENT) private _parentDrag?: CdkDrag) {\n this._dragRef = dragDrop.createDrag(element, {\n dragStartThreshold: config && config.dragStartThreshold != null ?\n config.dragStartThreshold : 5,\n pointerDirectionChangeThreshold: config && config.pointerDirectionChangeThreshold != null ?\n config.pointerDirectionChangeThreshold : 5,\n zIndex: config?.zIndex,\n });\n this._dragRef.data = this;\n\n // We have to keep track of the drag instances in order to be able to match an element to\n // a drag instance. We can't go through the global registry of `DragRef`, because the root\n // element could be different.\n CdkDrag._dragInstances.push(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 this._dragRef._withDropContainer(dropContainer._dropListRef);\n dropContainer.addItem(this);\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 /**\n * Gets the pixel coordinates of the draggable outside of a drop container.\n */\n getFreeDragPosition(): {readonly x: number, readonly y: number} {\n return this._dragRef.getFreeDragPosition();\n }\n\n ngAfterViewInit() {\n // Normally this isn't in the zone, but it can cause major performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this._ngZone.runOutsideAngular(() => {\n // We need to wait for the zone to stabilize, 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 this._ngZone.onStable\n .pipe(take(1), takeUntil(this._destroyed))\n .subscribe(() => {\n this._updateRootElement();\n this._setupHandlesListener();\n\n if (this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n });\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 `ngAfterViewInit` where it needs to be deferred.\n if (rootSelectorChange && !rootSelectorChange.firstChange) {\n this._updateRootElement();\n }\n\n // Skip the first change since it's being handled in `ngAfterViewInit`.\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 const index = CdkDrag._dragInstances.indexOf(this);\n if (index > -1) {\n CdkDrag._dragInstances.splice(index, 1);\n }\n\n // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n this._ngZone.runOutsideAngular(() => {\n this._destroyed.next();\n this._destroyed.complete();\n this._dragRef.dispose();\n });\n }\n\n /** Syncs the root element with the `DragRef`. */\n private _updateRootElement() {\n const element = this.element.nativeElement;\n const rootElement = this.rootElementSelector ?\n getClosestMatchingAncestor(element, this.rootElementSelector) : element;\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 getClosestMatchingAncestor(this.element.nativeElement, boundary);\n }\n\n const element = coerceElement(boundary);\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n !element.contains(this.element.nativeElement)) {\n throw Error('Draggable element is not inside of the node passed into cdkDragBoundary.');\n }\n\n return element;\n }\n\n /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n private _syncInputs(ref: DragRef>) {\n ref.beforeStarted.subscribe(() => {\n if (!ref.isDragging()) {\n const dir = this._dir;\n const dragStartDelay = this.dragStartDelay;\n const placeholder = this._placeholderTemplate ? {\n template: this._placeholderTemplate.templateRef,\n context: this._placeholderTemplate.data,\n viewContainer: this._viewContainerRef\n } : null;\n const preview = this._previewTemplate ? {\n template: this._previewTemplate.templateRef,\n context: this._previewTemplate.data,\n matchSize: this._previewTemplate.matchSize,\n viewContainer: this._viewContainerRef\n } : null;\n\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.dragStartDelay = (typeof dragStartDelay === 'object' && dragStartDelay) ?\n dragStartDelay : 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 // `classList` needs to be null checked, because IE doesn't have it on some elements.\n if (parent.classList?.contains(DRAG_HOST_CLASS)) {\n ref.withParent(CdkDrag._dragInstances.find(drag => {\n return drag.element.nativeElement === parent;\n })?._dragRef || null);\n break;\n }\n parent = parent.parentElement;\n }\n });\n }\n\n /** Handles the events from the underlying `DragRef`. */\n private _handleEvents(ref: DragRef>) {\n ref.started.subscribe(() => {\n this.started.emit({source: this});\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(() => {\n this.released.emit({source: this});\n });\n\n ref.ended.subscribe(event => {\n this.ended.emit({\n source: this,\n distance: event.distance,\n dropPoint: event.dropPoint\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(event => {\n this.entered.emit({\n container: event.container.data,\n item: this,\n currentIndex: event.currentIndex\n });\n });\n\n ref.exited.subscribe(event => {\n this.exited.emit({\n container: event.container.data,\n item: this\n });\n });\n\n ref.dropped.subscribe(event => {\n this.dropped.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n previousContainer: event.previousContainer.data,\n container: event.container.data,\n isPointerOverContainer: event.isPointerOverContainer,\n item: this,\n distance: event.distance,\n dropPoint: event.dropPoint\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, dragStartDelay, constrainPosition, previewClass, boundaryElement, draggingDisabled,\n rootElementSelector, previewContainer\n } = config;\n\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.dragStartDelay = dragStartDelay || 0;\n\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\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.changes.pipe(\n startWith(this._handles),\n // Sync the new handles with the DragRef.\n tap((handles: QueryList) => {\n const childHandleElements = handles\n .filter(handle => handle._parentDrag === this)\n .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 childHandleElements.push(this.element);\n }\n\n this._dragRef.withHandles(childHandleElements);\n }),\n // Listen if the state of any of the handles changes.\n switchMap((handles: QueryList) => {\n return merge(...handles.map(item => {\n return item._stateChanges.pipe(startWith(item));\n })) as Observable;\n }),\n takeUntil(this._destroyed)\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 static ngAcceptInputType_disabled: BooleanInput;\n}\n\n/** Gets the closest ancestor of an element that matches a selector. */\nfunction getClosestMatchingAncestor(element: HTMLElement, selector: string) {\n let currentElement = element.parentElement as HTMLElement | null;\n\n while (currentElement) {\n // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.\n if (currentElement.matches ? currentElement.matches(selector) :\n (currentElement as any).msMatchesSelector(selector)) {\n return currentElement;\n }\n\n currentElement = currentElement.parentElement;\n }\n\n return null;\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.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkScrollableModule} from '@angular/cdk/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\n@NgModule({\n declarations: [\n CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n exports: [\n CdkScrollableModule,\n CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n providers: [\n DragDrop,\n ]\n})\nexport class DragDropModule {}\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.io/license\n */\n\nexport {DragDrop} from './drag-drop';\nexport {DragRef, DragRefConfig, Point, PreviewContainer} from './drag-ref';\nexport {DropListRef} from './drop-list-ref';\nexport {CDK_DRAG_PARENT} from './drag-parent';\n\nexport * from './drag-events';\nexport * from './drag-utils';\nexport * from './drag-drop-module';\nexport * from './drag-drop-registry';\n\nexport {CdkDropList, CDK_DROP_LIST} from './directives/drop-list';\nexport * from './directives/config';\nexport * from './directives/drop-list-group';\nexport * from './directives/drag';\nexport * from './directives/drag-handle';\nexport * from './directives/drag-preview';\nexport * from './directives/drag-placeholder';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {CdkDropListInternal as ɵangular_material_src_cdk_drag_drop_drag_drop_a} from './directives/drop-list';"]}