From e2111ddc35cb313926e71a39315d07545cbeb424 Mon Sep 17 00:00:00 2001 From: Yannic Labonte Date: Sun, 18 Aug 2024 19:06:18 +0200 Subject: [PATCH] Prepare release --- README.md | 2 +- docs/assets/main.js | 8 ++-- docs/assets/style.css | 10 +++++ docs/classes/AbstractService.html | 19 ++++----- docs/classes/CommandService.html | 27 ++++++------ docs/classes/GetStateData.html | 40 +++++++++--------- docs/classes/GetStateDataObject.html | 30 +++++++------- docs/classes/GetStateDataSysInfo.html | 46 ++++++++++----------- docs/classes/GetStateService.html | 39 +++++++++-------- docs/classes/Logger.html | 16 +++---- docs/classes/RelayDataInterpreter.html | 22 +++++----- docs/classes/RelayDataObject.html | 32 +++++++------- docs/classes/SetStateService.html | 21 +++++----- docs/classes/UsrcfgCgiService.html | 25 ++++++----- docs/enums/DosageTarget.html | 4 +- docs/enums/GetStateCategory.html | 20 ++++----- docs/enums/LogLevel.html | 4 +- docs/enums/RelayStateBitMask.html | 4 +- docs/enums/SetStateValue.html | 4 +- docs/hierarchy.html | 2 +- docs/index.html | 4 +- docs/interfaces/IGetStateCategories.html | 4 +- docs/interfaces/IGetStateServiceConfig.html | 16 +++---- docs/interfaces/ILogger.html | 10 ++--- docs/interfaces/IServiceConfig.html | 12 +++--- docs/modules.html | 2 +- docs/variables/GETSTATE.html | 2 +- package.json | 2 +- src/abstract-service.ts | 1 - 29 files changed, 216 insertions(+), 212 deletions(-) diff --git a/README.md b/README.md index db6af74..1a9d8f5 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ haven't found an english documentation/information so far): ## Changelog -### Work in progress +### Release v1.8.0 * Dependency updates. * Breaking backward compatibility for Node versions <18.18.x * Update eslint to v9.x (enforcing new config format) diff --git a/docs/assets/main.js b/docs/assets/main.js index 7d7f77a..3572881 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -1,9 +1,9 @@ "use strict"; window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings."}; -"use strict";(()=>{var Ce=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Ce(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!e.checkVisibility()){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),Ve(t,i,r,e)}function Ve(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?He(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function He(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",H="mouseup",J={x:0,y:0},me=!1,ne=!1,je=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(je=!0,F="touchstart",ye="touchmove",H="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var qe=new U;Object.defineProperty(window,"app",{value:qe});fe();we();})(); +"use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/style.css b/docs/assets/style.css index d0c980d..9d619a6 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -793,6 +793,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { margin-left: -1.5rem; } +.tsd-page-navigation-section { + margin-left: 10px; +} +.tsd-page-navigation-section > summary { + padding: 0.25rem; +} +.tsd-page-navigation-section > div { + margin-left: 20px; +} .tsd-page-navigation ul { padding-left: 1.75rem; } @@ -841,6 +850,7 @@ a.tsd-index-link { } .tsd-accordion .tsd-accordion-summary > svg { margin-left: 0.25rem; + vertical-align: text-top; } .tsd-index-content > :not(:first-child) { margin-top: 0.75rem; diff --git a/docs/classes/AbstractService.html b/docs/classes/AbstractService.html index 1963f6a..af4bfc4 100644 --- a/docs/classes/AbstractService.html +++ b/docs/classes/AbstractService.html @@ -1,6 +1,6 @@ AbstractService | procon-ip

Class AbstractServiceAbstract

Abstract service implementing the common base setup for the axios requests of the specific service implementations.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

_config _endpoint _method @@ -12,25 +12,24 @@

Constructors

Properties

_endpoint: string

Specific webservice endpoint.

+

Returns AbstractService

Properties

_endpoint: string

Specific webservice endpoint.

An absolute URL, which means a path with leading slash ('/') relative to the IServiceConfig.controllerUrl (ProCon.IP base address).

-
_method: Method

HTTP request method.

+
_method: Method

HTTP request method.

Must be one of the valid HTTP request methods like GET, POST, etc. See axios/Method type:

export type Method =
| 'get' | 'GET'
| 'delete' | 'DELETE'
| 'head' | 'HEAD'
| 'options' | 'OPTIONS'
| 'post' | 'POST'
| 'put' | 'PUT'
| 'patch' | 'PATCH'
| 'purge' | 'PURGE'
| 'link' | 'LINK'
| 'unlink' | 'UNLINK'
-
_requestHeaders: {
    [key: string]: string;
}

Custom HTTP headers.

+
_requestHeaders: {
    [key: string]: string;
}

Custom HTTP headers.

Custom headers can be defined in form of a key value pair.

this._requestHeaders["Cache-Control"] = "no-cache";
 
-
log: ILogger

Logger which will be used for all logging events.

-

Accessors

  • get axiosRequestConfig(): AxiosRequestConfig<any>
  • Get an axios/AxiosRequestConfig object.

    -

    Returns AxiosRequestConfig<any>

