@mxtommy/kip 3.1.1 → 3.1.2
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/public/{chunk-6XNAATXC.js → chunk-3LNPFVVA.js} +1 -1
- package/public/{chunk-P2NQVKWN.js → chunk-4QNBKJKZ.js} +1 -1
- package/public/{chunk-CU7EEHLK.js → chunk-D3PK2XF7.js} +1 -1
- package/public/{chunk-5DXBSI3U.js → chunk-HGS2WCVS.js} +1 -1
- package/public/{chunk-BHXOUGEH.js → chunk-IEGIGIOP.js} +1 -1
- package/public/{chunk-G2RDI5CW.js → chunk-QDYZME6G.js} +1 -1
- package/public/{chunk-S2QRZEAO.js → chunk-ZSEU5VAO.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-AU7ZMZ6I.js → main-T5A5I63K.js} +3 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Ve,d as Xe,e as Je,f as Qe,g as et,h as tt}from"./chunk-CU7EEHLK.js";import"./chunk-YQQFIIO5.js";import{b as it,c as st,e as nt,f as rt}from"./chunk-WJMKCVFQ.js";import"./chunk-MCACXEYY.js";import"./chunk-FMVUDX5R.js";import"./chunk-FFCTE2U5.js";import{a as ot}from"./chunk-6NIOBZZL.js";import"./chunk-7OTNT2GF.js";import{o as G,p as $}from"./chunk-VIHODUV4.js";import"./chunk-FCC7GNHD.js";import"./chunk-SGYCFQGT.js";import"./chunk-P2NQVKWN.js";import"./chunk-RCSPPHLA.js";import"./chunk-AHFD2AA5.js";import{$b as ne,$c as M,Bb as Me,Da as Te,Dc as b,Ea as T,Ec as re,Fa as k,Hb as R,I as Ee,Id as Ge,J as H,Jb as se,Jd as $e,Ka as ke,Kd as V,Ke,Md as L,Me as Ye,Nd as S,Oa as D,Oc as oe,Pa as z,Q as Re,Qd as de,Sd as P,Ta as ee,Va as te,Vd as We,Xc as ae,Xd as Ue,Yb as Le,Zb as Ne,ad as Be,de as Ze,eb as Oe,fa as J,fd as le,g as x,ga as Ce,gc as Fe,ha as I,hc as Ae,ia as Ie,ic as _,j as X,jc as v,kc as He,ke as ce,m as p,o as Pe,oa as Q,oc as ze,q as ye,qc as y,ra as E,rc as O,ua as c,ub as B,we as je,xb as ie,ye as qe,z as xe}from"./chunk-JIJMSRKJ.js";function Pt(r){let t=r.cloneNode(!0),e=t.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();t.removeAttribute("id");for(let s=0;s<e.length;s++)e[s].removeAttribute("id");return i==="canvas"?dt(r,t):(i==="input"||i==="select"||i==="textarea")&<(r,t),at("canvas",r,t,dt),at("input, textarea, select",r,t,lt),t}function at(r,t,e,i){let s=t.querySelectorAll(r);if(s.length){let n=e.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var Ht=0;function lt(r,t){t.type!=="file"&&(t.value=r.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${Ht++}`)}function dt(r,t){let e=t.getContext("2d");if(e)try{e.drawImage(r,0,0)}catch{}}function De(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 _e(r,t,e){let{top:i,bottom:s,left:n,right:o}=r;return e>=i&&e<=s&&t>=n&&t<=o}function A(r,t,e){r.top+=t,r.bottom=r.top+r.height,r.left+=e,r.right=r.left+r.width}function ct(r,t,e,i){let{top:s,right:n,bottom:o,left:a,width:l,height:d}=r,h=l*t,u=d*t;return i>s-u&&i<o+u&&e>a-h&&e<n+h}var W=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:De(e)})})}handleScroll(t){let e=L(t),i=this.positions.get(e);if(!i)return null;let s=i.scrollPosition,n,o;if(e===this._document){let d=this.getViewportScrollPosition();n=d.top,o=d.left}else n=e.scrollTop,o=e.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((d,h)=>{d.clientRect&&e!==h&&e.contains(h)&&A(d.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function yt(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(s=>i.appendChild(s)),i}function ve(r,t,e){for(let i in t)if(t.hasOwnProperty(i)){let s=t[i];s?r.setProperty(i,s,e?.has(i)?"important":""):r.removeProperty(i)}return r}function C(r,t){let e=t?"":"none";ve(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 ht(r,t,e){ve(r.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function U(r,t){return t&&t!="none"?r+" "+t:r}function pt(r,t){r.style.width=`${t.width}px`,r.style.height=`${t.height}px`,r.style.transform=Z(t.left,t.top)}function Z(r,t){return`translate3d(${Math.round(r)}px, ${Math.round(t)}px, 0)`}function _t(r){let t=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*t}function zt(r){let t=getComputedStyle(r),e=he(t,"transition-property"),i=e.find(a=>a==="transform"||a==="all");if(!i)return 0;let s=e.indexOf(i),n=he(t,"transition-duration"),o=he(t,"transition-delay");return _t(n[s])+_t(o[s])}function he(r,t){return r.getPropertyValue(t).split(",").map(i=>i.trim())}var Bt=new Set(["position"]),ge=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,i,s,n,o,a,l,d,h){this._document=t,this._rootElement=e,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,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),gt(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 zt(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,s;if(i&&t){let n=t.matchSize?this._initialDomRect:null,o=t.viewContainer.createEmbeddedView(i,t.context);o.detectChanges(),s=yt(o,this._document),this._previewEmbeddedView=o,t.matchSize?pt(s,n):s.style.transform=Z(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Pt(this._rootElement),pt(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return ve(s.style,{"pointer-events":"none",margin:gt(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Bt),C(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(n=>s.classList.add(n)):s.classList.add(e)),s}};function gt(r){return"showPopover"in r}var Vt={passive:!0},ut={passive:!1},Gt={passive:!1,capture:!0},$t=800,mt=new Set(["position"]),ue=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=te(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new p;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=x.EMPTY;_pointerUpSubscription=x.EMPTY;_scrollSubscription=x.EMPTY;_resizeSubscription=x.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=>C(e,t)))}_disabled=!1;beforeStarted=new p;started=new p;released=new p;ended=new p;entered=new p;exited=new p;dropped=new p;moved=this._moveEvents;data;constrainPosition;constructor(t,e,i,s,n,o,a){this._config=e,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new W(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=>P(i)),this._handles.forEach(i=>C(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=P(t);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[S(this._renderer,e,"mousedown",this._pointerDown,ut),S(this._renderer,e,"touchstart",this._pointerDown,Vt),S(this._renderer,e,"dragstart",this._nativeDragStart,ut)]),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?P(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._anchor?.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._anchor=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}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),C(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),C(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._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=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 s=Math.abs(e.x-this._pickupPositionOnPage.x),n=Math.abs(e.y-this._pickupPositionOnPage.y);if(s+n>=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 s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.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){N(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=S(this._renderer,e,"selectstart",Wt,Gt)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");n.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new ge(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(n,e)),ht(s,!1,mt),this._document.body.appendChild(n.replaceChild(o,s)),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(),s=N(e),n=!s&&e.button!==0,o=this._rootElement,a=L(e),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+$t>Date.now(),d=s?$e(e):Ge(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),i||n||l||d)return;if(this._handles.length){let w=o.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.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(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=De(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){ht(this._rootElement,!0,mt),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),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),s=this._getPointerPositionOnPage(t),n=this._getDragDistance(s),o=e._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=n,this._dropContainer.enter(this,t,e,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),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 s=a=>{(!a||this._preview&&L(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(n))},n=setTimeout(s,e*1.5),o=this._preview.addEventListener("transitionend",s)}))}_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=yt(this._placeholderRef,this._document)):i=Pt(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e,i){let s=e===this._rootElement?null:e,n=s?s.getBoundingClientRect():t,o=N(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,d=o.pageY-n.top-a.top;return{x:n.left-t.left+l,y:n.top-t.top+d}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),i=N(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,s=i.pageX-e.left,n=i.pageY-e.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?s=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:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+o,u=a.bottom-(d-o),w=a.left+n,K=a.right-(l-n);i=ft(i,w,K),s=ft(s,h,u)}return{x:i,y:s}}_updatePointerDirectionDelta(t){let{x:e,y:i}=t,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=e>n.x?1:-1,n.x=e),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,C(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let i=1/this.scale,s=Z(t*i,e*i),n=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=n.transform&&n.transform!="none"?n.transform:""),n.transform=U(s,this._initialTransform)}_applyPreviewTransform(t,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=Z(t,e);this._preview.setTransform(U(s,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(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(t+=n),o>0&&(t-=o)):t=0,s.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:N(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let i=L(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&A(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=V(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let i=this._previewContainer||"global";if(i==="parent")return t;if(i==="global"){let s=this._document;return e||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return P(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)))}};function ft(r,t,e){return Math.max(t,Math.min(e,r))}function N(r){return r.type[0]==="t"}function Wt(r){r.preventDefault()}function q(r,t,e){let i=Dt(t,r.length-1),s=Dt(e,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function Dt(r,t){return Math.max(0,Math.min(t,r))}var j=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,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation==="horizontal",l=n.findIndex(m=>m.drag===t),d=n[o],h=n[l].clientRect,u=d.clientRect,w=l>o?1:-1,K=this._getItemOffsetPx(h,u,w),Nt=this._getSiblingOffsetPx(l,n,w),Ft=n.slice();return q(n,l,o),n.forEach((m,At)=>{if(Ft[At]===m)return;let be=m.drag===t,Y=be?K:Nt,we=be?t.getPlaceholderElement():m.drag.getRootElement();m.offset+=Y;let Se=Math.round(m.offset*(1/m.drag.scale));a?(we.style.transform=U(`translate3d(${Se}px, 0, 0)`,m.initialTransform),A(m.clientRect,0,Y)):(we.style.transform=U(`translate3d(0, ${Se}px, 0)`,m.initialTransform),A(m.clientRect,Y,0))}),this._previousSwap.overlaps=_e(u,e,i),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(t,e,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(t,e,i):s,o=this._activeDraggables,a=o.indexOf(t),l=t.getPlaceholderElement(),d=o[n];if(d===t&&(d=o[n+1]),!d&&(n==null||n===-1||n<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(n,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(s=>s.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.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{A(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:De(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(t,e,i){let s=this.orientation==="horizontal",n=s?e.left-t.left:e.top-t.top;return i===-1&&(n+=s?e.width-t.width:e.height-t.height),n}_getSiblingOffsetPx(t,e,i){let s=this.orientation==="horizontal",n=e[t].clientRect,o=e[t+i*-1],a=n[s?"width":"height"]*i;if(o){let l=s?"left":"top",d=s?"right":"bottom";i===-1?a-=o.clientRect[l]-n[d]:a+=n[l]-o.clientRect[d]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?t>=o.right:e>=o.bottom}else{let o=i[0].clientRect;return s?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,i,s){let n=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(s){let d=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return n?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}},me=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 s=e[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(t)}sort(t,e,i,s){let n=this._getItemIndexFromPointerPosition(t,e,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===t)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(t),d=t.getPlaceholderElement(),h=a.getRootElement();n>l?h.after(d):h.before(d),q(this._activeItems,l,n);let u=this._getRootNode().elementFromPoint(e,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=h===u||h.contains(u),{previousIndex:l,currentIndex:n}}enter(t,e,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(t,e,i):s;n===-1&&(n=this._getClosestItemIndexToPointer(t,e,i));let o=this._activeItems[n],a=this._activeItems.indexOf(t);a>-1&&this._activeItems.splice(a,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(n,0,t),o.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[s,n]=this._relatedNodes[i];s.parentNode===t&&s.nextSibling!==n&&(n===null?t.appendChild(s):n.parentNode===t&&t.insertBefore(s,n))}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)}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 s=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,t)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=V(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 s=1/0,n=-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<s&&(s=h,n=o)}}return n}},vt=.05,xt=.05,f=function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r}(f||{}),g=function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r}(g||{}),fe=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new p;entered=new p;exited=new p;dropped=new p;sorted=new p;receivingStarted=new p;receivingStopped=new p;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=x.EMPTY;_verticalScrollDirection=f.NONE;_horizontalScrollDirection=g.NONE;_scrollNode;_stopScrollTimers=new p;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,i,s,n){this._dragDropRegistry=e,this._ngZone=s,this._viewportRuler=n;let o=this.element=P(t);this._document=i,this.withOrientation("vertical").withElementContainer(o),e.registerDropContainer(this),this._parentPositions=new W(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,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,s),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,s,n,o,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,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(s=>s.isDragging()).every(s=>t.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof j&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new me(this._document,this._dragDropRegistry);else{let e=new j(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=P(this.element),i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(t);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,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)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,s){if(this.sortingDisabled||!this._domRect||!ct(this._domRect,vt,e,i))return;let n=this._sortStrategy.sort(t,e,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,s=f.NONE,n=g.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||ct(o.clientRect,vt,t,e)&&([s,n]=Ut(a,o.clientRect,this._direction,t,e),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=Et(l,e),n=Rt(l,t),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&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(),Ee(0,ye).pipe(I(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===f.UP?t.scrollBy(0,-e):this._verticalScrollDirection===f.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===g.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===g.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&_e(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(s=>s._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._domRect||!_e(this._domRect,e,i)||!this.enterPredicate(t,this))return!1;let s=this._getShadowRoot().elementFromPoint(e,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(t,e){let i=this._activeSiblings;!i.has(t)&&e.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-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=V(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 Et(r,t){let{top:e,bottom:i,height:s}=r,n=s*xt;return t>=e-n&&t<=e+n?f.UP:t>=i-n&&t<=i+n?f.DOWN:f.NONE}function Rt(r,t){let{left:e,right:i,width:s}=r,n=s*xt;return t>=e-n&&t<=e+n?g.LEFT:t>=i-n&&t<=i+n?g.RIGHT:g.NONE}function Ut(r,t,e,i,s){let n=Et(t,s),o=Rt(t,i),a=f.NONE,l=g.NONE;if(n){let d=r.scrollTop;n===f.UP?d>0&&(a=f.UP):r.scrollHeight-d>r.clientHeight&&(a=f.DOWN)}if(o){let d=r.scrollLeft;e==="rtl"?o===g.RIGHT?d<0&&(l=g.RIGHT):r.scrollWidth+d>r.clientWidth&&(l=g.LEFT):o===g.LEFT?d>0&&(l=g.LEFT):r.scrollWidth-d>r.clientWidth&&(l=g.RIGHT)}return[a,l]}var F={capture:!0},pe={passive:!1,capture:!0},Zt=(()=>{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,s){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
1
|
+
import{a as Ve,d as Xe,e as Je,f as Qe,g as et,h as tt}from"./chunk-D3PK2XF7.js";import"./chunk-YQQFIIO5.js";import{b as it,c as st,e as nt,f as rt}from"./chunk-WJMKCVFQ.js";import"./chunk-MCACXEYY.js";import"./chunk-FMVUDX5R.js";import"./chunk-FFCTE2U5.js";import{a as ot}from"./chunk-6NIOBZZL.js";import"./chunk-7OTNT2GF.js";import{o as G,p as $}from"./chunk-VIHODUV4.js";import"./chunk-FCC7GNHD.js";import"./chunk-SGYCFQGT.js";import"./chunk-4QNBKJKZ.js";import"./chunk-RCSPPHLA.js";import"./chunk-AHFD2AA5.js";import{$b as ne,$c as M,Bb as Me,Da as Te,Dc as b,Ea as T,Ec as re,Fa as k,Hb as R,I as Ee,Id as Ge,J as H,Jb as se,Jd as $e,Ka as ke,Kd as V,Ke,Md as L,Me as Ye,Nd as S,Oa as D,Oc as oe,Pa as z,Q as Re,Qd as de,Sd as P,Ta as ee,Va as te,Vd as We,Xc as ae,Xd as Ue,Yb as Le,Zb as Ne,ad as Be,de as Ze,eb as Oe,fa as J,fd as le,g as x,ga as Ce,gc as Fe,ha as I,hc as Ae,ia as Ie,ic as _,j as X,jc as v,kc as He,ke as ce,m as p,o as Pe,oa as Q,oc as ze,q as ye,qc as y,ra as E,rc as O,ua as c,ub as B,we as je,xb as ie,ye as qe,z as xe}from"./chunk-JIJMSRKJ.js";function Pt(r){let t=r.cloneNode(!0),e=t.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();t.removeAttribute("id");for(let s=0;s<e.length;s++)e[s].removeAttribute("id");return i==="canvas"?dt(r,t):(i==="input"||i==="select"||i==="textarea")&<(r,t),at("canvas",r,t,dt),at("input, textarea, select",r,t,lt),t}function at(r,t,e,i){let s=t.querySelectorAll(r);if(s.length){let n=e.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var Ht=0;function lt(r,t){t.type!=="file"&&(t.value=r.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${Ht++}`)}function dt(r,t){let e=t.getContext("2d");if(e)try{e.drawImage(r,0,0)}catch{}}function De(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 _e(r,t,e){let{top:i,bottom:s,left:n,right:o}=r;return e>=i&&e<=s&&t>=n&&t<=o}function A(r,t,e){r.top+=t,r.bottom=r.top+r.height,r.left+=e,r.right=r.left+r.width}function ct(r,t,e,i){let{top:s,right:n,bottom:o,left:a,width:l,height:d}=r,h=l*t,u=d*t;return i>s-u&&i<o+u&&e>a-h&&e<n+h}var W=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:De(e)})})}handleScroll(t){let e=L(t),i=this.positions.get(e);if(!i)return null;let s=i.scrollPosition,n,o;if(e===this._document){let d=this.getViewportScrollPosition();n=d.top,o=d.left}else n=e.scrollTop,o=e.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((d,h)=>{d.clientRect&&e!==h&&e.contains(h)&&A(d.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function yt(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(s=>i.appendChild(s)),i}function ve(r,t,e){for(let i in t)if(t.hasOwnProperty(i)){let s=t[i];s?r.setProperty(i,s,e?.has(i)?"important":""):r.removeProperty(i)}return r}function C(r,t){let e=t?"":"none";ve(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 ht(r,t,e){ve(r.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function U(r,t){return t&&t!="none"?r+" "+t:r}function pt(r,t){r.style.width=`${t.width}px`,r.style.height=`${t.height}px`,r.style.transform=Z(t.left,t.top)}function Z(r,t){return`translate3d(${Math.round(r)}px, ${Math.round(t)}px, 0)`}function _t(r){let t=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*t}function zt(r){let t=getComputedStyle(r),e=he(t,"transition-property"),i=e.find(a=>a==="transform"||a==="all");if(!i)return 0;let s=e.indexOf(i),n=he(t,"transition-duration"),o=he(t,"transition-delay");return _t(n[s])+_t(o[s])}function he(r,t){return r.getPropertyValue(t).split(",").map(i=>i.trim())}var Bt=new Set(["position"]),ge=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,i,s,n,o,a,l,d,h){this._document=t,this._rootElement=e,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,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),gt(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 zt(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,s;if(i&&t){let n=t.matchSize?this._initialDomRect:null,o=t.viewContainer.createEmbeddedView(i,t.context);o.detectChanges(),s=yt(o,this._document),this._previewEmbeddedView=o,t.matchSize?pt(s,n):s.style.transform=Z(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Pt(this._rootElement),pt(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return ve(s.style,{"pointer-events":"none",margin:gt(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Bt),C(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(n=>s.classList.add(n)):s.classList.add(e)),s}};function gt(r){return"showPopover"in r}var Vt={passive:!0},ut={passive:!1},Gt={passive:!1,capture:!0},$t=800,mt=new Set(["position"]),ue=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=te(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new p;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=x.EMPTY;_pointerUpSubscription=x.EMPTY;_scrollSubscription=x.EMPTY;_resizeSubscription=x.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=>C(e,t)))}_disabled=!1;beforeStarted=new p;started=new p;released=new p;ended=new p;entered=new p;exited=new p;dropped=new p;moved=this._moveEvents;data;constrainPosition;constructor(t,e,i,s,n,o,a){this._config=e,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new W(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=>P(i)),this._handles.forEach(i=>C(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=P(t);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[S(this._renderer,e,"mousedown",this._pointerDown,ut),S(this._renderer,e,"touchstart",this._pointerDown,Vt),S(this._renderer,e,"dragstart",this._nativeDragStart,ut)]),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?P(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._anchor?.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._anchor=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}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),C(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),C(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._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=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 s=Math.abs(e.x-this._pickupPositionOnPage.x),n=Math.abs(e.y-this._pickupPositionOnPage.y);if(s+n>=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 s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.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){N(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=S(this._renderer,e,"selectstart",Wt,Gt)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");n.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new ge(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(n,e)),ht(s,!1,mt),this._document.body.appendChild(n.replaceChild(o,s)),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(),s=N(e),n=!s&&e.button!==0,o=this._rootElement,a=L(e),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+$t>Date.now(),d=s?$e(e):Ge(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),i||n||l||d)return;if(this._handles.length){let w=o.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.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(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=De(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){ht(this._rootElement,!0,mt),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),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),s=this._getPointerPositionOnPage(t),n=this._getDragDistance(s),o=e._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=n,this._dropContainer.enter(this,t,e,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),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 s=a=>{(!a||this._preview&&L(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(n))},n=setTimeout(s,e*1.5),o=this._preview.addEventListener("transitionend",s)}))}_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=yt(this._placeholderRef,this._document)):i=Pt(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e,i){let s=e===this._rootElement?null:e,n=s?s.getBoundingClientRect():t,o=N(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,d=o.pageY-n.top-a.top;return{x:n.left-t.left+l,y:n.top-t.top+d}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),i=N(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,s=i.pageX-e.left,n=i.pageY-e.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?s=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:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+o,u=a.bottom-(d-o),w=a.left+n,K=a.right-(l-n);i=ft(i,w,K),s=ft(s,h,u)}return{x:i,y:s}}_updatePointerDirectionDelta(t){let{x:e,y:i}=t,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=e>n.x?1:-1,n.x=e),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,C(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let i=1/this.scale,s=Z(t*i,e*i),n=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=n.transform&&n.transform!="none"?n.transform:""),n.transform=U(s,this._initialTransform)}_applyPreviewTransform(t,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=Z(t,e);this._preview.setTransform(U(s,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(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(t+=n),o>0&&(t-=o)):t=0,s.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:N(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let i=L(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&A(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=V(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let i=this._previewContainer||"global";if(i==="parent")return t;if(i==="global"){let s=this._document;return e||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return P(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)))}};function ft(r,t,e){return Math.max(t,Math.min(e,r))}function N(r){return r.type[0]==="t"}function Wt(r){r.preventDefault()}function q(r,t,e){let i=Dt(t,r.length-1),s=Dt(e,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function Dt(r,t){return Math.max(0,Math.min(t,r))}var j=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,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation==="horizontal",l=n.findIndex(m=>m.drag===t),d=n[o],h=n[l].clientRect,u=d.clientRect,w=l>o?1:-1,K=this._getItemOffsetPx(h,u,w),Nt=this._getSiblingOffsetPx(l,n,w),Ft=n.slice();return q(n,l,o),n.forEach((m,At)=>{if(Ft[At]===m)return;let be=m.drag===t,Y=be?K:Nt,we=be?t.getPlaceholderElement():m.drag.getRootElement();m.offset+=Y;let Se=Math.round(m.offset*(1/m.drag.scale));a?(we.style.transform=U(`translate3d(${Se}px, 0, 0)`,m.initialTransform),A(m.clientRect,0,Y)):(we.style.transform=U(`translate3d(0, ${Se}px, 0)`,m.initialTransform),A(m.clientRect,Y,0))}),this._previousSwap.overlaps=_e(u,e,i),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(t,e,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(t,e,i):s,o=this._activeDraggables,a=o.indexOf(t),l=t.getPlaceholderElement(),d=o[n];if(d===t&&(d=o[n+1]),!d&&(n==null||n===-1||n<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(n,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(s=>s.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.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{A(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:De(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(t,e,i){let s=this.orientation==="horizontal",n=s?e.left-t.left:e.top-t.top;return i===-1&&(n+=s?e.width-t.width:e.height-t.height),n}_getSiblingOffsetPx(t,e,i){let s=this.orientation==="horizontal",n=e[t].clientRect,o=e[t+i*-1],a=n[s?"width":"height"]*i;if(o){let l=s?"left":"top",d=s?"right":"bottom";i===-1?a-=o.clientRect[l]-n[d]:a+=n[l]-o.clientRect[d]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?t>=o.right:e>=o.bottom}else{let o=i[0].clientRect;return s?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,i,s){let n=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(s){let d=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return n?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}},me=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 s=e[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(t)}sort(t,e,i,s){let n=this._getItemIndexFromPointerPosition(t,e,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===t)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(t),d=t.getPlaceholderElement(),h=a.getRootElement();n>l?h.after(d):h.before(d),q(this._activeItems,l,n);let u=this._getRootNode().elementFromPoint(e,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=h===u||h.contains(u),{previousIndex:l,currentIndex:n}}enter(t,e,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(t,e,i):s;n===-1&&(n=this._getClosestItemIndexToPointer(t,e,i));let o=this._activeItems[n],a=this._activeItems.indexOf(t);a>-1&&this._activeItems.splice(a,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(n,0,t),o.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[s,n]=this._relatedNodes[i];s.parentNode===t&&s.nextSibling!==n&&(n===null?t.appendChild(s):n.parentNode===t&&t.insertBefore(s,n))}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)}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 s=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,t)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=V(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 s=1/0,n=-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<s&&(s=h,n=o)}}return n}},vt=.05,xt=.05,f=function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r}(f||{}),g=function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r}(g||{}),fe=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new p;entered=new p;exited=new p;dropped=new p;sorted=new p;receivingStarted=new p;receivingStopped=new p;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=x.EMPTY;_verticalScrollDirection=f.NONE;_horizontalScrollDirection=g.NONE;_scrollNode;_stopScrollTimers=new p;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,i,s,n){this._dragDropRegistry=e,this._ngZone=s,this._viewportRuler=n;let o=this.element=P(t);this._document=i,this.withOrientation("vertical").withElementContainer(o),e.registerDropContainer(this),this._parentPositions=new W(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,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,s),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,s,n,o,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,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(s=>s.isDragging()).every(s=>t.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof j&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new me(this._document,this._dragDropRegistry);else{let e=new j(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=P(this.element),i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(t);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,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)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,s){if(this.sortingDisabled||!this._domRect||!ct(this._domRect,vt,e,i))return;let n=this._sortStrategy.sort(t,e,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,s=f.NONE,n=g.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||ct(o.clientRect,vt,t,e)&&([s,n]=Ut(a,o.clientRect,this._direction,t,e),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=Et(l,e),n=Rt(l,t),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&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(),Ee(0,ye).pipe(I(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===f.UP?t.scrollBy(0,-e):this._verticalScrollDirection===f.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===g.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===g.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&_e(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(s=>s._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._domRect||!_e(this._domRect,e,i)||!this.enterPredicate(t,this))return!1;let s=this._getShadowRoot().elementFromPoint(e,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(t,e){let i=this._activeSiblings;!i.has(t)&&e.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-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=V(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 Et(r,t){let{top:e,bottom:i,height:s}=r,n=s*xt;return t>=e-n&&t<=e+n?f.UP:t>=i-n&&t<=i+n?f.DOWN:f.NONE}function Rt(r,t){let{left:e,right:i,width:s}=r,n=s*xt;return t>=e-n&&t<=e+n?g.LEFT:t>=i-n&&t<=i+n?g.RIGHT:g.NONE}function Ut(r,t,e,i,s){let n=Et(t,s),o=Rt(t,i),a=f.NONE,l=g.NONE;if(n){let d=r.scrollTop;n===f.UP?d>0&&(a=f.UP):r.scrollHeight-d>r.clientHeight&&(a=f.DOWN)}if(o){let d=r.scrollLeft;e==="rtl"?o===g.RIGHT?d<0&&(l=g.RIGHT):r.scrollWidth+d>r.clientWidth&&(l=g.LEFT):o===g.LEFT?d>0&&(l=g.LEFT):r.scrollWidth-d>r.clientWidth&&(l=g.RIGHT)}return[a,l]}var F={capture:!0},pe={passive:!1,capture:!0},Zt=(()=>{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,s){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return r})(),Ct=(()=>{class r{_ngZone=c(z);_document=c(le);_styleLoader=c(We);_renderer=c(ie).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=te([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new p;pointerUp=new p;scroll=new p;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=S(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,pe)})}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(Zt),this._activeDragInstances.update(s=>[...s,e]),this._activeDragInstances().length===1)){let s=i.type.startsWith("touch"),n=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),F],["selectstart",this._preventDefaultWhileDragging,pe]];s?o.push(["touchend",n,F],["touchcancel",n,F]):o.push(["mouseup",n,F]),s||o.push(["mousemove",a=>this.pointerMove.next(a),pe]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,d])=>S(this._renderer,this._document,a,l,d))})}}stopDragging(e){this._activeDragInstances.update(i=>{let s=i.indexOf(e);return s>-1?(i.splice(s,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 X(s=>this._ngZone.runOutsideAngular(()=>{let n=S(this._renderer,e,"scroll",o=>{this._activeDragInstances().length&&s.next(o)},F);return()=>{n()}}))),H(...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=Q({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),jt={dragStartThreshold:5,pointerDirectionChangeThreshold:5},It=(()=>{class r{_document=c(le);_ngZone=c(z);_viewportRuler=c(Ye);_dragDropRegistry=c(Ct);_renderer=c(ie).createRenderer(null,null);constructor(){}createDrag(e,i=jt){return new ue(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new fe(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||r)};static \u0275prov=Q({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),bt=new E("CDK_DRAG_PARENT");var qt=new E("CdkDragHandle");var Tt=new E("CDK_DRAG_CONFIG"),kt=new E("CdkDropList"),Ot=(()=>{class r{element=c(ee);dropContainer=c(kt,{optional:!0,skipSelf:!0});_ngZone=c(z);_viewContainerRef=c(Me);_dir=c(ce,{optional:!0});_changeDetectorRef=c(ae);_selfHandle=c(qt,{optional:!0,self:!0});_parentDrag=c(bt,{optional:!0,skipSelf:!0});_dragDropRegistry=c(Ct);_destroyed=new p;_handles=new Pe([]);_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 D;released=new D;ended=new D;entered=new D;exited=new D;dropped=new D;moved=new X(e=>{let i=this._dragRef.moved.pipe(xe(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(e);return()=>{i.unsubscribe()}});_injector=c(ke);constructor(){let e=this.dropContainer,i=c(Tt,{optional:!0}),s=c(It);this._dragRef=s.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&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this),e._dropListRef.beforeStarted.pipe(I(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()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){Oe(()=>{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,s=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i)}_removeHandle(e){let i=this._handles.getValue(),s=i.indexOf(e);s>-1&&(i.splice(s,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):P(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,s=this.dragStartDelay,n=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 s=="object"&&s?s:de(s),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(Re(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){e.withParent(s._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:s,constrainPosition:n,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:d,previewContainer:h}=e;this.disabled=l??!1,this.dragStartDelay=s||0,i&&(this.lockAxis=i),n&&(this.constrainPosition=n),o&&(this.previewClass=o),a&&(this.boundaryElement=a),d&&(this.rootElementSelector=d),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(Ie(e=>{let i=e.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Ce(e=>H(...e.map(i=>i._stateChanges.pipe(J(i))))),I(this._destroyed)).subscribe(e=>{let i=this._dragRef,s=e.element.nativeElement;e.disabled?i.disableHandle(s):i.enableHandle(s)})}static \u0275fac=function(i){return new(i||r)};static \u0275dir=se({type:r,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,s){i&2&&ne("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",M],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Be]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[oe([{provide:bt,useExisting:r}]),Te]})}return r})(),wt=new E("CdkDropListGroup");var Mt=(()=>{class r{element=c(ee);_changeDetectorRef=c(ae);_scrollDispatcher=c(Ke);_dir=c(ce,{optional:!0});_group=c(wt,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new p;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=c(Ze).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;dropped=new D;entered=new D;exited=new D;sorted=new D;_unsortedItems=new Set;constructor(){let e=c(It),i=c(Tt,{optional:!0});this._dropListRef=e.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(s,n)=>this.enterPredicate(s.data,n.data),this._dropListRef.sortPredicate=(s,n,o)=>this.sortPredicate(s,n.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),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(J(this._dir.value),I(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=Ue(this.connectedTo).map(s=>{if(typeof s=="string"){let n=r._dropLists.find(o=>o.id===s);return n}return s});if(this._group&&this._group._items.forEach(s=>{i.indexOf(s)===-1&&i.push(s)}),!this._scrollableParentsResolved){let s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(n=>n.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let s=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(s)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=de(this.autoScrollStep,2),e.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._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()}),H(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:i,draggingDisabled:s,sortingDisabled:n,listAutoScrollDisabled:o,listOrientation:a}=e;this.disabled=s??!1,this.sortingDisabled=n??!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=se({type:r,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,s){i&2&&(Le("id",s.id),ne("cdk-drop-list-disabled",s.disabled)("cdk-drop-list-dragging",s._dropListRef.isDragging())("cdk-drop-list-receiving",s._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",M],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",M],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",M],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[oe([{provide:wt,useValue:void 0},{provide:kt,useExisting:r}])]})}return r})();var Lt=(()=>{class r{_bottomSheetRef=c(Qe);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:11,vars:0,consts:[["mat-list-item","",3,"click"],["matListItemIcon",""]],template:function(i,s){i&1&&(_(0,"mat-action-list")(1,"button",0),y("click",function(){return s.clickAction("duplicate")}),_(2,"mat-icon",1),b(3,"content_copy"),v(),_(4,"span"),b(5,"Duplicate"),v()(),_(6,"button",0),y("click",function(){return s.clickAction("delete")}),_(7,"mat-icon",1),b(8,"delete_forever"),v(),_(9,"span"),b(10,"Delete"),v()()())},dependencies:[rt,st,nt,it,$,G],encapsulation:2})}return r})();var Yt=(r,t)=>t.id;function Xt(r,t){if(r&1){let e=ze();_(0,"div",6),y("cdkDragStarted",function(s){T(e);let n=O();return k(n.dragStart(s))})("cdkDragEnded",function(s){T(e);let n=O();return k(n.dragEnd(s))})("press",function(){let s=T(e).$index,n=O();return k(n.openBottomSheet(s))})("doubletap",function(){let s=T(e).$index,n=O();return k(n.editDashboard(s))}),_(1,"span",7)(2,"div",8),b(3),v()(),_(4,"p",9),b(5),v()()}if(r&2){let e=t.$implicit,i=t.$index;B(3),re(i+1),B(2),re(e.name)}}var $i=(()=>{class r{pageTitle="Dashboards";_bottomSheet=c(et);_dashboard=c(Ve);_uiEvent=c(Je);_dialog=c(Xe);addDashboard(){this._dialog.openNameDialog({title:"New Dashboard",name:`Dashboard ${this._dashboard.dashboards().length+1}`,confirmBtnText:"Create",cancelBtnText:"Cancel"}).afterClosed().subscribe(e=>{e&&this._dashboard.add(e.name,[])})}openBottomSheet(e){this._bottomSheet.open(Lt).afterDismissed().subscribe(s=>{switch(s){case"delete":this.deleteDashboard(e);break;case"duplicate":this.duplicateDashboard(e,`${this._dashboard.dashboards()[e].name}`);break;default:break}})}editDashboard(e){this._dialog.openNameDialog({title:"Rename Dashboard",name:this._dashboard.dashboards()[e].name,confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(i=>{i&&this._dashboard.update(e,i.name)})}deleteDashboard(e){this._dashboard.delete(e)}duplicateDashboard(e,i){this._dialog.openNameDialog({title:"Duplicate Dashboard",name:`${i} copy`,confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(s=>{s&&this._dashboard.duplicate(e,s.name)})}drop(e){this._dashboard.dashboards.update(i=>{let s=[...i];return q(s,e.previousIndex,e.currentIndex),s})}dragStart(e){this._uiEvent.isDragging.set(!0)}dragEnd(e){this._uiEvent.isDragging.set(!1)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=R({type:r,selectors:[["dashboards-editor"]],decls:11,vars:1,consts:[[3,"pageTitle"],["cdkDropList","","cdkDropListOrientation","mixed",1,"dashboard-manage",3,"cdkDropListDropped"],["cdkDrag","","cdkDragBoundary",".dashboard-manage",1,"dashboard-card","dashboard-item"],[1,"dashboard-card","dashboard-item-add","dashboard-add-btn"],["mat-fab","",3,"click"],[2,"margin-top","10px"],["cdkDrag","","cdkDragBoundary",".dashboard-manage",1,"dashboard-card","dashboard-item",3,"cdkDragStarted","cdkDragEnded","press","doubletap"],[2,"display","block","width","100%"],[1,"item-index"],[1,"mat-title-large",2,"margin-top","25px"]],template:function(i,s){i&1&&(He(0,"page-header",0),_(1,"div",1),y("cdkDropListDropped",function(o){return s.drop(o)}),Fe(2,Xt,6,2,"div",2,Yt),_(4,"div",3)(5,"button",4),y("click",function(){return s.addDashboard()}),_(6,"mat-icon"),b(7,"add_box"),v()(),_(8,"p",5)(9,"i"),b(10,"Add Dashboard"),v()()()()),i&2&&(Ne("pageTitle",s.pageTitle),B(2),Ae(s._dashboard.dashboards()))},dependencies:[tt,qe,je,ot,$,G,Mt,Ot],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.dashboard-manage[_ngcontent-%COMP%]{box-sizing:border-box;padding:0 60px;width:100%;height:calc(100% - 63px);display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-around;overflow-y:scroll;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}.dashboard-item[_ngcontent-%COMP%]{background-color:var(--kip-widget-card-background-color);border:1px solid var(--mat-sys-surface-container-highest)}.dashboard-item-add[_ngcontent-%COMP%]{background-color:var(--mat-sys-surface-container);border:1px solid var(--mat-sys-surface-container-highest)}.dashboard-add-btn[_ngcontent-%COMP%]{align-content:center;text-align:center;border:dashed 1px var(--mat-sys-outline)}.item-index[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;height:42px;width:42px;background-color:var(--mat-sys-tertiary-fixed);color:var(--mat-sys-surface-bright);border-radius:50%;align-content:center;align-items:center;justify-content:center;font-weight:700}.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})();export{$i as DashboardsEditorComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as c,k as s,r as p}from"./chunk-AHFD2AA5.js";import{Va as i,cd as a,m as n,o as m,oa as g,ua as l}from"./chunk-JIJMSRKJ.js";var u="3.1.
|
|
1
|
+
import{g as c,k as s,r as p}from"./chunk-AHFD2AA5.js";import{Va as i,cd as a,m as n,o as m,oa as g,ua as l}from"./chunk-JIJMSRKJ.js";var u="3.1.2";var D=(()=>{class o{MODE_PATH="self.environment.mode";configurableThemeColors=[{label:"Contrast",value:"contrast"},{label:"Blue",value:"blue"},{label:"Green",value:"green"},{label:"Orange",value:"orange"},{label:"Yellow",value:"yellow"},{label:"Pink",value:"pink"},{label:"Purple",value:"purple"},{label:"Grey",value:"grey"}];snackbarAppNotifications=new n;cssThemeColorRoles$=new m(null);_cssThemeColorRoles=null;_settings=l(c);_data=l(p);isNightMode=i(!1);_useAutoNightMode=s(this._settings.getAutoNightModeAsO(),{requireSync:!0});_theme=s(this._settings.getThemeNameAsO(),{requireSync:!0});_redNightMode=s(this._settings.getRedNightModeAsO(),{requireSync:!0});_environmentMode=s(this._data.subscribePath(this.MODE_PATH,"default"));appVersion=i(u);browserVersion=i("Unknown");osVersion=i("Unknown");constructor(){a(()=>{this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")}),a(()=>{let t=this._environmentMode().data.value;this._useAutoNightMode()&&(this.isNightMode.set(t==="night"),this.toggleDayNightMode())}),a(()=>{this._redNightMode()?this.toggleDayNightMode():this.toggleDayNightMode()}),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue(),this.browserVersion.set(this.getBrowserVersion()),this.osVersion.set(this.getOSVersion()),console.log("*********** KIP Version Information ***********"),console.log(`** App Version: ${this.appVersion()}`),console.log(`** Browser Version: ${this.browserVersion()}`),console.log(`** OS Version: ${this.osVersion()}`),console.log("***********************************************")}sendSnackbarNotification(t,e=1e4,r=!1){this.snackbarAppNotifications.next({message:t,duration:e,silent:r})}getSnackbarAppNotifications(){return this.snackbarAppNotifications.asObservable()}readThemeCssRoleVariables(){let t=document.body,e=getComputedStyle(t),r={background:e.getPropertyValue("--mat-sys-background").trim(),cardColor:e.getPropertyValue("--kip-widget-card-background-color").trim(),blue:e.getPropertyValue("--kip-blue-color").trim(),blueDim:e.getPropertyValue("--kip-blue-dim-color").trim(),blueDimmer:e.getPropertyValue("--kip-blue-dimmer-color").trim(),green:e.getPropertyValue("--kip-green-color").trim(),greenDim:e.getPropertyValue("--kip-green-dim-color").trim(),greenDimmer:e.getPropertyValue("--kip-green-dimmer-color").trim(),grey:e.getPropertyValue("--kip-grey-color").trim(),greyDim:e.getPropertyValue("--kip-grey-dim-color").trim(),greyDimmer:e.getPropertyValue("--kip-grey-dimmer-color").trim(),orange:e.getPropertyValue("--kip-orange-color").trim(),orangeDim:e.getPropertyValue("--kip-orange-dim-color").trim(),orangeDimmer:e.getPropertyValue("--kip-orange-dimmer-color").trim(),pink:e.getPropertyValue("--kip-pink-color").trim(),pinkDim:e.getPropertyValue("--kip-pink-dim-color").trim(),pinkDimmer:e.getPropertyValue("--kip-pink-dimmer-color").trim(),purple:e.getPropertyValue("--kip-purple-color").trim(),purpleDim:e.getPropertyValue("--kip-purple-dim-color").trim(),purpleDimmer:e.getPropertyValue("--kip-purple-dimmer-color").trim(),contrast:e.getPropertyValue("--kip-contrast-color").trim(),contrastDim:e.getPropertyValue("--kip-contrast-dim-color").trim(),contrastDimmer:e.getPropertyValue("--kip-contrast-dimmer-color").trim(),yellow:e.getPropertyValue("--kip-yellow-color").trim(),yellowDim:e.getPropertyValue("--kip-yellow-dim-color").trim(),yellowDimmer:e.getPropertyValue("--kip-yellow-dimmer-color").trim(),port:e.getPropertyValue("--kip-port-color").trim(),starboard:e.getPropertyValue("--kip-starboard-color").trim(),zoneNominal:e.getPropertyValue("--kip-zone-nominal-color").trim(),zoneAlert:e.getPropertyValue("--kip-zone-alert-color").trim(),zoneWarn:e.getPropertyValue("--kip-zone-warn-color").trim(),zoneAlarm:e.getPropertyValue("--kip-zone-alarm-color").trim(),zoneEmergency:e.getPropertyValue("--kip-zone-emergency-color").trim()};this.cssThemeColorRoles$.next(r)}get cssThemeColors(){return this._cssThemeColorRoles}setBrightness(t,e=!1){let r=document.body;r.style.setProperty("--kip-nightModeBrightness",`${t}`);let h=e?" sepia(0.5) hue-rotate(-30deg)":"";r.style.setProperty("--kip-nightModeFilters",h)}toggleDayNightMode(){this.isNightMode()?this._redNightMode()?(document.body.classList.toggle("night-theme",!0),this.setBrightness(1,!1)):(this.setBrightness(this._settings.getNightModeBrightness(),!0),document.body.classList.remove("night-theme"),this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")):(document.body.classList.remove("night-theme"),this._theme()==="light-theme"&&document.body.classList.toggle("light-theme",this._theme()==="light-theme"),this.setBrightness(1,!1)),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue()}getBrowserVersion(){let t=navigator.userAgent,e="Unknown";return t.includes("Edg")?e=`Edge ${t.match(/Edg\/(\d+)/)?.[1]}`:t.includes("Chrome")&&!t.includes("Edg")&&!t.includes("Chromium")?e=`Chrome ${t.match(/Chrome\/(\d+)/)?.[1]}`:t.includes("Chromium")?e=`Chromium ${t.match(/Chromium\/(\d+)/)?.[1]}`:t.includes("Firefox")?e=`Firefox ${t.match(/Firefox\/(\d+)/)?.[1]}`:t.includes("Safari")&&!t.includes("Chrome")&&!t.includes("Chromium")?e=`Safari ${t.match(/Version\/(\d+)/)?.[1]}`:(t.includes("Opera")||t.includes("OPR"))&&(e=`Opera ${t.match(/(Opera|OPR)\/(\d+)/)?.[2]}`),e}getOSVersion(){let t=navigator.platform,e=navigator.userAgent;return t.startsWith("Mac")?"macOS":t.startsWith("Win")?"Windows":/Linux/.test(t)?e.includes("ARM")||e.includes("aarch64")||e.includes("Raspberry")||t.includes("armv7l")||t.includes("armv8l")?"Raspberry Pi":"Linux":"Unknown OS"}static \u0275fac=function(e){return new(e||o)};static \u0275prov=g({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{D as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Co,b as Mo,c as yo}from"./chunk-YQQFIIO5.js";import{a as tt,b as se}from"./chunk-MCACXEYY.js";import{a as et,b as To,c as So,d as xo}from"./chunk-FMVUDX5R.js";import{a as we,b as Nt}from"./chunk-FFCTE2U5.js";import{b as fo,c as go,d as Ot,e as ho,f as U,g as bo,h as _o,i as pt,j as ne,k as Lt}from"./chunk-7OTNT2GF.js";import{g as Da,i as Ia,n as Oa,o as N,p as ae,q as uo,u as vo}from"./chunk-VIHODUV4.js";import{a as Ja,b as eo,c as to,d as ve,e as Ce,g as ao,h as Me,i as ye,j as Te,k as $e,l as Se}from"./chunk-FCC7GNHD.js";import{a as je}from"./chunk-
|
|
1
|
+
import{a as Co,b as Mo,c as yo}from"./chunk-YQQFIIO5.js";import{a as tt,b as se}from"./chunk-MCACXEYY.js";import{a as et,b as To,c as So,d as xo}from"./chunk-FMVUDX5R.js";import{a as we,b as Nt}from"./chunk-FFCTE2U5.js";import{b as fo,c as go,d as Ot,e as ho,f as U,g as bo,h as _o,i as pt,j as ne,k as Lt}from"./chunk-7OTNT2GF.js";import{g as Da,i as Ia,n as Oa,o as N,p as ae,q as uo,u as vo}from"./chunk-VIHODUV4.js";import{a as Ja,b as eo,c as to,d as ve,e as Ce,g as ao,h as Me,i as ye,j as Te,k as $e,l as Se}from"./chunk-FCC7GNHD.js";import{a as je}from"./chunk-4QNBKJKZ.js";import{a as po}from"./chunk-RCSPPHLA.js";import{A as Je,D as R,E as Pt,a as ke,d as Ga,e as Ea,f as ka,g as xt,h as Yt,i as wt,k as Fa,r as Pa,t as O,u as Ft,v as Qe,x as mo,z as L}from"./chunk-AHFD2AA5.js";import{$a as Be,$b as X,$c as k,Aa as sa,Ae as Ha,Bb as fa,Cc as te,Da as Ve,Dc as r,E as ia,Ea as M,Ec as x,Ee as Ka,Fa as y,Fc as Q,Fe as $a,Gc as yt,H as Kt,Hb as v,Ib as ge,Ic as Ma,J as Oe,Jb as lt,Jc as ya,K as pe,Kb as ga,Kc as Ta,La as ca,Lb as ha,Ld as La,Md as Na,Me as Ya,N as na,Nb as _,Ne as Za,O as bt,Oa as Y,Oc as dt,Od as Va,Pa as da,Pc as Tt,Pe as Xa,Q as Le,Ra as fe,Rc as We,Sa as f,Sc as qe,Se as Ke,T as ra,Ta as rt,Td as Ba,Va as Z,Vd as Ra,Ve as Qa,We as kt,Xc as ze,Xe as V,Yb as le,Yd as At,Zb as d,Ze as E,_b as Ct,a as me,ac as $t,af as I,b as Fe,bc as ba,bf as j,cd as Sa,cf as oo,dc as C,de as mt,df as io,eb as ma,ec as G,ee as He,ef as no,f as gt,fa as Ne,fc as Mt,fe as Ua,ff as ro,g as ht,ga as _t,gc as T,gf as H,hc as S,he as Zt,hf as lo,ia as la,ic as n,ie as Gt,if as Dt,j as jt,jc as i,jf as xe,kc as g,ke as Et,kf as ie,lc as _a,le as q,lf as K,m as it,mc as va,mf as so,na as vt,nc as Ca,nf as co,o as nt,oa as ee,oc as A,of as Ye,pa as ue,pf as It,qc as b,qd as xa,qf as Ze,ra as $,rc as u,rd as wa,re as Wa,rf as F,sc as Re,sd as Aa,se as qa,t as Ht,tc as Ue,te as z,tf as Xe,ua as p,ub as s,uc as Ee,ud as St,ue as za,uf as B,vc as st,ve as _e,vf as P,wb as pa,wc as ct,xc as he,xe as ja,yb as ua,yc as be,ye as oe,z as Pe}from"./chunk-JIJMSRKJ.js";var br=(()=>{class o{_settings=p(xt);_router=p(Ia);dashboards=Z([],{equal:Yt});activeDashboard=Z(0);_widgetAction=new nt(null);widgetAction$=this._widgetAction.asObservable();_isDashboardStatic=new nt(!0);isDashboardStatic$=this._isDashboardStatic.asObservable();isDashboardStatic=Fa(this.isDashboardStatic$);blankDashboard=[{id:null,name:"Dashboard 1",configuration:[{w:12,h:12,id:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc",selector:"widget-tutorial",input:{widgetProperties:{type:"widget-tutorial",uuid:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc"}},x:0,y:0}]}];constructor(){let e=this._settings.getDashboardConfig();if(!e||e.length===0){console.warn("[Dashboard Service] No dashboards found in settings, creating blank dashboard");let t=this.blankDashboard.map(a=>Fe(me({},a),{id:ke.create()}));this.dashboards.set([...t])}else this.dashboards.set(this._settings.getDashboardConfig());Sa(()=>{this._settings.saveDashboards(this.dashboards())})}toggleStaticDashboard(){this._isDashboardStatic.next(!this._isDashboardStatic.value)}add(e,t){this.dashboards.update(a=>[...a,{id:ke.create(),name:e,configuration:t}])}update(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?Fe(me({},l),{name:t}):l))}delete(e){this.dashboards.update(t=>t.filter((a,l)=>l!==e)),this.dashboards().length===0?(this.add("Dashboard "+(this.dashboards().length+1),[]),this.activeDashboard.set(0)):this.activeDashboard()>this.dashboards().length-1&&this.activeDashboard.set(this.dashboards().length-1)}duplicate(e,t){if(e<0||e>=this.dashboards().length){console.error(`[Dashboard Service] Invalid itemIndex: ${e}`);return}let a=this.dashboards()[e],l=wt(a);l.id=ke.create(),l.name=t,Array.isArray(l.configuration)?l.configuration.forEach(m=>{m&&m.input?.widgetProperties?(m.id=ke.create(),m.input.widgetProperties.uuid=m.id):console.error("Dashboard Service] Widget configuration is missing required properties:",m)}):(console.error("Dashboard Service] Dashboard configuration is not an array:",l.configuration),l.configuration=[]),this.dashboards.update(m=>[...m,l])}updateConfiguration(e,t){this.dashboards.update(a=>a.map((l,m)=>m===e?Yt(l.configuration,t)?l:Fe(me({},l),{configuration:t}):l))}previousDashboard(){this.activeDashboard()+1>this.dashboards().length-1?this.activeDashboard.set(0):this.activeDashboard.set(this.activeDashboard()+1)}nextDashboard(){this.activeDashboard()-1<0?this.activeDashboard.set(this.dashboards().length-1):this.activeDashboard.set(this.activeDashboard()-1)}navigateToActive(){this._router.navigate(["/dashboard",this.activeDashboard()])}navigateTo(e){e<0||e>this.dashboards().length-1||this._router.navigate(["/dashboard",e])}deleteWidget(e){this._widgetAction.next({id:e,operation:"delete"})}duplicateWidget(e){this._widgetAction.next({id:e,operation:"duplicate"})}setStaticDashboard(e){this._isDashboardStatic.next(e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ri(o,c){o&1&&Ca(0)}var Ao=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({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(t,a){t&1&&(n(0,"div",0)(1,"h6",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content",3),_(7,ri,1,0,"ng-container",4),i()),t&2&&(s(2),x(a.data.title),s(),d("mat-dialog-close",!1),s(4),d("ngComponentOutlet",a.data.componentType))},dependencies:[N,Se,Me,ye,Te,oe,z,xa],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}.dialog-content-padding[_ngcontent-%COMP%]{--mat-dialog-content-padding: 0px 24px 20px 24px}"]})}return o})();function li(o,c){if(o&1&&(n(0,"button",4),r(1),i()),o&2){let e=u();d("mat-dialog-close",!0),s(),x(e.data.confirmBtnText)}}var Go=(()=>{class o{data=p(Ce);static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({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(t,a){t&1&&(n(0,"div",0)(1,"h5",1),r(2),i(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),i()()(),n(6,"mat-dialog-content"),r(7),i(),n(8,"mat-dialog-actions",3)(9,"button",4),r(10),i(),_(11,li,2,2,"button",4),i()),t&2&&(s(2),x(a.data.title),s(),d("mat-dialog-close",!1),s(4),Q(" ",a.data.message,`
|
|
2
2
|
`),s(2),d("mat-dialog-close",!1),s(),x(a.data.cancelBtnText),s(),C(a.data.confirmBtnText?11:-1))},dependencies:[N,Se,Me,ye,$e,Te,oe,_e,z],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 ci(o,c){if(o&1&&(n(0,"button",9),r(1),i()),o&2){let e=u(),t=te(1);d("disabled",!t.valid),s(),x(e.data.confirmBtnText)}}var ko=(()=>{class o{dialogRef=p(ve);data=p(Ce);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({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(t,a){if(t&1){let l=A();n(0,"form",1,0),b("ngSubmit",function(){return M(l),y(a.saveName())}),n(2,"div",2)(3,"h5",3),r(4),i(),n(5,"button",4)(6,"mat-icon"),r(7,"close"),i()()(),n(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),r(11,"Name"),i(),n(12,"input",6),Ta("ngModelChange",function(h){return M(l),ya(a.data.name,h)||(a.data.name=h),y(h)}),i(),n(13,"mat-error"),r(14," A name is required "),i()()(),n(15,"mat-dialog-actions",7)(16,"button",8),r(17),i(),_(18,ci,2,2,"button",9),i()()}t&2&&(s(4),x(a.data.title),s(),d("mat-dialog-close",!1),s(7),Ma("ngModel",a.data.name),s(4),d("mat-dialog-close",!1),s(),x(a.data.cancelBtnText),s(),C(a.data.confirmBtnText?18:-1))},dependencies:[Se,Me,ye,$e,Te,ae,N,Je,L,O,Ft,Pt,R,oe,_e,z,B,Dt,V,I,j,F,lo,no],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 mi(o,c){if(o&1&&(n(0,"mat-option",12),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}function pi(o,c){if(o&1){let e=A();n(0,"button",21),b("click",function(){M(e);let a=u();return y(a.moveCtrlUp())}),n(1,"mat-icon"),r(2,"arrow_drop_up"),i()()}}function ui(o,c){if(o&1){let e=A();n(0,"button",22),b("click",function(){M(e);let a=u();return y(a.moveCtrlDown())}),n(1,"mat-icon"),r(2,"arrow_drop_down"),i()()}}var Do=(()=>{class o{app=p(je);ctrlFormGroup=f.required();controlIndex=f(void 0);arrayLength=f(void 0);deleteCtrl=fe();moveUp=fe();moveDown=fe();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(t){return new(t||o)};static \u0275cmp=v({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(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),r(5,"Label"),i(),g(6,"input",4),i()(),n(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),r(10,"Type"),i(),n(11,"mat-select",7)(12,"mat-option",8),r(13,"Toggle"),i(),n(14,"mat-option",9),r(15,"Push"),i(),n(16,"mat-option",10),r(17,"Indicator"),i()()()(),n(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),r(21,"Color"),i(),n(22,"mat-select",11),T(23,mi,2,2,"mat-option",12,G),i()()(),n(25,"div",13)(26,"mat-checkbox",14),r(27," Use numeric path "),i()()(),n(28,"div",15)(29,"div",16)(30,"div",17),_(31,pi,3,0,"button",18)(32,ui,3,0,"button",19),n(33,"button",20),b("click",function(){return a.deleteControl()}),n(34,"mat-icon"),r(35,"delete"),i()()()()()()),t&2&&(d("formGroup",a.ctrlFormGroup()),s(23),S(a.colors),s(8),C(a.controlIndex()!==0?31:-1),s(),C(a.controlIndex()!==a.arrayLength()-1?32:-1))},dependencies:[B,V,I,j,F,P,K,Ye,L,O,R,ne,U,z,Nt,we,ae,N],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 fi(o,c){if(o&1){let e=A();n(0,"boolean-control-config",4),b("moveUp",function(a){M(e);let l=u();return y(l.moveUp(a))})("moveDown",function(a){M(e);let l=u();return y(l.moveDown(a))})("deleteCtrl",function(a){M(e);let l=u();return y(l.deletePath(a))}),i()}if(o&2){let e=c.$implicit,t=c.$index,a=u();d("ctrlFormGroup",a.getFormGroup(e))("controlIndex",t)("arrayLength",a.arrayLength)}}var Io=(()=>{class o{fb=p(Xe);multiCtrlArray=f.required();addPath=fe();updatePath=fe();delPath=fe();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new oo({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(bt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=ke.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,E.required],type:["1",E.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let t={description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"unitless",convertUnitTo:"unitless",sampleTime:500};this.addPath.emit(t)}moveUp(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,t,{emitEvent:!1})}moveDown(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,t,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({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(t,a){t&1&&(n(0,"div",0)(1,"div",1),T(2,fi,1,3,"boolean-control-config",2,Mt),n(4,"button",3),b("click",function(){return a.addCtrlGroup()}),n(5,"mat-icon"),r(6,"add"),i()()()()),t&2&&(d("formGroup",a.multiFormGroup),s(2),S(a.multiCtrlArray().controls))},dependencies:[B,j,P,K,co,Do,oe,ja,ae,N],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})();var gi=["*"];var hi=new $("MAT_CARD_CONFIG"),bl=(()=>{class o{appearance;constructor(){let e=p(hi,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(t,a){t&2&&X("mat-mdc-card-outlined",a.appearance==="outlined")("mdc-card--outlined",a.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:gi,decls:1,vars:0,template:function(t,a){t&1&&(Re(),Ue(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(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mdc-elevated-card-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(--mdc-elevated-card-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-sys-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-sys-corner-medium));border-width:var(--mdc-outlined-card-outline-width, 1px);border-color:var(--mdc-outlined-card-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.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}
|
|
3
3
|
`],encapsulation:2,changeDetection:0})}return o})();var Fo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({imports:[q,q]})}return o})();function bi(o,c){if(o&1&&(n(0,"mat-option",8),r(1),i()),o&2){let e=c.$implicit;Ee("value",e.value),s(),x(e.label)}}var Oo=(()=>{class o{dsService=p(et);app=p(je);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();verticalGraph=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().value||this.trackAgainstAverage().disable(),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(t){return new(t||o)};static \u0275cmp=v({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"],verticalGraph:[1,"verticalGraph"],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:80,vars:18,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"],[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","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(t,a){if(t&1){let l=A();n(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),r(5,"Widget Label"),i(),g(6,"input",5),i()(),n(7,"div",3)(8,"mat-checkbox",6),r(9," Show Label "),i()()(),n(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),r(13,"Color"),i(),n(14,"mat-select",7),T(15,bi,2,2,"mat-option",8,G),i()()(),n(17,"div",2)(18,"div",9)(19,"div")(20,"p"),r(21,"Series"),i(),n(22,"mat-form-field",10)(23,"mat-label"),r(24,"Value Decimal Places"),i(),g(25,"input",11),i(),n(26,"mat-checkbox",12),b("change",function(h){return M(l),y(a.enableTrackAgainstMovingAverage(h))}),r(27," Display Moving Average "),i(),n(28,"mat-checkbox",13),r(29," Track Against Moving Average "),i()()(),n(30,"div",9)(31,"div")(32,"p",14),r(33,"Data Scale"),i(),n(34,"span",15),r(35,"(Default node is automatic scale)"),i(),n(36,"mat-radio-group",16)(37,"mat-radio-button",17),b("change",function(h){return M(l),y(a.setScaleControls(h))}),r(38,"Auto Scale"),i(),n(39,"div",18)(40,"mat-form-field",19)(41,"mat-label"),r(42,"Suggested Min"),i(),g(43,"input",20),i(),n(44,"mat-form-field",19)(45,"mat-label"),r(46,"Suggested Max"),i(),g(47,"input",21),i()(),n(48,"mat-radio-button",17),b("change",function(h){return M(l),y(a.setScaleControls(h))}),r(49,"Fixed Scale"),i(),n(50,"div",18)(51,"div",22)(52,"mat-form-field",19)(53,"mat-label"),r(54,"Min"),i(),g(55,"input",23),i()(),n(56,"div",22)(57,"mat-form-field",19)(58,"mat-label"),r(59,"Max"),i(),g(60,"input",24),i()()()(),n(61,"mat-checkbox",25),r(62," Show Scale Ticks "),i()()(),n(63,"div",9)(64,"div")(65,"p",14),r(66,"Time Scale"),i(),n(67,"mat-checkbox",26),r(68," Show Scale Ticks "),i()()(),n(69,"div",9)(70,"div")(71,"p",14),r(72,"Dataset"),i(),n(73,"mat-checkbox",27),r(74," Show Maximum Line "),i(),n(75,"mat-checkbox",28),r(76," Show Average Line "),i(),n(77,"mat-checkbox",29,0),r(79," Show Minimum Line "),i()()()()()}t&2&&(s(6),d("formControl",a.displayName()),s(2),d("formControl",a.showLabel()),s(6),d("formControl",a.color()),s(),S(a.colors),s(10),d("formControl",a.numDecimal()),s(),d("formControl",a.showAverageData()),s(2),d("formControl",a.trackAgainstAverage()),s(8),d("formControl",a.enableMinMaxScaleLimit()),s(),d("value",!1),s(6),d("formControl",a.yScaleSuggestedMin()),s(4),d("formControl",a.yScaleSuggestedMax()),s(),d("value",!0),s(7),d("formControl",a.yScaleMin()),s(5),d("formControl",a.yScaleMax()),s(),d("formControl",a.showYScale()),s(6),d("formControl",a.showTimeScale()),s(6),d("formControl",a.showDatasetMaximumValueLine()),s(2),d("formControl",a.showDatasetAverageValueLine()),s(2),d("formControl",a.showDatasetMinimumValueLine()))},dependencies:[Fo,Je,L,O,Nt,we,Lt,ne,U,pt,Pt,R,xo,To,So,P,V,xe,I,F,Ze,It,ie],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})();function _i(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.uuid),s(),Q(" ",e.label," ")}}function vi(o,c){if(o&1&&(n(0,"mat-option",4),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),Q(" ",e.description," ")}}function Ci(o,c){if(o&1&&(n(0,"mat-optgroup",6),T(1,vi,2,2,"mat-option",4,Mt),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}var Lo=(()=>{class o{datasetService=p(et);units=p(tt);datasetUUID=f.required();convertUnitTo=f.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().sort();let e=this.datasetUUID();e.value?(this.setPathUnits(e.value),this.convertUnitTo().enable()):this.convertUnitTo().disable()}setPathUnits(e){this.convertUnitTo().enable(),e?this.unitList=this.units.getConversionsForPath(this.datasetService.getDatasetConfig(e).path):this.unitList=this.units.getConversionsForPath("")}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"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(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4,"Dataset"),i(),n(5,"mat-select",3),b("selectionChange",function(m){return a.datasetChanged(m)}),T(6,_i,2,2,"mat-option",4,G),i()(),n(8,"mat-form-field",2)(9,"mat-label"),r(10,"Display Format"),i(),n(11,"mat-select",5),T(12,Ci,3,1,"mat-optgroup",6,G),i()()()()),t&2&&(s(5),d("formControl",a.datasetUUID()),s(),S(a.availableDataSets),s(5),d("formControl",a.convertUnitTo()),s(),S(a.unitList.conversions))},dependencies:[Je,L,O,Lt,ne,U,Ot,P,I,F,ie],encapsulation:2})}return o})();var No=(()=>{class o{transform(e,t){return Object.keys(e)}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=ga({name:"objectKeys",type:o,pure:!0})}return o})();var yi=["panel"],Ti=["*"];function Si(o,c){if(o&1&&(n(0,"div",1,0),Ue(2),i()),o&2){let e=c.id,t=u();ba(t._classList),X("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),d("id",t.id),le("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var Qt=class{source;option;constructor(c,e){this.source=c,this.option=e}},Ro=new $("mat-autocomplete-default-options",{providedIn:"root",factory:xi});function xi(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var Ut=(()=>{class o{_changeDetectorRef=p(ze);_elementRef=p(rt);_defaults=p(Ro);_animationsDisabled=p(Be,{optional:!0})==="NoopAnimations";_activeOptionChanges=ht.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 Y;opened=new Y;closed=new Y;optionActivated=new Y;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=p(mt).getId("mat-autocomplete-");inertGroups;constructor(){let e=p(Va);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 Ua(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 t=new Qt(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["mat-autocomplete"]],contentQueries:function(t,a,l){if(t&1&&(st(l,U,5),st(l,go,5)),t&2){let m;he(m=be())&&(a.options=m),he(m=be())&&(a.optionGroups=m)}},viewQuery:function(t,a){if(t&1&&(ct(pa,7),ct(yi,5)),t&2){let l;he(l=be())&&(a.template=l.first),he(l=be())&&(a.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",k],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",k],requireSelection:[2,"requireSelection","requireSelection",k],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",k],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",k]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[dt([{provide:fo,useExisting:o}])],ngContentSelectors:Ti,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,a){t&1&&(Re(),_(0,Si,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:static;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 wi={provide:kt,useExisting:vt(()=>ut),multi:!0};var Uo=new $("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let o=p(Ke);return()=>o.scrollStrategies.reposition()}});function Ai(o){return()=>o.scrollStrategies.reposition()}var Gi={provide:Uo,deps:[Ke],useFactory:Ai},ut=(()=>{class o{_environmentInjector=p(sa);_element=p(rt);_overlay=p(Ke);_viewContainerRef=p(fa);_zone=p(da);_changeDetectorRef=p(ze);_dir=p(Et,{optional:!0});_formField=p(mo,{optional:!0,host:!0});_viewportRuler=p(Ya);_scrollStrategy=p(Uo);_renderer=p(ua);_defaults=p(Ro,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new it;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=ht.EMPTY;_breakpointObserver=p(At);_handsetLandscapeSubscription=ht.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new it;_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&&Gt(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Oe(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(pe(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(pe(()=>this._overlayAttached)):Ht()).pipe(Pe(e=>e instanceof ho?e:null))}optionSelections=ia(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ne(e),_t(()=>Oe(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(_t(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new jt(e=>{let t=l=>{let m=Na(l),h=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,D=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&m!==this._element.nativeElement&&!this._hasFocus()&&(!h||!h.contains(m))&&(!D||!D.contains(m))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(m)&&e.next(l)},a=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{a.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 t=e.keyCode,a=He(e);if(t===27&&!a&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&t===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let l=this.autocomplete._keyManager.activeItem,m=t===38||t===40;t===9||m&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):m&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(m||this.autocomplete._keyManager.activeItem!==l)&&(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 t=e.target,a=t.value;if(t.type==="number"&&(a=a==""?null:parseFloat(a)),this._previousValue!==a){if(this._previousValue=a,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(a),!a)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let l=this.autocomplete.options?.find(m=>m.selected);if(l){let m=this._getDisplayValue(l.value);a!==m&&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 La()===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 jt(a=>{ma(()=>{a.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(la(()=>this._positionStrategy.reapplyLastPosition()),ra(0))??Ht();return Oe(e,t).pipe(_t(()=>this._zone.run(()=>{let a=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),a!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Le(1)).subscribe(a=>this._setValueAndClose(a))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,a=e?e.source:this._pendingAutoselectedOption;a?(this._clearPreviousSelectedOption(a),this._assignOptionValue(a.value),this._onChange(a.value),t._emitSelectEvent(a),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(a=>{a!==e&&a.selected&&a.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let t=this.autocomplete.id;Zt(this._trackedModal,"aria-owns",t)}}_attachOverlay(e){this.autocomplete;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new Ha(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(se.HandsetLandscape).subscribe(l=>{l.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let a=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&a!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!He(e)||e.keyCode===38&&He(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 Xa({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],a=this._aboveClass,l=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:a},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:a}],m;this.position==="above"?m=l:this.position==="below"?m=t:m=[...t,...l],e.withPositions(m)}_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 t=-1;for(let a=0;a<e.options.length;a++)if(!e.options.get(a).disabled){t=a;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,a=bo(e,t.options,t.optionGroups);if(e===0&&a===1)t._setScrollTop(0);else if(t.panel){let l=t.options.toArray()[e];if(l){let m=l._getHostElement(),h=_o(m.offsetTop,m.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(h)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=this.autocomplete.id;this._trackedModal&&Gt(this._trackedModal,"aria-owns",t),Zt(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Gt(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(t){return new(t||o)};static \u0275dir=lt({type:o,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,a){t&1&&b("focusin",function(){return a._handleFocus()})("blur",function(){return a._onTouched()})("input",function(m){return a._handleInput(m)})("keydown",function(m){return a._handleKeydown(m)})("click",function(){return a._handleClick()}),t&2&&le("autocomplete",a.autocompleteAttribute)("role",a.autocompleteDisabled?null:"combobox")("aria-autocomplete",a.autocompleteDisabled?null:"list")("aria-activedescendant",a.panelOpen&&a.activeOption?a.activeOption.id:null)("aria-expanded",a.autocompleteDisabled?null:a.panelOpen.toString())("aria-controls",a.autocompleteDisabled||!a.panelOpen||a.autocomplete==null?null:a.autocomplete.id)("aria-haspopup",a.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",k]},exportAs:["matAutocompleteTrigger"],features:[dt([wi]),Ve]})}return o})(),Wo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ge({type:o});static \u0275inj=ue({providers:[Gi],imports:[Qa,pt,q,Za,pt,q]})}return o})();var ki=(o,c)=>c.path;function Di(o,c){o&1&&g(0,"i",21)}function Ii(o,c){o&1&&g(0,"i",22)}function Fi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),yt("",e.properties.quantity,": ",e.properties.display,"")}}function Pi(o,c){if(o&1){let e=A();n(0,"div",5)(1,"mat-form-field",20)(2,"mat-label"),_(3,Di,1,0,"i",21)(4,Ii,1,0,"i",22),r(5," Filter"),i(),n(6,"mat-select",23,2),b("selectionChange",function(){M(e),u();let a=te(10),l=u();return y(l.pathFormGroup.controls.path.setValue(a.value))}),n(8,"mat-option"),r(9,"All"),i(),T(10,Fi,2,3,"mat-option",15,G),i()()()}if(o&2){let e=te(7),t=u(2);s(3),C(e.value?4:3),s(3),d("formControl",t.pathSkUnitsFilterControl),s(4),S(t.pathSkUnitsFiltersList)}}function Oi(o,c){if(o&1){let e=A();n(0,"button",24),b("click",function(){M(e);let a=u(2);return y(a.pathFormGroup.controls.path.setValue(""))}),n(1,"mat-icon"),r(2,"close"),i()()}}function Li(o,c){o&1&&(n(0,"mat-error"),r(1," Path is required. Please enter a valid Signal K path. "),i())}function Ni(o,c){o&1&&(n(0,"mat-error"),r(1," Path not recognized. Please enter a path from the server's published list. "),i())}function Vi(o,c){if(o&1&&(n(0,"span"),r(1),i(),g(2,"br"),n(3,"small",25),r(4),i()),o&2){let e=u().$implicit;s(),x(e.path),s(3),x(e.meta.description)}}function Bi(o,c){if(o&1&&r(0),o&2){let e=u().$implicit;Q(" ",e.path," ")}}function Ri(o,c){if(o&1&&(n(0,"mat-option",10),_(1,Vi,5,2)(2,Bi,1,1),i()),o&2){let e=c.$implicit;d("value",e.path),s(),C(e.meta!=null?1:2)}}function Ui(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e),s(),Q(" ",e," ")}}function Wi(o,c){if(o&1&&(n(0,"mat-option",15),r(1),i()),o&2){let e=c.$implicit;d("value",e.measure),s(),Q(" ",e.description," ")}}function qi(o,c){if(o&1&&(n(0,"mat-optgroup",27),T(1,Wi,2,2,"mat-option",15,G),i()),o&2){let e=c.$implicit;d("label",e.group),s(),S(e.units)}}function zi(o,c){if(o&1&&(n(0,"mat-form-field",19)(1,"mat-label"),r(2,"Display Format"),i(),n(3,"mat-select",26),T(4,qi,3,1,"mat-optgroup",27,G),i()()),o&2){let e=u(2);s(4),S(e.unitList.conversions)}}function ji(o,c){if(o&1&&(n(0,"div",3)(1,"div",4)(2,"span"),r(3),i()(),_(4,Pi,12,2,"div",5),n(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),r(8,"Signal K Path"),i(),g(9,"input",8,0),_(11,Oi,3,0,"button",9)(12,Li,2,0,"mat-error")(13,Ni,2,0,"mat-error"),n(14,"mat-autocomplete",null,1),T(16,Ri,3,2,"mat-option",10,ki),We(18,"async"),i()()(),n(19,"div",11)(20,"div",12)(21,"mat-form-field",13)(22,"mat-label"),r(23,"Data Source"),i(),n(24,"mat-select",14),T(25,Ui,2,2,"mat-option",15,G),i()()(),n(27,"div",16)(28,"mat-form-field",13)(29,"mat-label"),r(30,"Sample Time"),i(),g(31,"input",17),i()(),n(32,"div",18),_(33,zi,6,0,"mat-form-field",19),i()()()),o&2){let e=te(15),t=u();d("formGroup",t.pathFormGroup),s(2),Ct("color",t.pathFormGroup.enabled?"":"rgba(255,255,255,0.5)"),s(),x(t.pathFormGroup.value.description),s(),C(t.pathFormGroup.value.pathType=="number"&&t.showPathSkUnitsFilter?4:-1),s(5),d("matAutocomplete",e),s(2),C(t.pathFormGroup.value.path?11:-1),s(),C(t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.required?12:t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.requireMatch?13:-1),s(4),S(qe(18,9,t.filteredPaths)),s(9),S(t.availableSources),s(8),C(t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===void 0||t.pathFormGroup.value.pathType=="number"&&t.pathFormGroup.value.isConvertUnitToConfigurable===!0?33:-1)}}function Hi(o){return c=>o().some(a=>a.path===c.value)?null:{requireMatch:!0}}var qo=(()=>{class o{_data=p(Pa);_units=p(tt);_connection=p(Ga);pathFormGroup;filterSelfPaths=f.required();availablePaths;filteredPaths=new nt(null);_pathValueChange$=null;_pathFormGroup$=null;availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new ro(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){this.pathSkUnitsFiltersList=this._units.skBaseUnits.sort((e,t)=>e.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),this.pathFormGroup.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(e=>e.unit===this.pathFormGroup.value.pathSkUnitsFilter),{onlySelf:!0}),this.pathFormGroup.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=this.pathFormGroup.value.showPathSkUnitsFilter),this.pathFormGroup.controls.path.setValidators([E.required,Hi(()=>this.getPaths())]),this.pathFormGroup.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this.pathFormGroup.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),this.pathFormGroup.controls.sampleTime||(this.pathFormGroup.addControl("sampleTime",new H("500",E.required)),this.pathFormGroup.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),this._pathValueChange$=this.pathFormGroup.controls.path.valueChanges.pipe(na(e=>e===""?Kt(0):Kt(350)),Ne(""),Pe(e=>this.filterPaths(e||""))).subscribe(e=>{this.pathFormGroup.controls.path.pristine||(this.pathFormGroup.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(this.pathFormGroup.controls.path.value),this.updatePathMetaBoundDisplayScale(this.pathFormGroup.controls.path.value)):this.disablePathFields())}),this._pathFormGroup$=this.pathFormGroup.controls.pathType.valueChanges.subscribe(e=>{this.pathSkUnitsFilterControl.setValue(this.unitlessUnit),this.pathFormGroup.controls.path.updateValueAndValidity()})}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup.controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup.controls.pathType.value,t=this.filterSelfPaths(),a=Ea(this._connection.skServerVersion,"2.12.0",">=")?this.pathFormGroup.value.supportsPut:!1;return this._data.getPathsAndMetaByType(e,a,t).sort()}filterPaths(e){let t=e.toLowerCase(),a=this.getPaths();this.pathSkUnitsFilterControl.value!=null&&(a=a.filter(l=>l.meta&&l.meta.units&&l.meta.units===this.pathSkUnitsFilterControl.value.unit||(!l.meta||!l.meta.units)&&this.pathSkUnitsFilterControl.value.unit==="unitless")),a=a.filter(l=>l.path.toLowerCase().includes(t)),this.filteredPaths.next(a)}enableFormFields(e){let t=this._data.getPathObject(this.pathFormGroup.controls.path.value);t!=null?(this.pathFormGroup.controls.sampleTime.enable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.unitList=this._units.getConversionsForPath(this.pathFormGroup.controls.path.value),e&&this.pathFormGroup.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(t.sources).length==1?(this.availableSources=["default"],e?this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("default",{onlySelf:!0}):this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("",{onlySelf:!0})):Object.keys(t.sources).length>1&&(this.availableSources=Object.keys(t.sources),this.pathFormGroup.controls.source.value=="default"&&this.pathFormGroup.controls.source.reset()),this.pathFormGroup.controls.source.enable({onlySelf:!1})):this.disablePathFields()}disablePathFields(){this.pathFormGroup.controls.source.reset("",{onlySelf:!0}),this.pathFormGroup.controls.source.disable({onlySelf:!1}),this.pathFormGroup.controls.sampleTime.disable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.pathFormGroup.controls.convertUnitTo.reset("",{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayName"))return;let t=this._data.getPathMeta(e);t?.displayName&&this.pathFormGroup.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){if(!this.pathFormGroup.parent.parent.value.hasOwnProperty("displayScale"))return;let t=this._data.getPathMeta(e);if(t?.displayScale){let a=this.pathFormGroup.parent.parent.get("displayScale"),l=this.pathFormGroup.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&a.controls.lower.setValue(this._units.convertToUnit(l,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&a.controls.upper.setValue(this._units.convertToUnit(l,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&a.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&a.controls.power.setValue(t.displayScale.power)}}ngOnDestroy(){this._pathValueChange$?.unsubscribe(),this._pathFormGroup$?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["path-control-config"]],inputs:{pathFormGroup:"pathFormGroup",filterSelfPaths:[1,"filterSelfPaths"]},features:[Ve],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"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path","required","",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(t,a){t&1&&_(0,ji,34,11,"div",3),t&2&&C(a.pathFormGroup.value.isPathConfigurable?0:-1)},dependencies:[B,V,xe,I,j,F,P,ie,K,Ye,L,O,R,Wo,Ut,U,Ot,ut,z,Qe,Ft,ne,St,ae,N],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 Ki(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",e)("filterSelfPaths",t.filterSelfPaths().value)}}function $i(o,c){if(o&1&&T(0,Ki,1,2,"path-control-config",6,G),o&2){let e=u();S(e.pathsFormGroup.controls)}}function Yi(o,c){if(o&1&&g(0,"path-control-config",6),o&2){let e=c.$implicit,t=u(2);d("pathFormGroup",t.pathsFormGroup.get(e))("filterSelfPaths",t.filterSelfPaths().value)}}function Zi(o,c){if(o&1&&(T(0,Yi,1,2,"path-control-config",6,G),We(2,"objectKeys")),o&2){let e=u();S(qe(2,0,e.pathsFormGroup.controls))}}var zo=(()=>{class o{rootFormGroup=p(K);fb=p(Xe);formGroupName=f.required();isArray=f.required();enableTimeout=f.required();dataTimeout=f.required();filterSelfPaths=f.required();addPathEvent=f(void 0);pathsFormGroup;ngOnInit(){this.isArray()?this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.description],path:[e.path,E.required],pathID:[e.pathID],source:[e.source,E.required],pathType:[e.pathType],isPathConfigurable:[e.isPathConfigurable],showPathSkUnitsFilter:[e.showPathSkUnitsFilter],pathSkUnitsFilter:[e.pathSkUnitsFilter],convertUnitTo:[e.convertUnitTo],sampleTime:[e.sampleTime],supportsPut:[e.supportsPut]})),this.pathsFormGroup.updateValueAndValidity()}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["paths-options"]],inputs:{formGroupName:[1,"formGroupName"],isArray:[1,"isArray"],enableTimeout:[1,"enableTimeout"],dataTimeout:[1,"dataTimeout"],filterSelfPaths:[1,"filterSelfPaths"],addPathEvent:[1,"addPathEvent"]},features:[Ve],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"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"mat-checkbox",1),r(2," Enable Widget Data TTL "),i(),n(3,"mat-form-field")(4,"mat-label"),r(5,"TTL Timeout For Paths"),i(),g(6,"input",2),n(7,"span",3),r(8,"Seconds"),i()()(),_a(9,4),_(10,$i,2,0)(11,Zi,3,2),va(),n(12,"mat-checkbox",5),r(13,` Restrict to own vessel
|