@mxtommy/kip 3.9.0-beta.2 → 3.9.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +1 -1
- package/.github/instructions/angular.instructions.md +46 -0
- package/README.md +49 -12
- package/package.json +2 -4
- package/public/3rdpartylicenses.txt +77 -77
- package/public/app-help.component.css.map +7 -0
- package/public/app.component.css.map +7 -0
- package/public/assets/help-docs/configuration.md +4 -4
- package/public/assets/help-docs/dashboards.md +4 -2
- package/public/assets/svg/icons.svg +1 -1
- package/public/boolean-control-config.component.css.map +7 -0
- package/public/boolean-multicontrol-options.component.css.map +7 -0
- package/public/chunk-3VR3EA35.js +1022 -0
- package/public/chunk-3VR3EA35.js.map +1 -0
- package/public/chunk-63ILPRXC.js +2091 -0
- package/public/chunk-63ILPRXC.js.map +1 -0
- package/public/chunk-65ZWQBS6.js +3102 -0
- package/public/chunk-65ZWQBS6.js.map +1 -0
- package/public/chunk-B3LKEWZP.js +4950 -0
- package/public/chunk-B3LKEWZP.js.map +1 -0
- package/public/chunk-BIBIW64D.js +16773 -0
- package/public/chunk-BIBIW64D.js.map +1 -0
- package/public/chunk-BM53SC5N.js +77 -0
- package/public/chunk-BM53SC5N.js.map +7 -0
- package/public/chunk-D7ILNFDM.js +3059 -0
- package/public/chunk-D7ILNFDM.js.map +1 -0
- package/public/chunk-E24UNLSJ.js +2228 -0
- package/public/chunk-E24UNLSJ.js.map +1 -0
- package/public/chunk-EUIZ2AXR.js +5237 -0
- package/public/chunk-EUIZ2AXR.js.map +1 -0
- package/public/chunk-J42S2ELC.js +5927 -0
- package/public/chunk-J42S2ELC.js.map +1 -0
- package/public/chunk-KC22A6VH.js +17 -0
- package/public/chunk-KC22A6VH.js.map +7 -0
- package/public/chunk-MCEJWZB2.js +116 -0
- package/public/chunk-MCEJWZB2.js.map +1 -0
- package/public/chunk-NYZ6SXFB.js +4752 -0
- package/public/chunk-NYZ6SXFB.js.map +1 -0
- package/public/chunk-OELNV3DP.js +89 -0
- package/public/chunk-OELNV3DP.js.map +7 -0
- package/public/chunk-SDOP6T56.js +42377 -0
- package/public/chunk-SDOP6T56.js.map +1 -0
- package/public/chunk-SGHFX2SF.js +343 -0
- package/public/chunk-SGHFX2SF.js.map +7 -0
- package/public/chunk-U2DCSTRY.js +159 -0
- package/public/chunk-U2DCSTRY.js.map +7 -0
- package/public/chunk-UQYTD5AC.js +2723 -0
- package/public/chunk-UQYTD5AC.js.map +1 -0
- package/public/chunk-X2FXU4ZV.js +13727 -0
- package/public/chunk-X2FXU4ZV.js.map +1 -0
- package/public/chunk-XSABJ5NZ.js +272 -0
- package/public/chunk-XSABJ5NZ.js.map +7 -0
- package/public/chunk-Y6N6O2IP.js +19852 -0
- package/public/chunk-Y6N6O2IP.js.map +1 -0
- package/public/chunk-YGJLBLOX.js +2708 -0
- package/public/chunk-YGJLBLOX.js.map +1 -0
- package/public/chunk-YT33DHC3.js +591 -0
- package/public/chunk-YT33DHC3.js.map +7 -0
- package/public/chunk-YZXYVP72.js +4934 -0
- package/public/chunk-YZXYVP72.js.map +1 -0
- package/public/config.component.css.map +7 -0
- package/public/dashboard-scroller.component.css.map +7 -0
- package/public/dashboard.component.css.map +7 -0
- package/public/dashboards-editor.component.css.map +7 -0
- package/public/data-inspector-row.component.css.map +7 -0
- package/public/data-inspector.component.css.map +7 -0
- package/public/dataset-chart-options.component.css.map +7 -0
- package/public/datasets.component.css.map +7 -0
- package/public/dialog-confirmation.component.css.map +7 -0
- package/public/dialog-dashboard-page-editor.component.css.map +7 -0
- package/public/dialog-frame.component.css.map +7 -0
- package/public/dialog-name.component.css.map +7 -0
- package/public/display-chart-options.component.css.map +7 -0
- package/public/display.component.css.map +7 -0
- package/public/gauge-steel.component.css.map +7 -0
- package/public/home.component.css.map +7 -0
- package/public/index.html +19 -17
- package/public/main.js +36423 -0
- package/public/main.js.map +1 -0
- package/public/menu-actions.component.css.map +7 -0
- package/public/menu-notifications.component.css.map +7 -0
- package/public/minichart.component.css.map +7 -0
- package/public/modal-user-credential.component.css.map +7 -0
- package/public/modal-widget-config.component.css.map +7 -0
- package/public/notification-badge.component.css.map +7 -0
- package/public/page-header.component.css.map +7 -0
- package/public/path-control-config.component.css.map +7 -0
- package/public/paths-options.component.css.map +7 -0
- package/public/polyfills.js +4422 -0
- package/public/polyfills.js.map +1 -0
- package/public/select-autopilot.component.css.map +7 -0
- package/public/select-icon.component.css.map +7 -0
- package/public/settings.component.css.map +7 -0
- package/public/signalk.component.css.map +7 -0
- package/public/styles.css +1651 -0
- package/public/styles.css.map +7 -0
- package/public/svg-autopilot.component.css.map +7 -0
- package/public/svg-racesteer.component.css.map +7 -0
- package/public/svg-simple-linear-gauge.component.css.map +7 -0
- package/public/svg-windsteer.component.css.map +7 -0
- package/public/tile-large-icon.component.css.map +7 -0
- package/public/units.component.css.map +7 -0
- package/public/upgrade-config.component.css.map +7 -0
- package/public/widget-autopilot.component.css.map +7 -0
- package/public/widget-boolean-switch.component.css.map +7 -0
- package/public/widget-datetime.component.css.map +7 -0
- package/public/widget-freeboardsk.component.css.map +7 -0
- package/public/widget-gauge-ng-compass.component.css.map +7 -0
- package/public/widget-gauge-ng-linear.component.css.map +7 -0
- package/public/widget-gauge-ng-radial.component.css.map +7 -0
- package/public/widget-gauge-steel.component.css.map +7 -0
- package/public/widget-horizon.component.css.map +7 -0
- package/public/widget-host.component.css.map +7 -0
- package/public/widget-iframe.component.css.map +7 -0
- package/public/widget-label.component.css.map +7 -0
- package/public/widget-list-card.component.css.map +7 -0
- package/public/widget-numeric.component.css.map +7 -0
- package/public/widget-position.component.css.map +7 -0
- package/public/widget-race-timer.component.css.map +7 -0
- package/public/widget-racer-line.component.css.map +7 -0
- package/public/widget-racer-timer.component.css.map +7 -0
- package/public/widget-simple-linear.component.css.map +7 -0
- package/public/widget-slider.component.css.map +7 -0
- package/public/widget-text.component.css.map +7 -0
- package/public/widget-title.component.css.map +7 -0
- package/public/widget-tutorial.component.css.map +7 -0
- package/public/widgets-list.component.css.map +7 -0
- package/public/assets/hammer.min.js +0 -7
- package/public/chunk-2YVW3TBK.js +0 -2
- package/public/chunk-35L7BBBD.js +0 -15
- package/public/chunk-3LEMFOCV.js +0 -3
- package/public/chunk-3LJAKLLW.js +0 -1
- package/public/chunk-4JJLPUET.js +0 -60
- package/public/chunk-CBUY7NMR.js +0 -2
- package/public/chunk-CQXWGD3T.js +0 -2
- package/public/chunk-EUFDL4TJ.js +0 -6
- package/public/chunk-FBFTGVZ6.js +0 -1
- package/public/chunk-HCXH72CD.js +0 -5
- package/public/chunk-JY3WVS7C.js +0 -2
- package/public/chunk-KTDDP73O.js +0 -2
- package/public/chunk-NMEZOCU2.js +0 -1
- package/public/chunk-NS2FPVWM.js +0 -4
- package/public/chunk-OSYHJB4F.js +0 -11
- package/public/chunk-PKNLASTF.js +0 -4
- package/public/chunk-Q2Y75POI.js +0 -1
- package/public/chunk-RRTCHHRC.js +0 -3
- package/public/chunk-TA4GACKT.js +0 -4
- package/public/chunk-TXPLRBW5.js +0 -2
- package/public/chunk-VHFBF47T.js +0 -1
- package/public/chunk-VYUMZVH2.js +0 -2
- package/public/chunk-XRGAX4LS.js +0 -2
- package/public/chunk-YNJRIFUM.js +0 -1
- package/public/chunk-ZBCOJLI4.js +0 -6
- package/public/main-XM5EHMUE.js +0 -50
- package/public/polyfills-KH22MU6U.js +0 -2
- package/public/styles-RECKN66R.css +0 -1
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP-ILKS6RVC.woff2 → KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ-MJ3CERJ6.woff2 → KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP-UW3XWY7P.woff2 → KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP-U3JTBV4H.woff2 → KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP-36ULTGLY.woff2 → KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP-5NJLO2HW.woff2 → KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP-2EL65J2O.woff2 → KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP-XWLWMQVU.woff2 → KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ-PWGJWDFE.woff2 → KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP-ITB7NUJC.woff2 → KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP-32PLHKPQ.woff2 → KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP-QPSNQEDD.woff2 → KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP-JKBSJZY3.woff2 → KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP-OG5AHRIX.woff2 → KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz-PPTELUJT.woff2 → KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu4mxKKTU1Kg-SNGEW7FX.woff2 → KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz-DRL4U32S.woff2 → KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu72xKKTU1Kvnz-PRJ7OQMU.woff2 → KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz-HW6RMPJ3.woff2 → KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz-KZD6JQRT.woff2 → KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz-Z72STTMG.woff2 → KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2} +0 -0
- /package/public/media/{flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ-CN2J7AYH.woff2 → flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2} +0 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppSettingsService,
|
|
3
|
+
DataService
|
|
4
|
+
} from "./chunk-BIBIW64D.js";
|
|
5
|
+
import {
|
|
6
|
+
BehaviorSubject,
|
|
7
|
+
Injectable,
|
|
8
|
+
Subject,
|
|
9
|
+
effect,
|
|
10
|
+
inject,
|
|
11
|
+
setClassMetadata,
|
|
12
|
+
signal,
|
|
13
|
+
toSignal,
|
|
14
|
+
untracked,
|
|
15
|
+
ɵɵdefineInjectable
|
|
16
|
+
} from "./chunk-SDOP6T56.js";
|
|
17
|
+
|
|
18
|
+
// package.json
|
|
19
|
+
var package_default = {
|
|
20
|
+
name: "@mxtommy/kip",
|
|
21
|
+
version: "3.9.0-beta.20",
|
|
22
|
+
description: "An advanced and versatile marine instrumentation package to display Signal K data.",
|
|
23
|
+
license: "MIT",
|
|
24
|
+
author: {
|
|
25
|
+
name: "Thomas St.Pierre, David Godin"
|
|
26
|
+
},
|
|
27
|
+
contributors: [
|
|
28
|
+
{
|
|
29
|
+
name: "David Godin",
|
|
30
|
+
email: "godind@hotmail.com"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "Thomas St.Pierre",
|
|
34
|
+
email: "thomas@samoht.ca"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
homepage: "https://github.com/mxtommy/Kip",
|
|
38
|
+
bugs: "https://github.com/mxtommy/Kip/issues",
|
|
39
|
+
repository: {
|
|
40
|
+
type: "git",
|
|
41
|
+
url: "git+https://github.com/mxtommy/Kip.git"
|
|
42
|
+
},
|
|
43
|
+
keywords: [
|
|
44
|
+
"signalk-webapp",
|
|
45
|
+
"signalk-category-instruments",
|
|
46
|
+
"signal k",
|
|
47
|
+
"signalk",
|
|
48
|
+
"instruments",
|
|
49
|
+
"dashboard",
|
|
50
|
+
"marine",
|
|
51
|
+
"nmea"
|
|
52
|
+
],
|
|
53
|
+
signalk: {
|
|
54
|
+
appIcon: "assets/icon-72x72.png",
|
|
55
|
+
displayName: "KIP Instrument MFD"
|
|
56
|
+
},
|
|
57
|
+
scripts: {
|
|
58
|
+
dev: "ng serve --configuration=dev --serve-path=/@mxtommy/kip/",
|
|
59
|
+
"build-dev": "ng build --configuration=dev",
|
|
60
|
+
"build-prod": "ng build --configuration=production",
|
|
61
|
+
test: "ng test",
|
|
62
|
+
lint: "ng lint",
|
|
63
|
+
e2e: "ng e2e"
|
|
64
|
+
},
|
|
65
|
+
devDependencies: {
|
|
66
|
+
"@angular-devkit/build-angular": "^20.1.6",
|
|
67
|
+
"@angular/animations": "20.1.7",
|
|
68
|
+
"@angular/build": "^20.1.6",
|
|
69
|
+
"@angular/cdk": "20.1.6",
|
|
70
|
+
"@angular/cli": "^20.1.6",
|
|
71
|
+
"@angular/common": "20.1.7",
|
|
72
|
+
"@angular/compiler": "20.1.7",
|
|
73
|
+
"@angular/compiler-cli": "20.1.7",
|
|
74
|
+
"@angular/core": "20.1.7",
|
|
75
|
+
"@angular/forms": "20.1.7",
|
|
76
|
+
"@angular/language-service": "20.1.7",
|
|
77
|
+
"@angular/material": "20.1.6",
|
|
78
|
+
"@angular/platform-browser": "20.1.7",
|
|
79
|
+
"@angular/platform-browser-dynamic": "20.1.7",
|
|
80
|
+
"@angular/router": "20.1.7",
|
|
81
|
+
"@godind/ng-canvas-gauges": "^6.2.1",
|
|
82
|
+
"@robloche/chartjs-plugin-streaming": "^3.1.0",
|
|
83
|
+
"@types/canvas-gauges": "^2.1.8",
|
|
84
|
+
"@types/howler": "^2.2.10",
|
|
85
|
+
"@types/jasmine": "~3.6.0",
|
|
86
|
+
"@types/jasminewd2": "^2.0.9",
|
|
87
|
+
"@types/js-quantities": "^1.6.6",
|
|
88
|
+
"@types/lodash-es": "^4.17.9",
|
|
89
|
+
"@types/node": "^24.1.0",
|
|
90
|
+
"@zakj/no-sleep": "^0.13.5",
|
|
91
|
+
"angular-eslint": "20.1.1",
|
|
92
|
+
"chart.js": "^4.4.9",
|
|
93
|
+
"chartjs-adapter-date-fns": "^3.0.0",
|
|
94
|
+
"chartjs-plugin-annotation": "^3.0.1",
|
|
95
|
+
codelyzer: "^6.0.0",
|
|
96
|
+
"compare-versions": "^6.1.1",
|
|
97
|
+
"core-js": "^3.13.1",
|
|
98
|
+
"date-fns": "^2.30.0",
|
|
99
|
+
eslint: "^9.29.0",
|
|
100
|
+
gridstack: "^11.4.0",
|
|
101
|
+
howler: "^2.2.4",
|
|
102
|
+
"jasmine-core": "~4.0.1",
|
|
103
|
+
"jasmine-spec-reporter": "~5.0.0",
|
|
104
|
+
"js-quantities": "^1.8.0",
|
|
105
|
+
karma: "^6.4.4",
|
|
106
|
+
"karma-chrome-launcher": "~3.1.0",
|
|
107
|
+
"karma-cli": "~2.0.0",
|
|
108
|
+
"karma-coverage-istanbul-reporter": "^3.0.3",
|
|
109
|
+
"karma-jasmine": "~4.0.0",
|
|
110
|
+
"karma-jasmine-html-reporter": "^1.6.0",
|
|
111
|
+
"lodash-es": "^4.17.21",
|
|
112
|
+
"ng-packagr": "^20.0.1",
|
|
113
|
+
"ngx-markdown": "^20.0.0",
|
|
114
|
+
"ngx-resize-observer": "^3.1.0",
|
|
115
|
+
protractor: "~7.0.0",
|
|
116
|
+
"pwa-asset-generator": "^8.0.4",
|
|
117
|
+
rxjs: "^7.8.2",
|
|
118
|
+
sass: "^1.49.9",
|
|
119
|
+
screenfull: "^6.0.2",
|
|
120
|
+
steelseries: "^2.0.9",
|
|
121
|
+
"ts-node": "^10.9.2",
|
|
122
|
+
tslib: "^2.6.2",
|
|
123
|
+
typescript: "^5.8.3",
|
|
124
|
+
"zone.js": "^0.15.1"
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// src/app/core/services/app-service.ts
|
|
129
|
+
var AppService = class _AppService {
|
|
130
|
+
MODE_PATH = "self.environment.mode";
|
|
131
|
+
configurableThemeColors = [
|
|
132
|
+
{ label: "Contrast", value: "contrast" },
|
|
133
|
+
{ label: "Blue", value: "blue" },
|
|
134
|
+
{ label: "Green", value: "green" },
|
|
135
|
+
{ label: "Orange", value: "orange" },
|
|
136
|
+
{ label: "Yellow", value: "yellow" },
|
|
137
|
+
{ label: "Pink", value: "pink" },
|
|
138
|
+
{ label: "Purple", value: "purple" },
|
|
139
|
+
{ label: "Grey", value: "grey" }
|
|
140
|
+
];
|
|
141
|
+
snackbarAppNotifications = new Subject();
|
|
142
|
+
// for snackbar message
|
|
143
|
+
cssThemeColorRoles$ = new BehaviorSubject(null);
|
|
144
|
+
_cssThemeColorRoles = null;
|
|
145
|
+
_settings = inject(AppSettingsService);
|
|
146
|
+
_data = inject(DataService);
|
|
147
|
+
isNightMode = signal(false, ...ngDevMode ? [{ debugName: "isNightMode" }] : []);
|
|
148
|
+
_useAutoNightMode = toSignal(this._settings.getAutoNightModeAsO(), { requireSync: true });
|
|
149
|
+
_theme = toSignal(this._settings.getThemeNameAsO(), { requireSync: true });
|
|
150
|
+
_redNightMode = toSignal(this._settings.getRedNightModeAsO(), { requireSync: true });
|
|
151
|
+
_environmentMode = toSignal(this._data.subscribePath(this.MODE_PATH, "default"));
|
|
152
|
+
appVersion = signal(package_default.version, ...ngDevMode ? [{ debugName: "appVersion" }] : []);
|
|
153
|
+
browserVersion = signal("Unknown", ...ngDevMode ? [{ debugName: "browserVersion" }] : []);
|
|
154
|
+
osVersion = signal("Unknown", ...ngDevMode ? [{ debugName: "osVersion" }] : []);
|
|
155
|
+
constructor() {
|
|
156
|
+
effect(() => {
|
|
157
|
+
if (this._theme() === "light-theme") {
|
|
158
|
+
document.body.classList.toggle("light-theme", this._theme() === "light-theme");
|
|
159
|
+
} else {
|
|
160
|
+
document.body.classList.remove("light-theme");
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
effect(() => {
|
|
164
|
+
const mode = this._environmentMode().data.value;
|
|
165
|
+
if (this._useAutoNightMode()) {
|
|
166
|
+
this.isNightMode.set(mode === "night");
|
|
167
|
+
this.toggleDayNightMode();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
effect(() => {
|
|
171
|
+
const redNightMode = this._redNightMode();
|
|
172
|
+
untracked(() => {
|
|
173
|
+
if (redNightMode) {
|
|
174
|
+
this.toggleDayNightMode();
|
|
175
|
+
} else {
|
|
176
|
+
this.toggleDayNightMode();
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
this.readThemeCssRoleVariables();
|
|
181
|
+
this._cssThemeColorRoles = this.cssThemeColorRoles$.getValue();
|
|
182
|
+
this.browserVersion.set(this.getBrowserVersion());
|
|
183
|
+
this.osVersion.set(this.getOSVersion());
|
|
184
|
+
console.log("*********** KIP Version Information ***********");
|
|
185
|
+
console.log(`** App Version: ${this.appVersion()}`);
|
|
186
|
+
console.log(`** Browser Version: ${this.browserVersion()}`);
|
|
187
|
+
console.log(`** OS Version: ${this.osVersion()}`);
|
|
188
|
+
console.log("***********************************************");
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Display Kip Snackbar notification.
|
|
192
|
+
*
|
|
193
|
+
* @param message Text to be displayed.
|
|
194
|
+
* @param duration Display duration in milliseconds before automatic dismissal.
|
|
195
|
+
* Duration value of 0 is indefinite or until use clicks Dismiss button. Defaults
|
|
196
|
+
* to 10000 of no value is provided.
|
|
197
|
+
* @param silent A boolean that defines if the notification should make no sound.
|
|
198
|
+
* Defaults false.
|
|
199
|
+
*/
|
|
200
|
+
sendSnackbarNotification(message, duration = 1e4, silent = false, action = "Dismiss") {
|
|
201
|
+
this.snackbarAppNotifications.next({ message, duration, silent, action });
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Observable to receive Kip app Snackbar notification. Use in app.component ONLY.
|
|
205
|
+
*
|
|
206
|
+
* @usageNotes To send a Snackbar notification, use sendSnackbarNotification().
|
|
207
|
+
* Notifications are purely client side and have no relationship or
|
|
208
|
+
* interactions with the Signal K server.
|
|
209
|
+
*/
|
|
210
|
+
getSnackbarAppNotifications() {
|
|
211
|
+
return this.snackbarAppNotifications.asObservable();
|
|
212
|
+
}
|
|
213
|
+
readThemeCssRoleVariables() {
|
|
214
|
+
const root = document.body;
|
|
215
|
+
const computedStyle = getComputedStyle(root);
|
|
216
|
+
const cssThemeRolesColor = {
|
|
217
|
+
background: computedStyle.getPropertyValue("--mat-sys-background").trim(),
|
|
218
|
+
cardColor: computedStyle.getPropertyValue("--kip-widget-card-background-color").trim(),
|
|
219
|
+
blue: computedStyle.getPropertyValue("--kip-blue-color").trim(),
|
|
220
|
+
blueDim: computedStyle.getPropertyValue("--kip-blue-dim-color").trim(),
|
|
221
|
+
blueDimmer: computedStyle.getPropertyValue("--kip-blue-dimmer-color").trim(),
|
|
222
|
+
green: computedStyle.getPropertyValue("--kip-green-color").trim(),
|
|
223
|
+
greenDim: computedStyle.getPropertyValue("--kip-green-dim-color").trim(),
|
|
224
|
+
greenDimmer: computedStyle.getPropertyValue("--kip-green-dimmer-color").trim(),
|
|
225
|
+
grey: computedStyle.getPropertyValue("--kip-grey-color").trim(),
|
|
226
|
+
greyDim: computedStyle.getPropertyValue("--kip-grey-dim-color").trim(),
|
|
227
|
+
greyDimmer: computedStyle.getPropertyValue("--kip-grey-dimmer-color").trim(),
|
|
228
|
+
orange: computedStyle.getPropertyValue("--kip-orange-color").trim(),
|
|
229
|
+
orangeDim: computedStyle.getPropertyValue("--kip-orange-dim-color").trim(),
|
|
230
|
+
orangeDimmer: computedStyle.getPropertyValue("--kip-orange-dimmer-color").trim(),
|
|
231
|
+
pink: computedStyle.getPropertyValue("--kip-pink-color").trim(),
|
|
232
|
+
pinkDim: computedStyle.getPropertyValue("--kip-pink-dim-color").trim(),
|
|
233
|
+
pinkDimmer: computedStyle.getPropertyValue("--kip-pink-dimmer-color").trim(),
|
|
234
|
+
purple: computedStyle.getPropertyValue("--kip-purple-color").trim(),
|
|
235
|
+
purpleDim: computedStyle.getPropertyValue("--kip-purple-dim-color").trim(),
|
|
236
|
+
purpleDimmer: computedStyle.getPropertyValue("--kip-purple-dimmer-color").trim(),
|
|
237
|
+
contrast: computedStyle.getPropertyValue("--kip-contrast-color").trim(),
|
|
238
|
+
contrastDim: computedStyle.getPropertyValue("--kip-contrast-dim-color").trim(),
|
|
239
|
+
contrastDimmer: computedStyle.getPropertyValue("--kip-contrast-dimmer-color").trim(),
|
|
240
|
+
yellow: computedStyle.getPropertyValue("--kip-yellow-color").trim(),
|
|
241
|
+
yellowDim: computedStyle.getPropertyValue("--kip-yellow-dim-color").trim(),
|
|
242
|
+
yellowDimmer: computedStyle.getPropertyValue("--kip-yellow-dimmer-color").trim(),
|
|
243
|
+
port: computedStyle.getPropertyValue("--kip-port-color").trim(),
|
|
244
|
+
starboard: computedStyle.getPropertyValue("--kip-starboard-color").trim(),
|
|
245
|
+
zoneNominal: computedStyle.getPropertyValue("--kip-zone-nominal-color").trim(),
|
|
246
|
+
zoneAlert: computedStyle.getPropertyValue("--kip-zone-alert-color").trim(),
|
|
247
|
+
zoneWarn: computedStyle.getPropertyValue("--kip-zone-warn-color").trim(),
|
|
248
|
+
zoneAlarm: computedStyle.getPropertyValue("--kip-zone-alarm-color").trim(),
|
|
249
|
+
zoneEmergency: computedStyle.getPropertyValue("--kip-zone-emergency-color").trim()
|
|
250
|
+
};
|
|
251
|
+
this.cssThemeColorRoles$.next(cssThemeRolesColor);
|
|
252
|
+
}
|
|
253
|
+
get cssThemeColors() {
|
|
254
|
+
return this._cssThemeColorRoles;
|
|
255
|
+
}
|
|
256
|
+
setBrightness(brightness, applyNightFilters = false) {
|
|
257
|
+
const appFilterWrapper = document.body;
|
|
258
|
+
appFilterWrapper.style.setProperty("--kip-nightModeBrightness", `${brightness}`);
|
|
259
|
+
const additionalFilters = applyNightFilters ? " sepia(0.5) hue-rotate(-30deg)" : "";
|
|
260
|
+
appFilterWrapper.style.setProperty("--kip-nightModeFilters", additionalFilters);
|
|
261
|
+
}
|
|
262
|
+
toggleDayNightMode() {
|
|
263
|
+
if (this.isNightMode()) {
|
|
264
|
+
if (this._redNightMode()) {
|
|
265
|
+
document.body.classList.toggle("night-theme", true);
|
|
266
|
+
this.setBrightness(1, false);
|
|
267
|
+
} else {
|
|
268
|
+
this.setBrightness(this._settings.getNightModeBrightness(), true);
|
|
269
|
+
document.body.classList.remove("night-theme");
|
|
270
|
+
if (this._theme() === "light-theme") {
|
|
271
|
+
document.body.classList.toggle("light-theme", this._theme() === "light-theme");
|
|
272
|
+
} else {
|
|
273
|
+
document.body.classList.remove("light-theme");
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
} else {
|
|
277
|
+
document.body.classList.remove("night-theme");
|
|
278
|
+
if (this._theme() === "light-theme") {
|
|
279
|
+
document.body.classList.toggle("light-theme", this._theme() === "light-theme");
|
|
280
|
+
}
|
|
281
|
+
this.setBrightness(1, false);
|
|
282
|
+
}
|
|
283
|
+
this.readThemeCssRoleVariables();
|
|
284
|
+
this._cssThemeColorRoles = this.cssThemeColorRoles$.getValue();
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Helper method to get the browser version.
|
|
288
|
+
*/
|
|
289
|
+
getBrowserVersion() {
|
|
290
|
+
const userAgent = navigator.userAgent;
|
|
291
|
+
let browser = "Unknown";
|
|
292
|
+
if (userAgent.includes("Edg")) {
|
|
293
|
+
browser = `Edge ${userAgent.match(/Edg\/(\d+)/)?.[1]}`;
|
|
294
|
+
} else if (userAgent.includes("Chrome") && !userAgent.includes("Edg") && !userAgent.includes("Chromium")) {
|
|
295
|
+
browser = `Chrome ${userAgent.match(/Chrome\/(\d+)/)?.[1]}`;
|
|
296
|
+
} else if (userAgent.includes("Chromium")) {
|
|
297
|
+
browser = `Chromium ${userAgent.match(/Chromium\/(\d+)/)?.[1]}`;
|
|
298
|
+
} else if (userAgent.includes("Firefox")) {
|
|
299
|
+
browser = `Firefox ${userAgent.match(/Firefox\/(\d+)/)?.[1]}`;
|
|
300
|
+
} else if (userAgent.includes("Safari") && !userAgent.includes("Chrome") && !userAgent.includes("Chromium")) {
|
|
301
|
+
browser = `Safari ${userAgent.match(/Version\/(\d+)/)?.[1]}`;
|
|
302
|
+
} else if (userAgent.includes("Opera") || userAgent.includes("OPR")) {
|
|
303
|
+
browser = `Opera ${userAgent.match(/(Opera|OPR)\/(\d+)/)?.[2]}`;
|
|
304
|
+
}
|
|
305
|
+
return browser;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Helper method to get the OS version.
|
|
309
|
+
*/
|
|
310
|
+
getOSVersion() {
|
|
311
|
+
const platform = navigator.platform;
|
|
312
|
+
const userAgent = navigator.userAgent;
|
|
313
|
+
if (platform.startsWith("Mac")) {
|
|
314
|
+
return "macOS";
|
|
315
|
+
} else if (platform.startsWith("Win")) {
|
|
316
|
+
return "Windows";
|
|
317
|
+
} else if (/Linux/.test(platform)) {
|
|
318
|
+
if (userAgent.includes("ARM") || userAgent.includes("aarch64") || userAgent.includes("Raspberry") || platform.includes("armv7l") || platform.includes("armv8l")) {
|
|
319
|
+
return "Raspberry Pi";
|
|
320
|
+
}
|
|
321
|
+
return "Linux";
|
|
322
|
+
} else {
|
|
323
|
+
return "Unknown OS";
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
static \u0275fac = function AppService_Factory(__ngFactoryType__) {
|
|
327
|
+
return new (__ngFactoryType__ || _AppService)();
|
|
328
|
+
};
|
|
329
|
+
static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _AppService, factory: _AppService.\u0275fac, providedIn: "root" });
|
|
330
|
+
};
|
|
331
|
+
(() => {
|
|
332
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(AppService, [{
|
|
333
|
+
type: Injectable,
|
|
334
|
+
args: [{
|
|
335
|
+
providedIn: "root"
|
|
336
|
+
}]
|
|
337
|
+
}], () => [], null);
|
|
338
|
+
})();
|
|
339
|
+
|
|
340
|
+
export {
|
|
341
|
+
AppService
|
|
342
|
+
};
|
|
343
|
+
//# sourceMappingURL=chunk-SGHFX2SF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["package.json", "src/app/core/services/app-service.ts"],
|
|
4
|
+
"sourcesContent": ["{\n \"name\": \"@mxtommy/kip\",\n \"version\": \"3.9.0-beta.20\",\n \"description\": \"An advanced and versatile marine instrumentation package to display Signal K data.\",\n \"license\": \"MIT\",\n \"author\": {\n \"name\": \"Thomas St.Pierre, David Godin\"\n },\n \"contributors\": [\n {\n \"name\": \"David Godin\",\n \"email\": \"godind@hotmail.com\"\n },\n {\n \"name\": \"Thomas St.Pierre\",\n \"email\": \"thomas@samoht.ca\"\n }\n ],\n \"homepage\": \"https://github.com/mxtommy/Kip\",\n \"bugs\": \"https://github.com/mxtommy/Kip/issues\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/mxtommy/Kip.git\"\n },\n \"keywords\": [\n \"signalk-webapp\",\n \"signalk-category-instruments\",\n \"signal k\",\n \"signalk\",\n \"instruments\",\n \"dashboard\",\n \"marine\",\n \"nmea\"\n ],\n \"signalk\": {\n \"appIcon\": \"assets/icon-72x72.png\",\n \"displayName\": \"KIP Instrument MFD\"\n },\n \"scripts\": {\n \"dev\": \"ng serve --configuration=dev --serve-path=/@mxtommy/kip/\",\n \"build-dev\": \"ng build --configuration=dev\",\n \"build-prod\": \"ng build --configuration=production\",\n \"test\": \"ng test\",\n \"lint\": \"ng lint\",\n \"e2e\": \"ng e2e\"\n },\n \"devDependencies\": {\n \"@angular-devkit/build-angular\": \"^20.1.6\",\n \"@angular/animations\": \"20.1.7\",\n \"@angular/build\": \"^20.1.6\",\n \"@angular/cdk\": \"20.1.6\",\n \"@angular/cli\": \"^20.1.6\",\n \"@angular/common\": \"20.1.7\",\n \"@angular/compiler\": \"20.1.7\",\n \"@angular/compiler-cli\": \"20.1.7\",\n \"@angular/core\": \"20.1.7\",\n \"@angular/forms\": \"20.1.7\",\n \"@angular/language-service\": \"20.1.7\",\n \"@angular/material\": \"20.1.6\",\n \"@angular/platform-browser\": \"20.1.7\",\n \"@angular/platform-browser-dynamic\": \"20.1.7\",\n \"@angular/router\": \"20.1.7\",\n \"@godind/ng-canvas-gauges\": \"^6.2.1\",\n \"@robloche/chartjs-plugin-streaming\": \"^3.1.0\",\n \"@types/canvas-gauges\": \"^2.1.8\",\n \"@types/howler\": \"^2.2.10\",\n \"@types/jasmine\": \"~3.6.0\",\n \"@types/jasminewd2\": \"^2.0.9\",\n \"@types/js-quantities\": \"^1.6.6\",\n \"@types/lodash-es\": \"^4.17.9\",\n \"@types/node\": \"^24.1.0\",\n \"@zakj/no-sleep\": \"^0.13.5\",\n \"angular-eslint\": \"20.1.1\",\n \"chart.js\": \"^4.4.9\",\n \"chartjs-adapter-date-fns\": \"^3.0.0\",\n \"chartjs-plugin-annotation\": \"^3.0.1\",\n \"codelyzer\": \"^6.0.0\",\n \"compare-versions\": \"^6.1.1\",\n \"core-js\": \"^3.13.1\",\n \"date-fns\": \"^2.30.0\",\n \"eslint\": \"^9.29.0\",\n \"gridstack\": \"^11.4.0\",\n \"howler\": \"^2.2.4\",\n \"jasmine-core\": \"~4.0.1\",\n \"jasmine-spec-reporter\": \"~5.0.0\",\n \"js-quantities\": \"^1.8.0\",\n \"karma\": \"^6.4.4\",\n \"karma-chrome-launcher\": \"~3.1.0\",\n \"karma-cli\": \"~2.0.0\",\n \"karma-coverage-istanbul-reporter\": \"^3.0.3\",\n \"karma-jasmine\": \"~4.0.0\",\n \"karma-jasmine-html-reporter\": \"^1.6.0\",\n \"lodash-es\": \"^4.17.21\",\n \"ng-packagr\": \"^20.0.1\",\n \"ngx-markdown\": \"^20.0.0\",\n \"ngx-resize-observer\": \"^3.1.0\",\n \"protractor\": \"~7.0.0\",\n \"pwa-asset-generator\": \"^8.0.4\",\n \"rxjs\": \"^7.8.2\",\n \"sass\": \"^1.49.9\",\n \"screenfull\": \"^6.0.2\",\n \"steelseries\": \"^2.0.9\",\n \"ts-node\": \"^10.9.2\",\n \"tslib\": \"^2.6.2\",\n \"typescript\": \"^5.8.3\",\n \"zone.js\": \"^0.15.1\"\n }\n}\n", "import { effect, inject, Injectable, signal, untracked } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { AppSettingsService } from './app-settings.service';\nimport { DataService } from './data.service';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport packageInfo from '../../../../package.json';\n\n/**\n * Snack-bar notification message interface.\n */\nexport interface AppNotification {\n message: string;\n action?: string;\n duration: number;\n silent: boolean;\n}\n\n\n/**\n * Kip theme hex colors\n *\n * @export\n * @interface ITheme\n */\nexport interface ITheme {\n blue: string,\n blueDim: string,\n blueDimmer: string,\n green: string,\n greenDim: string,\n greenDimmer: string,\n purple: string,\n purpleDim: string,\n purpleDimmer: string,\n yellow: string,\n yellowDim: string,\n yellowDimmer: string,\n pink: string,\n pinkDim: string,\n pinkDimmer: string,\n orange: string,\n orangeDim: string,\n orangeDimmer: string,\n contrast: string,\n contrastDim: string,\n contrastDimmer: string,\n grey: string,\n greyDim: string,\n greyDimmer: string,\n port: string,\n starboard: string,\n zoneNominal: string,\n zoneAlert: string,\n zoneWarn: string,\n zoneAlarm: string,\n zoneEmergency: string,\n background: string,\n cardColor: string,\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AppService {\n readonly MODE_PATH: string = 'self.environment.mode';\n public readonly configurableThemeColors: {label: string, value: string}[] = [\n {label: \"Contrast\", value: \"contrast\"},\n {label: \"Blue\", value: \"blue\"},\n {label: \"Green\", value: \"green\"},\n {label: \"Orange\", value: \"orange\"},\n {label: \"Yellow\", value: \"yellow\"},\n {label: \"Pink\", value: \"pink\"},\n {label: \"Purple\", value: \"purple\"},\n {label: \"Grey\", value: \"grey\"}\n ];\n public snackbarAppNotifications = new Subject<AppNotification>(); // for snackbar message\n public readonly cssThemeColorRoles$ = new BehaviorSubject<ITheme|null>(null);\n private _cssThemeColorRoles: ITheme = null;\n private _settings = inject(AppSettingsService);\n private _data = inject(DataService);\n public isNightMode = signal<boolean>(false);\n private _useAutoNightMode = toSignal(this._settings.getAutoNightModeAsO(), { requireSync: true });\n private _theme = toSignal(this._settings.getThemeNameAsO(), { requireSync: true });\n private _redNightMode = toSignal(this._settings.getRedNightModeAsO(), { requireSync: true });\n private _environmentMode = toSignal(this._data.subscribePath(this.MODE_PATH, 'default'));\n\n public readonly appVersion = signal<string>(packageInfo.version);\n public readonly browserVersion = signal<string>('Unknown');\n public readonly osVersion = signal<string>('Unknown');\n\n constructor() {\n effect(() => {\n if (this._theme() === 'light-theme') {\n document.body.classList.toggle('light-theme', this._theme() === 'light-theme');\n } else {\n // Remove the light theme class if it exists\n document.body.classList.remove('light-theme');\n }\n });\n\n effect(() => {\n const mode = this._environmentMode().data.value;\n if (this._useAutoNightMode()) {\n this.isNightMode.set(mode === \"night\");\n this.toggleDayNightMode();\n }\n });\n\n effect(() => {\n const redNightMode = this._redNightMode();\n\n untracked(() => {\n if (redNightMode) {\n this.toggleDayNightMode();\n } else {\n this.toggleDayNightMode();\n }\n });\n });\n\n this.readThemeCssRoleVariables();\n this._cssThemeColorRoles = this.cssThemeColorRoles$.getValue();\n\n this.browserVersion.set(this.getBrowserVersion());\n this.osVersion.set(this.getOSVersion());\n\n console.log(\"*********** KIP Version Information ***********\");\n console.log(`** App Version: ${this.appVersion()}`);\n console.log(`** Browser Version: ${this.browserVersion()}`);\n console.log(`** OS Version: ${this.osVersion()}`);\n console.log(\"***********************************************\");\n }\n\n /**\n * Display Kip Snackbar notification.\n *\n * @param message Text to be displayed.\n * @param duration Display duration in milliseconds before automatic dismissal.\n * Duration value of 0 is indefinite or until use clicks Dismiss button. Defaults\n * to 10000 of no value is provided.\n * @param silent A boolean that defines if the notification should make no sound.\n * Defaults false.\n */\n public sendSnackbarNotification(message: string, duration = 10000, silent = false, action = \"Dismiss\") {\n this.snackbarAppNotifications.next({ message: message, duration: duration, silent: silent, action: action });\n }\n\n /**\n * Observable to receive Kip app Snackbar notification. Use in app.component ONLY.\n *\n * @usageNotes To send a Snackbar notification, use sendSnackbarNotification().\n * Notifications are purely client side and have no relationship or\n * interactions with the Signal K server.\n */\n public getSnackbarAppNotifications() {\n return this.snackbarAppNotifications.asObservable();\n }\n\n private readThemeCssRoleVariables(): void {\n const root = document.body;\n const computedStyle = getComputedStyle(root);\n const cssThemeRolesColor: ITheme = {\n background: computedStyle.getPropertyValue('--mat-sys-background').trim(),\n cardColor: computedStyle.getPropertyValue('--kip-widget-card-background-color').trim(),\n blue: computedStyle.getPropertyValue('--kip-blue-color').trim(),\n blueDim: computedStyle.getPropertyValue('--kip-blue-dim-color').trim(),\n blueDimmer: computedStyle.getPropertyValue('--kip-blue-dimmer-color').trim(),\n green: computedStyle.getPropertyValue('--kip-green-color').trim(),\n greenDim: computedStyle.getPropertyValue('--kip-green-dim-color').trim(),\n greenDimmer: computedStyle.getPropertyValue('--kip-green-dimmer-color').trim(),\n grey: computedStyle.getPropertyValue('--kip-grey-color').trim(),\n greyDim: computedStyle.getPropertyValue('--kip-grey-dim-color').trim(),\n greyDimmer: computedStyle.getPropertyValue('--kip-grey-dimmer-color').trim(),\n orange: computedStyle.getPropertyValue('--kip-orange-color').trim(),\n orangeDim: computedStyle.getPropertyValue('--kip-orange-dim-color').trim(),\n orangeDimmer: computedStyle.getPropertyValue('--kip-orange-dimmer-color').trim(),\n pink: computedStyle.getPropertyValue('--kip-pink-color').trim(),\n pinkDim: computedStyle.getPropertyValue('--kip-pink-dim-color').trim(),\n pinkDimmer: computedStyle.getPropertyValue('--kip-pink-dimmer-color').trim(),\n purple: computedStyle.getPropertyValue('--kip-purple-color').trim(),\n purpleDim: computedStyle.getPropertyValue('--kip-purple-dim-color').trim(),\n purpleDimmer: computedStyle.getPropertyValue('--kip-purple-dimmer-color').trim(),\n contrast: computedStyle.getPropertyValue('--kip-contrast-color').trim(),\n contrastDim: computedStyle.getPropertyValue('--kip-contrast-dim-color').trim(),\n contrastDimmer: computedStyle.getPropertyValue('--kip-contrast-dimmer-color').trim(),\n yellow: computedStyle.getPropertyValue('--kip-yellow-color').trim(),\n yellowDim: computedStyle.getPropertyValue('--kip-yellow-dim-color').trim(),\n yellowDimmer: computedStyle.getPropertyValue('--kip-yellow-dimmer-color').trim(),\n port: computedStyle.getPropertyValue('--kip-port-color').trim(),\n starboard: computedStyle.getPropertyValue('--kip-starboard-color').trim(),\n zoneNominal: computedStyle.getPropertyValue('--kip-zone-nominal-color').trim(),\n zoneAlert: computedStyle.getPropertyValue('--kip-zone-alert-color').trim(),\n zoneWarn: computedStyle.getPropertyValue('--kip-zone-warn-color').trim(),\n zoneAlarm: computedStyle.getPropertyValue('--kip-zone-alarm-color').trim(),\n zoneEmergency: computedStyle.getPropertyValue('--kip-zone-emergency-color').trim(),\n };\n this.cssThemeColorRoles$.next(cssThemeRolesColor);\n }\n\n public get cssThemeColors() : ITheme {\n return this._cssThemeColorRoles;\n }\n\n public setBrightness(brightness: number, applyNightFilters = false): void {\n const appFilterWrapper = document.body;\n\n // Set the brightness level\n appFilterWrapper.style.setProperty('--kip-nightModeBrightness', `${brightness}`);\n\n // Apply sepia and hue-rotate filters if night mode is active\n const additionalFilters = applyNightFilters ? ' sepia(0.5) hue-rotate(-30deg)' : '';\n appFilterWrapper.style.setProperty('--kip-nightModeFilters', additionalFilters);\n }\n\n public toggleDayNightMode(): void {\n if (this.isNightMode()) {\n if (this._redNightMode()) {\n document.body.classList.toggle('night-theme', true);\n this.setBrightness(1, false);\n } else {\n this.setBrightness(this._settings.getNightModeBrightness(), true);\n document.body.classList.remove('night-theme');\n if (this._theme() === 'light-theme') {\n document.body.classList.toggle('light-theme', this._theme() === 'light-theme');\n } else {\n document.body.classList.remove('light-theme');\n }\n }\n\n } else {\n document.body.classList.remove('night-theme');\n if (this._theme() === 'light-theme') {\n document.body.classList.toggle('light-theme', this._theme() === 'light-theme');\n }\n this.setBrightness(1, false);\n }\n this.readThemeCssRoleVariables();\n this._cssThemeColorRoles = this.cssThemeColorRoles$.getValue();\n }\n\n /**\n * Helper method to get the browser version.\n */\n private getBrowserVersion(): string {\n const userAgent = navigator.userAgent;\n let browser = 'Unknown';\n\n if (userAgent.includes('Edg')) {\n browser = `Edge ${userAgent.match(/Edg\\/(\\d+)/)?.[1]}`;\n } else if (userAgent.includes('Chrome') && !userAgent.includes('Edg') && !userAgent.includes('Chromium')) {\n browser = `Chrome ${userAgent.match(/Chrome\\/(\\d+)/)?.[1]}`;\n } else if (userAgent.includes('Chromium')) {\n browser = `Chromium ${userAgent.match(/Chromium\\/(\\d+)/)?.[1]}`;\n } else if (userAgent.includes('Firefox')) {\n browser = `Firefox ${userAgent.match(/Firefox\\/(\\d+)/)?.[1]}`;\n } else if (userAgent.includes('Safari') && !userAgent.includes('Chrome') && !userAgent.includes('Chromium')) {\n browser = `Safari ${userAgent.match(/Version\\/(\\d+)/)?.[1]}`;\n } else if (userAgent.includes('Opera') || userAgent.includes('OPR')) {\n browser = `Opera ${userAgent.match(/(Opera|OPR)\\/(\\d+)/)?.[2]}`;\n }\n\n return browser;\n }\n\n /**\n * Helper method to get the OS version.\n */\n private getOSVersion(): string {\n const platform = navigator.platform;\n const userAgent = navigator.userAgent;\n\n if (platform.startsWith('Mac')) {\n return 'macOS';\n } else if (platform.startsWith('Win')) {\n return 'Windows';\n } else if (/Linux/.test(platform)) {\n // Check for Raspberry Pi identifiers in the userAgent or platform\n if (\n userAgent.includes('ARM') ||\n userAgent.includes('aarch64') ||\n userAgent.includes('Raspberry') ||\n platform.includes('armv7l') ||\n platform.includes('armv8l')\n ) {\n return 'Raspberry Pi';\n }\n return 'Linux';\n } else {\n return 'Unknown OS';\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,SAAW;AAAA,EACX,QAAU;AAAA,IACR,MAAQ;AAAA,EACV;AAAA,EACA,cAAgB;AAAA,IACd;AAAA,MACE,MAAQ;AAAA,MACR,OAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,MAAQ;AAAA,MACR,OAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,EACR,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,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AC1B,SAAS,SAAS,QAAQ,GAC1B;AACA,eAAO;MACT;AACA,aAAO;IACT,OAAO;AACL,aAAO;IACT;EACF;;qCAnOW,aAAU;EAAA;4EAAV,aAAU,SAAV,YAAU,WAAA,YAFT,OAAM,CAAA;;;sEAEP,YAAU,CAAA;UAHtB;WAAW;MACV,YAAY;KACb;;;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MatDivider
|
|
3
|
+
} from "./chunk-MCEJWZB2.js";
|
|
4
|
+
import {
|
|
5
|
+
DefaultValueAccessor,
|
|
6
|
+
FormsModule,
|
|
7
|
+
MAT_DIALOG_DATA,
|
|
8
|
+
MatDialogActions,
|
|
9
|
+
MatDialogClose,
|
|
10
|
+
MatDialogContent,
|
|
11
|
+
MatDialogRef,
|
|
12
|
+
MatDialogTitle,
|
|
13
|
+
MatError,
|
|
14
|
+
MatFormField,
|
|
15
|
+
MatInput,
|
|
16
|
+
MatLabel,
|
|
17
|
+
NgControlStatus,
|
|
18
|
+
NgControlStatusGroup,
|
|
19
|
+
NgForm,
|
|
20
|
+
NgModel,
|
|
21
|
+
RequiredValidator,
|
|
22
|
+
ɵNgNoValidate
|
|
23
|
+
} from "./chunk-BIBIW64D.js";
|
|
24
|
+
import {
|
|
25
|
+
Component,
|
|
26
|
+
MatButton,
|
|
27
|
+
inject,
|
|
28
|
+
setClassMetadata,
|
|
29
|
+
ɵsetClassDebugInfo,
|
|
30
|
+
ɵɵadvance,
|
|
31
|
+
ɵɵconditional,
|
|
32
|
+
ɵɵconditionalCreate,
|
|
33
|
+
ɵɵdefineComponent,
|
|
34
|
+
ɵɵelement,
|
|
35
|
+
ɵɵelementEnd,
|
|
36
|
+
ɵɵelementStart,
|
|
37
|
+
ɵɵgetCurrentView,
|
|
38
|
+
ɵɵlistener,
|
|
39
|
+
ɵɵnextContext,
|
|
40
|
+
ɵɵproperty,
|
|
41
|
+
ɵɵpureFunction0,
|
|
42
|
+
ɵɵreference,
|
|
43
|
+
ɵɵresetView,
|
|
44
|
+
ɵɵrestoreView,
|
|
45
|
+
ɵɵtext,
|
|
46
|
+
ɵɵtextInterpolate,
|
|
47
|
+
ɵɵtextInterpolate1,
|
|
48
|
+
ɵɵtwoWayBindingSet,
|
|
49
|
+
ɵɵtwoWayListener,
|
|
50
|
+
ɵɵtwoWayProperty
|
|
51
|
+
} from "./chunk-SDOP6T56.js";
|
|
52
|
+
|
|
53
|
+
// src/app/core/components/modal-user-credential/modal-user-credential.component.ts
|
|
54
|
+
var _c0 = () => ({ standalone: false });
|
|
55
|
+
function ModalUserCredentialComponent_Conditional_5_Template(rf, ctx) {
|
|
56
|
+
if (rf & 1) {
|
|
57
|
+
\u0275\u0275elementStart(0, "div", 3);
|
|
58
|
+
\u0275\u0275element(1, "i", 10);
|
|
59
|
+
\u0275\u0275text(2);
|
|
60
|
+
\u0275\u0275elementEnd();
|
|
61
|
+
}
|
|
62
|
+
if (rf & 2) {
|
|
63
|
+
const ctx_r1 = \u0275\u0275nextContext();
|
|
64
|
+
\u0275\u0275advance(2);
|
|
65
|
+
\u0275\u0275textInterpolate1(" ", ctx_r1.data.error, " ");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
var ModalUserCredentialComponent = class _ModalUserCredentialComponent {
|
|
69
|
+
dialogRef = inject(MatDialogRef);
|
|
70
|
+
data = inject(MAT_DIALOG_DATA);
|
|
71
|
+
titleDialog = "Sign in to Signal K";
|
|
72
|
+
saveCredential() {
|
|
73
|
+
this.data.error = null;
|
|
74
|
+
this.dialogRef.close(this.data);
|
|
75
|
+
}
|
|
76
|
+
static \u0275fac = function ModalUserCredentialComponent_Factory(__ngFactoryType__) {
|
|
77
|
+
return new (__ngFactoryType__ || _ModalUserCredentialComponent)();
|
|
78
|
+
};
|
|
79
|
+
static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _ModalUserCredentialComponent, selectors: [["app-modal-user-credential"]], decls: 26, vars: 10, consts: [["login", "ngForm"], ["name", "login", 3, "ngSubmit"], ["mat-dialog-title", ""], [1, "errorMsgBox"], [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", "autocapitalize", "off", "autocorrect", "off", "spellcheck", "false", "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"], ["aria-hidden", "true", 1, "fa-solid", "fa-times-circle", 2, "color", "red", "padding-right", "5px"]], template: function ModalUserCredentialComponent_Template(rf, ctx) {
|
|
80
|
+
if (rf & 1) {
|
|
81
|
+
const _r1 = \u0275\u0275getCurrentView();
|
|
82
|
+
\u0275\u0275elementStart(0, "form", 1, 0);
|
|
83
|
+
\u0275\u0275listener("ngSubmit", function ModalUserCredentialComponent_Template_form_ngSubmit_0_listener() {
|
|
84
|
+
\u0275\u0275restoreView(_r1);
|
|
85
|
+
return \u0275\u0275resetView(ctx.saveCredential());
|
|
86
|
+
});
|
|
87
|
+
\u0275\u0275elementStart(2, "span", 2);
|
|
88
|
+
\u0275\u0275text(3);
|
|
89
|
+
\u0275\u0275elementEnd();
|
|
90
|
+
\u0275\u0275elementStart(4, "mat-dialog-content");
|
|
91
|
+
\u0275\u0275conditionalCreate(5, ModalUserCredentialComponent_Conditional_5_Template, 3, 1, "div", 3);
|
|
92
|
+
\u0275\u0275element(6, "br");
|
|
93
|
+
\u0275\u0275elementStart(7, "div", 4)(8, "mat-form-field", 5)(9, "mat-label");
|
|
94
|
+
\u0275\u0275text(10, "User ID");
|
|
95
|
+
\u0275\u0275elementEnd();
|
|
96
|
+
\u0275\u0275elementStart(11, "input", 6);
|
|
97
|
+
\u0275\u0275twoWayListener("ngModelChange", function ModalUserCredentialComponent_Template_input_ngModelChange_11_listener($event) {
|
|
98
|
+
\u0275\u0275restoreView(_r1);
|
|
99
|
+
\u0275\u0275twoWayBindingSet(ctx.data.user, $event) || (ctx.data.user = $event);
|
|
100
|
+
return \u0275\u0275resetView($event);
|
|
101
|
+
});
|
|
102
|
+
\u0275\u0275elementEnd();
|
|
103
|
+
\u0275\u0275elementStart(12, "mat-error");
|
|
104
|
+
\u0275\u0275text(13, " You must enter a User ID value ");
|
|
105
|
+
\u0275\u0275elementEnd()();
|
|
106
|
+
\u0275\u0275elementStart(14, "mat-form-field", 5)(15, "mat-label");
|
|
107
|
+
\u0275\u0275text(16, "Password");
|
|
108
|
+
\u0275\u0275elementEnd();
|
|
109
|
+
\u0275\u0275elementStart(17, "input", 7);
|
|
110
|
+
\u0275\u0275twoWayListener("ngModelChange", function ModalUserCredentialComponent_Template_input_ngModelChange_17_listener($event) {
|
|
111
|
+
\u0275\u0275restoreView(_r1);
|
|
112
|
+
\u0275\u0275twoWayBindingSet(ctx.data.password, $event) || (ctx.data.password = $event);
|
|
113
|
+
return \u0275\u0275resetView($event);
|
|
114
|
+
});
|
|
115
|
+
\u0275\u0275elementEnd();
|
|
116
|
+
\u0275\u0275elementStart(18, "mat-error");
|
|
117
|
+
\u0275\u0275text(19, " You must enter a password value ");
|
|
118
|
+
\u0275\u0275elementEnd()()()();
|
|
119
|
+
\u0275\u0275element(20, "mat-divider");
|
|
120
|
+
\u0275\u0275elementStart(21, "mat-dialog-actions")(22, "button", 8);
|
|
121
|
+
\u0275\u0275text(23, "Cancel");
|
|
122
|
+
\u0275\u0275elementEnd();
|
|
123
|
+
\u0275\u0275elementStart(24, "button", 9);
|
|
124
|
+
\u0275\u0275text(25, "Sign in");
|
|
125
|
+
\u0275\u0275elementEnd()()();
|
|
126
|
+
}
|
|
127
|
+
if (rf & 2) {
|
|
128
|
+
const login_r3 = \u0275\u0275reference(1);
|
|
129
|
+
\u0275\u0275advance(3);
|
|
130
|
+
\u0275\u0275textInterpolate(ctx.titleDialog);
|
|
131
|
+
\u0275\u0275advance(2);
|
|
132
|
+
\u0275\u0275conditional(ctx.data.error ? 5 : -1);
|
|
133
|
+
\u0275\u0275advance(6);
|
|
134
|
+
\u0275\u0275twoWayProperty("ngModel", ctx.data.user);
|
|
135
|
+
\u0275\u0275property("ngModelOptions", \u0275\u0275pureFunction0(8, _c0));
|
|
136
|
+
\u0275\u0275advance(6);
|
|
137
|
+
\u0275\u0275twoWayProperty("ngModel", ctx.data.password);
|
|
138
|
+
\u0275\u0275property("ngModelOptions", \u0275\u0275pureFunction0(9, _c0));
|
|
139
|
+
\u0275\u0275advance(5);
|
|
140
|
+
\u0275\u0275property("mat-dialog-close", false);
|
|
141
|
+
\u0275\u0275advance(2);
|
|
142
|
+
\u0275\u0275property("disabled", !login_r3.valid);
|
|
143
|
+
}
|
|
144
|
+
}, dependencies: [FormsModule, \u0275NgNoValidate, DefaultValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, NgModel, NgForm, MatDialogTitle, MatDialogContent, MatFormField, MatLabel, MatInput, MatError, MatDivider, MatDialogActions, MatButton, MatDialogClose], styles: ['\n\n.errorMsgBox[_ngcontent-%COMP%] {\n background-color: cornsilk;\n color: darkslategray;\n display: flex;\n padding-top: 5px;\n padding-right: 5px;\n padding-bottom: 5px;\n padding-left: 5px;\n font-family:\n "Arial",\n Times,\n serif;\n font-size: 14px;\n}\n.login-grid[_ngcontent-%COMP%] {\n display: grid;\n gap: 10px;\n padding-left: 10px;\n padding-right: 10px;\n}\n.userLoginInput[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n}\n/*# sourceMappingURL=modal-user-credential.component.css.map */'] });
|
|
145
|
+
};
|
|
146
|
+
(() => {
|
|
147
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ModalUserCredentialComponent, [{
|
|
148
|
+
type: Component,
|
|
149
|
+
args: [{ selector: "app-modal-user-credential", imports: [FormsModule, MatDialogTitle, MatDialogContent, MatFormField, MatLabel, MatInput, MatError, MatDivider, MatDialogActions, MatButton, MatDialogClose], template: '<form name="login" (ngSubmit)="saveCredential()" #login="ngForm">\n <span mat-dialog-title>{{titleDialog}}</span>\n <mat-dialog-content>\n @if (data.error) {\n <div class="errorMsgBox">\n <i class="fa-solid fa-times-circle" style="color:red; padding-right: 5px;" aria-hidden="true"></i>\n {{data.error}}\n </div>\n }\n <br/>\n <div class="login-grid">\n <mat-form-field class="userLoginInput">\n <mat-label>User ID</mat-label>\n <input type="text" autocomplete="username" id="username" matInput placeholder="User ID" name="username" [(ngModel)]="data.user" [ngModelOptions]="{standalone: false}" required>\n <mat-error>\n You must enter a User ID value\n </mat-error>\n </mat-form-field>\n <mat-form-field class="userLoginInput">\n <mat-label>Password</mat-label>\n <input type=password autocomplete="current-password" autocapitalize="off" autocorrect="off" spellcheck="false" id="current-password" matInput placeholder="Password" name="current-password" [(ngModel)]="data.password" [ngModelOptions]="{standalone: false}" required>\n <mat-error>\n You must enter a password value\n </mat-error>\n </mat-form-field>\n </div>\n </mat-dialog-content>\n <mat-divider></mat-divider>\n <mat-dialog-actions>\n <button mat-flat-button type="button" [mat-dialog-close]="false">Cancel</button>\n <button mat-flat-button type="submit" [disabled]="!login.valid">Sign in</button>\n </mat-dialog-actions>\n</form>\n', styles: ['/* src/app/core/components/modal-user-credential/modal-user-credential.component.scss */\n.errorMsgBox {\n background-color: cornsilk;\n color: darkslategray;\n display: flex;\n padding-top: 5px;\n padding-right: 5px;\n padding-bottom: 5px;\n padding-left: 5px;\n font-family:\n "Arial",\n Times,\n serif;\n font-size: 14px;\n}\n.login-grid {\n display: grid;\n gap: 10px;\n padding-left: 10px;\n padding-right: 10px;\n}\n.userLoginInput {\n margin-bottom: 10px;\n}\n/*# sourceMappingURL=modal-user-credential.component.css.map */\n'] }]
|
|
150
|
+
}], null, null);
|
|
151
|
+
})();
|
|
152
|
+
(() => {
|
|
153
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ModalUserCredentialComponent, { className: "ModalUserCredentialComponent", filePath: "src/app/core/components/modal-user-credential/modal-user-credential.component.ts", lineNumber: 16 });
|
|
154
|
+
})();
|
|
155
|
+
|
|
156
|
+
export {
|
|
157
|
+
ModalUserCredentialComponent
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=chunk-U2DCSTRY.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["src/app/core/components/modal-user-credential/modal-user-credential.component.ts", "src/app/core/components/modal-user-credential/modal-user-credential.component.html"],
|
|
4
|
+
"sourcesContent": ["import { Component, inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';\nimport { MatButton } from '@angular/material/button';\nimport { MatDivider } from '@angular/material/divider';\nimport { MatInput } from '@angular/material/input';\nimport { MatFormField, MatLabel, MatError } from '@angular/material/form-field';\n\nimport { FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'app-modal-user-credential',\n templateUrl: './modal-user-credential.component.html',\n styleUrls: ['./modal-user-credential.component.scss'],\n imports: [FormsModule, MatDialogTitle, MatDialogContent, MatFormField, MatLabel, MatInput, MatError, MatDivider, MatDialogActions, MatButton, MatDialogClose]\n})\nexport class ModalUserCredentialComponent {\n dialogRef = inject<MatDialogRef<ModalUserCredentialComponent>>(MatDialogRef);\n data = inject<{\n user: string;\n password: string;\n error: string;\n}>(MAT_DIALOG_DATA);\n\n titleDialog = \"Sign in to Signal K\";\n\n protected saveCredential() {\n this.data.error = null;\n this.dialogRef.close(this.data);\n }\n\n}\n", "<form name=\"login\" (ngSubmit)=\"saveCredential()\" #login=\"ngForm\">\n <span mat-dialog-title>{{titleDialog}}</span>\n <mat-dialog-content>\n @if (data.error) {\n <div class=\"errorMsgBox\">\n <i class=\"fa-solid fa-times-circle\" style=\"color:red; padding-right: 5px;\" aria-hidden=\"true\"></i>\n {{data.error}}\n </div>\n }\n <br/>\n <div class=\"login-grid\">\n <mat-form-field class=\"userLoginInput\">\n <mat-label>User ID</mat-label>\n <input type=\"text\" autocomplete=\"username\" id=\"username\" matInput placeholder=\"User ID\" name=\"username\" [(ngModel)]=\"data.user\" [ngModelOptions]=\"{standalone: false}\" required>\n <mat-error>\n You must enter a User ID value\n </mat-error>\n </mat-form-field>\n <mat-form-field class=\"userLoginInput\">\n <mat-label>Password</mat-label>\n <input type=password autocomplete=\"current-password\" autocapitalize=\"off\" autocorrect=\"off\" spellcheck=\"false\" id=\"current-password\" matInput placeholder=\"Password\" name=\"current-password\" [(ngModel)]=\"data.password\" [ngModelOptions]=\"{standalone: false}\" required>\n <mat-error>\n You must enter a password value\n </mat-error>\n </mat-form-field>\n </div>\n </mat-dialog-content>\n <mat-divider></mat-divider>\n <mat-dialog-actions>\n <button mat-flat-button type=\"button\" [mat-dialog-close]=\"false\">Cancel</button>\n <button mat-flat-button type=\"submit\" [disabled]=\"!login.valid\">Sign in</button>\n </mat-dialog-actions>\n</form>\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIM,IAAA,yBAAA,GAAA,OAAA,CAAA;AACE,IAAA,oBAAA,GAAA,KAAA,EAAA;AACA,IAAA,iBAAA,CAAA;AACF,IAAA,uBAAA;;;;AADE,IAAA,oBAAA,CAAA;AAAA,IAAA,6BAAA,KAAA,OAAA,KAAA,OAAA,GAAA;;;ADSF,IAAO,+BAAP,MAAO,8BAA4B;EACvC,YAAY,OAAmD,YAAY;EAC3E,OAAO,OAIN,eAAe;EAEhB,cAAc;EAEJ,iBAAc;AACtB,SAAK,KAAK,QAAQ;AAClB,SAAK,UAAU,MAAM,KAAK,IAAI;EAChC;;qCAbW,+BAA4B;EAAA;yEAA5B,+BAA4B,WAAA,CAAA,CAAA,2BAAA,CAAA,GAAA,OAAA,IAAA,MAAA,IAAA,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