phirepass-widgets 0.0.112 → 0.0.113

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.
Files changed (89) hide show
  1. package/README.md +33 -0
  2. package/dist/cjs/{index-B8w6l0VL.js → index-CurErEK7.js} +101 -30
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/phirepass-downloader_3.cjs.entry.js +3696 -0
  5. package/dist/cjs/phirepass-rdp.cjs.entry.js +18 -6
  6. package/dist/cjs/phirepass-terminal.cjs.entry.js +6 -5
  7. package/dist/cjs/phirepass-widgets.cjs.js +3 -3
  8. package/dist/cjs/{protocol-COvteaUJ.js → protocol-DCBMfc2u.js} +557 -360
  9. package/dist/collection/collection-manifest.json +3 -1
  10. package/dist/collection/common/channel.js +21 -1
  11. package/dist/collection/common/fetch.js +40 -0
  12. package/dist/collection/components/phirepass-downloader/form.js +69 -0
  13. package/dist/collection/components/phirepass-downloader/format.js +105 -0
  14. package/dist/collection/components/phirepass-downloader/jobs.js +370 -0
  15. package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +1109 -0
  16. package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +1455 -0
  17. package/dist/collection/components/phirepass-downloader/source.js +106 -0
  18. package/dist/collection/components/phirepass-downloader/views/dialogs.js +34 -0
  19. package/dist/collection/components/phirepass-downloader/views/fetch-form.js +65 -0
  20. package/dist/collection/components/phirepass-downloader/views/icons.js +33 -0
  21. package/dist/collection/components/phirepass-downloader/views/job-row.js +91 -0
  22. package/dist/collection/components/phirepass-downloader/views/notices.js +15 -0
  23. package/dist/collection/components/phirepass-downloader/views/states.js +19 -0
  24. package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +216 -0
  25. package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +473 -0
  26. package/dist/collection/components/phirepass-media-player/player.js +94 -0
  27. package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +36 -13
  28. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +122 -0
  29. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +35 -0
  30. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +181 -31
  31. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
  32. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  33. package/dist/collection/testing/fixtures.js +219 -0
  34. package/dist/collection/testing/mock-channel.js +410 -0
  35. package/dist/components/index.js +1 -1
  36. package/dist/components/p-C4cmk3bS.js +1 -0
  37. package/dist/components/p-CsYQJXY2.js +1 -0
  38. package/dist/components/p-D6Geq8Rn.js +1 -0
  39. package/dist/components/phirepass-downloader.d.ts +11 -0
  40. package/dist/components/phirepass-downloader.js +1 -0
  41. package/dist/components/phirepass-media-player.d.ts +11 -0
  42. package/dist/components/phirepass-media-player.js +1 -0
  43. package/dist/components/phirepass-rdp.js +1 -1
  44. package/dist/components/phirepass-sftp-client.js +1 -1
  45. package/dist/components/phirepass-terminal.js +2 -2
  46. package/dist/esm/{index-DGq2b7rM.js → index-B9qUl6FW.js} +101 -30
  47. package/dist/esm/loader.js +3 -3
  48. package/dist/esm/phirepass-downloader_3.entry.js +3692 -0
  49. package/dist/esm/phirepass-rdp.entry.js +18 -6
  50. package/dist/esm/phirepass-terminal.entry.js +6 -5
  51. package/dist/esm/phirepass-widgets.js +4 -4
  52. package/dist/esm/{protocol-Dur4cBX7.js → protocol-CsYQJXY2.js} +556 -359
  53. package/dist/phirepass-widgets/p-1b84c526.entry.js +1 -0
  54. package/dist/phirepass-widgets/{p-1fef5b5f.entry.js → p-41dd1ac9.entry.js} +2 -2
  55. package/dist/phirepass-widgets/p-614ab3de.entry.js +1 -0
  56. package/dist/phirepass-widgets/p-B9qUl6FW.js +3 -0
  57. package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
  58. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  59. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  60. package/dist/types/common/channel.d.ts +30 -0
  61. package/dist/types/common/fetch.d.ts +161 -0
  62. package/dist/types/components/phirepass-downloader/form.d.ts +54 -0
  63. package/dist/types/components/phirepass-downloader/format.d.ts +17 -0
  64. package/dist/types/components/phirepass-downloader/jobs.d.ts +115 -0
  65. package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +231 -0
  66. package/dist/types/components/phirepass-downloader/source.d.ts +61 -0
  67. package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +52 -0
  68. package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +31 -0
  69. package/dist/types/components/phirepass-downloader/views/icons.d.ts +5 -0
  70. package/dist/types/components/phirepass-downloader/views/job-row.d.ts +21 -0
  71. package/dist/types/components/phirepass-downloader/views/notices.d.ts +18 -0
  72. package/dist/types/components/phirepass-downloader/views/states.d.ts +38 -0
  73. package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +67 -0
  74. package/dist/types/components/phirepass-media-player/player.d.ts +43 -0
  75. package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +10 -0
  76. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +30 -0
  77. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +40 -0
  78. package/dist/types/components.d.ts +426 -34
  79. package/dist/types/stencil-public-runtime.d.ts +1 -1
  80. package/dist/types/testing/fixtures.d.ts +25 -0
  81. package/dist/types/testing/mock-channel.d.ts +132 -0
  82. package/package.json +26 -12
  83. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +0 -1469
  84. package/dist/components/p-Dur4cBX7.js +0 -1
  85. package/dist/esm/phirepass-sftp-client.entry.js +0 -1467
  86. package/dist/phirepass-widgets/p-8eb3ec24.entry.js +0 -1
  87. package/dist/phirepass-widgets/p-9a1f9b9f.entry.js +0 -1
  88. package/dist/phirepass-widgets/p-DGq2b7rM.js +0 -3
  89. package/dist/phirepass-widgets/p-Dur4cBX7.js +0 -1
