@seedtactics/insight-client 16.5.2 → 16.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ProgramHighlight-DPTeZ8Si.js +3 -0
- package/dist/assets/index-bPAFn3jp.js +364 -0
- package/dist/cell-status/basket-cycles.d.ts +21 -0
- package/dist/cell-status/basket-cycles.js +80 -0
- package/dist/cell-status/current-status.js +11 -3
- package/dist/cell-status/estimated-cycle-times.js +8 -4
- package/dist/cell-status/inspections.js +2 -2
- package/dist/cell-status/loading.js +4 -0
- package/dist/cell-status/material-details.d.ts +12 -4
- package/dist/cell-status/material-details.js +24 -13
- package/dist/cell-status/rebookings.js +15 -17
- package/dist/cell-status/scheduled-jobs.d.ts +1 -1
- package/dist/cell-status/scheduled-jobs.js +10 -3
- package/dist/cell-status/sim-production.js +3 -3
- package/dist/cell-status/sim-station-use.d.ts +1 -0
- package/dist/cell-status/sim-station-use.js +14 -8
- package/dist/cell-status/station-cycles.d.ts +29 -2
- package/dist/cell-status/station-cycles.js +81 -11
- package/dist/cell-status/tool-replacements.js +1 -1
- package/dist/cell-status/tool-usage.js +1 -1
- package/dist/components/App.js +101 -66
- package/dist/components/BarcodeScanning.js +12 -2
- package/dist/components/ErrorsAndLoading.js +10 -1
- package/dist/components/LogEntry.d.ts +0 -1
- package/dist/components/LogEntry.js +50 -26
- package/dist/components/Navigation.js +30 -4
- package/dist/components/analysis/AnalysisSelectToolbar.js +5 -1
- package/dist/components/analysis/BasketCycleCards.d.ts +1 -0
- package/dist/components/analysis/BasketCycleCards.js +145 -0
- package/dist/components/analysis/BufferChart.js +10 -4
- package/dist/components/analysis/CostPerPiece.js +28 -8
- package/dist/components/analysis/CycleChart.js +1 -1
- package/dist/components/analysis/DataTable.js +6 -4
- package/dist/components/analysis/HeatChart.js +27 -14
- package/dist/components/analysis/InspectionSankey.js +17 -6
- package/dist/components/analysis/PalletCycleCards.js +15 -4
- package/dist/components/analysis/PartCycleCards.js +62 -18
- package/dist/components/analysis/StationDataTable.js +14 -11
- package/dist/components/analysis/ToolReplacements.js +16 -10
- package/dist/components/log-entry-queue-filter.d.ts +2 -0
- package/dist/components/log-entry-queue-filter.js +21 -0
- package/dist/components/operations/AllMaterial.js +26 -10
- package/dist/components/operations/ChartRangeEdit.js +82 -4
- package/dist/components/operations/CloseoutReport.js +13 -4
- package/dist/components/operations/CompletedParts.js +23 -11
- package/dist/components/operations/CurrentWorkorders.js +31 -9
- package/dist/components/operations/OEEChart.js +8 -2
- package/dist/components/operations/Outliers.js +18 -7
- package/dist/components/operations/ProgramHighlight.js +4 -6
- package/dist/components/operations/Programs.js +9 -3
- package/dist/components/operations/Rebookings.js +8 -4
- package/dist/components/operations/RecentCycleChart.js +5 -3
- package/dist/components/operations/RecentProduction.js +30 -13
- package/dist/components/operations/RecentSchedules.js +6 -2
- package/dist/components/operations/RecentStationCycles.js +38 -11
- package/dist/components/operations/ShiftSettings.js +3 -3
- package/dist/components/operations/SimDayUsage.js +27 -4
- package/dist/components/operations/ToolReport.js +5 -1
- package/dist/components/operations/WorkorderGantt.js +22 -2
- package/dist/components/quality/QualityMaterial.js +11 -8
- package/dist/components/quality/RecentFailedInspections.js +3 -1
- package/dist/components/routes.d.ts +3 -0
- package/dist/components/routes.js +2 -0
- package/dist/components/station-monitor/BulkRawMaterial.js +11 -7
- package/dist/components/station-monitor/Closeout.js +14 -2
- package/dist/components/station-monitor/CustomStationMonitorDialog.js +1 -1
- package/dist/components/station-monitor/Inspection.js +23 -11
- package/dist/components/station-monitor/InvalidateCycle.js +3 -3
- package/dist/components/station-monitor/JobDetails.js +15 -2
- package/dist/components/station-monitor/LoadStation.js +274 -31
- package/dist/components/station-monitor/Material.js +71 -11
- package/dist/components/station-monitor/MoveMaterialArrows.js +4 -4
- package/dist/components/station-monitor/QuarantineButton.js +11 -0
- package/dist/components/station-monitor/Queues.js +28 -9
- package/dist/components/station-monitor/QueuesAddMaterial.js +8 -6
- package/dist/components/station-monitor/SelectInspType.js +1 -1
- package/dist/components/station-monitor/SelectWorkorder.js +1 -1
- package/dist/components/station-monitor/StationToolbar.js +17 -5
- package/dist/components/station-monitor/SystemOverview.d.ts +19 -1
- package/dist/components/station-monitor/SystemOverview.js +439 -20
- package/dist/components/station-monitor/Whiteboard.js +15 -7
- package/dist/data/all-material-bins.d.ts +7 -0
- package/dist/data/all-material-bins.js +47 -1
- package/dist/data/cost-per-piece.js +11 -8
- package/dist/data/current-cycles.d.ts +1 -1
- package/dist/data/current-cycles.js +62 -17
- package/dist/data/move-arrows.d.ts +5 -1
- package/dist/data/move-arrows.js +54 -4
- package/dist/data/part-summary.js +13 -13
- package/dist/data/path-lookup.js +6 -23
- package/dist/data/queue-material.d.ts +1 -1
- package/dist/data/queue-material.js +18 -17
- package/dist/data/results.completed-parts.js +4 -3
- package/dist/data/results.cycles.d.ts +15 -6
- package/dist/data/results.cycles.js +51 -30
- package/dist/data/results.inspection.js +11 -6
- package/dist/data/results.oee.js +8 -8
- package/dist/data/results.schedules.js +2 -11
- package/dist/data/tools-programs.js +5 -6
- package/dist/index.html +1 -1
- package/dist/network/api.d.ts +22 -4
- package/dist/network/api.js +40 -5
- package/dist/network/backend-mock.js +15 -8
- package/dist/network/backend.js +3 -3
- package/dist/network/websocket.js +15 -15
- package/dist/util/chart-helpers.d.ts +1 -1
- package/dist/util/chart-helpers.js +14 -8
- package/package.json +29 -31
- package/dist/assets/ProgramHighlight-LvRM40Qr.js +0 -3
- package/dist/assets/index-gAFi3Oss.js +0 -364
package/dist/network/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//----------------------
|
|
2
2
|
// <auto-generated>
|
|
3
|
-
// Generated using the NSwag toolchain v14.
|
|
3
|
+
// Generated using the NSwag toolchain v14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
|
|
4
4
|
// </auto-generated>
|
|
5
5
|
//----------------------
|
|
6
6
|
/* eslint-disable */
|
|
@@ -2891,6 +2891,18 @@ export class ProcessInfo {
|
|
|
2891
2891
|
}
|
|
2892
2892
|
init(_data) {
|
|
2893
2893
|
if (_data) {
|
|
2894
|
+
if (Array.isArray(_data["BasketLoadStations"])) {
|
|
2895
|
+
this.basketLoadStations = [];
|
|
2896
|
+
for (let item of _data["BasketLoadStations"])
|
|
2897
|
+
this.basketLoadStations.push(item);
|
|
2898
|
+
}
|
|
2899
|
+
this.expectedBasketLoadTime = _data["ExpectedBasketLoadTime"];
|
|
2900
|
+
if (Array.isArray(_data["BasketUnloadStations"])) {
|
|
2901
|
+
this.basketUnloadStations = [];
|
|
2902
|
+
for (let item of _data["BasketUnloadStations"])
|
|
2903
|
+
this.basketUnloadStations.push(item);
|
|
2904
|
+
}
|
|
2905
|
+
this.expectedBasketUnloadTime = _data["ExpectedBasketUnloadTime"];
|
|
2894
2906
|
if (Array.isArray(_data["paths"])) {
|
|
2895
2907
|
this.paths = [];
|
|
2896
2908
|
for (let item of _data["paths"])
|
|
@@ -2906,6 +2918,18 @@ export class ProcessInfo {
|
|
|
2906
2918
|
}
|
|
2907
2919
|
toJSON(data) {
|
|
2908
2920
|
data = typeof data === 'object' ? data : {};
|
|
2921
|
+
if (Array.isArray(this.basketLoadStations)) {
|
|
2922
|
+
data["BasketLoadStations"] = [];
|
|
2923
|
+
for (let item of this.basketLoadStations)
|
|
2924
|
+
data["BasketLoadStations"].push(item);
|
|
2925
|
+
}
|
|
2926
|
+
data["ExpectedBasketLoadTime"] = this.expectedBasketLoadTime;
|
|
2927
|
+
if (Array.isArray(this.basketUnloadStations)) {
|
|
2928
|
+
data["BasketUnloadStations"] = [];
|
|
2929
|
+
for (let item of this.basketUnloadStations)
|
|
2930
|
+
data["BasketUnloadStations"].push(item);
|
|
2931
|
+
}
|
|
2932
|
+
data["ExpectedBasketUnloadTime"] = this.expectedBasketUnloadTime;
|
|
2909
2933
|
if (Array.isArray(this.paths)) {
|
|
2910
2934
|
data["paths"] = [];
|
|
2911
2935
|
for (let item of this.paths)
|
|
@@ -4155,8 +4179,10 @@ export class BasketStatus {
|
|
|
4155
4179
|
init(_data) {
|
|
4156
4180
|
if (_data) {
|
|
4157
4181
|
this.basketId = _data["BasketId"];
|
|
4158
|
-
this.
|
|
4159
|
-
this.
|
|
4182
|
+
this.location = _data["Location"];
|
|
4183
|
+
this.locationNum = _data["LocationNum"];
|
|
4184
|
+
this.locationTitle = _data["LocationTitle"];
|
|
4185
|
+
this.slot = _data["Slot"];
|
|
4160
4186
|
}
|
|
4161
4187
|
}
|
|
4162
4188
|
static fromJS(data) {
|
|
@@ -4168,11 +4194,20 @@ export class BasketStatus {
|
|
|
4168
4194
|
toJSON(data) {
|
|
4169
4195
|
data = typeof data === 'object' ? data : {};
|
|
4170
4196
|
data["BasketId"] = this.basketId;
|
|
4171
|
-
data["
|
|
4172
|
-
data["
|
|
4197
|
+
data["Location"] = this.location;
|
|
4198
|
+
data["LocationNum"] = this.locationNum;
|
|
4199
|
+
data["LocationTitle"] = this.locationTitle;
|
|
4200
|
+
data["Slot"] = this.slot;
|
|
4173
4201
|
return data;
|
|
4174
4202
|
}
|
|
4175
4203
|
}
|
|
4204
|
+
export var BasketLocationEnum;
|
|
4205
|
+
(function (BasketLocationEnum) {
|
|
4206
|
+
BasketLocationEnum["LoadUnload"] = "LoadUnload";
|
|
4207
|
+
BasketLocationEnum["LoadStationStaging"] = "LoadStationStaging";
|
|
4208
|
+
BasketLocationEnum["Storage"] = "Storage";
|
|
4209
|
+
BasketLocationEnum["InTransit"] = "InTransit";
|
|
4210
|
+
})(BasketLocationEnum || (BasketLocationEnum = {}));
|
|
4176
4211
|
export class EditMaterialInLogEvents {
|
|
4177
4212
|
constructor(data) {
|
|
4178
4213
|
if (data) {
|
|
@@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
33
33
|
import { addSeconds } from "date-fns";
|
|
34
34
|
import * as api from "./api.js";
|
|
35
35
|
import { registerBackend } from "./backend.js";
|
|
36
|
-
import { LazySeq
|
|
36
|
+
import { LazySeq } from "@seedtactics/immutable-collections";
|
|
37
37
|
function offsetJob(j, offsetSeconds) {
|
|
38
38
|
j.routeStartUTC = addSeconds(j.routeStartUTC, offsetSeconds);
|
|
39
39
|
j.routeEndUTC = addSeconds(j.routeEndUTC, offsetSeconds);
|
|
@@ -63,7 +63,7 @@ function transformTime(offsetSeconds, mockD) {
|
|
|
63
63
|
c.timeUTC = addSeconds(c.timeUTC, offsetSeconds);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
const allNewJobs = mockD.jobs.map(api.NewJobs.fromJS);
|
|
66
|
+
const allNewJobs = mockD.jobs.map((job) => api.NewJobs.fromJS(job));
|
|
67
67
|
const historicJobs = {};
|
|
68
68
|
for (const newJ of allNewJobs) {
|
|
69
69
|
for (const j of newJ.jobs) {
|
|
@@ -92,15 +92,22 @@ function transformTime(offsetSeconds, mockD) {
|
|
|
92
92
|
curSt: status,
|
|
93
93
|
jobs: historic,
|
|
94
94
|
workorders: new Map(),
|
|
95
|
-
tools: mockD.tools.map(api.ToolInMachine.fromJS),
|
|
96
|
-
programs: mockD.programs.map(api.ProgramInCellController.fromJS),
|
|
95
|
+
tools: mockD.tools.map((tool) => api.ToolInMachine.fromJS(tool)),
|
|
96
|
+
programs: mockD.programs.map((program) => api.ProgramInCellController.fromJS(program)),
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
+
function counterForEventJson(evtJson) {
|
|
100
|
+
return "counter" in evtJson && typeof evtJson.counter === "number" ? evtJson.counter : null;
|
|
101
|
+
}
|
|
99
102
|
async function loadEventsJson(offsetSeconds, mockD, evts) {
|
|
100
103
|
const toolUse = (await mockD).toolUse;
|
|
101
104
|
return LazySeq.of(await evts)
|
|
102
|
-
.
|
|
103
|
-
const
|
|
105
|
+
.collect((evtJson) => {
|
|
106
|
+
const counter = counterForEventJson(evtJson);
|
|
107
|
+
if (counter === null) {
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
const tools = toolUse[counter.toString()];
|
|
104
111
|
// the type of pal switched from string to int and I didn't want
|
|
105
112
|
// to regenerate all the data
|
|
106
113
|
if ("pal" in evtJson && typeof evtJson.pal === "string") {
|
|
@@ -126,8 +133,8 @@ async function loadEventsJson(offsetSeconds, mockD, evts) {
|
|
|
126
133
|
return true;
|
|
127
134
|
}
|
|
128
135
|
})
|
|
129
|
-
.
|
|
130
|
-
.
|
|
136
|
+
.sortBy((e) => e.endUTC.getTime(), (e) => e.counter)
|
|
137
|
+
.toMutableArray();
|
|
131
138
|
}
|
|
132
139
|
function findMatById(evts, matId) {
|
|
133
140
|
return LazySeq.of(evts)
|
package/dist/network/backend.js
CHANGED
|
@@ -56,9 +56,9 @@ export function registerBackend(log, job, fms, machine) {
|
|
|
56
56
|
export function setUserToken(u) {
|
|
57
57
|
const token = u.access_token;
|
|
58
58
|
function fetch(url, init) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
const headers = new Headers(init?.headers);
|
|
60
|
+
headers.set("Authorization", "Bearer " + token);
|
|
61
|
+
return window.fetch(url, init ? { ...init, headers } : { headers });
|
|
62
62
|
}
|
|
63
63
|
FmsServerBackend = new api.FmsClient(undefined, { fetch });
|
|
64
64
|
JobsBackend = new api.JobsClient(undefined, { fetch });
|
|
@@ -80,30 +80,30 @@ class ReconnectingWebsocket {
|
|
|
80
80
|
const connectTimeout = setTimeout(() => {
|
|
81
81
|
localWs.close();
|
|
82
82
|
}, 2000);
|
|
83
|
-
localWs.
|
|
83
|
+
localWs.addEventListener("open", () => {
|
|
84
84
|
clearTimeout(connectTimeout);
|
|
85
85
|
this.reconnectAttempts = 0;
|
|
86
|
-
this.
|
|
87
|
-
};
|
|
88
|
-
localWs.
|
|
86
|
+
this.handleOpen?.();
|
|
87
|
+
});
|
|
88
|
+
localWs.addEventListener("close", () => {
|
|
89
89
|
clearTimeout(connectTimeout);
|
|
90
90
|
this.ws = undefined;
|
|
91
91
|
if (this.userCalledClose) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
this.
|
|
94
|
+
this.handleReconnecting?.();
|
|
95
95
|
const delay = Math.min(1000 * Math.pow(1.5, this.reconnectAttempts), 30000);
|
|
96
96
|
setTimeout(() => {
|
|
97
97
|
this.reconnectAttempts++;
|
|
98
98
|
this.connect();
|
|
99
99
|
}, delay);
|
|
100
|
-
};
|
|
101
|
-
localWs.
|
|
102
|
-
this.
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
});
|
|
101
|
+
localWs.addEventListener("message", (evt) => {
|
|
102
|
+
this.handleMessage?.(evt);
|
|
103
|
+
});
|
|
104
|
+
// Browsers expose websocket failures as opaque events with no useful detail.
|
|
105
|
+
// Reconnect handling is driven by close/open, so avoid polluting stderr by
|
|
106
|
+
// adding an `onerror` handler that does nothing and can't log useful information.
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
const onOpenAtom = atom(null, (get, set) => {
|
|
@@ -150,9 +150,9 @@ export function WebsocketConnection() {
|
|
|
150
150
|
uri += "?token=" + encodeURIComponent(user.access_token);
|
|
151
151
|
}
|
|
152
152
|
const websocket = new ReconnectingWebsocket(uri);
|
|
153
|
-
websocket.
|
|
154
|
-
websocket.
|
|
155
|
-
websocket.
|
|
153
|
+
websocket.handleOpen = onOpen;
|
|
154
|
+
websocket.handleReconnecting = onReconnecting;
|
|
155
|
+
websocket.handleMessage = onMessage;
|
|
156
156
|
websocketRef.current = websocket;
|
|
157
157
|
return () => {
|
|
158
158
|
if (websocketRef.current) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MouseEvent, TouchEvent } from "react";
|
|
2
|
-
export declare function localPoint(evt: MouseEvent
|
|
2
|
+
export declare function localPoint(evt: MouseEvent | TouchEvent): DOMPoint | null;
|
|
3
3
|
export declare function measureSvgString(str: string, fontSize?: number): number | null;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export function localPoint(evt) {
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
2
|
+
const { target } = evt;
|
|
3
|
+
if (!(target instanceof SVGElement))
|
|
4
4
|
return null;
|
|
5
|
-
|
|
6
|
-
return null;
|
|
7
|
-
const svg = node instanceof SVGSVGElement ? node : node.ownerSVGElement;
|
|
5
|
+
const svg = target instanceof SVGSVGElement ? target : target.ownerSVGElement;
|
|
8
6
|
if (!svg)
|
|
9
7
|
return null;
|
|
10
8
|
const screenCTM = svg.getScreenCTM();
|
|
@@ -24,8 +22,12 @@ export function localPoint(evt) {
|
|
|
24
22
|
const measureTextId = "__bms_measure_text_element";
|
|
25
23
|
export function measureSvgString(str, fontSize) {
|
|
26
24
|
try {
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const existingElem = document.getElementById(measureTextId);
|
|
26
|
+
let txtElem;
|
|
27
|
+
if (existingElem instanceof SVGTextElement) {
|
|
28
|
+
txtElem = existingElem;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
29
31
|
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
30
32
|
svg.setAttribute("aria-hidden", "true");
|
|
31
33
|
svg.style.position = "absolute";
|
|
@@ -34,7 +36,11 @@ export function measureSvgString(str, fontSize) {
|
|
|
34
36
|
svg.style.width = "0";
|
|
35
37
|
svg.style.height = "0";
|
|
36
38
|
svg.style.opacity = "0";
|
|
37
|
-
|
|
39
|
+
const textElem = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
40
|
+
if (!(textElem instanceof SVGTextElement)) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
txtElem = textElem;
|
|
38
44
|
txtElem.setAttribute("id", measureTextId);
|
|
39
45
|
if (fontSize) {
|
|
40
46
|
txtElem.style.fontSize = fontSize.toString();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seedtactics/insight-client",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.7.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -27,27 +27,27 @@
|
|
|
27
27
|
"@emotion/react": "^11.14.0",
|
|
28
28
|
"@emotion/styled": "^11.14.1",
|
|
29
29
|
"@fontsource/roboto": "^5.2.10",
|
|
30
|
-
"@mui/icons-material": "^
|
|
31
|
-
"@mui/material": "^
|
|
32
|
-
"@react-spring/rafz": "^10.0.
|
|
33
|
-
"@react-spring/web": "^10.0.
|
|
30
|
+
"@mui/icons-material": "^9.0.1",
|
|
31
|
+
"@mui/material": "^9.0.1",
|
|
32
|
+
"@react-spring/rafz": "^10.0.4",
|
|
33
|
+
"@react-spring/web": "^10.0.4",
|
|
34
34
|
"@seedtactics/immutable-collections": "^1.1.1",
|
|
35
|
-
"@yudiel/react-qr-scanner": "^2.
|
|
36
|
-
"copy-to-clipboard": "^
|
|
35
|
+
"@yudiel/react-qr-scanner": "^2.6.0",
|
|
36
|
+
"copy-to-clipboard": "^4.0.2",
|
|
37
37
|
"d3-interpolate-path": "^2.3.0",
|
|
38
38
|
"d3-sankey": "^0.12.3",
|
|
39
39
|
"d3-scale": "^4.0.2",
|
|
40
40
|
"d3-shape": "^3.2.0",
|
|
41
|
-
"date-fns": "^4.1
|
|
41
|
+
"date-fns": "^4.2.1",
|
|
42
42
|
"highlight.js": "^11.11.1",
|
|
43
43
|
"jdenticon": "^3.3.0",
|
|
44
|
-
"jotai": "^2.
|
|
45
|
-
"jotai-family": "^1.0.
|
|
44
|
+
"jotai": "^2.20.0",
|
|
45
|
+
"jotai-family": "^1.0.2",
|
|
46
46
|
"jsbarcode": "^3.12.3",
|
|
47
47
|
"oidc-client-ts": "^3.5.0",
|
|
48
|
-
"react": "^19.2.
|
|
49
|
-
"react-calendar": "^6.0.
|
|
50
|
-
"react-dom": "^19.2.
|
|
48
|
+
"react": "^19.2.6",
|
|
49
|
+
"react-calendar": "^6.0.1",
|
|
50
|
+
"react-dom": "^19.2.6",
|
|
51
51
|
"react-error-boundary": "^6.1.1",
|
|
52
52
|
"react-resize-detector": "^12.3.0",
|
|
53
53
|
"react-timeago": "^8.3.0",
|
|
@@ -55,35 +55,33 @@
|
|
|
55
55
|
"urlpattern-polyfill": "^10.1.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@eslint/js": "^10.0.1",
|
|
59
58
|
"@faker-js/faker": "^10.4.0",
|
|
60
59
|
"@types/d3-interpolate-path": "^2.0.3",
|
|
61
60
|
"@types/d3-sankey": "^0.12.5",
|
|
62
61
|
"@types/d3-scale": "^4.0.9",
|
|
63
62
|
"@types/d3-shape": "^3.1.8",
|
|
64
|
-
"@types/node": "^25.
|
|
65
|
-
"@types/react": "^19.2.
|
|
63
|
+
"@types/node": "^25.9.1",
|
|
64
|
+
"@types/react": "^19.2.15",
|
|
66
65
|
"@types/react-dom": "^19.2.3",
|
|
67
|
-
"@vitejs/plugin-react": "^6.0.
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"vite": "^8.0.3",
|
|
79
|
-
"vitest": "^4.1.2"
|
|
66
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
67
|
+
"@vitest/browser-playwright": "^4.1.7",
|
|
68
|
+
"jsdom": "^29.1.1",
|
|
69
|
+
"nswag": "^14.7.1",
|
|
70
|
+
"oxlint": "^1.66.0",
|
|
71
|
+
"oxlint-tsgolint": "^0.23.0",
|
|
72
|
+
"prettier": "^3.8.3",
|
|
73
|
+
"typescript": "^6.0.3",
|
|
74
|
+
"vite": "^8.0.14",
|
|
75
|
+
"vitest": "^4.1.7",
|
|
76
|
+
"vitest-browser-react": "^2.2.0"
|
|
80
77
|
},
|
|
81
78
|
"scripts": {
|
|
79
|
+
"check": "tsc --noEmit --skipLibCheck && oxlint --type-aware",
|
|
82
80
|
"build": "tsc --noEmit --skipLibCheck && vite build",
|
|
83
81
|
"build:package": "tsc --project tsconfig.publish.json && cp -Tr ../../docs ./docs",
|
|
84
82
|
"start": "vite",
|
|
85
|
-
"test": "vitest run",
|
|
86
|
-
"test:
|
|
83
|
+
"test:unit": "vitest run --project unit",
|
|
84
|
+
"test:integration": "vitest run --browser.headless --project integration",
|
|
87
85
|
"nswag": "./node_modules/nswag/bin/nswag.js aspnetcore2openapi /project:../../server/debug-mock /output:../../server/fms-insight-api.json && ./node_modules/nswag/bin/nswag.js openapi2tsclient /UseAbortSignal:true /input:../../server/fms-insight-api.json /output:src/network/api.ts"
|
|
88
86
|
}
|
|
89
87
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=((n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)))(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}let o=e=>!!e.scope,s=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`};var c=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!o(e))return;let t=s(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){o(e)&&(this.buffer+=`</span>`)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}};let l=(e={})=>{let t={children:[]};return Object.assign(t,e),t};var u=class e{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=l({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},d=class extends u{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function f(e){return e?typeof e==`string`?e:e.source:null}function p(e){return g(`(?=`,e,`)`)}function m(e){return g(`(?:`,e,`)*`)}function h(e){return g(`(?:`,e,`)?`)}function g(...e){return e.map(e=>f(e)).join(``)}function _(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function v(...e){return`(`+(_(e).capture?``:`?:`)+e.map(e=>f(e)).join(`|`)+`)`}function y(e){return RegExp(e.toString()+`|`).exec(``).length-1}function ee(e,t){let n=e&&e.exec(t);return n&&n.index===0}let b=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function x(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=f(e),i=``;for(;r.length>0;){let e=b.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}let S=/\b\B/,C=`[a-zA-Z]\\w*`,w=`[a-zA-Z_]\\w*`,T=`\\b\\d+(\\.\\d+)?`,E=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,D=`\\b(0b[01]+)`,O=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=g(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},k={begin:`\\\\[\\s\\S]`,relevance:0},A={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[k]},j={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[k]},M={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},N=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=v(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:g(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},P=N(`//`,`$`),F=N(`/\\*`,`\\*/`),I=N(`#`,`$`),L={scope:`number`,begin:T,relevance:0},R={scope:`number`,begin:E,relevance:0},z={scope:`number`,begin:D,relevance:0},te={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[k,{begin:/\[/,end:/\]/,relevance:0,contains:[k]}]},ne={scope:`title`,begin:C,relevance:0},re={scope:`title`,begin:w,relevance:0},ie={begin:`\\.\\s*`+w,relevance:0};var B=Object.freeze({__proto__:null,APOS_STRING_MODE:A,BACKSLASH_ESCAPE:k,BINARY_NUMBER_MODE:z,BINARY_NUMBER_RE:D,COMMENT:N,C_BLOCK_COMMENT_MODE:F,C_LINE_COMMENT_MODE:P,C_NUMBER_MODE:R,C_NUMBER_RE:E,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:I,IDENT_RE:C,MATCH_NOTHING_RE:S,METHOD_GUARD:ie,NUMBER_MODE:L,NUMBER_RE:T,PHRASAL_WORDS_MODE:M,QUOTE_STRING_MODE:j,REGEXP_MODE:te,RE_STARTERS_RE:`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,SHEBANG:O,TITLE_MODE:ne,UNDERSCORE_IDENT_RE:w,UNDERSCORE_TITLE_MODE:re});function ae(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function oe(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function se(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ae,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ce(e,t){Array.isArray(e.illegal)&&(e.illegal=v(...e.illegal))}function le(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function ue(e,t){e.relevance===void 0&&(e.relevance=1)}let de=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=g(n.beforeMatch,p(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},fe=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`];function V(e,t,n=`keyword`){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,V(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,pe(n[0],n[1])]})}}function pe(e,t){return t?Number(t):me(e)?0:1}function me(e){return fe.includes(e.toLowerCase())}let H={},U=e=>{console.error(e)},W=(e,...t)=>{console.log(`WARN: ${e}`,...t)},G=(e,t)=>{H[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),H[`${e}/${t}`]=!0)},K=Error();function q(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=y(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function he(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw U(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),K;if(typeof e.beginScope!=`object`||e.beginScope===null)throw U(`beginScope must be object`),K;q(e,e.begin,{key:`beginScope`}),e.begin=x(e.begin,{joinWith:``})}}function ge(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw U(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),K;if(typeof e.endScope!=`object`||e.endScope===null)throw U(`endScope must be object`),K;q(e,e.end,{key:`endScope`}),e.end=x(e.end,{joinWith:``})}}function _e(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function ve(e){_e(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),he(e),ge(e)}function ye(e){function t(t,n){return new RegExp(f(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=y(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(x(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[oe,le,ve,de].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[se,ce,ue].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=V(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=f(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return be(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function J(e){return e?e.endsWithParent||J(e.starts):!1}function be(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:J(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var xe=`11.11.1`,Se=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}};let Y=i,X=a,Z=Symbol(`nomatch`),Q=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:d};function u(e){return l.noHighlightRe.test(e)}function f(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=M(n[1]);return t||(W(s.replace(`{}`,n[1])),W(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||M(e))}function _(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(G(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),G(`10.7.0`,`Please use highlight(code, options) instead.
|
|
2
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};R(`before:highlight`,a);let o=a.result?a.result:y(a.language,a.code,n);return o.code=a.code,R(`after:highlight`,o),o}function y(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!k.keywords){j.addText(N);return}let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(N),n=``;for(;t;){n+=N.substring(e,t.index);let r=E.case_insensitive?t[0].toLowerCase():t[0],i=u(k,r);if(i){let[e,a]=i;if(j.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=7&&(P+=a),e.startsWith(`_`))n+=t[0];else{let n=E.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(N)}n+=N.substring(e),j.addText(n)}function f(){if(N===``)return;let e=null;if(typeof k.subLanguage==`string`){if(!t[k.subLanguage]){j.addText(N);return}e=y(k.subLanguage,N,!0,A[k.subLanguage]),A[k.subLanguage]=e._top}else e=x(N,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(P+=e.relevance),j.__addSublanguage(e._emitter,e.language)}function p(){k.subLanguage==null?d():f(),N=``}function m(e,t){e!==``&&(j.startScope(t),j.addText(e),j.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=E.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(N=i,d(),N=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&j.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(N,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=``):e.beginScope._multi&&(h(e.beginScope,t),N=``)),k=Object.create(e,{parent:{value:k}}),k}function _(e,t,n){let i=ee(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function v(e){return k.matcher.regexIndex===0?(N+=e[0],1):(L=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return v(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),p(),!n.returnBegin&&!n.excludeBegin&&(N=t)),g(n,e),n.returnBegin?0:t.length}function S(e){let t=e[0],r=n.substring(e.index),i=_(k,e,r);if(!i)return Z;let a=k;k.endScope&&k.endScope._wrap?(p(),m(t,k.endScope._wrap)):k.endScope&&k.endScope._multi?(p(),h(k.endScope,e)):a.skip?N+=t:(a.returnEnd||a.excludeEnd||(N+=t),p(),a.excludeEnd&&(N=t));do k.scope&&j.closeNode(),!k.skip&&!k.subLanguage&&(P+=k.relevance),k=k.parent;while(k!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function C(){let e=[];for(let t=k;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>j.openNode(e))}let w={};function T(t,r){let a=r&&r[0];if(N+=t,a==null)return p(),0;if(w.type===`begin`&&r.type===`end`&&w.index===r.index&&a===``){if(N+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=w.rule,t}return 1}if(w=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(k.scope||`<unnamed>`)+`"`);throw e.mode=k,e}else if(r.type===`end`){let e=S(r);if(e!==Z)return e}if(r.type===`illegal`&&a===``)return N+=`
|
|
3
|
-
`,1;if(I>1e5&&I>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return N+=a,a.length}let E=M(e);if(!E)throw U(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let D=ye(E),O=``,k=a||D,A={},j=new l.__emitter(l);C();let N=``,P=0,F=0,I=0,L=!1;try{if(E.__emitTokens)E.__emitTokens(n,j);else{for(k.matcher.considerAll();;){I++,L?L=!1:k.matcher.considerAll(),k.matcher.lastIndex=F;let e=k.matcher.exec(n);if(!e)break;let t=T(n.substring(F,e.index),e);F=e.index+t}T(n.substring(F))}return j.finalize(),O=j.toHTML(),{language:e,value:O,relevance:P,illegal:!1,_emitter:j,_top:k}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:Y(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:F,context:n.slice(F-100,F+100),mode:t.mode,resultSoFar:O},_emitter:j};if(o)return{language:e,value:Y(n),illegal:!1,relevance:0,errorRaised:t,_emitter:j,_top:k};throw t}}function b(e){let t={value:Y(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function x(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(M).filter(P).map(t=>y(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(M(e.language).supersetOf===t.language)return 1;if(M(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function S(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function C(e){let t=null,n=f(e);if(u(n))return;if(R(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Se(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?_(r,{language:n,ignoreIllegals:!0}):x(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,S(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),R(`after:highlightElement`,{el:e,result:i,text:r})}function w(e){l=X(l,e)}let T=()=>{O(),G(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function E(){O(),G(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let D=!1;function O(){function e(){O()}if(document.readyState===`loading`){D||window.addEventListener(`DOMContentLoaded`,e,!1),D=!0;return}document.querySelectorAll(l.cssSelector).forEach(C)}function k(n,r){let i=null;try{i=r(e)}catch(e){if(U(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)U(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&N(i.aliases,{languageName:n})}function A(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function j(){return Object.keys(t)}function M(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function N(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function P(e){let t=M(e);return t&&!t.disableAutodetect}function F(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function I(e){F(e),a.push(e)}function L(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function R(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function z(e){return G(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),G(`10.7.0`,`Please use highlightElement now.`),C(e)}Object.assign(e,{highlight:_,highlightAuto:x,highlightAll:O,highlightElement:C,highlightBlock:z,configure:w,initHighlighting:T,initHighlightingOnLoad:E,registerLanguage:k,unregisterLanguage:A,listLanguages:j,getLanguage:M,registerAliases:N,autoDetection:P,inherit:X,addPlugin:I,removePlugin:L}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=xe,e.regex={concat:g,lookahead:p,either:v,optional:h,anyNumberOfTimes:m};for(let e in B)typeof B[e]==`object`&&n(B[e]);return Object.assign(e,B),e},$=Q({});$.newInstance=()=>Q({}),t.exports=$,$.HighlightJS=$,$.default=$}))()).default;function l(e){let t=e.regex,n={$pattern:/[A-Z]+|%/,keyword:[`THEN`,`ELSE`,`ENDIF`,`IF`,`GOTO`,`DO`,`WHILE`,`WH`,`END`,`CALL`,`SUB`,`ENDSUB`,`EQ`,`NE`,`LT`,`GT`,`LE`,`GE`,`AND`,`OR`,`XOR`,`%`],built_in:[`ATAN`,`ABS`,`ACOS`,`ASIN`,`COS`,`EXP`,`FIX`,`FUP`,`ROUND`,`LN`,`SIN`,`SQRT`,`TAN`,`EXISTS`]},r=/\b/;function i(e,t){if(e.index===0)return;let n=e.input[e.index-1];n>=`0`&&n<=`9`||n!==`_`&&t.ignoreMatch()}let a=/[+-]?((\.\d+)|(\d+)(\.\d*)?)/,o=/[GM]\s*\d+(\.\d+)?/,s=/T\s*\d+/,c=/O\s*\d+/,l=/O<.+>/,u=/[ABCUVWXYZ]\s*/,d=/[FHIJKPQRS]\s*/;return{name:`G-code (ISO 6983)`,aliases:[`nc`],case_insensitive:!0,disableAutodetect:!0,keywords:n,contains:[e.COMMENT(/\(/,/\)/),e.COMMENT(/;/,/$/),e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{scope:`title.function`,variants:[{match:t.concat(r,o)},{begin:o,"on:begin":i},{match:t.concat(r,s)},{begin:s,"on:begin":i}]},{scope:`symbol`,variants:[{match:t.concat(r,c)},{begin:c,"on:begin":i},{match:t.concat(r,l)},{begin:l,"on:begin":i},{match:/\*\s*\d+\s*$/}]},{scope:`operator`,match:/^N\s*\d+/},{scope:`variable`,match:/-?#\s*\d+/},{scope:`property`,variants:[{match:t.concat(r,u,a)},{begin:t.concat(u,a),"on:begin":i}]},{scope:`params`,variants:[{match:t.concat(r,d,a)},{begin:t.concat(d,a),"on:begin":i}]}]}}c.registerLanguage(`gcode`,l),self.onmessage=function(e){self.postMessage(c.highlight(e.data,{language:`gcode`}).value)}})();
|