@3e/sqa-common 7.8.0-7 → 7.8.0-9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/sqa_common.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3e/sqa-common",
3
- "version": "7.08.0-7",
3
+ "version": "7.08.0-9",
4
4
  "description": "SynaptiQ utilities package",
5
5
  "main": "sqa_common.js",
6
6
  "dependencies": {
package/sqa_common.js CHANGED
@@ -1248,8 +1248,8 @@ var $W=function $W(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(argume
1248
1248
  $W.l(J([WW,YW(new Y(null,1,5,Z,[0],null))]));var dX=Il("BAR HZ HPA KVARH KWH_KWP KWP OHM M TONS S MM KWH H KW CM WH_M2 NONE M3_H KVA KG_M3 MS V KW_KWP RPM KG_M2 A UNSPECIFIED KVAR MM_H DEGREE LM KVAH CELSIUS PERCENTAGE W".split(" "),"/sq/unit/pressure/pascal /sq/unit/frequency/hertz /sq/unit/pressure/pascal /sq/unit/energy/volt_ampere_reactive_hour /sq/unit/time/watt_hour_by_watt_peak /sq/unit/power/watt /sq/unit/resistance/ohm /sq/unit/length/meter /sq/unit/mass/tonne /sq/unit/time/second /sq/unit/length/meter /sq/unit/energy/watt_hour /sq/unit/time/hour /sq/unit/power/watt /sq/unit/length/meter /sq/unit/energy_by_surface/watt_hour_by_meter2 /sq/unit/none /sq/unit/volume_by_time/meter3_by_second /sq/unit/power/volt_ampere /sq/unit/mass_by_volume/gram_by_meter3 /sq/unit/speed/meter_by_second /sq/unit/voltage/volt /sq/unit/time/watt_hour_by_watt_peak /sq/unit/frequency/rpm /sq/unit/surface_load/gram_by_meter2 /sq/unit/current/ampere /sq/unit/unspecified /sq/unit/power/volt_ampere_reactive /sq/unit/speed/meter_by_hour /sq/unit/angle/degree /sq/unit/luminous_flux/lumen /sq/unit/energy/volt_ampere_hour /sq/unit/temperature/celsius /sq/unit/none /sq/unit/power/watt".split(" "));
1249
1249
  function eX(a){return["/sq/indicator/",UI(R(XI(a,/@/)),/\./,"/").toLowerCase()].join("")}
1250
1250
  var fX=Ai.l(new Y(null,1,5,Z,[new u(null,2,[dt,new u(null,3,[yr,"/sq/unit/mass_by_volume/gram_by_meter3",vs,"KG_M3",ts,null],null),Lo,new u(null,3,[yr,"/sq/unit/mass_by_volume/pounds_by_foot3",ts,"lb/ft³",nA,6.242796E-5],null)],null)],null),new Y(null,1,5,Z,[new u(null,2,[dt,new u(null,3,[yr,"/sq/unit/length/meter",vs,"M",ts,null],null),Lo,new u(null,3,[yr,"/sq/unit/length/foot",ts,"ft",nA,3.28084],null)],null)],null),J([new Y(null,2,5,Z,[new u(null,2,[dt,new u(null,3,[yr,"/sq/unit/speed/meter_by_hour",
1251
- vs,"MM_H",ts,"mm/h"],null),Lo,new u(null,3,[yr,"/sq/unit/speed/inches_by_day",ts,"inch/day",nA,944.8824],null)],null),new u(null,2,[dt,new u(null,3,[yr,"/sq/unit/speed/meter_by_second",vs,"MS",ts,"m/s"],null),Lo,new u(null,3,[yr,"/sq/unit/speed/miles_by_hour",ts,"miles/h",nA,2.236936],null)],null)],null),new Y(null,1,5,Z,[new u(null,2,[dt,new u(null,4,[yr,"/sq/unit/temperature/celsius",vs,"CELSIUS",ts,"ºC",ar,function(a){return 1.8*a+32}],null),Lo,new u(null,3,[yr,"/sq/unit/temperature/fahrenheit",
1252
- ts,"ºF",cH,function(a){return 5/9*(a-32)}],null)],null)],null),new Y(null,1,5,Z,[new u(null,2,[dt,new u(null,3,[yr,"/sq/unit/volume_by_time/meter3_by_second",vs,"M3_S",ts,"m³/s"],null),Lo,new u(null,3,[yr,"/sq/unit/volume_by_time/foot3_by_second",ts,"ft³/s",nA,35.3147],null)],null)],null)])),gX=ik.j(Ni,lj.g(Rm(yr,ts)),lj.h(Lo,fX)),hX=Ji(fm,lj.h(function(a){var b=X(a);a=y(b,dt);b=y(b,Lo);var c=X(a);a=y(c,yr);var d=y(c,ar);b=X(b);c=y(b,yr);var e=y(b,nA),f=y(b,cH);return lg([a,lg([c,function(){return v(d)?
1251
+ vs,"MM_H",ts,"mm/h"],null),Lo,new u(null,3,[yr,"/sq/unit/speed/inches_by_day",ts,"inch/day",nA,944.8824],null)],null),new u(null,2,[dt,new u(null,3,[yr,"/sq/unit/speed/meter_by_second",vs,"MS",ts,"m/s"],null),Lo,new u(null,3,[yr,"/sq/unit/speed/miles_by_hour",ts,"mph",nA,2.236936],null)],null)],null),new Y(null,1,5,Z,[new u(null,2,[dt,new u(null,4,[yr,"/sq/unit/temperature/celsius",vs,"CELSIUS",ts,"ºC",ar,function(a){return 1.8*a+32}],null),Lo,new u(null,3,[yr,"/sq/unit/temperature/fahrenheit",ts,
1252
+ "ºF",cH,function(a){return 5/9*(a-32)}],null)],null)],null),new Y(null,1,5,Z,[new u(null,2,[dt,new u(null,3,[yr,"/sq/unit/volume_by_time/meter3_by_second",vs,"M3_S",ts,"m³/s"],null),Lo,new u(null,3,[yr,"/sq/unit/volume_by_time/foot3_by_second",ts,"ft³/s",nA,35.3147],null)],null)],null)])),gX=ik.j(Ni,lj.g(Rm(yr,ts)),lj.h(Lo,fX)),hX=Ji(fm,lj.h(function(a){var b=X(a);a=y(b,dt);b=y(b,Lo);var c=X(a);a=y(c,yr);var d=y(c,ar);b=X(b);c=y(b,yr);var e=y(b,nA),f=y(b,cH);return lg([a,lg([c,function(){return v(d)?
1253
1253
  d:function(g){return g*e}}()]),c,lg([a,function(){return v(f)?f:function(g){return g/e}}()])])},fX)),iX=new u(null,2,[dt,zm(lj.h(rj.h(yr,dt),fX)),Lo,zm(lj.h(rj.h(yr,Lo),fX))],null),jX=Il("/sq/indicator/energy/loss/export /sq/indicator/charge/meter/ac /sq/indicator/energy/loss/wiring /sq/indicator/fraction/loss/soiling /sq/indicator/capacitytime/use /sq/indicator/pr/actual/expected /sq/indicator/energy/vah /sq/indicator/energy/simulation /sq/indicator/pr/satellite/meter/green /sq/indicator/precipitation/height /sq/indicator/availability/sun /sq/indicator/yield/inverter/withreplaced /sq/indicator/energy/consumption/self /sq/indicator/index/energy/simulation /sq/indicator/yield/inverter/no/historical /sq/indicator/capacity/installed /sq/indicator/voltage/ac/thd /sq/indicator/energy/loss/transmission /sq/indicator/charge/meter/dc /sq/indicator/availability/sensor /sq/indicator/cloud/cover /sq/indicator/energy/generation /sq/indicator/charge/state /sq/indicator/pr/business/plan /sq/indicator/energy/consumption /sq/indicator/energy/importexport /sq/indicator/availability/satellite/notcorrected /sq/indicator/density/air /sq/indicator/yield/guaranteed /sq/indicator/index/energy/utilization /sq/indicator/charge/health /sq/indicator/pressure/air /sq/indicator/availability/sensor/notcorrected /sq/indicator/availability/actual/notcorrected /sq/indicator/energy/system/consumption /sq/indicator/index/loss/income /sq/indicator/pr/sensor/inverter/exunav /sq/indicator/energy/varh /sq/indicator/pr/actual/inverter /sq/indicator/yield/expected /sq/indicator/precipitation/rate /sq/indicator/index/selfsufficiency /sq/indicator/precipitation/mass/load /sq/indicator/pr/actual/inverter/withhistorical /sq/indicator/energy/ac/daily /sq/indicator/energy/varh/daily /sq/indicator/index/energy/meter/utilization /sq/indicator/pr/actual/inverter/notcorrected /sq/indicator/current/ac/thd /sq/indicator/energy/varh/inductive /sq/indicator/energy/consumption/import /sq/indicator/fraction/export/loss /sq/indicator/energy/loss/generation /sq/indicator/yield/inverter /sq/indicator/pr/satellite/meter/green/notcorrected /sq/indicator/pr/satellite/inverter/notcorrected /sq/indicator/pr/sensor/inverter/notcorrected /sq/indicator/index/setpoint /sq/indicator/humidity/relative /sq/indicator/fraction/loss/wiring /sq/indicator/pr/satellite/inverter /sq/indicator/capacity/rated/ac /sq/indicator/availability/satellite /sq/indicator/charge/state/error /sq/indicator/energy/varh/capacitive /sq/indicator/pr /sq/indicator/availability/guaranteed /sq/indicator/pr/actual/inverter/exunav /sq/indicator/derated/capacity /sq/indicator/energy/varh/q1000 /sq/indicator/energy/import /sq/indicator/pr/satellite/inverter/exunav /sq/indicator/energy/production /sq/indicator/capacity/rated /sq/indicator/index/loss/soiling /sq/indicator/capacitytime/in /sq/indicator/precipitation/height/accumulated /sq/indicator/energy/export /sq/indicator/energy/varh/export /sq/indicator/power/ac/efficiency /sq/indicator/availability/actual /sq/indicator/pr/sensor/inverter /sq/indicator/derated/capacity/ramprate /sq/indicator/energy/system /sq/indicator/index/loss/generation /sq/indicator/energy/ac/counter /sq/indicator/index/limit /sq/indicator/energy/varh/q4 /sq/indicator/energy/varh/import /sq/indicator/availability /sq/indicator/yield/meter/green /sq/indicator/pr/actual/meter/green /sq/indicator/precipitation/height/snow /sq/indicator/precipitation/height/meteo /sq/indicator/pr/actual/expected/notcorrected /sq/indicator/index/selfconsumption /sq/indicator/energy/varh/q100 /sq/indicator/pr/actual/meter/green/notcorrected /sq/indicator/yield/dc /sq/indicator/capacity/installed/ac /sq/indicator/energy/system/import /sq/indicator/precipitation/probability /sq/indicator/pr/guaranteed /sq/indicator/yield/business/plan /sq/indicator/energy/varh/q1".split(" "),
1254
1254
  [1E3,1E3,1E3,.01,1E3,.01,1E3,1E3,.01,.001,.01,1E3,1E3,.01,1E3,1E3,.01,1E3,1E3,.01,.01,1E3,.01,.01,1E3,1E3,.01,1E3,1E3,.01,.01,100,.01,.01,1E3,1E3,.01,1E3,.01,1E3,.001,.01,1E3,.01,1E3,1E3,.01,.01,.01,1E3,1E3,.01,1E3,1E3,.01,.01,.01,.01,.01,.01,.01,1E3,.01,.01,1E3,.01,.01,.01,.01,1E3,1E3,.01,1E3,1E3,.01,1E3,.01,1E3,1E3,.01,.01,.01,.01,1E3,.01,1E3,.01,1E3,1E3,.01,1E3,.01,.01,.001,.01,.01,1E3,.01,1E3,1E3,1E3,.01,.01,1E3,1E3]),kX=null;
1255
1255
  function lX(){var a=mX;if(!Q(a))throw Error("Assert failed: (seq indicators)");return kX=ik.j(Ni,lj.g(function(b){var c=X(b);b=y(c,Br);c=y(c,TE);return new Y(null,2,5,Z,[eX(b),dX.g?dX.g(c):dX.call(null,c)],null)}),a)}function nX(a,b){b=nf(zm(fl(iX)),b,dt);b=y(iX,b);b=b.g?b.g(a):b.call(null,a);v(b)||(a=y(hX,a),a=null==a?null:fl(a),a=null==a?null:R(a));return a}
@@ -1306,7 +1306,7 @@ function(){return new RI(new Y(null,1,5,Z,[n+1],null),null,null,null)})}switch(w
1306
1306
  function eZ(a,b){function c(){return zs.g(Kj.h(d,function(e){e=X(e);var f=y(e,Bw),g=y(e,zs),h=y(e,vB);return qc(g)?kg.l(e,KF,!1,J([zs,yH.h(GH(null),function(){return yH.h(GH(f.m?f.m():f.call(null)),function(k){return yH.h(GH(Kj.l(d,kg,KF,!0,J([vB,function(){var l=yy.g(rE.g(zX(k)));return v(l)?l:h}()]))),function(){return GH(k)})})})])):e}))}var d=Ij(new u(null,1,[Bw,b],null));return new u(null,2,[ly,dZ(function(e,f){return yH.h(GH(null),function(){return yH.h(GH(c()),function(g){var h=GH;var k=yy.g(rE.g(zX(g)));
1307
1307
  v(k)&&(g=tk.O(zX(f),Hx,kg,"Authorization",["Bearer ",x.g(k)].join("")),g=Cn.g?Cn.g(g):Cn.call(null,g),g=a.h?a.h(e,g):a.call(null,e,g));return h(g)})})},function(){return Kj.h(d,function(e){e=X(e);var f=y(e,zs),g=y(e,KF),h=y(e,vB);if(!(null!=f?q===f.vi||(f.Fc?0:wc(tH,f)):wc(tH,f)))throw Error("Assert failed: (p/promise? promise)");qc(g)||(qc(h)?e=mg.l(e,zs,J([KF])):(f=kg.l,h=new u(null,3,[Ys,YC,rE,new u(null,1,[yy,h],null),Hx,new u(null,1,["Content-Type","application/json"],null)],null),h=Cn.g?Cn.g(h):
1308
1308
  Cn.call(null,h),h=a.h?a.h("/token/refresh",h):a.call(null,"/token/refresh",h),e=f.call(kg,e,KF,!1,J([zs,h]))));return e})}),Ep,function(){return Jj(d,new u(null,1,[Bw,b],null))}],null)}if("undefined"===typeof hJ||"undefined"===typeof iJ||"undefined"===typeof pX||"undefined"===typeof fZ)var fZ=null;
1309
- function gZ(a,b){b=X(b);var c=nf(b,Ys,"GET"),d=y(b,MB),e=y(b,rE);b=y(b,Hx);var f=fm.l(J([b,new u(null,1,["X-SQA-Common-Version","7.08.0-7"],null)])),g=new WH,h=fZ;v(h)?JI.h(function(){if(v(d)){var k=x.g(a);var l=x,n=l.g,p=Cn(d),r=[],w;for(w in p)Ka(w,p[w],r);k=[k,"?",n.call(l,r.join("\x26"))].join("")}else k=a;l={method:c,headers:Cn(f),body:Cn(e)};return h.h?h.h(k,l):h.call(null,k,l)}(),function(k){return PI(g,Hn(k,J([In,!0])))}):JH(g,fo("Api fn not set",Ni));return g}
1309
+ function gZ(a,b){b=X(b);var c=nf(b,Ys,"GET"),d=y(b,MB),e=y(b,rE);b=y(b,Hx);var f=fm.l(J([b,new u(null,1,["X-SQA-Common-Version","7.08.0-9"],null)])),g=new WH,h=fZ;v(h)?JI.h(function(){if(v(d)){var k=x.g(a);var l=x,n=l.g,p=Cn(d),r=[],w;for(w in p)Ka(w,p[w],r);k=[k,"?",n.call(l,r.join("\x26"))].join("")}else k=a;l={method:c,headers:Cn(f),body:Cn(e)};return h.h?h.h(k,l):h.call(null,k,l)}(),function(k){return PI(g,Hn(k,J([In,!0])))}):JH(g,fo("Api fn not set",Ni));return g}
1310
1310
  var hZ=Jn(gZ),iZ=function iZ(a){switch(arguments.length){case 2:return iZ.h(arguments[0],arguments[1]);case 3:return iZ.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",x.g(arguments.length)].join(""));}};iZ.h=function(a,b){return iZ.j(a,b,null)};
1311
1311
  iZ.j=function(a,b,c){c=X(c);var d=y(c,LE),e=y(c,Rq),f=rk(b,new Y(null,2,5,Z,[MB,bq],null),!0),g=function(){function h(k,l){v(e)?(k=new Y(null,2,5,Z,[e,gZ(k,l)],null),k=Hc(lj.h(GH,k)),k=qI(k)):k=gZ(k,l);return k}return xh.g?xh.g(h):xh.call(null,h)}();return II(function(h,k){var l=function w(p,r){return NI(function(A,C){return null!=C?k.g?k.g(C):k.call(null,C):A instanceof RI?(LH(function(){return Ji(w,wt.g(A))}),null):h.g?h.g(A):h.call(null,A)},yH.h(GH(null),function(){return yH.h(GH(p),function(A){return yH.h(GH(r),
1312
1312
  function(C){var F=GH;var O=X(C);C=y(O,sn);var U=y(O,rE);O=y(O,hG);if(v(O))throw fo("API call cancelled",new u(null,1,[Br,Rs],null));if(I.h(C,200))O=X(U),C=y(O,gH),U=y(O,Kz),O=y(O,Zx),O=mk(O,new Y(null,2,5,Z,[fs,zz],null)),v(d)&&(d.g?d.g(C):d.call(null,C)),v(U)?(U=Z,C=ik.h(A,C),O=rk(f,new Y(null,2,5,Z,[MB,zz],null),O),O=g.h?g.h(a,O):g.call(null,a,O),C=new RI(new Y(null,2,5,U,[C,O],null),null,null,null)):C=ik.h(A,C);else throw fo(["Non 200 status code returned in paged api call for ",x.g(a)].join(""),
@@ -1506,7 +1506,7 @@ return $f(hY.g?hY.g(D):hY.call(null,D),P(tf(M)))}return null}}}(p,r,w,A,C,F),nul
1506
1506
  function x0(a,b){return yH.h(GH(null),function(){return yH.h(GH(hZ.h?hZ.h("/granularities",Ni):hZ.call(null,"/granularities",Ni)),function(c){c=X(c);c=y(c,rE);return yH.h(GH(ik.h(lm,lj.h(Br,c))),function(d){return yH.h(GH(i_(a)),function(e){return yH.h(GH(function(){var f=bh(d,e)?null:new u(null,3,[EC,"message",Tm,"missing-granularity",Um,"You do not have permission to see charts with this granularity"],null);return v(f)?f:v(nj(function(g){return Uz.g(g)},ek(Nu,J([b]))))?new u(null,3,[EC,"message",
1507
1507
  Tm,"missing-indicators",Um,"You do not have permission to view one or more of the indicators that this chart depends on"],null):null}()),function(f){return GH(v(f)?nI(fo("View error",f)):b)})})})})})}
1508
1508
  var y0=NX(function(a){return JI.h(JI.h(function(){var b=new u(null,2,[ME,!0,BD,kC],null);return u0.h?u0.h(a,b):u0.call(null,a,b)}(),function(){function b(c){return x0(a,c)}return xh.g?xh.g(b):xh.call(null,b)}()),function(){function b(c){var d=p_(a),e=X(d),f=y(e,wD),g=y(e,Mu);d=y(e,TD);e=y(e,Ao);var h=I.h(f,"since-beginning")?w0(c):g;f=j_(a);g=m_(f,h,d);var k=q_(g,e);c=new u(null,4,[tq,c,wB,k.g?k.g(h):k.call(null,h),vv,k.g?k.g(d):k.call(null,d),wq,e],null);c=v(g)?kg.j(c,Mw,g):c;return v(f)?kg.j(c,
1509
- tz,f):c}return xh.g?xh.g(b):xh.call(null,b)}())},By);function z0(a,b){function c(e){return oX(new u(null,2,[Tm,e,lB,eX(a)],null),b)}var d=ts.g(c(1));return new u(null,3,[Qp,rj.h(Tm,c),ts,gX.g?gX.g(d):gX.call(null,d),TE,d],null)}
1509
+ tz,f):c}return xh.g?xh.g(b):xh.call(null,b)}())},By);function z0(a,b){function c(g){return oX(new u(null,2,[Tm,g,lB,eX(a)],null),b)}var d=ts.g(c(1)),e=gX.g?gX.g(d):gX.call(null,d),f=new u(null,2,[Qp,rj.h(Tm,c),ts,e],null);return v(e)?kg.j(f,TE,d):f}
1510
1510
  function A0(a){var b=lj.h(function(c){return lj.h(Qp,Nu.g(c))},tq.g(gH.g(a)));return UW(a,$W.l(J([YW(new Y(null,1,5,Z,[zA],null)),WW])),function(c){var d=T(c,0);c=T(c,1);return new Y(null,2,5,Z,[d,gJ(function(e){return jk.h(function(f){return jk.j(function(g,h){return v(h)?h.g?h.g(g):h.call(null,g):g},f,Vf(b,d))},e)},c)],null)})}
1511
1511
  function B0(a,b){return UW(a,$W.l(J([YW(new Y(null,2,5,Z,[gH,tq],null)),WW,YW(new Y(null,1,5,Z,[Nu],null)),WW])),function(c){c=X(c);var d=y(c,Br),e=y(c,ts);return tk.j(fm.l(J([c,z0(d,b)])),ts,function(f){return v(f)?f:e})})}function C0(a){var b=tX;return!bh(a,aC)&&I.h(b,Lo)?kg.j(A0(B0(a,b)),aC,b):a}
1512
1512
  function D0(a){var b=mk(a,new Y(null,2,5,Z,[yB,Lv],null)),c=X(a);c=y(c,cD);c=X(c);var d=y(c,xp),e=y(c,ex);c=function(){switch(b){case "object-chart":return m0;case "time-chart":return l0;case "object-heatmap":return n0;case "scatter-chart":return o0;case "kpis":return p0;case "object-table":return q0;case "time-table":return r0;default:throw fo(["View type not found '",x.g(b),"'"].join(""),Ni);}}();a=C0(a);a=kg.j(tk.j(a,zA,d0),vE,bh(new jm(null,new u(null,3,["object-chart",null,"object-table",null,