CH-J Toolsserverhantering över SSH
Menyn
Publicerad källa

CH-J Tools

Bläddra i kataloger och filer för en specifik programutgåva.

Ladda ner källa ZIP
CH-J / Server Manager 1704 filer
0.1.2-beta Tillagd: · Byggd:
quick-bridge.js Tillagd: Datum inte noterat 17,7 KB · 489 linjer
Kod Ladda ner fil
1"use strict";
2(() => {
3 // node_modules/@tauri-apps/api/external/tslib/tslib.es6.js
4 function __classPrivateFieldGet(receiver, state, kind, f) {
5 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
6 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
8 }
9 function __classPrivateFieldSet(receiver, state, value, kind, f) {
10 if (kind === "m") throw new TypeError("Private method is not writable");
11 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
13 return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
14 }
16 // node_modules/@tauri-apps/api/core.js
17 var _Channel_instances;
18 var _Channel_onmessage;
19 var _Channel_nextMessageIndex;
20 var _Channel_pendingMessages;
21 var _Channel_messageEndIndex;
22 var _Channel_deliver;
23 var _Resource_rid;
24 var SERIALIZE_TO_IPC_FN = "__TAURI_TO_IPC_KEY__";
25 function transformCallback(callback, once2 = false) {
26 return window.__TAURI_INTERNALS__.transformCallback(callback, once2);
27 }
28 var Channel = class {
29 constructor(onmessage) {
30 _Channel_instances.add(this);
31 _Channel_onmessage.set(this, void 0);
32 _Channel_nextMessageIndex.set(this, 0);
33 _Channel_pendingMessages.set(this, []);
34 _Channel_messageEndIndex.set(this, void 0);
35 __classPrivateFieldSet(this, _Channel_onmessage, onmessage || (() => {
36 }), "f");
37 this.id = transformCallback((rawMessage) => {
38 const index = rawMessage.index;
39 if ("end" in rawMessage) {
40 if (index == __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")) {
41 this.cleanupCallback();
42 } else {
43 __classPrivateFieldSet(this, _Channel_messageEndIndex, index, "f");
44 }
45 return;
46 }
47 const message = rawMessage.message;
48 if (index == __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")) {
49 __classPrivateFieldGet(this, _Channel_instances, "m", _Channel_deliver).call(this, message);
50 __classPrivateFieldSet(this, _Channel_nextMessageIndex, __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") + 1, "f");
51 while (__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") in __classPrivateFieldGet(this, _Channel_pendingMessages, "f")) {
52 const message2 = __classPrivateFieldGet(this, _Channel_pendingMessages, "f")[__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")];
53 __classPrivateFieldGet(this, _Channel_instances, "m", _Channel_deliver).call(this, message2);
54 delete __classPrivateFieldGet(this, _Channel_pendingMessages, "f")[__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")];
55 __classPrivateFieldSet(this, _Channel_nextMessageIndex, __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") + 1, "f");
56 }
57 if (__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") === __classPrivateFieldGet(this, _Channel_messageEndIndex, "f")) {
58 this.cleanupCallback();
59 }
60 } else {
61 __classPrivateFieldGet(this, _Channel_pendingMessages, "f")[index] = message;
62 }
63 });
64 }
65 cleanupCallback() {
66 window.__TAURI_INTERNALS__.unregisterCallback(this.id);
67 }
68 /**
69 * The handler called for every message sent by the Rust side of this channel.
70 *
71 * Assigning a new handler replaces the previous one; messages that arrived
72 * before a handler was set are not replayed, so set it (or pass it to the
73 * constructor) before sending the channel to the backend.
74 */
75 set onmessage(handler) {
76 __classPrivateFieldSet(this, _Channel_onmessage, handler, "f");
77 }
78 get onmessage() {
79 return __classPrivateFieldGet(this, _Channel_onmessage, "f");
80 }
81 [(_Channel_onmessage = /* @__PURE__ */ new WeakMap(), _Channel_nextMessageIndex = /* @__PURE__ */ new WeakMap(), _Channel_pendingMessages = /* @__PURE__ */ new WeakMap(), _Channel_messageEndIndex = /* @__PURE__ */ new WeakMap(), _Channel_instances = /* @__PURE__ */ new WeakSet(), _Channel_deliver = function _Channel_deliver2(message) {
82 try {
83 __classPrivateFieldGet(this, _Channel_onmessage, "f").call(this, message);
84 } catch (error) {
85 queueMicrotask(() => {
86 throw error;
87 });
88 }
89 }, SERIALIZE_TO_IPC_FN)]() {
90 return `__CHANNEL__:${this.id}`;
91 }
92 toJSON() {
93 return this[SERIALIZE_TO_IPC_FN]();
94 }
95 };
96 async function invoke(cmd, args = {}, options) {
97 return window.__TAURI_INTERNALS__.invoke(cmd, args, options);
98 }
99 var Resource = class {
100 get rid() {
101 return __classPrivateFieldGet(this, _Resource_rid, "f");
102 }
103 constructor(rid) {
104 _Resource_rid.set(this, void 0);
105 __classPrivateFieldSet(this, _Resource_rid, rid, "f");
106 }
107 /**
108 * Destroys and cleans up this resource from memory.
109 * **You should not call any method on this object anymore and should drop any reference to it.**
110 *
111 * @remarks Uses the `core:resources:allow-close` permission, which is part of
112 * the `core:resources:default` permission set enabled by default.
113 */
114 async close() {
115 return invoke("plugin:resources|close", {
116 rid: this.rid
117 });
118 }
119 async [(_Resource_rid = /* @__PURE__ */ new WeakMap(), Symbol.asyncDispose)]() {
120 await this.close();
121 }
122 };
124 // node_modules/@tauri-apps/api/event.js
125 var TauriEvent;
126 (function(TauriEvent2) {
127 TauriEvent2["WINDOW_RESIZED"] = "tauri://resize";
128 TauriEvent2["WINDOW_MOVED"] = "tauri://move";
129 TauriEvent2["WINDOW_CLOSE_REQUESTED"] = "tauri://close-requested";
130 TauriEvent2["WINDOW_DESTROYED"] = "tauri://destroyed";
131 TauriEvent2["WINDOW_FOCUS"] = "tauri://focus";
132 TauriEvent2["WINDOW_BLUR"] = "tauri://blur";
133 TauriEvent2["WINDOW_SCALE_FACTOR_CHANGED"] = "tauri://scale-change";
134 TauriEvent2["WINDOW_THEME_CHANGED"] = "tauri://theme-changed";
135 TauriEvent2["WINDOW_CREATED"] = "tauri://window-created";
136 TauriEvent2["WINDOW_SUSPENDED"] = "tauri://suspended";
137 TauriEvent2["WINDOW_RESUMED"] = "tauri://resumed";
138 TauriEvent2["WEBVIEW_CREATED"] = "tauri://webview-created";
139 TauriEvent2["DRAG_ENTER"] = "tauri://drag-enter";
140 TauriEvent2["DRAG_OVER"] = "tauri://drag-over";
141 TauriEvent2["DRAG_DROP"] = "tauri://drag-drop";
142 TauriEvent2["DRAG_LEAVE"] = "tauri://drag-leave";
143 })(TauriEvent || (TauriEvent = {}));
145 // node_modules/@tauri-apps/api/dpi.js
146 var LogicalSize = class {
147 constructor(...args) {
148 this.type = "Logical";
149 if (args.length === 1) {
150 if ("Logical" in args[0]) {
151 this.width = args[0].Logical.width;
152 this.height = args[0].Logical.height;
153 } else {
154 this.width = args[0].width;
155 this.height = args[0].height;
156 }
157 } else {
158 this.width = args[0];
159 this.height = args[1];
160 }
161 }
162 /**
163 * Converts the logical size to a physical one.
164 * @example
165 * ```typescript
166 * import { LogicalSize } from '@tauri-apps/api/dpi';
167 * import { getCurrentWindow } from '@tauri-apps/api/window';
168 *
169 * const appWindow = getCurrentWindow();
170 * const factor = await appWindow.scaleFactor();
171 * const size = new LogicalSize(400, 500);
172 * const physical = size.toPhysical(factor);
173 * ```
174 *
175 * @since 2.0.0
176 */
177 toPhysical(scaleFactor) {
178 return new PhysicalSize(this.width * scaleFactor, this.height * scaleFactor);
179 }
180 [SERIALIZE_TO_IPC_FN]() {
181 return {
182 width: this.width,
183 height: this.height
184 };
185 }
186 toJSON() {
187 return this[SERIALIZE_TO_IPC_FN]();
188 }
189 };
190 var PhysicalSize = class {
191 constructor(...args) {
192 this.type = "Physical";
193 if (args.length === 1) {
194 if ("Physical" in args[0]) {
195 this.width = args[0].Physical.width;
196 this.height = args[0].Physical.height;
197 } else {
198 this.width = args[0].width;
199 this.height = args[0].height;
200 }
201 } else {
202 this.width = args[0];
203 this.height = args[1];
204 }
205 }
206 /**
207 * Converts the physical size to a logical one.
208 * @example
209 * ```typescript
210 * import { getCurrentWindow } from '@tauri-apps/api/window';
211 * const appWindow = getCurrentWindow();
212 * const factor = await appWindow.scaleFactor();
213 * const size = await appWindow.innerSize(); // PhysicalSize
214 * const logical = size.toLogical(factor);
215 * ```
216 *
217 * @since 2.0.0
218 */
219 toLogical(scaleFactor) {
220 return new LogicalSize(this.width / scaleFactor, this.height / scaleFactor);
221 }
222 [SERIALIZE_TO_IPC_FN]() {
223 return {
224 width: this.width,
225 height: this.height
226 };
227 }
228 toJSON() {
229 return this[SERIALIZE_TO_IPC_FN]();
230 }
231 };
232 var Size = class {
233 constructor(size) {
234 this.size = size;
235 }
236 /**
237 * Converts the wrapped size to a logical one.
238 *
239 * Returns the inner value untouched when it already is a {@linkcode LogicalSize}.
240 *
241 * @param scaleFactor The monitor scale factor, e.g. `await appWindow.scaleFactor()`.
242 *
243 * @since 2.1.0
244 */
245 toLogical(scaleFactor) {
246 return this.size instanceof LogicalSize ? this.size : this.size.toLogical(scaleFactor);
247 }
248 /**
249 * Converts the wrapped size to a physical one.
250 *
251 * Returns the inner value untouched when it already is a {@linkcode PhysicalSize}.
252 *
253 * @param scaleFactor The monitor scale factor, e.g. `await appWindow.scaleFactor()`.
254 *
255 * @since 2.1.0
256 */
257 toPhysical(scaleFactor) {
258 return this.size instanceof PhysicalSize ? this.size : this.size.toPhysical(scaleFactor);
259 }
260 [SERIALIZE_TO_IPC_FN]() {
261 return {
262 [`${this.size.type}`]: {
263 width: this.size.width,
264 height: this.size.height
265 }
266 };
267 }
268 toJSON() {
269 return this[SERIALIZE_TO_IPC_FN]();
270 }
271 };
272 var LogicalPosition = class {
273 constructor(...args) {
274 this.type = "Logical";
275 if (args.length === 1) {
276 if ("Logical" in args[0]) {
277 this.x = args[0].Logical.x;
278 this.y = args[0].Logical.y;
279 } else {
280 this.x = args[0].x;
281 this.y = args[0].y;
282 }
283 } else {
284 this.x = args[0];
285 this.y = args[1];
286 }
287 }
288 /**
289 * Converts the logical position to a physical one.
290 * @example
291 * ```typescript
292 * import { LogicalPosition } from '@tauri-apps/api/dpi';
293 * import { getCurrentWindow } from '@tauri-apps/api/window';
294 *
295 * const appWindow = getCurrentWindow();
296 * const factor = await appWindow.scaleFactor();
297 * const position = new LogicalPosition(400, 500);
298 * const physical = position.toPhysical(factor);
299 * ```
300 *
301 * @since 2.0.0
302 */
303 toPhysical(scaleFactor) {
304 return new PhysicalPosition(this.x * scaleFactor, this.y * scaleFactor);
305 }
306 [SERIALIZE_TO_IPC_FN]() {
307 return {
308 x: this.x,
309 y: this.y
310 };
311 }
312 toJSON() {
313 return this[SERIALIZE_TO_IPC_FN]();
314 }
315 };
316 var PhysicalPosition = class {
317 constructor(...args) {
318 this.type = "Physical";
319 if (args.length === 1) {
320 if ("Physical" in args[0]) {
321 this.x = args[0].Physical.x;
322 this.y = args[0].Physical.y;
323 } else {
324 this.x = args[0].x;
325 this.y = args[0].y;
326 }
327 } else {
328 this.x = args[0];
329 this.y = args[1];
330 }
331 }
332 /**
333 * Converts the physical position to a logical one.
334 * @example
335 * ```typescript
336 * import { PhysicalPosition } from '@tauri-apps/api/dpi';
337 * import { getCurrentWindow } from '@tauri-apps/api/window';
338 *
339 * const appWindow = getCurrentWindow();
340 * const factor = await appWindow.scaleFactor();
341 * const position = new PhysicalPosition(400, 500);
342 * const logical = position.toLogical(factor);
343 * ```
344 *
345 * @since 2.0.0
346 */
347 toLogical(scaleFactor) {
348 return new LogicalPosition(this.x / scaleFactor, this.y / scaleFactor);
349 }
350 [SERIALIZE_TO_IPC_FN]() {
351 return {
352 x: this.x,
353 y: this.y
354 };
355 }
356 toJSON() {
357 return this[SERIALIZE_TO_IPC_FN]();
358 }
359 };
360 var Position = class {
361 constructor(position) {
362 this.position = position;
363 }
364 /**
365 * Converts the wrapped position to a logical one.
366 *
367 * Returns the inner value untouched when it already is a {@linkcode LogicalPosition}.
368 *
369 * @param scaleFactor The monitor scale factor, e.g. `await appWindow.scaleFactor()`.
370 *
371 * @since 2.1.0
372 */
373 toLogical(scaleFactor) {
374 return this.position instanceof LogicalPosition ? this.position : this.position.toLogical(scaleFactor);
375 }
376 /**
377 * Converts the wrapped position to a physical one.
378 *
379 * Returns the inner value untouched when it already is a {@linkcode PhysicalPosition}.
380 *
381 * @param scaleFactor The monitor scale factor, e.g. `await appWindow.scaleFactor()`.
382 *
383 * @since 2.1.0
384 */
385 toPhysical(scaleFactor) {
386 return this.position instanceof PhysicalPosition ? this.position : this.position.toPhysical(scaleFactor);
387 }
388 [SERIALIZE_TO_IPC_FN]() {
389 return {
390 [`${this.position.type}`]: {
391 x: this.position.x,
392 y: this.position.y
393 }
394 };
395 }
396 toJSON() {
397 return this[SERIALIZE_TO_IPC_FN]();
398 }
399 };
401 // node_modules/@tauri-apps/api/window.js
402 var UserAttentionType;
403 (function(UserAttentionType2) {
404 UserAttentionType2[UserAttentionType2["Critical"] = 1] = "Critical";
405 UserAttentionType2[UserAttentionType2["Informational"] = 2] = "Informational";
406 })(UserAttentionType || (UserAttentionType = {}));
407 var ProgressBarStatus;
408 (function(ProgressBarStatus2) {
409 ProgressBarStatus2["None"] = "none";
410 ProgressBarStatus2["Normal"] = "normal";
411 ProgressBarStatus2["Indeterminate"] = "indeterminate";
412 ProgressBarStatus2["Paused"] = "paused";
413 ProgressBarStatus2["Error"] = "error";
414 })(ProgressBarStatus || (ProgressBarStatus = {}));
415 var BackgroundThrottlingPolicy;
416 (function(BackgroundThrottlingPolicy2) {
417 BackgroundThrottlingPolicy2["Disabled"] = "disabled";
418 BackgroundThrottlingPolicy2["Throttle"] = "throttle";
419 BackgroundThrottlingPolicy2["Suspend"] = "suspend";
420 })(BackgroundThrottlingPolicy || (BackgroundThrottlingPolicy = {}));
421 var ScrollBarStyle;
422 (function(ScrollBarStyle2) {
423 ScrollBarStyle2["Default"] = "default";
424 ScrollBarStyle2["FluentOverlay"] = "fluentOverlay";
425 })(ScrollBarStyle || (ScrollBarStyle = {}));
426 var Effect;
427 (function(Effect2) {
428 Effect2["AppearanceBased"] = "appearanceBased";
429 Effect2["Light"] = "light";
430 Effect2["Dark"] = "dark";
431 Effect2["MediumLight"] = "mediumLight";
432 Effect2["UltraDark"] = "ultraDark";
433 Effect2["Titlebar"] = "titlebar";
434 Effect2["Selection"] = "selection";
435 Effect2["Menu"] = "menu";
436 Effect2["Popover"] = "popover";
437 Effect2["Sidebar"] = "sidebar";
438 Effect2["HeaderView"] = "headerView";
439 Effect2["Sheet"] = "sheet";
440 Effect2["WindowBackground"] = "windowBackground";
441 Effect2["HudWindow"] = "hudWindow";
442 Effect2["FullScreenUI"] = "fullScreenUI";
443 Effect2["Tooltip"] = "tooltip";
444 Effect2["ContentBackground"] = "contentBackground";
445 Effect2["UnderWindowBackground"] = "underWindowBackground";
446 Effect2["UnderPageBackground"] = "underPageBackground";
447 Effect2["LiquidGlassRegular"] = "liquidGlassRegular";
448 Effect2["LiquidGlassClear"] = "liquidGlassClear";
449 Effect2["Mica"] = "mica";
450 Effect2["Blur"] = "blur";
451 Effect2["Acrylic"] = "acrylic";
452 Effect2["Tabbed"] = "tabbed";
453 Effect2["TabbedDark"] = "tabbedDark";
454 Effect2["TabbedLight"] = "tabbedLight";
455 })(Effect || (Effect = {}));
456 var EffectState;
457 (function(EffectState2) {
458 EffectState2["FollowsWindowActiveState"] = "followsWindowActiveState";
459 EffectState2["Active"] = "active";
460 EffectState2["Inactive"] = "inactive";
461 })(EffectState || (EffectState = {}));
463 // src/api/transport.ts
464 function errorFrom(channel, reason) {
465 const payload = reason && typeof reason === "object" ? reason : { message: String(reason ?? "Unknown error") };
466 const message = typeof payload.message === "string" && payload.message ? payload.message : String(payload.code || "Operation failed.");
467 return new Error(`Error invoking remote method '${channel}': Error: ${message}`);
468 }
469 async function call(command, channel, payload) {
470 try {
471 return await invoke(command, payload === void 0 ? {} : { payload });
472 } catch (reason) {
473 throw errorFrom(channel, reason);
474 }
475 }
477 // src/api/compat/quick-bridge.ts
478 var api = Object.freeze({
479 state: () => call("quick_state", "quick:state"),
480 unlock: (password) => call("quick_unlock", "quick:unlock", { password }),
481 verify: () => call("quick_verify", "quick:verify"),
482 verifyWithKey: (fingerprint) => call("quick_verify_key", "quick:verifyWithKey", { fingerprint: fingerprint || "" }),
483 verifyWithKeyserver: (fingerprint) => call("quick_verify_keyserver", "quick:verifyWithKeyserver", { fingerprint: fingerprint || "" }),
484 sign: (request) => call("quick_sign", "quick:sign", request),
485 openMain: () => call("quick_open_main", "quick:openMain"),
486 close: () => call("window_control", "window:control", { action: "close" })
487 });
488 Object.defineProperty(window, "quickApi", { value: api, writable: false, configurable: false, enumerable: true });
489})();
SHA-2569ee2e9fe934679ff8e17ab8d08d8e8c42c5c2ec0a06d4c28256ea86618ea34f1

CH-J Proprietary Software License 1.14 · Källan finns under CH-J Proprietary Software License 1.14. Dess tillgänglighet ändrar inte licensvillkoren eller ger ytterligare rättigheter.

Arkiv SHA-256ac8fe790f4ba60fc098f8c985fc2656cfcc6cdc21fb34b30e308a2b54e62258f
Filer