@qaecy/cue-ui 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/598.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[598],{7598(_e,yt,g){g.d(yt,{T1:()=>Dt,O7:()=>wt,HD:()=>V,eg:()=>ee});var p=g(5547),h=g(5802),D=g(7705),_=g(1413),K=g(4226),N=g(7786),y=g(8359),Rt=g(3236),Et=g(1584),xt=g(536),Ct=g(4412),P=g(9867),Tt=g(3293),M=g(6535),w=g(7384),k=g(6977),Lt=g(6354),Nt=g(6697),Mt=g(8141),At=g(5558),Ft=g(6365),U=g(9326),Ht=g(6648);function Z(...n){return function Bt(){return(0,Ft.U)(1)}()((0,Ht.H)(n,(0,U.lI)(n)))}var Wt=g(9974);function $(...n){const e=(0,U.lI)(n);return(0,Wt.N)((t,i)=>{(e?Z(n,t,e):Z(n,t)).subscribe(i)})}var j=g(9752),zt=g(3531),Vt=g(7523);function A(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return"canvas"===i?q(n,e):("input"===i||"select"===i||"textarea"===i)&&J(n,e),Y("canvas",n,e,q),Y("input, textarea, select",n,e,J),e}function Y(n,e,t,i){const s=e.querySelectorAll(n);if(s.length){const r=t.querySelectorAll(n);for(let o=0;o<s.length;o++)i(s[o],r[o])}}let Qt=0;function J(n,e){"file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${Qt++}`)}function q(n,e){const t=e.getContext("2d");if(t)try{t.drawImage(n,0,0)}catch{}}function F(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function B(n,e,t){const{top:i,bottom:s,left:r,right:o}=n;return t>=i&&t<=s&&e>=r&&e<=o}function R(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function tt(n,e,t,i){const{top:s,right:r,bottom:o,left:a,width:l,height:c}=n,d=l*e,f=c*e;return i>s-f&&i<o+f&&t>a-d&&t<r+d}class et{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:F(t)})})}handleScroll(e){const t=(0,P.Fb)(e),i=this.positions.get(t);if(!i)return null;const s=i.scrollPosition;let r,o;if(t===this._document){const c=this.getViewportScrollPosition();r=c.top,o=c.left}else r=t.scrollTop,o=t.scrollLeft;const a=s.top-r,l=s.left-o;return this.positions.forEach((c,d)=>{c.clientRect&&t!==d&&t.contains(d)&&R(c.clientRect,a,l)}),s.top=r,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function it(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const i=e.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function H(n,e,t){for(let i in e)if(e.hasOwnProperty(i)){const s=e[i];s?n.setProperty(i,s,t?.has(i)?"important":""):n.removeProperty(i)}return n}function b(n,e){const t=e?"":"none";H(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function st(n,e,t){H(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function O(n,e){return e&&"none"!=e?n+" "+e:n}function nt(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=E(e.left,e.top)}function E(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}const I={capture:!0},W={passive:!1,capture:!0};let Xt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=p.VBU({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}\n"],encapsulation:2,changeDetection:0})}return n})(),L=(()=>{class n{_ngZone=(0,h.WQX)(h.SKi);_document=(0,h.WQX)(h.qQL);_styleLoader=(0,h.WQX)(Tt.l);_renderer=(0,h.WQX)(p._9s).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new _.B;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=(0,h.vPA)([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new _.B;pointerUp=new _.B;constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,W)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(Xt),this._activeDragInstances.update(s=>[...s,t]),1===this._activeDragInstances().length)){const s=i.type.startsWith("touch"),r=a=>this.pointerUp.next(a),o=[["scroll",a=>this._scroll.next(a),I],["selectstart",this._preventDefaultWhileDragging,W]];s?o.push(["touchend",r,I],["touchcancel",r,I]):o.push(["mouseup",r,I]),s||o.push(["mousemove",a=>this.pointerMove.next(a),W]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>this._renderer.listen(this._document,a,l,c))})}}stopDragging(t){this._activeDragInstances.update(i=>{const s=i.indexOf(t);return s>-1?(i.splice(s,1),[...i]):i}),0===this._activeDragInstances().length&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){const i=[this._scroll];return t&&t!==this._document&&i.push(new K.c(s=>this._ngZone.runOutsideAngular(()=>{const r=this._renderer.listen(t,"scroll",o=>{this._activeDragInstances().length&&s.next(o)},I);return()=>{r()}}))),(0,N.h)(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=h.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function rt(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function z(n,e){return n.getPropertyValue(e).split(",").map(i=>i.trim())}const Ut=new Set(["position"]);class Zt{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(e,t,i,s,r,o,a,l,c,d){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=r,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c,this._renderer=d}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),ot(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return function Kt(n){const e=getComputedStyle(n),t=z(e,"transition-property"),i=t.find(a=>"transform"===a||"all"===a);if(!i)return 0;const s=t.indexOf(i),r=z(e,"transition-duration"),o=z(e,"transition-delay");return rt(r[s])+rt(o[s])}(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){const e=this._previewTemplate,t=this._previewClass,i=e?e.template:null;let s;if(i&&e){const r=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=it(o,this._document),this._previewEmbeddedView=o,e.matchSize?nt(s,r):s.style.transform=E(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=A(this._rootElement),nt(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return H(s.style,{"pointer-events":"none",margin:ot(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Ut),b(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(r=>s.classList.add(r)):s.classList.add(t)),s}}function ot(n){return"showPopover"in n}const $t={passive:!0},at={passive:!1},jt={passive:!1,capture:!0},lt="cdk-drag-placeholder",ht=new Set(["position"]);class qt{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=(0,h.vPA)(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _.B;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=y.yU.EMPTY;_pointerUpSubscription=y.yU.EMPTY;_scrollSubscription=y.yU.EMPTY;_resizeSubscription=y.yU.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>b(t,e)))}_disabled=!1;beforeStarted=new _.B;started=new _.B;released=new _.B;ended=new _.B;entered=new _.B;exited=new _.B;dropped=new _.B;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,r,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=r,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new et(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>(0,w.i8)(i)),this._handles.forEach(i=>b(i,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=(0,w.i8)(e);if(t!==this._rootElement){this._removeRootElementListeners();const i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,at),i.listen(t,"touchstart",this._pointerDown,$t),i.listen(t,"dragstart",this._nativeDragStart,at)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?(0,w.i8)(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&function Gt(n,e){return e.left<n.left||e.left+e.width>n.right||e.top<n.top||e.top+e.height>n.bottom}(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){const e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect();let i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let a=this._activeTransform.x+i,l=this._activeTransform.y+s;this._rootElement.style.transform=E(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),b(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),b(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){const t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{const t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){if(Math.abs(t.x-this._pickupPositionOnPage.x)+Math.abs(t.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a)return void this._endDragSequence(e);(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();const i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{const s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=i.x-s.x+this._passiveTransform.x,r.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){x(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",te,jt)}),i){const s=this._rootElement,r=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");r.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new Zt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,t)),st(s,!1,ht),this._document.body.appendChild(r.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const i=this.isDragging(),s=x(t),r=!s&&0!==t.button,o=this._rootElement,a=(0,P.Fb)(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=s?function Ot(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function kt(n){return 0===n.buttons||0===n.detail}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),i||r||l||c)return;if(this._handles.length){const S=o.style;this._rootElementTapHighlight=S.webkitTapHighlightColor||"",S.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(S=>this._updateOnScroll(S)),this._boundaryElement&&(this._boundaryRect=F(this._boundaryElement));const d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);const f=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:f.x,y:f.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){st(this._rootElement,!0,ht),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),r=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:r,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:r,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,r,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let r=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{const o=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(o+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,a),this._dropContainer=r,this._dropContainer.enter(this,e,t,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=this._preview.getTransitionDuration();return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const s=a=>{(!a||this._preview&&(0,P.Fb)(a)===this._preview.element&&"transform"===a.propertyName)&&(o(),i(),clearTimeout(r))},r=setTimeout(s,1.5*t),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=it(this._placeholderRef,this._document)):i=A(this._rootElement),i.style.pointerEvents="none",i.classList.add(lt),i}_getPointerPositionInElement(e,t,i){const s=t===this._rootElement?null:t,r=s?s.getBoundingClientRect():e,o=x(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:r.left-e.left+(o.pageX-r.left-a.left),y:r.top-e.top+(o.pageY-r.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),i=x(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,r=i.pageY-t.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=r,a.matrixTransform(o.inverse())}}return{x:s,y:r}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if("x"===this.lockAxis||"x"===t?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===t)&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:r,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+o,f=a.bottom-(c-o);i=ct(i,a.left+r,a.right-(l-r)),s=ct(s,d,f)}return{x:i,y:s}}_updatePointerDirectionDelta(e){const{x:t,y:i}=e,s=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-r.x),a=Math.abs(i-r.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>r.x?1:-1,r.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>r.y?1:-1,r.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,b(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){const i=1/this.scale,s=E(e*i,t*i),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=O(s,this._initialTransform)}_applyPreviewTransform(e,t){const i=this._previewTemplate?.template?void 0:this._initialTransform,s=E(e,t);this._preview.setTransform(O(s,i))}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(0===s.width&&0===s.height||0===i.width&&0===i.height)return;const r=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(r>0&&(e+=r),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:x(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const i=(0,P.Fb)(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&R(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,P.KT)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const i=this._previewContainer||"global";if("parent"===i)return e;if("global"===i){const s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return(0,w.i8)(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){const t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}_conditionallyInsertAnchor(e,t,i){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){const s=this._anchor??=A(this._placeholder);s.classList.remove(lt),s.classList.add("cdk-drag-anchor"),s.style.transform="",i?i.before(s):(0,w.i8)(t.element).appendChild(s)}}}function ct(n,e,t){return Math.max(e,Math.min(t,n))}function x(n){return"t"===n.type[0]}function te(n){n.preventDefault()}function V(n,e,t){const i=C(e,n.length-1),s=C(t,n.length-1);if(i===s)return;const r=n[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)n[a]=n[a+o];n[s]=r}function ee(n,e,t,i){const s=C(t,n.length-1),r=C(i,e.length);n.length&&e.splice(r,0,n.splice(s,1)[0])}function C(n,e){return Math.max(0,Math.min(e,n))}class dt{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction="ltr";constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,i,s){const r=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,i,s);if(-1===o&&r.length>0)return null;const a="horizontal"===this.orientation,l=r.findIndex(v=>v.drag===e),c=r[o],f=c.clientRect,S=l>o?1:-1,G=this._getItemOffsetPx(r[l].clientRect,f,S),de=this._getSiblingOffsetPx(l,r,S),ge=r.slice();return V(r,l,o),r.forEach((v,pe)=>{if(ge[pe]===v)return;const St=v.drag===e,X=St?G:de,Pt=St?e.getPlaceholderElement():v.drag.getRootElement();v.offset+=X;const bt=Math.round(v.offset*(1/v.drag.scale));a?(Pt.style.transform=O(`translate3d(${bt}px, 0, 0)`,v.initialTransform),R(v.clientRect,0,X)):(Pt.style.transform=O(`translate3d(0, ${bt}px, 0)`,v.initialTransform),R(v.clientRect,X,0))}),this._previousSwap.overlaps=B(f,t,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(e,t,i,s){const r=null==s||s<0?this._getItemIndexFromPointerPosition(e,t,i):s,o=this._activeDraggables,a=o.indexOf(e),l=e.getPlaceholderElement();let c=o[r];if(c===e&&(c=o[r+1]),!c&&(null==r||-1===r||r<o.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(c=o[0]),a>-1&&o.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const d=c.getRootElement();d.parentElement.insertBefore(l,d),o.splice(r,0,e)}else this._element.appendChild(l),o.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{const t=e.getRootElement();if(t){const i=this._itemPositions.find(s=>s.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return this._getVisualItemPositions().findIndex(t=>t.drag===e)}getItemAtIndex(e){return this._getVisualItemPositions()[e]?.drag||null}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{R(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){const e="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:F(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return"horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(e,t,i){const s="horizontal"===this.orientation;let r=s?t.left-e.left:t.top-e.top;return-1===i&&(r+=s?t.width-e.width:t.height-e.height),r}_getSiblingOffsetPx(e,t,i){const s="horizontal"===this.orientation,r=t[e].clientRect,o=t[e+-1*i];let a=r[s?"width":"height"]*i;if(o){const l=s?"left":"top",c=s?"right":"bottom";-1===i?a-=o.clientRect[l]-r[c]:a+=r[l]-o.clientRect[c]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,s="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const o=i[i.length-1].clientRect;return s?e>=o.right:t>=o.bottom}{const o=i[0].clientRect;return s?e<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(e,t,i,s){const r="horizontal"===this.orientation,o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>a!==e&&((!s||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(r?s.x:s.y)!==this._previousSwap.delta)&&(r?t>=Math.floor(l.left)&&t<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom))));return-1!==o&&this._sortPredicate(o,e)?o:-1}}class ie{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){const t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){const s=t[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(e)}sort(e,t,i,s){const r=this._getItemIndexFromPointerPosition(e,t,i),o=this._previousSwap;if(-1===r||this._activeItems[r]===e)return null;const a=this._activeItems[r];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;const l=this.getItemIndex(e),c=e.getPlaceholderElement(),d=a.getRootElement();r>l?d.after(c):d.before(c),V(this._activeItems,l,r);const f=this._getRootNode().elementFromPoint(t,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=d===f||d.contains(f),{previousIndex:l,currentIndex:r}}enter(e,t,i,s){const r=this._activeItems.indexOf(e);r>-1&&this._activeItems.splice(r,1);let o=null==s||s<0?this._getItemIndexFromPointerPosition(e,t,i):s;-1===o&&(o=this._getClosestItemIndexToPointer(e,t,i));const a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,e),a.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){const e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){const[s,r]=this._relatedNodes[i];s.parentNode===e&&s.nextSibling!==r&&(null===r?e.appendChild(s):r.parentNode===e&&e.insertBefore(s,r))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}getItemAtIndex(e){return this._activeItems[e]||null}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){const s=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),r=s?this._activeItems.findIndex(o=>{const a=o.getRootElement();return s===a||a.contains(s)}):-1;return-1!==r&&this._sortPredicate(r,e)?r:-1}_getRootNode(){return this._rootNode||(this._rootNode=(0,P.KT)(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(0===this._activeItems.length)return-1;if(1===this._activeItems.length)return 0;let s=1/0,r=-1;for(let o=0;o<this._activeItems.length;o++){const a=this._activeItems[o];if(a!==e){const{x:l,y:c}=a.getRootElement().getBoundingClientRect(),d=Math.hypot(t-l,i-c);d<s&&(s=d,r=o)}}return r}}var m=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n}(m||{}),u=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n}(u||{});class ne{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _.B;entered=new _.B;exited=new _.B;dropped=new _.B;sorted=new _.B;receivingStarted=new _.B;receivingStopped=new _.B;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=y.yU.EMPTY;_verticalScrollDirection=m.NONE;_horizontalScrollDirection=u.NONE;_scrollNode;_stopScrollTimers=new _.B;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,i,s,r){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=r;const o=this.element=(0,w.i8)(e);this._document=i,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new et(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,s){this._draggingStarted(),null==s&&this.sortingDisabled&&(s=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,s,r,o,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:r,distance:o,dropPoint:a,event:l})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>-1===e.indexOf(s))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof dt&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if("mixed"===e)this._sortStrategy=new ie(this._document,this._dragDropRegistry);else{const t=new dt(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){const t=this._container;return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;(0,w.i8)(this.element);const i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}getItemAtIndex(e){return this._isDragging?this._sortStrategy.getItemAtIndex(e):this._draggables[e]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,s){if(this.sortingDisabled||!this._domRect||!tt(this._domRect,.05,t,i))return;const r=this._sortStrategy.sort(e,t,i,s);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,s=m.NONE,r=u.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||tt(o.clientRect,.05,e,t)&&([s,r]=function re(n,e,t,i,s){const r=_t(e,s),o=ut(e,i);let a=m.NONE,l=u.NONE;if(r){const c=n.scrollTop;r===m.UP?c>0&&(a=m.UP):n.scrollHeight-c>n.clientHeight&&(a=m.DOWN)}if(o){const c=n.scrollLeft;"rtl"===t?o===u.RIGHT?c<0&&(l=u.RIGHT):n.scrollWidth+c>n.clientWidth&&(l=u.LEFT):o===u.LEFT?c>0&&(l=u.LEFT):n.scrollWidth-c>n.clientWidth&&(l=u.RIGHT)}return[a,l]}(a,o.clientRect,this._direction,e,t),(s||r)&&(i=a))}),!s&&!r){const{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=_t(l,t),r=ut(l,e),i=window}i&&(s!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=r,this._scrollNode=i,(s||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;const e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),function It(n=0,e=Rt.E){return n<0&&(n=0),(0,Et.O)(n,n,e)}(0,xt.X).pipe((0,k.Q)(this._stopScrollTimers)).subscribe(()=>{const e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===m.UP?e.scrollBy(0,-t):this._verticalScrollDirection===m.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===u.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===u.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return null!=this._domRect&&B(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(s=>s._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!B(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;const s=this._getShadowRoot().elementFromPoint(t,i);return!!s&&(s===this._container||this._container.contains(s))}_startReceiving(e,t){const i=this._activeSiblings;!i.has(e)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=(0,P.KT)(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function _t(n,e){const{top:t,bottom:i,height:s}=n,r=.05*s;return e>=t-r&&e<=t+r?m.UP:e>=i-r&&e<=i+r?m.DOWN:m.NONE}function ut(n,e){const{left:t,right:i,width:s}=n,r=.05*s;return e>=t-r&&e<=t+r?u.LEFT:e>=i-r&&e<=i+r?u.RIGHT:u.NONE}const T=new h.nKC("CDK_DRAG_PARENT"),ft=new h.nKC("CdkDragHandle"),mt=new h.nKC("CDK_DRAG_CONFIG"),vt=new h.nKC("CdkDropList");let Dt=(()=>{class n{element=(0,h.WQX)(p.aKT);dropContainer=(0,h.WQX)(vt,{optional:!0,skipSelf:!0});_ngZone=(0,h.WQX)(h.SKi);_viewContainerRef=(0,h.WQX)(p.c1b);_dir=(0,h.WQX)(j.dS,{optional:!0});_changeDetectorRef=(0,h.WQX)(D.gRc);_selfHandle=(0,h.WQX)(ft,{optional:!0,self:!0});_parentDrag=(0,h.WQX)(T,{optional:!0,skipSelf:!0});_dragDropRegistry=(0,h.WQX)(L);_destroyed=new _.B;_handles=new Ct.t([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!(!this.dropContainer||!this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new h.bkB;released=new h.bkB;ended=new h.bkB;entered=new h.bkB;exited=new h.bkB;dropped=new h.bkB;moved=new K.c(t=>{const i=this._dragRef.moved.pipe((0,Lt.T)(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=(0,h.WQX)(h.zZn);constructor(){const t=this.dropContainer,i=(0,h.WQX)(mt,{optional:!0});this._dragRef=function Jt(n,e,t={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){const i=n.get(p.sFG,null,{optional:!0})||n.get(p._9s).createRenderer(null,null);return new qt(e,t,n.get(h.qQL),n.get(h.SKi),n.get(M.Xj),n.get(L),i)}(this._injector,this.element,{dragStartThreshold:i&&null!=i.dragStartThreshold?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&null!=i.pointerDirectionChangeThreshold?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe((0,k.Q)(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){(0,p.mal)(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){const i=t.rootElementSelector,s=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){const i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){const i=this._handles.getValue(),s=i.indexOf(t);s>-1&&(i.splice(s,1),this._handles.next(i))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){const t=this.element.nativeElement;let i=t;this.rootElementSelector&&(i=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):(0,w.i8)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const i=this._dir,s=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay="object"==typeof s&&s?s:(0,w.OE)(s),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe((0,Nt.s)(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){const s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){t.withParent(s._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){const{lockAxis:i,dragStartDelay:s,constrainPosition:r,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:d}=t;this.disabled=l??!1,this.dragStartDelay=s||0,this.lockAxis=i||null,r&&(this.constrainPosition=r),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe((0,Mt.M)(t=>{const i=t.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,At.n)(t=>(0,N.h)(...t.map(i=>i._stateChanges.pipe($(i))))),(0,k.Q)(this._destroyed)).subscribe(t=>{const i=this._dragRef,s=t.element.nativeElement;t.disabled?i.disableHandle(s):i.enableHandle(s)})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=p.FsC({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,s){2&i&&p.AVh("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",D.L39],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",D.Udg]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[p.Jv_([{provide:T,useExisting:n}]),p.OA$]})}return n})();const Q=new h.nKC("CdkDropListGroup");let wt=(()=>{class n{element=(0,h.WQX)(p.aKT);_changeDetectorRef=(0,h.WQX)(D.gRc);_scrollDispatcher=(0,h.WQX)(M.R);_dir=(0,h.WQX)(j.dS,{optional:!0});_group=(0,h.WQX)(Q,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new _.B;_scrollableParentsResolved=!1;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation="vertical";id=(0,h.WQX)(zt.g).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}_disabled=!1;sortingDisabled=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled=!1;autoScrollStep;elementContainerSelector=null;hasAnchor=!1;dropped=new h.bkB;entered=new h.bkB;exited=new h.bkB;sorted=new h.bkB;_unsortedItems=new Set;constructor(){const t=(0,h.WQX)(mt,{optional:!0}),i=(0,h.WQX)(h.zZn);this._dropListRef=function se(n,e){return new ne(e,n.get(L),n.get(h.qQL),n.get(h.SKi),n.get(M.Xj))}(i,this.element),this._dropListRef.data=this,t&&this._assignDefaults(t),this._dropListRef.enterPredicate=(s,r)=>this.enterPredicate(s.data,r.data),this._dropListRef.sortPredicate=(s,r,o)=>this.sortPredicate(s,r.data,o.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(t){this._unsortedItems.add(t),t._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){const i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=n._dropLists.indexOf(this);t>-1&&n._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe($(this._dir.value),(0,k.Q)(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{const i=(0,Vt.F)(this.connectedTo).map(s=>"string"==typeof s?n._dropLists.find(o=>o.id===s):s);if(this._group&&this._group._items.forEach(s=>{-1===i.indexOf(s)&&i.push(s)}),!this._scrollableParentsResolved){const s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(r=>r.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){const s=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(s)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=(0,w.OE)(this.autoScrollStep,2),t.hasAnchor=this.hasAnchor,t.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),(0,N.h)(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){const{lockAxis:i,draggingDisabled:s,sortingDisabled:r,listAutoScrollDisabled:o,listOrientation:a}=t;this.disabled=s??!1,this.sortingDisabled=r??!1,this.autoScrollDisabled=o??!1,this.orientation=a||"vertical",this.lockAxis=i||null}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=p.FsC({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,s){2&i&&(p.BMQ("id",s.id),p.AVh("cdk-drop-list-disabled",s.disabled)("cdk-drop-list-dragging",s._dropListRef.isDragging())("cdk-drop-list-receiving",s._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",D.L39],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",D.L39],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",D.L39],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",D.L39]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[p.Jv_([{provide:Q,useValue:void 0},{provide:vt,useExisting:n}])]})}return n})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[598],{7598(_e,yt,g){g.d(yt,{T1:()=>Dt,O7:()=>wt,HD:()=>V,eg:()=>ee});var p=g(5547),h=g(5802),D=g(7705),_=g(1413),K=g(4226),N=g(7786),y=g(8359),Rt=g(3236),Et=g(1584),xt=g(536),Ct=g(4412),P=g(9867),Tt=g(3293),M=g(5272),w=g(7384),k=g(6977),Lt=g(6354),Nt=g(6697),Mt=g(8141),At=g(5558),Ft=g(6365),U=g(9326),Ht=g(6648);function Z(...n){return function Bt(){return(0,Ft.U)(1)}()((0,Ht.H)(n,(0,U.lI)(n)))}var Wt=g(9974);function $(...n){const e=(0,U.lI)(n);return(0,Wt.N)((t,i)=>{(e?Z(n,t,e):Z(n,t)).subscribe(i)})}var j=g(9752),zt=g(3531),Vt=g(7523);function A(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return"canvas"===i?q(n,e):("input"===i||"select"===i||"textarea"===i)&&J(n,e),Y("canvas",n,e,q),Y("input, textarea, select",n,e,J),e}function Y(n,e,t,i){const s=e.querySelectorAll(n);if(s.length){const r=t.querySelectorAll(n);for(let o=0;o<s.length;o++)i(s[o],r[o])}}let Qt=0;function J(n,e){"file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${Qt++}`)}function q(n,e){const t=e.getContext("2d");if(t)try{t.drawImage(n,0,0)}catch{}}function F(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function B(n,e,t){const{top:i,bottom:s,left:r,right:o}=n;return t>=i&&t<=s&&e>=r&&e<=o}function R(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function tt(n,e,t,i){const{top:s,right:r,bottom:o,left:a,width:l,height:c}=n,d=l*e,f=c*e;return i>s-f&&i<o+f&&t>a-d&&t<r+d}class et{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:F(t)})})}handleScroll(e){const t=(0,P.Fb)(e),i=this.positions.get(t);if(!i)return null;const s=i.scrollPosition;let r,o;if(t===this._document){const c=this.getViewportScrollPosition();r=c.top,o=c.left}else r=t.scrollTop,o=t.scrollLeft;const a=s.top-r,l=s.left-o;return this.positions.forEach((c,d)=>{c.clientRect&&t!==d&&t.contains(d)&&R(c.clientRect,a,l)}),s.top=r,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function it(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const i=e.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function H(n,e,t){for(let i in e)if(e.hasOwnProperty(i)){const s=e[i];s?n.setProperty(i,s,t?.has(i)?"important":""):n.removeProperty(i)}return n}function b(n,e){const t=e?"":"none";H(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function st(n,e,t){H(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function O(n,e){return e&&"none"!=e?n+" "+e:n}function nt(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=E(e.left,e.top)}function E(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}const I={capture:!0},W={passive:!1,capture:!0};let Xt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=p.VBU({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}\n"],encapsulation:2,changeDetection:0})}return n})(),L=(()=>{class n{_ngZone=(0,h.WQX)(h.SKi);_document=(0,h.WQX)(h.qQL);_styleLoader=(0,h.WQX)(Tt.l);_renderer=(0,h.WQX)(p._9s).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new _.B;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=(0,h.vPA)([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new _.B;pointerUp=new _.B;constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,W)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(Xt),this._activeDragInstances.update(s=>[...s,t]),1===this._activeDragInstances().length)){const s=i.type.startsWith("touch"),r=a=>this.pointerUp.next(a),o=[["scroll",a=>this._scroll.next(a),I],["selectstart",this._preventDefaultWhileDragging,W]];s?o.push(["touchend",r,I],["touchcancel",r,I]):o.push(["mouseup",r,I]),s||o.push(["mousemove",a=>this.pointerMove.next(a),W]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>this._renderer.listen(this._document,a,l,c))})}}stopDragging(t){this._activeDragInstances.update(i=>{const s=i.indexOf(t);return s>-1?(i.splice(s,1),[...i]):i}),0===this._activeDragInstances().length&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){const i=[this._scroll];return t&&t!==this._document&&i.push(new K.c(s=>this._ngZone.runOutsideAngular(()=>{const r=this._renderer.listen(t,"scroll",o=>{this._activeDragInstances().length&&s.next(o)},I);return()=>{r()}}))),(0,N.h)(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=h.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function rt(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function z(n,e){return n.getPropertyValue(e).split(",").map(i=>i.trim())}const Ut=new Set(["position"]);class Zt{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(e,t,i,s,r,o,a,l,c,d){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=r,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c,this._renderer=d}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),ot(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return function Kt(n){const e=getComputedStyle(n),t=z(e,"transition-property"),i=t.find(a=>"transform"===a||"all"===a);if(!i)return 0;const s=t.indexOf(i),r=z(e,"transition-duration"),o=z(e,"transition-delay");return rt(r[s])+rt(o[s])}(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){const e=this._previewTemplate,t=this._previewClass,i=e?e.template:null;let s;if(i&&e){const r=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=it(o,this._document),this._previewEmbeddedView=o,e.matchSize?nt(s,r):s.style.transform=E(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=A(this._rootElement),nt(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return H(s.style,{"pointer-events":"none",margin:ot(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Ut),b(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(r=>s.classList.add(r)):s.classList.add(t)),s}}function ot(n){return"showPopover"in n}const $t={passive:!0},at={passive:!1},jt={passive:!1,capture:!0},lt="cdk-drag-placeholder",ht=new Set(["position"]);class qt{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=(0,h.vPA)(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _.B;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=y.yU.EMPTY;_pointerUpSubscription=y.yU.EMPTY;_scrollSubscription=y.yU.EMPTY;_resizeSubscription=y.yU.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>b(t,e)))}_disabled=!1;beforeStarted=new _.B;started=new _.B;released=new _.B;ended=new _.B;entered=new _.B;exited=new _.B;dropped=new _.B;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,r,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=r,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new et(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>(0,w.i8)(i)),this._handles.forEach(i=>b(i,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=(0,w.i8)(e);if(t!==this._rootElement){this._removeRootElementListeners();const i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,at),i.listen(t,"touchstart",this._pointerDown,$t),i.listen(t,"dragstart",this._nativeDragStart,at)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?(0,w.i8)(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&function Gt(n,e){return e.left<n.left||e.left+e.width>n.right||e.top<n.top||e.top+e.height>n.bottom}(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){const e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect();let i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let a=this._activeTransform.x+i,l=this._activeTransform.y+s;this._rootElement.style.transform=E(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),b(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),b(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){const t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{const t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){if(Math.abs(t.x-this._pickupPositionOnPage.x)+Math.abs(t.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a)return void this._endDragSequence(e);(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();const i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{const s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=i.x-s.x+this._passiveTransform.x,r.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){x(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",te,jt)}),i){const s=this._rootElement,r=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");r.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new Zt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,t)),st(s,!1,ht),this._document.body.appendChild(r.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const i=this.isDragging(),s=x(t),r=!s&&0!==t.button,o=this._rootElement,a=(0,P.Fb)(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=s?function Ot(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function kt(n){return 0===n.buttons||0===n.detail}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),i||r||l||c)return;if(this._handles.length){const S=o.style;this._rootElementTapHighlight=S.webkitTapHighlightColor||"",S.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(S=>this._updateOnScroll(S)),this._boundaryElement&&(this._boundaryRect=F(this._boundaryElement));const d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);const f=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:f.x,y:f.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){st(this._rootElement,!0,ht),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),r=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:r,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:r,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,r,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let r=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{const o=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(o+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,a),this._dropContainer=r,this._dropContainer.enter(this,e,t,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=this._preview.getTransitionDuration();return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const s=a=>{(!a||this._preview&&(0,P.Fb)(a)===this._preview.element&&"transform"===a.propertyName)&&(o(),i(),clearTimeout(r))},r=setTimeout(s,1.5*t),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=it(this._placeholderRef,this._document)):i=A(this._rootElement),i.style.pointerEvents="none",i.classList.add(lt),i}_getPointerPositionInElement(e,t,i){const s=t===this._rootElement?null:t,r=s?s.getBoundingClientRect():e,o=x(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:r.left-e.left+(o.pageX-r.left-a.left),y:r.top-e.top+(o.pageY-r.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),i=x(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,r=i.pageY-t.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=r,a.matrixTransform(o.inverse())}}return{x:s,y:r}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if("x"===this.lockAxis||"x"===t?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===t)&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:r,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+o,f=a.bottom-(c-o);i=ct(i,a.left+r,a.right-(l-r)),s=ct(s,d,f)}return{x:i,y:s}}_updatePointerDirectionDelta(e){const{x:t,y:i}=e,s=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-r.x),a=Math.abs(i-r.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>r.x?1:-1,r.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>r.y?1:-1,r.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,b(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){const i=1/this.scale,s=E(e*i,t*i),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=O(s,this._initialTransform)}_applyPreviewTransform(e,t){const i=this._previewTemplate?.template?void 0:this._initialTransform,s=E(e,t);this._preview.setTransform(O(s,i))}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(0===s.width&&0===s.height||0===i.width&&0===i.height)return;const r=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(r>0&&(e+=r),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:x(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const i=(0,P.Fb)(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&R(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,P.KT)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const i=this._previewContainer||"global";if("parent"===i)return e;if("global"===i){const s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return(0,w.i8)(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){const t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}_conditionallyInsertAnchor(e,t,i){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){const s=this._anchor??=A(this._placeholder);s.classList.remove(lt),s.classList.add("cdk-drag-anchor"),s.style.transform="",i?i.before(s):(0,w.i8)(t.element).appendChild(s)}}}function ct(n,e,t){return Math.max(e,Math.min(t,n))}function x(n){return"t"===n.type[0]}function te(n){n.preventDefault()}function V(n,e,t){const i=C(e,n.length-1),s=C(t,n.length-1);if(i===s)return;const r=n[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)n[a]=n[a+o];n[s]=r}function ee(n,e,t,i){const s=C(t,n.length-1),r=C(i,e.length);n.length&&e.splice(r,0,n.splice(s,1)[0])}function C(n,e){return Math.max(0,Math.min(e,n))}class dt{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction="ltr";constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,i,s){const r=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,i,s);if(-1===o&&r.length>0)return null;const a="horizontal"===this.orientation,l=r.findIndex(v=>v.drag===e),c=r[o],f=c.clientRect,S=l>o?1:-1,G=this._getItemOffsetPx(r[l].clientRect,f,S),de=this._getSiblingOffsetPx(l,r,S),ge=r.slice();return V(r,l,o),r.forEach((v,pe)=>{if(ge[pe]===v)return;const St=v.drag===e,X=St?G:de,Pt=St?e.getPlaceholderElement():v.drag.getRootElement();v.offset+=X;const bt=Math.round(v.offset*(1/v.drag.scale));a?(Pt.style.transform=O(`translate3d(${bt}px, 0, 0)`,v.initialTransform),R(v.clientRect,0,X)):(Pt.style.transform=O(`translate3d(0, ${bt}px, 0)`,v.initialTransform),R(v.clientRect,X,0))}),this._previousSwap.overlaps=B(f,t,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(e,t,i,s){const r=null==s||s<0?this._getItemIndexFromPointerPosition(e,t,i):s,o=this._activeDraggables,a=o.indexOf(e),l=e.getPlaceholderElement();let c=o[r];if(c===e&&(c=o[r+1]),!c&&(null==r||-1===r||r<o.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(c=o[0]),a>-1&&o.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const d=c.getRootElement();d.parentElement.insertBefore(l,d),o.splice(r,0,e)}else this._element.appendChild(l),o.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{const t=e.getRootElement();if(t){const i=this._itemPositions.find(s=>s.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return this._getVisualItemPositions().findIndex(t=>t.drag===e)}getItemAtIndex(e){return this._getVisualItemPositions()[e]?.drag||null}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{R(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){const e="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:F(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return"horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(e,t,i){const s="horizontal"===this.orientation;let r=s?t.left-e.left:t.top-e.top;return-1===i&&(r+=s?t.width-e.width:t.height-e.height),r}_getSiblingOffsetPx(e,t,i){const s="horizontal"===this.orientation,r=t[e].clientRect,o=t[e+-1*i];let a=r[s?"width":"height"]*i;if(o){const l=s?"left":"top",c=s?"right":"bottom";-1===i?a-=o.clientRect[l]-r[c]:a+=r[l]-o.clientRect[c]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,s="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const o=i[i.length-1].clientRect;return s?e>=o.right:t>=o.bottom}{const o=i[0].clientRect;return s?e<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(e,t,i,s){const r="horizontal"===this.orientation,o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>a!==e&&((!s||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(r?s.x:s.y)!==this._previousSwap.delta)&&(r?t>=Math.floor(l.left)&&t<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom))));return-1!==o&&this._sortPredicate(o,e)?o:-1}}class ie{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){const t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){const s=t[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(e)}sort(e,t,i,s){const r=this._getItemIndexFromPointerPosition(e,t,i),o=this._previousSwap;if(-1===r||this._activeItems[r]===e)return null;const a=this._activeItems[r];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;const l=this.getItemIndex(e),c=e.getPlaceholderElement(),d=a.getRootElement();r>l?d.after(c):d.before(c),V(this._activeItems,l,r);const f=this._getRootNode().elementFromPoint(t,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=d===f||d.contains(f),{previousIndex:l,currentIndex:r}}enter(e,t,i,s){const r=this._activeItems.indexOf(e);r>-1&&this._activeItems.splice(r,1);let o=null==s||s<0?this._getItemIndexFromPointerPosition(e,t,i):s;-1===o&&(o=this._getClosestItemIndexToPointer(e,t,i));const a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,e),a.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){const e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){const[s,r]=this._relatedNodes[i];s.parentNode===e&&s.nextSibling!==r&&(null===r?e.appendChild(s):r.parentNode===e&&e.insertBefore(s,r))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}getItemAtIndex(e){return this._activeItems[e]||null}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){const s=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),r=s?this._activeItems.findIndex(o=>{const a=o.getRootElement();return s===a||a.contains(s)}):-1;return-1!==r&&this._sortPredicate(r,e)?r:-1}_getRootNode(){return this._rootNode||(this._rootNode=(0,P.KT)(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(0===this._activeItems.length)return-1;if(1===this._activeItems.length)return 0;let s=1/0,r=-1;for(let o=0;o<this._activeItems.length;o++){const a=this._activeItems[o];if(a!==e){const{x:l,y:c}=a.getRootElement().getBoundingClientRect(),d=Math.hypot(t-l,i-c);d<s&&(s=d,r=o)}}return r}}var m=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n}(m||{}),u=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n}(u||{});class ne{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _.B;entered=new _.B;exited=new _.B;dropped=new _.B;sorted=new _.B;receivingStarted=new _.B;receivingStopped=new _.B;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=y.yU.EMPTY;_verticalScrollDirection=m.NONE;_horizontalScrollDirection=u.NONE;_scrollNode;_stopScrollTimers=new _.B;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,i,s,r){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=r;const o=this.element=(0,w.i8)(e);this._document=i,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new et(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,s){this._draggingStarted(),null==s&&this.sortingDisabled&&(s=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,s,r,o,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:r,distance:o,dropPoint:a,event:l})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>-1===e.indexOf(s))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof dt&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if("mixed"===e)this._sortStrategy=new ie(this._document,this._dragDropRegistry);else{const t=new dt(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){const t=this._container;return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;(0,w.i8)(this.element);const i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}getItemAtIndex(e){return this._isDragging?this._sortStrategy.getItemAtIndex(e):this._draggables[e]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,s){if(this.sortingDisabled||!this._domRect||!tt(this._domRect,.05,t,i))return;const r=this._sortStrategy.sort(e,t,i,s);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,s=m.NONE,r=u.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||tt(o.clientRect,.05,e,t)&&([s,r]=function re(n,e,t,i,s){const r=_t(e,s),o=ut(e,i);let a=m.NONE,l=u.NONE;if(r){const c=n.scrollTop;r===m.UP?c>0&&(a=m.UP):n.scrollHeight-c>n.clientHeight&&(a=m.DOWN)}if(o){const c=n.scrollLeft;"rtl"===t?o===u.RIGHT?c<0&&(l=u.RIGHT):n.scrollWidth+c>n.clientWidth&&(l=u.LEFT):o===u.LEFT?c>0&&(l=u.LEFT):n.scrollWidth-c>n.clientWidth&&(l=u.RIGHT)}return[a,l]}(a,o.clientRect,this._direction,e,t),(s||r)&&(i=a))}),!s&&!r){const{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=_t(l,t),r=ut(l,e),i=window}i&&(s!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=r,this._scrollNode=i,(s||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;const e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),function It(n=0,e=Rt.E){return n<0&&(n=0),(0,Et.O)(n,n,e)}(0,xt.X).pipe((0,k.Q)(this._stopScrollTimers)).subscribe(()=>{const e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===m.UP?e.scrollBy(0,-t):this._verticalScrollDirection===m.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===u.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===u.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return null!=this._domRect&&B(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(s=>s._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!B(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;const s=this._getShadowRoot().elementFromPoint(t,i);return!!s&&(s===this._container||this._container.contains(s))}_startReceiving(e,t){const i=this._activeSiblings;!i.has(e)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=(0,P.KT)(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function _t(n,e){const{top:t,bottom:i,height:s}=n,r=.05*s;return e>=t-r&&e<=t+r?m.UP:e>=i-r&&e<=i+r?m.DOWN:m.NONE}function ut(n,e){const{left:t,right:i,width:s}=n,r=.05*s;return e>=t-r&&e<=t+r?u.LEFT:e>=i-r&&e<=i+r?u.RIGHT:u.NONE}const T=new h.nKC("CDK_DRAG_PARENT"),ft=new h.nKC("CdkDragHandle"),mt=new h.nKC("CDK_DRAG_CONFIG"),vt=new h.nKC("CdkDropList");let Dt=(()=>{class n{element=(0,h.WQX)(p.aKT);dropContainer=(0,h.WQX)(vt,{optional:!0,skipSelf:!0});_ngZone=(0,h.WQX)(h.SKi);_viewContainerRef=(0,h.WQX)(p.c1b);_dir=(0,h.WQX)(j.dS,{optional:!0});_changeDetectorRef=(0,h.WQX)(D.gRc);_selfHandle=(0,h.WQX)(ft,{optional:!0,self:!0});_parentDrag=(0,h.WQX)(T,{optional:!0,skipSelf:!0});_dragDropRegistry=(0,h.WQX)(L);_destroyed=new _.B;_handles=new Ct.t([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!(!this.dropContainer||!this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new h.bkB;released=new h.bkB;ended=new h.bkB;entered=new h.bkB;exited=new h.bkB;dropped=new h.bkB;moved=new K.c(t=>{const i=this._dragRef.moved.pipe((0,Lt.T)(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=(0,h.WQX)(h.zZn);constructor(){const t=this.dropContainer,i=(0,h.WQX)(mt,{optional:!0});this._dragRef=function Jt(n,e,t={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){const i=n.get(p.sFG,null,{optional:!0})||n.get(p._9s).createRenderer(null,null);return new qt(e,t,n.get(h.qQL),n.get(h.SKi),n.get(M.Xj),n.get(L),i)}(this._injector,this.element,{dragStartThreshold:i&&null!=i.dragStartThreshold?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&null!=i.pointerDirectionChangeThreshold?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe((0,k.Q)(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){(0,p.mal)(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){const i=t.rootElementSelector,s=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){const i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){const i=this._handles.getValue(),s=i.indexOf(t);s>-1&&(i.splice(s,1),this._handles.next(i))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){const t=this.element.nativeElement;let i=t;this.rootElementSelector&&(i=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):(0,w.i8)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const i=this._dir,s=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay="object"==typeof s&&s?s:(0,w.OE)(s),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe((0,Nt.s)(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){const s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){t.withParent(s._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){const{lockAxis:i,dragStartDelay:s,constrainPosition:r,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:d}=t;this.disabled=l??!1,this.dragStartDelay=s||0,this.lockAxis=i||null,r&&(this.constrainPosition=r),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe((0,Mt.M)(t=>{const i=t.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,At.n)(t=>(0,N.h)(...t.map(i=>i._stateChanges.pipe($(i))))),(0,k.Q)(this._destroyed)).subscribe(t=>{const i=this._dragRef,s=t.element.nativeElement;t.disabled?i.disableHandle(s):i.enableHandle(s)})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=p.FsC({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,s){2&i&&p.AVh("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",D.L39],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",D.Udg]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[p.Jv_([{provide:T,useExisting:n}]),p.OA$]})}return n})();const Q=new h.nKC("CdkDropListGroup");let wt=(()=>{class n{element=(0,h.WQX)(p.aKT);_changeDetectorRef=(0,h.WQX)(D.gRc);_scrollDispatcher=(0,h.WQX)(M.R);_dir=(0,h.WQX)(j.dS,{optional:!0});_group=(0,h.WQX)(Q,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new _.B;_scrollableParentsResolved=!1;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation="vertical";id=(0,h.WQX)(zt.g).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}_disabled=!1;sortingDisabled=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled=!1;autoScrollStep;elementContainerSelector=null;hasAnchor=!1;dropped=new h.bkB;entered=new h.bkB;exited=new h.bkB;sorted=new h.bkB;_unsortedItems=new Set;constructor(){const t=(0,h.WQX)(mt,{optional:!0}),i=(0,h.WQX)(h.zZn);this._dropListRef=function se(n,e){return new ne(e,n.get(L),n.get(h.qQL),n.get(h.SKi),n.get(M.Xj))}(i,this.element),this._dropListRef.data=this,t&&this._assignDefaults(t),this._dropListRef.enterPredicate=(s,r)=>this.enterPredicate(s.data,r.data),this._dropListRef.sortPredicate=(s,r,o)=>this.sortPredicate(s,r.data,o.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(t){this._unsortedItems.add(t),t._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){const i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=n._dropLists.indexOf(this);t>-1&&n._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe($(this._dir.value),(0,k.Q)(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{const i=(0,Vt.F)(this.connectedTo).map(s=>"string"==typeof s?n._dropLists.find(o=>o.id===s):s);if(this._group&&this._group._items.forEach(s=>{-1===i.indexOf(s)&&i.push(s)}),!this._scrollableParentsResolved){const s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(r=>r.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){const s=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(s)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=(0,w.OE)(this.autoScrollStep,2),t.hasAnchor=this.hasAnchor,t.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),(0,N.h)(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){const{lockAxis:i,draggingDisabled:s,sortingDisabled:r,listAutoScrollDisabled:o,listOrientation:a}=t;this.disabled=s??!1,this.sortingDisabled=r??!1,this.autoScrollDisabled=o??!1,this.orientation=a||"vertical",this.lockAxis=i||null}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=p.FsC({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,s){2&i&&(p.BMQ("id",s.id),p.AVh("cdk-drop-list-disabled",s.disabled)("cdk-drop-list-dragging",s._dropListRef.isDragging())("cdk-drop-list-receiving",s._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",D.L39],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",D.L39],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",D.L39],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",D.L39]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[p.Jv_([{provide:Q,useValue:void 0},{provide:vt,useExisting:n}])]})}return n})()}}]);