Files
doneit-web/.angular/cache/14.2.12/babel-webpack/9a9acf90b406dc6d0cd8e5c62cb4d5fb.json
T
Eudes Inácio 53b71ea16f its working
2023-06-30 09:54:21 +01:00

1 line
129 KiB
JSON

{"ast":null,"code":"import { Subject, Observable, merge, ReplaySubject, combineLatest, fromEvent } from 'rxjs';\nimport { DOCUMENT } from '@angular/common';\nimport autoScroll from '@mattlewis92/dom-autoscroller';\nimport { Injectable, Directive, ElementRef, Input, Renderer2, Output, EventEmitter, NgZone, Inject, ViewContainerRef, Optional, NgModule, defineInjectable } from '@angular/core';\nimport { map, mergeMap, takeUntil, take, takeLast, pairwise, share, filter, count, startWith, distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nimport * as ɵngcc0 from '@angular/core';\nclass DraggableHelper {\n constructor() {\n this.currentDrag = new Subject();\n }\n}\nDraggableHelper.ɵfac = function DraggableHelper_Factory(t) {\n return new (t || DraggableHelper)();\n};\nDraggableHelper.ɵprov = /*@__PURE__*/ɵngcc0.ɵɵdefineInjectable({\n token: DraggableHelper,\n factory: DraggableHelper.ɵfac,\n providedIn: 'root'\n});\n/** @nocollapse */\nDraggableHelper.ngInjectableDef = defineInjectable({\n factory: function DraggableHelper_Factory() {\n return new DraggableHelper();\n },\n token: DraggableHelper,\n providedIn: \"root\"\n});\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DraggableHelper, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], function () {\n return [];\n }, null);\n})();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * If the window isn't scrollable, then place this on the scrollable container that draggable elements are inside. e.g.\n * ```html\n * <div style=\"overflow: scroll\" mwlDraggableScrollContainer>\n * <div mwlDraggable>Drag me!</div>\n * </div>\n * ```\n */\nclass DraggableScrollContainerDirective {\n /**\n * @hidden\n * @param {?} elementRef\n */\n constructor(elementRef) {\n this.elementRef = elementRef;\n /**\n * Trigger the DragStart after a long touch in scrollable container when true\n * @deprecated will be removed in v5 (use [touchStartLongPress]=\"{delay: 300, delta: 30}\" on the mwlDraggable element instead)\n */\n this.activeLongPressDrag = false;\n /**\n * Configuration of a long touch\n * Duration in ms of a long touch before activating DragStart\n * Delta of the\n * @deprecated will be removed in v5 (use [touchStartLongPress]=\"{delay: 300, delta: 30}\" on the mwlDraggable element instead)\n */\n this.longPressConfig = {\n duration: 300,\n delta: 30\n };\n }\n}\nDraggableScrollContainerDirective.ɵfac = function DraggableScrollContainerDirective_Factory(t) {\n return new (t || DraggableScrollContainerDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef));\n};\nDraggableScrollContainerDirective.ɵdir = /*@__PURE__*/ɵngcc0.ɵɵdefineDirective({\n type: DraggableScrollContainerDirective,\n selectors: [[\"\", \"mwlDraggableScrollContainer\", \"\"]],\n inputs: {\n activeLongPressDrag: \"activeLongPressDrag\",\n longPressConfig: \"longPressConfig\"\n }\n});\n/** @nocollapse */\nDraggableScrollContainerDirective.ctorParameters = () => [{\n type: ElementRef\n}];\nDraggableScrollContainerDirective.propDecorators = {\n activeLongPressDrag: [{\n type: Input\n }],\n longPressConfig: [{\n type: Input\n }]\n};\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DraggableScrollContainerDirective, [{\n type: Directive,\n args: [{\n selector: '[mwlDraggableScrollContainer]'\n }]\n }], function () {\n return [{\n type: ɵngcc0.ElementRef\n }];\n }, {\n activeLongPressDrag: [{\n type: Input\n }],\n longPressConfig: [{\n type: Input\n }]\n });\n})();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} renderer\n * @param {?} element\n * @param {?} classToAdd\n * @return {?}\n */\nfunction addClass(renderer, element, classToAdd) {\n if (classToAdd) {\n classToAdd.split(' ').forEach(\n /**\n * @param {?} className\n * @return {?}\n */\n className => renderer.addClass(element.nativeElement, className));\n }\n}\n/**\n * @param {?} renderer\n * @param {?} element\n * @param {?} classToRemove\n * @return {?}\n */\nfunction removeClass(renderer, element, classToRemove) {\n if (classToRemove) {\n classToRemove.split(' ').forEach(\n /**\n * @param {?} className\n * @return {?}\n */\n className => renderer.removeClass(element.nativeElement, className));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass DraggableDirective {\n /**\n * @hidden\n * @param {?} element\n * @param {?} renderer\n * @param {?} draggableHelper\n * @param {?} zone\n * @param {?} vcr\n * @param {?} scrollContainer\n * @param {?} document\n */\n constructor(element, renderer, draggableHelper, zone, vcr, scrollContainer, document) {\n this.element = element;\n this.renderer = renderer;\n this.draggableHelper = draggableHelper;\n this.zone = zone;\n this.vcr = vcr;\n this.scrollContainer = scrollContainer;\n this.document = document;\n /**\n * The axis along which the element is draggable\n */\n this.dragAxis = {\n x: true,\n y: true\n };\n /**\n * Snap all drags to an x / y grid\n */\n this.dragSnapGrid = {};\n /**\n * Show a ghost element that shows the drag when dragging\n */\n this.ghostDragEnabled = true;\n /**\n * Show the original element when ghostDragEnabled is true\n */\n this.showOriginalElementWhileDragging = false;\n /**\n * The cursor to use when hovering over a draggable element\n */\n this.dragCursor = '';\n /*\n * Options used to control the behaviour of auto scrolling: https://www.npmjs.com/package/dom-autoscroller\n */\n this.autoScroll = {\n margin: 20\n };\n /**\n * Called when the element can be dragged along one axis and has the mouse or pointer device pressed on it\n */\n this.dragPointerDown = new EventEmitter();\n /**\n * Called when the element has started to be dragged.\n * Only called after at least one mouse or touch move event.\n * If you call $event.cancelDrag$.emit() it will cancel the current drag\n */\n this.dragStart = new EventEmitter();\n /**\n * Called after the ghost element has been created\n */\n this.ghostElementCreated = new EventEmitter();\n /**\n * Called when the element is being dragged\n */\n this.dragging = new EventEmitter();\n /**\n * Called after the element is dragged\n */\n this.dragEnd = new EventEmitter();\n /**\n * @hidden\n */\n this.pointerDown$ = new Subject();\n /**\n * @hidden\n */\n this.pointerMove$ = new Subject();\n /**\n * @hidden\n */\n this.pointerUp$ = new Subject();\n this.eventListenerSubscriptions = {};\n this.destroy$ = new Subject();\n this.timeLongPress = {\n timerBegin: 0,\n timerEnd: 0\n };\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n this.checkEventListeners();\n /** @type {?} */\n const pointerDragged$ = this.pointerDown$.pipe(filter(\n /**\n * @return {?}\n */\n () => this.canDrag()), mergeMap(\n /**\n * @param {?} pointerDownEvent\n * @return {?}\n */\n pointerDownEvent => {\n // fix for https://github.com/mattlewis92/angular-draggable-droppable/issues/61\n // stop mouse events propagating up the chain\n if (pointerDownEvent.event.stopPropagation && !this.scrollContainer) {\n pointerDownEvent.event.stopPropagation();\n }\n // hack to prevent text getting selected in safari while dragging\n /** @type {?} */\n const globalDragStyle = this.renderer.createElement('style');\n this.renderer.setAttribute(globalDragStyle, 'type', 'text/css');\n this.renderer.appendChild(globalDragStyle, this.renderer.createText(`\n body * {\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n }\n `));\n requestAnimationFrame(\n /**\n * @return {?}\n */\n () => {\n this.document.head.appendChild(globalDragStyle);\n });\n /** @type {?} */\n const startScrollPosition = this.getScrollPosition();\n /** @type {?} */\n const scrollContainerScroll$ = new Observable(\n /**\n * @param {?} observer\n * @return {?}\n */\n observer => {\n /** @type {?} */\n const scrollContainer = this.scrollContainer ? this.scrollContainer.elementRef.nativeElement : 'window';\n return this.renderer.listen(scrollContainer, 'scroll',\n /**\n * @param {?} e\n * @return {?}\n */\n e => observer.next(e));\n }).pipe(startWith(startScrollPosition), map(\n /**\n * @return {?}\n */\n () => this.getScrollPosition()));\n /** @type {?} */\n const currentDrag$ = new Subject();\n /** @type {?} */\n const cancelDrag$ = new ReplaySubject();\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.dragPointerDown.next({\n x: 0,\n y: 0\n });\n });\n /** @type {?} */\n const dragComplete$ = merge(this.pointerUp$, this.pointerDown$, cancelDrag$, this.destroy$).pipe(share());\n /** @type {?} */\n const pointerMove = combineLatest([this.pointerMove$, scrollContainerScroll$]).pipe(map(\n /**\n * @param {?} __0\n * @return {?}\n */\n ([pointerMoveEvent, scroll]) => {\n return {\n currentDrag$,\n transformX: pointerMoveEvent.clientX - pointerDownEvent.clientX,\n transformY: pointerMoveEvent.clientY - pointerDownEvent.clientY,\n clientX: pointerMoveEvent.clientX,\n clientY: pointerMoveEvent.clientY,\n scrollLeft: scroll.left,\n scrollTop: scroll.top,\n target: pointerMoveEvent.event.target\n };\n }), map(\n /**\n * @param {?} moveData\n * @return {?}\n */\n moveData => {\n if (this.dragSnapGrid.x) {\n moveData.transformX = Math.round(moveData.transformX / this.dragSnapGrid.x) * this.dragSnapGrid.x;\n }\n if (this.dragSnapGrid.y) {\n moveData.transformY = Math.round(moveData.transformY / this.dragSnapGrid.y) * this.dragSnapGrid.y;\n }\n return moveData;\n }), map(\n /**\n * @param {?} moveData\n * @return {?}\n */\n moveData => {\n if (!this.dragAxis.x) {\n moveData.transformX = 0;\n }\n if (!this.dragAxis.y) {\n moveData.transformY = 0;\n }\n return moveData;\n }), map(\n /**\n * @param {?} moveData\n * @return {?}\n */\n moveData => {\n /** @type {?} */\n const scrollX = moveData.scrollLeft - startScrollPosition.left;\n /** @type {?} */\n const scrollY = moveData.scrollTop - startScrollPosition.top;\n return Object.assign({}, moveData, {\n x: moveData.transformX + scrollX,\n y: moveData.transformY + scrollY\n });\n }), filter(\n /**\n * @param {?} __0\n * @return {?}\n */\n ({\n x,\n y,\n transformX,\n transformY\n }) => !this.validateDrag || this.validateDrag({\n x,\n y,\n transform: {\n x: transformX,\n y: transformY\n }\n })), takeUntil(dragComplete$), share());\n /** @type {?} */\n const dragStarted$ = pointerMove.pipe(take(1), share());\n /** @type {?} */\n const dragEnded$ = pointerMove.pipe(takeLast(1), share());\n dragStarted$.subscribe(\n /**\n * @param {?} __0\n * @return {?}\n */\n ({\n clientX,\n clientY,\n x,\n y\n }) => {\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.dragStart.next({\n cancelDrag$\n });\n });\n this.scroller = autoScroll([this.scrollContainer ? this.scrollContainer.elementRef.nativeElement : this.document.defaultView], Object.assign({}, this.autoScroll, {\n /**\n * @return {?}\n */\n autoScroll() {\n return true;\n }\n }));\n addClass(this.renderer, this.element, this.dragActiveClass);\n if (this.ghostDragEnabled) {\n /** @type {?} */\n const rect = this.element.nativeElement.getBoundingClientRect();\n /** @type {?} */\n const clone = /** @type {?} */this.element.nativeElement.cloneNode(true);\n if (!this.showOriginalElementWhileDragging) {\n this.renderer.setStyle(this.element.nativeElement, 'visibility', 'hidden');\n }\n if (this.ghostElementAppendTo) {\n this.ghostElementAppendTo.appendChild(clone);\n } else {\n /** @type {?} */this.element.nativeElement.parentNode.insertBefore(clone, this.element.nativeElement.nextSibling);\n }\n this.ghostElement = clone;\n this.document.body.style.cursor = this.dragCursor;\n this.setElementStyles(clone, {\n position: 'fixed',\n top: `${rect.top}px`,\n left: `${rect.left}px`,\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n cursor: this.dragCursor,\n margin: '0',\n willChange: 'transform',\n pointerEvents: 'none'\n });\n if (this.ghostElementTemplate) {\n /** @type {?} */\n const viewRef = this.vcr.createEmbeddedView(this.ghostElementTemplate);\n clone.innerHTML = '';\n viewRef.rootNodes.filter(\n /**\n * @param {?} node\n * @return {?}\n */\n node => node instanceof Node).forEach(\n /**\n * @param {?} node\n * @return {?}\n */\n node => {\n clone.appendChild(node);\n });\n dragEnded$.subscribe(\n /**\n * @return {?}\n */\n () => {\n this.vcr.remove(this.vcr.indexOf(viewRef));\n });\n }\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.ghostElementCreated.emit({\n clientX: clientX - x,\n clientY: clientY - y,\n element: clone\n });\n });\n dragEnded$.subscribe(\n /**\n * @return {?}\n */\n () => {\n /** @type {?} */clone.parentElement.removeChild(clone);\n this.ghostElement = null;\n this.renderer.setStyle(this.element.nativeElement, 'visibility', '');\n });\n }\n this.draggableHelper.currentDrag.next(currentDrag$);\n });\n dragEnded$.pipe(mergeMap(\n /**\n * @param {?} dragEndData\n * @return {?}\n */\n dragEndData => {\n /** @type {?} */\n const dragEndData$ = cancelDrag$.pipe(count(), take(1), map(\n /**\n * @param {?} calledCount\n * @return {?}\n */\n calledCount => Object.assign({}, dragEndData, {\n dragCancelled: calledCount > 0\n })));\n cancelDrag$.complete();\n return dragEndData$;\n })).subscribe(\n /**\n * @param {?} __0\n * @return {?}\n */\n ({\n x,\n y,\n dragCancelled\n }) => {\n this.scroller.destroy();\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.dragEnd.next({\n x,\n y,\n dragCancelled\n });\n });\n removeClass(this.renderer, this.element, this.dragActiveClass);\n currentDrag$.complete();\n });\n merge(dragComplete$, dragEnded$).pipe(take(1)).subscribe(\n /**\n * @return {?}\n */\n () => {\n requestAnimationFrame(\n /**\n * @return {?}\n */\n () => {\n this.document.head.removeChild(globalDragStyle);\n });\n });\n return pointerMove;\n }), share());\n merge(pointerDragged$.pipe(take(1), map(\n /**\n * @param {?} value\n * @return {?}\n */\n value => [, value])), pointerDragged$.pipe(pairwise())).pipe(filter(\n /**\n * @param {?} __0\n * @return {?}\n */\n ([previous, next]) => {\n if (!previous) {\n return true;\n }\n return previous.x !== next.x || previous.y !== next.y;\n }), map(\n /**\n * @param {?} __0\n * @return {?}\n */\n ([previous, next]) => next)).subscribe(\n /**\n * @param {?} __0\n * @return {?}\n */\n ({\n x,\n y,\n currentDrag$,\n clientX,\n clientY,\n transformX,\n transformY,\n target\n }) => {\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.dragging.next({\n x,\n y\n });\n });\n requestAnimationFrame(\n /**\n * @return {?}\n */\n () => {\n if (this.ghostElement) {\n /** @type {?} */\n const transform = `translate3d(${transformX}px, ${transformY}px, 0px)`;\n this.setElementStyles(this.ghostElement, {\n transform,\n '-webkit-transform': transform,\n '-ms-transform': transform,\n '-moz-transform': transform,\n '-o-transform': transform\n });\n }\n });\n currentDrag$.next({\n clientX,\n clientY,\n dropData: this.dropData,\n target\n });\n });\n }\n /**\n * @param {?} changes\n * @return {?}\n */\n ngOnChanges(changes) {\n if (changes.dragAxis) {\n this.checkEventListeners();\n }\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this.unsubscribeEventListeners();\n this.pointerDown$.complete();\n this.pointerMove$.complete();\n this.pointerUp$.complete();\n this.destroy$.next();\n }\n /**\n * @private\n * @return {?}\n */\n checkEventListeners() {\n /** @type {?} */\n const canDrag = this.canDrag();\n /** @type {?} */\n const hasEventListeners = Object.keys(this.eventListenerSubscriptions).length > 0;\n if (canDrag && !hasEventListeners) {\n this.zone.runOutsideAngular(\n /**\n * @return {?}\n */\n () => {\n this.eventListenerSubscriptions.mousedown = this.renderer.listen(this.element.nativeElement, 'mousedown',\n /**\n * @param {?} event\n * @return {?}\n */\n event => {\n this.onMouseDown(event);\n });\n this.eventListenerSubscriptions.mouseup = this.renderer.listen('document', 'mouseup',\n /**\n * @param {?} event\n * @return {?}\n */\n event => {\n this.onMouseUp(event);\n });\n this.eventListenerSubscriptions.touchstart = this.renderer.listen(this.element.nativeElement, 'touchstart',\n /**\n * @param {?} event\n * @return {?}\n */\n event => {\n this.onTouchStart(event);\n });\n this.eventListenerSubscriptions.touchend = this.renderer.listen('document', 'touchend',\n /**\n * @param {?} event\n * @return {?}\n */\n event => {\n this.onTouchEnd(event);\n });\n this.eventListenerSubscriptions.touchcancel = this.renderer.listen('document', 'touchcancel',\n /**\n * @param {?} event\n * @return {?}\n */\n event => {\n this.onTouchEnd(event);\n });\n this.eventListenerSubscriptions.mouseenter = this.renderer.listen(this.element.nativeElement, 'mouseenter',\n /**\n * @return {?}\n */\n () => {\n this.onMouseEnter();\n });\n this.eventListenerSubscriptions.mouseleave = this.renderer.listen(this.element.nativeElement, 'mouseleave',\n /**\n * @return {?}\n */\n () => {\n this.onMouseLeave();\n });\n });\n } else if (!canDrag && hasEventListeners) {\n this.unsubscribeEventListeners();\n }\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onMouseDown(event) {\n if (event.button === 0) {\n if (!this.eventListenerSubscriptions.mousemove) {\n this.eventListenerSubscriptions.mousemove = this.renderer.listen('document', 'mousemove',\n /**\n * @param {?} mouseMoveEvent\n * @return {?}\n */\n mouseMoveEvent => {\n this.pointerMove$.next({\n event: mouseMoveEvent,\n clientX: mouseMoveEvent.clientX,\n clientY: mouseMoveEvent.clientY\n });\n });\n }\n this.pointerDown$.next({\n event,\n clientX: event.clientX,\n clientY: event.clientY\n });\n }\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onMouseUp(event) {\n if (event.button === 0) {\n if (this.eventListenerSubscriptions.mousemove) {\n this.eventListenerSubscriptions.mousemove();\n delete this.eventListenerSubscriptions.mousemove;\n }\n this.pointerUp$.next({\n event,\n clientX: event.clientX,\n clientY: event.clientY\n });\n }\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onTouchStart(event) {\n /** @type {?} */\n let startScrollPosition;\n /** @type {?} */\n let isDragActivated;\n /** @type {?} */\n let hasContainerScrollbar;\n if (this.scrollContainer && this.scrollContainer.activeLongPressDrag || this.touchStartLongPress) {\n this.timeLongPress.timerBegin = Date.now();\n isDragActivated = false;\n hasContainerScrollbar = this.hasScrollbar();\n startScrollPosition = this.getScrollPosition();\n }\n if (!this.eventListenerSubscriptions.touchmove) {\n /** @type {?} */\n const contextMenuListener = fromEvent(this.document, 'contextmenu').subscribe(\n /**\n * @param {?} e\n * @return {?}\n */\n e => {\n e.preventDefault();\n });\n /** @type {?} */\n const touchMoveListener = fromEvent(this.document, 'touchmove', {\n passive: false\n }).subscribe(\n /**\n * @param {?} touchMoveEvent\n * @return {?}\n */\n touchMoveEvent => {\n if ((this.scrollContainer && this.scrollContainer.activeLongPressDrag || this.touchStartLongPress) && !isDragActivated && hasContainerScrollbar) {\n isDragActivated = this.shouldBeginDrag(event, touchMoveEvent, startScrollPosition);\n }\n if ((!this.scrollContainer || !this.scrollContainer.activeLongPressDrag) && !this.touchStartLongPress || !hasContainerScrollbar || isDragActivated) {\n touchMoveEvent.preventDefault();\n this.pointerMove$.next({\n event: touchMoveEvent,\n clientX: touchMoveEvent.targetTouches[0].clientX,\n clientY: touchMoveEvent.targetTouches[0].clientY\n });\n }\n });\n this.eventListenerSubscriptions.touchmove =\n /**\n * @return {?}\n */\n () => {\n contextMenuListener.unsubscribe();\n touchMoveListener.unsubscribe();\n };\n }\n this.pointerDown$.next({\n event,\n clientX: event.touches[0].clientX,\n clientY: event.touches[0].clientY\n });\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onTouchEnd(event) {\n if (this.eventListenerSubscriptions.touchmove) {\n this.eventListenerSubscriptions.touchmove();\n delete this.eventListenerSubscriptions.touchmove;\n if (this.scrollContainer && this.scrollContainer.activeLongPressDrag || this.touchStartLongPress) {\n this.enableScroll();\n }\n }\n this.pointerUp$.next({\n event,\n clientX: event.changedTouches[0].clientX,\n clientY: event.changedTouches[0].clientY\n });\n }\n /**\n * @private\n * @return {?}\n */\n onMouseEnter() {\n this.setCursor(this.dragCursor);\n }\n /**\n * @private\n * @return {?}\n */\n onMouseLeave() {\n this.setCursor('');\n }\n /**\n * @private\n * @return {?}\n */\n canDrag() {\n return this.dragAxis.x || this.dragAxis.y;\n }\n /**\n * @private\n * @param {?} value\n * @return {?}\n */\n setCursor(value) {\n if (!this.eventListenerSubscriptions.mousemove) {\n this.renderer.setStyle(this.element.nativeElement, 'cursor', value);\n }\n }\n /**\n * @private\n * @return {?}\n */\n unsubscribeEventListeners() {\n Object.keys(this.eventListenerSubscriptions).forEach(\n /**\n * @param {?} type\n * @return {?}\n */\n type => {\n /** @type {?} */this.eventListenerSubscriptions[type]();\n delete /** @type {?} */this.eventListenerSubscriptions[type];\n });\n }\n /**\n * @private\n * @param {?} element\n * @param {?} styles\n * @return {?}\n */\n setElementStyles(element, styles) {\n Object.keys(styles).forEach(\n /**\n * @param {?} key\n * @return {?}\n */\n key => {\n this.renderer.setStyle(element, key, styles[key]);\n });\n }\n /**\n * @private\n * @return {?}\n */\n getScrollElement() {\n if (this.scrollContainer) {\n return this.scrollContainer.elementRef.nativeElement;\n } else {\n return this.document.body;\n }\n }\n /**\n * @private\n * @return {?}\n */\n getScrollPosition() {\n if (this.scrollContainer) {\n return {\n top: this.scrollContainer.elementRef.nativeElement.scrollTop,\n left: this.scrollContainer.elementRef.nativeElement.scrollLeft\n };\n } else {\n return {\n top: window.pageYOffset || this.document.documentElement.scrollTop,\n left: window.pageXOffset || this.document.documentElement.scrollLeft\n };\n }\n }\n /**\n * @private\n * @param {?} event\n * @param {?} touchMoveEvent\n * @param {?} startScrollPosition\n * @return {?}\n */\n shouldBeginDrag(event, touchMoveEvent, startScrollPosition) {\n /** @type {?} */\n const moveScrollPosition = this.getScrollPosition();\n /** @type {?} */\n const deltaScroll = {\n top: Math.abs(moveScrollPosition.top - startScrollPosition.top),\n left: Math.abs(moveScrollPosition.left - startScrollPosition.left)\n };\n /** @type {?} */\n const deltaX = Math.abs(touchMoveEvent.targetTouches[0].clientX - event.touches[0].clientX) - deltaScroll.left;\n /** @type {?} */\n const deltaY = Math.abs(touchMoveEvent.targetTouches[0].clientY - event.touches[0].clientY) - deltaScroll.top;\n /** @type {?} */\n const deltaTotal = deltaX + deltaY;\n /** @type {?} */\n const longPressConfig = this.touchStartLongPress ? this.touchStartLongPress : /* istanbul ignore next */\n {\n delta: this.scrollContainer.longPressConfig.delta,\n delay: this.scrollContainer.longPressConfig.duration\n };\n if (deltaTotal > longPressConfig.delta || deltaScroll.top > 0 || deltaScroll.left > 0) {\n this.timeLongPress.timerBegin = Date.now();\n }\n this.timeLongPress.timerEnd = Date.now();\n /** @type {?} */\n const duration = this.timeLongPress.timerEnd - this.timeLongPress.timerBegin;\n if (duration >= longPressConfig.delay) {\n this.disableScroll();\n return true;\n }\n return false;\n }\n /**\n * @private\n * @return {?}\n */\n enableScroll() {\n if (this.scrollContainer) {\n this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement, 'overflow', '');\n }\n this.renderer.setStyle(this.document.body, 'overflow', '');\n }\n /**\n * @private\n * @return {?}\n */\n disableScroll() {\n /* istanbul ignore next */\n if (this.scrollContainer) {\n this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement, 'overflow', 'hidden');\n }\n this.renderer.setStyle(this.document.body, 'overflow', 'hidden');\n }\n /**\n * @private\n * @return {?}\n */\n hasScrollbar() {\n /** @type {?} */\n const scrollContainer = this.getScrollElement();\n /** @type {?} */\n const containerHasHorizontalScroll = scrollContainer.scrollWidth > scrollContainer.clientWidth;\n /** @type {?} */\n const containerHasVerticalScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;\n return containerHasHorizontalScroll || containerHasVerticalScroll;\n }\n}\nDraggableDirective.ɵfac = function DraggableDirective_Factory(t) {\n return new (t || DraggableDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(DraggableHelper), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(DraggableScrollContainerDirective, 8), ɵngcc0.ɵɵdirectiveInject(DOCUMENT));\n};\nDraggableDirective.ɵdir = /*@__PURE__*/ɵngcc0.ɵɵdefineDirective({\n type: DraggableDirective,\n selectors: [[\"\", \"mwlDraggable\", \"\"]],\n inputs: {\n dragAxis: \"dragAxis\",\n dragSnapGrid: \"dragSnapGrid\",\n ghostDragEnabled: \"ghostDragEnabled\",\n showOriginalElementWhileDragging: \"showOriginalElementWhileDragging\",\n dragCursor: \"dragCursor\",\n autoScroll: \"autoScroll\",\n dropData: \"dropData\",\n validateDrag: \"validateDrag\",\n dragActiveClass: \"dragActiveClass\",\n ghostElementAppendTo: \"ghostElementAppendTo\",\n ghostElementTemplate: \"ghostElementTemplate\",\n touchStartLongPress: \"touchStartLongPress\"\n },\n outputs: {\n dragPointerDown: \"dragPointerDown\",\n dragStart: \"dragStart\",\n ghostElementCreated: \"ghostElementCreated\",\n dragging: \"dragging\",\n dragEnd: \"dragEnd\"\n },\n features: [ɵngcc0.ɵɵNgOnChangesFeature]\n});\n/** @nocollapse */\nDraggableDirective.ctorParameters = () => [{\n type: ElementRef\n}, {\n type: Renderer2\n}, {\n type: DraggableHelper\n}, {\n type: NgZone\n}, {\n type: ViewContainerRef\n}, {\n type: DraggableScrollContainerDirective,\n decorators: [{\n type: Optional\n }]\n}, {\n type: undefined,\n decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }]\n}];\nDraggableDirective.propDecorators = {\n dropData: [{\n type: Input\n }],\n dragAxis: [{\n type: Input\n }],\n dragSnapGrid: [{\n type: Input\n }],\n ghostDragEnabled: [{\n type: Input\n }],\n showOriginalElementWhileDragging: [{\n type: Input\n }],\n validateDrag: [{\n type: Input\n }],\n dragCursor: [{\n type: Input\n }],\n dragActiveClass: [{\n type: Input\n }],\n ghostElementAppendTo: [{\n type: Input\n }],\n ghostElementTemplate: [{\n type: Input\n }],\n touchStartLongPress: [{\n type: Input\n }],\n autoScroll: [{\n type: Input\n }],\n dragPointerDown: [{\n type: Output\n }],\n dragStart: [{\n type: Output\n }],\n ghostElementCreated: [{\n type: Output\n }],\n dragging: [{\n type: Output\n }],\n dragEnd: [{\n type: Output\n }]\n};\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DraggableDirective, [{\n type: Directive,\n args: [{\n selector: '[mwlDraggable]'\n }]\n }], function () {\n return [{\n type: ɵngcc0.ElementRef\n }, {\n type: ɵngcc0.Renderer2\n }, {\n type: DraggableHelper\n }, {\n type: ɵngcc0.NgZone\n }, {\n type: ɵngcc0.ViewContainerRef\n }, {\n type: DraggableScrollContainerDirective,\n decorators: [{\n type: Optional\n }]\n }, {\n type: undefined,\n decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }]\n }];\n }, {\n dragAxis: [{\n type: Input\n }],\n dragSnapGrid: [{\n type: Input\n }],\n ghostDragEnabled: [{\n type: Input\n }],\n showOriginalElementWhileDragging: [{\n type: Input\n }],\n dragCursor: [{\n type: Input\n }],\n autoScroll: [{\n type: Input\n }],\n dragPointerDown: [{\n type: Output\n }],\n dragStart: [{\n type: Output\n }],\n ghostElementCreated: [{\n type: Output\n }],\n dragging: [{\n type: Output\n }],\n dragEnd: [{\n type: Output\n }],\n dropData: [{\n type: Input\n }],\n validateDrag: [{\n type: Input\n }],\n dragActiveClass: [{\n type: Input\n }],\n ghostElementAppendTo: [{\n type: Input\n }],\n ghostElementTemplate: [{\n type: Input\n }],\n touchStartLongPress: [{\n type: Input\n }]\n });\n})();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} clientX\n * @param {?} clientY\n * @param {?} rect\n * @return {?}\n */\nfunction isCoordinateWithinRectangle(clientX, clientY, rect) {\n return clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom;\n}\nclass DroppableDirective {\n /**\n * @param {?} element\n * @param {?} draggableHelper\n * @param {?} zone\n * @param {?} renderer\n * @param {?} scrollContainer\n */\n constructor(element, draggableHelper, zone, renderer, scrollContainer) {\n this.element = element;\n this.draggableHelper = draggableHelper;\n this.zone = zone;\n this.renderer = renderer;\n this.scrollContainer = scrollContainer;\n /**\n * Called when a draggable element starts overlapping the element\n */\n this.dragEnter = new EventEmitter();\n /**\n * Called when a draggable element stops overlapping the element\n */\n this.dragLeave = new EventEmitter();\n /**\n * Called when a draggable element is moved over the element\n */\n this.dragOver = new EventEmitter();\n /**\n * Called when a draggable element is dropped on this element\n */\n this.drop = new EventEmitter(); // tslint:disable-line no-output-named-after-standard-event\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n this.currentDragSubscription = this.draggableHelper.currentDrag.subscribe(\n /**\n * @param {?} drag$\n * @return {?}\n */\n drag$ => {\n addClass(this.renderer, this.element, this.dragActiveClass);\n /** @type {?} */\n const droppableElement = {\n updateCache: true\n };\n /** @type {?} */\n const deregisterScrollListener = this.renderer.listen(this.scrollContainer ? this.scrollContainer.elementRef.nativeElement : 'window', 'scroll',\n /**\n * @return {?}\n */\n () => {\n droppableElement.updateCache = true;\n });\n /** @type {?} */\n let currentDragDropData;\n /** @type {?} */\n const overlaps$ = drag$.pipe(map(\n /**\n * @param {?} __0\n * @return {?}\n */\n ({\n clientX,\n clientY,\n dropData,\n target\n }) => {\n currentDragDropData = dropData;\n if (droppableElement.updateCache) {\n droppableElement.rect = this.element.nativeElement.getBoundingClientRect();\n if (this.scrollContainer) {\n droppableElement.scrollContainerRect = this.scrollContainer.elementRef.nativeElement.getBoundingClientRect();\n }\n droppableElement.updateCache = false;\n }\n /** @type {?} */\n const isWithinElement = isCoordinateWithinRectangle(clientX, clientY, /** @type {?} */droppableElement.rect);\n /** @type {?} */\n const isDropAllowed = !this.validateDrop || this.validateDrop({\n clientX,\n clientY,\n target\n });\n if (droppableElement.scrollContainerRect) {\n return isWithinElement && isDropAllowed && isCoordinateWithinRectangle(clientX, clientY, /** @type {?} */droppableElement.scrollContainerRect);\n } else {\n return isWithinElement && isDropAllowed;\n }\n }));\n /** @type {?} */\n const overlapsChanged$ = overlaps$.pipe(distinctUntilChanged());\n /** @type {?} */\n let dragOverActive;\n overlapsChanged$.pipe(filter(\n /**\n * @param {?} overlapsNow\n * @return {?}\n */\n overlapsNow => overlapsNow)).subscribe(\n /**\n * @return {?}\n */\n () => {\n dragOverActive = true;\n addClass(this.renderer, this.element, this.dragOverClass);\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.dragEnter.next({\n dropData: currentDragDropData\n });\n });\n });\n overlaps$.pipe(filter(\n /**\n * @param {?} overlapsNow\n * @return {?}\n */\n overlapsNow => overlapsNow)).subscribe(\n /**\n * @return {?}\n */\n () => {\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.dragOver.next({\n dropData: currentDragDropData\n });\n });\n });\n overlapsChanged$.pipe(pairwise(), filter(\n /**\n * @param {?} __0\n * @return {?}\n */\n ([didOverlap, overlapsNow]) => didOverlap && !overlapsNow)).subscribe(\n /**\n * @return {?}\n */\n () => {\n dragOverActive = false;\n removeClass(this.renderer, this.element, this.dragOverClass);\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.dragLeave.next({\n dropData: currentDragDropData\n });\n });\n });\n drag$.subscribe({\n complete:\n /**\n * @return {?}\n */\n () => {\n deregisterScrollListener();\n removeClass(this.renderer, this.element, this.dragActiveClass);\n if (dragOverActive) {\n removeClass(this.renderer, this.element, this.dragOverClass);\n this.zone.run(\n /**\n * @return {?}\n */\n () => {\n this.drop.next({\n dropData: currentDragDropData\n });\n });\n }\n }\n });\n });\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n if (this.currentDragSubscription) {\n this.currentDragSubscription.unsubscribe();\n }\n }\n}\nDroppableDirective.ɵfac = function DroppableDirective_Factory(t) {\n return new (t || DroppableDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(DraggableHelper), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(DraggableScrollContainerDirective, 8));\n};\nDroppableDirective.ɵdir = /*@__PURE__*/ɵngcc0.ɵɵdefineDirective({\n type: DroppableDirective,\n selectors: [[\"\", \"mwlDroppable\", \"\"]],\n inputs: {\n dragOverClass: \"dragOverClass\",\n dragActiveClass: \"dragActiveClass\",\n validateDrop: \"validateDrop\"\n },\n outputs: {\n dragEnter: \"dragEnter\",\n dragLeave: \"dragLeave\",\n dragOver: \"dragOver\",\n drop: \"drop\"\n }\n});\n/** @nocollapse */\nDroppableDirective.ctorParameters = () => [{\n type: ElementRef\n}, {\n type: DraggableHelper\n}, {\n type: NgZone\n}, {\n type: Renderer2\n}, {\n type: DraggableScrollContainerDirective,\n decorators: [{\n type: Optional\n }]\n}];\nDroppableDirective.propDecorators = {\n dragOverClass: [{\n type: Input\n }],\n dragActiveClass: [{\n type: Input\n }],\n validateDrop: [{\n type: Input\n }],\n dragEnter: [{\n type: Output\n }],\n dragLeave: [{\n type: Output\n }],\n dragOver: [{\n type: Output\n }],\n drop: [{\n type: Output\n }]\n};\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DroppableDirective, [{\n type: Directive,\n args: [{\n selector: '[mwlDroppable]'\n }]\n }], function () {\n return [{\n type: ɵngcc0.ElementRef\n }, {\n type: DraggableHelper\n }, {\n type: ɵngcc0.NgZone\n }, {\n type: ɵngcc0.Renderer2\n }, {\n type: DraggableScrollContainerDirective,\n decorators: [{\n type: Optional\n }]\n }];\n }, {\n dragEnter: [{\n type: Output\n }],\n dragLeave: [{\n type: Output\n }],\n dragOver: [{\n type: Output\n }],\n drop: [{\n type: Output\n }],\n dragOverClass: [{\n type: Input\n }],\n dragActiveClass: [{\n type: Input\n }],\n validateDrop: [{\n type: Input\n }]\n });\n})();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass DragAndDropModule {}\nDragAndDropModule.ɵfac = function DragAndDropModule_Factory(t) {\n return new (t || DragAndDropModule)();\n};\nDragAndDropModule.ɵmod = /*@__PURE__*/ɵngcc0.ɵɵdefineNgModule({\n type: DragAndDropModule\n});\nDragAndDropModule.ɵinj = /*@__PURE__*/ɵngcc0.ɵɵdefineInjector({});\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DragAndDropModule, [{\n type: NgModule,\n args: [{\n declarations: [DraggableDirective, DroppableDirective, DraggableScrollContainerDirective],\n exports: [DraggableDirective, DroppableDirective, DraggableScrollContainerDirective]\n }]\n }], null, null);\n})();\n(function () {\n (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(DragAndDropModule, {\n declarations: [DraggableDirective, DroppableDirective, DraggableScrollContainerDirective],\n exports: [DraggableDirective, DroppableDirective, DraggableScrollContainerDirective]\n });\n})();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { DragAndDropModule, DraggableHelper as ɵc, DraggableScrollContainerDirective as ɵd, DraggableDirective as ɵb, DroppableDirective as ɵa };","map":{"version":3,"names":["Subject","Observable","merge","ReplaySubject","combineLatest","fromEvent","DOCUMENT","autoScroll","Injectable","Directive","ElementRef","Input","Renderer2","Output","EventEmitter","NgZone","Inject","ViewContainerRef","Optional","NgModule","defineInjectable","map","mergeMap","takeUntil","take","takeLast","pairwise","share","filter","count","startWith","distinctUntilChanged","ɵngcc0","DraggableHelper","constructor","currentDrag","ɵfac","DraggableHelper_Factory","t","ɵprov","ɵɵdefineInjectable","token","factory","providedIn","ngInjectableDef","ngDevMode","ɵsetClassMetadata","type","args","DraggableScrollContainerDirective","elementRef","activeLongPressDrag","longPressConfig","duration","delta","DraggableScrollContainerDirective_Factory","ɵɵdirectiveInject","ɵdir","ɵɵdefineDirective","selectors","inputs","ctorParameters","propDecorators","selector","addClass","renderer","element","classToAdd","split","forEach","className","nativeElement","removeClass","classToRemove","DraggableDirective","draggableHelper","zone","vcr","scrollContainer","document","dragAxis","x","y","dragSnapGrid","ghostDragEnabled","showOriginalElementWhileDragging","dragCursor","margin","dragPointerDown","dragStart","ghostElementCreated","dragging","dragEnd","pointerDown$","pointerMove$","pointerUp$","eventListenerSubscriptions","destroy$","timeLongPress","timerBegin","timerEnd","ngOnInit","checkEventListeners","pointerDragged$","pipe","canDrag","pointerDownEvent","event","stopPropagation","globalDragStyle","createElement","setAttribute","appendChild","createText","requestAnimationFrame","head","startScrollPosition","getScrollPosition","scrollContainerScroll$","observer","listen","e","next","currentDrag$","cancelDrag$","run","dragComplete$","pointerMove","pointerMoveEvent","scroll","transformX","clientX","transformY","clientY","scrollLeft","left","scrollTop","top","target","moveData","Math","round","scrollX","scrollY","Object","assign","validateDrag","transform","dragStarted$","dragEnded$","subscribe","scroller","defaultView","dragActiveClass","rect","getBoundingClientRect","clone","cloneNode","setStyle","ghostElementAppendTo","parentNode","insertBefore","nextSibling","ghostElement","body","style","cursor","setElementStyles","position","width","height","willChange","pointerEvents","ghostElementTemplate","viewRef","createEmbeddedView","innerHTML","rootNodes","node","Node","remove","indexOf","emit","parentElement","removeChild","dragEndData","dragEndData$","calledCount","dragCancelled","complete","destroy","value","previous","dropData","ngOnChanges","changes","ngOnDestroy","unsubscribeEventListeners","hasEventListeners","keys","length","runOutsideAngular","mousedown","onMouseDown","mouseup","onMouseUp","touchstart","onTouchStart","touchend","onTouchEnd","touchcancel","mouseenter","onMouseEnter","mouseleave","onMouseLeave","button","mousemove","mouseMoveEvent","isDragActivated","hasContainerScrollbar","touchStartLongPress","Date","now","hasScrollbar","touchmove","contextMenuListener","preventDefault","touchMoveListener","passive","touchMoveEvent","shouldBeginDrag","targetTouches","unsubscribe","touches","enableScroll","changedTouches","setCursor","styles","key","getScrollElement","window","pageYOffset","documentElement","pageXOffset","moveScrollPosition","deltaScroll","abs","deltaX","deltaY","deltaTotal","delay","disableScroll","containerHasHorizontalScroll","scrollWidth","clientWidth","containerHasVerticalScroll","scrollHeight","clientHeight","DraggableDirective_Factory","outputs","features","ɵɵNgOnChangesFeature","decorators","undefined","isCoordinateWithinRectangle","right","bottom","DroppableDirective","dragEnter","dragLeave","dragOver","drop","currentDragSubscription","drag$","droppableElement","updateCache","deregisterScrollListener","currentDragDropData","overlaps$","scrollContainerRect","isWithinElement","isDropAllowed","validateDrop","overlapsChanged$","dragOverActive","overlapsNow","dragOverClass","didOverlap","DroppableDirective_Factory","DragAndDropModule","DragAndDropModule_Factory","ɵmod","ɵɵdefineNgModule","ɵinj","ɵɵdefineInjector","declarations","exports","ngJitMode","ɵɵsetNgModuleScope","ɵc","ɵd","ɵb","ɵa"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/angular-draggable-droppable/__ivy_ngcc__/fesm2015/angular-draggable-droppable.js"],"sourcesContent":["import { Subject, Observable, merge, ReplaySubject, combineLatest, fromEvent } from 'rxjs';\nimport { DOCUMENT } from '@angular/common';\nimport autoScroll from '@mattlewis92/dom-autoscroller';\nimport { Injectable, Directive, ElementRef, Input, Renderer2, Output, EventEmitter, NgZone, Inject, ViewContainerRef, Optional, NgModule, defineInjectable } from '@angular/core';\nimport { map, mergeMap, takeUntil, take, takeLast, pairwise, share, filter, count, startWith, distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nimport * as ɵngcc0 from '@angular/core';\nclass DraggableHelper {\n constructor() {\n this.currentDrag = new Subject();\n }\n}\nDraggableHelper.ɵfac = function DraggableHelper_Factory(t) { return new (t || DraggableHelper)(); };\nDraggableHelper.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: DraggableHelper, factory: DraggableHelper.ɵfac, providedIn: 'root' });\n/** @nocollapse */ DraggableHelper.ngInjectableDef = defineInjectable({ factory: function DraggableHelper_Factory() { return new DraggableHelper(); }, token: DraggableHelper, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DraggableHelper, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], function () { return []; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * If the window isn't scrollable, then place this on the scrollable container that draggable elements are inside. e.g.\n * ```html\n * <div style=\"overflow: scroll\" mwlDraggableScrollContainer>\n * <div mwlDraggable>Drag me!</div>\n * </div>\n * ```\n */\nclass DraggableScrollContainerDirective {\n /**\n * @hidden\n * @param {?} elementRef\n */\n constructor(elementRef) {\n this.elementRef = elementRef;\n /**\n * Trigger the DragStart after a long touch in scrollable container when true\n * @deprecated will be removed in v5 (use [touchStartLongPress]=\"{delay: 300, delta: 30}\" on the mwlDraggable element instead)\n */\n this.activeLongPressDrag = false;\n /**\n * Configuration of a long touch\n * Duration in ms of a long touch before activating DragStart\n * Delta of the\n * @deprecated will be removed in v5 (use [touchStartLongPress]=\"{delay: 300, delta: 30}\" on the mwlDraggable element instead)\n */\n this.longPressConfig = { duration: 300, delta: 30 };\n }\n}\nDraggableScrollContainerDirective.ɵfac = function DraggableScrollContainerDirective_Factory(t) { return new (t || DraggableScrollContainerDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nDraggableScrollContainerDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: DraggableScrollContainerDirective, selectors: [[\"\", \"mwlDraggableScrollContainer\", \"\"]], inputs: { activeLongPressDrag: \"activeLongPressDrag\", longPressConfig: \"longPressConfig\" } });\n/** @nocollapse */\nDraggableScrollContainerDirective.ctorParameters = () => [\n { type: ElementRef }\n];\nDraggableScrollContainerDirective.propDecorators = {\n activeLongPressDrag: [{ type: Input }],\n longPressConfig: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DraggableScrollContainerDirective, [{\n type: Directive,\n args: [{\n selector: '[mwlDraggableScrollContainer]'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }]; }, { activeLongPressDrag: [{\n type: Input\n }], longPressConfig: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} renderer\n * @param {?} element\n * @param {?} classToAdd\n * @return {?}\n */\nfunction addClass(renderer, element, classToAdd) {\n if (classToAdd) {\n classToAdd\n .split(' ')\n .forEach((/**\n * @param {?} className\n * @return {?}\n */\n (className) => renderer.addClass(element.nativeElement, className)));\n }\n}\n/**\n * @param {?} renderer\n * @param {?} element\n * @param {?} classToRemove\n * @return {?}\n */\nfunction removeClass(renderer, element, classToRemove) {\n if (classToRemove) {\n classToRemove\n .split(' ')\n .forEach((/**\n * @param {?} className\n * @return {?}\n */\n (className) => renderer.removeClass(element.nativeElement, className)));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass DraggableDirective {\n /**\n * @hidden\n * @param {?} element\n * @param {?} renderer\n * @param {?} draggableHelper\n * @param {?} zone\n * @param {?} vcr\n * @param {?} scrollContainer\n * @param {?} document\n */\n constructor(element, renderer, draggableHelper, zone, vcr, scrollContainer, document) {\n this.element = element;\n this.renderer = renderer;\n this.draggableHelper = draggableHelper;\n this.zone = zone;\n this.vcr = vcr;\n this.scrollContainer = scrollContainer;\n this.document = document;\n /**\n * The axis along which the element is draggable\n */\n this.dragAxis = { x: true, y: true };\n /**\n * Snap all drags to an x / y grid\n */\n this.dragSnapGrid = {};\n /**\n * Show a ghost element that shows the drag when dragging\n */\n this.ghostDragEnabled = true;\n /**\n * Show the original element when ghostDragEnabled is true\n */\n this.showOriginalElementWhileDragging = false;\n /**\n * The cursor to use when hovering over a draggable element\n */\n this.dragCursor = '';\n /*\n * Options used to control the behaviour of auto scrolling: https://www.npmjs.com/package/dom-autoscroller\n */\n this.autoScroll = {\n margin: 20,\n };\n /**\n * Called when the element can be dragged along one axis and has the mouse or pointer device pressed on it\n */\n this.dragPointerDown = new EventEmitter();\n /**\n * Called when the element has started to be dragged.\n * Only called after at least one mouse or touch move event.\n * If you call $event.cancelDrag$.emit() it will cancel the current drag\n */\n this.dragStart = new EventEmitter();\n /**\n * Called after the ghost element has been created\n */\n this.ghostElementCreated = new EventEmitter();\n /**\n * Called when the element is being dragged\n */\n this.dragging = new EventEmitter();\n /**\n * Called after the element is dragged\n */\n this.dragEnd = new EventEmitter();\n /**\n * @hidden\n */\n this.pointerDown$ = new Subject();\n /**\n * @hidden\n */\n this.pointerMove$ = new Subject();\n /**\n * @hidden\n */\n this.pointerUp$ = new Subject();\n this.eventListenerSubscriptions = {};\n this.destroy$ = new Subject();\n this.timeLongPress = { timerBegin: 0, timerEnd: 0 };\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n this.checkEventListeners();\n /** @type {?} */\n const pointerDragged$ = this.pointerDown$.pipe(filter((/**\n * @return {?}\n */\n () => this.canDrag())), mergeMap((/**\n * @param {?} pointerDownEvent\n * @return {?}\n */\n (pointerDownEvent) => {\n // fix for https://github.com/mattlewis92/angular-draggable-droppable/issues/61\n // stop mouse events propagating up the chain\n if (pointerDownEvent.event.stopPropagation && !this.scrollContainer) {\n pointerDownEvent.event.stopPropagation();\n }\n // hack to prevent text getting selected in safari while dragging\n /** @type {?} */\n const globalDragStyle = this.renderer.createElement('style');\n this.renderer.setAttribute(globalDragStyle, 'type', 'text/css');\n this.renderer.appendChild(globalDragStyle, this.renderer.createText(`\n body * {\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n }\n `));\n requestAnimationFrame((/**\n * @return {?}\n */\n () => {\n this.document.head.appendChild(globalDragStyle);\n }));\n /** @type {?} */\n const startScrollPosition = this.getScrollPosition();\n /** @type {?} */\n const scrollContainerScroll$ = new Observable((/**\n * @param {?} observer\n * @return {?}\n */\n (observer) => {\n /** @type {?} */\n const scrollContainer = this.scrollContainer\n ? this.scrollContainer.elementRef.nativeElement\n : 'window';\n return this.renderer.listen(scrollContainer, 'scroll', (/**\n * @param {?} e\n * @return {?}\n */\n (e) => observer.next(e)));\n })).pipe(startWith(startScrollPosition), map((/**\n * @return {?}\n */\n () => this.getScrollPosition())));\n /** @type {?} */\n const currentDrag$ = new Subject();\n /** @type {?} */\n const cancelDrag$ = new ReplaySubject();\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.dragPointerDown.next({ x: 0, y: 0 });\n }));\n /** @type {?} */\n const dragComplete$ = merge(this.pointerUp$, this.pointerDown$, cancelDrag$, this.destroy$).pipe(share());\n /** @type {?} */\n const pointerMove = combineLatest([\n this.pointerMove$,\n scrollContainerScroll$,\n ]).pipe(map((/**\n * @param {?} __0\n * @return {?}\n */\n ([pointerMoveEvent, scroll]) => {\n return {\n currentDrag$,\n transformX: pointerMoveEvent.clientX - pointerDownEvent.clientX,\n transformY: pointerMoveEvent.clientY - pointerDownEvent.clientY,\n clientX: pointerMoveEvent.clientX,\n clientY: pointerMoveEvent.clientY,\n scrollLeft: scroll.left,\n scrollTop: scroll.top,\n target: pointerMoveEvent.event.target,\n };\n })), map((/**\n * @param {?} moveData\n * @return {?}\n */\n (moveData) => {\n if (this.dragSnapGrid.x) {\n moveData.transformX =\n Math.round(moveData.transformX / this.dragSnapGrid.x) *\n this.dragSnapGrid.x;\n }\n if (this.dragSnapGrid.y) {\n moveData.transformY =\n Math.round(moveData.transformY / this.dragSnapGrid.y) *\n this.dragSnapGrid.y;\n }\n return moveData;\n })), map((/**\n * @param {?} moveData\n * @return {?}\n */\n (moveData) => {\n if (!this.dragAxis.x) {\n moveData.transformX = 0;\n }\n if (!this.dragAxis.y) {\n moveData.transformY = 0;\n }\n return moveData;\n })), map((/**\n * @param {?} moveData\n * @return {?}\n */\n (moveData) => {\n /** @type {?} */\n const scrollX = moveData.scrollLeft - startScrollPosition.left;\n /** @type {?} */\n const scrollY = moveData.scrollTop - startScrollPosition.top;\n return Object.assign({}, moveData, { x: moveData.transformX + scrollX, y: moveData.transformY + scrollY });\n })), filter((/**\n * @param {?} __0\n * @return {?}\n */\n ({ x, y, transformX, transformY }) => !this.validateDrag ||\n this.validateDrag({\n x,\n y,\n transform: { x: transformX, y: transformY },\n }))), takeUntil(dragComplete$), share());\n /** @type {?} */\n const dragStarted$ = pointerMove.pipe(take(1), share());\n /** @type {?} */\n const dragEnded$ = pointerMove.pipe(takeLast(1), share());\n dragStarted$.subscribe((/**\n * @param {?} __0\n * @return {?}\n */\n ({ clientX, clientY, x, y }) => {\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.dragStart.next({ cancelDrag$ });\n }));\n this.scroller = autoScroll([\n this.scrollContainer\n ? this.scrollContainer.elementRef.nativeElement\n : this.document.defaultView,\n ], Object.assign({}, this.autoScroll, { /**\n * @return {?}\n */\n autoScroll() {\n return true;\n } }));\n addClass(this.renderer, this.element, this.dragActiveClass);\n if (this.ghostDragEnabled) {\n /** @type {?} */\n const rect = this.element.nativeElement.getBoundingClientRect();\n /** @type {?} */\n const clone = (/** @type {?} */ (this.element.nativeElement.cloneNode(true)));\n if (!this.showOriginalElementWhileDragging) {\n this.renderer.setStyle(this.element.nativeElement, 'visibility', 'hidden');\n }\n if (this.ghostElementAppendTo) {\n this.ghostElementAppendTo.appendChild(clone);\n }\n else {\n (/** @type {?} */ (this.element.nativeElement.parentNode)).insertBefore(clone, this.element.nativeElement.nextSibling);\n }\n this.ghostElement = clone;\n this.document.body.style.cursor = this.dragCursor;\n this.setElementStyles(clone, {\n position: 'fixed',\n top: `${rect.top}px`,\n left: `${rect.left}px`,\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n cursor: this.dragCursor,\n margin: '0',\n willChange: 'transform',\n pointerEvents: 'none',\n });\n if (this.ghostElementTemplate) {\n /** @type {?} */\n const viewRef = this.vcr.createEmbeddedView(this.ghostElementTemplate);\n clone.innerHTML = '';\n viewRef.rootNodes\n .filter((/**\n * @param {?} node\n * @return {?}\n */\n (node) => node instanceof Node))\n .forEach((/**\n * @param {?} node\n * @return {?}\n */\n (node) => {\n clone.appendChild(node);\n }));\n dragEnded$.subscribe((/**\n * @return {?}\n */\n () => {\n this.vcr.remove(this.vcr.indexOf(viewRef));\n }));\n }\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.ghostElementCreated.emit({\n clientX: clientX - x,\n clientY: clientY - y,\n element: clone,\n });\n }));\n dragEnded$.subscribe((/**\n * @return {?}\n */\n () => {\n (/** @type {?} */ (clone.parentElement)).removeChild(clone);\n this.ghostElement = null;\n this.renderer.setStyle(this.element.nativeElement, 'visibility', '');\n }));\n }\n this.draggableHelper.currentDrag.next(currentDrag$);\n }));\n dragEnded$\n .pipe(mergeMap((/**\n * @param {?} dragEndData\n * @return {?}\n */\n (dragEndData) => {\n /** @type {?} */\n const dragEndData$ = cancelDrag$.pipe(count(), take(1), map((/**\n * @param {?} calledCount\n * @return {?}\n */\n (calledCount) => (Object.assign({}, dragEndData, { dragCancelled: calledCount > 0 })))));\n cancelDrag$.complete();\n return dragEndData$;\n })))\n .subscribe((/**\n * @param {?} __0\n * @return {?}\n */\n ({ x, y, dragCancelled }) => {\n this.scroller.destroy();\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.dragEnd.next({ x, y, dragCancelled });\n }));\n removeClass(this.renderer, this.element, this.dragActiveClass);\n currentDrag$.complete();\n }));\n merge(dragComplete$, dragEnded$)\n .pipe(take(1))\n .subscribe((/**\n * @return {?}\n */\n () => {\n requestAnimationFrame((/**\n * @return {?}\n */\n () => {\n this.document.head.removeChild(globalDragStyle);\n }));\n }));\n return pointerMove;\n })), share());\n merge(pointerDragged$.pipe(take(1), map((/**\n * @param {?} value\n * @return {?}\n */\n (value) => [, value]))), pointerDragged$.pipe(pairwise()))\n .pipe(filter((/**\n * @param {?} __0\n * @return {?}\n */\n ([previous, next]) => {\n if (!previous) {\n return true;\n }\n return previous.x !== next.x || previous.y !== next.y;\n })), map((/**\n * @param {?} __0\n * @return {?}\n */\n ([previous, next]) => next)))\n .subscribe((/**\n * @param {?} __0\n * @return {?}\n */\n ({ x, y, currentDrag$, clientX, clientY, transformX, transformY, target, }) => {\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.dragging.next({ x, y });\n }));\n requestAnimationFrame((/**\n * @return {?}\n */\n () => {\n if (this.ghostElement) {\n /** @type {?} */\n const transform = `translate3d(${transformX}px, ${transformY}px, 0px)`;\n this.setElementStyles(this.ghostElement, {\n transform,\n '-webkit-transform': transform,\n '-ms-transform': transform,\n '-moz-transform': transform,\n '-o-transform': transform,\n });\n }\n }));\n currentDrag$.next({\n clientX,\n clientY,\n dropData: this.dropData,\n target,\n });\n }));\n }\n /**\n * @param {?} changes\n * @return {?}\n */\n ngOnChanges(changes) {\n if (changes.dragAxis) {\n this.checkEventListeners();\n }\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this.unsubscribeEventListeners();\n this.pointerDown$.complete();\n this.pointerMove$.complete();\n this.pointerUp$.complete();\n this.destroy$.next();\n }\n /**\n * @private\n * @return {?}\n */\n checkEventListeners() {\n /** @type {?} */\n const canDrag = this.canDrag();\n /** @type {?} */\n const hasEventListeners = Object.keys(this.eventListenerSubscriptions).length > 0;\n if (canDrag && !hasEventListeners) {\n this.zone.runOutsideAngular((/**\n * @return {?}\n */\n () => {\n this.eventListenerSubscriptions.mousedown = this.renderer.listen(this.element.nativeElement, 'mousedown', (/**\n * @param {?} event\n * @return {?}\n */\n (event) => {\n this.onMouseDown(event);\n }));\n this.eventListenerSubscriptions.mouseup = this.renderer.listen('document', 'mouseup', (/**\n * @param {?} event\n * @return {?}\n */\n (event) => {\n this.onMouseUp(event);\n }));\n this.eventListenerSubscriptions.touchstart = this.renderer.listen(this.element.nativeElement, 'touchstart', (/**\n * @param {?} event\n * @return {?}\n */\n (event) => {\n this.onTouchStart(event);\n }));\n this.eventListenerSubscriptions.touchend = this.renderer.listen('document', 'touchend', (/**\n * @param {?} event\n * @return {?}\n */\n (event) => {\n this.onTouchEnd(event);\n }));\n this.eventListenerSubscriptions.touchcancel = this.renderer.listen('document', 'touchcancel', (/**\n * @param {?} event\n * @return {?}\n */\n (event) => {\n this.onTouchEnd(event);\n }));\n this.eventListenerSubscriptions.mouseenter = this.renderer.listen(this.element.nativeElement, 'mouseenter', (/**\n * @return {?}\n */\n () => {\n this.onMouseEnter();\n }));\n this.eventListenerSubscriptions.mouseleave = this.renderer.listen(this.element.nativeElement, 'mouseleave', (/**\n * @return {?}\n */\n () => {\n this.onMouseLeave();\n }));\n }));\n }\n else if (!canDrag && hasEventListeners) {\n this.unsubscribeEventListeners();\n }\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onMouseDown(event) {\n if (event.button === 0) {\n if (!this.eventListenerSubscriptions.mousemove) {\n this.eventListenerSubscriptions.mousemove = this.renderer.listen('document', 'mousemove', (/**\n * @param {?} mouseMoveEvent\n * @return {?}\n */\n (mouseMoveEvent) => {\n this.pointerMove$.next({\n event: mouseMoveEvent,\n clientX: mouseMoveEvent.clientX,\n clientY: mouseMoveEvent.clientY,\n });\n }));\n }\n this.pointerDown$.next({\n event,\n clientX: event.clientX,\n clientY: event.clientY,\n });\n }\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onMouseUp(event) {\n if (event.button === 0) {\n if (this.eventListenerSubscriptions.mousemove) {\n this.eventListenerSubscriptions.mousemove();\n delete this.eventListenerSubscriptions.mousemove;\n }\n this.pointerUp$.next({\n event,\n clientX: event.clientX,\n clientY: event.clientY,\n });\n }\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onTouchStart(event) {\n /** @type {?} */\n let startScrollPosition;\n /** @type {?} */\n let isDragActivated;\n /** @type {?} */\n let hasContainerScrollbar;\n if ((this.scrollContainer && this.scrollContainer.activeLongPressDrag) ||\n this.touchStartLongPress) {\n this.timeLongPress.timerBegin = Date.now();\n isDragActivated = false;\n hasContainerScrollbar = this.hasScrollbar();\n startScrollPosition = this.getScrollPosition();\n }\n if (!this.eventListenerSubscriptions.touchmove) {\n /** @type {?} */\n const contextMenuListener = fromEvent(this.document, 'contextmenu').subscribe((/**\n * @param {?} e\n * @return {?}\n */\n (e) => {\n e.preventDefault();\n }));\n /** @type {?} */\n const touchMoveListener = fromEvent(this.document, 'touchmove', {\n passive: false,\n }).subscribe((/**\n * @param {?} touchMoveEvent\n * @return {?}\n */\n (touchMoveEvent) => {\n if (((this.scrollContainer && this.scrollContainer.activeLongPressDrag) ||\n this.touchStartLongPress) &&\n !isDragActivated &&\n hasContainerScrollbar) {\n isDragActivated = this.shouldBeginDrag(event, touchMoveEvent, startScrollPosition);\n }\n if (((!this.scrollContainer ||\n !this.scrollContainer.activeLongPressDrag) &&\n !this.touchStartLongPress) ||\n !hasContainerScrollbar ||\n isDragActivated) {\n touchMoveEvent.preventDefault();\n this.pointerMove$.next({\n event: touchMoveEvent,\n clientX: touchMoveEvent.targetTouches[0].clientX,\n clientY: touchMoveEvent.targetTouches[0].clientY,\n });\n }\n }));\n this.eventListenerSubscriptions.touchmove = (/**\n * @return {?}\n */\n () => {\n contextMenuListener.unsubscribe();\n touchMoveListener.unsubscribe();\n });\n }\n this.pointerDown$.next({\n event,\n clientX: event.touches[0].clientX,\n clientY: event.touches[0].clientY,\n });\n }\n /**\n * @private\n * @param {?} event\n * @return {?}\n */\n onTouchEnd(event) {\n if (this.eventListenerSubscriptions.touchmove) {\n this.eventListenerSubscriptions.touchmove();\n delete this.eventListenerSubscriptions.touchmove;\n if ((this.scrollContainer && this.scrollContainer.activeLongPressDrag) ||\n this.touchStartLongPress) {\n this.enableScroll();\n }\n }\n this.pointerUp$.next({\n event,\n clientX: event.changedTouches[0].clientX,\n clientY: event.changedTouches[0].clientY,\n });\n }\n /**\n * @private\n * @return {?}\n */\n onMouseEnter() {\n this.setCursor(this.dragCursor);\n }\n /**\n * @private\n * @return {?}\n */\n onMouseLeave() {\n this.setCursor('');\n }\n /**\n * @private\n * @return {?}\n */\n canDrag() {\n return this.dragAxis.x || this.dragAxis.y;\n }\n /**\n * @private\n * @param {?} value\n * @return {?}\n */\n setCursor(value) {\n if (!this.eventListenerSubscriptions.mousemove) {\n this.renderer.setStyle(this.element.nativeElement, 'cursor', value);\n }\n }\n /**\n * @private\n * @return {?}\n */\n unsubscribeEventListeners() {\n Object.keys(this.eventListenerSubscriptions).forEach((/**\n * @param {?} type\n * @return {?}\n */\n (type) => {\n ((/** @type {?} */ (this))).eventListenerSubscriptions[type]();\n delete ((/** @type {?} */ (this))).eventListenerSubscriptions[type];\n }));\n }\n /**\n * @private\n * @param {?} element\n * @param {?} styles\n * @return {?}\n */\n setElementStyles(element, styles) {\n Object.keys(styles).forEach((/**\n * @param {?} key\n * @return {?}\n */\n (key) => {\n this.renderer.setStyle(element, key, styles[key]);\n }));\n }\n /**\n * @private\n * @return {?}\n */\n getScrollElement() {\n if (this.scrollContainer) {\n return this.scrollContainer.elementRef.nativeElement;\n }\n else {\n return this.document.body;\n }\n }\n /**\n * @private\n * @return {?}\n */\n getScrollPosition() {\n if (this.scrollContainer) {\n return {\n top: this.scrollContainer.elementRef.nativeElement.scrollTop,\n left: this.scrollContainer.elementRef.nativeElement.scrollLeft,\n };\n }\n else {\n return {\n top: window.pageYOffset || this.document.documentElement.scrollTop,\n left: window.pageXOffset || this.document.documentElement.scrollLeft,\n };\n }\n }\n /**\n * @private\n * @param {?} event\n * @param {?} touchMoveEvent\n * @param {?} startScrollPosition\n * @return {?}\n */\n shouldBeginDrag(event, touchMoveEvent, startScrollPosition) {\n /** @type {?} */\n const moveScrollPosition = this.getScrollPosition();\n /** @type {?} */\n const deltaScroll = {\n top: Math.abs(moveScrollPosition.top - startScrollPosition.top),\n left: Math.abs(moveScrollPosition.left - startScrollPosition.left),\n };\n /** @type {?} */\n const deltaX = Math.abs(touchMoveEvent.targetTouches[0].clientX - event.touches[0].clientX) - deltaScroll.left;\n /** @type {?} */\n const deltaY = Math.abs(touchMoveEvent.targetTouches[0].clientY - event.touches[0].clientY) - deltaScroll.top;\n /** @type {?} */\n const deltaTotal = deltaX + deltaY;\n /** @type {?} */\n const longPressConfig = this.touchStartLongPress\n ? this.touchStartLongPress\n : /* istanbul ignore next */\n {\n delta: this.scrollContainer.longPressConfig.delta,\n delay: this.scrollContainer.longPressConfig.duration,\n };\n if (deltaTotal > longPressConfig.delta ||\n deltaScroll.top > 0 ||\n deltaScroll.left > 0) {\n this.timeLongPress.timerBegin = Date.now();\n }\n this.timeLongPress.timerEnd = Date.now();\n /** @type {?} */\n const duration = this.timeLongPress.timerEnd - this.timeLongPress.timerBegin;\n if (duration >= longPressConfig.delay) {\n this.disableScroll();\n return true;\n }\n return false;\n }\n /**\n * @private\n * @return {?}\n */\n enableScroll() {\n if (this.scrollContainer) {\n this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement, 'overflow', '');\n }\n this.renderer.setStyle(this.document.body, 'overflow', '');\n }\n /**\n * @private\n * @return {?}\n */\n disableScroll() {\n /* istanbul ignore next */\n if (this.scrollContainer) {\n this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement, 'overflow', 'hidden');\n }\n this.renderer.setStyle(this.document.body, 'overflow', 'hidden');\n }\n /**\n * @private\n * @return {?}\n */\n hasScrollbar() {\n /** @type {?} */\n const scrollContainer = this.getScrollElement();\n /** @type {?} */\n const containerHasHorizontalScroll = scrollContainer.scrollWidth > scrollContainer.clientWidth;\n /** @type {?} */\n const containerHasVerticalScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;\n return containerHasHorizontalScroll || containerHasVerticalScroll;\n }\n}\nDraggableDirective.ɵfac = function DraggableDirective_Factory(t) { return new (t || DraggableDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(DraggableHelper), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(DraggableScrollContainerDirective, 8), ɵngcc0.ɵɵdirectiveInject(DOCUMENT)); };\nDraggableDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: DraggableDirective, selectors: [[\"\", \"mwlDraggable\", \"\"]], inputs: { dragAxis: \"dragAxis\", dragSnapGrid: \"dragSnapGrid\", ghostDragEnabled: \"ghostDragEnabled\", showOriginalElementWhileDragging: \"showOriginalElementWhileDragging\", dragCursor: \"dragCursor\", autoScroll: \"autoScroll\", dropData: \"dropData\", validateDrag: \"validateDrag\", dragActiveClass: \"dragActiveClass\", ghostElementAppendTo: \"ghostElementAppendTo\", ghostElementTemplate: \"ghostElementTemplate\", touchStartLongPress: \"touchStartLongPress\" }, outputs: { dragPointerDown: \"dragPointerDown\", dragStart: \"dragStart\", ghostElementCreated: \"ghostElementCreated\", dragging: \"dragging\", dragEnd: \"dragEnd\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\n/** @nocollapse */\nDraggableDirective.ctorParameters = () => [\n { type: ElementRef },\n { type: Renderer2 },\n { type: DraggableHelper },\n { type: NgZone },\n { type: ViewContainerRef },\n { type: DraggableScrollContainerDirective, decorators: [{ type: Optional }] },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\nDraggableDirective.propDecorators = {\n dropData: [{ type: Input }],\n dragAxis: [{ type: Input }],\n dragSnapGrid: [{ type: Input }],\n ghostDragEnabled: [{ type: Input }],\n showOriginalElementWhileDragging: [{ type: Input }],\n validateDrag: [{ type: Input }],\n dragCursor: [{ type: Input }],\n dragActiveClass: [{ type: Input }],\n ghostElementAppendTo: [{ type: Input }],\n ghostElementTemplate: [{ type: Input }],\n touchStartLongPress: [{ type: Input }],\n autoScroll: [{ type: Input }],\n dragPointerDown: [{ type: Output }],\n dragStart: [{ type: Output }],\n ghostElementCreated: [{ type: Output }],\n dragging: [{ type: Output }],\n dragEnd: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DraggableDirective, [{\n type: Directive,\n args: [{\n selector: '[mwlDraggable]'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: DraggableHelper }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.ViewContainerRef }, { type: DraggableScrollContainerDirective, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, { dragAxis: [{\n type: Input\n }], dragSnapGrid: [{\n type: Input\n }], ghostDragEnabled: [{\n type: Input\n }], showOriginalElementWhileDragging: [{\n type: Input\n }], dragCursor: [{\n type: Input\n }], autoScroll: [{\n type: Input\n }], dragPointerDown: [{\n type: Output\n }], dragStart: [{\n type: Output\n }], ghostElementCreated: [{\n type: Output\n }], dragging: [{\n type: Output\n }], dragEnd: [{\n type: Output\n }], dropData: [{\n type: Input\n }], validateDrag: [{\n type: Input\n }], dragActiveClass: [{\n type: Input\n }], ghostElementAppendTo: [{\n type: Input\n }], ghostElementTemplate: [{\n type: Input\n }], touchStartLongPress: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} clientX\n * @param {?} clientY\n * @param {?} rect\n * @return {?}\n */\nfunction isCoordinateWithinRectangle(clientX, clientY, rect) {\n return (clientX >= rect.left &&\n clientX <= rect.right &&\n clientY >= rect.top &&\n clientY <= rect.bottom);\n}\nclass DroppableDirective {\n /**\n * @param {?} element\n * @param {?} draggableHelper\n * @param {?} zone\n * @param {?} renderer\n * @param {?} scrollContainer\n */\n constructor(element, draggableHelper, zone, renderer, scrollContainer) {\n this.element = element;\n this.draggableHelper = draggableHelper;\n this.zone = zone;\n this.renderer = renderer;\n this.scrollContainer = scrollContainer;\n /**\n * Called when a draggable element starts overlapping the element\n */\n this.dragEnter = new EventEmitter();\n /**\n * Called when a draggable element stops overlapping the element\n */\n this.dragLeave = new EventEmitter();\n /**\n * Called when a draggable element is moved over the element\n */\n this.dragOver = new EventEmitter();\n /**\n * Called when a draggable element is dropped on this element\n */\n this.drop = new EventEmitter(); // tslint:disable-line no-output-named-after-standard-event\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n this.currentDragSubscription = this.draggableHelper.currentDrag.subscribe((/**\n * @param {?} drag$\n * @return {?}\n */\n (drag$) => {\n addClass(this.renderer, this.element, this.dragActiveClass);\n /** @type {?} */\n const droppableElement = {\n updateCache: true,\n };\n /** @type {?} */\n const deregisterScrollListener = this.renderer.listen(this.scrollContainer\n ? this.scrollContainer.elementRef.nativeElement\n : 'window', 'scroll', (/**\n * @return {?}\n */\n () => {\n droppableElement.updateCache = true;\n }));\n /** @type {?} */\n let currentDragDropData;\n /** @type {?} */\n const overlaps$ = drag$.pipe(map((/**\n * @param {?} __0\n * @return {?}\n */\n ({ clientX, clientY, dropData, target }) => {\n currentDragDropData = dropData;\n if (droppableElement.updateCache) {\n droppableElement.rect = this.element.nativeElement.getBoundingClientRect();\n if (this.scrollContainer) {\n droppableElement.scrollContainerRect = this.scrollContainer.elementRef.nativeElement.getBoundingClientRect();\n }\n droppableElement.updateCache = false;\n }\n /** @type {?} */\n const isWithinElement = isCoordinateWithinRectangle(clientX, clientY, (/** @type {?} */ (droppableElement.rect)));\n /** @type {?} */\n const isDropAllowed = !this.validateDrop ||\n this.validateDrop({ clientX, clientY, target });\n if (droppableElement.scrollContainerRect) {\n return (isWithinElement &&\n isDropAllowed &&\n isCoordinateWithinRectangle(clientX, clientY, (/** @type {?} */ (droppableElement.scrollContainerRect))));\n }\n else {\n return isWithinElement && isDropAllowed;\n }\n })));\n /** @type {?} */\n const overlapsChanged$ = overlaps$.pipe(distinctUntilChanged());\n /** @type {?} */\n let dragOverActive;\n overlapsChanged$\n .pipe(filter((/**\n * @param {?} overlapsNow\n * @return {?}\n */\n (overlapsNow) => overlapsNow)))\n .subscribe((/**\n * @return {?}\n */\n () => {\n dragOverActive = true;\n addClass(this.renderer, this.element, this.dragOverClass);\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.dragEnter.next({\n dropData: currentDragDropData,\n });\n }));\n }));\n overlaps$.pipe(filter((/**\n * @param {?} overlapsNow\n * @return {?}\n */\n (overlapsNow) => overlapsNow))).subscribe((/**\n * @return {?}\n */\n () => {\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.dragOver.next({\n dropData: currentDragDropData,\n });\n }));\n }));\n overlapsChanged$\n .pipe(pairwise(), filter((/**\n * @param {?} __0\n * @return {?}\n */\n ([didOverlap, overlapsNow]) => didOverlap && !overlapsNow)))\n .subscribe((/**\n * @return {?}\n */\n () => {\n dragOverActive = false;\n removeClass(this.renderer, this.element, this.dragOverClass);\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.dragLeave.next({\n dropData: currentDragDropData,\n });\n }));\n }));\n drag$.subscribe({\n complete: (/**\n * @return {?}\n */\n () => {\n deregisterScrollListener();\n removeClass(this.renderer, this.element, this.dragActiveClass);\n if (dragOverActive) {\n removeClass(this.renderer, this.element, this.dragOverClass);\n this.zone.run((/**\n * @return {?}\n */\n () => {\n this.drop.next({\n dropData: currentDragDropData,\n });\n }));\n }\n }),\n });\n }));\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n if (this.currentDragSubscription) {\n this.currentDragSubscription.unsubscribe();\n }\n }\n}\nDroppableDirective.ɵfac = function DroppableDirective_Factory(t) { return new (t || DroppableDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(DraggableHelper), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(DraggableScrollContainerDirective, 8)); };\nDroppableDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: DroppableDirective, selectors: [[\"\", \"mwlDroppable\", \"\"]], inputs: { dragOverClass: \"dragOverClass\", dragActiveClass: \"dragActiveClass\", validateDrop: \"validateDrop\" }, outputs: { dragEnter: \"dragEnter\", dragLeave: \"dragLeave\", dragOver: \"dragOver\", drop: \"drop\" } });\n/** @nocollapse */\nDroppableDirective.ctorParameters = () => [\n { type: ElementRef },\n { type: DraggableHelper },\n { type: NgZone },\n { type: Renderer2 },\n { type: DraggableScrollContainerDirective, decorators: [{ type: Optional }] }\n];\nDroppableDirective.propDecorators = {\n dragOverClass: [{ type: Input }],\n dragActiveClass: [{ type: Input }],\n validateDrop: [{ type: Input }],\n dragEnter: [{ type: Output }],\n dragLeave: [{ type: Output }],\n dragOver: [{ type: Output }],\n drop: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DroppableDirective, [{\n type: Directive,\n args: [{\n selector: '[mwlDroppable]'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: DraggableHelper }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.Renderer2 }, { type: DraggableScrollContainerDirective, decorators: [{\n type: Optional\n }] }]; }, { dragEnter: [{\n type: Output\n }], dragLeave: [{\n type: Output\n }], dragOver: [{\n type: Output\n }], drop: [{\n type: Output\n }], dragOverClass: [{\n type: Input\n }], dragActiveClass: [{\n type: Input\n }], validateDrop: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass DragAndDropModule {\n}\nDragAndDropModule.ɵfac = function DragAndDropModule_Factory(t) { return new (t || DragAndDropModule)(); };\nDragAndDropModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: DragAndDropModule });\nDragAndDropModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DragAndDropModule, [{\n type: NgModule,\n args: [{\n declarations: [\n DraggableDirective,\n DroppableDirective,\n DraggableScrollContainerDirective,\n ],\n exports: [\n DraggableDirective,\n DroppableDirective,\n DraggableScrollContainerDirective,\n ]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(DragAndDropModule, { declarations: [DraggableDirective, DroppableDirective, DraggableScrollContainerDirective], exports: [DraggableDirective, DroppableDirective, DraggableScrollContainerDirective] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { DragAndDropModule, DraggableHelper as ɵc, DraggableScrollContainerDirective as ɵd, DraggableDirective as ɵb, DroppableDirective as ɵa };\n\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,UAAU,EAAEC,KAAK,EAAEC,aAAa,EAAEC,aAAa,EAAEC,SAAS,QAAQ,MAAM;AAC1F,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,UAAU,MAAM,+BAA+B;AACtD,SAASC,UAAU,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,SAAS,EAAEC,MAAM,EAAEC,YAAY,EAAEC,MAAM,EAAEC,MAAM,EAAEC,gBAAgB,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,gBAAgB,QAAQ,eAAe;AACjL,SAASC,GAAG,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,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