@@ -1 +0,0 @@
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();j.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2);j.channel_authenticate(this.__wbg_ptr,r,o,i,k,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){j.channel_connect(this.__wbg_ptr)}create_service(n,t,e,r,o,i,c,s,_){const u=N(n,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=N(t,j.__wbindgen_export,j.__wbindgen_export2),b=k;var d=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),l=k;const w=N(r,j.__wbindgen_export,j.__wbindgen_export2),g=k;var h=R(i)?0:N(i,j.__wbindgen_export,j.__wbindgen_export2),p=k,m=R(c)?0:N(c,j.__wbindgen_export,j.__wbindgen_export2),y=k,v=R(s)?0:N(s,j.__wbindgen_export,j.__wbindgen_export2);j.channel_create_service(this.__wbg_ptr,u,a,f,b,d,l,w,g,o,h,p,m,y,v,k,R(_)?Number.MAX_SAFE_INTEGER:_>>>0)}delete_service(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2);j.channel_delete_service(this.__wbg_ptr,r,o,i,k,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}disconnect(){j.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==j.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==j.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2),c=k;var s=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2);const u=j.channel_new(r,o,i,c,s,k);return this.__wbg_ptr=u,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){j.channel_on_connection_close(this.__wbg_ptr,R(n)?0:u(n))}on_connection_error(n){j.channel_on_connection_error(this.__wbg_ptr,R(n)?0:u(n))}on_connection_message(n){j.channel_on_connection_message(this.__wbg_ptr,R(n)?0:u(n))}on_connection_open(n){j.channel_on_connection_open(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message(n){j.channel_on_protocol_message(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message_type(n,t){const e=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_on_protocol_message_type(this.__wbg_ptr,e,k,R(t)?0:u(t))}open_rdp_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_rdp_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_sftp_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_sftp_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_ssh_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_ssh_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_chmod(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_chmod(this.__wbg_ptr,i,c,t,s,k,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_delete(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_delete(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_ack(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_ack(this.__wbg_ptr,o,k,t,e,r)}send_sftp_download_chunk(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_chunk(this.__wbg_ptr,i,k,t,e,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_start(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_start(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_list_data(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_list_data(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_mkdir(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_mkdir(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_read_file(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_read_file(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_remove(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_remove(this.__wbg_ptr,i,c,t,s,k,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_rename(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_rename(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_upload_chunk(n,t,e,r,o,i,c){const s=N(n,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=S(i,j.__wbindgen_export);j.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,k,R(c)?Number.MAX_SAFE_INTEGER:c>>>0)}send_sftp_upload_start(n,t,e,r,o,i,c){const s=N(n,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,k,o,i,R(c)?Number.MAX_SAFE_INTEGER:c>>>0)}send_sftp_write_file(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=S(r,j.__wbindgen_export);j.channel_send_sftp_write_file(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_ssh_terminal_resize(n,t,e,r,o,i){const c=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_ssh_terminal_resize(this.__wbg_ptr,c,k,t,e,r,o,i)}send_ssh_tunnel_data(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,i,k)}start_heartbeat(n){j.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){j.channel_stop_heartbeat(this.__wbg_ptr)}update_service(n,t,e,r,o,i,c,s,_,u){const a=N(n,j.__wbindgen_export,j.__wbindgen_export2),f=k,b=N(t,j.__wbindgen_export,j.__wbindgen_export2),d=k,l=N(e,j.__wbindgen_export,j.__wbindgen_export2),w=k;var g=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2),h=k;const p=N(o,j.__wbindgen_export,j.__wbindgen_export2),m=k;var y=R(c)?0:N(c,j.__wbindgen_export,j.__wbindgen_export2),v=k,A=R(s)?0:N(s,j.__wbindgen_export,j.__wbindgen_export2),S=k,T=R(_)?0:N(_,j.__wbindgen_export,j.__wbindgen_export2);j.channel_update_service(this.__wbg_ptr,a,f,b,d,l,w,g,h,p,m,i,y,v,A,S,T,k,R(u)?Number.MAX_SAFE_INTEGER:u>>>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_30c8987f7c2ed4e2:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=N(String(p(t)),j.__wbindgen_export,j.__wbindgen_export2),r=k;l().setInt32(n+4,r,!0),l().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_4687d8d8c2017d52:function(n,t){const e=N(f(p(t)),j.__wbindgen_export,j.__wbindgen_export2),r=k;l().setInt32(n+4,r,!0),l().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_0380ccaa2f57f0d9:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2),i=k;l().setInt32(n+4,i,!0),l().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_41e9ee4f547fc59a:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_dcc1a90847f04c41:function(n){p(n)._wbg_cb_unref()},__wbg_call_1875a20c43a36133:function(){return m((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_call_187d372bd5fdd4aa:function(){return m((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_call_6137034ef55c9d0f:function(){return m((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(T(n)))},__wbg_close_d3ed56b5763be5ae:function(){return m((function(n){p(n).close()}),arguments)},__wbg_data_522f7abc70721269:function(n){return u(p(n).data)},__wbg_from_296ca31f8d0f1c52:function(n){return u(Array.from(p(n)))},__wbg_getRandomValues_a608c4436c19407a:function(){return m((function(n,t){globalThis.crypto.getRandomValues(b(n,t))}),arguments)},__wbg_get_31af05bd4842a84f:function(){return m((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_930469ca0112784b:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_7f3c00c40364105e:function(n){return p(n).length},__wbg_new_1dbf7428bba60a42:function(n){return u(new Uint8Array(p(n)))},__wbg_new_617a8cdb8bb1130e:function(){return u(new Object)},__wbg_new_ee2291f50781bf1d:function(){return u(new Array)},__wbg_new_with_str_sequence_f79e461d58fdeacc:function(){return m((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_bc27214492979395:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_2baf45db356cf468:function(n,t){return p(n).push(p(t))},__wbg_readyState_d8514376867e415b:function(n){return p(n).readyState},__wbg_send_c1dad0ec2e52defb:function(){return m((function(n,t,e){p(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return m((function(n,t){return u(setInterval(p(n),t))}),arguments)},__wbg_set_6be42768c690e380:function(n,t,e){p(n)[T(t)]=T(e)},__wbg_set_bea140a88be9b277:function(n,t,e){p(n)[t>>>0]=T(e)},__wbg_set_binaryType_21835bf0df8f70aa:function(n,t){p(n).binaryType=s[t]},__wbg_set_onclose_a84370531f3d2948:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_94ee307653399172:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_cb6f77d2d8e0402a:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_c914147e8a2db4b0:function(n,t){p(n).onopen=p(t)},__wbg_warn_018ad7405d6ad231:function(n,t){console.warn(w(n,t))},__wbindgen_generic_0000000000000001:function(n,t){return u(A(n,t,o))},__wbindgen_generic_0000000000000002:function(n,t){return u(A(n,t,i))},__wbindgen_generic_0000000000000003:function(n,t){return u(A(n,t,c))},__wbindgen_generic_0000000000000004:function(n,t){return u(A(n,t,r))},__wbindgen_generic_0000000000000005:function(n){return u(n)},__wbindgen_generic_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_generic_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_generic_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){T(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){j.__wasm_bindgen_func_elem_64(n,t)}function o(n,t,e){j.__wasm_bindgen_func_elem_60(n,t,u(e))}function i(n,t,e){j.__wasm_bindgen_func_elem_60_37(n,t,u(e))}function c(n,t,e){j.__wasm_bindgen_func_elem_60_38(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>j.__wbg_channel_free(n,1)));function u(n){v===y.length&&y.push(y.length+1);const t=v;return v=y[t],y[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>j.__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 d=null;function l(){return(null===d||!0===d.buffer.detached||void 0===d.buffer.detached&&d.buffer!==j.memory.buffer)&&(d=new DataView(j.memory.buffer)),d}function w(n,t){return function(n,t){return P+=t,P>=O&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),P=t),F.decode(h().subarray(n,n+t))}(n>>>0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(j.memory.buffer)),g}function p(n){return y[n]}function m(n,t){try{return n.apply(this,t)}catch(n){j.__wbindgen_export3(u(n))}}let y=new Array(1024).fill(void 0);y.push(void 0,null,!0,!1);let v=y.length;function R(n){return null==n}function A(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&&(j.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t){const e=t(1*n.length,1)>>>0;return h().set(n,e/1),k=n.length,e}function N(n,t,e){if(void 0===e){const e=U.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),k=e.length,r}let r=n.length,o=t(r,1)>>>0;const i=h();let c=0;for(;c<r;c++){const t=n.charCodeAt(c);if(t>127)break;i[o+c]=t}if(c!==r){0!==c&&(n=n.slice(c)),o=e(o,r,r=c+3*n.length,1)>>>0;const t=h().subarray(o+c,o+r);c+=U.encodeInto(n,t).written,o=e(o,r,c,1)>>>0}return k=c,o}function T(n){const t=p(n);return function(n){n<1028||(y[n]=v,v=n)}(n),t}let F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();const O=2146435072;let P=0;const U=new TextEncoder;"encodeInto"in U||(U.encodeInto=function(n,t){const e=U.encode(n);return t.set(e),{read:n.length,written:e.length}});let j,k=0;async function W(n){if(void 0!==j)return j;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(!n.ok)throw new Error(`failed to fetch Wasm: ${n.status} ${n.statusText} fetching '${n.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!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 j=n.exports,d=null,g=null,j}(r)}var $,q,E;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.RDPAuthorized="RDPAuthorized",n.SFTPListItems="SFTPListItems",n.SFTPDownloadStartResponse="SFTPDownloadStartResponse",n.SFTPDownloadChunk="SFTPDownloadChunk",n.SFTPUploadStartResponse="SFTPUploadStartResponse",n.SFTPUploadChunkAck="SFTPUploadChunkAck",n.SFTPOpResult="SFTPOpResult"}($||($={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(q||(q={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}(E||(E={}));export{n as C,t as E,q as I,$ as P,W as _,E as a}