log: ILogger

Logger which will be used for all logging events.

+

Accessors

  • get axiosRequestConfig(): AxiosRequestConfig<any>
  • Get an axios/AxiosRequestConfig object.

    +

    Returns AxiosRequestConfig<any>

  • get url(): string
  • Get the webservice url (joined base url and endpoint).

    Returns string

    URL string (joined base url and endpoint).

    -

    TypeError [ERR_INVALID_URL]: Invalid URL

    -
\ No newline at end of file +
diff --git a/docs/classes/CommandService.html b/docs/classes/CommandService.html index 871103a..c164c0e 100644 --- a/docs/classes/CommandService.html +++ b/docs/classes/CommandService.html @@ -1,6 +1,6 @@ CommandService | procon-ip

Class CommandService

The CommandService uses the /Command.htm endpoint of the ProCon.IP pool controller to turn on manual dosage for a given amount of time/seconds.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

_config _endpoint _method @@ -16,29 +16,28 @@

Constructors

Properties

_endpoint: string = '/Command.htm'

Specific service endpoint.

+

Returns CommandService

Properties

_endpoint: string = '/Command.htm'

Specific service endpoint.

A path relative to the IServiceConfig.controllerUrl.

-
_method: Method = 'get'

HTTP request method for this specific service endpoint. +

_method: Method = 'get'

HTTP request method for this specific service endpoint. See: axios/Method

-
_requestHeaders: {
    [key: string]: string;
}

Custom HTTP headers.

+
_requestHeaders: {
    [key: string]: string;
}

Custom HTTP headers.

Custom headers can be defined in form of a key value pair.

this._requestHeaders["Cache-Control"] = "no-cache";
 
-
log: ILogger

Logger which will be used for all logging events.

-

Accessors

  • get axiosRequestConfig(): AxiosRequestConfig<any>
  • Get an axios/AxiosRequestConfig object.

    -

    Returns AxiosRequestConfig<any>

log: ILogger

Logger which will be used for all logging events.

+

Accessors

  • get axiosRequestConfig(): AxiosRequestConfig<any>
  • Get an axios/AxiosRequestConfig object.

    +

    Returns AxiosRequestConfig<any>

  • get url(): string
  • Get the webservice url (joined base url and endpoint).

    +
  • get url(): string
  • Get the webservice url (joined base url and endpoint).

    Returns string

    URL string (joined base url and endpoint).

    -

    TypeError [ERR_INVALID_URL]: Invalid URL

    -

Methods

  • Set manuel chlorine dosage for given amount of time in seconds.

    +

Methods

  • Set manuel chlorine dosage for given amount of time in seconds.

    Parameters

    • dosageTime: number

      Dosage duration in seconds.

      -

    Returns Promise<number>

  • Set the desired relay state.

    +

Returns Promise<number>

  • Set the desired relay state.

    Parameters

    • dosageTarget: DosageTarget

      Dosage target (0 = chlorine, 1 = pH minus, 2 = pH plus).

    • dosageDuration: number

      Desired duration in seconds.

      -

    Returns Promise<number>

  • Set manuel pH minus dosage for given amount of time in seconds.

    +

Returns Promise<number>

  • Set manuel pH minus dosage for given amount of time in seconds.

    Parameters

    • dosageTime: number

      Dosage duration in seconds.

      -

    Returns Promise<number>

  • Set manuel pH plus dosage for given amount of time in seconds.

    +

Returns Promise<number>

  • Set manuel pH plus dosage for given amount of time in seconds.

    Parameters

    • dosageTime: number

      Dosage duration in seconds.

      -

    Returns Promise<number>

\ No newline at end of file +

Returns Promise<number>

diff --git a/docs/classes/GetStateData.html b/docs/classes/GetStateData.html index c00e74a..fa421bf 100644 --- a/docs/classes/GetStateData.html +++ b/docs/classes/GetStateData.html @@ -2,7 +2,7 @@ representation for the response CSV of the GetStateService. (This might be changed/split in seperate classes in a future refactoring)

Indexable

  • [key: string]: unknown

    Extend the data object instances as you like.

    -

Constructors

Constructors

Properties

active categories objects @@ -25,45 +25,45 @@

Constructors

Properties

active: number[]

Lists all indices of objects that are not labeled with 'n.a.' and therefore +

Returns GetStateData

Properties

active: number[]

Lists all indices of objects that are not labeled with 'n.a.' and therefore considered to be active.

-
categories: IGetStateCategories = GetStateData.categories

Actual data objects for further processing.

+
categories: IGetStateCategories = GetStateData.categories

Actual data objects for further processing.

Ordered by CSV column position starting at 0.

-
parsed: string[][]

CSV input parsed to a simple 2-dimensional array.

+
parsed: string[][]

CSV input parsed to a simple 2-dimensional array.

Structure:

