@mxtommy/kip 3.10.0-beta.36 → 3.10.0-beta.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxtommy/kip",
3
- "version": "3.10.0-beta.36",
3
+ "version": "3.10.0-beta.39",
4
4
  "description": "An advanced and versatile marine instrumentation package to display Signal K data.",
5
5
  "license": "MIT",
6
6
  "author": {
package/plugin/index.js CHANGED
@@ -51,7 +51,7 @@ exports.default = (server) => {
51
51
  }
52
52
  function getAvailableDisplays() {
53
53
  const fullPath = server.getSelfPath('displays');
54
- server.debug(`getAvailableDisplays: fullPath=${fullPath}`);
54
+ server.debug(`getAvailableDisplays: fullPath=${JSON.stringify(fullPath)}`);
55
55
  return server.getPath(fullPath);
56
56
  }
57
57
  function pathToDotNotation(path) {
@@ -1,2 +1,2 @@
1
- import{a as Xe,d as mt,e as ut,f as ft,g as vt,h as Dt,i as bt,j as xt}from"./chunk-4A6DUU4R.js";import"./chunk-QXMATZB6.js";import{b as wt,c as Pt,e as St,f as yt}from"./chunk-HO743WL4.js";import"./chunk-2YGPLTEW.js";import"./chunk-LKF7CNOE.js";import{a as et,b as at}from"./chunk-EVQE5STK.js";import{b as gt}from"./chunk-MZURT7UO.js";import"./chunk-SPUZNRYQ.js";import"./chunk-4MSEQKGR.js";import"./chunk-27I36ZYA.js";import{D as Ae,E as $,Ea as ae,Ed as fe,Fa as b,Gb as Ke,Ha as le,Hb as ce,Hd as M,Id as L,Jb as F,K as Fe,Kb as f,La as Ge,Lb as he,Md as ve,Oa as R,Pc as me,Qa as de,Tc as Je,Td as lt,V as ie,Vd as dt,W as He,Wa as P,Wd as ct,X as A,Xa as U,Xb as pe,Xc as Qe,Ya as $e,Yd as ht,Z as Be,_d as q,ab as Ue,bb as We,bd as tt,ca as ne,cb as Ze,cd as it,dd as j,de as pt,ea as k,ec as _e,fb as je,fd as H,fe as _t,g as T,ga as c,gb as qe,hb as I,i as te,ib as p,id as ue,j as _,ja as E,jb as g,ka as C,kb as W,kd as x,l as Me,n as Le,na as ze,nd as nt,oa as se,oc as ge,pd as st,qc as O,qd as rt,ra as re,rb as Z,rc as Ye,tb as m,ua as Ve,vb as y,w as Ne,wa as oe,xd as ot}from"./chunk-PB7HT3XU.js";function we(r){let t=r.cloneNode(!0),e=t.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();t.removeAttribute("id");for(let n=0;n<e.length;n++)e[n].removeAttribute("id");return i==="canvas"?Rt(r,t):(i==="input"||i==="select"||i==="textarea")&&Ct(r,t),Et("canvas",r,t,Rt),Et("input, textarea, select",r,t,Ct),t}function Et(r,t,e,i){let n=t.querySelectorAll(r);if(n.length){let s=e.querySelectorAll(r);for(let o=0;o<n.length;o++)i(n[o],s[o])}}var si=0;function Ct(r,t){t.type!=="file"&&(t.value=r.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${si++}`)}function Rt(r,t){let e=t.getContext("2d");if(e)try{e.drawImage(r,0,0)}catch{}}function Re(r){let t=r.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function Pe(r,t,e){let{top:i,bottom:n,left:s,right:o}=r;return e>=i&&e<=n&&t>=s&&t<=o}function ri(r,t){let e=t.left<r.left,i=t.left+t.width>r.right,n=t.top<r.top,s=t.top+t.height>r.bottom;return e||i||n||s}function V(r,t,e){r.top+=t,r.bottom=r.top+r.height,r.left+=e,r.right=r.left+r.width}function It(r,t,e,i){let{top:n,right:s,bottom:o,left:a,width:l,height:d}=r,h=l*t,v=d*t;return i>n-v&&i<o+v&&e>a-h&&e<s+h}var K=class{_document;positions=new Map;constructor(t){this._document=t}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Re(e)})})}handleScroll(t){let e=H(t),i=this.positions.get(e);if(!i)return null;let n=i.scrollPosition,s,o;if(e===this._document){let d=this.getViewportScrollPosition();s=d.top,o=d.left}else s=e.scrollTop,o=e.scrollLeft;let a=n.top-s,l=n.left-o;return this.positions.forEach((d,h)=>{d.clientRect&&e!==h&&e.contains(h)&&V(d.clientRect,a,l)}),n.top=s,n.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Gt(r,t){let e=r.rootNodes;if(e.length===1&&e[0].nodeType===t.ELEMENT_NODE)return e[0];let i=t.createElement("div");return e.forEach(n=>i.appendChild(n)),i}function Ie(r,t,e){for(let i in t)if(t.hasOwnProperty(i)){let n=t[i];n?r.setProperty(i,n,e?.has(i)?"important":""):r.removeProperty(i)}return r}function N(r,t){let e=t?"":"none";Ie(r.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function Tt(r,t,e){Ie(r.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Y(r,t){return t&&t!="none"?r+" "+t:r}function kt(r,t){r.style.width=`${t.width}px`,r.style.height=`${t.height}px`,r.style.transform=G(t.left,t.top)}function G(r,t){return`translate3d(${Math.round(r)}px, ${Math.round(t)}px, 0)`}function Ot(r){let t=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*t}function oi(r){let t=getComputedStyle(r),e=De(t,"transition-property"),i=e.find(a=>a==="transform"||a==="all");if(!i)return 0;let n=e.indexOf(i),s=De(t,"transition-duration"),o=De(t,"transition-delay");return Ot(s[n])+Ot(o[n])}function De(r,t){return r.getPropertyValue(t).split(",").map(i=>i.trim())}var ai=new Set(["position"]),Se=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,i,n,s,o,a,l,d,h){this._document=t,this._rootElement=e,this._direction=i,this._initialDomRect=n,this._previewTemplate=s,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=d,this._renderer=h}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),Mt(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(t){this._preview.style.transform=t}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t)}getTransitionDuration(){return oi(this._preview)}addEventListener(t,e){return this._renderer.listen(this._preview,t,e)}_createPreview(){let t=this._previewTemplate,e=this._previewClass,i=t?t.template:null,n;if(i&&t){let s=t.matchSize?this._initialDomRect:null,o=t.viewContainer.createEmbeddedView(i,t.context);o.detectChanges(),n=Gt(o,this._document),this._previewEmbeddedView=o,t.matchSize?kt(n,s):n.style.transform=G(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=we(this._rootElement),kt(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return Ie(n.style,{"pointer-events":"none",margin:Mt(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},ai),N(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>n.classList.add(s)):n.classList.add(e)),n}};function Mt(r){return"showPopover"in r}var li={passive:!0},Lt={passive:!1},di={passive:!1,capture:!0},ci=800,Nt="cdk-drag-placeholder",At=new Set(["position"]),ye=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=re(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=T.EMPTY;_pointerUpSubscription=T.EMPTY;_scrollSubscription=T.EMPTY;_resizeSubscription=T.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>N(e,t)))}_disabled=!1;beforeStarted=new _;started=new _;released=new _;ended=new _;entered=new _;exited=new _;dropped=new _;moved=this._moveEvents;data;constrainPosition;constructor(t,e,i,n,s,o,a){this._config=e,this._document=i,this._ngZone=n,this._viewportRuler=s,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new K(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>x(i)),this._handles.forEach(i=>N(i,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let e=x(t);if(e!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(e,"mousedown",this._pointerDown,Lt),i.listen(e,"touchstart",this._pointerDown,li),i.listen(e,"dragstart",this._nativeDragStart,Lt)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?x(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,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&&ri(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let t=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),i=0,n=0;e.left<t.left?i=t.left-e.left:e.right>t.right&&(i=t.right-e.right),e.top<t.top?n=t.top-e.top:e.bottom>t.bottom&&(n=t.bottom-e.bottom);let s=this._activeTransform.x,o=this._activeTransform.y,a=s+i,l=o+n;this._rootElement.style.transform=G(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),N(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),N(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_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=t=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)};_pointerMove=t=>{let e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging()){let n=Math.abs(e.x-this._pickupPositionOnPage.x),s=Math.abs(e.y-this._pickupPositionOnPage.y);if(n+s>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),l=this._dropContainer;if(!a){this._endDragSequence(t);return}(!l||!l.isDragging()&&!l.isReceiving())&&(t.cancelable&&t.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(t)))}return}t.cancelable&&t.preventDefault();let i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,s=this._activeTransform;s.x=i.x-n.x+this._passiveTransform.x,s.y=i.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(s.x,s.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=t=>{this._endDragSequence(t)};_endDragSequence(t){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:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){B(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",hi,di)}),i){let n=this._rootElement,s=n.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");s.insertBefore(a,n),this._initialTransform=n.style.transform||"",this._preview=new Se(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(s,e)),Tt(n,!1,At),this._document.body.appendChild(s.replaceChild(o,n)),this.started.next({source:this,event:t}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();let i=this.isDragging(),n=B(e),s=!n&&e.button!==0,o=this._rootElement,a=H(e),l=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+ci>Date.now(),d=n?it(e):tt(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),i||s||l||d)return;if(this._handles.length){let 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=Re(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let v=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:v.x,y:v.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){Tt(this._rootElement,!0,At),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(()=>{let e=this._dropContainer,i=e.getItemIndex(this),n=this._getPointerPositionOnPage(t),s=this._getDragDistance(n),o=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:s,dropPoint:n,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:n,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,o,s,n,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:n}){let s=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{let 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(s,this._dropContainer,a),this._dropContainer=s,this._dropContainer.enter(this,t,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let n=a=>{(!a||this._preview&&H(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(s))},s=setTimeout(n,e*1.5),o=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){let t=this._placeholderTemplate,e=t?t.template:null,i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=Gt(this._placeholderRef,this._document)):i=we(this._rootElement),i.style.pointerEvents="none",i.classList.add(Nt),i}_getPointerPositionInElement(t,e,i){let n=e===this._rootElement?null:e,s=n?n.getBoundingClientRect():t,o=B(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-s.left-a.left,d=o.pageY-s.top-a.top;return{x:s.left-t.left+l,y:s.top-t.top+d}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),i=B(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,n=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=n,a.y=s,a.matrixTransform(o.inverse())}}return{x:n,y:s}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:n}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:s,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+o,v=a.bottom-(d-o),S=a.left+s,Q=a.right-(l-s);i=Ft(i,S,Q),n=Ft(n,h,v)}return{x:i,y:n}}_updatePointerDirectionDelta(t){let{x:e,y:i}=t,n=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-s.x),a=Math.abs(i-s.y);return o>this._config.pointerDirectionChangeThreshold&&(n.x=e>s.x?1:-1,s.x=e),a>this._config.pointerDirectionChangeThreshold&&(n.y=i>s.y?1:-1,s.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,N(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let i=1/this.scale,n=G(t*i,e*i),s=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=s.transform&&s.transform!="none"?s.transform:""),s.transform=Y(n,this._initialTransform)}_applyPreviewTransform(t,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,n=G(t,e);this._preview.setTransform(Y(n,i))}_getDragDistance(t){let e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(t===0&&e===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||i.width===0&&i.height===0)return;let s=n.left-i.left,o=i.right-n.right,a=n.top-i.top,l=i.bottom-n.bottom;n.width>i.width?(s>0&&(t+=s),o>0&&(t-=o)):t=0,n.height>i.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){let e=this.dragStartDelay;return typeof e=="number"?e:B(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let i=H(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&V(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=j(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let i=this._previewContainer||"global";if(i==="parent")return t;if(i==="global"){let n=this._document;return e||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return x(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=t=>{if(this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&t.preventDefault()}else this.disabled||t.preventDefault()};_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}_conditionallyInsertAnchor(t,e,i){if(t===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let n=this._anchor??=we(this._placeholder);n.classList.remove(Nt),n.classList.add("cdk-drag-anchor"),n.style.transform="",i?i.before(n):x(e.element).appendChild(n)}}};function Ft(r,t,e){return Math.max(t,Math.min(e,r))}function B(r){return r.type[0]==="t"}function hi(r){r.preventDefault()}function J(r,t,e){let i=Ht(t,r.length-1),n=Ht(e,r.length-1);if(i===n)return;let s=r[i],o=n<i?-1:1;for(let a=i;a!==n;a+=o)r[a]=r[a+o];r[n]=s}function Ht(r,t){return Math.max(0,Math.min(t,r))}var X=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(t){this._dragDropRegistry=t}_previousSwap={drag:null,delta:0,overlaps:!1};start(t){this.withItems(t)}sort(t,e,i,n){let s=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,n);if(o===-1&&s.length>0)return null;let a=this.orientation==="horizontal",l=s.findIndex(D=>D.drag===t),d=s[o],h=s[l].clientRect,v=d.clientRect,S=l>o?1:-1,Q=this._getItemOffsetPx(h,v,S),ti=this._getSiblingOffsetPx(l,s,S),ii=s.slice();return J(s,l,o),s.forEach((D,ni)=>{if(ii[ni]===D)return;let Te=D.drag===t,ee=Te?Q:ti,ke=Te?t.getPlaceholderElement():D.drag.getRootElement();D.offset+=ee;let Oe=Math.round(D.offset*(1/D.drag.scale));a?(ke.style.transform=Y(`translate3d(${Oe}px, 0, 0)`,D.initialTransform),V(D.clientRect,0,ee)):(ke.style.transform=Y(`translate3d(0, ${Oe}px, 0)`,D.initialTransform),V(D.clientRect,ee,0))}),this._previousSwap.overlaps=Pe(v,e,i),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?n.x:n.y,{previousIndex:l,currentIndex:o}}enter(t,e,i,n){let s=n==null||n<0?this._getItemIndexFromPointerPosition(t,e,i):n,o=this._activeDraggables,a=o.indexOf(t),l=t.getPlaceholderElement(),d=o[s];if(d===t&&(d=o[s+1]),!d&&(s==null||s===-1||s<o.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(d=o[0]),a>-1&&o.splice(a,1),d&&!this._dragDropRegistry.isDragging(d)){let h=d.getRootElement();h.parentElement.insertBefore(l,h),o.splice(s,0,t)}else this._element.appendChild(l),o.push(t);l.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables?.forEach(t=>{let e=t.getRootElement();if(e){let i=this._itemPositions.find(n=>n.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return this._getVisualItemPositions().findIndex(e=>e.drag===t)}getItemAtIndex(t){return this._getVisualItemPositions()[t]?.drag||null}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{V(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(t){this._element=t}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:Re(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(t,e,i){let n=this.orientation==="horizontal",s=n?e.left-t.left:e.top-t.top;return i===-1&&(s+=n?e.width-t.width:e.height-t.height),s}_getSiblingOffsetPx(t,e,i){let n=this.orientation==="horizontal",s=e[t].clientRect,o=e[t+i*-1],a=s[n?"width":"height"]*i;if(o){let l=n?"left":"top",d=n?"right":"bottom";i===-1?a-=o.clientRect[l]-s[d]:a+=s[l]-o.clientRect[d]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,n=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return n?t>=o.right:e>=o.bottom}else{let o=i[0].clientRect;return n?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,i,n){let s=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(n){let d=s?n.x:n.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return s?e>=Math.floor(l.left)&&e<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,t)?-1:o}},xe=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(t,e){this._document=t,this._dragDropRegistry=e}start(t){let e=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<e.length;i++){let n=e[i];this._relatedNodes.push([n,n.nextSibling])}this.withItems(t)}sort(t,e,i,n){let s=this._getItemIndexFromPointerPosition(t,e,i),o=this._previousSwap;if(s===-1||this._activeItems[s]===t)return null;let a=this._activeItems[s];if(o.drag===a&&o.overlaps&&o.deltaX===n.x&&o.deltaY===n.y)return null;let l=this.getItemIndex(t),d=t.getPlaceholderElement(),h=a.getRootElement();s>l?h.after(d):h.before(d),J(this._activeItems,l,s);let v=this._getRootNode().elementFromPoint(e,i);return o.deltaX=n.x,o.deltaY=n.y,o.drag=a,o.overlaps=h===v||h.contains(v),{previousIndex:l,currentIndex:s}}enter(t,e,i,n){let s=this._activeItems.indexOf(t);s>-1&&this._activeItems.splice(s,1);let o=n==null||n<0?this._getItemIndexFromPointerPosition(t,e,i):n;o===-1&&(o=this._getClosestItemIndexToPointer(t,e,i));let a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,t),a.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()))}withItems(t){this._activeItems=t.slice()}withSortPredicate(t){this._sortPredicate=t}reset(){let t=this._element,e=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[n,s]=this._relatedNodes[i];n.parentNode===t&&n.nextSibling!==s&&(s===null?t.appendChild(n):s.parentNode===t&&t.insertBefore(n,s))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}getItemAtIndex(t){return this._activeItems[t]||null}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0)}_getItemIndexFromPointerPosition(t,e,i){let n=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),s=n?this._activeItems.findIndex(o=>{let a=o.getRootElement();return n===a||a.contains(n)}):-1;return s===-1||!this._sortPredicate(s,t)?-1:s}_getRootNode(){return this._rootNode||(this._rootNode=j(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,e,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let n=1/0,s=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==t){let{x:l,y:d}=a.getRootElement().getBoundingClientRect(),h=Math.hypot(e-l,i-d);h<n&&(n=h,s=o)}}return s}},Bt=.05,$t=.05,w=(function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r})(w||{}),u=(function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r})(u||{}),Ee=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _;entered=new _;exited=new _;dropped=new _;sorted=new _;receivingStarted=new _;receivingStopped=new _;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=T.EMPTY;_verticalScrollDirection=w.NONE;_horizontalScrollDirection=u.NONE;_scrollNode;_stopScrollTimers=new _;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,i,n,s){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=s;let o=this.element=x(t);this._document=i,this.withOrientation("vertical").withElementContainer(o),e.registerDropContainer(this),this._parentPositions=new K(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(t,e,i,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,n,s,o,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:n,isPointerOverContainer:s,distance:o,dropPoint:a,event:l})}withItems(t){let e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(n=>n.isDragging()).every(n=>t.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof X&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new xe(this._document,this._dragDropRegistry);else{let e=new X(this._dragDropRegistry);e.direction=this._direction,e.orientation=t,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,i)=>this.sortPredicate(e,i,this)),this}withScrollableParents(t){let e=this._container;return this._scrollableElements=t.indexOf(e)===-1?[e,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;let e=x(this.element),i=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(t);return i>-1&&this._scrollableElements.splice(i,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}getItemAtIndex(t){return this._isDragging?this._sortStrategy.getItemAtIndex(t):this._draggables[t]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,n){if(this.sortingDisabled||!this._domRect||!It(this._domRect,Bt,e,i))return;let s=this._sortStrategy.sort(t,e,i,n);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,n=w.NONE,s=u.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||It(o.clientRect,Bt,t,e)&&([n,s]=pi(a,o.clientRect,this._direction,t,e),(n||s)&&(i=a))}),!n&&!s){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};n=Ut(l,e),s=Wt(l,t),i=window}i&&(n!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=s,this._scrollNode=i,(n||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.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;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),Ae(0,Le).pipe(A(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===w.UP?t.scrollBy(0,-e):this._verticalScrollDirection===w.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===u.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===u.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&Pe(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(n=>n._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._domRect||!Pe(this._domRect,e,i)||!this.enterPredicate(t,this))return!1;let n=this._getShadowRoot().elementFromPoint(e,i);return n?n===this._container||this._container.contains(n):!1}_startReceiving(t,e){let i=this._activeSiblings;!i.has(t)&&e.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let t=j(this._container);this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}};function Ut(r,t){let{top:e,bottom:i,height:n}=r,s=n*$t;return t>=e-s&&t<=e+s?w.UP:t>=i-s&&t<=i+s?w.DOWN:w.NONE}function Wt(r,t){let{left:e,right:i,width:n}=r,s=n*$t;return t>=e-s&&t<=e+s?u.LEFT:t>=i-s&&t<=i+s?u.RIGHT:u.NONE}function pi(r,t,e,i,n){let s=Ut(t,n),o=Wt(t,i),a=w.NONE,l=u.NONE;if(s){let d=r.scrollTop;s===w.UP?d>0&&(a=w.UP):r.scrollHeight-d>r.clientHeight&&(a=w.DOWN)}if(o){let d=r.scrollLeft;e==="rtl"?o===u.RIGHT?d<0&&(l=u.RIGHT):r.scrollWidth+d>r.clientWidth&&(l=u.LEFT):o===u.LEFT?d>0&&(l=u.LEFT):r.scrollWidth-d>r.clientWidth&&(l=u.RIGHT)}return[a,l]}var z={capture:!0},be={passive:!1,capture:!0},_i=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=R({type:r,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,n){},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}
1
+ import{a as Xe,d as mt,e as ut,f as ft,g as vt,h as Dt,i as bt,j as xt}from"./chunk-DSNKBYAX.js";import"./chunk-QXMATZB6.js";import{b as wt,c as Pt,e as St,f as yt}from"./chunk-HO743WL4.js";import"./chunk-2YGPLTEW.js";import"./chunk-LKF7CNOE.js";import{a as et,b as at}from"./chunk-GPSLFV7R.js";import{b as gt}from"./chunk-MZURT7UO.js";import"./chunk-SPUZNRYQ.js";import"./chunk-4MSEQKGR.js";import"./chunk-27I36ZYA.js";import{D as Ae,E as $,Ea as ae,Ed as fe,Fa as b,Gb as Ke,Ha as le,Hb as ce,Hd as M,Id as L,Jb as F,K as Fe,Kb as f,La as Ge,Lb as he,Md as ve,Oa as R,Pc as me,Qa as de,Tc as Je,Td as lt,V as ie,Vd as dt,W as He,Wa as P,Wd as ct,X as A,Xa as U,Xb as pe,Xc as Qe,Ya as $e,Yd as ht,Z as Be,_d as q,ab as Ue,bb as We,bd as tt,ca as ne,cb as Ze,cd as it,dd as j,de as pt,ea as k,ec as _e,fb as je,fd as H,fe as _t,g as T,ga as c,gb as qe,hb as I,i as te,ib as p,id as ue,j as _,ja as E,jb as g,ka as C,kb as W,kd as x,l as Me,n as Le,na as ze,nd as nt,oa as se,oc as ge,pd as st,qc as O,qd as rt,ra as re,rb as Z,rc as Ye,tb as m,ua as Ve,vb as y,w as Ne,wa as oe,xd as ot}from"./chunk-PB7HT3XU.js";function we(r){let t=r.cloneNode(!0),e=t.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();t.removeAttribute("id");for(let n=0;n<e.length;n++)e[n].removeAttribute("id");return i==="canvas"?Rt(r,t):(i==="input"||i==="select"||i==="textarea")&&Ct(r,t),Et("canvas",r,t,Rt),Et("input, textarea, select",r,t,Ct),t}function Et(r,t,e,i){let n=t.querySelectorAll(r);if(n.length){let s=e.querySelectorAll(r);for(let o=0;o<n.length;o++)i(n[o],s[o])}}var si=0;function Ct(r,t){t.type!=="file"&&(t.value=r.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${si++}`)}function Rt(r,t){let e=t.getContext("2d");if(e)try{e.drawImage(r,0,0)}catch{}}function Re(r){let t=r.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function Pe(r,t,e){let{top:i,bottom:n,left:s,right:o}=r;return e>=i&&e<=n&&t>=s&&t<=o}function ri(r,t){let e=t.left<r.left,i=t.left+t.width>r.right,n=t.top<r.top,s=t.top+t.height>r.bottom;return e||i||n||s}function V(r,t,e){r.top+=t,r.bottom=r.top+r.height,r.left+=e,r.right=r.left+r.width}function It(r,t,e,i){let{top:n,right:s,bottom:o,left:a,width:l,height:d}=r,h=l*t,v=d*t;return i>n-v&&i<o+v&&e>a-h&&e<s+h}var K=class{_document;positions=new Map;constructor(t){this._document=t}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Re(e)})})}handleScroll(t){let e=H(t),i=this.positions.get(e);if(!i)return null;let n=i.scrollPosition,s,o;if(e===this._document){let d=this.getViewportScrollPosition();s=d.top,o=d.left}else s=e.scrollTop,o=e.scrollLeft;let a=n.top-s,l=n.left-o;return this.positions.forEach((d,h)=>{d.clientRect&&e!==h&&e.contains(h)&&V(d.clientRect,a,l)}),n.top=s,n.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Gt(r,t){let e=r.rootNodes;if(e.length===1&&e[0].nodeType===t.ELEMENT_NODE)return e[0];let i=t.createElement("div");return e.forEach(n=>i.appendChild(n)),i}function Ie(r,t,e){for(let i in t)if(t.hasOwnProperty(i)){let n=t[i];n?r.setProperty(i,n,e?.has(i)?"important":""):r.removeProperty(i)}return r}function N(r,t){let e=t?"":"none";Ie(r.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function Tt(r,t,e){Ie(r.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Y(r,t){return t&&t!="none"?r+" "+t:r}function kt(r,t){r.style.width=`${t.width}px`,r.style.height=`${t.height}px`,r.style.transform=G(t.left,t.top)}function G(r,t){return`translate3d(${Math.round(r)}px, ${Math.round(t)}px, 0)`}function Ot(r){let t=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*t}function oi(r){let t=getComputedStyle(r),e=De(t,"transition-property"),i=e.find(a=>a==="transform"||a==="all");if(!i)return 0;let n=e.indexOf(i),s=De(t,"transition-duration"),o=De(t,"transition-delay");return Ot(s[n])+Ot(o[n])}function De(r,t){return r.getPropertyValue(t).split(",").map(i=>i.trim())}var ai=new Set(["position"]),Se=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,i,n,s,o,a,l,d,h){this._document=t,this._rootElement=e,this._direction=i,this._initialDomRect=n,this._previewTemplate=s,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=d,this._renderer=h}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),Mt(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(t){this._preview.style.transform=t}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t)}getTransitionDuration(){return oi(this._preview)}addEventListener(t,e){return this._renderer.listen(this._preview,t,e)}_createPreview(){let t=this._previewTemplate,e=this._previewClass,i=t?t.template:null,n;if(i&&t){let s=t.matchSize?this._initialDomRect:null,o=t.viewContainer.createEmbeddedView(i,t.context);o.detectChanges(),n=Gt(o,this._document),this._previewEmbeddedView=o,t.matchSize?kt(n,s):n.style.transform=G(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=we(this._rootElement),kt(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return Ie(n.style,{"pointer-events":"none",margin:Mt(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},ai),N(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>n.classList.add(s)):n.classList.add(e)),n}};function Mt(r){return"showPopover"in r}var li={passive:!0},Lt={passive:!1},di={passive:!1,capture:!0},ci=800,Nt="cdk-drag-placeholder",At=new Set(["position"]),ye=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=re(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=T.EMPTY;_pointerUpSubscription=T.EMPTY;_scrollSubscription=T.EMPTY;_resizeSubscription=T.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>N(e,t)))}_disabled=!1;beforeStarted=new _;started=new _;released=new _;ended=new _;entered=new _;exited=new _;dropped=new _;moved=this._moveEvents;data;constrainPosition;constructor(t,e,i,n,s,o,a){this._config=e,this._document=i,this._ngZone=n,this._viewportRuler=s,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new K(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>x(i)),this._handles.forEach(i=>N(i,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let e=x(t);if(e!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(e,"mousedown",this._pointerDown,Lt),i.listen(e,"touchstart",this._pointerDown,li),i.listen(e,"dragstart",this._nativeDragStart,Lt)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?x(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,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&&ri(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let t=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),i=0,n=0;e.left<t.left?i=t.left-e.left:e.right>t.right&&(i=t.right-e.right),e.top<t.top?n=t.top-e.top:e.bottom>t.bottom&&(n=t.bottom-e.bottom);let s=this._activeTransform.x,o=this._activeTransform.y,a=s+i,l=o+n;this._rootElement.style.transform=G(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),N(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),N(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_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=t=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)};_pointerMove=t=>{let e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging()){let n=Math.abs(e.x-this._pickupPositionOnPage.x),s=Math.abs(e.y-this._pickupPositionOnPage.y);if(n+s>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),l=this._dropContainer;if(!a){this._endDragSequence(t);return}(!l||!l.isDragging()&&!l.isReceiving())&&(t.cancelable&&t.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(t)))}return}t.cancelable&&t.preventDefault();let i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,s=this._activeTransform;s.x=i.x-n.x+this._passiveTransform.x,s.y=i.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(s.x,s.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=t=>{this._endDragSequence(t)};_endDragSequence(t){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:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){B(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",hi,di)}),i){let n=this._rootElement,s=n.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");s.insertBefore(a,n),this._initialTransform=n.style.transform||"",this._preview=new Se(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(s,e)),Tt(n,!1,At),this._document.body.appendChild(s.replaceChild(o,n)),this.started.next({source:this,event:t}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();let i=this.isDragging(),n=B(e),s=!n&&e.button!==0,o=this._rootElement,a=H(e),l=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+ci>Date.now(),d=n?it(e):tt(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),i||s||l||d)return;if(this._handles.length){let 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=Re(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let v=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:v.x,y:v.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){Tt(this._rootElement,!0,At),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(()=>{let e=this._dropContainer,i=e.getItemIndex(this),n=this._getPointerPositionOnPage(t),s=this._getDragDistance(n),o=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:s,dropPoint:n,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:n,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,o,s,n,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:n}){let s=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{let 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(s,this._dropContainer,a),this._dropContainer=s,this._dropContainer.enter(this,t,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let n=a=>{(!a||this._preview&&H(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(s))},s=setTimeout(n,e*1.5),o=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){let t=this._placeholderTemplate,e=t?t.template:null,i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=Gt(this._placeholderRef,this._document)):i=we(this._rootElement),i.style.pointerEvents="none",i.classList.add(Nt),i}_getPointerPositionInElement(t,e,i){let n=e===this._rootElement?null:e,s=n?n.getBoundingClientRect():t,o=B(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-s.left-a.left,d=o.pageY-s.top-a.top;return{x:s.left-t.left+l,y:s.top-t.top+d}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),i=B(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,n=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=n,a.y=s,a.matrixTransform(o.inverse())}}return{x:n,y:s}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:n}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:s,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+o,v=a.bottom-(d-o),S=a.left+s,Q=a.right-(l-s);i=Ft(i,S,Q),n=Ft(n,h,v)}return{x:i,y:n}}_updatePointerDirectionDelta(t){let{x:e,y:i}=t,n=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-s.x),a=Math.abs(i-s.y);return o>this._config.pointerDirectionChangeThreshold&&(n.x=e>s.x?1:-1,s.x=e),a>this._config.pointerDirectionChangeThreshold&&(n.y=i>s.y?1:-1,s.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,N(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let i=1/this.scale,n=G(t*i,e*i),s=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=s.transform&&s.transform!="none"?s.transform:""),s.transform=Y(n,this._initialTransform)}_applyPreviewTransform(t,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,n=G(t,e);this._preview.setTransform(Y(n,i))}_getDragDistance(t){let e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(t===0&&e===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||i.width===0&&i.height===0)return;let s=n.left-i.left,o=i.right-n.right,a=n.top-i.top,l=i.bottom-n.bottom;n.width>i.width?(s>0&&(t+=s),o>0&&(t-=o)):t=0,n.height>i.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){let e=this.dragStartDelay;return typeof e=="number"?e:B(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let i=H(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&V(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=j(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let i=this._previewContainer||"global";if(i==="parent")return t;if(i==="global"){let n=this._document;return e||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return x(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=t=>{if(this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&t.preventDefault()}else this.disabled||t.preventDefault()};_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}_conditionallyInsertAnchor(t,e,i){if(t===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let n=this._anchor??=we(this._placeholder);n.classList.remove(Nt),n.classList.add("cdk-drag-anchor"),n.style.transform="",i?i.before(n):x(e.element).appendChild(n)}}};function Ft(r,t,e){return Math.max(t,Math.min(e,r))}function B(r){return r.type[0]==="t"}function hi(r){r.preventDefault()}function J(r,t,e){let i=Ht(t,r.length-1),n=Ht(e,r.length-1);if(i===n)return;let s=r[i],o=n<i?-1:1;for(let a=i;a!==n;a+=o)r[a]=r[a+o];r[n]=s}function Ht(r,t){return Math.max(0,Math.min(t,r))}var X=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(t){this._dragDropRegistry=t}_previousSwap={drag:null,delta:0,overlaps:!1};start(t){this.withItems(t)}sort(t,e,i,n){let s=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,n);if(o===-1&&s.length>0)return null;let a=this.orientation==="horizontal",l=s.findIndex(D=>D.drag===t),d=s[o],h=s[l].clientRect,v=d.clientRect,S=l>o?1:-1,Q=this._getItemOffsetPx(h,v,S),ti=this._getSiblingOffsetPx(l,s,S),ii=s.slice();return J(s,l,o),s.forEach((D,ni)=>{if(ii[ni]===D)return;let Te=D.drag===t,ee=Te?Q:ti,ke=Te?t.getPlaceholderElement():D.drag.getRootElement();D.offset+=ee;let Oe=Math.round(D.offset*(1/D.drag.scale));a?(ke.style.transform=Y(`translate3d(${Oe}px, 0, 0)`,D.initialTransform),V(D.clientRect,0,ee)):(ke.style.transform=Y(`translate3d(0, ${Oe}px, 0)`,D.initialTransform),V(D.clientRect,ee,0))}),this._previousSwap.overlaps=Pe(v,e,i),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?n.x:n.y,{previousIndex:l,currentIndex:o}}enter(t,e,i,n){let s=n==null||n<0?this._getItemIndexFromPointerPosition(t,e,i):n,o=this._activeDraggables,a=o.indexOf(t),l=t.getPlaceholderElement(),d=o[s];if(d===t&&(d=o[s+1]),!d&&(s==null||s===-1||s<o.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(d=o[0]),a>-1&&o.splice(a,1),d&&!this._dragDropRegistry.isDragging(d)){let h=d.getRootElement();h.parentElement.insertBefore(l,h),o.splice(s,0,t)}else this._element.appendChild(l),o.push(t);l.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables?.forEach(t=>{let e=t.getRootElement();if(e){let i=this._itemPositions.find(n=>n.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return this._getVisualItemPositions().findIndex(e=>e.drag===t)}getItemAtIndex(t){return this._getVisualItemPositions()[t]?.drag||null}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{V(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(t){this._element=t}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:Re(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(t,e,i){let n=this.orientation==="horizontal",s=n?e.left-t.left:e.top-t.top;return i===-1&&(s+=n?e.width-t.width:e.height-t.height),s}_getSiblingOffsetPx(t,e,i){let n=this.orientation==="horizontal",s=e[t].clientRect,o=e[t+i*-1],a=s[n?"width":"height"]*i;if(o){let l=n?"left":"top",d=n?"right":"bottom";i===-1?a-=o.clientRect[l]-s[d]:a+=s[l]-o.clientRect[d]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,n=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return n?t>=o.right:e>=o.bottom}else{let o=i[0].clientRect;return n?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,i,n){let s=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(n){let d=s?n.x:n.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return s?e>=Math.floor(l.left)&&e<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,t)?-1:o}},xe=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(t,e){this._document=t,this._dragDropRegistry=e}start(t){let e=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<e.length;i++){let n=e[i];this._relatedNodes.push([n,n.nextSibling])}this.withItems(t)}sort(t,e,i,n){let s=this._getItemIndexFromPointerPosition(t,e,i),o=this._previousSwap;if(s===-1||this._activeItems[s]===t)return null;let a=this._activeItems[s];if(o.drag===a&&o.overlaps&&o.deltaX===n.x&&o.deltaY===n.y)return null;let l=this.getItemIndex(t),d=t.getPlaceholderElement(),h=a.getRootElement();s>l?h.after(d):h.before(d),J(this._activeItems,l,s);let v=this._getRootNode().elementFromPoint(e,i);return o.deltaX=n.x,o.deltaY=n.y,o.drag=a,o.overlaps=h===v||h.contains(v),{previousIndex:l,currentIndex:s}}enter(t,e,i,n){let s=this._activeItems.indexOf(t);s>-1&&this._activeItems.splice(s,1);let o=n==null||n<0?this._getItemIndexFromPointerPosition(t,e,i):n;o===-1&&(o=this._getClosestItemIndexToPointer(t,e,i));let a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,t),a.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()))}withItems(t){this._activeItems=t.slice()}withSortPredicate(t){this._sortPredicate=t}reset(){let t=this._element,e=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[n,s]=this._relatedNodes[i];n.parentNode===t&&n.nextSibling!==s&&(s===null?t.appendChild(n):s.parentNode===t&&t.insertBefore(n,s))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}getItemAtIndex(t){return this._activeItems[t]||null}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0)}_getItemIndexFromPointerPosition(t,e,i){let n=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),s=n?this._activeItems.findIndex(o=>{let a=o.getRootElement();return n===a||a.contains(n)}):-1;return s===-1||!this._sortPredicate(s,t)?-1:s}_getRootNode(){return this._rootNode||(this._rootNode=j(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,e,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let n=1/0,s=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==t){let{x:l,y:d}=a.getRootElement().getBoundingClientRect(),h=Math.hypot(e-l,i-d);h<n&&(n=h,s=o)}}return s}},Bt=.05,$t=.05,w=(function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r})(w||{}),u=(function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r})(u||{}),Ee=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _;entered=new _;exited=new _;dropped=new _;sorted=new _;receivingStarted=new _;receivingStopped=new _;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=T.EMPTY;_verticalScrollDirection=w.NONE;_horizontalScrollDirection=u.NONE;_scrollNode;_stopScrollTimers=new _;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,i,n,s){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=s;let o=this.element=x(t);this._document=i,this.withOrientation("vertical").withElementContainer(o),e.registerDropContainer(this),this._parentPositions=new K(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(t,e,i,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,n,s,o,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:n,isPointerOverContainer:s,distance:o,dropPoint:a,event:l})}withItems(t){let e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(n=>n.isDragging()).every(n=>t.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof X&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new xe(this._document,this._dragDropRegistry);else{let e=new X(this._dragDropRegistry);e.direction=this._direction,e.orientation=t,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,i)=>this.sortPredicate(e,i,this)),this}withScrollableParents(t){let e=this._container;return this._scrollableElements=t.indexOf(e)===-1?[e,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;let e=x(this.element),i=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(t);return i>-1&&this._scrollableElements.splice(i,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}getItemAtIndex(t){return this._isDragging?this._sortStrategy.getItemAtIndex(t):this._draggables[t]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,n){if(this.sortingDisabled||!this._domRect||!It(this._domRect,Bt,e,i))return;let s=this._sortStrategy.sort(t,e,i,n);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,n=w.NONE,s=u.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||It(o.clientRect,Bt,t,e)&&([n,s]=pi(a,o.clientRect,this._direction,t,e),(n||s)&&(i=a))}),!n&&!s){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};n=Ut(l,e),s=Wt(l,t),i=window}i&&(n!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=s,this._scrollNode=i,(n||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.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;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),Ae(0,Le).pipe(A(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===w.UP?t.scrollBy(0,-e):this._verticalScrollDirection===w.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===u.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===u.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&Pe(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(n=>n._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._domRect||!Pe(this._domRect,e,i)||!this.enterPredicate(t,this))return!1;let n=this._getShadowRoot().elementFromPoint(e,i);return n?n===this._container||this._container.contains(n):!1}_startReceiving(t,e){let i=this._activeSiblings;!i.has(t)&&e.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let t=j(this._container);this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}};function Ut(r,t){let{top:e,bottom:i,height:n}=r,s=n*$t;return t>=e-s&&t<=e+s?w.UP:t>=i-s&&t<=i+s?w.DOWN:w.NONE}function Wt(r,t){let{left:e,right:i,width:n}=r,s=n*$t;return t>=e-s&&t<=e+s?u.LEFT:t>=i-s&&t<=i+s?u.RIGHT:u.NONE}function pi(r,t,e,i,n){let s=Ut(t,n),o=Wt(t,i),a=w.NONE,l=u.NONE;if(s){let d=r.scrollTop;s===w.UP?d>0&&(a=w.UP):r.scrollHeight-d>r.clientHeight&&(a=w.DOWN)}if(o){let d=r.scrollLeft;e==="rtl"?o===u.RIGHT?d<0&&(l=u.RIGHT):r.scrollWidth+d>r.clientWidth&&(l=u.LEFT):o===u.LEFT?d>0&&(l=u.LEFT):r.scrollWidth-d>r.clientWidth&&(l=u.RIGHT)}return[a,l]}var z={capture:!0},be={passive:!1,capture:!0},_i=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=R({type:r,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,n){},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}
2
2
  `],encapsulation:2,changeDetection:0})}return r})(),Zt=(()=>{class r{_ngZone=c(U);_document=c(se);_styleLoader=c(nt);_renderer=c(le).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new _;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=re([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new _;pointerUp=new _;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,be)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(_i),this._activeDragInstances.update(n=>[...n,e]),this._activeDragInstances().length===1)){let n=i.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this._scroll.next(a),z],["selectstart",this._preventDefaultWhileDragging,be]];n?o.push(["touchend",s,z],["touchcancel",s,z]):o.push(["mouseup",s,z]),n||o.push(["mousemove",a=>this.pointerMove.next(a),be]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,d])=>this._renderer.listen(this._document,a,l,d))})}}stopDragging(e){this._activeDragInstances.update(i=>{let n=i.indexOf(e);return n>-1?(i.splice(n,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let i=[this._scroll];return e&&e!==this._document&&i.push(new te(n=>this._ngZone.runOutsideAngular(()=>{let s=this._renderer.listen(e,"scroll",o=>{this._activeDragInstances().length&&n.next(o)},z);return()=>{s()}}))),$(...i)}registerDirectiveNode(e,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,i)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||r)};static \u0275prov=ne({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),gi={dragStartThreshold:5,pointerDirectionChangeThreshold:5},jt=(()=>{class r{_document=c(se);_ngZone=c(U);_viewportRuler=c(_t);_dragDropRegistry=c(Zt);_renderer=c(le).createRenderer(null,null);constructor(){}createDrag(e,i=gi){return new ye(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new Ee(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||r)};static \u0275prov=ne({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),zt=new k("CDK_DRAG_PARENT");var mi=new k("CdkDragHandle");var qt=new k("CDK_DRAG_CONFIG"),Kt=new k("CdkDropList"),Yt=(()=>{class r{element=c(oe);dropContainer=c(Kt,{optional:!0,skipSelf:!0});_ngZone=c(U);_viewContainerRef=c(Ge);_dir=c(fe,{optional:!0});_changeDetectorRef=c(ge);_selfHandle=c(mi,{optional:!0,self:!0});_parentDrag=c(zt,{optional:!0,skipSelf:!0});_dragDropRegistry=c(Zt);_destroyed=new _;_handles=new Me([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new P;released=new P;ended=new P;entered=new P;exited=new P;dropped=new P;moved=new te(e=>{let i=this._dragRef.moved.pipe(Ne(n=>({source:this,pointerPosition:n.pointerPosition,event:n.event,delta:n.delta,distance:n.distance}))).subscribe(e);return()=>{i.unsubscribe()}});_injector=c(ze);constructor(){let e=this.dropContainer,i=c(qt,{optional:!0}),n=c(jt);this._dragRef=n.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),e&&(e.addItem(this),e._dropListRef.beforeStarted.pipe(A(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(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){$e(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let i=e.rootElementSelector,n=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,n&&!n.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(e){let i=this._handles.getValue();i.push(e),this._handles.next(i)}_removeHandle(e){let i=this._handles.getValue(),n=i.indexOf(e);n>-1&&(i.splice(n,1),this._handles.next(i))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):x(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,n=this.dragStartDelay,s=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;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof n=="object"&&n?n:ue(n),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(Fe(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let n=this._dragDropRegistry.getDragDirectiveForNode(i);if(n){e.withParent(n._dragRef);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.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(e){let{lockAxis:i,dragStartDelay:n,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:d,previewContainer:h}=e;this.disabled=l??!1,this.dragStartDelay=n||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),d&&(this.rootElementSelector=d),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(Be(e=>{let i=e.map(n=>n.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),He(e=>$(...e.map(i=>i._stateChanges.pipe(ie(i))))),A(this._destroyed)).subscribe(e=>{let i=this._dragRef,n=e.element.nativeElement;e.disabled?i.disableHandle(n):i.enableHandle(n)})}static \u0275fac=function(i){return new(i||r)};static \u0275dir=de({type:r,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,n){i&2&&ce("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._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",O],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Ye]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[pe([{provide:zt,useExisting:r}]),Ve]})}return r})(),Vt=new k("CdkDropListGroup");var Xt=(()=>{class r{element=c(oe);_changeDetectorRef=c(ge);_scrollDispatcher=c(pt);_dir=c(fe,{optional:!0});_group=c(Vt,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new _;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=c(ot).getId("cdk-drop-list-");lockAxis;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;hasAnchor;dropped=new P;entered=new P;exited=new P;sorted=new P;_unsortedItems=new Set;constructor(){let e=c(jt),i=c(qt,{optional:!0});this._dropListRef=e.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(n,s)=>this.enterPredicate(n.data,s.data),this._dropListRef.sortPredicate=(n,s,o)=>this.sortPredicate(n,s.data,o.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),r._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(e){this._unsortedItems.add(e),e._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(e){if(this._unsortedItems.delete(e),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(e._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=r._dropLists.indexOf(this);e>-1&&r._dropLists.splice(e,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(e){this._dir&&this._dir.change.pipe(ie(this._dir.value),A(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=st(this.connectedTo).map(n=>{if(typeof n=="string"){let s=r._dropLists.find(o=>o.id===n);return s}return n});if(this._group&&this._group._items.forEach(n=>{i.indexOf(n)===-1&&i.push(n)}),!this._scrollableParentsResolved){let n=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(n),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let n=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(n)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=ue(this.autoScrollStep,2),e.hasAnchor=this.hasAnchor,e.connectedTo(i.filter(n=>n&&n!==this).map(n=>n._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.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()}),$(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:i,draggingDisabled:n,sortingDisabled:s,listAutoScrollDisabled:o,listOrientation:a}=e;this.disabled=n??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=o??!1,this.orientation=a||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(e){this._latestSortedRefs=e,this._dropListRef.withItems(e)}static \u0275fac=function(i){return new(i||r)};static \u0275dir=de({type:r,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,n){i&2&&(Ue("id",n.id),ce("cdk-drop-list-disabled",n.disabled)("cdk-drop-list-dragging",n._dropListRef.isDragging())("cdk-drop-list-receiving",n._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",O],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",O],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",O],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",O]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[pe([{provide:Vt,useValue:void 0},{provide:Kt,useExisting:r}])]})}return r})();function ui(r,t){if(r&1){let e=Z();p(0,"button",0),m("click",function(){E(e);let n=y();return C(n.clickAction("cancel"))}),p(1,"mat-icon",1),f(2,"close"),g(),p(3,"span"),f(4,"Close"),g()()}}var Qt=(()=>{class r{_bottomSheetRef=c(vt);data=c(ft);showCancel=!!(this.data&&this.data.showCancel);clickAction(e){this._bottomSheetRef.dismiss(e)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=R({type:r,selectors:[["dashboards-manage-bottom-sheet"]],decls:12,vars:1,consts:[["mat-list-item","",3,"click"],["matListItemIcon",""],["mat-list-item",""]],template:function(i,n){i&1&&(p(0,"mat-action-list")(1,"button",0),m("click",function(){return n.clickAction("duplicate")}),p(2,"mat-icon",1),f(3,"content_copy"),g(),p(4,"span"),f(5,"Duplicate"),g()(),p(6,"button",0),m("click",function(){return n.clickAction("delete")}),p(7,"mat-icon",1),f(8,"delete_forever"),g(),p(9,"span"),f(10,"Delete"),g()(),We(11,ui,5,0,"button",2),g()),i&2&&(b(11),Ze(n.showCancel?11:-1))},dependencies:[yt,Pt,St,wt,L,M],encapsulation:2})}return r})();var vi=(r,t)=>t.id;function Di(r,t){if(r&1){let e=Z();p(0,"div",5),m("cdkDragStarted",function(){E(e);let n=y();return C(n.dragStart())})("cdkDragMoved",function(n){E(e);let s=y();return C(s.onDragMoved(n))})("cdkDragEnded",function(){E(e);let n=y();return C(n.dragEnd())})("press",function(n){let s=E(e).$index,o=y();return C(o.onPress(s,n))})("doubletap",function(){let n=E(e).$index,s=y();return C(s.editDashboard(n))}),p(1,"div",6),f(2),g(),p(3,"div"),W(4,"mat-icon",7),g(),p(5,"p",8),f(6),g()()}if(r&2){let e=t.$implicit,i=t.$index,n=y();I("cdkDragDisabled",n._sheetOpen||n.suppressDrag),b(2),he(i+1),b(2),Ke("width",72,"px")("height",72,"px"),I("svgIcon",e.icon||"dashboard"),b(2),he(e.name)}}var ei=(()=>{class r{pageTitle="Dashboards";_bottomSheet=c(Dt);_dashboard=c(et);_uiEvent=c(ut);_dialog=c(mt);_sanitizer=c(Je);_sheetOpen=!1;suppressDrag=!1;_dragActive=!1;_dragMoved=!1;_dragSuppressThresholdPx=4;addDashboard(){this._dialog.openDashboardPageEditorDialog({title:"New Dashboard",name:`Dashboard ${this._dashboard.dashboards().length+1}`,icon:"dashboard-dashboard",confirmBtnText:"Create",cancelBtnText:"Cancel"}).afterClosed().subscribe(e=>{e&&this._dashboard.add(e.name,[],e.icon)})}openBottomSheet(e){let i=typeof navigator<"u"&&/Linux/.test(navigator.platform)&&/Firefox/.test(navigator.userAgent);this._bottomSheet.open(Qt,i?{disableClose:!0,data:{showCancel:!0}}:{}).afterDismissed().subscribe(s=>{switch(this._sheetOpen=!1,s){case"delete":this.deleteDashboard(e);break;case"duplicate":this.duplicateDashboard(e,`${this._dashboard.dashboards()[e].name}`);break;default:break}})}editDashboard(e){let i=this._dashboard.dashboards()[e];this._dialog.openDashboardPageEditorDialog({title:"Dashboard Details",name:i.name,icon:i.icon||"dashboard-dashboard",confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(n=>{n&&this._dashboard.update(e,n.name,n.icon)})}deleteDashboard(e){this._dashboard.delete(e)}duplicateDashboard(e,i){let n=this._dashboard.dashboards()[e];this._dialog.openDashboardPageEditorDialog({title:"Duplicate Dashboard",name:`${i} copy`,icon:n.icon||"dashboard-dashboard",confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(s=>{s&&this._dashboard.duplicate(e,s.name,s.icon)})}drop(e){this._dashboard.dashboards.update(i=>{let n=[...i];J(n,e.previousIndex,e.currentIndex);let s=this._dashboard.activeDashboard();return s===e.previousIndex?this._dashboard.activeDashboard.set(e.currentIndex):s>e.previousIndex&&s<=e.currentIndex?this._dashboard.activeDashboard.set(s-1):s<e.previousIndex&&s>=e.currentIndex&&this._dashboard.activeDashboard.set(s+1),n})}dragStart(){this._sheetOpen||this.suppressDrag||(this._uiEvent.isDragging.set(!0),this._dragActive=!0,this._dragMoved=!1)}dragEnd(){this._uiEvent.isDragging.set(!1),this._dragActive=!1,setTimeout(()=>{this._dragMoved=!1},60)}onDragMoved(e){if(!this._dragActive||this._dragMoved)return;Math.hypot(e.distance.x,e.distance.y)>this._dragSuppressThresholdPx&&(this._dragMoved=!0)}onPress(e,i){i.preventDefault(),i.stopPropagation(),!this._dragMoved&&(this.cancelPointerSequence(),this.openBottomSheet(e))}cancelPointerSequence(){this.suppressDrag=!0,this._dragActive=!1,this._dragMoved=!1,["pointerup","mouseup","touchend"].forEach(e=>{document.dispatchEvent(new Event(e,{bubbles:!0}))})}_onPointerRelease(){this._sheetOpen||(this.suppressDrag=!1)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=R({type:r,selectors:[["dashboards-editor"]],hostBindings:function(i,n){i&1&&m("mouseup",function(){return n._onPointerRelease()},ae)("touchend",function(){return n._onPointerRelease()},ae)},decls:10,vars:0,consts:[["cdkDropList","","cdkDropListOrientation","mixed",1,"dashboard-manage",3,"cdkDropListDropped"],["kipGestures","","matRipple","","cdkDrag","","cdkDragBoundary",".dashboard-manage",1,"dashboard-card","dashboard-item",3,"cdkDragDisabled"],["tabindex","0",1,"dashboard-card","dashboard-item-add","dashboard-add-btn",3,"click","keydown"],["mat-fab",""],[2,"margin-top","10px"],["kipGestures","","matRipple","","cdkDrag","","cdkDragBoundary",".dashboard-manage",1,"dashboard-card","dashboard-item",3,"cdkDragStarted","cdkDragMoved","cdkDragEnded","press","doubletap","cdkDragDisabled"],[1,"item-index"],["aria-hidden","false",1,"dashboard-icon",3,"svgIcon"],[1,"dashboard-name"]],template:function(i,n){i&1&&(p(0,"div",0),m("cdkDropListDropped",function(o){return n.drop(o)}),je(1,Di,7,8,"div",1,vi),p(3,"div",2),m("click",function(){return n.addDashboard()})("keydown",function(){return n.addDashboard()}),p(4,"button",3)(5,"mat-icon"),f(6,"add_box"),g()(),p(7,"p",4)(8,"i"),f(9,"Add Dashboard"),g()()()()),i&2&&(b(),qe(n._dashboard.dashboards()))},dependencies:[bt,q,ht,L,M,Xt,Yt,ct,lt,Xe],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow-y:auto;scroll-behavior:smooth}.dashboard-manage[_ngcontent-%COMP%]{box-sizing:border-box;padding:0 60px;width:100%;height:100%;display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-around;overflow-y:auto;scroll-behavior:smooth}.dashboard-card[_ngcontent-%COMP%]{position:relative;height:200px;width:300px;margin:10px;border-radius:15px;padding:10px;align-content:center;text-align:center;border:2px solid transparent}@media (max-width: 600px) and (orientation: portrait){.dashboard-manage[_ngcontent-%COMP%]{padding:0 70px}.dashboard-card[_ngcontent-%COMP%]{height:175px}}.dashboard-item[_ngcontent-%COMP%]{background-color:var(--mat-sys-surface-container-highest);cursor:pointer}.dashboard-item[_ngcontent-%COMP%]:hover{border:2px solid var(--mat-sys-outline)}.dashboard-item-add[_ngcontent-%COMP%]{background-color:var(--mat-sys-surface-container);cursor:pointer}.dashboard-item-add[_ngcontent-%COMP%]:hover{border:2px solid var(--mat-sys-outline)}.dashboard-add-btn[_ngcontent-%COMP%]{align-content:center;text-align:center;border:dashed 1px var(--mat-sys-outline)}.item-index[_ngcontent-%COMP%]{position:absolute;top:20px;left:20px;display:inline-flex;flex-wrap:wrap;height:42px;width:42px;background-color:var(--kip-contrast-dim-color);color:var(--mat-sys-surface-bright);border-radius:25%;align-content:center;align-items:center;justify-content:center;font-weight:700;font-size:1.25em;z-index:1}.dashboard-icon[_ngcontent-%COMP%]{opacity:.5}.dashboard-name[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:0;font-size:1.1em}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px var(--mat-sys-on-primary-container),0 8px 10px 1px var(--mat-sys-on-primary-container),0 3px 14px 2px var(--mat-sys-on-primary-container)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}"]})}return r})();var yn=(()=>{class r{_router=c(Qe);app=c(at);_responsive=c(rt);_isPhonePortrait=me(this._responsive.observe(ve.HandsetPortrait));_isPhoneLandscape=me(this._responsive.observe(ve.HandsetLandscape));isPhonePortrait=_e(()=>this._isPhonePortrait().matches);isPhoneLandscape=_e(()=>this._isPhoneLandscape().matches);closePage(){this._router.navigate(["/dashboard"])}onActionItem(e){switch(e){case"help":this._router.navigate(["/help"]);break;case"datainspector":this._router.navigate(["/data"]);break;case"remotecontrol":this._router.navigate(["/remote"]);break;case"options":this._router.navigate(["/options"]);break;default:break}}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=R({type:r,selectors:[["settings"]],decls:11,vars:20,consts:[[1,"home-container"],[1,"actions-header-container"],[1,"actions-buttons-container"],["tabindex","0","svgIcon","settings","label","Options",3,"click","iconOnly","compact","iconSize"],["tabindex","0","svgIcon","troubleshoot","label","Data Inspector",3,"click","iconOnly","compact","iconSize"],["tabindex","0","svgIcon","remote-control","label","Remote Control",3,"click","iconOnly","compact","iconSize"],["tabindex","0","svgIcon","help-center","label","Help",3,"click","iconOnly","compact","iconSize"],["mat-icon-button","",1,"dialog-close-icon",3,"click"],[1,"dashboards-editor"]],template:function(i,n){i&1&&(p(0,"div",0)(1,"div",1)(2,"div",2)(3,"tile-large-icon",3),m("click",function(){return n.onActionItem("options")}),g(),p(4,"tile-large-icon",4),m("click",function(){return n.onActionItem("datainspector")}),g(),p(5,"tile-large-icon",5),m("click",function(){return n.onActionItem("remotecontrol")}),g(),p(6,"tile-large-icon",6),m("click",function(){return n.onActionItem("help")}),g()(),p(7,"button",7),m("click",function(){return n.closePage()}),p(8,"mat-icon"),f(9,"close"),g()()(),W(10,"dashboards-editor",8),g()),i&2&&(b(3),F(`${n.isPhonePortrait()?"no-label":"with-label"}`),I("iconOnly",n.isPhonePortrait())("compact",!0)("iconSize",48),b(),F(`${n.isPhonePortrait()?"no-label":"with-label"}`),I("iconOnly",n.isPhonePortrait())("compact",!0)("iconSize",48),b(),F(`${n.isPhonePortrait()?"no-label":"with-label"}`),I("iconOnly",n.isPhonePortrait())("compact",!0)("iconSize",48),b(),F(`${n.isPhonePortrait()?"no-label":"with-label"}`),I("iconOnly",n.isPhonePortrait())("compact",!0)("iconSize",48))},dependencies:[L,M,q,dt,xt,gt,ei],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.home-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.actions-header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;width:100%;padding:5px 0 5px 10px}.with-label[_ngcontent-%COMP%]{height:80px;width:100px}.no-label[_ngcontent-%COMP%]{height:58px;width:63px}.dashboard-editor[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:auto}.actions-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px;margin-top:6px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return r})();export{yn as SettingsComponent};
@@ -1,4 +1,4 @@
1
- import{a as ve,b as Ye,c as Ho,d as Zo,e as zo,f as Jt,g as $t,h as Xo,i as Ko,j as Jo,k as $o}from"./chunk-QXMATZB6.js";import{a as Wo,b as Uo,c as bt,d as qo,e as J,f as Qo,g as Yo,h as wt,i as se,j as Qe,l as Ct}from"./chunk-2YGPLTEW.js";import{a as Ro,d as jo}from"./chunk-LKF7CNOE.js";import{b as At}from"./chunk-EVQE5STK.js";import{a as Lo,b as No}from"./chunk-MZURT7UO.js";import{B as L,C as le,F as K,G as Ce,b as no,g as po,h as wo,i as Eo,j as ko,k as pe,l as ue,n as Go,o as ge,p as fe,q as he,r as We,s as ae,u as V,v as ft,w as Bo,x as ht,z as Vo}from"./chunk-SPUZNRYQ.js";import{A as be,B as z,C as Fo,D as Oo,E as qe,F as Kt,G as ut,H as B,J as gt,K as X,L as W,a as Ji,f as eo,g as to,i as io,j as oo,k as Zt,l as j,n as H,q as O,r as Z,s as Io,t as Do,u as zt,v as Po,w as re,x as Xt,y as pt,z as Ue}from"./chunk-4MSEQKGR.js";import{b as fo,f as ho,g as bo,h as _o,i as gi,j as Mo,m as yo,n as So,o as To,s as xo}from"./chunk-27I36ZYA.js";import{$b as Ve,Ab as Fe,Bb as Oe,Bd as ui,C as mi,Cc as Wt,Cd as Qt,Dc as Ki,E as tt,Ed as Yt,F as Ee,Fa as s,Fb as oe,Ga as Oi,Gb as Be,Gd as ne,Hb as U,Hc as Ut,Hd as F,I as Gi,Ia as Bi,Ib as st,Id as Y,J as Dt,Jb as ye,Jc as $i,K as it,Kb as r,La as Vi,Lb as x,Mb as q,Md as Te,N as Ii,Nb as dt,Nd as Re,Oa as _,Oc as Ne,P as Di,Pa as De,Pb as Vt,Qa as Ke,Qb as Lt,Ra as Li,Rb as Nt,Sa as Ni,Td as jt,Ua as Pe,Ud as uo,V as ot,Va as Ri,Vb as Se,Vd as ee,W as Pt,Wa as ce,Wd as Ht,Xa as Ot,Xb as St,Xd as Ae,Ya as Wi,Yb as Tt,Z as Pi,Zd as go,_d as te,a as we,ab as $,ac as Le,b as $e,ba as Ft,bb as p,ca as ke,cb as u,da as Ge,db as G,dc as ji,ea as de,eb as Bt,ec as Hi,ed as ao,f as N,fb as S,fc as Rt,fd as ro,fe as Co,g as It,ga as A,gb as T,gd as lo,ge as vo,hb as m,i as si,ia as Fi,ib as a,ic as Zi,j as _t,ja as M,jb as n,jc as Q,ka as y,kb as b,kc as f,l as Ei,lb as Ai,ld as so,mb as pi,na as nt,nd as co,ob as Ui,oc as ct,pa as Ie,pb as qi,pd as mo,q as di,qb as Qi,qc as R,qd as qt,ra as P,rb as D,sb as Yi,tb as v,u as ci,ua as at,vb as h,w as et,wa as Xe,wb as rt,xb as lt,xd as xt,yb as Mt,yc as zi,yd as mt,z as ki,zb as yt,zc as Xi,zd as Ao}from"./chunk-PB7HT3XU.js";var Bn=["*"];var Vn=new de("MAT_CARD_CONFIG"),Tl=(()=>{class o{appearance;constructor(){let e=A(Vn,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(i,t){i&2&&U("mat-mdc-card-outlined",t.appearance==="outlined")("mdc-card--outlined",t.appearance==="outlined")("mat-mdc-card-filled",t.appearance==="filled")("mdc-card--filled",t.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Bn,decls:1,vars:0,template:function(i,t){i&1&&(rt(),lt(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}
1
+ import{a as ve,b as Ye,c as Ho,d as Zo,e as zo,f as Jt,g as $t,h as Xo,i as Ko,j as Jo,k as $o}from"./chunk-QXMATZB6.js";import{a as Wo,b as Uo,c as bt,d as qo,e as J,f as Qo,g as Yo,h as wt,i as se,j as Qe,l as Ct}from"./chunk-2YGPLTEW.js";import{a as Ro,d as jo}from"./chunk-LKF7CNOE.js";import{b as At}from"./chunk-GPSLFV7R.js";import{a as Lo,b as No}from"./chunk-MZURT7UO.js";import{B as L,C as le,F as K,G as Ce,b as no,g as po,h as wo,i as Eo,j as ko,k as pe,l as ue,n as Go,o as ge,p as fe,q as he,r as We,s as ae,u as V,v as ft,w as Bo,x as ht,z as Vo}from"./chunk-SPUZNRYQ.js";import{A as be,B as z,C as Fo,D as Oo,E as qe,F as Kt,G as ut,H as B,J as gt,K as X,L as W,a as Ji,f as eo,g as to,i as io,j as oo,k as Zt,l as j,n as H,q as O,r as Z,s as Io,t as Do,u as zt,v as Po,w as re,x as Xt,y as pt,z as Ue}from"./chunk-4MSEQKGR.js";import{b as fo,f as ho,g as bo,h as _o,i as gi,j as Mo,m as yo,n as So,o as To,s as xo}from"./chunk-27I36ZYA.js";import{$b as Ve,Ab as Fe,Bb as Oe,Bd as ui,C as mi,Cc as Wt,Cd as Qt,Dc as Ki,E as tt,Ed as Yt,F as Ee,Fa as s,Fb as oe,Ga as Oi,Gb as Be,Gd as ne,Hb as U,Hc as Ut,Hd as F,I as Gi,Ia as Bi,Ib as st,Id as Y,J as Dt,Jb as ye,Jc as $i,K as it,Kb as r,La as Vi,Lb as x,Mb as q,Md as Te,N as Ii,Nb as dt,Nd as Re,Oa as _,Oc as Ne,P as Di,Pa as De,Pb as Vt,Qa as Ke,Qb as Lt,Ra as Li,Rb as Nt,Sa as Ni,Td as jt,Ua as Pe,Ud as uo,V as ot,Va as Ri,Vb as Se,Vd as ee,W as Pt,Wa as ce,Wd as Ht,Xa as Ot,Xb as St,Xd as Ae,Ya as Wi,Yb as Tt,Z as Pi,Zd as go,_d as te,a as we,ab as $,ac as Le,b as $e,ba as Ft,bb as p,ca as ke,cb as u,da as Ge,db as G,dc as ji,ea as de,eb as Bt,ec as Hi,ed as ao,f as N,fb as S,fc as Rt,fd as ro,fe as Co,g as It,ga as A,gb as T,gd as lo,ge as vo,hb as m,i as si,ia as Fi,ib as a,ic as Zi,j as _t,ja as M,jb as n,jc as Q,ka as y,kb as b,kc as f,l as Ei,lb as Ai,ld as so,mb as pi,na as nt,nd as co,ob as Ui,oc as ct,pa as Ie,pb as qi,pd as mo,q as di,qb as Qi,qc as R,qd as qt,ra as P,rb as D,sb as Yi,tb as v,u as ci,ua as at,vb as h,w as et,wa as Xe,wb as rt,xb as lt,xd as xt,yb as Mt,yc as zi,yd as mt,z as ki,zb as yt,zc as Xi,zd as Ao}from"./chunk-PB7HT3XU.js";var Bn=["*"];var Vn=new de("MAT_CARD_CONFIG"),Tl=(()=>{class o{appearance;constructor(){let e=A(Vn,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(i,t){i&2&&U("mat-mdc-card-outlined",t.appearance==="outlined")("mdc-card--outlined",t.appearance==="outlined")("mat-mdc-card-filled",t.appearance==="filled")("mdc-card--filled",t.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Bn,decls:1,vars:0,template:function(i,t){i&1&&(rt(),lt(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}
2
2
  `],encapsulation:2,changeDetection:0})}return o})();var ei=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=De({type:o});static \u0275inj=Ge({imports:[ne,ne]})}return o})();function Ln(o,d){if(o&1&&(a(0,"p"),r(1),n()),o&2){let e=h();ye(`large-icon-tile-label${e.compact()?" compact":""}`),s(),x(e.label())}}function Nn(o,d){o&1&&b(0,"div",3)}var Pl=(()=>{class o{svgIcon=f.required();iconSize=f.required();label=f.required();iconOnly=f(!1);compact=f(!1);active=f(!1);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["tile-large-icon"]],inputs:{svgIcon:[1,"svgIcon"],iconSize:[1,"iconSize"],label:[1,"label"],iconOnly:[1,"iconOnly"],compact:[1,"compact"],active:[1,"active"]},decls:4,vars:11,consts:[["matRipple",""],["aria-hidden","false",3,"svgIcon"],[3,"class"],[1,"active-accent-bar"]],template:function(i,t){i&1&&(a(0,"div",0),b(1,"mat-icon",1),p(2,Ln,2,3,"p",2),p(3,Nn,1,0,"div",3),n()),i&2&&(ye(`${t.compact()?"icon-container-compact":"icon-container"}`),U("active-container-accent",t.active()),s(),Be("width",t.iconSize(),"px")("height",t.iconSize(),"px"),m("svgIcon",t.svgIcon()),s(),u(t.iconOnly()?-1:2),s(),u(t.active()?3:-1))},dependencies:[Y,F,ei,Ht,jt],styles:["[_nghost-%COMP%]{display:block;width:100%}.icon-container[_ngcontent-%COMP%]{display:block;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0);padding:10px 5px 15px;border-radius:7px;background-color:var(--mat-sys-surface-container);border-color:.2s ease;border:2px solid transparent}.icon-container[_ngcontent-%COMP%]:hover{border:2px solid var(--mat-sys-outline-variant);cursor:pointer}.icon-container[_ngcontent-%COMP%]:focus-visible{background-color:var(--mat-sys-surface-container-high);outline:-webkit-focus-ring-color auto 0px}.icon-container-compact[_ngcontent-%COMP%]{display:block;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;padding:5px;border-radius:7px;border:1px solid var(--mat-sys-outline-variant)}.icon-container-compact[_ngcontent-%COMP%]:hover{background-color:var(--mat-sys-inverse-on-surface);border:1px solid var(--mat-sys-primary);cursor:pointer}.icon-container-compact[_ngcontent-%COMP%]:focus-visible{background-color:var(--mat-sys-surface-bright);outline:-webkit-focus-ring-color auto 0px}.large-icon-tile-label[_ngcontent-%COMP%]{color:var(--mat-sys-outline);font-size:1.1em;margin:0}.compact[_ngcontent-%COMP%]{font-size:12px;margin:0}.active-container-accent[_ngcontent-%COMP%]{border:1px solid var(--mat-sys-tertiary);pointer-events:none;background-color:var(--mat-sys-on-tertiary)}.active-container-accent[_ngcontent-%COMP%] .large-icon-tile-label[_ngcontent-%COMP%]{font-weight:700}.active-accent-bar[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:0;width:7px;background:var(--mat-sys-tertiary);box-shadow:0 0 10px 0 var(--mat-sys-tertiary)}"]})}return o})();var Vl=(()=>{class o{isChromeOnMac;static DEBUG=!1;static _instanceCounter=0;_instanceId;swipeMinDistance=f(30);swipeMaxDuration=f(600);longPressMs=f(500);doubleTapInterval=f(300);tapSlop=f(20);pressMoveSlop=f(10);_swipeMinDistance=30;_swipeMaxDuration=600;_longPressMs=500;_doubleTapInterval=300;_tapSlop=20;_pressMoveSlop=10;swipeleft=Q();swiperight=Q();swipeup=Q();swipedown=Q();press=Q();doubletap=Q();zone=A(Ot);destroyRef=A(Ie);host=A(Xe);pointerId=null;startX=0;startY=0;startTime=0;tracking=!1;longPressTimer=null;pressFired=!1;cancelLongpressHandlers=[];lastTapTime=0;lastTapX=0;lastTapY=0;currentPointerType=null;lastTapUpTime=0;lastTapUpX=0;lastTapUpY=0;potentialDoubleTap=!1;constructor(){this.isChromeOnMac=(()=>{let e=navigator.userAgent,i=navigator.platform;return/Chrome\//.test(e)&&/Mac/.test(i)&&!/Edg\//.test(e)&&!/OPR\//.test(e)})(),this._instanceId=++o._instanceCounter,this.debug("GestureDirective instance created",{instanceId:this._instanceId}),this.zone.runOutsideAngular(()=>{let e=this.host.nativeElement;e.style.touchAction||(e.style.touchAction="none","webkitTouchCallout"in e.style&&(e.style.webkitTouchCallout="none")),e.addEventListener("pointerdown",this.onPointerDown,{passive:!1}),e.addEventListener("pointermove",this.onPointerMove,{passive:!0}),e.addEventListener("pointerup",this.onPointerUp,{passive:!0}),e.addEventListener("pointercancel",this.onPointerCancel,{passive:!0}),e.addEventListener("lostpointercapture",this.onPointerCancel,{passive:!0}),e.addEventListener("dblclick",this.onNativeDblClick,{passive:!0}),this.destroyRef.onDestroy(()=>{e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerCancel),e.removeEventListener("lostpointercapture",this.onPointerCancel),e.removeEventListener("dblclick",this.onNativeDblClick),this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.removeLongpressCancelListeners();try{this.pointerId!==null&&typeof e.releasePointerCapture=="function"&&e.releasePointerCapture(this.pointerId)}catch{}this.pointerId=null,this.tracking=!1})})}onNativeDblClick=e=>{let i=new CustomEvent("doubletap",{detail:{x:e.clientX,y:e.clientY,dt:0}});this.zone.run(()=>this.doubletap.emit(i)),this.lastTapTime=0};onPointerDown=e=>{if(this.debug("pointerdown",{x:e.clientX,y:e.clientY,pointerId:e.pointerId,pointerType:e.pointerType,sourceElement:e.target instanceof Element?e.target.outerHTML:String(e.target)}),this.pointerId!==null)return;switch(this.pointerId=e.pointerId,this.tracking=!0,this.pressFired=!1,this.currentPointerType=e.pointerType||null,e.pointerType){case"touch":this._swipeMinDistance=this.swipeMinDistance(),this._swipeMaxDuration=this.swipeMaxDuration(),this._longPressMs=this.longPressMs(),this._doubleTapInterval=this.doubleTapInterval(),this._tapSlop=this.tapSlop(),this._pressMoveSlop=this.pressMoveSlop();break;case"pen":this._swipeMinDistance=20,this._swipeMaxDuration=500,this._longPressMs=400,this._doubleTapInterval=250,this._tapSlop=10,this._pressMoveSlop=8;break;case"mouse":default:this._swipeMinDistance=15,this._swipeMaxDuration=400,this._longPressMs=350,this._doubleTapInterval=250,this._tapSlop=8,this._pressMoveSlop=6;break}let t=performance.now()-this.lastTapUpTime,l=Math.hypot(e.clientX-this.lastTapUpX,e.clientY-this.lastTapUpY);this.potentialDoubleTap=t<=this._doubleTapInterval&&l<=this._tapSlop,this.startX=e.clientX,this.startY=e.clientY,this.startTime=performance.now();try{e.target.setPointerCapture(e.pointerId)}catch{}this.longPressTimer&&(this.debug("longpress timer cleared on pointerdown"),window.clearTimeout(this.longPressTimer)),this.potentialDoubleTap||(this.addLongpressCancelListeners(),this.debug("longpress timer scheduled"),this.longPressTimer=window.setTimeout(()=>{if(this.debug("longpress timer fired",{tracking:this.tracking}),!this.tracking){this.debug("longpress cancelled: not tracking");return}let c=e.clientX-this.startX,g=e.clientY-this.startY;if(Math.abs(c)<=this._pressMoveSlop&&Math.abs(g)<=this._pressMoveSlop){this.debug("longpress recognized",{x:this.startX,y:this.startY}),this.pressFired=!0;let C=new CustomEvent("press",{detail:{x:this.startX,y:this.startY,center:{x:this.startX,y:this.startY}}});this.zone.run(()=>this.press.emit(C))}this.removeLongpressCancelListeners()},this._longPressMs))};onPointerMove=e=>{!this.tracking||e.pointerId!==this.pointerId||this.pressFired||this.longPressTimer&&(this.debug("longpress cancelled by pointermove"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null,this.removeLongpressCancelListeners())};onPointerUp=e=>{if(this.debug("pointerup",{x:e.clientX,y:e.clientY,pointerId:e.pointerId}),!this.tracking||e.pointerId!==this.pointerId)return;let i=performance.now(),t=i-this.startTime,l=e.clientX-this.startX,c=e.clientY-this.startY,g=Math.abs(l),C=Math.abs(c);if(this.longPressTimer&&(this.debug("longpress cancelled by pointerup"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.pressFired){this.debug("pointerup after longpress: not resetting gesture state");return}if(t<=this._swipeMaxDuration&&(g>=this._swipeMinDistance&&g>=C?(this.debug("swipe detected",{direction:l>0?"right":"left",dx:l,dy:c,duration:t}),this.zone.run(()=>{l>0?this.swiperight.emit(new CustomEvent("swiperight",{detail:{dx:l,dy:c,duration:t}})):this.swipeleft.emit(new CustomEvent("swipeleft",{detail:{dx:l,dy:c,duration:t}}))})):C>=this._swipeMinDistance&&C>g&&(this.debug("swipe detected",{direction:c>0?"down":"up",dx:l,dy:c,duration:t}),this.zone.run(()=>{c>0?this.swipedown.emit(new CustomEvent("swipedown",{detail:{dx:l,dy:c,duration:t}})):this.swipeup.emit(new CustomEvent("swipeup",{detail:{dx:l,dy:c,duration:t}}))}))),this.currentPointerType!=="mouse"&&g<=this._tapSlop&&C<=this._tapSlop&&t<this._longPressMs){let E=i,w=E-this.lastTapTime,k=Math.hypot(e.clientX-this.lastTapX,e.clientY-this.lastTapY);w<=this._doubleTapInterval&&k<=this._tapSlop?(this.zone.run(()=>this.doubletap.emit(new CustomEvent("doubletap",{detail:{x:e.clientX,y:e.clientY,dt:w}}))),this.lastTapTime=0,this.potentialDoubleTap=!1):(this.lastTapTime=E,this.lastTapX=e.clientX,this.lastTapY=e.clientY)}!this.pressFired&&g<=this._tapSlop&&C<=this._tapSlop&&t<this._longPressMs?(this.lastTapUpTime=i,this.lastTapUpX=e.clientX,this.lastTapUpY=e.clientY):this.potentialDoubleTap=!1,this.reset()};onPointerCancel=e=>{let i=this.host.nativeElement;this.debug("pointercancel",{pointerId:e.pointerId,pointerType:e.pointerType,event:e,documentActiveElement:document.activeElement,elementIsConnected:i.isConnected,elementVisibility:i.offsetParent!==null,hasPointerCapture:typeof i.hasPointerCapture=="function"?i.hasPointerCapture(e.pointerId):void 0,documentHidden:document.hidden});let t=e;if(this.isChromeOnMac&&e.pointerType==="mouse"&&e.pointerId===this.pointerId&&typeof t.buttons=="number"&&t.buttons!==0){this.debug("pointercancel ignored on Chrome/macOS: mouse button still pressed");return}e.pointerId===this.pointerId&&(this.longPressTimer&&(this.debug("longpress cancelled by pointercancel"),window.clearTimeout(this.longPressTimer),this.longPressTimer=null,this.removeLongpressCancelListeners()),this.reset())};addLongpressCancelListeners(){this.debug("addLongpressCancelListeners");let e=c=>{this.debug("longpress cancelled by event",c?.type),this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.removeLongpressCancelListeners()},i=this.host.nativeElement,t=document,l={capture:!0};this.cancelLongpressHandlers=[{type:"pointermove",handler:e,opts:l,targets:["el","doc"]},{type:"pointerleave",handler:e,opts:l,targets:["el","doc"]},{type:"pointerout",handler:e,opts:l,targets:["el","doc"]},{type:"lostpointercapture",handler:e,opts:l,targets:["el","doc"]},{type:"blur",handler:e,opts:l,targets:["window"]}];for(let c of this.cancelLongpressHandlers){let{type:g,handler:C,opts:E,targets:w}=c;w&&w.includes("el")&&i.addEventListener(g,C,E),w&&w.includes("doc")&&t.addEventListener(g,C,E),w&&w.includes("window")&&window.addEventListener(g,C,E)}}removeLongpressCancelListeners(){this.debug("removeLongpressCancelListeners");let e=this.host.nativeElement,i=document;for(let t of this.cancelLongpressHandlers){let{type:l,handler:c,opts:g,targets:C}=t;C&&C.includes("el")&&e.removeEventListener(l,c,g),C&&C.includes("doc")&&i.removeEventListener(l,c,g),C&&C.includes("window")&&window.removeEventListener(l,c,g)}this.cancelLongpressHandlers=[]}reset(){this.debug("reset gesture state");try{let e=this.host.nativeElement;this.pointerId!==null&&typeof e.releasePointerCapture=="function"&&e.releasePointerCapture(this.pointerId)}catch{}this.pointerId=null,this.tracking=!1,this.pressFired=!1,this.currentPointerType=null,this.removeLongpressCancelListeners()}debug(...e){this.constructor.DEBUG&&console.debug(`[GestureDirective][#${this._instanceId}]`,...e)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=Ke({type:o,selectors:[["","kipGestures",""]],inputs:{swipeMinDistance:[1,"swipeMinDistance"],swipeMaxDuration:[1,"swipeMaxDuration"],longPressMs:[1,"longPressMs"],doubleTapInterval:[1,"doubleTapInterval"],tapSlop:[1,"tapSlop"],pressMoveSlop:[1,"pressMoveSlop"]},outputs:{swipeleft:"swipeleft",swiperight:"swiperight",swipeup:"swipeup",swipedown:"swipedown",press:"press",doubletap:"doubletap"}})}return o})();function Rn(o,d){o&1&&Qi(0)}var en=(()=>{class o{data=A(ue);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["dialog-frame"]],decls:8,vars:3,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"dialog-content-padding"],[4,"ngComponentOutlet"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"h6",1),r(2),n(),a(3,"button",2)(4,"mat-icon"),r(5,"close"),n()()(),a(6,"mat-dialog-content",3),Pe(7,Rn,1,0,"ng-container",4),n()),i&2&&(s(2),x(t.data.title),s(),m("mat-dialog-close",!1),s(4),m("ngComponentOutlet",t.data.componentType))},dependencies:[F,ae,ge,fe,he,te,ee,Xi],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();function Wn(o,d){if(o&1&&(a(0,"button",4),r(1),n()),o&2){let e=h();m("mat-dialog-close",!0),s(),x(e.data.confirmBtnText)}}var tn=(()=>{class o{data=A(ue);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["dialog-confirmation"]],decls:12,vars:6,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"h5",1),r(2),n(),a(3,"button",2)(4,"mat-icon"),r(5,"close"),n()()(),a(6,"mat-dialog-content"),r(7),n(),a(8,"mat-dialog-actions",3)(9,"button",4),r(10),n(),p(11,Wn,2,2,"button",4),n()),i&2&&(s(2),x(t.data.title),s(),m("mat-dialog-close",!1),s(4),q(" ",t.data.message,`
3
3
  `),s(2),m("mat-dialog-close",!1),s(),x(t.data.cancelBtnText),s(),u(t.data.confirmBtnText?11:-1))},dependencies:[F,ae,ge,fe,We,he,te,Ae,ee],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return o})();function Un(o,d){if(o&1&&(a(0,"button",9),r(1),n()),o&2){let e=h(),i=oe(1);m("disabled",!i.valid),s(),x(e.data.confirmBtnText)}}var on=(()=>{class o{dialogRef=A(pe);data=A(ue);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["dialog-name"]],decls:19,vars:6,consts:[["name","ngForm"],["name","name",3,"ngSubmit"],[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"field-margin"],["matInput","","type","text","id","name","placeholder","Name","name","name","required","","cdkFocusInitial","",3,"ngModelChange","ngModel"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"]],template:function(i,t){if(i&1){let l=D();a(0,"form",1,0),v("ngSubmit",function(){return M(l),y(t.saveName())}),a(2,"div",2)(3,"h5",3),r(4),n(),a(5,"button",4)(6,"mat-icon"),r(7,"close"),n()()(),a(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),r(11,"Name"),n(),a(12,"input",6),Nt("ngModelChange",function(g){return M(l),Lt(t.data.name,g)||(t.data.name=g),y(g)}),n(),a(13,"mat-error"),r(14," A name is required "),n()()(),a(15,"mat-dialog-actions",7)(16,"button",8),r(17),n(),p(18,Un,2,2,"button",9),n()()}i&2&&(s(4),x(t.data.title),s(),m("mat-dialog-close",!1),s(7),Vt("ngModel",t.data.name),s(4),m("mat-dialog-close",!1),s(),x(t.data.cancelBtnText),s(),u(t.data.confirmBtnText?18:-1))},dependencies:[ae,ge,fe,We,he,Y,F,le,L,V,ft,Ce,K,te,Ae,ee,X,pt,j,O,Z,B,Xt,zt],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.field-margin[_ngcontent-%COMP%]{margin-left:15px;margin-bottom:15px}"]})}return o})();function qn(o,d){if(o&1&&(a(0,"mat-option",12),r(1),n()),o&2){let e=d.$implicit;m("value",Se(e.value)),s(),x(e.label)}}function Qn(o,d){if(o&1){let e=D();a(0,"button",21),v("click",function(){M(e);let t=h();return y(t.moveCtrlUp())}),a(1,"mat-icon"),r(2,"arrow_drop_up"),n()()}}function Yn(o,d){if(o&1){let e=D();a(0,"button",22),v("click",function(){M(e);let t=h();return y(t.moveCtrlDown())}),a(1,"mat-icon"),r(2,"arrow_drop_down"),n()()}}var nn=(()=>{class o{app=A(At);ctrlFormGroup=f.required();controlIndex=f(void 0);arrayLength=f(void 0);deleteCtrl=Q();moveUp=Q();moveDown=Q();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors}deleteControl(){let e={ctrlIndex:this.controlIndex(),pathID:this.ctrlFormGroup().get("pathID").value};this.deleteCtrl.emit(e)}moveCtrlUp(){this.moveUp.emit(this.controlIndex())}moveCtrlDown(){this.moveDown.emit(this.controlIndex())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["boolean-control-config"]],inputs:{ctrlFormGroup:[1,"ctrlFormGroup"],controlIndex:[1,"controlIndex"],arrayLength:[1,"arrayLength"]},outputs:{deleteCtrl:"deleteCtrl",moveUp:"moveUp",moveDown:"moveDown"},decls:36,vars:3,consts:[[1,"ctrl-grid","rounded-card","rounded-card-color",3,"formGroup"],[1,"controls","flex-container"],[1,"flex-label"],[1,"full-width"],["matInput","","type","string","placeholder","Enter a display label...","formControlName","ctrlLabel"],[1,"flex-settings"],[1,"settings"],["placeholder","Select Type...","formControlName","type","name","type","required",""],["value","1"],["value","2"],["value","3"],["placeholder","Select Color...","formControlName","color","name","color","required",""],[3,"value"],[1,"flex-full-width"],["formControlName","isNumeric"],[1,"actions"],[1,"flex-actions"],[1,"btn-grid"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down"],["mat-icon-button","","type","button","aria-label","Delete control",1,"delete",3,"click"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up",3,"click"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down",3,"click"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),r(5,"Label"),n(),b(6,"input",4),n()(),a(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),r(10,"Type"),n(),a(11,"mat-select",7)(12,"mat-option",8),r(13,"Toggle"),n(),a(14,"mat-option",9),r(15,"Push"),n(),a(16,"mat-option",10),r(17,"Indicator"),n()()()(),a(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),r(21,"Color"),n(),a(22,"mat-select",11),S(23,qn,2,3,"mat-option",12,G),n()()(),a(25,"div",13)(26,"mat-checkbox",14),r(27," Use numeric path "),n()()(),a(28,"div",15)(29,"div",16)(30,"div",17),p(31,Qn,3,0,"button",18),p(32,Yn,3,0,"button",19),a(33,"button",20),v("click",function(){return t.deleteControl()}),a(34,"mat-icon"),r(35,"delete"),n()()()()()()),i&2&&(m("formGroup",t.ctrlFormGroup()),s(23),T(t.colors),s(8),u(t.controlIndex()!==0?31:-1),s(),u(t.controlIndex()!==t.arrayLength()-1?32:-1))},dependencies:[X,j,O,Z,B,W,z,qe,L,V,K,se,J,ee,Ye,ve,Y,F],styles:['.ctrl-grid[_ngcontent-%COMP%]{display:grid;width:auto;height:auto;margin:0 0 10px;grid-template-columns:[col-start] calc(100% - 90px) [col1-end] 80px [col2-end];grid-template-areas:"controls actions";row-gap:0px;column-gap:10px;justify-items:center;align-items:center;justify-content:center;align-content:center;padding-top:20px}.controls[_ngcontent-%COMP%]{grid-area:controls;width:100%}.actions[_ngcontent-%COMP%]{grid-area:actions}.btn-grid[_ngcontent-%COMP%]{display:grid;width:80px;height:80px;margin:0;grid-template-columns:[col-start] 50% [col1-end] 50% [col2-end];grid-template-rows:[row-start] 50% [row1-end] 50% [row2-end];grid-template-areas:"up delete" "down delete";row-gap:0px;column-gap:0px;justify-items:center;align-items:center;justify-content:center;align-content:center}.up[_ngcontent-%COMP%]{grid-area:up}.down[_ngcontent-%COMP%]{grid-area:down}.delete[_ngcontent-%COMP%]{grid-area:delete}.flex-label[_ngcontent-%COMP%]{flex-grow:2;flex-shrink:2}.flex-settings[_ngcontent-%COMP%]{flex-grow:1;flex-shrink:1}.settings[_ngcontent-%COMP%]{min-width:100px}.flex-actions[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:0}.flex-full-width[_ngcontent-%COMP%]{width:100%}']})}return o})();function jn(o,d){if(o&1){let e=D();a(0,"boolean-control-config",4),v("moveUp",function(t){M(e);let l=h();return y(l.moveUp(t))})("moveDown",function(t){M(e);let l=h();return y(l.moveDown(t))})("deleteCtrl",function(t){M(e);let l=h();return y(l.deletePath(t))}),n()}if(o&2){let e=d.$implicit,i=d.$index,t=h();m("ctrlFormGroup",t.getFormGroup(e))("controlIndex",i)("arrayLength",t.arrayLength)}}var an=(()=>{class o{fb=A(gt);multiCtrlArray=f.required();addPath=Q();updatePath=Q();delPath=Q();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new Io({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(Dt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=Ji.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,H.required],type:["1",H.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let i={path:{description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:null,convertUnitTo:null,sampleTime:500},ctrlType:1};this.addPath.emit(i)}moveUp(e){let i=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,i,{emitEvent:!1})}moveDown(e){let i=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,i,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["boolean-multicontrol-options"]],inputs:{multiCtrlArray:[1,"multiCtrlArray"]},outputs:{addPath:"addPath",updatePath:"updatePath",delPath:"delPath"},decls:7,vars:1,consts:[[3,"formGroup"],["formArrayName","multiCtrlArray"],[1,"full-width",3,"ctrlFormGroup","controlIndex","arrayLength"],["type","button","mat-mini-fab","","color","primary","aria-label","Add control down in the list",1,"add-btn",3,"click"],[1,"full-width",3,"moveUp","moveDown","deleteCtrl","ctrlFormGroup","controlIndex","arrayLength"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),S(2,jn,1,3,"boolean-control-config",2,Bt),a(4,"button",3),v("click",function(){return t.addCtrlGroup()}),a(5,"mat-icon"),r(6,"add"),n()()()()),i&2&&(m("formGroup",t.multiFormGroup),s(2),T(t.multiCtrlArray().controls))},dependencies:[X,Z,W,z,Oo,nn,te,go,Y,F],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;padding-top:15px;padding-bottom:15px}.add-btn[_ngcontent-%COMP%]{margin-left:calc(50% - 20px)}"]})}return o})();function Hn(o,d){if(o&1&&(a(0,"mat-option",8),r(1),n()),o&2){let e=d.$implicit;m("value",Se(e.value)),s(),x(e.label)}}var rn=(()=>{class o{app=A(At);displayName=f.required();showLabel=f.required();convertUnitTo=f.required();datasetUUID=f.required();datasetAverageArray=f.required();showAverageData=f.required();trackAgainstAverage=f.required();showDatasetMinimumValueLine=f.required();showDatasetMaximumValueLine=f.required();showDatasetAverageValueLine=f.required();showDatasetAngleAverageValueLine=f.required();verticalChart=f.required();inverseYAxis=f.required();showTimeScale=f.required();showYScale=f.required();startScaleAtZero=f.required();yScaleSuggestedMin=f.required();yScaleSuggestedMax=f.required();enableMinMaxScaleLimit=f.required();yScaleMin=f.required();yScaleMax=f.required();numDecimal=f.required();color=f.required();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors,this.showAverageData()&&!this.showAverageData()?.value&&this.trackAgainstAverage().disable(),this.enableMinMaxScaleLimit()&&this.setValueScaleOptionsControls(this.enableMinMaxScaleLimit().value)}setValueScaleOptionsControls(e){e?(this.yScaleMin()?.enable(),this.yScaleMax()?.enable(),this.yScaleSuggestedMin()?.disable(),this.yScaleSuggestedMax()?.disable()):(this.yScaleMin()?.disable(),this.yScaleMax()?.disable(),this.yScaleSuggestedMin()?.enable(),this.yScaleSuggestedMax()?.enable())}setScaleControls(e){this.setValueScaleOptionsControls(e.value)}enableTrackAgainstMovingAverage(e){e.checked?this.trackAgainstAverage().enable():(this.trackAgainstAverage().setValue(e.checked),this.trackAgainstAverage().disable())}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["config-display-chart-options"]],inputs:{displayName:[1,"displayName"],showLabel:[1,"showLabel"],convertUnitTo:[1,"convertUnitTo"],datasetUUID:[1,"datasetUUID"],datasetAverageArray:[1,"datasetAverageArray"],showAverageData:[1,"showAverageData"],trackAgainstAverage:[1,"trackAgainstAverage"],showDatasetMinimumValueLine:[1,"showDatasetMinimumValueLine"],showDatasetMaximumValueLine:[1,"showDatasetMaximumValueLine"],showDatasetAverageValueLine:[1,"showDatasetAverageValueLine"],showDatasetAngleAverageValueLine:[1,"showDatasetAngleAverageValueLine"],verticalChart:[1,"verticalChart"],inverseYAxis:[1,"inverseYAxis"],showTimeScale:[1,"showTimeScale"],showYScale:[1,"showYScale"],startScaleAtZero:[1,"startScaleAtZero"],yScaleSuggestedMin:[1,"yScaleSuggestedMin"],yScaleSuggestedMax:[1,"yScaleSuggestedMax"],enableMinMaxScaleLimit:[1,"enableMinMaxScaleLimit"],yScaleMin:[1,"yScaleMin"],yScaleMax:[1,"yScaleMax"],numDecimal:[1,"numDecimal"],color:[1,"color"]},decls:84,vars:20,consts:[["minLine",""],[1,"tab-content"],[1,"chart-flex-container"],[1,"chart-panel-group"],[1,"full-width"],["matInput","","placeholder","Enter a label to display","name","displayName",3,"formControl"],["name","showLabel",1,"full-width",3,"formControl"],["placeholder","Select Color...","name","color","required","",3,"formControl"],[3,"value"],[1,"flex-item-rounded-card","rounded-card-color"],[2,"margin-left","10px"],["matInput","","type","number","min","0","max","5","placeholder","Enter or select number...","name","numDecimal","required","",3,"formControl"],["name","showAverageData",1,"full-width",2,"margin-top","10px",3,"change","formControl"],["name","trackAgainstAverage",1,"full-width",2,"margin-left","25px",3,"formControl"],["name","verticalChart",3,"formControl"],[1,"no-margin"],[1,"mat-caption"],["aria-label","Select an option","name","enableMinMaxScaleLimit",1,"chart-option-radio-group",3,"formControl"],[1,"chart-option-radio-button",3,"change","value"],[1,"chart-option-radio-button-config"],[1,"chart-option-radio-button-config-form-field"],["matInput","","type","number","name","yScaleSuggestedMin",3,"formControl"],["matInput","","type","number","name","yScaleSuggestedMax",3,"formControl"],[1,"chart-option-radio-button-config-item"],["matInput","","type","number","name","yScaleMin","required","",3,"formControl"],["matInput","","type","number","name","yScaleMax","required","",3,"formControl"],["name","showYScale",1,"full-width",3,"formControl"],["name","inverseYAxis",3,"formControl"],["name","showTimeScale",1,"full-width",3,"formControl"],["name","showDatasetMaximumValueLine",1,"full-width",3,"formControl"],["name","showDatasetAverageValueLine",1,"full-width",3,"formControl"],["name","showDatasetMinimumValueLine",1,"full-width",3,"formControl"]],template:function(i,t){if(i&1){let l=D();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),r(5,"Widget Label"),n(),b(6,"input",5),n()(),a(7,"div",3)(8,"mat-checkbox",6),r(9," Show Label "),n()()(),a(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),r(13,"Color"),n(),a(14,"mat-select",7),S(15,Hn,2,3,"mat-option",8,G),n()()(),a(17,"div",2)(18,"div",9)(19,"div")(20,"p"),r(21,"Series"),n(),a(22,"mat-form-field",10)(23,"mat-label"),r(24,"Value Decimal Places"),n(),b(25,"input",11),n(),a(26,"mat-checkbox",12),v("change",function(g){return M(l),y(t.enableTrackAgainstMovingAverage(g))}),r(27," Display Moving Average "),n(),a(28,"mat-checkbox",13),r(29," Track Against Moving Average "),n()(),a(30,"mat-checkbox",14),r(31," Vertical Data Graph "),n()(),a(32,"div",9)(33,"div")(34,"p",15),r(35,"Data Scale"),n(),a(36,"span",16),r(37,"(Default node is automatic scale)"),n(),a(38,"mat-radio-group",17)(39,"mat-radio-button",18),v("change",function(g){return M(l),y(t.setScaleControls(g))}),r(40,"Auto Scale"),n(),a(41,"div",19)(42,"mat-form-field",20)(43,"mat-label"),r(44,"Suggested Min"),n(),b(45,"input",21),n(),a(46,"mat-form-field",20)(47,"mat-label"),r(48,"Suggested Max"),n(),b(49,"input",22),n()(),a(50,"mat-radio-button",18),v("change",function(g){return M(l),y(t.setScaleControls(g))}),r(51," Fixed Scale "),n(),a(52,"div",19)(53,"div",23)(54,"mat-form-field",20)(55,"mat-label"),r(56,"Min"),n(),b(57,"input",24),n()(),a(58,"div",23)(59,"mat-form-field",20)(60,"mat-label"),r(61,"Max"),n(),b(62,"input",25),n()()()(),a(63,"mat-checkbox",26),r(64," Show Scale Ticks "),n(),a(65,"mat-checkbox",27),r(66," Inverse Scale "),n()()(),a(67,"div",9)(68,"div")(69,"p",15),r(70,"Time Scale"),n(),a(71,"mat-checkbox",28),r(72," Show Scale Ticks "),n()()(),a(73,"div",9)(74,"div")(75,"p",15),r(76,"Dataset"),n(),a(77,"mat-checkbox",29),r(78," Show Maximum Line "),n(),a(79,"mat-checkbox",30),r(80," Show Average Line "),n(),a(81,"mat-checkbox",31,0),r(83," Show Minimum Line "),n()()()()()}i&2&&(s(6),m("formControl",t.displayName()),s(2),m("formControl",t.showLabel()),s(6),m("formControl",t.color()),s(),T(t.colors),s(10),m("formControl",t.numDecimal()),s(),m("formControl",t.showAverageData()),s(2),m("formControl",t.trackAgainstAverage()),s(2),m("formControl",t.verticalChart()),s(8),m("formControl",t.enableMinMaxScaleLimit()),s(),m("value",!1),s(6),m("formControl",t.yScaleSuggestedMin()),s(4),m("formControl",t.yScaleSuggestedMax()),s(),m("value",!0),s(7),m("formControl",t.yScaleMin()),s(5),m("formControl",t.yScaleMax()),s(),m("formControl",t.showYScale()),s(2),m("formControl",t.inverseYAxis()),s(6),m("formControl",t.showTimeScale()),s(6),m("formControl",t.showDatasetMaximumValueLine()),s(2),m("formControl",t.showDatasetAverageValueLine()),s(2),m("formControl",t.showDatasetMinimumValueLine()))},dependencies:[ei,le,L,V,Ye,ve,Qe,se,J,wt,Ce,K,zo,Ho,Zo,W,j,Ue,O,B,ut,Kt,be],styles:[".chart-flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;margin:15px 0;gap:15px;align-items:stretch}.chart-panel-group[_ngcontent-%COMP%]{min-width:250px;flex-grow:1}.no-margin[_ngcontent-%COMP%]{margin:0}.chart-option-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;align-items:flex-start}.chart-option-radio-button[_ngcontent-%COMP%]{margin:0}.chart-option-radio-button-config[_ngcontent-%COMP%]{margin-left:35px;display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-start}.chart-option-radio-button-config-item[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:1;min-width:50px}.chart-option-radio-button-config-form-field[_ngcontent-%COMP%]{display:block;max-width:118px}"]})}return o})();var Zn=(o,d)=>d.uuid;function zn(o,d){if(o&1&&(a(0,"mat-option",4),r(1),n()),o&2){let e=d.$implicit;m("value",e.uuid),s(),q(" ",e.label," ")}}function Xn(o,d){if(o&1&&(a(0,"mat-option",4),r(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),q(" ",e.description," ")}}function Kn(o,d){if(o&1&&(a(0,"mat-optgroup",6),S(1,Xn,2,2,"mat-option",4,G),n()),o&2){let e=d.$implicit;m("label",e.group),s(),T(e.units)}}var ln=(()=>{class o{datasetService=A(Jt);units=A(Ct);datasetUUID=f.required();convertUnitTo=f.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().filter(i=>i.editable!==!1).sort();let e=this.datasetUUID();e.value&&this.setPathUnits(e.value)}setPathUnits(e){let i=this.datasetService.getDatasetConfig(e);return e&&i?(this.unitList=this.units.getConversionsForPath(i.path),this.convertUnitTo()?.enable(),!0):(this.unitList=this.units.getConversionsForPath(""),this.convertUnitTo()?.disable(),!1)}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"display-content","tab-content"],[1,"widget-options-grid"],[1,"options-grid-span2"],["placeholder","Select dataset...","name","datasetUUID","required","",3,"selectionChange","formControl"],[3,"value"],["placeholder","Select unit...","name","convertUnitTo","required","",3,"formControl"],[3,"label"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4,"Dataset"),n(),a(5,"mat-select",3),v("selectionChange",function(c){return t.datasetChanged(c)}),S(6,zn,2,2,"mat-option",4,Zn),n()(),a(8,"mat-form-field",2)(9,"mat-label"),r(10,"Display Format"),n(),a(11,"mat-select",5),S(12,Kn,3,1,"mat-optgroup",6,G),n()()()()),i&2&&(s(5),m("formControl",t.datasetUUID()),s(),T(t.availableDataSets),s(5),m("formControl",t.convertUnitTo()),s(),T(t.unitList.conversions))},dependencies:[le,L,V,Qe,se,J,bt,W,O,B,be],styles:[".display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}"]})}return o})();var sn=(()=>{class o{transform(e){return Object.keys(e)}static \u0275fac=function(i){return new(i||o)};static \u0275pipe=Li({name:"objectKeys",type:o,pure:!0})}return o})();var $n=["panel"],ea=["*"];function ta(o,d){if(o&1&&(Ai(0,"div",1,0),lt(2),pi()),o&2){let e=d.id,i=h();ye(i._classList),U("mat-mdc-autocomplete-visible",i.showPanel)("mat-mdc-autocomplete-hidden",!i.showPanel)("mat-autocomplete-panel-animations-enabled",!i._animationsDisabled)("mat-primary",i._color==="primary")("mat-accent",i._color==="accent")("mat-warn",i._color==="warn"),Yi("id",i.id),$("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}var Ci=class{source;option;constructor(d,e){this.source=d,this.option=e}},mn=new de("mat-autocomplete-default-options",{providedIn:"root",factory:ia});function ia(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var ni=(()=>{class o{_changeDetectorRef=A(ct);_elementRef=A(Xe);_defaults=A(mn);_animationsDisabled=Re();_activeOptionChanges=It.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new ce;opened=new ce;closed=new ce;optionActivated=new ce;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=A(xt).getId("mat-autocomplete-");inertGroups;constructor(){let e=A(lo);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Ao(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let i=new Ci(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["mat-autocomplete"]],contentQueries:function(i,t,l){if(i&1&&(Mt(l,J,5),Mt(l,Uo,5)),i&2){let c;Fe(c=Oe())&&(t.options=c),Fe(c=Oe())&&(t.optionGroups=c)}},viewQuery:function(i,t){if(i&1&&(yt(Oi,7),yt($n,5)),i&2){let l;Fe(l=Oe())&&(t.template=l.first),Fe(l=Oe())&&(t.panel=l.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",R],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",R],requireSelection:[2,"requireSelection","requireSelection",R],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",R],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",R]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[St([{provide:Wo,useExisting:o}])],ngContentSelectors:ea,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(i,t){i&1&&(rt(),Ri(0,ta,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}@keyframes _mat-autocomplete-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}.mat-autocomplete-panel-animations-enabled{animation:_mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1)}mat-autocomplete{display:none}
4
4
  `],encapsulation:2,changeDetection:0})}return o})();var oa={provide:Zt,useExisting:Ft(()=>kt),multi:!0};var An=new de("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let o=A(nt);return()=>gi(o)}});function na(o){let d=A(nt);return()=>gi(d)}var aa={provide:An,deps:[],useFactory:na},kt=(()=>{class o{_environmentInjector=A(Fi);_element=A(Xe);_injector=A(nt);_viewContainerRef=A(Vi);_zone=A(Ot);_changeDetectorRef=A(ct);_dir=A(Yt,{optional:!0});_formField=A(Vo,{optional:!0,host:!0});_viewportRuler=A(Co);_scrollStrategy=A(An);_renderer=A(Bi);_animationsDisabled=Re();_defaults=A(mn,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new _t;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=It.EMPTY;_breakpointObserver=A(qt);_handsetLandscapeSubscription=It.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new _t;_overlayPanelClass=mo(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Qt(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return tt(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ee(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ee(()=>this._overlayAttached)):di()).pipe(et(e=>e instanceof qo?e:null))}optionSelections=ki(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(ot(e),Pt(()=>tt(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(Pt(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new si(e=>{let i=l=>{let c=ro(l),g=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,C=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&c!==this._element.nativeElement&&!this._hasFocus()&&(!g||!g.contains(c))&&(!C||!C.contains(c))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(c)&&e.next(l)},t=[this._renderer.listen("document","click",i),this._renderer.listen("document","auxclick",i),this._renderer.listen("document","touchend",i)];return()=>{t.forEach(l=>l())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let i=e,t=i.keyCode,l=mt(i);if(t===27&&!l&&i.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!l)this.activeOption._selectViaInteraction(),this._resetActiveItem(),i.preventDefault();else if(this.autocomplete){let c=this.autocomplete._keyManager.activeItem,g=t===38||t===40;t===9||g&&!l&&this.panelOpen?this.autocomplete._keyManager.onKeydown(i):g&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(g||this.autocomplete._keyManager.activeItem!==c)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,t=i.value;if(i.type==="number"&&(t=t==""?null:parseFloat(t)),this._previousValue!==t){if(this._previousValue=t,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(t),!t)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let l=this.autocomplete.options?.find(c=>c.selected);if(l){let c=this._getDisplayValue(l.value);t!==c&&l.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let l=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(l)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return ao()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new si(t=>{Wi(()=>{t.next()},{injector:this._environmentInjector})}),i=this.autocomplete.options?.changes.pipe(Pi(()=>this._positionStrategy.reapplyLastPosition()),Ii(0))??di();return tt(e,i).pipe(Pt(()=>this._zone.run(()=>{let t=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),t!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),it(1)).subscribe(t=>this._setValueAndClose(t))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let i=this.autocomplete;return i&&i.displayWith?i.displayWith(e):e}_assignOptionValue(e){let i=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let i=this.autocomplete,t=e?e.source:this._pendingAutoselectedOption;t?(this._clearPreviousSelectedOption(t),this._assignOptionValue(t.value),this._onChange(t.value),i._emitSelectEvent(t),this._element.nativeElement.focus()):i.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,i){this.autocomplete?.options?.forEach(t=>{t!==e&&t.selected&&t.deselect(i)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let i=this.autocomplete.id;ui(this._trackedModal,"aria-owns",i)}}_attachOverlay(e){this.autocomplete;let i=this._overlayRef;i?(this._positionStrategy.setOrigin(this._getConnectedElement()),i.updateSize({width:this._getPanelWidth()})):(this._portal=new fo(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),i=To(this._injector,this._getOverlayConfig()),this._overlayRef=i,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&i&&i.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Te.HandsetLandscape).subscribe(l=>{l.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),i&&!i.hasAttached()&&(i.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let t=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&t!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!mt(e)||e.keyCode===38&&mt(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Mo({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=yo(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],t=this._aboveClass,l=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:t},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:t}],c;this.position==="above"?c=l:this.position==="below"?c=i:c=[...i,...l],e.withPositions(c)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let i=-1;for(let t=0;t<e.options.length;t++)if(!e.options.get(t).disabled){i=t;break}e._keyManager.setActiveItem(i)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let i=this.autocomplete,t=Qo(e,i.options,i.optionGroups);if(e===0&&t===1)i._setScrollTop(0);else if(i.panel){let l=i.options.toArray()[e];if(l){let c=l._getHostElement(),g=Yo(c.offsetTop,c.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(g)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=this.autocomplete.id;this._trackedModal&&Qt(this._trackedModal,"aria-owns",i),ui(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Qt(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(i){return new(i||o)};static \u0275dir=Ke({type:o,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(i,t){i&1&&v("focusin",function(){return t._handleFocus()})("blur",function(){return t._onTouched()})("input",function(c){return t._handleInput(c)})("keydown",function(c){return t._handleKeydown(c)})("click",function(){return t._handleClick()}),i&2&&$("autocomplete",t.autocompleteAttribute)("role",t.autocompleteDisabled?null:"combobox")("aria-autocomplete",t.autocompleteDisabled?null:"list")("aria-activedescendant",t.panelOpen&&t.activeOption?t.activeOption.id:null)("aria-expanded",t.autocompleteDisabled?null:t.panelOpen.toString())("aria-controls",t.autocompleteDisabled||!t.panelOpen||t.autocomplete==null?null:t.autocomplete.id)("aria-haspopup",t.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",R]},exportAs:["matAutocompleteTrigger"],features:[St([oa]),at]})}return o})(),pn=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=De({type:o});static \u0275inj=Ge({providers:[aa],imports:[xo,wt,ne,vo,wt,ne]})}return o})();var la=(o,d)=>d.path;function sa(o,d){o&1&&b(0,"i",22)}function da(o,d){o&1&&b(0,"i",23)}function ca(o,d){if(o&1&&(a(0,"mat-option",16),r(1),n()),o&2){let e=d.$implicit;m("value",e),s(),dt("",e.properties.quantity,": ",e.properties.display)}}function ma(o,d){if(o&1){let e=D();a(0,"div",5)(1,"mat-form-field",21)(2,"mat-label"),p(3,sa,1,0,"i",22)(4,da,1,0,"i",23),r(5," Filter"),n(),a(6,"mat-select",24,2),v("selectionChange",function(){M(e),h();let t=oe(11),l=h();return y(l.pathFormGroup().controls.path.setValue(t.value))}),a(8,"mat-option"),r(9,"All"),n(),S(10,ca,2,3,"mat-option",16,G),n()()()}if(o&2){let e=oe(7),i=h(2);s(3),u(e.value?4:3),s(3),m("formControl",i.pathSkUnitsFilterControl),s(4),T(i.pathSkUnitsFiltersList)}}function Aa(o,d){o&1&&(a(0,"span",8),r(1,"(optional)"),n())}function pa(o,d){o&1&&(a(0,"mat-hint"),r(1,"Leave blank to disable this path."),n())}function ua(o,d){if(o&1){let e=D();a(0,"button",25),v("click",function(){M(e);let t=h(2);return y(t.pathFormGroup().controls.path.setValue(""))}),a(1,"mat-icon"),r(2,"close"),n()()}}function ga(o,d){o&1&&(a(0,"mat-error"),r(1," Path is required. Please enter a valid Signal K path. "),n())}function fa(o,d){o&1&&(a(0,"mat-error"),r(1," Path not recognized. Please enter a path from the server's published list. "),n())}function ha(o,d){if(o&1&&(a(0,"span"),r(1),n(),b(2,"br"),a(3,"small",26),r(4),n()),o&2){let e=h().$implicit;s(),x(e.path),s(3),x(e.meta.description)}}function ba(o,d){if(o&1&&r(0),o&2){let e=h().$implicit;q(" ",e.path," ")}}function Ca(o,d){if(o&1&&(a(0,"mat-option",11),p(1,ha,5,2)(2,ba,1,1),n()),o&2){let e=d.$implicit;m("value",e.path),s(),u(e.meta!==void 0?1:2)}}function va(o,d){if(o&1&&(a(0,"mat-option",16),r(1),n()),o&2){let e=d.$implicit;m("value",e),s(),q(" ",e," ")}}function _a(o,d){if(o&1&&(a(0,"mat-option",16),r(1),n()),o&2){let e=d.$implicit;m("value",e.measure),s(),q(" ",e.description," ")}}function Ma(o,d){if(o&1&&(a(0,"mat-optgroup",28),S(1,_a,2,2,"mat-option",16,G),n()),o&2){let e=d.$implicit;m("label",e.group),s(),T(e.units)}}function ya(o,d){if(o&1&&(a(0,"mat-form-field",20)(1,"mat-label"),r(2,"Display Format"),n(),a(3,"mat-select",27),S(4,Ma,3,1,"mat-optgroup",28,G),n()()),o&2){let e=h(2);s(4),T(e.unitList.conversions)}}function Sa(o,d){if(o&1&&(a(0,"div",3)(1,"div",4)(2,"span"),r(3),n()(),p(4,ma,12,2,"div",5),a(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),r(8," Signal K Path "),p(9,Aa,2,0,"span",8),n(),b(10,"input",9,0),p(12,pa,2,0,"mat-hint"),p(13,ua,3,0,"button",10),p(14,ga,2,0,"mat-error")(15,fa,2,0,"mat-error"),a(16,"mat-autocomplete",null,1),S(18,Ca,3,2,"mat-option",11,la),Ve(20,"async"),n()()(),a(21,"div",12)(22,"div",13)(23,"mat-form-field",14)(24,"mat-label"),r(25,"Data Source"),n(),a(26,"mat-select",15),S(27,va,2,2,"mat-option",16,G),n()()(),a(29,"div",17)(30,"mat-form-field",14)(31,"mat-label"),r(32,"Sample Time"),n(),b(33,"input",18),n()(),a(34,"div",19),p(35,ya,6,0,"mat-form-field",20),n()()()),o&2){let e,i=oe(17),t=h();m("formGroup",t.pathFormGroup()),s(2),Be("color",t.pathFormGroup().enabled?"":"rgba(255,255,255,0.5)"),s(),x(t.pathFormGroup().value.description),s(),u(t.pathFormGroup().value.pathType==="number"&&t.showPathSkUnitsFilter?4:-1),s(5),u(t.pathFormGroup().value.pathRequired===!1?9:-1),s(),m("matAutocomplete",i),s(2),u(t.pathFormGroup().value.pathRequired===!1?12:-1),s(),u(t.pathFormGroup().value.path?13:-1),s(),u((e=t.pathFormGroup().controls.path.errors)!=null&&e.required?14:(e=t.pathFormGroup().controls.path.errors)!=null&&e.requireMatch?15:-1),s(4),T(Le(20,11,t.filteredPaths)),s(9),T(t.availableSources),s(8),u(t.pathFormGroup().value.pathType==="number"&&t.pathFormGroup().value.showConvertUnitTo===void 0||t.pathFormGroup().value.pathType==="number"&&t.pathFormGroup().value.showConvertUnitTo===!0?35:-1)}}function Ta(o){return d=>{let e=d.parent?.value?.pathRequired!==!1,i=d.value;return e?i===null||i===""?{requireMatch:!0}:o().some(c=>c.path===i)?null:{requireMatch:!0}:i===null||i===""||o().some(c=>c.path===i)?null:{requireMatch:!0}}}var un=(()=>{class o{_data=A(po);_units=A(Ct);_connection=A(eo);_destroyRef=A(Ie);pathFormGroup=f.required();multiCTRLArray=f.required();filterSelfPaths=f.required();availablePaths;filteredPaths=new Ei(null);availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new Po(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){let e=this.pathFormGroup();e.controls.path.disabled||(this.pathSkUnitsFiltersList=this._units.skBaseUnits.sort((i,t)=>i.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),e.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(i=>i.unit===this.pathFormGroup().value.pathSkUnitsFilter),{onlySelf:!0}),e.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=e.value.showPathSkUnitsFilter),e.controls.path.setValidators([Ta(()=>this.getPaths())]),e.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),e.controls.pathRequired&&e.controls.pathRequired.valueChanges.pipe(Ne(this._destroyRef)).subscribe(()=>{this.pathFormGroup().controls.path.updateValueAndValidity()}),e.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),e.controls.sampleTime||(e.addControl("sampleTime",new re("500",H.required)),e.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),e.controls.path.valueChanges.pipe(Gi(i=>i===""?mi(0):mi(350)),ot(""),et(i=>this.filterPaths(i||""))).pipe(Ne(this._destroyRef)).subscribe(()=>{let i=this.pathFormGroup();i.controls.path.pristine||(i.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(i.controls.path.value),this.updatePathMetaBoundDisplayScale(i.controls.path.value)):this.disablePathFields())}),e.controls.pathType.valueChanges.pipe(Ne(this._destroyRef)).subscribe(()=>{let i=this.pathFormGroup();i.value.showPathSkUnitsFilter?this.pathSkUnitsFilterControl.setValue(this.unitlessUnit):this.pathSkUnitsFilterControl.setValue(null),i.controls.path.updateValueAndValidity()}))}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup().controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup().controls.pathType.value,i=this.filterSelfPaths(),t=!1,l=this.pathFormGroup();if(l.value.supportsPut){let c=!1;this.multiCTRLArray().length>0&&(c=this.multiCTRLArray().some(g=>g.pathID===this.pathFormGroup().value.pathID&&g.type==="3")),c?t=!1:t=to(this._connection.skServerVersion,"2.12.0",">=")?l.value.supportsPut:!1}return this._data.getPathsAndMetaByType(e,t,i).sort()}filterPaths(e){let i=e.toLowerCase(),t=this.getPaths();if(this.pathSkUnitsFilterControl.value){let l=this.pathSkUnitsFilterControl.value.unit;t=t.filter(c=>{let g=!!c.meta&&!!c.meta.units,C=l==="unitless";return g&&c.meta.units===l||!g&&C})}t=t.filter(l=>l.path.toLowerCase().includes(i)),this.filteredPaths.next(t)}enableFormFields(e){let i=this._data.getPathObject(this.pathFormGroup().controls.path.value);if(i!=null){this.pathFormGroup().controls.sampleTime.enable({onlySelf:!1});let t=this.pathFormGroup();t.controls.pathType.value=="number"&&(this.unitList=this._units.getConversionsForPath(t.controls.path.value),e&&t.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),t.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(i.sources).length==1?(this.availableSources=["default"],e?t.controls.source.value!="default"&&t.controls.source.setValue("default",{onlySelf:!0}):t.controls.source.value!="default"&&t.controls.source.setValue("",{onlySelf:!0})):Object.keys(i.sources).length>1&&(this.availableSources=Object.keys(i.sources),t.controls.source.value=="default"&&t.controls.source.reset()),t.controls.source.enable({onlySelf:!1})}else this.disablePathFields()}disablePathFields(){this.pathFormGroup().controls.source.reset("",{onlySelf:!0}),this.pathFormGroup().controls.source.disable({onlySelf:!1}),this.pathFormGroup().controls.sampleTime.disable({onlySelf:!1});let e=this.pathFormGroup();e.controls.pathType.value=="number"&&(e.controls.convertUnitTo.reset("",{onlySelf:!0}),e.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){let i=this.pathFormGroup();if(!Object.prototype.hasOwnProperty.call(i.parent.parent.value,"displayName"))return;let t=this._data.getPathMeta(e);t?.displayName&&i.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){let i=this.pathFormGroup();if(!Object.prototype.hasOwnProperty.call(i.parent.parent.value,"displayScale"))return;let t=this._data.getPathMeta(e);if(t?.displayScale){let l=i.parent.parent.get("displayScale"),c=i.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&l.controls.lower.setValue(this._units.convertToUnit(c,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&l.controls.upper.setValue(this._units.convertToUnit(c,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&l.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&l.controls.power.setValue(t.displayScale.power)}}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["path-control-config"]],inputs:{pathFormGroup:[1,"pathFormGroup"],multiCTRLArray:[1,"multiCTRLArray"],filterSelfPaths:[1,"filterSelfPaths"]},features:[at],decls:1,vars:1,consts:[["pathInput",""],["pathAutoComplete","matAutocomplete"],["pathUnitsFilter",""],[1,"flex-container","rounded-card","rounded-card-color",3,"formGroup"],[1,"flex-field-100"],[1,"flex-field-fixed"],[1,"flex-field-to-100"],["floatLabel","auto","appearance","fill",1,"pathField"],[1,"optional-label"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path",3,"matAutocomplete"],["mat-icon-button","","matIconSuffix","","aria-label","Clear"],[2,"min-height","48px","line-height","1.15","height","auto","padding","8px 16px","white-space","normal",3,"value"],[1,"pathProperties"],[1,"sourceField"],["appearance","outline","floatLabel","always",1,"fields"],["placeholder","Select source","formControlName","source","required",""],[3,"value"],[1,"sampleTimeField"],["matInput","","type","number","placeholder","Sample time in milliseconds","formControlName","sampleTime","required",""],[1,"unitField"],[1,"fields"],["floatLabel","auto","appearance","fill",1,"filter-path"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-filter-circle-xmark"],["panelWidth","",3,"selectionChange","formControl"],["mat-icon-button","","matIconSuffix","","aria-label","Clear",3,"click"],[1,"pathMetaDescription"],["placeholder","Select unit","formControlName","convertUnitTo","required",""],[3,"label"]],template:function(i,t){i&1&&p(0,Sa,36,13,"div",3),i&2&&u(t.pathFormGroup().value.isPathConfigurable?0:-1)},dependencies:[X,j,Ue,O,Z,B,W,be,z,qe,L,V,K,pn,ni,J,bt,kt,ee,ht,ft,se,Y,F,Bo,Wt],styles:[".pathGroup[_ngcontent-%COMP%]{width:100%}.pathGroupFields[_ngcontent-%COMP%]{display:block;width:calc(100% - 5px)}.pathField[_ngcontent-%COMP%]{width:100%}.pathProperties[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;align-content:flex-start;gap:10px}.fields[_ngcontent-%COMP%]{width:100%}.sourceField[_ngcontent-%COMP%]{flex:3 1}.sampleTimeField[_ngcontent-%COMP%]{flex:1 3}.unitField[_ngcontent-%COMP%]{flex:3 1}"]})}return o})();function xa(o,d){if(o&1&&b(0,"path-control-config",6),o&2){let e=d.$implicit,i=h(2);m("pathFormGroup",e)("filterSelfPaths",i.filterSelfPaths().value)("multiCTRLArray",i.multiCTRLArray)}}function wa(o,d){if(o&1&&S(0,xa,1,3,"path-control-config",6,G),o&2){let e=h();T(e.pathsFormGroup.controls)}}function Ea(o,d){if(o&1&&b(0,"path-control-config",6),o&2){let e=d.$implicit,i=h(2);m("pathFormGroup",i.pathsFormGroup.get(e))("filterSelfPaths",i.filterSelfPaths().value)("multiCTRLArray",i.multiCTRLArray)}}function ka(o,d){if(o&1&&(S(0,Ea,1,3,"path-control-config",6,G),Ve(2,"objectKeys")),o&2){let e=h();T(Le(2,0,e.pathsFormGroup.controls))}}var gn=(()=>{class o{rootFormGroup=A(z);fb=A(gt);formGroupName=f.required();isArray=f.required();enableTimeout=f.required();dataTimeout=f.required();filterSelfPaths=f.required();addPathEvent=f(void 0);delPathEvent=f(void 0);updatePathEvent=f(void 0);pathsFormGroup;multiCTRLArray=[];ngOnInit(){this.isArray()?(this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.path.description],path:[e.path.path,H.required],pathID:[e.path.pathID],source:[e.path.source,H.required],pathType:[e.path.pathType],isPathConfigurable:[e.path.isPathConfigurable],showPathSkUnitsFilter:[e.path.showPathSkUnitsFilter],pathSkUnitsFilter:[e.path.pathSkUnitsFilter],convertUnitTo:[e.path.convertUnitTo],sampleTime:[e.path.sampleTime],supportsPut:[e.path.supportsPut]})),this.pathsFormGroup.updateValueAndValidity(),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}delPath(){this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}updatePath(e){this.multiCTRLArray=e}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue),e.delPathEvent&&!e.delPathEvent.firstChange&&this.delPath(),e.updatePathEvent&&!e.updatePathEvent.firstChange&&this.updatePath(e.updatePathEvent.currentValue)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=_({type:o,selectors:[["paths-options"]],inputs:{formGroupName:[1,"formGroupName"],isArray:[1,"isArray"],enableTimeout:[1,"enableTimeout"],dataTimeout:[1,"dataTimeout"],filterSelfPaths:[1,"filterSelfPaths"],addPathEvent:[1,"addPathEvent"],delPathEvent:[1,"delPathEvent"],updatePathEvent:[1,"updatePathEvent"]},features:[at],decls:14,vars:5,consts:[[1,"widget-options-grid"],["name","enableTimeout",3,"formControl"],["type","number","matNativeControl","","placeholder","Time in seconds...","name","dataTimeout","min","2","required","",3,"formControl"],["matTextSuffix",""],[3,"formGroup"],["name","filterSelfPaths",3,"formControl"],[2,"display","block",3,"pathFormGroup","filterSelfPaths","multiCTRLArray"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"mat-checkbox",1),r(2," Enable Widget Data TTL "),n(),a(3,"mat-form-field")(4,"mat-label"),r(5,"TTL Timeout For Paths"),n(),b(6,"input",2),a(7,"span",3),r(8,"Seconds"),n()()(),Ui(9,4),p(10,wa,2,0)(11,ka,3,2),qi(),a(12,"mat-checkbox",5),r(13,` Restrict to own vessel