@mxtommy/kip 4.5.2 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -3
- package/package.json +13 -15
- package/plugin/history-series.service.js +14 -24
- package/plugin/index.js +139 -95
- package/plugin/{duckdb-parquet-storage.service.js → sqlite-history-storage.service.js} +330 -503
- package/public/assets/help-docs/widget-historical-series.md +5 -5
- package/public/{chunk-TVNXBPFF.js → chunk-356CW47X.js} +1 -1
- package/public/{chunk-NFJ4RQSE.js → chunk-3JA4CQ7T.js} +1 -1
- package/public/{chunk-VXTTEFRP.js → chunk-5SAXWR6Z.js} +8 -8
- package/public/{chunk-67V4XHCY.js → chunk-6A4NRSCL.js} +1 -1
- package/public/{chunk-P7JKENHI.js → chunk-AC6VD2FN.js} +1 -1
- package/public/{chunk-TBNKOU7M.js → chunk-B4NYOD6L.js} +1 -1
- package/public/{chunk-WH5CIUSB.js → chunk-BGGO4PGD.js} +1 -1
- package/public/{chunk-KQEEYPK3.js → chunk-BMHMHQFO.js} +1 -1
- package/public/{chunk-RCYOZLZB.js → chunk-CSIELI2Z.js} +2 -2
- package/public/{chunk-R36UY4Q4.js → chunk-CYTLQDGF.js} +1 -1
- package/public/{chunk-YI3MZWRZ.js → chunk-HSKVTFFQ.js} +1 -1
- package/public/{chunk-IH4CEW4C.js → chunk-MDNGWQNG.js} +8 -8
- package/public/{chunk-VPF5756E.js → chunk-MGLD6QDJ.js} +1 -1
- package/public/{chunk-P4CRTB7N.js → chunk-NJISHUGY.js} +1 -1
- package/public/{chunk-ISF5E3CX.js → chunk-P3M6SJQT.js} +11 -11
- package/public/{chunk-WQSJFJLW.js → chunk-POMIQBAL.js} +2 -2
- package/public/{chunk-SJFJEOSG.js → chunk-PPF5S5CV.js} +1 -1
- package/public/{chunk-OPTBDYBL.js → chunk-PUPM3HUQ.js} +1 -1
- package/public/chunk-PZ6I6W3H.js +16 -0
- package/public/{chunk-VXCYPAWR.js → chunk-QU3JR4YV.js} +1 -1
- package/public/{chunk-Q2ANAJAD.js → chunk-SUWMN3AE.js} +1 -1
- package/public/{chunk-CD5TQSCS.js → chunk-UYHRT3PR.js} +1 -1
- package/public/{chunk-FZFDGAQO.js → chunk-WJFXI5PQ.js} +1 -1
- package/public/{chunk-I4SJ5UNN.js → chunk-ZXO4VMEH.js} +1 -1
- package/public/{chunk-XBSU7OGT.js → chunk-ZY3U4H4Z.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-B6TXB3EB.js → main-I33LH3HC.js} +1 -1
- package/plugin/plugin-auth.service.js +0 -75
- package/public/chunk-BTFZS2TW.js +0 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{$ as fe,Ac as Oe,Bd as Ie,Ca as N,Gb as Te,Gd as Le,H as pe,Ha as be,Hb as Ee,J as ue,Ka as we,Ma as ye,Oa as Z,Pb as $e,Pe as ve,R as de,Rb as _e,Sb as Ae,U as ge,Va as Se,a as k,ac as Ce,b as P,ca as ke,cb as Re,da as me,dc as Pe,ec as ze,ed as $,f as E,fb as Q,k as M,ka as xe,na as z,pa as b,s as ce,z as he}from"./chunk-
|
|
2
|
-
]`).replace("lheading",Ue).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),kt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,mt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qe=/^( {2,}|\\)\n(?!\s*$)/,xt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,H=/[\p{P}\p{S}]/u,ne=/[\s\p{P}\p{S}]/u,We=/[^\s\p{P}\p{S}]/u,bt=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ne).getRegex(),Xe=/(?!~)[\p{P}\p{S}]/u,wt=/(?!~)[\s\p{P}\p{S}]/u,yt=/(?:[^\s\p{P}\p{S}]|~)/u,Ke=/(?![*_])[\p{P}\p{S}]/u,St=/(?![*_])[\s\p{P}\p{S}]/u,Rt=/(?:[^\s\p{P}\p{S}]|[*_])/u,Tt=g(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",rt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ge=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Et=g(Ge,"u").replace(/punct/g,H).getRegex(),$t=g(Ge,"u").replace(/punct/g,Xe).getRegex(),Ve="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_t=g(Ve,"gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,ne).replace(/punct/g,H).getRegex(),At=g(Ve,"gu").replace(/notPunctSpace/g,yt).replace(/punctSpace/g,wt).replace(/punct/g,Xe).getRegex(),Ct=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,ne).replace(/punct/g,H).getRegex(),Pt=g(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ke).getRegex(),zt="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ot=g(zt,"gu").replace(/notPunctSpace/g,Rt).replace(/punctSpace/g,St).replace(/punct/g,Ke).getRegex(),It=g(/\\(punct)/,"gu").replace(/punct/g,H).getRegex(),Lt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),vt=g(ee).replace("(?:-->|$)","-->").getRegex(),Dt=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",vt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),j=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Mt=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]
|
|
1
|
+
import{$ as fe,Ac as Oe,Bd as Ie,Ca as N,Gb as Te,Gd as Le,H as pe,Ha as be,Hb as Ee,J as ue,Ka as we,Ma as ye,Oa as Z,Pb as $e,Pe as ve,R as de,Rb as _e,Sb as Ae,U as ge,Va as Se,a as k,ac as Ce,b as P,ca as ke,cb as Re,da as me,dc as Pe,ec as ze,ed as $,f as E,fb as Q,k as M,ka as xe,na as z,pa as b,s as ce,z as he}from"./chunk-PZ6I6W3H.js";function G(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var C=G();function Fe(i){C=i}var _={exec:()=>null};function g(i,t=""){let e=typeof i=="string"?i:i.source,r={replace:(n,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(x.caret,"$1"),e=e.replace(n,l),r},getRegex:()=>new RegExp(e,t)};return r}var rt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch(i){return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}>`)},it=/^(?:[ \t]*(?:\n|$))+/,st=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,D=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,at=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,V=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,He=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ue=g(He).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ot=g(He).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),J=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ct=/^[^\n]+/,Y=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ht=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pt=g(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,V).getRegex(),F="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ee=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ut=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ee).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ze=g(J).replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),dt=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ze).getRegex(),te={blockquote:dt,code:st,def:ht,fences:lt,heading:at,hr:D,html:ut,lheading:Ue,list:pt,newline:it,paragraph:Ze,table:_,text:ct},De=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),gt=P(k({},te),{lheading:ot,table:De,paragraph:g(J).replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",De).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex()}),ft=P(k({},te),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ee).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(J).replace("hr",D).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",Ue).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),kt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,mt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qe=/^( {2,}|\\)\n(?!\s*$)/,xt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,H=/[\p{P}\p{S}]/u,ne=/[\s\p{P}\p{S}]/u,We=/[^\s\p{P}\p{S}]/u,bt=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ne).getRegex(),Xe=/(?!~)[\p{P}\p{S}]/u,wt=/(?!~)[\s\p{P}\p{S}]/u,yt=/(?:[^\s\p{P}\p{S}]|~)/u,Ke=/(?![*_])[\p{P}\p{S}]/u,St=/(?![*_])[\s\p{P}\p{S}]/u,Rt=/(?:[^\s\p{P}\p{S}]|[*_])/u,Tt=g(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",rt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ge=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Et=g(Ge,"u").replace(/punct/g,H).getRegex(),$t=g(Ge,"u").replace(/punct/g,Xe).getRegex(),Ve="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_t=g(Ve,"gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,ne).replace(/punct/g,H).getRegex(),At=g(Ve,"gu").replace(/notPunctSpace/g,yt).replace(/punctSpace/g,wt).replace(/punct/g,Xe).getRegex(),Ct=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,ne).replace(/punct/g,H).getRegex(),Pt=g(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ke).getRegex(),zt="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ot=g(zt,"gu").replace(/notPunctSpace/g,Rt).replace(/punctSpace/g,St).replace(/punct/g,Ke).getRegex(),It=g(/\\(punct)/,"gu").replace(/punct/g,H).getRegex(),Lt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),vt=g(ee).replace("(?:-->|$)","-->").getRegex(),Dt=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",vt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),j=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Mt=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",j).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Je=g(/^!?\[(label)\]\[(ref)\]/).replace("label",j).replace("ref",Y).getRegex(),Ye=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",Y).getRegex(),Nt=g("reflink|nolink(?!\\()","g").replace("reflink",Je).replace("nolink",Ye).getRegex(),Me=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,re={_backpedal:_,anyPunctuation:It,autolink:Lt,blockSkip:Tt,br:Qe,code:mt,del:_,delLDelim:_,delRDelim:_,emStrongLDelim:Et,emStrongRDelimAst:_t,emStrongRDelimUnd:Ct,escape:kt,link:Mt,nolink:Ye,punctuation:bt,reflink:Je,reflinkSearch:Nt,tag:Dt,text:xt,url:_},Bt=P(k({},re),{link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",j).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j).getRegex()}),W=P(k({},re),{emStrongRDelimAst:At,emStrongLDelim:$t,delLDelim:Pt,delRDelim:Ot,url:g(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Me).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:g(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Me).getRegex()}),jt=P(k({},W),{br:g(Qe).replace("{2,}","*").getRegex(),text:g(W.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),B={normal:te,gfm:gt,pedantic:ft},I={normal:re,gfm:W,breaks:jt,pedantic:Bt},qt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ne=i=>qt[i];function R(i,t){if(t){if(x.escapeTest.test(i))return i.replace(x.escapeReplace,Ne)}else if(x.escapeTestNoEncode.test(i))return i.replace(x.escapeReplaceNoEncode,Ne);return i}function Be(i){try{i=encodeURI(i).replace(x.percentDecode,"%")}catch(t){return null}return i}function je(i,t){let e=i.replace(x.findPipe,(s,l,o)=>{let a=!1,h=l;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),r=e.split(x.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(x.slashPipe,"|");return r}function L(i,t,e){let r=i.length;if(r===0)return"";let n=0;for(;n<r;){let s=i.charAt(r-n-1);if(s===t&&!e)n++;else if(s!==t&&e)n++;else break}return i.slice(0,r-n)}function Ft(i,t){if(i.indexOf(t[1])===-1)return-1;let e=0;for(let r=0;r<i.length;r++)if(i[r]==="\\")r++;else if(i[r]===t[0])e++;else if(i[r]===t[1]&&(e--,e<0))return r;return e>0?-2:-1}function Ht(i,t=0){let e=t,r="";for(let n of i)if(n===" "){let s=4-e%4;r+=" ".repeat(s),e+=s}else r+=n,e++;return r}function qe(i,t,e,r,n){let s=t.href,l=t.title||null,o=i[1].replace(n.other.outputLinkReplace,"$1");r.state.inLink=!0;let a={type:i[0].charAt(0)==="!"?"image":"link",raw:e,href:s,title:l,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,a}function Ut(i,t,e){let r=i.match(e.other.indentCodeCompensation);if(r===null)return t;let n=r[1];return t.split(`
|
|
3
3
|
`).map(s=>{let l=s.match(e.other.beginningSpace);if(l===null)return s;let[o]=l;return o.length>=n.length?s.slice(n.length):s}).join(`
|
|
4
4
|
`)}var q=class{options;rules;lexer;constructor(i){this.options=i||C}space(i){let t=this.rules.block.newline.exec(i);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(i){let t=this.rules.block.code.exec(i);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:L(e,`
|
|
5
5
|
`)}}}fences(i){let t=this.rules.block.fences.exec(i);if(t){let e=t[0],r=Ut(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(i){let t=this.rules.block.heading.exec(i);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let r=L(e,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(e=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(i){let t=this.rules.block.hr.exec(i);if(t)return{type:"hr",raw:L(t[0],`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as O,f as Re,g as v,h as Ae,i as We,k as Ie}from"./chunk-P7JKENHI.js";import{A as de,Aa as R,Ca as ue,Cb as N,Da as fe,Db as H,Eb as Y,Fa as ge,Fb as F,G as he,Gb as ke,Hb as Se,I as pe,Jc as Ee,K as me,Ka as be,Lc as Q,Nb as q,Nd as Z,Ob as ve,Od as Ce,Oe as u,Qb as P,Rb as C,Sb as k,Ub as ye,Va as T,Vb as xe,Wb as De,Xd as Oe,ac as S,ae as J,be as $e,dc as G,ee as U,fb as _,fc as K,fe as X,g as oe,gb as A,h as ne,j as w,k as d,ka as E,l as re,la as $,m as b,n as M,na as L,ob as _e,pa as p,rc as Me,rd as Te,s as ce,sd as we,te as V,ub as z,wb as W,xb as I,z as le}from"./chunk-BTFZS2TW.js";var ze={url:"",deserializer:a=>JSON.parse(a.data),serializer:a=>JSON.stringify(a)},He="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",j=class a extends re{constructor(o,e){if(super(),this._socket=null,o instanceof w)this.destination=e,this.source=o;else{let t=this._config=Object.assign({},ze);if(this._output=new d,typeof o=="string")t.url=o;else for(let i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);if(!t.WebSocketCtor&&WebSocket)t.WebSocketCtor=WebSocket;else if(!t.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new M}}lift(o){let e=new a(this._config,this.destination);return e.operator=o,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new M),this._output=new d}multiplex(o,e,t){let i=this;return new w(s=>{try{i.next(o())}catch(r){s.error(r)}let n=i.subscribe({next:r=>{try{t(r)&&s.next(r)}catch(c){s.error(c)}},error:r=>s.error(r),complete:()=>s.complete()});return()=>{try{i.next(e())}catch(r){s.error(r)}n.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:o,protocol:e,url:t,binaryType:i}=this._config,s=this._output,n=null;try{n=e?new o(t,e):new o(t),this._socket=n,i&&(this._socket.binaryType=i)}catch(c){s.error(c);return}let r=new oe(()=>{this._socket=null,n&&n.readyState===1&&n.close()});n.onopen=c=>{let{_socket:l}=this;if(!l){n.close(),this._resetState();return}let{openObserver:f}=this._config;f&&f.next(c);let g=this.destination;this.destination=ne.create(h=>{if(n.readyState===1)try{let{serializer:m}=this._config;n.send(m(h))}catch(m){this.destination.error(m)}},h=>{let{closingObserver:m}=this._config;m&&m.next(void 0),h&&h.code?n.close(h.code,h.reason):s.error(new TypeError(He)),this._resetState()},()=>{let{closingObserver:h}=this._config;h&&h.next(void 0),n.close(),this._resetState()}),g&&g instanceof M&&r.add(g.subscribe(this.destination))},n.onerror=c=>{this._resetState(),s.error(c)},n.onclose=c=>{n===this._socket&&this._resetState();let{closeObserver:l}=this._config;l&&l.next(c),c.wasClean?s.complete():s.error(c)},n.onmessage=c=>{try{let{deserializer:l}=this._config;s.next(l(c))}catch(l){s.error(l)}}}_subscribe(o){let{source:e}=this;return e?e.subscribe(o):(this._socket||this._connectSocket(),this._output.subscribe(o),o.add(()=>{let{_socket:t}=this;this._output.observers.length===0&&(t&&(t.readyState===1||t.readyState===0)&&t.close(),this._resetState())}),o)}unsubscribe(){let{_socket:o}=this;o&&(o.readyState===1||o.readyState===0)&&o.close(),this._resetState(),super.unsubscribe()}};function ee(a){return new j(a)}var Ne=(()=>{class a{_destroyRef=p(R);_skRequests$=new d;_skNotificationsMsg$=new d;_skValue$=new d;_skMetadata$=new d;_vesselSelfUrn$=new d;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new b(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new d;socketWSOpenEvent$=new d;authToken=null;server=p(We);auth=p(Ie);connectionStateMachine=p(Ae);zones=p(fe);FLATTEN_CONFIG={maxDepth:3,maxObjectSize:20,enableFlattening:!0};DO_NOT_FLATTEN_PATHS=["displays."];constructor(){this.connectionStateMachine.setWebSocketRetryCallback(()=>{console.log("[Delta Service] Executing WebSocket retry via callback"),this.retryWebSocketConnection()}),this.server.serverServiceEndpoint$.pipe(u(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(u(this._destroyRef)).subscribe(e=>{switch(e){case v.WebSocketConnecting:this.handleWebSocketConnecting();break;case v.Connected:break;case v.Disconnected:case v.WebSocketError:case v.PermanentFailure:this.handleDisconnection();break}}),this.auth.authToken$.pipe(u(this._destroyRef)).subscribe(e=>{this.authToken!=e&&(this.authToken=e,this.socketWS$&&this.connectionStateMachine.isFullyConnected()&&(this.closeWS("Token changed"),this.connectionStateMachine.startWebSocketConnection()))}),this.socketWSOpenEvent$.pipe(u(this._destroyRef)).subscribe(()=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint),this.connectionStateMachine.onWebSocketConnected()}),this.socketWSCloseEvent$.pipe(u(this._destroyRef)).subscribe(e=>{e.wasClean?(console.log("[Delta Service] WebSocket closed cleanly"),this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,this.connectionStateMachine.onWebSocketError("WebSocket connection lost")),this.streamEndpoint$.next(this.streamEndpoint)}),he(document,"visibilitychange").pipe(u(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(u(this._destroyRef)).subscribe({next:t=>this.processWebsocketMessage(t),error:t=>{console.error("[Delta Service] WebSocket error:",t)}})})}retryWebSocketConnection(){if(console.log("[Delta Service] Retrying WebSocket connection"),!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available for retry"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Retrying connection"),this.connectWS("WebSocket retry attempt")}handleWebSocketConnecting(){if(!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Starting new connection"),this.connectWS("ConnectionStateMachine request")}handleDisconnection(){this.socketWS$&&this.closeWS("ConnectionStateMachine disconnection"),this.streamEndpoint.message="Not connected",this.streamEndpoint.operation=0,this.streamEndpoint$.next(this.streamEndpoint)}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,ee({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?this.socketWS$.next(e):console.log("[Delta Service] No WebSocket present to send message - dropping message")}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,t){e.forEach(i=>{i.meta!==void 0&&i.meta.forEach(s=>this.parseSkMeta(s,t)),i.values!==void 0&&i.values.forEach(s=>{if(s.path.startsWith("notifications."))this._skNotificationsMsg$.next(s);else if(typeof s.value=="object"&&s.value!==null)if(this.DO_NOT_FLATTEN_PATHS.some(n=>s.path.includes(n))){let n={context:t,path:s.path,source:i.$source,timestamp:i.timestamp,value:s.value};this._skValue$.next(n)}else this.FLATTEN_CONFIG.enableFlattening&&this.canFlattenCompletely(s.value,this.FLATTEN_CONFIG.maxDepth,this.FLATTEN_CONFIG.maxObjectSize)?this.flattenObjectValue(s.value,s.path).forEach(r=>{let c={context:t,path:r.path,source:i.$source,timestamp:i.timestamp,value:r.value};this._skValue$.next(c)}):Object.keys(s.value).forEach(n=>{let r={context:t,path:`${s.path}.${n}`,source:i.$source,timestamp:i.timestamp,value:s.value[n]};this._skValue$.next(r)});else{let n={context:t,path:s.path,source:i.$source,timestamp:i.timestamp,value:s.value};this._skValue$.next(n)}})})}canFlattenCompletely(e,t,i,s=0){if(s>=t)return!1;if(typeof e!="object"||e===null)return!0;let n=Object.keys(e);if(n.length>i)return!1;for(let r of n)if(!this.canFlattenCompletely(e[r],t,i,s+1))return!1;return!0}flattenObjectValue(e,t,i=0){let s=[];if(typeof e!="object"||e===null||i>=this.FLATTEN_CONFIG.maxDepth)return[{path:t,value:e}];let n=Object.keys(e);for(let r of n){let c=t?`${t}.${r}`:r,l=this.flattenObjectValue(e[r],c,i+1);s.push(...l)}return s}parseSkMeta(e,t){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(i=>{this._skMetadata$.next({context:t,path:`${e.path}.${i}`,meta:e.value.properties[i]})}):this._skMetadata$.next({context:t,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.connectionStateMachine.isFullyConnected()?console.log(`[Delta Service] ${e}: Connection is active.`):this.connectionStateMachine.isHTTPConnected()&&this.connectionStateMachine.currentState!==v.WebSocketRetrying?(console.log(`[Delta Service] ${e}: WebSocket disconnected, requesting reconnection...`),this.connectionStateMachine.startWebSocketConnection()):console.log(`[Delta Service] ${e}: HTTP not connected, cannot start WebSocket`)}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete()}static \u0275fac=function(t){return new(t||a)};static \u0275prov=E({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var x=(function(a){return a.Normal="normal",a.Nominal="nominal",a.Alert="alert",a.Warn="warn",a.Alarm="alarm",a.Emergency="emergency",a})(x||{});var Ye=(function(a){return a.Visual="visual",a.Sound="sound",a})(Ye||{});var qe="self",Fe=a=>isFinite(+(a instanceof Date?a:new Date(a)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(a):!1,Pe=a=>{if(a)return a==="RFC 3339 (UTC)"?"Date":"number"},Pt=(()=>{class a{delta=p(Ne);_destroyRef=p(R);_deltaUpdatesCounter=0;_deltaUpdatesSubject=new M(10);_isSkDataFullTreeActive=!1;_skDataSubject$=new b([]);_skDataEmitTimer=null;_skDataEmitIntervalMs=200;_dataServiceMeta=[];_dataServiceMetaByPath=new Map;_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new b([]);_skNotificationMsg$=new d;_skNotificationMeta$=new d;_isReset=new d;_pathUpdates$=new d;_selfUrn="self";_skData=new Map;_skDataArrayCache=[];_skDataIndexByPath=new Map;_pathRegister=[];_pathRegisterByPath=new Map;constructor(){pe(1e3).pipe(u(this._destroyRef)).subscribe(()=>{let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}),this.delta.subscribeDataPathsUpdates().pipe(u(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(u(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(u(this._destroyRef)).subscribe(e=>{let t=e.path.replace("notifications.","self."),i=this._skData.get(t);if(i&&i.state!==e.value.state){i.state=e.value.state;let s=this._pathRegisterByPath.get(t);if(s?.length)for(let n of s)n._pathState$.next(i.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(u(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=new Map,this._skDataArrayCache=[],this._skDataIndexByPath.clear(),this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let t=this._pathRegister.findIndex(i=>i.path===e);if(t!==-1){let i=this._pathRegister[t];i.combinedSub?.unsubscribe(),i._pathData$?.complete(),i._pathState$?.complete(),i.pathDataUpdate$?.complete(),i.pathMeta$?.complete(),this._pathRegister.splice(t,1);let s=this._pathRegisterByPath.get(e);if(s){let n=s.filter(r=>r!==i);n.length?this._pathRegisterByPath.set(e,n):this._pathRegisterByPath.delete(e)}}}subscribePath(e,t){let i=this._pathRegisterByPath.get(e),s=i?.find(D=>D.path===e&&D.source===t);if(s)return s.pathDataUpdate$;let n=null,r=null,c=null,l=x.Normal,f={data:{value:null,timestamp:null},state:l},g=null,h=this._skData.get(e);h&&(n=t==="default"?h.pathValue:h.sources?.[t]?.sourceValue??null,r=t==="default"?h.pathTimestamp:h.sources?.[t]?.sourceTimestamp??null,c=r?new Date(r):null,f={data:{value:n,timestamp:c},state:h.state||l},l=h.state||l,g=h.meta||null);let m={path:e,source:t,_pathData$:new b(f.data),_pathState$:new b(f.state),pathDataUpdate$:new b(f),pathMeta$:new b(g?O(g):null)},Be=de([m._pathData$,m._pathState$]).pipe(le(([D,Le])=>({data:D,state:Le})));return m.combinedSub=Be.subscribe(D=>m.pathDataUpdate$.next(D)),this._pathRegister.push(m),i?i.push(m):this._pathRegisterByPath.set(e,[m]),m.pathDataUpdate$}subscribePathTree(e,t="default"){let i=this.normalizePathPrefix(e);return new w(s=>{for(let r of this._skData.values())r.path.startsWith(i)&&s.next({path:r.path,update:this.buildPathUpdate(r,t)});let n=this._pathUpdates$.pipe(me(r=>r.fullPath.startsWith(i))).subscribe(r=>{let c=this._skData.get(r.fullPath);c&&s.next({path:c.path,update:this.buildPathUpdate(c,t)})});return()=>n.unsubscribe()}).pipe(u(this._destroyRef))}updatePathData(e){this._deltaUpdatesCounter++;let t=this.setPathContext(e.context,e.path),i=this._skData.get(t);if(i)i.defaultSource===void 0&&(i.defaultSource=e.source),i.type===void 0&&e.value!==null&&(i.type=typeof e.value,i.type==="string"&&Fe(e.value)&&(i.type="Date")),i.pathValue=e.value,i.pathTimestamp=e.timestamp,i.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let n=e.value===null?void 0:typeof e.value;n==="string"&&Fe(e.value)&&(n="Date"),i={path:t,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:n,state:x.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.set(t,i)}let s=this._pathRegisterByPath.get(t)??[];if(s.length){let n={value:i.pathValue,timestamp:i.pathTimestamp?new Date(i.pathTimestamp):null},r=s.find(l=>l.source==="default");r&&r._pathData$.next(n);let c=s.find(l=>l.source===e.source);c&&c._pathData$.next(n)}this._isSkDataFullTreeActive&&(this.upsertSkDataCache(i),this.scheduleSkDataFullTreeEmit()),this._pathUpdates$.next({fullPath:t,update:e})}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let t=this.setPathContext(e.context,e.path),i=this._skData.get(t);i?(i.type==="object"&&e.meta.units&&(i.type=Pe(e.meta.units)),i.meta=Re({},i.meta,e.meta)):(i={path:t,pathValue:void 0,pathTimestamp:void 0,type:Pe(e.meta.units),state:x.Normal,defaultSource:void 0,sources:{},meta:e.meta?O(e.meta):null},this._skData.set(t,i),this._isSkDataFullTreeActive&&(this.upsertSkDataCache(i),this.scheduleSkDataFullTreeEmit()));let s=this._pathRegisterByPath.get(t);if(s?.length)for(let n of s)n.pathMeta$.next(i.meta?O(i.meta):null);this._isSkMetaFullTreeActive&&(this._dataServiceMetaByPath.set(t,{path:t,meta:i.meta}),this._dataServiceMeta=Array.from(this._dataServiceMetaByPath.values()),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){this._isSkMetaFullTreeActive=!0,this._dataServiceMetaByPath.clear();for(let e of this.getSkDataArray())e.meta!==void 0&&e.path.startsWith("self.")&&this._dataServiceMetaByPath.set(e.path,{path:e.path,meta:e.meta});return this._dataServiceMeta=Array.from(this._dataServiceMetaByPath.values()),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next([]),this._dataServiceMeta=[],this._dataServiceMetaByPath.clear()}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this.refreshSkDataCache(),this.emitSkDataFullTree(),this._skDataSubject$}getSkDataArray(){return this._isSkDataFullTreeActive?this._skDataArrayCache:Array.from(this._skData.values())}observePathUpdates(){return this._pathUpdates$.asObservable()}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1,this._skDataEmitTimer&&(clearTimeout(this._skDataEmitTimer),this._skDataEmitTimer=null),this._skDataArrayCache=[],this._skDataIndexByPath.clear()}scheduleSkDataFullTreeEmit(){!this._isSkDataFullTreeActive||this._skDataEmitTimer||(this._skDataEmitTimer=setTimeout(()=>{this._skDataEmitTimer=null,this.emitSkDataFullTree()},this._skDataEmitIntervalMs))}emitSkDataFullTree(){this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skDataArrayCache)}refreshSkDataCache(){this._skDataArrayCache=Array.from(this._skData.values()),this._skDataIndexByPath.clear(),this._skDataArrayCache.forEach((e,t)=>this._skDataIndexByPath.set(e.path,t))}upsertSkDataCache(e){let t=this._skDataIndexByPath.get(e.path);t===void 0?(this._skDataIndexByPath.set(e.path,this._skDataArrayCache.length),this._skDataArrayCache.push(e)):this._skDataArrayCache[t]=e}setSelfUrn(e){e!==""&&e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,t){return e!==this._selfUrn?`${e}.${t}`:`${qe}.${t}`}normalizePathPrefix(e){let t=e?.trim()??"";return(t.endsWith(".*")||t.endsWith(":*")||t.endsWith("*"))&&(t=t.slice(0,-1)),t&&!t.endsWith(".")&&!t.endsWith(":")&&(t=`${t}.`),t}buildPathUpdate(e,t){let i=t==="default",s=i?e.pathValue:e.sources?.[t]?.sourceValue??null,n=i?e.pathTimestamp:e.sources?.[t]?.sourceTimestamp??null;return{data:{value:s,timestamp:n?new Date(n):null},state:e.state||x.Normal}}getPathsByType(e,t){return this.getSkDataArray().filter(i=>i.type===e&&(!t||i.path.startsWith("self"))).map(i=>i.path)}getPathsAndMetaByType(e,t=!1,i=!1,s=!0){return this.getSkDataArray().filter(n=>{let c=["string","number","boolean","object","undefined","function","symbol","bigint","Date"].includes(e)?n.type===e:n.meta?.type===e,l=!s||n.path.startsWith("self"),f=t===!0?n.meta?.supportsPut===!0:!0,g=i===!0?Array.isArray(n.meta?.zones)&&n.meta.zones.length>0:!0;return c&&l&&f&&g}).map(n=>({path:n.path,meta:n.meta}))}getPathObject(e){return O(this._skData.get(e))||null}getPathUnitType(e){return this._skData.get(e)?.meta?.units||null}timeoutPathObservable(e,t){let i=this._pathRegister.find(s=>s.path==e);if(i){let s;["string","Date","number","multiple"].includes(t)&&(s={data:{value:null,timestamp:null},state:x.Normal}),i.pathDataUpdate$.next(s)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegisterByPath.get(e)?.[0]?.pathMeta$.asObservable()||ce(null)}getPathMeta(e){return this._skData.get(e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._skDataEmitTimer&&(clearTimeout(this._skDataEmitTimer),this._skDataEmitTimer=null),this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete(),this._pathUpdates$?.complete()}static \u0275fac=function(t){return new(t||a)};static \u0275prov=E({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var Ue=(()=>{class a{_animationsDisabled=Oe();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=_({type:a,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,i){t&2&&S("mat-pseudo-checkbox-indeterminate",i.state==="indeterminate")("mat-pseudo-checkbox-checked",i.state==="checked")("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal",i.appearance==="minimal")("mat-pseudo-checkbox-full",i.appearance==="full")("_mat-animation-noopable",i._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,i){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}
|
|
1
|
+
import{d as O,f as Re,g as v,h as Ae,i as We,k as Ie}from"./chunk-AC6VD2FN.js";import{A as de,Aa as R,Ca as ue,Cb as N,Da as fe,Db as H,Eb as Y,Fa as ge,Fb as F,G as he,Gb as ke,Hb as Se,I as pe,Jc as Ee,K as me,Ka as be,Lc as Q,Nb as q,Nd as Z,Ob as ve,Od as Ce,Oe as u,Qb as P,Rb as C,Sb as k,Ub as ye,Va as T,Vb as xe,Wb as De,Xd as Oe,ac as S,ae as J,be as $e,dc as G,ee as U,fb as _,fc as K,fe as X,g as oe,gb as A,h as ne,j as w,k as d,ka as E,l as re,la as $,m as b,n as M,na as L,ob as _e,pa as p,rc as Me,rd as Te,s as ce,sd as we,te as V,ub as z,wb as W,xb as I,z as le}from"./chunk-PZ6I6W3H.js";var ze={url:"",deserializer:a=>JSON.parse(a.data),serializer:a=>JSON.stringify(a)},He="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",j=class a extends re{constructor(o,e){if(super(),this._socket=null,o instanceof w)this.destination=e,this.source=o;else{let t=this._config=Object.assign({},ze);if(this._output=new d,typeof o=="string")t.url=o;else for(let i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);if(!t.WebSocketCtor&&WebSocket)t.WebSocketCtor=WebSocket;else if(!t.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new M}}lift(o){let e=new a(this._config,this.destination);return e.operator=o,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new M),this._output=new d}multiplex(o,e,t){let i=this;return new w(s=>{try{i.next(o())}catch(r){s.error(r)}let n=i.subscribe({next:r=>{try{t(r)&&s.next(r)}catch(c){s.error(c)}},error:r=>s.error(r),complete:()=>s.complete()});return()=>{try{i.next(e())}catch(r){s.error(r)}n.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:o,protocol:e,url:t,binaryType:i}=this._config,s=this._output,n=null;try{n=e?new o(t,e):new o(t),this._socket=n,i&&(this._socket.binaryType=i)}catch(c){s.error(c);return}let r=new oe(()=>{this._socket=null,n&&n.readyState===1&&n.close()});n.onopen=c=>{let{_socket:l}=this;if(!l){n.close(),this._resetState();return}let{openObserver:f}=this._config;f&&f.next(c);let g=this.destination;this.destination=ne.create(h=>{if(n.readyState===1)try{let{serializer:m}=this._config;n.send(m(h))}catch(m){this.destination.error(m)}},h=>{let{closingObserver:m}=this._config;m&&m.next(void 0),h&&h.code?n.close(h.code,h.reason):s.error(new TypeError(He)),this._resetState()},()=>{let{closingObserver:h}=this._config;h&&h.next(void 0),n.close(),this._resetState()}),g&&g instanceof M&&r.add(g.subscribe(this.destination))},n.onerror=c=>{this._resetState(),s.error(c)},n.onclose=c=>{n===this._socket&&this._resetState();let{closeObserver:l}=this._config;l&&l.next(c),c.wasClean?s.complete():s.error(c)},n.onmessage=c=>{try{let{deserializer:l}=this._config;s.next(l(c))}catch(l){s.error(l)}}}_subscribe(o){let{source:e}=this;return e?e.subscribe(o):(this._socket||this._connectSocket(),this._output.subscribe(o),o.add(()=>{let{_socket:t}=this;this._output.observers.length===0&&(t&&(t.readyState===1||t.readyState===0)&&t.close(),this._resetState())}),o)}unsubscribe(){let{_socket:o}=this;o&&(o.readyState===1||o.readyState===0)&&o.close(),this._resetState(),super.unsubscribe()}};function ee(a){return new j(a)}var Ne=(()=>{class a{_destroyRef=p(R);_skRequests$=new d;_skNotificationsMsg$=new d;_skValue$=new d;_skMetadata$=new d;_vesselSelfUrn$=new d;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new b(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new d;socketWSOpenEvent$=new d;authToken=null;server=p(We);auth=p(Ie);connectionStateMachine=p(Ae);zones=p(fe);FLATTEN_CONFIG={maxDepth:3,maxObjectSize:20,enableFlattening:!0};DO_NOT_FLATTEN_PATHS=["displays."];constructor(){this.connectionStateMachine.setWebSocketRetryCallback(()=>{console.log("[Delta Service] Executing WebSocket retry via callback"),this.retryWebSocketConnection()}),this.server.serverServiceEndpoint$.pipe(u(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(u(this._destroyRef)).subscribe(e=>{switch(e){case v.WebSocketConnecting:this.handleWebSocketConnecting();break;case v.Connected:break;case v.Disconnected:case v.WebSocketError:case v.PermanentFailure:this.handleDisconnection();break}}),this.auth.authToken$.pipe(u(this._destroyRef)).subscribe(e=>{this.authToken!=e&&(this.authToken=e,this.socketWS$&&this.connectionStateMachine.isFullyConnected()&&(this.closeWS("Token changed"),this.connectionStateMachine.startWebSocketConnection()))}),this.socketWSOpenEvent$.pipe(u(this._destroyRef)).subscribe(()=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint),this.connectionStateMachine.onWebSocketConnected()}),this.socketWSCloseEvent$.pipe(u(this._destroyRef)).subscribe(e=>{e.wasClean?(console.log("[Delta Service] WebSocket closed cleanly"),this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,this.connectionStateMachine.onWebSocketError("WebSocket connection lost")),this.streamEndpoint$.next(this.streamEndpoint)}),he(document,"visibilitychange").pipe(u(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(u(this._destroyRef)).subscribe({next:t=>this.processWebsocketMessage(t),error:t=>{console.error("[Delta Service] WebSocket error:",t)}})})}retryWebSocketConnection(){if(console.log("[Delta Service] Retrying WebSocket connection"),!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available for retry"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Retrying connection"),this.connectWS("WebSocket retry attempt")}handleWebSocketConnecting(){if(!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Starting new connection"),this.connectWS("ConnectionStateMachine request")}handleDisconnection(){this.socketWS$&&this.closeWS("ConnectionStateMachine disconnection"),this.streamEndpoint.message="Not connected",this.streamEndpoint.operation=0,this.streamEndpoint$.next(this.streamEndpoint)}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,ee({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?this.socketWS$.next(e):console.log("[Delta Service] No WebSocket present to send message - dropping message")}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,t){e.forEach(i=>{i.meta!==void 0&&i.meta.forEach(s=>this.parseSkMeta(s,t)),i.values!==void 0&&i.values.forEach(s=>{if(s.path.startsWith("notifications."))this._skNotificationsMsg$.next(s);else if(typeof s.value=="object"&&s.value!==null)if(this.DO_NOT_FLATTEN_PATHS.some(n=>s.path.includes(n))){let n={context:t,path:s.path,source:i.$source,timestamp:i.timestamp,value:s.value};this._skValue$.next(n)}else this.FLATTEN_CONFIG.enableFlattening&&this.canFlattenCompletely(s.value,this.FLATTEN_CONFIG.maxDepth,this.FLATTEN_CONFIG.maxObjectSize)?this.flattenObjectValue(s.value,s.path).forEach(r=>{let c={context:t,path:r.path,source:i.$source,timestamp:i.timestamp,value:r.value};this._skValue$.next(c)}):Object.keys(s.value).forEach(n=>{let r={context:t,path:`${s.path}.${n}`,source:i.$source,timestamp:i.timestamp,value:s.value[n]};this._skValue$.next(r)});else{let n={context:t,path:s.path,source:i.$source,timestamp:i.timestamp,value:s.value};this._skValue$.next(n)}})})}canFlattenCompletely(e,t,i,s=0){if(s>=t)return!1;if(typeof e!="object"||e===null)return!0;let n=Object.keys(e);if(n.length>i)return!1;for(let r of n)if(!this.canFlattenCompletely(e[r],t,i,s+1))return!1;return!0}flattenObjectValue(e,t,i=0){let s=[];if(typeof e!="object"||e===null||i>=this.FLATTEN_CONFIG.maxDepth)return[{path:t,value:e}];let n=Object.keys(e);for(let r of n){let c=t?`${t}.${r}`:r,l=this.flattenObjectValue(e[r],c,i+1);s.push(...l)}return s}parseSkMeta(e,t){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(i=>{this._skMetadata$.next({context:t,path:`${e.path}.${i}`,meta:e.value.properties[i]})}):this._skMetadata$.next({context:t,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.connectionStateMachine.isFullyConnected()?console.log(`[Delta Service] ${e}: Connection is active.`):this.connectionStateMachine.isHTTPConnected()&&this.connectionStateMachine.currentState!==v.WebSocketRetrying?(console.log(`[Delta Service] ${e}: WebSocket disconnected, requesting reconnection...`),this.connectionStateMachine.startWebSocketConnection()):console.log(`[Delta Service] ${e}: HTTP not connected, cannot start WebSocket`)}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete()}static \u0275fac=function(t){return new(t||a)};static \u0275prov=E({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var x=(function(a){return a.Normal="normal",a.Nominal="nominal",a.Alert="alert",a.Warn="warn",a.Alarm="alarm",a.Emergency="emergency",a})(x||{});var Ye=(function(a){return a.Visual="visual",a.Sound="sound",a})(Ye||{});var qe="self",Fe=a=>isFinite(+(a instanceof Date?a:new Date(a)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(a):!1,Pe=a=>{if(a)return a==="RFC 3339 (UTC)"?"Date":"number"},Pt=(()=>{class a{delta=p(Ne);_destroyRef=p(R);_deltaUpdatesCounter=0;_deltaUpdatesSubject=new M(10);_isSkDataFullTreeActive=!1;_skDataSubject$=new b([]);_skDataEmitTimer=null;_skDataEmitIntervalMs=200;_dataServiceMeta=[];_dataServiceMetaByPath=new Map;_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new b([]);_skNotificationMsg$=new d;_skNotificationMeta$=new d;_isReset=new d;_pathUpdates$=new d;_selfUrn="self";_skData=new Map;_skDataArrayCache=[];_skDataIndexByPath=new Map;_pathRegister=[];_pathRegisterByPath=new Map;constructor(){pe(1e3).pipe(u(this._destroyRef)).subscribe(()=>{let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}),this.delta.subscribeDataPathsUpdates().pipe(u(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(u(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(u(this._destroyRef)).subscribe(e=>{let t=e.path.replace("notifications.","self."),i=this._skData.get(t);if(i&&i.state!==e.value.state){i.state=e.value.state;let s=this._pathRegisterByPath.get(t);if(s?.length)for(let n of s)n._pathState$.next(i.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(u(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=new Map,this._skDataArrayCache=[],this._skDataIndexByPath.clear(),this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let t=this._pathRegister.findIndex(i=>i.path===e);if(t!==-1){let i=this._pathRegister[t];i.combinedSub?.unsubscribe(),i._pathData$?.complete(),i._pathState$?.complete(),i.pathDataUpdate$?.complete(),i.pathMeta$?.complete(),this._pathRegister.splice(t,1);let s=this._pathRegisterByPath.get(e);if(s){let n=s.filter(r=>r!==i);n.length?this._pathRegisterByPath.set(e,n):this._pathRegisterByPath.delete(e)}}}subscribePath(e,t){let i=this._pathRegisterByPath.get(e),s=i?.find(D=>D.path===e&&D.source===t);if(s)return s.pathDataUpdate$;let n=null,r=null,c=null,l=x.Normal,f={data:{value:null,timestamp:null},state:l},g=null,h=this._skData.get(e);h&&(n=t==="default"?h.pathValue:h.sources?.[t]?.sourceValue??null,r=t==="default"?h.pathTimestamp:h.sources?.[t]?.sourceTimestamp??null,c=r?new Date(r):null,f={data:{value:n,timestamp:c},state:h.state||l},l=h.state||l,g=h.meta||null);let m={path:e,source:t,_pathData$:new b(f.data),_pathState$:new b(f.state),pathDataUpdate$:new b(f),pathMeta$:new b(g?O(g):null)},Be=de([m._pathData$,m._pathState$]).pipe(le(([D,Le])=>({data:D,state:Le})));return m.combinedSub=Be.subscribe(D=>m.pathDataUpdate$.next(D)),this._pathRegister.push(m),i?i.push(m):this._pathRegisterByPath.set(e,[m]),m.pathDataUpdate$}subscribePathTree(e,t="default"){let i=this.normalizePathPrefix(e);return new w(s=>{for(let r of this._skData.values())r.path.startsWith(i)&&s.next({path:r.path,update:this.buildPathUpdate(r,t)});let n=this._pathUpdates$.pipe(me(r=>r.fullPath.startsWith(i))).subscribe(r=>{let c=this._skData.get(r.fullPath);c&&s.next({path:c.path,update:this.buildPathUpdate(c,t)})});return()=>n.unsubscribe()}).pipe(u(this._destroyRef))}updatePathData(e){this._deltaUpdatesCounter++;let t=this.setPathContext(e.context,e.path),i=this._skData.get(t);if(i)i.defaultSource===void 0&&(i.defaultSource=e.source),i.type===void 0&&e.value!==null&&(i.type=typeof e.value,i.type==="string"&&Fe(e.value)&&(i.type="Date")),i.pathValue=e.value,i.pathTimestamp=e.timestamp,i.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let n=e.value===null?void 0:typeof e.value;n==="string"&&Fe(e.value)&&(n="Date"),i={path:t,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:n,state:x.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.set(t,i)}let s=this._pathRegisterByPath.get(t)??[];if(s.length){let n={value:i.pathValue,timestamp:i.pathTimestamp?new Date(i.pathTimestamp):null},r=s.find(l=>l.source==="default");r&&r._pathData$.next(n);let c=s.find(l=>l.source===e.source);c&&c._pathData$.next(n)}this._isSkDataFullTreeActive&&(this.upsertSkDataCache(i),this.scheduleSkDataFullTreeEmit()),this._pathUpdates$.next({fullPath:t,update:e})}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let t=this.setPathContext(e.context,e.path),i=this._skData.get(t);i?(i.type==="object"&&e.meta.units&&(i.type=Pe(e.meta.units)),i.meta=Re({},i.meta,e.meta)):(i={path:t,pathValue:void 0,pathTimestamp:void 0,type:Pe(e.meta.units),state:x.Normal,defaultSource:void 0,sources:{},meta:e.meta?O(e.meta):null},this._skData.set(t,i),this._isSkDataFullTreeActive&&(this.upsertSkDataCache(i),this.scheduleSkDataFullTreeEmit()));let s=this._pathRegisterByPath.get(t);if(s?.length)for(let n of s)n.pathMeta$.next(i.meta?O(i.meta):null);this._isSkMetaFullTreeActive&&(this._dataServiceMetaByPath.set(t,{path:t,meta:i.meta}),this._dataServiceMeta=Array.from(this._dataServiceMetaByPath.values()),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){this._isSkMetaFullTreeActive=!0,this._dataServiceMetaByPath.clear();for(let e of this.getSkDataArray())e.meta!==void 0&&e.path.startsWith("self.")&&this._dataServiceMetaByPath.set(e.path,{path:e.path,meta:e.meta});return this._dataServiceMeta=Array.from(this._dataServiceMetaByPath.values()),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next([]),this._dataServiceMeta=[],this._dataServiceMetaByPath.clear()}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this.refreshSkDataCache(),this.emitSkDataFullTree(),this._skDataSubject$}getSkDataArray(){return this._isSkDataFullTreeActive?this._skDataArrayCache:Array.from(this._skData.values())}observePathUpdates(){return this._pathUpdates$.asObservable()}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1,this._skDataEmitTimer&&(clearTimeout(this._skDataEmitTimer),this._skDataEmitTimer=null),this._skDataArrayCache=[],this._skDataIndexByPath.clear()}scheduleSkDataFullTreeEmit(){!this._isSkDataFullTreeActive||this._skDataEmitTimer||(this._skDataEmitTimer=setTimeout(()=>{this._skDataEmitTimer=null,this.emitSkDataFullTree()},this._skDataEmitIntervalMs))}emitSkDataFullTree(){this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skDataArrayCache)}refreshSkDataCache(){this._skDataArrayCache=Array.from(this._skData.values()),this._skDataIndexByPath.clear(),this._skDataArrayCache.forEach((e,t)=>this._skDataIndexByPath.set(e.path,t))}upsertSkDataCache(e){let t=this._skDataIndexByPath.get(e.path);t===void 0?(this._skDataIndexByPath.set(e.path,this._skDataArrayCache.length),this._skDataArrayCache.push(e)):this._skDataArrayCache[t]=e}setSelfUrn(e){e!==""&&e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,t){return e!==this._selfUrn?`${e}.${t}`:`${qe}.${t}`}normalizePathPrefix(e){let t=e?.trim()??"";return(t.endsWith(".*")||t.endsWith(":*")||t.endsWith("*"))&&(t=t.slice(0,-1)),t&&!t.endsWith(".")&&!t.endsWith(":")&&(t=`${t}.`),t}buildPathUpdate(e,t){let i=t==="default",s=i?e.pathValue:e.sources?.[t]?.sourceValue??null,n=i?e.pathTimestamp:e.sources?.[t]?.sourceTimestamp??null;return{data:{value:s,timestamp:n?new Date(n):null},state:e.state||x.Normal}}getPathsByType(e,t){return this.getSkDataArray().filter(i=>i.type===e&&(!t||i.path.startsWith("self"))).map(i=>i.path)}getPathsAndMetaByType(e,t=!1,i=!1,s=!0){return this.getSkDataArray().filter(n=>{let c=["string","number","boolean","object","undefined","function","symbol","bigint","Date"].includes(e)?n.type===e:n.meta?.type===e,l=!s||n.path.startsWith("self"),f=t===!0?n.meta?.supportsPut===!0:!0,g=i===!0?Array.isArray(n.meta?.zones)&&n.meta.zones.length>0:!0;return c&&l&&f&&g}).map(n=>({path:n.path,meta:n.meta}))}getPathObject(e){return O(this._skData.get(e))||null}getPathUnitType(e){return this._skData.get(e)?.meta?.units||null}timeoutPathObservable(e,t){let i=this._pathRegister.find(s=>s.path==e);if(i){let s;["string","Date","number","multiple"].includes(t)&&(s={data:{value:null,timestamp:null},state:x.Normal}),i.pathDataUpdate$.next(s)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegisterByPath.get(e)?.[0]?.pathMeta$.asObservable()||ce(null)}getPathMeta(e){return this._skData.get(e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._skDataEmitTimer&&(clearTimeout(this._skDataEmitTimer),this._skDataEmitTimer=null),this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete(),this._pathUpdates$?.complete()}static \u0275fac=function(t){return new(t||a)};static \u0275prov=E({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var Ue=(()=>{class a{_animationsDisabled=Oe();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=_({type:a,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,i){t&2&&S("mat-pseudo-checkbox-indeterminate",i.state==="indeterminate")("mat-pseudo-checkbox-checked",i.state==="checked")("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal",i.appearance==="minimal")("mat-pseudo-checkbox-full",i.appearance==="full")("_mat-animation-noopable",i._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,i){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return a})();var Qe=["*",[["mat-option"],["ng-container"]]],Ze=["*","mat-option, ng-container"],Je=["text"],Xe=[[["mat-icon"]],"*"],et=["mat-icon","*"];function tt(a,o){if(a&1&&F(0,"mat-pseudo-checkbox",1),a&2){let e=P();N("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function it(a,o){if(a&1&&F(0,"mat-pseudo-checkbox",3),a&2){let e=P();N("disabled",e.disabled)}}function at(a,o){if(a&1&&(H(0,"span",4),G(1),Y()),a&2){let e=P();T(),K("(",e.group.label,")")}}var te=new L("MAT_OPTION_PARENT_COMPONENT"),ie=new L("MatOptgroup"),st=(()=>{class a{label;disabled=!1;_labelId=p(Z).getId("mat-optgroup-label-");_inert;constructor(){let e=p(te,{optional:!0});this._inert=e?.inertGroups??!1}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=_({type:a,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-mdc-optgroup"],hostVars:3,hostBindings:function(t,i){t&2&&z("role",i._inert?null:"group")("aria-disabled",i._inert?null:i.disabled.toString())("aria-labelledby",i._inert?null:i._labelId)},inputs:{label:"label",disabled:[2,"disabled","disabled",Q]},exportAs:["matOptgroup"],features:[Me([{provide:ie,useExisting:a}])],ngContentSelectors:Ze,decls:5,vars:4,consts:[["role","presentation",1,"mat-mdc-optgroup-label",3,"id"],[1,"mdc-list-item__primary-text"]],template:function(t,i){t&1&&(C(Qe),ke(0,"span",0)(1,"span",1),G(2),k(3),Se()(),k(4,1)),t&2&&(S("mdc-list-item--disabled",i.disabled),q("id",i._labelId),T(2),K("",i.label," "))},styles:[`.mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-optgroup-label-text-font, var(--mat-sys-title-small-font));line-height:var(--mat-optgroup-label-text-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-optgroup-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-optgroup-label-text-tracking, var(--mat-sys-title-small-tracking));font-weight:var(--mat-optgroup-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal;color:inherit}
|
|
3
3
|
`],encapsulation:2,changeDetection:0})}return a})(),B=class{source;isUserInput;constructor(o,e=!1){this.source=o,this.isUserInput=e}},ae=(()=>{class a{_element=p(be);_changeDetectorRef=p(Ee);_parent=p(te,{optional:!0});group=p(ie,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=p(Z).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=ge(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new ue;_text;_stateChanges=new d;constructor(){let e=p(Te);e.load($e),e.load(we),this._signalDisableRipple=!!this._parent&&_e(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,t){let i=this._getHostElement();typeof i.focus=="function"&&i.focus(t)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!Ce(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new B(this,e))}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=_({type:a,selectors:[["mat-option"]],viewQuery:function(t,i){if(t&1&&ye(Je,7),t&2){let s;xe(s=De())&&(i._text=s.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,i){t&1&&ve("click",function(){return i._selectViaInteraction()})("keydown",function(n){return i._handleKeydown(n)}),t&2&&(q("id",i.id),z("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),S("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",Q]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:et,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,i){t&1&&(C(Xe),W(0,tt,1,2,"mat-pseudo-checkbox",1),k(1),H(2,"span",2,0),k(4,1),Y(),W(5,it,1,1,"mat-pseudo-checkbox",3),W(6,at,2,1,"span",4),F(7,"div",5)),t&2&&(I(i.multiple?0:-1),T(5),I(!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator?5:-1),T(),I(i.group&&i.group._inert?6:-1),T(),N("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[Ue,J],styles:[`.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var(--mat-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""}
|
|
4
4
|
`],encapsulation:2,changeDetection:0})}return a})();function ot(a,o,e){if(e.length){let t=o.toArray(),i=e.toArray(),s=0;for(let n=0;n<a+1;n++)t[n].group&&t[n].group===i[s]&&s++;return s}return 0}function nt(a,o,e,t){return a<e?a:a+o>e+t?Math.max(0,a-t+o):e}var se=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new d;constructor(o=!1,e,t=!0,i){this._multiple=o,this._emitChanges=t,this.compareWith=i,e&&e.length&&(o?e.forEach(s=>this._markSelected(s)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...o){this._verifyValueAssignment(o),o.forEach(t=>this._markSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...o){this._verifyValueAssignment(o),o.forEach(t=>this._unmarkSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...o){this._verifyValueAssignment(o);let e=this.selected,t=new Set(o.map(s=>this._getConcreteValue(s)));o.forEach(s=>this._markSelected(s)),e.filter(s=>!t.has(this._getConcreteValue(s,t))).forEach(s=>this._unmarkSelected(s));let i=this._hasQueuedChanges();return this._emitChangeEvent(),i}toggle(o){return this.isSelected(o)?this.deselect(o):this.select(o)}clear(o=!0){this._unmarkAll();let e=this._hasQueuedChanges();return o&&this._emitChangeEvent(),e}isSelected(o){return this._selection.has(this._getConcreteValue(o))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(o){this._multiple&&this.selected&&this._selected.sort(o)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(o){o=this._getConcreteValue(o),this.isSelected(o)||(this._multiple||this._unmarkAll(),this.isSelected(o)||this._selection.add(o),this._emitChanges&&this._selectedToEmit.push(o))}_unmarkSelected(o){o=this._getConcreteValue(o),this.isSelected(o)&&(this._selection.delete(o),this._emitChanges&&this._deselectedToEmit.push(o))}_unmarkAll(){this.isEmpty()||this._selection.forEach(o=>this._unmarkSelected(o))}_verifyValueAssignment(o){o.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(o,e){if(this.compareWith){e=e??this._selection;for(let t of e)if(this.compareWith(o,t))return t;return o}else return o}};var rt=(()=>{class a{_listeners=[];notify(e,t){for(let i of this._listeners)i(e,t)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(t=>e!==t)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(t){return new(t||a)};static \u0275prov=E({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var Ve=class{applyChanges(o,e,t,i,s){o.forEachOperation((n,r,c)=>{let l,f;if(n.previousIndex==null){let g=t(n,r,c);l=e.createEmbeddedView(g.templateRef,g.context,g.index),f=V.INSERTED}else c==null?(e.remove(r),f=V.REMOVED):(l=e.get(r),e.move(l,c),f=V.MOVED);s&&s({context:l?.context,operation:f,record:n})})}detach(){}};var je=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=A({type:a});static \u0275inj=$({imports:[U]})}return a})();var ct=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=A({type:a});static \u0275inj=$({imports:[X,je,ae,U]})}return a})();var lt=["mat-internal-form-field",""],dt=["*"],xi=(()=>{class a{labelPosition="after";static \u0275fac=function(t){return new(t||a)};static \u0275cmp=_({type:a,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(t,i){t&2&&S("mdc-form-field--align-end",i.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:lt,ngContentSelectors:dt,decls:1,vars:0,template:function(t,i){t&1&&(C(),k(0))},styles:[`.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as v}from"./chunk-
|
|
1
|
+
import{e as v}from"./chunk-WJFXI5PQ.js";import{$b as p,Cb as m,Db as e,Eb as t,Ec as s,Fb as g,Ob as l,Re as x,Se as b,Va as r,ce as u,dc as o,ec as h,fb as c,je as f,pa as d}from"./chunk-PZ6I6W3H.js";var O=(()=>{class a{pageTitle=s.required();svgIconId=s.required();_router=d(v);backPage(){this._router.navigate(["/settings"])}closePage(){this._router.navigate(["/dashboard"])}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=c({type:a,selectors:[["page-header"]],inputs:{pageTitle:[1,"pageTitle"],svgIconId:[1,"svgIconId"]},decls:11,vars:6,consts:[[1,"page-icon-container"],["aria-hidden","false",3,"svgIcon"],[1,"page-title"],[1,"dialog-close-icon"],["mat-icon-button","",3,"click"]],template:function(n,i){n&1&&(e(0,"div",0),g(1,"mat-icon",1),t(),e(2,"h6",2),o(3),t(),e(4,"div",3)(5,"button",4),l("click",function(){return i.backPage()}),e(6,"mat-icon"),o(7,"arrow_back_ios"),t()(),e(8,"button",4),l("click",function(){return i.closePage()}),e(9,"mat-icon"),o(10,"close"),t()()()),n&2&&(r(),p("width",24,"px")("height",24,"px"),m("svgIcon",i.svgIconId()),r(2),h(i.pageTitle()))},dependencies:[f,u,b,x],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-direction:row;flex-wrap:nowrap}.page-icon-container[_ngcontent-%COMP%]{width:100px;height:max-content;padding-left:15px;padding-top:6px}.page-title[_ngcontent-%COMP%]{margin-block-start:0px;margin-block-end:0px;padding:18px 0 13px;color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, .87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, .03125em))}.dialog-close-icon[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px;padding-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return a})();export{O as a};
|