[
0: [ // line one
0: // line one, column one
1: // line one, column two
],
1: [ // line two
0: // line two, column one
...
...
]
-
raw: string

Raw CSV input string (retrieved by the GetStateService).

-

SysInfo column data.

+
raw: string

Raw CSV input string (retrieved by the GetStateService).

+

SysInfo column data.

The first line of the csv has no relation to the rest of the CSV. So it is stored seperately in here.

-
categories: IGetStateCategories = ...

Data categories as array of objects.

+
categories: IGetStateCategories = ...

Data categories as array of objects.

Category names as keys and arrays as values. These arrays list columns (referencing the parsed CSV) which fall into this category. The array values might contain simple listings of the column positions or another array containing the starting and ending index of a slice/range. Counting columns starts at 0. The value is of type any to simplify dynamic iteration without linting or parsing errors.

-

Methods

  • Get the category of a data item by its column index.

    +

Methods

  • Get the category of a data item by its column index.

    Parameters

    • index: number

      Column index

    Returns string

    Category name or string none if no category could be identified.

    -
  • Get the object id aka column index of the chlorine dosage control relay.

    -

    Returns number

  • Get the object id aka column index of the chlorine dosage control relay.

    +

    Returns number

Returns GetStateDataObject

  • Get all data objects of a given category.

    +

Returns GetStateDataObject[]

  • Get the object id aka column index of the pH minus dosage control relay.

    -

    Returns number

  • Get the object id aka column index of the pH plus dosage control relay.

    -

    Returns number

  • Parse the CSV string into a 2-dimensional array structure and into +

Returns GetStateDataObject[]

  • Get the object id aka column index of the pH minus dosage control relay.

    +

    Returns number

  • Get the object id aka column index of the pH plus dosage control relay.

    +

    Returns number

\ No newline at end of file +

Returns void

diff --git a/docs/classes/GetStateDataObject.html b/docs/classes/GetStateDataObject.html index 37ecd48..e4b3ff4 100644 --- a/docs/classes/GetStateDataObject.html +++ b/docs/classes/GetStateDataObject.html @@ -2,7 +2,7 @@ row of the raw input!).

Hierarchy (view full)

Indexable

  • [key: string]: unknown

    Making GetStateDataObject objects extensible, also allows accessing object keys using string variables.

    -

Constructors

Constructors

Properties

