shadow-claw 1.23.3 → 1.23.4

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/bin/assert-version-bump.mjs +60 -38
  2. package/bin/assert-version-bump.test.mjs +74 -11
  3. package/dist/public/agent.worker.js +6 -6
  4. package/dist/public/{app-routes-B0ePT49v.js → app-routes-Bs-riIvr.js} +1 -1
  5. package/dist/public/components/settings/shadow-claw-storage/shadow-claw-storage.html +1 -1
  6. package/dist/public/components/shadow-claw-files/shadow-claw-files.css +1 -1
  7. package/dist/public/components/shadow-claw-files/shadow-claw-files.html +1 -1
  8. package/dist/public/config-BYAuxx3j.js +1 -0
  9. package/dist/public/{configurePeerJs-B7kNU8AQ.js → configurePeerJs-B4Ym9VMj.js} +1 -1
  10. package/dist/public/{connections-xd_66YVU.js → connections-BEn6JYdu.js} +1 -1
  11. package/dist/public/{custom-element-security-CZ92anB8.js → custom-element-security-DdYlUozq.js} +1 -1
  12. package/dist/public/docs/architecture/storage.md +5 -2
  13. package/dist/public/docs/decisions/indexeddb-and-opfs-storage.md +5 -2
  14. package/dist/public/docs/example/article/index.html +2 -2
  15. package/dist/public/docs/publishing/index.html +19 -76
  16. package/dist/public/docs/skill-creator/index.html +2 -2
  17. package/dist/public/{downloadGroupFile-BABv_1mJ.js → downloadGroupFile-Drdvg1Ev.js} +1 -1
  18. package/dist/public/{e2e-bridge-DkS5xFGX.js → e2e-bridge-BQ4KzUt5.js} +1 -1
  19. package/dist/public/{file-viewer-CCSABMsE.js → file-viewer-CcZYw-PS.js} +1 -1
  20. package/dist/public/files/main/~/docs/publishing-to-github-pages.md +17 -82
  21. package/dist/public/{git-BkjrsRXX.js → git-DEUvQTUA.js} +2 -2
  22. package/dist/public/{iframe-sanitizer-L6Jyu__Z.js → iframe-sanitizer-0NS4XLOd.js} +1 -1
  23. package/dist/public/index.html +2 -2
  24. package/dist/public/index.js +1 -1
  25. package/dist/public/{initChatSplitResize-BslPXAXS.js → initChatSplitResize-llGkSJXg.js} +1 -1
  26. package/dist/public/main/index.html +2 -2
  27. package/dist/public/main/memory/index.html +2 -2
  28. package/dist/public/{markdown-6MBrIo-S.js → markdown-CyYR4App.js} +1 -1
  29. package/dist/public/mcp-reconnect-CSx4aMwy.js +1 -0
  30. package/dist/public/{memoryStorage-CjGseKI1.js → memoryStorage-Dwg8NhAZ.js} +1 -1
  31. package/dist/public/{orchestrator-B9KmIj8Q.js → orchestrator-DRfEudXk.js} +18 -18
  32. package/dist/public/orchestrator-o9Fj67BN.js +15 -0
  33. package/dist/public/pages/main/~/docs/publishing-to-github-pages.md +17 -82
  34. package/dist/public/{peerjs-Dv8JNm7v.js → peerjs-CurBuKvk.js} +1 -1
  35. package/dist/public/{push-client-Dqq06wbB.js → push-client-Dii-vPEh.js} +1 -1
  36. package/dist/public/service-worker/fetch-proxy.js +1 -1
  37. package/dist/public/service-worker.js +1 -1
  38. package/dist/public/{shadow-claw-Bd1rfuVC.js → shadow-claw-5IHaDDMJ.js} +2 -2
  39. package/dist/public/{shadow-claw-accounts-DL2l3oM0.js → shadow-claw-accounts-CZvz4iQz.js} +3 -3
  40. package/dist/public/{shadow-claw-channels-BGXDsQ38.js → shadow-claw-channels-BKXFyRS3.js} +1 -1
  41. package/dist/public/{shadow-claw-chat-NXg6zz_l.js → shadow-claw-chat-CCLuhWdI.js} +3 -3
  42. package/dist/public/{shadow-claw-conversations-C8eqGpP9.js → shadow-claw-conversations-DV-87UUh.js} +1 -1
  43. package/dist/public/shadow-claw-file-viewer-Dk2dbAUd.js +577 -0
  44. package/dist/public/shadow-claw-files-BpfpJIuP.js +840 -0
  45. package/dist/public/{shadow-claw-git-C0ntz7aX.js → shadow-claw-git-DRA7_qck.js} +3 -3
  46. package/dist/public/{shadow-claw-integrations-DCXV2r69.js → shadow-claw-integrations-1Xu5snuV.js} +1 -1
  47. package/dist/public/{shadow-claw-llm-CudgFQsS.js → shadow-claw-llm-6Aci1BDP.js} +2 -2
  48. package/dist/public/{shadow-claw-mcp-remote-B8RkpX28.js → shadow-claw-mcp-remote-BUjAeVXC.js} +1 -1
  49. package/dist/public/{shadow-claw-networking-BLiRsrsK.js → shadow-claw-networking-FQe4nCp3.js} +1 -1
  50. package/dist/public/{shadow-claw-notifications-CQhQcjtL.js → shadow-claw-notifications-DV2wibL3.js} +1 -1
  51. package/dist/public/{shadow-claw-page-header-NeRD0tKU.js → shadow-claw-page-header-B63S4HTU.js} +1 -1
  52. package/dist/public/{shadow-claw-pages-DCHnFh6r.js → shadow-claw-pages-DE3jWj5K.js} +3 -3
  53. package/dist/public/{shadow-claw-settings-VAfjKFQg.js → shadow-claw-settings-S6DAKfYx.js} +3 -3
  54. package/dist/public/shadow-claw-storage-DaacA3_K.js +219 -0
  55. package/dist/public/{shadow-claw-task-server-Dk33N_1G.js → shadow-claw-task-server-IjKX042p.js} +1 -1
  56. package/dist/public/{shadow-claw-tasks-xA1VfmWN.js → shadow-claw-tasks-Cy0JYmGU.js} +4 -4
  57. package/dist/public/{shadow-claw-terminal-Du2r0ciq.js → shadow-claw-terminal-znAt7HyP.js} +1 -1
  58. package/dist/public/{shadow-claw-tools-CZj4rq7l.js → shadow-claw-tools-Cutv9Si5.js} +2 -2
  59. package/dist/public/{shadow-claw-webvm-JYUkWICG.js → shadow-claw-webvm-BH8mPDEu.js} +1 -1
  60. package/dist/public/static-main/~/docs/publishing-to-github-pages.md +17 -82
  61. package/dist/public/static-main-manifest.json +1 -1
  62. package/dist/public/{syncWebMcpRegistration-DfpvASnh.js → syncWebMcpRegistration-BqJxaMGR.js} +1 -1
  63. package/package.json +1 -1
  64. package/src/components/settings/shadow-claw-storage/shadow-claw-storage.html +17 -0
  65. package/src/components/settings/shadow-claw-storage/shadow-claw-storage.test.ts +44 -0
  66. package/src/components/settings/shadow-claw-storage/shadow-claw-storage.ts +56 -0
  67. package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.test.ts +105 -0
  68. package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.ts +11 -9
  69. package/src/components/shadow-claw-files/shadow-claw-files.css +41 -17
  70. package/src/components/shadow-claw-files/shadow-claw-files.html +35 -0
  71. package/src/components/shadow-claw-files/shadow-claw-files.test.ts +219 -0
  72. package/src/components/shadow-claw-files/shadow-claw-files.ts +170 -6
  73. package/src/components/shadow-claw-pages/utils/resolveWorkspaceLinkPath.test.ts +31 -0
  74. package/src/components/shadow-claw-pages/utils/resolveWorkspaceLinkPath.ts +2 -1
  75. package/src/components/shadow-claw-pages/utils/rewriteWorkspacePreviewHtml.test.ts +15 -0
  76. package/src/config/config.test.ts +9 -0
  77. package/src/config/config.ts +5 -0
  78. package/src/core/app-routes.test.ts +56 -0
  79. package/src/core/app-routes.ts +8 -1
  80. package/src/db/openDatabase.test.ts +10 -1
  81. package/src/db/openDatabase.ts +3 -1
  82. package/src/storage/migrateLegacyOpfs.test.ts +327 -0
  83. package/src/storage/migrateLegacyOpfs.ts +117 -0
  84. package/dist/public/config-AL77QAx4.js +0 -1
  85. package/dist/public/mcp-reconnect-DoicazQd.js +0 -1
  86. package/dist/public/orchestrator-4su7iyWj.js +0 -15
  87. package/dist/public/shadow-claw-file-viewer-9Qkwc30T.js +0 -577
  88. package/dist/public/shadow-claw-files-aDyq6Hv7.js +0 -781
  89. package/dist/public/shadow-claw-storage-Cf31np81.js +0 -202
@@ -1,4 +1,4 @@
1
- import{i as e,r as t,t as n}from"./rolldown-runtime-aKtaBQYM.js";import{a as r,i}from"./config-AL77QAx4.js";import{t as a}from"./browser-nBz_r6l4.js";import{t as o}from"./buffer-9oRIc-5Z.js";import{C as s,E as c,S as l,T as u,_ as d,a as f,f as p,i as m,n as h,o as g,r as _,s as v,t as y,w as b,x}from"./constants-7AKqaY3G.js";var S=n(((t,n)=>{var r=e(a()),i=function(e){if(e||={},this.Promise=e.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=e.domainReentrant||!1,this.domainReentrant){if(r.default===void 0||r.default.domain===void 0)throw Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=e.timeout||i.DEFAULT_TIMEOUT,this.maxOccupationTime=e.maxOccupationTime||i.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=e.maxExecutionTime||i.DEFAULT_MAX_EXECUTION_TIME,e.maxPending===1/0||Number.isInteger(e.maxPending)&&e.maxPending>=0?this.maxPending=e.maxPending:this.maxPending=i.DEFAULT_MAX_PENDING};i.DEFAULT_TIMEOUT=0,i.DEFAULT_MAX_OCCUPATION_TIME=0,i.DEFAULT_MAX_EXECUTION_TIME=0,i.DEFAULT_MAX_PENDING=1e3,i.prototype.acquire=function(e,t,n,i){if(Array.isArray(e))return this._acquireBatch(e,t,n,i);if(typeof t!=`function`)throw Error(`You must pass a function to execute`);var a=null,o=null,s=null;typeof n!=`function`&&(i=n,n=null,s=new this.Promise(function(e,t){a=e,o=t})),i||={};var c=!1,l=null,u=null,d=null,f=this,p=function(t,r,i){u&&=(clearTimeout(u),null),d&&=(clearTimeout(d),null),t&&(f.queues[e]&&f.queues[e].length===0&&delete f.queues[e],f.domainReentrant&&delete f.domains[e]),c||=(s?r?o(r):a(i):typeof n==`function`&&n(r,i),!0),t&&f.queues[e]&&f.queues[e].length>0&&f.queues[e].shift()()},m=function(n){if(c)return p(n);l&&=(clearTimeout(l),null),f.domainReentrant&&n&&(f.domains[e]=r.default.domain);var a=i.maxExecutionTime||f.maxExecutionTime;if(a&&(d=setTimeout(function(){f.queues[e]&&p(n,Error(`Maximum execution time is exceeded `+e))},a)),t.length===1){var o=!1;try{t(function(e,t){o||(o=!0,p(n,e,t))})}catch(e){o||(o=!0,p(n,e))}}else f._promiseTry(function(){return t()}).then(function(e){p(n,void 0,e)},function(e){p(n,e)})};f.domainReentrant&&r.default.domain&&(m=r.default.domain.bind(m));var h=i.maxPending||f.maxPending;if(!f.queues[e])f.queues[e]=[],m(!0);else if(f.domainReentrant&&r.default.domain&&r.default.domain===f.domains[e])m(!1);else if(f.queues[e].length>=h)p(!1,Error(`Too many pending tasks in queue `+e));else{var g=function(){m(!0)};i.skipQueue?f.queues[e].unshift(g):f.queues[e].push(g);var _=i.timeout||f.timeout;_&&(l=setTimeout(function(){l=null,p(!1,Error(`async-lock timed out in queue `+e))},_))}var v=i.maxOccupationTime||f.maxOccupationTime;if(v&&(u=setTimeout(function(){f.queues[e]&&p(!1,Error(`Maximum occupation time is exceeded in queue `+e))},v)),s)return s},i.prototype._acquireBatch=function(e,t,n,r){typeof n!=`function`&&(r=n,n=null);var i=this,a=function(e,t){return function(n){i.acquire(e,t,n,r)}},o=e.reduceRight(function(e,t){return a(t,e)},t);if(typeof n==`function`)o(n);else return new this.Promise(function(e,t){o.length===1?o(function(n,r){n?t(n):e(r)}):e(o())})},i.prototype.isBusy=function(e){return e?!!this.queues[e]:Object.keys(this.queues).length>0},i.prototype._promiseTry=function(e){try{return this.Promise.resolve(e())}catch(e){return this.Promise.reject(e)}},n.exports=i})),C=n(((e,t)=>{t.exports=S()})),w=n(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),T=n(((e,t)=>{var n=d(),r=p()(`TypedArray.prototype.buffer`,!0),i=v();t.exports=r||function(e){if(!i(e))throw new n(`Not a Typed Array`);return e.buffer}})),E=n(((e,t)=>{var n=s().Buffer,r=w(),i=T(),a=ArrayBuffer.isView||function(e){try{return i(e),!0}catch{return!1}},o=typeof Uint8Array<`u`,c=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`,l=c&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);t.exports=function(e,t){if(n.isBuffer(e))return e.constructor&&!(`isBuffer`in e)?n.from(e):e;if(typeof e==`string`)return n.from(e,t);if(c&&a(e)){if(e.byteLength===0)return n.alloc(0);if(l){var i=n.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var s=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),u=n.from(s);if(u.length===e.byteLength)return u}if(o&&e instanceof Uint8Array)return n.from(e);var d=r(e);if(d)for(var f=0;f<e.length;f+=1){var p=e[f];if(typeof p!=`number`||p<0||p>255||~~p!==p)throw RangeError(`Array items must be numbers in the range 0-255.`)}if(d||n.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))return n.from(e);throw TypeError(`The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.`)}})),D=n(((e,t)=>{var n=s().Buffer,r=E();function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=r(e,t||`utf8`);for(var n=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var c=o%i,l=Math.min(a-s,i-c),u=0;u<l;u++)n[c+u]=e[s+u];o+=l,s+=l,o%i===0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=this._len*8;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(n&4294967295)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw Error(`_update must be implemented by subclass`)},t.exports=i})),O=n(((e,t)=>{var n=u(),r=D(),i=s().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=Array(80);function c(){this.init(),this._w=o,r.call(this,64,56)}n(c,r),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function l(e){return e<<1|e>>>31}function d(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function p(e,t,n,r){return e===0?t&n|~t&r:e===2?t&n|t&r|n&r:t^n^r}c.prototype._update=function(e){for(var t=this._w,n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=l(t[c-3]^t[c-8]^t[c-14]^t[c-16]);for(var u=0;u<80;++u){var m=~~(u/20),h=d(n)+p(m,r,i,o)+s+t[u]+a[m]|0;s=o,o=i,i=f(r),r=n,n=h}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},c.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e},t.exports=c})),k=n((e=>{
1
+ import{i as e,r as t,t as n}from"./rolldown-runtime-aKtaBQYM.js";import{a as r,i}from"./config-BYAuxx3j.js";import{t as a}from"./browser-nBz_r6l4.js";import{t as o}from"./buffer-9oRIc-5Z.js";import{C as s,E as c,S as l,T as u,_ as d,a as f,f as p,i as m,n as h,o as g,r as _,s as v,t as y,w as b,x}from"./constants-7AKqaY3G.js";var S=n(((t,n)=>{var r=e(a()),i=function(e){if(e||={},this.Promise=e.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=e.domainReentrant||!1,this.domainReentrant){if(r.default===void 0||r.default.domain===void 0)throw Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=e.timeout||i.DEFAULT_TIMEOUT,this.maxOccupationTime=e.maxOccupationTime||i.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=e.maxExecutionTime||i.DEFAULT_MAX_EXECUTION_TIME,e.maxPending===1/0||Number.isInteger(e.maxPending)&&e.maxPending>=0?this.maxPending=e.maxPending:this.maxPending=i.DEFAULT_MAX_PENDING};i.DEFAULT_TIMEOUT=0,i.DEFAULT_MAX_OCCUPATION_TIME=0,i.DEFAULT_MAX_EXECUTION_TIME=0,i.DEFAULT_MAX_PENDING=1e3,i.prototype.acquire=function(e,t,n,i){if(Array.isArray(e))return this._acquireBatch(e,t,n,i);if(typeof t!=`function`)throw Error(`You must pass a function to execute`);var a=null,o=null,s=null;typeof n!=`function`&&(i=n,n=null,s=new this.Promise(function(e,t){a=e,o=t})),i||={};var c=!1,l=null,u=null,d=null,f=this,p=function(t,r,i){u&&=(clearTimeout(u),null),d&&=(clearTimeout(d),null),t&&(f.queues[e]&&f.queues[e].length===0&&delete f.queues[e],f.domainReentrant&&delete f.domains[e]),c||=(s?r?o(r):a(i):typeof n==`function`&&n(r,i),!0),t&&f.queues[e]&&f.queues[e].length>0&&f.queues[e].shift()()},m=function(n){if(c)return p(n);l&&=(clearTimeout(l),null),f.domainReentrant&&n&&(f.domains[e]=r.default.domain);var a=i.maxExecutionTime||f.maxExecutionTime;if(a&&(d=setTimeout(function(){f.queues[e]&&p(n,Error(`Maximum execution time is exceeded `+e))},a)),t.length===1){var o=!1;try{t(function(e,t){o||(o=!0,p(n,e,t))})}catch(e){o||(o=!0,p(n,e))}}else f._promiseTry(function(){return t()}).then(function(e){p(n,void 0,e)},function(e){p(n,e)})};f.domainReentrant&&r.default.domain&&(m=r.default.domain.bind(m));var h=i.maxPending||f.maxPending;if(!f.queues[e])f.queues[e]=[],m(!0);else if(f.domainReentrant&&r.default.domain&&r.default.domain===f.domains[e])m(!1);else if(f.queues[e].length>=h)p(!1,Error(`Too many pending tasks in queue `+e));else{var g=function(){m(!0)};i.skipQueue?f.queues[e].unshift(g):f.queues[e].push(g);var _=i.timeout||f.timeout;_&&(l=setTimeout(function(){l=null,p(!1,Error(`async-lock timed out in queue `+e))},_))}var v=i.maxOccupationTime||f.maxOccupationTime;if(v&&(u=setTimeout(function(){f.queues[e]&&p(!1,Error(`Maximum occupation time is exceeded in queue `+e))},v)),s)return s},i.prototype._acquireBatch=function(e,t,n,r){typeof n!=`function`&&(r=n,n=null);var i=this,a=function(e,t){return function(n){i.acquire(e,t,n,r)}},o=e.reduceRight(function(e,t){return a(t,e)},t);if(typeof n==`function`)o(n);else return new this.Promise(function(e,t){o.length===1?o(function(n,r){n?t(n):e(r)}):e(o())})},i.prototype.isBusy=function(e){return e?!!this.queues[e]:Object.keys(this.queues).length>0},i.prototype._promiseTry=function(e){try{return this.Promise.resolve(e())}catch(e){return this.Promise.reject(e)}},n.exports=i})),C=n(((e,t)=>{t.exports=S()})),w=n(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),T=n(((e,t)=>{var n=d(),r=p()(`TypedArray.prototype.buffer`,!0),i=v();t.exports=r||function(e){if(!i(e))throw new n(`Not a Typed Array`);return e.buffer}})),E=n(((e,t)=>{var n=s().Buffer,r=w(),i=T(),a=ArrayBuffer.isView||function(e){try{return i(e),!0}catch{return!1}},o=typeof Uint8Array<`u`,c=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`,l=c&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);t.exports=function(e,t){if(n.isBuffer(e))return e.constructor&&!(`isBuffer`in e)?n.from(e):e;if(typeof e==`string`)return n.from(e,t);if(c&&a(e)){if(e.byteLength===0)return n.alloc(0);if(l){var i=n.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var s=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),u=n.from(s);if(u.length===e.byteLength)return u}if(o&&e instanceof Uint8Array)return n.from(e);var d=r(e);if(d)for(var f=0;f<e.length;f+=1){var p=e[f];if(typeof p!=`number`||p<0||p>255||~~p!==p)throw RangeError(`Array items must be numbers in the range 0-255.`)}if(d||n.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))return n.from(e);throw TypeError(`The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.`)}})),D=n(((e,t)=>{var n=s().Buffer,r=E();function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=r(e,t||`utf8`);for(var n=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var c=o%i,l=Math.min(a-s,i-c),u=0;u<l;u++)n[c+u]=e[s+u];o+=l,s+=l,o%i===0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=this._len*8;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(n&4294967295)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw Error(`_update must be implemented by subclass`)},t.exports=i})),O=n(((e,t)=>{var n=u(),r=D(),i=s().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=Array(80);function c(){this.init(),this._w=o,r.call(this,64,56)}n(c,r),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function l(e){return e<<1|e>>>31}function d(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function p(e,t,n,r){return e===0?t&n|~t&r:e===2?t&n|t&r|n&r:t^n^r}c.prototype._update=function(e){for(var t=this._w,n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=l(t[c-3]^t[c-8]^t[c-14]^t[c-16]);for(var u=0;u<80;++u){var m=~~(u/20),h=d(n)+p(m,r,i,o)+s+t[u]+a[m]|0;s=o,o=i,i=f(r),r=n,n=h}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},c.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e},t.exports=c})),k=n((e=>{
2
2
  /*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
3
3
  (function(t){typeof DO_NOT_EXPORT_CRC>`u`?typeof e==`object`?t(e):typeof define==`function`&&define.amd?define(function(){var e={};return t(e),e}):t({}):t({})})(function(e){e.version=`1.2.2`;function t(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=n,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}var n=t();function r(e){var t=0,n=0,r=0,i=typeof Int32Array<`u`?new Int32Array(4096):Array(4096);for(r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[n&255];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(r*256,r*256+256):i.slice(r*256,r*256+256);return a}var i=r(n),a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],_=i[12],v=i[13],y=i[14];function b(e,t){for(var r=t^-1,i=0,a=e.length;i<a;)r=r>>>8^n[(r^e.charCodeAt(i++))&255];return~r}function x(e,t){for(var r=t^-1,i=e.length-15,b=0;b<i;)r=y[e[b++]^r&255]^v[e[b++]^r>>8&255]^_[e[b++]^r>>16&255]^g[e[b++]^r>>>24]^h[e[b++]]^m[e[b++]]^p[e[b++]]^f[e[b++]]^d[e[b++]]^u[e[b++]]^l[e[b++]]^c[e[b++]]^s[e[b++]]^o[e[b++]]^a[e[b++]]^n[e[b++]];for(i+=15;b<i;)r=r>>>8^n[(r^e[b++])&255];return~r}function S(e,t){for(var r=t^-1,i=0,a=e.length,o=0,s=0;i<a;)o=e.charCodeAt(i++),o<128?r=r>>>8^n[(r^o)&255]:o<2048?(r=r>>>8^n[(r^(192|o>>6&31))&255],r=r>>>8^n[(r^(128|o&63))&255]):o>=55296&&o<57344?(o=(o&1023)+64,s=e.charCodeAt(i++)&1023,r=r>>>8^n[(r^(240|o>>8&7))&255],r=r>>>8^n[(r^(128|o>>2&63))&255],r=r>>>8^n[(r^(128|s>>6&15|(o&3)<<4))&255],r=r>>>8^n[(r^(128|s&63))&255]):(r=r>>>8^n[(r^(224|o>>12&15))&255],r=r>>>8^n[(r^(128|o>>6&63))&255],r=r>>>8^n[(r^(128|o&63))&255]);return~r}e.table=n,e.bstr=b,e.buf=x,e.str=S})})),A=n((e=>{var t=f(),n=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{r=!1}for(var i=new t.Buf8(256),a=0;a<256;a++)i[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;i[254]=i[254]=1,e.string2buf=function(e){var n,r,i,a,o,s=e.length,c=0;for(a=0;a<s;a++)r=e.charCodeAt(a),(r&64512)==55296&&a+1<s&&(i=e.charCodeAt(a+1),(i&64512)==56320&&(r=65536+(r-55296<<10)+(i-56320),a++)),c+=r<128?1:r<2048?2:r<65536?3:4;for(n=new t.Buf8(c),o=0,a=0;o<c;a++)r=e.charCodeAt(a),(r&64512)==55296&&a+1<s&&(i=e.charCodeAt(a+1),(i&64512)==56320&&(r=65536+(r-55296<<10)+(i-56320),a++)),r<128?n[o++]=r:r<2048?(n[o++]=192|r>>>6,n[o++]=128|r&63):r<65536?(n[o++]=224|r>>>12,n[o++]=128|r>>>6&63,n[o++]=128|r&63):(n[o++]=240|r>>>18,n[o++]=128|r>>>12&63,n[o++]=128|r>>>6&63,n[o++]=128|r&63);return n};function o(e,i){if(i<65534&&(e.subarray&&r||!e.subarray&&n))return String.fromCharCode.apply(null,t.shrinkBuf(e,i));for(var a=``,o=0;o<i;o++)a+=String.fromCharCode(e[o]);return a}e.buf2binstring=function(e){return o(e,e.length)},e.binstring2buf=function(e){for(var n=new t.Buf8(e.length),r=0,i=n.length;r<i;r++)n[r]=e.charCodeAt(r);return n},e.buf2string=function(e,t){var n,r,a,s,c=t||e.length,l=Array(c*2);for(r=0,n=0;n<c;){if(a=e[n++],a<128){l[r++]=a;continue}if(s=i[a],s>4){l[r++]=65533,n+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&n<c;)a=a<<6|e[n++]&63,s--;if(s>1){l[r++]=65533;continue}a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|a&1023)}return o(l,r)},e.utf8border=function(e,t){var n;for(t||=e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+i[e[n]]>t?n:t}})),ee=n((e=>{var t=_(),n=f(),r=A(),i=m(),a=g(),o=Object.prototype.toString,s=0,c=4,l=0,u=1,d=2,p=-1,h=0,v=8;function y(e){if(!(this instanceof y))return new y(e);this.options=n.assign({level:p,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:``},e||{});var s=this.options;s.raw&&s.windowBits>0?s.windowBits=-s.windowBits:s.gzip&&s.windowBits>0&&s.windowBits<16&&(s.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var c=t.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(c!==l)throw Error(i[c]);if(s.header&&t.deflateSetHeader(this.strm,s.header),s.dictionary){var u=typeof s.dictionary==`string`?r.string2buf(s.dictionary):o.call(s.dictionary)===`[object ArrayBuffer]`?new Uint8Array(s.dictionary):s.dictionary;if(c=t.deflateSetDictionary(this.strm,u),c!==l)throw Error(i[c]);this._dict_set=!0}}y.prototype.push=function(e,i){var a=this.strm,f=this.options.chunkSize,p,m;if(this.ended)return!1;m=i===~~i?i:i===!0?c:s,typeof e==`string`?a.input=r.string2buf(e):o.call(e)===`[object ArrayBuffer]`?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new n.Buf8(f),a.next_out=0,a.avail_out=f),p=t.deflate(a,m),p!==u&&p!==l)return this.onEnd(p),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(m===c||m===d))&&(this.options.to===`string`?this.onData(r.buf2binstring(n.shrinkBuf(a.output,a.next_out))):this.onData(n.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&p!==u);return m===c?(p=t.deflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l):m===d?(this.onEnd(l),a.avail_out=0,!0):!0},y.prototype.onData=function(e){this.chunks.push(e)},y.prototype.onEnd=function(e){e===l&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function b(e,t){var n=new y(t);if(n.push(e,!0),n.err)throw n.msg||i[n.err];return n.result}function x(e,t){return t||={},t.raw=!0,b(e,t)}function S(e,t){return t||={},t.gzip=!0,b(e,t)}e.Deflate=y,e.deflate=b,e.deflateRaw=x,e.gzip=S})),j=n(((e,t)=>{function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}t.exports=n})),M=n((e=>{var t=h(),n=f(),r=A(),i=y(),a=m(),o=g(),s=j(),c=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=n.assign({chunkSize:16384,windowBits:0,to:``},e||{});var u=this.options;u.raw&&u.windowBits>=0&&u.windowBits<16&&(u.windowBits=-u.windowBits,u.windowBits===0&&(u.windowBits=-15)),u.windowBits>=0&&u.windowBits<16&&!(e&&e.windowBits)&&(u.windowBits+=32),u.windowBits>15&&u.windowBits<48&&(u.windowBits&15||(u.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var d=t.inflateInit2(this.strm,u.windowBits);if(d!==i.Z_OK||(this.header=new s,t.inflateGetHeader(this.strm,this.header),u.dictionary&&(typeof u.dictionary==`string`?u.dictionary=r.string2buf(u.dictionary):c.call(u.dictionary)===`[object ArrayBuffer]`&&(u.dictionary=new Uint8Array(u.dictionary)),u.raw&&(d=t.inflateSetDictionary(this.strm,u.dictionary),d!==i.Z_OK))))throw Error(a[d])}l.prototype.push=function(e,a){var o=this.strm,s=this.options.chunkSize,l=this.options.dictionary,u,d,f,p,m,h=!1;if(this.ended)return!1;d=a===~~a?a:a===!0?i.Z_FINISH:i.Z_NO_FLUSH,typeof e==`string`?o.input=r.binstring2buf(e):c.call(e)===`[object ArrayBuffer]`?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(o.avail_out===0&&(o.output=new n.Buf8(s),o.next_out=0,o.avail_out=s),u=t.inflate(o,i.Z_NO_FLUSH),u===i.Z_NEED_DICT&&l&&(u=t.inflateSetDictionary(this.strm,l)),u===i.Z_BUF_ERROR&&h===!0&&(u=i.Z_OK,h=!1),u!==i.Z_STREAM_END&&u!==i.Z_OK)return this.onEnd(u),this.ended=!0,!1;o.next_out&&(o.avail_out===0||u===i.Z_STREAM_END||o.avail_in===0&&(d===i.Z_FINISH||d===i.Z_SYNC_FLUSH))&&(this.options.to===`string`?(f=r.utf8border(o.output,o.next_out),p=o.next_out-f,m=r.buf2string(o.output,f),o.next_out=p,o.avail_out=s-p,p&&n.arraySet(o.output,o.output,f,p,0),this.onData(m)):this.onData(n.shrinkBuf(o.output,o.next_out))),o.avail_in===0&&o.avail_out===0&&(h=!0)}while((o.avail_in>0||o.avail_out===0)&&u!==i.Z_STREAM_END);return u===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(u=t.inflateEnd(this.strm),this.onEnd(u),this.ended=!0,u===i.Z_OK):d===i.Z_SYNC_FLUSH?(this.onEnd(i.Z_OK),o.avail_out=0,!0):!0},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===i.Z_OK&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function u(e,t){var n=new l(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}function d(e,t){return t||={},t.raw=!0,u(e,t)}e.Inflate=l,e.inflate=u,e.inflateRaw=d,e.ungzip=u})),te=n(((e,t)=>{var n=f().assign,r=ee(),i=M(),a=y(),o={};n(o,r,i,a),t.exports=o})),N=n(((t,n)=>{var r=e(a()),i=65536,o=4294967295;function c(){throw Error(`Secure random number generation is not supported by this browser.
4
4
  Use Chrome, Firefox or Internet Explorer 11`)}var l=s().Buffer,u=globalThis.crypto||globalThis.msCrypto;u&&u.getRandomValues?n.exports=d:n.exports=c;function d(e,t){if(e>o)throw RangeError(`requested too many random bytes`);var n=l.allocUnsafe(e);if(e>0)if(e>i)for(var a=0;a<e;a+=i)u.getRandomValues(n.slice(a,a+i));else u.getRandomValues(n);return typeof t==`function`?r.default.nextTick(function(){t(null,n)}):n}})),P=n(((e,t)=>{var n=s().Buffer,r=x().Transform,i=u();function a(e){r.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}i(a,r),a.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)};var o=typeof Uint8Array<`u`,c=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`&&ArrayBuffer.isView&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);function l(e,t){if(e instanceof n)return e;if(typeof e==`string`)return n.from(e,t);if(c&&ArrayBuffer.isView(e)){if(e.byteLength===0)return n.alloc(0);var r=n.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(o&&e instanceof Uint8Array||n.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))return n.from(e);throw TypeError(`The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.`)}a.prototype.update=function(e,t){if(this._finalized)throw Error(`Digest already called`);e=l(e,t);for(var n=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)n[i++]=e[r++];this._update(),this._blockOffset=0}for(;r<e.length;)n[this._blockOffset++]=e[r++];for(var a=0,o=e.length*8;o>0;++a)this._length[a]+=o,o=this._length[a]/4294967296|0,o>0&&(this._length[a]-=4294967296*o);return this},a.prototype._update=function(){throw Error(`_update is not implemented`)},a.prototype.digest=function(e){if(this._finalized)throw Error(`Digest already called`);this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},a.prototype._digest=function(){throw Error(`_digest is not implemented`)},t.exports=a})),ne=n(((e,t)=>{var n=u(),r=P(),i=s().Buffer,a=Array(16);function o(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}n(o,r),o.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var n=this._a,r=this._b,i=this._c,o=this._d;n=l(n,r,i,o,e[0],3614090360,7),o=l(o,n,r,i,e[1],3905402710,12),i=l(i,o,n,r,e[2],606105819,17),r=l(r,i,o,n,e[3],3250441966,22),n=l(n,r,i,o,e[4],4118548399,7),o=l(o,n,r,i,e[5],1200080426,12),i=l(i,o,n,r,e[6],2821735955,17),r=l(r,i,o,n,e[7],4249261313,22),n=l(n,r,i,o,e[8],1770035416,7),o=l(o,n,r,i,e[9],2336552879,12),i=l(i,o,n,r,e[10],4294925233,17),r=l(r,i,o,n,e[11],2304563134,22),n=l(n,r,i,o,e[12],1804603682,7),o=l(o,n,r,i,e[13],4254626195,12),i=l(i,o,n,r,e[14],2792965006,17),r=l(r,i,o,n,e[15],1236535329,22),n=d(n,r,i,o,e[1],4129170786,5),o=d(o,n,r,i,e[6],3225465664,9),i=d(i,o,n,r,e[11],643717713,14),r=d(r,i,o,n,e[0],3921069994,20),n=d(n,r,i,o,e[5],3593408605,5),o=d(o,n,r,i,e[10],38016083,9),i=d(i,o,n,r,e[15],3634488961,14),r=d(r,i,o,n,e[4],3889429448,20),n=d(n,r,i,o,e[9],568446438,5),o=d(o,n,r,i,e[14],3275163606,9),i=d(i,o,n,r,e[3],4107603335,14),r=d(r,i,o,n,e[8],1163531501,20),n=d(n,r,i,o,e[13],2850285829,5),o=d(o,n,r,i,e[2],4243563512,9),i=d(i,o,n,r,e[7],1735328473,14),r=d(r,i,o,n,e[12],2368359562,20),n=f(n,r,i,o,e[5],4294588738,4),o=f(o,n,r,i,e[8],2272392833,11),i=f(i,o,n,r,e[11],1839030562,16),r=f(r,i,o,n,e[14],4259657740,23),n=f(n,r,i,o,e[1],2763975236,4),o=f(o,n,r,i,e[4],1272893353,11),i=f(i,o,n,r,e[7],4139469664,16),r=f(r,i,o,n,e[10],3200236656,23),n=f(n,r,i,o,e[13],681279174,4),o=f(o,n,r,i,e[0],3936430074,11),i=f(i,o,n,r,e[3],3572445317,16),r=f(r,i,o,n,e[6],76029189,23),n=f(n,r,i,o,e[9],3654602809,4),o=f(o,n,r,i,e[12],3873151461,11),i=f(i,o,n,r,e[15],530742520,16),r=f(r,i,o,n,e[2],3299628645,23),n=p(n,r,i,o,e[0],4096336452,6),o=p(o,n,r,i,e[7],1126891415,10),i=p(i,o,n,r,e[14],2878612391,15),r=p(r,i,o,n,e[5],4237533241,21),n=p(n,r,i,o,e[12],1700485571,6),o=p(o,n,r,i,e[3],2399980690,10),i=p(i,o,n,r,e[10],4293915773,15),r=p(r,i,o,n,e[1],2240044497,21),n=p(n,r,i,o,e[8],1873313359,6),o=p(o,n,r,i,e[15],4264355552,10),i=p(i,o,n,r,e[6],2734768916,15),r=p(r,i,o,n,e[13],1309151649,21),n=p(n,r,i,o,e[4],4149444226,6),o=p(o,n,r,i,e[11],3174756917,10),i=p(i,o,n,r,e[2],718787259,15),r=p(r,i,o,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function c(e,t){return e<<t|e>>>32-t}function l(e,t,n,r,i,a,o){return c(e+(t&n|~t&r)+i+a|0,o)+t|0}function d(e,t,n,r,i,a,o){return c(e+(t&r|n&~r)+i+a|0,o)+t|0}function f(e,t,n,r,i,a,o){return c(e+(t^n^r)+i+a|0,o)+t|0}function p(e,t,n,r,i,a,o){return c(e+(n^(t|~r))+i+a|0,o)+t|0}t.exports=o})),F=n(((e,t)=>{var n=s().Buffer,r=E(),i=typeof Uint8Array<`u`,a=i&&typeof ArrayBuffer<`u`&&ArrayBuffer.isView;t.exports=function(e,t){if(typeof e==`string`||n.isBuffer(e)||i&&e instanceof Uint8Array||a&&a(e))return r(e,t);throw TypeError(`The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView`)}})),I=n(((t,n)=>{var r=e(a());r.default===void 0||!r.default.version||r.default.version.indexOf(`v0.`)===0||r.default.version.indexOf(`v1.`)===0&&r.default.version.indexOf(`v1.8.`)!==0?n.exports={nextTick:i}:n.exports=r.default;function i(e,t,n,i){if(typeof e!=`function`)throw TypeError(`"callback" argument must be a function`);var a=arguments.length,o,s;switch(a){case 0:case 1:return r.default.nextTick(e);case 2:return r.default.nextTick(function(){e.call(null,t)});case 3:return r.default.nextTick(function(){e.call(null,t,n)});case 4:return r.default.nextTick(function(){e.call(null,t,n,i)});default:for(o=Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return r.default.nextTick(function(){e.apply(null,o)})}}})),re=n(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),L=n(((e,t)=>{t.exports=c().EventEmitter})),R=n(((e,t)=>{var n=o(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),ie=n((e=>{var t=o();function n(e){return Array.isArray?Array.isArray(e):_(e)===`[object Array]`}e.isArray=n;function r(e){return typeof e==`boolean`}e.isBoolean=r;function i(e){return e===null}e.isNull=i;function a(e){return e==null}e.isNullOrUndefined=a;function s(e){return typeof e==`number`}e.isNumber=s;function c(e){return typeof e==`string`}e.isString=c;function l(e){return typeof e==`symbol`}e.isSymbol=l;function u(e){return e===void 0}e.isUndefined=u;function d(e){return _(e)===`[object RegExp]`}e.isRegExp=d;function f(e){return typeof e==`object`&&!!e}e.isObject=f;function p(e){return _(e)===`[object Date]`}e.isDate=p;function m(e){return _(e)===`[object Error]`||e instanceof Error}e.isError=m;function h(e){return typeof e==`function`}e.isFunction=h;function g(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`||typeof e==`symbol`||e===void 0}e.isPrimitive=g,e.isBuffer=t.Buffer.isBuffer;function _(e){return Object.prototype.toString.call(e)}})),z=n((()=>{})),B=n((()=>{})),ae=n(((e,t)=>{function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var r=R().Buffer,i=B();function a(e,t,n){e.copy(t,n)}t.exports=function(){function e(){n(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(this.length===0)return r.alloc(0);for(var t=r.allocUnsafe(e>>>0),n=this.head,i=0;n;)a(n.data,t,i),i+=n.data.length,n=n.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+` `+e})})),V=n(((e,t)=>{var n=I();function r(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(a,r,e)):n.nextTick(a,r,e):t&&t(e)}),this)}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit(`error`,t)}t.exports={destroy:r,undestroy:i}})),H=n(((t,n)=>{var r=e(a()),i=I();n.exports=S;function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){re(t,e)}}var s=!r.default.browser&&[`v0.10`,`v0.9.`].indexOf(r.default.version.slice(0,5))>-1?setImmediate:i.nextTick,c;S.WritableState=y;var l=Object.create(ie());l.inherits=u();var d={deprecate:b()},f=L(),p=R().Buffer,m=(typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function h(e){return p.from(e)}function g(e){return p.isBuffer(e)||e instanceof m}var _=V();l.inherits(S,f);function v(){}function y(e,t){c||=oe(),e||={};var n=t instanceof c;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){A(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(y.prototype,"buffer",{get:d.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var x;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(x=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return x.call(this,e)?!0:this===S&&e&&e._writableState instanceof y}})):x=function(e){return e instanceof this};function S(e){if(c||=oe(),!x.call(S,this)&&!(this instanceof c))return new S(e);this._writableState=new y(e,this),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),f.call(this)}S.prototype.pipe=function(){this.emit(`error`,Error(`Cannot pipe, not readable`))};function C(e,t){var n=Error(`write after end`);e.emit(`error`,n),i.nextTick(t,n)}function w(e,t,n,r){var a=!0,o=!1;return n===null?o=TypeError(`May not write null values to stream`):typeof n!=`string`&&n!==void 0&&!t.objectMode&&(o=TypeError(`Invalid non-string/buffer chunk`)),o&&(e.emit(`error`,o),i.nextTick(r,o),a=!1),a}S.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&g(e);return a&&!p.isBuffer(e)&&(e=h(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=v),r.ended?C(this,n):(a||w(this,r,e,n))&&(r.pendingcb++,i=E(this,r,a,e,t,n)),i},S.prototype.cork=function(){var e=this._writableState;e.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&M(this,e))},S.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw TypeError(`Unknown encoding: `+e);return this._writableState.defaultEncoding=e,this};function T(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=p.from(t,n)),t}Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function E(e,t,n,r,i,a){if(!n){var o=T(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else D(e,t,!1,s,r,i,a);return c}function D(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function O(e,t,n,r,a){--t.pendingcb,n?(i.nextTick(a,r),i.nextTick(ne,e,t),e._writableState.errorEmitted=!0,e.emit(`error`,r)):(a(r),e._writableState.errorEmitted=!0,e.emit(`error`,r),ne(e,t))}function k(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function A(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(k(n),t)O(e,n,r,t,i);else{var a=te(n);!a&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&M(e,n),r?s(ee,e,n,a,i):ee(e,n,a,i)}}function ee(e,t,n,r){n||j(e,t),t.pendingcb--,r(),ne(e,t)}function j(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`))}function M(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)i[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;i.allBuffers=c,D(e,t,!0,t.length,i,``,a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,u=n.encoding,d=n.callback;if(D(e,t,!1,t.objectMode?1:l.length,l,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}n===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}S.prototype._write=function(e,t,n){n(Error(`_write() is not implemented`))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;typeof e==`function`?(n=e,e=null,t=null):typeof t==`function`&&(n=t,t=null),e!=null&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||F(this,r,n)};function te(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function N(e,t){e._final(function(n){t.pendingcb--,n&&e.emit(`error`,n),t.prefinished=!0,e.emit(`prefinish`),ne(e,t)})}function P(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==`function`?(t.pendingcb++,t.finalCalled=!0,i.nextTick(N,e,t)):(t.prefinished=!0,e.emit(`prefinish`)))}function ne(e,t){var n=te(t);return n&&(P(e,t),t.pendingcb===0&&(t.finished=!0,e.emit(`finish`))),n}function F(e,t,n){t.ending=!0,ne(e,t),n&&(t.finished?i.nextTick(n):e.once(`finish`,n)),t.ended=!0,e.writable=!1}function re(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=_.destroy,S.prototype._undestroy=_.undestroy,S.prototype._destroy=function(e,t){this.end(),t(e)}})),oe=n(((e,t)=>{var n=I(),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=d;var i=Object.create(ie());i.inherits=u();var a=ce(),o=H();i.inherits(d,a);for(var s=r(o.prototype),c=0;c<s.length;c++){var l=s[c];d.prototype[l]||(d.prototype[l]=o.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);a.call(this,e),o.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once(`end`,f)}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}})),se=n(((e,t)=>{var n=o(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),U=n((e=>{var t=se().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||``},a.prototype.end=d,a.prototype.text=u,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):``}})),ce=n(((t,n)=>{var r=e(a()),i=I();n.exports=T;var o=re(),s;T.ReadableState=w,c().EventEmitter;var l=function(e,t){return e.listeners(t).length},d=L(),f=R().Buffer,p=(typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function m(e){return f.from(e)}function h(e){return f.isBuffer(e)||e instanceof p}var g=Object.create(ie());g.inherits=u();var _=z(),v=void 0;v=_&&_.debuglog?_.debuglog(`stream`):function(){};var y=ae(),b=V(),x;g.inherits(T,d);var S=[`error`,`close`,`destroy`,`pause`,`resume`];function C(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function w(e,t){s||=oe(),e||={};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(x||=U().StringDecoder,this.decoder=new x(e.encoding),this.encoding=e.encoding)}function T(e){if(s||=oe(),!(this instanceof T))return new T(e);this._readableState=new w(e,this),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),d.call(this)}Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=b.destroy,T.prototype._undestroy=b.undestroy,T.prototype._destroy=function(e,t){this.push(null),t(e)},T.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=f.from(e,t),t=``),r=!0),E(this,e,t,!1,r)},T.prototype.unshift=function(e){return E(this,e,null,!0,!1)};function E(e,t,n,r,i){var a=e._readableState;if(t===null)a.reading=!1,M(e,a);else{var o;i||(o=O(a,t)),o?e.emit(`error`,o):a.objectMode||t&&t.length>0?(typeof t!=`string`&&!a.objectMode&&Object.getPrototypeOf(t)!==f.prototype&&(t=m(t)),r?a.endEmitted?e.emit(`error`,Error(`stream.unshift() after end event`)):D(e,a,t,!0):a.ended?e.emit(`error`,Error(`stream.push() after EOF`)):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||t.length!==0?D(e,a,t,!1):P(e,a)):D(e,a,t,!1))):r||(a.reading=!1)}return k(a)}function D(e,t,n,r){t.flowing&&t.length===0&&!t.sync?(e.emit(`data`,n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&te(e)),P(e,t)}function O(e,t){var n;return!h(t)&&typeof t!=`string`&&t!==void 0&&!e.objectMode&&(n=TypeError(`Invalid non-string/buffer chunk`)),n}function k(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}T.prototype.isPaused=function(){return this._readableState.flowing===!1},T.prototype.setEncoding=function(e){return x||=U().StringDecoder,this._readableState.decoder=new x(e),this._readableState.encoding=e,this};var A=8388608;function ee(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=ee(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}T.prototype.read=function(e){v(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return v(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?q(this):te(this),null;if(e=j(e,t),e===0&&t.ended)return t.length===0&&q(this),null;var r=t.needReadable;v(`need readable`,r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,v(`length less than watermark`,r)),t.ended||t.reading?(r=!1,v(`reading or ended`,r)):r&&(v(`do read`),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t)));var i=e>0?W(e,t):null;return i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&q(this)),i!==null&&this.emit(`data`,i),i};function M(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,te(e)}}function te(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(v(`emitReadable`,t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(N,e):N(e))}function N(e){v(`emit readable`),e.emit(`readable`),ce(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(ne,e,t))}function ne(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(v(`maybeReadMore read 0`),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}T.prototype._read=function(e){this.emit(`error`,Error(`_read() is not implemented`))},T.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e);break}a.pipesCount+=1,v(`pipe count=%d opts=%j`,a.pipesCount,t);var o=(!t||t.end!==!1)&&e!==r.default.stdout&&e!==r.default.stderr?c:y;a.endEmitted?i.nextTick(o):n.once(`end`,o),e.on(`unpipe`,s);function s(e,t){v(`onunpipe`),e===n&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,f())}function c(){v(`onend`),e.end()}var u=F(n);e.on(`drain`,u);var d=!1;function f(){v(`cleanup`),e.removeListener(`close`,g),e.removeListener(`finish`,_),e.removeListener(`drain`,u),e.removeListener(`error`,h),e.removeListener(`unpipe`,s),n.removeListener(`end`,c),n.removeListener(`end`,y),n.removeListener(`data`,m),d=!0,a.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var p=!1;n.on(`data`,m);function m(t){v(`ondata`),p=!1,!1===e.write(t)&&!p&&((a.pipesCount===1&&a.pipes===e||a.pipesCount>1&&J(a.pipes,e)!==-1)&&!d&&(v(`false write response, pause`,a.awaitDrain),a.awaitDrain++,p=!0),n.pause())}function h(t){v(`onerror`,t),y(),e.removeListener(`error`,h),l(e,`error`)===0&&e.emit(`error`,t)}C(e,`error`,h);function g(){e.removeListener(`finish`,_),y()}e.once(`close`,g);function _(){v(`onfinish`),e.removeListener(`close`,g),y()}e.once(`finish`,_);function y(){v(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),a.flowing||(v(`pipe resume`),n.resume()),e};function F(e){return function(){var t=e._readableState;v(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&l(e,`data`)&&(t.flowing=!0,ce(e))}}T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit(`unpipe`,this,{hasUnpiped:!1});return this}var o=J(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),--t.pipesCount,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit(`unpipe`,this,n),this)},T.prototype.on=function(e,t){var n=d.prototype.on.call(this,e,t);if(e===`data`)this._readableState.flowing!==!1&&this.resume();else if(e===`readable`){var r=this._readableState;!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&te(this):i.nextTick(B,this))}return n},T.prototype.addListener=T.prototype.on;function B(e){v(`readable nexttick read 0`),e.read(0)}T.prototype.resume=function(){var e=this._readableState;return e.flowing||(v(`resume`),e.flowing=!0,H(this,e)),this};function H(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(se,e,t))}function se(e,t){t.reading||(v(`resume read 0`),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit(`resume`),ce(e),t.flowing&&!t.reading&&e.read(0)}T.prototype.pause=function(){return v(`call pause flowing=%j`,this._readableState.flowing),!1!==this._readableState.flowing&&(v(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this};function ce(e){var t=e._readableState;for(v(`flow`,t.flowing);t.flowing&&e.read()!==null;);}T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on(`end`,function(){if(v(`wrapped end`),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on(`data`,function(i){v(`wrapped data`),n.decoder&&(i=n.decoder.write(i)),!(n.objectMode&&i==null)&&(!n.objectMode&&(!i||!i.length)||t.push(i)||(r=!0,e.pause()))}),e)this[i]===void 0&&typeof e[i]==`function`&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<S.length;a++)e.on(S[a],this.emit.bind(this,S[a]));return this._read=function(t){v(`wrapped _read`,t),r&&(r=!1,e.resume())},this},Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),T._fromList=W;function W(e,t){if(t.length===0)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=G(e,t.buffer,t.decoder),n}function G(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?le(e,t):K(e,t),r}function le(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,e===0){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function K(e,t){var n=f.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function q(e){var t=e._readableState;if(t.length>0)throw Error(`"endReadable()" called on non-empty stream`);t.endEmitted||(t.ended=!0,i.nextTick(ue,t,e))}function ue(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`))}function J(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}})),W=n(((e,t)=>{t.exports=a;var n=oe(),r=Object.create(ie());r.inherits=u(),r.inherits(a,n);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit(`error`,Error(`write callback called multiple times`));n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,o)}function o(){var e=this;typeof this._flush==`function`?this._flush(function(t,n){s(e,t,n)}):s(this,null,null)}a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw Error(`_transform() is not implemented`)},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,function(e){t(e),r.emit(`close`)})};function s(e,t,n){if(t)return e.emit(`error`,t);if(n!=null&&e.push(n),e._writableState.length)throw Error(`Calling transform done when ws.length != 0`);if(e._transformState.transforming)throw Error(`Calling transform done when still transforming`);return e.push(null)}})),G=n(((e,t)=>{t.exports=i;var n=W(),r=Object.create(ie());r.inherits=u(),r.inherits(i,n);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),le=n(((e,t)=>{e=t.exports=ce(),e.Stream=e,e.Readable=e,e.Writable=H(),e.Duplex=oe(),e.Transform=W(),e.PassThrough=G()})),K=n(((e,t)=>{var n=s().Buffer,r=F(),i=le().Transform,a=u();function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}a(o,i),o.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(this._finalized)throw Error(`Digest already called`);for(var n=r(e,t),i=this._block,a=0;this._blockOffset+n.length-a>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o]=n[a],o+=1,a+=1;this._update(),this._blockOffset=0}for(;a<n.length;)i[this._blockOffset]=n[a],this._blockOffset+=1,a+=1;for(var s=0,c=n.length*8;c>0;++s)this._length[s]+=c,c=this._length[s]/4294967296|0,c>0&&(this._length[s]-=4294967296*c);return this},o.prototype._update=function(){throw Error(`_update is not implemented`)},o.prototype.digest=function(e){if(this._finalized)throw Error(`Digest already called`);this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},o.prototype._digest=function(){throw Error(`_digest is not implemented`)},t.exports=o})),q=n(((e,t)=>{var n=o().Buffer,r=u(),i=K(),a=Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function m(e,t){return e<<t|e>>>32-t}function h(e,t,n,r,i,a,o,s){return m(e+(t^n^r)+a+o|0,s)+i|0}function g(e,t,n,r,i,a,o,s){return m(e+(t&n|~t&r)+a+o|0,s)+i|0}function _(e,t,n,r,i,a,o,s){return m(e+((t|~n)^r)+a+o|0,s)+i|0}function v(e,t,n,r,i,a,o,s){return m(e+(t&r|n&~r)+a+o|0,s)+i|0}function y(e,t,n,r,i,a,o,s){return m(e+(t^(n|~r))+a+o|0,s)+i|0}function b(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}r(b,i),b.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);for(var n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,u=this._e|0,b=this._a|0,x=this._b|0,S=this._c|0,C=this._d|0,w=this._e|0,T=0;T<80;T+=1){var E,D;T<16?(E=h(n,r,i,o,u,e[s[T]],f[0],l[T]),D=y(b,x,S,C,w,e[c[T]],p[0],d[T])):T<32?(E=g(n,r,i,o,u,e[s[T]],f[1],l[T]),D=v(b,x,S,C,w,e[c[T]],p[1],d[T])):T<48?(E=_(n,r,i,o,u,e[s[T]],f[2],l[T]),D=_(b,x,S,C,w,e[c[T]],p[2],d[T])):T<64?(E=v(n,r,i,o,u,e[s[T]],f[3],l[T]),D=g(b,x,S,C,w,e[c[T]],p[3],d[T])):(E=y(n,r,i,o,u,e[s[T]],f[4],l[T]),D=h(b,x,S,C,w,e[c[T]],p[4],d[T])),n=u,u=o,o=m(i,10),i=r,r=E,b=w,w=C,C=m(S,10),S=x,x=D}var O=this._b+i+C|0;this._b=this._c+o+w|0,this._c=this._d+u+b|0,this._d=this._e+n+x|0,this._e=this._a+r+S|0,this._a=O},b.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=b})),ue=n(((e,t)=>{var n=u(),r=D(),i=s().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=Array(80);function c(){this.init(),this._w=o,r.call(this,64,56)}n(c,r),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function l(e){return e<<5|e>>>27}function d(e){return e<<30|e>>>2}function f(e,t,n,r){return e===0?t&n|~t&r:e===2?t&n|t&r|n&r:t^n^r}c.prototype._update=function(e){for(var t=this._w,n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=t[c-3]^t[c-8]^t[c-14]^t[c-16];for(var u=0;u<80;++u){var p=~~(u/20),m=l(n)+f(p,r,i,o)+s+t[u]+a[p]|0;s=o,o=i,i=d(r),r=n,n=m}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},c.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e},t.exports=c})),J=n(((e,t)=>{var n=u(),r=D(),i=s().Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=Array(64);function c(){this.init(),this._w=o,r.call(this,64,56)}n(c,r),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function l(e,t,n){return n^e&(t^n)}function d(e,t,n){return e&t|n&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function m(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function h(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}c.prototype._update=function(e){for(var t=this._w,n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=this._f|0,u=this._g|0,g=this._h|0,_=0;_<16;++_)t[_]=e.readInt32BE(_*4);for(;_<64;++_)t[_]=h(t[_-2])+t[_-7]+m(t[_-15])+t[_-16]|0;for(var v=0;v<64;++v){var y=g+p(s)+l(s,c,u)+a[v]+t[v]|0,b=f(n)+d(n,r,i)|0;g=u,u=c,c=s,s=o+y|0,o=i,i=r,r=n,n=y+b|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=c+this._f|0,this._g=u+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=c})),de=n(((e,t)=>{var n=u(),r=J(),i=D(),a=s().Buffer,o=Array(64);function c(){this.init(),this._w=o,i.call(this,64,56)}n(c,r),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=c})),fe=n(((e,t)=>{var n=u(),r=D(),i=s().Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=Array(160);function c(){this.init(),this._w=o,r.call(this,128,112)}n(c,r),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function l(e,t,n){return n^e&(t^n)}function d(e,t,n){return e&t|n&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function m(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function _(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return+(e>>>0<t>>>0)}c.prototype._update=function(e){for(var t=this._w,n=this._ah|0,r=this._bh|0,i=this._ch|0,o=this._dh|0,s=this._eh|0,c=this._fh|0,u=this._gh|0,y=this._hh|0,b=this._al|0,x=this._bl|0,S=this._cl|0,C=this._dl|0,w=this._el|0,T=this._fl|0,E=this._gl|0,D=this._hl|0,O=0;O<32;O+=2)t[O]=e.readInt32BE(O*4),t[O+1]=e.readInt32BE(O*4+4);for(;O<160;O+=2){var k=t[O-30],A=t[O-30+1],ee=m(k,A),j=h(A,k);k=t[O-4],A=t[O-4+1];var M=g(k,A),te=_(A,k),N=t[O-14],P=t[O-14+1],ne=t[O-32],F=t[O-32+1],I=j+P|0,re=ee+N+v(I,j)|0;I=I+te|0,re=re+M+v(I,te)|0,I=I+F|0,re=re+ne+v(I,F)|0,t[O]=re,t[O+1]=I}for(var L=0;L<160;L+=2){re=t[L],I=t[L+1];var R=d(n,r,i),ie=d(b,x,S),z=f(n,b),B=f(b,n),ae=p(s,w),V=p(w,s),H=a[L],oe=a[L+1],se=l(s,c,u),U=l(w,T,E),ce=D+V|0,W=y+ae+v(ce,D)|0;ce=ce+U|0,W=W+se+v(ce,U)|0,ce=ce+oe|0,W=W+H+v(ce,oe)|0,ce=ce+I|0,W=W+re+v(ce,I)|0;var G=B+ie|0,le=z+R+v(G,B)|0;y=u,D=E,u=c,E=T,c=s,T=w,w=C+ce|0,s=o+W+v(w,C)|0,o=i,C=S,i=r,S=x,r=n,x=b,b=ce+G|0,n=W+le+v(b,ce)|0}this._al=this._al+b|0,this._bl=this._bl+x|0,this._cl=this._cl+S|0,this._dl=this._dl+C|0,this._el=this._el+w|0,this._fl=this._fl+T|0,this._gl=this._gl+E|0,this._hl=this._hl+D|0,this._ah=this._ah+n+v(this._al,b)|0,this._bh=this._bh+r+v(this._bl,x)|0,this._ch=this._ch+i+v(this._cl,S)|0,this._dh=this._dh+o+v(this._dl,C)|0,this._eh=this._eh+s+v(this._el,w)|0,this._fh=this._fh+c+v(this._fl,T)|0,this._gh=this._gh+u+v(this._gl,E)|0,this._hh=this._hh+y+v(this._hl,D)|0},c.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=c})),pe=n(((e,t)=>{var n=u(),r=fe(),i=D(),a=s().Buffer,o=Array(160);function c(){this.init(),this._w=o,i.call(this,128,112)}n(c,r),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=c})),me=n(((e,t)=>{t.exports=function(e){var n=e.toLowerCase(),r=t.exports[n];if(!r)throw Error(n+` is not supported (we accept pull requests)`);return new r},t.exports.sha=ue(),t.exports.sha1=O(),t.exports.sha224=de(),t.exports.sha256=J(),t.exports.sha384=pe(),t.exports.sha512=fe()})),Y=n(((e,t)=>{var n=s().Buffer,r=x().Transform,i=l().StringDecoder,a=u(),o=E();function c(e){r.call(this),this.hashMode=typeof e==`string`,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&=(this.__final=this._final,null),this._decoder=null,this._encoding=null}a(c,r),c.prototype.update=function(e,t,n){var r=o(e,t),i=this._update(r);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},c.prototype.setAutoPadding=function(){},c.prototype.getAuthTag=function(){throw Error(`trying to get auth tag in unsupported state`)},c.prototype.setAuthTag=function(){throw Error(`trying to set auth tag in unsupported state`)},c.prototype.setAAD=function(){throw Error(`trying to set aad in unsupported state`)},c.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},c.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},c.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},c.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new i(t),this._encoding=t),this._encoding!==t)throw Error(`can’t switch encodings`);var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},t.exports=c})),X=n(((e,t)=>{var n=u(),r=ne(),i=q(),a=me(),o=Y();function s(e){o.call(this,`digest`),this._hash=e}n(s,o),s.prototype._update=function(e){this._hash.update(e)},s.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return e=e.toLowerCase(),e===`md5`?new r:e===`rmd160`||e===`ripemd160`?new i:new s(a(e))}})),Z=n(((e,t)=>{var n=u(),r=s().Buffer,i=Y(),a=r.alloc(128),o=64;function c(e,t){i.call(this,`digest`),typeof t==`string`&&(t=r.from(t)),this._alg=e,this._key=t,t.length>o?t=e(t):t.length<o&&(t=r.concat([t,a],o));for(var n=this._ipad=r.allocUnsafe(o),s=this._opad=r.allocUnsafe(o),c=0;c<o;c++)n[c]=t[c]^54,s[c]=t[c]^92;this._hash=[n]}n(c,i),c.prototype._update=function(e){this._hash.push(e)},c.prototype._final=function(){var e=this._alg(r.concat(this._hash));return this._alg(r.concat([this._opad,e]))},t.exports=c})),he=n(((e,t)=>{var n=ne();t.exports=function(e){return new n().update(e).digest()}})),ge=n(((e,t)=>{var n=u(),r=Z(),i=Y(),a=s().Buffer,o=he(),c=q(),l=me(),d=a.alloc(128);function f(e,t){i.call(this,`digest`),typeof t==`string`&&(t=a.from(t));var n=e===`sha512`||e===`sha384`?128:64;this._alg=e,this._key=t,t.length>n?t=(e===`rmd160`?new c:l(e)).update(t).digest():t.length<n&&(t=a.concat([t,d],n));for(var r=this._ipad=a.allocUnsafe(n),o=this._opad=a.allocUnsafe(n),s=0;s<n;s++)r[s]=t[s]^54,o[s]=t[s]^92;this._hash=e===`rmd160`?new c:l(e),this._hash.update(r)}n(f,i),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest();return(this._alg===`rmd160`?new c:l(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return e=e.toLowerCase(),e===`rmd160`||e===`ripemd160`?new f(`rmd160`,t):e===`md5`?new r(o,t):new f(e,t)}})),_e=n(((e,t)=>{t.exports={sha224WithRSAEncryption:{sign:`rsa`,hash:`sha224`,id:`302d300d06096086480165030402040500041c`},"RSA-SHA224":{sign:`ecdsa/rsa`,hash:`sha224`,id:`302d300d06096086480165030402040500041c`},sha256WithRSAEncryption:{sign:`rsa`,hash:`sha256`,id:`3031300d060960864801650304020105000420`},"RSA-SHA256":{sign:`ecdsa/rsa`,hash:`sha256`,id:`3031300d060960864801650304020105000420`},sha384WithRSAEncryption:{sign:`rsa`,hash:`sha384`,id:`3041300d060960864801650304020205000430`},"RSA-SHA384":{sign:`ecdsa/rsa`,hash:`sha384`,id:`3041300d060960864801650304020205000430`},sha512WithRSAEncryption:{sign:`rsa`,hash:`sha512`,id:`3051300d060960864801650304020305000440`},"RSA-SHA512":{sign:`ecdsa/rsa`,hash:`sha512`,id:`3051300d060960864801650304020305000440`},"RSA-SHA1":{sign:`rsa`,hash:`sha1`,id:`3021300906052b0e03021a05000414`},"ecdsa-with-SHA1":{sign:`ecdsa`,hash:`sha1`,id:``},sha256:{sign:`ecdsa/rsa`,hash:`sha256`,id:`3031300d060960864801650304020105000420`},sha224:{sign:`ecdsa/rsa`,hash:`sha224`,id:`302d300d06096086480165030402040500041c`},sha384:{sign:`ecdsa/rsa`,hash:`sha384`,id:`3041300d060960864801650304020205000430`},sha512:{sign:`ecdsa/rsa`,hash:`sha512`,id:`3051300d060960864801650304020305000440`},"DSA-SHA":{sign:`dsa`,hash:`sha1`,id:``},"DSA-SHA1":{sign:`dsa`,hash:`sha1`,id:``},DSA:{sign:`dsa`,hash:`sha1`,id:``},"DSA-WITH-SHA224":{sign:`dsa`,hash:`sha224`,id:``},"DSA-SHA224":{sign:`dsa`,hash:`sha224`,id:``},"DSA-WITH-SHA256":{sign:`dsa`,hash:`sha256`,id:``},"DSA-SHA256":{sign:`dsa`,hash:`sha256`,id:``},"DSA-WITH-SHA384":{sign:`dsa`,hash:`sha384`,id:``},"DSA-SHA384":{sign:`dsa`,hash:`sha384`,id:``},"DSA-WITH-SHA512":{sign:`dsa`,hash:`sha512`,id:``},"DSA-SHA512":{sign:`dsa`,hash:`sha512`,id:``},"DSA-RIPEMD160":{sign:`dsa`,hash:`rmd160`,id:``},ripemd160WithRSA:{sign:`rsa`,hash:`rmd160`,id:`3021300906052b2403020105000414`},"RSA-RIPEMD160":{sign:`rsa`,hash:`rmd160`,id:`3021300906052b2403020105000414`},md5WithRSAEncryption:{sign:`rsa`,hash:`md5`,id:`3020300c06082a864886f70d020505000410`},"RSA-MD5":{sign:`rsa`,hash:`md5`,id:`3020300c06082a864886f70d020505000410`}}})),ve=n(((e,t)=>{t.exports=_e()})),ye=n(((e,t)=>{var n=isFinite,r=2**30-1;t.exports=function(e,t){if(typeof e!=`number`)throw TypeError(`Iterations not a number`);if(e<0||!n(e))throw TypeError(`Bad iterations`);if(typeof t!=`number`)throw TypeError(`Key length not a number`);if(t<0||t>r||t!==t)throw TypeError(`Bad key length`);return t+0}})),be=n(((t,n)=>{var r=e(a());n.exports=globalThis.process&&globalThis.process.browser?`utf-8`:globalThis.process&&globalThis.process.version?parseInt(r.default.version.split(`.`)[0].slice(1),10)>=6?`utf-8`:`binary`:`utf-8`})),xe=n(((e,t)=>{var n=s().Buffer,r=E(),i=typeof Uint8Array<`u`,a=i&&typeof ArrayBuffer<`u`&&ArrayBuffer.isView;t.exports=function(e,t,o){if(typeof e==`string`||n.isBuffer(e)||i&&e instanceof Uint8Array||a&&a(e))return r(e,t);throw TypeError(o+` must be a string, a Buffer, a Uint8Array, or a DataView`)}})),Se=n(((e,t)=>{var n=he(),r=q(),i=me(),a=s().Buffer,o=ye(),c=be(),l=xe(),u=a.alloc(128),d={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},f={__proto__:null,"sha-1":`sha1`,"sha-224":`sha224`,"sha-256":`sha256`,"sha-384":`sha384`,"sha-512":`sha512`,"ripemd-160":`ripemd160`};function p(e){return new r().update(e).digest()}function m(e){function t(t){return i(e).update(t).digest()}return e===`rmd160`||e===`ripemd160`?p:e===`md5`?n:t}function h(e,t,n){var r=m(e),i=e===`sha512`||e===`sha384`?128:64;t.length>i?t=r(t):t.length<i&&(t=a.concat([t,u],i));for(var o=a.allocUnsafe(i+d[e]),s=a.allocUnsafe(i+d[e]),c=0;c<i;c++)o[c]=t[c]^54,s[c]=t[c]^92;var l=a.allocUnsafe(i+n+4);o.copy(l,0,0,i),this.ipad1=l,this.ipad2=o,this.opad=s,this.alg=e,this.blocksize=i,this.hash=r,this.size=d[e]}h.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)};function g(e,t,n,r,i){r=o(n,r),e=l(e,c,`Password`),t=l(t,c,`Salt`);var s=(i||`sha1`).toLowerCase(),u=f[s]||s,p=d[u];if(typeof p!=`number`||!p)throw TypeError(`Digest algorithm not supported: `+i);var m=new h(u,e,t.length),g=a.allocUnsafe(r),_=a.allocUnsafe(t.length+4);t.copy(_,0,0,t.length);for(var v=0,y=p,b=Math.ceil(r/y),x=1;x<=b;x++){_.writeUInt32BE(x,t.length);for(var S=m.run(_,m.ipad1),C=S,w=1;w<n;w++){C=m.run(C,m.ipad2);for(var T=0;T<y;T++)S[T]^=C[T]}S.copy(g,v),v+=y}return g}t.exports=g})),Ce=n(((e,t)=>{var n=s().Buffer,r=ye(),i=be(),a=Se(),o=xe(),c,l=globalThis.crypto&&globalThis.crypto.subtle,u={sha:`SHA-1`,"sha-1":`SHA-1`,sha1:`SHA-1`,sha256:`SHA-256`,"sha-256":`SHA-256`,sha384:`SHA-384`,"sha-384":`SHA-384`,"sha-512":`SHA-512`,sha512:`SHA-512`},d=[],f;function p(){return f||(f=globalThis.process&&globalThis.process.nextTick?globalThis.process.nextTick:globalThis.queueMicrotask?globalThis.queueMicrotask:globalThis.setImmediate?globalThis.setImmediate:globalThis.setTimeout,f)}function m(e,t,r,i,a){return l.importKey(`raw`,e,{name:`PBKDF2`},!1,[`deriveBits`]).then(function(e){return l.deriveBits({name:`PBKDF2`,salt:t,iterations:r,hash:{name:a}},e,i<<3)}).then(function(e){return n.from(e)})}function h(e){if(globalThis.process&&!globalThis.process.browser||!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(d[e]!==void 0)return d[e];c||=n.alloc(8);var t=m(c,c,10,128,e).then(function(){return!0},function(){return!1});return d[e]=t,t}function g(e,t){e.then(function(e){p()(function(){t(null,e)})},function(e){p()(function(){t(e)})})}t.exports=function(e,t,n,s,c,l){if(typeof c==`function`&&(l=c,c=void 0),s=r(n,s),e=o(e,i,`Password`),t=o(t,i,`Salt`),typeof l!=`function`)throw Error(`No callback provided to pbkdf2`);c||=`sha1`;var d=u[c.toLowerCase()];if(!d||typeof globalThis.Promise!=`function`){p()(function(){var r;try{r=a(e,t,n,s,c)}catch(e){l(e);return}l(null,r)});return}g(h(d).then(function(r){return r?m(e,t,n,s,d):a(e,t,n,s,c)}),l)}})),we=n((e=>{e.pbkdf2=Ce(),e.pbkdf2Sync=Se()})),Te=n((e=>{e.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},e.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=t&255},e.ip=function(e,t,n,r){for(var i=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1;for(var s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1}n[r+0]=i>>>0,n[r+1]=a>>>0},e.rip=function(e,t,n,r){for(var i=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.pc1=function(e,t,n,r){for(var i=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var t=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(e,n,r,i){for(var a=0,o=0,s=t.length>>>1,c=0;c<s;c++)a<<=1,a|=e>>>t[c]&1;for(var c=s;c<t.length;c++)o<<=1,o|=n>>>t[c]&1;r[i+0]=a>>>0,r[i+1]=o>>>0},e.expand=function(e,t,n){var r=0,i=0;r=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=e>>>a&63;for(var a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(e&31)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(e,t){for(var r=0,i=0;i<4;i++){var a=e>>>18-i*6&63,o=n[i*64+a];r<<=4,r|=o}for(var i=0;i<4;i++){var a=t>>>18-i*6&63,o=n[256+i*64+a];r<<=4,r|=o}return r>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(e){for(var t=0,n=0;n<r.length;n++)t<<=1,t|=e>>>r[n]&1;return t>>>0},e.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r=`0`+r;for(var i=[],a=0;a<t;a+=n)i.push(r.slice(a,a+n));return i.join(` `)}})),Ee=n(((e,t)=>{t.exports=n;function n(e,t){if(!e)throw Error(t||`Assertion failed`)}n.equal=function(e,t,n){if(e!=t)throw Error(n||`Assertion failed: `+e+` != `+t)}})),De=n(((e,t)=>{var n=Ee();function r(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=Array(this.blockSize),this.bufferOff=0,this.padding=e.padding!==!1}t.exports=r,r.prototype._init=function(){},r.prototype.update=function(e){return e.length===0?[]:this.type===`decrypt`?this._updateDecrypt(e):this._updateEncrypt(e)},r.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},r.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},r.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=Array(r*this.blockSize);this.bufferOff!==0&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},r.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},r.prototype.final=function(e){var t;e&&(t=this.update(e));var n=this.type===`encrypt`?this._finalEncrypt():this._finalDecrypt();return t?t.concat(n):n},r.prototype._pad=function(e,t){if(t===0)return!1;for(;t<e.length;)e[t++]=0;return!0},r.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=Array(this.blockSize);return this._update(this.buffer,0,e,0),e},r.prototype._unpad=function(e){return e},r.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,`Not enough data to decrypt`);var e=Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}})),Oe=n(((e,t)=>{var n=Ee(),r=u(),i=Te(),a=De();function o(){this.tmp=[,,],this.keys=null}function s(e){a.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}r(s,a),t.exports=s,s.create=function(e){return new s(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(e,t){e.keys=Array(32),n.equal(t.length,this.blockSize,`Invalid key length`);var r=i.readUInt32BE(t,0),a=i.readUInt32BE(t,4);i.pc1(r,a,e.tmp,0),r=e.tmp[0],a=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var s=c[o>>>1];r=i.r28shl(r,s),a=i.r28shl(a,s),i.pc2(r,a,e.keys,o)}},s.prototype._update=function(e,t,n,r){var a=this._desState,o=i.readUInt32BE(e,t),s=i.readUInt32BE(e,t+4);i.ip(o,s,a.tmp,0),o=a.tmp[0],s=a.tmp[1],this.type===`encrypt`?this._encrypt(a,o,s,a.tmp,0):this._decrypt(a,o,s,a.tmp,0),o=a.tmp[0],s=a.tmp[1],i.writeUInt32BE(n,o,r),i.writeUInt32BE(n,s,r+4)},s.prototype._pad=function(e,t){if(this.padding===!1)return!1;for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},s.prototype._unpad=function(e){if(this.padding===!1)return e;for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},s.prototype._encrypt=function(e,t,n,r,a){for(var o=t,s=n,c=0;c<e.keys.length;c+=2){var l=e.keys[c],u=e.keys[c+1];i.expand(s,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];var d=i.substitute(l,u),f=i.permute(d),p=s;s=(o^f)>>>0,o=p}i.rip(s,o,r,a)},s.prototype._decrypt=function(e,t,n,r,a){for(var o=n,s=t,c=e.keys.length-2;c>=0;c-=2){var l=e.keys[c],u=e.keys[c+1];i.expand(o,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];var d=i.substitute(l,u),f=i.permute(d),p=o;o=(s^f)>>>0,s=p}i.rip(o,s,r,a)}})),ke=n((e=>{var t=Ee(),n=u(),r={};function i(e){t.equal(e.length,8,`Invalid IV length`),this.iv=Array(8);for(var n=0;n<this.iv.length;n++)this.iv[n]=e[n]}function a(e){function t(t){e.call(this,t),this._cbcInit()}n(t,e);for(var i=Object.keys(r),a=0;a<i.length;a++){var o=i[a];t.prototype[o]=r[o]}return t.create=function(e){return new t(e)},t}e.instantiate=a,r._cbcInit=function(){var e=new i(this.options.iv);this._cbcState=e},r._update=function(e,t,n,r){var i=this._cbcState,a=this.constructor.super_.prototype,o=i.iv;if(this.type===`encrypt`){for(var s=0;s<this.blockSize;s++)o[s]^=e[t+s];a._update.call(this,o,0,n,r);for(var s=0;s<this.blockSize;s++)o[s]=n[r+s]}else{a._update.call(this,e,t,n,r);for(var s=0;s<this.blockSize;s++)n[r+s]^=o[s];for(var s=0;s<this.blockSize;s++)o[s]=e[t+s]}}})),Ae=n(((e,t)=>{var n=Ee(),r=u(),i=De(),a=Oe();function o(e,t){n.equal(t.length,24,`Invalid key length`);var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);e===`encrypt`?this.ciphers=[a.create({type:`encrypt`,key:r}),a.create({type:`decrypt`,key:i}),a.create({type:`encrypt`,key:o})]:this.ciphers=[a.create({type:`decrypt`,key:o}),a.create({type:`encrypt`,key:i}),a.create({type:`decrypt`,key:r})]}function s(e){i.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}r(s,i),t.exports=s,s.create=function(e){return new s(e)},s.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},s.prototype._pad=a.prototype._pad,s.prototype._unpad=a.prototype._unpad})),je=n((e=>{e.utils=Te(),e.Cipher=De(),e.DES=Oe(),e.CBC=ke(),e.EDE=Ae()})),Me=n(((e,t)=>{var n=Y(),r=je(),i=u(),a=s().Buffer,o={"des-ede3-cbc":r.CBC.instantiate(r.EDE),"des-ede3":r.EDE,"des-ede-cbc":r.CBC.instantiate(r.EDE),"des-ede":r.EDE,"des-cbc":r.CBC.instantiate(r.DES),"des-ecb":r.DES};o.des=o[`des-cbc`],o.des3=o[`des-ede3-cbc`],t.exports=c,i(c,n);function c(e){n.call(this);var t=e.mode.toLowerCase(),r=o[t],i=e.decrypt?`decrypt`:`encrypt`,s=e.key;a.isBuffer(s)||(s=a.from(s)),(t===`des-ede`||t===`des-ede-cbc`)&&(s=a.concat([s,s.slice(0,8)]));var c=e.iv;a.isBuffer(c)||(c=a.from(c)),this._des=r.create({key:s,iv:c,type:i})}c.prototype._update=function(e){return a.from(this._des.update(e))},c.prototype._final=function(){return a.from(this._des.final())}})),Ne=n((e=>{e.encrypt=function(e,t){return e._cipher.encryptBlock(t)},e.decrypt=function(e,t){return e._cipher.decryptBlock(t)}})),Pe=n(((e,t)=>{var n=o();t.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n.Buffer(r),a=0;a<r;++a)i[a]=e[a]^t[a];return i}})),Fe=n((e=>{var t=Pe();e.encrypt=function(e,n){var r=t(n,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},e.decrypt=function(e,n){var r=e._prev;return e._prev=n,t(e._cipher.decryptBlock(n),r)}})),Q=n((e=>{var t=s().Buffer,n=Pe();function r(e,r,i){var a=r.length,o=n(r,e._cache);return e._cache=e._cache.slice(a),e._prev=t.concat([e._prev,i?r:o]),o}e.encrypt=function(e,n,i){for(var a=t.allocUnsafe(0),o;n.length;)if(e._cache.length===0&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=t.allocUnsafe(0)),e._cache.length<=n.length)o=e._cache.length,a=t.concat([a,r(e,n.slice(0,o),i)]),n=n.slice(o);else{a=t.concat([a,r(e,n,i)]);break}return a}})),Ie=n((e=>{var t=s().Buffer;function n(e,n,r){var i=e._cipher.encryptBlock(e._prev)[0]^n;return e._prev=t.concat([e._prev.slice(1),t.from([r?n:i])]),i}e.encrypt=function(e,r,i){for(var a=r.length,o=t.allocUnsafe(a),s=-1;++s<a;)o[s]=n(e,r[s],i);return o}})),Le=n((e=>{var t=s().Buffer;function n(e,t,n){for(var i,a=-1,o=8,s=0,c,l;++a<o;)i=e._cipher.encryptBlock(e._prev),c=t&1<<7-a?128:0,l=i[0]^c,s+=(l&128)>>a%8,e._prev=r(e._prev,n?c:l);return s}function r(e,n){var r=e.length,i=-1,a=t.allocUnsafe(e.length);for(e=t.concat([e,t.from([n])]);++i<r;)a[i]=e[i]<<1|e[i+1]>>7;return a}e.encrypt=function(e,r,i){for(var a=r.length,o=t.allocUnsafe(a),s=-1;++s<a;)o[s]=n(e,r[s],i);return o}})),Re=n((e=>{var t=o(),n=Pe();function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}e.encrypt=function(e,i){for(;e._cache.length<i.length;)e._cache=t.Buffer.concat([e._cache,r(e)]);var a=e._cache.slice(0,i.length);return e._cache=e._cache.slice(i.length),n(i,a)}})),ze=n(((e,t)=>{function n(e){for(var t=e.length,n;t--;)if(n=e.readUInt8(t),n===255)e.writeUInt8(0,t);else{n++,e.writeUInt8(n,t);break}}t.exports=n})),Be=n((e=>{var t=Pe(),n=s().Buffer,r=ze();function i(e){var t=e._cipher.encryptBlockRaw(e._prev);return r(e._prev),t}var a=16;e.encrypt=function(e,r){var o=Math.ceil(r.length/a),s=e._cache.length;e._cache=n.concat([e._cache,n.allocUnsafe(o*a)]);for(var c=0;c<o;c++){var l=i(e),u=s+c*a;e._cache.writeUInt32BE(l[0],u+0),e._cache.writeUInt32BE(l[1],u+4),e._cache.writeUInt32BE(l[2],u+8),e._cache.writeUInt32BE(l[3],u+12)}var d=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),t(r,d)}})),Ve=n(((e,t)=>{t.exports={"aes-128-ecb":{cipher:`AES`,key:128,iv:0,mode:`ECB`,type:`block`},"aes-192-ecb":{cipher:`AES`,key:192,iv:0,mode:`ECB`,type:`block`},"aes-256-ecb":{cipher:`AES`,key:256,iv:0,mode:`ECB`,type:`block`},"aes-128-cbc":{cipher:`AES`,key:128,iv:16,mode:`CBC`,type:`block`},"aes-192-cbc":{cipher:`AES`,key:192,iv:16,mode:`CBC`,type:`block`},"aes-256-cbc":{cipher:`AES`,key:256,iv:16,mode:`CBC`,type:`block`},aes128:{cipher:`AES`,key:128,iv:16,mode:`CBC`,type:`block`},aes192:{cipher:`AES`,key:192,iv:16,mode:`CBC`,type:`block`},aes256:{cipher:`AES`,key:256,iv:16,mode:`CBC`,type:`block`},"aes-128-cfb":{cipher:`AES`,key:128,iv:16,mode:`CFB`,type:`stream`},"aes-192-cfb":{cipher:`AES`,key:192,iv:16,mode:`CFB`,type:`stream`},"aes-256-cfb":{cipher:`AES`,key:256,iv:16,mode:`CFB`,type:`stream`},"aes-128-cfb8":{cipher:`AES`,key:128,iv:16,mode:`CFB8`,type:`stream`},"aes-192-cfb8":{cipher:`AES`,key:192,iv:16,mode:`CFB8`,type:`stream`},"aes-256-cfb8":{cipher:`AES`,key:256,iv:16,mode:`CFB8`,type:`stream`},"aes-128-cfb1":{cipher:`AES`,key:128,iv:16,mode:`CFB1`,type:`stream`},"aes-192-cfb1":{cipher:`AES`,key:192,iv:16,mode:`CFB1`,type:`stream`},"aes-256-cfb1":{cipher:`AES`,key:256,iv:16,mode:`CFB1`,type:`stream`},"aes-128-ofb":{cipher:`AES`,key:128,iv:16,mode:`OFB`,type:`stream`},"aes-192-ofb":{cipher:`AES`,key:192,iv:16,mode:`OFB`,type:`stream`},"aes-256-ofb":{cipher:`AES`,key:256,iv:16,mode:`OFB`,type:`stream`},"aes-128-ctr":{cipher:`AES`,key:128,iv:16,mode:`CTR`,type:`stream`},"aes-192-ctr":{cipher:`AES`,key:192,iv:16,mode:`CTR`,type:`stream`},"aes-256-ctr":{cipher:`AES`,key:256,iv:16,mode:`CTR`,type:`stream`},"aes-128-gcm":{cipher:`AES`,key:128,iv:12,mode:`GCM`,type:`auth`},"aes-192-gcm":{cipher:`AES`,key:192,iv:12,mode:`GCM`,type:`auth`},"aes-256-gcm":{cipher:`AES`,key:256,iv:12,mode:`GCM`,type:`auth`}}})),He=n(((e,t)=>{var n={ECB:Ne(),CBC:Fe(),CFB:Q(),CFB8:Ie(),CFB1:Le(),OFB:Re(),CTR:Be(),GCM:Be()},r=Ve();for(var i in r)r[i].module=n[r[i].mode];t.exports=r})),Ue=n(((e,t)=>{var n=s().Buffer;function r(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(i*4);return r}function i(e){for(var t=0;t<e.length;e++)e[t]=0}function a(e,t,n,r,i){for(var a=n[0],o=n[1],s=n[2],c=n[3],l=e[0]^t[0],u=e[1]^t[1],d=e[2]^t[2],f=e[3]^t[3],p,m,h,g,_=4,v=1;v<i;v++)p=a[l>>>24]^o[u>>>16&255]^s[d>>>8&255]^c[f&255]^t[_++],m=a[u>>>24]^o[d>>>16&255]^s[f>>>8&255]^c[l&255]^t[_++],h=a[d>>>24]^o[f>>>16&255]^s[l>>>8&255]^c[u&255]^t[_++],g=a[f>>>24]^o[l>>>16&255]^s[u>>>8&255]^c[d&255]^t[_++],l=p,u=m,d=h,f=g;return p=(r[l>>>24]<<24|r[u>>>16&255]<<16|r[d>>>8&255]<<8|r[f&255])^t[_++],m=(r[u>>>24]<<24|r[d>>>16&255]<<16|r[f>>>8&255]<<8|r[l&255])^t[_++],h=(r[d>>>24]<<24|r[f>>>16&255]<<16|r[l>>>8&255]<<8|r[u&255])^t[_++],g=(r[f>>>24]<<24|r[l>>>16&255]<<16|r[u>>>8&255]<<8|r[d&255])^t[_++],p>>>=0,m>>>=0,h>>>=0,g>>>=0,[p,m,h,g]}var o=[0,1,2,4,8,16,32,64,128,27,54],c=(function(){for(var e=Array(256),t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,c=0;c<256;++c){var l=s^s<<1^s<<2^s<<3^s<<4;l=l>>>8^l&255^99,n[o]=l,r[l]=o;var u=e[o],d=e[u],f=e[d],p=e[l]*257^l*16843008;i[0][o]=p<<24|p>>>8,i[1][o]=p<<16|p>>>16,i[2][o]=p<<8|p>>>24,i[3][o]=p,p=f*16843009^d*65537^u*257^o*16843008,a[0][l]=p<<24|p>>>8,a[1][l]=p<<16|p>>>16,a[2][l]=p<<8|p>>>24,a[3][l]=p,o===0?o=s=1:(o=u^e[e[e[f^u]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:a}})();function l(e){this._key=r(e),this._reset()}l.blockSize=16,l.keySize=256/8,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=(n+1)*4,i=[],a=0;a<t;a++)i[a]=e[a];for(a=t;a<r;a++){var s=i[a-1];a%t===0?(s=s<<8|s>>>24,s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[s&255],s^=o[a/t|0]<<24):t>6&&a%t===4&&(s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[s&255]),i[a]=i[a-t]^s}for(var l=[],u=0;u<r;u++){var d=r-u,f=i[d-(u%4?0:4)];u<4||d<=4?l[u]=f:l[u]=c.INV_SUB_MIX[0][c.SBOX[f>>>24]]^c.INV_SUB_MIX[1][c.SBOX[f>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[f>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[f&255]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return e=r(e),a(e,this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},l.prototype.decryptBlock=function(e){e=r(e);var t=e[1];e[1]=e[3],e[3]=t;var i=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(i[0],0),o.writeUInt32BE(i[3],4),o.writeUInt32BE(i[2],8),o.writeUInt32BE(i[1],12),o},l.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},t.exports.AES=l})),We=n(((e,t)=>{var n=s().Buffer,r=n.alloc(16,0);function i(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function a(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e=i(this.h),t=[0,0,0,0],n,r,o,s=-1;++s<128;){for(r=(this.state[~~(s/8)]&1<<7-s%8)!=0,r&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),o=(e[3]&1)!=0,n=3;n>0;n--)e[n]=e[n]>>>1|(e[n-1]&1)<<31;e[0]>>>=1,o&&(e[0]^=225<<24)}this.state=a(t)},o.prototype.update=function(e){this.cache=n.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,r],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=o})),Ge=n(((e,t)=>{var n=Ue(),r=s().Buffer,i=Y(),a=u(),o=We(),c=Pe(),l=ze();function d(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}function f(e,t,n){if(t.length===12)return e._finID=r.concat([t,r.from([0,0,0,1])]),r.concat([t,r.from([0,0,0,2])]);var i=new o(n),a=t.length,s=a%16;i.update(t),s&&(s=16-s,i.update(r.alloc(s,0))),i.update(r.alloc(8,0));var c=a*8,u=r.alloc(8);u.writeUIntBE(c,0,8),i.update(u),e._finID=i.state;var d=r.from(e._finID);return l(d),d}function p(e,t,a,s){i.call(this);var c=r.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(c);this._ghash=new o(l),a=f(this,a,l),this._prev=r.from(a),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(p,i),p.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},p.prototype._final=function(){if(this._decrypt&&!this._authTag)throw Error(`Unsupported state or unable to authenticate data`);var e=c(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&d(e,this._authTag))throw Error(`Unsupported state or unable to authenticate data`);this._authTag=e,this._cipher.scrub()},p.prototype.getAuthTag=function(){if(this._decrypt||!r.isBuffer(this._authTag))throw Error(`Attempting to get auth tag in unsupported state`);return this._authTag},p.prototype.setAuthTag=function(e){if(!this._decrypt)throw Error(`Attempting to set auth tag in unsupported state`);this._authTag=e},p.prototype.setAAD=function(e){if(this._called)throw Error(`Attempting to set AAD in unsupported state`);this._ghash.update(e),this._alen+=e.length},t.exports=p})),Ke=n(((e,t)=>{var n=Ue(),r=s().Buffer,i=Y(),a=u();function o(e,t,a,o){i.call(this),this._cipher=new n.AES(t),this._prev=r.from(a),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=o,this._mode=e}a(o,i),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},t.exports=o})),qe=n(((e,t)=>{var n=s().Buffer,r=ne();function i(e,t,i,a){if(n.isBuffer(e)||(e=n.from(e,`binary`)),t&&(n.isBuffer(t)||(t=n.from(t,`binary`)),t.length!==8))throw RangeError(`salt should be Buffer with 8 byte length`);for(var o=i/8,s=n.alloc(o),c=n.alloc(a||0),l=n.alloc(0);o>0||a>0;){var u=new r;u.update(l),u.update(e),t&&u.update(t),l=u.digest();var d=0;if(o>0){var f=s.length-o;d=Math.min(o,l.length),l.copy(s,f,0,d),o-=d}if(d<l.length&&a>0){var p=c.length-a,m=Math.min(a,l.length-d);l.copy(c,p,d,d+m),a-=m}}return l.fill(0),{key:s,iv:c}}t.exports=i})),Je=n((e=>{var t=He(),n=Ge(),r=s().Buffer,i=Ke(),a=Y(),o=Ue(),c=qe(),l=u();function d(e,t,n){a.call(this),this._cache=new p,this._cipher=new o.AES(t),this._prev=r.from(n),this._mode=e,this._autopadding=!0}l(d,a),d.prototype._update=function(e){this._cache.add(e);for(var t,n,i=[];t=this._cache.get();)n=this._mode.encrypt(this,t),i.push(n);return r.concat(i)};var f=r.alloc(16,16);d.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),Error(`data not multiple of block length`)},d.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function p(){this.cache=r.allocUnsafe(0)}p.prototype.add=function(e){this.cache=r.concat([this.cache,e])},p.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},p.prototype.flush=function(){for(var e=16-this.cache.length,t=r.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return r.concat([this.cache,t])};function m(e,a,o){var s=t[e.toLowerCase()];if(!s)throw TypeError(`invalid suite type`);if(typeof a==`string`&&(a=r.from(a)),a.length!==s.key/8)throw TypeError(`invalid key length `+a.length);if(typeof o==`string`&&(o=r.from(o)),s.mode!==`GCM`&&o.length!==s.iv)throw TypeError(`invalid iv length `+o.length);return s.type===`stream`?new i(s.module,a,o):s.type===`auth`?new n(s.module,a,o):new d(s.module,a,o)}function h(e,n){var r=t[e.toLowerCase()];if(!r)throw TypeError(`invalid suite type`);var i=c(n,!1,r.key,r.iv);return m(e,i.key,i.iv)}e.createCipheriv=m,e.createCipher=h})),Ye=n((e=>{var t=Ge(),n=s().Buffer,r=He(),i=Ke(),a=Y(),o=Ue(),c=qe(),l=u();function d(e,t,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new o.AES(t),this._prev=n.from(r),this._mode=e,this._autopadding=!0}l(d,a),d.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return n.concat(i)},d.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return p(this._mode.decrypt(this,e));if(e)throw Error(`data not multiple of block length`)},d.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function f(){this.cache=n.allocUnsafe(0)}f.prototype.add=function(e){this.cache=n.concat([this.cache,e])},f.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache};function p(e){var t=e[15];if(t<1||t>16)throw Error(`unable to decrypt data`);for(var n=-1;++n<t;)if(e[n+(16-t)]!==t)throw Error(`unable to decrypt data`);if(t!==16)return e.slice(0,16-t)}function m(e,a,o){var s=r[e.toLowerCase()];if(!s)throw TypeError(`invalid suite type`);if(typeof o==`string`&&(o=n.from(o)),s.mode!==`GCM`&&o.length!==s.iv)throw TypeError(`invalid iv length `+o.length);if(typeof a==`string`&&(a=n.from(a)),a.length!==s.key/8)throw TypeError(`invalid key length `+a.length);return s.type===`stream`?new i(s.module,a,o,!0):s.type===`auth`?new t(s.module,a,o,!0):new d(s.module,a,o)}function h(e,t){var n=r[e.toLowerCase()];if(!n)throw TypeError(`invalid suite type`);var i=c(t,!1,n.key,n.iv);return m(e,i.key,i.iv)}e.createDecipher=h,e.createDecipheriv=m})),Xe=n((e=>{var t=Je(),n=Ye(),r=Ve();function i(){return Object.keys(r)}e.createCipher=e.Cipher=t.createCipher,e.createCipheriv=e.Cipheriv=t.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=i})),Ze=n((e=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}})),Qe=n((e=>{var t=Me(),n=Xe(),r=He(),i=Ze(),a=qe();function o(e,t){e=e.toLowerCase();var n,o;if(r[e])n=r[e].key,o=r[e].iv;else if(i[e])n=i[e].key*8,o=i[e].iv;else throw TypeError(`invalid suite type`);var s=a(t,!1,n,o);return c(e,s.key,s.iv)}function s(e,t){e=e.toLowerCase();var n,o;if(r[e])n=r[e].key,o=r[e].iv;else if(i[e])n=i[e].key*8,o=i[e].iv;else throw TypeError(`invalid suite type`);var s=a(t,!1,n,o);return l(e,s.key,s.iv)}function c(e,a,o){if(e=e.toLowerCase(),r[e])return n.createCipheriv(e,a,o);if(i[e])return new t({key:a,iv:o,mode:e});throw TypeError(`invalid suite type`)}function l(e,a,o){if(e=e.toLowerCase(),r[e])return n.createDecipheriv(e,a,o);if(i[e])return new t({key:a,iv:o,mode:e,decrypt:!0});throw TypeError(`invalid suite type`)}function u(){return Object.keys(i).concat(n.getCiphers())}e.createCipher=e.Cipher=o,e.createCipheriv=e.Cipheriv=c,e.createDecipher=e.Decipher=s,e.createDecipheriv=e.Decipheriv=l,e.listCiphers=e.getCiphers=u})),$e=n((()=>{})),et=n(((e,t)=>{(function(e,t){function n(e,t){if(!e)throw Error(t||`Assertion failed`)}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((t===`le`||t===`be`)&&(n=t,t=10),this._init(e||0,t||10,n||`be`))}typeof e==`object`?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;var a;try{a=typeof window<`u`&&window.Buffer!==void 0?window.Buffer:$e().Buffer}catch{}i.isBN=function(e){return e instanceof i||typeof e==`object`&&!!e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if(typeof e==`number`)return this._initNumber(e,t,r);if(typeof e==`object`)return this._initArray(e,t,r);t===`hex`&&(t=16),n(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,``);var i=0;e[0]===`-`&&(i++,this.negative=1),i<e.length&&(t===16?this._parseHex(e,i,r):(this._parseBase(e,t,i),r===`le`&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),r===`le`&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n(typeof e.length==`number`),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if(r===`be`)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if(r===`le`)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()};function o(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function s(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i=0,a=0,o;if(n===`be`)for(r=e.length-1;r>=t;r-=2)o=s(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=s(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this.strip()};function c(e,t,n,r){for(var i=0,a=Math.min(e.length,n),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=r,s>=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(o!==0){var d=1;for(l=c(e,u,e.length,t),u=0;u<o;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},i.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?`<BN-R: `:`<BN: `)+this.toString(16)+`>`};var l=`.0.00.000.0000.00000.000000.0000000.00000000.000000000.0000000000.00000000000.000000000000.0000000000000.00000000000000.000000000000000.0000000000000000.00000000000000000.000000000000000000.0000000000000000000.00000000000000000000.000000000000000000000.0000000000000000000000.00000000000000000000000.000000000000000000000000.0000000000000000000000000`.split(`.`),u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){e||=10,t=t|0||1;var r;if(e===16||e===`hex`){r=``;for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=((s<<i|a)&16777215).toString(16);a=s>>>24-i&16777215,i+=2,i>=26&&(i-=26,o--),r=a!==0||o!==this.length-1?l[6-c.length]+c+r:c+r}for(a!==0&&(r=a.toString(16)+r);r.length%t!==0;)r=`0`+r;return this.negative!==0&&(r=`-`+r),r}if(e===(e|0)&&e>=2&&e<=36){var f=u[e],p=d[e];r=``;var m=this.clone();for(m.negative=0;!m.isZero();){var h=m.modn(p).toString(e);m=m.idivn(p),r=m.isZero()?h+r:l[f-h.length]+h+r}for(this.isZero()&&(r=`0`+r);r.length%t!==0;)r=`0`+r;return this.negative!==0&&(r=`-`+r),r}n(!1,`Base should be between 2 and 36`)},i.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,`Number can only safely store up to 53 bits`),this.negative===0?e:-e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(a!==void 0),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,`byte array longer than desired length`),n(a>0,`Requested array length <= 0`),this.strip();var o=t===`le`,s=new e(a),c,l,u=this.clone();if(o){for(l=0;!u.isZero();l++)c=u.andln(255),u.iushrn(8),s[l]=c;for(;l<a;l++)s[l]=0}else{for(l=0;l<a-i;l++)s[l]=0;for(l=0;!u.isZero();l++)c=u.andln(255),u.iushrn(8),s[a-l-1]=c}return s},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return t&8191||(n+=13,t>>>=13),t&127||(n+=7,t>>>=7),t&15||(n+=4,t>>>=4),t&3||(n+=2,t>>>=2),t&1||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function f(e){for(var t=Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return this.negative===0?this.clone():this.abs().inotn(e).iaddn(1)},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n((this.negative|e.negative)===0),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n((this.negative|e.negative)===0),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n((this.negative|e.negative)===0),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n(typeof e==`number`&&e>=0);var t=Math.ceil(e/26)|0,r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=~this.words[i]&67108863;return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n(typeof e==`number`&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(n.words[a]|0)+(r.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;for(;i!==0&&a<n.length;a++)t=(n.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;if(this.length=n.length,i!==0)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,i;n>0?(r=this,i=e):(r=e,i=this);for(var a=0,o=0;o<i.length;o++)t=(r.words[o]|0)-(i.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;for(;a!==0&&o<r.length;o++)t=(r.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;if(a===0&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=e.words[0]|0,a=t.words[0]|0,o=i*a,s=o&67108863,c=o/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var u=c>>>26,d=c&67108863,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var m=l-p|0;i=e.words[m]|0,a=t.words[p]|0,o=i*a+d,u+=o/67108864|0,d=o&67108863}n.words[l]=d|0,c=u|0}return c===0?n.length--:n.words[l]=c|0,n.strip()}var m=function(e,t,n){var r=e.words,i=t.words,a=n.words,o=0,s,c,l,u=r[0]|0,d=u&8191,f=u>>>13,p=r[1]|0,m=p&8191,h=p>>>13,g=r[2]|0,_=g&8191,v=g>>>13,y=r[3]|0,b=y&8191,x=y>>>13,S=r[4]|0,C=S&8191,w=S>>>13,T=r[5]|0,E=T&8191,D=T>>>13,O=r[6]|0,k=O&8191,A=O>>>13,ee=r[7]|0,j=ee&8191,M=ee>>>13,te=r[8]|0,N=te&8191,P=te>>>13,ne=r[9]|0,F=ne&8191,I=ne>>>13,re=i[0]|0,L=re&8191,R=re>>>13,ie=i[1]|0,z=ie&8191,B=ie>>>13,ae=i[2]|0,V=ae&8191,H=ae>>>13,oe=i[3]|0,se=oe&8191,U=oe>>>13,ce=i[4]|0,W=ce&8191,G=ce>>>13,le=i[5]|0,K=le&8191,q=le>>>13,ue=i[6]|0,J=ue&8191,de=ue>>>13,fe=i[7]|0,pe=fe&8191,me=fe>>>13,Y=i[8]|0,X=Y&8191,Z=Y>>>13,he=i[9]|0,ge=he&8191,_e=he>>>13;n.negative=e.negative^t.negative,n.length=19,s=Math.imul(d,L),c=Math.imul(d,R),c=c+Math.imul(f,L)|0,l=Math.imul(f,R);var ve=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ve>>>26)|0,ve&=67108863,s=Math.imul(m,L),c=Math.imul(m,R),c=c+Math.imul(h,L)|0,l=Math.imul(h,R),s=s+Math.imul(d,z)|0,c=c+Math.imul(d,B)|0,c=c+Math.imul(f,z)|0,l=l+Math.imul(f,B)|0;var ye=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ye>>>26)|0,ye&=67108863,s=Math.imul(_,L),c=Math.imul(_,R),c=c+Math.imul(v,L)|0,l=Math.imul(v,R),s=s+Math.imul(m,z)|0,c=c+Math.imul(m,B)|0,c=c+Math.imul(h,z)|0,l=l+Math.imul(h,B)|0,s=s+Math.imul(d,V)|0,c=c+Math.imul(d,H)|0,c=c+Math.imul(f,V)|0,l=l+Math.imul(f,H)|0;var be=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(be>>>26)|0,be&=67108863,s=Math.imul(b,L),c=Math.imul(b,R),c=c+Math.imul(x,L)|0,l=Math.imul(x,R),s=s+Math.imul(_,z)|0,c=c+Math.imul(_,B)|0,c=c+Math.imul(v,z)|0,l=l+Math.imul(v,B)|0,s=s+Math.imul(m,V)|0,c=c+Math.imul(m,H)|0,c=c+Math.imul(h,V)|0,l=l+Math.imul(h,H)|0,s=s+Math.imul(d,se)|0,c=c+Math.imul(d,U)|0,c=c+Math.imul(f,se)|0,l=l+Math.imul(f,U)|0;var xe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(xe>>>26)|0,xe&=67108863,s=Math.imul(C,L),c=Math.imul(C,R),c=c+Math.imul(w,L)|0,l=Math.imul(w,R),s=s+Math.imul(b,z)|0,c=c+Math.imul(b,B)|0,c=c+Math.imul(x,z)|0,l=l+Math.imul(x,B)|0,s=s+Math.imul(_,V)|0,c=c+Math.imul(_,H)|0,c=c+Math.imul(v,V)|0,l=l+Math.imul(v,H)|0,s=s+Math.imul(m,se)|0,c=c+Math.imul(m,U)|0,c=c+Math.imul(h,se)|0,l=l+Math.imul(h,U)|0,s=s+Math.imul(d,W)|0,c=c+Math.imul(d,G)|0,c=c+Math.imul(f,W)|0,l=l+Math.imul(f,G)|0;var Se=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Se>>>26)|0,Se&=67108863,s=Math.imul(E,L),c=Math.imul(E,R),c=c+Math.imul(D,L)|0,l=Math.imul(D,R),s=s+Math.imul(C,z)|0,c=c+Math.imul(C,B)|0,c=c+Math.imul(w,z)|0,l=l+Math.imul(w,B)|0,s=s+Math.imul(b,V)|0,c=c+Math.imul(b,H)|0,c=c+Math.imul(x,V)|0,l=l+Math.imul(x,H)|0,s=s+Math.imul(_,se)|0,c=c+Math.imul(_,U)|0,c=c+Math.imul(v,se)|0,l=l+Math.imul(v,U)|0,s=s+Math.imul(m,W)|0,c=c+Math.imul(m,G)|0,c=c+Math.imul(h,W)|0,l=l+Math.imul(h,G)|0,s=s+Math.imul(d,K)|0,c=c+Math.imul(d,q)|0,c=c+Math.imul(f,K)|0,l=l+Math.imul(f,q)|0;var Ce=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,s=Math.imul(k,L),c=Math.imul(k,R),c=c+Math.imul(A,L)|0,l=Math.imul(A,R),s=s+Math.imul(E,z)|0,c=c+Math.imul(E,B)|0,c=c+Math.imul(D,z)|0,l=l+Math.imul(D,B)|0,s=s+Math.imul(C,V)|0,c=c+Math.imul(C,H)|0,c=c+Math.imul(w,V)|0,l=l+Math.imul(w,H)|0,s=s+Math.imul(b,se)|0,c=c+Math.imul(b,U)|0,c=c+Math.imul(x,se)|0,l=l+Math.imul(x,U)|0,s=s+Math.imul(_,W)|0,c=c+Math.imul(_,G)|0,c=c+Math.imul(v,W)|0,l=l+Math.imul(v,G)|0,s=s+Math.imul(m,K)|0,c=c+Math.imul(m,q)|0,c=c+Math.imul(h,K)|0,l=l+Math.imul(h,q)|0,s=s+Math.imul(d,J)|0,c=c+Math.imul(d,de)|0,c=c+Math.imul(f,J)|0,l=l+Math.imul(f,de)|0;var we=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(we>>>26)|0,we&=67108863,s=Math.imul(j,L),c=Math.imul(j,R),c=c+Math.imul(M,L)|0,l=Math.imul(M,R),s=s+Math.imul(k,z)|0,c=c+Math.imul(k,B)|0,c=c+Math.imul(A,z)|0,l=l+Math.imul(A,B)|0,s=s+Math.imul(E,V)|0,c=c+Math.imul(E,H)|0,c=c+Math.imul(D,V)|0,l=l+Math.imul(D,H)|0,s=s+Math.imul(C,se)|0,c=c+Math.imul(C,U)|0,c=c+Math.imul(w,se)|0,l=l+Math.imul(w,U)|0,s=s+Math.imul(b,W)|0,c=c+Math.imul(b,G)|0,c=c+Math.imul(x,W)|0,l=l+Math.imul(x,G)|0,s=s+Math.imul(_,K)|0,c=c+Math.imul(_,q)|0,c=c+Math.imul(v,K)|0,l=l+Math.imul(v,q)|0,s=s+Math.imul(m,J)|0,c=c+Math.imul(m,de)|0,c=c+Math.imul(h,J)|0,l=l+Math.imul(h,de)|0,s=s+Math.imul(d,pe)|0,c=c+Math.imul(d,me)|0,c=c+Math.imul(f,pe)|0,l=l+Math.imul(f,me)|0;var Te=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Te>>>26)|0,Te&=67108863,s=Math.imul(N,L),c=Math.imul(N,R),c=c+Math.imul(P,L)|0,l=Math.imul(P,R),s=s+Math.imul(j,z)|0,c=c+Math.imul(j,B)|0,c=c+Math.imul(M,z)|0,l=l+Math.imul(M,B)|0,s=s+Math.imul(k,V)|0,c=c+Math.imul(k,H)|0,c=c+Math.imul(A,V)|0,l=l+Math.imul(A,H)|0,s=s+Math.imul(E,se)|0,c=c+Math.imul(E,U)|0,c=c+Math.imul(D,se)|0,l=l+Math.imul(D,U)|0,s=s+Math.imul(C,W)|0,c=c+Math.imul(C,G)|0,c=c+Math.imul(w,W)|0,l=l+Math.imul(w,G)|0,s=s+Math.imul(b,K)|0,c=c+Math.imul(b,q)|0,c=c+Math.imul(x,K)|0,l=l+Math.imul(x,q)|0,s=s+Math.imul(_,J)|0,c=c+Math.imul(_,de)|0,c=c+Math.imul(v,J)|0,l=l+Math.imul(v,de)|0,s=s+Math.imul(m,pe)|0,c=c+Math.imul(m,me)|0,c=c+Math.imul(h,pe)|0,l=l+Math.imul(h,me)|0,s=s+Math.imul(d,X)|0,c=c+Math.imul(d,Z)|0,c=c+Math.imul(f,X)|0,l=l+Math.imul(f,Z)|0;var Ee=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,s=Math.imul(F,L),c=Math.imul(F,R),c=c+Math.imul(I,L)|0,l=Math.imul(I,R),s=s+Math.imul(N,z)|0,c=c+Math.imul(N,B)|0,c=c+Math.imul(P,z)|0,l=l+Math.imul(P,B)|0,s=s+Math.imul(j,V)|0,c=c+Math.imul(j,H)|0,c=c+Math.imul(M,V)|0,l=l+Math.imul(M,H)|0,s=s+Math.imul(k,se)|0,c=c+Math.imul(k,U)|0,c=c+Math.imul(A,se)|0,l=l+Math.imul(A,U)|0,s=s+Math.imul(E,W)|0,c=c+Math.imul(E,G)|0,c=c+Math.imul(D,W)|0,l=l+Math.imul(D,G)|0,s=s+Math.imul(C,K)|0,c=c+Math.imul(C,q)|0,c=c+Math.imul(w,K)|0,l=l+Math.imul(w,q)|0,s=s+Math.imul(b,J)|0,c=c+Math.imul(b,de)|0,c=c+Math.imul(x,J)|0,l=l+Math.imul(x,de)|0,s=s+Math.imul(_,pe)|0,c=c+Math.imul(_,me)|0,c=c+Math.imul(v,pe)|0,l=l+Math.imul(v,me)|0,s=s+Math.imul(m,X)|0,c=c+Math.imul(m,Z)|0,c=c+Math.imul(h,X)|0,l=l+Math.imul(h,Z)|0,s=s+Math.imul(d,ge)|0,c=c+Math.imul(d,_e)|0,c=c+Math.imul(f,ge)|0,l=l+Math.imul(f,_e)|0;var De=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(De>>>26)|0,De&=67108863,s=Math.imul(F,z),c=Math.imul(F,B),c=c+Math.imul(I,z)|0,l=Math.imul(I,B),s=s+Math.imul(N,V)|0,c=c+Math.imul(N,H)|0,c=c+Math.imul(P,V)|0,l=l+Math.imul(P,H)|0,s=s+Math.imul(j,se)|0,c=c+Math.imul(j,U)|0,c=c+Math.imul(M,se)|0,l=l+Math.imul(M,U)|0,s=s+Math.imul(k,W)|0,c=c+Math.imul(k,G)|0,c=c+Math.imul(A,W)|0,l=l+Math.imul(A,G)|0,s=s+Math.imul(E,K)|0,c=c+Math.imul(E,q)|0,c=c+Math.imul(D,K)|0,l=l+Math.imul(D,q)|0,s=s+Math.imul(C,J)|0,c=c+Math.imul(C,de)|0,c=c+Math.imul(w,J)|0,l=l+Math.imul(w,de)|0,s=s+Math.imul(b,pe)|0,c=c+Math.imul(b,me)|0,c=c+Math.imul(x,pe)|0,l=l+Math.imul(x,me)|0,s=s+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,c=c+Math.imul(v,X)|0,l=l+Math.imul(v,Z)|0,s=s+Math.imul(m,ge)|0,c=c+Math.imul(m,_e)|0,c=c+Math.imul(h,ge)|0,l=l+Math.imul(h,_e)|0;var Oe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,s=Math.imul(F,V),c=Math.imul(F,H),c=c+Math.imul(I,V)|0,l=Math.imul(I,H),s=s+Math.imul(N,se)|0,c=c+Math.imul(N,U)|0,c=c+Math.imul(P,se)|0,l=l+Math.imul(P,U)|0,s=s+Math.imul(j,W)|0,c=c+Math.imul(j,G)|0,c=c+Math.imul(M,W)|0,l=l+Math.imul(M,G)|0,s=s+Math.imul(k,K)|0,c=c+Math.imul(k,q)|0,c=c+Math.imul(A,K)|0,l=l+Math.imul(A,q)|0,s=s+Math.imul(E,J)|0,c=c+Math.imul(E,de)|0,c=c+Math.imul(D,J)|0,l=l+Math.imul(D,de)|0,s=s+Math.imul(C,pe)|0,c=c+Math.imul(C,me)|0,c=c+Math.imul(w,pe)|0,l=l+Math.imul(w,me)|0,s=s+Math.imul(b,X)|0,c=c+Math.imul(b,Z)|0,c=c+Math.imul(x,X)|0,l=l+Math.imul(x,Z)|0,s=s+Math.imul(_,ge)|0,c=c+Math.imul(_,_e)|0,c=c+Math.imul(v,ge)|0,l=l+Math.imul(v,_e)|0;var ke=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ke>>>26)|0,ke&=67108863,s=Math.imul(F,se),c=Math.imul(F,U),c=c+Math.imul(I,se)|0,l=Math.imul(I,U),s=s+Math.imul(N,W)|0,c=c+Math.imul(N,G)|0,c=c+Math.imul(P,W)|0,l=l+Math.imul(P,G)|0,s=s+Math.imul(j,K)|0,c=c+Math.imul(j,q)|0,c=c+Math.imul(M,K)|0,l=l+Math.imul(M,q)|0,s=s+Math.imul(k,J)|0,c=c+Math.imul(k,de)|0,c=c+Math.imul(A,J)|0,l=l+Math.imul(A,de)|0,s=s+Math.imul(E,pe)|0,c=c+Math.imul(E,me)|0,c=c+Math.imul(D,pe)|0,l=l+Math.imul(D,me)|0,s=s+Math.imul(C,X)|0,c=c+Math.imul(C,Z)|0,c=c+Math.imul(w,X)|0,l=l+Math.imul(w,Z)|0,s=s+Math.imul(b,ge)|0,c=c+Math.imul(b,_e)|0,c=c+Math.imul(x,ge)|0,l=l+Math.imul(x,_e)|0;var Ae=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s=Math.imul(F,W),c=Math.imul(F,G),c=c+Math.imul(I,W)|0,l=Math.imul(I,G),s=s+Math.imul(N,K)|0,c=c+Math.imul(N,q)|0,c=c+Math.imul(P,K)|0,l=l+Math.imul(P,q)|0,s=s+Math.imul(j,J)|0,c=c+Math.imul(j,de)|0,c=c+Math.imul(M,J)|0,l=l+Math.imul(M,de)|0,s=s+Math.imul(k,pe)|0,c=c+Math.imul(k,me)|0,c=c+Math.imul(A,pe)|0,l=l+Math.imul(A,me)|0,s=s+Math.imul(E,X)|0,c=c+Math.imul(E,Z)|0,c=c+Math.imul(D,X)|0,l=l+Math.imul(D,Z)|0,s=s+Math.imul(C,ge)|0,c=c+Math.imul(C,_e)|0,c=c+Math.imul(w,ge)|0,l=l+Math.imul(w,_e)|0;var je=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(je>>>26)|0,je&=67108863,s=Math.imul(F,K),c=Math.imul(F,q),c=c+Math.imul(I,K)|0,l=Math.imul(I,q),s=s+Math.imul(N,J)|0,c=c+Math.imul(N,de)|0,c=c+Math.imul(P,J)|0,l=l+Math.imul(P,de)|0,s=s+Math.imul(j,pe)|0,c=c+Math.imul(j,me)|0,c=c+Math.imul(M,pe)|0,l=l+Math.imul(M,me)|0,s=s+Math.imul(k,X)|0,c=c+Math.imul(k,Z)|0,c=c+Math.imul(A,X)|0,l=l+Math.imul(A,Z)|0,s=s+Math.imul(E,ge)|0,c=c+Math.imul(E,_e)|0,c=c+Math.imul(D,ge)|0,l=l+Math.imul(D,_e)|0;var Me=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Me>>>26)|0,Me&=67108863,s=Math.imul(F,J),c=Math.imul(F,de),c=c+Math.imul(I,J)|0,l=Math.imul(I,de),s=s+Math.imul(N,pe)|0,c=c+Math.imul(N,me)|0,c=c+Math.imul(P,pe)|0,l=l+Math.imul(P,me)|0,s=s+Math.imul(j,X)|0,c=c+Math.imul(j,Z)|0,c=c+Math.imul(M,X)|0,l=l+Math.imul(M,Z)|0,s=s+Math.imul(k,ge)|0,c=c+Math.imul(k,_e)|0,c=c+Math.imul(A,ge)|0,l=l+Math.imul(A,_e)|0;var Ne=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s=Math.imul(F,pe),c=Math.imul(F,me),c=c+Math.imul(I,pe)|0,l=Math.imul(I,me),s=s+Math.imul(N,X)|0,c=c+Math.imul(N,Z)|0,c=c+Math.imul(P,X)|0,l=l+Math.imul(P,Z)|0,s=s+Math.imul(j,ge)|0,c=c+Math.imul(j,_e)|0,c=c+Math.imul(M,ge)|0,l=l+Math.imul(M,_e)|0;var Pe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,s=Math.imul(F,X),c=Math.imul(F,Z),c=c+Math.imul(I,X)|0,l=Math.imul(I,Z),s=s+Math.imul(N,ge)|0,c=c+Math.imul(N,_e)|0,c=c+Math.imul(P,ge)|0,l=l+Math.imul(P,_e)|0;var Fe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,s=Math.imul(F,ge),c=Math.imul(F,_e),c=c+Math.imul(I,ge)|0,l=Math.imul(I,_e);var Q=(o+s|0)+((c&8191)<<13)|0;return o=(l+(c>>>13)|0)+(Q>>>26)|0,Q&=67108863,a[0]=ve,a[1]=ye,a[2]=be,a[3]=xe,a[4]=Se,a[5]=Ce,a[6]=we,a[7]=Te,a[8]=Ee,a[9]=De,a[10]=Oe,a[11]=ke,a[12]=Ae,a[13]=je,a[14]=Me,a[15]=Ne,a[16]=Pe,a[17]=Fe,a[18]=Q,o!==0&&(a[19]=o,n.length++),n};Math.imul||(m=p);function h(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var o=i;i=0;for(var s=r&67108863,c=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=c;l++){var u=a-l,d=(e.words[u]|0)*(t.words[l]|0),f=d&67108863;o=o+(d/67108864|0)|0,f=f+s|0,s=f&67108863,o=o+(f>>>26)|0,i+=o>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return r===0?n.length--:n.words[a]=r,n.strip()}function g(e,t,n){return new _().mulp(e,t,n)}i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=this.length===10&&e.length===10?m(this,e,t):r<63?p(this,e,t):r<1024?h(this,e,t):g(this,e,t),n};function _(e,t){this.x=e,this.y=t}_.prototype.makeRBT=function(e){for(var t=Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},_.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(e&1)<<t-i-1,e>>=1;return r},_.prototype.permute=function(e,t,n,r,i,a){for(var o=0;o<a;o++)r[o]=t[e[o]],i[o]=n[e[o]]},_.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=c,f=l,p=0;p<o;p++){var m=n[u+p],h=r[u+p],g=n[u+p+o],_=r[u+p+o],v=d*g-f*_;_=d*_+f*g,g=v,n[u+p]=m+g,r[u+p]=h+_,n[u+p+o]=m-g,r[u+p+o]=h-_,p!==s&&(v=c*d-l*f,f=c*f+l*d,d=v)}},_.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,r=n&1,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},_.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},_.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=Math.round(e[2*r+1]/t)*8192+Math.round(e[2*r]/t)+n;e[r]=i&67108863,n=i<67108864?0:i/67108864|0}return e},_.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=e[o]|0,r[2*o]=a&8191,a>>>=13,r[2*o+1]=a&8191,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(a===0),n((a&-8192)==0)},_.prototype.stub=function(e){for(var t=Array(e),n=0;n<e;n++)t[n]=0;return t},_.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),o=Array(r),s=Array(r),c=Array(r),l=Array(r),u=Array(r),d=Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,a,s,c,r,i),this.transform(l,a,u,d,r,i);for(var p=0;p<r;p++){var m=s[p]*u[p]-c[p]*d[p];c[p]=s[p]*d[p]+c[p]*u[p],s[p]=m}return this.conjugate(s,c,r),this.transform(s,c,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=Array(this.length+e.length),g(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n(typeof e==`number`),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(this.words[r]|0)*e,a=(i&67108863)+(t&67108863);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=a&67108863}return t!==0&&(this.words[r]=t,this.length++),this.length=e===0?1:this.length,this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=f(e);if(t.length===0)return new i(1);for(var n=this,r=0;r<t.length&&t[r]===0;r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())t[r]!==0&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26,i=67108863>>>26-t<<26-t,a;if(t!==0){var o=0;for(a=0;a<this.length;a++){var s=this.words[a]&i,c=(this.words[a]|0)-s<<t;this.words[a]=c|o,o=s>>>26-t}o&&(this.words[a]=o,this.length++)}if(r!==0){for(a=this.length-1;a>=0;a--)this.words[a+r]=this.words[a];for(a=0;a<r;a++)this.words[a]=0;this.length+=r}return this.strip()},i.prototype.ishln=function(e){return n(this.negative===0),this.iushln(e)},i.prototype.iushrn=function(e,t,r){n(typeof e==`number`&&e>=0);var i=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=r;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(o!==0)if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(u!==0||l>=i);l--){var d=this.words[l]|0;this.words[l]=u<<26-a|d>>>a,u=d&s}return c&&u!==0&&(c.words[c.length++]=u),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(this.negative===0),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return this.length<=r?!1:!!(this.words[r]&i)},i.prototype.imaskn=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26;if(n(this.negative===0,`imaskn works only with positive numbers`),this.length<=r)return this;if(t!==0&&r++,this.length=Math.min(r,this.length),t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n(typeof e==`number`),n(e<67108864),e<0?this.isubn(-e):this.negative===0?this._iaddn(e):this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n(typeof e==`number`),n(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i=e.length+r,a;this._expand(i);var o,s=0;for(a=0;a<e.length;a++){o=(this.words[a+r]|0)+s;var c=(e.words[a]|0)*t;o-=c&67108863,s=(o>>26)-(c/67108864|0),this.words[a+r]=o&67108863}for(;a<this.length-r;a++)o=(this.words[a+r]|0)+s,s=o>>26,this.words[a+r]=o&67108863;if(s===0)return this.strip();for(n(s===-1),s=0,a=0;a<this.length;a++)o=-(this.words[a]|0)+s,s=o>>26,this.words[a]=o&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),a=e,o=a.words[a.length-1]|0;n=26-this._countBits(o),n!==0&&(a=a.ushln(n),r.iushln(n),o=a.words[a.length-1]|0);var s=r.length-a.length,c;if(t!==`mod`){c=new i(null),c.length=s+1,c.words=Array(c.length);for(var l=0;l<c.length;l++)c.words[l]=0}var u=r.clone()._ishlnsubmul(a,1,s);u.negative===0&&(r=u,c&&(c.words[s]=1));for(var d=s-1;d>=0;d--){var f=(r.words[a.length+d]|0)*67108864+(r.words[a.length+d-1]|0);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(a,f,d);r.negative!==0;)f--,r.negative=0,r._ishlnsubmul(a,1,d),r.isZero()||(r.negative^=1);c&&(c.words[d]=f)}return c&&c.strip(),r.strip(),t!==`div`&&n!==0&&r.iushrn(n),{div:c||null,mod:r}},i.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var a,o,s;return this.negative!==0&&e.negative===0?(s=this.neg().divmod(e,t),t!==`mod`&&(a=s.div.neg()),t!==`div`&&(o=s.mod.neg(),r&&o.negative!==0&&o.iadd(e)),{div:a,mod:o}):this.negative===0&&e.negative!==0?(s=this.divmod(e.neg(),t),t!==`mod`&&(a=s.div.neg()),{div:a,mod:s.mod}):(this.negative&e.negative)===0?e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:e.length===1?t===`div`?{div:this.divn(e.words[0]),mod:null}:t===`mod`?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),t!==`div`&&(o=s.mod.neg(),r&&o.negative!==0&&o.isub(e)),{div:s.div,mod:o})},i.prototype.div=function(e){return this.divmod(e,`div`,!1).div},i.prototype.mod=function(e){return this.divmod(e,`mod`,!1).mod},i.prototype.umod=function(e){return this.divmod(e,`mod`,!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative===0?t.mod:t.mod.isub(e),r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||i===1&&a===0?t.div:t.div.negative===0?t.div.iaddn(1):t.div.isubn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(this.words[i]|0))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(this.words[r]|0)+t*67108864;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(e.negative===0),n(!e.isZero());var t=this,r=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;(t.words[0]&p)===0&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-->0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var m=0,h=1;(r.words[0]&h)===0&&m<26;++m,h<<=1);if(m>0)for(r.iushrn(m);m-->0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(e.negative===0),n(!e.isZero());var t=this,r=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var a=new i(1),o=new i(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;(t.words[0]&l)===0&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-->0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var u=0,d=1;(r.words[0]&d)===0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-->0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o)):(r.isub(t),o.isub(a))}var f=t.cmpn(1)===0?a:o;return f.cmpn(0)<0&&f.iadd(e),f},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(i===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return(this.words[0]&1)==0},i.prototype.isOdd=function(){return(this.words[0]&1)==1},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n(typeof e==`number`);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;a!==0&&o<this.length;o++){var s=this.words[o]|0;s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return a!==0&&(this.words[o]=a,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,`Number is too big`);var i=this.words[0]|0;r=i===e?0:i<e?-1:1}return this.negative===0?r:-r|0},i.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative===0?t:-t|0},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=this.words[n]|0,i=e.words[n]|0;if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return this.cmpn(e)===1},i.prototype.gt=function(e){return this.cmp(e)===1},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return this.cmpn(e)===-1},i.prototype.lt=function(e){return this.cmp(e)===-1},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return this.cmpn(e)===0},i.prototype.eq=function(e){return this.cmp(e)===0},i.red=function(e){return new w(e)},i.prototype.toRed=function(e){return n(!this.red,`Already a number in reduction context`),n(this.negative===0,`red works only with positives`),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,`fromRed works only with numbers in reduction context`),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,`Already a number in reduction context`),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,`redAdd works only with red numbers`),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,`redIAdd works only with red numbers`),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,`redSub works only with red numbers`),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,`redISub works only with red numbers`),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,`redShl works only with red numbers`),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,`redSqr works only with red numbers`),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,`redISqr works only with red numbers`),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,`redSqrt works only with red numbers`),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,`redInvm works only with red numbers`),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,`redNeg works only with red numbers`),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,`redPow(normalNum)`),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var e=new i(null);return e.words=Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var r=n<this.n?-1:t.ucmp(this.p);return r===0?(t.words[0]=0,t.length=1):r>0?t.isub(this.p):t.strip===void 0?t._strip():t.strip(),t},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)};function b(){y.call(this,`k256`,`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f`)}r(b,y),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var o=e.words[i]|0;e.words[i-10]=(o&n)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,a===0&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=e.words[n]|0;t+=r*977,e.words[n]=t&67108863,t=r*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function x(){y.call(this,`p224`,`ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001`)}r(x,y);function S(){y.call(this,`p192`,`ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff`)}r(S,y);function C(){y.call(this,`25519`,`7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed`)}r(C,y),C.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=(e.words[n]|0)*19+t,i=r&67108863;r>>>=26,e.words[n]=i,t=r}return t!==0&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if(e===`k256`)t=new b;else if(e===`p224`)t=new x;else if(e===`p192`)t=new S;else if(e===`p25519`)t=new C;else throw Error(`Unknown prime `+e);return v[e]=t,t};function w(e){if(typeof e==`string`){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),`modulus must be greater than 1`),this.m=e,this.prime=null}w.prototype._verify1=function(e){n(e.negative===0,`red works only with positives`),n(e.red,`red works only with red numbers`)},w.prototype._verify2=function(e,t){n((e.negative|t.negative)===0,`red works only with positives`),n(e.red&&e.red===t.red,`red works only with red numbers`)},w.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},w.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},w.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},w.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},w.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},w.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},w.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},w.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},w.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},w.prototype.isqr=function(e){return this.imul(e,e.clone())},w.prototype.sqr=function(e){return this.mul(e,e)},w.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),t===3){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&a.andln(1)===0;)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,l).cmp(c)!==0;)u.redIAdd(c);for(var d=this.pow(u,a),f=this.pow(e,a.addn(1).iushrn(1)),p=this.pow(e,a),m=o;p.cmp(s)!==0;){for(var h=p,g=0;h.cmp(s)!==0;g++)h=h.redSqr();n(g<m);var _=this.pow(d,new i(1).iushln(m-g-1));f=f.redMul(_),d=_.redSqr(),p=p.redMul(d),m=g}return f},w.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative===0?this.imod(t):(t.negative=0,this.imod(t).redNeg())},w.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,r=Array(1<<n);r[0]=new i(1).toRed(this),r[1]=e;for(var a=2;a<r.length;a++)r[a]=this.mul(r[a-1],e);var o=r[0],s=0,c=0,l=t.bitLength()%26;for(l===0&&(l=26),a=t.length-1;a>=0;a--){for(var u=t.words[a],d=l-1;d>=0;d--){var f=u>>d&1;if(o!==r[0]&&(o=this.sqr(o)),f===0&&s===0){c=0;continue}s<<=1,s|=f,c++,!(c!==n&&(a!==0||d!==0))&&(o=this.mul(o,r[s]),c=0,s=0)}l=26}return o},w.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},w.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new T(e)};function T(e){w.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}r(T,w),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}})(t===void 0||t,e)})),tt=n(((e,t)=>{var n;t.exports=function(e){return n||=new r(null),n.generate(e)};function r(e){this.rand=e}if(t.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},r.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},typeof self==`object`)self.crypto&&self.crypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:typeof window==`object`&&(r.prototype._rand=function(){throw Error(`Not implemented yet`)});else try{var i=Pn();if(typeof i.randomBytes!=`function`)throw Error(`Not supported`);r.prototype._rand=function(e){return i.randomBytes(e)}}catch{}})),nt=n(((e,t)=>{var n=et(),r=tt();function i(e){this.rand=e||new r.Rand}t.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do var i=new n(this.rand.generate(r));while(i.cmp(e)>=0);return i},i.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},i.prototype.test=function(e,t,r){var i=e.bitLength(),a=n.mont(e),o=new n(1).toRed(a);t||=Math.max(1,i/48|0);for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var l=e.shrn(c),u=s.toRed(a),d=!0;t>0;t--){var f=this._randrange(new n(2),s);r&&r(f);var p=f.toRed(a).redPow(l);if(!(p.cmp(o)===0||p.cmp(u)===0)){for(var m=1;m<c;m++){if(p=p.redSqr(),p.cmp(o)===0)return!1;if(p.cmp(u)===0)break}if(m===c)return!1}}return d},i.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||=Math.max(1,r/48|0);for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var c=e.shrn(s),l=o.toRed(i);t>0;t--){var u=this._randrange(new n(2),o),d=e.gcd(u);if(d.cmpn(1)!==0)return d;var f=u.toRed(i).redPow(c);if(!(f.cmp(a)===0||f.cmp(l)===0)){for(var p=1;p<s;p++){if(f=f.redSqr(),f.cmp(a)===0)return f.fromRed().subn(1).gcd(e);if(f.cmp(l)===0)break}if(p===s)return f=f.redSqr(),f.fromRed().subn(1).gcd(e)}}return!1}})),rt=n(((e,t)=>{var n=N();t.exports=_,_.simpleSieve=h,_.fermatTest=g;var r=et(),i=new r(24),a=new(nt()),o=new r(1),s=new r(2),c=new r(5);new r(16),new r(8);var l=new r(10),u=new r(3);new r(7);var d=new r(11),f=new r(4);new r(12);var p=null;function m(){if(p!==null)return p;var e=1048576,t=[];t[0]=2;for(var n=1,r=3;r<e;r+=2){for(var i=Math.ceil(Math.sqrt(r)),a=0;a<n&&t[a]<=i&&r%t[a]!==0;a++);n!==a&&t[a]<=i||(t[n++]=r)}return p=t,t}function h(e){for(var t=m(),n=0;n<t.length;n++)if(e.modn(t[n])===0)return e.cmpn(t[n])===0;return!0}function g(e){var t=r.mont(e);return s.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)===0}function _(e,t){if(e<16)return t===2||t===5?new r([140,123]):new r([140,39]);t=new r(t);for(var p,m;;){for(p=new r(n(Math.ceil(e/8)));p.bitLength()>e;)p.ishrn(1);if(p.isEven()&&p.iadd(o),p.testn(1)||p.iadd(s),!t.cmp(s))for(;p.mod(i).cmp(d);)p.iadd(f);else if(!t.cmp(c))for(;p.mod(l).cmp(u);)p.iadd(f);if(m=p.shrn(1),h(m)&&h(p)&&g(m)&&g(p)&&a.test(m)&&a.test(p))return p}}})),it=n(((e,t)=>{t.exports={modp1:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff`},modp2:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff`},modp5:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff`},modp14:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff`},modp15:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff`},modp16:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff`},modp17:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff`},modp18:{gen:`02`,prime:`ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff`}}})),at=n(((e,t)=>{var n=o(),r=et(),i=new(nt()),a=new r(24),s=new r(11),c=new r(10),l=new r(3),u=new r(7),d=rt(),f=N();t.exports=_;function p(e,t){return t||=`utf8`,n.Buffer.isBuffer(e)||(e=new n.Buffer(e,t)),this._pub=new r(e),this}function m(e,t){return t||=`utf8`,n.Buffer.isBuffer(e)||(e=new n.Buffer(e,t)),this._priv=new r(e),this}var h={};function g(e,t){var n=t.toString(`hex`),r=[n,e.toString(16)].join(`_`);if(r in h)return h[r];var o=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!i.test(e))return o+=1,n===`02`||n===`05`?o+=8:o+=4,h[r]=o,o;i.test(e.shrn(1))||(o+=2);var f;switch(n){case`02`:e.mod(a).cmp(s)&&(o+=8);break;case`05`:f=e.mod(c),f.cmp(l)&&f.cmp(u)&&(o+=8);break;default:o+=4}return h[r]=o,o}function _(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=p,this.setPrivateKey=m):this._primeCode=8}Object.defineProperty(_.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!=`number`&&(this._primeCode=g(this.__prime,this.__gen)),this._primeCode}}),_.prototype.generateKeys=function(){return this._priv||=new r(f(this._primeLen)),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},_.prototype.computeSecret=function(e){e=new r(e),e=e.toRed(this._prime);var t=new n.Buffer(e.redPow(this._priv).fromRed().toArray()),i=this.getPrime();if(t.length<i.length){var a=new n.Buffer(i.length-t.length);a.fill(0),t=n.Buffer.concat([a,t])}return t},_.prototype.getPublicKey=function(e){return v(this._pub,e)},_.prototype.getPrivateKey=function(e){return v(this._priv,e)},_.prototype.getPrime=function(e){return v(this.__prime,e)},_.prototype.getGenerator=function(e){return v(this._gen,e)},_.prototype.setGenerator=function(e,t){return t||=`utf8`,n.Buffer.isBuffer(e)||(e=new n.Buffer(e,t)),this.__gen=e,this._gen=new r(e),this};function v(e,t){var r=new n.Buffer(e.toArray());return t?r.toString(t):r}})),ot=n((e=>{var t=o(),n=rt(),r=it(),i=at();function a(e){return new i(new t.Buffer(r[e].prime,`hex`),new t.Buffer(r[e].gen,`hex`))}var s={binary:!0,hex:!0,base64:!0};function c(e,r,a,o){return t.Buffer.isBuffer(r)||s[r]===void 0?c(e,`binary`,r,a):(r||=`binary`,o||=`binary`,a||=new t.Buffer([2]),t.Buffer.isBuffer(a)||(a=new t.Buffer(a,o)),typeof e==`number`?new i(n(e,a),a,!0):(t.Buffer.isBuffer(e)||(e=new t.Buffer(e,r)),new i(e,a,!0)))}e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=a,e.createDiffieHellman=e.DiffieHellman=c})),st=n(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),ct=n(((e,t)=>{t.exports=c().EventEmitter})),lt=n(((e,t)=>{var n=o(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),ut=n((()=>{})),dt=n((()=>{})),ft=n(((e,t)=>{function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var r=lt().Buffer,i=dt();function a(e,t,n){e.copy(t,n)}t.exports=function(){function e(){n(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(this.length===0)return r.alloc(0);for(var t=r.allocUnsafe(e>>>0),n=this.head,i=0;n;)a(n.data,t,i),i+=n.data.length,n=n.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+` `+e})})),pt=n(((e,t)=>{var n=I();function r(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(a,r,e)):n.nextTick(a,r,e):t&&t(e)}),this)}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit(`error`,t)}t.exports={destroy:r,undestroy:i}})),mt=n(((t,n)=>{var r=e(a()),i=I();n.exports=S;function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){re(t,e)}}var s=!r.default.browser&&[`v0.10`,`v0.9.`].indexOf(r.default.version.slice(0,5))>-1?setImmediate:i.nextTick,c;S.WritableState=y;var l=Object.create(ie());l.inherits=u();var d={deprecate:b()},f=ct(),p=lt().Buffer,m=(typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function h(e){return p.from(e)}function g(e){return p.isBuffer(e)||e instanceof m}var _=pt();l.inherits(S,f);function v(){}function y(e,t){c||=ht(),e||={};var n=t instanceof c;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){A(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(y.prototype,"buffer",{get:d.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var x;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(x=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return x.call(this,e)?!0:this===S&&e&&e._writableState instanceof y}})):x=function(e){return e instanceof this};function S(e){if(c||=ht(),!x.call(S,this)&&!(this instanceof c))return new S(e);this._writableState=new y(e,this),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),f.call(this)}S.prototype.pipe=function(){this.emit(`error`,Error(`Cannot pipe, not readable`))};function C(e,t){var n=Error(`write after end`);e.emit(`error`,n),i.nextTick(t,n)}function w(e,t,n,r){var a=!0,o=!1;return n===null?o=TypeError(`May not write null values to stream`):typeof n!=`string`&&n!==void 0&&!t.objectMode&&(o=TypeError(`Invalid non-string/buffer chunk`)),o&&(e.emit(`error`,o),i.nextTick(r,o),a=!1),a}S.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&g(e);return a&&!p.isBuffer(e)&&(e=h(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=v),r.ended?C(this,n):(a||w(this,r,e,n))&&(r.pendingcb++,i=E(this,r,a,e,t,n)),i},S.prototype.cork=function(){var e=this._writableState;e.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&M(this,e))},S.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw TypeError(`Unknown encoding: `+e);return this._writableState.defaultEncoding=e,this};function T(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=p.from(t,n)),t}Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function E(e,t,n,r,i,a){if(!n){var o=T(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else D(e,t,!1,s,r,i,a);return c}function D(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function O(e,t,n,r,a){--t.pendingcb,n?(i.nextTick(a,r),i.nextTick(ne,e,t),e._writableState.errorEmitted=!0,e.emit(`error`,r)):(a(r),e._writableState.errorEmitted=!0,e.emit(`error`,r),ne(e,t))}function k(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function A(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(k(n),t)O(e,n,r,t,i);else{var a=te(n);!a&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&M(e,n),r?s(ee,e,n,a,i):ee(e,n,a,i)}}function ee(e,t,n,r){n||j(e,t),t.pendingcb--,r(),ne(e,t)}function j(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`))}function M(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)i[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;i.allBuffers=c,D(e,t,!0,t.length,i,``,a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,u=n.encoding,d=n.callback;if(D(e,t,!1,t.objectMode?1:l.length,l,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}n===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}S.prototype._write=function(e,t,n){n(Error(`_write() is not implemented`))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;typeof e==`function`?(n=e,e=null,t=null):typeof t==`function`&&(n=t,t=null),e!=null&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||F(this,r,n)};function te(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function N(e,t){e._final(function(n){t.pendingcb--,n&&e.emit(`error`,n),t.prefinished=!0,e.emit(`prefinish`),ne(e,t)})}function P(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==`function`?(t.pendingcb++,t.finalCalled=!0,i.nextTick(N,e,t)):(t.prefinished=!0,e.emit(`prefinish`)))}function ne(e,t){var n=te(t);return n&&(P(e,t),t.pendingcb===0&&(t.finished=!0,e.emit(`finish`))),n}function F(e,t,n){t.ending=!0,ne(e,t),n&&(t.finished?i.nextTick(n):e.once(`finish`,n)),t.ended=!0,e.writable=!1}function re(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=_.destroy,S.prototype._undestroy=_.undestroy,S.prototype._destroy=function(e,t){this.end(),t(e)}})),ht=n(((e,t)=>{var n=I(),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=d;var i=Object.create(ie());i.inherits=u();var a=vt(),o=mt();i.inherits(d,a);for(var s=r(o.prototype),c=0;c<s.length;c++){var l=s[c];d.prototype[l]||(d.prototype[l]=o.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);a.call(this,e),o.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once(`end`,f)}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}})),gt=n(((e,t)=>{var n=o(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),_t=n((e=>{var t=gt().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||``},a.prototype.end=d,a.prototype.text=u,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):``}})),vt=n(((t,n)=>{var r=e(a()),i=I();n.exports=T;var o=st(),s;T.ReadableState=w,c().EventEmitter;var l=function(e,t){return e.listeners(t).length},d=ct(),f=lt().Buffer,p=(typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function m(e){return f.from(e)}function h(e){return f.isBuffer(e)||e instanceof p}var g=Object.create(ie());g.inherits=u();var _=ut(),v=void 0;v=_&&_.debuglog?_.debuglog(`stream`):function(){};var y=ft(),b=pt(),x;g.inherits(T,d);var S=[`error`,`close`,`destroy`,`pause`,`resume`];function C(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function w(e,t){s||=ht(),e||={};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(x||=_t().StringDecoder,this.decoder=new x(e.encoding),this.encoding=e.encoding)}function T(e){if(s||=ht(),!(this instanceof T))return new T(e);this._readableState=new w(e,this),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),d.call(this)}Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=b.destroy,T.prototype._undestroy=b.undestroy,T.prototype._destroy=function(e,t){this.push(null),t(e)},T.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=f.from(e,t),t=``),r=!0),E(this,e,t,!1,r)},T.prototype.unshift=function(e){return E(this,e,null,!0,!1)};function E(e,t,n,r,i){var a=e._readableState;if(t===null)a.reading=!1,M(e,a);else{var o;i||(o=O(a,t)),o?e.emit(`error`,o):a.objectMode||t&&t.length>0?(typeof t!=`string`&&!a.objectMode&&Object.getPrototypeOf(t)!==f.prototype&&(t=m(t)),r?a.endEmitted?e.emit(`error`,Error(`stream.unshift() after end event`)):D(e,a,t,!0):a.ended?e.emit(`error`,Error(`stream.push() after EOF`)):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||t.length!==0?D(e,a,t,!1):P(e,a)):D(e,a,t,!1))):r||(a.reading=!1)}return k(a)}function D(e,t,n,r){t.flowing&&t.length===0&&!t.sync?(e.emit(`data`,n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&te(e)),P(e,t)}function O(e,t){var n;return!h(t)&&typeof t!=`string`&&t!==void 0&&!e.objectMode&&(n=TypeError(`Invalid non-string/buffer chunk`)),n}function k(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}T.prototype.isPaused=function(){return this._readableState.flowing===!1},T.prototype.setEncoding=function(e){return x||=_t().StringDecoder,this._readableState.decoder=new x(e),this._readableState.encoding=e,this};var A=8388608;function ee(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=ee(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}T.prototype.read=function(e){v(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return v(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?oe(this):te(this),null;if(e=j(e,t),e===0&&t.ended)return t.length===0&&oe(this),null;var r=t.needReadable;v(`need readable`,r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,v(`length less than watermark`,r)),t.ended||t.reading?(r=!1,v(`reading or ended`,r)):r&&(v(`do read`),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t)));var i=e>0?B(e,t):null;return i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&oe(this)),i!==null&&this.emit(`data`,i),i};function M(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,te(e)}}function te(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(v(`emitReadable`,t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(N,e):N(e))}function N(e){v(`emit readable`),e.emit(`readable`),z(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(ne,e,t))}function ne(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(v(`maybeReadMore read 0`),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}T.prototype._read=function(e){this.emit(`error`,Error(`_read() is not implemented`))},T.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e);break}a.pipesCount+=1,v(`pipe count=%d opts=%j`,a.pipesCount,t);var o=(!t||t.end!==!1)&&e!==r.default.stdout&&e!==r.default.stderr?c:y;a.endEmitted?i.nextTick(o):n.once(`end`,o),e.on(`unpipe`,s);function s(e,t){v(`onunpipe`),e===n&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,f())}function c(){v(`onend`),e.end()}var u=F(n);e.on(`drain`,u);var d=!1;function f(){v(`cleanup`),e.removeListener(`close`,g),e.removeListener(`finish`,_),e.removeListener(`drain`,u),e.removeListener(`error`,h),e.removeListener(`unpipe`,s),n.removeListener(`end`,c),n.removeListener(`end`,y),n.removeListener(`data`,m),d=!0,a.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var p=!1;n.on(`data`,m);function m(t){v(`ondata`),p=!1,!1===e.write(t)&&!p&&((a.pipesCount===1&&a.pipes===e||a.pipesCount>1&&U(a.pipes,e)!==-1)&&!d&&(v(`false write response, pause`,a.awaitDrain),a.awaitDrain++,p=!0),n.pause())}function h(t){v(`onerror`,t),y(),e.removeListener(`error`,h),l(e,`error`)===0&&e.emit(`error`,t)}C(e,`error`,h);function g(){e.removeListener(`finish`,_),y()}e.once(`close`,g);function _(){v(`onfinish`),e.removeListener(`close`,g),y()}e.once(`finish`,_);function y(){v(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),a.flowing||(v(`pipe resume`),n.resume()),e};function F(e){return function(){var t=e._readableState;v(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&l(e,`data`)&&(t.flowing=!0,z(e))}}T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit(`unpipe`,this,{hasUnpiped:!1});return this}var o=U(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),--t.pipesCount,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit(`unpipe`,this,n),this)},T.prototype.on=function(e,t){var n=d.prototype.on.call(this,e,t);if(e===`data`)this._readableState.flowing!==!1&&this.resume();else if(e===`readable`){var r=this._readableState;!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&te(this):i.nextTick(re,this))}return n},T.prototype.addListener=T.prototype.on;function re(e){v(`readable nexttick read 0`),e.read(0)}T.prototype.resume=function(){var e=this._readableState;return e.flowing||(v(`resume`),e.flowing=!0,L(this,e)),this};function L(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(R,e,t))}function R(e,t){t.reading||(v(`resume read 0`),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit(`resume`),z(e),t.flowing&&!t.reading&&e.read(0)}T.prototype.pause=function(){return v(`call pause flowing=%j`,this._readableState.flowing),!1!==this._readableState.flowing&&(v(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this};function z(e){var t=e._readableState;for(v(`flow`,t.flowing);t.flowing&&e.read()!==null;);}T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on(`end`,function(){if(v(`wrapped end`),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on(`data`,function(i){v(`wrapped data`),n.decoder&&(i=n.decoder.write(i)),!(n.objectMode&&i==null)&&(!n.objectMode&&(!i||!i.length)||t.push(i)||(r=!0,e.pause()))}),e)this[i]===void 0&&typeof e[i]==`function`&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<S.length;a++)e.on(S[a],this.emit.bind(this,S[a]));return this._read=function(t){v(`wrapped _read`,t),r&&(r=!1,e.resume())},this},Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),T._fromList=B;function B(e,t){if(t.length===0)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=ae(e,t.buffer,t.decoder),n}function ae(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?V(e,t):H(e,t),r}function V(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,e===0){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function H(e,t){var n=f.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function oe(e){var t=e._readableState;if(t.length>0)throw Error(`"endReadable()" called on non-empty stream`);t.endEmitted||(t.ended=!0,i.nextTick(se,t,e))}function se(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`))}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}})),yt=n(((e,t)=>{t.exports=a;var n=ht(),r=Object.create(ie());r.inherits=u(),r.inherits(a,n);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit(`error`,Error(`write callback called multiple times`));n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,o)}function o(){var e=this;typeof this._flush==`function`?this._flush(function(t,n){s(e,t,n)}):s(this,null,null)}a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw Error(`_transform() is not implemented`)},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,function(e){t(e),r.emit(`close`)})};function s(e,t,n){if(t)return e.emit(`error`,t);if(n!=null&&e.push(n),e._writableState.length)throw Error(`Calling transform done when ws.length != 0`);if(e._transformState.transforming)throw Error(`Calling transform done when still transforming`);return e.push(null)}})),bt=n(((e,t)=>{t.exports=i;var n=yt(),r=Object.create(ie());r.inherits=u(),r.inherits(i,n);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),xt=n(((e,t)=>{e=t.exports=vt(),e.Stream=e,e.Readable=e,e.Writable=mt(),e.Duplex=ht(),e.Transform=yt(),e.PassThrough=bt()})),St=n((()=>{})),Ct=n(((e,t)=>{(function(e,t){function n(e,t){if(!e)throw Error(t||`Assertion failed`)}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((t===`le`||t===`be`)&&(n=t,t=10),this._init(e||0,t||10,n||`be`))}typeof e==`object`?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;var a;try{a=typeof window<`u`&&window.Buffer!==void 0?window.Buffer:St().Buffer}catch{}i.isBN=function(e){return e instanceof i||typeof e==`object`&&!!e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if(typeof e==`number`)return this._initNumber(e,t,r);if(typeof e==`object`)return this._initArray(e,t,r);t===`hex`&&(t=16),n(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,``);var i=0;e[0]===`-`&&(i++,this.negative=1),i<e.length&&(t===16?this._parseHex(e,i,r):(this._parseBase(e,t,i),r===`le`&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),r===`le`&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n(typeof e.length==`number`),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if(r===`be`)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if(r===`le`)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this._strip()};function o(e,t){var r=e.charCodeAt(t);if(r>=48&&r<=57)return r-48;if(r>=65&&r<=70)return r-55;if(r>=97&&r<=102)return r-87;n(!1,`Invalid character in `+e)}function s(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i=0,a=0,o;if(n===`be`)for(r=e.length-1;r>=t;r-=2)o=s(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=s(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()};function c(e,t,r,i){for(var a=0,o=0,s=Math.min(e.length,r),c=t;c<s;c++){var l=e.charCodeAt(c)-48;a*=i,o=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&o<i,`Invalid character`),a+=o}return a}i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(o!==0){var d=1;for(l=c(e,u,e.length,t),u=0;u<o;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},i.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red};function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.prototype._move=function(e){l(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<`u`&&typeof Symbol.for==`function`)try{i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?`<BN-R: `:`<BN: `)+this.toString(16)+`>`}var d=`.0.00.000.0000.00000.000000.0000000.00000000.000000000.0000000000.00000000000.000000000000.0000000000000.00000000000000.000000000000000.0000000000000000.00000000000000000.000000000000000000.0000000000000000000.00000000000000000000.000000000000000000000.0000000000000000000000.00000000000000000000000.000000000000000000000000.0000000000000000000000000`.split(`.`),f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){e||=10,t=t|0||1;var r;if(e===16||e===`hex`){r=``;for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=((s<<i|a)&16777215).toString(16);a=s>>>24-i&16777215,i+=2,i>=26&&(i-=26,o--),r=a!==0||o!==this.length-1?d[6-c.length]+c+r:c+r}for(a!==0&&(r=a.toString(16)+r);r.length%t!==0;)r=`0`+r;return this.negative!==0&&(r=`-`+r),r}if(e===(e|0)&&e>=2&&e<=36){var l=f[e],u=p[e];r=``;var m=this.clone();for(m.negative=0;!m.isZero();){var h=m.modrn(u).toString(e);m=m.idivn(u),r=m.isZero()?h+r:d[l-h.length]+h+r}for(this.isZero()&&(r=`0`+r);r.length%t!==0;)r=`0`+r;return this.negative!==0&&(r=`-`+r),r}n(!1,`Base should be between 2 and 36`)},i.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,`Number can only safely store up to 53 bits`),this.negative===0?e:-e},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var m=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,`byte array longer than desired length`),n(a>0,`Requested array length <= 0`);var o=m(e,a),s=t===`le`?`LE`:`BE`;return this[`_toArrayLike`+s](o,i),o},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|r;e[n++]=o&255,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),a===6?(n<e.length&&(e[n++]=o>>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|r;e[n--]=o&255,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),a===6?(n>=0&&(e[n--]=o>>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return t&8191||(n+=13,t>>>=13),t&127||(n+=7,t>>>=7),t&15||(n+=4,t>>>=4),t&3||(n+=2,t>>>=2),t&1||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function h(e){for(var t=Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return this.negative===0?this.clone():this.abs().inotn(e).iaddn(1)},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n((this.negative|e.negative)===0),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n((this.negative|e.negative)===0),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n((this.negative|e.negative)===0),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n(typeof e==`number`&&e>=0);var t=Math.ceil(e/26)|0,r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=~this.words[i]&67108863;for(r>0&&(this.words[i]=~this.words[i]&67108863>>26-r,i++);i<this.length;i++)this.words[i]=0;return this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n(typeof e==`number`&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(n.words[a]|0)+(r.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;for(;i!==0&&a<n.length;a++)t=(n.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;if(this.length=n.length,i!==0)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,i;n>0?(r=this,i=e):(r=e,i=this);for(var a=0,o=0;o<i.length;o++)t=(r.words[o]|0)-(i.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;for(;a!==0&&o<r.length;o++)t=(r.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;if(a===0&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=e.words[0]|0,a=t.words[0]|0,o=i*a,s=o&67108863,c=o/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var u=c>>>26,d=c&67108863,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var m=l-p|0;i=e.words[m]|0,a=t.words[p]|0,o=i*a+d,u+=o/67108864|0,d=o&67108863}n.words[l]=d|0,c=u|0}return c===0?n.length--:n.words[l]=c|0,n._strip()}var _=function(e,t,n){var r=e.words,i=t.words,a=n.words,o=0,s,c,l,u=r[0]|0,d=u&8191,f=u>>>13,p=r[1]|0,m=p&8191,h=p>>>13,g=r[2]|0,_=g&8191,v=g>>>13,y=r[3]|0,b=y&8191,x=y>>>13,S=r[4]|0,C=S&8191,w=S>>>13,T=r[5]|0,E=T&8191,D=T>>>13,O=r[6]|0,k=O&8191,A=O>>>13,ee=r[7]|0,j=ee&8191,M=ee>>>13,te=r[8]|0,N=te&8191,P=te>>>13,ne=r[9]|0,F=ne&8191,I=ne>>>13,re=i[0]|0,L=re&8191,R=re>>>13,ie=i[1]|0,z=ie&8191,B=ie>>>13,ae=i[2]|0,V=ae&8191,H=ae>>>13,oe=i[3]|0,se=oe&8191,U=oe>>>13,ce=i[4]|0,W=ce&8191,G=ce>>>13,le=i[5]|0,K=le&8191,q=le>>>13,ue=i[6]|0,J=ue&8191,de=ue>>>13,fe=i[7]|0,pe=fe&8191,me=fe>>>13,Y=i[8]|0,X=Y&8191,Z=Y>>>13,he=i[9]|0,ge=he&8191,_e=he>>>13;n.negative=e.negative^t.negative,n.length=19,s=Math.imul(d,L),c=Math.imul(d,R),c=c+Math.imul(f,L)|0,l=Math.imul(f,R);var ve=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ve>>>26)|0,ve&=67108863,s=Math.imul(m,L),c=Math.imul(m,R),c=c+Math.imul(h,L)|0,l=Math.imul(h,R),s=s+Math.imul(d,z)|0,c=c+Math.imul(d,B)|0,c=c+Math.imul(f,z)|0,l=l+Math.imul(f,B)|0;var ye=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ye>>>26)|0,ye&=67108863,s=Math.imul(_,L),c=Math.imul(_,R),c=c+Math.imul(v,L)|0,l=Math.imul(v,R),s=s+Math.imul(m,z)|0,c=c+Math.imul(m,B)|0,c=c+Math.imul(h,z)|0,l=l+Math.imul(h,B)|0,s=s+Math.imul(d,V)|0,c=c+Math.imul(d,H)|0,c=c+Math.imul(f,V)|0,l=l+Math.imul(f,H)|0;var be=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(be>>>26)|0,be&=67108863,s=Math.imul(b,L),c=Math.imul(b,R),c=c+Math.imul(x,L)|0,l=Math.imul(x,R),s=s+Math.imul(_,z)|0,c=c+Math.imul(_,B)|0,c=c+Math.imul(v,z)|0,l=l+Math.imul(v,B)|0,s=s+Math.imul(m,V)|0,c=c+Math.imul(m,H)|0,c=c+Math.imul(h,V)|0,l=l+Math.imul(h,H)|0,s=s+Math.imul(d,se)|0,c=c+Math.imul(d,U)|0,c=c+Math.imul(f,se)|0,l=l+Math.imul(f,U)|0;var xe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(xe>>>26)|0,xe&=67108863,s=Math.imul(C,L),c=Math.imul(C,R),c=c+Math.imul(w,L)|0,l=Math.imul(w,R),s=s+Math.imul(b,z)|0,c=c+Math.imul(b,B)|0,c=c+Math.imul(x,z)|0,l=l+Math.imul(x,B)|0,s=s+Math.imul(_,V)|0,c=c+Math.imul(_,H)|0,c=c+Math.imul(v,V)|0,l=l+Math.imul(v,H)|0,s=s+Math.imul(m,se)|0,c=c+Math.imul(m,U)|0,c=c+Math.imul(h,se)|0,l=l+Math.imul(h,U)|0,s=s+Math.imul(d,W)|0,c=c+Math.imul(d,G)|0,c=c+Math.imul(f,W)|0,l=l+Math.imul(f,G)|0;var Se=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Se>>>26)|0,Se&=67108863,s=Math.imul(E,L),c=Math.imul(E,R),c=c+Math.imul(D,L)|0,l=Math.imul(D,R),s=s+Math.imul(C,z)|0,c=c+Math.imul(C,B)|0,c=c+Math.imul(w,z)|0,l=l+Math.imul(w,B)|0,s=s+Math.imul(b,V)|0,c=c+Math.imul(b,H)|0,c=c+Math.imul(x,V)|0,l=l+Math.imul(x,H)|0,s=s+Math.imul(_,se)|0,c=c+Math.imul(_,U)|0,c=c+Math.imul(v,se)|0,l=l+Math.imul(v,U)|0,s=s+Math.imul(m,W)|0,c=c+Math.imul(m,G)|0,c=c+Math.imul(h,W)|0,l=l+Math.imul(h,G)|0,s=s+Math.imul(d,K)|0,c=c+Math.imul(d,q)|0,c=c+Math.imul(f,K)|0,l=l+Math.imul(f,q)|0;var Ce=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,s=Math.imul(k,L),c=Math.imul(k,R),c=c+Math.imul(A,L)|0,l=Math.imul(A,R),s=s+Math.imul(E,z)|0,c=c+Math.imul(E,B)|0,c=c+Math.imul(D,z)|0,l=l+Math.imul(D,B)|0,s=s+Math.imul(C,V)|0,c=c+Math.imul(C,H)|0,c=c+Math.imul(w,V)|0,l=l+Math.imul(w,H)|0,s=s+Math.imul(b,se)|0,c=c+Math.imul(b,U)|0,c=c+Math.imul(x,se)|0,l=l+Math.imul(x,U)|0,s=s+Math.imul(_,W)|0,c=c+Math.imul(_,G)|0,c=c+Math.imul(v,W)|0,l=l+Math.imul(v,G)|0,s=s+Math.imul(m,K)|0,c=c+Math.imul(m,q)|0,c=c+Math.imul(h,K)|0,l=l+Math.imul(h,q)|0,s=s+Math.imul(d,J)|0,c=c+Math.imul(d,de)|0,c=c+Math.imul(f,J)|0,l=l+Math.imul(f,de)|0;var we=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(we>>>26)|0,we&=67108863,s=Math.imul(j,L),c=Math.imul(j,R),c=c+Math.imul(M,L)|0,l=Math.imul(M,R),s=s+Math.imul(k,z)|0,c=c+Math.imul(k,B)|0,c=c+Math.imul(A,z)|0,l=l+Math.imul(A,B)|0,s=s+Math.imul(E,V)|0,c=c+Math.imul(E,H)|0,c=c+Math.imul(D,V)|0,l=l+Math.imul(D,H)|0,s=s+Math.imul(C,se)|0,c=c+Math.imul(C,U)|0,c=c+Math.imul(w,se)|0,l=l+Math.imul(w,U)|0,s=s+Math.imul(b,W)|0,c=c+Math.imul(b,G)|0,c=c+Math.imul(x,W)|0,l=l+Math.imul(x,G)|0,s=s+Math.imul(_,K)|0,c=c+Math.imul(_,q)|0,c=c+Math.imul(v,K)|0,l=l+Math.imul(v,q)|0,s=s+Math.imul(m,J)|0,c=c+Math.imul(m,de)|0,c=c+Math.imul(h,J)|0,l=l+Math.imul(h,de)|0,s=s+Math.imul(d,pe)|0,c=c+Math.imul(d,me)|0,c=c+Math.imul(f,pe)|0,l=l+Math.imul(f,me)|0;var Te=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Te>>>26)|0,Te&=67108863,s=Math.imul(N,L),c=Math.imul(N,R),c=c+Math.imul(P,L)|0,l=Math.imul(P,R),s=s+Math.imul(j,z)|0,c=c+Math.imul(j,B)|0,c=c+Math.imul(M,z)|0,l=l+Math.imul(M,B)|0,s=s+Math.imul(k,V)|0,c=c+Math.imul(k,H)|0,c=c+Math.imul(A,V)|0,l=l+Math.imul(A,H)|0,s=s+Math.imul(E,se)|0,c=c+Math.imul(E,U)|0,c=c+Math.imul(D,se)|0,l=l+Math.imul(D,U)|0,s=s+Math.imul(C,W)|0,c=c+Math.imul(C,G)|0,c=c+Math.imul(w,W)|0,l=l+Math.imul(w,G)|0,s=s+Math.imul(b,K)|0,c=c+Math.imul(b,q)|0,c=c+Math.imul(x,K)|0,l=l+Math.imul(x,q)|0,s=s+Math.imul(_,J)|0,c=c+Math.imul(_,de)|0,c=c+Math.imul(v,J)|0,l=l+Math.imul(v,de)|0,s=s+Math.imul(m,pe)|0,c=c+Math.imul(m,me)|0,c=c+Math.imul(h,pe)|0,l=l+Math.imul(h,me)|0,s=s+Math.imul(d,X)|0,c=c+Math.imul(d,Z)|0,c=c+Math.imul(f,X)|0,l=l+Math.imul(f,Z)|0;var Ee=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,s=Math.imul(F,L),c=Math.imul(F,R),c=c+Math.imul(I,L)|0,l=Math.imul(I,R),s=s+Math.imul(N,z)|0,c=c+Math.imul(N,B)|0,c=c+Math.imul(P,z)|0,l=l+Math.imul(P,B)|0,s=s+Math.imul(j,V)|0,c=c+Math.imul(j,H)|0,c=c+Math.imul(M,V)|0,l=l+Math.imul(M,H)|0,s=s+Math.imul(k,se)|0,c=c+Math.imul(k,U)|0,c=c+Math.imul(A,se)|0,l=l+Math.imul(A,U)|0,s=s+Math.imul(E,W)|0,c=c+Math.imul(E,G)|0,c=c+Math.imul(D,W)|0,l=l+Math.imul(D,G)|0,s=s+Math.imul(C,K)|0,c=c+Math.imul(C,q)|0,c=c+Math.imul(w,K)|0,l=l+Math.imul(w,q)|0,s=s+Math.imul(b,J)|0,c=c+Math.imul(b,de)|0,c=c+Math.imul(x,J)|0,l=l+Math.imul(x,de)|0,s=s+Math.imul(_,pe)|0,c=c+Math.imul(_,me)|0,c=c+Math.imul(v,pe)|0,l=l+Math.imul(v,me)|0,s=s+Math.imul(m,X)|0,c=c+Math.imul(m,Z)|0,c=c+Math.imul(h,X)|0,l=l+Math.imul(h,Z)|0,s=s+Math.imul(d,ge)|0,c=c+Math.imul(d,_e)|0,c=c+Math.imul(f,ge)|0,l=l+Math.imul(f,_e)|0;var De=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(De>>>26)|0,De&=67108863,s=Math.imul(F,z),c=Math.imul(F,B),c=c+Math.imul(I,z)|0,l=Math.imul(I,B),s=s+Math.imul(N,V)|0,c=c+Math.imul(N,H)|0,c=c+Math.imul(P,V)|0,l=l+Math.imul(P,H)|0,s=s+Math.imul(j,se)|0,c=c+Math.imul(j,U)|0,c=c+Math.imul(M,se)|0,l=l+Math.imul(M,U)|0,s=s+Math.imul(k,W)|0,c=c+Math.imul(k,G)|0,c=c+Math.imul(A,W)|0,l=l+Math.imul(A,G)|0,s=s+Math.imul(E,K)|0,c=c+Math.imul(E,q)|0,c=c+Math.imul(D,K)|0,l=l+Math.imul(D,q)|0,s=s+Math.imul(C,J)|0,c=c+Math.imul(C,de)|0,c=c+Math.imul(w,J)|0,l=l+Math.imul(w,de)|0,s=s+Math.imul(b,pe)|0,c=c+Math.imul(b,me)|0,c=c+Math.imul(x,pe)|0,l=l+Math.imul(x,me)|0,s=s+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,c=c+Math.imul(v,X)|0,l=l+Math.imul(v,Z)|0,s=s+Math.imul(m,ge)|0,c=c+Math.imul(m,_e)|0,c=c+Math.imul(h,ge)|0,l=l+Math.imul(h,_e)|0;var Oe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,s=Math.imul(F,V),c=Math.imul(F,H),c=c+Math.imul(I,V)|0,l=Math.imul(I,H),s=s+Math.imul(N,se)|0,c=c+Math.imul(N,U)|0,c=c+Math.imul(P,se)|0,l=l+Math.imul(P,U)|0,s=s+Math.imul(j,W)|0,c=c+Math.imul(j,G)|0,c=c+Math.imul(M,W)|0,l=l+Math.imul(M,G)|0,s=s+Math.imul(k,K)|0,c=c+Math.imul(k,q)|0,c=c+Math.imul(A,K)|0,l=l+Math.imul(A,q)|0,s=s+Math.imul(E,J)|0,c=c+Math.imul(E,de)|0,c=c+Math.imul(D,J)|0,l=l+Math.imul(D,de)|0,s=s+Math.imul(C,pe)|0,c=c+Math.imul(C,me)|0,c=c+Math.imul(w,pe)|0,l=l+Math.imul(w,me)|0,s=s+Math.imul(b,X)|0,c=c+Math.imul(b,Z)|0,c=c+Math.imul(x,X)|0,l=l+Math.imul(x,Z)|0,s=s+Math.imul(_,ge)|0,c=c+Math.imul(_,_e)|0,c=c+Math.imul(v,ge)|0,l=l+Math.imul(v,_e)|0;var ke=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ke>>>26)|0,ke&=67108863,s=Math.imul(F,se),c=Math.imul(F,U),c=c+Math.imul(I,se)|0,l=Math.imul(I,U),s=s+Math.imul(N,W)|0,c=c+Math.imul(N,G)|0,c=c+Math.imul(P,W)|0,l=l+Math.imul(P,G)|0,s=s+Math.imul(j,K)|0,c=c+Math.imul(j,q)|0,c=c+Math.imul(M,K)|0,l=l+Math.imul(M,q)|0,s=s+Math.imul(k,J)|0,c=c+Math.imul(k,de)|0,c=c+Math.imul(A,J)|0,l=l+Math.imul(A,de)|0,s=s+Math.imul(E,pe)|0,c=c+Math.imul(E,me)|0,c=c+Math.imul(D,pe)|0,l=l+Math.imul(D,me)|0,s=s+Math.imul(C,X)|0,c=c+Math.imul(C,Z)|0,c=c+Math.imul(w,X)|0,l=l+Math.imul(w,Z)|0,s=s+Math.imul(b,ge)|0,c=c+Math.imul(b,_e)|0,c=c+Math.imul(x,ge)|0,l=l+Math.imul(x,_e)|0;var Ae=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s=Math.imul(F,W),c=Math.imul(F,G),c=c+Math.imul(I,W)|0,l=Math.imul(I,G),s=s+Math.imul(N,K)|0,c=c+Math.imul(N,q)|0,c=c+Math.imul(P,K)|0,l=l+Math.imul(P,q)|0,s=s+Math.imul(j,J)|0,c=c+Math.imul(j,de)|0,c=c+Math.imul(M,J)|0,l=l+Math.imul(M,de)|0,s=s+Math.imul(k,pe)|0,c=c+Math.imul(k,me)|0,c=c+Math.imul(A,pe)|0,l=l+Math.imul(A,me)|0,s=s+Math.imul(E,X)|0,c=c+Math.imul(E,Z)|0,c=c+Math.imul(D,X)|0,l=l+Math.imul(D,Z)|0,s=s+Math.imul(C,ge)|0,c=c+Math.imul(C,_e)|0,c=c+Math.imul(w,ge)|0,l=l+Math.imul(w,_e)|0;var je=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(je>>>26)|0,je&=67108863,s=Math.imul(F,K),c=Math.imul(F,q),c=c+Math.imul(I,K)|0,l=Math.imul(I,q),s=s+Math.imul(N,J)|0,c=c+Math.imul(N,de)|0,c=c+Math.imul(P,J)|0,l=l+Math.imul(P,de)|0,s=s+Math.imul(j,pe)|0,c=c+Math.imul(j,me)|0,c=c+Math.imul(M,pe)|0,l=l+Math.imul(M,me)|0,s=s+Math.imul(k,X)|0,c=c+Math.imul(k,Z)|0,c=c+Math.imul(A,X)|0,l=l+Math.imul(A,Z)|0,s=s+Math.imul(E,ge)|0,c=c+Math.imul(E,_e)|0,c=c+Math.imul(D,ge)|0,l=l+Math.imul(D,_e)|0;var Me=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Me>>>26)|0,Me&=67108863,s=Math.imul(F,J),c=Math.imul(F,de),c=c+Math.imul(I,J)|0,l=Math.imul(I,de),s=s+Math.imul(N,pe)|0,c=c+Math.imul(N,me)|0,c=c+Math.imul(P,pe)|0,l=l+Math.imul(P,me)|0,s=s+Math.imul(j,X)|0,c=c+Math.imul(j,Z)|0,c=c+Math.imul(M,X)|0,l=l+Math.imul(M,Z)|0,s=s+Math.imul(k,ge)|0,c=c+Math.imul(k,_e)|0,c=c+Math.imul(A,ge)|0,l=l+Math.imul(A,_e)|0;var Ne=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s=Math.imul(F,pe),c=Math.imul(F,me),c=c+Math.imul(I,pe)|0,l=Math.imul(I,me),s=s+Math.imul(N,X)|0,c=c+Math.imul(N,Z)|0,c=c+Math.imul(P,X)|0,l=l+Math.imul(P,Z)|0,s=s+Math.imul(j,ge)|0,c=c+Math.imul(j,_e)|0,c=c+Math.imul(M,ge)|0,l=l+Math.imul(M,_e)|0;var Pe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,s=Math.imul(F,X),c=Math.imul(F,Z),c=c+Math.imul(I,X)|0,l=Math.imul(I,Z),s=s+Math.imul(N,ge)|0,c=c+Math.imul(N,_e)|0,c=c+Math.imul(P,ge)|0,l=l+Math.imul(P,_e)|0;var Fe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,s=Math.imul(F,ge),c=Math.imul(F,_e),c=c+Math.imul(I,ge)|0,l=Math.imul(I,_e);var Q=(o+s|0)+((c&8191)<<13)|0;return o=(l+(c>>>13)|0)+(Q>>>26)|0,Q&=67108863,a[0]=ve,a[1]=ye,a[2]=be,a[3]=xe,a[4]=Se,a[5]=Ce,a[6]=we,a[7]=Te,a[8]=Ee,a[9]=De,a[10]=Oe,a[11]=ke,a[12]=Ae,a[13]=je,a[14]=Me,a[15]=Ne,a[16]=Pe,a[17]=Fe,a[18]=Q,o!==0&&(a[19]=o,n.length++),n};Math.imul||(_=g);function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var o=i;i=0;for(var s=r&67108863,c=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=c;l++){var u=a-l,d=(e.words[u]|0)*(t.words[l]|0),f=d&67108863;o=o+(d/67108864|0)|0,f=f+s|0,s=f&67108863,o=o+(f>>>26)|0,i+=o>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return r===0?n.length--:n.words[a]=r,n._strip()}function y(e,t,n){return v(e,t,n)}i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=this.length===10&&e.length===10?_(this,e,t):r<63?g(this,e,t):r<1024?v(this,e,t):y(this,e,t),n};function b(e,t){this.x=e,this.y=t}b.prototype.makeRBT=function(e){for(var t=Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(e&1)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,a){for(var o=0;o<a;o++)r[o]=t[e[o]],i[o]=n[e[o]]},b.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=c,f=l,p=0;p<o;p++){var m=n[u+p],h=r[u+p],g=n[u+p+o],_=r[u+p+o],v=d*g-f*_;_=d*_+f*g,g=v,n[u+p]=m+g,r[u+p]=h+_,n[u+p+o]=m-g,r[u+p+o]=h-_,p!==s&&(v=c*d-l*f,f=c*f+l*d,d=v)}},b.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,r=n&1,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=Math.round(e[2*r+1]/t)*8192+Math.round(e[2*r]/t)+n;e[r]=i&67108863,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=e[o]|0,r[2*o]=a&8191,a>>>=13,r[2*o+1]=a&8191,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(a===0),n((a&-8192)==0)},b.prototype.stub=function(e){for(var t=Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),o=Array(r),s=Array(r),c=Array(r),l=Array(r),u=Array(r),d=Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,a,s,c,r,i),this.transform(l,a,u,d,r,i);for(var p=0;p<r;p++){var m=s[p]*u[p]-c[p]*d[p];c[p]=s[p]*d[p]+c[p]*u[p],s[p]=m}return this.conjugate(s,c,r),this.transform(s,c,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n(typeof e==`number`),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(this.words[i]|0)*e,o=(a&67108863)+(r&67108863);r>>=26,r+=a/67108864|0,r+=o>>>26,this.words[i]=o&67108863}return r!==0&&(this.words[i]=r,this.length++),e===0&&(this.length=1,this._normSign()),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=h(e);if(t.length===0)return new i(1);for(var n=this,r=0;r<t.length&&t[r]===0;r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())t[r]!==0&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26,i=67108863>>>26-t<<26-t,a;if(t!==0){var o=0;for(a=0;a<this.length;a++){var s=this.words[a]&i,c=(this.words[a]|0)-s<<t;this.words[a]=c|o,o=s>>>26-t}o&&(this.words[a]=o,this.length++)}if(r!==0){for(a=this.length-1;a>=0;a--)this.words[a+r]=this.words[a];for(a=0;a<r;a++)this.words[a]=0;this.length+=r}return this._strip()},i.prototype.ishln=function(e){return n(this.negative===0),this.iushln(e)},i.prototype.iushrn=function(e,t,r){n(typeof e==`number`&&e>=0);var i=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=r;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(o!==0)if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(u!==0||l>=i);l--){var d=this.words[l]|0;this.words[l]=u<<26-a|d>>>a,u=d&s}return c&&u!==0&&(c.words[c.length++]=u),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(this.negative===0),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return this.length<=r?!1:!!(this.words[r]&i)},i.prototype.imaskn=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26;if(n(this.negative===0,`imaskn works only with positive numbers`),this.length<=r)return this;if(t!==0&&r++,this.length=Math.min(r,this.length),t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n(typeof e==`number`),n(e<67108864),e<0?this.isubn(-e):this.negative===0?this._iaddn(e):this.length===1&&(this.words[0]|0)<=e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n(typeof e==`number`),n(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i=e.length+r,a;this._expand(i);var o,s=0;for(a=0;a<e.length;a++){o=(this.words[a+r]|0)+s;var c=(e.words[a]|0)*t;o-=c&67108863,s=(o>>26)-(c/67108864|0),this.words[a+r]=o&67108863}for(;a<this.length-r;a++)o=(this.words[a+r]|0)+s,s=o>>26,this.words[a+r]=o&67108863;if(s===0)return this._strip();for(n(s===-1),s=0,a=0;a<this.length;a++)o=-(this.words[a]|0)+s,s=o>>26,this.words[a]=o&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),a=e,o=a.words[a.length-1]|0;n=26-this._countBits(o),n!==0&&(a=a.ushln(n),r.iushln(n),o=a.words[a.length-1]|0);var s=r.length-a.length,c;if(t!==`mod`){c=new i(null),c.length=s+1,c.words=Array(c.length);for(var l=0;l<c.length;l++)c.words[l]=0}var u=r.clone()._ishlnsubmul(a,1,s);u.negative===0&&(r=u,c&&(c.words[s]=1));for(var d=s-1;d>=0;d--){var f=(r.words[a.length+d]|0)*67108864+(r.words[a.length+d-1]|0);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(a,f,d);r.negative!==0;)f--,r.negative=0,r._ishlnsubmul(a,1,d),r.isZero()||(r.negative^=1);c&&(c.words[d]=f)}return c&&c._strip(),r._strip(),t!==`div`&&n!==0&&r.iushrn(n),{div:c||null,mod:r}},i.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var a,o,s;return this.negative!==0&&e.negative===0?(s=this.neg().divmod(e,t),t!==`mod`&&(a=s.div.neg()),t!==`div`&&(o=s.mod.neg(),r&&o.negative!==0&&o.iadd(e)),{div:a,mod:o}):this.negative===0&&e.negative!==0?(s=this.divmod(e.neg(),t),t!==`mod`&&(a=s.div.neg()),{div:a,mod:s.mod}):(this.negative&e.negative)===0?e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:e.length===1?t===`div`?{div:this.divn(e.words[0]),mod:null}:t===`mod`?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),t!==`div`&&(o=s.mod.neg(),r&&o.negative!==0&&o.isub(e)),{div:s.div,mod:o})},i.prototype.div=function(e){return this.divmod(e,`div`,!1).div},i.prototype.mod=function(e){return this.divmod(e,`mod`,!1).mod},i.prototype.umod=function(e){return this.divmod(e,`mod`,!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.mod.abs(),r=e.abs().iushrn(1),a=e.words[0]&1,o=n.cmp(r);if(o<0||a===1&&o===0)return t.div;var s=new i(1);return s.negative=this.negative^e.negative,t.div.iadd(s)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(this.words[a]|0))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(this.words[i]|0)+r*67108864;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(e.negative===0),n(!e.isZero());var t=this,r=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;(t.words[0]&p)===0&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-->0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var m=0,h=1;(r.words[0]&h)===0&&m<26;++m,h<<=1);if(m>0)for(r.iushrn(m);m-->0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(e.negative===0),n(!e.isZero());var t=this,r=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var a=new i(1),o=new i(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;(t.words[0]&l)===0&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-->0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var u=0,d=1;(r.words[0]&d)===0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-->0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o)):(r.isub(t),o.isub(a))}var f=t.cmpn(1)===0?a:o;return f.cmpn(0)<0&&f.iadd(e),f},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(i===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return(this.words[0]&1)==0},i.prototype.isOdd=function(){return(this.words[0]&1)==1},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n(typeof e==`number`);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;a!==0&&o<this.length;o++){var s=this.words[o]|0;s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return a!==0&&(this.words[o]=a,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this._strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,`Number is too big`);var i=this.words[0]|0;r=i===e?0:i<e?-1:1}return this.negative===0?r:-r|0},i.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative===0?t:-t|0},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=this.words[n]|0,i=e.words[n]|0;if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return this.cmpn(e)===1},i.prototype.gt=function(e){return this.cmp(e)===1},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return this.cmpn(e)===-1},i.prototype.lt=function(e){return this.cmp(e)===-1},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return this.cmpn(e)===0},i.prototype.eq=function(e){return this.cmp(e)===0},i.red=function(e){return new D(e)},i.prototype.toRed=function(e){return n(!this.red,`Already a number in reduction context`),n(this.negative===0,`red works only with positives`),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,`fromRed works only with numbers in reduction context`),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,`Already a number in reduction context`),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,`redAdd works only with red numbers`),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,`redIAdd works only with red numbers`),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,`redSub works only with red numbers`),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,`redISub works only with red numbers`),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,`redShl works only with red numbers`),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,`redSqr works only with red numbers`),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,`redISqr works only with red numbers`),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,`redSqrt works only with red numbers`),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,`redInvm works only with red numbers`),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,`redNeg works only with red numbers`),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,`redPow(normalNum)`),this.red._verify1(this),this.red.pow(this,e)};var x={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}S.prototype._tmp=function(){var e=new i(null);return e.words=Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var r=n<this.n?-1:t.ucmp(this.p);return r===0?(t.words[0]=0,t.length=1):r>0?t.isub(this.p):t.strip===void 0?t._strip():t.strip(),t},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)};function C(){S.call(this,`k256`,`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f`)}r(C,S),C.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var o=e.words[i]|0;e.words[i-10]=(o&n)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,a===0&&e.length>10?e.length-=10:e.length-=9},C.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=e.words[n]|0;t+=r*977,e.words[n]=t&67108863,t=r*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function w(){S.call(this,`p224`,`ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001`)}r(w,S);function T(){S.call(this,`p192`,`ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff`)}r(T,S);function E(){S.call(this,`25519`,`7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed`)}r(E,S),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=(e.words[n]|0)*19+t,i=r&67108863;r>>>=26,e.words[n]=i,t=r}return t!==0&&(e.words[e.length++]=t),e},i._prime=function(e){if(x[e])return x[e];var t;if(e===`k256`)t=new C;else if(e===`p224`)t=new w;else if(e===`p192`)t=new T;else if(e===`p25519`)t=new E;else throw Error(`Unknown prime `+e);return x[e]=t,t};function D(e){if(typeof e==`string`){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),`modulus must be greater than 1`),this.m=e,this.prime=null}D.prototype._verify1=function(e){n(e.negative===0,`red works only with positives`),n(e.red,`red works only with red numbers`)},D.prototype._verify2=function(e,t){n((e.negative|t.negative)===0,`red works only with positives`),n(e.red&&e.red===t.red,`red works only with red numbers`)},D.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},D.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},D.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},D.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},D.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},D.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},D.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},D.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},D.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},D.prototype.isqr=function(e){return this.imul(e,e.clone())},D.prototype.sqr=function(e){return this.mul(e,e)},D.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),t===3){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&a.andln(1)===0;)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,l).cmp(c)!==0;)u.redIAdd(c);for(var d=this.pow(u,a),f=this.pow(e,a.addn(1).iushrn(1)),p=this.pow(e,a),m=o;p.cmp(s)!==0;){for(var h=p,g=0;h.cmp(s)!==0;g++)h=h.redSqr();n(g<m);var _=this.pow(d,new i(1).iushln(m-g-1));f=f.redMul(_),d=_.redSqr(),p=p.redMul(d),m=g}return f},D.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative===0?this.imod(t):(t.negative=0,this.imod(t).redNeg())},D.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,r=Array(1<<n);r[0]=new i(1).toRed(this),r[1]=e;for(var a=2;a<r.length;a++)r[a]=this.mul(r[a-1],e);var o=r[0],s=0,c=0,l=t.bitLength()%26;for(l===0&&(l=26),a=t.length-1;a>=0;a--){for(var u=t.words[a],d=l-1;d>=0;d--){var f=u>>d&1;if(o!==r[0]&&(o=this.sqr(o)),f===0&&s===0){c=0;continue}s<<=1,s|=f,c++,!(c!==n&&(a!==0||d!==0))&&(o=this.mul(o,r[s]),c=0,s=0)}l=26}return o},D.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},D.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new O(e)};function O(e){D.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}r(O,D),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}})(t===void 0||t,e)})),wt=n(((e,t)=>{var n=Ct(),r=N(),i=s().Buffer;function a(e){var t=e.modulus.byteLength(),i;do i=new n(r(t));while(i.cmp(e.modulus)>=0||!i.umod(e.prime1)||!i.umod(e.prime2));return i}function o(e){var t=a(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}function c(e,t){var r=o(t),a=t.modulus.byteLength(),s=new n(e).mul(r.blinder).umod(t.modulus),c=s.toRed(n.mont(t.prime1)),l=s.toRed(n.mont(t.prime2)),u=t.coefficient,d=t.prime1,f=t.prime2,p=c.redPow(t.exponent1).fromRed(),m=l.redPow(t.exponent2).fromRed(),h=p.isub(m).imul(u).umod(d).imul(f);return m.iadd(h).imul(r.unblinder).umod(t.modulus).toArrayLike(i,`be`,a)}c.getr=a,t.exports=c})),Tt=n(((e,t)=>{t.exports={name:`elliptic`,version:`6.6.1`,description:`EC cryptography`,main:`lib/elliptic.js`,files:[`lib`],scripts:{lint:`eslint lib test`,"lint:fix":`npm run lint -- --fix`,unit:`istanbul test _mocha --reporter=spec test/index.js`,test:`npm run lint && npm run unit`,version:`grunt dist && git add dist/`},repository:{type:`git`,url:`git@github.com:indutny/elliptic`},keywords:[`EC`,`Elliptic`,`curve`,`Cryptography`],author:`Fedor Indutny <fedor@indutny.com>`,license:`MIT`,bugs:{url:`https://github.com/indutny/elliptic/issues`},homepage:`https://github.com/indutny/elliptic`,devDependencies:{brfs:`^2.0.2`,coveralls:`^3.1.0`,eslint:`^7.6.0`,grunt:`^1.2.1`,"grunt-browserify":`^5.3.0`,"grunt-cli":`^1.3.2`,"grunt-contrib-connect":`^3.0.0`,"grunt-contrib-copy":`^1.0.0`,"grunt-contrib-uglify":`^5.0.0`,"grunt-mocha-istanbul":`^5.0.2`,"grunt-saucelabs":`^9.0.1`,istanbul:`^0.4.5`,mocha:`^8.0.1`},dependencies:{"bn.js":`^4.11.9`,brorand:`^1.1.0`,"hash.js":`^1.0.0`,"hmac-drbg":`^1.0.1`,inherits:`^2.0.4`,"minimalistic-assert":`^1.0.1`,"minimalistic-crypto-utils":`^1.0.1`}}})),Et=n((e=>{var t=e;function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e!=`string`){for(var r=0;r<e.length;r++)n[r]=e[r]|0;return n}if(t===`hex`){e=e.replace(/[^a-z0-9]+/gi,``),e.length%2!=0&&(e=`0`+e);for(var r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(var r=0;r<e.length;r++){var i=e.charCodeAt(r),a=i>>8,o=i&255;a?n.push(a,o):n.push(o)}return n}t.toArray=n;function r(e){return e.length===1?`0`+e:e}t.zero2=r;function i(e){for(var t=``,n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}t.toHex=i,t.encode=function(e,t){return t===`hex`?i(e):e}})),Dt=n((e=>{var t=e,n=et(),r=Ee(),i=Et();t.assert=r,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode;function a(e,t,n){var r=Array(Math.max(e.bitLength(),n)+1),i;for(i=0;i<r.length;i+=1)r[i]=0;var a=1<<t+1,o=e.clone();for(i=0;i<r.length;i++){var s,c=o.andln(a-1);o.isOdd()?(s=c>(a>>1)-1?(a>>1)-c:c,o.isubn(s)):s=0,r[i]=s,o.iushrn(1)}return r}t.getNAF=a;function o(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0,a;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o=e.andln(3)+r&3,s=t.andln(3)+i&3;o===3&&(o=-1),s===3&&(s=-1);var c;o&1?(a=e.andln(7)+r&7,c=(a===3||a===5)&&s===2?-o:o):c=0,n[0].push(c);var l;s&1?(a=t.andln(7)+i&7,l=(a===3||a===5)&&o===2?-s:s):l=0,n[1].push(l),2*r===c+1&&(r=1-r),2*i===l+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n}t.getJSF=o;function s(e,t,n){var r=`_`+t;e.prototype[t]=function(){return this[r]===void 0?this[r]=n.call(this):this[r]}}t.cachedProperty=s;function c(e){return typeof e==`string`?t.toArray(e,`hex`):e}t.parseBytes=c;function l(e){return new n(e,`hex`,`le`)}t.intFromLE=l})),Ot=n(((e,t)=>{var n=et(),r=Dt(),i=r.getNAF,a=r.getJSF,o=r.assert;function s(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}t.exports=s,s.prototype.point=function(){throw Error(`Not implemented`)},s.prototype.validate=function(){throw Error(`Not implemented`)},s.prototype._fixedNafMul=function(e,t){o(e.precomputed);var n=e._getDoubles(),r=i(t,1,this._bitLength),a=(1<<n.step+1)-(n.step%2==0?2:1);a/=3;var s=[],c,l;for(c=0;c<r.length;c+=n.step){l=0;for(var u=c+n.step-1;u>=c;u--)l=(l<<1)+r[u];s.push(l)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),p=a;p>0;p--){for(c=0;c<s.length;c++)l=s[c],l===p?f=f.mixedAdd(n.points[c]):l===-p&&(f=f.mixedAdd(n.points[c].neg()));d=d.add(f)}return d.toP()},s.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var a=r.points,s=i(t,n,this._bitLength),c=this.jpoint(null,null,null),l=s.length-1;l>=0;l--){for(var u=0;l>=0&&s[l]===0;l--)u++;if(l>=0&&u++,c=c.dblp(u),l<0)break;var d=s[l];o(d!==0),c=e.type===`affine`?d>0?c.mixedAdd(a[d-1>>1]):c.mixedAdd(a[-d-1>>1].neg()):d>0?c.add(a[d-1>>1]):c.add(a[-d-1>>1].neg())}return e.type===`affine`?c.toP():c},s.prototype._wnafMulAdd=function(e,t,n,r,o){var s=this._wnafT1,c=this._wnafT2,l=this._wnafT3,u=0,d,f,p;for(d=0;d<r;d++){p=t[d];var m=p._getNAFPoints(e);s[d]=m.wnd,c[d]=m.points}for(d=r-1;d>=1;d-=2){var h=d-1,g=d;if(s[h]!==1||s[g]!==1){l[h]=i(n[h],s[h],this._bitLength),l[g]=i(n[g],s[g],this._bitLength),u=Math.max(l[h].length,u),u=Math.max(l[g].length,u);continue}var _=[t[h],null,null,t[g]];t[h].y.cmp(t[g].y)===0?(_[1]=t[h].add(t[g]),_[2]=t[h].toJ().mixedAdd(t[g].neg())):t[h].y.cmp(t[g].y.redNeg())===0?(_[1]=t[h].toJ().mixedAdd(t[g]),_[2]=t[h].add(t[g].neg())):(_[1]=t[h].toJ().mixedAdd(t[g]),_[2]=t[h].toJ().mixedAdd(t[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[h],n[g]);for(u=Math.max(y[0].length,u),l[h]=Array(u),l[g]=Array(u),f=0;f<u;f++){var b=y[0][f]|0,x=y[1][f]|0;l[h][f]=v[(b+1)*3+(x+1)],l[g][f]=0,c[h]=_}}var S=this.jpoint(null,null,null),C=this._wnafT4;for(d=u;d>=0;d--){for(var w=0;d>=0;){var T=!0;for(f=0;f<r;f++)C[f]=l[f][d]|0,C[f]!==0&&(T=!1);if(!T)break;w++,d--}if(d>=0&&w++,S=S.dblp(w),d<0)break;for(f=0;f<r;f++){var E=C[f];E!==0&&(E>0?p=c[f][E-1>>1]:E<0&&(p=c[f][-E-1>>1].neg()),S=p.type===`affine`?S.mixedAdd(p):S.add(p))}}for(d=0;d<r;d++)c[d]=null;return o?S:S.toP()};function c(e,t){this.curve=e,this.type=t,this.precomputed=null}s.BasePoint=c,c.prototype.eq=function(){throw Error(`Not implemented`)},c.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(e,t){e=r.toArray(e,t);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1==2*n)return e[0]===6?o(e[e.length-1]%2==0):e[0]===7&&o(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw Error(`Unknown point format`)},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray(`be`,t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray(`be`,t))},c.prototype.encode=function(e,t){return r.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return t?t.points.length>=Math.ceil((e.bitLength()+1)/t.step):!1},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)r=r.dbl();n.push(r)}return{step:e,points:n}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=n===1?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}})),kt=n(((e,t)=>{var n=Dt(),r=et(),i=u(),a=Ot(),o=n.assert;function s(e){a.call(this,`short`,e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}i(s,a),t.exports=s,s.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var t,n;if(e.beta)t=new r(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1],t=t.toRed(this.red)}if(e.lambda)n=new r(e.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))===0?n=a[0]:(n=a[1],o(this.g.mul(n).x.cmp(this.g.x.redMul(t))===0))}var s=e.basis?e.basis.map(function(e){return{a:new r(e.a,16),b:new r(e.b,16)}}):this._getEndoBasis(n);return{beta:t,lambda:n,basis:s}}},s.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:r.mont(e),n=new r(2).toRed(t).redInvm(),i=n.redNeg(),a=new r(3).toRed(t).redNeg().redSqrt().redMul(n);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},s.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,i=this.n.clone(),a=new r(1),o=new r(0),s=new r(0),c=new r(1),l,u,d,f,p,m,h,g=0,_,v;n.cmpn(0)!==0;){var y=i.div(n);_=i.sub(y.mul(n)),v=s.sub(y.mul(a));var b=c.sub(y.mul(o));if(!d&&_.cmp(t)<0)l=h.neg(),u=a,d=_.neg(),f=v;else if(d&&++g===2)break;h=_,i=n,n=_,s=a,a=v,c=o,o=b}p=_.neg(),m=v;var x=d.sqr().add(f.sqr());return p.sqr().add(m.sqr()).cmp(x)>=0&&(p=l,m=u),d.negative&&(d=d.neg(),f=f.neg()),p.negative&&(p=p.neg(),m=m.neg()),[{a:d,b:f},{a:p,b:m}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),o=i.mul(n.a),s=a.mul(r.a),c=i.mul(n.b),l=a.mul(r.b);return{k1:e.sub(o).sub(s),k2:c.add(l).neg()}},s.prototype.pointFromX=function(e,t){e=new r(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw Error(`invalid point`);var a=i.fromRed().isOdd();return(t&&!a||!t&&a)&&(i=i.redNeg()),this.point(e,i)},s.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0},s.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[a*2]=s,r[a*2+1]=c,i[a*2]=o.k1,i[a*2+1]=o.k2}for(var l=this._wnafMulAdd(1,r,i,a*2,n),u=0;u<a*2;u++)r[u]=null,i[u]=null;return l};function c(e,t,n,i){a.BasePoint.call(this,e,`affine`),t===null&&n===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(t,16),this.y=new r(n,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}i(c,a.BasePoint),s.prototype.point=function(e,t,n){return new c(this,e,t,n)},s.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,n){typeof t==`string`&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(i))}},r},c.prototype.inspect=function(){return this.isInfinity()?`<EC Point Infinity>`:`<EC Point x: `+this.x.fromRed().toString(16,2)+` y: `+this.y.fromRed().toString(16,2)+`>`},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e)||this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new r(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},c.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)};function l(e,t,n,i){a.BasePoint.call(this,e,`jacobian`),t===null&&n===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(t,16),this.y=new r(n,16),this.z=new r(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}i(l,a.BasePoint),s.prototype.jpoint=function(e,t,n){return new l(this,e,t,n)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),s=r.redSub(i),c=a.redSub(o);if(s.cmpn(0)===0)return c.cmpn(0)===0?this.dbl():this.curve.jpoint(null,null,null);var l=s.redSqr(),u=l.redMul(s),d=r.redMul(l),f=c.redSqr().redIAdd(u).redISub(d).redISub(d),p=c.redMul(d.redISub(f)).redISub(a.redMul(u)),m=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,p,m)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=n.redSub(r),s=i.redSub(a);if(o.cmpn(0)===0)return s.cmpn(0)===0?this.dbl():this.curve.jpoint(null,null,null);var c=o.redSqr(),l=c.redMul(o),u=n.redMul(c),d=s.redSqr().redIAdd(l).redISub(u).redISub(u),f=s.redMul(u.redISub(d)).redISub(i.redMul(l)),p=this.z.redMul(o);return this.curve.jpoint(d,f,p)},l.prototype.dblp=function(e){if(e===0||this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,a=this.x,o=this.y,s=this.z,c=s.redSqr().redSqr(),l=o.redAdd(o);for(t=0;t<e;t++){var u=a.redSqr(),d=l.redSqr(),f=d.redSqr(),p=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(c)),m=a.redMul(d),h=p.redSqr().redISub(m.redAdd(m)),g=m.redISub(h),_=p.redMul(g);_=_.redIAdd(_).redISub(f);var v=l.redMul(s);t+1<e&&(c=c.redMul(f)),a=h,s=v,l=_}return this.curve.jpoint(a,l.redMul(i),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r),c=s.redSqr().redISub(o).redISub(o),l=a.redIAdd(a);l=l.redIAdd(l),l=l.redIAdd(l),e=c,t=s.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),p=this.x.redAdd(d).redSqr().redISub(u).redISub(f);p=p.redIAdd(p);var m=u.redAdd(u).redIAdd(u),h=m.redSqr(),g=f.redIAdd(f);g=g.redIAdd(g),g=g.redIAdd(g),e=h.redISub(p).redISub(p),t=m.redMul(p.redISub(e)).redISub(g),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,t,n)},l.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=s.redSqr().redISub(o).redISub(o);e=c;var l=a.redIAdd(a);l=l.redIAdd(l),l=l.redIAdd(l),t=s.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),p=this.x.redSub(u).redMul(this.x.redAdd(u));p=p.redAdd(p).redIAdd(p);var m=f.redIAdd(f);m=m.redIAdd(m);var h=m.redAdd(m);e=p.redSqr().redISub(h),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),t=p.redMul(m.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},l.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),a=t.redSqr(),o=n.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),c=t.redAdd(t);c=c.redIAdd(c);var l=c.redMul(o),u=s.redSqr().redISub(l.redAdd(l)),d=l.redISub(u),f=o.redSqr();f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var p=s.redMul(d).redISub(f),m=n.redAdd(n).redMul(r);return this.curve.jpoint(u,p,m)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(a);var s=o.redSqr(),c=r.redIAdd(r);c=c.redIAdd(c),c=c.redIAdd(c),c=c.redIAdd(c);var l=i.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(c),u=t.redMul(l);u=u.redIAdd(u),u=u.redIAdd(u);var d=this.x.redMul(s).redISub(u);d=d.redIAdd(d),d=d.redIAdd(d);var f=this.y.redMul(l.redMul(c.redISub(l)).redISub(o.redMul(s)));f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var p=this.z.redAdd(o).redSqr().redISub(n).redISub(s);return this.curve.jpoint(d,f,p)},l.prototype.mul=function(e,t){return e=new r(e,t),this.curve._wnafMul(this,e)},l.prototype.eq=function(e){if(e.type===`affine`)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0)!==0)return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)===0},l.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(n)===0)return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}},l.prototype.inspect=function(){return this.isInfinity()?`<EC JPoint Infinity>`:`<EC JPoint x: `+this.x.toString(16,2)+` y: `+this.y.toString(16,2)+` z: `+this.z.toString(16,2)+`>`},l.prototype.isInfinity=function(){return this.z.cmpn(0)===0}})),At=n(((e,t)=>{var n=et(),r=u(),i=Ot(),a=Dt();function o(e){i.call(this,`mont`,e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}r(o,i),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return r.redSqrt().redSqr().cmp(r)===0};function s(e,t,r){i.BasePoint.call(this,e,`projective`),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(s,i.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},o.prototype.point=function(e,t){return new s(this,e,t)},o.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray(`be`,this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?`<EC Point Infinity>`:`<EC Point x: `+this.x.fromRed().toString(16,2)+` z: `+this.z.fromRed().toString(16,2)+`>`},s.prototype.isInfinity=function(){return this.z.cmpn(0)===0},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},s.prototype.add=function(){throw Error(`Not supported on Montgomery curve`)},s.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(n),o=i.redMul(r),s=t.z.redMul(a.redAdd(o).redSqr()),c=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,c)},s.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=this,a=[];t.cmpn(0)!==0;t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)a[o]===0?(n=n.diffAdd(r,i),r=r.dbl()):(r=n.diffAdd(r,i),n=n.dbl());return r},s.prototype.mulAdd=function(){throw Error(`Not supported on Montgomery curve`)},s.prototype.jumlAdd=function(){throw Error(`Not supported on Montgomery curve`)},s.prototype.eq=function(e){return this.getX().cmp(e.getX())===0},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}})),jt=n(((e,t)=>{var n=Dt(),r=et(),i=u(),a=Ot(),o=n.assert;function s(e){this.twisted=(e.a|0)!=1,this.mOneA=this.twisted&&(e.a|0)==-1,this.extended=this.mOneA,a.call(this,`edwards`,e),this.a=new r(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)==1}i(s,a),t.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},s.prototype.pointFromX=function(e,t){e=new r(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),a=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=i.redMul(a.redInvm()),s=o.redSqrt();if(s.redSqr().redSub(o).cmp(this.zero)!==0)throw Error(`invalid point`);var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},s.prototype.pointFromY=function(e,t){e=new r(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),a=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=i.redMul(a.redInvm());if(o.cmp(this.zero)===0){if(t)throw Error(`invalid point`);return this.point(this.zero,e)}var s=o.redSqrt();if(s.redSqr().redSub(o).cmp(this.zero)!==0)throw Error(`invalid point`);return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return r.cmp(i)===0};function c(e,t,n,i,o){a.BasePoint.call(this,e,`projective`),t===null&&n===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new r(t,16),this.y=new r(n,16),this.z=i?new r(i,16):this.curve.one,this.t=o&&new r(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i(c,a.BasePoint),s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},s.prototype.point=function(e,t,n,r){return new c(this,e,t,n,r)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?`<EC Point Infinity>`:`<EC Point x: `+this.x.fromRed().toString(16,2)+` y: `+this.y.fromRed().toString(16,2)+` z: `+this.z.fromRed().toString(16,2)+`>`},c.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),o=a.redSub(n),s=r.redSub(t),c=i.redMul(o),l=a.redMul(s),u=i.redMul(s),d=o.redMul(a);return this.curve.point(c,l,d,u)},c.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),n=this.y.redSqr(),r,i,a,o,s,c;if(this.curve.twisted){o=this.curve._mulA(t);var l=o.redAdd(n);this.zOne?(r=e.redSub(t).redSub(n).redMul(l.redSub(this.curve.two)),i=l.redMul(o.redSub(n)),a=l.redSqr().redSub(l).redSub(l)):(s=this.z.redSqr(),c=l.redSub(s).redISub(s),r=e.redSub(t).redISub(n).redMul(c),i=l.redMul(o.redSub(n)),a=l.redMul(c))}else o=t.redAdd(n),s=this.curve._mulC(this.z).redSqr(),c=o.redSub(s).redSub(s),r=this.curve._mulC(e.redISub(o)).redMul(c),i=this.curve._mulC(o).redMul(t.redISub(n)),a=o.redMul(c);return this.curve.point(r,i,a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(t),o=i.redSub(r),s=i.redAdd(r),c=n.redAdd(t),l=a.redMul(o),u=s.redMul(c),d=a.redMul(c),f=o.redMul(s);return this.curve.point(l,u,f,d)},c.prototype._projAdd=function(e){var t=this.z.redMul(e.z),n=t.redSqr(),r=this.x.redMul(e.x),i=this.y.redMul(e.y),a=this.curve.d.redMul(r).redMul(i),o=n.redSub(a),s=n.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(r).redISub(i),l=t.redMul(o).redMul(c),u,d;return this.curve.twisted?(u=t.redMul(s).redMul(i.redSub(this.curve._mulA(r))),d=o.redMul(s)):(u=t.redMul(s).redMul(i.redSub(r)),d=this.curve._mulC(o).redMul(s)),this.curve.point(l,u,d)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},c.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&=this.t.redMul(e),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),this.x.cmp(t)===0)return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add})),Mt=n((e=>{var t=e;t.base=Ot(),t.short=kt(),t.mont=At(),t.edwards=jt()})),Nt=n((e=>{var t=Ee();e.inherits=u();function n(e,t){return(e.charCodeAt(t)&64512)!=55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)==56320}function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e==`string`){if(!t)for(var i=0,a=0;a<e.length;a++){var o=e.charCodeAt(a);o<128?r[i++]=o:o<2048?(r[i++]=o>>6|192,r[i++]=o&63|128):n(e,a)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++a)&1023),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=o&63|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=o&63|128)}else if(t===`hex`)for(e=e.replace(/[^a-z0-9]+/gi,``),e.length%2!=0&&(e=`0`+e),a=0;a<e.length;a+=2)r.push(parseInt(e[a]+e[a+1],16))}else for(a=0;a<e.length;a++)r[a]=e[a]|0;return r}e.toArray=r;function i(e){for(var t=``,n=0;n<e.length;n++)t+=s(e[n].toString(16));return t}e.toHex=i;function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24)>>>0}e.htonl=a;function o(e,t){for(var n=``,r=0;r<e.length;r++){var i=e[r];t===`little`&&(i=a(i)),n+=c(i.toString(16))}return n}e.toHex32=o;function s(e){return e.length===1?`0`+e:e}e.zero2=s;function c(e){return e.length===7?`0`+e:e.length===6?`00`+e:e.length===5?`000`+e:e.length===4?`0000`+e:e.length===3?`00000`+e:e.length===2?`000000`+e:e.length===1?`0000000`+e:e}e.zero8=c;function l(e,n,r,i){var a=r-n;t(a%4==0);for(var o=Array(a/4),s=0,c=n;s<o.length;s++,c+=4)o[s]=(i===`big`?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c])>>>0;return o}e.join32=l;function d(e,t){for(var n=Array(e.length*4),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];t===`big`?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=a&255):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=a&255)}return n}e.split32=d;function f(e,t){return e>>>t|e<<32-t}e.rotr32=f;function p(e,t){return e<<t|e>>>32-t}e.rotl32=p;function m(e,t){return e+t>>>0}e.sum32=m;function h(e,t,n){return e+t+n>>>0}e.sum32_3=h;function g(e,t,n,r){return e+t+n+r>>>0}e.sum32_4=g;function _(e,t,n,r,i){return e+t+n+r+i>>>0}e.sum32_5=_;function v(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0;e[t]=+(a<r)+n+i>>>0,e[t+1]=a}e.sum64=v;function y(e,t,n,r){return+(t+r>>>0<t)+e+n>>>0}e.sum64_hi=y;function b(e,t,n,r){return t+r>>>0}e.sum64_lo=b;function x(e,t,n,r,i,a,o,s){var c=0,l=t;return l=l+r>>>0,c+=+(l<t),l=l+a>>>0,c+=+(l<a),l=l+s>>>0,c+=+(l<s),e+n+i+o+c>>>0}e.sum64_4_hi=x;function S(e,t,n,r,i,a,o,s){return t+r+a+s>>>0}e.sum64_4_lo=S;function C(e,t,n,r,i,a,o,s,c,l){var u=0,d=t;return d=d+r>>>0,u+=+(d<t),d=d+a>>>0,u+=+(d<a),d=d+s>>>0,u+=+(d<s),d=d+l>>>0,u+=+(d<l),e+n+i+o+c+u>>>0}e.sum64_5_hi=C;function w(e,t,n,r,i,a,o,s,c,l){return t+r+a+s+l>>>0}e.sum64_5_lo=w;function T(e,t,n){return(t<<32-n|e>>>n)>>>0}e.rotr64_hi=T;function E(e,t,n){return(e<<32-n|t>>>n)>>>0}e.rotr64_lo=E;function D(e,t,n){return e>>>n}e.shr64_hi=D;function O(e,t,n){return(e<<32-n|t>>>n)>>>0}e.shr64_lo=O})),Pt=n((e=>{var t=Nt(),n=Ee();function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian=`big`,this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=r,r.prototype.update=function(e,n){if(e=t.toArray(e,n),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),this.pending.length===0&&(this.pending=null),e=t.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},r.prototype.digest=function(e){return this.update(this._pad()),n(this.pending===null),this._digest(e)},r.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,this.endian===`big`){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=e&255}else for(r[i++]=e&255,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r}})),Ft=n((e=>{var t=Nt().rotr32;function n(e,t,n,o){if(e===0)return r(t,n,o);if(e===1||e===3)return a(t,n,o);if(e===2)return i(t,n,o)}e.ft_1=n;function r(e,t,n){return e&t^~e&n}e.ch32=r;function i(e,t,n){return e&t^e&n^t&n}e.maj32=i;function a(e,t,n){return e^t^n}e.p32=a;function o(e){return t(e,2)^t(e,13)^t(e,22)}e.s0_256=o;function s(e){return t(e,6)^t(e,11)^t(e,25)}e.s1_256=s;function c(e){return t(e,7)^t(e,18)^e>>>3}e.g0_256=c;function l(e){return t(e,17)^t(e,19)^e>>>10}e.g1_256=l})),It=n(((e,t)=>{var n=Nt(),r=Pt(),i=Ft(),a=n.rotl32,o=n.sum32,s=n.sum32_5,c=i.ft_1,l=r.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}n.inherits(d,l),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],l=this.h[1],d=this.h[2],f=this.h[3],p=this.h[4];for(r=0;r<n.length;r++){var m=~~(r/20),h=s(a(i,5),c(m,l,d,f),p,n[r],u[m]);p=f,f=d,d=a(l,30),l=i,i=h}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],l),this.h[2]=o(this.h[2],d),this.h[3]=o(this.h[3],f),this.h[4]=o(this.h[4],p)},d.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h,`big`):n.split32(this.h,`big`)}})),Lt=n(((e,t)=>{var n=Nt(),r=Pt(),i=Ft(),a=Ee(),o=n.sum32,s=n.sum32_4,c=n.sum32_5,l=i.ch32,u=i.maj32,d=i.s0_256,f=i.s1_256,p=i.g0_256,m=i.g1_256,h=r.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function _(){if(!(this instanceof _))return new _;h.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=Array(64)}n.inherits(_,h),t.exports=_,_.blockSize=512,_.outSize=256,_.hmacStrength=192,_.padLength=64,_.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=s(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],h=this.h[1],g=this.h[2],_=this.h[3],v=this.h[4],y=this.h[5],b=this.h[6],x=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var S=c(x,f(v),l(v,y,b),this.k[r],n[r]),C=o(d(i),u(i,h,g));x=b,b=y,y=v,v=o(_,S),_=g,g=h,h=i,i=o(S,C)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],h),this.h[2]=o(this.h[2],g),this.h[3]=o(this.h[3],_),this.h[4]=o(this.h[4],v),this.h[5]=o(this.h[5],y),this.h[6]=o(this.h[6],b),this.h[7]=o(this.h[7],x)},_.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h,`big`):n.split32(this.h,`big`)}})),Rt=n(((e,t)=>{var n=Nt(),r=Lt();function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(i,r),t.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h.slice(0,7),`big`):n.split32(this.h.slice(0,7),`big`)}})),zt=n(((e,t)=>{var n=Nt(),r=Pt(),i=Ee(),a=n.rotr64_hi,o=n.rotr64_lo,s=n.shr64_hi,c=n.shr64_lo,l=n.sum64,u=n.sum64_hi,d=n.sum64_lo,f=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,h=n.sum64_5_lo,g=r.BlockHash,_=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=_,this.W=Array(160)}n.inherits(v,g),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=k(n[r-4],n[r-3]),a=A(n[r-4],n[r-3]),o=n[r-14],s=n[r-13],c=D(n[r-30],n[r-29]),l=O(n[r-30],n[r-29]),u=n[r-32],d=n[r-31];n[r]=f(i,a,o,s,c,l,u,d),n[r+1]=p(i,a,o,s,c,l,u,d)}},v.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],c=this.h[4],f=this.h[5],p=this.h[6],g=this.h[7],_=this.h[8],v=this.h[9],D=this.h[10],O=this.h[11],k=this.h[12],A=this.h[13],ee=this.h[14],j=this.h[15];i(this.k.length===n.length);for(var M=0;M<n.length;M+=2){var te=ee,N=j,P=T(_,v),ne=E(_,v),F=y(_,v,D,O,k,A),I=b(_,v,D,O,k,A),re=this.k[M],L=this.k[M+1],R=n[M],ie=n[M+1],z=m(te,N,P,ne,F,I,re,L,R,ie),B=h(te,N,P,ne,F,I,re,L,R,ie);te=C(r,a),N=w(r,a),P=x(r,a,o,s,c,f),ne=S(r,a,o,s,c,f);var ae=u(te,N,P,ne),V=d(te,N,P,ne);ee=k,j=A,k=D,A=O,D=_,O=v,_=u(p,g,z,B),v=d(g,g,z,B),p=c,g=f,c=o,f=s,o=r,s=a,r=u(z,B,ae,V),a=d(z,B,ae,V)}l(this.h,0,r,a),l(this.h,2,o,s),l(this.h,4,c,f),l(this.h,6,p,g),l(this.h,8,_,v),l(this.h,10,D,O),l(this.h,12,k,A),l(this.h,14,ee,j)},v.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h,`big`):n.split32(this.h,`big`)};function y(e,t,n,r,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function b(e,t,n,r,i,a){var o=t&r^~t&a;return o<0&&(o+=4294967296),o}function x(e,t,n,r,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function S(e,t,n,r,i,a){var o=t&r^t&a^r&a;return o<0&&(o+=4294967296),o}function C(e,t){var n=a(e,t,28),r=a(t,e,2),i=a(t,e,7),o=n^r^i;return o<0&&(o+=4294967296),o}function w(e,t){var n=o(e,t,28),r=o(t,e,2),i=o(t,e,7),a=n^r^i;return a<0&&(a+=4294967296),a}function T(e,t){var n=a(e,t,14),r=a(e,t,18),i=a(t,e,9),o=n^r^i;return o<0&&(o+=4294967296),o}function E(e,t){var n=o(e,t,14),r=o(e,t,18),i=o(t,e,9),a=n^r^i;return a<0&&(a+=4294967296),a}function D(e,t){var n=a(e,t,1),r=a(e,t,8),i=s(e,t,7),o=n^r^i;return o<0&&(o+=4294967296),o}function O(e,t){var n=o(e,t,1),r=o(e,t,8),i=c(e,t,7),a=n^r^i;return a<0&&(a+=4294967296),a}function k(e,t){var n=a(e,t,19),r=a(t,e,29),i=s(e,t,6),o=n^r^i;return o<0&&(o+=4294967296),o}function A(e,t){var n=o(e,t,19),r=o(t,e,29),i=c(e,t,6),a=n^r^i;return a<0&&(a+=4294967296),a}})),Bt=n(((e,t)=>{var n=Nt(),r=zt();function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,r),t.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return e===`hex`?n.toHex32(this.h.slice(0,12),`big`):n.split32(this.h.slice(0,12),`big`)}})),Vt=n((e=>{e.sha1=It(),e.sha224=Rt(),e.sha256=Lt(),e.sha384=Bt(),e.sha512=zt()})),Ht=n((e=>{var t=Nt(),n=Pt(),r=t.rotl32,i=t.sum32,a=t.sum32_3,o=t.sum32_4,s=n.BlockHash;function c(){if(!(this instanceof c))return new c;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian=`little`}t.inherits(c,s),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n=this.h[0],s=this.h[1],c=this.h[2],g=this.h[3],_=this.h[4],v=n,y=s,b=c,x=g,S=_,C=0;C<80;C++){var w=i(r(o(n,l(C,s,c,g),e[f[C]+t],u(C)),m[C]),_);n=_,_=g,g=r(c,10),c=s,s=w,w=i(r(o(v,l(79-C,y,b,x),e[p[C]+t],d(C)),h[C]),S),v=S,S=x,x=r(b,10),b=y,y=w}w=a(this.h[1],c,x),this.h[1]=a(this.h[2],g,S),this.h[2]=a(this.h[3],_,v),this.h[3]=a(this.h[4],n,y),this.h[4]=a(this.h[0],s,b),this.h[0]=w},c.prototype._digest=function(e){return e===`hex`?t.toHex32(this.h,`little`):t.split32(this.h,`little`)};function l(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]})),Ut=n(((e,t)=>{var n=Nt(),r=Ee();function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}t.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),r(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=new this.Hash().update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=new this.Hash().update(e)},i.prototype.update=function(e,t){return this.inner.update(e,t),this},i.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}})),Wt=n((e=>{var t=e;t.utils=Nt(),t.common=Pt(),t.sha=Vt(),t.ripemd=Ht(),t.hmac=Ut(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160})),Gt=n(((e,t)=>{t.exports={doubles:{step:4,points:[[`e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a`,`f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821`],[`8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508`,`11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf`],[`175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739`,`d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695`],[`363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640`,`4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9`],[`8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c`,`4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36`],[`723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda`,`96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f`],[`eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa`,`5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999`],[`100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0`,`cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09`],[`e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d`,`9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d`],[`feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d`,`e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088`],[`da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1`,`9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d`],[`53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0`,`5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8`],[`8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047`,`10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a`],[`385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862`,`283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453`],[`6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7`,`7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160`],[`3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd`,`56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0`],[`85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83`,`7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6`],[`948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a`,`53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589`],[`6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8`,`bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17`],[`e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d`,`4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda`],[`e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725`,`7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd`],[`213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754`,`4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2`],[`4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c`,`17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6`],[`fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6`,`6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f`],[`76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39`,`c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01`],[`c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891`,`893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3`],[`d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b`,`febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f`],[`b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03`,`2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7`],[`e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d`,`eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78`],[`a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070`,`7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1`],[`90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4`,`e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150`],[`8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da`,`662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82`],[`e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11`,`1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc`],[`8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e`,`efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b`],[`e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41`,`2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51`],[`b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef`,`67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45`],[`d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8`,`db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120`],[`324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d`,`648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84`],[`4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96`,`35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d`],[`9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd`,`ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d`],[`6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5`,`9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8`],[`a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266`,`40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8`],[`7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71`,`34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac`],[`928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac`,`c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f`],[`85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751`,`1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962`],[`ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e`,`493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907`],[`827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241`,`c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec`],[`eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3`,`be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d`],[`e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f`,`4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414`],[`1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19`,`aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd`],[`146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be`,`b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0`],[`fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9`,`6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811`],[`da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2`,`8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1`],[`a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13`,`7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c`],[`174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c`,`ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73`],[`959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba`,`2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd`],[`d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151`,`e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405`],[`64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073`,`d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589`],[`8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458`,`38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e`],[`13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b`,`69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27`],[`bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366`,`d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1`],[`8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa`,`40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482`],[`8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0`,`620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945`],[`dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787`,`7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573`],[`f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e`,`ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82`]]},naf:{wnd:7,points:[[`f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9`,`388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672`],[`2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4`,`d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6`],[`5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc`,`6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da`],[`acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe`,`cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37`],[`774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb`,`d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b`],[`f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8`,`ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81`],[`d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e`,`581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58`],[`defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34`,`4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77`],[`2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c`,`85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a`],[`352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5`,`321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c`],[`2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f`,`2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67`],[`9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714`,`73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402`],[`daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729`,`a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55`],[`c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db`,`2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482`],[`6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4`,`e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82`],[`1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5`,`b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396`],[`605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479`,`2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49`],[`62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d`,`80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf`],[`80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f`,`1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a`],[`7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb`,`d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7`],[`d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9`,`eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933`],[`49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963`,`758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a`],[`77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74`,`958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6`],[`f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530`,`e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37`],[`463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b`,`5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e`],[`f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247`,`cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6`],[`caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1`,`cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476`],[`2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120`,`4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40`],[`7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435`,`91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61`],[`754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18`,`673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683`],[`e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8`,`59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5`],[`186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb`,`3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b`],[`df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f`,`55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417`],[`5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143`,`efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868`],[`290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba`,`e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a`],[`af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45`,`f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6`],[`766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a`,`744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996`],[`59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e`,`c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e`],[`f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8`,`e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d`],[`7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c`,`30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2`],[`948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519`,`e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e`],[`7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab`,`100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437`],[`3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca`,`ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311`],[`d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf`,`8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4`],[`1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610`,`68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575`],[`733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4`,`f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d`],[`15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c`,`d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d`],[`a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940`,`edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629`],[`e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980`,`a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06`],[`311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3`,`66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374`],[`34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf`,`9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee`],[`f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63`,`4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1`],[`d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448`,`fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b`],[`32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf`,`5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661`],[`7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5`,`8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6`],[`ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6`,`8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e`],[`16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5`,`5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d`],[`eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99`,`f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc`],[`78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51`,`f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4`],[`494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5`,`42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c`],[`a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5`,`204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b`],[`c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997`,`4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913`],[`841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881`,`73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154`],[`5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5`,`39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865`],[`36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66`,`d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc`],[`336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726`,`ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224`],[`8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede`,`6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e`],[`1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94`,`60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6`],[`85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31`,`3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511`],[`29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51`,`b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b`],[`a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252`,`ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2`],[`4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5`,`cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c`],[`d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b`,`6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3`],[`ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4`,`322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d`],[`af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f`,`6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700`],[`e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889`,`2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4`],[`591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246`,`b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196`],[`11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984`,`998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4`],[`3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a`,`b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257`],[`cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030`,`bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13`],[`c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197`,`6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096`],[`c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593`,`c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38`],[`a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef`,`21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f`],[`347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38`,`60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448`],[`da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a`,`49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a`],[`c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111`,`5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4`],[`4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502`,`7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437`],[`3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea`,`be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7`],[`cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26`,`8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d`],[`b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986`,`39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a`],[`d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e`,`62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54`],[`48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4`,`25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77`],[`dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda`,`ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517`],[`6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859`,`cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10`],[`e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f`,`f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125`],[`eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c`,`6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e`],[`13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942`,`fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1`],[`ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a`,`1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2`],[`b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80`,`5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423`],[`ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d`,`438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8`],[`8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1`,`cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758`],[`52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63`,`c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375`],[`e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352`,`6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d`],[`7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193`,`ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec`],[`5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00`,`9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0`],[`32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58`,`ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c`],[`e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7`,`d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4`],[`8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8`,`c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f`],[`4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e`,`67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649`],[`3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d`,`cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826`],[`674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b`,`299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5`],[`d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f`,`f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87`],[`30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6`,`462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b`],[`be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297`,`62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc`],[`93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a`,`7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c`],[`b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c`,`ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f`],[`d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52`,`4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a`],[`d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb`,`bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46`],[`463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065`,`bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f`],[`7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917`,`603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03`],[`74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9`,`cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08`],[`30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3`,`553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8`],[`9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57`,`712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373`],[`176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66`,`ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3`],[`75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8`,`9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8`],[`809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721`,`9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1`],[`1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180`,`4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9`]]}}})),Kt=n((e=>{var t=e,n=Wt(),r=Mt(),i=Dt().assert;function a(e){e.type===`short`?this.curve=new r.short(e):e.type===`edwards`?this.curve=new r.edwards(e):this.curve=new r.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),`Invalid curve`),i(this.g.mul(this.n).isInfinity(),`Invalid curve, G*N != O`)}t.PresetCurve=a;function o(e,n){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(n);return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:r}),r}})}o(`p192`,{type:`short`,prime:`p192`,p:`ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff`,a:`ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc`,b:`64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1`,n:`ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831`,hash:n.sha256,gRed:!1,g:[`188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012`,`07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811`]}),o(`p224`,{type:`short`,prime:`p224`,p:`ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001`,a:`ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe`,b:`b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4`,n:`ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d`,hash:n.sha256,gRed:!1,g:[`b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21`,`bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34`]}),o(`p256`,{type:`short`,prime:null,p:`ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff`,a:`ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc`,b:`5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b`,n:`ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551`,hash:n.sha256,gRed:!1,g:[`6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296`,`4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5`]}),o(`p384`,{type:`short`,prime:null,p:`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff`,a:`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc`,b:`b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef`,n:`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973`,hash:n.sha384,gRed:!1,g:[`aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7`,`3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f`]}),o(`p521`,{type:`short`,prime:null,p:`000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff`,a:`000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc`,b:`00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00`,n:`000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409`,hash:n.sha512,gRed:!1,g:[`000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66`,`00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650`]}),o(`curve25519`,{type:`mont`,prime:`p25519`,p:`7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed`,a:`76d06`,b:`1`,n:`1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed`,hash:n.sha256,gRed:!1,g:[`9`]}),o(`ed25519`,{type:`edwards`,prime:`p25519`,p:`7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed`,a:`-1`,c:`1`,d:`52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3`,n:`1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed`,hash:n.sha256,gRed:!1,g:[`216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a`,`6666666666666666666666666666666666666666666666666666666666666658`]});var s;try{s=Gt()}catch{s=void 0}o(`secp256k1`,{type:`short`,prime:`k256`,p:`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f`,a:`0`,b:`7`,n:`ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141`,h:`1`,hash:n.sha256,beta:`7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee`,lambda:`5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72`,basis:[{a:`3086d221a7d46bcde86c90e49284eb15`,b:`-e4437ed6010e88286f547fa90abfe4c3`},{a:`114ca50f7a8e2f3f657c1108d9d44cfd8`,b:`3086d221a7d46bcde86c90e49284eb15`}],gRed:!1,g:[`79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798`,`483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8`,s]})})),qt=n(((e,t)=>{var n=Wt(),r=Et(),i=Ee();function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=r.toArray(e.entropy,e.entropyEnc||`hex`),n=r.toArray(e.nonce,e.nonceEnc||`hex`),o=r.toArray(e.pers,e.persEnc||`hex`);i(t.length>=this.minEntropy/8,`Not enough entropy. Minimum is: `+this.minEntropy+` bits`),this._init(t,n,o)}t.exports=a,a.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,n,a){typeof t!=`string`&&(a=n,n=t,t=null),e=r.toArray(e,t),n=r.toArray(n,a),i(e.length>=this.minEntropy/8,`Not enough entropy. Minimum is: `+this.minEntropy+` bits`),this._update(e.concat(n||[])),this._reseed=1},a.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw Error(`Reseed is required`);typeof t!=`string`&&(i=n,n=t,t=null),n&&(n=r.toArray(n,i||`hex`),this._update(n));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var o=a.slice(0,e);return this._update(n),this._reseed++,r.encode(o,t)}})),Jt=n(((e,t)=>{var n=et(),r=Dt().assert;function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=i,i.fromPublic=function(e,t,n){return t instanceof i?t:new i(e,{pub:t,pubEnc:n})},i.fromPrivate=function(e,t,n){return t instanceof i?t:new i(e,{priv:t,privEnc:n})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:`Invalid public key`}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:`Public key * N != O`}:{result:!1,reason:`Public key is not a point`}},i.prototype.getPublic=function(e,t){return typeof e==`string`&&(t=e,e=null),this.pub||=this.ec.g.mul(this.priv),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return e===`hex`?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y){this.ec.curve.type===`mont`?r(e.x,`Need x coordinate`):(this.ec.curve.type===`short`||this.ec.curve.type===`edwards`)&&r(e.x&&e.y,`Need both x and y coordinate`),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.validate()||r(e.validate(),`public point not validated`),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},i.prototype.verify=function(e,t,n){return this.ec.verify(e,t,this,void 0,n)},i.prototype.inspect=function(){return`<Key priv: `+(this.priv&&this.priv.toString(16,2))+` pub: `+(this.pub&&this.pub.inspect())+` >`}})),Yt=n(((e,t)=>{var n=et(),r=Dt(),i=r.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(i(e.r&&e.s,`Signature without r or s`),this.r=new n(e.r,16),this.s=new n(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}t.exports=a;function o(){this.place=0}function s(e,t){var n=e[t.place++];if(!(n&128))return n;var r=n&15;if(r===0||r>4||e[t.place]===0)return!1;for(var i=0,a=0,o=t.place;a<r;a++,o++)i<<=8,i|=e[o],i>>>=0;return i<=127?!1:(t.place=o,i)}function c(e){for(var t=0,n=e.length-1;!e[t]&&!(e[t+1]&128)&&t<n;)t++;return t===0?e:e.slice(t)}a.prototype._importDER=function(e,t){e=r.toArray(e,t);var i=new o;if(e[i.place++]!==48)return!1;var a=s(e,i);if(a===!1||a+i.place!==e.length||e[i.place++]!==2)return!1;var c=s(e,i);if(c===!1||e[i.place]&128)return!1;var l=e.slice(i.place,c+i.place);if(i.place+=c,e[i.place++]!==2)return!1;var u=s(e,i);if(u===!1||e.length!==u+i.place||e[i.place]&128)return!1;var d=e.slice(i.place,u+i.place);if(l[0]===0)if(l[1]&128)l=l.slice(1);else return!1;if(d[0]===0)if(d[1]&128)d=d.slice(1);else return!1;return this.r=new n(l),this.s=new n(d),this.recoveryParam=null,!0};function l(e,t){if(t<128){e.push(t);return}var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(n|128);--n;)e.push(t>>>(n<<3)&255);e.push(t)}a.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=c(t),n=c(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];l(i,t.length),i=i.concat(t),i.push(2),l(i,n.length);var a=i.concat(n),o=[48];return l(o,a.length),o=o.concat(a),r.encode(o,e)}})),Xt=n(((e,t)=>{var n=et(),r=qt(),i=Dt(),a=Kt(),o=tt(),s=i.assert,c=Jt(),l=Yt();function u(e){if(!(this instanceof u))return new u(e);typeof e==`string`&&(s(Object.prototype.hasOwnProperty.call(a,e),`Unknown curve `+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=u,u.prototype.keyPair=function(e){return new c(this,e)},u.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},u.prototype.genKeyPair=function(e){e||={};for(var t=new r({hash:this.hash,pers:e.pers,persEnc:e.persEnc||`utf8`,entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||`utf8`,nonce:this.n.toArray()}),i=this.n.byteLength(),a=this.n.sub(new n(2));;){var s=new n(t.generate(i));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t,r){var i;if(n.isBN(e)||typeof e==`number`)e=new n(e,16),i=e.byteLength();else if(typeof e==`object`)i=e.length,e=new n(e,16);else{var a=e.toString();i=a.length+1>>>1,e=new n(a,16)}typeof r!=`number`&&(r=i*8);var o=r-this.n.bitLength();return o>0&&(e=e.ushrn(o)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,i,a){if(typeof i==`object`&&(a=i,i=null),a||={},typeof e!=`string`&&typeof e!=`number`&&!n.isBN(e)){s(typeof e==`object`&&e&&typeof e.length==`number`,`Expected message to be an array-like, a hex string, or a BN instance`),s(e.length>>>0===e.length);for(var o=0;o<e.length;o++)s((e[o]&255)===e[o])}t=this.keyFromPrivate(t,i),e=this._truncateToN(e,!1,a.msgBitLength),s(!e.isNeg(),`Can not sign a negative message`);var c=this.n.byteLength(),u=t.getPrivate().toArray(`be`,c),d=e.toArray(`be`,c);s(new n(d).eq(e),`Can not sign message`);for(var f=new r({hash:this.hash,entropy:u,nonce:d,pers:a.pers,persEnc:a.persEnc||`utf8`}),p=this.n.sub(new n(1)),m=0;;m++){var h=a.k?a.k(m):new n(f.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(p)>=0)){var g=this.g.mul(h);if(!g.isInfinity()){var _=g.getX(),v=_.umod(this.n);if(v.cmpn(0)!==0){var y=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var b=!!g.getY().isOdd()|(_.cmp(v)===0?0:2);return a.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new l({r:v,s:y,recoveryParam:b})}}}}}},u.prototype.verify=function(e,t,n,r,i){i||={},e=this._truncateToN(e,!1,i.msgBitLength),n=this.keyFromPublic(n,r),t=new l(t,`hex`);var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(a).umod(this.n),d;return this.curve._maxwellTrick?(d=this.g.jmulAdd(c,n.getPublic(),u),!d.isInfinity()&&d.eqXToP(a)):(d=this.g.mulAdd(c,n.getPublic(),u),!d.isInfinity()&&d.getX().umod(this.n).cmp(a)===0)},u.prototype.recoverPubKey=function(e,t,r,i){s((3&r)===r,`The recovery param is more than two bits`),t=new l(t,i);var a=this.n,o=new n(e),c=t.r,u=t.s,d=r&1,f=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw Error(`Unable to find sencond key candinate`);c=f?this.curve.pointFromX(c.add(this.curve.n),d):this.curve.pointFromX(c,d);var p=t.r.invm(a),m=a.sub(o).mul(p).umod(a),h=u.mul(p).umod(a);return this.g.mulAdd(m,c,h)},u.prototype.getKeyRecoveryParam=function(e,t,n,r){if(t=new l(t,r),t.recoveryParam!==null)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch{continue}if(a.eq(n))return i}throw Error(`Unable to find valid recovery factor`)}})),Zt=n(((e,t)=>{var n=Dt(),r=n.assert,i=n.parseBytes,a=n.cachedProperty;function o(e,t){this.eddsa=e,this._secret=i(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=i(t.pub)}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t})},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t})},o.prototype.secret=function(){return this._secret},a(o,`pubBytes`,function(){return this.eddsa.encodePoint(this.pub())}),a(o,`pub`,function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(o,`privBytes`,function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),a(o,`priv`,function(){return this.eddsa.decodeInt(this.privBytes())}),a(o,`hash`,function(){return this.eddsa.hash().update(this.secret()).digest()}),a(o,`messagePrefix`,function(){return this.hash().slice(this.eddsa.encodingLength)}),o.prototype.sign=function(e){return r(this._secret,`KeyPair can only verify`),this.eddsa.sign(e,this)},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},o.prototype.getSecret=function(e){return r(this._secret,`KeyPair is public only`),n.encode(this.secret(),e)},o.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},t.exports=o})),Qt=n(((e,t)=>{var n=et(),r=Dt(),i=r.assert,a=r.cachedProperty,o=r.parseBytes;function s(e,t){this.eddsa=e,typeof t!=`object`&&(t=o(t)),Array.isArray(t)&&(i(t.length===e.encodingLength*2,`Signature has invalid size`),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),i(t.R&&t.S,`Signature without R or S`),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(s,`S`,function(){return this.eddsa.decodeInt(this.Sencoded())}),a(s,`R`,function(){return this.eddsa.decodePoint(this.Rencoded())}),a(s,`Rencoded`,function(){return this.eddsa.encodePoint(this.R())}),a(s,`Sencoded`,function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return r.encode(this.toBytes(),`hex`).toUpperCase()},t.exports=s})),$t=n(((e,t)=>{var n=Wt(),r=Kt(),i=Dt(),a=i.assert,o=i.parseBytes,s=Zt(),c=Qt();function l(e){if(a(e===`ed25519`,`only tested with ed25519 so far`),!(this instanceof l))return new l(e);e=r[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=l,l.prototype.sign=function(e,t){e=o(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),a=this.encodePoint(i),s=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),c=r.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:a})},l.prototype.verify=function(e,t,n){if(e=o(e),t=this.makeSignature(t),t.S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(a)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return i.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return s.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return s.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray(`le`,this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},l.prototype.decodePoint=function(e){e=i.parseBytes(e);var t=e.length-1,n=e.slice(0,t).concat(e[t]&-129),r=(e[t]&128)!=0,a=i.intFromLE(n);return this.curve.pointFromY(a,r)},l.prototype.encodeInt=function(e){return e.toArray(`le`,this.encodingLength)},l.prototype.decodeInt=function(e){return i.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}})),en=n((e=>{var t=e;t.version=Tt().version,t.utils=Dt(),t.rand=tt(),t.curve=Mt(),t.curves=Kt(),t.ec=Xt(),t.eddsa=$t()})),tn=n((()=>{})),nn=n(((e,t)=>{(function(e,t){function n(e,t){if(!e)throw Error(t||`Assertion failed`)}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((t===`le`||t===`be`)&&(n=t,t=10),this._init(e||0,t||10,n||`be`))}typeof e==`object`?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;var a;try{a=typeof window<`u`&&window.Buffer!==void 0?window.Buffer:tn().Buffer}catch{}i.isBN=function(e){return e instanceof i||typeof e==`object`&&!!e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if(typeof e==`number`)return this._initNumber(e,t,r);if(typeof e==`object`)return this._initArray(e,t,r);t===`hex`&&(t=16),n(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,``);var i=0;e[0]===`-`&&(i++,this.negative=1),i<e.length&&(t===16?this._parseHex(e,i,r):(this._parseBase(e,t,i),r===`le`&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),r===`le`&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n(typeof e.length==`number`),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if(r===`be`)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if(r===`le`)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this._strip()};function o(e,t){var r=e.charCodeAt(t);if(r>=48&&r<=57)return r-48;if(r>=65&&r<=70)return r-55;if(r>=97&&r<=102)return r-87;n(!1,`Invalid character in `+e)}function s(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i=0,a=0,o;if(n===`be`)for(r=e.length-1;r>=t;r-=2)o=s(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=s(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()};function c(e,t,r,i){for(var a=0,o=0,s=Math.min(e.length,r),c=t;c<s;c++){var l=e.charCodeAt(c)-48;a*=i,o=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&o<i,`Invalid character`),a+=o}return a}i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(o!==0){var d=1;for(l=c(e,u,e.length,t),u=0;u<o;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},i.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red};function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.prototype._move=function(e){l(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<`u`&&typeof Symbol.for==`function`)try{i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?`<BN-R: `:`<BN: `)+this.toString(16)+`>`}var d=`.0.00.000.0000.00000.000000.0000000.00000000.000000000.0000000000.00000000000.000000000000.0000000000000.00000000000000.000000000000000.0000000000000000.00000000000000000.000000000000000000.0000000000000000000.00000000000000000000.000000000000000000000.0000000000000000000000.00000000000000000000000.000000000000000000000000.0000000000000000000000000`.split(`.`),f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){e||=10,t=t|0||1;var r;if(e===16||e===`hex`){r=``;for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=((s<<i|a)&16777215).toString(16);a=s>>>24-i&16777215,i+=2,i>=26&&(i-=26,o--),r=a!==0||o!==this.length-1?d[6-c.length]+c+r:c+r}for(a!==0&&(r=a.toString(16)+r);r.length%t!==0;)r=`0`+r;return this.negative!==0&&(r=`-`+r),r}if(e===(e|0)&&e>=2&&e<=36){var l=f[e],u=p[e];r=``;var m=this.clone();for(m.negative=0;!m.isZero();){var h=m.modrn(u).toString(e);m=m.idivn(u),r=m.isZero()?h+r:d[l-h.length]+h+r}for(this.isZero()&&(r=`0`+r);r.length%t!==0;)r=`0`+r;return this.negative!==0&&(r=`-`+r),r}n(!1,`Base should be between 2 and 36`)},i.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,`Number can only safely store up to 53 bits`),this.negative===0?e:-e},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var m=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,`byte array longer than desired length`),n(a>0,`Requested array length <= 0`);var o=m(e,a),s=t===`le`?`LE`:`BE`;return this[`_toArrayLike`+s](o,i),o},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|r;e[n++]=o&255,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),a===6?(n<e.length&&(e[n++]=o>>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|r;e[n--]=o&255,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),a===6?(n>=0&&(e[n--]=o>>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return t&8191||(n+=13,t>>>=13),t&127||(n+=7,t>>>=7),t&15||(n+=4,t>>>=4),t&3||(n+=2,t>>>=2),t&1||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function h(e){for(var t=Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return this.negative===0?this.clone():this.abs().inotn(e).iaddn(1)},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n((this.negative|e.negative)===0),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n((this.negative|e.negative)===0),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n((this.negative|e.negative)===0),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n(typeof e==`number`&&e>=0);var t=Math.ceil(e/26)|0,r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=~this.words[i]&67108863;for(r>0&&(this.words[i]=~this.words[i]&67108863>>26-r,i++);i<this.length;i++)this.words[i]=0;return this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n(typeof e==`number`&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(n.words[a]|0)+(r.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;for(;i!==0&&a<n.length;a++)t=(n.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;if(this.length=n.length,i!==0)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,i;n>0?(r=this,i=e):(r=e,i=this);for(var a=0,o=0;o<i.length;o++)t=(r.words[o]|0)-(i.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;for(;a!==0&&o<r.length;o++)t=(r.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;if(a===0&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=e.words[0]|0,a=t.words[0]|0,o=i*a,s=o&67108863,c=o/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var u=c>>>26,d=c&67108863,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var m=l-p|0;i=e.words[m]|0,a=t.words[p]|0,o=i*a+d,u+=o/67108864|0,d=o&67108863}n.words[l]=d|0,c=u|0}return c===0?n.length--:n.words[l]=c|0,n._strip()}var _=function(e,t,n){var r=e.words,i=t.words,a=n.words,o=0,s,c,l,u=r[0]|0,d=u&8191,f=u>>>13,p=r[1]|0,m=p&8191,h=p>>>13,g=r[2]|0,_=g&8191,v=g>>>13,y=r[3]|0,b=y&8191,x=y>>>13,S=r[4]|0,C=S&8191,w=S>>>13,T=r[5]|0,E=T&8191,D=T>>>13,O=r[6]|0,k=O&8191,A=O>>>13,ee=r[7]|0,j=ee&8191,M=ee>>>13,te=r[8]|0,N=te&8191,P=te>>>13,ne=r[9]|0,F=ne&8191,I=ne>>>13,re=i[0]|0,L=re&8191,R=re>>>13,ie=i[1]|0,z=ie&8191,B=ie>>>13,ae=i[2]|0,V=ae&8191,H=ae>>>13,oe=i[3]|0,se=oe&8191,U=oe>>>13,ce=i[4]|0,W=ce&8191,G=ce>>>13,le=i[5]|0,K=le&8191,q=le>>>13,ue=i[6]|0,J=ue&8191,de=ue>>>13,fe=i[7]|0,pe=fe&8191,me=fe>>>13,Y=i[8]|0,X=Y&8191,Z=Y>>>13,he=i[9]|0,ge=he&8191,_e=he>>>13;n.negative=e.negative^t.negative,n.length=19,s=Math.imul(d,L),c=Math.imul(d,R),c=c+Math.imul(f,L)|0,l=Math.imul(f,R);var ve=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ve>>>26)|0,ve&=67108863,s=Math.imul(m,L),c=Math.imul(m,R),c=c+Math.imul(h,L)|0,l=Math.imul(h,R),s=s+Math.imul(d,z)|0,c=c+Math.imul(d,B)|0,c=c+Math.imul(f,z)|0,l=l+Math.imul(f,B)|0;var ye=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ye>>>26)|0,ye&=67108863,s=Math.imul(_,L),c=Math.imul(_,R),c=c+Math.imul(v,L)|0,l=Math.imul(v,R),s=s+Math.imul(m,z)|0,c=c+Math.imul(m,B)|0,c=c+Math.imul(h,z)|0,l=l+Math.imul(h,B)|0,s=s+Math.imul(d,V)|0,c=c+Math.imul(d,H)|0,c=c+Math.imul(f,V)|0,l=l+Math.imul(f,H)|0;var be=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(be>>>26)|0,be&=67108863,s=Math.imul(b,L),c=Math.imul(b,R),c=c+Math.imul(x,L)|0,l=Math.imul(x,R),s=s+Math.imul(_,z)|0,c=c+Math.imul(_,B)|0,c=c+Math.imul(v,z)|0,l=l+Math.imul(v,B)|0,s=s+Math.imul(m,V)|0,c=c+Math.imul(m,H)|0,c=c+Math.imul(h,V)|0,l=l+Math.imul(h,H)|0,s=s+Math.imul(d,se)|0,c=c+Math.imul(d,U)|0,c=c+Math.imul(f,se)|0,l=l+Math.imul(f,U)|0;var xe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(xe>>>26)|0,xe&=67108863,s=Math.imul(C,L),c=Math.imul(C,R),c=c+Math.imul(w,L)|0,l=Math.imul(w,R),s=s+Math.imul(b,z)|0,c=c+Math.imul(b,B)|0,c=c+Math.imul(x,z)|0,l=l+Math.imul(x,B)|0,s=s+Math.imul(_,V)|0,c=c+Math.imul(_,H)|0,c=c+Math.imul(v,V)|0,l=l+Math.imul(v,H)|0,s=s+Math.imul(m,se)|0,c=c+Math.imul(m,U)|0,c=c+Math.imul(h,se)|0,l=l+Math.imul(h,U)|0,s=s+Math.imul(d,W)|0,c=c+Math.imul(d,G)|0,c=c+Math.imul(f,W)|0,l=l+Math.imul(f,G)|0;var Se=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Se>>>26)|0,Se&=67108863,s=Math.imul(E,L),c=Math.imul(E,R),c=c+Math.imul(D,L)|0,l=Math.imul(D,R),s=s+Math.imul(C,z)|0,c=c+Math.imul(C,B)|0,c=c+Math.imul(w,z)|0,l=l+Math.imul(w,B)|0,s=s+Math.imul(b,V)|0,c=c+Math.imul(b,H)|0,c=c+Math.imul(x,V)|0,l=l+Math.imul(x,H)|0,s=s+Math.imul(_,se)|0,c=c+Math.imul(_,U)|0,c=c+Math.imul(v,se)|0,l=l+Math.imul(v,U)|0,s=s+Math.imul(m,W)|0,c=c+Math.imul(m,G)|0,c=c+Math.imul(h,W)|0,l=l+Math.imul(h,G)|0,s=s+Math.imul(d,K)|0,c=c+Math.imul(d,q)|0,c=c+Math.imul(f,K)|0,l=l+Math.imul(f,q)|0;var Ce=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,s=Math.imul(k,L),c=Math.imul(k,R),c=c+Math.imul(A,L)|0,l=Math.imul(A,R),s=s+Math.imul(E,z)|0,c=c+Math.imul(E,B)|0,c=c+Math.imul(D,z)|0,l=l+Math.imul(D,B)|0,s=s+Math.imul(C,V)|0,c=c+Math.imul(C,H)|0,c=c+Math.imul(w,V)|0,l=l+Math.imul(w,H)|0,s=s+Math.imul(b,se)|0,c=c+Math.imul(b,U)|0,c=c+Math.imul(x,se)|0,l=l+Math.imul(x,U)|0,s=s+Math.imul(_,W)|0,c=c+Math.imul(_,G)|0,c=c+Math.imul(v,W)|0,l=l+Math.imul(v,G)|0,s=s+Math.imul(m,K)|0,c=c+Math.imul(m,q)|0,c=c+Math.imul(h,K)|0,l=l+Math.imul(h,q)|0,s=s+Math.imul(d,J)|0,c=c+Math.imul(d,de)|0,c=c+Math.imul(f,J)|0,l=l+Math.imul(f,de)|0;var we=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(we>>>26)|0,we&=67108863,s=Math.imul(j,L),c=Math.imul(j,R),c=c+Math.imul(M,L)|0,l=Math.imul(M,R),s=s+Math.imul(k,z)|0,c=c+Math.imul(k,B)|0,c=c+Math.imul(A,z)|0,l=l+Math.imul(A,B)|0,s=s+Math.imul(E,V)|0,c=c+Math.imul(E,H)|0,c=c+Math.imul(D,V)|0,l=l+Math.imul(D,H)|0,s=s+Math.imul(C,se)|0,c=c+Math.imul(C,U)|0,c=c+Math.imul(w,se)|0,l=l+Math.imul(w,U)|0,s=s+Math.imul(b,W)|0,c=c+Math.imul(b,G)|0,c=c+Math.imul(x,W)|0,l=l+Math.imul(x,G)|0,s=s+Math.imul(_,K)|0,c=c+Math.imul(_,q)|0,c=c+Math.imul(v,K)|0,l=l+Math.imul(v,q)|0,s=s+Math.imul(m,J)|0,c=c+Math.imul(m,de)|0,c=c+Math.imul(h,J)|0,l=l+Math.imul(h,de)|0,s=s+Math.imul(d,pe)|0,c=c+Math.imul(d,me)|0,c=c+Math.imul(f,pe)|0,l=l+Math.imul(f,me)|0;var Te=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Te>>>26)|0,Te&=67108863,s=Math.imul(N,L),c=Math.imul(N,R),c=c+Math.imul(P,L)|0,l=Math.imul(P,R),s=s+Math.imul(j,z)|0,c=c+Math.imul(j,B)|0,c=c+Math.imul(M,z)|0,l=l+Math.imul(M,B)|0,s=s+Math.imul(k,V)|0,c=c+Math.imul(k,H)|0,c=c+Math.imul(A,V)|0,l=l+Math.imul(A,H)|0,s=s+Math.imul(E,se)|0,c=c+Math.imul(E,U)|0,c=c+Math.imul(D,se)|0,l=l+Math.imul(D,U)|0,s=s+Math.imul(C,W)|0,c=c+Math.imul(C,G)|0,c=c+Math.imul(w,W)|0,l=l+Math.imul(w,G)|0,s=s+Math.imul(b,K)|0,c=c+Math.imul(b,q)|0,c=c+Math.imul(x,K)|0,l=l+Math.imul(x,q)|0,s=s+Math.imul(_,J)|0,c=c+Math.imul(_,de)|0,c=c+Math.imul(v,J)|0,l=l+Math.imul(v,de)|0,s=s+Math.imul(m,pe)|0,c=c+Math.imul(m,me)|0,c=c+Math.imul(h,pe)|0,l=l+Math.imul(h,me)|0,s=s+Math.imul(d,X)|0,c=c+Math.imul(d,Z)|0,c=c+Math.imul(f,X)|0,l=l+Math.imul(f,Z)|0;var Ee=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,s=Math.imul(F,L),c=Math.imul(F,R),c=c+Math.imul(I,L)|0,l=Math.imul(I,R),s=s+Math.imul(N,z)|0,c=c+Math.imul(N,B)|0,c=c+Math.imul(P,z)|0,l=l+Math.imul(P,B)|0,s=s+Math.imul(j,V)|0,c=c+Math.imul(j,H)|0,c=c+Math.imul(M,V)|0,l=l+Math.imul(M,H)|0,s=s+Math.imul(k,se)|0,c=c+Math.imul(k,U)|0,c=c+Math.imul(A,se)|0,l=l+Math.imul(A,U)|0,s=s+Math.imul(E,W)|0,c=c+Math.imul(E,G)|0,c=c+Math.imul(D,W)|0,l=l+Math.imul(D,G)|0,s=s+Math.imul(C,K)|0,c=c+Math.imul(C,q)|0,c=c+Math.imul(w,K)|0,l=l+Math.imul(w,q)|0,s=s+Math.imul(b,J)|0,c=c+Math.imul(b,de)|0,c=c+Math.imul(x,J)|0,l=l+Math.imul(x,de)|0,s=s+Math.imul(_,pe)|0,c=c+Math.imul(_,me)|0,c=c+Math.imul(v,pe)|0,l=l+Math.imul(v,me)|0,s=s+Math.imul(m,X)|0,c=c+Math.imul(m,Z)|0,c=c+Math.imul(h,X)|0,l=l+Math.imul(h,Z)|0,s=s+Math.imul(d,ge)|0,c=c+Math.imul(d,_e)|0,c=c+Math.imul(f,ge)|0,l=l+Math.imul(f,_e)|0;var De=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(De>>>26)|0,De&=67108863,s=Math.imul(F,z),c=Math.imul(F,B),c=c+Math.imul(I,z)|0,l=Math.imul(I,B),s=s+Math.imul(N,V)|0,c=c+Math.imul(N,H)|0,c=c+Math.imul(P,V)|0,l=l+Math.imul(P,H)|0,s=s+Math.imul(j,se)|0,c=c+Math.imul(j,U)|0,c=c+Math.imul(M,se)|0,l=l+Math.imul(M,U)|0,s=s+Math.imul(k,W)|0,c=c+Math.imul(k,G)|0,c=c+Math.imul(A,W)|0,l=l+Math.imul(A,G)|0,s=s+Math.imul(E,K)|0,c=c+Math.imul(E,q)|0,c=c+Math.imul(D,K)|0,l=l+Math.imul(D,q)|0,s=s+Math.imul(C,J)|0,c=c+Math.imul(C,de)|0,c=c+Math.imul(w,J)|0,l=l+Math.imul(w,de)|0,s=s+Math.imul(b,pe)|0,c=c+Math.imul(b,me)|0,c=c+Math.imul(x,pe)|0,l=l+Math.imul(x,me)|0,s=s+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,c=c+Math.imul(v,X)|0,l=l+Math.imul(v,Z)|0,s=s+Math.imul(m,ge)|0,c=c+Math.imul(m,_e)|0,c=c+Math.imul(h,ge)|0,l=l+Math.imul(h,_e)|0;var Oe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,s=Math.imul(F,V),c=Math.imul(F,H),c=c+Math.imul(I,V)|0,l=Math.imul(I,H),s=s+Math.imul(N,se)|0,c=c+Math.imul(N,U)|0,c=c+Math.imul(P,se)|0,l=l+Math.imul(P,U)|0,s=s+Math.imul(j,W)|0,c=c+Math.imul(j,G)|0,c=c+Math.imul(M,W)|0,l=l+Math.imul(M,G)|0,s=s+Math.imul(k,K)|0,c=c+Math.imul(k,q)|0,c=c+Math.imul(A,K)|0,l=l+Math.imul(A,q)|0,s=s+Math.imul(E,J)|0,c=c+Math.imul(E,de)|0,c=c+Math.imul(D,J)|0,l=l+Math.imul(D,de)|0,s=s+Math.imul(C,pe)|0,c=c+Math.imul(C,me)|0,c=c+Math.imul(w,pe)|0,l=l+Math.imul(w,me)|0,s=s+Math.imul(b,X)|0,c=c+Math.imul(b,Z)|0,c=c+Math.imul(x,X)|0,l=l+Math.imul(x,Z)|0,s=s+Math.imul(_,ge)|0,c=c+Math.imul(_,_e)|0,c=c+Math.imul(v,ge)|0,l=l+Math.imul(v,_e)|0;var ke=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ke>>>26)|0,ke&=67108863,s=Math.imul(F,se),c=Math.imul(F,U),c=c+Math.imul(I,se)|0,l=Math.imul(I,U),s=s+Math.imul(N,W)|0,c=c+Math.imul(N,G)|0,c=c+Math.imul(P,W)|0,l=l+Math.imul(P,G)|0,s=s+Math.imul(j,K)|0,c=c+Math.imul(j,q)|0,c=c+Math.imul(M,K)|0,l=l+Math.imul(M,q)|0,s=s+Math.imul(k,J)|0,c=c+Math.imul(k,de)|0,c=c+Math.imul(A,J)|0,l=l+Math.imul(A,de)|0,s=s+Math.imul(E,pe)|0,c=c+Math.imul(E,me)|0,c=c+Math.imul(D,pe)|0,l=l+Math.imul(D,me)|0,s=s+Math.imul(C,X)|0,c=c+Math.imul(C,Z)|0,c=c+Math.imul(w,X)|0,l=l+Math.imul(w,Z)|0,s=s+Math.imul(b,ge)|0,c=c+Math.imul(b,_e)|0,c=c+Math.imul(x,ge)|0,l=l+Math.imul(x,_e)|0;var Ae=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s=Math.imul(F,W),c=Math.imul(F,G),c=c+Math.imul(I,W)|0,l=Math.imul(I,G),s=s+Math.imul(N,K)|0,c=c+Math.imul(N,q)|0,c=c+Math.imul(P,K)|0,l=l+Math.imul(P,q)|0,s=s+Math.imul(j,J)|0,c=c+Math.imul(j,de)|0,c=c+Math.imul(M,J)|0,l=l+Math.imul(M,de)|0,s=s+Math.imul(k,pe)|0,c=c+Math.imul(k,me)|0,c=c+Math.imul(A,pe)|0,l=l+Math.imul(A,me)|0,s=s+Math.imul(E,X)|0,c=c+Math.imul(E,Z)|0,c=c+Math.imul(D,X)|0,l=l+Math.imul(D,Z)|0,s=s+Math.imul(C,ge)|0,c=c+Math.imul(C,_e)|0,c=c+Math.imul(w,ge)|0,l=l+Math.imul(w,_e)|0;var je=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(je>>>26)|0,je&=67108863,s=Math.imul(F,K),c=Math.imul(F,q),c=c+Math.imul(I,K)|0,l=Math.imul(I,q),s=s+Math.imul(N,J)|0,c=c+Math.imul(N,de)|0,c=c+Math.imul(P,J)|0,l=l+Math.imul(P,de)|0,s=s+Math.imul(j,pe)|0,c=c+Math.imul(j,me)|0,c=c+Math.imul(M,pe)|0,l=l+Math.imul(M,me)|0,s=s+Math.imul(k,X)|0,c=c+Math.imul(k,Z)|0,c=c+Math.imul(A,X)|0,l=l+Math.imul(A,Z)|0,s=s+Math.imul(E,ge)|0,c=c+Math.imul(E,_e)|0,c=c+Math.imul(D,ge)|0,l=l+Math.imul(D,_e)|0;var Me=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Me>>>26)|0,Me&=67108863,s=Math.imul(F,J),c=Math.imul(F,de),c=c+Math.imul(I,J)|0,l=Math.imul(I,de),s=s+Math.imul(N,pe)|0,c=c+Math.imul(N,me)|0,c=c+Math.imul(P,pe)|0,l=l+Math.imul(P,me)|0,s=s+Math.imul(j,X)|0,c=c+Math.imul(j,Z)|0,c=c+Math.imul(M,X)|0,l=l+Math.imul(M,Z)|0,s=s+Math.imul(k,ge)|0,c=c+Math.imul(k,_e)|0,c=c+Math.imul(A,ge)|0,l=l+Math.imul(A,_e)|0;var Ne=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s=Math.imul(F,pe),c=Math.imul(F,me),c=c+Math.imul(I,pe)|0,l=Math.imul(I,me),s=s+Math.imul(N,X)|0,c=c+Math.imul(N,Z)|0,c=c+Math.imul(P,X)|0,l=l+Math.imul(P,Z)|0,s=s+Math.imul(j,ge)|0,c=c+Math.imul(j,_e)|0,c=c+Math.imul(M,ge)|0,l=l+Math.imul(M,_e)|0;var Pe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,s=Math.imul(F,X),c=Math.imul(F,Z),c=c+Math.imul(I,X)|0,l=Math.imul(I,Z),s=s+Math.imul(N,ge)|0,c=c+Math.imul(N,_e)|0,c=c+Math.imul(P,ge)|0,l=l+Math.imul(P,_e)|0;var Fe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,s=Math.imul(F,ge),c=Math.imul(F,_e),c=c+Math.imul(I,ge)|0,l=Math.imul(I,_e);var Q=(o+s|0)+((c&8191)<<13)|0;return o=(l+(c>>>13)|0)+(Q>>>26)|0,Q&=67108863,a[0]=ve,a[1]=ye,a[2]=be,a[3]=xe,a[4]=Se,a[5]=Ce,a[6]=we,a[7]=Te,a[8]=Ee,a[9]=De,a[10]=Oe,a[11]=ke,a[12]=Ae,a[13]=je,a[14]=Me,a[15]=Ne,a[16]=Pe,a[17]=Fe,a[18]=Q,o!==0&&(a[19]=o,n.length++),n};Math.imul||(_=g);function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var o=i;i=0;for(var s=r&67108863,c=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=c;l++){var u=a-l,d=(e.words[u]|0)*(t.words[l]|0),f=d&67108863;o=o+(d/67108864|0)|0,f=f+s|0,s=f&67108863,o=o+(f>>>26)|0,i+=o>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return r===0?n.length--:n.words[a]=r,n._strip()}function y(e,t,n){return v(e,t,n)}i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=this.length===10&&e.length===10?_(this,e,t):r<63?g(this,e,t):r<1024?v(this,e,t):y(this,e,t),n};function b(e,t){this.x=e,this.y=t}b.prototype.makeRBT=function(e){for(var t=Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(e&1)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,a){for(var o=0;o<a;o++)r[o]=t[e[o]],i[o]=n[e[o]]},b.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=c,f=l,p=0;p<o;p++){var m=n[u+p],h=r[u+p],g=n[u+p+o],_=r[u+p+o],v=d*g-f*_;_=d*_+f*g,g=v,n[u+p]=m+g,r[u+p]=h+_,n[u+p+o]=m-g,r[u+p+o]=h-_,p!==s&&(v=c*d-l*f,f=c*f+l*d,d=v)}},b.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,r=n&1,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=Math.round(e[2*r+1]/t)*8192+Math.round(e[2*r]/t)+n;e[r]=i&67108863,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=e[o]|0,r[2*o]=a&8191,a>>>=13,r[2*o+1]=a&8191,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(a===0),n((a&-8192)==0)},b.prototype.stub=function(e){for(var t=Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),o=Array(r),s=Array(r),c=Array(r),l=Array(r),u=Array(r),d=Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,a,s,c,r,i),this.transform(l,a,u,d,r,i);for(var p=0;p<r;p++){var m=s[p]*u[p]-c[p]*d[p];c[p]=s[p]*d[p]+c[p]*u[p],s[p]=m}return this.conjugate(s,c,r),this.transform(s,c,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n(typeof e==`number`),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(this.words[i]|0)*e,o=(a&67108863)+(r&67108863);r>>=26,r+=a/67108864|0,r+=o>>>26,this.words[i]=o&67108863}return r!==0&&(this.words[i]=r,this.length++),e===0&&(this.length=1,this._normSign()),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=h(e);if(t.length===0)return new i(1);for(var n=this,r=0;r<t.length&&t[r]===0;r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())t[r]!==0&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26,i=67108863>>>26-t<<26-t,a;if(t!==0){var o=0;for(a=0;a<this.length;a++){var s=this.words[a]&i,c=(this.words[a]|0)-s<<t;this.words[a]=c|o,o=s>>>26-t}o&&(this.words[a]=o,this.length++)}if(r!==0){for(a=this.length-1;a>=0;a--)this.words[a+r]=this.words[a];for(a=0;a<r;a++)this.words[a]=0;this.length+=r}return this._strip()},i.prototype.ishln=function(e){return n(this.negative===0),this.iushln(e)},i.prototype.iushrn=function(e,t,r){n(typeof e==`number`&&e>=0);var i=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=r;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(o!==0)if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(u!==0||l>=i);l--){var d=this.words[l]|0;this.words[l]=u<<26-a|d>>>a,u=d&s}return c&&u!==0&&(c.words[c.length++]=u),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(this.negative===0),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return this.length<=r?!1:!!(this.words[r]&i)},i.prototype.imaskn=function(e){n(typeof e==`number`&&e>=0);var t=e%26,r=(e-t)/26;if(n(this.negative===0,`imaskn works only with positive numbers`),this.length<=r)return this;if(t!==0&&r++,this.length=Math.min(r,this.length),t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n(typeof e==`number`),n(e<67108864),e<0?this.isubn(-e):this.negative===0?this._iaddn(e):this.length===1&&(this.words[0]|0)<=e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n(typeof e==`number`),n(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i=e.length+r,a;this._expand(i);var o,s=0;for(a=0;a<e.length;a++){o=(this.words[a+r]|0)+s;var c=(e.words[a]|0)*t;o-=c&67108863,s=(o>>26)-(c/67108864|0),this.words[a+r]=o&67108863}for(;a<this.length-r;a++)o=(this.words[a+r]|0)+s,s=o>>26,this.words[a+r]=o&67108863;if(s===0)return this._strip();for(n(s===-1),s=0,a=0;a<this.length;a++)o=-(this.words[a]|0)+s,s=o>>26,this.words[a]=o&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),a=e,o=a.words[a.length-1]|0;n=26-this._countBits(o),n!==0&&(a=a.ushln(n),r.iushln(n),o=a.words[a.length-1]|0);var s=r.length-a.length,c;if(t!==`mod`){c=new i(null),c.length=s+1,c.words=Array(c.length);for(var l=0;l<c.length;l++)c.words[l]=0}var u=r.clone()._ishlnsubmul(a,1,s);u.negative===0&&(r=u,c&&(c.words[s]=1));for(var d=s-1;d>=0;d--){var f=(r.words[a.length+d]|0)*67108864+(r.words[a.length+d-1]|0);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(a,f,d);r.negative!==0;)f--,r.negative=0,r._ishlnsubmul(a,1,d),r.isZero()||(r.negative^=1);c&&(c.words[d]=f)}return c&&c._strip(),r._strip(),t!==`div`&&n!==0&&r.iushrn(n),{div:c||null,mod:r}},i.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var a,o,s;return this.negative!==0&&e.negative===0?(s=this.neg().divmod(e,t),t!==`mod`&&(a=s.div.neg()),t!==`div`&&(o=s.mod.neg(),r&&o.negative!==0&&o.iadd(e)),{div:a,mod:o}):this.negative===0&&e.negative!==0?(s=this.divmod(e.neg(),t),t!==`mod`&&(a=s.div.neg()),{div:a,mod:s.mod}):(this.negative&e.negative)===0?e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:e.length===1?t===`div`?{div:this.divn(e.words[0]),mod:null}:t===`mod`?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),t!==`div`&&(o=s.mod.neg(),r&&o.negative!==0&&o.isub(e)),{div:s.div,mod:o})},i.prototype.div=function(e){return this.divmod(e,`div`,!1).div},i.prototype.mod=function(e){return this.divmod(e,`mod`,!1).mod},i.prototype.umod=function(e){return this.divmod(e,`mod`,!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.mod.abs(),r=e.abs().iushrn(1),a=e.words[0]&1,o=n.cmp(r);if(o<0||a===1&&o===0)return t.div;var s=new i(1);return s.negative=this.negative^e.negative,t.div.iadd(s)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(this.words[a]|0))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(this.words[i]|0)+r*67108864;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(e.negative===0),n(!e.isZero());var t=this,r=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var a=new i(1),o=new i(0),s=new i(0),c=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;(t.words[0]&p)===0&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-->0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var m=0,h=1;(r.words[0]&h)===0&&m<26;++m,h<<=1);if(m>0)for(r.iushrn(m);m-->0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(e.negative===0),n(!e.isZero());var t=this,r=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var a=new i(1),o=new i(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;(t.words[0]&l)===0&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-->0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var u=0,d=1;(r.words[0]&d)===0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-->0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o)):(r.isub(t),o.isub(a))}var f=t.cmpn(1)===0?a:o;return f.cmpn(0)<0&&f.iadd(e),f},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(i===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return(this.words[0]&1)==0},i.prototype.isOdd=function(){return(this.words[0]&1)==1},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n(typeof e==`number`);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;a!==0&&o<this.length;o++){var s=this.words[o]|0;s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return a!==0&&(this.words[o]=a,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this._strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,`Number is too big`);var i=this.words[0]|0;r=i===e?0:i<e?-1:1}return this.negative===0?r:-r|0},i.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative===0?t:-t|0},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=this.words[n]|0,i=e.words[n]|0;if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return this.cmpn(e)===1},i.prototype.gt=function(e){return this.cmp(e)===1},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return this.cmpn(e)===-1},i.prototype.lt=function(e){return this.cmp(e)===-1},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return this.cmpn(e)===0},i.prototype.eq=function(e){return this.cmp(e)===0},i.red=function(e){return new D(e)},i.prototype.toRed=function(e){return n(!this.red,`Already a number in reduction context`),n(this.negative===0,`red works only with positives`),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,`fromRed works only with numbers in reduction context`),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,`Already a number in reduction context`),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,`redAdd works only with red numbers`),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,`redIAdd works only with red numbers`),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,`redSub works only with red numbers`),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,`redISub works only with red numbers`),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,`redShl works only with red numbers`),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,`redSqr works only with red numbers`),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,`redISqr works only with red numbers`),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,`redSqrt works only with red numbers`),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,`redInvm works only with red numbers`),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,`redNeg works only with red numbers`),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,`redPow(normalNum)`),this.red._verify1(this),this.red.pow(this,e)};var x={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}S.prototype._tmp=function(){var e=new i(null);return e.words=Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var r=n<this.n?-1:t.ucmp(this.p);return r===0?(t.words[0]=0,t.length=1):r>0?t.isub(this.p):t.strip===void 0?t._strip():t.strip(),t},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)};function C(){S.call(this,`k256`,`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f`)}r(C,S),C.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var o=e.words[i]|0;e.words[i-10]=(o&n)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,a===0&&e.length>10?e.length-=10:e.length-=9},C.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=e.words[n]|0;t+=r*977,e.words[n]=t&67108863,t=r*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function w(){S.call(this,`p224`,`ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001`)}r(w,S);function T(){S.call(this,`p192`,`ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff`)}r(T,S);function E(){S.call(this,`25519`,`7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed`)}r(E,S),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=(e.words[n]|0)*19+t,i=r&67108863;r>>>=26,e.words[n]=i,t=r}return t!==0&&(e.words[e.length++]=t),e},i._prime=function(e){if(x[e])return x[e];var t;if(e===`k256`)t=new C;else if(e===`p224`)t=new w;else if(e===`p192`)t=new T;else if(e===`p25519`)t=new E;else throw Error(`Unknown prime `+e);return x[e]=t,t};function D(e){if(typeof e==`string`){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),`modulus must be greater than 1`),this.m=e,this.prime=null}D.prototype._verify1=function(e){n(e.negative===0,`red works only with positives`),n(e.red,`red works only with red numbers`)},D.prototype._verify2=function(e,t){n((e.negative|t.negative)===0,`red works only with positives`),n(e.red&&e.red===t.red,`red works only with red numbers`)},D.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},D.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},D.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},D.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},D.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},D.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},D.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},D.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},D.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},D.prototype.isqr=function(e){return this.imul(e,e.clone())},D.prototype.sqr=function(e){return this.mul(e,e)},D.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),t===3){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&a.andln(1)===0;)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,l).cmp(c)!==0;)u.redIAdd(c);for(var d=this.pow(u,a),f=this.pow(e,a.addn(1).iushrn(1)),p=this.pow(e,a),m=o;p.cmp(s)!==0;){for(var h=p,g=0;h.cmp(s)!==0;g++)h=h.redSqr();n(g<m);var _=this.pow(d,new i(1).iushln(m-g-1));f=f.redMul(_),d=_.redSqr(),p=p.redMul(d),m=g}return f},D.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative===0?this.imod(t):(t.negative=0,this.imod(t).redNeg())},D.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,r=Array(1<<n);r[0]=new i(1).toRed(this),r[1]=e;for(var a=2;a<r.length;a++)r[a]=this.mul(r[a-1],e);var o=r[0],s=0,c=0,l=t.bitLength()%26;for(l===0&&(l=26),a=t.length-1;a>=0;a--){for(var u=t.words[a],d=l-1;d>=0;d--){var f=u>>d&1;if(o!==r[0]&&(o=this.sqr(o)),f===0&&s===0){c=0;continue}s<<=1,s|=f,c++,!(c!==n&&(a!==0||d!==0))&&(o=this.mul(o,r[s]),c=0,s=0)}l=26}return o},D.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},D.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new O(e)};function O(e){D.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}r(O,D),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}})(t===void 0||t,e)})),rn=n((e=>{var n=_n(),r=u(),i=e;i.define=function(e,t){return new a(e,t)};function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}a.prototype._createNamed=function(e){var n;try{n=t(`vm`).runInThisContext(`(function `+this.name+`(entity) {
@@ -81,7 +81,7 @@ gpgsig`+Qt(o)+`
81
81
  `,author:o,committer:s,signingKey:c})}async function Pa({fs:e,onSign:t,dir:n,gitdir:r=Y(n,`.git`),ref:i=`refs/notes/commits`,oid:a,author:o,committer:s,signingKey:c,cache:l={}}){try{$(`fs`,e),$(`gitdir`,r),$(`oid`,a);let n=new yn(e),u=await xn({fsp:n,dotgit:r}),d=await Vn({fs:n,gitdir:u,author:o});if(!d)throw new At(`author`);let f=await Hn({fs:n,gitdir:u,author:d,committer:s});if(!f)throw new At(`committer`);return await Na({fs:n,cache:l,onSign:t,gitdir:u,ref:i,oid:a,author:d,committer:f,signingKey:c})}catch(e){throw e.caller=`git.removeNote`,e}}async function Fa({fs:e,gitdir:t,oldref:n,ref:r,checkout:i=!1}){if(!er(r,!0))throw new Et(r,m.clean(r));if(!er(n,!0))throw new Et(n,m.clean(n));let a=`refs/heads/${n}`,o=`refs/heads/${r}`;if(await Q.exists({fs:e,gitdir:t,ref:o}))throw new ht(`branch`,r,!1);let s=await Q.resolve({fs:e,gitdir:t,ref:a,depth:1});await Q.writeRef({fs:e,gitdir:t,ref:o,value:s}),await Q.deleteRef({fs:e,gitdir:t,ref:a});let c=await kr({fs:e,gitdir:t,fullname:!0})===a;(i||c)&&await Q.writeSymbolicRef({fs:e,gitdir:t,ref:`HEAD`,value:o})}async function Ia({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r,oldref:i,checkout:a=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r),$(`oldref`,i);let t=new yn(e);return await Fa({fs:t,gitdir:await xn({fsp:t,dotgit:n}),ref:r,oldref:i,checkout:a})}catch(e){throw e.caller=`git.renameBranch`,e}}async function La({gitdir:e,type:t,object:n}){return j(Ue.wrap({type:t,object:n}))}async function Ra({fs:e,dir:t,gitdir:n=Y(t,`.git`),filepath:r,ref:i,cache:a={}}){try{$(`fs`,e),$(`gitdir`,n),$(`filepath`,r);let o=new yn(e),s=await xn({fsp:o,dotgit:n}),c,l;try{c=await Q.resolve({fs:o,gitdir:s,ref:i||`HEAD`})}catch(e){if(i)throw e}if(c)try{c=await qn({fs:o,cache:a,gitdir:s,oid:c,filepath:r})}catch{c=null}let u={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},d=t&&await o.read(Y(t,r));d&&(l=await La({gitdir:s,type:`blob`,object:d}),c===l&&(u=await o.lstat(Y(t,r)))),await ae.acquire({fs:o,gitdir:s,cache:a},async function(e){e.delete({filepath:r}),c&&e.insert({filepath:r,stats:u,oid:c})})}catch(e){throw e.caller=`git.reset`,e}}async function za({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r,depth:i}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r);let t=new yn(e),a=await xn({fsp:t,dotgit:n});return await Q.resolve({fs:t,gitdir:a,ref:r,depth:i})}catch(e){throw e.caller=`git.resolveRef`,e}}async function Ba({fs:e,dir:t,gitdir:n=Y(t,`.git`),path:r,value:i,append:a=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`path`,r);let t=new yn(e),o=await xn({fsp:t,dotgit:n}),s=await je.get({fs:t,gitdir:o});a?await s.append(r,i):await s.set(r,i),await je.save({fs:t,gitdir:o,config:s})}catch(e){throw e.caller=`git.setConfig`,e}}async function Va({fs:e,gitdir:t,commit:n}){return await An({fs:e,gitdir:t,type:`commit`,object:en.from(n).toObject(),format:`content`})}var Ha=class e{static get timezoneOffsetForRefLogEntry(){let e=new Date().getTimezoneOffset(),t=Math.abs(Math.floor(e/60)),n=Math.abs(e%60).toString().padStart(2,`0`);return`${e>0?`-`:`+`}${t.toString().padStart(2,`0`)}${n}`}static createStashReflogEntry(t,n,r){let i=t.name.replace(/\s/g,``),a=Math.floor(Date.now()/1e3),o=e.timezoneOffsetForRefLogEntry;return`0000000000000000000000000000000000000000 ${n} ${i} ${t.email} ${a} ${o}\t${r}\n`}static getStashReflogEntry(e,t=!1){return e.split(`
82
82
  `).filter(e=>e).reverse().map((e,n)=>t?`stash@{${n}}: ${e.split(` `)[1]}`:e)}},Ua=class e{constructor({fs:e,dir:t,gitdir:n=Y(t,`.git`)}){Object.assign(this,{fs:e,dir:t,gitdir:n,_author:null})}static get refStash(){return`refs/stash`}static get refLogsStash(){return`logs/refs/stash`}get refStashPath(){return Y(this.gitdir,e.refStash)}get refLogsStashPath(){return Y(this.gitdir,e.refLogsStash)}async getAuthor(){if(!this._author&&(this._author=await Vn({fs:this.fs,gitdir:this.gitdir,author:{}}),!this._author))throw new At(`author`);return this._author}async getStashSHA(e,t){return await this.fs.exists(this.refStashPath)?(t||await this.readStashReflogs({parsed:!1}))[e].split(` `)[1]:null}async writeStashCommit({message:e,tree:t,parent:n}){return Va({fs:this.fs,gitdir:this.gitdir,commit:{message:e,tree:t,parent:n,author:await this.getAuthor(),committer:await this.getAuthor()}})}async readStashCommit(e){let t=await this.readStashReflogs({parsed:!1});if(e!==0&&(e<0||e>t.length-1))throw new Et(`stash@${e}`,`number that is in range of [0, num of stash pushed]`);let n=await this.getStashSHA(e,t);return n?Wn({fs:this.fs,cache:{},gitdir:this.gitdir,oid:n}):{}}async writeStashRef(t){return Q.writeRef({fs:this.fs,gitdir:this.gitdir,ref:e.refStash,value:t})}async writeStashReflogEntry({stashCommit:e,message:t}){let n=await this.getAuthor(),r=Ha.createStashReflogEntry(n,e,t),i=this.refLogsStashPath;await br({filepath:i,entry:r},async()=>{let e=await this.fs.exists(i)?await this.fs.read(i,`utf8`):``;await this.fs.write(i,e+r,`utf8`)})}async readStashReflogs({parsed:e=!1}){if(!await this.fs.exists(this.refLogsStashPath))return[];let t=await this.fs.read(this.refLogsStashPath,`utf8`);return Ha.getStashReflogEntry(t,e)}};async function Wa({fs:e,dir:t,gitdir:n,message:r=``}){let i=new Ua({fs:e,dir:t,gitdir:n});await i.getAuthor();let a=await kr({fs:e,gitdir:n,fullname:!1}),o=await Q.resolve({fs:e,gitdir:n,ref:`HEAD`}),s=(await Ta({fs:e,dir:t,gitdir:n,oid:o})).commit.message,c=[o],l=null,u=rn({ref:`HEAD`}),d=await Cr({fs:e,dir:t,gitdir:n,treePair:[rn({ref:`HEAD`}),`stage`]});if(d){let e=await i.writeStashCommit({message:`stash-Index: WIP on ${a} - ${new Date().toISOString()}`,tree:d,parent:c});c.push(e),l=d,u=W()}let f=await Cr({fs:e,dir:t,gitdir:n,treePair:[u,`workdir`]});if(f){let e=await i.writeStashCommit({message:`stash-WorkDir: WIP on ${a} - ${new Date().toISOString()}`,tree:f,parent:[c[c.length-1]]});c.push(e),l=f}if(!l||!d&&!f)throw new G(`changes, nothing to stash`);let p=(r.trim()||`WIP on ${a}`)+`: ${o.substring(0,7)} ${s}`;return{stashCommit:await i.writeStashCommit({message:p,tree:l,parent:c}),stashMsg:p,branch:a,stashMgr:i}}async function Ga({fs:e,dir:t,gitdir:n,message:r=``}){let{stashCommit:i,stashMsg:a,branch:o,stashMgr:s}=await Wa({fs:e,dir:t,gitdir:n,message:r});return await s.writeStashRef(i),await s.writeStashReflogEntry({stashCommit:i,message:a}),await pr({fs:e,dir:t,gitdir:n,ref:o,track:!1,force:!0}),i}async function Ka({fs:e,dir:t,gitdir:n,message:r=``}){let{stashCommit:i}=await Wa({fs:e,dir:t,gitdir:n,message:r});return i}async function qa({fs:e,dir:t,gitdir:n,refIdx:r=0}){let i=await new Ua({fs:e,dir:t,gitdir:n}).readStashCommit(r),{parent:a=null}=i.commit?i.commit:{};if(!(!a||!Array.isArray(a)))for(let r=0;r<a.length-1;r++){let i=(await Wn({fs:e,cache:{},gitdir:n,oid:a[r+1]})).commit.message.startsWith(`stash-Index`);await wr({fs:e,dir:t,gitdir:n,stashCommit:a[r+1],parentCommit:a[r],wasStaged:i})}}async function Ja({fs:e,dir:t,gitdir:n,refIdx:r=0}){let i=new Ua({fs:e,dir:t,gitdir:n});if(!(await i.readStashCommit(r)).commit)return;let a=i.refStashPath;await br(a,async()=>{await e.exists(a)&&await e.rm(a)});let o=await i.readStashReflogs({parsed:!1});if(!o.length)return;o.splice(r,1);let s=i.refLogsStashPath;await br({reflogEntries:o,stashReflogPath:s,stashMgr:i},async()=>{if(o.length){await e.write(s,o.reverse().join(`
83
83
  `)+`
84
- `,`utf8`);let t=o[o.length-1].split(` `)[1];await i.writeStashRef(t)}else await e.rm(s)})}async function Ya({fs:e,dir:t,gitdir:n}){return new Ua({fs:e,dir:t,gitdir:n}).readStashReflogs({parsed:!0})}async function Xa({fs:e,dir:t,gitdir:n}){let r=new Ua({fs:e,dir:t,gitdir:n}),i=[r.refStashPath,r.refLogsStashPath];await br(i,async()=>{await Promise.all(i.map(async t=>{if(await e.exists(t))return e.rm(t)}))})}async function Za({fs:e,dir:t,gitdir:n,refIdx:r=0}){await qa({fs:e,dir:t,gitdir:n,refIdx:r}),await Ja({fs:e,dir:t,gitdir:n,refIdx:r})}async function Qa({fs:e,dir:t,gitdir:n=Y(t,`.git`),op:r=`push`,message:i=``,refIdx:a=0}){$(`fs`,e),$(`dir`,t),$(`gitdir`,n),$(`op`,r);let o={push:Ga,apply:qa,drop:Ja,list:Ya,clear:Xa,pop:Za,create:Ka},s=[`apply`,`drop`,`pop`];try{let c=new yn(e),l=await xn({fsp:c,dotgit:n});[`refs`,`logs`,`logs/refs`].map(e=>Y(l,e)).forEach(async e=>{await c.exists(e)||await c.mkdir(e)});let u=o[r];if(u){if(s.includes(r)&&a<0)throw new Et(`stash@${a}`,`number that is in range of [0, num of stash pushed]`);return await u({fs:c,dir:t,gitdir:l,message:i,refIdx:a})}throw Error(`To be implemented: ${r}`)}catch(e){throw e.caller=`git.stash`,e}}async function $a({fs:e,dir:t,gitdir:n=Y(t,`.git`),filepath:r,cache:i={}}){try{$(`fs`,e),$(`gitdir`,n),$(`filepath`,r);let a=new yn(e),o=await xn({fsp:a,dotgit:n});if(await wn.isIgnored({fs:a,gitdir:o,dir:t,filepath:r}))return`ignored`;let s=await eo({fs:a,cache:i,gitdir:o,tree:await to({fs:a,cache:i,gitdir:o}),path:r}),c=await ae.acquire({fs:a,gitdir:o,cache:i},async function(e){for(let t of e)if(t.path===r)return t;return null}),l=await a.lstat(Y(t,r)),u=s!==null,d=c!==null,f=l!==null,p=async()=>{if(d&&!re(c,l))return c.oid;{let e=await a.read(Y(t,r)),n=await La({gitdir:o,type:`blob`,object:e});return d&&c.oid===n&&l.size!==-1&&ae.acquire({fs:a,gitdir:o,cache:i},async function(e){e.insert({filepath:r,stats:l,oid:n})}),n}};if(!u&&!f&&!d)return`absent`;if(!u&&!f&&d)return`*absent`;if(!u&&f&&!d)return`*added`;if(!u&&f&&d)return await p()===c.oid?`added`:`*added`;if(u&&!f&&!d)return`deleted`;if(u&&!f&&d)return c.oid,`*deleted`;if(u&&f&&!d)return await p()===s?`*undeleted`:`*undeletemodified`;if(u&&f&&d){let e=await p();return e===s?e===c.oid?`unmodified`:`*unmodified`:e===c.oid?`modified`:`*modified`}}catch(e){throw e.caller=`git.status`,e}}async function eo({fs:e,cache:t,gitdir:n,tree:r,path:i}){typeof i==`string`&&(i=i.split(`/`));let a=i.shift();for(let o of r)if(o.path===a){if(i.length===0)return o.oid;let{type:r,object:a}=await mt({fs:e,cache:t,gitdir:n,oid:o.oid});if(r===`tree`)return eo({fs:e,cache:t,gitdir:n,tree:He.from(a),path:i});if(r===`blob`)throw new le(o.oid,r,`blob`,i.join(`/`))}return null}async function to({fs:e,cache:t,gitdir:n}){let r;try{r=await Q.resolve({fs:e,gitdir:n,ref:`HEAD`})}catch(e){if(e instanceof G)return[]}let{tree:i}=await Yn({fs:e,cache:t,gitdir:n,oid:r});return i}async function no({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r=`HEAD`,filepaths:i=[`.`],filter:a,cache:o={},ignored:s=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r);let c=new yn(e);return await dn({fs:c,cache:o,dir:t,gitdir:await xn({fsp:c,dotgit:n}),trees:[rn({ref:r}),on(),W()],map:async function(e,[n,r,o]){if(!n&&!o&&r&&!s&&await wn.isIgnored({fs:c,dir:t,filepath:e})||!i.some(t=>sr(e,t)))return null;if(a&&!a(e))return;let[l,u,d]=await Promise.all([n&&n.type(),r&&r.type(),o&&o.type()]),f=[l,u,d].includes(`blob`);if((l===`tree`||l===`special`)&&!f)return;if(l===`commit`)return null;if((u===`tree`||u===`special`)&&!f)return;if(d===`commit`)return null;if((d===`tree`||d===`special`)&&!f)return;let p=l===`blob`?await n.oid():void 0,m=d===`blob`?await o.oid():void 0,h;l!==`blob`&&u===`blob`&&d!==`blob`?h=`42`:u===`blob`&&(h=await r.oid());let g=[void 0,p,h,m],_=g.map(e=>g.indexOf(e));return _.shift(),[e,..._]}})}catch(e){throw e.caller=`git.statusMatrix`,e}}async function ro({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r,object:i,force:a=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r);let t=new yn(e);if(r===void 0)throw new jt(`ref`);r=r.startsWith(`refs/tags/`)?r:`refs/tags/${r}`;let o=await xn({fsp:t,dotgit:n}),s=await Q.resolve({fs:t,gitdir:o,ref:i||`HEAD`});if(!a&&await Q.exists({fs:t,gitdir:o,ref:r}))throw new ht(`tag`,r);await Q.writeRef({fs:t,gitdir:o,ref:r,value:s})}catch(e){throw e.caller=`git.tag`,e}}async function io({fs:e,dir:t,gitdir:n=Y(t,`.git`),cache:r={},filepath:i,oid:a,mode:o,add:s,remove:c,force:l}){try{$(`fs`,e),$(`gitdir`,n),$(`filepath`,i);let u=new yn(e),d=await xn({fsp:u,dotgit:n});if(c)return await ae.acquire({fs:u,gitdir:d,cache:r},async function(e){if(!l){let e=await u.lstat(Y(t,i));if(e){if(e.isDirectory())throw new Tt(`directory`);return}}e.has({filepath:i})&&e.delete({filepath:i})});let f;if(!a){if(f=await u.lstat(Y(t,i)),!f)throw new G(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new Tt(`directory`)}return await ae.acquire({fs:u,gitdir:d,cache:r},async function(e){if(!s&&!e.has({filepath:i}))throw new G(`file at "${i}" in index and "add" not set`);let n;if(a)n={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:o,uid:0,gid:0,size:0};else{n=f;let e=n.isSymbolicLink()?await u.readlink(Y(t,i)):await u.read(Y(t,i));a=await An({fs:u,gitdir:d,type:`blob`,format:`content`,object:e})}return e.insert({filepath:i,oid:a,stats:n}),a})}catch(e){throw e.caller=`git.updateIndex`,e}}function ao(){try{return $r.version}catch(e){throw e.caller=`git.version`,e}}async function oo({fs:e,dir:t,gitdir:n=Y(t,`.git`),trees:r,map:i,reduce:a,iterate:o,cache:s={}}){try{$(`fs`,e),$(`gitdir`,n),$(`trees`,r);let c=new yn(e);return await dn({fs:c,cache:s,dir:t,gitdir:await xn({fsp:c,dotgit:n}),trees:r,map:i,reduce:a,iterate:o})}catch(e){throw e.caller=`git.walk`,e}}async function so({fs:e,dir:t,gitdir:n=Y(t,`.git`),blob:r}){try{$(`fs`,e),$(`gitdir`,n),$(`blob`,r);let t=new yn(e);return await An({fs:t,gitdir:await xn({fsp:t,dotgit:n}),type:`blob`,object:r,format:`content`})}catch(e){throw e.caller=`git.writeBlob`,e}}async function co({fs:e,dir:t,gitdir:n=Y(t,`.git`),commit:r}){try{$(`fs`,e),$(`gitdir`,n),$(`commit`,r);let t=new yn(e);return await Va({fs:t,gitdir:await xn({fsp:t,dotgit:n}),commit:r})}catch(e){throw e.caller=`git.writeCommit`,e}}async function lo({fs:e,dir:t,gitdir:n=Y(t,`.git`),type:i,object:a,format:o=`parsed`,oid:s,encoding:c=void 0}){try{let t=new yn(e),l=await xn({fsp:t,dotgit:n});if(o===`parsed`){switch(i){case`commit`:a=en.from(a).toObject();break;case`tree`:a=He.from(a).toObject();break;case`blob`:a=r.Buffer.from(a,c);break;case`tag`:a=Zt.from(a).toObject();break;default:throw new le(s||``,i,`blob|commit|tag|tree`)}o=`content`}return s=await An({fs:t,gitdir:l,type:i,object:a,oid:s,format:o}),s}catch(e){throw e.caller=`git.writeObject`,e}}async function uo({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r,value:i,force:a=!1,symbolic:o=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r),$(`value`,i);let t=new yn(e);if(!er(r,!0))throw new Et(r,m.clean(r));let s=await xn({fsp:t,dotgit:n});if(!a&&await Q.exists({fs:t,gitdir:s,ref:r}))throw new ht(`ref`,r);o?await Q.writeSymbolicRef({fs:t,gitdir:s,ref:r,value:i}):(i=await Q.resolve({fs:t,gitdir:s,ref:i}),await Q.writeRef({fs:t,gitdir:s,ref:r,value:i}))}catch(e){throw e.caller=`git.writeRef`,e}}async function fo({fs:e,gitdir:t,tag:n}){return await An({fs:e,gitdir:t,type:`tag`,object:Zt.from(n).toObject(),format:`content`})}async function po({fs:e,dir:t,gitdir:n=Y(t,`.git`),tag:r}){try{$(`fs`,e),$(`gitdir`,n),$(`tag`,r);let t=new yn(e);return await fo({fs:t,gitdir:await xn({fsp:t,dotgit:n}),tag:r})}catch(e){throw e.caller=`git.writeTag`,e}}async function mo({fs:e,dir:t,gitdir:n=Y(t,`.git`),tree:r}){try{$(`fs`,e),$(`gitdir`,n),$(`tree`,r);let t=new yn(e);return await Xn({fs:t,gitdir:await xn({fsp:t,dotgit:n}),tree:r})}catch(e){throw e.caller=`git.writeTree`,e}}var ho={Errors:Ht,STAGE:W,TREE:rn,WORKDIR:on,add:Mn,abortMerge:Cn,addNote:Qn,addRemote:nr,annotatedTag:ir,branch:or,cherryPick:Er,checkout:pr,clone:li,commit:ui,getConfig:Mi,getConfigAll:Pi,setConfig:Ba,currentBranch:di,deleteBranch:pi,deleteRef:mi,deleteRemote:gi,deleteTag:vi,expandOid:Si,expandRef:Ci,fastForward:Di,fetch:Oi,findMergeBase:ki,findRoot:ji,getRemoteInfo:Fi,getRemoteInfo2:Li,hashBlob:zi,indexPack:Vi,init:Hi,isDescendent:Wi,isIgnored:Gi,listBranches:Ki,listFiles:Yi,listNotes:Zi,listRefs:Qi,listRemotes:ea,listServerRefs:ra,listTags:ia,log:la,merge:ua,packObjects:ma,pull:ha,push:xa,readBlob:wa,readCommit:Ta,readNote:Da,readObject:Oa,readTag:Aa,readTree:ja,remove:Ma,removeNote:Pa,renameBranch:Ia,resetIndex:Ra,updateIndex:io,resolveRef:za,status:$a,statusMatrix:no,tag:ro,version:ao,walk:oo,writeBlob:so,writeCommit:co,writeObject:lo,writeRef:uo,writeTag:po,writeTree:mo,stash:Qa};t.Errors=Ht,t.STAGE=W,t.TREE=rn,t.WORKDIR=on,t.abortMerge=Cn,t.add=Mn,t.addNote=Qn,t.addRemote=nr,t.annotatedTag=ir,t.branch=or,t.checkout=pr,t.cherryPick=Er,t.clone=li,t.commit=ui,t.currentBranch=di,t.default=ho,t.deleteBranch=pi,t.deleteRef=mi,t.deleteRemote=gi,t.deleteTag=vi,t.expandOid=Si,t.expandRef=Ci,t.fastForward=Di,t.fetch=Oi,t.findMergeBase=ki,t.findRoot=ji,t.getConfig=Mi,t.getConfigAll=Pi,t.getRemoteInfo=Fi,t.getRemoteInfo2=Li,t.hashBlob=zi,t.indexPack=Vi,t.init=Hi,t.isDescendent=Wi,t.isIgnored=Gi,t.listBranches=Ki,t.listFiles=Yi,t.listNotes=Zi,t.listRefs=Qi,t.listRemotes=ea,t.listServerRefs=ra,t.listTags=ia,t.log=la,t.merge=ua,t.packObjects=ma,t.pull=ha,t.push=xa,t.readBlob=wa,t.readCommit=Ta,t.readNote=Da,t.readObject=Oa,t.readTag=Aa,t.readTree=ja,t.remove=Ma,t.removeNote=Pa,t.renameBranch=Ia,t.resetIndex=Ra,t.resolveRef=za,t.setConfig=Ba,t.stash=Qa,t.status=$a,t.statusMatrix=no,t.tag=ro,t.updateIndex=io,t.version=ao,t.walk=oo,t.writeBlob=so,t.writeCommit=co,t.writeObject=lo,t.writeRef=uo,t.writeTag=po,t.writeTree=mo}))(),1),Vn=o();globalThis.Buffer||(globalThis.Buffer=Vn.Buffer);const Hn={async request({url:e,method:t=`GET`,headers:n={},body:r}){r&&=await Un(r);let i=await fetch(e,{method:t,headers:n,body:r,credentials:`omit`}),a=i.body&&typeof i.body.getReader==`function`?Wn(i.body):[new Uint8Array(await i.arrayBuffer())],o={};for(let[e,t]of i.headers.entries())o[e]=t;return{url:i.url,method:t,statusCode:i.status,statusMessage:i.statusText,body:a,headers:o}}};async function Un(e){let t=[];if(e[Symbol.asyncIterator])for await(let n of e)t.push(n);else if(e[Symbol.iterator])for(let n of e)t.push(n);else if(e.next){let n=await e.nexT();for(;!n.done;)t.push(n.value),n=await e.nexT()}else return e;let n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n),i=0;for(let e of t)r.set(e,i),i+=e.length;return r}function Wn(e){let t=e.getReader();return{next(){return t.read()},return(){return t.releaseLock(),{}},[Symbol.asyncIterator](){return this}}}let Gn=null,Kn=null,qn=null,Jn=null,Yn=null;function Xn(e){return e.trim().replace(/^[\\/]+/,``).replace(/[\\/]+$/,``).split(/[\\/]+/).filter(e=>e!==`.`&&e!==``).join(`/`)}const Zn=new class{_map=new Map;_maxSize;constructor(e=2048){this._maxSize=e}clear(){this._map.clear()}get(e){let t=this._map.get(e);return t!==void 0&&(this._map.delete(e),this._map.set(e,t)),t}invalidate(e){let t=e.endsWith(`/`)?e:e+`/`;for(let n of this._map.keys())(n===e||n.startsWith(t))&&this._map.delete(n)}set(e,t){if(this._map.size>=this._maxSize){let e=this._map.keys().next().value;e!==void 0&&this._map.delete(e)}this._map.set(e,t)}};async function Qn(e,t,n={},r=``){let i=e,a=r;for(let e of t){a=a?`${a}/${e}`:e;let t=Zn.get(a);t&&!n.create?i=t:(i=await i.getDirectoryHandle(e,{create:n.create??!1}),Zn.set(a,i))}return i}async function $n(e,t,n={}){let r=Xn(t),i=r.split(`/`).filter(Boolean);if(i.length===0)return e;let a=await Qn(e,i.slice(0,-1),n),o=i[i.length-1];if(n.forceFile||o.includes(`.`))try{return await a.getFileHandle(o,{create:n.create??!1})}catch{}try{let e=await a.getDirectoryHandle(o,{create:n.create??!1}),t=r;return Zn.set(t,e),e}catch{return await a.getFileHandle(o,{create:n.create??!1})}}async function er(e,t,n={}){let r=Xn(t).split(`/`).filter(Boolean);return r.length===0?e:Qn(e,r,n)}async function tr(e,t,n={}){let r=Xn(t).split(`/`).filter(Boolean);if(r.length===0)throw Error(`Cannot resolve '.' as file`);return(await Qn(e,r.slice(0,-1),n)).getFileHandle(r[r.length-1],{create:n.create??!1})}async function nr(e,t){let n=Xn(t).split(`/`).filter(Boolean);if(n.length===0)throw Error(`Cannot get parent of root`);let r=n[n.length-1];return[await Qn(e,n.slice(0,-1)),r]}function rr(e){return e.trim().replace(/\\/g,`/`).replace(/^\/+/,``).replace(/^\.\//,``)}function ir(e){let t=new Map,n=`repos/.git-modes`;function r(e){return e.replace(/\\/g,`/`.replace(/^\/+/,``))}async function i(){try{let r=await(await(await tr(e,n)).getFile()).text(),i=JSON.parse(r);for(let[e,n]of i)t.set(e,n)}catch{}}let a=null;function o(){a===null&&(a=setTimeout(async()=>{a=null;try{let r=await(await tr(e,n,{create:!0})).createWritable(),i=JSON.stringify([...t.entries()]);await r.write(new TextEncoder().encode(i)),await r.close()}catch{}},500))}let s=i(),c={async readFile(t,n){let r=await(await(await tr(e,t)).getFile()).arrayBuffer(),i=typeof n==`string`?n:n?.encoding;return i===`utf8`||i===`utf-8`?new TextDecoder().decode(r):new Uint8Array(r)},async writeFile(n,i,a){let s=await(await tr(e,n,{create:!0})).createWritable();typeof i==`string`&&(i=new TextEncoder().encode(i)),await s.write(i),await s.close();let c=typeof a==`object`&&a?a.mode:void 0,l=r(n);if(c!=null){let e=(c&73)!=0;t.set(l,e?33261:33188),o()}else t.has(l)||t.set(l,33188)},async mkdir(t){await er(e,t,{create:!0})},async rmdir(n){let[i,a]=await nr(e,n);await i.removeEntry(a,{recursive:!0});let o=r(n)+`/`;for(let e of t.keys())(e===r(n)||e.startsWith(o))&&t.delete(e);Zn.invalidate(Xn(n))},async readdir(t){let n=await er(e,t),r=[];for await(let[e]of n.entries())r.push(e);return r},async stat(n){await s;let i;try{i=await $n(e,n)}catch{let e=Error(`ENOENT: no such file or directory, stat '${n}'`);throw e.code=`ENOENT`,e}if(i.kind===`directory`){let e=new Date;return{isDirectory:()=>!0,isFile:()=>!1,isSymbolicLink:()=>!1,size:0,mtimeMs:Date.now(),mode:16877,ino:0,dev:0,nlink:1,uid:0,gid:0,ctime:e,mtime:e}}else{let e=await i.getFile(),a=new Date(e.lastModified),o=r(n),s=t.get(o)??33188;return{isDirectory:()=>!1,isFile:()=>!0,isSymbolicLink:()=>!1,size:e.size,mtimeMs:e.lastModified,mode:s,ino:0,dev:0,nlink:1,uid:0,gid:0,ctime:a,mtime:a}}},async lstat(e){return c.stat(e)},async unlink(n){let[i,a]=await nr(e,n);await i.removeEntry(a),t.delete(r(n))},async symlink(e,t){throw Error(`OPFS does not support symlinks`)},async readlink(e){return await c.readFile(e,`utf8`)}};return{promises:c}}const ar=ir,or=`repos`;function sr(e,t){if(e===`custom`&&t)return t;if(e===`public`)return`https://www.cors-anywhere.com`;let{protocol:n,host:a,hostname:o}=globalThis.location;return o===`localhost`||o===`127.0.0.1`?`${n}//${a}/git-proxy`:`http://${i}:${r}/git-proxy`}async function cr(){return Yn||=(async()=>{if(Gn=Bn.default,Kn=Hn,!qn){let e;try{e=await navigator.storage.getDirectory()}catch(t){console.warn(`OPFS is unavailable for git root, falling back to memory:`,t);let{getMemoryOpfsRoot:n}=await import(`./memoryStorage-CjGseKI1.js`).then(e=>e.n);e=n()}qn=ir(e),Jn=qn.promises}})(),await Yn,{git:Gn,http:Kn,fs:qn,pfs:Jn}}async function lr(e){let t=await cr();if(e){let n=ir(e);return{git:t.git,http:t.http,fs:n,pfs:n.promises,repoDirFn:e=>`repos/${e}`}}return{...t,repoDirFn:dr}}function ur(e){return(e.replace(/\/+$/,``).split(`/`).pop()||`repo`).replace(/\.git$/,``)}function dr(e){return`${or}/${e}`}async function fr(e,t,n){try{await e.getConfig({fs:t,dir:n,path:`core.filemode`})!==!1&&await e.setConfig({fs:t,dir:n,path:`core.filemode`,value:!1})}catch(e){console.error(`Failed to set core.filemode=false:`,e)}}async function pr(e,t){try{await e.mkdir(t)}catch{}}function mr({token:e,username:t,password:n}={}){if(!e&&!t)return{};let r;e?r={Authorization:`Basic ${btoa(`${e}:x-oauth-basic`)}`}:t&&(r={Authorization:`Basic ${btoa(`${t}:${n||``}`)}`});let i=()=>e?{username:e,password:`x-oauth-basic`}:t?{username:t,password:n||``}:{cancel:!0},a=()=>({cancel:!0});return{...r?{headers:r}:{},onAuth:i,onAuthFailure:a}}async function hr({url:e,branch:t,depth:n=20,corsProxy:r,name:i,token:a,username:o,password:s,groupRoot:c}){let{git:l,http:u,fs:d,pfs:f,repoDirFn:p}=await lr(c),m=i||ur(e),h=p(m);r||=sr(`local`),await pr(f,or),await pr(f,h);let g=mr({token:a,username:o,password:s});try{let i={fs:d,http:u,dir:h,url:e,singleBranch:!0,depth:n,corsProxy:r,...g};t&&(i.ref=t),await l.clone(i)}catch{try{let i={fs:d,http:u,dir:h,url:e,singleBranch:!0,depth:n,corsProxy:r,...g};t&&(i.ref=t),await l.fetch(i)}catch{try{await Ir(f,h),await pr(f,h);let i={fs:d,http:u,dir:h,url:e,singleBranch:!0,depth:n,corsProxy:r,...g};t&&(i.ref=t),await l.clone(i)}catch(t){throw Error(`Failed to clone/fetch ${e}: ${t instanceof Error?t.message:String(t)}`)}}}return await fr(l,d,h),m}async function gr({repo:e,ref:t,groupRoot:n}){let{git:r,fs:i,repoDirFn:a}=await lr(n),o=a(e);return await r.checkout({fs:i,dir:o,ref:t,force:!0}),`Checked out ${t} in ${e}`}async function _r({repo:e,name:t,checkout:n=!1,startPoint:r,groupRoot:i}){let{git:a,fs:o,repoDirFn:s}=await lr(i),c=s(e),l={fs:o,dir:c,ref:t};return r&&(l.object=r),await a.branch(l),n?(await a.checkout({fs:o,dir:c,ref:t}),`Created and switched to branch ${t} in ${e}`):`Created branch ${t} in ${e}`}async function vr({repo:e,groupRoot:t}){let{git:n,fs:r,repoDirFn:i}=await lr(t),a=i(e);await fr(n,r,a);let o=await n.statusMatrix({fs:r,dir:a});if(o.length===0)return`Empty repository.`;let s=[];for(let[e,t,n,r]of o){let i=``;if(t===0&&n===2&&r===2)i=`added`;else if(t===0&&n===2&&r===0)i=`new (unstaged)`;else if(t===1&&n===2&&r===2)i=`modified (staged)`;else if(t===1&&n===2&&r===1)i=`modified`;else if(t===1&&n===0&&r===0)i=`deleted`;else if(t===1&&n===1&&r===1)continue;else i=`[${t},${n},${r}]`;s.push(`${i}: ${e}`)}return s.length===0?`On branch ${await n.currentBranch({fs:r,dir:a})||`(detached HEAD)`}\nNothing to commit, working tree clean.`:`On branch ${await n.currentBranch({fs:r,dir:a})||`(detached HEAD)`}\n${s.join(`
84
+ `,`utf8`);let t=o[o.length-1].split(` `)[1];await i.writeStashRef(t)}else await e.rm(s)})}async function Ya({fs:e,dir:t,gitdir:n}){return new Ua({fs:e,dir:t,gitdir:n}).readStashReflogs({parsed:!0})}async function Xa({fs:e,dir:t,gitdir:n}){let r=new Ua({fs:e,dir:t,gitdir:n}),i=[r.refStashPath,r.refLogsStashPath];await br(i,async()=>{await Promise.all(i.map(async t=>{if(await e.exists(t))return e.rm(t)}))})}async function Za({fs:e,dir:t,gitdir:n,refIdx:r=0}){await qa({fs:e,dir:t,gitdir:n,refIdx:r}),await Ja({fs:e,dir:t,gitdir:n,refIdx:r})}async function Qa({fs:e,dir:t,gitdir:n=Y(t,`.git`),op:r=`push`,message:i=``,refIdx:a=0}){$(`fs`,e),$(`dir`,t),$(`gitdir`,n),$(`op`,r);let o={push:Ga,apply:qa,drop:Ja,list:Ya,clear:Xa,pop:Za,create:Ka},s=[`apply`,`drop`,`pop`];try{let c=new yn(e),l=await xn({fsp:c,dotgit:n});[`refs`,`logs`,`logs/refs`].map(e=>Y(l,e)).forEach(async e=>{await c.exists(e)||await c.mkdir(e)});let u=o[r];if(u){if(s.includes(r)&&a<0)throw new Et(`stash@${a}`,`number that is in range of [0, num of stash pushed]`);return await u({fs:c,dir:t,gitdir:l,message:i,refIdx:a})}throw Error(`To be implemented: ${r}`)}catch(e){throw e.caller=`git.stash`,e}}async function $a({fs:e,dir:t,gitdir:n=Y(t,`.git`),filepath:r,cache:i={}}){try{$(`fs`,e),$(`gitdir`,n),$(`filepath`,r);let a=new yn(e),o=await xn({fsp:a,dotgit:n});if(await wn.isIgnored({fs:a,gitdir:o,dir:t,filepath:r}))return`ignored`;let s=await eo({fs:a,cache:i,gitdir:o,tree:await to({fs:a,cache:i,gitdir:o}),path:r}),c=await ae.acquire({fs:a,gitdir:o,cache:i},async function(e){for(let t of e)if(t.path===r)return t;return null}),l=await a.lstat(Y(t,r)),u=s!==null,d=c!==null,f=l!==null,p=async()=>{if(d&&!re(c,l))return c.oid;{let e=await a.read(Y(t,r)),n=await La({gitdir:o,type:`blob`,object:e});return d&&c.oid===n&&l.size!==-1&&ae.acquire({fs:a,gitdir:o,cache:i},async function(e){e.insert({filepath:r,stats:l,oid:n})}),n}};if(!u&&!f&&!d)return`absent`;if(!u&&!f&&d)return`*absent`;if(!u&&f&&!d)return`*added`;if(!u&&f&&d)return await p()===c.oid?`added`:`*added`;if(u&&!f&&!d)return`deleted`;if(u&&!f&&d)return c.oid,`*deleted`;if(u&&f&&!d)return await p()===s?`*undeleted`:`*undeletemodified`;if(u&&f&&d){let e=await p();return e===s?e===c.oid?`unmodified`:`*unmodified`:e===c.oid?`modified`:`*modified`}}catch(e){throw e.caller=`git.status`,e}}async function eo({fs:e,cache:t,gitdir:n,tree:r,path:i}){typeof i==`string`&&(i=i.split(`/`));let a=i.shift();for(let o of r)if(o.path===a){if(i.length===0)return o.oid;let{type:r,object:a}=await mt({fs:e,cache:t,gitdir:n,oid:o.oid});if(r===`tree`)return eo({fs:e,cache:t,gitdir:n,tree:He.from(a),path:i});if(r===`blob`)throw new le(o.oid,r,`blob`,i.join(`/`))}return null}async function to({fs:e,cache:t,gitdir:n}){let r;try{r=await Q.resolve({fs:e,gitdir:n,ref:`HEAD`})}catch(e){if(e instanceof G)return[]}let{tree:i}=await Yn({fs:e,cache:t,gitdir:n,oid:r});return i}async function no({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r=`HEAD`,filepaths:i=[`.`],filter:a,cache:o={},ignored:s=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r);let c=new yn(e);return await dn({fs:c,cache:o,dir:t,gitdir:await xn({fsp:c,dotgit:n}),trees:[rn({ref:r}),on(),W()],map:async function(e,[n,r,o]){if(!n&&!o&&r&&!s&&await wn.isIgnored({fs:c,dir:t,filepath:e})||!i.some(t=>sr(e,t)))return null;if(a&&!a(e))return;let[l,u,d]=await Promise.all([n&&n.type(),r&&r.type(),o&&o.type()]),f=[l,u,d].includes(`blob`);if((l===`tree`||l===`special`)&&!f)return;if(l===`commit`)return null;if((u===`tree`||u===`special`)&&!f)return;if(d===`commit`)return null;if((d===`tree`||d===`special`)&&!f)return;let p=l===`blob`?await n.oid():void 0,m=d===`blob`?await o.oid():void 0,h;l!==`blob`&&u===`blob`&&d!==`blob`?h=`42`:u===`blob`&&(h=await r.oid());let g=[void 0,p,h,m],_=g.map(e=>g.indexOf(e));return _.shift(),[e,..._]}})}catch(e){throw e.caller=`git.statusMatrix`,e}}async function ro({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r,object:i,force:a=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r);let t=new yn(e);if(r===void 0)throw new jt(`ref`);r=r.startsWith(`refs/tags/`)?r:`refs/tags/${r}`;let o=await xn({fsp:t,dotgit:n}),s=await Q.resolve({fs:t,gitdir:o,ref:i||`HEAD`});if(!a&&await Q.exists({fs:t,gitdir:o,ref:r}))throw new ht(`tag`,r);await Q.writeRef({fs:t,gitdir:o,ref:r,value:s})}catch(e){throw e.caller=`git.tag`,e}}async function io({fs:e,dir:t,gitdir:n=Y(t,`.git`),cache:r={},filepath:i,oid:a,mode:o,add:s,remove:c,force:l}){try{$(`fs`,e),$(`gitdir`,n),$(`filepath`,i);let u=new yn(e),d=await xn({fsp:u,dotgit:n});if(c)return await ae.acquire({fs:u,gitdir:d,cache:r},async function(e){if(!l){let e=await u.lstat(Y(t,i));if(e){if(e.isDirectory())throw new Tt(`directory`);return}}e.has({filepath:i})&&e.delete({filepath:i})});let f;if(!a){if(f=await u.lstat(Y(t,i)),!f)throw new G(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new Tt(`directory`)}return await ae.acquire({fs:u,gitdir:d,cache:r},async function(e){if(!s&&!e.has({filepath:i}))throw new G(`file at "${i}" in index and "add" not set`);let n;if(a)n={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:o,uid:0,gid:0,size:0};else{n=f;let e=n.isSymbolicLink()?await u.readlink(Y(t,i)):await u.read(Y(t,i));a=await An({fs:u,gitdir:d,type:`blob`,format:`content`,object:e})}return e.insert({filepath:i,oid:a,stats:n}),a})}catch(e){throw e.caller=`git.updateIndex`,e}}function ao(){try{return $r.version}catch(e){throw e.caller=`git.version`,e}}async function oo({fs:e,dir:t,gitdir:n=Y(t,`.git`),trees:r,map:i,reduce:a,iterate:o,cache:s={}}){try{$(`fs`,e),$(`gitdir`,n),$(`trees`,r);let c=new yn(e);return await dn({fs:c,cache:s,dir:t,gitdir:await xn({fsp:c,dotgit:n}),trees:r,map:i,reduce:a,iterate:o})}catch(e){throw e.caller=`git.walk`,e}}async function so({fs:e,dir:t,gitdir:n=Y(t,`.git`),blob:r}){try{$(`fs`,e),$(`gitdir`,n),$(`blob`,r);let t=new yn(e);return await An({fs:t,gitdir:await xn({fsp:t,dotgit:n}),type:`blob`,object:r,format:`content`})}catch(e){throw e.caller=`git.writeBlob`,e}}async function co({fs:e,dir:t,gitdir:n=Y(t,`.git`),commit:r}){try{$(`fs`,e),$(`gitdir`,n),$(`commit`,r);let t=new yn(e);return await Va({fs:t,gitdir:await xn({fsp:t,dotgit:n}),commit:r})}catch(e){throw e.caller=`git.writeCommit`,e}}async function lo({fs:e,dir:t,gitdir:n=Y(t,`.git`),type:i,object:a,format:o=`parsed`,oid:s,encoding:c=void 0}){try{let t=new yn(e),l=await xn({fsp:t,dotgit:n});if(o===`parsed`){switch(i){case`commit`:a=en.from(a).toObject();break;case`tree`:a=He.from(a).toObject();break;case`blob`:a=r.Buffer.from(a,c);break;case`tag`:a=Zt.from(a).toObject();break;default:throw new le(s||``,i,`blob|commit|tag|tree`)}o=`content`}return s=await An({fs:t,gitdir:l,type:i,object:a,oid:s,format:o}),s}catch(e){throw e.caller=`git.writeObject`,e}}async function uo({fs:e,dir:t,gitdir:n=Y(t,`.git`),ref:r,value:i,force:a=!1,symbolic:o=!1}){try{$(`fs`,e),$(`gitdir`,n),$(`ref`,r),$(`value`,i);let t=new yn(e);if(!er(r,!0))throw new Et(r,m.clean(r));let s=await xn({fsp:t,dotgit:n});if(!a&&await Q.exists({fs:t,gitdir:s,ref:r}))throw new ht(`ref`,r);o?await Q.writeSymbolicRef({fs:t,gitdir:s,ref:r,value:i}):(i=await Q.resolve({fs:t,gitdir:s,ref:i}),await Q.writeRef({fs:t,gitdir:s,ref:r,value:i}))}catch(e){throw e.caller=`git.writeRef`,e}}async function fo({fs:e,gitdir:t,tag:n}){return await An({fs:e,gitdir:t,type:`tag`,object:Zt.from(n).toObject(),format:`content`})}async function po({fs:e,dir:t,gitdir:n=Y(t,`.git`),tag:r}){try{$(`fs`,e),$(`gitdir`,n),$(`tag`,r);let t=new yn(e);return await fo({fs:t,gitdir:await xn({fsp:t,dotgit:n}),tag:r})}catch(e){throw e.caller=`git.writeTag`,e}}async function mo({fs:e,dir:t,gitdir:n=Y(t,`.git`),tree:r}){try{$(`fs`,e),$(`gitdir`,n),$(`tree`,r);let t=new yn(e);return await Xn({fs:t,gitdir:await xn({fsp:t,dotgit:n}),tree:r})}catch(e){throw e.caller=`git.writeTree`,e}}var ho={Errors:Ht,STAGE:W,TREE:rn,WORKDIR:on,add:Mn,abortMerge:Cn,addNote:Qn,addRemote:nr,annotatedTag:ir,branch:or,cherryPick:Er,checkout:pr,clone:li,commit:ui,getConfig:Mi,getConfigAll:Pi,setConfig:Ba,currentBranch:di,deleteBranch:pi,deleteRef:mi,deleteRemote:gi,deleteTag:vi,expandOid:Si,expandRef:Ci,fastForward:Di,fetch:Oi,findMergeBase:ki,findRoot:ji,getRemoteInfo:Fi,getRemoteInfo2:Li,hashBlob:zi,indexPack:Vi,init:Hi,isDescendent:Wi,isIgnored:Gi,listBranches:Ki,listFiles:Yi,listNotes:Zi,listRefs:Qi,listRemotes:ea,listServerRefs:ra,listTags:ia,log:la,merge:ua,packObjects:ma,pull:ha,push:xa,readBlob:wa,readCommit:Ta,readNote:Da,readObject:Oa,readTag:Aa,readTree:ja,remove:Ma,removeNote:Pa,renameBranch:Ia,resetIndex:Ra,updateIndex:io,resolveRef:za,status:$a,statusMatrix:no,tag:ro,version:ao,walk:oo,writeBlob:so,writeCommit:co,writeObject:lo,writeRef:uo,writeTag:po,writeTree:mo,stash:Qa};t.Errors=Ht,t.STAGE=W,t.TREE=rn,t.WORKDIR=on,t.abortMerge=Cn,t.add=Mn,t.addNote=Qn,t.addRemote=nr,t.annotatedTag=ir,t.branch=or,t.checkout=pr,t.cherryPick=Er,t.clone=li,t.commit=ui,t.currentBranch=di,t.default=ho,t.deleteBranch=pi,t.deleteRef=mi,t.deleteRemote=gi,t.deleteTag=vi,t.expandOid=Si,t.expandRef=Ci,t.fastForward=Di,t.fetch=Oi,t.findMergeBase=ki,t.findRoot=ji,t.getConfig=Mi,t.getConfigAll=Pi,t.getRemoteInfo=Fi,t.getRemoteInfo2=Li,t.hashBlob=zi,t.indexPack=Vi,t.init=Hi,t.isDescendent=Wi,t.isIgnored=Gi,t.listBranches=Ki,t.listFiles=Yi,t.listNotes=Zi,t.listRefs=Qi,t.listRemotes=ea,t.listServerRefs=ra,t.listTags=ia,t.log=la,t.merge=ua,t.packObjects=ma,t.pull=ha,t.push=xa,t.readBlob=wa,t.readCommit=Ta,t.readNote=Da,t.readObject=Oa,t.readTag=Aa,t.readTree=ja,t.remove=Ma,t.removeNote=Pa,t.renameBranch=Ia,t.resetIndex=Ra,t.resolveRef=za,t.setConfig=Ba,t.stash=Qa,t.status=$a,t.statusMatrix=no,t.tag=ro,t.updateIndex=io,t.version=ao,t.walk=oo,t.writeBlob=so,t.writeCommit=co,t.writeObject=lo,t.writeRef=uo,t.writeTag=po,t.writeTree=mo}))(),1),Vn=o();globalThis.Buffer||(globalThis.Buffer=Vn.Buffer);const Hn={async request({url:e,method:t=`GET`,headers:n={},body:r}){r&&=await Un(r);let i=await fetch(e,{method:t,headers:n,body:r,credentials:`omit`}),a=i.body&&typeof i.body.getReader==`function`?Wn(i.body):[new Uint8Array(await i.arrayBuffer())],o={};for(let[e,t]of i.headers.entries())o[e]=t;return{url:i.url,method:t,statusCode:i.status,statusMessage:i.statusText,body:a,headers:o}}};async function Un(e){let t=[];if(e[Symbol.asyncIterator])for await(let n of e)t.push(n);else if(e[Symbol.iterator])for(let n of e)t.push(n);else if(e.next){let n=await e.nexT();for(;!n.done;)t.push(n.value),n=await e.nexT()}else return e;let n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n),i=0;for(let e of t)r.set(e,i),i+=e.length;return r}function Wn(e){let t=e.getReader();return{next(){return t.read()},return(){return t.releaseLock(),{}},[Symbol.asyncIterator](){return this}}}let Gn=null,Kn=null,qn=null,Jn=null,Yn=null;function Xn(e){return e.trim().replace(/^[\\/]+/,``).replace(/[\\/]+$/,``).split(/[\\/]+/).filter(e=>e!==`.`&&e!==``).join(`/`)}const Zn=new class{_map=new Map;_maxSize;constructor(e=2048){this._maxSize=e}clear(){this._map.clear()}get(e){let t=this._map.get(e);return t!==void 0&&(this._map.delete(e),this._map.set(e,t)),t}invalidate(e){let t=e.endsWith(`/`)?e:e+`/`;for(let n of this._map.keys())(n===e||n.startsWith(t))&&this._map.delete(n)}set(e,t){if(this._map.size>=this._maxSize){let e=this._map.keys().next().value;e!==void 0&&this._map.delete(e)}this._map.set(e,t)}};async function Qn(e,t,n={},r=``){let i=e,a=r;for(let e of t){a=a?`${a}/${e}`:e;let t=Zn.get(a);t&&!n.create?i=t:(i=await i.getDirectoryHandle(e,{create:n.create??!1}),Zn.set(a,i))}return i}async function $n(e,t,n={}){let r=Xn(t),i=r.split(`/`).filter(Boolean);if(i.length===0)return e;let a=await Qn(e,i.slice(0,-1),n),o=i[i.length-1];if(n.forceFile||o.includes(`.`))try{return await a.getFileHandle(o,{create:n.create??!1})}catch{}try{let e=await a.getDirectoryHandle(o,{create:n.create??!1}),t=r;return Zn.set(t,e),e}catch{return await a.getFileHandle(o,{create:n.create??!1})}}async function er(e,t,n={}){let r=Xn(t).split(`/`).filter(Boolean);return r.length===0?e:Qn(e,r,n)}async function tr(e,t,n={}){let r=Xn(t).split(`/`).filter(Boolean);if(r.length===0)throw Error(`Cannot resolve '.' as file`);return(await Qn(e,r.slice(0,-1),n)).getFileHandle(r[r.length-1],{create:n.create??!1})}async function nr(e,t){let n=Xn(t).split(`/`).filter(Boolean);if(n.length===0)throw Error(`Cannot get parent of root`);let r=n[n.length-1];return[await Qn(e,n.slice(0,-1)),r]}function rr(e){return e.trim().replace(/\\/g,`/`).replace(/^\/+/,``).replace(/^\.\//,``)}function ir(e){let t=new Map,n=`repos/.git-modes`;function r(e){return e.replace(/\\/g,`/`.replace(/^\/+/,``))}async function i(){try{let r=await(await(await tr(e,n)).getFile()).text(),i=JSON.parse(r);for(let[e,n]of i)t.set(e,n)}catch{}}let a=null;function o(){a===null&&(a=setTimeout(async()=>{a=null;try{let r=await(await tr(e,n,{create:!0})).createWritable(),i=JSON.stringify([...t.entries()]);await r.write(new TextEncoder().encode(i)),await r.close()}catch{}},500))}let s=i(),c={async readFile(t,n){let r=await(await(await tr(e,t)).getFile()).arrayBuffer(),i=typeof n==`string`?n:n?.encoding;return i===`utf8`||i===`utf-8`?new TextDecoder().decode(r):new Uint8Array(r)},async writeFile(n,i,a){let s=await(await tr(e,n,{create:!0})).createWritable();typeof i==`string`&&(i=new TextEncoder().encode(i)),await s.write(i),await s.close();let c=typeof a==`object`&&a?a.mode:void 0,l=r(n);if(c!=null){let e=(c&73)!=0;t.set(l,e?33261:33188),o()}else t.has(l)||t.set(l,33188)},async mkdir(t){await er(e,t,{create:!0})},async rmdir(n){let[i,a]=await nr(e,n);await i.removeEntry(a,{recursive:!0});let o=r(n)+`/`;for(let e of t.keys())(e===r(n)||e.startsWith(o))&&t.delete(e);Zn.invalidate(Xn(n))},async readdir(t){let n=await er(e,t),r=[];for await(let[e]of n.entries())r.push(e);return r},async stat(n){await s;let i;try{i=await $n(e,n)}catch{let e=Error(`ENOENT: no such file or directory, stat '${n}'`);throw e.code=`ENOENT`,e}if(i.kind===`directory`){let e=new Date;return{isDirectory:()=>!0,isFile:()=>!1,isSymbolicLink:()=>!1,size:0,mtimeMs:Date.now(),mode:16877,ino:0,dev:0,nlink:1,uid:0,gid:0,ctime:e,mtime:e}}else{let e=await i.getFile(),a=new Date(e.lastModified),o=r(n),s=t.get(o)??33188;return{isDirectory:()=>!1,isFile:()=>!0,isSymbolicLink:()=>!1,size:e.size,mtimeMs:e.lastModified,mode:s,ino:0,dev:0,nlink:1,uid:0,gid:0,ctime:a,mtime:a}}},async lstat(e){return c.stat(e)},async unlink(n){let[i,a]=await nr(e,n);await i.removeEntry(a),t.delete(r(n))},async symlink(e,t){throw Error(`OPFS does not support symlinks`)},async readlink(e){return await c.readFile(e,`utf8`)}};return{promises:c}}const ar=ir,or=`repos`;function sr(e,t){if(e===`custom`&&t)return t;if(e===`public`)return`https://www.cors-anywhere.com`;let{protocol:n,host:a,hostname:o}=globalThis.location;return o===`localhost`||o===`127.0.0.1`?`${n}//${a}/git-proxy`:`http://${i}:${r}/git-proxy`}async function cr(){return Yn||=(async()=>{if(Gn=Bn.default,Kn=Hn,!qn){let e;try{e=await navigator.storage.getDirectory()}catch(t){console.warn(`OPFS is unavailable for git root, falling back to memory:`,t);let{getMemoryOpfsRoot:n}=await import(`./memoryStorage-Dwg8NhAZ.js`).then(e=>e.n);e=n()}qn=ir(e),Jn=qn.promises}})(),await Yn,{git:Gn,http:Kn,fs:qn,pfs:Jn}}async function lr(e){let t=await cr();if(e){let n=ir(e);return{git:t.git,http:t.http,fs:n,pfs:n.promises,repoDirFn:e=>`repos/${e}`}}return{...t,repoDirFn:dr}}function ur(e){return(e.replace(/\/+$/,``).split(`/`).pop()||`repo`).replace(/\.git$/,``)}function dr(e){return`${or}/${e}`}async function fr(e,t,n){try{await e.getConfig({fs:t,dir:n,path:`core.filemode`})!==!1&&await e.setConfig({fs:t,dir:n,path:`core.filemode`,value:!1})}catch(e){console.error(`Failed to set core.filemode=false:`,e)}}async function pr(e,t){try{await e.mkdir(t)}catch{}}function mr({token:e,username:t,password:n}={}){if(!e&&!t)return{};let r;e?r={Authorization:`Basic ${btoa(`${e}:x-oauth-basic`)}`}:t&&(r={Authorization:`Basic ${btoa(`${t}:${n||``}`)}`});let i=()=>e?{username:e,password:`x-oauth-basic`}:t?{username:t,password:n||``}:{cancel:!0},a=()=>({cancel:!0});return{...r?{headers:r}:{},onAuth:i,onAuthFailure:a}}async function hr({url:e,branch:t,depth:n=20,corsProxy:r,name:i,token:a,username:o,password:s,groupRoot:c}){let{git:l,http:u,fs:d,pfs:f,repoDirFn:p}=await lr(c),m=i||ur(e),h=p(m);r||=sr(`local`),await pr(f,or),await pr(f,h);let g=mr({token:a,username:o,password:s});try{let i={fs:d,http:u,dir:h,url:e,singleBranch:!0,depth:n,corsProxy:r,...g};t&&(i.ref=t),await l.clone(i)}catch{try{let i={fs:d,http:u,dir:h,url:e,singleBranch:!0,depth:n,corsProxy:r,...g};t&&(i.ref=t),await l.fetch(i)}catch{try{await Ir(f,h),await pr(f,h);let i={fs:d,http:u,dir:h,url:e,singleBranch:!0,depth:n,corsProxy:r,...g};t&&(i.ref=t),await l.clone(i)}catch(t){throw Error(`Failed to clone/fetch ${e}: ${t instanceof Error?t.message:String(t)}`)}}}return await fr(l,d,h),m}async function gr({repo:e,ref:t,groupRoot:n}){let{git:r,fs:i,repoDirFn:a}=await lr(n),o=a(e);return await r.checkout({fs:i,dir:o,ref:t,force:!0}),`Checked out ${t} in ${e}`}async function _r({repo:e,name:t,checkout:n=!1,startPoint:r,groupRoot:i}){let{git:a,fs:o,repoDirFn:s}=await lr(i),c=s(e),l={fs:o,dir:c,ref:t};return r&&(l.object=r),await a.branch(l),n?(await a.checkout({fs:o,dir:c,ref:t}),`Created and switched to branch ${t} in ${e}`):`Created branch ${t} in ${e}`}async function vr({repo:e,groupRoot:t}){let{git:n,fs:r,repoDirFn:i}=await lr(t),a=i(e);await fr(n,r,a);let o=await n.statusMatrix({fs:r,dir:a});if(o.length===0)return`Empty repository.`;let s=[];for(let[e,t,n,r]of o){let i=``;if(t===0&&n===2&&r===2)i=`added`;else if(t===0&&n===2&&r===0)i=`new (unstaged)`;else if(t===1&&n===2&&r===2)i=`modified (staged)`;else if(t===1&&n===2&&r===1)i=`modified`;else if(t===1&&n===0&&r===0)i=`deleted`;else if(t===1&&n===1&&r===1)continue;else i=`[${t},${n},${r}]`;s.push(`${i}: ${e}`)}return s.length===0?`On branch ${await n.currentBranch({fs:r,dir:a})||`(detached HEAD)`}\nNothing to commit, working tree clean.`:`On branch ${await n.currentBranch({fs:r,dir:a})||`(detached HEAD)`}\n${s.join(`
85
85
  `)}`}async function yr({repo:e,ref:t,depth:n=10,groupRoot:r}){let{git:i,fs:a,repoDirFn:o}=await lr(r),s={fs:a,dir:o(e),depth:n};t&&(s.ref=t);let c=await i.log(s);return c.length===0?`No commits found.`:c.map(e=>{let t=e.commit,n=new Date(t.author.timestamp*1e3).toISOString();return`${e.oid} ${n} ${t.author.name} — ${t.message.trim().split(`
86
86
  `)[0]}`}).join(`
87
87
  `)}async function br({repo:e,ref1:t,ref2:n,groupRoot:r}){let{git:i,fs:a,repoDirFn:o}=await lr(r),s=o(e),c=a.promises;if(await fr(i,a,s),!t&&!n){let e=(await i.statusMatrix({fs:a,dir:s})).filter(([,e,t])=>!(e===1&&t===1));if(e.length===0)return`No differences.`;let t=[];for(let[n,r,o]of e)try{if(r===0&&o===2){let e=(await Sr(c,s,n)).split(`