@mxtommy/kip 3.2.0 → 3.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/public/3rdpartylicenses.txt +26 -26
  3. package/public/assets/help-docs/zones.md +59 -9
  4. package/public/chunk-2HWSXOJH.js +7 -0
  5. package/public/chunk-4SES32DD.js +1 -0
  6. package/public/{chunk-R3627Y4G.js → chunk-6UG4Q6L3.js} +1 -1
  7. package/public/{chunk-JZUG3W7P.js → chunk-74Q7ESW3.js} +1 -1
  8. package/public/{chunk-C3SKHG6H.js → chunk-7JU2L4ZQ.js} +1 -1
  9. package/public/{chunk-UARC5JSL.js → chunk-BOSMFL6Q.js} +1 -1
  10. package/public/chunk-BX746I2R.js +2 -0
  11. package/public/{chunk-MR7RUNKP.js → chunk-DHPOFP3B.js} +1 -1
  12. package/public/{chunk-WVCNHJ5A.js → chunk-EALAVNM5.js} +1 -1
  13. package/public/{chunk-7TWI6ZJI.js → chunk-FT5BOMBZ.js} +1 -1
  14. package/public/{chunk-WE4P4WBD.js → chunk-GJTSOHIS.js} +1 -1
  15. package/public/{chunk-SHKAX4XV.js → chunk-GSG3ZXVY.js} +1 -1
  16. package/public/chunk-HG6A25MG.js +6 -0
  17. package/public/{chunk-CD375FDG.js → chunk-I6I4BVGS.js} +1 -1
  18. package/public/{chunk-Y7X77HSW.js → chunk-JZ455OYD.js} +14 -14
  19. package/public/{chunk-I4I2PP4V.js → chunk-L52GBBZB.js} +1 -1
  20. package/public/chunk-MDIAFVAX.js +8 -0
  21. package/public/chunk-OHBCNLIU.js +1 -0
  22. package/public/{chunk-OTD7HT32.js → chunk-PZFXKRRN.js} +1 -1
  23. package/public/chunk-R4UCKYVW.js +2 -0
  24. package/public/{chunk-2QUOTZ6A.js → chunk-RRAVS5O5.js} +1 -1
  25. package/public/{chunk-QMIJ5LO6.js → chunk-SD22YSTB.js} +1 -1
  26. package/public/{chunk-MNZECCLZ.js → chunk-U7Y5P5XP.js} +6 -6
  27. package/public/{chunk-JSBINEAH.js → chunk-UNIQOPO4.js} +1 -1
  28. package/public/chunk-UXHQY4AJ.js +3 -0
  29. package/public/{chunk-36TH3DJS.js → chunk-ZA2YAX23.js} +1 -1
  30. package/public/index.html +1 -1
  31. package/public/main-5V5K76CH.js +234 -0
  32. package/public/chunk-6QHCHGTT.js +0 -3
  33. package/public/chunk-AB7BX4CL.js +0 -2
  34. package/public/chunk-ACMPUT6Z.js +0 -6
  35. package/public/chunk-AYIHSTCC.js +0 -8
  36. package/public/chunk-EAJKXTFC.js +0 -1
  37. package/public/chunk-EQ5CPWIU.js +0 -7
  38. package/public/chunk-EQAHQINY.js +0 -1
  39. package/public/chunk-IHDZ7I6J.js +0 -2
  40. package/public/main-QTKHCBQH.js +0 -234
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxtommy/kip",
3
- "version": "3.2.0",
3
+ "version": "3.3.0-beta.2",
4
4
  "description": "An advanced and versatile marine instrumentation package to display Signal K data.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -453,32 +453,6 @@ The above copyright notice and this permission notice shall be included in all c
453
453
 
454
454
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
455
455
 
456
- --------------------------------------------------------------------------------
457
- Package: @angular/router
458
- License: "MIT"
459
-
460
- The MIT License
461
-
462
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
463
-
464
- Permission is hereby granted, free of charge, to any person obtaining a copy
465
- of this software and associated documentation files (the "Software"), to deal
466
- in the Software without restriction, including without limitation the rights
467
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
468
- copies of the Software, and to permit persons to whom the Software is
469
- furnished to do so, subject to the following conditions:
470
-
471
- The above copyright notice and this permission notice shall be included in
472
- all copies or substantial portions of the Software.
473
-
474
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
475
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
476
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
477
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
478
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
479
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
480
- THE SOFTWARE.
481
-
482
456
  --------------------------------------------------------------------------------
483
457
  Package: js-quantities
484
458
  License: "MIT"
@@ -505,6 +479,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
505
479
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
506
480
  SOFTWARE.
507
481
 
482
+ --------------------------------------------------------------------------------
483
+ Package: @angular/router
484
+ License: "MIT"
485
+
486
+ The MIT License
487
+
488
+ Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
489
+
490
+ Permission is hereby granted, free of charge, to any person obtaining a copy
491
+ of this software and associated documentation files (the "Software"), to deal
492
+ in the Software without restriction, including without limitation the rights
493
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
494
+ copies of the Software, and to permit persons to whom the Software is
495
+ furnished to do so, subject to the following conditions:
496
+
497
+ The above copyright notice and this permission notice shall be included in
498
+ all copies or substantial portions of the Software.
499
+
500
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
501
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
502
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
503
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
504
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
505
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
506
+ THE SOFTWARE.
507
+
508
508
  --------------------------------------------------------------------------------
509
509
  Package: compare-versions
510
510
  License: "MIT"
@@ -1,15 +1,65 @@
1
1
  # Harness the Power of Data State Notifications
2
- Stay informed about the state of data emitted by Signal K. For example, Signal K can mark data states so that when depth or temperature sensors reach certain levels, KIP can visually or audibly alert the user. A depth of 3 meters or less might be flagged as alarming, prompting KIP to enhance the data presentation with additional visual or audio cues. This feature combines **Zones Configuration** and **Notification Methods** in Signal K.
3
2
 
