phirepass-widgets 0.0.73 → 0.0.75

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D-l8xaCI.js');
4
- var protocol = require('./protocol-Cldo-J8L.js');
4
+ var protocol = require('./protocol-DkvltG99.js');
5
5
 
6
6
  const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
7
7
 
@@ -937,7 +937,7 @@ const PhirepassSftpClient = class {
937
937
  index.h("section", { key: '039eeae64731e54a5bf0982777815c8ad0df6b49', class: {
938
938
  'creds': true,
939
939
  'blurred': this.show_login_screen,
940
- } }, index.h("form", { key: 'b1881dd755b66c392155bb8f670a924f711bd717', class: "auth", onSubmit: (event) => {
940
+ } }, index.h("form", { key: '6670d05c61c412bbc1f8d26f317b4aea4614f428', class: "auth", onSubmit: (event) => {
941
941
  const formData = new FormData(event.target);
942
942
  let username = undefined;
943
943
  if (this.show_login_screen_username) {
@@ -947,35 +947,35 @@ const PhirepassSftpClient = class {
947
947
  if (this.show_login_screen_password) {
948
948
  password = formData.get('password');
949
949
  }
950
- this.channel.open_sftp_tunnel(this.nodeId, this.serverId, username, password);
950
+ this.channel.open_sftp_tunnel(this.nodeId, this.serviceId, username, password);
951
951
  this.show_login_screen_username = false;
952
952
  this.show_login_screen_password = false;
953
953
  this.show_login_screen = false;
954
954
  this.show_loader = true;
955
955
  event.stopPropagation();
956
956
  event.preventDefault();
957
- } }, index.h("div", { key: '250b78b4d4f20f0491034d6c261ee55581d93483', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
958
- index.h("div", { key: '68130dd636c5ae29d4bb344b45ba6b6747b2fdaf' }, index.h("label", { key: '0d3bc72b4ce0581a910f3b702e299e257498d088', htmlFor: "username" }, "Username"), index.h("input", { key: 'fef6876079e4097339549547138bcafc93901a3a', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
959
- index.h("div", { key: 'ae8d6f4f1d3bee55038dcc6b60899d4ab0ebd5ce' }, index.h("label", { key: '54dc4ff7a8faf76644d9885ea77d75357ac92ff8', htmlFor: "password" }, "Password"), index.h("input", { key: '8a4b35f9daa410d96c424ffae53ba92a793081cb', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), index.h("div", { key: '0c41f3a81ffbd29bba566f6c7ee35234de77e051' }, index.h("button", { key: '5bf5676382c66f032d72e77bc889596c0f851dbe', type: "submit" }, "Connect")))), this.show_upload_modal &&
960
- index.h("section", { key: 'f37ec9066ef29eba7b79f3db98ee080c48c9ec4e', class: {
957
+ } }, index.h("div", { key: 'c899712c9ee14f4490617a316d3bbc631d794fde', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
958
+ index.h("div", { key: '8088ac918f3455ff6bf2e2d50eb4fa8c18b58a97' }, index.h("label", { key: '850f947b1639782b1d6f4011a809466f8a43e7de', htmlFor: "username" }, "Username"), index.h("input", { key: '7fb4f67d37d84d6329840525de602a5b74675580', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
959
+ index.h("div", { key: '79633deeb5499a0fd120aba6a0875e7d78dc429a' }, index.h("label", { key: 'b911b56f1676d70e703c7fb318c6f48c52f08031', htmlFor: "password" }, "Password"), index.h("input", { key: '80ebcebc0a118f24c85f43a6bd89d5de0dbfec1c', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), index.h("div", { key: 'a1c8a2677ae4614e9cc11884aa226757bcccbcf3' }, index.h("button", { key: 'cfcd552766c53d63f8cc1cb46b328639fdad189f', type: "submit" }, "Connect")))), this.show_upload_modal &&
960
+ index.h("section", { key: '98243073570a448b37137c4b9910e809defa80ca', class: {
961
961
  'upload-modal': true,
962
962
  'visible': this.show_upload_modal,
963
- } }, index.h("div", { key: '77b7a1debd316d191ea9bc7e7fa0e914943e7951', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, index.h("div", { key: '614f3abe44943fb8d7d7e1976f82fa3161b66112', class: "title" }, "Uploading File"), index.h("div", { key: 'f2d3b094309ce4cfb4fafb0a289be1f8f116a246', class: "file-name", title: this.upload_file_name }, this.upload_file_name), index.h("div", { key: '7f6e1892490759e62c3dd5acf46dd53017619a6a', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, index.h("div", { key: '605c95beaf914644b5500bcc61b5b44aa71f4af9', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), index.h("div", { key: '2389e2b5d9f719e39d24b40e8083d662864a87db', class: "progress-meta" }, index.h("div", { key: '2464c8db01adee774d35a65bbdb22d175476e19e', class: "progress-speed" }, this.upload_speed), index.h("div", { key: 'c47334ec3967a4269cbdea7c7e4e55726461e797', class: "progress-value" }, this.format_percent(this.upload_progress))), index.h("button", { key: '25d0755fef743af337f7178da1bdd92628f908e2', type: "button", class: {
963
+ } }, index.h("div", { key: '382070ac49b529b3bd395bd7bd74f4d3ef636a53', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, index.h("div", { key: 'ab42477909654bd992d4261ff041cef1d5a139be', class: "title" }, "Uploading File"), index.h("div", { key: 'c17d2db8e7bf9ddb2e80e32d609ca5a9bf55ceba', class: "file-name", title: this.upload_file_name }, this.upload_file_name), index.h("div", { key: 'e5d6c359b82093ded872c98e965902c7f628c052', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, index.h("div", { key: '737c05d515f8163b24f0c5c7d44d978f0d80ebb8', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), index.h("div", { key: '5ec3c4970d811aaf977d71e3f2ba84cc5410a490', class: "progress-meta" }, index.h("div", { key: '18d83a68b795db0028b0ef7a5cbd51b46b29c280', class: "progress-speed" }, this.upload_speed), index.h("div", { key: '65d7b3a0b1dd5e34e00501c838ac674e2f9bc5e1', class: "progress-value" }, this.format_percent(this.upload_progress))), index.h("button", { key: 'bf6c636c3851f6fed2b1592e0bdb443108215737', type: "button", class: {
964
964
  'cancel': true,
965
965
  'finished': this.upload_finished,
966
966
  }, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
967
- index.h("section", { key: '0e9db491e0475a85eb811ee83ee5f1102b6e6091', class: {
967
+ index.h("section", { key: '0e3228077c259748f738be9d0a8eb11a9d64c36d', class: {
968
968
  'download-modal': true,
969
969
  'visible': this.show_download_modal,
970
- } }, index.h("div", { key: 'c177ed66cd9fea215cc3551455243c7cb8ddfe2a', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, index.h("div", { key: '1d4ea586f1598ce83db53c8eab628db8092ceb2c', class: "title" }, "Downloading File"), index.h("div", { key: '64bfbe33ddb139ffb7f6035dc4bdd3fb666e054e', class: "file-name", title: this.download_file_name }, this.download_file_name), index.h("div", { key: '568ca83a87c7f098453fa9d810d894cf32eac728', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, index.h("div", { key: '3a608f280ee43ffb7933f2755021ae655bd2029e', class: "progress-fill", style: { width: `${this.download_progress}%` } })), index.h("div", { key: '4c703f990756d4b3b8c4750d711ff4b9817fe2f1', class: "progress-meta" }, index.h("div", { key: 'd5fe7bc49d1f8f7fcb14c4462244c41140092b87', class: "progress-speed" }, this.download_speed), index.h("div", { key: 'd99c13a9638b7018fead0c6e2ea8df3c1ed7fca0', class: "progress-value" }, this.format_percent(this.download_progress))), index.h("button", { key: '32aa10e73df04f3b6b3f2263608c55e069bc29eb', type: "button", class: {
970
+ } }, index.h("div", { key: '2ddabbc1c6c7490b9f99e267545f891d36b1a080', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, index.h("div", { key: '64c1050634a226f7b04288b83a7b782ae0403c1f', class: "title" }, "Downloading File"), index.h("div", { key: '0e93810dfaaccec1f00ee89bba31fba8812f0640', class: "file-name", title: this.download_file_name }, this.download_file_name), index.h("div", { key: '6a2959f17fe2f0fe1ce5f4f272886491f7fc8830', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, index.h("div", { key: '71ca2cd68130d227c23817f97aa906df489ce350', class: "progress-fill", style: { width: `${this.download_progress}%` } })), index.h("div", { key: '834133dc9640a086b1d2a38ac24bfa02567a333d', class: "progress-meta" }, index.h("div", { key: '186e4d8167c207152e3b4c449c261d3e456b6ec7', class: "progress-speed" }, this.download_speed), index.h("div", { key: '69266fdc80cebced89c140016252e8e88fb012f2', class: "progress-value" }, this.format_percent(this.download_progress))), index.h("button", { key: '28238539b683c475bb8f13920485b3a7d209ddde', type: "button", class: {
971
971
  'cancel': true,
972
972
  'finished': this.download_finished,
973
973
  }, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
974
- index.h("section", { key: '0f142b91f29d4b2474ae0a9d479cec3457414f43', class: {
974
+ index.h("section", { key: '6ab3a87e386f08aa6cb5ee52de1a53d634411991', class: {
975
975
  'delete-modal': true,
976
976
  'visible': this.show_delete_modal,
977
- } }, index.h("div", { key: '2fa13dec3240b69016e33c2f751af97c5903f693', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, index.h("div", { key: '22742d0f1384acba3f08132d7efad4a78a2357ae', class: "title" }, "Delete File"), index.h("div", { key: '7eaf020753953b82d843d5b4dd8414131906151b', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), index.h("div", { key: 'f4fc23b43a78541d7ab84659d287f5d33dc4be1d', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
978
- index.h("div", { key: 'ad9fd03a6b983eb87ec37a63bf35d440ce7f908c', class: "delete-loader", "aria-hidden": "true" }, index.h("span", { key: 'e22bfb5dd729a865454cafb23f4d6eee9a2e3838', class: "spinner" })), index.h("div", { key: '730b9aa6e1bd773e8e8e9be5ee75c63ba5f69ad3', class: "modal-actions" }, index.h("button", { key: 'dd7b1ae63736e3c36b9b4894b969433a390e9ee4', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), index.h("button", { key: '113304b503ba82498a26c34b68ec9f217e6372a2', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
977
+ } }, index.h("div", { key: 'ccaed2c02103afda40b507d374836ff994f0540d', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, index.h("div", { key: '19edbb28e08b513aec244baf59c1ab6798b11a45', class: "title" }, "Delete File"), index.h("div", { key: 'b98b4a138129f18a395dd7700ce50621049e2cf3', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), index.h("div", { key: '3af3fffa9a5e2b3bc8bf8a2d3d302fcce119a246', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
978
+ index.h("div", { key: '09a78a79af88cb055cbc6e160c59b44c2be43fab', class: "delete-loader", "aria-hidden": "true" }, index.h("span", { key: '40d4285d22b51c62b4bac87ae5201ccb45721406', class: "spinner" })), index.h("div", { key: 'c3a475f37d3912755b3a6845ce49569429fc9a13', class: "modal-actions" }, index.h("button", { key: '3da31bcd06554c7463dc82e3f895fbcfe2551486', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), index.h("button", { key: '1eafd821e308588c87f334d1fdbb05b9a6ae70ef', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
979
979
  }
980
980
  static get watchers() { return {
981
981
  "nodeId": [{
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D-l8xaCI.js');
4
- var protocol = require('./protocol-Cldo-J8L.js');
4
+ var protocol = require('./protocol-DkvltG99.js');
5
5
 
6
6
  /**
7
7
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
@@ -370,7 +370,7 @@ const ErrorType = Object.freeze({
370
370
  function __wbg_get_imports() {
371
371
  const import0 = {
372
372
  __proto__: null,
373
- __wbg_Error_fdd633d4bb5dd76a: function(arg0, arg1) {
373
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
374
374
  const ret = Error(getStringFromWasm0(arg0, arg1));
375
375
  return addHeapObject(ret);
376
376
  },
@@ -381,14 +381,14 @@ function __wbg_get_imports() {
381
381
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
382
382
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
383
383
  },
384
- __wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) {
384
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
385
385
  const ret = debugString(getObject(arg1));
386
386
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
387
387
  const len1 = WASM_VECTOR_LEN;
388
388
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
389
389
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
390
390
  },
391
- __wbg___wbindgen_string_get_71bb4348194e31f0: function(arg0, arg1) {
391
+ __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
392
392
  const obj = getObject(arg1);
393
393
  const ret = typeof(obj) === 'string' ? obj : undefined;
394
394
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -396,47 +396,47 @@ function __wbg_get_imports() {
396
396
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
397
397
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
398
398
  },
399
- __wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
399
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
400
400
  throw new Error(getStringFromWasm0(arg0, arg1));
401
401
  },
402
- __wbg__wbg_cb_unref_33c39e13d73b25f6: function(arg0) {
402
+ __wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
403
403
  getObject(arg0)._wbg_cb_unref();
404
404
  },
405
- __wbg_call_0e855b388e315e17: function() { return handleError(function (arg0, arg1, arg2, arg3) {
406
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
405
+ __wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
406
+ const ret = getObject(arg0).call(getObject(arg1));
407
407
  return addHeapObject(ret);
408
408
  }, arguments); },
409
- __wbg_call_5575218572ead796: function() { return handleError(function (arg0, arg1, arg2) {
409
+ __wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
410
410
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
411
411
  return addHeapObject(ret);
412
412
  }, arguments); },
413
- __wbg_call_8e98ed2f3c86c4b5: function() { return handleError(function (arg0, arg1) {
414
- const ret = getObject(arg0).call(getObject(arg1));
413
+ __wbg_call_e3b662382210db98: function() { return handleError(function (arg0, arg1, arg2, arg3) {
414
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
415
415
  return addHeapObject(ret);
416
416
  }, arguments); },
417
417
  __wbg_clearInterval_26ba580547547579: function(arg0) {
418
418
  const ret = clearInterval(takeObject(arg0));
419
419
  return addHeapObject(ret);
420
420
  },
421
- __wbg_close_26aa343c0d729303: function() { return handleError(function (arg0) {
421
+ __wbg_close_c65ca0257e895318: function() { return handleError(function (arg0) {
422
422
  getObject(arg0).close();
423
423
  }, arguments); },
424
- __wbg_data_4a7f1308dbd33a21: function(arg0) {
424
+ __wbg_data_328de4280640da92: function(arg0) {
425
425
  const ret = getObject(arg0).data;
426
426
  return addHeapObject(ret);
427
427
  },
428
- __wbg_from_50138b2ca136f50c: function(arg0) {
428
+ __wbg_from_13e323c65fc8f464: function(arg0) {
429
429
  const ret = Array.from(getObject(arg0));
430
430
  return addHeapObject(ret);
431
431
  },
432
- __wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
432
+ __wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
433
433
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
434
434
  return addHeapObject(ret);
435
435
  }, arguments); },
436
- __wbg_info_a035e9398ce057dc: function(arg0, arg1) {
436
+ __wbg_info_457fa00f9a833fc2: function(arg0, arg1) {
437
437
  console.info(getStringFromWasm0(arg0, arg1));
438
438
  },
439
- __wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
439
+ __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
440
440
  let result;
441
441
  try {
442
442
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -446,38 +446,38 @@ function __wbg_get_imports() {
446
446
  const ret = result;
447
447
  return ret;
448
448
  },
449
- __wbg_length_589238bdcf171f0e: function(arg0) {
449
+ __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
450
450
  const ret = getObject(arg0).length;
451
451
  return ret;
452
452
  },
453
- __wbg_new_2e117a478906f062: function() {
454
- const ret = new Object();
455
- return addHeapObject(ret);
456
- },
457
- __wbg_new_36e147a8ced3c6e0: function() {
453
+ __wbg_new_32b398fb48b6d94a: function() {
458
454
  const ret = new Array();
459
455
  return addHeapObject(ret);
460
456
  },
461
- __wbg_new_81880fb5002cb255: function(arg0) {
457
+ __wbg_new_cd45aabdf6073e84: function(arg0) {
462
458
  const ret = new Uint8Array(getObject(arg0));
463
459
  return addHeapObject(ret);
464
460
  },
465
- __wbg_new_with_str_sequence_dfdb072344bf2999: function() { return handleError(function (arg0, arg1, arg2) {
461
+ __wbg_new_da52cf8fe3429cb2: function() {
462
+ const ret = new Object();
463
+ return addHeapObject(ret);
464
+ },
465
+ __wbg_new_with_str_sequence_2de2f569c29910ad: function() { return handleError(function (arg0, arg1, arg2) {
466
466
  const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
467
467
  return addHeapObject(ret);
468
468
  }, arguments); },
469
- __wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) {
469
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
470
470
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
471
471
  },
472
- __wbg_push_f724b5db8acf89d2: function(arg0, arg1) {
472
+ __wbg_push_d2ae3af0c1217ae6: function(arg0, arg1) {
473
473
  const ret = getObject(arg0).push(getObject(arg1));
474
474
  return ret;
475
475
  },
476
- __wbg_readyState_97951098f8995393: function(arg0) {
476
+ __wbg_readyState_50bc38c2a9e83db6: function(arg0) {
477
477
  const ret = getObject(arg0).readyState;
478
478
  return ret;
479
479
  },
480
- __wbg_send_982c819b9a1b34a5: function() { return handleError(function (arg0, arg1, arg2) {
480
+ __wbg_send_a321b376d40ec867: function() { return handleError(function (arg0, arg1, arg2) {
481
481
  getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
482
482
  }, arguments); },
483
483
  __wbg_setInterval_cbf1c35c6a692d37: function() { return handleError(function (arg0, arg1) {
@@ -487,25 +487,25 @@ function __wbg_get_imports() {
487
487
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
488
488
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
489
489
  },
490
- __wbg_set_binaryType_148427b11a8e6551: function(arg0, arg1) {
491
- getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
492
- },
493
- __wbg_set_dc601f4a69da0bc2: function(arg0, arg1, arg2) {
490
+ __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
494
491
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
495
492
  },
496
- __wbg_set_onclose_8134952b2a9ec104: function(arg0, arg1) {
493
+ __wbg_set_binaryType_a37b086c78ca7c29: function(arg0, arg1) {
494
+ getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
495
+ },
496
+ __wbg_set_onclose_f706475385ecce07: function(arg0, arg1) {
497
497
  getObject(arg0).onclose = getObject(arg1);
498
498
  },
499
- __wbg_set_onerror_3f68563f77d362f1: function(arg0, arg1) {
499
+ __wbg_set_onerror_9f5773fd31512333: function(arg0, arg1) {
500
500
  getObject(arg0).onerror = getObject(arg1);
501
501
  },
502
- __wbg_set_onmessage_397a79f643011142: function(arg0, arg1) {
502
+ __wbg_set_onmessage_836d2f72130b4706: function(arg0, arg1) {
503
503
  getObject(arg0).onmessage = getObject(arg1);
504
504
  },
505
- __wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
505
+ __wbg_set_onopen_4f65470ae522a61a: function(arg0, arg1) {
506
506
  getObject(arg0).onopen = getObject(arg1);
507
507
  },
508
- __wbg_warn_1087e5a6742be100: function(arg0, arg1) {
508
+ __wbg_warn_caeecd487324e541: function(arg0, arg1) {
509
509
  console.warn(getStringFromWasm0(arg0, arg1));
510
510
  },
511
511
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
@@ -875,7 +875,7 @@ async function __wbg_init(module_or_path) {
875
875
  }
876
876
 
877
877
  if (module_or_path === undefined) {
878
- module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-Cldo-J8L.js', document.baseURI).href)));
878
+ module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-DkvltG99.js', document.baseURI).href)));
879
879
  }
880
880
  const imports = __wbg_get_imports();
881
881
 
@@ -921,7 +921,7 @@ export class PhirepassSftpClient {
921
921
  h("section", { key: '039eeae64731e54a5bf0982777815c8ad0df6b49', class: {
922
922
  'creds': true,
923
923
  'blurred': this.show_login_screen,
924
- } }, h("form", { key: 'b1881dd755b66c392155bb8f670a924f711bd717', class: "auth", onSubmit: (event) => {
924
+ } }, h("form", { key: '6670d05c61c412bbc1f8d26f317b4aea4614f428', class: "auth", onSubmit: (event) => {
925
925
  const formData = new FormData(event.target);
926
926
  let username = undefined;
927
927
  if (this.show_login_screen_username) {
@@ -931,35 +931,35 @@ export class PhirepassSftpClient {
931
931
  if (this.show_login_screen_password) {
932
932
  password = formData.get('password');
933
933
  }
934
- this.channel.open_sftp_tunnel(this.nodeId, this.serverId, username, password);
934
+ this.channel.open_sftp_tunnel(this.nodeId, this.serviceId, username, password);
935
935
  this.show_login_screen_username = false;
936
936
  this.show_login_screen_password = false;
937
937
  this.show_login_screen = false;
938
938
  this.show_loader = true;
939
939
  event.stopPropagation();
940
940
  event.preventDefault();
941
- } }, h("div", { key: '250b78b4d4f20f0491034d6c261ee55581d93483', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
942
- h("div", { key: '68130dd636c5ae29d4bb344b45ba6b6747b2fdaf' }, h("label", { key: '0d3bc72b4ce0581a910f3b702e299e257498d088', htmlFor: "username" }, "Username"), h("input", { key: 'fef6876079e4097339549547138bcafc93901a3a', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
943
- h("div", { key: 'ae8d6f4f1d3bee55038dcc6b60899d4ab0ebd5ce' }, h("label", { key: '54dc4ff7a8faf76644d9885ea77d75357ac92ff8', htmlFor: "password" }, "Password"), h("input", { key: '8a4b35f9daa410d96c424ffae53ba92a793081cb', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), h("div", { key: '0c41f3a81ffbd29bba566f6c7ee35234de77e051' }, h("button", { key: '5bf5676382c66f032d72e77bc889596c0f851dbe', type: "submit" }, "Connect")))), this.show_upload_modal &&
944
- h("section", { key: 'f37ec9066ef29eba7b79f3db98ee080c48c9ec4e', class: {
941
+ } }, h("div", { key: 'c899712c9ee14f4490617a316d3bbc631d794fde', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
942
+ h("div", { key: '8088ac918f3455ff6bf2e2d50eb4fa8c18b58a97' }, h("label", { key: '850f947b1639782b1d6f4011a809466f8a43e7de', htmlFor: "username" }, "Username"), h("input", { key: '7fb4f67d37d84d6329840525de602a5b74675580', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
943
+ h("div", { key: '79633deeb5499a0fd120aba6a0875e7d78dc429a' }, h("label", { key: 'b911b56f1676d70e703c7fb318c6f48c52f08031', htmlFor: "password" }, "Password"), h("input", { key: '80ebcebc0a118f24c85f43a6bd89d5de0dbfec1c', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), h("div", { key: 'a1c8a2677ae4614e9cc11884aa226757bcccbcf3' }, h("button", { key: 'cfcd552766c53d63f8cc1cb46b328639fdad189f', type: "submit" }, "Connect")))), this.show_upload_modal &&
944
+ h("section", { key: '98243073570a448b37137c4b9910e809defa80ca', class: {
945
945
  'upload-modal': true,
946
946
  'visible': this.show_upload_modal,
947
- } }, h("div", { key: '77b7a1debd316d191ea9bc7e7fa0e914943e7951', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, h("div", { key: '614f3abe44943fb8d7d7e1976f82fa3161b66112', class: "title" }, "Uploading File"), h("div", { key: 'f2d3b094309ce4cfb4fafb0a289be1f8f116a246', class: "file-name", title: this.upload_file_name }, this.upload_file_name), h("div", { key: '7f6e1892490759e62c3dd5acf46dd53017619a6a', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, h("div", { key: '605c95beaf914644b5500bcc61b5b44aa71f4af9', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), h("div", { key: '2389e2b5d9f719e39d24b40e8083d662864a87db', class: "progress-meta" }, h("div", { key: '2464c8db01adee774d35a65bbdb22d175476e19e', class: "progress-speed" }, this.upload_speed), h("div", { key: 'c47334ec3967a4269cbdea7c7e4e55726461e797', class: "progress-value" }, this.format_percent(this.upload_progress))), h("button", { key: '25d0755fef743af337f7178da1bdd92628f908e2', type: "button", class: {
947
+ } }, h("div", { key: '382070ac49b529b3bd395bd7bd74f4d3ef636a53', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, h("div", { key: 'ab42477909654bd992d4261ff041cef1d5a139be', class: "title" }, "Uploading File"), h("div", { key: 'c17d2db8e7bf9ddb2e80e32d609ca5a9bf55ceba', class: "file-name", title: this.upload_file_name }, this.upload_file_name), h("div", { key: 'e5d6c359b82093ded872c98e965902c7f628c052', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, h("div", { key: '737c05d515f8163b24f0c5c7d44d978f0d80ebb8', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), h("div", { key: '5ec3c4970d811aaf977d71e3f2ba84cc5410a490', class: "progress-meta" }, h("div", { key: '18d83a68b795db0028b0ef7a5cbd51b46b29c280', class: "progress-speed" }, this.upload_speed), h("div", { key: '65d7b3a0b1dd5e34e00501c838ac674e2f9bc5e1', class: "progress-value" }, this.format_percent(this.upload_progress))), h("button", { key: 'bf6c636c3851f6fed2b1592e0bdb443108215737', type: "button", class: {
948
948
  'cancel': true,
949
949
  'finished': this.upload_finished,
950
950
  }, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
951
- h("section", { key: '0e9db491e0475a85eb811ee83ee5f1102b6e6091', class: {
951
+ h("section", { key: '0e3228077c259748f738be9d0a8eb11a9d64c36d', class: {
952
952
  'download-modal': true,
953
953
  'visible': this.show_download_modal,
954
- } }, h("div", { key: 'c177ed66cd9fea215cc3551455243c7cb8ddfe2a', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, h("div", { key: '1d4ea586f1598ce83db53c8eab628db8092ceb2c', class: "title" }, "Downloading File"), h("div", { key: '64bfbe33ddb139ffb7f6035dc4bdd3fb666e054e', class: "file-name", title: this.download_file_name }, this.download_file_name), h("div", { key: '568ca83a87c7f098453fa9d810d894cf32eac728', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, h("div", { key: '3a608f280ee43ffb7933f2755021ae655bd2029e', class: "progress-fill", style: { width: `${this.download_progress}%` } })), h("div", { key: '4c703f990756d4b3b8c4750d711ff4b9817fe2f1', class: "progress-meta" }, h("div", { key: 'd5fe7bc49d1f8f7fcb14c4462244c41140092b87', class: "progress-speed" }, this.download_speed), h("div", { key: 'd99c13a9638b7018fead0c6e2ea8df3c1ed7fca0', class: "progress-value" }, this.format_percent(this.download_progress))), h("button", { key: '32aa10e73df04f3b6b3f2263608c55e069bc29eb', type: "button", class: {
954
+ } }, h("div", { key: '2ddabbc1c6c7490b9f99e267545f891d36b1a080', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, h("div", { key: '64c1050634a226f7b04288b83a7b782ae0403c1f', class: "title" }, "Downloading File"), h("div", { key: '0e93810dfaaccec1f00ee89bba31fba8812f0640', class: "file-name", title: this.download_file_name }, this.download_file_name), h("div", { key: '6a2959f17fe2f0fe1ce5f4f272886491f7fc8830', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, h("div", { key: '71ca2cd68130d227c23817f97aa906df489ce350', class: "progress-fill", style: { width: `${this.download_progress}%` } })), h("div", { key: '834133dc9640a086b1d2a38ac24bfa02567a333d', class: "progress-meta" }, h("div", { key: '186e4d8167c207152e3b4c449c261d3e456b6ec7', class: "progress-speed" }, this.download_speed), h("div", { key: '69266fdc80cebced89c140016252e8e88fb012f2', class: "progress-value" }, this.format_percent(this.download_progress))), h("button", { key: '28238539b683c475bb8f13920485b3a7d209ddde', type: "button", class: {
955
955
  'cancel': true,
956
956
  'finished': this.download_finished,
957
957
  }, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
958
- h("section", { key: '0f142b91f29d4b2474ae0a9d479cec3457414f43', class: {
958
+ h("section", { key: '6ab3a87e386f08aa6cb5ee52de1a53d634411991', class: {
959
959
  'delete-modal': true,
960
960
  'visible': this.show_delete_modal,
961
- } }, h("div", { key: '2fa13dec3240b69016e33c2f751af97c5903f693', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, h("div", { key: '22742d0f1384acba3f08132d7efad4a78a2357ae', class: "title" }, "Delete File"), h("div", { key: '7eaf020753953b82d843d5b4dd8414131906151b', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), h("div", { key: 'f4fc23b43a78541d7ab84659d287f5d33dc4be1d', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
962
- h("div", { key: 'ad9fd03a6b983eb87ec37a63bf35d440ce7f908c', class: "delete-loader", "aria-hidden": "true" }, h("span", { key: 'e22bfb5dd729a865454cafb23f4d6eee9a2e3838', class: "spinner" })), h("div", { key: '730b9aa6e1bd773e8e8e9be5ee75c63ba5f69ad3', class: "modal-actions" }, h("button", { key: 'dd7b1ae63736e3c36b9b4894b969433a390e9ee4', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), h("button", { key: '113304b503ba82498a26c34b68ec9f217e6372a2', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
961
+ } }, h("div", { key: 'ccaed2c02103afda40b507d374836ff994f0540d', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, h("div", { key: '19edbb28e08b513aec244baf59c1ab6798b11a45', class: "title" }, "Delete File"), h("div", { key: 'b98b4a138129f18a395dd7700ce50621049e2cf3', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), h("div", { key: '3af3fffa9a5e2b3bc8bf8a2d3d302fcce119a246', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
962
+ h("div", { key: '09a78a79af88cb055cbc6e160c59b44c2be43fab', class: "delete-loader", "aria-hidden": "true" }, h("span", { key: '40d4285d22b51c62b4bac87ae5201ccb45721406', class: "spinner" })), h("div", { key: 'c3a475f37d3912755b3a6845ce49569429fc9a13', class: "modal-actions" }, h("button", { key: '3da31bcd06554c7463dc82e3f895fbcfe2551486', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), h("button", { key: '1eafd821e308588c87f334d1fdbb05b9a6ae70ef', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
963
963
  }
964
964
  static get is() { return "phirepass-sftp-client"; }
965
965
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- class n{__destroy_into_raw(){const n=this.__wbg_ptr;return this.__wbg_ptr=0,_.unregister(this),n}free(){const n=this.__destroy_into_raw();O.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2);O.channel_authenticate(this.__wbg_ptr,r,o,c,P,A(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){O.channel_connect(this.__wbg_ptr)}create_service(n,t,e,r,o,c,i,s,_,u){const a=S(n,O.__wbindgen_export,O.__wbindgen_export2),f=P,b=S(t,O.__wbindgen_export,O.__wbindgen_export2),l=P;var d=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),w=P;const g=S(r,O.__wbindgen_export,O.__wbindgen_export2),h=P;var p=A(c)?0:S(c,O.__wbindgen_export,O.__wbindgen_export2),y=P,m=A(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),v=P,R=A(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2),N=P,T=A(_)?0:S(_,O.__wbindgen_export,O.__wbindgen_export2);O.channel_create_service(this.__wbg_ptr,a,f,b,l,d,w,g,h,o,p,y,m,v,R,N,T,P,A(u)?Number.MAX_SAFE_INTEGER:u>>>0)}delete_service(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2);O.channel_delete_service(this.__wbg_ptr,r,o,c,P,A(e)?Number.MAX_SAFE_INTEGER:e>>>0)}disconnect(){O.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==O.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==O.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2),i=P;var s=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);const u=O.channel_new(r,o,c,i,s,P);return this.__wbg_ptr=u,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){O.channel_on_connection_close(this.__wbg_ptr,A(n)?0:u(n))}on_connection_error(n){O.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){O.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){O.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){O.channel_on_protocol_message(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message_type(n,t){const e=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_on_protocol_message_type(this.__wbg_ptr,e,P,A(t)?0:u(t))}open_sftp_tunnel(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(t,O.__wbindgen_export,O.__wbindgen_export2),_=P;var u=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_sftp_tunnel(this.__wbg_ptr,c,i,s,_,u,a,f,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_ssh_tunnel(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(t,O.__wbindgen_export,O.__wbindgen_export2),_=P;var u=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_ssh_tunnel(this.__wbg_ptr,c,i,s,_,u,a,f,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_delete(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(e,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_delete(this.__wbg_ptr,c,i,t,s,_,u,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_ack(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_ack(this.__wbg_ptr,o,P,t,e,r)}send_sftp_download_chunk(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_chunk(this.__wbg_ptr,c,P,t,e,r,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_start(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(e,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_start(this.__wbg_ptr,c,i,t,s,_,u,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_list_data(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P,i=S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_list_data(this.__wbg_ptr,o,c,t,i,P,A(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_upload_chunk(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=function(n){const t=(0,O.__wbindgen_export)(1*n.length,1)>>>0;return h().set(n,t/1),P=n.length,t}(c);O.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,P,A(i)?Number.MAX_SAFE_INTEGER:i>>>0)}send_sftp_upload_start(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,P,o,c,A(i)?Number.MAX_SAFE_INTEGER:i>>>0)}send_ssh_terminal_resize(n,t,e,r,o,c){const i=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_ssh_terminal_resize(this.__wbg_ptr,i,P,t,e,r,o,c)}send_ssh_tunnel_data(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,c,P)}start_heartbeat(n){O.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){O.channel_stop_heartbeat(this.__wbg_ptr)}update_service(n,t,e,r,o,c,i,s,_,u,a){const f=S(n,O.__wbindgen_export,O.__wbindgen_export2),b=P,l=S(t,O.__wbindgen_export,O.__wbindgen_export2),d=P,w=S(e,O.__wbindgen_export,O.__wbindgen_export2),g=P;var h=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2),p=P;const y=S(o,O.__wbindgen_export,O.__wbindgen_export2),m=P;var v=A(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),R=P,N=A(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2),T=P,U=A(_)?0:S(_,O.__wbindgen_export,O.__wbindgen_export2),j=P,F=A(u)?0:S(u,O.__wbindgen_export,O.__wbindgen_export2);O.channel_update_service(this.__wbg_ptr,f,b,l,d,w,g,h,p,y,m,c,v,R,N,T,U,j,F,P,A(a)?Number.MAX_SAFE_INTEGER:a>>>0)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);const t=Object.freeze({Generic:0,0:"Generic",Authentication:10,10:"Authentication",RequiresUsername:100,100:"RequiresUsername",RequiresPassword:110,110:"RequiresPassword",RequiresUsernamePassword:120,120:"RequiresUsernamePassword"});function e(){const n={__proto__:null,__wbg_Error_fdd633d4bb5dd76a:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=S(String(p(t)),O.__wbindgen_export,O.__wbindgen_export2),r=P;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_8a447059637473e2:function(n,t){const e=S(f(p(t)),O.__wbindgen_export,O.__wbindgen_export2),r=P;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_71bb4348194e31f0:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2),c=P;d().setInt32(n+4,c,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_ea4887a5f8f9a9db:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_33c39e13d73b25f6:function(n){p(n)._wbg_cb_unref()},__wbg_call_0e855b388e315e17:function(){return y((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_call_5575218572ead796:function(){return y((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_call_8e98ed2f3c86c4b5:function(){return y((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(N(n)))},__wbg_close_26aa343c0d729303:function(){return y((function(n){p(n).close()}),arguments)},__wbg_data_4a7f1308dbd33a21:function(n){return u(p(n).data)},__wbg_from_50138b2ca136f50c:function(n){return u(Array.from(p(n)))},__wbg_get_dddb90ff5d27a080:function(){return y((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_a035e9398ce057dc:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_589238bdcf171f0e:function(n){return p(n).length},__wbg_new_2e117a478906f062:function(){return u(new Object)},__wbg_new_36e147a8ced3c6e0:function(){return u(new Array)},__wbg_new_81880fb5002cb255:function(n){return u(new Uint8Array(p(n)))},__wbg_new_with_str_sequence_dfdb072344bf2999:function(){return y((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_d721637c7ca66eb8:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_f724b5db8acf89d2:function(n,t){return p(n).push(p(t))},__wbg_readyState_97951098f8995393:function(n){return p(n).readyState},__wbg_send_982c819b9a1b34a5:function(){return y((function(n,t,e){p(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return y((function(n,t){return u(setInterval(p(n),t))}),arguments)},__wbg_set_6be42768c690e380:function(n,t,e){p(n)[N(t)]=N(e)},__wbg_set_binaryType_148427b11a8e6551:function(n,t){p(n).binaryType=s[t]},__wbg_set_dc601f4a69da0bc2:function(n,t,e){p(n)[t>>>0]=N(e)},__wbg_set_onclose_8134952b2a9ec104:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_3f68563f77d362f1:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_397a79f643011142:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_ca8d311fe5282041:function(n,t){p(n).onopen=p(t)},__wbg_warn_1087e5a6742be100:function(n,t){console.warn(w(n,t))},__wbindgen_cast_0000000000000001:function(n,t){return u(R(n,t,o))},__wbindgen_cast_0000000000000002:function(n,t){return u(R(n,t,c))},__wbindgen_cast_0000000000000003:function(n,t){return u(R(n,t,i))},__wbindgen_cast_0000000000000004:function(n,t){return u(R(n,t,r))},__wbindgen_cast_0000000000000005:function(n){return u(n)},__wbindgen_cast_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_cast_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_cast_0000000000000008:function(n){return u(BigInt.asUintN(64,n))},__wbindgen_object_clone_ref:function(n){return u(p(n))},__wbindgen_object_drop_ref:function(n){N(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){O.__wasm_bindgen_func_elem_44(n,t)}function o(n,t,e){O.__wasm_bindgen_func_elem_42(n,t,u(e))}function c(n,t,e){O.__wasm_bindgen_func_elem_42_1(n,t,u(e))}function i(n,t,e){O.__wasm_bindgen_func_elem_42_2(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>O.__wbg_channel_free(n,1)));function u(n){v===m.length&&m.push(m.length+1);const t=v;return v=m[t],m[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>O.__wbindgen_export4(n.a,n.b)));function f(n){const t=typeof n;if("number"==t||"boolean"==t||null==n)return`${n}`;if("string"==t)return`"${n}"`;if("symbol"==t){const t=n.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=n.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(n)){const t=n.length;let e="[";t>0&&(e+=f(n[0]));for(let r=1;r<t;r++)e+=", "+f(n[r]);return e+="]",e}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(!(e&&e.length>1))return toString.call(n);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}function b(n,t){return n>>>=0,h().subarray(n/1,n/1+t)}let l=null;function d(){return(null===l||!0===l.buffer.detached||void 0===l.buffer.detached&&l.buffer!==O.memory.buffer)&&(l=new DataView(O.memory.buffer)),l}function w(n,t){return function(n,t){return j+=t,j>=U&&(T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),T.decode(),j=t),T.decode(h().subarray(n,n+t))}(n>>>0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(O.memory.buffer)),g}function p(n){return m[n]}function y(n,t){try{return n.apply(this,t)}catch(n){O.__wbindgen_export3(u(n))}}let m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);let v=m.length;function A(n){return null==n}function R(n,t,e){const r={a:n,b:t,cnt:1},o=(...n)=>{r.cnt++;const t=r.a;r.a=0;try{return e(t,r.b,...n)}finally{r.a=t,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{0==--r.cnt&&(O.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t,e){if(void 0===e){const e=F.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),P=e.length,r}let r=n.length,o=t(r,1)>>>0;const c=h();let i=0;for(;i<r;i++){const t=n.charCodeAt(i);if(t>127)break;c[o+i]=t}if(i!==r){0!==i&&(n=n.slice(i)),o=e(o,r,r=i+3*n.length,1)>>>0;const t=h().subarray(o+i,o+r);i+=F.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return P=i,o}function N(n){const t=p(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});T.decode();const U=2146435072;let j=0;const F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(n,t){const e=F.encode(n);return t.set(e),{read:n.length,written:e.length}});let O,P=0;async function k(n){if(void 0!==O)return O;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module_or_path:n}=n):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===n&&(n=new URL("phirepass-channel_bg.wasm",import.meta.url));const t=e();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:r}=await async function(n,t){if("function"==typeof Response&&n instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!n.ok||!function(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}(n.type)||"application/wasm"===n.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}(await n,t);return function(n){return O=n.exports,l=null,g=null,O}(r)}var q,I,W;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.SFTPListItems="SFTPListItems",n.SFTPDownloadStartResponse="SFTPDownloadStartResponse",n.SFTPDownloadChunk="SFTPDownloadChunk",n.SFTPUploadStartResponse="SFTPUploadStartResponse",n.SFTPUploadChunkAck="SFTPUploadChunkAck"}(q||(q={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(I||(I={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}(W||(W={}));export{n as C,t as E,I,q as P,k as _,W as a}
1
+ class n{__destroy_into_raw(){const n=this.__wbg_ptr;return this.__wbg_ptr=0,_.unregister(this),n}free(){const n=this.__destroy_into_raw();O.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2);O.channel_authenticate(this.__wbg_ptr,r,o,c,P,A(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){O.channel_connect(this.__wbg_ptr)}create_service(n,t,e,r,o,c,i,s,_,u){const a=S(n,O.__wbindgen_export,O.__wbindgen_export2),f=P,b=S(t,O.__wbindgen_export,O.__wbindgen_export2),l=P;var d=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),w=P;const g=S(r,O.__wbindgen_export,O.__wbindgen_export2),h=P;var p=A(c)?0:S(c,O.__wbindgen_export,O.__wbindgen_export2),y=P,m=A(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),v=P,R=A(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2),N=P,T=A(_)?0:S(_,O.__wbindgen_export,O.__wbindgen_export2);O.channel_create_service(this.__wbg_ptr,a,f,b,l,d,w,g,h,o,p,y,m,v,R,N,T,P,A(u)?Number.MAX_SAFE_INTEGER:u>>>0)}delete_service(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2);O.channel_delete_service(this.__wbg_ptr,r,o,c,P,A(e)?Number.MAX_SAFE_INTEGER:e>>>0)}disconnect(){O.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==O.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==O.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2),i=P;var s=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);const u=O.channel_new(r,o,c,i,s,P);return this.__wbg_ptr=u,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){O.channel_on_connection_close(this.__wbg_ptr,A(n)?0:u(n))}on_connection_error(n){O.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){O.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){O.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){O.channel_on_protocol_message(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message_type(n,t){const e=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_on_protocol_message_type(this.__wbg_ptr,e,P,A(t)?0:u(t))}open_sftp_tunnel(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(t,O.__wbindgen_export,O.__wbindgen_export2),_=P;var u=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_sftp_tunnel(this.__wbg_ptr,c,i,s,_,u,a,f,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_ssh_tunnel(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(t,O.__wbindgen_export,O.__wbindgen_export2),_=P;var u=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_ssh_tunnel(this.__wbg_ptr,c,i,s,_,u,a,f,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_delete(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(e,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_delete(this.__wbg_ptr,c,i,t,s,_,u,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_ack(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_ack(this.__wbg_ptr,o,P,t,e,r)}send_sftp_download_chunk(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_chunk(this.__wbg_ptr,c,P,t,e,r,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_start(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(e,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_start(this.__wbg_ptr,c,i,t,s,_,u,P,A(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_list_data(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P,i=S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_list_data(this.__wbg_ptr,o,c,t,i,P,A(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_upload_chunk(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=function(n){const t=(0,O.__wbindgen_export)(1*n.length,1)>>>0;return h().set(n,t/1),P=n.length,t}(c);O.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,P,A(i)?Number.MAX_SAFE_INTEGER:i>>>0)}send_sftp_upload_start(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,P,o,c,A(i)?Number.MAX_SAFE_INTEGER:i>>>0)}send_ssh_terminal_resize(n,t,e,r,o,c){const i=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_ssh_terminal_resize(this.__wbg_ptr,i,P,t,e,r,o,c)}send_ssh_tunnel_data(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,c,P)}start_heartbeat(n){O.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){O.channel_stop_heartbeat(this.__wbg_ptr)}update_service(n,t,e,r,o,c,i,s,_,u,a){const f=S(n,O.__wbindgen_export,O.__wbindgen_export2),b=P,l=S(t,O.__wbindgen_export,O.__wbindgen_export2),d=P,w=S(e,O.__wbindgen_export,O.__wbindgen_export2),g=P;var h=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2),p=P;const y=S(o,O.__wbindgen_export,O.__wbindgen_export2),m=P;var v=A(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),R=P,N=A(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2),T=P,U=A(_)?0:S(_,O.__wbindgen_export,O.__wbindgen_export2),j=P,F=A(u)?0:S(u,O.__wbindgen_export,O.__wbindgen_export2);O.channel_update_service(this.__wbg_ptr,f,b,l,d,w,g,h,p,y,m,c,v,R,N,T,U,j,F,P,A(a)?Number.MAX_SAFE_INTEGER:a>>>0)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);const t=Object.freeze({Generic:0,0:"Generic",Authentication:10,10:"Authentication",RequiresUsername:100,100:"RequiresUsername",RequiresPassword:110,110:"RequiresPassword",RequiresUsernamePassword:120,120:"RequiresUsernamePassword"});function e(){const n={__proto__:null,__wbg_Error_92b29b0548f8b746:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=S(String(p(t)),O.__wbindgen_export,O.__wbindgen_export2),r=P;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_c25d447a39f5578f:function(n,t){const e=S(f(p(t)),O.__wbindgen_export,O.__wbindgen_export2),r=P;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_b0ca35b86a603356:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=A(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2),c=P;d().setInt32(n+4,c,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_344f42d3211c4765:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_fffb441def202758:function(n){p(n)._wbg_cb_unref()},__wbg_call_8a2dd23819f8a60a:function(){return y((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_call_a6e5c5dce5018821:function(){return y((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_call_e3b662382210db98:function(){return y((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(N(n)))},__wbg_close_c65ca0257e895318:function(){return y((function(n){p(n).close()}),arguments)},__wbg_data_328de4280640da92:function(n){return u(p(n).data)},__wbg_from_13e323c65fc8f464:function(n){return u(Array.from(p(n)))},__wbg_get_78f252d074a84d0b:function(){return y((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_457fa00f9a833fc2:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_1f0964f4a5e2c6d8:function(n){return p(n).length},__wbg_new_32b398fb48b6d94a:function(){return u(new Array)},__wbg_new_cd45aabdf6073e84:function(n){return u(new Uint8Array(p(n)))},__wbg_new_da52cf8fe3429cb2:function(){return u(new Object)},__wbg_new_with_str_sequence_2de2f569c29910ad:function(){return y((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_4770620bbe4688a0:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_d2ae3af0c1217ae6:function(n,t){return p(n).push(p(t))},__wbg_readyState_50bc38c2a9e83db6:function(n){return p(n).readyState},__wbg_send_a321b376d40ec867:function(){return y((function(n,t,e){p(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return y((function(n,t){return u(setInterval(p(n),t))}),arguments)},__wbg_set_6be42768c690e380:function(n,t,e){p(n)[N(t)]=N(e)},__wbg_set_8a16b38e4805b298:function(n,t,e){p(n)[t>>>0]=N(e)},__wbg_set_binaryType_a37b086c78ca7c29:function(n,t){p(n).binaryType=s[t]},__wbg_set_onclose_f706475385ecce07:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_9f5773fd31512333:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_836d2f72130b4706:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_4f65470ae522a61a:function(n,t){p(n).onopen=p(t)},__wbg_warn_caeecd487324e541:function(n,t){console.warn(w(n,t))},__wbindgen_cast_0000000000000001:function(n,t){return u(R(n,t,o))},__wbindgen_cast_0000000000000002:function(n,t){return u(R(n,t,c))},__wbindgen_cast_0000000000000003:function(n,t){return u(R(n,t,i))},__wbindgen_cast_0000000000000004:function(n,t){return u(R(n,t,r))},__wbindgen_cast_0000000000000005:function(n){return u(n)},__wbindgen_cast_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_cast_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_cast_0000000000000008:function(n){return u(BigInt.asUintN(64,n))},__wbindgen_object_clone_ref:function(n){return u(p(n))},__wbindgen_object_drop_ref:function(n){N(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){O.__wasm_bindgen_func_elem_44(n,t)}function o(n,t,e){O.__wasm_bindgen_func_elem_42(n,t,u(e))}function c(n,t,e){O.__wasm_bindgen_func_elem_42_1(n,t,u(e))}function i(n,t,e){O.__wasm_bindgen_func_elem_42_2(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>O.__wbg_channel_free(n,1)));function u(n){v===m.length&&m.push(m.length+1);const t=v;return v=m[t],m[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>O.__wbindgen_export4(n.a,n.b)));function f(n){const t=typeof n;if("number"==t||"boolean"==t||null==n)return`${n}`;if("string"==t)return`"${n}"`;if("symbol"==t){const t=n.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=n.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(n)){const t=n.length;let e="[";t>0&&(e+=f(n[0]));for(let r=1;r<t;r++)e+=", "+f(n[r]);return e+="]",e}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(!(e&&e.length>1))return toString.call(n);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}function b(n,t){return n>>>=0,h().subarray(n/1,n/1+t)}let l=null;function d(){return(null===l||!0===l.buffer.detached||void 0===l.buffer.detached&&l.buffer!==O.memory.buffer)&&(l=new DataView(O.memory.buffer)),l}function w(n,t){return function(n,t){return j+=t,j>=U&&(T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),T.decode(),j=t),T.decode(h().subarray(n,n+t))}(n>>>0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(O.memory.buffer)),g}function p(n){return m[n]}function y(n,t){try{return n.apply(this,t)}catch(n){O.__wbindgen_export3(u(n))}}let m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);let v=m.length;function A(n){return null==n}function R(n,t,e){const r={a:n,b:t,cnt:1},o=(...n)=>{r.cnt++;const t=r.a;r.a=0;try{return e(t,r.b,...n)}finally{r.a=t,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{0==--r.cnt&&(O.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t,e){if(void 0===e){const e=F.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),P=e.length,r}let r=n.length,o=t(r,1)>>>0;const c=h();let i=0;for(;i<r;i++){const t=n.charCodeAt(i);if(t>127)break;c[o+i]=t}if(i!==r){0!==i&&(n=n.slice(i)),o=e(o,r,r=i+3*n.length,1)>>>0;const t=h().subarray(o+i,o+r);i+=F.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return P=i,o}function N(n){const t=p(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});T.decode();const U=2146435072;let j=0;const F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(n,t){const e=F.encode(n);return t.set(e),{read:n.length,written:e.length}});let O,P=0;async function k(n){if(void 0!==O)return O;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module_or_path:n}=n):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===n&&(n=new URL("phirepass-channel_bg.wasm",import.meta.url));const t=e();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:r}=await async function(n,t){if("function"==typeof Response&&n instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!n.ok||!function(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}(n.type)||"application/wasm"===n.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}(await n,t);return function(n){return O=n.exports,l=null,g=null,O}(r)}var q,I,W;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.SFTPListItems="SFTPListItems",n.SFTPDownloadStartResponse="SFTPDownloadStartResponse",n.SFTPDownloadChunk="SFTPDownloadChunk",n.SFTPUploadStartResponse="SFTPUploadStartResponse",n.SFTPUploadChunkAck="SFTPUploadChunkAck"}(q||(q={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(I||(I={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}(W||(W={}));export{n as C,t as E,I,q as P,k as _,W as a}