@omniviewdev/runtime 0.3.0 → 0.4.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/api.cjs +1 -1
- package/dist/api.d.ts +15 -14
- package/dist/api.js +110 -125
- package/dist/bindings/encoding/json/index.d.ts +1 -0
- package/dist/bindings/encoding/json/models.d.ts +6 -0
- package/dist/bindings/github.com/omniviewdev/omniview/appservice.d.ts +18 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/diagnostics/diagnosticsclient.d.ts +51 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/diagnostics/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/data/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/data/servicewrapper.d.ts +5 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/models.d.ts +132 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/servicewrapper.d.ts +12 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/servicewrapper.d.ts +22 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/lifecycle/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/lifecycle/models.d.ts +29 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/servicewrapper.d.ts +11 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models.d.ts +39 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/servicewrapper.d.ts +16 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/models.d.ts +72 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/servicewrapper.d.ts +11 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/models.d.ts +24 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/servicewrapper.d.ts +7 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/registry/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/registry/models.d.ts +94 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.d.ts +53 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.d.ts +14 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.d.ts +4 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +61 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.d.ts +92 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.d.ts +24 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper.d.ts +18 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/types/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/types/models.d.ts +22 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models.d.ts +55 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/servicewrapper.d.ts +7 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/client.d.ts +6 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/models.d.ts +10 -0
- package/dist/bindings/github.com/omniviewdev/omniview/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/servicewrapper.d.ts +48 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/telemetry/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/telemetry/telemetrybinding.d.ts +7 -0
- package/dist/bindings/github.com/omniviewdev/omniview/models.d.ts +38 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.d.ts +101 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.d.ts +199 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models.d.ts +79 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models.d.ts +133 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models.d.ts +207 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models.d.ts +96 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models.d.ts +1199 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +169 -0
- package/dist/bindings/github.com/wailsapp/wails/v3/internal/eventcreate.d.ts +1 -0
- package/dist/bindings/time/index.d.ts +1 -0
- package/dist/bindings/time/models.d.ts +33 -0
- package/dist/calls-BmUnjINC.js +677 -0
- package/dist/calls-DZctVyoQ.cjs +1 -0
- package/dist/compat/legacyEnum.d.ts +10 -0
- package/dist/compat/resource.d.ts +4 -0
- package/dist/compat/types.d.ts +4 -0
- package/dist/context/plugins/PluginContext.d.ts +2 -2
- package/dist/events-BTiuwc-0.cjs +1 -0
- package/dist/events-DDTGFACO.js +371 -0
- package/dist/hooks/connection/useConnection.d.ts +5 -5
- package/dist/hooks/connection/useConnectionStatus.d.ts +7 -0
- package/dist/hooks/connection/useConnections.d.ts +4 -4
- package/dist/hooks/exec/useExecSession.d.ts +2 -2
- package/dist/hooks/logs/useLogSession.d.ts +1 -2
- package/dist/hooks/metric/useMetricProviders.d.ts +3 -3
- package/dist/hooks/metric/useMetricStream.d.ts +2 -2
- package/dist/hooks/metric/useResourceMetrics.d.ts +4 -3
- package/dist/hooks/networker/types.d.ts +3 -3
- package/dist/hooks/networker/usePortForwardSessions.d.ts +4 -4
- package/dist/hooks/networker/useResourcePortForwarder.d.ts +3 -4
- package/dist/hooks/resource/useEditorSchemas.d.ts +2 -2
- package/dist/hooks/resource/useEventBatcher.d.ts +3 -0
- package/dist/hooks/resource/useResource.d.ts +3 -4
- package/dist/hooks/resource/useResourceActions.d.ts +2 -3
- package/dist/hooks/resource/useResourceAreaComponent.d.ts +3 -3
- package/dist/hooks/resource/useResourceGroups.d.ts +6 -6
- package/dist/hooks/resource/useResourceMutations.d.ts +3 -4
- package/dist/hooks/resource/useResourceType.d.ts +1 -1
- package/dist/hooks/resource/useResourceTypes.d.ts +6 -6
- package/dist/hooks/resource/useResources.d.ts +3 -4
- package/dist/index-D2mKAO8s.js +1069 -0
- package/dist/index-D_aIcqH0.cjs +6 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1192 -1600
- package/dist/legacyEnum-DORXlU_y.js +13 -0
- package/dist/legacyEnum-DkV5yRdA.cjs +1 -0
- package/dist/models-B8OVRhdT.js +159 -0
- package/dist/models-BVKsY9u1.js +2285 -0
- package/dist/models-CExSuVU2.cjs +1 -0
- package/dist/models-DdAWPDgz.cjs +1 -0
- package/dist/models.cjs +1 -1
- package/dist/models.d.ts +27 -1
- package/dist/models.js +259 -2244
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +198 -205
- package/dist/servicewrapper-BH5omp-N.js +708 -0
- package/dist/servicewrapper-dDhyC68C.cjs +1 -0
- package/dist/types/watch.d.ts +4 -5
- package/package.json +17 -13
- package/LICENSE +0 -661
- package/dist/Client-07zrOerN.js +0 -636
- package/dist/Client-CLvQWnuz.cjs +0 -1
- package/dist/wailsjs/go/data/Client.d.ts +0 -10
- package/dist/wailsjs/go/devserver/DevServerManager.d.ts +0 -24
- package/dist/wailsjs/go/diagnostics/DiagnosticsClient.d.ts +0 -18
- package/dist/wailsjs/go/exec/Client.d.ts +0 -26
- package/dist/wailsjs/go/logs/Client.d.ts +0 -16
- package/dist/wailsjs/go/main/App.d.ts +0 -8
- package/dist/wailsjs/go/metric/Client.d.ts +0 -12
- package/dist/wailsjs/go/models.d.ts +0 -1060
- package/dist/wailsjs/go/networker/Client.d.ts +0 -14
- package/dist/wailsjs/go/plugin/pluginManager.d.ts +0 -52
- package/dist/wailsjs/go/pluginlog/Manager.d.ts +0 -18
- package/dist/wailsjs/go/resource/Client.d.ts +0 -90
- package/dist/wailsjs/go/settings/Client.d.ts +0 -14
- package/dist/wailsjs/go/settings/provider.d.ts +0 -48
- package/dist/wailsjs/go/ui/Client.d.ts +0 -6
- package/dist/wailsjs/go/utils/Client.d.ts +0 -2
- package/dist/wailsjs/runtime/runtime.d.ts +0 -249
|
@@ -0,0 +1,1069 @@
|
|
|
1
|
+
const f = typeof window < "u" && typeof document < "u", ne = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2
|
+
function G(e = 21) {
|
|
3
|
+
const t = typeof crypto < "u" && typeof crypto.getRandomValues == "function" ? crypto : null;
|
|
4
|
+
if (t) {
|
|
5
|
+
const i = new Uint8Array(e);
|
|
6
|
+
t.getRandomValues(i);
|
|
7
|
+
let r = "";
|
|
8
|
+
for (let l = 0; l < e; l++)
|
|
9
|
+
r += ne[i[l] & 63];
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
12
|
+
let n = "", o = e | 0;
|
|
13
|
+
for (; o--; )
|
|
14
|
+
n += ne[Math.random() * 64 | 0];
|
|
15
|
+
return n;
|
|
16
|
+
}
|
|
17
|
+
var I;
|
|
18
|
+
function ge() {
|
|
19
|
+
return window.location.origin + "/wails/runtime";
|
|
20
|
+
}
|
|
21
|
+
const C = 512 * 1024;
|
|
22
|
+
class be extends Error {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new RuntimeError instance.
|
|
25
|
+
* @param message - The error message.
|
|
26
|
+
* @param options - Options to be forwarded to the Error constructor.
|
|
27
|
+
*/
|
|
28
|
+
constructor(t, n) {
|
|
29
|
+
super(t, n), this.name = "RuntimeError";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const J = Object.freeze({
|
|
33
|
+
Call: 0,
|
|
34
|
+
Clipboard: 1,
|
|
35
|
+
Application: 2,
|
|
36
|
+
Events: 3,
|
|
37
|
+
ContextMenu: 4,
|
|
38
|
+
Dialog: 5,
|
|
39
|
+
Window: 6,
|
|
40
|
+
Screens: 7,
|
|
41
|
+
System: 8,
|
|
42
|
+
Browser: 9,
|
|
43
|
+
CancelCall: 10,
|
|
44
|
+
IOS: 11,
|
|
45
|
+
Android: 12
|
|
46
|
+
});
|
|
47
|
+
let $ = G(), V = null;
|
|
48
|
+
function q(e, t = "") {
|
|
49
|
+
return function(n, o = null) {
|
|
50
|
+
return ye(e, n, t, o);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async function ye(e, t, n, o) {
|
|
54
|
+
var i, r;
|
|
55
|
+
if (V)
|
|
56
|
+
return V.call(e, t, n, o);
|
|
57
|
+
let l = new URL(ge()), a = {
|
|
58
|
+
object: e,
|
|
59
|
+
method: t
|
|
60
|
+
};
|
|
61
|
+
o != null && (a.args = o);
|
|
62
|
+
let u = {
|
|
63
|
+
"x-wails-client-id": $,
|
|
64
|
+
"Content-Type": "application/json"
|
|
65
|
+
};
|
|
66
|
+
n && (u["x-wails-window-name"] = n);
|
|
67
|
+
const g = JSON.stringify(a);
|
|
68
|
+
let c;
|
|
69
|
+
if (g.length > C ? c = await Me(l, u, g) : c = await fetch(l, { method: "POST", headers: u, body: g }), !c.ok) {
|
|
70
|
+
const v = c.headers.get("Content-Type");
|
|
71
|
+
if (v != null && v.includes("application/json")) {
|
|
72
|
+
const h = await c.json();
|
|
73
|
+
let m;
|
|
74
|
+
switch (h.kind) {
|
|
75
|
+
case "ReferenceError":
|
|
76
|
+
m = new ReferenceError(h.message);
|
|
77
|
+
break;
|
|
78
|
+
case "TypeError":
|
|
79
|
+
m = new TypeError(h.message);
|
|
80
|
+
break;
|
|
81
|
+
case "RuntimeError":
|
|
82
|
+
m = new be(h.message);
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
m = new Error(h.message);
|
|
86
|
+
}
|
|
87
|
+
throw m.cause = h.cause, m;
|
|
88
|
+
}
|
|
89
|
+
throw new Error(await c.text());
|
|
90
|
+
}
|
|
91
|
+
return ((r = (i = c.headers.get("Content-Type")) === null || i === void 0 ? void 0 : i.indexOf("application/json")) !== null && r !== void 0 ? r : -1) !== -1 ? c.json() : c.text();
|
|
92
|
+
}
|
|
93
|
+
async function Me(e, t, n) {
|
|
94
|
+
const o = G(), i = new TextEncoder().encode(n), r = Math.ceil(i.length / C);
|
|
95
|
+
for (let l = 0; l < r - 1; l++) {
|
|
96
|
+
const a = i.subarray(l * C, (l + 1) * C), u = await fetch(e, {
|
|
97
|
+
method: "POST",
|
|
98
|
+
headers: Object.assign(Object.assign({}, t), { "x-wails-chunk-id": o, "x-wails-chunk-index": String(l), "x-wails-chunk-total": String(r) }),
|
|
99
|
+
body: a
|
|
100
|
+
});
|
|
101
|
+
if (!u.ok)
|
|
102
|
+
throw new Error(await u.text());
|
|
103
|
+
}
|
|
104
|
+
return fetch(e, {
|
|
105
|
+
method: "POST",
|
|
106
|
+
headers: Object.assign(Object.assign({}, t), { "x-wails-chunk-id": o, "x-wails-chunk-index": String(r - 1), "x-wails-chunk-total": String(r) }),
|
|
107
|
+
body: i.subarray((r - 1) * C)
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
const oe = f && typeof ((I = window.wails) === null || I === void 0 ? void 0 : I.invokeAsync) == "function" ? window.wails : null;
|
|
111
|
+
if (oe) {
|
|
112
|
+
const e = /* @__PURE__ */ new Map();
|
|
113
|
+
window._wailsAndroidCallback = (t, n, o) => {
|
|
114
|
+
var i;
|
|
115
|
+
const r = e.get(t);
|
|
116
|
+
if (r) {
|
|
117
|
+
if (e.delete(t), o) {
|
|
118
|
+
r.reject(new Error(o));
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
const l = JSON.parse(n ?? "{}");
|
|
123
|
+
if (!l.ok) {
|
|
124
|
+
r.reject(new Error((i = l.error) !== null && i !== void 0 ? i : "unknown runtime call error"));
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
r.resolve("text" in l ? l.text : l.data);
|
|
128
|
+
} catch (l) {
|
|
129
|
+
r.reject(l);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, V = {
|
|
133
|
+
call(t, n, o, i) {
|
|
134
|
+
return new Promise((r, l) => {
|
|
135
|
+
const a = G();
|
|
136
|
+
e.set(a, { resolve: r, reject: l });
|
|
137
|
+
try {
|
|
138
|
+
oe.invokeAsync(a, JSON.stringify({
|
|
139
|
+
object: t,
|
|
140
|
+
method: n,
|
|
141
|
+
windowName: o,
|
|
142
|
+
args: i ?? null,
|
|
143
|
+
clientId: $
|
|
144
|
+
}));
|
|
145
|
+
} catch (u) {
|
|
146
|
+
e.delete(a), l(u);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const K = q(J.System), _e = 0, Se = 1, Ee = 2, H = function() {
|
|
153
|
+
var e, t, n, o, i, r;
|
|
154
|
+
try {
|
|
155
|
+
if (!((t = (e = window.chrome) === null || e === void 0 ? void 0 : e.webview) === null || t === void 0) && t.postMessage)
|
|
156
|
+
return window.chrome.webview.postMessage.bind(window.chrome.webview);
|
|
157
|
+
if (!((i = (o = (n = window.webkit) === null || n === void 0 ? void 0 : n.messageHandlers) === null || o === void 0 ? void 0 : o.external) === null || i === void 0) && i.postMessage)
|
|
158
|
+
return window.webkit.messageHandlers.external.postMessage.bind(window.webkit.messageHandlers.external);
|
|
159
|
+
if (!((r = window.wails) === null || r === void 0) && r.invoke)
|
|
160
|
+
return (l) => window.wails.invoke(typeof l == "string" ? l : JSON.stringify(l));
|
|
161
|
+
} catch {
|
|
162
|
+
}
|
|
163
|
+
return console.warn(`
|
|
164
|
+
%c⚠️ Browser Environment Detected %c
|
|
165
|
+
|
|
166
|
+
%cOnly UI previews are available in the browser. For full functionality, please run the application in desktop mode.
|
|
167
|
+
More information at: https://v3.wails.io/learn/build/#using-a-browser-for-development
|
|
168
|
+
`, "background: #ffffff; color: #000000; font-weight: bold; padding: 4px 8px; border-radius: 4px; border: 2px solid #000000;", "background: transparent;", "color: #ffffff; font-style: italic; font-weight: bold;"), null;
|
|
169
|
+
}();
|
|
170
|
+
function M(e) {
|
|
171
|
+
H == null || H(e);
|
|
172
|
+
}
|
|
173
|
+
function Te() {
|
|
174
|
+
return K(_e);
|
|
175
|
+
}
|
|
176
|
+
async function Ce() {
|
|
177
|
+
return K(Ee);
|
|
178
|
+
}
|
|
179
|
+
function ze() {
|
|
180
|
+
return K(Se);
|
|
181
|
+
}
|
|
182
|
+
function F() {
|
|
183
|
+
var e, t;
|
|
184
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.OS) === "windows";
|
|
185
|
+
}
|
|
186
|
+
function Q() {
|
|
187
|
+
var e, t;
|
|
188
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.OS) === "linux";
|
|
189
|
+
}
|
|
190
|
+
function ee() {
|
|
191
|
+
var e, t;
|
|
192
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.OS) === "darwin";
|
|
193
|
+
}
|
|
194
|
+
function ce() {
|
|
195
|
+
var e, t;
|
|
196
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.OS) === "ios";
|
|
197
|
+
}
|
|
198
|
+
function fe() {
|
|
199
|
+
var e, t;
|
|
200
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.OS) === "android";
|
|
201
|
+
}
|
|
202
|
+
function De() {
|
|
203
|
+
return ce() || fe();
|
|
204
|
+
}
|
|
205
|
+
function Oe() {
|
|
206
|
+
return ee() || F() || Q();
|
|
207
|
+
}
|
|
208
|
+
function xe() {
|
|
209
|
+
var e, t;
|
|
210
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.Arch) === "amd64";
|
|
211
|
+
}
|
|
212
|
+
function Re() {
|
|
213
|
+
var e, t;
|
|
214
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.Arch) === "arm";
|
|
215
|
+
}
|
|
216
|
+
function ke() {
|
|
217
|
+
var e, t;
|
|
218
|
+
return ((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.Arch) === "arm64";
|
|
219
|
+
}
|
|
220
|
+
function we() {
|
|
221
|
+
var e, t;
|
|
222
|
+
return !!(!((t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0) && t.Debug);
|
|
223
|
+
}
|
|
224
|
+
const un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
225
|
+
__proto__: null,
|
|
226
|
+
Capabilities: Ce,
|
|
227
|
+
Environment: ze,
|
|
228
|
+
IsAMD64: xe,
|
|
229
|
+
IsARM: Re,
|
|
230
|
+
IsARM64: ke,
|
|
231
|
+
IsAndroid: fe,
|
|
232
|
+
IsDarkMode: Te,
|
|
233
|
+
IsDebug: we,
|
|
234
|
+
IsDesktop: Oe,
|
|
235
|
+
IsIOS: ce,
|
|
236
|
+
IsLinux: Q,
|
|
237
|
+
IsMac: ee,
|
|
238
|
+
IsMobile: De,
|
|
239
|
+
IsWindows: F,
|
|
240
|
+
invoke: M
|
|
241
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
242
|
+
function Le() {
|
|
243
|
+
return new MouseEvent("mousedown").buttons === 0;
|
|
244
|
+
}
|
|
245
|
+
function cn() {
|
|
246
|
+
if (!EventTarget || !AbortSignal || !AbortController)
|
|
247
|
+
return !1;
|
|
248
|
+
let e = !0;
|
|
249
|
+
const t = new EventTarget(), n = new AbortController();
|
|
250
|
+
return t.addEventListener("test", () => {
|
|
251
|
+
e = !1;
|
|
252
|
+
}, { signal: n.signal }), n.abort(), t.dispatchEvent(new CustomEvent("test")), e;
|
|
253
|
+
}
|
|
254
|
+
function he(e) {
|
|
255
|
+
var t;
|
|
256
|
+
return e.target instanceof HTMLElement ? e.target : !(e.target instanceof HTMLElement) && e.target instanceof Node && (t = e.target.parentElement) !== null && t !== void 0 ? t : document.body;
|
|
257
|
+
}
|
|
258
|
+
let me = !1;
|
|
259
|
+
f && document.addEventListener("DOMContentLoaded", () => {
|
|
260
|
+
me = !0;
|
|
261
|
+
});
|
|
262
|
+
function Fe(e) {
|
|
263
|
+
me || document.readyState === "complete" ? e() : document.addEventListener("DOMContentLoaded", e);
|
|
264
|
+
}
|
|
265
|
+
f && window.addEventListener("contextmenu", He);
|
|
266
|
+
const Pe = q(J.ContextMenu), Ae = 0;
|
|
267
|
+
function Ie(e, t, n, o) {
|
|
268
|
+
Pe(Ae, { id: e, x: t, y: n, data: o });
|
|
269
|
+
}
|
|
270
|
+
function He(e) {
|
|
271
|
+
const t = he(e), n = window.getComputedStyle(t).getPropertyValue("--custom-contextmenu").trim();
|
|
272
|
+
if (n) {
|
|
273
|
+
e.preventDefault();
|
|
274
|
+
const o = window.getComputedStyle(t).getPropertyValue("--custom-contextmenu-data");
|
|
275
|
+
Ie(n, e.clientX, e.clientY, o);
|
|
276
|
+
} else
|
|
277
|
+
je(e, t);
|
|
278
|
+
}
|
|
279
|
+
function je(e, t) {
|
|
280
|
+
if (we())
|
|
281
|
+
return;
|
|
282
|
+
switch (window.getComputedStyle(t).getPropertyValue("--default-contextmenu").trim()) {
|
|
283
|
+
case "show":
|
|
284
|
+
return;
|
|
285
|
+
case "hide":
|
|
286
|
+
e.preventDefault();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
if (t.isContentEditable)
|
|
290
|
+
return;
|
|
291
|
+
const n = window.getSelection(), o = n && n.toString().length > 0;
|
|
292
|
+
if (o)
|
|
293
|
+
for (let i = 0; i < n.rangeCount; i++) {
|
|
294
|
+
const l = n.getRangeAt(i).getClientRects();
|
|
295
|
+
for (let a = 0; a < l.length; a++) {
|
|
296
|
+
const u = l[a];
|
|
297
|
+
if (document.elementFromPoint(u.left, u.top) === t)
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
(t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (o || !t.readOnly && !t.disabled) || e.preventDefault();
|
|
302
|
+
}
|
|
303
|
+
function z(e) {
|
|
304
|
+
try {
|
|
305
|
+
return window._wails.flags[e];
|
|
306
|
+
} catch (t) {
|
|
307
|
+
throw new Error("Unable to retrieve flag '" + e + "': " + t, { cause: t });
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
const fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
311
|
+
__proto__: null,
|
|
312
|
+
GetFlag: z
|
|
313
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
314
|
+
let D = !1, O = !1, X = !1, E = !1, T = !1, y = "", ie = "auto", _ = 0, x = !1;
|
|
315
|
+
f && (x = Le(), window._wails = window._wails || {}, window._wails.setResizable = (e) => {
|
|
316
|
+
X = e, X || (E = T = !1, w());
|
|
317
|
+
});
|
|
318
|
+
let Y = !1;
|
|
319
|
+
function Be() {
|
|
320
|
+
var e, t;
|
|
321
|
+
const n = (t = (e = window._wails) === null || e === void 0 ? void 0 : e.environment) === null || t === void 0 ? void 0 : t.OS;
|
|
322
|
+
if (n === "ios" || n === "android")
|
|
323
|
+
return !0;
|
|
324
|
+
const o = navigator.userAgent || navigator.vendor || window.opera || "";
|
|
325
|
+
return /android|iphone|ipad|ipod|iemobile|wpdesktop/i.test(o);
|
|
326
|
+
}
|
|
327
|
+
function j() {
|
|
328
|
+
if (!Y && !Be()) {
|
|
329
|
+
window.addEventListener("mousedown", U, { capture: !0 }), window.addEventListener("mousemove", U, { capture: !0 }), window.addEventListener("mouseup", U, { capture: !0 });
|
|
330
|
+
for (const e of ["click", "contextmenu", "dblclick"])
|
|
331
|
+
window.addEventListener(e, Ne, { capture: !0 });
|
|
332
|
+
Y = !0;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (f) {
|
|
336
|
+
j(), document.addEventListener("DOMContentLoaded", j, { once: !0 });
|
|
337
|
+
let e = 0;
|
|
338
|
+
const t = window.setInterval(() => {
|
|
339
|
+
if (Y) {
|
|
340
|
+
window.clearInterval(t);
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
j(), ++e > 100 && window.clearInterval(t);
|
|
344
|
+
}, 50);
|
|
345
|
+
}
|
|
346
|
+
function Ne(e) {
|
|
347
|
+
if (e.type === "dblclick" && ee() && window === window.top && pe(e)) {
|
|
348
|
+
e.stopImmediatePropagation(), e.stopPropagation(), e.preventDefault(), M("wails:drag:doubleclick");
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
(O || T) && (e.stopImmediatePropagation(), e.stopPropagation(), e.preventDefault());
|
|
352
|
+
}
|
|
353
|
+
function pe(e) {
|
|
354
|
+
const t = he(e);
|
|
355
|
+
return window.getComputedStyle(t).getPropertyValue("--wails-draggable").trim() === "drag" && e.offsetX >= 0 && e.offsetX < t.clientWidth && e.offsetY >= 0 && e.offsetY < t.clientHeight;
|
|
356
|
+
}
|
|
357
|
+
const B = 0, Ue = 1, N = 2;
|
|
358
|
+
function U(e) {
|
|
359
|
+
let t, n = e.buttons;
|
|
360
|
+
switch (e.type) {
|
|
361
|
+
case "mousedown":
|
|
362
|
+
t = B, x || (n = _ | 1 << e.button);
|
|
363
|
+
break;
|
|
364
|
+
case "mouseup":
|
|
365
|
+
t = Ue, x || (n = _ & ~(1 << e.button));
|
|
366
|
+
break;
|
|
367
|
+
default:
|
|
368
|
+
t = N, x || (n = _);
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
let o = _ & ~n, i = n & ~_;
|
|
372
|
+
_ = n, t === B && !(i & e.button) && (o |= 1 << e.button, i |= 1 << e.button), (t !== N && T || O && (t === B || e.button !== 0)) && (e.stopImmediatePropagation(), e.stopPropagation(), e.preventDefault()), o & 1 && Ve(), i & 1 && We(e), t === N && Ye(e);
|
|
373
|
+
}
|
|
374
|
+
function We(e) {
|
|
375
|
+
if (D = !1, E = !1, !(!F() && e.type === "mousedown" && e.button === 0 && e.detail !== 1)) {
|
|
376
|
+
if (y) {
|
|
377
|
+
if (e.type !== "mousedown")
|
|
378
|
+
return;
|
|
379
|
+
E = !0;
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
D = pe(e);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function Ve(e) {
|
|
386
|
+
D = !1, O = !1, E = !1, T = !1;
|
|
387
|
+
}
|
|
388
|
+
const Xe = Object.freeze({
|
|
389
|
+
"se-resize": "nwse-resize",
|
|
390
|
+
"sw-resize": "nesw-resize",
|
|
391
|
+
"nw-resize": "nwse-resize",
|
|
392
|
+
"ne-resize": "nesw-resize",
|
|
393
|
+
"w-resize": "ew-resize",
|
|
394
|
+
"n-resize": "ns-resize",
|
|
395
|
+
"s-resize": "ns-resize",
|
|
396
|
+
"e-resize": "ew-resize"
|
|
397
|
+
});
|
|
398
|
+
function w(e) {
|
|
399
|
+
e ? (y || (ie = document.body.style.cursor), document.body.style.cursor = Xe[e]) : !e && y && (document.body.style.cursor = ie), y = e || "";
|
|
400
|
+
}
|
|
401
|
+
function Ye(e) {
|
|
402
|
+
if (E && y ? (T = !0, M("wails:resize:" + y)) : D && (O = !0, M("wails:drag")), O || T) {
|
|
403
|
+
D = E = !1;
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
if (!X || !F() && !(Q() && z("frameless"))) {
|
|
407
|
+
y && w();
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
const t = z("system.resizeHandleHeight") || 5, n = z("system.resizeHandleWidth") || 5, o = z("resizeCornerExtra") || 10, i = Math.max(0, window.innerWidth - document.documentElement.clientWidth), r = Math.max(0, window.innerHeight - document.documentElement.clientHeight), l = window.innerWidth - i, a = window.innerHeight - r, u = e.clientX < l && l - e.clientX < n, g = e.clientX < n, c = e.clientY < t, v = e.clientY < a && a - e.clientY < t, h = e.clientX < l && l - e.clientX < n + o, m = e.clientX < n + o, P = e.clientY < t + o, A = e.clientY < a && a - e.clientY < t + o;
|
|
411
|
+
!m && !P && !A && !h ? w() : h && A ? w("se-resize") : m && A ? w("sw-resize") : m && P ? w("nw-resize") : P && h ? w("ne-resize") : g ? w("w-resize") : c ? w("n-resize") : v ? w("s-resize") : u ? w("e-resize") : w();
|
|
412
|
+
}
|
|
413
|
+
const re = "--wails-non-client-region", Ze = "wails:runtime-config-ready", Ge = /* @__PURE__ */ new Set(["caption", "minimize", "maximize", "close"]);
|
|
414
|
+
f && (window._wails = window._wails || {});
|
|
415
|
+
let Z = !1, se = "", W = /* @__PURE__ */ new Set(), S, le = !1;
|
|
416
|
+
function ae(e) {
|
|
417
|
+
const t = e.trim().toLowerCase();
|
|
418
|
+
if (Ge.has(t))
|
|
419
|
+
return t;
|
|
420
|
+
}
|
|
421
|
+
function Je(e) {
|
|
422
|
+
if (!(e instanceof HTMLElement))
|
|
423
|
+
return;
|
|
424
|
+
const t = window.getComputedStyle(e), n = ae(t.getPropertyValue(re));
|
|
425
|
+
if (!n)
|
|
426
|
+
return;
|
|
427
|
+
const o = e.parentElement;
|
|
428
|
+
if (o) {
|
|
429
|
+
const i = window.getComputedStyle(o);
|
|
430
|
+
if (ae(i.getPropertyValue(re)) === n)
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
return n;
|
|
434
|
+
}
|
|
435
|
+
function $e(e) {
|
|
436
|
+
const t = window.getComputedStyle(e);
|
|
437
|
+
return t.display !== "none" && t.visibility !== "hidden" && t.contentVisibility !== "hidden";
|
|
438
|
+
}
|
|
439
|
+
function qe(e) {
|
|
440
|
+
if (!(e instanceof HTMLElement))
|
|
441
|
+
return;
|
|
442
|
+
const t = Je(e);
|
|
443
|
+
if (!t || !$e(e))
|
|
444
|
+
return;
|
|
445
|
+
const n = e.getBoundingClientRect();
|
|
446
|
+
if (n.width <= 0 || n.height <= 0)
|
|
447
|
+
return;
|
|
448
|
+
const o = window.devicePixelRatio || 1, i = Math.floor(n.left * o), r = Math.floor(n.top * o), l = Math.ceil(n.right * o), a = Math.ceil(n.bottom * o);
|
|
449
|
+
if (!(l <= i || a <= r))
|
|
450
|
+
return { kind: t, left: i, top: r, right: l, bottom: a };
|
|
451
|
+
}
|
|
452
|
+
function Ke() {
|
|
453
|
+
const e = [];
|
|
454
|
+
if (document.documentElement && e.push(document.documentElement), document.body) {
|
|
455
|
+
e.push(document.body);
|
|
456
|
+
for (const t of document.body.querySelectorAll("*"))
|
|
457
|
+
e.push(t);
|
|
458
|
+
}
|
|
459
|
+
return e;
|
|
460
|
+
}
|
|
461
|
+
function Qe(e) {
|
|
462
|
+
if (typeof ResizeObserver > "u")
|
|
463
|
+
return;
|
|
464
|
+
S ?? (S = new ResizeObserver(b));
|
|
465
|
+
const t = new Set(e);
|
|
466
|
+
for (const n of W)
|
|
467
|
+
t.has(n) || S.unobserve(n);
|
|
468
|
+
for (const n of t)
|
|
469
|
+
W.has(n) || S.observe(n);
|
|
470
|
+
W = t;
|
|
471
|
+
}
|
|
472
|
+
function et() {
|
|
473
|
+
Z = !1;
|
|
474
|
+
const e = Ke(), t = [], n = [];
|
|
475
|
+
for (const i of e) {
|
|
476
|
+
const r = qe(i);
|
|
477
|
+
r && (t.push(r), n.push(i));
|
|
478
|
+
}
|
|
479
|
+
Qe(n);
|
|
480
|
+
const o = JSON.stringify({ version: 1, regions: t });
|
|
481
|
+
o !== se && (se = o, M("wails:non-client-region:" + o));
|
|
482
|
+
}
|
|
483
|
+
function b() {
|
|
484
|
+
Z || (Z = !0, window.requestAnimationFrame(et));
|
|
485
|
+
}
|
|
486
|
+
function tt() {
|
|
487
|
+
var e, t;
|
|
488
|
+
if (le)
|
|
489
|
+
return;
|
|
490
|
+
le = !0, b(), new MutationObserver(b).observe(document.documentElement, {
|
|
491
|
+
attributes: !0,
|
|
492
|
+
childList: !0,
|
|
493
|
+
subtree: !0
|
|
494
|
+
}), window.addEventListener("resize", b), window.addEventListener("scroll", b, !0), (e = window.visualViewport) === null || e === void 0 || e.addEventListener("resize", b), (t = window.visualViewport) === null || t === void 0 || t.addEventListener("scroll", b);
|
|
495
|
+
}
|
|
496
|
+
function de() {
|
|
497
|
+
var e, t;
|
|
498
|
+
const n = (e = window._wails.environment) === null || e === void 0 ? void 0 : e.OS;
|
|
499
|
+
if (n === void 0)
|
|
500
|
+
return !1;
|
|
501
|
+
const o = (t = window._wails.flags) === null || t === void 0 ? void 0 : t.nonClientRegionTracking;
|
|
502
|
+
return n === "windows" && o === !0 && Fe(tt), !0;
|
|
503
|
+
}
|
|
504
|
+
f && !de() && window.addEventListener(Ze, de, { once: !0 });
|
|
505
|
+
function R(e) {
|
|
506
|
+
return e;
|
|
507
|
+
}
|
|
508
|
+
function wn(e) {
|
|
509
|
+
return e ?? "";
|
|
510
|
+
}
|
|
511
|
+
function hn(e) {
|
|
512
|
+
return e === R ? (t) => t === null ? [] : t : (t) => {
|
|
513
|
+
if (t === null)
|
|
514
|
+
return [];
|
|
515
|
+
for (let n = 0; n < t.length; n++)
|
|
516
|
+
t[n] = e(t[n]);
|
|
517
|
+
return t;
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
function mn(e, t) {
|
|
521
|
+
return t === R ? (n) => n === null ? {} : n : (n) => {
|
|
522
|
+
if (n === null)
|
|
523
|
+
return {};
|
|
524
|
+
for (const o in n)
|
|
525
|
+
n[o] = t(n[o]);
|
|
526
|
+
return n;
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
function pn(e) {
|
|
530
|
+
return e === R ? R : (t) => t === null ? null : e(t);
|
|
531
|
+
}
|
|
532
|
+
const vn = {}, nt = "data-file-drop-target", p = "file-drop-target-active";
|
|
533
|
+
let d = null;
|
|
534
|
+
const ot = 0, it = 1, rt = 2, st = 3, lt = 4, at = 5, dt = 6, ut = 7, ct = 8, ft = 9, wt = 10, ht = 11, mt = 12, pt = 13, vt = 14, gt = 15, bt = 16, yt = 17, Mt = 18, _t = 19, St = 20, Et = 21, Tt = 22, Ct = 23, zt = 24, Dt = 25, Ot = 26, xt = 27, Rt = 28, kt = 29, Lt = 30, Ft = 31, Pt = 32, At = 33, It = 34, Ht = 35, jt = 36, Bt = 37, Nt = 38, Ut = 39, Wt = 40, Vt = 41, Xt = 42, Yt = 43, Zt = 44, Gt = 45, Jt = 46, $t = 47, qt = 48, Kt = 49, Qt = 50, en = 51, tn = 52;
|
|
535
|
+
function k(e) {
|
|
536
|
+
return e ? e.closest(`[${nt}]`) : null;
|
|
537
|
+
}
|
|
538
|
+
function nn() {
|
|
539
|
+
var e, t, n, o;
|
|
540
|
+
return ((t = (e = window.chrome) === null || e === void 0 ? void 0 : e.webview) === null || t === void 0 ? void 0 : t.postMessageWithAdditionalObjects) == null ? !1 : ((o = (n = window._wails) === null || n === void 0 ? void 0 : n.flags) === null || o === void 0 ? void 0 : o.enableFileDrop) === !0;
|
|
541
|
+
}
|
|
542
|
+
function on(e, t, n) {
|
|
543
|
+
var o, i;
|
|
544
|
+
!((i = (o = window.chrome) === null || o === void 0 ? void 0 : o.webview) === null || i === void 0) && i.postMessageWithAdditionalObjects && window.chrome.webview.postMessageWithAdditionalObjects(`file:drop:${e}:${t}`, n);
|
|
545
|
+
}
|
|
546
|
+
let te = !1;
|
|
547
|
+
function ve() {
|
|
548
|
+
te = !1, d && (d.classList.remove(p), d = null);
|
|
549
|
+
}
|
|
550
|
+
function rn() {
|
|
551
|
+
var e, t;
|
|
552
|
+
((t = (e = window._wails) === null || e === void 0 ? void 0 : e.flags) === null || t === void 0 ? void 0 : t.enableFileDrop) !== !1 && (te = !0);
|
|
553
|
+
}
|
|
554
|
+
function sn() {
|
|
555
|
+
ve();
|
|
556
|
+
}
|
|
557
|
+
function ln(e, t) {
|
|
558
|
+
var n, o;
|
|
559
|
+
if (!te || ((o = (n = window._wails) === null || n === void 0 ? void 0 : n.flags) === null || o === void 0 ? void 0 : o.enableFileDrop) === !1)
|
|
560
|
+
return;
|
|
561
|
+
const i = document.elementFromPoint(e, t), r = k(i);
|
|
562
|
+
d && d !== r && d.classList.remove(p), r ? (r.classList.add(p), d = r) : d = null;
|
|
563
|
+
}
|
|
564
|
+
const s = Symbol("caller");
|
|
565
|
+
class L {
|
|
566
|
+
/**
|
|
567
|
+
* Initialises a window object with the specified name.
|
|
568
|
+
*
|
|
569
|
+
* @private
|
|
570
|
+
* @param name - The name of the target window.
|
|
571
|
+
*/
|
|
572
|
+
constructor(t = "") {
|
|
573
|
+
this[s] = q(J.Window, t);
|
|
574
|
+
for (const n of Object.getOwnPropertyNames(L.prototype))
|
|
575
|
+
n !== "constructor" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Gets the specified window.
|
|
579
|
+
*
|
|
580
|
+
* @param name - The name of the window to get.
|
|
581
|
+
* @returns The corresponding window object.
|
|
582
|
+
*/
|
|
583
|
+
Get(t) {
|
|
584
|
+
return new L(t);
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Returns the absolute position of the window.
|
|
588
|
+
*
|
|
589
|
+
* @returns The current absolute position of the window.
|
|
590
|
+
*/
|
|
591
|
+
Position() {
|
|
592
|
+
return this[s](ot);
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Centers the window on the screen.
|
|
596
|
+
*/
|
|
597
|
+
Center() {
|
|
598
|
+
return this[s](it);
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Closes the window.
|
|
602
|
+
*/
|
|
603
|
+
Close() {
|
|
604
|
+
return this[s](rt);
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Disables min/max size constraints.
|
|
608
|
+
*/
|
|
609
|
+
DisableSizeConstraints() {
|
|
610
|
+
return this[s](st);
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Enables min/max size constraints.
|
|
614
|
+
*/
|
|
615
|
+
EnableSizeConstraints() {
|
|
616
|
+
return this[s](lt);
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Focuses the window.
|
|
620
|
+
*/
|
|
621
|
+
Focus() {
|
|
622
|
+
return this[s](at);
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Forces the window to reload the page assets.
|
|
626
|
+
*/
|
|
627
|
+
ForceReload() {
|
|
628
|
+
return this[s](dt);
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Switches the window to fullscreen mode.
|
|
632
|
+
*/
|
|
633
|
+
Fullscreen() {
|
|
634
|
+
return this[s](ut);
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Returns the screen that the window is on.
|
|
638
|
+
*
|
|
639
|
+
* @returns The screen the window is currently on.
|
|
640
|
+
*/
|
|
641
|
+
GetScreen() {
|
|
642
|
+
return this[s](ct);
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Returns the current zoom level of the window.
|
|
646
|
+
*
|
|
647
|
+
* @returns The current zoom level.
|
|
648
|
+
*/
|
|
649
|
+
GetZoom() {
|
|
650
|
+
return this[s](ft);
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Returns the height of the window.
|
|
654
|
+
*
|
|
655
|
+
* @returns The current height of the window.
|
|
656
|
+
*/
|
|
657
|
+
Height() {
|
|
658
|
+
return this[s](wt);
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Hides the window.
|
|
662
|
+
*/
|
|
663
|
+
Hide() {
|
|
664
|
+
return this[s](ht);
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Returns true if the window is focused.
|
|
668
|
+
*
|
|
669
|
+
* @returns Whether the window is currently focused.
|
|
670
|
+
*/
|
|
671
|
+
IsFocused() {
|
|
672
|
+
return this[s](mt);
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Returns true if the window is fullscreen.
|
|
676
|
+
*
|
|
677
|
+
* @returns Whether the window is currently fullscreen.
|
|
678
|
+
*/
|
|
679
|
+
IsFullscreen() {
|
|
680
|
+
return this[s](pt);
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Returns true if the window is maximised.
|
|
684
|
+
*
|
|
685
|
+
* @returns Whether the window is currently maximised.
|
|
686
|
+
*/
|
|
687
|
+
IsMaximised() {
|
|
688
|
+
return this[s](vt);
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* Returns true if the window is minimised.
|
|
692
|
+
*
|
|
693
|
+
* @returns Whether the window is currently minimised.
|
|
694
|
+
*/
|
|
695
|
+
IsMinimised() {
|
|
696
|
+
return this[s](gt);
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Maximises the window.
|
|
700
|
+
*/
|
|
701
|
+
Maximise() {
|
|
702
|
+
return this[s](bt);
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Minimises the window.
|
|
706
|
+
*/
|
|
707
|
+
Minimise() {
|
|
708
|
+
return this[s](yt);
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Returns the name of the window.
|
|
712
|
+
*
|
|
713
|
+
* @returns The name of the window.
|
|
714
|
+
*/
|
|
715
|
+
Name() {
|
|
716
|
+
return this[s](Mt);
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Opens the development tools pane.
|
|
720
|
+
*/
|
|
721
|
+
OpenDevTools() {
|
|
722
|
+
return this[s](_t);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Returns the relative position of the window to the screen.
|
|
726
|
+
*
|
|
727
|
+
* @returns The current relative position of the window.
|
|
728
|
+
*/
|
|
729
|
+
RelativePosition() {
|
|
730
|
+
return this[s](St);
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Reloads the page assets.
|
|
734
|
+
*/
|
|
735
|
+
Reload() {
|
|
736
|
+
return this[s](Et);
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Returns true if the window is resizable.
|
|
740
|
+
*
|
|
741
|
+
* @returns Whether the window is currently resizable.
|
|
742
|
+
*/
|
|
743
|
+
Resizable() {
|
|
744
|
+
return this[s](Tt);
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Restores the window to its previous state if it was previously minimised, maximised or fullscreen.
|
|
748
|
+
*/
|
|
749
|
+
Restore() {
|
|
750
|
+
return this[s](Ct);
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Sets the absolute position of the window.
|
|
754
|
+
*
|
|
755
|
+
* @param x - The desired horizontal absolute position of the window.
|
|
756
|
+
* @param y - The desired vertical absolute position of the window.
|
|
757
|
+
*/
|
|
758
|
+
SetPosition(t, n) {
|
|
759
|
+
return this[s](zt, { x: t, y: n });
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Sets the window to be always on top.
|
|
763
|
+
*
|
|
764
|
+
* @param alwaysOnTop - Whether the window should stay on top.
|
|
765
|
+
*/
|
|
766
|
+
SetAlwaysOnTop(t) {
|
|
767
|
+
return this[s](Dt, { alwaysOnTop: t });
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Sets the background colour of the window.
|
|
771
|
+
*
|
|
772
|
+
* @param r - The desired red component of the window background.
|
|
773
|
+
* @param g - The desired green component of the window background.
|
|
774
|
+
* @param b - The desired blue component of the window background.
|
|
775
|
+
* @param a - The desired alpha component of the window background.
|
|
776
|
+
*/
|
|
777
|
+
SetBackgroundColour(t, n, o, i) {
|
|
778
|
+
return this[s](Ot, { r: t, g: n, b: o, a: i });
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Removes the window frame and title bar.
|
|
782
|
+
*
|
|
783
|
+
* @param frameless - Whether the window should be frameless.
|
|
784
|
+
*/
|
|
785
|
+
SetFrameless(t) {
|
|
786
|
+
return this[s](xt, { frameless: t });
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Disables the system fullscreen button.
|
|
790
|
+
*
|
|
791
|
+
* @param enabled - Whether the fullscreen button should be enabled.
|
|
792
|
+
*/
|
|
793
|
+
SetFullscreenButtonEnabled(t) {
|
|
794
|
+
return this[s](Rt, { enabled: t });
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Sets the maximum size of the window.
|
|
798
|
+
*
|
|
799
|
+
* @param width - The desired maximum width of the window.
|
|
800
|
+
* @param height - The desired maximum height of the window.
|
|
801
|
+
*/
|
|
802
|
+
SetMaxSize(t, n) {
|
|
803
|
+
return this[s](kt, { width: t, height: n });
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Sets the minimum size of the window.
|
|
807
|
+
*
|
|
808
|
+
* @param width - The desired minimum width of the window.
|
|
809
|
+
* @param height - The desired minimum height of the window.
|
|
810
|
+
*/
|
|
811
|
+
SetMinSize(t, n) {
|
|
812
|
+
return this[s](Lt, { width: t, height: n });
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Sets the relative position of the window to the screen.
|
|
816
|
+
*
|
|
817
|
+
* @param x - The desired horizontal relative position of the window.
|
|
818
|
+
* @param y - The desired vertical relative position of the window.
|
|
819
|
+
*/
|
|
820
|
+
SetRelativePosition(t, n) {
|
|
821
|
+
return this[s](Ft, { x: t, y: n });
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* Sets whether the window is resizable.
|
|
825
|
+
*
|
|
826
|
+
* @param resizable - Whether the window should be resizable.
|
|
827
|
+
*/
|
|
828
|
+
SetResizable(t) {
|
|
829
|
+
return this[s](Pt, { resizable: t });
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Sets the size of the window.
|
|
833
|
+
*
|
|
834
|
+
* @param width - The desired width of the window.
|
|
835
|
+
* @param height - The desired height of the window.
|
|
836
|
+
*/
|
|
837
|
+
SetSize(t, n) {
|
|
838
|
+
return this[s](At, { width: t, height: n });
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Sets the title of the window.
|
|
842
|
+
*
|
|
843
|
+
* @param title - The desired title of the window.
|
|
844
|
+
*/
|
|
845
|
+
SetTitle(t) {
|
|
846
|
+
return this[s](It, { title: t });
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Sets the zoom level of the window.
|
|
850
|
+
*
|
|
851
|
+
* @param zoom - The desired zoom level.
|
|
852
|
+
*/
|
|
853
|
+
SetZoom(t) {
|
|
854
|
+
return this[s](Ht, { zoom: t });
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* Shows the window.
|
|
858
|
+
*/
|
|
859
|
+
Show() {
|
|
860
|
+
return this[s](jt);
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Returns the size of the window.
|
|
864
|
+
*
|
|
865
|
+
* @returns The current size of the window.
|
|
866
|
+
*/
|
|
867
|
+
Size() {
|
|
868
|
+
return this[s](Bt);
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Toggles the window between fullscreen and normal.
|
|
872
|
+
*/
|
|
873
|
+
ToggleFullscreen() {
|
|
874
|
+
return this[s](Nt);
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Toggles the window between maximised and normal.
|
|
878
|
+
*/
|
|
879
|
+
ToggleMaximise() {
|
|
880
|
+
return this[s](Ut);
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Toggles the window between frameless and normal.
|
|
884
|
+
*/
|
|
885
|
+
ToggleFrameless() {
|
|
886
|
+
return this[s](Wt);
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Un-fullscreens the window.
|
|
890
|
+
*/
|
|
891
|
+
UnFullscreen() {
|
|
892
|
+
return this[s](Vt);
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Un-maximises the window.
|
|
896
|
+
*/
|
|
897
|
+
UnMaximise() {
|
|
898
|
+
return this[s](Xt);
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Un-minimises the window.
|
|
902
|
+
*/
|
|
903
|
+
UnMinimise() {
|
|
904
|
+
return this[s](Yt);
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Returns the width of the window.
|
|
908
|
+
*
|
|
909
|
+
* @returns The current width of the window.
|
|
910
|
+
*/
|
|
911
|
+
Width() {
|
|
912
|
+
return this[s](Zt);
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Zooms the window.
|
|
916
|
+
*/
|
|
917
|
+
Zoom() {
|
|
918
|
+
return this[s](Gt);
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Increases the zoom level of the webview content.
|
|
922
|
+
*/
|
|
923
|
+
ZoomIn() {
|
|
924
|
+
return this[s](Jt);
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* Decreases the zoom level of the webview content.
|
|
928
|
+
*/
|
|
929
|
+
ZoomOut() {
|
|
930
|
+
return this[s]($t);
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* Resets the zoom level of the webview content.
|
|
934
|
+
*/
|
|
935
|
+
ZoomReset() {
|
|
936
|
+
return this[s](qt);
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Handles file drops originating from platform-specific code (e.g., macOS/Linux native drag-and-drop).
|
|
940
|
+
* Gathers information about the drop target element and sends it back to the Go backend.
|
|
941
|
+
*
|
|
942
|
+
* @param filenames - An array of file paths (strings) that were dropped.
|
|
943
|
+
* @param x - The x-coordinate of the drop event, in logical (CSS) pixels relative to the webview.
|
|
944
|
+
* @param y - The y-coordinate of the drop event, in logical (CSS) pixels relative to the webview.
|
|
945
|
+
*/
|
|
946
|
+
HandlePlatformFileDrop(t, n, o) {
|
|
947
|
+
var i, r;
|
|
948
|
+
if (((r = (i = window._wails) === null || i === void 0 ? void 0 : i.flags) === null || r === void 0 ? void 0 : r.enableFileDrop) === !1)
|
|
949
|
+
return;
|
|
950
|
+
const l = document.elementFromPoint(n, o), a = k(l);
|
|
951
|
+
if (!a)
|
|
952
|
+
return;
|
|
953
|
+
const u = {
|
|
954
|
+
id: a.id,
|
|
955
|
+
classList: Array.from(a.classList),
|
|
956
|
+
attributes: {}
|
|
957
|
+
};
|
|
958
|
+
for (let c = 0; c < a.attributes.length; c++) {
|
|
959
|
+
const v = a.attributes[c];
|
|
960
|
+
u.attributes[v.name] = v.value;
|
|
961
|
+
}
|
|
962
|
+
const g = {
|
|
963
|
+
filenames: t,
|
|
964
|
+
x: n,
|
|
965
|
+
y: o,
|
|
966
|
+
elementDetails: u
|
|
967
|
+
};
|
|
968
|
+
this[s](Qt, g), ve();
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Moves the window to the center of the specified screen's work area.
|
|
972
|
+
*
|
|
973
|
+
* @param screenID - The ID of the target screen.
|
|
974
|
+
*/
|
|
975
|
+
SetScreen(t) {
|
|
976
|
+
return this[s](tn, { screenID: t });
|
|
977
|
+
}
|
|
978
|
+
/* Triggers Windows 11 Snap Assist feature (Windows only).
|
|
979
|
+
* This is equivalent to pressing Win+Z and shows snap layout options.
|
|
980
|
+
*/
|
|
981
|
+
SnapAssist() {
|
|
982
|
+
return this[s](Kt);
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* Opens the print dialog for the window.
|
|
986
|
+
*/
|
|
987
|
+
Print() {
|
|
988
|
+
return this[s](en);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
const ue = new L("");
|
|
992
|
+
function an() {
|
|
993
|
+
const e = document.documentElement;
|
|
994
|
+
let t = 0;
|
|
995
|
+
e.addEventListener("dragenter", (n) => {
|
|
996
|
+
var o, i, r;
|
|
997
|
+
if (!(!((o = n.dataTransfer) === null || o === void 0) && o.types.includes("Files")))
|
|
998
|
+
return;
|
|
999
|
+
if (n.preventDefault(), ((r = (i = window._wails) === null || i === void 0 ? void 0 : i.flags) === null || r === void 0 ? void 0 : r.enableFileDrop) === !1) {
|
|
1000
|
+
n.dataTransfer.dropEffect = "none";
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
t++;
|
|
1004
|
+
const l = document.elementFromPoint(n.clientX, n.clientY), a = k(l);
|
|
1005
|
+
d && d !== a && d.classList.remove(p), a ? (a.classList.add(p), n.dataTransfer.dropEffect = "copy", d = a) : (n.dataTransfer.dropEffect = "none", d = null);
|
|
1006
|
+
}, !1), e.addEventListener("dragover", (n) => {
|
|
1007
|
+
var o, i, r;
|
|
1008
|
+
if (!(!((o = n.dataTransfer) === null || o === void 0) && o.types.includes("Files")))
|
|
1009
|
+
return;
|
|
1010
|
+
if (n.preventDefault(), ((r = (i = window._wails) === null || i === void 0 ? void 0 : i.flags) === null || r === void 0 ? void 0 : r.enableFileDrop) === !1) {
|
|
1011
|
+
n.dataTransfer.dropEffect = "none";
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
const l = document.elementFromPoint(n.clientX, n.clientY), a = k(l);
|
|
1015
|
+
d && d !== a && d.classList.remove(p), a ? (a.classList.contains(p) || a.classList.add(p), n.dataTransfer.dropEffect = "copy", d = a) : (n.dataTransfer.dropEffect = "none", d = null);
|
|
1016
|
+
}, !1), e.addEventListener("dragleave", (n) => {
|
|
1017
|
+
var o, i, r;
|
|
1018
|
+
!((o = n.dataTransfer) === null || o === void 0) && o.types.includes("Files") && (n.preventDefault(), ((r = (i = window._wails) === null || i === void 0 ? void 0 : i.flags) === null || r === void 0 ? void 0 : r.enableFileDrop) !== !1 && n.relatedTarget !== null && (t--, (t === 0 || d && !d.contains(n.relatedTarget)) && (d && (d.classList.remove(p), d = null), t = 0)));
|
|
1019
|
+
}, !1), e.addEventListener("drop", (n) => {
|
|
1020
|
+
var o, i, r;
|
|
1021
|
+
if (!((o = n.dataTransfer) === null || o === void 0) && o.types.includes("Files") && (n.preventDefault(), ((r = (i = window._wails) === null || i === void 0 ? void 0 : i.flags) === null || r === void 0 ? void 0 : r.enableFileDrop) !== !1 && (t = 0, d && (d.classList.remove(p), d = null), nn()))) {
|
|
1022
|
+
const l = [];
|
|
1023
|
+
if (n.dataTransfer.items) {
|
|
1024
|
+
for (const a of n.dataTransfer.items)
|
|
1025
|
+
if (a.kind === "file") {
|
|
1026
|
+
const u = a.getAsFile();
|
|
1027
|
+
u && l.push(u);
|
|
1028
|
+
}
|
|
1029
|
+
} else if (n.dataTransfer.files)
|
|
1030
|
+
for (const a of n.dataTransfer.files)
|
|
1031
|
+
l.push(a);
|
|
1032
|
+
l.length > 0 && on(n.clientX, n.clientY, l);
|
|
1033
|
+
}
|
|
1034
|
+
}, !1);
|
|
1035
|
+
}
|
|
1036
|
+
typeof window < "u" && typeof document < "u" && an();
|
|
1037
|
+
f && (window._wails = window._wails || {});
|
|
1038
|
+
f && (window._wails.invoke = M, window._wails.clientId = $);
|
|
1039
|
+
f && (window._wails.handlePlatformFileDrop = ue.HandlePlatformFileDrop.bind(ue));
|
|
1040
|
+
f && (window._wails.handleDragEnter = rn, window._wails.handleDragLeave = sn, window._wails.handleDragOver = ln);
|
|
1041
|
+
f && M("wails:runtime:ready");
|
|
1042
|
+
function dn(e) {
|
|
1043
|
+
return fetch(e, { method: "HEAD" }).then((t) => {
|
|
1044
|
+
if (t.ok && (t.headers.get("content-type") || "").toLowerCase().includes("javascript")) {
|
|
1045
|
+
const o = document.createElement("script");
|
|
1046
|
+
o.src = e, document.head.appendChild(o);
|
|
1047
|
+
}
|
|
1048
|
+
}).catch(() => {
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
f && dn("/wails/custom.js");
|
|
1052
|
+
export {
|
|
1053
|
+
hn as A,
|
|
1054
|
+
wn as B,
|
|
1055
|
+
vn as E,
|
|
1056
|
+
mn as M,
|
|
1057
|
+
pn as N,
|
|
1058
|
+
be as R,
|
|
1059
|
+
R as a,
|
|
1060
|
+
G as b,
|
|
1061
|
+
cn as c,
|
|
1062
|
+
fn as f,
|
|
1063
|
+
f as h,
|
|
1064
|
+
q as n,
|
|
1065
|
+
J as o,
|
|
1066
|
+
un as s,
|
|
1067
|
+
ue as t,
|
|
1068
|
+
Fe as w
|
|
1069
|
+
};
|