active category categoryId @@ -23,23 +23,23 @@
  • offset: string

    Column value offset

  • gain: string

    Column value gain

  • measure: string

    Column value raw measurement

    -
  • Returns GetStateDataObject

    Properties

    active: boolean

    Indicates whether the object is considered to be active.

    +

    Returns GetStateDataObject

    Properties

    active: boolean

    Indicates whether the object is considered to be active.

    Indeed this only means the name is not 'n.a.'.

    -
    category: string

    Object instance category string.

    -
    categoryId: number

    Sub-index for each category.

    +
    category: string

    Object instance category string.

    +
    categoryId: number

    Sub-index for each category.

    Starts counting from 0 at the first object of the instances category. Used to determine e.g. the relay IDs.

    -
    displayValue: string

    Object display value.

    -
    gain: number

    Object value gain.

    -
    id: number

    Object id aka column index.

    -
    label: string

    Object label.

    -
    offset: number

    Object value offset.

    -
    raw: number

    Raw object input value.

    -
    unit: string

    Object unit.

    -
    value: string | number

    Plain (calculated) object value.

    -

    Methods

    displayValue: string

    Object display value.

    +
    gain: number

    Object value gain.

    +
    id: number

    Object id aka column index.

    +
    label: string

    Object label.

    +
    offset: number

    Object value offset.

    +
    raw: number

    Raw object input value.

    +
    unit: string

    Object unit.

    +
    value: string | number

    Plain (calculated) object value.

    +

    Methods

    • Iterate all fields of this object.

      Parameters

      • callback: ((field: string) => void)

        A user-defined callback.

        -
          • (field): void
          • Parameters

            • field: string

            Returns void

      Returns void

    • Set object values based on the raw input values.

      +
        • (field): void
        • Parameters

          • field: string

          Returns void

    Returns void

    • Set object values based on the raw input values.

      The input values correspond to the data rows of the represented column (except the index paramter which indeed is the column id/index itself).

      Parameters

      • index: number

        Column id/index

        @@ -48,4 +48,4 @@
      • offset: string

        Column value offset

      • gain: string

        Column value gain

      • measure: string

        Column value raw measurement

        -

      Returns void

    \ No newline at end of file +

    Returns void

    diff --git a/docs/classes/GetStateDataSysInfo.html b/docs/classes/GetStateDataSysInfo.html index a0c3926..ff1e5f2 100644 --- a/docs/classes/GetStateDataSysInfo.html +++ b/docs/classes/GetStateDataSysInfo.html @@ -3,7 +3,7 @@ subsequent lines of the CSV file.

    Indexable

    • [key: string]: unknown

      Making GetStateDataSysInfo objects extensible, also allows accessing object keys using string variables.

      -

    Constructors

    Constructors

    Properties

    Constructors

    Properties

    chlorineDosageRelay: number

    Chlorine dosage relay id.

    -
    configOtherEnable: number

    Other config flags.

    +

    Returns GetStateDataSysInfo

    Properties

    chlorineDosageRelay: number

    Chlorine dosage relay id.

    +
    configOtherEnable: number

    Other config flags.

    Values are documented bitwise as follows:

    • Bit 8: Extension an SPI (0) oder DMX (1)
    • @@ -44,7 +44,7 @@
    • Bit 0: TCP-IP Boost

    See manual for more information or updates: http://www.pooldigital.de/trm/TRM_ProConIP.pdf

    -
    dosageControl: number

    Dosage control information flags.

    +
    dosageControl: number

    Dosage control information flags.

    Values are documented bitwise as follows:

    • Bit 12: pH+ enabled
    • @@ -56,7 +56,7 @@
    • Bit 0: CL enabled

    See manual for more information or updates: http://www.pooldigital.de/trm/TRM_ProConIP.pdf

    -
    ntpFaultState: number

    NTP fault state.

    +
    ntpFaultState: number

    NTP fault state.

    Values are documented bitwise as follows:

    • Bit 16: NTP available
    • @@ -66,9 +66,9 @@
    • Bit 0: Logfile

    See manual for more information or updates: http://www.pooldigital.de/trm/TRM_ProConIP.pdf

    -
    phMinusDosageRelay: number

    pH- dosage relay id.

    -
    phPlusDosageRelay: number

    pH+ dosage relay id.

    -
    resetRootCause: number

    Reset root cause.

    +
    phMinusDosageRelay: number

    pH- dosage relay id.

    +
    phPlusDosageRelay: number

    pH+ dosage relay id.

    +
    resetRootCause: number

    Reset root cause.

    Values are documented bitwise as follows:

    • Bit 4: External reset
    • @@ -78,28 +78,28 @@
    • Bit 0: SW reset

    See manual for more information or updates: http://www.pooldigital.de/trm/TRM_ProConIP.pdf

    -
    time: string
    uptime: number

    Uptime of the ProCon.IP controller at the time this data was requested.

    -
    version: string

    Current firmware version string.

    -

    Methods

    time: string
    uptime: number

    Uptime of the ProCon.IP controller at the time this data was requested.

    +
    version: string

    Current firmware version string.

    +

    Methods

    • Check whether the given GetStateDataObject object is a dosage control +

    Returns number

    • Checks if the chlorine dosage device is configured as an electrolysis cell or a pump.

      -

      Returns boolean

    • Check whether the digitial input 0 is configured as a flow sensor +

    Returns boolean

    • Checks if the chlorine dosage device is configured as an electrolysis cell or a pump.

      +

      Returns boolean

    • Check whether the digitial input 0 is configured as a flow sensor or not.

      -

      Returns boolean

    • Set values from based on a 2-dimensional array structure.

      Parameters

      • data: string[][]

        Parsed response CSV of the /GetState.csv endpoint as 2-dimensional array (see: GetStateData.parsed)

        -

      Returns void

    • Converts the object instance to a simple array of objects for better +

    Returns void

    • Converts the object instance to a simple array of objects for better handling/iteration.

      -

      Returns {
          key: string;
          value: string;
      }[]

    \ No newline at end of file +

    Returns {
        key: string;
        value: string;
    }[]

    diff --git a/docs/classes/GetStateService.html b/docs/classes/GetStateService.html index 8d890ed..86e953f 100644 --- a/docs/classes/GetStateService.html +++ b/docs/classes/GetStateService.html @@ -1,6 +1,6 @@ GetStateService | procon-ip

    Class GetStateService

    The GetStateService implements the AbstractService for the /GetState.csv endpoint.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    _config _endpoint _method @@ -22,38 +22,37 @@

    Constructors

    Properties

    _endpoint: string = '/GetState.csv'

    Specific service endpoint.

    +

    Returns GetStateService

    Properties

    _endpoint: string = '/GetState.csv'

    Specific service endpoint.

    A path relative to the IServiceConfig.controllerUrl.

    -
    _method: Method = 'get'

    HTTP request method for this specific service endpoint. +

    _method: Method = 'get'

    HTTP request method for this specific service endpoint. See: axios/Method

    -
    _requestHeaders: {
        [key: string]: string;
    }

    Custom HTTP headers.

    +
    _requestHeaders: {
        [key: string]: string;
    }

    Custom HTTP headers.

    Custom headers can be defined in form of a key value pair.

    this._requestHeaders["Cache-Control"] = "no-cache";
     
    -

    The actual service data object.

    -
    log: ILogger

    Logger which will be used for all logging events.

    -

    Accessors

    • get axiosRequestConfig(): AxiosRequestConfig<any>
    • Get an axios/AxiosRequestConfig object.

      -

      Returns AxiosRequestConfig<any>

    The actual service data object.

    +
    log: ILogger

    Logger which will be used for all logging events.

    +

    Accessors

    • get axiosRequestConfig(): AxiosRequestConfig<any>
    • Get an axios/AxiosRequestConfig object.

      +

      Returns AxiosRequestConfig<any>

    • get url(): string
    • Get the webservice url (joined base url and endpoint).

      +
    • get url(): string
    • Get the webservice url (joined base url and endpoint).

      Returns string

      URL string (joined base url and endpoint).

      -

      TypeError [ERR_INVALID_URL]: Invalid URL

      -

    Methods

    • Recursive wrapper for the polling mechanism. The next request/interval +

    Methods

    • Stage request and return the corresponding AxiosPromise.

      -

      Returns AxiosPromise<string>

    • Tells you whether the service has most recent status information or not.

      +

      Returns void

    • Stage request and return the corresponding AxiosPromise.

      +

      Returns AxiosPromise<string>

    • Tells you whether the service has most recent status information or not.

      More accurately it tells you whether the most recent request succeeded or not. So it will return true if the request succeeded and your data is up-to-date. It will return false until the service retrieved its first data and again if a subsequent request fails.

      -

      Returns boolean

    • Set the update interval.

      Parameters

      • milliseconds: number

        Update interval in milliseconds [ms].

        -

      Returns void

    • Start the service.

      +

    Returns void

    • Start the service.

      This will periodically update the internal data and invoke the optional callables each time new data is received.

      Parameters

      • OptionalsuccessCallback: ((data: GetStateData) => void)

        Will be triggered everytime the service receives @@ -64,10 +63,10 @@

          • (e): void
          • Parameters

            • e: Error

            Returns void

      • OptionalstopOnError: boolean

        Whether to stop in case the consecutive error tolerance is hit. Default behavior (for backward compatibility) is to keep running in any case.

        -

      Returns void

    • Update data by staging an HTTP request to the pool controller.

      +

    Returns void

    \ No newline at end of file +

    Returns Promise<GetStateData>

    diff --git a/docs/classes/Logger.html b/docs/classes/Logger.html index e01b756..e9b85fe 100644 --- a/docs/classes/Logger.html +++ b/docs/classes/Logger.html @@ -3,7 +3,7 @@ plus the used log level in uppercase. You can write your own custom logger or pass any other (e.g. ioBroker has a suitable logger on board), that matches the ILogger interface.

    -

    Implements

    Constructors

    Implements

    Constructors

    Accessors

    Methods

    debug error @@ -12,17 +12,17 @@ warn

    Constructors

    • Initialize a new Logger.

      Parameters

      • OptionallogLevel: LogLevel

        Optionally define a custom log level. Default is LogLevel.INFO.

        -

      Returns Logger

    Accessors

    • get timestamp(): string
    • Get current datetime with milliseconds.

      +

    Returns Logger

    Accessors

    • get timestamp(): string
    • Get current datetime with milliseconds.

      Returns string

      An ISO 8601 conform timestamp (e.g. 2020-10-10T12:34:56.789Z).

      -

    Methods

    • ILogger a message with severity debug to console.

      +

    Methods

    • ILogger a message with severity debug to console.

      Parameters

      • message: string

        The debug message.

        -

      Returns void

    • ILogger a message with severity error to console.

      +

    Returns void

    • ILogger a message with severity error to console.

      Parameters

      • message: string

        The error message.

        -

      Returns void

    • ILogger a message with severity info.

      +

    Returns void

    • ILogger a message with severity info.

      Parameters

      • message: string

        The information.

        -

      Returns void

    • Set the actual log level

      +

    Returns void

    • Set the actual log level

      Method calls to lower log levels than the one defined here, will not generate any output.

      -

      Parameters

      Returns void

    • ILogger a message with severity warn to console.

      +

      Parameters

      Returns void

    • ILogger a message with severity warn to console.

      Parameters

      • message: string

        The warning.

        -

      Returns void

    \ No newline at end of file +

    Returns void

    diff --git a/docs/classes/RelayDataInterpreter.html b/docs/classes/RelayDataInterpreter.html index 26b8bda..58aae93 100644 --- a/docs/classes/RelayDataInterpreter.html +++ b/docs/classes/RelayDataInterpreter.html @@ -1,6 +1,6 @@ RelayDataInterpreter | procon-ip

    Class RelayDataInterpreter

    The RelayDataInterpreter is a helper for all the binary operations that are necessary to read and write relay states.

    -

    Constructors

    Constructors

    Properties

    Methods

    evaluate isAuto @@ -11,9 +11,9 @@ setOff setOn

    Constructors

    Properties

    bitStates: [number, number]

    A pair of bit patterns in decimal representation according to the way the +

    Parameters

    Returns RelayDataInterpreter

    Properties

    bitStates: [number, number]

    A pair of bit patterns in decimal representation according to the way the /usrcfg.cgi endpoints wants its values.

    -

    Methods

    Methods

    Returns RelayDataInterpreter

    \ No newline at end of file +

    Parameters

    Returns [number, number]

    diff --git a/docs/classes/RelayDataObject.html b/docs/classes/RelayDataObject.html index 1b2c613..23cd8c6 100644 --- a/docs/classes/RelayDataObject.html +++ b/docs/classes/RelayDataObject.html @@ -1,7 +1,7 @@ RelayDataObject | procon-ip

    Class RelayDataObject

    The RelayDataObject extends the GetStateDataObject by an additional magic bitMask attribute, that determines the correct bitmask to toggle the relay's state.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    active category categoryId @@ -18,21 +18,21 @@ set

    Constructors

    Properties

    active: boolean

    Indicates whether the object is considered to be active.

    +

    Returns RelayDataObject

    Properties

    active: boolean

    Indicates whether the object is considered to be active.

    Indeed this only means the name is not 'n.a.'.

    -
    category: string

    Object instance category string.

    -
    categoryId: number

    Sub-index for each category.

    +
    category: string

    Object instance category string.

    +
    categoryId: number

    Sub-index for each category.

    Starts counting from 0 at the first object of the instances category. Used to determine e.g. the relay IDs.

    -
    displayValue: string

    Object display value.

    -
    gain: number

    Object value gain.

    -
    id: number

    Object id aka column index.

    -
    label: string

    Object label.

    -
    offset: number

    Object value offset.

    -
    raw: number

    Raw object input value.

    -
    unit: string

    Object unit.

    -
    value: string | number

    Plain (calculated) object value.

    -

    Accessors

    displayValue: string

    Object display value.

    +
    gain: number

    Object value gain.

    +
    id: number

    Object id aka column index.

    +
    label: string

    Object label.

    +
    offset: number

    Object value offset.

    +
    raw: number

    Raw object input value.

    +
    unit: string

    Object unit.

    +
    value: string | number

    Plain (calculated) object value.

    +

    Accessors

    • get bitMask(): number
    • Returns the bit mask for toggling the relay's state using the /usrcfg.cgi endpoint (see: UsrcfgCgiService).

      The service endpoint expects two input values, one defining on/off states and another one for the auto-mode on/off. Both values are simple bit @@ -42,9 +42,9 @@ state of every single relay to determine the values you need to change a single relays state. This is, where the RelayDataInterpreter comes in.

      -

      Returns number

    Methods

    Methods

    • Set object values based on the raw input values.

      +
        • (field): void
        • Parameters

          • field: string

          Returns void

    Returns void

    • Set object values based on the raw input values.

      The input values correspond to the data rows of the represented column (except the index paramter which indeed is the column id/index itself).

      Parameters

      • index: number

        Column id/index

        @@ -53,4 +53,4 @@
      • offset: string

        Column value offset

      • gain: string

        Column value gain

      • measure: string

        Column value raw measurement

        -

      Returns void

    \ No newline at end of file +

    Returns void

    diff --git a/docs/classes/SetStateService.html b/docs/classes/SetStateService.html index b52db52..6b1a8aa 100644 --- a/docs/classes/SetStateService.html +++ b/docs/classes/SetStateService.html @@ -1,6 +1,6 @@ SetStateService | procon-ip

    Class SetStateService

    The CommandService uses the /SetState.pl endpoint of the ProCon.IP pool controller to turn on relays for a specified time span.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    _config _endpoint _method @@ -13,23 +13,22 @@

    Constructors

    Properties

    _endpoint: string = '/SetState.pl'

    Specific service endpoint.

    +

    Returns SetStateService

    Properties

    _endpoint: string = '/SetState.pl'

    Specific service endpoint.

    A path relative to the IServiceConfig.controllerUrl.

    -
    _method: Method = 'get'

    HTTP request method for this specific service endpoint. +

    _method: Method = 'get'

    HTTP request method for this specific service endpoint. See: axios/Method

    -
    _requestHeaders: {
        [key: string]: string;
    }

    Custom HTTP headers.

    +
    _requestHeaders: {
        [key: string]: string;
    }

    Custom HTTP headers.

    Custom headers can be defined in form of a key value pair.

    this._requestHeaders["Cache-Control"] = "no-cache";
     
    -
    log: ILogger

    Logger which will be used for all logging events.

    -

    Accessors

    • get axiosRequestConfig(): AxiosRequestConfig<any>
    • Get an axios/AxiosRequestConfig object.

      -

      Returns AxiosRequestConfig<any>

    log: ILogger

    Logger which will be used for all logging events.

    +

    Accessors

    • get axiosRequestConfig(): AxiosRequestConfig<any>
    • Get an axios/AxiosRequestConfig object.

      +

      Returns AxiosRequestConfig<any>

    • get url(): string
    • Get the webservice url (joined base url and endpoint).

      +
    • get url(): string
    • Get the webservice url (joined base url and endpoint).

      Returns string

      URL string (joined base url and endpoint).

      -

      TypeError [ERR_INVALID_URL]: Invalid URL

      -

    Methods

    • Set relay on-timer.

      +

    Methods

    • Set relay on-timer.

      Parameters

      • relayNo: number

        Target relay number (count starting from 1).

      • duration: number

        Desired timer duration in seconds.

        -

      Returns Promise<number>

    \ No newline at end of file +

    Returns Promise<number>

    diff --git a/docs/classes/UsrcfgCgiService.html b/docs/classes/UsrcfgCgiService.html index c1acbb0..f32b84d 100644 --- a/docs/classes/UsrcfgCgiService.html +++ b/docs/classes/UsrcfgCgiService.html @@ -4,7 +4,7 @@ states for all relays at once. This means considering the states of all relays, those which states should be changed as well as the ones which states not gonna to be changed.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    _config _endpoint _method @@ -22,26 +22,25 @@
  • getStateService: GetStateService

    A corresponding GetStateService (must address the same pool controller)

  • relayDataInterpreter: RelayDataInterpreter

    An instance of RelayDataInterpreter.

    -
  • Returns UsrcfgCgiService

    Properties

    _endpoint: string = '/usrcfg.cgi'

    Specific service endpoint.

    +

    Returns UsrcfgCgiService

    Properties

    _endpoint: string = '/usrcfg.cgi'

    Specific service endpoint.

    A path relative to the IServiceConfig.controllerUrl.

    -
    _method: Method = 'post'

    HTTP request method for this specific service endpoint. +

    _method: Method = 'post'

    HTTP request method for this specific service endpoint. See: axios/Method

    -
    _requestHeaders: {
        [key: string]: string;
    }

    Custom HTTP headers.

    +
    _requestHeaders: {
        [key: string]: string;
    }

    Custom HTTP headers.

    Custom headers can be defined in form of a key value pair.

    this._requestHeaders["Cache-Control"] = "no-cache";
     
    -
    log: ILogger

    Logger which will be used for all logging events.

    -

    Accessors

    • get axiosRequestConfig(): AxiosRequestConfig<any>
    • Get an axios/AxiosRequestConfig object.

      -

      Returns AxiosRequestConfig<any>

    log: ILogger

    Logger which will be used for all logging events.

    +

    Accessors

    • get axiosRequestConfig(): AxiosRequestConfig<any>
    • Get an axios/AxiosRequestConfig object.

      +

      Returns AxiosRequestConfig<any>

    • get url(): string
    • Get the webservice url (joined base url and endpoint).

      +
    • get url(): string
    • Get the webservice url (joined base url and endpoint).

      Returns string

      URL string (joined base url and endpoint).

      -

      TypeError [ERR_INVALID_URL]: Invalid URL

      -

    Methods

    • Set the given relay in auto mode.

      +

    Methods

    • Switch the given relay off.

      +

    Returns Promise<number>

    • Switch the given relay on.

      +

    Returns Promise<number>

    \ No newline at end of file +

    Returns Promise<number>

    diff --git a/docs/enums/DosageTarget.html b/docs/enums/DosageTarget.html index 1c9dc79..e9a7944 100644 --- a/docs/enums/DosageTarget.html +++ b/docs/enums/DosageTarget.html @@ -1,7 +1,7 @@ DosageTarget | procon-ip

    Enumeration DosageTarget

    This enum can be used with the CommandService.setDosage method. But there are also shorthand wrappers for all states (CommandService.setChlorineDosage, CommandService.setPhPlusDosage, CommandService.setPhMinusDosage) that can be used.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    CHLORINE: 0
    PH_MINUS: 1
    PH_PLUS: 2
    \ No newline at end of file +

    Enumeration Members

    CHLORINE: 0
    PH_MINUS: 1
    PH_PLUS: 2
    diff --git a/docs/enums/GetStateCategory.html b/docs/enums/GetStateCategory.html index db9c782..f39a632 100644 --- a/docs/enums/GetStateCategory.html +++ b/docs/enums/GetStateCategory.html @@ -2,7 +2,7 @@ GetStateData.getDataObjectsByCategory.

    Categories are based on the official API documentation.

    See manual (search for GetState.csv): http://www.pooldigital.de/trm/TRM_ProConIP.pdf

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    ANALOG: "analog"

    Category for analog channels.

    -
    CANISTER: "canister"

    Category for canister filling levels.

    -
    CANISTER_CONSUMPTION: "canisterConsumptions"

    Category for canister consumptions.

    -
    DIGITAL_INPUT: "digitalInput"

    Category for digital inputs.

    -
    ELECTRODES: "electrodes"

    Category for electrode readings.

    -
    EXTERNAL_RELAYS: "externalRelays"

    Category for external relays.

    -
    RELAYS: "relays"

    Category for internal relays.

    -
    TEMPERATURES: "temperatures"

    Category for temperature sensor values.

    -
    TIME: "time"

    Internal time of the ProCon.IP when processing the corresponding request. +

    CANISTER: "canister"

    Category for canister filling levels.

    +
    CANISTER_CONSUMPTION: "canisterConsumptions"

    Category for canister consumptions.

    +
    DIGITAL_INPUT: "digitalInput"

    Category for digital inputs.

    +
    ELECTRODES: "electrodes"

    Category for electrode readings.

    +
    EXTERNAL_RELAYS: "externalRelays"

    Category for external relays.

    +
    RELAYS: "relays"

    Category for internal relays.

    +
    TEMPERATURES: "temperatures"

    Category for temperature sensor values.

    +
    TIME: "time"

    Internal time of the ProCon.IP when processing the corresponding request. Hence, there is only one item in this category.

    -
    \ No newline at end of file +
    diff --git a/docs/enums/LogLevel.html b/docs/enums/LogLevel.html index 3559ca1..2c2e7ba 100644 --- a/docs/enums/LogLevel.html +++ b/docs/enums/LogLevel.html @@ -1,5 +1,5 @@ -LogLevel | procon-ip

    Enumeration LogLevel

    Enumeration Members

    DEBUG +LogLevel | procon-ip

    Enumeration LogLevel

    Enumeration Members

    Enumeration Members

    DEBUG: 1
    ERROR: 4
    INFO: 2
    WARN: 3
    \ No newline at end of file +

    Enumeration Members

    DEBUG: 1
    ERROR: 4
    INFO: 2
    WARN: 3
    diff --git a/docs/enums/RelayStateBitMask.html b/docs/enums/RelayStateBitMask.html index 798ffab..aa5cd44 100644 --- a/docs/enums/RelayStateBitMask.html +++ b/docs/enums/RelayStateBitMask.html @@ -4,6 +4,6 @@
  • msb: 0 = auto, 1 = manual
  • It is used by the RelayDataInterpreter and the UsrcfgCgiService.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    manual: 2
    on: 1
    \ No newline at end of file +

    Enumeration Members

    manual: 2
    on: 1
    diff --git a/docs/enums/SetStateValue.html b/docs/enums/SetStateValue.html index aedc3a8..7ff49ed 100644 --- a/docs/enums/SetStateValue.html +++ b/docs/enums/SetStateValue.html @@ -1,7 +1,7 @@ SetStateValue | procon-ip

    Enumeration SetStateValue

    This enum can be used with the UsrcfgCgiService.setState method. But there are also shorthand wrappers for all states (UsrcfgCgiService.setOn, UsrcfgCgiService.setOff, UsrcfgCgiService.setAuto) that can be used.

    -

    Enumeration Members

    Enumeration Members

    Enumeration Members

    AUTO: 2
    OFF: 0
    ON: 1
    \ No newline at end of file +

    Enumeration Members

    AUTO: 2
    OFF: 0
    ON: 1
    diff --git a/docs/hierarchy.html b/docs/hierarchy.html index 36ab4ab..8124191 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -1 +1 @@ -procon-ip
    \ No newline at end of file +procon-ip
    diff --git a/docs/index.html b/docs/index.html index c023bf2..020e887 100644 --- a/docs/index.html +++ b/docs/index.html @@ -84,7 +84,7 @@
  • pooldigital.de forum

  • -
    • ILogger a message with severity info.

      Parameters

      • message: string

        The information.

        -

      Returns void

    • ILogger a message with severity warn.

      +

    Returns void

    • ILogger a message with severity warn.

      Parameters

      • message: string

        The warning.

        -

      Returns void

    \ No newline at end of file +

    Returns void

    diff --git a/docs/interfaces/IServiceConfig.html b/docs/interfaces/IServiceConfig.html index 8aca968..0b5dbbf 100644 --- a/docs/interfaces/IServiceConfig.html +++ b/docs/interfaces/IServiceConfig.html @@ -1,17 +1,17 @@ IServiceConfig | procon-ip

    Interface IServiceConfig

    interface IServiceConfig {
        basicAuth: boolean;
        controllerUrl: string;
        password?: string;
        requestHeaders?: {
            [key: string]: string;
        };
        timeout: number;
        username?: string;
        [key: string]: unknown;
    }

    Hierarchy (view full)

    Indexable

    • [key: string]: unknown

      Configurations might contain any other values/keys, that do not conflict with valid configuration parameters.

      -

    Properties

    Properties

    basicAuth: boolean

    Enable HTTP basic auth.

    -
    controllerUrl: string

    Controller URL must be a valid URL string with leading protocol scheme +

    controllerUrl: string

    Controller URL must be a valid URL string with leading protocol scheme (e.g. 'http://') and should point to the ProCon.IP HTTP root. This address will be combined with the endpoint (e.g. "/GetState.csv") to build the request address. A trailing slash will be added automatically if needed.

    -
    password?: string

    HTTP basic auth pass. Optional.

    -
    requestHeaders?: {
        [key: string]: string;
    }
    timeout: number

    Define request timeout.

    -
    username?: string

    HTTP basic auth username. Optional.

    -
    \ No newline at end of file +
    password?: string

    HTTP basic auth pass. Optional.

    +
    requestHeaders?: {
        [key: string]: string;
    }
    timeout: number

    Define request timeout.

    +
    username?: string

    HTTP basic auth username. Optional.

    +
    diff --git a/docs/modules.html b/docs/modules.html index 41e4ed6..d80f0b9 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -19,4 +19,4 @@ ILogger IServiceConfig

    Variables

    \ No newline at end of file +
    diff --git a/docs/variables/GETSTATE.html b/docs/variables/GETSTATE.html index 995d609..457631e 100644 --- a/docs/variables/GETSTATE.html +++ b/docs/variables/GETSTATE.html @@ -1,2 +1,2 @@ GETSTATE | procon-ip

    Variable GETSTATEConst

    GETSTATE: string = ...

    Response payload of the /GetState.csv endpoint.

    -
    \ No newline at end of file +
    diff --git a/package.json b/package.json index 588cefa..4ed450c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "procon-ip", - "version": "1.7.6", + "version": "1.8.0", "description": "Library for the ProCon.IP pool controller", "license": "MIT", "homepage": "https://github.com/ylabonte/procon-ip#readme", diff --git a/src/abstract-service.ts b/src/abstract-service.ts index 31a6432..7a8fc53 100644 --- a/src/abstract-service.ts +++ b/src/abstract-service.ts @@ -135,7 +135,6 @@ export abstract class AbstractService { /** * Get the webservice url (joined base url and endpoint). * - * @throws TypeError [ERR_INVALID_URL]: Invalid URL * @returns URL string (joined base url and endpoint). */ public get url(): string {