@mxtommy/kip 4.0.6-beta.1 → 4.0.6

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.
@@ -1,4 +1,4 @@
1
- import{A as wl,B as Jo,C as er,D as tr,E as ir,F as jn,G as Ca,H as xl,I as _l,J as Yn,K as Ji,L as Et,M as Qn,N as $n,O as Zn,P as ho,Q as po,R as Ml,S as Xn,T as Kn,a as Gt,b as ni,c as oo,d as vl,e as yl,f as Cl,g as Sl,h as Ye,i as Zi,j as Xi,k as ro,l as pn,m as va,n as ui,o as Ki,p as zt,q as so,r as lo,s as Hn,t as gn,u as co,v as mo,w as hi,x as Ko,y as uo,z as ya}from"./chunk-QVCMARCU.js";import{a as Al,b as ao}from"./chunk-RYHOAWDD.js";import{a as ii,b as $i,c as ot}from"./chunk-PKKBBIJK.js";import{a as dl,b as cl,c as ml,d as zn,e as ul,f as Tt,g as hl,h as pl,i as gl,k as fl,m as Aa,n as bl}from"./chunk-HIADZ4BV.js";import{a as wt,b as Lt}from"./chunk-6T7IIPAQ.js";import{a as sl,b as ll}from"./chunk-OQULS6SV.js";import{A as bt,B as ti,a as me,c as Ws,d as Ci,e as Zs,f as Xs,g as Ks,h as Si,i as wi,k as Js,l as xi,m as _i,n as Mi,o as zi,p as Kt,r as ut,s as Yi,t as ol,u as Qi,w as rl,y as ht,z as ei}from"./chunk-QLTN6G6E.js";import{A as Bn,B as ki,C as Ti,D as kt,E as nl,F as al,G as Hi,H as Un,I as ji,J as mt,L as qn,M as gt,N as ft,a as qi,d as qt,e as Nn,f as ws,i as xs,j as _s,k as $a,l as Ms,m as Zt,n as Gn,o as ct,q as _t,s as at,t as Mt,u as el,v as tl,w as no,x as il,y as Jt,z as Fn}from"./chunk-XDPHEQEO.js";import{b as Gs,f as Fs,g as Bs,h as zs,i as Xo,j as Hs,m as js,n as Ys,o as Qs,s as $s}from"./chunk-SZ2GUIT5.js";import{$ as cs,$b as Bt,Ab as Ct,Ad as Zo,Ba as La,Bb as St,Bc as za,Bd as Ka,C as ha,Ca as pa,Cc as Ha,Cd as Vs,D as xn,Db as te,Dd as Ja,E as Vi,Eb as ue,Ec as Ss,F as Wi,Fa as g,Fb as It,Fd as Ot,Ga as ps,Gb as re,Gc as ja,Gd as je,Hb as et,Hd as Ke,I as ns,Ia as kn,Ib as Rn,Ic as Ya,J as Li,Ja as di,Jb as Ft,K as Gi,Kb as m,La as Ga,Lb as ne,Ld as mi,M as as,Mb as ve,N as os,Nb as Ui,Nc as tt,Nd as Xt,O as rs,Oa as L,Oc as Qa,P as Ra,Pa as Wt,Pb as cn,Qa as lt,Qb as mn,R as ss,Ra as Fa,Rb as un,S as ls,Sa as ga,Sc as Za,Ta as gs,Td as eo,U as ds,Ua as Bi,Ud as to,V as _n,Va as fs,Vb as ci,Vd as xt,W as Na,Wa as yt,Wd as io,X as Va,Xa as We,Xb as hn,Xc as ks,Xd as dt,Ya as Tn,Yb as ba,Z as Wa,Zd as Ls,_b as At,_d as Je,a as Be,ab as Y,ac as Ua,b as Xe,ba as Mn,bb as G,ca as pt,cb as F,cc as W,d as Cm,da as Vt,db as _e,dc as se,dd as Ts,e as Zr,ea as Yt,eb as En,ec as R,ed as Es,f as nt,fa as ms,fb as he,fc as bs,fd as Ds,fe as Us,g as Ni,ga as A,gb as pe,ge as qs,hb as T,hc as qa,i as jo,ia as us,ib as d,ic as Ze,j as Nt,ja as q,jb as u,jc as v,ka as z,kb as U,kc as ie,kd as Xa,l as Ia,la as X,lb as _,m as Xr,ma as Ve,mb as k,mc as As,md as Vn,na as Fi,nb as H,nc as Ut,nd as Ps,oa as hs,ob as Dn,od as Is,p as Kr,pa as st,pb as Pn,pc as qe,pd as Wn,q as Yo,qb as Ba,qc as $o,r as Jr,ra as w,rb as ae,sb as Pi,sd as Os,t as Oa,tb as B,u as Qo,ua as Qt,ub as fa,v as es,vb as I,vd as Rs,w as vi,wa as Ie,wb as In,wc as vs,wd as yi,xb as On,xc as ys,xd as Ln,y as ts,yb as dn,yc as Cs,yd as Ns,z as is,zb as $t}from"./chunk-OB3QLUH6.js";var mr=Cm((rx,Eo)=>{(function(n){"use strict";function o(c){if(Array.isArray(c)){for(var l=0,p=Array(c.length);l<c.length;l++)p[l]=c[l];return p}return Array.from(c)}function e(c,l){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||typeof l!="object"&&typeof l!="function"?c:l}function t(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(c,l):c.__proto__=l)}function i(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function a(c,l){if(l||(l=typeof window>"u"?global:window),l[c]!==void 0)return l[c];if(Pa===null){var p=window.getComputedStyle(document.documentElement,"");Pa=(Array.prototype.slice.call(p).join("").match(/-(moz|webkit|ms)-/)||p.OLink===""&&["","o"]||["",""])[1]}if(Pa==="")return null;var y=c.charAt(0).toUpperCase()+c.substr(1),S=l[Pa+y];return S!==void 0?S:null}function r(c,l,p,y,S,x,E){if(typeof y!="function")throw new TypeError("Invalid animation rule:",y);var O=c-p,P=O/S,N=0;P>1&&(P=1),P!==1&&(N=y(P),isFinite(N)&&!isNaN(N)&&(P=N)),l&&l(P),O<S?E.frame=Hr(function(Q){return r(Q,l,p,y,S,x,E)}):(x&&x(),E.inProgress=!1)}function s(){Array.prototype.constructor.apply(this,arguments)}function h(c){if(!(c instanceof DOMException&&c.result===2152923147))throw c}function f(c,l){return l.replace(Am,function(p,y){var S=c[y];return S!==void 0?S:p})}function b(c){return c.majorTicks instanceof Array||(c.majorTicks=c.majorTicks?[c.majorTicks]:[]),c.majorTicks.length||(c.majorTicks.push(oe.formatMajorTickNumber(c.minValue,c)),c.majorTicks.push(oe.formatMajorTickNumber(c.maxValue,c))),[c.tickSide!=="right",c.tickSide!=="left"]}function C(c,l,p,y,S,x){c.beginPath(),c.moveTo(l+x,p),c.lineTo(l+y-x,p),c.quadraticCurveTo(l+y,p,l+y,p+x),c.lineTo(l+y,p+S-x),c.quadraticCurveTo(l+y,p+S,l+y-x,p+S),c.lineTo(l+x,p+S),c.quadraticCurveTo(l,p+S,l,p+S-x),c.lineTo(l,p+x),c.quadraticCurveTo(l,p,l+x,p),c.closePath()}function M(c,l){var p=l.valueDec,y=l.valueInt,S=0,x=void 0,E=void 0,O=void 0;if(c=parseFloat(c),O=c<0,c=Math.abs(c),p>0){for(E=c.toFixed(p).toString().split("."),x=y-E[0].length;S<x;++S)E[0]="0"+E[0];E=(O?"-":"")+E[0]+"."+E[1]}else{for(E=Math.round(c).toString(),x=y-E.length;S<x;++S)E="0"+E;E=(O?"-":"")+E}return E}function V(c,l){var p=void 0,y=!1;return p=l.majorTicksDec===0?Math.round(c).toString():c.toFixed(l.majorTicksDec),l.majorTicksInt>1?(y=~p.indexOf("."),~p.indexOf("-")?"-"+[l.majorTicksInt+l.majorTicksDec+2+(y?1:0)-p.length].join("0")+p.replace("-",""):[l.majorTicksInt+l.majorTicksDec+1+(y?1:0)-p.length].join("0")+p):p}function D(c){return c*Math.PI/180}function j(c,l){return{x:-c*Math.sin(l),y:c*Math.cos(l)}}function Z(c,l,p,y){var S=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],x=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,E=c.createLinearGradient(S?0:x,S?x:0,S?0:y,S?y:0);return E.addColorStop(0,l),E.addColorStop(1,p),E}function J(c,l){l.needleShadow&&(c.shadowOffsetX=2,c.shadowOffsetY=2,c.shadowBlur=10,c.shadowColor=l.colorNeedleShadowDown)}function ee(c,l,p){return c["font"+l+"Style"]+" "+c["font"+l+"Weight"]+" "+c["font"+l+"Size"]*p+"px "+c["font"+l]}function ce(c){c.shadowOffsetX=null,c.shadowOffsetY=null,c.shadowBlur=null,c.shadowColor="",c.strokeStyle=null,c.lineWidth=0,c.save()}function Oe(c,l,p,y){l.valueTextShadow&&(c.shadowOffsetX=p,c.shadowOffsetY=p,c.shadowBlur=y,c.shadowColor=l.colorValueTextShadow)}function Te(c,l,p,y,S,x){if(l.valueBox){ce(c);var E=l.valueDec?1+l.valueDec:0,O="9".repeat(Math.max.apply(null,[String(parseInt(p)).length+E].concat(l.majorTicks.map(function(Pe){return String(parseInt(Pe,10)).length+E})))),P=l.valueText||M(p,l),N=x/200,Q=x/100,$=.4*Q,le=1.2*Q;c.font=ee(l,"Value",N),Oe(c,l,$,le);var ge=c.measureText(l.valueText?P:"-"+M(Number(O),l)).width;ce(c);var Ae=parseFloat(l.fontValueSize)*N+$+le,Ge=Q*parseFloat(l.valueBoxStroke),be=2*x-2*Ge,Re=ge+10*Q,Ne=1.1*Ae+$+le,Fe=Q*l.valueBoxBorderRadius,ke=(parseFloat(l.valueBoxWidth)||0)/100*be;ke>Re&&(Re=ke),Re>be&&(Re=be);var De=y-Re/2,we=S-Ne/2,fe=S-5.75*Q;if(c.beginPath(),Fe?C(c,De,we,Re,Ne,Fe):c.rect(De,we,Re,Ne),Ge){var ye=c.createRadialGradient(y,fe,10*Q,y,fe,20*Q);ye.addColorStop(0,l.colorValueBoxRect),ye.addColorStop(1,l.colorValueBoxRectEnd),c.strokeStyle=ye,c.lineWidth=Ge,c.stroke()}l.colorValueBoxShadow&&(c.shadowBlur=1.2*Q,c.shadowColor=l.colorValueBoxShadow),l.colorValueBoxBackground&&(c.fillStyle=l.colorValueBoxBackground,c.fill()),c.closePath(),c.restore(),Oe(c,l,$,le),c.fillStyle=l.colorValueText,c.textAlign="center",c.textBaseline="alphabetic",c.fillText(P,De+Re/2,S+Ne/2-Ae/3),c.restore()}}function Qe(c){var l=c.value,p=c.minValue,y=c.maxValue,S=.01*(y-p);return{normal:l<p?p:l>y?y:l,indented:l<p?p-S:l>y?y+S:l}}function Ee(c,l,p,y,S){p.beginPath(),p.arc(0,0,li(c),0,2*ma,!0),p.lineWidth=l,p.strokeStyle=S?oe.linearGradient(p,y,S,c):y,p.stroke(),p.closePath()}function Le(c,l){var p=si.pixelRatio;return c.maxRadius||(c.maxRadius=c.max-l.borderShadowWidth-l.borderOuterWidth*p-l.borderMiddleWidth*p-l.borderInnerWidth*p+(l.borderOuterWidth?.5:0)+(l.borderMiddleWidth?.5:0)+(l.borderInnerWidth?.5:0)),c.maxRadius}function Me(c,l){function p($,le,ge,Ae,Ge,be){return le&&(!be&&l.borderShadowWidth&&(ge.save(),ge.shadowBlur=l.borderShadowWidth,ge.shadowColor=l.colorBorderShadow),Ee($,le*y,ge,Ae,Ge),!be&&l.borderShadowWidth&&(be=!0,ge.restore())),be}var y=si.pixelRatio,S=l.borderShadowWidth*y,x=c.max-S-l.borderOuterWidth*y/2,E=x-l.borderOuterWidth*y/2-l.borderMiddleWidth*y/2+.5,O=E-l.borderMiddleWidth*y/2-l.borderInnerWidth*y/2+.5,P=Le(c,l),N=void 0,Q=!1;c.save(),Q=p(x,l.borderOuterWidth,c,l.colorBorderOuter,l.colorBorderOuterEnd,Q),Q=p(E,l.borderMiddleWidth,c,l.colorBorderMiddle,l.colorBorderMiddleEnd,Q),Q=p(O,l.borderInnerWidth,c,l.colorBorderInner,l.colorBorderInnerEnd,Q),!Q&&l.borderShadowWidth&&(c.shadowBlur=l.borderShadowWidth,c.shadowColor=l.colorBorderShadow),c.beginPath(),c.arc(0,0,li(P),0,2*ma,!0),l.colorPlateEnd?(N=c.createRadialGradient(0,0,P/2,0,0,P),N.addColorStop(0,l.colorPlate),N.addColorStop(1,l.colorPlateEnd)):N=l.colorPlate,c.fillStyle=N,c.fill(),c.closePath(),c.restore()}function ze(c,l){if(l.highlights!=="false"&&l.highlights.length&&l.highlightsWidth!==0){var p=c.max*(parseFloat(l.highlightsWidth)||0)/100,y=li(it(c,l)-p/2),S=l.highlights.length,x=(l.maxValue-l.minValue)/l.ticksAngle;c.save();for(var E=0;E<S;E++){var O=l.highlights[E];c.lineWidth=p,c.lineCap=l.highlightsLineCap,c.strokeStyle=O.color,c.beginPath(),c.rotate(Ho),c.arc(0,0,y,oe.radians(l.startAngle+(O.from-l.minValue)/x),oe.radians(l.startAngle+(O.to-l.minValue)/x),!1),c.stroke(),c.closePath(),c.restore(),c.save()}c.restore()}}function He(c,l){var p=it(c,l),y=void 0,S=void 0,x=void 0,E=0,O=Math.abs(l.minorTicks)||0,P=l.ticksAngle/(l.maxValue-l.minValue);l.exactTicks?(S=l.maxValue-l.minValue,y=O?S/O:0,E=(Ai.mod(l.majorTicks[0],O)||0)*P):y=O*(l.majorTicks.length-1),c.lineWidth=si.pixelRatio,c.strokeStyle=l.colorMinorTicks||l.colorStrokeTicks,c.save();for(var N=0;N<y;++N)(x=l.startAngle+E+N*(l.ticksAngle/y))<=l.ticksAngle+l.startAngle&&(c.rotate(oe.radians(x)),c.beginPath(),c.moveTo(0,p),c.lineTo(0,p-.075*c.max),rn(c));c.restore()}function it(c,l){var p=c.max/100;return Le(c,l)-5*p-(l.barWidth?2*(parseFloat(l.barStrokeWidth)||0)+((parseFloat(l.barWidth)||0)+5)*p:0)}function rt(c,l){oe.prepareTicks(l);var p=li(it(c,l)),y=void 0,S=l.majorTicks.length,x=si.pixelRatio;c.lineWidth=2*x,y=l.colorMajorTicks instanceof Array?l.colorMajorTicks:new Array(S).fill(l.colorStrokeTicks||l.colorMajorTicks);for(var E=0;E<S;++E)c.save(),c.strokeStyle=y[E],c.rotate(oe.radians(vt(l,l.exactTicks?l.majorTicks[E]:E,S))),c.beginPath(),c.moveTo(0,p),c.lineTo(0,p-.15*c.max),c.stroke(),c.closePath(),c.restore();l.strokeTicks&&(c.save(),c.strokeStyle=l.colorStrokeTicks||y[0],c.rotate(Ho),c.beginPath(),c.arc(0,0,p,oe.radians(l.startAngle),oe.radians(l.startAngle+l.ticksAngle),!1),c.stroke(),c.closePath(),c.restore())}function vt(c,l,p){if(c.exactTicks){var y=c.ticksAngle/(c.maxValue-c.minValue);return c.startAngle+y*(l-c.minValue)}return c.startAngle+l*(c.ticksAngle/(p-1))}function rn(c){c.stroke(),c.restore(),c.closePath(),c.save()}function Ta(c,l){var p=it(c,l)-.15*c.max,y={},S=0,x=l.majorTicks.length,E=l.animationTarget!=="needle",O=l.colorNumbers instanceof Array?l.colorNumbers:new Array(x).fill(l.colorNumbers),P=E?-(l.value-l.minValue)/(l.maxValue-l.minValue)*l.ticksAngle:0;for(E&&(c.save(),c.rotate(-oe.radians(P))),c.font=oe.font(l,"Numbers",c.max/200),c.lineWidth=0,c.textAlign="center",c.textBaseline="middle";S<x;++S){var N=P+vt(l,l.exactTicks?l.majorTicks[S]:S,x),Q=c.measureText(l.majorTicks[S]).width,$=l.fontNumbersSize,le=Math.sqrt(Q*Q+$*$)/2,ge=oe.radialPoint(p-le-l.numbersMargin/100*c.max,oe.radians(N));N===360&&(N=0),y[N]||(y[N]=!0,c.fillStyle=O[S],c.fillText(l.majorTicks[S],ge.x,ge.y))}E&&c.restore()}function Rr(c,l){l.title&&(c.save(),c.font=oe.font(l,"Title",c.max/200),c.fillStyle=l.colorTitle,c.textAlign="center",c.fillText(l.title,0,-c.max/4.25,.8*c.max),c.restore())}function Nr(c,l){l.units&&(c.save(),c.font=oe.font(l,"Units",c.max/200),c.fillStyle=l.colorUnits,c.textAlign="center",c.fillText(oe.formatContext(l,l.units),0,c.max/3.25,.8*c.max),c.restore())}function Vr(c,l){if(l.needle){var p=l.animationTarget!=="needle",y=l.ticksAngle<360?oe.normalizedValue(l).indented:l.value,S=p?l.startAngle:l.startAngle+(y-l.minValue)/(l.maxValue-l.minValue)*l.ticksAngle;l.barStartPosition==="right"&&(S=l.startAngle+l.ticksAngle-(y-l.minValue)/(l.maxValue-l.minValue)*l.ticksAngle);var x=Le(c,l),E=li(x/100*l.needleCircleSize),O=li(x/100*l.needleCircleSize*.75),P=li(x/100*l.needleEnd),N=li(l.needleStart?x/100*l.needleStart:0),Q=x/100*l.needleWidth,$=x/100*l.needleWidth/2,le=si.pixelRatio;c.save(),oe.drawNeedleShadow(c,l),c.rotate(oe.radians(S)),c.fillStyle=oe.linearGradient(c,l.colorNeedle,l.colorNeedleEnd,P-N),l.needleType==="arrow"?(c.beginPath(),c.moveTo(-$,-N),c.lineTo(-Q,0),c.lineTo(-1*le,P),c.lineTo(le,P),c.lineTo(Q,0),c.lineTo($,-N),c.closePath(),c.fill(),c.beginPath(),c.lineTo(-.5*le,P),c.lineTo(-1*le,P),c.lineTo(-Q,0),c.lineTo(-$,-N),c.lineTo($/2*le-2*le,-N),c.closePath(),c.fillStyle=l.colorNeedleShadowUp,c.fill()):(c.beginPath(),c.moveTo(-$,P),c.lineTo(-$,N),c.lineTo($,N),c.lineTo($,P),c.closePath(),c.fill()),c.restore(),l.needleCircleSize&&(c.save(),oe.drawNeedleShadow(c,l),l.needleCircleOuter&&(c.beginPath(),c.arc(0,0,E,0,2*ma,!0),c.fillStyle=oe.linearGradient(c,l.colorNeedleCircleOuter,l.colorNeedleCircleOuterEnd,E),c.fill(),c.closePath()),l.needleCircleInner&&(c.beginPath(),c.arc(0,0,O,0,2*ma,!0),c.fillStyle=oe.linearGradient(c,l.colorNeedleCircleInner,l.colorNeedleCircleInnerEnd,O),c.fill(),c.closePath()),c.restore())}}function Wr(c,l,p){oe.drawValueBox(c,l,p,0,c.max-.33*c.max,c.max)}function Jc(c){var l=c.startAngle,p=c.startAngle+c.ticksAngle,y=l,S=l+(oe.normalizedValue(c).normal-c.minValue)/(c.maxValue-c.minValue)*c.ticksAngle;if(c.barStartPosition==="middle"){var x=.5*(c.minValue+c.maxValue);c.value<x?(y=180-(x-oe.normalizedValue(c).normal)/(c.maxValue-c.minValue)*c.ticksAngle,S=180):(y=180,S=180+(oe.normalizedValue(c).normal-x)/(c.maxValue-c.minValue)*c.ticksAngle)}else c.barStartPosition==="right"&&(y=p-S+l,S=p);return{startAngle:y,endAngle:S}}function Lr(c,l){var p=c.max/100,y=Le(c,l)-5*p,S=parseFloat(l.barStrokeWidth+"")||0,x=(parseFloat(l.barWidth+"")||0)*p,E=y-2*S-x,O=(y-E)/2,P=E+O,N=S/P,Q=l.startAngle,$=l.startAngle+l.ticksAngle;if(c.save(),c.rotate(Ho),S&&(c.beginPath(),c.arc(0,0,P,oe.radians(Q)-N,oe.radians($)+N,!1),c.strokeStyle=l.colorBarStroke,c.lineWidth=2*O,c.stroke(),c.closePath()),x&&(c.beginPath(),c.arc(0,0,P,oe.radians(Q),oe.radians($),!1),c.strokeStyle=l.colorBar,c.lineWidth=x,c.stroke(),c.closePath(),l.barShadow&&(c.save(),c.beginPath(),c.arc(0,0,y,oe.radians(Q),oe.radians($),!1),c.clip(),c.beginPath(),c.strokeStyle=l.colorBar,c.lineWidth=1,c.shadowBlur=l.barShadow,c.shadowColor=l.colorBarShadow,c.shadowOffsetX=0,c.shadowOffsetY=0,c.arc(0,0,y,oe.radians(l.startAngle),oe.radians(l.startAngle+l.ticksAngle),!1),c.stroke(),c.closePath(),c.restore()),l.barProgress)){var le=Jc(l),ge=le.startAngle,Ae=le.endAngle;c.beginPath(),c.arc(0,0,P,oe.radians(ge),oe.radians(Ae),!1),c.strokeStyle=l.colorBarProgress,c.lineWidth=x,c.stroke(),c.closePath()}c.restore()}function Gr(c){return c.options.animatedValue?c.options.value:c.value}function em(c,l,p,y,S,x,E,O){c.beginPath(),c.fillStyle=O?oe.linearGradient(c,E,O,S>x?S:x,x>S,S>x?p:y):E,l>0?oe.roundRect(c,p,y,S,x,l):c.rect(p,y,S,x),c.fill(),c.closePath()}function tm(c,l,p,y,S,x,E,O,P){c.beginPath(),c.lineWidth=l,c.strokeStyle=P?oe.linearGradient(c,O,P,E,!0,S):O,p>0?oe.roundRect(c,y,S,x,E,p):c.rect(y,S,x,E),c.stroke(),c.closePath()}function im(c,l,p,y,S,x){function E(Pe,Ue,$e,Rt){return Pe&&(!Rt&&l.borderShadowWidth&&(c.save(),c.shadowBlur=l.borderShadowWidth,c.shadowColor=l.colorBorderShadow),tm(c,Pe*O,P,p+Pe*O/2-fe,y+Pe*O/2-fe,N,ge,Ue,$e),fe+=.5*O,!Rt&&l.borderShadowWidth&&(Rt=!0,c.restore())),Rt}var O=si.pixelRatio,P=l.borderRadius*O,N=S-l.borderShadowWidth-l.borderOuterWidth*O,Q=N-l.borderOuterWidth*O-l.borderMiddleWidth*O,$=Q-l.borderMiddleWidth*O-l.borderInnerWidth*O,le=$-l.borderInnerWidth*O,ge=x-l.borderShadowWidth-l.borderOuterWidth*O,Ae=ge-l.borderOuterWidth*O-l.borderMiddleWidth*O,Ge=Ae-l.borderMiddleWidth*O-l.borderInnerWidth*O,be=Ge-l.borderInnerWidth*O,Re=p-(Q-N)/2,Ne=Re-($-Q)/2,Fe=Ne-(le-$)/2,ke=y-(Ae-ge)/2,De=ke-(Ge-Ae)/2,we=De-(be-Ge)/2,fe=0,ye=!1;return c.save(),ye=E(l.borderOuterWidth,l.colorBorderOuter,l.colorBorderOuterEnd,ye),ye=E(l.borderMiddleWidth,l.colorBorderMiddle,l.colorBorderMiddleEnd,ye),ye=E(l.borderInnerWidth,l.colorBorderInner,l.colorBorderInnerEnd,ye),!ye&&l.borderShadowWidth&&(c.shadowBlur=l.borderShadowWidth,c.shadowColor=l.colorBorderShadow),em(c,P,Fe,we,le+2*fe,be+2*fe,l.colorPlate,l.colorPlateEnd),c.restore(),[Fe,we,le,be]}function nm(c,l,p,y,S,x){var E=si.pixelRatio,O=x>=S,P=O?.85*S:x,N=O?x:S;p=O?Se(p+(S-P)/2):p;var Q=!!l.title,$=!!l.units,le=!!l.valueBox,ge=void 0,Ae=void 0,Ge=void 0;O?(Ae=Se(.05*N),ge=Se(.075*N),Ge=Se(.11*N),Q&&(N-=ge,y+=ge),$&&(N-=Ae),le&&(N-=Ge)):(Ae=ge=Se(.15*P),Q&&(P-=ge,y+=ge),$&&(P-=Ae));var be=2*l.barStrokeWidth,Re=l.barBeginCircle?Se(P*l.barBeginCircle/200-be/2):0,Ne=Se(P*l.barWidth/100-be),Fe=Se(N*l.barLength/100-be),ke=Se((N-Fe)/2),De=Se(p+(O?P/2:ke+Re)),we=Se(y+(O?N-ke-Re+be/2:P/2)),fe=!O||l.hasLeft&&l.hasRight?0:(l.hasRight?-1:1)*l.ticksWidth/100*P,ye=O||l.hasLeft&&l.hasRight?0:(l.hasRight?-1:1)*l.ticksWidth/100*P;return c.barDimensions={isVertical:O,width:P,length:N,barWidth:Ne,barLength:Fe,strokeWidth:be,barMargin:ke,radius:Re,pixelRatio:E,barOffset:null,titleMargin:Q?ge:0,unitsMargin:$?Ae:0,get ticksLength(){return this.barLength-this.barOffset-this.strokeWidth},X:p+fe,Y:y+ye,x0:De+fe,y0:we+ye,baseX:p,baseY:y,ticksPadding:l.ticksPadding/100},c.barDimensions}function Fr(c,l,p,y,S,x,E){var O=nm(c,l,y,S,x,E),P=O.isVertical,N=O.width,Q=O.barWidth,$=O.barLength,le=O.strokeWidth,ge=O.barMargin,Ae=O.radius,Ge=O.x0,be=O.y0,Re=O.X,Ne=O.Y,Fe=$;c.save(),c.beginPath();var ke=null;if(l.barBeginCircle){var De=oe.radians(P?270:0),we=Math.asin(Q/2/Ae),fe=Math.cos(we),ye=Math.sin(we),Pe=Ge+(P?Ae*ye:Ae*fe-le/2),Ue=P?be-Ae*fe:be+Ae*ye,$e=li(P?Ue-be:Pe-Ge);ke=Se($e+Ae);var Rt=P?Se(Ge-Ae*ye):Pe,jt=P?Ue:Se(be-Ae*ye);p==="progress"&&($=ke+($-ke)*(oe.normalizedValue(l).normal-l.minValue)/(l.maxValue-l.minValue));var ua=Se(Pe+$-ke+le/2),ln=Se(Ue-$+ke-le/2);c.arc(Ge,be,Ae,De+we,De-we),P?(c.moveTo(Pe,jt),c.lineTo(Pe,ln),c.lineTo(Rt,ln),c.lineTo(Rt,jt)):(c.moveTo(Pe,jt),c.lineTo(ua,jt),c.lineTo(ua,Ue),c.lineTo(Pe,Ue))}else{var Qr=Se(P?Re+(N-Q)/2:Re+ge),$r=Se(P?Ne+$+ge:Ne+(N-Q)/2);p==="progress"&&($*=(l.value-l.minValue)/(l.maxValue-l.minValue)),P?c.rect(Qr,$r,Q,-$):c.rect(Qr,$r,$,Q)}p!=="progress"&&l.barStrokeWidth&&(c.lineWidth=le,c.strokeStyle=l.colorBarStroke,c.stroke()),p!=="progress"&&l.colorBar?(c.fillStyle=l.colorBarEnd?oe.linearGradient(c,l.colorBar,l.colorBarEnd,$,P,P?Ne:Re):l.colorBar,c.fill()):p==="progress"&&l.colorBarProgress&&(c.fillStyle=l.colorBarProgressEnd?oe.linearGradient(c,l.colorBarProgress,l.colorBarProgressEnd,Fe,P,P?Ne:Re):l.colorBarProgress,c.fill()),c.closePath(),c.restore(),l.barBeginCircle&&(c.barDimensions.radius+=le),c.barDimensions.barOffset=ke,c.barDimensions.barWidth+=le,c.barDimensions.barLength+=le}function am(c,l,p,y,S,x){Fr(c,l,"",p,y,S,x)}function Br(c,l){return l.needleSide!==c||l.tickSide!==c||l.numberSide!==c}function om(c,l,p,y,S,x){l.barProgress&&Fr(c,l,"progress",p,y,S,x)}function rm(c,l){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.barWidth,O=p.barOffset,P=p.barMargin,N=p.X,Q=p.Y,$=p.ticksLength,le=p.ticksPadding,ge=S*(parseFloat(l.highlightsWidth)||0)/100;if(l.highlights&&ge){var Ae=l.tickSide!=="right",Ge=l.tickSide!=="left",be=0,Re=l.highlights.length,Ne=(S-E)/2,Fe=l.maxValue-l.minValue,ke=Se(y?N+Ne:N+P+O),De=ge,we=y?Q+x-P-O:Q+Ne,fe=Se((l.ticksWidth/100+le)*S)+(ge-l.ticksWidth/100*S),ye=Se(E+le*S);for(c.save();be<Re;be++){var Pe=l.highlights[be],Ue=$*li(l.minValue-Pe.from)/Fe,$e=$*li((Pe.to-Pe.from)/Fe);c.beginPath(),c.fillStyle=Pe.color,y?(Ae&&c.rect(ke-fe,we-Ue,De,-$e),Ge&&c.rect(ke+ye,we-Ue,De,-$e)):(Ae&&c.rect(ke+Ue,we-fe,$e,De),Ge&&c.rect(ke+Ue,we+ye,$e,De)),c.fill(),c.closePath()}c.restore()}}function Ea(c,l,p,y,S){c.beginPath(),c.moveTo(l,p),c.lineTo(y,S),c.stroke(),c.closePath()}function Ur(c,l,p,y,S,x,E,O,P){var N=c.barDimensions,Q=N.isVertical,$=N.length,le=N.barWidth,ge=N.barOffset,Ae=N.barMargin,Ge=N.pixelRatio,be=N.width,Re=N.X,Ne=N.Y,Fe=N.ticksLength,ke=N.ticksPadding,De=(be-le)/2,we=void 0,fe=void 0,ye=0,Pe=p.length,Ue=void 0,$e=P*be,Rt=De-ke*be,jt=De+le+$e+ke*be,ua=l instanceof Array?l:new Array(p.length).fill(l);c.save(),c.lineWidth=O*Ge;for(var ln=Fe/(S-y);ye<Pe;ye++)Ue=p[ye],c.strokeStyle=ua[ye],Q?(fe=Ne+$-Ae-ge+(y-Ue)*ln,x&&(we=Re+Rt,Ea(c,we,fe,Se(we-$e),fe)),E&&(we=Re+jt,Ea(c,we,fe,Se(we-$e),fe))):(we=Re+Ae+ge-(y-Ue)*ln,x&&(fe=Ne+Rt,Ea(c,we,fe,we,Se(fe-$e))),E&&(fe=Ne+jt,Ea(c,we,Se(fe),we,fe-$e)));c.restore()}function sm(c,l){var p=oe.prepareTicks(l),y=zr(p,2),S=y[0],x=y[1],E=2,O=(l.maxValue-l.minValue)/(l.majorTicks.length-1),P=l.colorMajorTicks instanceof Array?l.colorMajorTicks:new Array(l.majorTicks.length).fill(l.colorStrokeTicks||l.colorMajorTicks);if(Ur(c,P,l.exactTicks?l.majorTicks:l.majorTicks.map(function($e,Rt){return l.minValue+O*Rt}),l.minValue,l.maxValue,S,x,E,l.ticksWidth/100),l.strokeTicks){var N=c.barDimensions,Q=N.isVertical,$=N.length,le=N.width,ge=N.barWidth,Ae=N.barMargin,Ge=N.barOffset,be=N.X,Re=N.Y,Ne=N.ticksLength,Fe=N.pixelRatio,ke=N.ticksPadding,De=(le-ge)/2+ge+ke*le,we=(le-ge)/2-ke*le,fe=void 0,ye=void 0,Pe=void 0,Ue=void 0;c.strokeStyle=l.colorStrokeTicks||P[0],E*=Fe,Q?(ye=Re+$-Ae-Ge+E/2,Ue=ye-Ne-E,S&&(Pe=fe=Se(be+we),Da(c,fe,ye,Pe,Ue)),x&&(Pe=fe=Se(be+De),Da(c,fe,ye,Pe,Ue))):(fe=be+Ae+Ge-E/2,Pe=fe+Ne+E,S&&(Ue=ye=Se(Re+we),Da(c,fe,ye,Pe,Ue)),x&&(Ue=ye=Se(Re+De),Da(c,fe,ye,Pe,Ue)))}}function Da(c,l,p,y,S){c.beginPath(),c.moveTo(l,p),c.lineTo(y,S),c.stroke(),c.closePath()}function lm(c,l){var p=oe.prepareTicks(l),y=zr(p,2),S=y[0],x=y[1],E=[],O=l.minValue,P=Math.abs(l.minorTicks)||0,N=P?(l.maxValue-l.minValue)/(P*(l.majorTicks.length-1)):0;if(P)if(l.exactTicks)for(var Q=Ai.mod(l.majorTicks[0],P)||0;O<l.maxValue;O+=P)Q+O<l.maxValue&&E.push(Q+O);else for(;O<l.maxValue;O+=N)E.push(O);Ur(c,l.colorMinorTicks||l.colorStrokeTicks,E,l.minValue,l.maxValue,S,x,1,l.ticksWidthMinor/100)}function dm(c,l){var p=c.barDimensions,y=p.isVertical,S=p.length,x=p.width,E=p.barWidth,O=p.barMargin,P=p.barOffset,N=p.X,Q=p.Y,$=p.ticksLength,le=p.ticksPadding,ge=l.maxValue-l.minValue,Ae=ge/(l.majorTicks.length-1),Ge=l.exactTicks?l.majorTicks:l.majorTicks.map(function(ua,ln){return l.minValue+Ae*ln}),be=Ge.length,Re=l.numberSide!=="right",Ne=l.numberSide!=="left",Fe=l.fontNumbersSize*x/200,ke=0,De=(l.ticksWidth/100+2*le)*x,we=(x-E)/2-De,fe=(x-E)/2+E+De,ye=void 0,Pe=void 0,Ue=void 0,$e=void 0,Rt=l.colorNumbers instanceof Array?l.colorNumbers:new Array(be).fill(l.colorNumbers),jt=l.numbersMargin/100*x;for(c.font=oe.font(l,"Numbers",x/200),c.lineWidth=0,c.textAlign="center";ke<be;ke++)c.fillStyle=Rt[ke],$e=l.majorTicks[ke],Ue=l.exactTicks?$*((Ge[ke]-l.minValue)/ge):ke*$/(be-1),y?(Pe=Q+S-O-P-Ue+Fe/3,Re&&(c.textAlign="right",c.fillText($e,N+we-jt,Pe)),Ne&&(c.textAlign="left",c.fillText($e,N+fe+jt,Pe))):(c.measureText($e).width,ye=N+O+P+Ue,Re&&c.fillText($e,ye,Q+we-jt),Ne&&c.fillText($e,ye,Q+fe+Fe+jt))}function cm(c,l){if(l.title){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.baseX,O=p.baseY,P=p.titleMargin,N=l.fontTitleSize*S/200,Q=Se(E+(y?S:x)/2),$=Se(O+P/2-(y?N:N/2)-.025*(y?x:S));c.save(),c.textAlign="center",c.fillStyle=l.colorTitle,c.font=oe.font(l,"Title",S/200),c.lineWidth=0,c.fillText(l.title,Q,$,y?S:x),c.restore()}}function mm(c,l){if(l.units){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.baseX,O=p.baseY,P=p.unitsMargin,N=l.fontUnitsSize*S/200,Q=Se(E+(y?S:x)/2),$=Se(O+(y?x:S)+P/2-N/2);c.save(),c.textAlign="center",c.fillStyle=l.colorUnits,c.font=oe.font(l,"Units",S/200),c.lineWidth=0,c.fillText(oe.formatContext(l,l.units),Q,$,y?S:x),c.restore()}}function um(c,l){if(l.needle){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.barWidth,O=p.barOffset,P=p.barMargin,N=p.ticksLength,Q=p.X,$=p.Y,le=p.ticksPadding,ge=l.needleSide!=="right",Ae=l.needleSide!=="left",Ge=N*(oe.normalizedValue(l).indented-l.minValue)/(l.maxValue-l.minValue),be=(l.ticksWidth/100+le)*S,Re=E/2+be,Ne=Re*(l.needleEnd/100),Fe=void 0,ke=void 0,De=void 0,we=void 0,fe=l.needleType.toLowerCase()==="arrow"?pm:hm,ye=(S-E)/2,Pe=Re*(l.needleStart/100),Ue=ye-be-Pe,$e=ye+E+be+Pe;c.save(),oe.drawNeedleShadow(c,l),y?(De=Se($+x-P-O-Ge),ge&&(Fe=Se(Q+Ue),ke=Fe+Ne,fe(c,l,Fe,De,ke,De,Ne)),Ae&&(Fe=Se(Q+$e),ke=Fe-Ne,fe(c,l,Fe,De,ke,De,Ne,!0))):(Fe=Se(Q+P+O+Ge),ge&&(De=Se($+Ue),we=De+Ne,fe(c,l,Fe,De,Fe,we,Ne)),Ae&&(De=Se($+$e),we=De-Ne,fe(c,l,Fe,De,Fe,we,Ne,!0))),c.restore()}}function qr(c,l,p,y){return l.colorNeedleEnd?oe.linearGradient(c,y?l.colorNeedleEnd:l.colorNeedle,y?l.colorNeedle:l.colorNeedleEnd,p,!c.barDimensions.isVertical):l.colorNeedle}function hm(c,l,p,y,S,x,E,O){c.lineWidth=l.needleWidth,c.strokeStyle=qr(c,l,E,O),c.beginPath(),c.moveTo(p,y),c.lineTo(S,x),c.stroke(),c.closePath()}function pm(c,l,p,y,S,x,E,O){var P=Se(.4*E),N=E-P,Q=p===S,$=l.needleWidth/2;c.fillStyle=qr(c,l,E,O),c.beginPath(),Q?(y>x&&(N*=-1),c.moveTo(p-$,y),c.lineTo(p+$,y),c.lineTo(p+$,y+N),c.lineTo(p,x),c.lineTo(p-$,y+N),c.lineTo(p-$,y)):(p>S&&(N*=-1),c.moveTo(p,y-$),c.lineTo(p,y+$),c.lineTo(p+N,y+$),c.lineTo(S,y),c.lineTo(p+N,y-$),c.lineTo(p,y-$)),c.fill(),c.closePath()}function gm(c,l,p,y,S,x,E){var O=(parseFloat(l.fontValueSize)||0)*x/200,P=(.11*E-O)/2;c.barDimensions.isVertical&&oe.drawValueBox(c,l,p,y+x/2,S+E-O-P,x)}var zr=(function(){function c(l,p){var y=[],S=!0,x=!1,E=void 0;try{for(var O,P=l[Symbol.iterator]();!(S=(O=P.next()).done)&&(y.push(O.value),!p||y.length!==p);S=!0);}catch(N){x=!0,E=N}finally{try{!S&&P.return&&P.return()}finally{if(x)throw E}}return y}return function(l,p){if(Array.isArray(l))return l;if(Symbol.iterator in Object(l))return c(l,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),Bo=function c(l,p,y){l===null&&(l=Function.prototype);var S=Object.getOwnPropertyDescriptor(l,p);if(S===void 0){var x=Object.getPrototypeOf(l);return x===null?void 0:c(x,p,y)}if("value"in S)return S.value;var E=S.get;if(E!==void 0)return E.call(y)},fm=function c(l,p,y,S){var x=Object.getOwnPropertyDescriptor(l,p);if(x===void 0){var E=Object.getPrototypeOf(l);E!==null&&c(E,p,y,S)}else if("value"in x&&x.writable)x.value=y;else{var O=x.set;O!==void 0&&O.call(S,y)}return y},sn=(function(){function c(l,p){for(var y=0;y<p.length;y++){var S=p[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(l,S.key,S)}}return function(l,p,y){return p&&c(l.prototype,p),y&&c(l,y),l}})(),Pa=null,bm=(function(){function c(){i(this,c),this._events={},this.addListener=this.on,this.removeListener=this.off}return sn(c,[{key:"emit",value:function(l){if(this._events[l]){for(var p=0,y=this._events[l].length,S=arguments.length,x=Array(S>1?S-1:0),E=1;E<S;E++)x[E-1]=arguments[E];for(;p<y;p++)this._events[l][p]&&this._events[l][p].apply(this,x)}}},{key:"once",value:function(l){for(var p=arguments.length,y=Array(p>1?p-1:0),S=1;S<p;S++)y[S-1]=arguments[S];for(var x=0,E=y.length,O=this;x<E;x++)(function(){var P=y[x],N=function Q(){O.off(l,Q),P.apply(O,arguments)};y[x]=N})();this.on.apply(this,[l].concat(y))}},{key:"on",value:function(l){this._events[l]||(this._events[l]=[]);for(var p=0,y=arguments.length<=1?0:arguments.length-1;p<y;p++)this._events[l].push(arguments.length<=p+1?void 0:arguments[p+1])}},{key:"off",value:function(l){if(this._events[l])for(var p=0,y=arguments.length<=1?0:arguments.length-1;p<y;p++)for(var S=arguments.length<=p+1?void 0:arguments[p+1],x=void 0;~(x=this._events[l].indexOf(S));)this._events[l].splice(x,1)}},{key:"removeAllListeners",value:function(l){delete this._events[l]}},{key:"listeners",get:function(){return this._events}}]),c})(),Hr=a("requestAnimationFrame")||function(c){return setTimeout(function(){return c(new Date().getTime())},1e3/60)},da={linear:function(c){return c},quad:function(c){return Math.pow(c,2)},dequad:function(c){return 1-da.quad(1-c)},quint:function(c){return Math.pow(c,5)},dequint:function(c){return 1-Math.pow(1-c,5)},cycle:function(c){return 1-Math.sin(Math.acos(c))},decycle:function(c){return Math.sin(Math.acos(1-c))},bounce:function(c){return 1-da.debounce(1-c)},debounce:function(c){for(var l=0,p=1;;l+=p,p/=2)if(c>=(7-4*l)/11)return-Math.pow((11-6*l-11*c)/4,2)+Math.pow(p,2)},elastic:function(c){return 1-da.delastic(1-c)},delastic:function(c){return Math.pow(2,10*(c-1))*Math.cos(20*Math.PI*1.5/3*c)}},Uo=(function(){function c(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"linear",p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:250,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){};if(i(this,c),this.duration=p,this.rule=l,this.draw=y,this.end=S,typeof this.draw!="function")throw new TypeError("Invalid animation draw callback:",y);if(typeof this.end!="function")throw new TypeError("Invalid animation end callback:",S)}return sn(c,[{key:"animate",value:function(l,p){var y=this;this.frame&&this.cancel();var S=window.performance&&window.performance.now?window.performance.now():a("animationStartTime")||Date.now();l=l||this.draw,p=p||this.end,this.draw=l,this.end=p,this.frame=Hr(function(x){return r(x,l,S,da[y.rule]||y.rule,y.duration,p,y)})}},{key:"cancel",value:function(){this.frame&&((a("cancelAnimationFrame")||function(l){})(this.frame),this.frame=null)}},{key:"destroy",value:function(){this.cancel(),this.draw=null,this.end=null}}]),c})();Uo.rules=da;var wn=(function(){function c(l,p,y){i(this,c),this.options=l,this.element=p.toLowerCase(),this.type=c.toDashed(y),this.Type=n[y],this.mutationsObserved=!1,this.isObservable=!!window.MutationObserver,window.GAUGES_NO_AUTO_INIT||c.domReady(this.traverse.bind(this))}return sn(c,[{key:"isValidNode",value:function(l){return!(!l.tagName||l.tagName.toLowerCase()!==this.element||l.getAttribute("data-type")!==this.type)}},{key:"traverse",value:function(){for(var l=document.getElementsByTagName(this.element),p=0,y=l.length;p<y;p++)this.process(l[p]);this.isObservable&&!this.mutationsObserved&&(new MutationObserver(this.observe.bind(this)).observe(document.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.mutationsObserved=!0)}},{key:"observe",value:function(l){for(var p=0,y=l.length;p<y;p++){var S=l[p];if(S.type==="attributes"&&S.attributeName==="data-type"&&this.isValidNode(S.target)&&S.oldValue!==this.type)setTimeout(this.process.bind(this,S.target));else if(S.addedNodes&&S.addedNodes.length)for(var x=0,E=S.addedNodes.length;x<E;x++)setTimeout(this.process.bind(this,S.addedNodes[x]))}}},{key:"process",value:function(l){var p=this;if(!this.isValidNode(l))return null;var y=void 0,S=JSON.parse(JSON.stringify(this.options)),x=null;for(y in S)if(S.hasOwnProperty(y)){var E=c.toAttributeName(y),O=c.parse(l.getAttribute(E));O!=null&&(S[y]=O)}return S.renderTo=l,x=new this.Type(S),x.draw&&x.draw(),this.isObservable&&(x.observer=new MutationObserver(function(P){P.forEach(function(N){if(N.type==="attributes"){var Q=N.attributeName.toLowerCase(),$=l.getAttribute(Q).toLowerCase();if(Q==="data-type"&&$&&$!==p.type)x.observer.disconnect(),delete x.observer,x.destroy&&x.destroy();else if(Q.substr(0,5)==="data-"){var le=Q.substr(5).split("-").map(function(Ae,Ge){return Ge?Ae.charAt(0).toUpperCase()+Ae.substr(1):Ae}).join(""),ge={};ge[le]=c.parse(l.getAttribute(N.attributeName)),le==="value"?x&&(x.value=ge[le]):x.update&&x.update(ge)}}})}),x.observer.observe(l,{attributes:!0})),x}}],[{key:"parse",value:function(l){if(l==="true")return!0;if(l==="false")return!1;if(l!=="undefined"){if(l==="null")return null;if(/^[-+#.\w\d\s]+(?:,[-+#.\w\d\s]*)+$/.test(l))return l.split(",");try{return JSON.parse(l)}catch{}return l}}},{key:"toDashed",value:function(l){for(var p=l.split(/(?=[A-Z])/),y=1,S=p.length,x=p[0].toLowerCase();y<S;y++)x+="-"+p[y].toLowerCase();return x}},{key:"toCamelCase",value:function(l){for(var p=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],y=l.split(/-/),S=0,x=y.length,E="";S<x;S++)E+=S||p?y[S][0].toUpperCase()+y[S].substr(1).toLowerCase():y[S].toLowerCase();return E}},{key:"toAttributeName",value:function(l){return"data-"+c.toDashed(l)}},{key:"domReady",value:function(l){if(/comp|inter|loaded/.test((window.document||{}).readyState+""))return l();window.addEventListener?window.addEventListener("DOMContentLoaded",l,!1):window.attachEvent&&window.attachEvent("onload",l)}}]),c})(),si=(function(){function c(l,p,y){i(this,c),c.collection.push(this),this.width=p||0,this.height=y||0,this.element=l,this.init()}return sn(c,[{key:"init",value:function(){var l=c.pixelRatio;this.element.width=this.width*l,this.element.height=this.height*l,this.element.style.width=this.width+"px",this.element.style.height=this.height+"px",this.elementClone=this.element.cloneNode(!0),this.context=this.element.getContext("2d"),this.contextClone=this.elementClone.getContext("2d"),this.drawWidth=this.element.width,this.drawHeight=this.element.height,this.drawX=this.drawWidth/2,this.drawY=this.drawHeight/2,this.minSide=this.drawX<this.drawY?this.drawX:this.drawY,this.contextClone.translate(this.drawX,this.drawY),this.elementClone.initialized=!1,this.context.translate(this.drawX,this.drawY),this.context.max=this.contextClone.max=this.minSide,this.context.maxRadius=this.contextClone.maxRadius=null}},{key:"destroy",value:function(){var l=c.collection.indexOf(this);~l&&c.collection.splice(l,1),this.context.clearRect(-this.drawX,-this.drawY,this.drawWidth,this.drawHeight),this.context.max=null,delete this.context.max,this.context.maxRadius=null,delete this.context.maxRadius,this.context=null,this.contextClone=null,this.elementClone=null,this.element=null,this.onRedraw=null}},{key:"commit",value:function(){var l=c.pixelRatio;return l!==1&&this.contextClone.scale(l,l),this}},{key:"redraw",value:function(){return this.init(),this.onRedraw&&this.onRedraw(),this}}],[{key:"redraw",value:function(){for(var l=0,p=c.collection.length;l<p;l++)c.collection[l].redraw()}},{key:"pixelRatio",get:function(){return window.devicePixelRatio||1}}]),c})();si.collection=[],window.matchMedia&&window.matchMedia("screen and (min-resolution: 2dppx)").addListener(si.redraw);var qo={renderTo:null,width:0,height:0,minValue:0,maxValue:100,value:0,units:!1,exactTicks:!1,majorTicks:[0,20,40,60,80,100],minorTicks:10,strokeTicks:!0,animatedValue:!1,animateOnInit:!1,title:!1,borders:!0,numbersMargin:1,listeners:null,valueInt:3,valueDec:2,majorTicksInt:1,majorTicksDec:0,animation:!0,animationDuration:500,animationRule:"cycle",colorPlate:"#fff",colorPlateEnd:"",colorMajorTicks:"#444",colorMinorTicks:"#666",colorStrokeTicks:"",colorTitle:"#888",colorUnits:"#888",colorNumbers:"#444",colorNeedle:"rgba(240,128,128,1)",colorNeedleEnd:"rgba(255,160,122,.9)",colorValueText:"#444",colorValueTextShadow:"rgba(0,0,0,0.3)",colorBorderShadow:"rgba(0,0,0,0.5)",colorBorderOuter:"#ddd",colorBorderOuterEnd:"#aaa",colorBorderMiddle:"#eee",colorBorderMiddleEnd:"#f0f0f0",colorBorderInner:"#fafafa",colorBorderInnerEnd:"#ccc",colorValueBoxRect:"#888",colorValueBoxRectEnd:"#666",colorValueBoxBackground:"#babab2",colorValueBoxShadow:"rgba(0,0,0,1)",colorNeedleShadowUp:"rgba(2,255,255,0.2)",colorNeedleShadowDown:"rgba(188,143,143,0.45)",colorBarStroke:"#222",colorBar:"#ccc",colorBarProgress:"#888",colorBarShadow:"#000",fontNumbers:"Arial",fontTitle:"Arial",fontUnits:"Arial",fontValue:"Arial",fontNumbersSize:20,fontTitleSize:24,fontUnitsSize:22,fontValueSize:26,fontNumbersStyle:"normal",fontTitleStyle:"normal",fontUnitsStyle:"normal",fontValueStyle:"normal",fontNumbersWeight:"normal",fontTitleWeight:"normal",fontUnitsWeight:"normal",fontValueWeight:"normal",needle:!0,needleShadow:!0,needleType:"arrow",needleStart:5,needleEnd:85,needleWidth:4,borderOuterWidth:3,borderMiddleWidth:3,borderInnerWidth:3,borderShadowWidth:3,valueBox:!0,valueBoxStroke:5,valueBoxWidth:0,valueText:"",valueTextShadow:!0,valueBoxBorderRadius:2.5,highlights:[{from:20,to:60,color:"#eee"},{from:60,to:80,color:"#ccc"},{from:80,to:100,color:"#999"}],highlightsWidth:15,highlightsLineCap:"butt",barWidth:20,barStrokeWidth:0,barProgress:!0,barShadow:0};s.prototype=Object.create(Array.prototype),s.prototype.constructor=s,s.prototype.get=function(c){if(typeof c=="string")for(var l=0,p=this.length;l<p;l++){var y=this[l].options.renderTo.tagName?this[l].options.renderTo:document.getElementById(this[l].options.renderTo||"");if(y.getAttribute("id")===c)return this[l]}else if(typeof c=="number")return this[c];return null};var zo="2.2.1",Se=Math.round,li=Math.abs,ca=new s;ca.version=zo;var Ai=(function(c){function l(p){i(this,l);var y=e(this,(l.__proto__||Object.getPrototypeOf(l)).call(this)),S=y.constructor.name;if(S==="BaseGauge")throw new TypeError("Attempt to instantiate abstract class!");if(ca.push(y),p.listeners&&Object.keys(p.listeners).forEach(function(E){(p.listeners[E]instanceof Array?p.listeners[E]:[p.listeners[E]]).forEach(function(O){y.on(E,O)})}),y.version=zo,y.type=n[S]||l,y.initialized=!1,p.minValue=parseFloat(p.minValue),p.maxValue=parseFloat(p.maxValue),p.value=parseFloat(p.value)||0,p.borders||(p.borderInnerWidth=p.borderMiddleWidth=p.borderOuterWidth=0),!p.renderTo)throw TypeError("Canvas element was not specified when creating the Gauge object!");var x=p.renderTo.tagName?p.renderTo:document.getElementById(p.renderTo);if(!(x instanceof HTMLCanvasElement))throw TypeError("Given gauge canvas element is invalid!");return p.width=parseFloat(p.width)||0,p.height=parseFloat(p.height)||0,p.width&&p.height||(p.width||(p.width=x.parentNode?x.parentNode.offsetWidth:x.offsetWidth),p.height||(p.height=x.parentNode?x.parentNode.offsetHeight:x.offsetHeight)),y.options=p||{},y.options.animateOnInit&&(y._value=y.options.value,y.options.value=y.options.minValue),y.canvas=new si(x,p.width,p.height),y.canvas.onRedraw=y.draw.bind(y),y.animation=new Uo(p.animationRule,p.animationDuration),y}return t(l,c),sn(l,[{key:"update",value:function(p){return Object.assign(this.options,this.type.configure(p||{})),this.canvas.width=this.options.width,this.canvas.height=this.options.height,this.animation.rule=this.options.animationRule,this.animation.duration=this.options.animationDuration,this.canvas.redraw(),this}},{key:"destroy",value:function(){var p=ca.indexOf(this);~p&&ca.splice(p,1),this.canvas.destroy(),this.canvas=null,this.animation.destroy(),this.animation=null,this.emit("destroy")}},{key:"draw",value:function(){return this.options.animateOnInit&&!this.initialized&&(this.value=this._value,this.initialized=!0,this.emit("init")),this.emit("render"),this}},{key:"value",set:function(p){var y=this;p=l.ensureValue(p,this.options.minValue);var S=this.options.value;if(p!==S)if(this.options.animation){if(this.animation.frame&&(this.options.value=this._value,this._value===p))return this.animation.cancel(),void delete this._value;this._value===void 0&&(this._value=p),this.emit("animationStart"),this.animation.animate(function(x){var E=S+(p-S)*x;y.options.animatedValue&&y.emit("value",E,y.value),y.options.value=E,y.draw(),y.emit("animate",x,y.options.value)},function(){y._value!==void 0&&(y.emit("value",y._value,y.value),y.options.value=y._value,delete y._value),y.draw(),y.emit("animationEnd"),y.animation.frame=null})}else this.emit("value",p,this.value),this.options.value=p,this.draw()},get:function(){return this._value===void 0?this.options.value:this._value}}],[{key:"configure",value:function(p){return p}},{key:"initialize",value:function(p,y){return new wn(y,"canvas",p)}},{key:"fromElement",value:function(p){var y=wn.toCamelCase(p.getAttribute("data-type")),S=p.attributes,x=0,E=S.length,O={};if(y){for(/Gauge$/.test(y)||(y+="Gauge");x<E;x++)O[wn.toCamelCase(S[x].name.replace(/^data-/,""),!1)]=wn.parse(S[x].value);new wn(O,p.tagName,y).process(p)}}},{key:"ensureValue",value:function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return p=parseFloat(p),!isNaN(p)&&isFinite(p)||(p=parseFloat(y)||0),p}},{key:"mod",value:function(p,y){return(p%y+y)%y}},{key:"version",get:function(){return zo}}]),l})(bm);n!==void 0&&(n.BaseGauge=Ai,n.gauges=(window.document||{}).gauges=ca);var Am=/{([_a-zA-Z]+[_a-zA-Z0-9]*)}/g,oe={roundRect:C,padValue:M,formatMajorTickNumber:V,radians:D,radialPoint:j,linearGradient:Z,drawNeedleShadow:J,drawValueBox:Te,verifyError:h,prepareTicks:b,font:ee,normalizedValue:Qe,formatContext:f},ma=Math.PI,Ho=ma/2,jr=Object.assign({},qo,{ticksAngle:270,startAngle:45,colorNeedleCircleOuter:"#f0f0f0",colorNeedleCircleOuterEnd:"#ccc",colorNeedleCircleInner:"#e8e8e8",colorNeedleCircleInnerEnd:"#f5f5f5",needleCircleSize:10,needleCircleInner:!0,needleCircleOuter:!0,needleStart:20,animationTarget:"needle",useMinPath:!1,barWidth:0,barStartPosition:"left"}),vm=(function(c){function l(p){return i(this,l),p=Object.assign({},jr,p||{}),e(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l.configure(p)))}return t(l,c),sn(l,[{key:"draw",value:function(){try{var p=this.canvas,y=[-p.drawX,-p.drawY,p.drawWidth,p.drawHeight],S=y[0],x=y[1],E=y[2],O=y[3],P=this.options;if(P.animationTarget==="needle"){if(!p.elementClone.initialized){var N=p.contextClone;N.clearRect(S,x,E,O),this.emit("beforePlate"),Me(N,P),this.emit("beforeHighlights"),ze(N,P),this.emit("beforeMinorTicks"),He(N,P),this.emit("beforeMajorTicks"),rt(N,P),this.emit("beforeNumbers"),Ta(N,P),this.emit("beforeTitle"),Rr(N,P),this.emit("beforeUnits"),Nr(N,P),p.elementClone.initialized=!0}this.canvas.commit(),p.context.clearRect(S,x,E,O),p.context.drawImage(p.elementClone,S,x,E,O),this.emit("beforeProgressBar"),Lr(p.context,P),this.emit("beforeValueBox"),Wr(p.context,P,Gr(this)),this.emit("beforeNeedle"),Vr(p.context,P)}else{var Q=-oe.radians((P.value-P.minValue)/(P.maxValue-P.minValue)*P.ticksAngle);if(p.context.clearRect(S,x,E,O),this.emit("beforePlate"),Me(p.context,P),p.context.rotate(Q),this.emit("beforeHighlights"),ze(p.context,P),this.emit("beforeMinorTicks"),He(p.context,P),this.emit("beforeMajorTicks"),rt(p.context,P),this.emit("beforeNumbers"),Ta(p.context,P),this.emit("beforeProgressBar"),Lr(p.context,P),p.context.rotate(-Q),!p.elementClone.initialized){var $=p.contextClone;$.clearRect(S,x,E,O),this.emit("beforeTitle"),Rr($,P),this.emit("beforeUnits"),Nr($,P),this.emit("beforeNeedle"),Vr($,P),p.elementClone.initialized=!0}p.context.drawImage(p.elementClone,S,x,E,O)}this.emit("beforeValueBox"),Wr(p.context,P,Gr(this)),Bo(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"draw",this).call(this)}catch(le){oe.verifyError(le)}return this}},{key:"value",set:function(p){p=Ai.ensureValue(p,this.options.minValue),this.options.animation&&this.options.ticksAngle===360&&this.options.useMinPath&&(this._value=p,p=this.options.value+((p-this.options.value)%360+540)%360-180),fm(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"value",p,this)},get:function(){return Bo(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"value",this)}}],[{key:"configure",value:function(p){return p.barWidth>50&&(p.barWidth=50),isNaN(p.startAngle)&&(p.startAngle=45),isNaN(p.ticksAngle)&&(p.ticksAngle=270),p.ticksAngle>360&&(p.ticksAngle=360),p.ticksAngle<0&&(p.ticksAngle=0),p.startAngle<0&&(p.startAngle=0),p.startAngle>360&&(p.startAngle=360),p}}]),l})(Ai);n!==void 0&&(n.RadialGauge=vm),Ai.initialize("RadialGauge",jr);var Yr=Object.assign({},qo,{borderRadius:0,barBeginCircle:30,colorBarEnd:"",colorBarProgressEnd:"",needleWidth:6,tickSide:"both",needleSide:"both",numberSide:"both",ticksWidth:10,ticksWidthMinor:5,ticksPadding:5,barLength:85,fontTitleSize:26,highlightsWidth:10}),ym=(function(c){function l(p){return i(this,l),p=Object.assign({},Yr,p||{}),e(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l.configure(p)))}return t(l,c),sn(l,[{key:"draw",value:function(){try{var p=this.canvas,y=[-p.drawX,-p.drawY,p.drawWidth,p.drawHeight],S=y[0],x=y[1],E=y[2],O=y[3],P=this.options;if(!p.elementClone.initialized){var N=p.contextClone;N.clearRect(S,x,E,O),this.emit("beforePlate"),this.drawBox=im(N,P,S,x,E,O),this.emit("beforeBar"),am.apply(void 0,[N,P].concat(o(this.drawBox))),p.contextClone.barDimensions=N.barDimensions,this.emit("beforeHighlights"),rm(N,P),this.emit("beforeMinorTicks"),lm(N,P),this.emit("beforeMajorTicks"),sm(N,P),this.emit("beforeNumbers"),dm(N,P),this.emit("beforeTitle"),cm(N,P),this.emit("beforeUnits"),mm(N,P),p.elementClone.initialized=!0}this.canvas.commit(),p.context.clearRect(S,x,E,O),p.context.drawImage(p.elementClone,S,x,E,O),this.emit("beforeProgressBar"),om.apply(void 0,[p.context,P].concat(o(this.drawBox))),this.emit("beforeNeedle"),um(p.context,P),this.emit("beforeValueBox"),gm.apply(void 0,[p.context,P,P.animatedValue?this.options.value:this.value].concat(o(this.drawBox))),Bo(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"draw",this).call(this)}catch(Q){oe.verifyError(Q)}return this}}],[{key:"configure",value:function(p){return p.barStrokeWidth>=p.barWidth&&(p.barStrokeWidth=Se(p.barWidth/2)),p.hasLeft=Br("right",p),p.hasRight=Br("left",p),p.value>p.maxValue&&(p.value=p.maxValue),p.value<p.minValue&&(p.value=p.minValue),Ai.configure(p)}}]),l})(Ai);n!==void 0&&(n.LinearGauge=ym),Ai.initialize("LinearGauge",Yr),typeof Eo<"u"&&Object.assign(n,{Collection:s,GenericOptions:qo,Animation:Uo,BaseGauge:Ai,drawings:oe,SmartCanvas:si,DomObserver:wn,vendorize:a})})(typeof Eo<"u"?Eo.exports:window)});var Ei=(()=>{class n{appSettings=A(Zt);data=A(Ci);_svcDatasetConfigs=[];_svcDataSource=[];_svcSubjectObserverRegistry=[];signedAnglePaths=new Set(["self.navigation.attitude.roll","self.navigation.attitude.pitch","self.navigation.attitude.yaw","self.environment.wind.angleApparent","self.environment.wind.angleTrueGround","self.environment.wind.angleTrueWater","self.steering.rudderAngle"]);constructor(){this._svcDatasetConfigs=this.appSettings.getDataSets(),this.cleanupDatasets(),this.startAll()}cleanupDatasets(){if(this.appSettings.configUpgrade()||this.appSettings.getAppConfig().configVersion<12)return;let t=this.appSettings.getDashboardConfig(),i=new Set;t.forEach(h=>{h.configuration?.forEach(f=>{f?.id&&i.add(f.id)})});function a(h){let f=h.match(/^(windtrends|speedtrends)-(.+)$/);return f?f[2]:null}let r=[],s=[];for(let h of this._svcDatasetConfigs){let f=h.label||"",b=!1;if(f.startsWith("windtrends-")||f.startsWith("speedtrends-")){let C=a(f);b=!!(C&&i.has(C))}else(f.startsWith("simple-chart-")||(f.match(/\|/g)||[]).length===4)&&(b=i.has(h.uuid));b?s.push(h):r.push(h)}r.length&&(r.forEach(h=>{console.warn(`[DatasetService] Cleaned dataset: uuid=${h.uuid}, label="${h.label}"`)}),this._svcDatasetConfigs=s,this.appSettings.saveDataSets(this._svcDatasetConfigs))}setupServiceSubjectRegistry(e,t){let i=this._svcSubjectObserverRegistry.findIndex(a=>a.datasetUuid==e);i>=0&&(this._svcSubjectObserverRegistry[i].rxjsSubject.complete(),this._svcSubjectObserverRegistry.splice(i,1)),this._svcSubjectObserverRegistry.push({datasetUuid:e,rxjsSubject:new Xr(t)})}createDataSourceConfiguration(e){let i={uuid:e.uuid,pathObserverSubscription:null,sampleTime:null,maxDataPoints:null,smoothingPeriod:null,historicalData:[]};switch(e.timeScaleFormat){case"Last 30 Minutes":i.maxDataPoints=120,i.sampleTime=15e3,i.smoothingPeriod=50;break;case"Last 5 Minutes":i.maxDataPoints=60,i.sampleTime=5e3,i.smoothingPeriod=25;break;case"Last Minute":i.maxDataPoints=60,i.sampleTime=1e3,i.smoothingPeriod=25;break;case"hour":i.maxDataPoints=e.period*120,i.sampleTime=3e4,i.smoothingPeriod=Math.floor(i.maxDataPoints*.25);break;case"minute":i.maxDataPoints=e.period*60,i.sampleTime=1e3,i.smoothingPeriod=Math.floor(i.maxDataPoints*.25);break;default:i.maxDataPoints=e.period*5,i.sampleTime=200,i.smoothingPeriod=Math.floor(i.maxDataPoints*.25);break}return(!i.maxDataPoints||i.maxDataPoints<1)&&(i.maxDataPoints=1),i}startAll(){console.log("[Dataset Service] Auto Starting "+this._svcDatasetConfigs.length.toString()+" Datasets");for(let e of this._svcDatasetConfigs)this.start(e.uuid)}start(e){let t=this._svcDatasetConfigs.find(h=>h.uuid==e);if(!t){console.warn(`[Dataset Service] Dataset UUID:${e} not found`);return}let i=this.createDataSourceConfiguration(t);this.setupServiceSubjectRegistry(i.uuid,i.maxDataPoints);let a=this._svcDataSource[this._svcDataSource.push(i)-1];console.log(`[Dataset Service] Starting recording process: ${t.path}, Scale: ${t.timeScaleFormat}, Period: ${t.period}, Datapoints: ${i.maxDataPoints}`);function r(h){return f=>xn(h).pipe(cs(f,(b,C)=>C))}let s=this.resolveAngleDomain(t.path,t.baseUnit);a.pathObserverSubscription=this.data.subscribePath(t.path,t.pathSource).pipe(r(i.sampleTime)).subscribe(h=>{if(h.data.value===null)return;a.maxDataPoints>0&&a.historicalData.length>=a.maxDataPoints&&a.historicalData.shift(),a.historicalData.push(h.data.value);let f=this.updateDataset(a,t.baseUnit,s);this._svcSubjectObserverRegistry.find(b=>b.datasetUuid===a.uuid).rxjsSubject.next(f)})}stop(e){let t=this._svcDataSource.findIndex(i=>i.uuid==e);console.log(`[Dataset Service] Stopping Dataset ${e} data capture`),this._svcDataSource[t].pathObserverSubscription.unsubscribe(),this._svcDataSource.splice(t,1)}list(){return qt(this._svcDatasetConfigs)}getDatasetConfig(e){return this._svcDatasetConfigs.find(t=>t.uuid===e)}getDataSourceInfo(e){return this._svcDataSource.find(t=>t.uuid===e)}create(e,t,i,a,r,s=!0,h=!0,f){if(!e||!t||!i||!a||!r)return null;let b=f||qi.create(),C={uuid:b,path:e,pathSource:t,baseUnit:this.data.getPathUnitType(e),timeScaleFormat:i,period:a,label:r,editable:h};return console.log(`[Dataset Service] Creating ${s?"":"non-"}persistent ${h?"":"hidden "}dataset: ${C.uuid}, Path: ${C.path}, Source: ${C.pathSource} Scale: ${C.timeScaleFormat}, Period: ${C.period}`),this._svcDatasetConfigs.push(C),this.start(b),s===!0&&this.appSettings.saveDataSets(this._svcDatasetConfigs),b}edit(e,t=!0){let i=this._svcDatasetConfigs.find(a=>a.uuid===e.uuid);return i?JSON.stringify(i)===JSON.stringify(e)?(console.log(`[Dataset Service] No changes detected for Dataset ${e.uuid}.`),!1):(this.stop(e.uuid),console.log(`[Dataset Service] Updating Dataset: ${e.uuid}`),e.baseUnit=this.data.getPathUnitType(e.path),this._svcDatasetConfigs.splice(this._svcDatasetConfigs.findIndex(a=>a.uuid===e.uuid),1,e),this.start(e.uuid),t===!0&&this.appSettings.saveDataSets(this._svcDatasetConfigs),!0):!1}remove(e,t=!0){return!e||e===""||this._svcDatasetConfigs.findIndex(i=>i.uuid===e)===-1?!1:(this.stop(e),console.log(`[Dataset Service] Removing ${t?"":"non-"}persistent Dataset: ${e}`),this._svcDatasetConfigs.splice(this._svcDatasetConfigs.findIndex(i=>i.uuid===e),1),this._svcSubjectObserverRegistry.find(i=>i.datasetUuid===e).rxjsSubject.complete(),this._svcSubjectObserverRegistry.splice(this._svcSubjectObserverRegistry.findIndex(i=>i.datasetUuid===e),1),t===!0&&this.appSettings.saveDataSets(this._svcDatasetConfigs),!0)}getDatasetObservable(e){let t=this._svcSubjectObserverRegistry.find(i=>i.datasetUuid==e);return t?t.rxjsSubject.asObservable():null}getDatasetBatchThenLiveObservable(e){let t=this._svcSubjectObserverRegistry.find(h=>h.datasetUuid==e);if(!t)return null;let i=t.rxjsSubject,a=i._buffer?i._buffer.slice():[],r=Kr([a]),s=i.pipe(ds(a.length));return ts(r,s)}updateDataset(e,t,i="scalar"){let a=null,r=null,s=null,h=null;if(t==="rad"){a=this.circularMeanRad(e.historicalData);let M=e.historicalData.slice(-e.smoothingPeriod);r=this.circularMeanRad(M);let{min:V,max:D}=this.circularMinMaxRad(e.historicalData);i==="direction"?(a=this.normalizeToDirection(a),r=this.normalizeToDirection(r),s=this.normalizeToDirection(V),h=this.normalizeToDirection(D)):i==="signed"?(a=this.normalizeToSigned(a),r=this.normalizeToSigned(r),s=this.normalizeToSigned(V),h=this.normalizeToSigned(D)):(s=V,h=D)}else a=b(e.historicalData),r=C(e.historicalData,e.smoothingPeriod),s=Math.min(...e.historicalData),h=Math.max(...e.historicalData);return{timestamp:Date.now(),data:{value:t==="rad"?i==="signed"?this.normalizeToSigned(e.historicalData[e.historicalData.length-1]):this.normalizeToDirection(e.historicalData[e.historicalData.length-1]):e.historicalData[e.historicalData.length-1],sma:r,ema:null,doubleEma:null,lastAverage:a,lastMinimum:s,lastMaximum:h}};function b(M){return M.length===0?null:M.reduce((D,j)=>D+j,0)/M.length}function C(M,V){M.length<V&&(V=M.length);let D=0;for(let j=M.length-V;j<M.length;j++)D+=M[j];return D/V}}circularMeanRad(e){if(e.length===0)return 0;let t=e.reduce((a,r)=>a+Math.sin(r),0),i=e.reduce((a,r)=>a+Math.cos(r),0);return Math.atan2(t/e.length,i/e.length)}circularMinMaxRad(e){if(e.length===0)return{min:0,max:0};let t=e.map(h=>(h*180/Math.PI+360)%360).sort((h,f)=>h-f),i=0,a=0;for(let h=0;h<t.length;h++){let f=(h+1)%t.length,b=(t[f]-t[h]+360)%360;b>i&&(i=b,a=f)}let r=t[a]*Math.PI/180,s=t[(a-1+t.length)%t.length]*Math.PI/180;return{min:r,max:s}}resolveAngleDomain(e,t){if(t!=="rad")return"scalar";let i=this.normalizePathKey(e);for(let a of this.signedAnglePaths)if(i===this.normalizePathKey(a))return"signed";return"direction"}normalizePathKey(e){return e.replace(/^vessels\.self\./,"").replace(/^self\./,"")}mod(e,t){return(e%t+t)%t}normalizeToDirection(e){let t=2*Math.PI;return this.mod(e,t)}normalizeToSigned(e){let t=2*Math.PI;return this.mod(e+Math.PI,t)-Math.PI}removeIfExists(e,t=!0){return!e||this._svcDatasetConfigs.findIndex(i=>i.uuid===e)===-1?!1:this.remove(e,t)}ngOnDestroy(){[...this._svcDataSource].forEach(e=>{try{this.stop(e.uuid)}catch{}}),this._svcSubjectObserverRegistry.forEach(e=>e.rxjsSubject.complete()),this._svcSubjectObserverRegistry=[]}static \u0275fac=function(t){return new(t||n)};static \u0275prov=pt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var kl=(()=>{class n{kipTimers={};constructor(){}createTimer(e,t,i){return e in this.kipTimers?this.kipTimers[e].currentValue.asObservable():(this.kipTimers[e]={currentValue:new Ia(t),timeoutID:null,intervalMS:i},this.kipTimers[e].currentValue.asObservable())}startTimer(e){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&this.kipTimers[e].timeoutID===null&&(this.kipTimers[e].timeoutID=setInterval(()=>{this.kipTimers[e].currentValue.next(this.kipTimers[e].currentValue.value+1)},this.kipTimers[e].intervalMS))}stopTimer(e){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&this.kipTimers[e].timeoutID!==null&&(clearInterval(this.kipTimers[e].timeoutID),this.kipTimers[e].timeoutID=null)}setTimer(e,t){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&this.kipTimers[e].currentValue.next(t)}deleteTimer(e){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&(this.stopTimer(e),this.kipTimers[e].currentValue.complete(),delete this.kipTimers[e])}isRunning(e){let t=!1;return e in this.kipTimers&&(t=this.kipTimers[e].timeoutID!==null),t}ngOnDestroy(){Object.keys(this.kipTimers).forEach(e=>{this.kipTimers[e].timeoutID&&(clearInterval(this.kipTimers[e].timeoutID),this.kipTimers[e].timeoutID=null),this.kipTimers[e].currentValue.complete()}),this.kipTimers={}}static \u0275fac=function(t){return new(t||n)};static \u0275prov=pt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Tl=(()=>{class n{sanitizer=A(Za);transform(e){return this.sanitizer.bypassSecurityTrustResourceUrl(e)}static \u0275fac=function(t){return new(t||n)};static \u0275pipe=Fa({name:"safe",type:n,pure:!0})}return n})();var Sm={minDist:230,maxDur:550,minVelocity:1.5,axisDominance:1.8,deadzoneMs:160,purityRatio:.8,lockThreshold:28,directionLockAngle:25,reversalPrimaryThreshold:34};function go(n){let o=Be(Be({},Sm),n);return`(() => {
1
+ import{A as wl,B as Jo,C as er,D as tr,E as ir,F as jn,G as Ca,H as xl,I as _l,J as Yn,K as Ji,L as Et,M as Qn,N as $n,O as Zn,P as ho,Q as po,R as Ml,S as Xn,T as Kn,a as Gt,b as ni,c as oo,d as vl,e as yl,f as Cl,g as Sl,h as Ye,i as Zi,j as Xi,k as ro,l as pn,m as va,n as ui,o as Ki,p as zt,q as so,r as lo,s as Hn,t as gn,u as co,v as mo,w as hi,x as Ko,y as uo,z as ya}from"./chunk-QVCMARCU.js";import{a as Al,b as ao}from"./chunk-RYHOAWDD.js";import{a as ii,b as $i,c as ot}from"./chunk-PKKBBIJK.js";import{a as dl,b as cl,c as ml,d as zn,e as ul,f as Tt,g as hl,h as pl,i as gl,k as fl,m as Aa,n as bl}from"./chunk-HIADZ4BV.js";import{a as wt,b as Lt}from"./chunk-S7WGIMJE.js";import{a as sl,b as ll}from"./chunk-OQULS6SV.js";import{A as bt,B as ti,a as me,c as Ws,d as Ci,e as Zs,f as Xs,g as Ks,h as Si,i as wi,k as Js,l as xi,m as _i,n as Mi,o as zi,p as Kt,r as ut,s as Yi,t as ol,u as Qi,w as rl,y as ht,z as ei}from"./chunk-QLTN6G6E.js";import{A as Bn,B as ki,C as Ti,D as kt,E as nl,F as al,G as Hi,H as Un,I as ji,J as mt,L as qn,M as gt,N as ft,a as qi,d as qt,e as Nn,f as ws,i as xs,j as _s,k as $a,l as Ms,m as Zt,n as Gn,o as ct,q as _t,s as at,t as Mt,u as el,v as tl,w as no,x as il,y as Jt,z as Fn}from"./chunk-XDPHEQEO.js";import{b as Gs,f as Fs,g as Bs,h as zs,i as Xo,j as Hs,m as js,n as Ys,o as Qs,s as $s}from"./chunk-SZ2GUIT5.js";import{$ as cs,$b as Bt,Ab as Ct,Ad as Zo,Ba as La,Bb as St,Bc as za,Bd as Ka,C as ha,Ca as pa,Cc as Ha,Cd as Vs,D as xn,Db as te,Dd as Ja,E as Vi,Eb as ue,Ec as Ss,F as Wi,Fa as g,Fb as It,Fd as Ot,Ga as ps,Gb as re,Gc as ja,Gd as je,Hb as et,Hd as Ke,I as ns,Ia as kn,Ib as Rn,Ic as Ya,J as Li,Ja as di,Jb as Ft,K as Gi,Kb as m,La as Ga,Lb as ne,Ld as mi,M as as,Mb as ve,N as os,Nb as Ui,Nc as tt,Nd as Xt,O as rs,Oa as L,Oc as Qa,P as Ra,Pa as Wt,Pb as cn,Qa as lt,Qb as mn,R as ss,Ra as Fa,Rb as un,S as ls,Sa as ga,Sc as Za,Ta as gs,Td as eo,U as ds,Ua as Bi,Ud as to,V as _n,Va as fs,Vb as ci,Vd as xt,W as Na,Wa as yt,Wd as io,X as Va,Xa as We,Xb as hn,Xc as ks,Xd as dt,Ya as Tn,Yb as ba,Z as Wa,Zd as Ls,_b as At,_d as Je,a as Be,ab as Y,ac as Ua,b as Xe,ba as Mn,bb as G,ca as pt,cb as F,cc as W,d as Cm,da as Vt,db as _e,dc as se,dd as Ts,e as Zr,ea as Yt,eb as En,ec as R,ed as Es,f as nt,fa as ms,fb as he,fc as bs,fd as Ds,fe as Us,g as Ni,ga as A,gb as pe,ge as qs,hb as T,hc as qa,i as jo,ia as us,ib as d,ic as Ze,j as Nt,ja as q,jb as u,jc as v,ka as z,kb as U,kc as ie,kd as Xa,l as Ia,la as X,lb as _,m as Xr,ma as Ve,mb as k,mc as As,md as Vn,na as Fi,nb as H,nc as Ut,nd as Ps,oa as hs,ob as Dn,od as Is,p as Kr,pa as st,pb as Pn,pc as qe,pd as Wn,q as Yo,qb as Ba,qc as $o,r as Jr,ra as w,rb as ae,sb as Pi,sd as Os,t as Oa,tb as B,u as Qo,ua as Qt,ub as fa,v as es,vb as I,vd as Rs,w as vi,wa as Ie,wb as In,wc as vs,wd as yi,xb as On,xc as ys,xd as Ln,y as ts,yb as dn,yc as Cs,yd as Ns,z as is,zb as $t}from"./chunk-OB3QLUH6.js";var mr=Cm((rx,Eo)=>{(function(n){"use strict";function o(c){if(Array.isArray(c)){for(var l=0,p=Array(c.length);l<c.length;l++)p[l]=c[l];return p}return Array.from(c)}function e(c,l){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||typeof l!="object"&&typeof l!="function"?c:l}function t(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(c,l):c.__proto__=l)}function i(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function a(c,l){if(l||(l=typeof window>"u"?global:window),l[c]!==void 0)return l[c];if(Pa===null){var p=window.getComputedStyle(document.documentElement,"");Pa=(Array.prototype.slice.call(p).join("").match(/-(moz|webkit|ms)-/)||p.OLink===""&&["","o"]||["",""])[1]}if(Pa==="")return null;var y=c.charAt(0).toUpperCase()+c.substr(1),S=l[Pa+y];return S!==void 0?S:null}function r(c,l,p,y,S,x,E){if(typeof y!="function")throw new TypeError("Invalid animation rule:",y);var O=c-p,P=O/S,N=0;P>1&&(P=1),P!==1&&(N=y(P),isFinite(N)&&!isNaN(N)&&(P=N)),l&&l(P),O<S?E.frame=Hr(function(Q){return r(Q,l,p,y,S,x,E)}):(x&&x(),E.inProgress=!1)}function s(){Array.prototype.constructor.apply(this,arguments)}function h(c){if(!(c instanceof DOMException&&c.result===2152923147))throw c}function f(c,l){return l.replace(Am,function(p,y){var S=c[y];return S!==void 0?S:p})}function b(c){return c.majorTicks instanceof Array||(c.majorTicks=c.majorTicks?[c.majorTicks]:[]),c.majorTicks.length||(c.majorTicks.push(oe.formatMajorTickNumber(c.minValue,c)),c.majorTicks.push(oe.formatMajorTickNumber(c.maxValue,c))),[c.tickSide!=="right",c.tickSide!=="left"]}function C(c,l,p,y,S,x){c.beginPath(),c.moveTo(l+x,p),c.lineTo(l+y-x,p),c.quadraticCurveTo(l+y,p,l+y,p+x),c.lineTo(l+y,p+S-x),c.quadraticCurveTo(l+y,p+S,l+y-x,p+S),c.lineTo(l+x,p+S),c.quadraticCurveTo(l,p+S,l,p+S-x),c.lineTo(l,p+x),c.quadraticCurveTo(l,p,l+x,p),c.closePath()}function M(c,l){var p=l.valueDec,y=l.valueInt,S=0,x=void 0,E=void 0,O=void 0;if(c=parseFloat(c),O=c<0,c=Math.abs(c),p>0){for(E=c.toFixed(p).toString().split("."),x=y-E[0].length;S<x;++S)E[0]="0"+E[0];E=(O?"-":"")+E[0]+"."+E[1]}else{for(E=Math.round(c).toString(),x=y-E.length;S<x;++S)E="0"+E;E=(O?"-":"")+E}return E}function V(c,l){var p=void 0,y=!1;return p=l.majorTicksDec===0?Math.round(c).toString():c.toFixed(l.majorTicksDec),l.majorTicksInt>1?(y=~p.indexOf("."),~p.indexOf("-")?"-"+[l.majorTicksInt+l.majorTicksDec+2+(y?1:0)-p.length].join("0")+p.replace("-",""):[l.majorTicksInt+l.majorTicksDec+1+(y?1:0)-p.length].join("0")+p):p}function D(c){return c*Math.PI/180}function j(c,l){return{x:-c*Math.sin(l),y:c*Math.cos(l)}}function Z(c,l,p,y){var S=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],x=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,E=c.createLinearGradient(S?0:x,S?x:0,S?0:y,S?y:0);return E.addColorStop(0,l),E.addColorStop(1,p),E}function J(c,l){l.needleShadow&&(c.shadowOffsetX=2,c.shadowOffsetY=2,c.shadowBlur=10,c.shadowColor=l.colorNeedleShadowDown)}function ee(c,l,p){return c["font"+l+"Style"]+" "+c["font"+l+"Weight"]+" "+c["font"+l+"Size"]*p+"px "+c["font"+l]}function ce(c){c.shadowOffsetX=null,c.shadowOffsetY=null,c.shadowBlur=null,c.shadowColor="",c.strokeStyle=null,c.lineWidth=0,c.save()}function Oe(c,l,p,y){l.valueTextShadow&&(c.shadowOffsetX=p,c.shadowOffsetY=p,c.shadowBlur=y,c.shadowColor=l.colorValueTextShadow)}function Te(c,l,p,y,S,x){if(l.valueBox){ce(c);var E=l.valueDec?1+l.valueDec:0,O="9".repeat(Math.max.apply(null,[String(parseInt(p)).length+E].concat(l.majorTicks.map(function(Pe){return String(parseInt(Pe,10)).length+E})))),P=l.valueText||M(p,l),N=x/200,Q=x/100,$=.4*Q,le=1.2*Q;c.font=ee(l,"Value",N),Oe(c,l,$,le);var ge=c.measureText(l.valueText?P:"-"+M(Number(O),l)).width;ce(c);var Ae=parseFloat(l.fontValueSize)*N+$+le,Ge=Q*parseFloat(l.valueBoxStroke),be=2*x-2*Ge,Re=ge+10*Q,Ne=1.1*Ae+$+le,Fe=Q*l.valueBoxBorderRadius,ke=(parseFloat(l.valueBoxWidth)||0)/100*be;ke>Re&&(Re=ke),Re>be&&(Re=be);var De=y-Re/2,we=S-Ne/2,fe=S-5.75*Q;if(c.beginPath(),Fe?C(c,De,we,Re,Ne,Fe):c.rect(De,we,Re,Ne),Ge){var ye=c.createRadialGradient(y,fe,10*Q,y,fe,20*Q);ye.addColorStop(0,l.colorValueBoxRect),ye.addColorStop(1,l.colorValueBoxRectEnd),c.strokeStyle=ye,c.lineWidth=Ge,c.stroke()}l.colorValueBoxShadow&&(c.shadowBlur=1.2*Q,c.shadowColor=l.colorValueBoxShadow),l.colorValueBoxBackground&&(c.fillStyle=l.colorValueBoxBackground,c.fill()),c.closePath(),c.restore(),Oe(c,l,$,le),c.fillStyle=l.colorValueText,c.textAlign="center",c.textBaseline="alphabetic",c.fillText(P,De+Re/2,S+Ne/2-Ae/3),c.restore()}}function Qe(c){var l=c.value,p=c.minValue,y=c.maxValue,S=.01*(y-p);return{normal:l<p?p:l>y?y:l,indented:l<p?p-S:l>y?y+S:l}}function Ee(c,l,p,y,S){p.beginPath(),p.arc(0,0,li(c),0,2*ma,!0),p.lineWidth=l,p.strokeStyle=S?oe.linearGradient(p,y,S,c):y,p.stroke(),p.closePath()}function Le(c,l){var p=si.pixelRatio;return c.maxRadius||(c.maxRadius=c.max-l.borderShadowWidth-l.borderOuterWidth*p-l.borderMiddleWidth*p-l.borderInnerWidth*p+(l.borderOuterWidth?.5:0)+(l.borderMiddleWidth?.5:0)+(l.borderInnerWidth?.5:0)),c.maxRadius}function Me(c,l){function p($,le,ge,Ae,Ge,be){return le&&(!be&&l.borderShadowWidth&&(ge.save(),ge.shadowBlur=l.borderShadowWidth,ge.shadowColor=l.colorBorderShadow),Ee($,le*y,ge,Ae,Ge),!be&&l.borderShadowWidth&&(be=!0,ge.restore())),be}var y=si.pixelRatio,S=l.borderShadowWidth*y,x=c.max-S-l.borderOuterWidth*y/2,E=x-l.borderOuterWidth*y/2-l.borderMiddleWidth*y/2+.5,O=E-l.borderMiddleWidth*y/2-l.borderInnerWidth*y/2+.5,P=Le(c,l),N=void 0,Q=!1;c.save(),Q=p(x,l.borderOuterWidth,c,l.colorBorderOuter,l.colorBorderOuterEnd,Q),Q=p(E,l.borderMiddleWidth,c,l.colorBorderMiddle,l.colorBorderMiddleEnd,Q),Q=p(O,l.borderInnerWidth,c,l.colorBorderInner,l.colorBorderInnerEnd,Q),!Q&&l.borderShadowWidth&&(c.shadowBlur=l.borderShadowWidth,c.shadowColor=l.colorBorderShadow),c.beginPath(),c.arc(0,0,li(P),0,2*ma,!0),l.colorPlateEnd?(N=c.createRadialGradient(0,0,P/2,0,0,P),N.addColorStop(0,l.colorPlate),N.addColorStop(1,l.colorPlateEnd)):N=l.colorPlate,c.fillStyle=N,c.fill(),c.closePath(),c.restore()}function ze(c,l){if(l.highlights!=="false"&&l.highlights.length&&l.highlightsWidth!==0){var p=c.max*(parseFloat(l.highlightsWidth)||0)/100,y=li(it(c,l)-p/2),S=l.highlights.length,x=(l.maxValue-l.minValue)/l.ticksAngle;c.save();for(var E=0;E<S;E++){var O=l.highlights[E];c.lineWidth=p,c.lineCap=l.highlightsLineCap,c.strokeStyle=O.color,c.beginPath(),c.rotate(Ho),c.arc(0,0,y,oe.radians(l.startAngle+(O.from-l.minValue)/x),oe.radians(l.startAngle+(O.to-l.minValue)/x),!1),c.stroke(),c.closePath(),c.restore(),c.save()}c.restore()}}function He(c,l){var p=it(c,l),y=void 0,S=void 0,x=void 0,E=0,O=Math.abs(l.minorTicks)||0,P=l.ticksAngle/(l.maxValue-l.minValue);l.exactTicks?(S=l.maxValue-l.minValue,y=O?S/O:0,E=(Ai.mod(l.majorTicks[0],O)||0)*P):y=O*(l.majorTicks.length-1),c.lineWidth=si.pixelRatio,c.strokeStyle=l.colorMinorTicks||l.colorStrokeTicks,c.save();for(var N=0;N<y;++N)(x=l.startAngle+E+N*(l.ticksAngle/y))<=l.ticksAngle+l.startAngle&&(c.rotate(oe.radians(x)),c.beginPath(),c.moveTo(0,p),c.lineTo(0,p-.075*c.max),rn(c));c.restore()}function it(c,l){var p=c.max/100;return Le(c,l)-5*p-(l.barWidth?2*(parseFloat(l.barStrokeWidth)||0)+((parseFloat(l.barWidth)||0)+5)*p:0)}function rt(c,l){oe.prepareTicks(l);var p=li(it(c,l)),y=void 0,S=l.majorTicks.length,x=si.pixelRatio;c.lineWidth=2*x,y=l.colorMajorTicks instanceof Array?l.colorMajorTicks:new Array(S).fill(l.colorStrokeTicks||l.colorMajorTicks);for(var E=0;E<S;++E)c.save(),c.strokeStyle=y[E],c.rotate(oe.radians(vt(l,l.exactTicks?l.majorTicks[E]:E,S))),c.beginPath(),c.moveTo(0,p),c.lineTo(0,p-.15*c.max),c.stroke(),c.closePath(),c.restore();l.strokeTicks&&(c.save(),c.strokeStyle=l.colorStrokeTicks||y[0],c.rotate(Ho),c.beginPath(),c.arc(0,0,p,oe.radians(l.startAngle),oe.radians(l.startAngle+l.ticksAngle),!1),c.stroke(),c.closePath(),c.restore())}function vt(c,l,p){if(c.exactTicks){var y=c.ticksAngle/(c.maxValue-c.minValue);return c.startAngle+y*(l-c.minValue)}return c.startAngle+l*(c.ticksAngle/(p-1))}function rn(c){c.stroke(),c.restore(),c.closePath(),c.save()}function Ta(c,l){var p=it(c,l)-.15*c.max,y={},S=0,x=l.majorTicks.length,E=l.animationTarget!=="needle",O=l.colorNumbers instanceof Array?l.colorNumbers:new Array(x).fill(l.colorNumbers),P=E?-(l.value-l.minValue)/(l.maxValue-l.minValue)*l.ticksAngle:0;for(E&&(c.save(),c.rotate(-oe.radians(P))),c.font=oe.font(l,"Numbers",c.max/200),c.lineWidth=0,c.textAlign="center",c.textBaseline="middle";S<x;++S){var N=P+vt(l,l.exactTicks?l.majorTicks[S]:S,x),Q=c.measureText(l.majorTicks[S]).width,$=l.fontNumbersSize,le=Math.sqrt(Q*Q+$*$)/2,ge=oe.radialPoint(p-le-l.numbersMargin/100*c.max,oe.radians(N));N===360&&(N=0),y[N]||(y[N]=!0,c.fillStyle=O[S],c.fillText(l.majorTicks[S],ge.x,ge.y))}E&&c.restore()}function Rr(c,l){l.title&&(c.save(),c.font=oe.font(l,"Title",c.max/200),c.fillStyle=l.colorTitle,c.textAlign="center",c.fillText(l.title,0,-c.max/4.25,.8*c.max),c.restore())}function Nr(c,l){l.units&&(c.save(),c.font=oe.font(l,"Units",c.max/200),c.fillStyle=l.colorUnits,c.textAlign="center",c.fillText(oe.formatContext(l,l.units),0,c.max/3.25,.8*c.max),c.restore())}function Vr(c,l){if(l.needle){var p=l.animationTarget!=="needle",y=l.ticksAngle<360?oe.normalizedValue(l).indented:l.value,S=p?l.startAngle:l.startAngle+(y-l.minValue)/(l.maxValue-l.minValue)*l.ticksAngle;l.barStartPosition==="right"&&(S=l.startAngle+l.ticksAngle-(y-l.minValue)/(l.maxValue-l.minValue)*l.ticksAngle);var x=Le(c,l),E=li(x/100*l.needleCircleSize),O=li(x/100*l.needleCircleSize*.75),P=li(x/100*l.needleEnd),N=li(l.needleStart?x/100*l.needleStart:0),Q=x/100*l.needleWidth,$=x/100*l.needleWidth/2,le=si.pixelRatio;c.save(),oe.drawNeedleShadow(c,l),c.rotate(oe.radians(S)),c.fillStyle=oe.linearGradient(c,l.colorNeedle,l.colorNeedleEnd,P-N),l.needleType==="arrow"?(c.beginPath(),c.moveTo(-$,-N),c.lineTo(-Q,0),c.lineTo(-1*le,P),c.lineTo(le,P),c.lineTo(Q,0),c.lineTo($,-N),c.closePath(),c.fill(),c.beginPath(),c.lineTo(-.5*le,P),c.lineTo(-1*le,P),c.lineTo(-Q,0),c.lineTo(-$,-N),c.lineTo($/2*le-2*le,-N),c.closePath(),c.fillStyle=l.colorNeedleShadowUp,c.fill()):(c.beginPath(),c.moveTo(-$,P),c.lineTo(-$,N),c.lineTo($,N),c.lineTo($,P),c.closePath(),c.fill()),c.restore(),l.needleCircleSize&&(c.save(),oe.drawNeedleShadow(c,l),l.needleCircleOuter&&(c.beginPath(),c.arc(0,0,E,0,2*ma,!0),c.fillStyle=oe.linearGradient(c,l.colorNeedleCircleOuter,l.colorNeedleCircleOuterEnd,E),c.fill(),c.closePath()),l.needleCircleInner&&(c.beginPath(),c.arc(0,0,O,0,2*ma,!0),c.fillStyle=oe.linearGradient(c,l.colorNeedleCircleInner,l.colorNeedleCircleInnerEnd,O),c.fill(),c.closePath()),c.restore())}}function Wr(c,l,p){oe.drawValueBox(c,l,p,0,c.max-.33*c.max,c.max)}function Jc(c){var l=c.startAngle,p=c.startAngle+c.ticksAngle,y=l,S=l+(oe.normalizedValue(c).normal-c.minValue)/(c.maxValue-c.minValue)*c.ticksAngle;if(c.barStartPosition==="middle"){var x=.5*(c.minValue+c.maxValue);c.value<x?(y=180-(x-oe.normalizedValue(c).normal)/(c.maxValue-c.minValue)*c.ticksAngle,S=180):(y=180,S=180+(oe.normalizedValue(c).normal-x)/(c.maxValue-c.minValue)*c.ticksAngle)}else c.barStartPosition==="right"&&(y=p-S+l,S=p);return{startAngle:y,endAngle:S}}function Lr(c,l){var p=c.max/100,y=Le(c,l)-5*p,S=parseFloat(l.barStrokeWidth+"")||0,x=(parseFloat(l.barWidth+"")||0)*p,E=y-2*S-x,O=(y-E)/2,P=E+O,N=S/P,Q=l.startAngle,$=l.startAngle+l.ticksAngle;if(c.save(),c.rotate(Ho),S&&(c.beginPath(),c.arc(0,0,P,oe.radians(Q)-N,oe.radians($)+N,!1),c.strokeStyle=l.colorBarStroke,c.lineWidth=2*O,c.stroke(),c.closePath()),x&&(c.beginPath(),c.arc(0,0,P,oe.radians(Q),oe.radians($),!1),c.strokeStyle=l.colorBar,c.lineWidth=x,c.stroke(),c.closePath(),l.barShadow&&(c.save(),c.beginPath(),c.arc(0,0,y,oe.radians(Q),oe.radians($),!1),c.clip(),c.beginPath(),c.strokeStyle=l.colorBar,c.lineWidth=1,c.shadowBlur=l.barShadow,c.shadowColor=l.colorBarShadow,c.shadowOffsetX=0,c.shadowOffsetY=0,c.arc(0,0,y,oe.radians(l.startAngle),oe.radians(l.startAngle+l.ticksAngle),!1),c.stroke(),c.closePath(),c.restore()),l.barProgress)){var le=Jc(l),ge=le.startAngle,Ae=le.endAngle;c.beginPath(),c.arc(0,0,P,oe.radians(ge),oe.radians(Ae),!1),c.strokeStyle=l.colorBarProgress,c.lineWidth=x,c.stroke(),c.closePath()}c.restore()}function Gr(c){return c.options.animatedValue?c.options.value:c.value}function em(c,l,p,y,S,x,E,O){c.beginPath(),c.fillStyle=O?oe.linearGradient(c,E,O,S>x?S:x,x>S,S>x?p:y):E,l>0?oe.roundRect(c,p,y,S,x,l):c.rect(p,y,S,x),c.fill(),c.closePath()}function tm(c,l,p,y,S,x,E,O,P){c.beginPath(),c.lineWidth=l,c.strokeStyle=P?oe.linearGradient(c,O,P,E,!0,S):O,p>0?oe.roundRect(c,y,S,x,E,p):c.rect(y,S,x,E),c.stroke(),c.closePath()}function im(c,l,p,y,S,x){function E(Pe,Ue,$e,Rt){return Pe&&(!Rt&&l.borderShadowWidth&&(c.save(),c.shadowBlur=l.borderShadowWidth,c.shadowColor=l.colorBorderShadow),tm(c,Pe*O,P,p+Pe*O/2-fe,y+Pe*O/2-fe,N,ge,Ue,$e),fe+=.5*O,!Rt&&l.borderShadowWidth&&(Rt=!0,c.restore())),Rt}var O=si.pixelRatio,P=l.borderRadius*O,N=S-l.borderShadowWidth-l.borderOuterWidth*O,Q=N-l.borderOuterWidth*O-l.borderMiddleWidth*O,$=Q-l.borderMiddleWidth*O-l.borderInnerWidth*O,le=$-l.borderInnerWidth*O,ge=x-l.borderShadowWidth-l.borderOuterWidth*O,Ae=ge-l.borderOuterWidth*O-l.borderMiddleWidth*O,Ge=Ae-l.borderMiddleWidth*O-l.borderInnerWidth*O,be=Ge-l.borderInnerWidth*O,Re=p-(Q-N)/2,Ne=Re-($-Q)/2,Fe=Ne-(le-$)/2,ke=y-(Ae-ge)/2,De=ke-(Ge-Ae)/2,we=De-(be-Ge)/2,fe=0,ye=!1;return c.save(),ye=E(l.borderOuterWidth,l.colorBorderOuter,l.colorBorderOuterEnd,ye),ye=E(l.borderMiddleWidth,l.colorBorderMiddle,l.colorBorderMiddleEnd,ye),ye=E(l.borderInnerWidth,l.colorBorderInner,l.colorBorderInnerEnd,ye),!ye&&l.borderShadowWidth&&(c.shadowBlur=l.borderShadowWidth,c.shadowColor=l.colorBorderShadow),em(c,P,Fe,we,le+2*fe,be+2*fe,l.colorPlate,l.colorPlateEnd),c.restore(),[Fe,we,le,be]}function nm(c,l,p,y,S,x){var E=si.pixelRatio,O=x>=S,P=O?.85*S:x,N=O?x:S;p=O?Se(p+(S-P)/2):p;var Q=!!l.title,$=!!l.units,le=!!l.valueBox,ge=void 0,Ae=void 0,Ge=void 0;O?(Ae=Se(.05*N),ge=Se(.075*N),Ge=Se(.11*N),Q&&(N-=ge,y+=ge),$&&(N-=Ae),le&&(N-=Ge)):(Ae=ge=Se(.15*P),Q&&(P-=ge,y+=ge),$&&(P-=Ae));var be=2*l.barStrokeWidth,Re=l.barBeginCircle?Se(P*l.barBeginCircle/200-be/2):0,Ne=Se(P*l.barWidth/100-be),Fe=Se(N*l.barLength/100-be),ke=Se((N-Fe)/2),De=Se(p+(O?P/2:ke+Re)),we=Se(y+(O?N-ke-Re+be/2:P/2)),fe=!O||l.hasLeft&&l.hasRight?0:(l.hasRight?-1:1)*l.ticksWidth/100*P,ye=O||l.hasLeft&&l.hasRight?0:(l.hasRight?-1:1)*l.ticksWidth/100*P;return c.barDimensions={isVertical:O,width:P,length:N,barWidth:Ne,barLength:Fe,strokeWidth:be,barMargin:ke,radius:Re,pixelRatio:E,barOffset:null,titleMargin:Q?ge:0,unitsMargin:$?Ae:0,get ticksLength(){return this.barLength-this.barOffset-this.strokeWidth},X:p+fe,Y:y+ye,x0:De+fe,y0:we+ye,baseX:p,baseY:y,ticksPadding:l.ticksPadding/100},c.barDimensions}function Fr(c,l,p,y,S,x,E){var O=nm(c,l,y,S,x,E),P=O.isVertical,N=O.width,Q=O.barWidth,$=O.barLength,le=O.strokeWidth,ge=O.barMargin,Ae=O.radius,Ge=O.x0,be=O.y0,Re=O.X,Ne=O.Y,Fe=$;c.save(),c.beginPath();var ke=null;if(l.barBeginCircle){var De=oe.radians(P?270:0),we=Math.asin(Q/2/Ae),fe=Math.cos(we),ye=Math.sin(we),Pe=Ge+(P?Ae*ye:Ae*fe-le/2),Ue=P?be-Ae*fe:be+Ae*ye,$e=li(P?Ue-be:Pe-Ge);ke=Se($e+Ae);var Rt=P?Se(Ge-Ae*ye):Pe,jt=P?Ue:Se(be-Ae*ye);p==="progress"&&($=ke+($-ke)*(oe.normalizedValue(l).normal-l.minValue)/(l.maxValue-l.minValue));var ua=Se(Pe+$-ke+le/2),ln=Se(Ue-$+ke-le/2);c.arc(Ge,be,Ae,De+we,De-we),P?(c.moveTo(Pe,jt),c.lineTo(Pe,ln),c.lineTo(Rt,ln),c.lineTo(Rt,jt)):(c.moveTo(Pe,jt),c.lineTo(ua,jt),c.lineTo(ua,Ue),c.lineTo(Pe,Ue))}else{var Qr=Se(P?Re+(N-Q)/2:Re+ge),$r=Se(P?Ne+$+ge:Ne+(N-Q)/2);p==="progress"&&($*=(l.value-l.minValue)/(l.maxValue-l.minValue)),P?c.rect(Qr,$r,Q,-$):c.rect(Qr,$r,$,Q)}p!=="progress"&&l.barStrokeWidth&&(c.lineWidth=le,c.strokeStyle=l.colorBarStroke,c.stroke()),p!=="progress"&&l.colorBar?(c.fillStyle=l.colorBarEnd?oe.linearGradient(c,l.colorBar,l.colorBarEnd,$,P,P?Ne:Re):l.colorBar,c.fill()):p==="progress"&&l.colorBarProgress&&(c.fillStyle=l.colorBarProgressEnd?oe.linearGradient(c,l.colorBarProgress,l.colorBarProgressEnd,Fe,P,P?Ne:Re):l.colorBarProgress,c.fill()),c.closePath(),c.restore(),l.barBeginCircle&&(c.barDimensions.radius+=le),c.barDimensions.barOffset=ke,c.barDimensions.barWidth+=le,c.barDimensions.barLength+=le}function am(c,l,p,y,S,x){Fr(c,l,"",p,y,S,x)}function Br(c,l){return l.needleSide!==c||l.tickSide!==c||l.numberSide!==c}function om(c,l,p,y,S,x){l.barProgress&&Fr(c,l,"progress",p,y,S,x)}function rm(c,l){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.barWidth,O=p.barOffset,P=p.barMargin,N=p.X,Q=p.Y,$=p.ticksLength,le=p.ticksPadding,ge=S*(parseFloat(l.highlightsWidth)||0)/100;if(l.highlights&&ge){var Ae=l.tickSide!=="right",Ge=l.tickSide!=="left",be=0,Re=l.highlights.length,Ne=(S-E)/2,Fe=l.maxValue-l.minValue,ke=Se(y?N+Ne:N+P+O),De=ge,we=y?Q+x-P-O:Q+Ne,fe=Se((l.ticksWidth/100+le)*S)+(ge-l.ticksWidth/100*S),ye=Se(E+le*S);for(c.save();be<Re;be++){var Pe=l.highlights[be],Ue=$*li(l.minValue-Pe.from)/Fe,$e=$*li((Pe.to-Pe.from)/Fe);c.beginPath(),c.fillStyle=Pe.color,y?(Ae&&c.rect(ke-fe,we-Ue,De,-$e),Ge&&c.rect(ke+ye,we-Ue,De,-$e)):(Ae&&c.rect(ke+Ue,we-fe,$e,De),Ge&&c.rect(ke+Ue,we+ye,$e,De)),c.fill(),c.closePath()}c.restore()}}function Ea(c,l,p,y,S){c.beginPath(),c.moveTo(l,p),c.lineTo(y,S),c.stroke(),c.closePath()}function Ur(c,l,p,y,S,x,E,O,P){var N=c.barDimensions,Q=N.isVertical,$=N.length,le=N.barWidth,ge=N.barOffset,Ae=N.barMargin,Ge=N.pixelRatio,be=N.width,Re=N.X,Ne=N.Y,Fe=N.ticksLength,ke=N.ticksPadding,De=(be-le)/2,we=void 0,fe=void 0,ye=0,Pe=p.length,Ue=void 0,$e=P*be,Rt=De-ke*be,jt=De+le+$e+ke*be,ua=l instanceof Array?l:new Array(p.length).fill(l);c.save(),c.lineWidth=O*Ge;for(var ln=Fe/(S-y);ye<Pe;ye++)Ue=p[ye],c.strokeStyle=ua[ye],Q?(fe=Ne+$-Ae-ge+(y-Ue)*ln,x&&(we=Re+Rt,Ea(c,we,fe,Se(we-$e),fe)),E&&(we=Re+jt,Ea(c,we,fe,Se(we-$e),fe))):(we=Re+Ae+ge-(y-Ue)*ln,x&&(fe=Ne+Rt,Ea(c,we,fe,we,Se(fe-$e))),E&&(fe=Ne+jt,Ea(c,we,Se(fe),we,fe-$e)));c.restore()}function sm(c,l){var p=oe.prepareTicks(l),y=zr(p,2),S=y[0],x=y[1],E=2,O=(l.maxValue-l.minValue)/(l.majorTicks.length-1),P=l.colorMajorTicks instanceof Array?l.colorMajorTicks:new Array(l.majorTicks.length).fill(l.colorStrokeTicks||l.colorMajorTicks);if(Ur(c,P,l.exactTicks?l.majorTicks:l.majorTicks.map(function($e,Rt){return l.minValue+O*Rt}),l.minValue,l.maxValue,S,x,E,l.ticksWidth/100),l.strokeTicks){var N=c.barDimensions,Q=N.isVertical,$=N.length,le=N.width,ge=N.barWidth,Ae=N.barMargin,Ge=N.barOffset,be=N.X,Re=N.Y,Ne=N.ticksLength,Fe=N.pixelRatio,ke=N.ticksPadding,De=(le-ge)/2+ge+ke*le,we=(le-ge)/2-ke*le,fe=void 0,ye=void 0,Pe=void 0,Ue=void 0;c.strokeStyle=l.colorStrokeTicks||P[0],E*=Fe,Q?(ye=Re+$-Ae-Ge+E/2,Ue=ye-Ne-E,S&&(Pe=fe=Se(be+we),Da(c,fe,ye,Pe,Ue)),x&&(Pe=fe=Se(be+De),Da(c,fe,ye,Pe,Ue))):(fe=be+Ae+Ge-E/2,Pe=fe+Ne+E,S&&(Ue=ye=Se(Re+we),Da(c,fe,ye,Pe,Ue)),x&&(Ue=ye=Se(Re+De),Da(c,fe,ye,Pe,Ue)))}}function Da(c,l,p,y,S){c.beginPath(),c.moveTo(l,p),c.lineTo(y,S),c.stroke(),c.closePath()}function lm(c,l){var p=oe.prepareTicks(l),y=zr(p,2),S=y[0],x=y[1],E=[],O=l.minValue,P=Math.abs(l.minorTicks)||0,N=P?(l.maxValue-l.minValue)/(P*(l.majorTicks.length-1)):0;if(P)if(l.exactTicks)for(var Q=Ai.mod(l.majorTicks[0],P)||0;O<l.maxValue;O+=P)Q+O<l.maxValue&&E.push(Q+O);else for(;O<l.maxValue;O+=N)E.push(O);Ur(c,l.colorMinorTicks||l.colorStrokeTicks,E,l.minValue,l.maxValue,S,x,1,l.ticksWidthMinor/100)}function dm(c,l){var p=c.barDimensions,y=p.isVertical,S=p.length,x=p.width,E=p.barWidth,O=p.barMargin,P=p.barOffset,N=p.X,Q=p.Y,$=p.ticksLength,le=p.ticksPadding,ge=l.maxValue-l.minValue,Ae=ge/(l.majorTicks.length-1),Ge=l.exactTicks?l.majorTicks:l.majorTicks.map(function(ua,ln){return l.minValue+Ae*ln}),be=Ge.length,Re=l.numberSide!=="right",Ne=l.numberSide!=="left",Fe=l.fontNumbersSize*x/200,ke=0,De=(l.ticksWidth/100+2*le)*x,we=(x-E)/2-De,fe=(x-E)/2+E+De,ye=void 0,Pe=void 0,Ue=void 0,$e=void 0,Rt=l.colorNumbers instanceof Array?l.colorNumbers:new Array(be).fill(l.colorNumbers),jt=l.numbersMargin/100*x;for(c.font=oe.font(l,"Numbers",x/200),c.lineWidth=0,c.textAlign="center";ke<be;ke++)c.fillStyle=Rt[ke],$e=l.majorTicks[ke],Ue=l.exactTicks?$*((Ge[ke]-l.minValue)/ge):ke*$/(be-1),y?(Pe=Q+S-O-P-Ue+Fe/3,Re&&(c.textAlign="right",c.fillText($e,N+we-jt,Pe)),Ne&&(c.textAlign="left",c.fillText($e,N+fe+jt,Pe))):(c.measureText($e).width,ye=N+O+P+Ue,Re&&c.fillText($e,ye,Q+we-jt),Ne&&c.fillText($e,ye,Q+fe+Fe+jt))}function cm(c,l){if(l.title){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.baseX,O=p.baseY,P=p.titleMargin,N=l.fontTitleSize*S/200,Q=Se(E+(y?S:x)/2),$=Se(O+P/2-(y?N:N/2)-.025*(y?x:S));c.save(),c.textAlign="center",c.fillStyle=l.colorTitle,c.font=oe.font(l,"Title",S/200),c.lineWidth=0,c.fillText(l.title,Q,$,y?S:x),c.restore()}}function mm(c,l){if(l.units){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.baseX,O=p.baseY,P=p.unitsMargin,N=l.fontUnitsSize*S/200,Q=Se(E+(y?S:x)/2),$=Se(O+(y?x:S)+P/2-N/2);c.save(),c.textAlign="center",c.fillStyle=l.colorUnits,c.font=oe.font(l,"Units",S/200),c.lineWidth=0,c.fillText(oe.formatContext(l,l.units),Q,$,y?S:x),c.restore()}}function um(c,l){if(l.needle){var p=c.barDimensions,y=p.isVertical,S=p.width,x=p.length,E=p.barWidth,O=p.barOffset,P=p.barMargin,N=p.ticksLength,Q=p.X,$=p.Y,le=p.ticksPadding,ge=l.needleSide!=="right",Ae=l.needleSide!=="left",Ge=N*(oe.normalizedValue(l).indented-l.minValue)/(l.maxValue-l.minValue),be=(l.ticksWidth/100+le)*S,Re=E/2+be,Ne=Re*(l.needleEnd/100),Fe=void 0,ke=void 0,De=void 0,we=void 0,fe=l.needleType.toLowerCase()==="arrow"?pm:hm,ye=(S-E)/2,Pe=Re*(l.needleStart/100),Ue=ye-be-Pe,$e=ye+E+be+Pe;c.save(),oe.drawNeedleShadow(c,l),y?(De=Se($+x-P-O-Ge),ge&&(Fe=Se(Q+Ue),ke=Fe+Ne,fe(c,l,Fe,De,ke,De,Ne)),Ae&&(Fe=Se(Q+$e),ke=Fe-Ne,fe(c,l,Fe,De,ke,De,Ne,!0))):(Fe=Se(Q+P+O+Ge),ge&&(De=Se($+Ue),we=De+Ne,fe(c,l,Fe,De,Fe,we,Ne)),Ae&&(De=Se($+$e),we=De-Ne,fe(c,l,Fe,De,Fe,we,Ne,!0))),c.restore()}}function qr(c,l,p,y){return l.colorNeedleEnd?oe.linearGradient(c,y?l.colorNeedleEnd:l.colorNeedle,y?l.colorNeedle:l.colorNeedleEnd,p,!c.barDimensions.isVertical):l.colorNeedle}function hm(c,l,p,y,S,x,E,O){c.lineWidth=l.needleWidth,c.strokeStyle=qr(c,l,E,O),c.beginPath(),c.moveTo(p,y),c.lineTo(S,x),c.stroke(),c.closePath()}function pm(c,l,p,y,S,x,E,O){var P=Se(.4*E),N=E-P,Q=p===S,$=l.needleWidth/2;c.fillStyle=qr(c,l,E,O),c.beginPath(),Q?(y>x&&(N*=-1),c.moveTo(p-$,y),c.lineTo(p+$,y),c.lineTo(p+$,y+N),c.lineTo(p,x),c.lineTo(p-$,y+N),c.lineTo(p-$,y)):(p>S&&(N*=-1),c.moveTo(p,y-$),c.lineTo(p,y+$),c.lineTo(p+N,y+$),c.lineTo(S,y),c.lineTo(p+N,y-$),c.lineTo(p,y-$)),c.fill(),c.closePath()}function gm(c,l,p,y,S,x,E){var O=(parseFloat(l.fontValueSize)||0)*x/200,P=(.11*E-O)/2;c.barDimensions.isVertical&&oe.drawValueBox(c,l,p,y+x/2,S+E-O-P,x)}var zr=(function(){function c(l,p){var y=[],S=!0,x=!1,E=void 0;try{for(var O,P=l[Symbol.iterator]();!(S=(O=P.next()).done)&&(y.push(O.value),!p||y.length!==p);S=!0);}catch(N){x=!0,E=N}finally{try{!S&&P.return&&P.return()}finally{if(x)throw E}}return y}return function(l,p){if(Array.isArray(l))return l;if(Symbol.iterator in Object(l))return c(l,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),Bo=function c(l,p,y){l===null&&(l=Function.prototype);var S=Object.getOwnPropertyDescriptor(l,p);if(S===void 0){var x=Object.getPrototypeOf(l);return x===null?void 0:c(x,p,y)}if("value"in S)return S.value;var E=S.get;if(E!==void 0)return E.call(y)},fm=function c(l,p,y,S){var x=Object.getOwnPropertyDescriptor(l,p);if(x===void 0){var E=Object.getPrototypeOf(l);E!==null&&c(E,p,y,S)}else if("value"in x&&x.writable)x.value=y;else{var O=x.set;O!==void 0&&O.call(S,y)}return y},sn=(function(){function c(l,p){for(var y=0;y<p.length;y++){var S=p[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(l,S.key,S)}}return function(l,p,y){return p&&c(l.prototype,p),y&&c(l,y),l}})(),Pa=null,bm=(function(){function c(){i(this,c),this._events={},this.addListener=this.on,this.removeListener=this.off}return sn(c,[{key:"emit",value:function(l){if(this._events[l]){for(var p=0,y=this._events[l].length,S=arguments.length,x=Array(S>1?S-1:0),E=1;E<S;E++)x[E-1]=arguments[E];for(;p<y;p++)this._events[l][p]&&this._events[l][p].apply(this,x)}}},{key:"once",value:function(l){for(var p=arguments.length,y=Array(p>1?p-1:0),S=1;S<p;S++)y[S-1]=arguments[S];for(var x=0,E=y.length,O=this;x<E;x++)(function(){var P=y[x],N=function Q(){O.off(l,Q),P.apply(O,arguments)};y[x]=N})();this.on.apply(this,[l].concat(y))}},{key:"on",value:function(l){this._events[l]||(this._events[l]=[]);for(var p=0,y=arguments.length<=1?0:arguments.length-1;p<y;p++)this._events[l].push(arguments.length<=p+1?void 0:arguments[p+1])}},{key:"off",value:function(l){if(this._events[l])for(var p=0,y=arguments.length<=1?0:arguments.length-1;p<y;p++)for(var S=arguments.length<=p+1?void 0:arguments[p+1],x=void 0;~(x=this._events[l].indexOf(S));)this._events[l].splice(x,1)}},{key:"removeAllListeners",value:function(l){delete this._events[l]}},{key:"listeners",get:function(){return this._events}}]),c})(),Hr=a("requestAnimationFrame")||function(c){return setTimeout(function(){return c(new Date().getTime())},1e3/60)},da={linear:function(c){return c},quad:function(c){return Math.pow(c,2)},dequad:function(c){return 1-da.quad(1-c)},quint:function(c){return Math.pow(c,5)},dequint:function(c){return 1-Math.pow(1-c,5)},cycle:function(c){return 1-Math.sin(Math.acos(c))},decycle:function(c){return Math.sin(Math.acos(1-c))},bounce:function(c){return 1-da.debounce(1-c)},debounce:function(c){for(var l=0,p=1;;l+=p,p/=2)if(c>=(7-4*l)/11)return-Math.pow((11-6*l-11*c)/4,2)+Math.pow(p,2)},elastic:function(c){return 1-da.delastic(1-c)},delastic:function(c){return Math.pow(2,10*(c-1))*Math.cos(20*Math.PI*1.5/3*c)}},Uo=(function(){function c(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"linear",p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:250,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){};if(i(this,c),this.duration=p,this.rule=l,this.draw=y,this.end=S,typeof this.draw!="function")throw new TypeError("Invalid animation draw callback:",y);if(typeof this.end!="function")throw new TypeError("Invalid animation end callback:",S)}return sn(c,[{key:"animate",value:function(l,p){var y=this;this.frame&&this.cancel();var S=window.performance&&window.performance.now?window.performance.now():a("animationStartTime")||Date.now();l=l||this.draw,p=p||this.end,this.draw=l,this.end=p,this.frame=Hr(function(x){return r(x,l,S,da[y.rule]||y.rule,y.duration,p,y)})}},{key:"cancel",value:function(){this.frame&&((a("cancelAnimationFrame")||function(l){})(this.frame),this.frame=null)}},{key:"destroy",value:function(){this.cancel(),this.draw=null,this.end=null}}]),c})();Uo.rules=da;var wn=(function(){function c(l,p,y){i(this,c),this.options=l,this.element=p.toLowerCase(),this.type=c.toDashed(y),this.Type=n[y],this.mutationsObserved=!1,this.isObservable=!!window.MutationObserver,window.GAUGES_NO_AUTO_INIT||c.domReady(this.traverse.bind(this))}return sn(c,[{key:"isValidNode",value:function(l){return!(!l.tagName||l.tagName.toLowerCase()!==this.element||l.getAttribute("data-type")!==this.type)}},{key:"traverse",value:function(){for(var l=document.getElementsByTagName(this.element),p=0,y=l.length;p<y;p++)this.process(l[p]);this.isObservable&&!this.mutationsObserved&&(new MutationObserver(this.observe.bind(this)).observe(document.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.mutationsObserved=!0)}},{key:"observe",value:function(l){for(var p=0,y=l.length;p<y;p++){var S=l[p];if(S.type==="attributes"&&S.attributeName==="data-type"&&this.isValidNode(S.target)&&S.oldValue!==this.type)setTimeout(this.process.bind(this,S.target));else if(S.addedNodes&&S.addedNodes.length)for(var x=0,E=S.addedNodes.length;x<E;x++)setTimeout(this.process.bind(this,S.addedNodes[x]))}}},{key:"process",value:function(l){var p=this;if(!this.isValidNode(l))return null;var y=void 0,S=JSON.parse(JSON.stringify(this.options)),x=null;for(y in S)if(S.hasOwnProperty(y)){var E=c.toAttributeName(y),O=c.parse(l.getAttribute(E));O!=null&&(S[y]=O)}return S.renderTo=l,x=new this.Type(S),x.draw&&x.draw(),this.isObservable&&(x.observer=new MutationObserver(function(P){P.forEach(function(N){if(N.type==="attributes"){var Q=N.attributeName.toLowerCase(),$=l.getAttribute(Q).toLowerCase();if(Q==="data-type"&&$&&$!==p.type)x.observer.disconnect(),delete x.observer,x.destroy&&x.destroy();else if(Q.substr(0,5)==="data-"){var le=Q.substr(5).split("-").map(function(Ae,Ge){return Ge?Ae.charAt(0).toUpperCase()+Ae.substr(1):Ae}).join(""),ge={};ge[le]=c.parse(l.getAttribute(N.attributeName)),le==="value"?x&&(x.value=ge[le]):x.update&&x.update(ge)}}})}),x.observer.observe(l,{attributes:!0})),x}}],[{key:"parse",value:function(l){if(l==="true")return!0;if(l==="false")return!1;if(l!=="undefined"){if(l==="null")return null;if(/^[-+#.\w\d\s]+(?:,[-+#.\w\d\s]*)+$/.test(l))return l.split(",");try{return JSON.parse(l)}catch{}return l}}},{key:"toDashed",value:function(l){for(var p=l.split(/(?=[A-Z])/),y=1,S=p.length,x=p[0].toLowerCase();y<S;y++)x+="-"+p[y].toLowerCase();return x}},{key:"toCamelCase",value:function(l){for(var p=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],y=l.split(/-/),S=0,x=y.length,E="";S<x;S++)E+=S||p?y[S][0].toUpperCase()+y[S].substr(1).toLowerCase():y[S].toLowerCase();return E}},{key:"toAttributeName",value:function(l){return"data-"+c.toDashed(l)}},{key:"domReady",value:function(l){if(/comp|inter|loaded/.test((window.document||{}).readyState+""))return l();window.addEventListener?window.addEventListener("DOMContentLoaded",l,!1):window.attachEvent&&window.attachEvent("onload",l)}}]),c})(),si=(function(){function c(l,p,y){i(this,c),c.collection.push(this),this.width=p||0,this.height=y||0,this.element=l,this.init()}return sn(c,[{key:"init",value:function(){var l=c.pixelRatio;this.element.width=this.width*l,this.element.height=this.height*l,this.element.style.width=this.width+"px",this.element.style.height=this.height+"px",this.elementClone=this.element.cloneNode(!0),this.context=this.element.getContext("2d"),this.contextClone=this.elementClone.getContext("2d"),this.drawWidth=this.element.width,this.drawHeight=this.element.height,this.drawX=this.drawWidth/2,this.drawY=this.drawHeight/2,this.minSide=this.drawX<this.drawY?this.drawX:this.drawY,this.contextClone.translate(this.drawX,this.drawY),this.elementClone.initialized=!1,this.context.translate(this.drawX,this.drawY),this.context.max=this.contextClone.max=this.minSide,this.context.maxRadius=this.contextClone.maxRadius=null}},{key:"destroy",value:function(){var l=c.collection.indexOf(this);~l&&c.collection.splice(l,1),this.context.clearRect(-this.drawX,-this.drawY,this.drawWidth,this.drawHeight),this.context.max=null,delete this.context.max,this.context.maxRadius=null,delete this.context.maxRadius,this.context=null,this.contextClone=null,this.elementClone=null,this.element=null,this.onRedraw=null}},{key:"commit",value:function(){var l=c.pixelRatio;return l!==1&&this.contextClone.scale(l,l),this}},{key:"redraw",value:function(){return this.init(),this.onRedraw&&this.onRedraw(),this}}],[{key:"redraw",value:function(){for(var l=0,p=c.collection.length;l<p;l++)c.collection[l].redraw()}},{key:"pixelRatio",get:function(){return window.devicePixelRatio||1}}]),c})();si.collection=[],window.matchMedia&&window.matchMedia("screen and (min-resolution: 2dppx)").addListener(si.redraw);var qo={renderTo:null,width:0,height:0,minValue:0,maxValue:100,value:0,units:!1,exactTicks:!1,majorTicks:[0,20,40,60,80,100],minorTicks:10,strokeTicks:!0,animatedValue:!1,animateOnInit:!1,title:!1,borders:!0,numbersMargin:1,listeners:null,valueInt:3,valueDec:2,majorTicksInt:1,majorTicksDec:0,animation:!0,animationDuration:500,animationRule:"cycle",colorPlate:"#fff",colorPlateEnd:"",colorMajorTicks:"#444",colorMinorTicks:"#666",colorStrokeTicks:"",colorTitle:"#888",colorUnits:"#888",colorNumbers:"#444",colorNeedle:"rgba(240,128,128,1)",colorNeedleEnd:"rgba(255,160,122,.9)",colorValueText:"#444",colorValueTextShadow:"rgba(0,0,0,0.3)",colorBorderShadow:"rgba(0,0,0,0.5)",colorBorderOuter:"#ddd",colorBorderOuterEnd:"#aaa",colorBorderMiddle:"#eee",colorBorderMiddleEnd:"#f0f0f0",colorBorderInner:"#fafafa",colorBorderInnerEnd:"#ccc",colorValueBoxRect:"#888",colorValueBoxRectEnd:"#666",colorValueBoxBackground:"#babab2",colorValueBoxShadow:"rgba(0,0,0,1)",colorNeedleShadowUp:"rgba(2,255,255,0.2)",colorNeedleShadowDown:"rgba(188,143,143,0.45)",colorBarStroke:"#222",colorBar:"#ccc",colorBarProgress:"#888",colorBarShadow:"#000",fontNumbers:"Arial",fontTitle:"Arial",fontUnits:"Arial",fontValue:"Arial",fontNumbersSize:20,fontTitleSize:24,fontUnitsSize:22,fontValueSize:26,fontNumbersStyle:"normal",fontTitleStyle:"normal",fontUnitsStyle:"normal",fontValueStyle:"normal",fontNumbersWeight:"normal",fontTitleWeight:"normal",fontUnitsWeight:"normal",fontValueWeight:"normal",needle:!0,needleShadow:!0,needleType:"arrow",needleStart:5,needleEnd:85,needleWidth:4,borderOuterWidth:3,borderMiddleWidth:3,borderInnerWidth:3,borderShadowWidth:3,valueBox:!0,valueBoxStroke:5,valueBoxWidth:0,valueText:"",valueTextShadow:!0,valueBoxBorderRadius:2.5,highlights:[{from:20,to:60,color:"#eee"},{from:60,to:80,color:"#ccc"},{from:80,to:100,color:"#999"}],highlightsWidth:15,highlightsLineCap:"butt",barWidth:20,barStrokeWidth:0,barProgress:!0,barShadow:0};s.prototype=Object.create(Array.prototype),s.prototype.constructor=s,s.prototype.get=function(c){if(typeof c=="string")for(var l=0,p=this.length;l<p;l++){var y=this[l].options.renderTo.tagName?this[l].options.renderTo:document.getElementById(this[l].options.renderTo||"");if(y.getAttribute("id")===c)return this[l]}else if(typeof c=="number")return this[c];return null};var zo="2.2.1",Se=Math.round,li=Math.abs,ca=new s;ca.version=zo;var Ai=(function(c){function l(p){i(this,l);var y=e(this,(l.__proto__||Object.getPrototypeOf(l)).call(this)),S=y.constructor.name;if(S==="BaseGauge")throw new TypeError("Attempt to instantiate abstract class!");if(ca.push(y),p.listeners&&Object.keys(p.listeners).forEach(function(E){(p.listeners[E]instanceof Array?p.listeners[E]:[p.listeners[E]]).forEach(function(O){y.on(E,O)})}),y.version=zo,y.type=n[S]||l,y.initialized=!1,p.minValue=parseFloat(p.minValue),p.maxValue=parseFloat(p.maxValue),p.value=parseFloat(p.value)||0,p.borders||(p.borderInnerWidth=p.borderMiddleWidth=p.borderOuterWidth=0),!p.renderTo)throw TypeError("Canvas element was not specified when creating the Gauge object!");var x=p.renderTo.tagName?p.renderTo:document.getElementById(p.renderTo);if(!(x instanceof HTMLCanvasElement))throw TypeError("Given gauge canvas element is invalid!");return p.width=parseFloat(p.width)||0,p.height=parseFloat(p.height)||0,p.width&&p.height||(p.width||(p.width=x.parentNode?x.parentNode.offsetWidth:x.offsetWidth),p.height||(p.height=x.parentNode?x.parentNode.offsetHeight:x.offsetHeight)),y.options=p||{},y.options.animateOnInit&&(y._value=y.options.value,y.options.value=y.options.minValue),y.canvas=new si(x,p.width,p.height),y.canvas.onRedraw=y.draw.bind(y),y.animation=new Uo(p.animationRule,p.animationDuration),y}return t(l,c),sn(l,[{key:"update",value:function(p){return Object.assign(this.options,this.type.configure(p||{})),this.canvas.width=this.options.width,this.canvas.height=this.options.height,this.animation.rule=this.options.animationRule,this.animation.duration=this.options.animationDuration,this.canvas.redraw(),this}},{key:"destroy",value:function(){var p=ca.indexOf(this);~p&&ca.splice(p,1),this.canvas.destroy(),this.canvas=null,this.animation.destroy(),this.animation=null,this.emit("destroy")}},{key:"draw",value:function(){return this.options.animateOnInit&&!this.initialized&&(this.value=this._value,this.initialized=!0,this.emit("init")),this.emit("render"),this}},{key:"value",set:function(p){var y=this;p=l.ensureValue(p,this.options.minValue);var S=this.options.value;if(p!==S)if(this.options.animation){if(this.animation.frame&&(this.options.value=this._value,this._value===p))return this.animation.cancel(),void delete this._value;this._value===void 0&&(this._value=p),this.emit("animationStart"),this.animation.animate(function(x){var E=S+(p-S)*x;y.options.animatedValue&&y.emit("value",E,y.value),y.options.value=E,y.draw(),y.emit("animate",x,y.options.value)},function(){y._value!==void 0&&(y.emit("value",y._value,y.value),y.options.value=y._value,delete y._value),y.draw(),y.emit("animationEnd"),y.animation.frame=null})}else this.emit("value",p,this.value),this.options.value=p,this.draw()},get:function(){return this._value===void 0?this.options.value:this._value}}],[{key:"configure",value:function(p){return p}},{key:"initialize",value:function(p,y){return new wn(y,"canvas",p)}},{key:"fromElement",value:function(p){var y=wn.toCamelCase(p.getAttribute("data-type")),S=p.attributes,x=0,E=S.length,O={};if(y){for(/Gauge$/.test(y)||(y+="Gauge");x<E;x++)O[wn.toCamelCase(S[x].name.replace(/^data-/,""),!1)]=wn.parse(S[x].value);new wn(O,p.tagName,y).process(p)}}},{key:"ensureValue",value:function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return p=parseFloat(p),!isNaN(p)&&isFinite(p)||(p=parseFloat(y)||0),p}},{key:"mod",value:function(p,y){return(p%y+y)%y}},{key:"version",get:function(){return zo}}]),l})(bm);n!==void 0&&(n.BaseGauge=Ai,n.gauges=(window.document||{}).gauges=ca);var Am=/{([_a-zA-Z]+[_a-zA-Z0-9]*)}/g,oe={roundRect:C,padValue:M,formatMajorTickNumber:V,radians:D,radialPoint:j,linearGradient:Z,drawNeedleShadow:J,drawValueBox:Te,verifyError:h,prepareTicks:b,font:ee,normalizedValue:Qe,formatContext:f},ma=Math.PI,Ho=ma/2,jr=Object.assign({},qo,{ticksAngle:270,startAngle:45,colorNeedleCircleOuter:"#f0f0f0",colorNeedleCircleOuterEnd:"#ccc",colorNeedleCircleInner:"#e8e8e8",colorNeedleCircleInnerEnd:"#f5f5f5",needleCircleSize:10,needleCircleInner:!0,needleCircleOuter:!0,needleStart:20,animationTarget:"needle",useMinPath:!1,barWidth:0,barStartPosition:"left"}),vm=(function(c){function l(p){return i(this,l),p=Object.assign({},jr,p||{}),e(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l.configure(p)))}return t(l,c),sn(l,[{key:"draw",value:function(){try{var p=this.canvas,y=[-p.drawX,-p.drawY,p.drawWidth,p.drawHeight],S=y[0],x=y[1],E=y[2],O=y[3],P=this.options;if(P.animationTarget==="needle"){if(!p.elementClone.initialized){var N=p.contextClone;N.clearRect(S,x,E,O),this.emit("beforePlate"),Me(N,P),this.emit("beforeHighlights"),ze(N,P),this.emit("beforeMinorTicks"),He(N,P),this.emit("beforeMajorTicks"),rt(N,P),this.emit("beforeNumbers"),Ta(N,P),this.emit("beforeTitle"),Rr(N,P),this.emit("beforeUnits"),Nr(N,P),p.elementClone.initialized=!0}this.canvas.commit(),p.context.clearRect(S,x,E,O),p.context.drawImage(p.elementClone,S,x,E,O),this.emit("beforeProgressBar"),Lr(p.context,P),this.emit("beforeValueBox"),Wr(p.context,P,Gr(this)),this.emit("beforeNeedle"),Vr(p.context,P)}else{var Q=-oe.radians((P.value-P.minValue)/(P.maxValue-P.minValue)*P.ticksAngle);if(p.context.clearRect(S,x,E,O),this.emit("beforePlate"),Me(p.context,P),p.context.rotate(Q),this.emit("beforeHighlights"),ze(p.context,P),this.emit("beforeMinorTicks"),He(p.context,P),this.emit("beforeMajorTicks"),rt(p.context,P),this.emit("beforeNumbers"),Ta(p.context,P),this.emit("beforeProgressBar"),Lr(p.context,P),p.context.rotate(-Q),!p.elementClone.initialized){var $=p.contextClone;$.clearRect(S,x,E,O),this.emit("beforeTitle"),Rr($,P),this.emit("beforeUnits"),Nr($,P),this.emit("beforeNeedle"),Vr($,P),p.elementClone.initialized=!0}p.context.drawImage(p.elementClone,S,x,E,O)}this.emit("beforeValueBox"),Wr(p.context,P,Gr(this)),Bo(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"draw",this).call(this)}catch(le){oe.verifyError(le)}return this}},{key:"value",set:function(p){p=Ai.ensureValue(p,this.options.minValue),this.options.animation&&this.options.ticksAngle===360&&this.options.useMinPath&&(this._value=p,p=this.options.value+((p-this.options.value)%360+540)%360-180),fm(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"value",p,this)},get:function(){return Bo(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"value",this)}}],[{key:"configure",value:function(p){return p.barWidth>50&&(p.barWidth=50),isNaN(p.startAngle)&&(p.startAngle=45),isNaN(p.ticksAngle)&&(p.ticksAngle=270),p.ticksAngle>360&&(p.ticksAngle=360),p.ticksAngle<0&&(p.ticksAngle=0),p.startAngle<0&&(p.startAngle=0),p.startAngle>360&&(p.startAngle=360),p}}]),l})(Ai);n!==void 0&&(n.RadialGauge=vm),Ai.initialize("RadialGauge",jr);var Yr=Object.assign({},qo,{borderRadius:0,barBeginCircle:30,colorBarEnd:"",colorBarProgressEnd:"",needleWidth:6,tickSide:"both",needleSide:"both",numberSide:"both",ticksWidth:10,ticksWidthMinor:5,ticksPadding:5,barLength:85,fontTitleSize:26,highlightsWidth:10}),ym=(function(c){function l(p){return i(this,l),p=Object.assign({},Yr,p||{}),e(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l.configure(p)))}return t(l,c),sn(l,[{key:"draw",value:function(){try{var p=this.canvas,y=[-p.drawX,-p.drawY,p.drawWidth,p.drawHeight],S=y[0],x=y[1],E=y[2],O=y[3],P=this.options;if(!p.elementClone.initialized){var N=p.contextClone;N.clearRect(S,x,E,O),this.emit("beforePlate"),this.drawBox=im(N,P,S,x,E,O),this.emit("beforeBar"),am.apply(void 0,[N,P].concat(o(this.drawBox))),p.contextClone.barDimensions=N.barDimensions,this.emit("beforeHighlights"),rm(N,P),this.emit("beforeMinorTicks"),lm(N,P),this.emit("beforeMajorTicks"),sm(N,P),this.emit("beforeNumbers"),dm(N,P),this.emit("beforeTitle"),cm(N,P),this.emit("beforeUnits"),mm(N,P),p.elementClone.initialized=!0}this.canvas.commit(),p.context.clearRect(S,x,E,O),p.context.drawImage(p.elementClone,S,x,E,O),this.emit("beforeProgressBar"),om.apply(void 0,[p.context,P].concat(o(this.drawBox))),this.emit("beforeNeedle"),um(p.context,P),this.emit("beforeValueBox"),gm.apply(void 0,[p.context,P,P.animatedValue?this.options.value:this.value].concat(o(this.drawBox))),Bo(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"draw",this).call(this)}catch(Q){oe.verifyError(Q)}return this}}],[{key:"configure",value:function(p){return p.barStrokeWidth>=p.barWidth&&(p.barStrokeWidth=Se(p.barWidth/2)),p.hasLeft=Br("right",p),p.hasRight=Br("left",p),p.value>p.maxValue&&(p.value=p.maxValue),p.value<p.minValue&&(p.value=p.minValue),Ai.configure(p)}}]),l})(Ai);n!==void 0&&(n.LinearGauge=ym),Ai.initialize("LinearGauge",Yr),typeof Eo<"u"&&Object.assign(n,{Collection:s,GenericOptions:qo,Animation:Uo,BaseGauge:Ai,drawings:oe,SmartCanvas:si,DomObserver:wn,vendorize:a})})(typeof Eo<"u"?Eo.exports:window)});var Ei=(()=>{class n{appSettings=A(Zt);data=A(Ci);_svcDatasetConfigs=[];_svcDataSource=[];_svcSubjectObserverRegistry=[];signedAnglePaths=new Set(["self.navigation.attitude.roll","self.navigation.attitude.pitch","self.navigation.attitude.yaw","self.environment.wind.angleApparent","self.environment.wind.angleTrueGround","self.environment.wind.angleTrueWater","self.steering.rudderAngle"]);constructor(){this._svcDatasetConfigs=this.appSettings.getDataSets(),this.cleanupDatasets(),this.startAll()}cleanupDatasets(){if(this.appSettings.configUpgrade()||this.appSettings.getAppConfig().configVersion<12)return;let t=this.appSettings.getDashboardConfig(),i=new Set;t.forEach(h=>{h.configuration?.forEach(f=>{f?.id&&i.add(f.id)})});function a(h){let f=h.match(/^(windtrends|speedtrends)-(.+)$/);return f?f[2]:null}let r=[],s=[];for(let h of this._svcDatasetConfigs){let f=h.label||"",b=!1;if(f.startsWith("windtrends-")||f.startsWith("speedtrends-")){let C=a(f);b=!!(C&&i.has(C))}else(f.startsWith("simple-chart-")||(f.match(/\|/g)||[]).length===4)&&(b=i.has(h.uuid));b?s.push(h):r.push(h)}r.length&&(r.forEach(h=>{console.warn(`[DatasetService] Cleaned dataset: uuid=${h.uuid}, label="${h.label}"`)}),this._svcDatasetConfigs=s,this.appSettings.saveDataSets(this._svcDatasetConfigs))}setupServiceSubjectRegistry(e,t){let i=this._svcSubjectObserverRegistry.findIndex(a=>a.datasetUuid==e);i>=0&&(this._svcSubjectObserverRegistry[i].rxjsSubject.complete(),this._svcSubjectObserverRegistry.splice(i,1)),this._svcSubjectObserverRegistry.push({datasetUuid:e,rxjsSubject:new Xr(t)})}createDataSourceConfiguration(e){let i={uuid:e.uuid,pathObserverSubscription:null,sampleTime:null,maxDataPoints:null,smoothingPeriod:null,historicalData:[]};switch(e.timeScaleFormat){case"Last 30 Minutes":i.maxDataPoints=120,i.sampleTime=15e3,i.smoothingPeriod=50;break;case"Last 5 Minutes":i.maxDataPoints=60,i.sampleTime=5e3,i.smoothingPeriod=25;break;case"Last Minute":i.maxDataPoints=60,i.sampleTime=1e3,i.smoothingPeriod=25;break;case"hour":i.maxDataPoints=e.period*120,i.sampleTime=3e4,i.smoothingPeriod=Math.floor(i.maxDataPoints*.25);break;case"minute":i.maxDataPoints=e.period*60,i.sampleTime=1e3,i.smoothingPeriod=Math.floor(i.maxDataPoints*.25);break;default:i.maxDataPoints=e.period*5,i.sampleTime=200,i.smoothingPeriod=Math.floor(i.maxDataPoints*.25);break}return(!i.maxDataPoints||i.maxDataPoints<1)&&(i.maxDataPoints=1),i}startAll(){console.log("[Dataset Service] Auto Starting "+this._svcDatasetConfigs.length.toString()+" Datasets");for(let e of this._svcDatasetConfigs)this.start(e.uuid)}start(e){let t=this._svcDatasetConfigs.find(h=>h.uuid==e);if(!t){console.warn(`[Dataset Service] Dataset UUID:${e} not found`);return}let i=this.createDataSourceConfiguration(t);this.setupServiceSubjectRegistry(i.uuid,i.maxDataPoints);let a=this._svcDataSource[this._svcDataSource.push(i)-1];console.log(`[Dataset Service] Starting recording process: ${t.path}, Scale: ${t.timeScaleFormat}, Period: ${t.period}, Datapoints: ${i.maxDataPoints}`);function r(h){return f=>xn(h).pipe(cs(f,(b,C)=>C))}let s=this.resolveAngleDomain(t.path,t.baseUnit);a.pathObserverSubscription=this.data.subscribePath(t.path,t.pathSource).pipe(r(i.sampleTime)).subscribe(h=>{if(h.data.value===null)return;a.maxDataPoints>0&&a.historicalData.length>=a.maxDataPoints&&a.historicalData.shift(),a.historicalData.push(h.data.value);let f=this.updateDataset(a,t.baseUnit,s);this._svcSubjectObserverRegistry.find(b=>b.datasetUuid===a.uuid).rxjsSubject.next(f)})}stop(e){let t=this._svcDataSource.findIndex(i=>i.uuid==e);console.log(`[Dataset Service] Stopping Dataset ${e} data capture`),this._svcDataSource[t].pathObserverSubscription.unsubscribe(),this._svcDataSource.splice(t,1)}list(){return qt(this._svcDatasetConfigs)}getDatasetConfig(e){return this._svcDatasetConfigs.find(t=>t.uuid===e)}getDataSourceInfo(e){return this._svcDataSource.find(t=>t.uuid===e)}create(e,t,i,a,r,s=!0,h=!0,f){if(!e||!t||!i||!a||!r)return null;let b=f||qi.create(),C={uuid:b,path:e,pathSource:t,baseUnit:this.data.getPathUnitType(e),timeScaleFormat:i,period:a,label:r,editable:h};return console.log(`[Dataset Service] Creating ${s?"":"non-"}persistent ${h?"":"hidden "}dataset: ${C.uuid}, Path: ${C.path}, Source: ${C.pathSource} Scale: ${C.timeScaleFormat}, Period: ${C.period}`),this._svcDatasetConfigs.push(C),this.start(b),s===!0&&this.appSettings.saveDataSets(this._svcDatasetConfigs),b}edit(e,t=!0){let i=this._svcDatasetConfigs.find(a=>a.uuid===e.uuid);return i?JSON.stringify(i)===JSON.stringify(e)?(console.log(`[Dataset Service] No changes detected for Dataset ${e.uuid}.`),!1):(this.stop(e.uuid),console.log(`[Dataset Service] Updating Dataset: ${e.uuid}`),e.baseUnit=this.data.getPathUnitType(e.path),this._svcDatasetConfigs.splice(this._svcDatasetConfigs.findIndex(a=>a.uuid===e.uuid),1,e),this.start(e.uuid),t===!0&&this.appSettings.saveDataSets(this._svcDatasetConfigs),!0):!1}remove(e,t=!0){return!e||e===""||this._svcDatasetConfigs.findIndex(i=>i.uuid===e)===-1?!1:(this.stop(e),console.log(`[Dataset Service] Removing ${t?"":"non-"}persistent Dataset: ${e}`),this._svcDatasetConfigs.splice(this._svcDatasetConfigs.findIndex(i=>i.uuid===e),1),this._svcSubjectObserverRegistry.find(i=>i.datasetUuid===e).rxjsSubject.complete(),this._svcSubjectObserverRegistry.splice(this._svcSubjectObserverRegistry.findIndex(i=>i.datasetUuid===e),1),t===!0&&this.appSettings.saveDataSets(this._svcDatasetConfigs),!0)}getDatasetObservable(e){let t=this._svcSubjectObserverRegistry.find(i=>i.datasetUuid==e);return t?t.rxjsSubject.asObservable():null}getDatasetBatchThenLiveObservable(e){let t=this._svcSubjectObserverRegistry.find(h=>h.datasetUuid==e);if(!t)return null;let i=t.rxjsSubject,a=i._buffer?i._buffer.slice():[],r=Kr([a]),s=i.pipe(ds(a.length));return ts(r,s)}updateDataset(e,t,i="scalar"){let a=null,r=null,s=null,h=null;if(t==="rad"){a=this.circularMeanRad(e.historicalData);let M=e.historicalData.slice(-e.smoothingPeriod);r=this.circularMeanRad(M);let{min:V,max:D}=this.circularMinMaxRad(e.historicalData);i==="direction"?(a=this.normalizeToDirection(a),r=this.normalizeToDirection(r),s=this.normalizeToDirection(V),h=this.normalizeToDirection(D)):i==="signed"?(a=this.normalizeToSigned(a),r=this.normalizeToSigned(r),s=this.normalizeToSigned(V),h=this.normalizeToSigned(D)):(s=V,h=D)}else a=b(e.historicalData),r=C(e.historicalData,e.smoothingPeriod),s=Math.min(...e.historicalData),h=Math.max(...e.historicalData);return{timestamp:Date.now(),data:{value:t==="rad"?i==="signed"?this.normalizeToSigned(e.historicalData[e.historicalData.length-1]):this.normalizeToDirection(e.historicalData[e.historicalData.length-1]):e.historicalData[e.historicalData.length-1],sma:r,ema:null,doubleEma:null,lastAverage:a,lastMinimum:s,lastMaximum:h}};function b(M){return M.length===0?null:M.reduce((D,j)=>D+j,0)/M.length}function C(M,V){M.length<V&&(V=M.length);let D=0;for(let j=M.length-V;j<M.length;j++)D+=M[j];return D/V}}circularMeanRad(e){if(e.length===0)return 0;let t=e.reduce((a,r)=>a+Math.sin(r),0),i=e.reduce((a,r)=>a+Math.cos(r),0);return Math.atan2(t/e.length,i/e.length)}circularMinMaxRad(e){if(e.length===0)return{min:0,max:0};let t=e.map(h=>(h*180/Math.PI+360)%360).sort((h,f)=>h-f),i=0,a=0;for(let h=0;h<t.length;h++){let f=(h+1)%t.length,b=(t[f]-t[h]+360)%360;b>i&&(i=b,a=f)}let r=t[a]*Math.PI/180,s=t[(a-1+t.length)%t.length]*Math.PI/180;return{min:r,max:s}}resolveAngleDomain(e,t){if(t!=="rad")return"scalar";let i=this.normalizePathKey(e);for(let a of this.signedAnglePaths)if(i===this.normalizePathKey(a))return"signed";return"direction"}normalizePathKey(e){return e.replace(/^vessels\.self\./,"").replace(/^self\./,"")}mod(e,t){return(e%t+t)%t}normalizeToDirection(e){let t=2*Math.PI;return this.mod(e,t)}normalizeToSigned(e){let t=2*Math.PI;return this.mod(e+Math.PI,t)-Math.PI}removeIfExists(e,t=!0){return!e||this._svcDatasetConfigs.findIndex(i=>i.uuid===e)===-1?!1:this.remove(e,t)}ngOnDestroy(){[...this._svcDataSource].forEach(e=>{try{this.stop(e.uuid)}catch{}}),this._svcSubjectObserverRegistry.forEach(e=>e.rxjsSubject.complete()),this._svcSubjectObserverRegistry=[]}static \u0275fac=function(t){return new(t||n)};static \u0275prov=pt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var kl=(()=>{class n{kipTimers={};constructor(){}createTimer(e,t,i){return e in this.kipTimers?this.kipTimers[e].currentValue.asObservable():(this.kipTimers[e]={currentValue:new Ia(t),timeoutID:null,intervalMS:i},this.kipTimers[e].currentValue.asObservable())}startTimer(e){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&this.kipTimers[e].timeoutID===null&&(this.kipTimers[e].timeoutID=setInterval(()=>{this.kipTimers[e].currentValue.next(this.kipTimers[e].currentValue.value+1)},this.kipTimers[e].intervalMS))}stopTimer(e){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&this.kipTimers[e].timeoutID!==null&&(clearInterval(this.kipTimers[e].timeoutID),this.kipTimers[e].timeoutID=null)}setTimer(e,t){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&this.kipTimers[e].currentValue.next(t)}deleteTimer(e){Object.prototype.hasOwnProperty.call(this.kipTimers,e)&&(this.stopTimer(e),this.kipTimers[e].currentValue.complete(),delete this.kipTimers[e])}isRunning(e){let t=!1;return e in this.kipTimers&&(t=this.kipTimers[e].timeoutID!==null),t}ngOnDestroy(){Object.keys(this.kipTimers).forEach(e=>{this.kipTimers[e].timeoutID&&(clearInterval(this.kipTimers[e].timeoutID),this.kipTimers[e].timeoutID=null),this.kipTimers[e].currentValue.complete()}),this.kipTimers={}}static \u0275fac=function(t){return new(t||n)};static \u0275prov=pt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Tl=(()=>{class n{sanitizer=A(Za);transform(e){return this.sanitizer.bypassSecurityTrustResourceUrl(e)}static \u0275fac=function(t){return new(t||n)};static \u0275pipe=Fa({name:"safe",type:n,pure:!0})}return n})();var Sm={minDist:230,maxDur:550,minVelocity:1.5,axisDominance:1.8,deadzoneMs:160,purityRatio:.8,lockThreshold:28,directionLockAngle:25,reversalPrimaryThreshold:34};function go(n){let o=Be(Be({},Sm),n);return`(() => {
2
2
  if (window.__kipSwipeInit) return; window.__kipSwipeInit = true;
3
3
  const instanceId='${o.instanceId}';
4
4
  let pointerId=null; let startX=0; let startY=0; let startT=0; let peakPrimary=0; let peakCross=0; let cancelled=false;
@@ -0,0 +1 @@
1
+ import{d as D}from"./chunk-QLTN6G6E.js";import{a as f,d as I,e as S,m as b}from"./chunk-XDPHEQEO.js";import{$c as E,Ic as A,Nc as P,Oc as m,Sc as M,Wc as j,a as g,b as v,c as C,ca as u,cc as p,ec as h,f as R,ga as a,j as w,l as y,pa as N,ra as l,t as _}from"./chunk-OB3QLUH6.js";var T=[{id:null,name:"Dashboard 1",icon:"dashboard-dashboard",configuration:[{w:24,h:24,id:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc",selector:"widget-host2",input:{widgetProperties:{type:"widget-tutorial",uuid:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc"}},x:0,y:0}],collapseSplitShell:!1}];var x=(()=>{class i{_settings=a(b);_router=a(j);dashboards=l([],{equal:S});activeDashboard=l(0);_widgetAction=new y(null);widgetAction$=this._widgetAction.asObservable();isDashboardStatic=l(!0);layoutEditSaved=l(0);layoutEditCanceled=l(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=T.map(r=>v(g({},r),{id:f.create()}));this.dashboards.set([...t])}else this.dashboards.set(this._settings.getDashboardConfig());h(()=>{let t=this.dashboards();this._settings.saveDashboards(t)})}toggleStaticDashboard(){this.isDashboardStatic.set(!this.isDashboardStatic())}add(e,t,r,s){let n=0;return this.dashboards.update(o=>{let c=[...o,{id:f.create(),name:e,icon:r??"dashboard-dashboard",configuration:t,collapseSplitShell:s??!1}];return n=c.length-1,c}),n}update(e,t,r,s){this.dashboards.update(n=>n.map((o,c)=>c===e?v(g({},o),{name:t,icon:r??"dashboard-dashboard",collapseSplitShell:s??!1}):o))}delete(e){this.dashboards.update(t=>t.filter((r,s)=>s!==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,r,s){if(e<0||e>=this.dashboards().length)return console.error(`[Dashboard Service] Invalid itemIndex: ${e}`),-1;let n=this.dashboards()[e],o=I(n);o.id=f.create(),o.name=t,o.icon=r||"dashboard-dashboard",o.collapseSplitShell=s??!1,Array.isArray(o.configuration)?o.configuration.forEach(d=>{d&&d.input?.widgetProperties?(d.id=f.create(),d.input.widgetProperties.uuid=d.id):console.error("Dashboard Service] Widget configuration is missing required properties:",d)}):(console.error("Dashboard Service] Dashboard configuration is not an array:",o.configuration),o.configuration=[]);let c=-1;return this.dashboards.update(d=>{let k=[...d,o];return c=k.length-1,k}),c}updateConfiguration(e,t){this.dashboards.update(r=>r.map((s,n)=>n===e?S(s.configuration,t)?s:v(g({},s),{configuration:t}):s))}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)}setActiveDashboard(e){e!==this.activeDashboard()&&(e>=0&&e<this.dashboards().length?this.activeDashboard.set(e):console.error(`[Dashboard Service] Invalid dashboard ID: ${e}`))}navigateToActive(){this._router.navigate(["/dashboard",this.activeDashboard()])}navigateTo(e){e>=0&&e<this.dashboards().length?this._router.navigate(["/dashboard",e]):console.error(`[Dashboard Service] Invalid dashboard ID: ${e}`)}navigateToNextDashboard(){let e=null;this.activeDashboard()-1<0?e=this.dashboards().length-1:e=this.activeDashboard()-1,this._router.navigate(["/dashboard",e])}navigateToPreviousDashboard(){let e=null;this.activeDashboard()+1>=this.dashboards().length?e=0:e=this.activeDashboard()+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.set(e)}notifyLayoutEditSaved(){this.layoutEditSaved.update(e=>e+1)}notifyLayoutEditCanceled(){this.layoutEditCanceled.update(e=>e+1)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=u({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var $={name:"@mxtommy/kip",version:"4.0.6",description:"An advanced and versatile marine instrumentation package to display Signal K data.",license:"MIT",author:{name:"Thomas St.Pierre, David Godin"},contributors:[{name:"David Godin",email:"godind@hotmail.com"},{name:"Thomas St.Pierre",email:"thomas@samoht.ca"}],homepage:"https://github.com/mxtommy/Kip",bugs:"https://github.com/mxtommy/Kip/issues",repository:{type:"git",url:"git+https://github.com/mxtommy/Kip.git"},keywords:["signalk-webapp","signalk-category-instruments","signalk-category-notifications","signalk-node-server-plugin","signal k","signalk","instruments","dashboard","marine","nmea"],signalk:{appIcon:"assets/icon-72x72.png",displayName:"KIP Instrument MFD"},main:"plugin/index.js","signalk-plugin-enabled-by-default":!0,scripts:{test:"CI=1 ng test --watch=false","test:interactive":"ng test","test:headless":"CI=1 ng test --browsers=ChromeHeadless --watch=false",lint:"ng lint",dev:"ng serve --configuration=dev --serve-path=/@mxtommy/kip/","build:plugin":"tsc -p ./kip-plugin/tsconfig.plugin.json","build:dev":"ng build --configuration=dev","build:prod":"ng build --configuration=production","build:all":"npm run build:plugin && npm run build:prod",e2e:"ng e2e","generate:widget":"npx schematics ./tools/schematics/collection.json:create-host2-widget --dry-run=false"},schematics:"tools/schematics/collection.json",devDependencies:{"@angular-devkit/schematics-cli":"^20.1.6","@angular-devkit/build-angular":"^20.1.6","@angular/animations":"20.1.7","@angular/build":"^20.1.6","@angular/cdk":"20.1.6","@angular/cli":"^20.1.6","@angular/common":"20.1.7","@angular/compiler":"20.1.7","@angular/compiler-cli":"20.1.7","@angular/core":"20.1.7","@angular/forms":"20.1.7","@angular/language-service":"20.1.7","@angular/material":"20.1.6","@angular/platform-browser":"20.1.7","@angular/platform-browser-dynamic":"20.1.7","@angular/router":"20.1.7","@godind/ng-canvas-gauges":"^6.2.1","@robloche/chartjs-plugin-streaming":"^3.1.0","@types/canvas-gauges":"^2.1.8","@types/howler":"^2.2.10","@types/jasmine":"~3.6.0","@types/jasminewd2":"^2.0.9","@types/js-quantities":"^1.6.6","@types/lodash-es":"^4.17.9","@types/node":"^24.1.0","@zakj/no-sleep":"^0.13.5","angular-eslint":"20.1.1","chart.js":"^4.4.9","chartjs-adapter-date-fns":"^3.0.0","chartjs-plugin-annotation":"^3.0.1",codelyzer:"^6.0.0","compare-versions":"^6.1.1","core-js":"^3.13.1","date-fns":"^2.30.0",eslint:"^9.29.0",gridstack:"^12.3.3",howler:"^2.2.4","jasmine-core":"~4.0.1","jasmine-spec-reporter":"~5.0.0","js-quantities":"^1.8.0",karma:"^6.4.4","karma-spec-reporter":"^0.0.36","karma-chrome-launcher":"~3.1.0","karma-cli":"~2.0.0","karma-coverage":"^2.2.0","karma-jasmine":"~4.0.0","karma-jasmine-html-reporter":"^1.6.0","lodash-es":"^4.17.21","ng-packagr":"^20.0.1","ngx-markdown":"^20.0.0",prismjs:"^1.30.0",clipboard:"^2.0.11","ngx-resize-observer":"^3.1.0",protractor:"~7.0.0","pwa-asset-generator":"^8.1.1",rxjs:"^7.8.2",sass:"^1.49.9",screenfull:"^6.0.2",steelseries:"^2.0.9","ts-node":"^10.9.2",tslib:"^2.6.2",typescript:"^5.8.3","zone.js":"^0.15.1"},dependencies:{"@signalk/server-api":"^2.7.2"}};var L=(()=>{class i{_http=a(A);_settings=a(b);_dashboard=a(x);_data=a(D);_destroyRef=a(N);_displayName=m(this._settings.getInstanceNameAsO());_isRemoteControl=m(this._settings.getIsRemoteControlAsO());PLUGIN_URL=this._settings.signalkUrl.url+"/plugins/kip";KIP_UUID=this._settings.KipUUID;ACTIVE_SCREEN_PATH=`self.displays.${this.KIP_UUID}.activeScreen`;previousIsRemoteControl=!1;isRemoteScreenIdxCleared=!0;constructor(){let e=this.setActiveDashboard(this.KIP_UUID,null).then(()=>{console.log("[Remote Dashboards] Startup: cleared stale activeScreen (unconditional)")}).catch(t=>{console.warn("[Remote Dashboards] Startup: failed to clear stale activeScreen",t)});h(()=>{let t=this._isRemoteControl();if(!t&&!this.previousIsRemoteControl)return;let r=this._displayName(),s=this._dashboard.dashboards();p(()=>{this.previousIsRemoteControl=t;let n;if(!t)n=null;else{let o=s.map(k=>{var V=k,{configuration:c}=V,d=C(V,["configuration"]);return d});n={displayName:r,screens:o},this.isRemoteScreenIdxCleared=!1}this.shareScreens(this.KIP_UUID,n).then(()=>{console.log("[Remote Dashboards] Screen configuration shared")}).catch(o=>{console.error("[Remote Dashboards] Error sharing screen configuration:",o)})})}),h(()=>{let t=this._isRemoteControl(),r=this._dashboard.activeDashboard();p(()=>{t?this.setActiveDashboard(this.KIP_UUID,r).then(()=>{}).catch(s=>{console.error("[Remote Dashboards] Error sharing active dashboard:",s)}):this.isRemoteScreenIdxCleared||(this.setActiveDashboard(this.KIP_UUID,null).then(()=>{console.log("[Remote Dashboards] Disabled: Cleared active dashboard on server")}).catch(s=>{console.error("[Remote Dashboards] Error clearing active dashboard on server:",s)}),this.isRemoteScreenIdxCleared=!0)})}),e.finally(()=>this.setupRemoteControlListener())}setupRemoteControlListener(){this._settings.getIsRemoteControlAsO().pipe(P(this._destroyRef)).subscribe(e=>{e?this._data.subscribePath(this.ACTIVE_SCREEN_PATH,"default").pipe(P(this._destroyRef)).subscribe(t=>{if(t.data.value==null)return;let r=Number(t.data.value);!isNaN(r)&&r>=0&&r<this._dashboard.dashboards().length&&this._dashboard.activeDashboard()!==r&&(console.log(`[Remote Dashboards] Setting active dashboard to ${r} from remote update`),this._dashboard.navigateTo(r))}):this._data.unsubscribePath(this.ACTIVE_SCREEN_PATH)})}setActiveDashboard(e,t){return R(this,null,function*(){let r=t===null?null:{screenIdx:t};return _(this._http.put(`${this.PLUGIN_URL}/displays/${e}/activeScreen`,r))})}shareScreens(e,t){let r=t===null?null:g({},t);return _(this._http.put(`${this.PLUGIN_URL}/displays/${e}`,r))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=u({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var De=(()=>{class i{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 w;cssThemeColorRoles$=new y(null);_cssThemeColorRoles=null;_settings=a(b);_data=a(D);_iconRegistry=a(E);_sanitizer=a(M);_remote=a(L);isNightMode=l(!1);_useAutoNightMode=m(this._settings.getAutoNightModeAsO(),{requireSync:!0});_theme=m(this._settings.getThemeNameAsO(),{requireSync:!0});_redNightMode=m(this._settings.getRedNightModeAsO(),{requireSync:!0});_environmentMode=m(this._data.subscribePath(this.MODE_PATH,"default"));previousEnvironmentMode=null;appVersion=l($.version);browserVersion=l("Unknown");osVersion=l("Unknown");constructor(){this._iconRegistry.addSvgIconSet(this._sanitizer.bypassSecurityTrustResourceUrl("assets/svg/icons.svg")),h(()=>{this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")}),h(()=>{let e=this._environmentMode().data.value;p(()=>{this.previousEnvironmentMode!==e&&(this.previousEnvironmentMode=e,this._useAutoNightMode()&&(this.isNightMode.set(e==="night"),this.toggleDayNightMode()))})}),h(()=>{let e=this._redNightMode();p(()=>{e?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(e,t=1e4,r=!1,s="Dismiss"){this.snackbarAppNotifications.next({message:e,duration:t,silent:r,action:s})}getSnackbarAppNotifications(){return this.snackbarAppNotifications.asObservable()}readThemeCssRoleVariables(){let e=document.body,t=getComputedStyle(e),r={background:t.getPropertyValue("--mat-sys-background").trim(),cardColor:t.getPropertyValue("--kip-widget-card-background-color").trim(),blue:t.getPropertyValue("--kip-blue-color").trim(),blueDim:t.getPropertyValue("--kip-blue-dim-color").trim(),blueDimmer:t.getPropertyValue("--kip-blue-dimmer-color").trim(),green:t.getPropertyValue("--kip-green-color").trim(),greenDim:t.getPropertyValue("--kip-green-dim-color").trim(),greenDimmer:t.getPropertyValue("--kip-green-dimmer-color").trim(),grey:t.getPropertyValue("--kip-grey-color").trim(),greyDim:t.getPropertyValue("--kip-grey-dim-color").trim(),greyDimmer:t.getPropertyValue("--kip-grey-dimmer-color").trim(),orange:t.getPropertyValue("--kip-orange-color").trim(),orangeDim:t.getPropertyValue("--kip-orange-dim-color").trim(),orangeDimmer:t.getPropertyValue("--kip-orange-dimmer-color").trim(),pink:t.getPropertyValue("--kip-pink-color").trim(),pinkDim:t.getPropertyValue("--kip-pink-dim-color").trim(),pinkDimmer:t.getPropertyValue("--kip-pink-dimmer-color").trim(),purple:t.getPropertyValue("--kip-purple-color").trim(),purpleDim:t.getPropertyValue("--kip-purple-dim-color").trim(),purpleDimmer:t.getPropertyValue("--kip-purple-dimmer-color").trim(),contrast:t.getPropertyValue("--kip-contrast-color").trim(),contrastDim:t.getPropertyValue("--kip-contrast-dim-color").trim(),contrastDimmer:t.getPropertyValue("--kip-contrast-dimmer-color").trim(),yellow:t.getPropertyValue("--kip-yellow-color").trim(),yellowDim:t.getPropertyValue("--kip-yellow-dim-color").trim(),yellowDimmer:t.getPropertyValue("--kip-yellow-dimmer-color").trim(),port:t.getPropertyValue("--kip-port-color").trim(),starboard:t.getPropertyValue("--kip-starboard-color").trim(),zoneNominal:t.getPropertyValue("--kip-zone-nominal-color").trim(),zoneAlert:t.getPropertyValue("--kip-zone-alert-color").trim(),zoneWarn:t.getPropertyValue("--kip-zone-warn-color").trim(),zoneAlarm:t.getPropertyValue("--kip-zone-alarm-color").trim(),zoneEmergency:t.getPropertyValue("--kip-zone-emergency-color").trim()};this.cssThemeColorRoles$.next(r)}get cssThemeColors(){return this._cssThemeColorRoles}setBrightness(e,t=!1){let r=document.body;r.style.setProperty("--kip-nightModeBrightness",`${e}`);let s=t?" sepia(0.5) hue-rotate(-30deg)":"";r.style.setProperty("--kip-nightModeFilters",s)}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 e=navigator.userAgent,t="Unknown";return e.includes("Edg")?t=`Edge ${e.match(/Edg\/(\d+)/)?.[1]}`:e.includes("Chrome")&&!e.includes("Edg")&&!e.includes("Chromium")?t=`Chrome ${e.match(/Chrome\/(\d+)/)?.[1]}`:e.includes("Chromium")?t=`Chromium ${e.match(/Chromium\/(\d+)/)?.[1]}`:e.includes("Firefox")?t=`Firefox ${e.match(/Firefox\/(\d+)/)?.[1]}`:e.includes("Safari")&&!e.includes("Chrome")&&!e.includes("Chromium")?t=`Safari ${e.match(/Version\/(\d+)/)?.[1]}`:(e.includes("Opera")||e.includes("OPR"))&&(t=`Opera ${e.match(/(Opera|OPR)\/(\d+)/)?.[2]}`),t}getOSVersion(){let e=navigator.platform,t=navigator.userAgent;return e.startsWith("Mac")?"macOS":e.startsWith("Win")?"Windows":/Linux/.test(e)?t.includes("ARM")||t.includes("aarch64")||t.includes("Raspberry")||e.includes("armv7l")||e.includes("armv8l")?"Raspberry Pi":"Linux":"Unknown OS"}static \u0275fac=function(t){return new(t||i)};static \u0275prov=u({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{x as a,De as b};
@@ -1 +1 @@
1
- import{h as B}from"./chunk-B4OHYWVY.js";import{h as q}from"./chunk-MTKFOFVR.js";import"./chunk-QVCMARCU.js";import"./chunk-RYHOAWDD.js";import"./chunk-PKKBBIJK.js";import"./chunk-HIADZ4BV.js";import{a as I}from"./chunk-6T7IIPAQ.js";import"./chunk-OQULS6SV.js";import"./chunk-QLTN6G6E.js";import{m as N}from"./chunk-XDPHEQEO.js";import"./chunk-SZ2GUIT5.js";import{Db as z,Eb as E,Fa as l,Gb as m,Gc as A,Gd as L,Hb as R,Hd as F,Ld as U,Oa as x,Oc as S,Xa as W,Zb as k,Zd as V,_d as Z,bb as b,cb as P,dc as u,ec as h,ga as a,hb as w,ib as s,ja as v,jb as c,ka as C,kb as d,kc as D,pd as X,ra as r,rb as y,tb as O,vb as g,xc as T}from"./chunk-OB3QLUH6.js";var G=["panel"],Q=(i,f)=>[i,f];function j(i,f){if(i&1&&d(0,"div",7),i&2){let t=g();m("transform",t.ghostTransform())}}function H(i,f){if(i&1){let t=y();s(0,"div",8),O("pointerdown",function(e){v(t);let o=g();return C(o.startResize(e))}),s(1,"button",9),O("pointerdown",function(e){v(t);let o=g();return C(o.startResize(e))}),d(2,"mat-icon",10),c()()}}var ct=(()=>{class i{panelEl=D.required("panel");_settings=a(N);_dashboard=a(I);breakpointObserver=a(X);ngZone=a(W);side=r(this._settings.getSplitShellSide());panelRatio=r(this._settings.getSplitShellWidth());originalPanelRatio=null;panelWidth=r(0);panelCollapsed=u(()=>!!this._dashboard.dashboards()[this._dashboard.activeDashboard()]?.collapseSplitShell);fskShellSwipeDisabled=S(this._settings.getSplitShellSwipeDisabledAsO());handset$=this.breakpointObserver.observe(U.HandsetPortrait);handset=S(this.handset$,{initialValue:{matches:!1,breakpoints:{}}});freeboardWidgetStub={uuid:"persistent-freeboard-shell",type:"widget-freeboardsk",config:{}};chartplotterModeInPortrait=u(()=>this.handset().matches&&!this.panelCollapsed());canResize=u(()=>!this._dashboard.isDashboardStatic()&&!this.panelCollapsed());resizing=!1;startX=0;startW=0;boundMove=t=>this.onMove(t);boundUp=()=>this.onUp();static MIN_DELTA_PX=1;ghostActive=r(!1);ghostTransform=r("");ghostWidth=0;recomputeWidth=()=>{let t=this.panelEl()?.nativeElement.parentElement;if(!t)return;let n=t.clientWidth;this.panelWidth.set(Math.round(n*this.panelRatio()))};constructor(){window.addEventListener("resize",this.recomputeWidth,{passive:!0}),queueMicrotask(this.recomputeWidth),h(()=>{this.chartplotterModeInPortrait(),this.panelRatio(),this.recomputeWidth(),setTimeout(()=>window.dispatchEvent(new Event("resize")),0)}),h(()=>{let t=this._dashboard.isDashboardStatic();t||this.originalPanelRatio===null&&(this.originalPanelRatio=this.panelRatio()),t&&this.originalPanelRatio}),h(()=>{if(this._dashboard.layoutEditSaved(),this.originalPanelRatio!==null){let t=this.panelRatio();this._settings.setSplitShellWidth(t),this.originalPanelRatio=null}}),h(()=>{if(this._dashboard.layoutEditCanceled(),this.originalPanelRatio!==null){let t=this.originalPanelRatio;this.panelRatio.set(t),queueMicrotask(()=>this.recomputeWidth()),this.originalPanelRatio=null}})}startResize(t){this.canResize()&&(this.resizing=!0,this.startX=t.clientX,this.startW=this.panelWidth(),this.ghostWidth=this.startW,this.ghostActive.set(!0),this.updateGhostTransform(this.startW),t.target.setPointerCapture(t.pointerId),this.ngZone.runOutsideAngular(()=>{window.addEventListener("pointermove",this.boundMove,{passive:!0}),window.addEventListener("pointerup",this.boundUp,{passive:!0})}))}onMove(t){if(!this.resizing)return;let n=this.side()==="left"?t.clientX-this.startX:this.startX-t.clientX,o=this.panelEl()?.nativeElement.parentElement?.clientWidth??1,p=this.startW+n,_=o*.1,$=o*.9,M=Math.min($,Math.max(_,p));Math.abs(M-this.ghostWidth)<i.MIN_DELTA_PX||(this.ghostWidth=M,this.ngZone.runOutsideAngular(()=>this.updateGhostTransform(M)))}onUp(){if(!this.resizing)return;this.resizing=!1,window.removeEventListener("pointermove",this.boundMove),window.removeEventListener("pointerup",this.boundUp);let t=this.ghostWidth;this.ghostActive.set(!1);let n=this.panelEl();n&&!this.panelCollapsed()&&(n.nativeElement.style.width=t+"px"),this.ngZone.run(()=>{this.panelWidth.set(t);let o=this.panelEl()?.nativeElement.parentElement?.clientWidth??t,p=o?t/o:.3,_=this.panelRatio();Math.abs(p-_)>5e-4&&this.panelRatio.set(p)})}updateGhostTransform(t){this.side()==="left"?this.ghostTransform.set(`translateX(${t}px)`):this.ghostTransform.set(`translateX(-${t}px)`)}ngOnDestroy(){window.removeEventListener("resize",this.recomputeWidth),this.resizing&&(window.removeEventListener("pointermove",this.boundMove),window.removeEventListener("pointerup",this.boundUp))}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["split-shell"]],viewQuery:function(n,e){n&1&&z(e.panelEl,G,5),n&2&&E()},decls:8,vars:18,consts:[["panel",""],[1,"split-root",3,"ngClass"],[1,"resize-ghost",3,"transform"],[1,"fsk-shell"],["role","separator","aria-label","Resize Freeboard chartplotter panel","aria-orientation","vertical",1,"drag-handle"],[1,"fsk-iframe",3,"type","id","swipeDisabled","disableWidgetShell"],[1,"dash-container"],[1,"resize-ghost"],["role","separator","aria-label","Resize Freeboard chartplotter panel","aria-orientation","vertical",1,"drag-handle",3,"pointerdown"],["mat-mini-fab","","tabindex","-1","aria-hidden","true",1,"drag-fab",3,"pointerdown"],["fontIcon","drag_indicator"]],template:function(n,e){n&1&&(s(0,"div",1),b(1,j,1,2,"div",2),s(2,"div",3,0),b(4,H,3,0,"div",4),d(5,"widget-freeboardsk",5),c(),s(6,"div",6),d(7,"dashboard"),c()()),n&2&&(m("--panel-ratio",e.panelRatio()),w("ngClass",k(15,Q,e.side()==="left"?"side-left":"side-right",e.chartplotterModeInPortrait()?"portrait-column":"")),l(),P(e.ghostActive()?1:-1),l(),m("width",e.chartplotterModeInPortrait()?null:e.panelWidth(),"px"),R("collapsed",e.panelCollapsed())("drag-disabled",!e.canResize()),l(2),P(e.canResize()?4:-1),l(),w("type",e.freeboardWidgetStub.type)("id",e.freeboardWidgetStub.uuid)("swipeDisabled",e.fskShellSwipeDisabled())("disableWidgetShell",!0))},dependencies:[A,T,q,B,Z,V,F,L],styles:[".split-root[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;overflow:hidden}.split-root.side-left[_ngcontent-%COMP%]{flex-direction:row}.split-root.side-right[_ngcontent-%COMP%]{flex-direction:row-reverse}.split-root.portrait-column[_ngcontent-%COMP%]{flex-direction:column}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%], .split-root.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{width:100%!important;min-height:0}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{flex:0 0 calc(var(--panel-ratio, .3) * 100%)}.split-root.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden}.split-root.side-left.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{order:2}.split-root.side-left.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{order:1}.split-root.side-right.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{order:2}.split-root.side-right.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{order:1}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell.collapsed[_ngcontent-%COMP%]{flex:0 0 0!important}.split-root.portrait-column[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .split-root.portrait-column[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{display:none}.fsk-shell[_ngcontent-%COMP%]{position:relative;height:100%;display:flex;flex-direction:column;background:var(--mat-sys-surface-container, #111);transition:width .2s ease}.fsk-shell.collapsed[_ngcontent-%COMP%]{width:1px!important;visibility:hidden;opacity:0;pointer-events:none}.fsk-iframe[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.dash-container[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;height:100%}.drag-handle[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:3px;cursor:col-resize;background:var(--mat-sys-inverse-primary);z-index:5}.drag-handle[_ngcontent-%COMP%] .drag-fab[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:28px;height:28px;min-width:28px;cursor:col-resize;pointer-events:auto}.drag-handle[_ngcontent-%COMP%] .drag-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;line-height:20px}.side-left[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{right:-2px}.side-right[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{left:-2px}.drag-handle[_ngcontent-%COMP%]:hover{background:var(--mat-sys-error-container)}.side-left[_ngcontent-%COMP%] .collapse-toggle[_ngcontent-%COMP%]{left:.25rem}.side-right[_ngcontent-%COMP%] .collapse-toggle[_ngcontent-%COMP%]{right:.25rem}.fsk-shell.drag-disabled[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.4}.resize-ghost[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:2px;background:var(--mat-sys-error-container);opacity:.9;pointer-events:none;z-index:30;will-change:transform;transition:none}.side-left[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{left:0}.side-right[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{right:0}"]})}return i})();export{ct as SplitShellComponent};
1
+ import{h as B}from"./chunk-2E2KZ6D5.js";import{h as q}from"./chunk-LOZEULT5.js";import"./chunk-QVCMARCU.js";import"./chunk-RYHOAWDD.js";import"./chunk-PKKBBIJK.js";import"./chunk-HIADZ4BV.js";import{a as I}from"./chunk-S7WGIMJE.js";import"./chunk-OQULS6SV.js";import"./chunk-QLTN6G6E.js";import{m as N}from"./chunk-XDPHEQEO.js";import"./chunk-SZ2GUIT5.js";import{Db as z,Eb as E,Fa as l,Gb as m,Gc as A,Gd as L,Hb as R,Hd as F,Ld as U,Oa as x,Oc as S,Xa as W,Zb as k,Zd as V,_d as Z,bb as b,cb as P,dc as u,ec as h,ga as a,hb as w,ib as s,ja as v,jb as c,ka as C,kb as d,kc as D,pd as X,ra as r,rb as y,tb as O,vb as g,xc as T}from"./chunk-OB3QLUH6.js";var G=["panel"],Q=(i,f)=>[i,f];function j(i,f){if(i&1&&d(0,"div",7),i&2){let t=g();m("transform",t.ghostTransform())}}function H(i,f){if(i&1){let t=y();s(0,"div",8),O("pointerdown",function(e){v(t);let o=g();return C(o.startResize(e))}),s(1,"button",9),O("pointerdown",function(e){v(t);let o=g();return C(o.startResize(e))}),d(2,"mat-icon",10),c()()}}var ct=(()=>{class i{panelEl=D.required("panel");_settings=a(N);_dashboard=a(I);breakpointObserver=a(X);ngZone=a(W);side=r(this._settings.getSplitShellSide());panelRatio=r(this._settings.getSplitShellWidth());originalPanelRatio=null;panelWidth=r(0);panelCollapsed=u(()=>!!this._dashboard.dashboards()[this._dashboard.activeDashboard()]?.collapseSplitShell);fskShellSwipeDisabled=S(this._settings.getSplitShellSwipeDisabledAsO());handset$=this.breakpointObserver.observe(U.HandsetPortrait);handset=S(this.handset$,{initialValue:{matches:!1,breakpoints:{}}});freeboardWidgetStub={uuid:"persistent-freeboard-shell",type:"widget-freeboardsk",config:{}};chartplotterModeInPortrait=u(()=>this.handset().matches&&!this.panelCollapsed());canResize=u(()=>!this._dashboard.isDashboardStatic()&&!this.panelCollapsed());resizing=!1;startX=0;startW=0;boundMove=t=>this.onMove(t);boundUp=()=>this.onUp();static MIN_DELTA_PX=1;ghostActive=r(!1);ghostTransform=r("");ghostWidth=0;recomputeWidth=()=>{let t=this.panelEl()?.nativeElement.parentElement;if(!t)return;let n=t.clientWidth;this.panelWidth.set(Math.round(n*this.panelRatio()))};constructor(){window.addEventListener("resize",this.recomputeWidth,{passive:!0}),queueMicrotask(this.recomputeWidth),h(()=>{this.chartplotterModeInPortrait(),this.panelRatio(),this.recomputeWidth(),setTimeout(()=>window.dispatchEvent(new Event("resize")),0)}),h(()=>{let t=this._dashboard.isDashboardStatic();t||this.originalPanelRatio===null&&(this.originalPanelRatio=this.panelRatio()),t&&this.originalPanelRatio}),h(()=>{if(this._dashboard.layoutEditSaved(),this.originalPanelRatio!==null){let t=this.panelRatio();this._settings.setSplitShellWidth(t),this.originalPanelRatio=null}}),h(()=>{if(this._dashboard.layoutEditCanceled(),this.originalPanelRatio!==null){let t=this.originalPanelRatio;this.panelRatio.set(t),queueMicrotask(()=>this.recomputeWidth()),this.originalPanelRatio=null}})}startResize(t){this.canResize()&&(this.resizing=!0,this.startX=t.clientX,this.startW=this.panelWidth(),this.ghostWidth=this.startW,this.ghostActive.set(!0),this.updateGhostTransform(this.startW),t.target.setPointerCapture(t.pointerId),this.ngZone.runOutsideAngular(()=>{window.addEventListener("pointermove",this.boundMove,{passive:!0}),window.addEventListener("pointerup",this.boundUp,{passive:!0})}))}onMove(t){if(!this.resizing)return;let n=this.side()==="left"?t.clientX-this.startX:this.startX-t.clientX,o=this.panelEl()?.nativeElement.parentElement?.clientWidth??1,p=this.startW+n,_=o*.1,$=o*.9,M=Math.min($,Math.max(_,p));Math.abs(M-this.ghostWidth)<i.MIN_DELTA_PX||(this.ghostWidth=M,this.ngZone.runOutsideAngular(()=>this.updateGhostTransform(M)))}onUp(){if(!this.resizing)return;this.resizing=!1,window.removeEventListener("pointermove",this.boundMove),window.removeEventListener("pointerup",this.boundUp);let t=this.ghostWidth;this.ghostActive.set(!1);let n=this.panelEl();n&&!this.panelCollapsed()&&(n.nativeElement.style.width=t+"px"),this.ngZone.run(()=>{this.panelWidth.set(t);let o=this.panelEl()?.nativeElement.parentElement?.clientWidth??t,p=o?t/o:.3,_=this.panelRatio();Math.abs(p-_)>5e-4&&this.panelRatio.set(p)})}updateGhostTransform(t){this.side()==="left"?this.ghostTransform.set(`translateX(${t}px)`):this.ghostTransform.set(`translateX(-${t}px)`)}ngOnDestroy(){window.removeEventListener("resize",this.recomputeWidth),this.resizing&&(window.removeEventListener("pointermove",this.boundMove),window.removeEventListener("pointerup",this.boundUp))}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["split-shell"]],viewQuery:function(n,e){n&1&&z(e.panelEl,G,5),n&2&&E()},decls:8,vars:18,consts:[["panel",""],[1,"split-root",3,"ngClass"],[1,"resize-ghost",3,"transform"],[1,"fsk-shell"],["role","separator","aria-label","Resize Freeboard chartplotter panel","aria-orientation","vertical",1,"drag-handle"],[1,"fsk-iframe",3,"type","id","swipeDisabled","disableWidgetShell"],[1,"dash-container"],[1,"resize-ghost"],["role","separator","aria-label","Resize Freeboard chartplotter panel","aria-orientation","vertical",1,"drag-handle",3,"pointerdown"],["mat-mini-fab","","tabindex","-1","aria-hidden","true",1,"drag-fab",3,"pointerdown"],["fontIcon","drag_indicator"]],template:function(n,e){n&1&&(s(0,"div",1),b(1,j,1,2,"div",2),s(2,"div",3,0),b(4,H,3,0,"div",4),d(5,"widget-freeboardsk",5),c(),s(6,"div",6),d(7,"dashboard"),c()()),n&2&&(m("--panel-ratio",e.panelRatio()),w("ngClass",k(15,Q,e.side()==="left"?"side-left":"side-right",e.chartplotterModeInPortrait()?"portrait-column":"")),l(),P(e.ghostActive()?1:-1),l(),m("width",e.chartplotterModeInPortrait()?null:e.panelWidth(),"px"),R("collapsed",e.panelCollapsed())("drag-disabled",!e.canResize()),l(2),P(e.canResize()?4:-1),l(),w("type",e.freeboardWidgetStub.type)("id",e.freeboardWidgetStub.uuid)("swipeDisabled",e.fskShellSwipeDisabled())("disableWidgetShell",!0))},dependencies:[A,T,q,B,Z,V,F,L],styles:[".split-root[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;overflow:hidden}.split-root.side-left[_ngcontent-%COMP%]{flex-direction:row}.split-root.side-right[_ngcontent-%COMP%]{flex-direction:row-reverse}.split-root.portrait-column[_ngcontent-%COMP%]{flex-direction:column}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%], .split-root.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{width:100%!important;min-height:0}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{flex:0 0 calc(var(--panel-ratio, .3) * 100%)}.split-root.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden}.split-root.side-left.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{order:2}.split-root.side-left.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{order:1}.split-root.side-right.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{order:2}.split-root.side-right.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{order:1}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell.collapsed[_ngcontent-%COMP%]{flex:0 0 0!important}.split-root.portrait-column[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .split-root.portrait-column[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{display:none}.fsk-shell[_ngcontent-%COMP%]{position:relative;height:100%;display:flex;flex-direction:column;background:var(--mat-sys-surface-container, #111);transition:width .2s ease}.fsk-shell.collapsed[_ngcontent-%COMP%]{width:1px!important;visibility:hidden;opacity:0;pointer-events:none}.fsk-iframe[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.dash-container[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;height:100%}.drag-handle[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:3px;cursor:col-resize;background:var(--mat-sys-inverse-primary);z-index:5}.drag-handle[_ngcontent-%COMP%] .drag-fab[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:28px;height:28px;min-width:28px;cursor:col-resize;pointer-events:auto}.drag-handle[_ngcontent-%COMP%] .drag-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;line-height:20px}.side-left[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{right:-2px}.side-right[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{left:-2px}.drag-handle[_ngcontent-%COMP%]:hover{background:var(--mat-sys-error-container)}.side-left[_ngcontent-%COMP%] .collapse-toggle[_ngcontent-%COMP%]{left:.25rem}.side-right[_ngcontent-%COMP%] .collapse-toggle[_ngcontent-%COMP%]{right:.25rem}.fsk-shell.drag-disabled[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.4}.resize-ghost[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:2px;background:var(--mat-sys-error-container);opacity:.9;pointer-events:none;z-index:30;will-change:transform;transition:none}.side-left[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{left:0}.side-right[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{right:0}"]})}return i})();export{ct as SplitShellComponent};
package/public/index.html CHANGED
@@ -62,5 +62,5 @@
62
62
  </div>
63
63
  </app-root>
64
64
  </div>
65
- <link rel="modulepreload" href="chunk-B4OHYWVY.js"><link rel="modulepreload" href="chunk-MTKFOFVR.js"><link rel="modulepreload" href="chunk-F5X5MWHG.js"><link rel="modulepreload" href="chunk-QVCMARCU.js"><link rel="modulepreload" href="chunk-52M2PJJL.js"><link rel="modulepreload" href="chunk-IJ22WXFB.js"><link rel="modulepreload" href="chunk-RYHOAWDD.js"><link rel="modulepreload" href="chunk-BMDGKBYM.js"><link rel="modulepreload" href="chunk-AB255PKD.js"><link rel="modulepreload" href="chunk-PKKBBIJK.js"><script src="polyfills-HMJGV7SQ.js" type="module"></script><script src="scripts-7HSGK5LZ.js" defer></script><script src="main-ZRIMH4UA.js" type="module"></script></body>
65
+ <link rel="modulepreload" href="chunk-2E2KZ6D5.js"><link rel="modulepreload" href="chunk-LOZEULT5.js"><link rel="modulepreload" href="chunk-F5X5MWHG.js"><link rel="modulepreload" href="chunk-QVCMARCU.js"><link rel="modulepreload" href="chunk-52M2PJJL.js"><link rel="modulepreload" href="chunk-IJ22WXFB.js"><link rel="modulepreload" href="chunk-RYHOAWDD.js"><link rel="modulepreload" href="chunk-BMDGKBYM.js"><link rel="modulepreload" href="chunk-AB255PKD.js"><link rel="modulepreload" href="chunk-PKKBBIJK.js"><script src="polyfills-HMJGV7SQ.js" type="module"></script><script src="scripts-7HSGK5LZ.js" defer></script><script src="main-UKCGZIC7.js" type="module"></script></body>
66
66
  </html>