4
- Zones and notifications are defined as metadata. If you have internet access, you can learn more about this topic at [Signal K Metadata](https://signalk.org/specification/1.7.0/doc/data_model_metadata.html). To configure Signal K's metadata, access the [Data Browser server page](/admin/#/databrowser) and toggle the **Meta Data** switch. You need to configure or add **methods** and **zones** for each path you want to monitor.
3
+ Stay informed about your vessel’s data with Signal K’s state notifications. For example, Signal K can flag certain sensor readings—such as depth or temperature—when they reach critical levels. KIP can then visually or audibly alert you. For instance, if the depth drops to 3 meters or less, KIP can highlight this with a warning sound or visual cue. This powerful feature combines **Zones Configuration** and **Notification Methods** in Signal K.
5
4
 
6
- IMPORTANT: Zone range values use base units. For example, the speed unit for Apparent Wind Speed (`environment.wind.speedApparent`) is in meters per second (m/s). Define the zone ranges using each path's base unit. KIP will convert the zones ranges and values automatically based on your widgets unit setting.
5
+ ---
7
6
 
8
- You can consult path and unit specifications using the [Keys Reference (Vessel)](https://signalk.org/specification/1.7.0/doc/vesselsBranch.html) and [Keys Reference (Other)](https://signalk.org/specification/1.7.0/doc/otherBranches.html).
7
+ ## Zones & Notification Configuration
9
8
 
10
- ## Notification Configuration
11
- You can use KIP's **Settings > Notifications** tab to filter and override notification states, as well as configure audio prompts to suit your needs.
9
+ **Zones** are value ranges defined as metadata for each data path. Learn more at the [Signal K Metadata documentation](https://signalk.org/specification/1.7.0/doc/data_model_metadata.html).
10
+ To configure metadata in Signal K, visit the [Data Browser server page](/admin/#/databrowser) and enable the **Meta Data** switch. Here, you can add or edit **methods** and **zones** for any path you want to monitor.
12
11
 
13
- ## Displaying Zones and Notifications Information
14
- - **Notifications Menu**: This menu lists all active notifications along with their details, such as the path, severity level, and message content. From this menu, notifications can be silenced or resolved. The Notifications menu is hidden on the right side by default. When notifications are received, a large button will appear in the lower-right corner. Tapping or clicking this button will open the Notifications Menu. You can also access the menu at any time by swiping right.
15
- - **Individual Widgets**: Widgets such as **Numeric**, **Linear**, **Radial**, and **Steel Style** offer tailored visual representations of notifications. These widgets highlight relevant data ranges and provide an optimal user experience by integrating notifications into their design.
12
+ > **Note:** Zone values use base units (e.g., wind speed in meters per second). Define your zone ranges using the base unit for each path. KIP will automatically convert and display these values according to your widget’s unit settings.
13
+
14
+ For more details on path units, see the [Keys Reference (Vessel)](https://signalk.org/specification/1.7.0/doc/vesselsBranch.html) and [Keys Reference (Other)](https://signalk.org/specification/1.7.0/doc/otherBranches.html).
15
+
16
+ As path values move between zone ranges, Signal K generates a notification sent to KIP. Each notification includes a state (severity), optional presentation methods (visual and/or sound), and an optional message.
17
+
18
+ ---
19
+
20
+ ### Zone State and Method Guidance
21
+
22
+ - The **Nominal** and **Emergency** zones are special-purpose zones and should not be used.
23
+ - You do **not** need to configure a **Normal** zone; it is the default when no other zone matches.
24
+ - KIP displays a notification in the Notifications menu for all zone states that include the **visual** method, except for the **Normal** and **Nominal** zones. Excluding the **visual** method for a zone does not prevent supporting widgets from displaying zones. This can be achieved by configuring individual widgets to ignore zones settings.
25
+ - KIP emits audio prompts for all zone states that include the **sound** method, except for the **Normal** and **Nominal** zones.
26
+ - KIP uses predefined, state specific sound files.
27
+ - You can configure KIP to globally ignore audio prompts in **Settings > Notifications**; this applies globally to all notifications and paths.
28
+
29
+ **Tips:**
30
+ 1. You don’t need zones for every path.
31
+ 2. You don’t need to configure every zone for a given path. Only configure what is really needed. For example, if all you want is to be alerted at 20% State Of Charge, just add one zone with the Alarm state and method. No need for Warn and Alert zones in this case.
32
+ 3. Don't enable the **visual** method if you don't want a zone state in the Notifications menu.
33
+ 4. Keep your zone setup simple—too many Notifications can become overwhelming.
34
+
35
+ ---
36
+
37
+ ### Taking Action on Notifications
38
+
39
+ You can **Silence** or **Resolve** notifications.
40
+ - Most notifications should resolve automatically when the underlying data returns to a normal range. Exceptions to this rule are the Emergencies such as MOB, Fire, etc. which requires manual resolution.
41
+ - For example, if a temperature alert is raised, take action to lower the temperature and wait for the sensor to report a normal value. You can **Silence** a Notification if needed. Silencing does not revolve the Notification.
42
+ - Manually resolving a notification tells Signal K to treat the current value as **Normal** until a new value is received. **Normal** zones method have no visual and sound methods defined.
43
+
44
+ **Important:**
45
+ - Signal K and KIP do **not** persist data through power cycles. If a device is off when Signal K starts, no value or notification will be present until then device is powered on and it sends data.
46
+ - If you turn off a device, then resolve its last notification, it will remain resolved until the device is powered back on and sends new data.
47
+ - Different devices send data at different intervals—some multiple times per second, others as infrequently as once per day. Check your device or plugin documentation for details. Once a notification is silenced or resolved, it will stay in this state until a new value is received and evaluated.
48
+
49
+ ---
50
+
51
+ ## Displaying Zones and Notifications
52
+
53
+ - **Notifications Menu:**
54
+ The Notifications Menu lists all active notifications, including details such as path, severity, and message. You can silence or resolve notifications directly from this menu. By default, the menu is hidden; when a notification arrives, a prominent button appears in the lower-right corner. Tap or click this button to open the menu, or swipe right to access it at any time.
55
+
56
+ - **Individual Widgets:**
57
+ Widgets such as **Numeric**, **Linear**, **Radial**, and **Steel Style** visually highlight relevant data ranges according to their configured zones and integrate notification states into their display. You can configure each widget to ignore zones if desired.
58
+
59
+ ---
60
+
61
+ ## KIP Notification Configuration Override
62
+
63
+ In **Settings > Notifications**, you can customize which notification states are displayed and enable or disable audio prompts to suit your preferences.
64
+
65
+ > **Note:** Muting all notifications will also mute other KIP system sounds, such as those played when KIP connects to or disconnects from Signal K, not just zone-related alerts.
@@ -0,0 +1,7 @@
1
+ import{$a as zi,$b as q,$c as Jt,$e as or,A as Ti,Bc as Gi,Ca as qt,Cc as Qt,Da as Li,Db as Vi,Dc as Ki,Ea as Ui,Ec as Qi,Fa as ji,G as Ci,Gd as Ce,H as Ai,Hb as Qe,Ib as ye,J as ki,Jb as z,K as ve,Ka as Gt,L as mt,Lc as Ji,M as Di,Ma as ie,Nb as M,Oc as Te,Pa as R,Pd as er,Qd as Ae,T as Ei,Ta as re,U as Mi,Ua as $i,Ud as Yt,Va as Ge,Vc as Zi,Xc as Yi,Xd as tr,Yb as Je,Z as Oi,Zb as Se,_ as Fi,ae as ir,bf as ar,cd as Xe,da as Ii,db as Wi,dc as O,dd as Zt,f as j,fa as Ri,fe as ke,g as ft,ga as Ni,gf as nr,h as vi,ha as he,ia as Pi,ic as F,j as ue,jc as N,kc as ge,la as Ht,m as h,me as rr,n as _i,ne as De,nf as sr,o as v,oa as S,oc as Hi,oe as Xt,p as pe,pa as _e,pc as Ze,pe as Ee,qc as Ye,r as yi,ra as $,rc as oe,sc as Kt,t as ct,tc as W,u as Si,ua as d,ub as C,ud as Xi,vc as we,wc as G,x as H,xb as Bi,xc as D,y as wi,yb as Ke,yc as E,z as xe,zc as qi}from"./chunk-JZ455OYD.js";var Me=(()=>{class t{TIMEOUT_DURATION=1e4;serverServiceEndpoint$=new v({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new v(null);serverRoles=[];http=d(Ce);resetSignalK(e,i,o){return j(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection reset called with null or empty URL value");return}let a={operation:1,message:"Connecting...",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.signalKURL=e,this.serverServiceEndpoint$.next(a);let n=this.signalKURL.url;n.endsWith("signalk/")||(n+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let s=yield H(this.http.get(n,{observe:"response"}).pipe(wi(this.TIMEOUT_DURATION),mt(u=>(u.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Si(u)))));console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(s.body.server.version);let l=s.body.endpoints.v1["signalk-http"],f=s.body.endpoints.v1["signalk-ws"];i?(console.debug("[Connection Service] Proxy Mode Enabled"),a.httpServiceUrl=window.location.origin+new URL(l).pathname,a.WsServiceUrl=(window.location.protocol=="https:"?"wss://":"ws://")+window.location.host+new URL(f).pathname):(a.httpServiceUrl=l,a.WsServiceUrl=f),console.debug("[Connection Service] HTTP URI: "+a.httpServiceUrl),console.debug("[Connection Service] WebSocket URI: "+a.WsServiceUrl),a.operation=2,a.message=s.status.toString(),a.serverDescription=`${s.body.server.id} ${s.body.server.version}`}catch(s){a.operation=3,a.message=s.message,this.handleError(s)}finally{o?a.subscribeAll=!0:a.subscribeAll=!1,this.serverServiceEndpoint$.next(a)}})}handleError(e){let i=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(i),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,i,o){this.serverName=e,this.serverRoles=o,console.log(`[Connection Service] Server Name: ${e}, Version: ${i}, Roles: ${JSON.stringify(o)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Wa=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,ei=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let r=t.match(Wa);if(!r)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return r.shift(),r},lr=t=>t==="*"||t==="x"||t==="X",dr=t=>{let r=parseInt(t,10);return isNaN(r)?t:r},Ba=(t,r)=>typeof t!=typeof r?[String(t),String(r)]:[t,r],Va=(t,r)=>{if(lr(t)||lr(r))return 0;let[e,i]=Ba(dr(t),dr(r));return e>i?1:e<i?-1:0},ti=(t,r)=>{for(let e=0;e<Math.max(t.length,r.length);e++){let i=Va(t[e]||"0",r[e]||"0");if(i!==0)return i}return 0};var fr=(t,r)=>{let e=ei(t),i=ei(r),o=e.pop(),a=i.pop(),n=ti(e,i);return n!==0?n:o&&a?ti(o.split("."),a.split(".")):o||a?o?-1:1:0};var ii=(t,r,e)=>{Ha(e);let i=fr(t,r);return mr[e].includes(i)},mr={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},cr=Object.keys(mr),Ha=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(cr.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${cr.join("|")}`)};var ur=(()=>{class t{server=d(Me);http=d(Ce);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new h;patchQueue$=new h;patch=function(e){return this.http.post(e.url,e.document).pipe(Pi(i=>console.log("[Storage Service] Remote config patch request completed successfully")),mt(i=>this.handleError(i)))};constructor(){let e=this.server;e.serverServiceEndpoint$.subscribe(i=>{i.httpServiceUrl!==null&&(this.serverEndpoint=i.httpServiceUrl.substring(0,i.httpServiceUrl.length-4)+"applicationData/",console.log("[Storage Service] Service startup. AppData API set to: "+this.serverEndpoint)),i.operation===2?this.storageServiceReady$.next(!0):this.storageServiceReady$.next(!1)}),e.serverVersion$.subscribe(i=>{i&&(this.isAppDataSupported=ii(i,"1.27.0",">="))}),this.patchQueue$.pipe(Di(i=>this.patch(i))).subscribe(i=>{})}listConfigs(e){return j(this,null,function*(){let i=[];if(!this.serverEndpoint)return console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list"),null;let o=this.serverEndpoint,a=o+"global/kip/"+this.configFileVersion+"/?keys=true",n=o+"user/kip/"+this.configFileVersion+"/?keys=true";return e&&(a=o+"global/kip/"+e+"/?keys=true",n=o+"user/kip/"+e+"/?keys=true"),yield H(this.http.get(a)).then(s=>{for(let l of s)i.push({scope:"global",name:l});console.log("[Storage Service] Retrieved Global config list")}).catch(s=>{this.handleError(s)}),yield H(this.http.get(n)).then(s=>{for(let l of s)i.push({scope:"user",name:l});console.log("[Storage Service] Retrieved User config list")}).catch(s=>{this.handleError(s)}),i})}getConfig(e,i,o,a){return j(this,null,function*(){let n=null,s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i;return o&&(s=this.serverEndpoint+e+"/kip/"+o+"/"+i),yield H(this.http.get(s)).then(l=>{n=l,console.log(`[Storage Service] Retrieved config [${i}] from [${e}] scope`),a&&(this.InitConfig=l)}).catch(l=>{this.handleError(l)}),n})}setConfig(e,i,o,a){return j(this,null,function*(){let n=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i,s;return a&&(n=this.serverEndpoint+e+"/kip/"+a+"/"+i),yield H(this.http.post(n,o)).then(l=>{console.log(`[Storage Service] Saved config [${i}] to [${e}] scope`),s=l}).catch(l=>{this.handleError(l)}),s})}patchConfig(e,i,o){let a=this.serverEndpoint+"user/kip/"+this.configFileVersion,n;switch(o&&(a=this.serverEndpoint+"user/kip/"+o),e){case"IAppConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/app`,value:i}];break;case"IThemeConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:i.themeName}];break;case"IWidgetConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:i}];break;case"ILayoutConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:i}];break;case"Dashboards":n=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:i}];break;case"Array<IUnitDefaults>":n=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:i}];break;case"Array<IDatasetDef>":n=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:i}];break;case"INotificationConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:i}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let s={url:a,document:n};this.patchQueue$.next(s)}patchGlobal(e,i,o,a,n){let s=this.serverEndpoint+i+"/kip/"+this.configFileVersion;n&&(s=this.serverEndpoint+i+"/kip/"+n);let l;switch(a){case"add":l=[{op:"add",path:`/${e}`,value:o}];break;case"replace":l=[{op:"replace",path:`/${e}`,value:o}];break;case"remove":l=[{op:"remove",path:`/${e}`,value:o}];break;default:console.warn("[Storage Service] JSON Patch operation request type unknown");break}let f={url:s,document:l};this.patchQueue$.next(f)}removeItem(e,i,o){let a=this.serverEndpoint+e+"/kip/"+this.configFileVersion;o&&(a=this.serverEndpoint+e+"/kip/"+o);let n=[{op:"remove",path:`/${i}`}],s={url:a,document:n};this.patchQueue$.next(s)}clear(){}set activeConfigFileVersion(e){this.configFileVersion=e}handleError(e){throw e.status===0?console.error("[Storage Service] An error occurred:",e.error):console.error("[Storage Service] Backend returned error: ",e.message),e}get initConfig(){return this.InitConfig}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ae=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)})}};var et={disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}};var ut={Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"};var pr={configVersion:11,autoNightMode:!0,redNightMode:!1,nightModeBrightness:.27,dataSets:[],unitDefaults:ut,notificationConfig:et},hr={themeName:""};var gr={configVersion:11,kipUUID:ae.create(),signalKUrl:null,proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var ri={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,dataSets:[{uuid:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",path:"self.environment.wind.speedApparent",pathSource:"default",period:1,baseUnit:"m/s",label:"self.environment.wind.speedApparent, Source: default, Scale: minute, Period: 1",timeScaleFormat:"minute"}],unitDefaults:{Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"},notificationConfig:{disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}}},oi=[{id:"3e0825ee-95fd-4ad4-8802-e0507845b668",name:"Sailing",configuration:[{w:3,h:4,id:"339698a7-2cff-4ab9-9b50-d8056f971471",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"339698a7-2cff-4ab9-9b50-d8056f971471",config:{displayName:"Depth",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.depth.belowTransducer",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"yellow",enableTimeout:!1,dataTimeout:5}}},x:0,y:0},{w:5,h:10,id:"a44028e0-dfee-4492-895b-2b03a60f3a69",selector:"widget-wind-steer",input:{widgetProperties:{type:"widget-wind-steer",uuid:"a44028e0-dfee-4492-895b-2b03a60f3a69",config:{filterSelfPaths:!0,paths:{headingPath:{description:"Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},courseOverGround:{description:"Course Over Ground",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindAngle:{description:"True Wind Angle",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindSpeed:{description:"True Wind Speed",path:"self.environment.wind.speedTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},appWindAngle:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},appWindSpeed:{description:"Apparent Wind Speed",path:"self.environment.wind.speedApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},nextWaypointBearing:{description:"Next Waypoint Bearing",path:"self.navigation.courseGreatCircle.nextPoint.bearingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500}},windSectorEnable:!0,windSectorWindowSeconds:5,laylineEnable:!0,laylineAngle:40,waypointEnable:!0,courseOverGroundEnable:!0,sailSetupEnable:!1,enableTimeout:!1,dataTimeout:5}}},x:3,y:0},{w:4,h:6,id:"24406c15-7738-4dc1-a206-7a4862c2931d",selector:"widget-gauge-ng-radial",input:{widgetProperties:{type:"widget-gauge-ng-radial",uuid:"24406c15-7738-4dc1-a206-7a4862c2931d",config:{displayName:"SOG",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.speedOverGround",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,convertUnitTo:"knots",sampleTime:500}},displayScale:{lower:0,upper:10,type:"linear"},gauge:{type:"ngRadial",subType:"measuring",enableTicks:!0,compassUseNumbers:!1},numInt:1,numDecimal:1,enableTimeout:!1,color:"yellow",dataTimeout:5}}},x:8,y:0},{w:3,h:4,id:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",config:{displayName:"STW",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.navigation.speedThroughWater",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"knots",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!0,showMin:!0,numDecimal:1,numInt:1,color:"contrast",enableTimeout:!1,dataTimeout:5}}},x:0,y:4},{w:4,h:6,id:"973c8804-be09-4923-bb5d-48c13b65db69",selector:"widget-data-chart",input:{widgetProperties:{type:"widget-data-chart",uuid:"973c8804-be09-4923-bb5d-48c13b65db69",config:{displayName:"Chart Label",filterSelfPaths:!0,convertUnitTo:"knots",datasetUUID:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",invertData:!1,datasetAverageArray:"sma",showAverageData:!0,trackAgainstAverage:!1,showDatasetMinimumValueLine:!1,showDatasetMaximumValueLine:!1,showDatasetAverageValueLine:!0,showDatasetAngleAverageValueLine:!1,showLabel:!1,showTimeScale:!0,startScaleAtZero:!1,verticalGraph:!1,showYScale:!0,yScaleSuggestedMin:null,yScaleSuggestedMax:null,enableMinMaxScaleLimit:!1,yScaleMin:null,yScaleMax:null,numDecimal:1,color:"green"}}},x:8,y:6},{w:3,h:4,id:"05414722-733a-4483-89b0-07f3945ffd97",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"05414722-733a-4483-89b0-07f3945ffd97",config:{displayName:"Engine Room",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.inside.engineRoom.temperature",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"celsius",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"blue",enableTimeout:!1,dataTimeout:5}}},x:0,y:8},{w:5,h:2,id:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",selector:"widget-simple-linear",input:{widgetProperties:{type:"widget-simple-linear",uuid:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",config:{displayName:"House Bank",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.electrical.batteries.0.voltage",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:"V",convertUnitTo:"V",sampleTime:500}},displayScale:{lower:0,upper:15,type:"linear"},gauge:{type:"simpleLinear",unitLabelFormat:"full"},numInt:1,numDecimal:2,color:"green",enableTimeout:!1,dataTimeout:5}}},x:3,y:10}]},{id:"7c67c8c5-dc55-4e1d-9fc5-3dd95fd41bea",name:"Charting",configuration:[{x:0,y:0,w:8,h:12,id:"488d620a-37d4-4b98-849d-304cd18003e9",selector:"widget-freeboardsk",input:{widgetProperties:{type:"widget-freeboardsk",uuid:"488d620a-37d4-4b98-849d-304cd18003e9"}}},{x:8,y:0,w:2,h:3,id:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",selector:"widget-gauge-ng-compass",input:{widgetProperties:{type:"widget-gauge-ng-compass",uuid:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",config:{displayName:"COG (T)",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",isConvertUnitToConfigurable:!1,convertUnitTo:"deg",sampleTime:500}},gauge:{type:"ngRadial",subType:"marineCompass",enableTicks:!0,compassUseNumbers:!0,showValueBox:!1},enableTimeout:!1,color:"purple",dataTimeout:5}}}},{x:10,y:0,w:2,h:3,id:"caf9ca47-fcf6-4736-a314-2b5210edaf03",selector:"widget-datetime",input:{widgetProperties:{type:"widget-datetime",uuid:"caf9ca47-fcf6-4736-a314-2b5210edaf03",config:{displayName:"Next WP Arrival",filterSelfPaths:!0,paths:{gaugePath:{description:"String Data",path:"self.navigation.datetime",source:"default",pathType:"Date",isPathConfigurable:!0,sampleTime:500}},dateFormat:"dd/MM HH:mm",dateTimezone:"America/Toronto",color:"contrast",enableTimeout:!1,dataTimeout:5}}}},{x:8,y:3,w:4,h:9,id:"daa21350-009e-4d99-8209-364f9b99caee",selector:"widget-autopilot",input:{widgetProperties:{type:"widget-autopilot",uuid:"daa21350-009e-4d99-8209-364f9b99caee",config:{displayName:"N2k Autopilot",filterSelfPaths:!0,paths:{apState:{description:"Autopilot State",path:"self.steering.autopilot.state",source:"default",pathType:"string",isPathConfigurable:!0,showPathSkUnitsFilter:!1,convertUnitTo:"",sampleTime:500},apTargetHeadingMag:{description:"Autopilot Target Heading Mag",path:"self.steering.autopilot.target.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},apTargetWindAngleApp:{description:"Autopilot Target Wind Angle Apparent",path:"self.steering.autopilot.target.windAngleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},headingMag:{description:"Heading Magnetic",path:"self.navigation.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},headingTrue:{description:"Heading True",path:"self.navigation.headingTrue",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},windAngleApparent:{description:"Wind Angle Apparent",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},windAngleTrueWater:{description:"Wind Angle True Water",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},rudderAngle:{description:"Rudder Angle",path:"self.steering.rudderAngle",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500}},usage:{headingMag:["wind","route","auto","standby"],headingTrue:["wind","route","auto","standby"],windAngleApparent:["wind"],windAngleTrueWater:["wind"]},typeVal:{headingMag:"Mag",headingTrue:"True",windAngleApparent:"AWA",windAngleTrueWater:"TWA"},barColor:"accent",autoStart:!1,enableTimeout:!1,dataTimeout:5}}}}]}],ai={themeName:""};var Vm={configVersion:11,kipUUID:ae.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var qa="",Ga=11,tt=11,tu=(()=>{class t{storage=d(ur);unitDefaults=new v({});themeName=new v(qa);kipKNotificationConfig=new v(et);autoNightMode=new v(!1);redNightMode=new v(!1);nightModeBrightness=new v(1);proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=Ge(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=Ga,!window.localStorage)console.error(`[AppSettings Service] LocalStorage NOT SUPPORTED by browser
2
+ This is a requirement to run Kip. See browser documentation to enable this feature.`);else{this.loadConnectionConfig();let e;if(this.storage.initConfig===null&&this.useSharedConfig&&this.loginName!==null&&this.loginPassword!==null&&this.signalkUrl.url!==null?this.resetSettings():e=this.storage.initConfig,e)console.log("[AppSettings Service] Remote configuration storage enabled"),this.checkConfigUpgradeRequired(!1),this.activeConfig=e,this.pushSettings();else{console.log("[AppSettings Service] LocalStorage enabled");let i={app:null,theme:null,dashboards:null};i.app=this.loadConfigFromLocalStorage("appConfig"),i.app.configVersion!==tt&&this.checkConfigUpgradeRequired(!0),i.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),i.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=i,this.pushSettings()}}}loadConnectionConfig(){let e=this.loadConfigFromLocalStorage("connectionConfig");switch(e.configVersion){case 11:break;default:console.error(`[AppSettings Service] Invalid connectionConfig version ${e.configVersion}. Resetting and loading connection configuration default`),this.resetConnection();break}this.signalkUrl={url:e.signalKUrl,new:!1},this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.useDeviceToken=e.useDeviceToken,this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.sharedConfigName=e.sharedConfigName,this.kipUUID=e.kipUUID}resetConnection(){localStorage.setItem("connectionConfig",JSON.stringify(this.getDefaultConnectionConfig())),this.reloadApp()}checkConfigUpgradeRequired(e){e?this.configUpgrade.set(!0):this.storage.listConfigs(9).then(i=>j(this,null,function*(){for(let o of i)try{if((yield this.storage.getConfig(o.scope,o.name,9)).app?.configVersion===10){this.configUpgrade.set(!0),console.log("[AppSettings Service] Configuration upgrade required for version 10.");break}}catch(a){console.error(`[AppSettings Service] Error fetching configuration for ${o.name}:`,a)}})).catch(i=>{console.error("[AppSettings Service] Error fetching configuration data:",i)})}loadConfigFromLocalStorage(e){let i=JSON.parse(localStorage.getItem(e));if(i===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":i=this.getDefaultAppConfig();break;case"connectionConfig":i=this.getDefaultConnectionConfig();break;case"dashboardsConfig":i=this.getDefaultDashboardsConfig();break;case"themeConfig":i=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&i.configVersion!==tt)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":i=this.getDefaultConnectionConfig();break}return i}pushSettings(){this.themeName.next(this.activeConfig.theme.themeName),this.dataSets=this.activeConfig.app.dataSets,this.unitDefaults.next(this.activeConfig.app.unitDefaults),this.kipKNotificationConfig.next(this.activeConfig.app.notificationConfig),this.activeConfig.app.autoNightMode===void 0?this.setAutoNightMode(!1):this.autoNightMode.next(this.activeConfig.app.autoNightMode),this.activeConfig.app.redNightMode===void 0?this.setRedNightMode(!1):this.redNightMode.next(this.activeConfig.app.redNightMode),this.activeConfig.app.nightModeBrightness===void 0?this.setNightModeBrightness(.2):this.nightModeBrightness.next(this.activeConfig.app.nightModeBrightness),this.activeConfig.dashboards===void 0?this._dashboards=[]:this._dashboards=this.activeConfig.dashboards}getDefaultUnitsAsO(){return this.unitDefaults.asObservable()}getDefaultUnits(){return this.unitDefaults.getValue()}setDefaultUnits(e){this.unitDefaults.next(e),this.useSharedConfig?this.storage.patchConfig("Array<IUnitDefaults>",e):this.saveAppConfigToLocalStorage()}getAppConfig(){return this.buildAppStorageObject()}getConnectionConfig(){return this.buildConnectionStorageObject()}setConnectionConfig(e){this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.signalkUrl.url=e.signalKUrl,e.useSharedConfig?this.useDeviceToken=!1:this.useDeviceToken=!0,this.saveConnectionConfigToLocalStorage()}setUseDeviceToken(e){this.useDeviceToken=e,this.saveConnectionConfigToLocalStorage()}getDashboardConfig(){return this.buildDashboardStorageObject()}getThemeConfig(){return this.buildThemeStorageObject()}get KipUUID(){return this.kipUUID}getThemeNameAsO(){return this.themeName.asObservable()}setThemeName(e){if(this.themeName.next(e),this.useSharedConfig){let i={themeName:e};this.storage.patchConfig("IThemeConfig",i)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getWidgets(){return this.widgets}saveDashboards(e){this.useSharedConfig?this.storage.patchConfig("Dashboards",e):this.saveLDashboardsConfigToLocalStorage(e),this._dashboards=e}saveDataSets(e){this.dataSets=e,this.useSharedConfig?this.storage.patchConfig("Array<IDatasetDef>",e):this.saveAppConfigToLocalStorage()}getDataSets(){return this.dataSets}getNotificationServiceConfigAsO(){return this.kipKNotificationConfig.asObservable()}getNotificationConfig(){return this.kipKNotificationConfig.getValue()}setNotificationConfig(e){this.kipKNotificationConfig.next(e),this.useSharedConfig?this.storage.patchConfig("INotificationConfig",e):this.saveAppConfigToLocalStorage()}resetSettings(){let e={app:null,theme:null,dashboards:null};e.app=this.getDefaultAppConfig(),e.theme=this.getDefaultThemeConfig(),e.dashboards=this.getDefaultDashboardsConfig(),this.useSharedConfig?this.storage.setConfig("user",this.sharedConfigName,e).then(i=>{console.log("[AppSettings Service] Replaced server config name: "+this.sharedConfigName+", with default configuration values"),this.reloadApp()}).catch(i=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName)}):this.reloadApp()}replaceConfig(e,i,o){let a=JSON.stringify(i);localStorage.setItem(e,a),o&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:ri,dashboards:oi,theme:ai};console.log("[AppSettings Service] Loading Demo configuration settings as remote config: "+this.useSharedConfig+" and reloading app."),this.storage.setConfig("user",this.sharedConfigName,e),this.reloadApp()}else console.log("[AppSettings Service] Loading Demo configuration settings to LocalStorage"),this.replaceConfig("appConfig",ri),this.replaceConfig("dashboardsConfig",oi),this.replaceConfig("themeConfig",ai,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),location.replace("./")}buildAppStorageObject(){return{configVersion:tt,autoNightMode:this.autoNightMode.getValue(),redNightMode:this.redNightMode.getValue(),nightModeBrightness:this.nightModeBrightness.getValue(),dataSets:this.dataSets,unitDefaults:this.unitDefaults.getValue(),notificationConfig:this.kipKNotificationConfig.getValue()}}buildConnectionStorageObject(){return{configVersion:tt,kipUUID:this.kipUUID,signalKUrl:this.signalkUrl.url,proxyEnabled:this.proxyEnabled,signalKSubscribeAll:this.signalKSubscribeAll,useDeviceToken:this.useDeviceToken,loginName:this.loginName,loginPassword:this.loginPassword,useSharedConfig:this.useSharedConfig,sharedConfigName:this.sharedConfigName}}buildDashboardStorageObject(){return this._dashboards}buildThemeStorageObject(){return{themeName:this.themeName.getValue()}}saveAppConfigToLocalStorage(){console.log("[AppSettings Service] Saving Application config to LocalStorage"),localStorage.setItem("appConfig",JSON.stringify(this.buildAppStorageObject()))}saveConnectionConfigToLocalStorage(){console.log("[AppSettings Service] Saving Connection config to LocalStorage"),localStorage.setItem("connectionConfig",JSON.stringify(this.buildConnectionStorageObject()))}saveLDashboardsConfigToLocalStorage(e){console.log("[AppSettings Service] Saving Dashboard config to LocalStorage"),localStorage.setItem("dashboardsConfig",JSON.stringify(e))}saveThemeConfigToLocalStorage(){console.log("[AppSettings Service] Saving Theme config to LocalStorage"),localStorage.setItem("themeConfig",JSON.stringify(this.buildThemeStorageObject()))}getDefaultAppConfig(){let e=pr;return e.notificationConfig=et,e.unitDefaults=ut,e.configVersion=tt,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=gr;return e.kipUUID=ae.create(),e.signalKUrl=window.location.origin,localStorage.setItem("connectionConfig",JSON.stringify(e)),e}getDefaultDashboardsConfig(){let e=[];return localStorage.setItem("dashboardsConfig",JSON.stringify(e)),e}getDefaultThemeConfig(){let e=hr;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ka(){this.__data__=[],this.size=0}var br=Ka;function Qa(t,r){return t===r||t!==t&&r!==r}var K=Qa;function Ja(t,r){for(var e=t.length;e--;)if(K(t[e][0],r))return e;return-1}var ne=Ja;var Za=Array.prototype,Ya=Za.splice;function Xa(t){var r=this.__data__,e=ne(r,t);if(e<0)return!1;var i=r.length-1;return e==i?r.pop():Ya.call(r,e,1),--this.size,!0}var xr=Xa;function en(t){var r=this.__data__,e=ne(r,t);return e<0?void 0:r[e][1]}var vr=en;function tn(t){return ne(this.__data__,t)>-1}var _r=tn;function rn(t,r){var e=this.__data__,i=ne(e,t);return i<0?(++this.size,e.push([t,r])):e[i][1]=r,this}var yr=rn;function Oe(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}Oe.prototype.clear=br;Oe.prototype.delete=xr;Oe.prototype.get=vr;Oe.prototype.has=_r;Oe.prototype.set=yr;var se=Oe;function on(){this.__data__=new se,this.size=0}var Sr=on;function an(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}var wr=an;function nn(t){return this.__data__.get(t)}var Tr=nn;function sn(t){return this.__data__.has(t)}var Cr=sn;var ln=typeof global=="object"&&global&&global.Object===Object&&global,pt=ln;var dn=typeof self=="object"&&self&&self.Object===Object&&self,fn=pt||dn||Function("return this")(),_=fn;var cn=_.Symbol,L=cn;var Ar=Object.prototype,mn=Ar.hasOwnProperty,un=Ar.toString,it=L?L.toStringTag:void 0;function pn(t){var r=mn.call(t,it),e=t[it];try{t[it]=void 0;var i=!0}catch{}var o=un.call(t);return i&&(r?t[it]=e:delete t[it]),o}var kr=pn;var hn=Object.prototype,gn=hn.toString;function bn(t){return gn.call(t)}var Dr=bn;var xn="[object Null]",vn="[object Undefined]",Er=L?L.toStringTag:void 0;function _n(t){return t==null?t===void 0?vn:xn:Er&&Er in Object(t)?kr(t):Dr(t)}var V=_n;function yn(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}var A=yn;var Sn="[object AsyncFunction]",wn="[object Function]",Tn="[object GeneratorFunction]",Cn="[object Proxy]";function An(t){if(!A(t))return!1;var r=V(t);return r==wn||r==Tn||r==Sn||r==Cn}var Fe=An;var kn=_["__core-js_shared__"],ht=kn;var Mr=function(){var t=/[^.]+$/.exec(ht&&ht.keys&&ht.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Dn(t){return!!Mr&&Mr in t}var Or=Dn;var En=Function.prototype,Mn=En.toString;function On(t){if(t!=null){try{return Mn.call(t)}catch{}try{return t+""}catch{}}return""}var Z=On;var Fn=/[\\^$.*+?()[\]{}|]/g,In=/^\[object .+?Constructor\]$/,Rn=Function.prototype,Nn=Object.prototype,Pn=Rn.toString,Ln=Nn.hasOwnProperty,Un=RegExp("^"+Pn.call(Ln).replace(Fn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jn(t){if(!A(t)||Or(t))return!1;var r=Fe(t)?Un:In;return r.test(Z(t))}var Fr=jn;function $n(t,r){return t?.[r]}var Ir=$n;function zn(t,r){var e=Ir(t,r);return Fr(e)?e:void 0}var I=zn;var Wn=I(_,"Map"),le=Wn;var Bn=I(Object,"create"),Y=Bn;function Vn(){this.__data__=Y?Y(null):{},this.size=0}var Rr=Vn;function Hn(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}var Nr=Hn;var qn="__lodash_hash_undefined__",Gn=Object.prototype,Kn=Gn.hasOwnProperty;function Qn(t){var r=this.__data__;if(Y){var e=r[t];return e===qn?void 0:e}return Kn.call(r,t)?r[t]:void 0}var Pr=Qn;var Jn=Object.prototype,Zn=Jn.hasOwnProperty;function Yn(t){var r=this.__data__;return Y?r[t]!==void 0:Zn.call(r,t)}var Lr=Yn;var Xn="__lodash_hash_undefined__";function es(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Y&&r===void 0?Xn:r,this}var Ur=es;function Ie(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}Ie.prototype.clear=Rr;Ie.prototype.delete=Nr;Ie.prototype.get=Pr;Ie.prototype.has=Lr;Ie.prototype.set=Ur;var ni=Ie;function ts(){this.size=0,this.__data__={hash:new ni,map:new(le||se),string:new ni}}var jr=ts;function is(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}var $r=is;function rs(t,r){var e=t.__data__;return $r(r)?e[typeof r=="string"?"string":"hash"]:e.map}var de=rs;function os(t){var r=de(this,t).delete(t);return this.size-=r?1:0,r}var zr=os;function as(t){return de(this,t).get(t)}var Wr=as;function ns(t){return de(this,t).has(t)}var Br=ns;function ss(t,r){var e=de(this,t),i=e.size;return e.set(t,r),this.size+=e.size==i?0:1,this}var Vr=ss;function Re(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}Re.prototype.clear=jr;Re.prototype.delete=zr;Re.prototype.get=Wr;Re.prototype.has=Br;Re.prototype.set=Vr;var gt=Re;var ls=200;function ds(t,r){var e=this.__data__;if(e instanceof se){var i=e.__data__;if(!le||i.length<ls-1)return i.push([t,r]),this.size=++e.size,this;e=this.__data__=new gt(i)}return e.set(t,r),this.size=e.size,this}var Hr=ds;function Ne(t){var r=this.__data__=new se(t);this.size=r.size}Ne.prototype.clear=Sr;Ne.prototype.delete=wr;Ne.prototype.get=Tr;Ne.prototype.has=Cr;Ne.prototype.set=Hr;var fe=Ne;function fs(t,r){for(var e=-1,i=t==null?0:t.length;++e<i&&r(t[e],e,t)!==!1;);return t}var qr=fs;var cs=function(){try{var t=I(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Pe=cs;function ms(t,r,e){r=="__proto__"&&Pe?Pe(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}var Le=ms;var us=Object.prototype,ps=us.hasOwnProperty;function hs(t,r,e){var i=t[r];(!(ps.call(t,r)&&K(i,e))||e===void 0&&!(r in t))&&Le(t,r,e)}var bt=hs;function gs(t,r,e,i){var o=!e;e||(e={});for(var a=-1,n=r.length;++a<n;){var s=r[a],l=i?i(e[s],t[s],s,e,t):void 0;l===void 0&&(l=t[s]),o?Le(e,s,l):bt(e,s,l)}return e}var Q=gs;function bs(t,r){for(var e=-1,i=Array(t);++e<t;)i[e]=r(e);return i}var Gr=bs;function xs(t){return t!=null&&typeof t=="object"}var T=xs;var vs="[object Arguments]";function _s(t){return T(t)&&V(t)==vs}var si=_s;var Kr=Object.prototype,ys=Kr.hasOwnProperty,Ss=Kr.propertyIsEnumerable,ws=si(function(){return arguments}())?si:function(t){return T(t)&&ys.call(t,"callee")&&!Ss.call(t,"callee")},rt=ws;var Ts=Array.isArray,U=Ts;function Cs(){return!1}var Qr=Cs;var Yr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jr=Yr&&typeof module=="object"&&module&&!module.nodeType&&module,As=Jr&&Jr.exports===Yr,Zr=As?_.Buffer:void 0,ks=Zr?Zr.isBuffer:void 0,Ds=ks||Qr,X=Ds;var Es=9007199254740991,Ms=/^(?:0|[1-9]\d*)$/;function Os(t,r){var e=typeof t;return r=r??Es,!!r&&(e=="number"||e!="symbol"&&Ms.test(t))&&t>-1&&t%1==0&&t<r}var xt=Os;var Fs=9007199254740991;function Is(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Fs}var vt=Is;var Rs="[object Arguments]",Ns="[object Array]",Ps="[object Boolean]",Ls="[object Date]",Us="[object Error]",js="[object Function]",$s="[object Map]",zs="[object Number]",Ws="[object Object]",Bs="[object RegExp]",Vs="[object Set]",Hs="[object String]",qs="[object WeakMap]",Gs="[object ArrayBuffer]",Ks="[object DataView]",Qs="[object Float32Array]",Js="[object Float64Array]",Zs="[object Int8Array]",Ys="[object Int16Array]",Xs="[object Int32Array]",el="[object Uint8Array]",tl="[object Uint8ClampedArray]",il="[object Uint16Array]",rl="[object Uint32Array]",x={};x[Qs]=x[Js]=x[Zs]=x[Ys]=x[Xs]=x[el]=x[tl]=x[il]=x[rl]=!0;x[Rs]=x[Ns]=x[Gs]=x[Ps]=x[Ks]=x[Ls]=x[Us]=x[js]=x[$s]=x[zs]=x[Ws]=x[Bs]=x[Vs]=x[Hs]=x[qs]=!1;function ol(t){return T(t)&&vt(t.length)&&!!x[V(t)]}var Xr=ol;function al(t){return function(r){return t(r)}}var Ue=al;var eo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ot=eo&&typeof module=="object"&&module&&!module.nodeType&&module,nl=ot&&ot.exports===eo,li=nl&&pt.process,sl=function(){try{var t=ot&&ot.require&&ot.require("util").types;return t||li&&li.binding&&li.binding("util")}catch{}}(),ee=sl;var to=ee&&ee.isTypedArray,ll=to?Ue(to):Xr,je=ll;var dl=Object.prototype,fl=dl.hasOwnProperty;function cl(t,r){var e=U(t),i=!e&&rt(t),o=!e&&!i&&X(t),a=!e&&!i&&!o&&je(t),n=e||i||o||a,s=n?Gr(t.length,String):[],l=s.length;for(var f in t)(r||fl.call(t,f))&&!(n&&(f=="length"||o&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||xt(f,l)))&&s.push(f);return s}var _t=cl;var ml=Object.prototype;function ul(t){var r=t&&t.constructor,e=typeof r=="function"&&r.prototype||ml;return t===e}var $e=ul;function pl(t,r){return function(e){return t(r(e))}}var yt=pl;var hl=yt(Object.keys,Object),io=hl;var gl=Object.prototype,bl=gl.hasOwnProperty;function xl(t){if(!$e(t))return io(t);var r=[];for(var e in Object(t))bl.call(t,e)&&e!="constructor"&&r.push(e);return r}var ro=xl;function vl(t){return t!=null&&vt(t.length)&&!Fe(t)}var ce=vl;function _l(t){return ce(t)?_t(t):ro(t)}var ze=_l;function yl(t,r){return t&&Q(r,ze(r),t)}var oo=yl;function Sl(t){var r=[];if(t!=null)for(var e in Object(t))r.push(e);return r}var ao=Sl;var wl=Object.prototype,Tl=wl.hasOwnProperty;function Cl(t){if(!A(t))return ao(t);var r=$e(t),e=[];for(var i in t)i=="constructor"&&(r||!Tl.call(t,i))||e.push(i);return e}var no=Cl;function Al(t){return ce(t)?_t(t,!0):no(t)}var J=Al;function kl(t,r){return t&&Q(r,J(r),t)}var so=kl;var mo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lo=mo&&typeof module=="object"&&module&&!module.nodeType&&module,Dl=lo&&lo.exports===mo,fo=Dl?_.Buffer:void 0,co=fo?fo.allocUnsafe:void 0;function El(t,r){if(r)return t.slice();var e=t.length,i=co?co(e):new t.constructor(e);return t.copy(i),i}var St=El;function Ml(t,r){var e=-1,i=t.length;for(r||(r=Array(i));++e<i;)r[e]=t[e];return r}var wt=Ml;function Ol(t,r){for(var e=-1,i=t==null?0:t.length,o=0,a=[];++e<i;){var n=t[e];r(n,e,t)&&(a[o++]=n)}return a}var uo=Ol;function Fl(){return[]}var Tt=Fl;var Il=Object.prototype,Rl=Il.propertyIsEnumerable,po=Object.getOwnPropertySymbols,Nl=po?function(t){return t==null?[]:(t=Object(t),uo(po(t),function(r){return Rl.call(t,r)}))}:Tt,We=Nl;function Pl(t,r){return Q(t,We(t),r)}var ho=Pl;function Ll(t,r){for(var e=-1,i=r.length,o=t.length;++e<i;)t[o+e]=r[e];return t}var Ct=Ll;var Ul=yt(Object.getPrototypeOf,Object),Be=Ul;var jl=Object.getOwnPropertySymbols,$l=jl?function(t){for(var r=[];t;)Ct(r,We(t)),t=Be(t);return r}:Tt,At=$l;function zl(t,r){return Q(t,At(t),r)}var go=zl;function Wl(t,r,e){var i=r(t);return U(t)?i:Ct(i,e(t))}var kt=Wl;function Bl(t){return kt(t,ze,We)}var at=Bl;function Vl(t){return kt(t,J,At)}var bo=Vl;var Hl=I(_,"DataView"),Dt=Hl;var ql=I(_,"Promise"),Et=ql;var Gl=I(_,"Set"),Mt=Gl;var Kl=I(_,"WeakMap"),Ot=Kl;var xo="[object Map]",Ql="[object Object]",vo="[object Promise]",_o="[object Set]",yo="[object WeakMap]",So="[object DataView]",Jl=Z(Dt),Zl=Z(le),Yl=Z(Et),Xl=Z(Mt),ed=Z(Ot),be=V;(Dt&&be(new Dt(new ArrayBuffer(1)))!=So||le&&be(new le)!=xo||Et&&be(Et.resolve())!=vo||Mt&&be(new Mt)!=_o||Ot&&be(new Ot)!=yo)&&(be=function(t){var r=V(t),e=r==Ql?t.constructor:void 0,i=e?Z(e):"";if(i)switch(i){case Jl:return So;case Zl:return xo;case Yl:return vo;case Xl:return _o;case ed:return yo}return r});var te=be;var td=Object.prototype,id=td.hasOwnProperty;function rd(t){var r=t.length,e=new t.constructor(r);return r&&typeof t[0]=="string"&&id.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var wo=rd;var od=_.Uint8Array,Ve=od;function ad(t){var r=new t.constructor(t.byteLength);return new Ve(r).set(new Ve(t)),r}var He=ad;function nd(t,r){var e=r?He(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var To=nd;var sd=/\w*$/;function ld(t){var r=new t.constructor(t.source,sd.exec(t));return r.lastIndex=t.lastIndex,r}var Co=ld;var Ao=L?L.prototype:void 0,ko=Ao?Ao.valueOf:void 0;function dd(t){return ko?Object(ko.call(t)):{}}var Do=dd;function fd(t,r){var e=r?He(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var Ft=fd;var cd="[object Boolean]",md="[object Date]",ud="[object Map]",pd="[object Number]",hd="[object RegExp]",gd="[object Set]",bd="[object String]",xd="[object Symbol]",vd="[object ArrayBuffer]",_d="[object DataView]",yd="[object Float32Array]",Sd="[object Float64Array]",wd="[object Int8Array]",Td="[object Int16Array]",Cd="[object Int32Array]",Ad="[object Uint8Array]",kd="[object Uint8ClampedArray]",Dd="[object Uint16Array]",Ed="[object Uint32Array]";function Md(t,r,e){var i=t.constructor;switch(r){case vd:return He(t);case cd:case md:return new i(+t);case _d:return To(t,e);case yd:case Sd:case wd:case Td:case Cd:case Ad:case kd:case Dd:case Ed:return Ft(t,e);case ud:return new i;case pd:case bd:return new i(t);case hd:return Co(t);case gd:return new i;case xd:return Do(t)}}var Eo=Md;var Mo=Object.create,Od=function(){function t(){}return function(r){if(!A(r))return{};if(Mo)return Mo(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}(),Oo=Od;function Fd(t){return typeof t.constructor=="function"&&!$e(t)?Oo(Be(t)):{}}var It=Fd;var Id="[object Map]";function Rd(t){return T(t)&&te(t)==Id}var Fo=Rd;var Io=ee&&ee.isMap,Nd=Io?Ue(Io):Fo,Ro=Nd;var Pd="[object Set]";function Ld(t){return T(t)&&te(t)==Pd}var No=Ld;var Po=ee&&ee.isSet,Ud=Po?Ue(Po):No,Lo=Ud;var jd=1,$d=2,zd=4,Uo="[object Arguments]",Wd="[object Array]",Bd="[object Boolean]",Vd="[object Date]",Hd="[object Error]",jo="[object Function]",qd="[object GeneratorFunction]",Gd="[object Map]",Kd="[object Number]",$o="[object Object]",Qd="[object RegExp]",Jd="[object Set]",Zd="[object String]",Yd="[object Symbol]",Xd="[object WeakMap]",ef="[object ArrayBuffer]",tf="[object DataView]",rf="[object Float32Array]",of="[object Float64Array]",af="[object Int8Array]",nf="[object Int16Array]",sf="[object Int32Array]",lf="[object Uint8Array]",df="[object Uint8ClampedArray]",ff="[object Uint16Array]",cf="[object Uint32Array]",g={};g[Uo]=g[Wd]=g[ef]=g[tf]=g[Bd]=g[Vd]=g[rf]=g[of]=g[af]=g[nf]=g[sf]=g[Gd]=g[Kd]=g[$o]=g[Qd]=g[Jd]=g[Zd]=g[Yd]=g[lf]=g[df]=g[ff]=g[cf]=!0;g[Hd]=g[jo]=g[Xd]=!1;function Rt(t,r,e,i,o,a){var n,s=r&jd,l=r&$d,f=r&zd;if(e&&(n=o?e(t,i,o,a):e(t)),n!==void 0)return n;if(!A(t))return t;var u=U(t);if(u){if(n=wo(t),!s)return wt(t,n)}else{var m=te(t),c=m==jo||m==qd;if(X(t))return St(t,s);if(m==$o||m==Uo||c&&!o){if(n=l||c?{}:It(t),!s)return l?go(t,so(n,t)):ho(t,oo(n,t))}else{if(!g[m])return o?t:{};n=Eo(t,m,s)}}a||(a=new fe);var b=a.get(t);if(b)return b;a.set(t,n),Lo(t)?t.forEach(function(w){n.add(Rt(w,r,e,w,t,a))}):Ro(t)&&t.forEach(function(w,k){n.set(k,Rt(w,r,e,k,t,a))});var p=f?l?bo:at:l?J:ze,y=u?void 0:p(t);return qr(y||t,function(w,k){y&&(k=w,w=t[k]),bt(n,k,Rt(w,r,e,k,t,a))}),n}var zo=Rt;var mf=1,uf=4;function pf(t){return zo(t,mf|uf)}var di=pf;function P(t){t||(qt(P),t=d(ie));let r=new ue(e=>t.onDestroy(e.next.bind(e)));return e=>e.pipe(he(r))}function hf(t,r){let e=!r?.manualCleanup;e&&!r?.injector&&qt(hf);let i=e?r?.injector?.get(ie)??d(ie):null,o=gf(r?.equal),a;r?.requireSync?a=Ge({kind:0},{equal:o}):a=Ge({kind:1,value:r?.initialValue},{equal:o});let n=t.subscribe({next:s=>a.set({kind:1,value:s}),error:s=>{if(r?.rejectErrors)throw s;a.set({kind:2,error:s})}});if(r?.requireSync&&a().kind===0)throw new Ht(601,!1);return i?.onDestroy(n.unsubscribe.bind(n)),Xe(()=>{let s=a();switch(s.kind){case 1:return s.value;case 2:throw s.error;case 0:throw new Ht(601,!1)}},{equal:r?.equal})}function gf(t=Object.is){return(r,e)=>r.kind===1&&e.kind===1&&t(r.value,e.value)}var bf="/signalk/v1/",Wo="auth/login",xf="auth/logout",vf="auth/validate",_f=60,Bo=(()=>{class t{http=d(Ce);conn=d(Me);_IsLoggedIn$=new v(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new v(null);authToken$=this._authToken$.asObservable();connectionEndpointSubscription=null;authTokenSubscription=null;isRenewingToken=!1;loginUrl=null;logoutUrl=null;validateTokenUrl=null;constructor(){let e=JSON.parse(localStorage.getItem("authorization_token"));e&&(e.isDeviceAccessToken?e.expiry===null?(console.log("[Authentication Service] Device Access Token found with expiry: NEVER"),this._authToken$.next(e)):this.isTokenExpired(e.expiry)?(console.log("[Authentication Service] Device Access Token expired. Deleting token"),localStorage.removeItem("authorization_token")):(console.log("[Authentication Service] Device Access Token found in Local Storage"),this._authToken$.next(e)):(console.log("[Authentication Service] User session token found in Local Storage"),console.log("[Authentication Service] Deleting user session token"),localStorage.removeItem("authorization_token"))),this.authTokenSubscription=this._authToken$.pipe(ve(i=>!!i&&i.expiry!==null),Mi((i,o)=>i.expiry===o.expiry),xe(i=>{let o=this.getTokenExpirationDate(i.expiry,_f),a=o.getTime()-Date.now();return console.log(`[Authentication Service] Token refresh timer set for ${a} ms (Token Expiry: ${o.toISOString()})`),Math.max(a,0)}),Ni(i=>Ai(i))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(i=>{if(i.operation===2){let o=i.httpServiceUrl.substring(0,i.httpServiceUrl.length-4);this.loginUrl=o+Wo,this.logoutUrl=o+xf,this.validateTokenUrl=o+vf}})}handleTokenRenewal(){if(this.isRenewingToken){console.warn("[Authentication Service] Token renewal already in progress.");return}this.isRenewingToken=!0;let e=JSON.parse(localStorage.getItem("authorization_token"));if(!e){console.warn("[Authentication Service] No token found in local storage. Cannot renew."),this.isRenewingToken=!1;return}if(e.isDeviceAccessToken)console.warn("[Authentication Service] Device Access Token expired. Manual renewal required."),this.isRenewingToken=!1;else if(this.isTokenExpired(e.expiry))console.log("[Authentication Service] User session Token expired. Cannot renew."),this.isRenewingToken=!1;else{console.log("[Authentication Service] User session Token expires soon. Renewing token...");let i=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:i.loginName,pwd:i.loginPassword}).then(()=>{console.log("[Authentication Service] Token successfully renewed.")}).catch(o=>{console.error("[Authentication Service] Token renewal failed. Server returned:",o.error)}).finally(()=>{this.isRenewingToken=!1})}}login(a){return j(this,arguments,function*({usr:e,pwd:i,newUrl:o}){let n;o?n=o+bf+Wo:n=this.loginUrl,this._IsLoggedIn$.getValue()&&(yield this.logout(!0)),yield H(this.http.post(n,{username:e,password:i},{observe:"response"})).then(s=>{console.log("[Authentication Service] User "+e+" login successful"),this.setSession(s.body.token)}).catch(s=>{this.deleteToken(),this.handleError(s)})})}handleError(e){throw e.status===0?(console.error("[Authentication Service] An error occurred:",e.error),this.deleteToken()):console.error(`[Authentication Service] Backend returned code ${e.status}, body was: `,e.error),e}setSession(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!1};i===void 0?(o.token=e,console.log("[Authentication Service] User Session Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Session Token from server"):(o.token=e,o.expiry=i,console.log("[Authentication Service] Session Authorization Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}isTokenExpired(e){return Math.floor(new Date().getTime()/1e3)>=e}getTokenExpirationDate(e,i){let o=new Date(0);if(i){let a=new Date(0);a.setUTCSeconds(e-i),o=a}else o.setUTCSeconds(e);return o}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return j(this,null,function*(){localStorage.removeItem("authorization_token"),yield H(this.http.put(this.logoutUrl,null)).then(i=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(i=>{console.error(i)})})}deleteToken(){this._authToken$&&(console.log("[Authentication Service] Deleting Authorization token"),localStorage.removeItem("authorization_token"),this._IsLoggedIn$.next(!1),this._authToken$.next(null))}setDeviceAccessToken(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!0};i===void 0?(o.token=e,console.log("[Authentication Service] Device Access Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Device Access Token from server"):(o.token=e,o.expiry=i,console.log("[Authentication Service] Device Access Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}ngOnDestroy(){this.connectionEndpointSubscription?.unsubscribe(),this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var yf={url:"",deserializer:t=>JSON.parse(t.data),serializer:t=>JSON.stringify(t)},Sf="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",Nt=class t extends _i{constructor(r,e){if(super(),this._socket=null,r instanceof ue)this.destination=e,this.source=r;else{let i=this._config=Object.assign({},yf);if(this._output=new h,typeof r=="string")i.url=r;else for(let o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);if(!i.WebSocketCtor&&WebSocket)i.WebSocketCtor=WebSocket;else if(!i.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new pe}}lift(r){let e=new t(this._config,this.destination);return e.operator=r,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new pe),this._output=new h}multiplex(r,e,i){let o=this;return new ue(a=>{try{o.next(r())}catch(s){a.error(s)}let n=o.subscribe({next:s=>{try{i(s)&&a.next(s)}catch(l){a.error(l)}},error:s=>a.error(s),complete:()=>a.complete()});return()=>{try{o.next(e())}catch(s){a.error(s)}n.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:r,protocol:e,url:i,binaryType:o}=this._config,a=this._output,n=null;try{n=e?new r(i,e):new r(i),this._socket=n,o&&(this._socket.binaryType=o)}catch(l){a.error(l);return}let s=new ft(()=>{this._socket=null,n&&n.readyState===1&&n.close()});n.onopen=l=>{let{_socket:f}=this;if(!f){n.close(),this._resetState();return}let{openObserver:u}=this._config;u&&u.next(l);let m=this.destination;this.destination=vi.create(c=>{if(n.readyState===1)try{let{serializer:b}=this._config;n.send(b(c))}catch(b){this.destination.error(b)}},c=>{let{closingObserver:b}=this._config;b&&b.next(void 0),c&&c.code?n.close(c.code,c.reason):a.error(new TypeError(Sf)),this._resetState()},()=>{let{closingObserver:c}=this._config;c&&c.next(void 0),n.close(),this._resetState()}),m&&m instanceof pe&&s.add(m.subscribe(this.destination))},n.onerror=l=>{this._resetState(),a.error(l)},n.onclose=l=>{n===this._socket&&this._resetState();let{closeObserver:f}=this._config;f&&f.next(l),l.wasClean?a.complete():a.error(l)},n.onmessage=l=>{try{let{deserializer:f}=this._config;a.next(f(l))}catch(f){a.error(f)}}}_subscribe(r){let{source:e}=this;return e?e.subscribe(r):(this._socket||this._connectSocket(),this._output.subscribe(r),r.add(()=>{let{_socket:i}=this;this._output.observers.length===0&&(i&&(i.readyState===1||i.readyState===0)&&i.close(),this._resetState())}),r)}unsubscribe(){let{_socket:r}=this;r&&(r.readyState===1||r.readyState===0)&&r.close(),this._resetState(),super.unsubscribe()}};function fi(t){return new Nt(t)}var Vo=(()=>{class t{_destroyRef=d(ie);_skRequests$=new h;_skNotificationsMsg$=new h;_skValue$=new h;_skMetadata$=new h;_vesselSelfUrn$=new h;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new v(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_RECONNECT_INTERVAL=3e3;WS_RETRY_COUNT=3;WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new h;socketWSOpenEvent$=new h;authToken=null;timeoutIds=[];server=d(Me);auth=d(Bo);zones=d(R);constructor(){this.server.serverServiceEndpoint$.pipe(P(this._destroyRef)).subscribe(e=>{let i=null;e.operation===2?i="New endpoint":i="Connection stopped",e.operation===2?(this.endpointWS=e.WsServiceUrl,this.socketWS$&&this.streamEndpoint.operation!==4&&this.closeWS(i),this.timeoutIds.push(setTimeout(()=>{this.connectWS(i)},250))):this.socketWS$&&e.operation!==1&&this.streamEndpoint.operation!==4&&this.closeWS(i),e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self"}),this.auth.authToken$.pipe(P(this._destroyRef)).subscribe(e=>{if(this.authToken!=e){this.authToken=e;let i=null;e?i="New token":i="Deleted Token",this.socketWS$&&(this.streamEndpoint.operation===2||this.streamEndpoint.operation===1)&&(this.closeWS(i),this.timeoutIds.push(setTimeout(()=>{this.connectWS(i)},250)))}}),this.socketWSOpenEvent$.pipe(P(this._destroyRef)).subscribe(e=>{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.socketWSCloseEvent$.pipe(P(this._destroyRef)).subscribe(e=>{e.wasClean?(this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0,console.log("[Delta Service] WebSocket closed")):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,console.log("[Delta Service] WebSocket closed")),this.streamEndpoint$.next(this.streamEndpoint)}),Ci(document,"visibilitychange").pipe(P(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(Fi({count:this.WS_RETRY_COUNT,delay:(i,o)=>(console.error(`[Delta Service] WebSocket error (attempt ${o}): ${JSON.stringify(i,["code","message","type"])}`),ct(i).pipe(Ei(this.WS_RECONNECT_INTERVAL)))})).pipe(P(this._destroyRef)).subscribe({next:i=>this.processWebsocketMessage(i),error:i=>console.error("[Delta Service] WebSocket connection failed after maximum retries:",i)})})}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,fi({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$?(console.log("[Delta Service] WebSocket sending message"),this.socketWS$.next(e)):(this.timeoutIds.push(setTimeout(()=>{this.socketWS$&&(console.log("[Delta Service] WebSocket retry sending message"),this.socketWS$.next(e))},1e3)),console.log("[Delta Service] No WebSocket present to send 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,i){e.forEach(o=>{o.meta!==void 0&&o.meta.forEach(a=>this.parseSkMeta(a,i)),o.values!==void 0&&o.values.forEach(a=>{if(a.path.startsWith("notifications."))this._skNotificationsMsg$.next(a);else if(typeof a.value=="object"&&a.value!==null)Object.keys(a.value).forEach(n=>{let s={context:i,path:`${a.path}.${n}`,source:o.$source,timestamp:o.timestamp,value:a.value[n]};o.$source=="defaults"&&a.path==""&&(s.path=s.path.slice(1)),i!=this._selfUrn&&a.path==""&&(s.path=s.path.slice(1)),this._skValue$.next(s)});else{let n={context:i,path:a.path,source:o.$source,timestamp:o.timestamp,value:a.value};this._skValue$.next(n)}})})}parseSkMeta(e,i){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(o=>{this._skMetadata$.next({context:i,path:`${e.path}.${o}`,meta:e.value.properties[o]})}):this._skMetadata$.next({context:i,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.streamEndpoint.operation!==2?(console.log(`[Delta Service] ${e}: WebSocket not connected, attempting to reconnect...`),this.closeWS(e),this.timeoutIds.push(setTimeout(()=>this.connectWS(e),250))):console.log(`[Delta Service] ${e}: WebSocket is already connected.`)}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(),this.timeoutIds.forEach(e=>clearTimeout(e))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wf(t){return t}var Pt=wf;function Tf(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var Ho=Tf;var Cf=800,Af=16,kf=Date.now;function Df(t){var r=0,e=0;return function(){var i=kf(),o=Af-(i-e);if(e=i,o>0){if(++r>=Cf)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}var qo=Df;function Ef(t){return function(){return t}}var Go=Ef;var Mf=Pe?function(t,r){return Pe(t,"toString",{configurable:!0,enumerable:!1,value:Go(r),writable:!0})}:Pt,Ko=Mf;var Of=qo(Ko),Qo=Of;var Jo=Math.max;function Ff(t,r,e){return r=Jo(r===void 0?t.length-1:r,0),function(){for(var i=arguments,o=-1,a=Jo(i.length-r,0),n=Array(a);++o<a;)n[o]=i[r+o];o=-1;for(var s=Array(r+1);++o<r;)s[o]=i[o];return s[r]=e(n),Ho(t,this,s)}}var Zo=Ff;function If(t,r){return Qo(Zo(t,r,Pt),t+"")}var Yo=If;function Rf(t,r,e){if(!A(e))return!1;var i=typeof r;return(i=="number"?ce(e)&&xt(r,e.length):i=="string"&&r in e)?K(e[r],t):!1}var Xo=Rf;function Nf(t){return Yo(function(r,e){var i=-1,o=e.length,a=o>1?e[o-1]:void 0,n=o>2?e[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,n&&Xo(e[0],e[1],n)&&(a=o<3?void 0:a,o=1),r=Object(r);++i<o;){var s=e[i];s&&t(r,s,i,a)}return r})}var ea=Nf;var Pf="[object Object]",Lf=Function.prototype,Uf=Object.prototype,ta=Lf.toString,jf=Uf.hasOwnProperty,$f=ta.call(Object);function zf(t){if(!T(t)||V(t)!=Pf)return!1;var r=Be(t);if(r===null)return!0;var e=jf.call(r,"constructor")&&r.constructor;return typeof e=="function"&&e instanceof e&&ta.call(e)==$f}var ia=zf;var Wf="__lodash_hash_undefined__";function Bf(t){return this.__data__.set(t,Wf),this}var ra=Bf;function Vf(t){return this.__data__.has(t)}var oa=Vf;function Lt(t){var r=-1,e=t==null?0:t.length;for(this.__data__=new gt;++r<e;)this.add(t[r])}Lt.prototype.add=Lt.prototype.push=ra;Lt.prototype.has=oa;var aa=Lt;function Hf(t,r){for(var e=-1,i=t==null?0:t.length;++e<i;)if(r(t[e],e,t))return!0;return!1}var na=Hf;function qf(t,r){return t.has(r)}var sa=qf;var Gf=1,Kf=2;function Qf(t,r,e,i,o,a){var n=e&Gf,s=t.length,l=r.length;if(s!=l&&!(n&&l>s))return!1;var f=a.get(t),u=a.get(r);if(f&&u)return f==r&&u==t;var m=-1,c=!0,b=e&Kf?new aa:void 0;for(a.set(t,r),a.set(r,t);++m<s;){var p=t[m],y=r[m];if(i)var w=n?i(y,p,m,r,t,a):i(p,y,m,t,r,a);if(w!==void 0){if(w)continue;c=!1;break}if(b){if(!na(r,function(k,me){if(!sa(b,me)&&(p===k||o(p,k,e,i,a)))return b.push(me)})){c=!1;break}}else if(!(p===y||o(p,y,e,i,a))){c=!1;break}}return a.delete(t),a.delete(r),c}var Ut=Qf;function Jf(t){var r=-1,e=Array(t.size);return t.forEach(function(i,o){e[++r]=[o,i]}),e}var la=Jf;function Zf(t){var r=-1,e=Array(t.size);return t.forEach(function(i){e[++r]=i}),e}var da=Zf;var Yf=1,Xf=2,ec="[object Boolean]",tc="[object Date]",ic="[object Error]",rc="[object Map]",oc="[object Number]",ac="[object RegExp]",nc="[object Set]",sc="[object String]",lc="[object Symbol]",dc="[object ArrayBuffer]",fc="[object DataView]",fa=L?L.prototype:void 0,ci=fa?fa.valueOf:void 0;function cc(t,r,e,i,o,a,n){switch(e){case fc:if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case dc:return!(t.byteLength!=r.byteLength||!a(new Ve(t),new Ve(r)));case ec:case tc:case oc:return K(+t,+r);case ic:return t.name==r.name&&t.message==r.message;case ac:case sc:return t==r+"";case rc:var s=la;case nc:var l=i&Yf;if(s||(s=da),t.size!=r.size&&!l)return!1;var f=n.get(t);if(f)return f==r;i|=Xf,n.set(t,r);var u=Ut(s(t),s(r),i,o,a,n);return n.delete(t),u;case lc:if(ci)return ci.call(t)==ci.call(r)}return!1}var ca=cc;var mc=1,uc=Object.prototype,pc=uc.hasOwnProperty;function hc(t,r,e,i,o,a){var n=e&mc,s=at(t),l=s.length,f=at(r),u=f.length;if(l!=u&&!n)return!1;for(var m=l;m--;){var c=s[m];if(!(n?c in r:pc.call(r,c)))return!1}var b=a.get(t),p=a.get(r);if(b&&p)return b==r&&p==t;var y=!0;a.set(t,r),a.set(r,t);for(var w=n;++m<l;){c=s[m];var k=t[c],me=r[c];if(i)var xi=n?i(me,k,c,r,t,a):i(k,me,c,t,r,a);if(!(xi===void 0?k===me||o(k,me,e,i,a):xi)){y=!1;break}w||(w=c=="constructor")}if(y&&!w){var lt=t.constructor,dt=r.constructor;lt!=dt&&"constructor"in t&&"constructor"in r&&!(typeof lt=="function"&&lt instanceof lt&&typeof dt=="function"&&dt instanceof dt)&&(y=!1)}return a.delete(t),a.delete(r),y}var ma=hc;var gc=1,ua="[object Arguments]",pa="[object Array]",jt="[object Object]",bc=Object.prototype,ha=bc.hasOwnProperty;function xc(t,r,e,i,o,a){var n=U(t),s=U(r),l=n?pa:te(t),f=s?pa:te(r);l=l==ua?jt:l,f=f==ua?jt:f;var u=l==jt,m=f==jt,c=l==f;if(c&&X(t)){if(!X(r))return!1;n=!0,u=!1}if(c&&!u)return a||(a=new fe),n||je(t)?Ut(t,r,e,i,o,a):ca(t,r,l,e,i,o,a);if(!(e&gc)){var b=u&&ha.call(t,"__wrapped__"),p=m&&ha.call(r,"__wrapped__");if(b||p){var y=b?t.value():t,w=p?r.value():r;return a||(a=new fe),o(y,w,e,i,a)}}return c?(a||(a=new fe),ma(t,r,e,i,o,a)):!1}var ga=xc;function ba(t,r,e,i,o){return t===r?!0:t==null||r==null||!T(t)&&!T(r)?t!==t&&r!==r:ga(t,r,e,i,ba,o)}var xa=ba;function vc(t){return function(r,e,i){for(var o=-1,a=Object(r),n=i(r),s=n.length;s--;){var l=n[t?s:++o];if(e(a[l],l,a)===!1)break}return r}}var va=vc;var _c=va(),_a=_c;function yc(t,r,e){(e!==void 0&&!K(t[r],e)||e===void 0&&!(r in t))&&Le(t,r,e)}var nt=yc;function Sc(t){return T(t)&&ce(t)}var ya=Sc;function wc(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}var st=wc;function Tc(t){return Q(t,J(t))}var Sa=Tc;function Cc(t,r,e,i,o,a,n){var s=st(t,e),l=st(r,e),f=n.get(l);if(f){nt(t,e,f);return}var u=a?a(s,l,e+"",t,r,n):void 0,m=u===void 0;if(m){var c=U(l),b=!c&&X(l),p=!c&&!b&&je(l);u=l,c||b||p?U(s)?u=s:ya(s)?u=wt(s):b?(m=!1,u=St(l,!0)):p?(m=!1,u=Ft(l,!0)):u=[]:ia(l)||rt(l)?(u=s,rt(s)?u=Sa(s):(!A(s)||Fe(s))&&(u=It(l))):m=!1}m&&(n.set(l,u),o(u,l,i,a,n),n.delete(l)),nt(t,e,u)}var wa=Cc;function Ta(t,r,e,i,o){t!==r&&_a(r,function(a,n){if(o||(o=new fe),A(a))wa(t,r,n,e,Ta,i,o);else{var s=i?i(st(t,n),a,n+"",t,r,o):void 0;s===void 0&&(s=a),nt(t,n,s)}},J)}var Ca=Ta;function Ac(t,r){return xa(t,r)}var kc=Ac;var Dc=ea(function(t,r,e){Ca(t,r,e)}),mi=Dc;var qe=function(t){return t.Normal="normal",t.Nominal="nominal",t.Alert="alert",t.Warn="warn",t.Alarm="alarm",t.Emergency="emergency",t}(qe||{});var Ec=function(t){return t.Visual="visual",t.Sound="sound",t}(Ec||{});var Mc="self",Aa=t=>isFinite(+(t instanceof Date?t:new Date(t)))?!!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(t):!1,ka=t=>{if(t)return t==="RFC 3339 (UTC)"?"Date":"number"},wy=(()=>{class t{delta=d(Vo);_destroyRef=d(ie);_deltaUpdatesCounter=null;_deltaUpdatesSubject=new pe(60);_deltaUpdatesCounterTimer=null;_isSkDataFullTreeActive=!1;_skDataSubject$=new v([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new v([]);_skNotificationMsg$=new h;_skNotificationMeta$=new h;_isReset=new h;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){this._deltaUpdatesCounterTimer=setInterval(()=>{if(this._deltaUpdatesCounter!==null){let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}},1e3),this.delta.subscribeDataPathsUpdates().pipe(P(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(P(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(P(this._destroyRef)).subscribe(e=>{let i=e.path.replace("notifications.","self."),o=this._skData.find(a=>a.path==i);if(o&&o.state!==e.value.state){o.state=e.value.state;let a=this._pathRegister.find(n=>n.path==i);a&&a._pathState$.next(o.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(P(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=[],this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let i=this._pathRegister.findIndex(o=>o.path===e);if(i!==-1){let o=this._pathRegister[i];o._pathData$?.complete(),o._pathState$?.complete(),o.pathDataUpdate$?.complete(),o.pathMeta$?.complete(),this._pathRegister.splice(i,1)}}subscribePath(e,i){let o=this._pathRegister.find(p=>p.path===e&&p.source===i);if(o)return o.pathDataUpdate$;let a=null,n=null,s=null,l=qe.Normal,f={data:{value:null,timestamp:null},state:l},u=null,m=this._skData.find(p=>p.path==e);this._skData.length&&m&&(a=i==="default"?m.pathValue:m.sources?.[i]?.sourceValue??null,n=i==="default"?m.pathTimestamp:m.sources?.[i]?.sourceTimestamp??null,s=n?new Date(n):null,f={data:{value:a,timestamp:s},state:m.state||l},l=m.state||l,u=m.meta||null);let c={path:e,source:i,_pathData$:new v(f.data),_pathState$:new v(f.state),pathDataUpdate$:new v(f),pathMeta$:new v(u)};return Ti([c._pathData$,c._pathState$]).pipe(xe(([p,y])=>({data:p,state:y}))).subscribe(p=>c.pathDataUpdate$.next(p)),this._pathRegister.push(c),c.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let i=this.setPathContext(e.context,e.path),o=this._skData.find(n=>n.path==i);if(o)o.defaultSource===void 0&&(o.defaultSource=e.source),o.type===void 0&&e.value!==null&&(o.type=typeof e.value,o.type==="string"&&Aa(e.value)&&(o.type="Date")),o.pathValue=e.value,o.pathTimestamp=e.timestamp,o.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let n=typeof e.value;n==="string"&&Aa(e.value)&&(n="Date"),o={path:i,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:n,state:qe.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(o)}let a=this._pathRegister.filter(n=>n.path===i);if(a.length){let n={value:o.pathValue,timestamp:new Date(o.pathTimestamp)},s=a.find(f=>f.source==="default");s&&s._pathData$.next(n);let l=a.find(f=>f.source===e.source);l&&l._pathData$.next(n)}this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skData)}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let i=this.setPathContext(e.context,e.path),o=this._skData.find(n=>n.path===i);o?(o.type==="object"&&e.meta.units&&(o.type=ka(e.meta.units)),o.meta=mi(o.meta,e.meta)):(o={path:i,pathValue:void 0,pathTimestamp:void 0,type:ka(e.meta.units),state:qe.Normal,defaultSource:void 0,sources:{},meta:e.meta},this._skData.push(o));let a=this._pathRegister.find(n=>n.path===i);a&&a.pathMeta$.next(o.meta),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:i,meta:o.meta}),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){return this._isSkMetaFullTreeActive=!0,this._dataServiceMeta=this._skData.filter(e=>e.meta!==void 0&&e.path.startsWith("self.")).map(e=>({path:e.path,meta:e.meta})),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next(null),this._dataServiceMeta=null}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this._skDataSubject$.next(this._skData),this._skDataSubject$}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1}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,i){return e!==this._selfUrn?`${e}.${i}`:`${Mc}.${i}`}getPathsByType(e,i){return this._skData.filter(o=>o.type===e&&(!i||o.path.startsWith("self"))).map(o=>o.path)}getPathsAndMetaByType(e,i,o){return this._skData.filter(a=>{let n=a.type===e,s=!o||a.path.startsWith("self"),l=i===!0?a.meta?.supportsPut===!0:!0;return n&&s&&l}).map(a=>({path:a.path,meta:a.meta}))}getPathObject(e){return di(this._skData.find(i=>i.path===e))||null}getPathUnitType(e){return this._skData.find(i=>i.path===e)?.meta?.units||null}timeoutPathObservable(e,i){let o=this._pathRegister.find(a=>a.path==e);if(o){let a;["string","Date","number"].includes(i)&&(a={data:{value:null,timestamp:null},state:qe.Normal}),o.pathDataUpdate$.next(a)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegister.find(o=>o.path==e)?.pathMeta$.asObservable()||ct(null)}getPathMeta(e){return this._skData.find(i=>i.path===e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete(),this._deltaUpdatesCounterTimer&&clearInterval(this._deltaUpdatesCounterTimer)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ui=class{_box;_destroyed=new h;_resizeSubject=new h;_resizeObserver;_elementObservables=new Map;constructor(r){this._box=r,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(r){return this._elementObservables.has(r)||this._elementObservables.set(r,new ue(e=>{let i=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(r,{box:this._box}),()=>{this._resizeObserver?.unobserve(r),i.unsubscribe(),this._elementObservables.delete(r)}}).pipe(ve(e=>e.some(i=>i.target===r)),Ii({bufferSize:1,refCount:!0}),he(this._destroyed))),this._elementObservables.get(r)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Da=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=d(R);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,i){let o=i?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new ui(o)),this._observers.get(o).observe(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Oc=["notch"],Fc=["matFormFieldNotchedOutline",""],Ic=["*"],Rc=["textField"],Nc=["iconPrefixContainer"],Pc=["textPrefixContainer"],Lc=["iconSuffixContainer"],Uc=["textSuffixContainer"],jc=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],$c=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function zc(t,r){t&1&&ge(0,"span",20)}function Wc(t,r){if(t&1&&(F(0,"label",19),W(1,1),M(2,zc,1,0,"span",20),N()),t&2){let e=oe(2);Se("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Je("for",e._control.disableAutomaticLabeling?null:e._control.id),C(2),O(!e.hideRequiredMarker&&e._control.required?2:-1)}}function Bc(t,r){if(t&1&&M(0,Wc,3,5,"label",19),t&2){let e=oe();O(e._hasFloatingLabel()?0:-1)}}function Vc(t,r){t&1&&ge(0,"div",7)}function Hc(t,r){}function qc(t,r){if(t&1&&M(0,Hc,0,0,"ng-template",13),t&2){oe(2);let e=Qt(1);Se("ngTemplateOutlet",e)}}function Gc(t,r){if(t&1&&(F(0,"div",9),M(1,qc,1,1,null,13),N()),t&2){let e=oe();Se("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),C(),O(e._forceDisplayInfixLabel()?-1:1)}}function Kc(t,r){t&1&&(F(0,"div",10,2),W(2,2),N())}function Qc(t,r){t&1&&(F(0,"div",11,3),W(2,3),N())}function Jc(t,r){}function Zc(t,r){if(t&1&&M(0,Jc,0,0,"ng-template",13),t&2){oe();let e=Qt(1);Se("ngTemplateOutlet",e)}}function Yc(t,r){t&1&&(F(0,"div",14,4),W(2,4),N())}function Xc(t,r){t&1&&(F(0,"div",15,5),W(2,5),N())}function em(t,r){t&1&&ge(0,"div",16)}function tm(t,r){t&1&&W(0,6)}function im(t,r){if(t&1&&(F(0,"mat-hint",21),Ki(1),N()),t&2){let e=oe(2);Se("id",e._hintLabelId),C(),Qi(e.hintLabel)}}function rm(t,r){if(t&1&&(M(0,im,2,2,"mat-hint",21),W(1,7),ge(2,"div",22),W(3,8)),t&2){let e=oe();O(e.hintLabel?0:-1)}}var pi=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["mat-label"]]})}return t})(),gi=new $("MatError"),om=(()=>{class t{id=d(ke).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(i,o){i&2&&Ze("id",o.id)},inputs:{id:"id"},features:[Te([{provide:gi,useExisting:t}])]})}return t})(),hi=(()=>{class t{align="start";id=d(ke).getId("mat-mdc-hint-");static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,o){i&2&&(Ze("id",o.id),Je("align",null),q("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Na=new $("MatPrefix");var bi=new $("MatSuffix"),am=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[Te([{provide:bi,useExisting:t}])]})}return t})(),Pa=new $("FloatingLabelParent"),Ea=(()=>{class t{_elementRef=d(re);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=d(Da);_ngZone=d(R);_parent=d(Pa);_resizeSubscription=new ft;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return nm(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,o){i&2&&q("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function nm(t){let r=t;if(r.offsetParent!==null)return r.scrollWidth;let e=r.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var Ma="mdc-line-ripple--active",$t="mdc-line-ripple--deactivating",Oa=(()=>{class t{_elementRef=d(re);_cleanupTransitionEnd;constructor(){let e=d(R),i=d(Ke);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=i.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove($t),e.add(Ma)}deactivate(){this._elementRef.nativeElement.classList.add($t)}_handleTransitionEnd=e=>{let i=this._elementRef.nativeElement.classList,o=i.contains($t);e.propertyName==="opacity"&&o&&i.remove(Ma,$t)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),Fa=(()=>{class t{_elementRef=d(re);_ngZone=d(R);open=!1;_notch;constructor(){}ngAfterViewInit(){let e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){!this.open||!e?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Qe({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,o){if(i&1&&G(Oc,5),i&2){let a;D(a=E())&&(o._notch=a.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,o){i&2&&q("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:Fc,ngContentSelectors:Ic,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(i,o){i&1&&(Kt(),ge(0,"div",1),F(1,"div",2,0),W(3),N(),ge(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),zt=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t})}return t})();var Wt=new $("MatFormField"),La=new $("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ia="fill",sm="auto",Ra="fixed",lm="translateY(-50%)",dm=(()=>{class t{_elementRef=d(re);_changeDetectorRef=d(Yi);_dir=d(rr);_platform=d(Ae);_idGenerator=d(ke);_ngZone=d(R);_injector=d(Gt);_defaults=d(La,{optional:!0});_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=Vi(pi);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Ee(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||sm}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearance}set appearance(e){let i=this._appearance,o=e||this._defaults?.appearance||Ia;this._appearance=o,this._appearance==="outline"&&this._appearance!==i&&(this._needsOutlineLabelOffsetUpdate=!0)}_appearance=Ia;get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Ra}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Ra}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new h;_isFocused=null;_explicitFormFieldControl;_needsOutlineLabelOffsetUpdate=!1;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_animationsDisabled;constructor(){let e=this._defaults;e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),this._animationsDisabled=d(zi,{optional:!0})==="NoopAnimations"}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=Xe(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let i=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),i.controlType&&this._elementRef.nativeElement.classList.add(o+i.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=i.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=i.stateChanges.pipe(Ri([void 0,void 0]),xe(()=>[i.errorState,i.userAriaDescribedBy]),Oi(),ve(([[a,n],[s,l]])=>a!==s||n!==l)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),i.ngControl&&i.ngControl.valueChanges&&(this._valueChanges=i.ngControl.valueChanges.pipe(he(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),ki(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),Wi(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(he(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=Xe(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let i=this._hintChildren?this._hintChildren.find(a=>a.align==="start"):null,o=this._hintChildren?this._hintChildren.find(a=>a.align==="end"):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),o&&e.push(o.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let e=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){e.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let i=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,a=this._iconSuffixContainer?.nativeElement,n=this._textSuffixContainer?.nativeElement,s=i?.getBoundingClientRect().width??0,l=o?.getBoundingClientRect().width??0,f=a?.getBoundingClientRect().width??0,u=n?.getBoundingClientRect().width??0,m=this._dir.value==="rtl"?"-1":"1",c=`${s+l}px`,p=`calc(${m} * (${c} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;e.style.transform=`var(
3
+ --mat-mdc-form-field-label-transform,
4
+ ${lm} translateX(${p})
5
+ )`;let y=s+l+f+u;this._elementRef.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${y}px)`)}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Qe({type:t,selectors:[["mat-form-field"]],contentQueries:function(i,o,a){if(i&1&&(qi(a,o._labelChild,pi,5),we(a,zt,5),we(a,Na,5),we(a,bi,5),we(a,gi,5),we(a,hi,5)),i&2){Gi();let n;D(n=E())&&(o._formFieldControl=n.first),D(n=E())&&(o._prefixChildren=n),D(n=E())&&(o._suffixChildren=n),D(n=E())&&(o._errorChildren=n),D(n=E())&&(o._hintChildren=n)}},viewQuery:function(i,o){if(i&1&&(G(Rc,5),G(Nc,5),G(Pc,5),G(Lc,5),G(Uc,5),G(Ea,5),G(Fa,5),G(Oa,5)),i&2){let a;D(a=E())&&(o._textField=a.first),D(a=E())&&(o._iconPrefixContainer=a.first),D(a=E())&&(o._textPrefixContainer=a.first),D(a=E())&&(o._iconSuffixContainer=a.first),D(a=E())&&(o._textSuffixContainer=a.first),D(a=E())&&(o._floatingLabel=a.first),D(a=E())&&(o._notchedOutline=a.first),D(a=E())&&(o._lineRipple=a.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:40,hostBindings:function(i,o){i&2&&q("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-focused",o._control.focused)("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Te([{provide:Wt,useExisting:t},{provide:Pa,useExisting:t}])],ngContentSelectors:$c,decls:20,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(i,o){if(i&1){let a=Hi();Kt(jc),M(0,Bc,1,1,"ng-template",null,0,Zi),F(2,"div",6,1),Ye("click",function(s){return Ui(a),ji(o._control.onContainerClick(s))}),M(4,Vc,1,0,"div",7),F(5,"div",8),M(6,Gc,2,2,"div",9)(7,Kc,3,0,"div",10)(8,Qc,3,0,"div",11),F(9,"div",12),M(10,Zc,1,1,null,13),W(11),N(),M(12,Yc,3,0,"div",14)(13,Xc,3,0,"div",15),N(),M(14,em,1,0,"div",16),N(),F(15,"div",17),Ji(16),F(17,"div",18),M(18,tm,1,0)(19,rm,4,1),N()()}if(i&2){let a;C(2),q("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),C(2),O(!o._hasOutline()&&!o._control.disabled?4:-1),C(2),O(o._hasOutline()?6:-1),C(),O(o._hasIconPrefix?7:-1),C(),O(o._hasTextPrefix?8:-1),C(2),O(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),C(2),O(o._hasTextSuffix?12:-1),C(),O(o._hasIconSuffix?13:-1),C(),O(o._hasOutline()?-1:14),C(),q("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let n=o._getSubscriptMessageType();C(2),q("mat-mdc-form-field-error-wrapper",n==="error")("mat-mdc-form-field-hint-wrapper",n==="hint"),C(),O((a=n)==="error"?18:a==="hint"?19:-1)}},dependencies:[Ea,Fa,Xi,Oa,hi],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline));border-width:var(--mdc-outlined-text-field-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
6
+ `],encapsulation:2,changeDetection:0})}return t})();var Bt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ye({type:t});static \u0275inj=_e({imports:[De,ir,De]})}return t})();var fm=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Qe({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}
7
+ `],encapsulation:2,changeDetection:0})}return t})(),cm={passive:!0},Ua=(()=>{class t{_platform=d(Ae);_ngZone=d(R);_renderer=d(Bi).createRenderer(null,null);_styleLoader=d(tr);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return yi;this._styleLoader.load(fm);let i=Yt(e),o=this._monitoredElements.get(i);if(o)return o.subject;let a=new h,n="cdk-text-field-autofilled",s=f=>{f.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(n)?(i.classList.add(n),this._ngZone.run(()=>a.next({target:f.target,isAutofilled:!0}))):f.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(n)&&(i.classList.remove(n),this._ngZone.run(()=>a.next({target:f.target,isAutofilled:!1})))},l=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),er(this._renderer,i,"animationstart",s,cm)));return this._monitoredElements.set(i,{subject:a,unlisten:l}),a}stopMonitoring(e){let i=Yt(e),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ja=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ye({type:t});static \u0275inj=_e({})}return t})();var $a=new $("MAT_INPUT_VALUE_ACCESSOR");var za=(()=>{class t{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Vt=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(r,e,i,o,a){this._defaultMatcher=r,this.ngControl=e,this._parentFormGroup=i,this._parentForm=o,this._stateChanges=a}updateErrorState(){let r=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,a=i?.isErrorState(o,e)??!1;a!==r&&(this.errorState=a,this._stateChanges.next())}};var mm=["button","checkbox","file","hidden","image","radio","range","reset","submit"],um=new $("MAT_INPUT_CONFIG"),WS=(()=>{class t{_elementRef=d(re);_platform=d(Ae);ngControl=d(ar,{optional:!0,self:!0});_autofillMonitor=d(Ua);_ngZone=d(R);_formField=d(Wt,{optional:!0});_renderer=d(Ke);_uid=d(ke).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=d(um,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_formFieldDescribedBy;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new h;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=Ee(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(or.required)??!1}set required(e){this._required=Ee(e)}_required;get type(){return this._type}set type(e){let i=this._type;this._type=e||"text",this._validateType(),!this._isTextarea&&Xt().has(this._type)&&(this._elementRef.nativeElement.type=this._type),this._type!==i&&this._ensureWheelDefaultBehavior()}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Ee(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Xt().has(e));constructor(){let e=d(nr,{optional:!0}),i=d(sr,{optional:!0}),o=d(za),a=d($a,{optional:!0,self:!0}),n=this._elementRef.nativeElement,s=n.nodeName.toLowerCase();a?$i(a.value)?this._signalBasedValueAccessor=a:this._inputValueAccessor=a:this._inputValueAccessor=n,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(n,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Vt(o,this.ngControl,i,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=s==="select",this._isTextarea=s==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=n.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Zt(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){mm.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}setDescribedByIds(e){let i=this._elementRef.nativeElement,o=i.getAttribute("aria-describedby"),a;if(o){let n=this._formFieldDescribedBy||e;a=e.concat(o.split(" ").filter(s=>s&&!n.includes(s)))}else a=e;this._formFieldDescribedBy=e,a.length?i.setAttribute("aria-describedby",a.join(" ")):i.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let i=e.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_webkitBlinkWheelListener=()=>{};_ensureWheelDefaultBehavior(){this._cleanupWebkitWheel?.(),this._type==="number"&&(this._platform.BLINK||this._platform.WEBKIT)&&(this._cleanupWebkitWheel=this._renderer.listen(this._elementRef.nativeElement,"wheel",this._webkitBlinkWheelListener))}_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,o){i&1&&Ye("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),i&2&&(Ze("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),Je("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),q("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Jt]},exportAs:["matInput"],features:[Te([{provide:zt,useExisting:t}]),Li]})}return t})(),BS=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ye({type:t});static \u0275inj=_e({imports:[De,Bt,Bt,ja,De]})}return t})();export{ae as a,et as b,gr as c,Me as d,ii as e,ur as f,tu as g,kc as h,di as i,P as j,hf as k,qe as l,Ec as m,Bo as n,Vo as o,mi as p,wy as q,Da as r,pi as s,om as t,am as u,zt as v,Wt as w,La as x,dm as y,Bt as z,za as A,Vt as B,WS as C,BS as D};
@@ -0,0 +1 @@
1
+ import{d as T,e as U,h as F,i as O,j as A,k as N}from"./chunk-I6I4BVGS.js";import{a as H}from"./chunk-FT5BOMBZ.js";import{C as K,s as j,t as k,y as z}from"./chunk-2HWSXOJH.js";import{Cc as D,Dc as n,Ea as m,Ec as h,Fa as p,Fc as I,Hb as y,Ic as f,Jc as M,Kc as C,Nb as S,Pc as _,Zb as l,Ze as P,cf as B,df as L,gf as W,ic as e,jc as t,jf as R,kc as g,kf as q,oc as x,qc as v,rc as b,td as E,tf as G,ua as c,ub as a,wf as Y,xe as V}from"./chunk-JZ455OYD.js";var J=()=>({standalone:!1});function Q(o,X){if(o&1&&(e(0,"div",10),g(1,"i",11),n(2),t()),o&2){let u=b();a(2),I(" ",u.data.error," ")}}var se=(()=>{class o{dialogRef=c(T);data=c(U);titleDialog="Sign in to Signal K";saveCredential(){this.data.error=null,this.dialogRef.close(this.data)}static \u0275fac=function(s){return new(s||o)};static \u0275cmp=y({type:o,selectors:[["app-modal-user-credential"]],decls:26,vars:10,consts:[["login","ngForm"],["name","login",3,"ngSubmit"],["mat-dialog-title",""],["class","errorMsgBox",4,"ngIf"],[1,"login-grid"],[1,"userLoginInput"],["type","text","autocomplete","username","id","username","matInput","","placeholder","User ID","name","username","required","",3,"ngModelChange","ngModel","ngModelOptions"],["type","password","autocomplete","current-password","id","current-password","matInput","","placeholder","Password","name","current-password","required","",3,"ngModelChange","ngModel","ngModelOptions"],["mat-flat-button","","type","button",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"],[1,"errorMsgBox"],["aria-hidden","true",1,"fa-solid","fa-times-circle",2,"color","red","padding-right","5px"]],template:function(s,i){if(s&1){let d=x();e(0,"form",1,0),v("ngSubmit",function(){return m(d),p(i.saveCredential())}),e(2,"span",2),n(3),t(),e(4,"mat-dialog-content"),S(5,Q,3,1,"div",3),g(6,"br"),e(7,"div",4)(8,"mat-form-field",5)(9,"mat-label"),n(10,"User ID"),t(),e(11,"input",6),C("ngModelChange",function(r){return m(d),M(i.data.user,r)||(i.data.user=r),p(r)}),t(),e(12,"mat-error"),n(13," You must enter a User ID value "),t()(),e(14,"mat-form-field",5)(15,"mat-label"),n(16,"Password"),t(),e(17,"input",7),C("ngModelChange",function(r){return m(d),M(i.data.password,r)||(i.data.password=r),p(r)}),t(),e(18,"mat-error"),n(19," You must enter a password value "),t()()()(),g(20,"mat-divider"),e(21,"mat-dialog-actions")(22,"button",8),n(23,"Cancel"),t(),e(24,"button",9),n(25,"Sign in"),t()()()}if(s&2){let d=D(1);a(3),h(i.titleDialog),a(2),l("ngIf",i.data.error),a(6),f("ngModel",i.data.user),l("ngModelOptions",_(8,J)),a(6),f("ngModel",i.data.password),l("ngModelOptions",_(9,J)),a(5),l("mat-dialog-close",!1),a(2),l("disabled",!d.valid)}},dependencies:[Y,q,P,B,L,G,R,W,O,A,E,z,j,K,k,H,N,V,F],styles:[".errorMsgBox[_ngcontent-%COMP%]{background-color:#fff8dc;color:#2f4f4f;display:flex;padding:5px;font-family:Arial,Times,serif;font-size:14px}.login-grid[_ngcontent-%COMP%]{display:grid;gap:10px;padding-left:10px;padding-right:10px}.userLoginInput[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return o})();export{se as a};
@@ -1,2 +1,2 @@
1
- import{a as be,b as xe}from"./chunk-AB7BX4CL.js";import{a as Se,b as De,c as Me,d as ve,e as Pe,f as T,g as Oe,h as Te,i as Ie,j as ke,k as Re,l as Ee,m as Fe,n as I,o as Ve,p as k,q as He,r as Ue}from"./chunk-I4I2PP4V.js";import"./chunk-MR7RUNKP.js";import{a as ye}from"./chunk-2QUOTZ6A.js";import{d as _e,f as we,j as Ce}from"./chunk-QMIJ5LO6.js";import{o as ie,p as re}from"./chunk-6QHCHGTT.js";import{d as le,e as se,g as pe,h as ce,i as me,j as de,k as ue}from"./chunk-CD375FDG.js";import"./chunk-SGYCFQGT.js";import{A as fe,D as ge,E as he,j as U,k as ae,r as ne,t as P,z as O}from"./chunk-EQ5CPWIU.js";import{Cc as K,Dc as l,Ea as C,Ec as v,Fa as b,Fc as _,Hb as h,Ic as W,Jc as G,Kc as J,Ma as Q,Nb as m,O as A,Rc as X,Sa as g,Sc as Y,Yd as oe,Zb as c,a as R,b as E,cd as Z,dc as x,gc as N,hc as q,ic as i,ja as $,jc as o,kc as f,lc as y,m as z,mc as S,oc as D,qc as M,rc as u,rd as ee,ua as d,ub as s,vd as te,ve as B,wc as F,xc as V,yc as H,ye as j,z as L}from"./chunk-Y7X77HSW.js";function Le(e,r){e&1&&(i(0,"span",3),l(1,"Boolean"),o())}function Ae(e,r){e&1&&(i(0,"span",3),l(1,"String"),o())}function $e(e,r){e&1&&(i(0,"span",3),l(1,"String"),o())}function Qe(e,r){e&1&&(i(0,"span",3),l(1,"Object"),o())}function Ne(e,r){if(e&1){let t=D();i(0,"button",5),M("click",function(){C(t);let n=u();return b(n.openDialog())}),l(1),o()}if(e&2){let t=u();s(),v(t.selectedUnit)}}function qe(e,r){if(e&1&&(i(0,"mat-option",8),l(1),o()),e&2){let t=r.$implicit;c("value",t.measure),s(),_(" ",t.measure," ")}}function Ke(e,r){if(e&1&&(i(0,"mat-optgroup",6),m(1,qe,2,2,"mat-option",7),o()),e&2){let t=r.$implicit;c("label",t.group),s(),c("ngForOf",t.units)}}var Be=(()=>{class e{_units=d(be);_dialog=d(pe);path=g.required();source=g(void 0);pathValue=g(void 0);type=g.required();units=null;selectedUnit="unitless";ngOnInit(){this.units=this._units.getConversionsForPath(this.path()),this.selectedUnit=this.units.base}convertValue(t,a){return a==="number"?this._units.convertToUnit(this.selectedUnit,t):t}openDialog(){this._dialog.open(We,{data:{selectedUnit:this.selectedUnit,units:this.units}}).afterClosed().subscribe(a=>{a&&(this.selectedUnit=a)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["data-inspector-row"]],inputs:{path:[1,"path"],source:[1,"source"],pathValue:[1,"pathValue"],type:[1,"type"]},decls:10,vars:3,consts:[[1,"cell-source","cells"],[1,"cell-value","cells"],[1,"cell-action","cells"],[1,"path-type"],["mat-stroked-button","",1,"change-units-btn"],["mat-stroked-button","",1,"change-units-btn",3,"click"]],template:function(a,n){if(a&1&&(i(0,"mat-cell",0),l(1),o(),i(2,"mat-cell",1),l(3),o(),i(4,"mat-cell",2),m(5,Le,2,0,"span",3)(6,Ae,2,0,"span",3)(7,$e,2,0,"span",3)(8,Qe,2,0,"span",3)(9,Ne,2,1,"button",4),o()),a&2){let p;s(),v(n.source()),s(2),v(n.convertValue(n.pathValue(),n.type())),s(2),x((p=n.type())==="boolean"?5:p==="string"?6:p==="Date"?7:p==="object"?8:9)}},dependencies:[T,j,B],styles:[`.change-units-btn{width:100%}.cell-source:first-of-type{padding-left:0;flex:1 1 30%}.cells{border:0px solid white;word-break:break-word;overflow-wrap:break-word}.cell-value{justify-content:flex-start;flex:1 1 70%;padding:0}.cell-action{justify-content:end;flex:0 0 107px}.cell-action:last-of-type{padding:0}.path-type{width:100%;height:40px;align-content:center;text-align:center;color:var(--mat-sys-primary)}
1
+ import{a as be,b as xe}from"./chunk-BX746I2R.js";import{a as Se,b as De,c as Me,d as ve,e as Pe,f as T,g as Oe,h as Te,i as Ie,j as ke,k as Re,l as Ee,m as Fe,n as I,o as Ve,p as k,q as He,r as Ue}from"./chunk-L52GBBZB.js";import"./chunk-DHPOFP3B.js";import{a as ye}from"./chunk-RRAVS5O5.js";import{d as _e,f as we,j as Ce}from"./chunk-SD22YSTB.js";import{o as ie,p as re}from"./chunk-UXHQY4AJ.js";import{d as le,e as se,g as pe,h as ce,i as me,j as de,k as ue}from"./chunk-I6I4BVGS.js";import"./chunk-SGYCFQGT.js";import{C as ge,D as he,j as U,k as ae,q as ne,s as P,y as O,z as fe}from"./chunk-2HWSXOJH.js";import{Ae as j,Cc as K,Dc as l,Ea as C,Ec as v,Fa as b,Fc as _,Hb as h,Ic as W,Jc as G,Kc as J,Ma as Q,Nb as m,O as A,Rc as X,Sa as g,Sc as Y,Zb as c,_d as oe,a as R,b as E,dc as x,dd as Z,gc as N,hc as q,ic as i,ja as $,jc as o,kc as f,lc as y,m as z,mc as S,oc as D,qc as M,rc as u,sd as ee,ua as d,ub as s,wc as F,xc as V,xd as te,xe as B,yc as H,z as L}from"./chunk-JZ455OYD.js";function Le(e,r){e&1&&(i(0,"span",3),l(1,"Boolean"),o())}function Ae(e,r){e&1&&(i(0,"span",3),l(1,"String"),o())}function $e(e,r){e&1&&(i(0,"span",3),l(1,"String"),o())}function Qe(e,r){e&1&&(i(0,"span",3),l(1,"Object"),o())}function Ne(e,r){if(e&1){let t=D();i(0,"button",5),M("click",function(){C(t);let n=u();return b(n.openDialog())}),l(1),o()}if(e&2){let t=u();s(),v(t.selectedUnit)}}function qe(e,r){if(e&1&&(i(0,"mat-option",8),l(1),o()),e&2){let t=r.$implicit;c("value",t.measure),s(),_(" ",t.measure," ")}}function Ke(e,r){if(e&1&&(i(0,"mat-optgroup",6),m(1,qe,2,2,"mat-option",7),o()),e&2){let t=r.$implicit;c("label",t.group),s(),c("ngForOf",t.units)}}var Be=(()=>{class e{_units=d(be);_dialog=d(pe);path=g.required();source=g(void 0);pathValue=g(void 0);type=g.required();units=null;selectedUnit="unitless";ngOnInit(){this.units=this._units.getConversionsForPath(this.path()),this.selectedUnit=this.units.base}convertValue(t,a){return a==="number"?this._units.convertToUnit(this.selectedUnit,t):t}openDialog(){this._dialog.open(We,{data:{selectedUnit:this.selectedUnit,units:this.units}}).afterClosed().subscribe(a=>{a&&(this.selectedUnit=a)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["data-inspector-row"]],inputs:{path:[1,"path"],source:[1,"source"],pathValue:[1,"pathValue"],type:[1,"type"]},decls:10,vars:3,consts:[[1,"cell-source","cells"],[1,"cell-value","cells"],[1,"cell-action","cells"],[1,"path-type"],["mat-stroked-button","",1,"change-units-btn"],["mat-stroked-button","",1,"change-units-btn",3,"click"]],template:function(a,n){if(a&1&&(i(0,"mat-cell",0),l(1),o(),i(2,"mat-cell",1),l(3),o(),i(4,"mat-cell",2),m(5,Le,2,0,"span",3)(6,Ae,2,0,"span",3)(7,$e,2,0,"span",3)(8,Qe,2,0,"span",3)(9,Ne,2,1,"button",4),o()),a&2){let p;s(),v(n.source()),s(2),v(n.convertValue(n.pathValue(),n.type())),s(2),x((p=n.type())==="boolean"?5:p==="string"?6:p==="Date"?7:p==="object"?8:9)}},dependencies:[T,j,B],styles:[`.change-units-btn{width:100%}.cell-source:first-of-type{padding-left:0;flex:1 1 30%}.cells{border:0px solid white;word-break:break-word;overflow-wrap:break-word}.cell-value{justify-content:flex-start;flex:1 1 70%;padding:0}.cell-action{justify-content:end;flex:0 0 107px}.cell-action:last-of-type{padding:0}.path-type{width:100%;height:40px;align-content:center;text-align:center;color:var(--mat-sys-primary)}
2
2
  `],encapsulation:2})}return e})(),We=(()=>{class e{dialogRef=d(le);data=d(se);selectedUnit=null;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["dialog-unit-selector"]],decls:13,vars:3,consts:[["mat-dialog-title",""],["appearance","outline","floatLabel","always",2,"padding-top","15px","padding-bottom","15px"],[3,"valueChange","value"],[3,"label",4,"ngFor","ngForOf"],["mat-flat-button","","mat-dialog-close",""],["mat-flat-button","",3,"mat-dialog-close"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(a,n){a&1&&(i(0,"h2",0),l(1,"Select Unit type"),o(),i(2,"mat-dialog-content")(3,"mat-form-field",1)(4,"mat-label"),l(5,"Unit"),o(),i(6,"mat-select",2),J("valueChange",function(w){return G(n.data.selectedUnit,w)||(n.data.selectedUnit=w),w}),m(7,Ke,2,2,"mat-optgroup",3),o()()(),i(8,"mat-dialog-actions")(9,"button",4),l(10,"Cancel"),o(),i(11,"button",5),l(12,"Ok"),o()()),a&2&&(s(6),W("value",n.data.selectedUnit),s(),c("ngForOf",n.data.units.conversions),s(4),c("mat-dialog-close",n.data.selectedUnit))},dependencies:[me,de,O,P,Ce,ee,_e,we,ue,j,B,ce],encapsulation:2})}return e})();var Ge=(e,r)=>r.key;function Je(e,r){e&1&&(i(0,"mat-header-cell",19),l(1," Path "),o())}function Xe(e,r){if(e&1&&(i(0,"mat-cell",20),l(1),o()),e&2){let t=r.$implicit;s(),_(" ",t.path," ")}}function Ye(e,r){e&1&&(i(0,"mat-header-cell",21),l(1," PUT Support "),o())}function Ze(e,r){e&1&&(i(0,"mat-icon",23),l(1,"check_circle"),o())}function et(e,r){if(e&1&&(i(0,"mat-cell",22),m(1,Ze,2,0,"mat-icon",23),o()),e&2){let t=r.$implicit;s(),x(t.meta!=null&&t.meta.supportsPut?1:-1)}}function tt(e,r){e&1&&(i(0,"mat-header-cell",24),l(1," Source "),o())}function at(e,r){if(e&1&&f(0,"data-inspector-row",27),e&2){let t=r.$implicit,a=u().$implicit,n=u();c("path",a.path)("source",n.getSourceKey(t))("pathValue",n.getSourceValue(t))("type",a.type)}}function nt(e,r){if(e&1&&(i(0,"mat-cell",25)(1,"div",26),N(2,at,1,4,"data-inspector-row",27,Ge),X(4,"keyvalue"),o()()),e&2){let t=r.$implicit;s(2),q(Y(4,0,t.sources))}}function ot(e,r){e&1&&f(0,"mat-header-row",28)}function it(e,r){e&1&&f(0,"mat-row",29)}function rt(e,r){if(e&1&&(i(0,"tr",30)(1,"td",31),l(2),o()()),e&2){u();let t=K(6);s(2),_('No data matching the filter "',t.value,'"')}}var Qt=(()=>{class e{dataService=d(ne);destroyRef=d(Q);_responsive=d(oe);isPhonePortrait;filterSubject=new z;paginator;sort;pageTitle="Data Inspector";pageSize=25;hidePageSize=!1;showFirstLastButtons=!0;showPageSizeOptions=[5,10,25,100];tableData=new Fe([]);displayedColumns=["path","supportsPut","defaultSource"];constructor(){this.filterSubject.pipe(A(500)).pipe(U(this.destroyRef)).subscribe(t=>{this.tableData.filter=t.trim().toLowerCase(),this.tableData.paginator&&this.tableData.paginator.firstPage()}),this.isPhonePortrait=ae(this._responsive.observe(xe.HandsetPortrait)),Z(()=>{this.isPhonePortrait().matches?(this.hidePageSize=!0,this.showFirstLastButtons=!1,this.showPageSizeOptions=[]):(this.hidePageSize=!1,this.showFirstLastButtons=!0,this.showPageSizeOptions=[5,10,25,100])})}ngAfterViewInit(){this.dataService.startSkDataFullTree().pipe(L(t=>t.filter(a=>Object.keys(a.sources||{}).length>0).map(a=>E(R({},a),{sources:a.type&&a.type.includes("object")&&typeof a.sources=="object"?Object.fromEntries(Object.entries(a.sources).map(([n,p])=>[n,E(R({},p),{sourceValue:typeof p.sourceValue=="object"?JSON.stringify(p.sourceValue):p.sourceValue})])):a.sources}))),$(500),U(this.destroyRef)).subscribe(t=>{this.tableData.data=t}),this.tableData.paginator=this.paginator,this.tableData.sort=this.sort,this.tableData.sortingDataAccessor=(t,a)=>{switch(a){case"supportsPut":return t.meta?.supportsPut?1:0;default:return t[a]}}}applyFilter(t){let a=t.target.value;this.filterSubject.next(a)}trackByPath(t,a){return`${a.path}`}trackBySource(t,a){return`${a.key}`}getSourceKey(t){return String(t.key)}getSourceValue(t){return t.value.sourceValue}ngOnDestroy(){this.filterSubject.complete(),this.dataService.stopSkDataFullTree()}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["data-inspector"]],viewQuery:function(a,n){if(a&1&&(F(I,5),F(k,5)),a&2){let p;V(p=H())&&(n.paginator=p.first),V(p=H())&&(n.sort=p.first)}},decls:21,vars:10,consts:[["input",""],[3,"pageTitle"],[1,"data-inspector-container"],[1,"filter-field"],["matInput","","placeholder","Ex: navigation","value","self.",3,"keyup"],["matSort","","matSortActive","path","matSortDirection","asc",1,"table-content-area","mat-elevation-z8",3,"dataSource","trackBy"],["matColumnDef","path"],["class","pathHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","pathCell row-cell",4,"matCellDef"],["matColumnDef","supportsPut"],["class","putHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","putCell row-cell",4,"matCellDef"],["matColumnDef","defaultSource"],["class","dataHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","dataCell row-cell",4,"matCellDef"],["class","headerRow",4,"matHeaderRowDef","matHeaderRowDefSticky"],["class","table-row",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[1,"paginator",3,"pageSize","pageSizeOptions","hidePageSize","showFirstLastButtons"],["mat-sort-header","",1,"pathHeader"],[1,"pathCell","row-cell"],["mat-sort-header","",1,"putHeader"],[1,"putCell","row-cell"],["matTooltip","Supports PUT operation",1,"put-icon"],["mat-sort-header","",1,"dataHeader"],[1,"dataCell","row-cell"],[1,"flex-container"],[1,"source-sub-row",3,"path","source","pathValue","type"],[1,"headerRow"],[1,"table-row"],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(a,n){if(a&1){let p=D();f(0,"page-header",1),i(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),l(4,"Filter"),o(),i(5,"input",4,0),M("keyup",function(je){return C(p),b(n.applyFilter(je))}),o()(),i(7,"mat-table",5),y(8,6),m(9,Je,2,0,"mat-header-cell",7)(10,Xe,2,1,"mat-cell",8),S(),y(11,9),m(12,Ye,2,0,"mat-header-cell",10)(13,et,2,1,"mat-cell",11),S(),y(14,12),m(15,tt,2,0,"mat-header-cell",13)(16,nt,5,2,"mat-cell",14),S(),m(17,ot,1,0,"mat-header-row",15)(18,it,1,0,"mat-row",16)(19,rt,3,1,"tr",17),o(),f(20,"mat-paginator",18),o()}a&2&&(c("pageTitle",n.pageTitle),s(7),c("dataSource",n.tableData)("trackBy",n.trackByPath),s(10),c("matHeaderRowDef",n.displayedColumns)("matHeaderRowDefSticky",!0),s(),c("matRowDefColumns",n.displayedColumns),s(2),c("pageSize",n.pageSize)("pageSizeOptions",n.showPageSizeOptions)("hidePageSize",n.hidePageSize)("showFirstLastButtons",n.showFirstLastButtons))},dependencies:[fe,O,P,Ee,Se,Me,Oe,ve,De,Te,Pe,T,Ie,ke,Re,he,ge,Ve,I,Ue,k,He,Be,te,ye,re,ie],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.data-inspector-container[_ngcontent-%COMP%]{margin-left:24px;margin-right:24px;height:calc(100% - 63px)}.table-content-area[_ngcontent-%COMP%]{height:calc(100% - 142px);overflow-y:scroll;width:100%;scroll-behavior:smooth}.mat-column-path[_ngcontent-%COMP%]{flex:0 0 50%;width:50%}.mat-mdc-table[_ngcontent-%COMP%]{overflow:auto}.paginator[_ngcontent-%COMP%]{width:100%;height:56px;background-color:var(--mat-sys-background)}.filter-field[_ngcontent-%COMP%]{padding:15px 0;width:100%;height:86px}.pathHeader[_ngcontent-%COMP%]{flex:1 1 45%}.putHeader[_ngcontent-%COMP%]{flex:1 1 10%}.dataHeader[_ngcontent-%COMP%]{flex:1 1 45%}.table-row[_ngcontent-%COMP%]{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, .12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid}.row-cell[_ngcontent-%COMP%]{border-bottom-color:#fff;border-bottom-width:0px;border-bottom-style:solid}.pathCell[_ngcontent-%COMP%]{flex:1 1 45%;word-break:break-word;overflow-wrap:break-word}.putCell[_ngcontent-%COMP%]{flex:1 1 10%}.dataCell[_ngcontent-%COMP%]{flex:1 1 45%;flex-flow:column;flex-wrap:nowrap;gap:2px}.flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;gap:5px;margin:5px 0;height:100%;width:100%}.source-sub-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px;width:100%}.put-icon[_ngcontent-%COMP%]{color:var(--kip-starboard-color)}@media screen and (max-width: 750px){.pathHeader[_ngcontent-%COMP%], .dataHeader[_ngcontent-%COMP%]{flex:1 1 50%}.dataCell[_ngcontent-%COMP%]{flex:1 1 100%}.dataCell[_ngcontent-%COMP%]{flex:1 1 100%;margin-left:24px}.mat-mdc-table[_ngcontent-%COMP%] .mat-mdc-row[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap}.mat-mdc-table[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]:before{content:attr(data-label);float:left;padding-right:5px}mat-row[_ngcontent-%COMP%]:after{min-height:auto;padding-bottom:10px}.dataRow[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.actionCell[_ngcontent-%COMP%]{margin-left:24px}}"]})}return e})();export{Qt as DataInspectorComponent};