oidc-spa 8.1.10 → 8.1.11

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 (186) hide show
  1. package/backend.d.ts +27 -6
  2. package/backend.js +124 -139
  3. package/backend.js.map +1 -1
  4. package/core/Oidc.d.ts +28 -4
  5. package/core/createOidc.d.ts +12 -3
  6. package/core/createOidc.js +1 -1
  7. package/core/createOidc.js.map +1 -1
  8. package/core/earlyInit.d.ts +1 -0
  9. package/core/earlyInit.js +11 -4
  10. package/core/earlyInit.js.map +1 -1
  11. package/core/loginOrGoToAuthServer.js +8 -3
  12. package/core/loginOrGoToAuthServer.js.map +1 -1
  13. package/core/oidcClientTsUserToTokens.d.ts +1 -1
  14. package/core/oidcClientTsUserToTokens.js.map +1 -1
  15. package/core/requiredPostHydrationReplaceNavigationUrl.d.ts +6 -0
  16. package/core/requiredPostHydrationReplaceNavigationUrl.js +12 -0
  17. package/core/requiredPostHydrationReplaceNavigationUrl.js.map +1 -0
  18. package/entrypoint.d.ts +1 -0
  19. package/entrypoint.js +3 -1
  20. package/entrypoint.js.map +1 -1
  21. package/esm/angular.d.ts +14 -4
  22. package/esm/angular.js +155 -10
  23. package/esm/angular.js.map +1 -1
  24. package/esm/backend.d.ts +48 -0
  25. package/esm/backend.js +259 -0
  26. package/esm/backend.js.map +1 -0
  27. package/esm/core/Oidc.d.ts +28 -4
  28. package/esm/core/createOidc.d.ts +12 -3
  29. package/esm/core/createOidc.js +1 -1
  30. package/esm/core/createOidc.js.map +1 -1
  31. package/esm/core/earlyInit.d.ts +1 -0
  32. package/esm/core/earlyInit.js +11 -4
  33. package/esm/core/earlyInit.js.map +1 -1
  34. package/esm/core/loginOrGoToAuthServer.js +8 -3
  35. package/esm/core/loginOrGoToAuthServer.js.map +1 -1
  36. package/esm/core/oidcClientTsUserToTokens.d.ts +1 -1
  37. package/esm/core/oidcClientTsUserToTokens.js.map +1 -1
  38. package/esm/core/requiredPostHydrationReplaceNavigationUrl.d.ts +6 -0
  39. package/esm/core/requiredPostHydrationReplaceNavigationUrl.js +8 -0
  40. package/esm/core/requiredPostHydrationReplaceNavigationUrl.js.map +1 -0
  41. package/esm/entrypoint.d.ts +1 -0
  42. package/esm/entrypoint.js +1 -0
  43. package/esm/entrypoint.js.map +1 -1
  44. package/esm/mock/oidc.d.ts +1 -1
  45. package/esm/mock/oidc.js.map +1 -1
  46. package/esm/react/react.d.ts +1 -1
  47. package/esm/tanstack-start/react/accessTokenValidation_rfc9068.d.ts +12 -0
  48. package/esm/tanstack-start/react/accessTokenValidation_rfc9068.js +95 -0
  49. package/esm/tanstack-start/react/accessTokenValidation_rfc9068.js.map +1 -0
  50. package/esm/tanstack-start/react/apiBuilder.d.ts +27 -0
  51. package/esm/tanstack-start/react/apiBuilder.js +58 -0
  52. package/esm/tanstack-start/react/apiBuilder.js.map +1 -0
  53. package/esm/tanstack-start/react/createOidcSpaApi.d.ts +9 -0
  54. package/esm/tanstack-start/react/createOidcSpaApi.js +678 -0
  55. package/esm/tanstack-start/react/createOidcSpaApi.js.map +1 -0
  56. package/esm/tanstack-start/react/index.d.ts +3 -0
  57. package/esm/tanstack-start/react/index.js +4 -0
  58. package/esm/tanstack-start/react/index.js.map +1 -0
  59. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/UnifiedClientRetryForSsrLoadersError.d.ts +4 -0
  60. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/UnifiedClientRetryForSsrLoadersError.js +8 -0
  61. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/UnifiedClientRetryForSsrLoadersError.js.map +1 -0
  62. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/enableUnifiedClientRetryForSsrLoaders.d.ts +4 -0
  63. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/enableUnifiedClientRetryForSsrLoaders.js +76 -0
  64. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/enableUnifiedClientRetryForSsrLoaders.js.map +1 -0
  65. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/entrypoint.d.ts +1 -0
  66. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/entrypoint.js +11 -0
  67. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/entrypoint.js.map +1 -0
  68. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/index.d.ts +2 -0
  69. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/index.js +3 -0
  70. package/esm/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/index.js.map +1 -0
  71. package/esm/tanstack-start/react/types.d.ts +355 -0
  72. package/esm/tanstack-start/react/types.js +2 -0
  73. package/esm/tanstack-start/react/types.js.map +1 -0
  74. package/esm/tanstack-start/react/withHandlingOidcPostLoginNavigation.d.ts +2 -0
  75. package/esm/tanstack-start/react/withHandlingOidcPostLoginNavigation.js +25 -0
  76. package/esm/tanstack-start/react/withHandlingOidcPostLoginNavigation.js.map +1 -0
  77. package/esm/tools/GetterOrDirectValue.d.ts +1 -0
  78. package/esm/tools/GetterOrDirectValue.js +2 -0
  79. package/esm/tools/GetterOrDirectValue.js.map +1 -0
  80. package/esm/tools/ZodSchemaLike.d.ts +3 -0
  81. package/esm/tools/ZodSchemaLike.js +2 -0
  82. package/esm/tools/ZodSchemaLike.js.map +1 -0
  83. package/esm/tools/inferIsViteDev.d.ts +1 -0
  84. package/esm/tools/inferIsViteDev.js +6 -0
  85. package/esm/tools/inferIsViteDev.js.map +1 -0
  86. package/esm/tools/infer_import_meta_env_BASE_URL.d.ts +1 -0
  87. package/esm/tools/infer_import_meta_env_BASE_URL.js +15 -0
  88. package/esm/tools/infer_import_meta_env_BASE_URL.js.map +1 -0
  89. package/esm/tools/tsafe/uncapitalize.d.ts +2 -0
  90. package/esm/tools/tsafe/uncapitalize.js +5 -0
  91. package/esm/tools/tsafe/uncapitalize.js.map +1 -0
  92. package/esm/vendor/backend/evt.d.ts +2 -0
  93. package/esm/vendor/backend/evt.js +3286 -0
  94. package/esm/vendor/backend/jose.d.ts +1 -0
  95. package/esm/vendor/backend/jose.js +3546 -0
  96. package/esm/vendor/backend/tsafe.d.ts +5 -0
  97. package/esm/vendor/backend/tsafe.js +68 -0
  98. package/esm/vendor/backend/zod.d.ts +1 -0
  99. package/esm/vendor/backend/zod.js +4023 -0
  100. package/esm/vendor/frontend/worker-timers.js +261 -1
  101. package/mock/oidc.d.ts +1 -1
  102. package/mock/oidc.js.map +1 -1
  103. package/package.json +40 -4
  104. package/react/react.d.ts +1 -1
  105. package/src/angular.ts +224 -9
  106. package/src/backend.ts +201 -166
  107. package/src/core/Oidc.ts +41 -11
  108. package/src/core/createOidc.ts +12 -3
  109. package/src/core/earlyInit.ts +19 -4
  110. package/src/core/loginOrGoToAuthServer.ts +11 -3
  111. package/src/core/oidcClientTsUserToTokens.ts +2 -2
  112. package/src/core/requiredPostHydrationReplaceNavigationUrl.ts +11 -0
  113. package/src/entrypoint.ts +1 -0
  114. package/src/mock/oidc.ts +2 -2
  115. package/src/react/react.tsx +1 -1
  116. package/src/tanstack-start/react/accessTokenValidation_rfc9068.ts +135 -0
  117. package/src/tanstack-start/react/apiBuilder.ts +151 -0
  118. package/src/tanstack-start/react/createOidcSpaApi.tsx +1009 -0
  119. package/src/tanstack-start/react/index.ts +5 -0
  120. package/src/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/UnifiedClientRetryForSsrLoadersError.ts +8 -0
  121. package/src/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/enableUnifiedClientRetryForSsrLoaders.tsx +110 -0
  122. package/src/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/entrypoint.ts +13 -0
  123. package/src/tanstack-start/react/rfcUnifiedClientRetryForSsrLoaders/index.ts +2 -0
  124. package/src/tanstack-start/react/types.tsx +415 -0
  125. package/src/tanstack-start/react/withHandlingOidcPostLoginNavigation.tsx +35 -0
  126. package/src/tools/GetterOrDirectValue.ts +1 -0
  127. package/src/tools/ZodSchemaLike.ts +3 -0
  128. package/src/tools/getThisCodebaseRootDirPath_cjs.ts +19 -0
  129. package/src/tools/inferIsViteDev.ts +6 -0
  130. package/src/tools/infer_import_meta_env_BASE_URL.ts +19 -0
  131. package/src/tools/tsafe/uncapitalize.ts +4 -0
  132. package/src/vendor/backend/jose.ts +1 -0
  133. package/src/vendor/build-runtime/babel.ts +6 -0
  134. package/src/vendor/build-runtime/magic-string.ts +3 -0
  135. package/src/vite-plugin/detectProjectType.ts +20 -0
  136. package/src/vite-plugin/excludeModuleExportFromOptimizedDeps.ts +20 -0
  137. package/src/vite-plugin/handleClientEntrypoint.ts +260 -0
  138. package/src/vite-plugin/index.ts +1 -0
  139. package/src/vite-plugin/transformCreateFileRoute.ts +240 -0
  140. package/src/vite-plugin/vite-plugin.ts +54 -0
  141. package/tools/GetterOrDirectValue.d.ts +1 -0
  142. package/tools/GetterOrDirectValue.js +3 -0
  143. package/tools/GetterOrDirectValue.js.map +1 -0
  144. package/tools/ZodSchemaLike.d.ts +3 -0
  145. package/tools/ZodSchemaLike.js +3 -0
  146. package/tools/ZodSchemaLike.js.map +1 -0
  147. package/tools/getThisCodebaseRootDirPath_cjs.d.ts +2 -0
  148. package/tools/getThisCodebaseRootDirPath_cjs.js +53 -0
  149. package/tools/getThisCodebaseRootDirPath_cjs.js.map +1 -0
  150. package/tools/tsafe/uncapitalize.d.ts +2 -0
  151. package/tools/tsafe/uncapitalize.js +8 -0
  152. package/tools/tsafe/uncapitalize.js.map +1 -0
  153. package/vendor/backend/jose.d.ts +1 -0
  154. package/vendor/backend/jose.js +3 -0
  155. package/vendor/build-runtime/babel.d.ts +6 -0
  156. package/vendor/build-runtime/babel.js +3 -0
  157. package/vendor/build-runtime/magic-string.d.ts +2 -0
  158. package/vendor/build-runtime/magic-string.js +2 -0
  159. package/vendor/frontend/oidc-client-ts.js +0 -2
  160. package/vite-plugin/detectProjectType.d.ts +10 -0
  161. package/vite-plugin/detectProjectType.js +15 -0
  162. package/vite-plugin/detectProjectType.js.map +1 -0
  163. package/vite-plugin/excludeModuleExportFromOptimizedDeps.d.ts +4 -0
  164. package/vite-plugin/excludeModuleExportFromOptimizedDeps.js +50 -0
  165. package/vite-plugin/excludeModuleExportFromOptimizedDeps.js.map +1 -0
  166. package/vite-plugin/handleClientEntrypoint.d.ts +10 -0
  167. package/vite-plugin/handleClientEntrypoint.js +211 -0
  168. package/vite-plugin/handleClientEntrypoint.js.map +1 -0
  169. package/vite-plugin/index.d.ts +1 -0
  170. package/vite-plugin/index.js +6 -0
  171. package/vite-plugin/index.js.map +1 -0
  172. package/vite-plugin/transformCreateFileRoute.d.ts +10 -0
  173. package/vite-plugin/transformCreateFileRoute.js +173 -0
  174. package/vite-plugin/transformCreateFileRoute.js.map +1 -0
  175. package/vite-plugin/vite-plugin.d.ts +5 -0
  176. package/vite-plugin/vite-plugin.js +46 -0
  177. package/vite-plugin/vite-plugin.js.map +1 -0
  178. package/src/vendor/backend/jsonwebtoken.ts +0 -1
  179. package/src/vendor/backend/node-fetch.ts +0 -2
  180. package/src/vendor/backend/node-jose.ts +0 -1
  181. package/vendor/backend/jsonwebtoken.d.ts +0 -1
  182. package/vendor/backend/jsonwebtoken.js +0 -3
  183. package/vendor/backend/node-fetch.d.ts +0 -2
  184. package/vendor/backend/node-fetch.js +0 -2
  185. package/vendor/backend/node-jose.d.ts +0 -1
  186. package/vendor/backend/node-jose.js +0 -3
@@ -1,3 +0,0 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- (()=>{var t={9264:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(5085),e)},5354:(t,e,r)=>{"use strict";var n=r(8021);function i(t,e){return void 0===e&&(e="utf8"),Buffer.isBuffer(t)?o(t.toString("base64")):o(Buffer.from(t,e).toString("base64"))}function a(t){return t=t.toString(),n.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function o(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var s=i;s.encode=i,s.decode=function(t,e){return void 0===e&&(e="utf8"),Buffer.from(a(t),"base64").toString(e)},s.toBase64=a,s.fromBase64=o,s.toBuffer=function(t){return Buffer.from(a(t),"base64")},e.default=s},8021:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.length,r=e%4;if(!r)return t;var n=e,i=4-r,a=e+i,o=Buffer.alloc(a);for(o.write(t);i--;)o.write("=",n++);return o.toString()}},4085:(t,e,r)=>{t.exports=r(5354).default,t.exports.default=t.exports},9658:function(t,e,r){var n,i,a;function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}a=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,n=void 0,i=void 0,a=function(t,e){p[r]=t,p[r+1]=e,2===(r+=2)&&(i?i(d):E())},s="undefined"!=typeof window?window:void 0,u=s||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var t=setTimeout;return function(){return t(d,1)}}var p=new Array(1e3);function d(){for(var t=0;t<r;t+=2)(0,p[t])(p[t+1]),p[t]=void 0,p[t+1]=void 0;r=0}var y,g,v,m,E=void 0;function C(t,e){var r=this,n=new this.constructor(w);void 0===n[S]&&O(n);var i=r._state;if(i){var o=arguments[i-1];a((function(){return x(i,n,o,r._result)}))}else P(r,n,t,e);return n}function b(t){if(t&&"object"===o(t)&&t.constructor===this)return t;var e=new this(w);return _(e,t),e}l?E=function(){return process.nextTick(d)}:c?(g=0,v=new c(d),m=document.createTextNode(""),v.observe(m,{characterData:!0}),E=function(){m.data=g=++g%2}):f?((y=new MessageChannel).port1.onmessage=d,E=function(){return y.port2.postMessage(0)}):E=void 0===s?function(){try{var t=Function("return this")().require("vertx");return void 0!==(n=t.runOnLoop||t.runOnContext)?function(){n(d)}:h()}catch(t){return h()}}():h();var S=Math.random().toString(36).substring(2);function w(){}var A=void 0,T=1,I=2;function B(e,r,n){r.constructor===e.constructor&&n===C&&r.constructor.resolve===b?function(t,e){e._state===T?N(t,e._result):e._state===I?R(t,e._result):P(e,void 0,(function(e){return _(t,e)}),(function(e){return R(t,e)}))}(e,r):void 0===n?N(e,r):t(n)?function(t,e,r){a((function(t){var n=!1,i=function(r,i){try{r.call(i,(function(r){n||(n=!0,e!==r?_(t,r):N(t,r))}),(function(e){n||(n=!0,R(t,e))}))}catch(t){return t}}(r,e,0,0,t._label);!n&&i&&(n=!0,R(t,i))}),t)}(e,r,n):N(e,r)}function _(t,e){if(t===e)R(t,new TypeError("You cannot resolve a promise with itself"));else if(i=o(n=e),null===n||"object"!==i&&"function"!==i)N(t,e);else{var r=void 0;try{r=e.then}catch(e){return void R(t,e)}B(t,e,r)}var n,i}function k(t){t._onerror&&t._onerror(t._result),F(t)}function N(t,e){t._state===A&&(t._result=e,t._state=T,0!==t._subscribers.length&&a(F,t))}function R(t,e){t._state===A&&(t._state=I,t._result=e,a(k,t))}function P(t,e,r,n){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+T]=r,i[o+I]=n,0===o&&t._state&&a(F,t)}function F(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,i=void 0,a=t._result,o=0;o<e.length;o+=3)n=e[o],i=e[o+r],n?x(r,n,i,a):i(a);t._subscribers.length=0}}function x(e,r,n,i){var a=t(n),o=void 0,s=void 0,u=!0;if(a){try{o=n(i)}catch(t){u=!1,s=t}if(r===o)return void R(r,new TypeError("A promises callback cannot return that same promise."))}else o=i;r._state!==A||(a&&u?_(r,o):!1===u?R(r,s):e===T?N(r,o):e===I&&R(r,o))}var U=0;function O(t){t[S]=U++,t._state=void 0,t._result=void 0,t._subscribers=[]}var L=function(){function t(t,r){this._instanceConstructor=t,this.promise=new t(w),this.promise[S]||O(this.promise),e(r)?(this.length=r.length,this._remaining=r.length,this._result=new Array(this.length),0===this.length?N(this.promise,this._result):(this.length=this.length||0,this._enumerate(r),0===this._remaining&&N(this.promise,this._result))):R(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===A&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===b){var i=void 0,a=void 0,o=!1;try{i=t.then}catch(t){o=!0,a=t}if(i===C&&t._state!==A)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(r===D){var s=new r(w);o?R(s,a):B(s,t,i),this._willSettleAt(s,e)}else this._willSettleAt(new r((function(e){return e(t)})),e)}else this._willSettleAt(n(t),e)},t.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===A&&(this._remaining--,t===I?R(n,r):this._result[e]=r),0===this._remaining&&N(n,this._result)},t.prototype._willSettleAt=function(t,e){var r=this;P(t,void 0,(function(t){return r._settledAt(T,e,t)}),(function(t){return r._settledAt(I,e,t)}))},t}(),D=function(){function e(t){this[S]=U++,this._result=this._state=void 0,this._subscribers=[],w!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){_(t,e)}),(function(e){R(t,e)}))}catch(e){R(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var r=this,n=r.constructor;return t(e)?r.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):r.then(e,e)},e}();return D.prototype.then=C,D.all=function(t){return new L(this,t).promise},D.race=function(t){var r=this;return e(t)?new r((function(e,n){for(var i=t.length,a=0;a<i;a++)r.resolve(t[a]).then(e,n)})):new r((function(t,e){return e(new TypeError("You must pass an array to race."))}))},D.resolve=b,D.reject=function(t){var e=new this(w);return R(e,t),e},D._setScheduler=function(t){i=t},D._setAsap=function(t){a=t},D._asap=a,D.polyfill=function(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=D},D.Promise=D,D},"object"===o(e)?t.exports=a():void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i)},8574:(t,e,r)=>{var n=r(1776)(r(6563),"DataView");t.exports=n},2507:(t,e,r)=>{var n=r(5978),i=r(7068),a=r(4143),o=r(2595),s=r(5835);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},9266:(t,e,r)=>{var n=r(5514),i=r(2331);function a(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}a.prototype=n(i.prototype),a.prototype.constructor=a,t.exports=a},9937:(t,e,r)=>{var n=r(3292),i=r(2778),a=r(3845),o=r(57),s=r(1185);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},9739:(t,e,r)=>{var n=r(5514),i=r(2331);function a(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}a.prototype=n(i.prototype),a.prototype.constructor=a,t.exports=a},7949:(t,e,r)=>{var n=r(1776)(r(6563),"Map");t.exports=n},2391:(t,e,r)=>{var n=r(3662),i=r(2792),a=r(6107),o=r(679),s=r(6223);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},6430:(t,e,r)=>{var n=r(1776)(r(6563),"Promise");t.exports=n},6699:(t,e,r)=>{var n=r(1776)(r(6563),"Set");t.exports=n},4985:(t,e,r)=>{var n=r(2391),i=r(2918),a=r(1553);function o(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},7683:(t,e,r)=>{var n=r(9937),i=r(4290),a=r(9796),o=r(6935),s=r(363),u=r(4675);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=u,t.exports=c},5047:(t,e,r)=>{var n=r(6563).Symbol;t.exports=n},9138:(t,e,r)=>{var n=r(6563).Uint8Array;t.exports=n},5061:(t,e,r)=>{var n=r(1776)(r(6563),"WeakMap");t.exports=n},5191:t=>{t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},411:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},1576:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}},567:(t,e,r)=>{var n=r(3893);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},4415:t=>{t.exports=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}},7985:(t,e,r)=>{var n=r(274),i=r(3134),a=r(8944),o=r(6238),s=r(6119),u=r(6341),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=a(t),l=!r&&i(t),f=!r&&!l&&o(t),h=!r&&!l&&!f&&u(t),p=r||l||f||h,d=p?n(t.length,String):[],y=d.length;for(var g in t)!e&&!c.call(t,g)||p&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,y))||d.push(g);return d}},1534:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},4018:t=>{t.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},1203:(t,e,r)=>{var n=r(9810),i=r(1130);t.exports=function(t,e,r){(void 0!==r&&!i(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},3061:(t,e,r)=>{var n=r(9810),i=r(1130),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var o=t[e];a.call(t,e)&&i(o,r)&&(void 0!==r||e in t)||n(t,e,r)}},799:(t,e,r)=>{var n=r(1130);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},8287:(t,e,r)=>{var n=r(5857),i=r(6808);t.exports=function(t,e){return t&&n(e,i(e),t)}},9940:(t,e,r)=>{var n=r(5857),i=r(1143);t.exports=function(t,e){return t&&n(e,i(e),t)}},9810:(t,e,r)=>{var n=r(9553);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},5759:t=>{t.exports=function(t,e,r){return t==t&&(void 0!==r&&(t=t<=r?t:r),void 0!==e&&(t=t>=e?t:e)),t}},6161:(t,e,r)=>{var n=r(7683),i=r(411),a=r(3061),o=r(8287),s=r(9940),u=r(9620),c=r(6213),l=r(3749),f=r(9718),h=r(5136),p=r(2799),d=r(8663),y=r(8631),g=r(8809),v=r(8919),m=r(8944),E=r(6238),C=r(2884),b=r(4819),S=r(7305),w=r(6808),A=r(1143),T="[object Arguments]",I="[object Function]",B="[object Object]",_={};_[T]=_["[object Array]"]=_["[object ArrayBuffer]"]=_["[object DataView]"]=_["[object Boolean]"]=_["[object Date]"]=_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Map]"]=_["[object Number]"]=_[B]=_["[object RegExp]"]=_["[object Set]"]=_["[object String]"]=_["[object Symbol]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_["[object Error]"]=_[I]=_["[object WeakMap]"]=!1,t.exports=function t(e,r,k,N,R,P){var F,x=1&r,U=2&r,O=4&r;if(k&&(F=R?k(e,N,R,P):k(e)),void 0!==F)return F;if(!b(e))return e;var L=m(e);if(L){if(F=y(e),!x)return c(e,F)}else{var D=d(e),K=D==I||"[object GeneratorFunction]"==D;if(E(e))return u(e,x);if(D==B||D==T||K&&!R){if(F=U||K?{}:v(e),!x)return U?f(e,s(F,e)):l(e,o(F,e))}else{if(!_[D])return R?e:{};F=g(e,D,x)}}P||(P=new n);var j=P.get(e);if(j)return j;P.set(e,F),S(e)?e.forEach((function(n){F.add(t(n,r,k,n,e,P))})):C(e)&&e.forEach((function(n,i){F.set(i,t(n,r,k,i,e,P))}));var V=L?void 0:(O?U?p:h:U?A:w)(e);return i(V||e,(function(n,i){V&&(n=e[i=n]),a(F,i,t(n,r,k,i,e,P))})),F}},5514:(t,e,r)=>{var n=r(4819),i=Object.create,a=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=a},2003:(t,e,r)=>{var n=r(8231),i=r(7525);t.exports=function(t,e,r,a){var o=t.length;for((r=n(r))<0&&(r=-r>o?0:o+r),(a=void 0===a||a>o?o:n(a))<0&&(a+=o),a=r>a?0:i(a);r<a;)t[r++]=e;return t}},1893:t=>{t.exports=function(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},158:(t,e,r)=>{var n=r(4018),i=r(3745);t.exports=function t(e,r,a,o,s){var u=-1,c=e.length;for(a||(a=i),s||(s=[]);++u<c;){var l=e[u];r>0&&a(l)?r>1?t(l,r-1,a,o,s):n(s,l):o||(s[s.length]=l)}return s}},3259:(t,e,r)=>{var n=r(6567)();t.exports=n},3136:(t,e,r)=>{var n=r(5859),i=r(2427);t.exports=function(t,e){for(var r=0,a=(e=n(e,t)).length;null!=t&&r<a;)t=t[i(e[r++])];return r&&r==a?t:void 0}},7237:(t,e,r)=>{var n=r(4018),i=r(8944);t.exports=function(t,e,r){var a=e(t);return i(t)?a:n(a,r(t))}},6778:(t,e,r)=>{var n=r(5047),i=r(3337),a=r(6572),o=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},7169:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},3893:(t,e,r)=>{var n=r(1893),i=r(7737),a=r(3077);t.exports=function(t,e,r){return e==e?a(t,e,r):n(t,i,r)}},6595:(t,e,r)=>{var n=r(4985),i=r(567),a=r(4415),o=r(1534),s=r(9963),u=r(7233),c=Math.min;t.exports=function(t,e,r){for(var l=r?a:i,f=t[0].length,h=t.length,p=h,d=Array(h),y=1/0,g=[];p--;){var v=t[p];p&&e&&(v=o(v,s(e))),y=c(v.length,y),d[p]=!r&&(e||f>=120&&v.length>=120)?new n(p&&v):void 0}v=t[0];var m=-1,E=d[0];t:for(;++m<f&&g.length<y;){var C=v[m],b=e?e(C):C;if(C=r||0!==C?C:0,!(E?u(E,b):l(g,b,r))){for(p=h;--p;){var S=d[p];if(!(S?u(S,b):l(t[p],b,r)))continue t}E&&E.push(b),g.push(C)}}return g}},3384:(t,e,r)=>{var n=r(6778),i=r(3804);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},8310:(t,e,r)=>{var n=r(8663),i=r(3804);t.exports=function(t){return i(t)&&"[object Map]"==n(t)}},7737:t=>{t.exports=function(t){return t!=t}},5753:(t,e,r)=>{var n=r(6516),i=r(5030),a=r(4819),o=r(8583),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(n(t)?h:s).test(o(t))}},5508:(t,e,r)=>{var n=r(8663),i=r(3804);t.exports=function(t){return i(t)&&"[object Set]"==n(t)}},3275:(t,e,r)=>{var n=r(6778),i=r(7324),a=r(3804),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[n(t)]}},6266:(t,e,r)=>{var n=r(405),i=r(2644),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},9277:(t,e,r)=>{var n=r(4819),i=r(405),a=r(4971),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return a(t);var e=i(t),r=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&r.push(s);return r}},2331:t=>{t.exports=function(){}},1312:(t,e,r)=>{var n=r(7683),i=r(1203),a=r(3259),o=r(1790),s=r(4819),u=r(1143),c=r(8936);t.exports=function t(e,r,l,f,h){e!==r&&a(r,(function(a,u){if(h||(h=new n),s(a))o(e,r,u,l,t,f,h);else{var p=f?f(c(e,u),a,u+"",e,r,h):void 0;void 0===p&&(p=a),i(e,u,p)}}),u)}},1790:(t,e,r)=>{var n=r(1203),i=r(9620),a=r(435),o=r(6213),s=r(8919),u=r(3134),c=r(8944),l=r(3323),f=r(6238),h=r(6516),p=r(4819),d=r(7033),y=r(6341),g=r(8936),v=r(1466);t.exports=function(t,e,r,m,E,C,b){var S=g(t,r),w=g(e,r),A=b.get(w);if(A)n(t,r,A);else{var T=C?C(S,w,r+"",t,e,b):void 0,I=void 0===T;if(I){var B=c(w),_=!B&&f(w),k=!B&&!_&&y(w);T=w,B||_||k?c(S)?T=S:l(S)?T=o(S):_?(I=!1,T=i(w,!0)):k?(I=!1,T=a(w,!0)):T=[]:d(w)||u(w)?(T=S,u(S)?T=v(S):p(S)&&!h(S)||(T=s(w))):I=!1}I&&(b.set(w,T),E(T,w,m,C,b),b.delete(w)),n(t,r,T)}}},9763:(t,e,r)=>{var n=r(7666),i=r(8557);t.exports=function(t,e){return n(t,e,(function(e,r){return i(t,r)}))}},7666:(t,e,r)=>{var n=r(3136),i=r(2164),a=r(5859);t.exports=function(t,e,r){for(var o=-1,s=e.length,u={};++o<s;){var c=e[o],l=n(t,c);r(l,c)&&i(u,a(c,t),l)}return u}},7632:(t,e,r)=>{var n=r(7350),i=r(8083),a=r(8455);t.exports=function(t,e){return a(i(t,e,n),t+"")}},2164:(t,e,r)=>{var n=r(3061),i=r(5859),a=r(6119),o=r(4819),s=r(2427);t.exports=function(t,e,r,u){if(!o(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c<l;){var p=s(e[c]),d=r;if("__proto__"===p||"constructor"===p||"prototype"===p)return t;if(c!=f){var y=h[p];void 0===(d=u?u(y,p,h):void 0)&&(d=o(y)?y:a(e[c+1])?[]:{})}n(h,p,d),h=h[p]}return t}},7900:(t,e,r)=>{var n=r(7350),i=r(2438),a=i?function(t,e){return i.set(t,e),t}:n;t.exports=a},7848:(t,e,r)=>{var n=r(2700),i=r(9553),a=r(7350),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:a;t.exports=o},1369:t=>{t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}},274:t=>{t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},2722:(t,e,r)=>{var n=r(5047),i=r(1534),a=r(8944),o=r(4372),s=n?n.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},9438:(t,e,r)=>{var n=r(2914),i=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(i,""):t}},9963:t=>{t.exports=function(t){return function(e){return t(e)}}},4739:(t,e,r)=>{var n=r(4985),i=r(567),a=r(4415),o=r(7233),s=r(9023),u=r(9873);t.exports=function(t,e,r){var c=-1,l=i,f=t.length,h=!0,p=[],d=p;if(r)h=!1,l=a;else if(f>=200){var y=e?null:s(t);if(y)return u(y);h=!1,l=o,d=new n}else d=e?[]:p;t:for(;++c<f;){var g=t[c],v=e?e(g):g;if(g=r||0!==g?g:0,h&&v==v){for(var m=d.length;m--;)if(d[m]===v)continue t;e&&d.push(v),p.push(g)}else l(d,v,r)||(d!==p&&d.push(v),p.push(g))}return p}},7817:(t,e,r)=>{var n=r(5859),i=r(2200),a=r(9867),o=r(2427);t.exports=function(t,e){return e=n(e,t),null==(t=a(t,e))||delete t[o(i(e))]}},7233:t=>{t.exports=function(t,e){return t.has(e)}},2111:(t,e,r)=>{var n=r(3323);t.exports=function(t){return n(t)?t:[]}},5859:(t,e,r)=>{var n=r(8944),i=r(4704),a=r(6184),o=r(7892);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:a(o(t))}},995:(t,e,r)=>{var n=r(9138);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},9620:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}t=r.nmd(t);var i=r(6563),a="object"==n(e)&&e&&!e.nodeType&&e,o=a&&"object"==n(t)&&t&&!t.nodeType&&t,s=o&&o.exports===a?i.Buffer:void 0,u=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}},7723:(t,e,r)=>{var n=r(995);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},4875:t=>{var e=/\w*$/;t.exports=function(t){var r=new t.constructor(t.source,e.exec(t));return r.lastIndex=t.lastIndex,r}},2622:(t,e,r)=>{var n=r(5047),i=n?n.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},435:(t,e,r)=>{var n=r(995);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},9734:t=>{var e=Math.max;t.exports=function(t,r,n,i){for(var a=-1,o=t.length,s=n.length,u=-1,c=r.length,l=e(o-s,0),f=Array(c+l),h=!i;++u<c;)f[u]=r[u];for(;++a<s;)(h||a<o)&&(f[n[a]]=t[a]);for(;l--;)f[u++]=t[a++];return f}},3902:t=>{var e=Math.max;t.exports=function(t,r,n,i){for(var a=-1,o=t.length,s=-1,u=n.length,c=-1,l=r.length,f=e(o-u,0),h=Array(f+l),p=!i;++a<f;)h[a]=t[a];for(var d=a;++c<l;)h[d+c]=r[c];for(;++s<u;)(p||a<o)&&(h[d+n[s]]=t[a++]);return h}},6213:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},5857:(t,e,r)=>{var n=r(3061),i=r(9810);t.exports=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=a?a(r[c],t[c],c,r,t):void 0;void 0===l&&(l=t[c]),o?i(r,c,l):n(r,c,l)}return r}},3749:(t,e,r)=>{var n=r(5857),i=r(6182);t.exports=function(t,e){return n(t,i(t),e)}},9718:(t,e,r)=>{var n=r(5857),i=r(321);t.exports=function(t,e){return n(t,i(t),e)}},2959:(t,e,r)=>{var n=r(6563)["__core-js_shared__"];t.exports=n},205:t=>{t.exports=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}},6525:(t,e,r)=>{var n=r(7632),i=r(2750);t.exports=function(t){return n((function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var u=r[n];u&&t(e,u,n,o)}return e}))}},6567:t=>{t.exports=function(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var u=o[t?s:++i];if(!1===r(a[u],u,a))break}return e}}},7020:(t,e,r)=>{var n=r(5457),i=r(6563);t.exports=function(t,e,r){var a=1&e,o=n(t);return function e(){return(this&&this!==i&&this instanceof e?o:t).apply(a?r:this,arguments)}}},5457:(t,e,r)=>{var n=r(5514),i=r(4819);t.exports=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=n(t.prototype),a=t.apply(r,e);return i(a)?a:r}}},1272:(t,e,r)=>{var n=r(5191),i=r(5457),a=r(7225),o=r(4119),s=r(2857),u=r(1931),c=r(6563);t.exports=function(t,e,r){var l=i(t);return function i(){for(var f=arguments.length,h=Array(f),p=f,d=s(i);p--;)h[p]=arguments[p];var y=f<3&&h[0]!==d&&h[f-1]!==d?[]:u(h,d);return(f-=y.length)<r?o(t,e,a,i.placeholder,void 0,h,y,void 0,void 0,r-f):n(this&&this!==c&&this instanceof i?l:t,this,h)}}},7225:(t,e,r)=>{var n=r(9734),i=r(3902),a=r(205),o=r(5457),s=r(4119),u=r(2857),c=r(380),l=r(1931),f=r(6563);t.exports=function t(e,r,h,p,d,y,g,v,m,E){var C=128&r,b=1&r,S=2&r,w=24&r,A=512&r,T=S?void 0:o(e);return function I(){for(var B=arguments.length,_=Array(B),k=B;k--;)_[k]=arguments[k];if(w)var N=u(I),R=a(_,N);if(p&&(_=n(_,p,d,w)),y&&(_=i(_,y,g,w)),B-=R,w&&B<E){var P=l(_,N);return s(e,r,t,I.placeholder,h,_,P,v,m,E-B)}var F=b?h:this,x=S?F[e]:e;return B=_.length,v?_=c(_,v):A&&B>1&&_.reverse(),C&&m<B&&(_.length=m),this&&this!==f&&this instanceof I&&(x=T||o(x)),x.apply(F,_)}}},8354:(t,e,r)=>{var n=r(5191),i=r(5457),a=r(6563);t.exports=function(t,e,r,o){var s=1&e,u=i(t);return function e(){for(var i=-1,c=arguments.length,l=-1,f=o.length,h=Array(f+c),p=this&&this!==a&&this instanceof e?u:t;++l<f;)h[l]=o[l];for(;c--;)h[l++]=arguments[++i];return n(p,s?r:this,h)}}},4119:(t,e,r)=>{var n=r(7125),i=r(6211),a=r(5451);t.exports=function(t,e,r,o,s,u,c,l,f,h){var p=8&e;e|=p?32:64,4&(e&=~(p?64:32))||(e&=-4);var d=[t,e,s,p?u:void 0,p?c:void 0,p?void 0:u,p?void 0:c,l,f,h],y=r.apply(void 0,d);return n(t)&&i(y,d),y.placeholder=o,a(y,t,e)}},9023:(t,e,r)=>{var n=r(6699),i=r(5908),a=r(9873),o=n&&1/a(new n([,-0]))[1]==1/0?function(t){return new n(t)}:i;t.exports=o},3307:(t,e,r)=>{var n=r(7900),i=r(7020),a=r(1272),o=r(7225),s=r(8354),u=r(4583),c=r(3527),l=r(6211),f=r(5451),h=r(8231),p=Math.max;t.exports=function(t,e,r,d,y,g,v,m){var E=2&e;if(!E&&"function"!=typeof t)throw new TypeError("Expected a function");var C=d?d.length:0;if(C||(e&=-97,d=y=void 0),v=void 0===v?v:p(h(v),0),m=void 0===m?m:h(m),C-=y?y.length:0,64&e){var b=d,S=y;d=y=void 0}var w=E?void 0:u(t),A=[t,e,r,d,y,b,S,g,v,m];if(w&&c(A,w),t=A[0],e=A[1],r=A[2],d=A[3],y=A[4],!(m=A[9]=void 0===A[9]?E?0:t.length:p(A[9]-C,0))&&24&e&&(e&=-25),e&&1!=e)T=8==e||16==e?a(t,e,m):32!=e&&33!=e||y.length?o.apply(void 0,A):s(t,e,r,d);else var T=i(t,e,r);return f((w?n:l)(T,A),t,e)}},3164:(t,e,r)=>{var n=r(7033);t.exports=function(t){return n(t)?void 0:t}},9553:(t,e,r)=>{var n=r(1776),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},5446:(t,e,r)=>{var n=r(3120),i=r(8083),a=r(8455);t.exports=function(t){return a(i(t,void 0,n),t+"")}},4126:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var r="object"==("undefined"==typeof global?"undefined":e(global))&&global&&global.Object===Object&&global;t.exports=r},5136:(t,e,r)=>{var n=r(7237),i=r(6182),a=r(6808);t.exports=function(t){return n(t,a,i)}},2799:(t,e,r)=>{var n=r(7237),i=r(321),a=r(1143);t.exports=function(t){return n(t,a,i)}},4583:(t,e,r)=>{var n=r(2438),i=r(5908),a=n?function(t){return n.get(t)}:i;t.exports=a},1926:(t,e,r)=>{var n=r(6367),i=Object.prototype.hasOwnProperty;t.exports=function(t){for(var e=t.name+"",r=n[e],a=i.call(n,e)?r.length:0;a--;){var o=r[a],s=o.func;if(null==s||s==t)return o.name}return e}},2857:t=>{t.exports=function(t){return t.placeholder}},2065:(t,e,r)=>{var n=r(8660);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},1776:(t,e,r)=>{var n=r(5753),i=r(2402);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},8401:(t,e,r)=>{var n=r(4953)(Object.getPrototypeOf,Object);t.exports=n},3337:(t,e,r)=>{var n=r(5047),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=o.call(t);return n&&(e?t[s]=r:delete t[s]),i}},6182:(t,e,r)=>{var n=r(1576),i=r(2167),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),n(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},321:(t,e,r)=>{var n=r(4018),i=r(8401),a=r(6182),o=r(2167),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,a(t)),t=i(t);return e}:o;t.exports=s},8663:(t,e,r)=>{var n=r(8574),i=r(7949),a=r(6430),o=r(6699),s=r(5061),u=r(6778),c=r(8583),l="[object Map]",f="[object Promise]",h="[object Set]",p="[object WeakMap]",d="[object DataView]",y=c(n),g=c(i),v=c(a),m=c(o),E=c(s),C=u;(n&&C(new n(new ArrayBuffer(1)))!=d||i&&C(new i)!=l||a&&C(a.resolve())!=f||o&&C(new o)!=h||s&&C(new s)!=p)&&(C=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?c(r):"";if(n)switch(n){case y:return d;case g:return l;case v:return f;case m:return h;case E:return p}return e}),t.exports=C},2402:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},9077:t=>{var e=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;t.exports=function(t){var n=t.match(e);return n?n[1].split(r):[]}},3976:(t,e,r)=>{var n=r(5859),i=r(3134),a=r(8944),o=r(6119),s=r(7324),u=r(2427);t.exports=function(t,e,r){for(var c=-1,l=(e=n(e,t)).length,f=!1;++c<l;){var h=u(e[c]);if(!(f=null!=t&&r(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&s(l)&&o(h,l)&&(a(t)||i(t))}},5978:(t,e,r)=>{var n=r(7596);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},7068:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},4143:(t,e,r)=>{var n=r(7596),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},2595:(t,e,r)=>{var n=r(7596),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},5835:(t,e,r)=>{var n=r(7596);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},8631:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var r=t.length,n=new t.constructor(r);return r&&"string"==typeof t[0]&&e.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},8809:(t,e,r)=>{var n=r(995),i=r(7723),a=r(4875),o=r(2622),s=r(435);t.exports=function(t,e,r){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,r);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return a(t);case"[object Symbol]":return o(t)}}},8919:(t,e,r)=>{var n=r(5514),i=r(8401),a=r(405);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:n(i(t))}},9010:t=>{var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=function(t,r){var n=r.length;if(!n)return t;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+r+"] */\n")}},3745:(t,e,r)=>{var n=r(5047),i=r(3134),a=r(8944),o=n?n.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},6119:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=e(t);return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<n}},2750:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(1130),a=r(5932),o=r(6119),s=r(4819);t.exports=function(t,e,r){if(!s(r))return!1;var u=n(e);return!!("number"==u?a(r)&&o(e,r.length):"string"==u&&e in r)&&i(r[e],t)}},4704:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(8944),a=r(4372),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var r=n(t);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!a(t))||s.test(t)||!o.test(t)||null!=e&&t in Object(e)}},8660:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}t.exports=function(t){var r=e(t);return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}},7125:(t,e,r)=>{var n=r(9266),i=r(4583),a=r(1926),o=r(4312);t.exports=function(t){var e=a(t),r=o[e];if("function"!=typeof r||!(e in n.prototype))return!1;if(t===r)return!0;var s=i(r);return!!s&&t===s[0]}},5030:(t,e,r)=>{var n,i=r(2959),a=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!a&&a in t}},405:t=>{var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},3292:t=>{t.exports=function(){this.__data__=[],this.size=0}},2778:(t,e,r)=>{var n=r(799),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},3845:(t,e,r)=>{var n=r(799);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},57:(t,e,r)=>{var n=r(799);t.exports=function(t){return n(this.__data__,t)>-1}},1185:(t,e,r)=>{var n=r(799);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},3662:(t,e,r)=>{var n=r(2507),i=r(9937),a=r(7949);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},2792:(t,e,r)=>{var n=r(2065);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6107:(t,e,r)=>{var n=r(2065);t.exports=function(t){return n(this,t).get(t)}},679:(t,e,r)=>{var n=r(2065);t.exports=function(t){return n(this,t).has(t)}},6223:(t,e,r)=>{var n=r(2065);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},5530:(t,e,r)=>{var n=r(7094);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},3527:(t,e,r)=>{var n=r(9734),i=r(3902),a=r(1931),o="__lodash_placeholder__",s=Math.min;t.exports=function(t,e){var r=t[1],u=e[1],c=r|u,l=c<131,f=128==u&&8==r||128==u&&256==r&&t[7].length<=e[8]||384==u&&e[7].length<=e[8]&&8==r;if(!l&&!f)return t;1&u&&(t[2]=e[2],c|=1&r?0:4);var h=e[3];if(h){var p=t[3];t[3]=p?n(p,h,e[4]):h,t[4]=p?a(t[3],o):e[4]}return(h=e[5])&&(p=t[5],t[5]=p?i(p,h,e[6]):h,t[6]=p?a(t[5],o):e[6]),(h=e[7])&&(t[7]=h),128&u&&(t[8]=null==t[8]?e[8]:s(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=c,t}},2438:(t,e,r)=>{var n=r(5061),i=n&&new n;t.exports=i},7596:(t,e,r)=>{var n=r(1776)(Object,"create");t.exports=n},2644:(t,e,r)=>{var n=r(4953)(Object.keys,Object);t.exports=n},4971:t=>{t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},5515:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}t=r.nmd(t);var i=r(4126),a="object"==n(e)&&e&&!e.nodeType&&e,o=a&&"object"==n(t)&&t&&!t.nodeType&&t,s=o&&o.exports===a&&i.process,u=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u},6572:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4953:t=>{t.exports=function(t,e){return function(r){return t(e(r))}}},8083:(t,e,r)=>{var n=r(5191),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),u=Array(s);++o<s;)u[o]=a[e+o];o=-1;for(var c=Array(e+1);++o<e;)c[o]=a[o];return c[e]=r(u),n(t,this,c)}}},9867:(t,e,r)=>{var n=r(3136),i=r(1369);t.exports=function(t,e){return e.length<2?t:n(t,i(e,0,-1))}},6367:t=>{t.exports={}},380:(t,e,r)=>{var n=r(6213),i=r(6119),a=Math.min;t.exports=function(t,e){for(var r=t.length,o=a(e.length,r),s=n(t);o--;){var u=e[o];t[o]=i(u,r)?s[u]:void 0}return t}},1931:t=>{var e="__lodash_placeholder__";t.exports=function(t,r){for(var n=-1,i=t.length,a=0,o=[];++n<i;){var s=t[n];s!==r&&s!==e||(t[n]=e,o[a++]=n)}return o}},6563:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4126),a="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,o=i||a||Function("return this")();t.exports=o},8936:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},2918:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},1553:t=>{t.exports=function(t){return this.__data__.has(t)}},6211:(t,e,r)=>{var n=r(7900),i=r(1693)(n);t.exports=i},9873:t=>{t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},8455:(t,e,r)=>{var n=r(7848),i=r(1693)(n);t.exports=i},5451:(t,e,r)=>{var n=r(9077),i=r(9010),a=r(8455),o=r(3750);t.exports=function(t,e,r){var s=e+"";return a(t,i(s,o(n(s),r)))}},1693:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var i=e(),a=16-(i-n);if(n=i,a>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},4290:(t,e,r)=>{var n=r(9937);t.exports=function(){this.__data__=new n,this.size=0}},9796:t=>{t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},6935:t=>{t.exports=function(t){return this.__data__.get(t)}},363:t=>{t.exports=function(t){return this.__data__.has(t)}},4675:(t,e,r)=>{var n=r(9937),i=r(7949),a=r(2391);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var o=r.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new a(o)}return r.set(t,e),this.size=r.size,this}},3077:t=>{t.exports=function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}},6184:(t,e,r)=>{var n=r(5530),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(a,"$1"):r||t)})),e}));t.exports=o},2427:(t,e,r)=>{var n=r(4372);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},8583:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2914:t=>{var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},3750:(t,e,r)=>{var n=r(411),i=r(567),a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return n(a,(function(r){var n="_."+r[0];e&r[1]&&!i(t,n)&&t.push(n)})),t.sort()}},3099:(t,e,r)=>{var n=r(9266),i=r(9739),a=r(6213);t.exports=function(t){if(t instanceof n)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=a(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}},6605:(t,e,r)=>{var n=r(3061),i=r(5857),a=r(6525),o=r(5932),s=r(405),u=r(6808),c=Object.prototype.hasOwnProperty,l=a((function(t,e){if(s(e)||o(e))i(e,u(e),t);else for(var r in e)c.call(e,r)&&n(t,r,e[r])}));t.exports=l},4127:(t,e,r)=>{var n=r(6161);t.exports=function(t){return n(t,4)}},2700:t=>{t.exports=function(t){return function(){return t}}},1130:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},4877:(t,e,r)=>{var n=r(2003),i=r(2750);t.exports=function(t,e,r,a){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&i(t,e,r)&&(r=0,a=o),n(t,e,r,a)):[]}},3120:(t,e,r)=>{var n=r(158);t.exports=function(t){return null!=t&&t.length?n(t,1):[]}},8557:(t,e,r)=>{var n=r(7169),i=r(3976);t.exports=function(t,e){return null!=t&&i(t,e,n)}},7350:t=>{t.exports=function(t){return t}},6641:(t,e,r)=>{var n=r(1534),i=r(6595),a=r(7632),o=r(2111),s=a((function(t){var e=n(t,o);return e.length&&e[0]===t[0]?i(e):[]}));t.exports=s},3134:(t,e,r)=>{var n=r(3384),i=r(3804),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},8944:t=>{var e=Array.isArray;t.exports=e},5932:(t,e,r)=>{var n=r(6516),i=r(7324);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},3323:(t,e,r)=>{var n=r(5932),i=r(3804);t.exports=function(t){return i(t)&&n(t)}},6238:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}t=r.nmd(t);var i=r(6563),a=r(6285),o="object"==n(e)&&e&&!e.nodeType&&e,s=o&&"object"==n(t)&&t&&!t.nodeType&&t,u=s&&s.exports===o?i.Buffer:void 0,c=(u?u.isBuffer:void 0)||a;t.exports=c},6516:(t,e,r)=>{var n=r(6778),i=r(4819);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},7324:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},2884:(t,e,r)=>{var n=r(8310),i=r(9963),a=r(5515),o=a&&a.isMap,s=o?i(o):n;t.exports=s},4819:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}t.exports=function(t){var r=e(t);return null!=t&&("object"==r||"function"==r)}},3804:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}t.exports=function(t){return null!=t&&"object"==e(t)}},7033:(t,e,r)=>{var n=r(6778),i=r(8401),a=r(3804),o=Function.prototype,s=Object.prototype,u=o.toString,c=s.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==l}},7305:(t,e,r)=>{var n=r(5508),i=r(9963),a=r(5515),o=a&&a.isSet,s=o?i(o):n;t.exports=s},4372:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(6778),a=r(3804);t.exports=function(t){return"symbol"==n(t)||a(t)&&"[object Symbol]"==i(t)}},6341:(t,e,r)=>{var n=r(3275),i=r(9963),a=r(5515),o=a&&a.isTypedArray,s=o?i(o):n;t.exports=s},6808:(t,e,r)=>{var n=r(7985),i=r(6266),a=r(5932);t.exports=function(t){return a(t)?n(t):i(t)}},1143:(t,e,r)=>{var n=r(7985),i=r(9277),a=r(5932);t.exports=function(t){return a(t)?n(t,!0):i(t)}},2200:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},7094:(t,e,r)=>{var n=r(2391);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},8402:(t,e,r)=>{var n=r(1312),i=r(6525)((function(t,e,r){n(t,e,r)}));t.exports=i},5908:t=>{t.exports=function(){}},2057:(t,e,r)=>{var n=r(1534),i=r(6161),a=r(7817),o=r(5859),s=r(5857),u=r(3164),c=r(5446),l=r(2799),f=c((function(t,e){var r={};if(null==t)return r;var c=!1;e=n(e,(function(e){return e=o(e,t),c||(c=e.length>1),e})),s(t,l(t),r),c&&(r=i(r,7,u));for(var f=e.length;f--;)a(r,e[f]);return r}));t.exports=f},2405:(t,e,r)=>{var n=r(7632),i=r(3307),a=r(2857),o=r(1931),s=n((function(t,e){var r=o(e,a(s));return i(t,64,void 0,e,r)}));s.placeholder={},t.exports=s},3601:(t,e,r)=>{var n=r(9763),i=r(5446)((function(t,e){return null==t?{}:n(t,e)}));t.exports=i},2167:t=>{t.exports=function(){return[]}},6285:t=>{t.exports=function(){return!1}},6782:(t,e,r)=>{var n=r(7376),i=1/0;t.exports=function(t){return t?(t=n(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},8231:(t,e,r)=>{var n=r(6782);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},7525:(t,e,r)=>{var n=r(5759),i=r(8231);t.exports=function(t){return t?n(i(t),0,4294967295):0}},7376:(t,e,r)=>{var n=r(9438),i=r(4819),a=r(4372),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=s.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):o.test(t)?NaN:+t}},1466:(t,e,r)=>{var n=r(5857),i=r(1143);t.exports=function(t){return n(t,i(t))}},7892:(t,e,r)=>{var n=r(2722);t.exports=function(t){return null==t?"":n(t)}},5525:(t,e,r)=>{var n=r(4739);t.exports=function(t){return t&&t.length?n(t):[]}},4312:(t,e,r)=>{var n=r(9266),i=r(9739),a=r(2331),o=r(8944),s=r(3804),u=r(3099),c=Object.prototype.hasOwnProperty;function l(t){if(s(t)&&!o(t)&&!(t instanceof n)){if(t instanceof i)return t;if(c.call(t,"__wrapped__"))return u(t)}return new i(t)}l.prototype=a.prototype,l.prototype.constructor=l,t.exports=l},7962:(t,e,r)=>{var n=r(4602);function i(t,e){n.cipher.registerAlgorithm(t,(function(){return new n.aes.Algorithm(t,e)}))}r(6174),r(4248),r(8533),t.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(t,e,r,n){var i=y({key:t,output:r,decrypt:!1,mode:n});return i.start(e),i},n.aes.createEncryptionCipher=function(t,e){return y({key:t,output:null,decrypt:!1,mode:e})},n.aes.startDecrypting=function(t,e,r,n){var i=y({key:t,output:r,decrypt:!0,mode:n});return i.start(e),i},n.aes.createDecryptionCipher=function(t,e){return y({key:t,output:null,decrypt:!0,mode:e})},n.aes.Algorithm=function(t,e){l||h();var r=this;r.name=t,r.mode=new e({blockSize:16,cipher:{encrypt:function(t,e){return d(r._w,t,e,!1)},decrypt:function(t,e){return d(r._w,t,e,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e,r=t.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){e=r,r=n.util.createBuffer();for(var i=0;i<e.length;++i)r.putByte(e[i])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){e=r,r=[];var a=e.length();if(16===a||24===a||32===a)for(a>>>=2,i=0;i<a;++i)r.push(e.getInt32())}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var o=this.mode.name,s=-1!==["CFB","OFB","CTR","GCM"].indexOf(o);this._w=p(r,t.decrypt&&!s),this._init=!0}},n.aes._expandKey=function(t,e){return l||h(),p(t,e)},n.aes._updateBlock=d,i("AES-ECB",n.cipher.modes.ecb),i("AES-CBC",n.cipher.modes.cbc),i("AES-CFB",n.cipher.modes.cfb),i("AES-OFB",n.cipher.modes.ofb),i("AES-CTR",n.cipher.modes.ctr),i("AES-GCM",n.cipher.modes.gcm);var a,o,s,u,c,l=!1,f=4;function h(){l=!0,s=[0,1,2,4,8,16,32,64,128,27,54];for(var t=new Array(256),e=0;e<128;++e)t[e]=e<<1,t[e+128]=e+128<<1^283;for(a=new Array(256),o=new Array(256),u=new Array(4),c=new Array(4),e=0;e<4;++e)u[e]=new Array(256),c[e]=new Array(256);var r,n,i,f,h,p,d,y=0,g=0;for(e=0;e<256;++e){f=(f=g^g<<1^g<<2^g<<3^g<<4)>>8^255&f^99,a[y]=f,o[f]=y,p=(h=t[f])<<24^f<<16^f<<8^f^h,d=((r=t[y])^(n=t[r])^(i=t[n]))<<24^(y^i)<<16^(y^n^i)<<8^y^r^i;for(var v=0;v<4;++v)u[v][y]=p,c[v][f]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===y?y=g=1:(y=r^t[t[t[r^i]]],g^=t[t[g]])}}function p(t,e){for(var r,n=t.slice(0),i=1,o=n.length,u=f*(o+6+1),l=o;l<u;++l)r=n[l-1],l%o==0?(r=a[r>>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^s[i]<<24,i++):o>6&&l%o==4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),n[l]=n[l-o]^r;if(e){for(var h,p=c[0],d=c[1],y=c[2],g=c[3],v=n.slice(0),m=(l=0,(u=n.length)-f);l<u;l+=f,m-=f)if(0===l||l===u-f)v[l]=n[m],v[l+1]=n[m+3],v[l+2]=n[m+2],v[l+3]=n[m+1];else for(var E=0;E<f;++E)h=n[m+E],v[l+(3&-E)]=p[a[h>>>24]]^d[a[h>>>16&255]]^y[a[h>>>8&255]]^g[a[255&h]];n=v}return n}function d(t,e,r,n){var i,s,l,f,h,p,d,y,g,v,m,E,C=t.length/4-1;n?(i=c[0],s=c[1],l=c[2],f=c[3],h=o):(i=u[0],s=u[1],l=u[2],f=u[3],h=a),p=e[0]^t[0],d=e[n?3:1]^t[1],y=e[2]^t[2],g=e[n?1:3]^t[3];for(var b=3,S=1;S<C;++S)v=i[p>>>24]^s[d>>>16&255]^l[y>>>8&255]^f[255&g]^t[++b],m=i[d>>>24]^s[y>>>16&255]^l[g>>>8&255]^f[255&p]^t[++b],E=i[y>>>24]^s[g>>>16&255]^l[p>>>8&255]^f[255&d]^t[++b],g=i[g>>>24]^s[p>>>16&255]^l[d>>>8&255]^f[255&y]^t[++b],p=v,d=m,y=E;r[0]=h[p>>>24]<<24^h[d>>>16&255]<<16^h[y>>>8&255]<<8^h[255&g]^t[++b],r[n?3:1]=h[d>>>24]<<24^h[y>>>16&255]<<16^h[g>>>8&255]<<8^h[255&p]^t[++b],r[2]=h[y>>>24]<<24^h[g>>>16&255]<<16^h[p>>>8&255]<<8^h[255&d]^t[++b],r[n?1:3]=h[g>>>24]<<24^h[p>>>16&255]<<16^h[d>>>8&255]<<8^h[255&y]^t[++b]}function y(t){var e,r="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,i.call(e,r)},e}},9452:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4602);r(8533),r(8724);var a=t.exports=i.asn1=i.asn1||{};function o(t,e,r){if(r>e){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}function s(t,e,r,n){var i;o(t,e,2);var u=t.getByte();e--;var c=192&u,l=31&u;i=t.length();var f,h,p=function(t,e){var r=t.getByte();if(e--,128!==r){var n;if(128&r){var i=127&r;o(t,e,i),n=t.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(t,e);if(e-=i-t.length(),void 0!==p&&p>e){if(n.strict){var d=new Error("Too few bytes to read ASN.1 value.");throw d.available=t.length(),d.remaining=e,d.requested=p,d}p=e}var y=!(32&~u);if(y)if(f=[],void 0===p)for(;;){if(o(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}i=t.length(),f.push(s(t,e,r+1,n)),e-=i-t.length()}else for(;p>0;)i=t.length(),f.push(s(t,p,r+1,n)),e-=i-t.length(),p-=i-t.length();if(void 0===f&&c===a.Class.UNIVERSAL&&l===a.Type.BITSTRING&&(h=t.bytes(p)),void 0===f&&n.decodeBitStrings&&c===a.Class.UNIVERSAL&&l===a.Type.BITSTRING&&p>1){var g=t.read,v=e,m=0;if(l===a.Type.BITSTRING&&(o(t,e,1),m=t.getByte(),e--),0===m)try{i=t.length();var E=s(t,e,r+1,{strict:!0,decodeBitStrings:!0}),C=i-t.length();e-=C,l==a.Type.BITSTRING&&C++;var b=E.tagClass;C!==p||b!==a.Class.UNIVERSAL&&b!==a.Class.CONTEXT_SPECIFIC||(f=[E])}catch(t){}void 0===f&&(t.read=g,e=v)}if(void 0===f){if(void 0===p){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");p=e}if(l===a.Type.BMPSTRING)for(f="";p>0;p-=2)o(t,e,2),f+=String.fromCharCode(t.getInt16()),e-=2;else f=t.getBytes(p),e-=p}var S=void 0===h?null:{bitStringContents:h};return a.create(c,l,y,f,S)}a.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},a.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},a.create=function(t,e,r,n,o){if(i.util.isArray(n)){for(var s=[],u=0;u<n.length;++u)void 0!==n[u]&&s.push(n[u]);n=s}var c={tagClass:t,type:e,constructed:r,composed:r||i.util.isArray(n),value:n};return o&&"bitStringContents"in o&&(c.bitStringContents=o.bitStringContents,c.original=a.copy(c)),c},a.copy=function(t,e){var r;if(i.util.isArray(t)){r=[];for(var n=0;n<t.length;++n)r.push(a.copy(t[n],e));return r}return"string"==typeof t?t:(r={tagClass:t.tagClass,type:t.type,constructed:t.constructed,composed:t.composed,value:a.copy(t.value,e)},e&&!e.excludeBitStringContents&&(r.bitStringContents=t.bitStringContents),r)},a.equals=function(t,e,r){if(i.util.isArray(t)){if(!i.util.isArray(e))return!1;if(t.length!==e.length)return!1;for(var o=0;o<t.length;++o)if(!a.equals(t[o],e[o]))return!1;return!0}if(n(t)!==n(e))return!1;if("string"==typeof t)return t===e;var s=t.tagClass===e.tagClass&&t.type===e.type&&t.constructed===e.constructed&&t.composed===e.composed&&a.equals(t.value,e.value);return r&&r.includeBitStringContents&&(s=s&&t.bitStringContents===e.bitStringContents),s},a.getBerValueLength=function(t){var e=t.getByte();if(128!==e)return 128&e?t.getInt((127&e)<<3):e},a.fromDer=function(t,e){void 0===e&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"==typeof e&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"string"==typeof t&&(t=i.util.createBuffer(t));var r=t.length(),n=s(t,t.length(),0,e);if(e.parseAllBytes&&0!==t.length()){var a=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw a.byteCount=r,a.remaining=t.length(),a}return n},a.toDer=function(t){var e=i.util.createBuffer(),r=t.tagClass|t.type,n=i.util.createBuffer(),o=!1;if("bitStringContents"in t&&(o=!0,t.original&&(o=a.equals(t,t.original))),o)n.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:n.putByte(0);for(var s=0;s<t.value.length;++s)void 0!==t.value[s]&&n.putBuffer(a.toDer(t.value[s]))}else if(t.type===a.Type.BMPSTRING)for(s=0;s<t.value.length;++s)n.putInt16(t.value.charCodeAt(s));else!(t.type===a.Type.INTEGER&&t.value.length>1)||(0!==t.value.charCodeAt(0)||128&t.value.charCodeAt(1))&&(255!==t.value.charCodeAt(0)||128&~t.value.charCodeAt(1))?n.putBytes(t.value):n.putBytes(t.value.substr(1));if(e.putByte(r),n.length()<=127)e.putByte(127&n.length());else{var u=n.length(),c="";do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0);for(e.putByte(128|c.length),s=c.length-1;s>=0;--s)e.putByte(c.charCodeAt(s))}return e.putBuffer(n),e},a.oidToDer=function(t){var e,r,n,a,o=t.split("."),s=i.util.createBuffer();s.putByte(40*parseInt(o[0],10)+parseInt(o[1],10));for(var u=2;u<o.length;++u){e=!0,r=[],n=parseInt(o[u],10);do{a=127&n,n>>>=7,e||(a|=128),r.push(a),e=!1}while(n>0);for(var c=r.length-1;c>=0;--c)s.putByte(r[c])}return s},a.derToOid=function(t){var e;"string"==typeof t&&(t=i.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var n=0;t.length()>0;)n<<=7,128&(r=t.getByte())?n+=127&r:(e+="."+(n+r),n=0);return e},a.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),a=parseInt(t.substr(6,2),10),o=parseInt(t.substr(8,2),10),s=0;if(t.length>11){var u=t.charAt(10),c=10;"+"!==u&&"-"!==u&&(s=parseInt(t.substr(10,2),10),c+=2)}if(e.setUTCFullYear(r,n,i),e.setUTCHours(a,o,s,0),c&&("+"===(u=t.charAt(c))||"-"===u)){var l=60*parseInt(t.substr(c+1,2),10)+parseInt(t.substr(c+4,2),10);l*=6e4,"+"===u?e.setTime(+e-l):e.setTime(+e+l)}return e},a.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),a=parseInt(t.substr(8,2),10),o=parseInt(t.substr(10,2),10),s=parseInt(t.substr(12,2),10),u=0,c=0,l=!1;"Z"===t.charAt(t.length-1)&&(l=!0);var f=t.length-5,h=t.charAt(f);return"+"!==h&&"-"!==h||(c=60*parseInt(t.substr(f+1,2),10)+parseInt(t.substr(f+4,2),10),c*=6e4,"+"===h&&(c*=-1),l=!0),"."===t.charAt(14)&&(u=1e3*parseFloat(t.substr(14),10)),l?(e.setUTCFullYear(r,n,i),e.setUTCHours(a,o,s,u),e.setTime(+e+c)):(e.setFullYear(r,n,i),e.setHours(a,o,s,u)),e},a.dateToUtcTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(e+="0"),e+=r[n];return e+"Z"},a.dateToGeneralizedTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push(""+t.getUTCFullYear()),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(e+="0"),e+=r[n];return e+"Z"},a.integerToDer=function(t){var e=i.util.createBuffer();if(t>=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},a.derToInteger=function(t){"string"==typeof t&&(t=i.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},a.validate=function(t,e,r,n){var o=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)n&&(t.tagClass!==e.tagClass&&n.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&n.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(o=!0,e.value&&i.util.isArray(e.value))for(var s=0,u=0;o&&u<e.value.length;++u)o=e.value[u].optional||!1,t.value[s]&&((o=a.validate(t.value[s],e.value[u],r,n))?++s:e.value[u].optional&&(o=!0)),!o&&n&&n.push("["+e.name+'] Tag class "'+e.tagClass+'", type "'+e.type+'" expected value length "'+e.value.length+'", got "'+t.value.length+'"');if(o&&r&&(e.capture&&(r[e.capture]=t.value),e.captureAsn1&&(r[e.captureAsn1]=t),e.captureBitStringContents&&"bitStringContents"in t&&(r[e.captureBitStringContents]=t.bitStringContents),e.captureBitStringValue&&"bitStringContents"in t))if(t.bitStringContents.length<2)r[e.captureBitStringValue]="";else{if(0!==t.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[e.captureBitStringValue]=t.bitStringContents.slice(1)}}else n&&n.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+t.constructed+'"');return o};var u=/[^\\u0000-\\u00ff]/;a.prettyPrint=function(t,e,r){var n="";r=r||2,(e=e||0)>0&&(n+="\n");for(var o="",s=0;s<e*r;++s)o+=" ";switch(n+=o+"Tag: ",t.tagClass){case a.Class.UNIVERSAL:n+="Universal:";break;case a.Class.APPLICATION:n+="Application:";break;case a.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case a.Class.PRIVATE:n+="Private:"}if(t.tagClass===a.Class.UNIVERSAL)switch(n+=t.type,t.type){case a.Type.NONE:n+=" (None)";break;case a.Type.BOOLEAN:n+=" (Boolean)";break;case a.Type.INTEGER:n+=" (Integer)";break;case a.Type.BITSTRING:n+=" (Bit string)";break;case a.Type.OCTETSTRING:n+=" (Octet string)";break;case a.Type.NULL:n+=" (Null)";break;case a.Type.OID:n+=" (Object Identifier)";break;case a.Type.ODESC:n+=" (Object Descriptor)";break;case a.Type.EXTERNAL:n+=" (External or Instance of)";break;case a.Type.REAL:n+=" (Real)";break;case a.Type.ENUMERATED:n+=" (Enumerated)";break;case a.Type.EMBEDDED:n+=" (Embedded PDV)";break;case a.Type.UTF8:n+=" (UTF8)";break;case a.Type.ROID:n+=" (Relative Object Identifier)";break;case a.Type.SEQUENCE:n+=" (Sequence)";break;case a.Type.SET:n+=" (Set)";break;case a.Type.PRINTABLESTRING:n+=" (Printable String)";break;case a.Type.IA5String:n+=" (IA5String (ASCII))";break;case a.Type.UTCTIME:n+=" (UTC time)";break;case a.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case a.Type.BMPSTRING:n+=" (BMP String)"}else n+=t.type;if(n+="\n",n+=o+"Constructed: "+t.constructed+"\n",t.composed){var c=0,l="";for(s=0;s<t.value.length;++s)void 0!==t.value[s]&&(c+=1,l+=a.prettyPrint(t.value[s],e+1,r),s+1<t.value.length&&(l+=","));n+=o+"Sub values: "+c+l}else{if(n+=o+"Value: ",t.type===a.Type.OID){var f=a.derToOid(t.value);n+=f,i.pki&&i.pki.oids&&f in i.pki.oids&&(n+=" ("+i.pki.oids[f]+") ")}if(t.type===a.Type.INTEGER)try{n+=a.derToInteger(t.value)}catch(e){n+="0x"+i.util.bytesToHex(t.value)}else if(t.type===a.Type.BITSTRING){if(t.value.length>1?n+="0x"+i.util.bytesToHex(t.value.slice(1)):n+="(none)",t.value.length>0){var h=t.value.charCodeAt(0);1==h?n+=" (1 unused bit shown)":h>1&&(n+=" ("+h+" unused bits shown)")}}else if(t.type===a.Type.OCTETSTRING)u.test(t.value)||(n+="("+t.value+") "),n+="0x"+i.util.bytesToHex(t.value);else if(t.type===a.Type.UTF8)try{n+=i.util.decodeUtf8(t.value)}catch(e){if("URI malformed"!==e.message)throw e;n+="0x"+i.util.bytesToHex(t.value)+" (malformed UTF8)"}else t.type===a.Type.PRINTABLESTRING||t.type===a.Type.IA5String?n+=t.value:u.test(t.value)?n+="0x"+i.util.bytesToHex(t.value):0===t.value.length?n+="[null]":n+=t.value}return n}},5980:t=>{var e={};t.exports=e;var r={};e.encode=function(t,e,r){if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(t instanceof Uint8Array){var i=0,a=e.length,o=e.charAt(0),s=[0];for(i=0;i<t.length;++i){for(var u=0,c=t[i];u<s.length;++u)c+=s[u]<<8,s[u]=c%a,c=c/a|0;for(;c>0;)s.push(c%a),c=c/a|0}for(i=0;0===t[i]&&i<t.length-1;++i)n+=o;for(i=s.length-1;i>=0;--i)n+=e[s[i]]}else n=function(t,e){var r=0,n=e.length,i=e.charAt(0),a=[0];for(r=0;r<t.length();++r){for(var o=0,s=t.at(r);o<a.length;++o)s+=a[o]<<8,a[o]=s%n,s=s/n|0;for(;s>0;)a.push(s%n),s=s/n|0}var u="";for(r=0;0===t.at(r)&&r<t.length()-1;++r)u+=i;for(r=a.length-1;r>=0;--r)u+=e[a[r]];return u}(t,e);if(r){var l=new RegExp(".{1,"+r+"}","g");n=n.match(l).join("\r\n")}return n},e.decode=function(t,e){if("string"!=typeof t)throw new TypeError('"input" must be a string.');if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');var n=r[e];if(!n){n=r[e]=[];for(var i=0;i<e.length;++i)n[e.charCodeAt(i)]=i}t=t.replace(/\s/g,"");var a=e.length,o=e.charAt(0),s=[0];for(i=0;i<t.length;i++){var u=n[t.charCodeAt(i)];if(void 0===u)return;for(var c=0,l=u;c<s.length;++c)l+=s[c]*a,s[c]=255&l,l>>=8;for(;l>0;)s.push(255&l),l>>=8}for(var f=0;t[f]===o&&f<t.length-1;++f)s.push(0);return"undefined"!=typeof Buffer?Buffer.from(s.reverse()):new Uint8Array(s.reverse())}},6174:(t,e,r)=>{var n=r(4602);r(8533),t.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(t,e){var r=t;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new n.cipher.BlockCipher({algorithm:r,key:e,decrypt:!1})},n.cipher.createDecipher=function(t,e){var r=t;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new n.cipher.BlockCipher({algorithm:r,key:e,decrypt:!0})},n.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),n.cipher.algorithms[t]=e},n.cipher.getAlgorithm=function(t){return(t=t.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[t]:null};var i=n.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};i.prototype.start=function(t){t=t||{};var e={};for(var r in t)e[r]=t[r];e.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=t.output||n.util.createBuffer(),this.mode.start(e)},i.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(t){!t||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(e){return t(this.blockSize,e,!1)},this.mode.unpad=function(e){return t(this.blockSize,e,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e)))}},4248:(t,e,r)=>{var n=r(4602);r(8533),n.cipher=n.cipher||{};var i=t.exports=n.cipher.modes=n.cipher.modes||{};function a(t,e){if("string"==typeof t&&(t=n.util.createBuffer(t)),n.util.isArray(t)&&t.length>4){var r=t;t=n.util.createBuffer();for(var i=0;i<r.length;++i)t.putByte(r[i])}if(t.length()<e)throw new Error("Invalid IV length; got "+t.length()+" bytes and expected "+e+" bytes.");if(!n.util.isArray(t)){var a=[],o=e/4;for(i=0;i<o;++i)a.push(t.getInt32());t=a}return t}function o(t){t[t.length-1]=t[t.length-1]+1&4294967295}function s(t){return[t/4294967296|0,4294967295&t]}i.ecb=function(t){t=t||{},this.name="ECB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(t){},i.ecb.prototype.encrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=t.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])},i.ecb.prototype.decrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=t.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])},i.ecb.prototype.pad=function(t,e){var r=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(r,r),!0},i.ecb.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2||(t.truncate(n),0))},i.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^t.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]);this._prev=this._outBlock},i.cbc.prototype.decrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=t.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)e.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(t,e){var r=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(r,r),!0},i.cbc.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2||(t.truncate(n),0))},i.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32()^this._outBlock[i],e.putInt32(this._inBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialBlock[i]=t.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(a>0)t.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32(),e.putInt32(this._inBlock[i]^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialBlock[i]=t.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(a>0)t.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)e.putInt32(t.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialOutput.putInt32(t.getInt32()^this._outBlock[i]);if(a>0)t.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)e.putInt32(t.getInt32()^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialOutput.putInt32(t.getInt32()^this._outBlock[i]);if(a>0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}o(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,r=n.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?n.util.createBuffer(t.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=n.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),o(this._inBlock),this._partialBytes=0,e=n.util.createBuffer(e),this._aDataLength=s(8*e.length());var a=e.length()%this.blockSize;for(a&&e.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},i.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i<this._ints;++i)e.putInt32(this._outBlock[i]^=t.getInt32());this._cipherLength+=this.blockSize}else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialOutput.putInt32(t.getInt32()^this._outBlock[i]);if(a<=0||r){if(r){var s=n%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),o(this._inBlock)},i.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),o(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)e.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(t,e){var r=!0;e.decrypt&&e.overflow&&t.truncate(this.blockSize-e.overflow),this.tag=n.util.createBuffer();var i=this._aDataLength.concat(s(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,i);var a=[];this.cipher.encrypt(this._j0,a);for(var o=0;o<this._ints;++o)this.tag.putInt32(this._s[o]^a[o]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},i.gcm.prototype.multiply=function(t,e){for(var r=[0,0,0,0],n=e.slice(0),i=0;i<128;++i)t[i/32|0]&1<<31-i%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n);return r},i.gcm.prototype.pow=function(t,e){for(var r=1&t[3],n=3;n>0;--n)e[n]=t[n]>>>1|(1&t[n-1])<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)},i.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=t[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e},i.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)},i.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,i=16*r,a=new Array(i),o=0;o<i;++o){var s=[0,0,0,0],u=(n-1-o%n)*e;s[o/n|0]=1<<e-1<<u,a[o]=this.generateSubHashTable(this.multiply(s,t),e)}return a},i.gcm.prototype.generateSubHashTable=function(t,e){var r=1<<e,n=r>>>1,i=new Array(r);i[n]=t.slice(0);for(var a=n>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a<n;){for(var o=1;o<a;++o){var s=i[a],u=i[o];i[a+o]=[s[0]^u[0],s[1]^u[1],s[2]^u[2],s[3]^u[3]]}a*=2}for(i[0]=[0,0,0,0],a=n+1;a<r;++a){var c=i[a^n];i[a]=[t[0]^c[0],t[1]^c[1],t[2]^c[2],t[3]^c[3]]}return i}},7161:(t,e,r)=>{var n=r(4602);function i(t,e){n.cipher.registerAlgorithm(t,(function(){return new n.des.Algorithm(t,e)}))}r(6174),r(4248),r(8533),t.exports=n.des=n.des||{},n.des.startEncrypting=function(t,e,r,n){var i=d({key:t,output:r,decrypt:!1,mode:n||(null===e?"ECB":"CBC")});return i.start(e),i},n.des.createEncryptionCipher=function(t,e){return d({key:t,output:null,decrypt:!1,mode:e})},n.des.startDecrypting=function(t,e,r,n){var i=d({key:t,output:r,decrypt:!0,mode:n||(null===e?"ECB":"CBC")});return i.start(e),i},n.des.createDecryptionCipher=function(t,e){return d({key:t,output:null,decrypt:!0,mode:e})},n.des.Algorithm=function(t,e){var r=this;r.name=t,r.mode=new e({blockSize:8,cipher:{encrypt:function(t,e){return p(r._keys,t,e,!1)},decrypt:function(t,e){return p(r._keys,t,e,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(t){if(!this._init){var e=n.util.createBuffer(t.key);if(0===this.name.indexOf("3DES")&&24!==e.length())throw new Error("Invalid Triple-DES key size: "+8*e.length());this._keys=function(t){for(var e,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],o=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],f=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],p=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],y=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=t.length()>8?3:1,v=[],m=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],E=0,C=0;C<g;C++){var b=t.getInt32(),S=t.getInt32();b^=(e=252645135&(b>>>4^S))<<4,b^=e=65535&((S^=e)>>>-16^b),b^=(e=858993459&(b>>>2^(S^=e<<-16)))<<2,b^=e=65535&((S^=e)>>>-16^b),b^=(e=1431655765&(b>>>1^(S^=e<<-16)))<<1,b^=e=16711935&((S^=e)>>>8^b),e=(b^=(e=1431655765&(b>>>1^(S^=e<<8)))<<1)<<8|(S^=e)>>>20&240,b=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=e;for(var w=0;w<m.length;++w){m[w]?(b=b<<2|b>>>26,S=S<<2|S>>>26):(b=b<<1|b>>>27,S=S<<1|S>>>27);var A=r[(b&=-15)>>>28]|n[b>>>24&15]|i[b>>>20&15]|a[b>>>16&15]|o[b>>>12&15]|s[b>>>8&15]|u[b>>>4&15],T=c[(S&=-15)>>>28]|l[S>>>24&15]|f[S>>>20&15]|h[S>>>16&15]|p[S>>>12&15]|d[S>>>8&15]|y[S>>>4&15];e=65535&(T>>>16^A),v[E++]=A^e,v[E++]=T^e<<16}}return v}(e),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var a=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],o=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],s=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(t,e,r,n){var i,p,d=32===t.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y=e[0],g=e[1];y^=(p=252645135&(y>>>4^g))<<4,y^=(p=65535&(y>>>16^(g^=p)))<<16,y^=p=858993459&((g^=p)>>>2^y),y^=p=16711935&((g^=p<<2)>>>8^y),y=(y^=(p=1431655765&(y>>>1^(g^=p<<8)))<<1)<<1|y>>>31,g=(g^=p)<<1|g>>>31;for(var v=0;v<d;v+=3){for(var m=i[v+1],E=i[v+2],C=i[v];C!=m;C+=E){var b=g^t[C],S=(g>>>4|g<<28)^t[C+1];p=y,y=g,g=p^(o[b>>>24&63]|u[b>>>16&63]|l[b>>>8&63]|h[63&b]|a[S>>>24&63]|s[S>>>16&63]|c[S>>>8&63]|f[63&S])}p=y,y=g,g=p}g=g>>>1|g<<31,g^=p=1431655765&((y=y>>>1|y<<31)>>>1^g),g^=(p=16711935&(g>>>8^(y^=p<<1)))<<8,g^=(p=858993459&(g>>>2^(y^=p)))<<2,g^=p=65535&((y^=p)>>>16^g),g^=p=252645135&((y^=p<<16)>>>4^g),y^=p<<4,r[0]=y,r[1]=g}function d(t){var e,r="DES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,i.call(e,r)},e}},4602:t=>{t.exports={options:{usePureJavaScript:!1}}},2814:(t,e,r)=>{var n=r(4602);r(7668),r(8533),(t.exports=n.hmac=n.hmac||{}).create=function(){var t=null,e=null,r=null,i=null,a={start:function(a,o){if(null!==a)if("string"==typeof a){if(!((a=a.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+a+'"');e=n.md.algorithms[a].create()}else e=a;if(null===o)o=t;else{if("string"==typeof o)o=n.util.createBuffer(o);else if(n.util.isArray(o)){var s=o;o=n.util.createBuffer();for(var u=0;u<s.length;++u)o.putByte(s[u])}var c=o.length();for(c>e.blockLength&&(e.start(),e.update(o.bytes()),o=e.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),c=o.length(),u=0;u<c;++u)s=o.at(u),r.putByte(54^s),i.putByte(92^s);if(c<e.blockLength)for(s=e.blockLength-c,u=0;u<s;++u)r.putByte(54),i.putByte(92);t=o,r=r.bytes(),i=i.bytes()}e.start(),e.update(r)},update:function(t){e.update(t)},getMac:function(){var t=e.digest().bytes();return e.start(),e.update(i),e.update(t),e.digest()}};return a.digest=a.getMac,a}},9818:(t,e,r)=>{var n,i=r(4602);function a(t,e,r){this.data=[],null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function o(){return new a(null)}function s(t,e,r,n,i,a){for(var o=16383&e,s=e>>14;--a>=0;){var u=16383&this.data[t],c=this.data[t++]>>14,l=s*u+c*o;i=((u=o*u+((16383&l)<<14)+r.data[n]+i)>>28)+(l>>14)+s*c,r.data[n++]=268435455&u}return i}t.exports=i.jsbn=i.jsbn||{},i.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=s,n=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(t,e,r,n,i,a){for(var o=32767&e,s=e>>15;--a>=0;){var u=32767&this.data[t],c=this.data[t++]>>15,l=s*u+c*o;i=((u=o*u+((32767&l)<<15)+r.data[n]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(a.prototype.am=function(t,e,r,n,i,a){for(;--a>=0;){var o=e*this.data[t++]+r.data[n]+i;i=Math.floor(o/67108864),r.data[n++]=67108863&o}return i},n=26):(a.prototype.am=s,n=28),a.prototype.DB=n,a.prototype.DM=(1<<n)-1,a.prototype.DV=1<<n,a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-n,a.prototype.F2=2*n-52;var u,c,l=new Array;for(u="0".charCodeAt(0),c=0;c<=9;++c)l[u++]=c;for(u="a".charCodeAt(0),c=10;c<36;++c)l[u++]=c;for(u="A".charCodeAt(0),c=10;c<36;++c)l[u++]=c;function f(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function h(t,e){var r=l[t.charCodeAt(e)];return null==r?-1:r}function p(t){var e=o();return e.fromInt(t),e}function d(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function y(t){this.m=t}function g(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function v(t,e){return t&e}function m(t,e){return t|e}function E(t,e){return t^e}function C(t,e){return t&~e}function b(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function S(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function w(){}function A(t){return t}function T(t){this.r2=o(),this.q3=o(),a.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}y.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},y.prototype.revert=function(t){return t},y.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},y.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},y.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},g.prototype.convert=function(t){var e=o();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(a.ZERO)>0&&this.m.subTo(e,e),e},g.prototype.revert=function(t){var e=o();return t.copyTo(e),this.reduce(e),e},g.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t.data[e],n=r*this.mpl+((r*this.mph+(t.data[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},g.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},a.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},a.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},a.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,o=0;--n>=0;){var s=8==r?255&t[n]:h(t,n);s<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==o?this.data[this.t++]=s:o+r>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this.data[this.t++]=s>>this.DB-o):this.data[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&128&t[0]&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this.data[this.t-1]==t;)--this.t},a.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s},a.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e.data[r-t]=this.data[r];e.t=Math.max(this.t-t,0),e.s=this.s},a.prototype.lShiftTo=function(t,e){var r,n=t%this.DB,i=this.DB-n,a=(1<<i)-1,o=Math.floor(t/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e.data[r+o+1]=this.data[r]>>i|s,s=(this.data[r]&a)<<n;for(r=o-1;r>=0;--r)e.data[r]=0;e.data[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},a.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,a=(1<<n)-1;e.data[0]=this.data[r]>>n;for(var o=r+1;o<this.t;++o)e.data[o-r-1]|=(this.data[o]&a)<<i,e.data[o-r]=this.data[o]>>n;n>0&&(e.data[this.t-r-1]|=(this.s&a)<<i),e.t=this.t-r,e.clamp()}},a.prototype.subTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this.data[r]-t.data[r],e.data[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this.data[r],e.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t.data[r],e.data[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()},a.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e.data[i]=0;for(i=0;i<n.t;++i)e.data[i+r.t]=r.am(0,n.data[i],e,i,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&a.ZERO.subTo(e,e)},a.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t.data[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e.data[r],t,2*r,0,1);(t.data[r+e.t]+=e.am(r+1,2*e.data[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()},a.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=o());var s=o(),u=this.s,c=t.s,l=this.DB-d(n.data[n.t-1]);l>0?(n.lShiftTo(l,s),i.lShiftTo(l,r)):(n.copyTo(s),i.copyTo(r));var f=s.t,h=s.data[f-1];if(0!=h){var p=h*(1<<this.F1)+(f>1?s.data[f-2]>>this.F2:0),y=this.FV/p,g=(1<<this.F1)/p,v=1<<this.F2,m=r.t,E=m-f,C=null==e?o():e;for(s.dlShiftTo(E,C),r.compareTo(C)>=0&&(r.data[r.t++]=1,r.subTo(C,r)),a.ONE.dlShiftTo(f,C),C.subTo(s,s);s.t<f;)s.data[s.t++]=0;for(;--E>=0;){var b=r.data[--m]==h?this.DM:Math.floor(r.data[m]*y+(r.data[m-1]+v)*g);if((r.data[m]+=s.am(0,b,r,E,0,f))<b)for(s.dlShiftTo(E,C),r.subTo(C,r);r.data[m]<--b;)r.subTo(C,r)}null!=e&&(r.drShiftTo(f,e),u!=c&&a.ZERO.subTo(e,e)),r.t=f,r.clamp(),l>0&&r.rShiftTo(l,r),u<0&&a.ZERO.subTo(r,r)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(t,e){if(t>4294967295||t<1)return a.ONE;var r=o(),n=o(),i=e.convert(this),s=d(t)-1;for(i.copyTo(r);--s>=0;)if(e.sqrTo(r,n),(t&1<<s)>0)e.mulTo(n,i,r);else{var u=r;r=n,n=u}return e.revert(r)},a.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,i=!1,a="",o=this.t,s=this.DB-o*this.DB%e;if(o-- >0)for(s<this.DB&&(r=this.data[o]>>s)>0&&(i=!0,a=f(r));o>=0;)s<e?(r=(this.data[o]&(1<<s)-1)<<e-s,r|=this.data[--o]>>(s+=this.DB-e)):(r=this.data[o]>>(s-=e)&n,s<=0&&(s+=this.DB,--o)),r>0&&(i=!0),i&&(a+=f(r));return i?a:"0"},a.prototype.negate=function(){var t=o();return a.ZERO.subTo(this,t),t},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this.data[r]-t.data[r]))return e;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(t){var e=o();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(a.ZERO)>0&&t.subTo(e,e),e},a.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new y(e):new g(e),this.exp(t,r)},a.ZERO=p(0),a.ONE=p(1),w.prototype.convert=A,w.prototype.revert=A,w.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},w.prototype.sqrTo=function(t,e){t.squareTo(e)},T.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=o();return t.copyTo(e),this.reduce(e),e},T.prototype.revert=function(t){return t},T.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},T.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},T.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var I=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],B=(1<<26)/I[I.length-1];a.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},a.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=p(r),i=o(),a=o(),s="";for(this.divRemTo(n,i,a);i.signum()>0;)s=(r+a.intValue()).toString(t).substr(1)+s,i.divRemTo(n,i,a);return a.intValue().toString(t)+s},a.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,o=0,s=0,u=0;u<t.length;++u){var c=h(t,u);c<0?"-"==t.charAt(u)&&0==this.signum()&&(i=!0):(s=e*s+c,++o>=r&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),i&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(a.ONE.shiftLeft(t-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(a.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},a.prototype.bitwiseTo=function(t,e,r){var n,i,a=Math.min(t.t,this.t);for(n=0;n<a;++n)r.data[n]=e(this.data[n],t.data[n]);if(t.t<this.t){for(i=t.s&this.DM,n=a;n<this.t;++n)r.data[n]=e(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=a;n<t.t;++n)r.data[n]=e(i,t.data[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},a.prototype.changeBit=function(t,e){var r=a.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},a.prototype.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this.data[r]+t.data[r],e.data[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this.data[r],e.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t.data[r],e.data[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()},a.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},a.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,t.data[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t.data[i],r,i,0,e-i);r.clamp()},a.prototype.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r.data[this.t+n-e]=this.am(e-n,t.data[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},a.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r},a.prototype.millerRabin=function(t){var e=this.subtract(a.ONE),r=e.getLowestSetBit();if(r<=0)return!1;for(var n,i=e.shiftRight(r),o={nextBytes:function(t){for(var e=0;e<t.length;++e)t[e]=Math.floor(256*Math.random())}},s=0;s<t;++s){do{n=new a(this.bitLength(),o)}while(n.compareTo(a.ONE)<=0||n.compareTo(e)>=0);var u=n.modPow(i,this);if(0!=u.compareTo(a.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<r&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(a.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},a.prototype.clone=function(){var t=o();return this.copyTo(t),t},a.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},a.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n<this.DB&&(r=this.data[t]>>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this.data[t]&(1<<n)-1)<<8-n,r|=this.data[--t]>>(n+=this.DB-8)):(r=this.data[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},a.prototype.equals=function(t){return 0==this.compareTo(t)},a.prototype.min=function(t){return this.compareTo(t)<0?this:t},a.prototype.max=function(t){return this.compareTo(t)>0?this:t},a.prototype.and=function(t){var e=o();return this.bitwiseTo(t,v,e),e},a.prototype.or=function(t){var e=o();return this.bitwiseTo(t,m,e),e},a.prototype.xor=function(t){var e=o();return this.bitwiseTo(t,E,e),e},a.prototype.andNot=function(t){var e=o();return this.bitwiseTo(t,C,e),e},a.prototype.not=function(){for(var t=o(),e=0;e<this.t;++e)t.data[e]=this.DM&~this.data[e];return t.t=this.t,t.s=~this.s,t},a.prototype.shiftLeft=function(t){var e=o();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},a.prototype.shiftRight=function(t){var e=o();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},a.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this.data[t])return t*this.DB+b(this.data[t]);return this.s<0?this.t*this.DB:-1},a.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=S(this.data[r]^e);return t},a.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this.data[e]&1<<t%this.DB)},a.prototype.setBit=function(t){return this.changeBit(t,m)},a.prototype.clearBit=function(t){return this.changeBit(t,C)},a.prototype.flipBit=function(t){return this.changeBit(t,E)},a.prototype.add=function(t){var e=o();return this.addTo(t,e),e},a.prototype.subtract=function(t){var e=o();return this.subTo(t,e),e},a.prototype.multiply=function(t){var e=o();return this.multiplyTo(t,e),e},a.prototype.divide=function(t){var e=o();return this.divRemTo(t,e,null),e},a.prototype.remainder=function(t){var e=o();return this.divRemTo(t,null,e),e},a.prototype.divideAndRemainder=function(t){var e=o(),r=o();return this.divRemTo(t,e,r),new Array(e,r)},a.prototype.modPow=function(t,e){var r,n,i=t.bitLength(),a=p(1);if(i<=0)return a;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new y(e):e.isEven()?new T(e):new g(e);var s=new Array,u=3,c=r-1,l=(1<<r)-1;if(s[1]=n.convert(this),r>1){var f=o();for(n.sqrTo(s[1],f);u<=l;)s[u]=o(),n.mulTo(f,s[u-2],s[u]),u+=2}var h,v,m=t.t-1,E=!0,C=o();for(i=d(t.data[m])-1;m>=0;){for(i>=c?h=t.data[m]>>i-c&l:(h=(t.data[m]&(1<<i+1)-1)<<c-i,m>0&&(h|=t.data[m-1]>>this.DB+i-c)),u=r;!(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--m),E)s[h].copyTo(a),E=!1;else{for(;u>1;)n.sqrTo(a,C),n.sqrTo(C,a),u-=2;u>0?n.sqrTo(a,C):(v=a,a=C,C=v),n.mulTo(C,s[h],a)}for(;m>=0&&!(t.data[m]&1<<i);)n.sqrTo(a,C),v=a,a=C,C=v,--i<0&&(i=this.DB-1,--m)}return n.revert(a)},a.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return a.ZERO;for(var r=t.clone(),n=this.clone(),i=p(1),o=p(0),s=p(0),u=p(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(t,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),e?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(t,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),e&&i.subTo(s,i),o.subTo(u,o)):(n.subTo(r,n),e&&s.subTo(i,s),u.subTo(o,u))}return 0!=n.compareTo(a.ONE)?a.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},a.prototype.pow=function(t){return this.exp(t,new w)},a.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return e;for(i<a&&(a=i),a>0&&(e.rShiftTo(a,e),r.rShiftTo(a,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},a.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r.data[0]<=I[I.length-1]){for(e=0;e<I.length;++e)if(r.data[0]==I[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<I.length;){for(var n=I[e],i=e+1;i<I.length&&n<B;)n*=I[i++];for(n=r.modInt(n);e<i;)if(n%I[e++]==0)return!1}return r.millerRabin(t)}},7668:(t,e,r)=>{var n=r(4602);t.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},1451:(t,e,r)=>{var n=r(4602);r(2132),t.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},2132:(t,e,r)=>{var n=r(4602);r(8533),n.mgf=n.mgf||{},(t.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(t){return{generate:function(e,r){for(var i=new n.util.ByteBuffer,a=Math.ceil(r/t.digestLength),o=0;o<a;o++){var s=new n.util.ByteBuffer;s.putInt32(o),t.start(),t.update(e+s.getBytes()),i.putBuffer(t.digest())}return i.truncate(i.length()-r),i.getBytes()}}}},8724:(t,e,r)=>{var n=r(4602);n.pki=n.pki||{};var i=t.exports=n.pki.oids=n.oids=n.oids||{};function a(t,e){i[t]=e,i[e]=t}function o(t,e){i[t]=e}a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRSAEncryption"),a("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),a("1.2.840.113549.1.1.7","RSAES-OAEP"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.9","pSpecified"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),a("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),a("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),a("1.3.101.112","EdDSA25519"),a("1.2.840.10040.4.3","dsa-with-sha1"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("1.3.14.3.2.29","sha1WithRSASignature"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("2.16.840.1.101.3.4.2.4","sha224"),a("2.16.840.1.101.3.4.2.5","sha512-224"),a("2.16.840.1.101.3.4.2.6","sha512-256"),a("1.2.840.113549.2.2","md2"),a("1.2.840.113549.2.5","md5"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),a("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),a("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),a("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),a("1.2.840.113549.2.7","hmacWithSHA1"),a("1.2.840.113549.2.8","hmacWithSHA224"),a("1.2.840.113549.2.9","hmacWithSHA256"),a("1.2.840.113549.2.10","hmacWithSHA384"),a("1.2.840.113549.2.11","hmacWithSHA512"),a("1.2.840.113549.3.7","des-EDE3-CBC"),a("2.16.840.1.101.3.4.1.2","aes128-CBC"),a("2.16.840.1.101.3.4.1.22","aes192-CBC"),a("2.16.840.1.101.3.4.1.42","aes256-CBC"),a("2.5.4.3","commonName"),a("2.5.4.4","surname"),a("2.5.4.5","serialNumber"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.9","streetAddress"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.12","title"),a("2.5.4.13","description"),a("2.5.4.15","businessCategory"),a("2.5.4.17","postalCode"),a("2.5.4.42","givenName"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.16.840.1.113730.1.13","nsComment"),o("2.5.29.1","authorityKeyIdentifier"),o("2.5.29.2","keyAttributes"),o("2.5.29.3","certificatePolicies"),o("2.5.29.4","keyUsageRestriction"),o("2.5.29.5","policyMapping"),o("2.5.29.6","subtreesConstraint"),o("2.5.29.7","subjectAltName"),o("2.5.29.8","issuerAltName"),o("2.5.29.9","subjectDirectoryAttributes"),o("2.5.29.10","basicConstraints"),o("2.5.29.11","nameConstraints"),o("2.5.29.12","policyConstraints"),o("2.5.29.13","basicConstraints"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),o("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),o("2.5.29.20","cRLNumber"),o("2.5.29.21","cRLReason"),o("2.5.29.22","expirationDate"),o("2.5.29.23","instructionCode"),o("2.5.29.24","invalidityDate"),o("2.5.29.25","cRLDistributionPoints"),o("2.5.29.26","issuingDistributionPoint"),o("2.5.29.27","deltaCRLIndicator"),o("2.5.29.28","issuingDistributionPoint"),o("2.5.29.29","certificateIssuer"),o("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),o("2.5.29.33","policyMappings"),o("2.5.29.34","policyConstraints"),a("2.5.29.35","authorityKeyIdentifier"),o("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),o("2.5.29.46","freshestCRL"),o("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping")},4932:(t,e,r)=>{var n=r(4602);if(r(7962),r(9452),r(7161),r(7668),r(8724),r(600),r(8999),r(2930),r(3038),r(107),r(8533),void 0===i)var i=n.jsbn.BigInteger;var a=n.asn1,o=n.pki=n.pki||{};t.exports=o.pbe=n.pbe=n.pbe||{};var s=o.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},l={name:"pkcs-12PbeParams",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"iterations"}]};function f(t,e){return t.start().update(e).digest().getBytes()}function h(t){var e;if(t){if(!(e=o.oids[a.derToOid(t)])){var r=new Error("Unsupported PRF OID.");throw r.oid=t,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else e="hmacWithSHA1";return p(e)}function p(t){var e=n.md;switch(t){case"hmacWithSHA224":e=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":t=t.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=t,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!e||!(t in e))throw new Error("Unknown hash algorithm: "+t);return e[t].create()}o.encryptPrivateKeyInfo=function(t,e,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,u,c,l=n.random.getBytesSync(r.saltSize),f=r.count,h=a.integerToDer(f);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var d,y,g;switch(r.algorithm){case"aes128":i=16,d=16,y=s["aes128-CBC"],g=n.aes.createEncryptionCipher;break;case"aes192":i=24,d=16,y=s["aes192-CBC"],g=n.aes.createEncryptionCipher;break;case"aes256":i=32,d=16,y=s["aes256-CBC"],g=n.aes.createEncryptionCipher;break;case"des":i=8,d=8,y=s.desCBC,g=n.des.createEncryptionCipher;break;default:throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S}var v="hmacWith"+r.prfAlgorithm.toUpperCase(),m=p(v),E=n.pkcs5.pbkdf2(e,l,f,i,m),C=n.random.getBytesSync(d);(w=g(E)).start(C),w.update(a.toDer(t)),w.finish(),c=w.output.getBytes();var b=function(t,e,r,i){var s=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,t),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,e.getBytes())]);return"hmacWithSHA1"!==i&&s.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.oids[i]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])),s}(l,h,i,v);u=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBES2).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBKDF2).getBytes()),b]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(y).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,C)])])])}else{var S;if("3des"!==r.algorithm)throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S;i=24;var w,A=new n.util.ByteBuffer(l);E=o.pbe.generatePkcs12Key(e,A,1,f,i),C=o.pbe.generatePkcs12Key(e,A,2,f,i),(w=n.des.createEncryptionCipher(E)).start(C),w.update(a.toDer(t)),w.finish(),c=w.output.getBytes(),u=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,l),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,h.getBytes())])])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[u,a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,c)])},o.decryptPrivateKeyInfo=function(t,e){var r=null,i={},s=[];if(!a.validate(t,u,i,s)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=s,c}var l=a.derToOid(i.encryptionOid),f=o.pbe.getCipher(l,i.encryptionParams,e),h=n.util.createBuffer(i.encryptedData);return f.update(h),f.finish()&&(r=a.fromDer(f.output)),r},o.encryptedPrivateKeyToPem=function(t,e){var r={type:"ENCRYPTED PRIVATE KEY",body:a.toDer(t).getBytes()};return n.pem.encode(r,{maxline:e})},o.encryptedPrivateKeyFromPem=function(t){var e=n.pem.decode(t)[0];if("ENCRYPTED PRIVATE KEY"!==e.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return a.fromDer(e.body)},o.encryptRsaPrivateKey=function(t,e,r){if(!(r=r||{}).legacy){var i=o.wrapRsaPrivateKey(o.privateKeyToAsn1(t));return i=o.encryptPrivateKeyInfo(i,e,r),o.encryptedPrivateKeyToPem(i)}var s,u,c,l;switch(r.algorithm){case"aes128":s="AES-128-CBC",c=16,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",c=24,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",c=32,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",c=24,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;case"des":s="DES-CBC",c=8,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var h=l(n.pbe.opensslDeriveBytes(e,u.substr(0,8),c));h.start(u),h.update(a.toDer(o.privateKeyToAsn1(t))),h.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:n.util.bytesToHex(u).toUpperCase()},body:h.output.getBytes()};return n.pem.encode(p)},o.decryptRsaPrivateKey=function(t,e){var r=null,i=n.pem.decode(t)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(i.procType&&"ENCRYPTED"===i.procType.type){var s,u;switch(i.dekInfo.algorithm){case"DES-CBC":s=8,u=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,u=n.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,u=n.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,u=n.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,u=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,u=function(t){return n.rc2.createDecryptionCipher(t,40)};break;case"RC2-64-CBC":s=8,u=function(t){return n.rc2.createDecryptionCipher(t,64)};break;case"RC2-128-CBC":s=16,u=function(t){return n.rc2.createDecryptionCipher(t,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,c}var l=n.util.hexToBytes(i.dekInfo.parameters),f=u(n.pbe.opensslDeriveBytes(e,l.substr(0,8),s));if(f.start(l),f.update(n.util.createBuffer(i.body)),!f.finish())return r;r=f.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?o.decryptPrivateKeyInfo(a.fromDer(r),e):a.fromDer(r))&&(r=o.privateKeyFromAsn1(r)),r},o.pbe.generatePkcs12Key=function(t,e,r,i,a,o){var s,u;if(null==o){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');o=n.md.sha1.create()}var c=o.digestLength,l=o.blockLength,f=new n.util.ByteBuffer,h=new n.util.ByteBuffer;if(null!=t){for(u=0;u<t.length;u++)h.putInt16(t.charCodeAt(u));h.putInt16(0)}var p=h.length(),d=e.length(),y=new n.util.ByteBuffer;y.fillWithByte(r,l);var g=l*Math.ceil(d/l),v=new n.util.ByteBuffer;for(u=0;u<g;u++)v.putByte(e.at(u%d));var m=l*Math.ceil(p/l),E=new n.util.ByteBuffer;for(u=0;u<m;u++)E.putByte(h.at(u%p));var C=v;C.putBuffer(E);for(var b=Math.ceil(a/c),S=1;S<=b;S++){var w=new n.util.ByteBuffer;w.putBytes(y.bytes()),w.putBytes(C.bytes());for(var A=0;A<i;A++)o.start(),o.update(w.getBytes()),w=o.digest();var T=new n.util.ByteBuffer;for(u=0;u<l;u++)T.putByte(w.at(u%c));var I=Math.ceil(d/l)+Math.ceil(p/l),B=new n.util.ByteBuffer;for(s=0;s<I;s++){var _=new n.util.ByteBuffer(C.getBytes(l)),k=511;for(u=T.length()-1;u>=0;u--)k>>=8,k+=T.at(u)+_.at(u),_.setAt(u,255&k);B.putBuffer(_)}C=B,f.putBuffer(w)}return f.truncate(f.length()-a),f},o.pbe.getCipher=function(t,e,r){switch(t){case o.oids.pkcs5PBES2:return o.pbe.getCipherForPBES2(t,e,r);case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case o.oids["pbewithSHAAnd40BitRC2-CBC"]:return o.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},o.pbe.getCipherForPBES2=function(t,e,r){var i,s={},u=[];if(!a.validate(e,c,s,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((t=a.derToOid(s.kdfOid))!==o.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=t,i.supportedOids=["pkcs5PBKDF2"],i;if((t=a.derToOid(s.encOid))!==o.oids["aes128-CBC"]&&t!==o.oids["aes192-CBC"]&&t!==o.oids["aes256-CBC"]&&t!==o.oids["des-EDE3-CBC"]&&t!==o.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=t,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var l,f,p=s.kdfSalt,d=n.util.createBuffer(s.kdfIterationCount);switch(d=d.getInt(d.length()<<3),o.oids[t]){case"aes128-CBC":l=16,f=n.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,f=n.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,f=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,f=n.des.createDecryptionCipher;break;case"desCBC":l=8,f=n.des.createDecryptionCipher}var y=h(s.prfOid),g=n.pkcs5.pbkdf2(r,p,d,l,y),v=s.encIv,m=f(g);return m.start(v),m},o.pbe.getCipherForPKCS12PBE=function(t,e,r){var i={},s=[];if(!a.validate(e,l,i,s))throw(y=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=s,y;var u,c,f,p=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),t){case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,f=n.des.startDecrypting;break;case o.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,f=function(t,e){var r=n.rc2.createDecryptionCipher(t,40);return r.start(e,null),r};break;default:var y;throw(y=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=t,y}var g=h(i.prfOid),v=o.pbe.generatePkcs12Key(r,p,1,d,u,g);return g.start(),f(v,o.pbe.generatePkcs12Key(r,p,2,d,c,g))},o.pbe.opensslDeriveBytes=function(t,e,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===e&&(e="");for(var a=[f(i,t+e)],o=16,s=1;o<r;++s,o+=16)a.push(f(i,a[s-1]+t+e));return a.join("").substr(0,r)}},600:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4602);r(2814),r(7668),r(8533);var a,o=i.pkcs5=i.pkcs5||{};i.util.isNodejs&&!i.options.usePureJavaScript&&(a=r(6982)),t.exports=i.pbkdf2=o.pbkdf2=function(t,e,r,o,s,u){if("function"==typeof s&&(u=s,s=null),i.util.isNodejs&&!i.options.usePureJavaScript&&a.pbkdf2&&(null===s||"object"!==n(s))&&(a.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!=typeof s&&(s="sha1"),t=Buffer.from(t,"binary"),e=Buffer.from(e,"binary"),u?4===a.pbkdf2Sync.length?a.pbkdf2(t,e,r,o,(function(t,e){if(t)return u(t);u(null,e.toString("binary"))})):a.pbkdf2(t,e,r,o,s,(function(t,e){if(t)return u(t);u(null,e.toString("binary"))})):4===a.pbkdf2Sync.length?a.pbkdf2Sync(t,e,r,o).toString("binary"):a.pbkdf2Sync(t,e,r,o,s).toString("binary");if(null==s&&(s="sha1"),"string"==typeof s){if(!(s in i.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=i.md[s].create()}var c=s.digestLength;if(o>4294967295*c){var l=new Error("Derived key is too long.");if(u)return u(l);throw l}var f=Math.ceil(o/c),h=o-(f-1)*c,p=i.hmac.create();p.start(s,t);var d,y,g,v="";if(!u){for(var m=1;m<=f;++m){p.start(null,null),p.update(e),p.update(i.util.int32ToBytes(m)),d=g=p.digest().getBytes();for(var E=2;E<=r;++E)p.start(null,null),p.update(g),y=p.digest().getBytes(),d=i.util.xorBytes(d,y,c),g=y;v+=m<f?d:d.substr(0,h)}return v}function C(){if(m>f)return u(null,v);p.start(null,null),p.update(e),p.update(i.util.int32ToBytes(m)),d=g=p.digest().getBytes(),E=2,b()}function b(){if(E<=r)return p.start(null,null),p.update(g),y=p.digest().getBytes(),d=i.util.xorBytes(d,y,c),g=y,++E,i.util.setImmediate(b);v+=m<f?d:d.substr(0,h),++m,C()}m=1,C()}},8999:(t,e,r)=>{var n=r(4602);r(8533);var i=t.exports=n.pem=n.pem||{};function a(t){for(var e=t.name+": ",r=[],n=function(t,e){return" "+e},i=0;i<t.values.length;++i)r.push(t.values[i].replace(/^(\S+\r\n)/,n));e+=r.join(",")+"\r\n";var a=0,o=-1;for(i=0;i<e.length;++i,++a)if(a>65&&-1!==o){var s=e[o];","===s?(++o,e=e.substr(0,o)+"\r\n "+e.substr(o)):e=e.substr(0,o)+"\r\n"+s+e.substr(o+1),a=i-o-1,o=-1,++i}else" "!==e[i]&&"\t"!==e[i]&&","!==e[i]||(o=i);return e}function o(t){return t.replace(/^\s+/,"")}i.encode=function(t,e){e=e||{};var r,i="-----BEGIN "+t.type+"-----\r\n";if(t.procType&&(i+=a(r={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]})),t.contentDomain&&(i+=a(r={name:"Content-Domain",values:[t.contentDomain]})),t.dekInfo&&(r={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&r.values.push(t.dekInfo.parameters),i+=a(r)),t.headers)for(var o=0;o<t.headers.length;++o)i+=a(t.headers[o]);return t.procType&&(i+="\r\n"),(i+=n.util.encode64(t.body,e.maxline||64)+"\r\n")+"-----END "+t.type+"-----\r\n"},i.decode=function(t){for(var e,r=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/;e=i.exec(t);){var u=e[1];"NEW CERTIFICATE REQUEST"===u&&(u="CERTIFICATE REQUEST");var c={type:u,procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(e[3])};if(r.push(c),e[2]){for(var l=e[2].split(s),f=0;e&&f<l.length;){for(var h=l[f].replace(/\s+$/,""),p=f+1;p<l.length;++p){var d=l[p];if(!/\s/.test(d[0]))break;h+=d,f=p}if(e=h.match(a)){for(var y={name:e[1],values:[]},g=e[2].split(","),v=0;v<g.length;++v)y.values.push(o(g[v]));if(c.procType)if(c.contentDomain||"Content-Domain"!==y.name)if(c.dekInfo||"DEK-Info"!==y.name)c.headers.push(y);else{if(0===y.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');c.dekInfo={algorithm:g[0],parameters:g[1]||null}}else c.contentDomain=g[0]||"";else{if("Proc-Type"!==y.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');c.procType={version:g[0],type:g[1]}}}++f}if("ENCRYPTED"===c.procType&&!c.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},1711:(t,e,r)=>{var n=r(4602);r(8533),r(2930),r(4924);var i=t.exports=n.pkcs1=n.pkcs1||{};function a(t,e,r){r||(r=n.md.sha1.create());for(var i="",a=Math.ceil(e/r.digestLength),o=0;o<a;++o){var s=String.fromCharCode(o>>24&255,o>>16&255,o>>8&255,255&o);r.start(),r.update(t+s),i+=r.digest().getBytes()}return i.substring(0,e)}i.encode_rsa_oaep=function(t,e,r){var i,o,s,u;"string"==typeof r?(i=r,o=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,o=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),s?s.start():s=n.md.sha1.create(),u||(u=s);var c=Math.ceil(t.n.bitLength()/8),l=c-2*s.digestLength-2;if(e.length>l)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=e.length,g.maxLength=l,g;i||(i=""),s.update(i,"raw");for(var f=s.digest(),h="",p=l-e.length,d=0;d<p;d++)h+="\0";var y=f.getBytes()+h+""+e;if(o){if(o.length!==s.digestLength){var g;throw(g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=o.length,g.digestLength=s.digestLength,g}}else o=n.random.getBytes(s.digestLength);var v=a(o,c-s.digestLength-1,u),m=n.util.xorBytes(y,v,y.length),E=a(m,s.digestLength,u);return"\0"+n.util.xorBytes(o,E,o.length)+m},i.decode_rsa_oaep=function(t,e,r){var i,o,s;"string"==typeof r?(i=r,o=arguments[3]||void 0):r&&(i=r.label||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md));var u=Math.ceil(t.n.bitLength()/8);if(e.length!==u)throw(v=new Error("RSAES-OAEP encoded message length is invalid.")).length=e.length,v.expectedLength=u,v;if(void 0===o?o=n.md.sha1.create():o.start(),s||(s=o),u<2*o.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),o.update(i,"raw");for(var c=o.digest().getBytes(),l=e.charAt(0),f=e.substring(1,o.digestLength+1),h=e.substring(1+o.digestLength),p=a(h,o.digestLength,s),d=a(n.util.xorBytes(f,p,f.length),u-o.digestLength-1,s),y=n.util.xorBytes(h,d,h.length),g=y.substring(0,o.digestLength),v="\0"!==l,m=0;m<o.digestLength;++m)v|=c.charAt(m)!==g.charAt(m);for(var E=1,C=o.digestLength,b=o.digestLength;b<y.length;b++){var S=y.charCodeAt(b);v|=S&(E?65534:0),C+=E&=1&S^1}if(v||1!==y.charCodeAt(C))throw new Error("Invalid RSAES-OAEP padding.");return y.substring(C+1)}},5049:(t,e,r)=>{var n=r(4602);r(9452),r(2814),r(8724),r(6216),r(4932),r(2930),r(107),r(4924),r(8533),r(4541);var i=n.asn1,a=n.pki,o=t.exports=n.pkcs12=n.pkcs12||{},s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},u={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},s,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},c={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},l={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},f={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(t,e,r,n){for(var i=[],a=0;a<t.length;a++)for(var o=0;o<t[a].safeBags.length;o++){var s=t[a].safeBags[o];void 0!==n&&s.type!==n||(null!==e?void 0!==s.attributes[e]&&s.attributes[e].indexOf(r)>=0&&i.push(s):i.push(s))}return i}function p(t){if(t.composed||t.constructed){for(var e=n.util.createBuffer(),r=0;r<t.value.length;++r)e.putBytes(t.value[r].value);t.composed=t.constructed=!1,t.value=e.getBytes()}return t}function d(t,e){var r={},o=[];if(!i.validate(t,n.pkcs7.asn1.encryptedDataValidator,r,o))throw(s=new Error("Cannot read EncryptedContentInfo.")).errors=o,s;var s,u=i.derToOid(r.contentType);if(u!==a.oids.data)throw(s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=u,s;u=i.derToOid(r.encAlgorithm);var c=a.pbe.getCipher(u,r.encParameter,e),l=p(r.encryptedContentAsn1),f=n.util.createBuffer(l.value);if(c.update(f),!c.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return c.output.getBytes()}function y(t,e,r){if(!e&&0===t.length)return[];if((t=i.fromDer(t,e)).tagClass!==i.Class.UNIVERSAL||t.type!==i.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],o=0;o<t.value.length;o++){var s=t.value[o],u={},l=[];if(!i.validate(s,c,u,l))throw(v=new Error("Cannot read SafeBag.")).errors=l,v;var h,p,d={type:i.derToOid(u.bagId),attributes:g(u.bagAttributes)};n.push(d);var y=u.bagValue.value[0];switch(d.type){case a.oids.pkcs8ShroudedKeyBag:if(null===(y=a.decryptPrivateKeyInfo(y,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case a.oids.keyBag:try{d.key=a.privateKeyFromAsn1(y)}catch(t){d.key=null,d.asn1=y}continue;case a.oids.certBag:h=f,p=function(){if(i.derToOid(u.certId)!==a.oids.x509Certificate){var t=new Error("Unsupported certificate type, only X.509 supported.");throw t.oid=i.derToOid(u.certId),t}var r=i.fromDer(u.cert,e);try{d.cert=a.certificateFromAsn1(r,!0)}catch(t){d.cert=null,d.asn1=r}};break;default:var v;throw(v=new Error("Unsupported PKCS#12 SafeBag type.")).oid=d.type,v}if(void 0!==h&&!i.validate(y,h,u,l))throw(v=new Error("Cannot read PKCS#12 "+h.name)).errors=l,v;p()}return n}function g(t){var e={};if(void 0!==t)for(var r=0;r<t.length;++r){var n={},o=[];if(!i.validate(t[r],l,n,o)){var s=new Error("Cannot read PKCS#12 BagAttribute.");throw s.errors=o,s}var u=i.derToOid(n.oid);if(void 0!==a.oids[u]){e[a.oids[u]]=[];for(var c=0;c<n.values.length;++c)e[a.oids[u]].push(n.values[c].value)}}return e}o.pkcs12FromAsn1=function(t,e,r){"string"==typeof e?(r=e,e=!0):void 0===e&&(e=!0);var c={};if(!i.validate(t,u,c,[]))throw(l=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=l,l;var l,f={version:c.version.charCodeAt(0),safeContents:[],getBags:function(t){var e,r={};return"localKeyId"in t?e=t.localKeyId:"localKeyIdHex"in t&&(e=n.util.hexToBytes(t.localKeyIdHex)),void 0===e&&!("friendlyName"in t)&&"bagType"in t&&(r[t.bagType]=h(f.safeContents,null,null,t.bagType)),void 0!==e&&(r.localKeyId=h(f.safeContents,"localKeyId",e,t.bagType)),"friendlyName"in t&&(r.friendlyName=h(f.safeContents,"friendlyName",t.friendlyName,t.bagType)),r},getBagsByFriendlyName:function(t,e){return h(f.safeContents,"friendlyName",t,e)},getBagsByLocalKeyId:function(t,e){return h(f.safeContents,"localKeyId",t,e)}};if(3!==c.version.charCodeAt(0))throw(l=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=c.version.charCodeAt(0),l;if(i.derToOid(c.contentType)!==a.oids.data)throw(l=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=i.derToOid(c.contentType),l;var g=c.content.value[0];if(g.tagClass!==i.Class.UNIVERSAL||g.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(g=p(g),c.mac){var v=null,m=0,E=i.derToOid(c.macAlgorithm);switch(E){case a.oids.sha1:v=n.md.sha1.create(),m=20;break;case a.oids.sha256:v=n.md.sha256.create(),m=32;break;case a.oids.sha384:v=n.md.sha384.create(),m=48;break;case a.oids.sha512:v=n.md.sha512.create(),m=64;break;case a.oids.md5:v=n.md.md5.create(),m=16}if(null===v)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+E);var C=new n.util.ByteBuffer(c.macSalt),b="macIterations"in c?parseInt(n.util.bytesToHex(c.macIterations),16):1,S=o.generateKey(r,C,3,b,m,v),w=n.hmac.create();if(w.start(v,S),w.update(g.value),w.getMac().getBytes()!==c.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(t,e,r,n){if((e=i.fromDer(e,r)).tagClass!==i.Class.UNIVERSAL||e.type!==i.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var o=0;o<e.value.length;o++){var u=e.value[o],c={},l=[];if(!i.validate(u,s,c,l))throw(v=new Error("Cannot read ContentInfo.")).errors=l,v;var f={encrypted:!1},h=null,g=c.content.value[0];switch(i.derToOid(c.contentType)){case a.oids.data:if(g.tagClass!==i.Class.UNIVERSAL||g.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");h=p(g).value;break;case a.oids.encryptedData:h=d(g,n),f.encrypted=!0;break;default:var v;throw(v=new Error("Unsupported PKCS#12 contentType.")).contentType=i.derToOid(c.contentType),v}f.safeBags=y(h,r,n),t.safeContents.push(f)}}(f,g.value,e,r),f},o.toPkcs12Asn1=function(t,e,r,s){(s=s||{}).saltSize=s.saltSize||8,s.count=s.count||2048,s.algorithm=s.algorithm||s.encAlgorithm||"aes128","useMac"in s||(s.useMac=!0),"localKeyId"in s||(s.localKeyId=null),"generateLocalKeyId"in s||(s.generateLocalKeyId=!0);var u,c=s.localKeyId;if(null!==c)c=n.util.hexToBytes(c);else if(s.generateLocalKeyId)if(e){var l=n.util.isArray(e)?e[0]:e;"string"==typeof l&&(l=a.certificateFromPem(l)),(B=n.md.sha1.create()).update(i.toDer(a.certificateToAsn1(l)).getBytes()),c=B.digest().getBytes()}else c=n.random.getBytes(20);var f=[];null!==c&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.localKeyId).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,c)])])),"friendlyName"in s&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.friendlyName).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.BMPSTRING,!1,s.friendlyName)])])),f.length>0&&(u=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,f));var h=[],p=[];null!==e&&(p=n.util.isArray(e)?e:[e]);for(var d=[],y=0;y<p.length;++y){"string"==typeof(e=p[y])&&(e=a.certificateFromPem(e));var g=0===y?u:void 0,v=a.certificateToAsn1(e),m=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.certBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.x509Certificate).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(v).getBytes())])])]),g]);d.push(m)}if(d.length>0){var E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),C=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])]);h.push(C)}var b=null;if(null!==t){var S=a.wrapRsaPrivateKey(a.privateKeyToAsn1(t));b=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[S]),u]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[a.encryptPrivateKeyInfo(S,r,s)]),u]);var w=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[b]),A=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(w).getBytes())])]);h.push(A)}var T,I=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(s.useMac){var B=n.md.sha1.create(),_=new n.util.ByteBuffer(n.random.getBytes(s.saltSize)),k=s.count,N=(t=o.generateKey(r,_,3,k,20),n.hmac.create());N.start(B,t),N.update(i.toDer(I).getBytes());var R=N.getMac();T=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,R.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,_.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(k).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(I).getBytes())])]),T])},o.generateKey=n.pbe.generatePkcs12Key},6445:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4602);r(7962),r(9452),r(7161),r(8724),r(8999),r(6216),r(2930),r(8533),r(4541);var a=i.asn1,o=t.exports=i.pkcs7=i.pkcs7||{};function s(t){var e={},r=[];if(!a.validate(t,o.asn1.recipientInfoValidator,e,r)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=r,n}return{version:e.version.charCodeAt(0),issuer:i.pki.RDNAttributesAsArray(e.issuer),serialNumber:i.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:a.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}function u(t){for(var e,r=[],n=0;n<t.length;++n)r.push((e=t[n],a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.version).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:e.issuer}),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,i.util.hexToBytes(e.serialNumber))]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.encryptedContent.algorithm).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e.encryptedContent.content)])));return r}function c(t){var e=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.version).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:t.issuer}),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,i.util.hexToBytes(t.serialNumber))]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.digestAlgorithm).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])]);if(t.authenticatedAttributesAsn1&&e.value.push(t.authenticatedAttributesAsn1),e.value.push(a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.signatureAlgorithm).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])),e.value.push(a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,t.signature)),t.unauthenticatedAttributes.length>0){for(var r=a.create(a.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<t.unauthenticatedAttributes.length;++n){var o=t.unauthenticatedAttributes[n];r.values.push(l(o))}e.value.push(r)}return e}function l(t){var e;if(t.type===i.pki.oids.contentType)e=a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.value).getBytes());else if(t.type===i.pki.oids.messageDigest)e=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,t.value.bytes());else if(t.type===i.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),o=t.value;if("string"==typeof o){var s=Date.parse(o);o=isNaN(s)?13===o.length?a.utcTimeToDate(o):a.generalizedTimeToDate(o):new Date(s)}e=o>=r&&o<n?a.create(a.Class.UNIVERSAL,a.Type.UTCTIME,!1,a.dateToUtcTime(o)):a.create(a.Class.UNIVERSAL,a.Type.GENERALIZEDTIME,!1,a.dateToGeneralizedTime(o))}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.type).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[e])])}function f(t,e,r){var n={};if(!a.validate(e,r,n,[])){var o=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw o.errors=o,o}if(a.derToOid(n.contentType)!==i.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var s="";if(i.util.isArray(n.encryptedContent))for(var u=0;u<n.encryptedContent.length;++u){if(n.encryptedContent[u].type!==a.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");s+=n.encryptedContent[u].value}else s=n.encryptedContent;t.encryptedContent={algorithm:a.derToOid(n.encAlgorithm),parameter:i.util.createBuffer(n.encParameter.value),content:i.util.createBuffer(s)}}if(n.content){if(s="",i.util.isArray(n.content))for(u=0;u<n.content.length;++u){if(n.content[u].type!==a.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");s+=n.content[u].value}else s=n.content;t.content=i.util.createBuffer(s)}return t.version=n.version.charCodeAt(0),t.rawCapture=n,n}function h(t){if(void 0===t.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===t.content){var e;switch(t.encryptedContent.algorithm){case i.pki.oids["aes128-CBC"]:case i.pki.oids["aes192-CBC"]:case i.pki.oids["aes256-CBC"]:e=i.aes.createDecryptionCipher(t.encryptedContent.key);break;case i.pki.oids.desCBC:case i.pki.oids["des-EDE3-CBC"]:e=i.des.createDecryptionCipher(t.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+t.encryptedContent.algorithm)}if(e.start(t.encryptedContent.parameter),e.update(t.encryptedContent.content),!e.finish())throw new Error("Symmetric decryption failed.");t.content=e.output}}o.messageFromPem=function(t){var e=i.pem.decode(t)[0];if("PKCS7"!==e.type){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=a.fromDer(e.body);return o.messageFromAsn1(n)},o.messageToPem=function(t,e){var r={type:"PKCS7",body:a.toDer(t.toAsn1()).getBytes()};return i.pem.encode(r,{maxline:e})},o.messageFromAsn1=function(t){var e={},r=[];if(!a.validate(t,o.asn1.contentInfoValidator,e,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var s,u=a.derToOid(e.contentType);switch(u){case i.pki.oids.envelopedData:s=o.createEnvelopedData();break;case i.pki.oids.encryptedData:s=o.createEncryptedData();break;case i.pki.oids.signedData:s=o.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+u+" is not (yet) supported.")}return s.fromAsn1(e.content.value[0]),s},o.createSignedData=function(){var t=null;return t={type:i.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(e){if(f(t,e,o.asn1.signedDataValidator),t.certificates=[],t.crls=[],t.digestAlgorithmIdentifiers=[],t.contentInfo=null,t.signerInfos=[],t.rawCapture.certificates)for(var r=t.rawCapture.certificates.value,n=0;n<r.length;++n)t.certificates.push(i.pki.certificateFromAsn1(r[n]))},toAsn1:function(){t.contentInfo||t.sign();for(var e=[],r=0;r<t.certificates.length;++r)e.push(i.pki.certificateToAsn1(t.certificates[r]));var n=[],o=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.version).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,t.digestAlgorithmIdentifiers),t.contentInfo])]);return e.length>0&&o.value[0].value.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,e)),n.length>0&&o.value[0].value.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,n)),o.value[0].value.push(a.create(a.Class.UNIVERSAL,a.Type.SET,!0,t.signerInfos)),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.type).getBytes()),o])},addSigner:function(e){var r=e.issuer,n=e.serialNumber;if(e.certificate){var a=e.certificate;"string"==typeof a&&(a=i.pki.certificateFromPem(a)),r=a.issuer.attributes,n=a.serialNumber}var o=e.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof o&&(o=i.pki.privateKeyFromPem(o));var s=e.digestAlgorithm||i.pki.oids.sha1;switch(s){case i.pki.oids.sha1:case i.pki.oids.sha256:case i.pki.oids.sha384:case i.pki.oids.sha512:case i.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+s)}var u=e.authenticatedAttributes||[];if(u.length>0){for(var c=!1,l=!1,f=0;f<u.length;++f){var h=u[f];if(c||h.type!==i.pki.oids.contentType){if(l||h.type!==i.pki.oids.messageDigest);else if(l=!0,c)break}else if(c=!0,l)break}if(!c||!l)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}t.signers.push({key:o,version:1,issuer:r,serialNumber:n,digestAlgorithm:s,signatureAlgorithm:i.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(e){var r;e=e||{},("object"!==n(t.content)||null===t.contentInfo)&&(t.contentInfo=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.pki.oids.data).getBytes())]),"content"in t&&(t.content instanceof i.util.ByteBuffer?r=t.content.bytes():"string"==typeof t.content&&(r=i.util.encodeUtf8(t.content)),e.detached?t.detachedContent=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,r):t.contentInfo.value.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,r)])))),0!==t.signers.length&&function(e){var r;if(!(r=t.detachedContent?t.detachedContent:(r=t.contentInfo.value[1]).value[0]))throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var n=a.derToOid(t.contentInfo.value[0].value),o=a.toDer(r);for(var s in o.getByte(),a.getBerValueLength(o),o=o.getBytes(),e)e[s].start().update(o);for(var u=new Date,f=0;f<t.signers.length;++f){var h=t.signers[f];if(0===h.authenticatedAttributes.length){if(n!==i.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var p=a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[]),d=0;d<h.authenticatedAttributes.length;++d){var y=h.authenticatedAttributes[d];y.type===i.pki.oids.messageDigest?y.value=e[h.digestAlgorithm].digest():y.type===i.pki.oids.signingTime&&(y.value||(y.value=u)),p.value.push(l(y)),h.authenticatedAttributesAsn1.value.push(l(y))}o=a.toDer(p).getBytes(),h.md.start().update(o)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}t.signerInfos=function(t){for(var e=[],r=0;r<t.length;++r)e.push(c(t[r]));return e}(t.signers)}(function(){for(var e={},r=0;r<t.signers.length;++r){var n=t.signers[r];(o=n.digestAlgorithm)in e||(e[o]=i.md[i.pki.oids[o]].create()),0===n.authenticatedAttributes.length?n.md=e[o]:n.md=i.md[i.pki.oids[o]].create()}for(var o in t.digestAlgorithmIdentifiers=[],e)t.digestAlgorithmIdentifiers.push(a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]));return e}())},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(e){"string"==typeof e&&(e=i.pki.certificateFromPem(e)),t.certificates.push(e)},addCertificateRevokationList:function(t){throw new Error("PKCS#7 CRL support not yet implemented.")}}},o.createEncryptedData=function(){var t=null;return t={type:i.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(e){f(t,e,o.asn1.encryptedDataValidator)},decrypt:function(e){void 0!==e&&(t.encryptedContent.key=e),h(t)}}},o.createEnvelopedData=function(){var t=null;return t={type:i.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(e){var r=f(t,e,o.asn1.envelopedDataValidator);t.recipients=function(t){for(var e=[],r=0;r<t.length;++r)e.push(s(t[r]));return e}(r.recipientInfos.value)},toAsn1:function(){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.type).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.version).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,u(t.recipients)),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,(e=t.encryptedContent,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.pki.oids.data).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.algorithm).getBytes()),e.parameter?a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e.content.getBytes())])]))])])]);var e},findRecipient:function(e){for(var r=e.issuer.attributes,n=0;n<t.recipients.length;++n){var i=t.recipients[n],a=i.issuer;if(i.serialNumber===e.serialNumber&&a.length===r.length){for(var o=!0,s=0;s<r.length;++s)if(a[s].type!==r[s].type||a[s].value!==r[s].value){o=!1;break}if(o)return i}}return null},decrypt:function(e,r){if(void 0===t.encryptedContent.key&&void 0!==e&&void 0!==r)switch(e.encryptedContent.algorithm){case i.pki.oids.rsaEncryption:case i.pki.oids.desCBC:var n=r.decrypt(e.encryptedContent.content);t.encryptedContent.key=i.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}h(t)},addRecipient:function(e){t.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:i.pki.oids.rsaEncryption,key:e.publicKey}})},encrypt:function(e,r){if(void 0===t.encryptedContent.content){var n,a,o;switch(r=r||t.encryptedContent.algorithm,e=e||t.encryptedContent.key,r){case i.pki.oids["aes128-CBC"]:n=16,a=16,o=i.aes.createEncryptionCipher;break;case i.pki.oids["aes192-CBC"]:n=24,a=16,o=i.aes.createEncryptionCipher;break;case i.pki.oids["aes256-CBC"]:n=32,a=16,o=i.aes.createEncryptionCipher;break;case i.pki.oids["des-EDE3-CBC"]:n=24,a=8,o=i.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(void 0===e)e=i.util.createBuffer(i.random.getBytes(n));else if(e.length()!=n)throw new Error("Symmetric key has wrong length; got "+e.length()+" bytes, expected "+n+".");t.encryptedContent.algorithm=r,t.encryptedContent.key=e,t.encryptedContent.parameter=i.util.createBuffer(i.random.getBytes(a));var s=o(e);if(s.start(t.encryptedContent.parameter.copy()),s.update(t.content),!s.finish())throw new Error("Symmetric encryption failed.");t.encryptedContent.content=s.output}for(var u=0;u<t.recipients.length;++u){var c=t.recipients[u];if(void 0===c.encryptedContent.content){if(c.encryptedContent.algorithm!==i.pki.oids.rsaEncryption)throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);c.encryptedContent.content=c.encryptedContent.key.encrypt(t.encryptedContent.key.data)}}}}}},6216:(t,e,r)=>{var n=r(4602);r(9452),r(8533);var i=n.asn1,a=t.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=a;var o={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};a.contentInfoValidator=o;var s={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};a.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(s)},a.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(s)};var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};a.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},o,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},a.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},4305:(t,e,r)=>{var n=r(4602);r(9452),r(8724),r(4932),r(8999),r(600),r(5049),r(2095),r(107),r(8533),r(4541);var i=n.asn1,a=t.exports=n.pki=n.pki||{};a.pemToDer=function(t){var e=n.pem.decode(t)[0];if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(e.body)},a.privateKeyFromPem=function(t){var e=n.pem.decode(t)[0];if("PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var o=i.fromDer(e.body);return a.privateKeyFromAsn1(o)},a.privateKeyToPem=function(t,e){var r={type:"RSA PRIVATE KEY",body:i.toDer(a.privateKeyToAsn1(t)).getBytes()};return n.pem.encode(r,{maxline:e})},a.privateKeyInfoToPem=function(t,e){var r={type:"PRIVATE KEY",body:i.toDer(t).getBytes()};return n.pem.encode(r,{maxline:e})}},9686:(t,e,r)=>{var n=r(4602);r(8533),r(9818),r(2930),function(){if(n.prime)t.exports=n.prime;else{var e=t.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],a=new r(null);a.fromInt(30);var o=function(t,e){return t|e};e.generateProbablePrime=function(t,e,i){"function"==typeof e&&(i=e,e={});var a=(e=e||{}).algorithm||"PRIMEINC";"string"==typeof a&&(a={name:a}),a.options=a.options||{};var o=e.prng||n.random,u={nextBytes:function(t){for(var e=o.getBytesSync(t.length),r=0;r<t.length;++r)t[r]=e.charCodeAt(r)}};if("PRIMEINC"===a.name)return function(t,e,i,a){return"workers"in i?function(t,e,i,a){if("undefined"==typeof Worker)return s(t,e,i,a);var o=c(t,e),u=i.workers,l=i.workLoad||100,f=30*l/8,h=i.workerScript||"forge/prime.worker.js";if(-1===u)return n.util.estimateCores((function(t,e){t&&(e=2),u=e-1,p()}));function p(){u=Math.max(1,u);for(var n=[],i=0;i<u;++i)n[i]=new Worker(h);for(i=0;i<u;++i)n[i].addEventListener("message",p);var s=!1;function p(i){if(!s){var u=i.data;if(u.found){for(var h=0;h<n.length;++h)n[h].terminate();return s=!0,a(null,new r(u.prime,16))}o.bitLength()>t&&(o=c(t,e));var p=o.toString(16);i.target.postMessage({hex:p,workLoad:l}),o.dAddOffset(f,0)}}}p()}(t,e,i,a):s(t,e,i,a)}(t,u,a.options,i);throw new Error("Invalid prime generation algorithm: "+a.name)}}function s(t,e,r,n){var i=c(t,e),a=function(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}(i.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var o=10;"maxBlockTime"in r&&(o=r.maxBlockTime),u(i,t,e,0,a,o,n)}function u(t,e,r,a,o,s,l){var f=+new Date;do{if(t.bitLength()>e&&(t=c(e,r)),t.isProbablePrime(o))return l(null,t);t.dAddOffset(i[a++%8],0)}while(s<0||+new Date-f<s);n.util.setImmediate((function(){u(t,e,r,a,o,s,l)}))}function c(t,e){var n=new r(t,e),i=t-1;return n.testBit(i)||n.bitwiseTo(r.ONE.shiftLeft(i),o,n),n.dAddOffset(31-n.mod(a).byteValue(),0),n}}()},6428:(t,e,r)=>{var n=r(4602);r(8533);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||process.versions["node-webkit"]||(i=r(6982)),(t.exports=n.prng=n.prng||{}).create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=t.md,a=new Array(32),o=0;o<32;++o)a[o]=r.create();function s(){if(e.pools[0].messageLength>=32)return u();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),u()}function u(){e.reseeds=4294967295===e.reseeds?0:e.reseeds+1;var t=e.plugin.md.create();t.update(e.keyBytes);for(var r=1,n=0;n<32;++n)e.reseeds%r==0&&(t.update(e.pools[n].digest().getBytes()),e.pools[n].start()),r<<=1;e.keyBytes=t.digest().getBytes(),t.start(),t.update(e.keyBytes);var i=t.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(i),e.generated=0}function c(t){var e=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(e=function(t){return i.getRandomValues(t)});var a=n.util.createBuffer();if(e)for(;a.length()<t;){var o=Math.max(1,Math.min(t-a.length(),65536)/4),s=new Uint32Array(Math.floor(o));try{e(s);for(var u=0;u<s.length;++u)a.putInt32(s[u])}catch(t){if(!("undefined"!=typeof QuotaExceededError&&t instanceof QuotaExceededError))throw t}}if(a.length()<t)for(var c,l,f,h=Math.floor(65536*Math.random());a.length()<t;)for(l=16807*(65535&h),l+=(32767&(c=16807*(h>>16)))<<16,h=4294967295&(l=(2147483647&(l+=c>>15))+(l>>31)),u=0;u<3;++u)f=h>>>(u<<3),f^=Math.floor(256*Math.random()),a.putByte(255&f);return a.getBytes(t)}return e.pools=a,e.pool=0,e.generate=function(t,r){if(!r)return e.generateSync(t);var i=e.plugin.cipher,a=e.plugin.increment,o=e.plugin.formatKey,s=e.plugin.formatSeed,c=n.util.createBuffer();e.key=null,function l(f){if(f)return r(f);if(c.length()>=t)return r(null,c.getBytes(t));if(e.generated>1048575&&(e.key=null),null===e.key)return n.util.nextTick((function(){!function(t){if(e.pools[0].messageLength>=32)return u(),t();var r=32-e.pools[0].messageLength<<5;e.seedFile(r,(function(r,n){if(r)return t(r);e.collect(n),u(),t()}))}(l)}));var h=i(e.key,e.seed);e.generated+=h.length,c.putBytes(h),e.key=o(i(e.key,a(e.seed))),e.seed=s(i(e.key,e.seed)),n.util.setImmediate(l)}()},e.generateSync=function(t){var r=e.plugin.cipher,i=e.plugin.increment,a=e.plugin.formatKey,o=e.plugin.formatSeed;e.key=null;for(var u=n.util.createBuffer();u.length()<t;){e.generated>1048575&&(e.key=null),null===e.key&&s();var c=r(e.key,e.seed);e.generated+=c.length,u.putBytes(c),e.key=a(r(e.key,i(e.seed))),e.seed=o(r(e.key,e.seed))}return u.getBytes(t)},i?(e.seedFile=function(t,e){i.randomBytes(t,(function(t,r){if(t)return e(t);e(null,r.toString())}))},e.seedFileSync=function(t){return i.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,c(t))}catch(t){e(t)}},e.seedFileSync=c),e.collect=function(t){for(var r=t.length,n=0;n<r;++n)e.pools[e.pool].update(t.substr(n,1)),e.pool=31===e.pool?0:e.pool+1},e.collectInt=function(t,r){for(var n="",i=0;i<r;i+=8)n+=String.fromCharCode(t>>i&255);e.collect(n)},e.registerWorker=function(t){t===self?e.seedFile=function(t,e){self.addEventListener("message",(function t(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",t),e(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:t}}})}:t.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&e.seedFile(n.forge.prng.needed,(function(e,r){t.postMessage({forge:{prng:{err:e,bytes:r}}})}))}))},e}},2095:(t,e,r)=>{var n=r(4602);r(2930),r(8533),(t.exports=n.pss=n.pss||{}).create=function(t){3===arguments.length&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e,r=t.md,i=t.mgf,a=r.digestLength,o=t.salt||null;if("string"==typeof o&&(o=n.util.createBuffer(o)),"saltLength"in t)e=t.saltLength;else{if(null===o)throw new Error("Salt length not specified or specific salt not given.");e=o.length()}if(null!==o&&o.length()!==e)throw new Error("Given salt length does not match length of given salt.");var s=t.prng||n.random;return{encode:function(t,u){var c,l,f=u-1,h=Math.ceil(f/8),p=t.digest().getBytes();if(h<a+e+2)throw new Error("Message is too long to encrypt.");l=null===o?s.getBytesSync(e):o.bytes();var d=new n.util.ByteBuffer;d.fillWithByte(0,8),d.putBytes(p),d.putBytes(l),r.start(),r.update(d.getBytes());var y=r.digest().getBytes(),g=new n.util.ByteBuffer;g.fillWithByte(0,h-e-a-2),g.putByte(1),g.putBytes(l);var v=g.getBytes(),m=h-a-1,E=i.generate(y,m),C="";for(c=0;c<m;c++)C+=String.fromCharCode(v.charCodeAt(c)^E.charCodeAt(c));var b=65280>>8*h-f&255;return(C=String.fromCharCode(C.charCodeAt(0)&~b)+C.substr(1))+y+String.fromCharCode(188)},verify:function(t,o,s){var u,c=s-1,l=Math.ceil(c/8);if(o=o.substr(-l),l<a+e+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==o.charCodeAt(l-1))throw new Error("Encoded message does not end in 0xBC.");var f=l-a-1,h=o.substr(0,f),p=o.substr(f,a),d=65280>>8*l-c&255;if(h.charCodeAt(0)&d)throw new Error("Bits beyond keysize not zero as expected.");var y=i.generate(p,f),g="";for(u=0;u<f;u++)g+=String.fromCharCode(h.charCodeAt(u)^y.charCodeAt(u));g=String.fromCharCode(g.charCodeAt(0)&~d)+g.substr(1);var v=l-a-e-2;for(u=0;u<v;u++)if(0!==g.charCodeAt(u))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(v))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var m=g.substr(-e),E=new n.util.ByteBuffer;return E.fillWithByte(0,8),E.putBytes(t),E.putBytes(m),r.start(),r.update(E.getBytes()),p===r.digest().getBytes()}}}},2930:(t,e,r)=>{var n=r(4602);r(7962),r(5330),r(6428),r(8533),n.random&&n.random.getBytes?t.exports=n.random:function(e){var r={},i=new Array(4),a=n.util.createBuffer();function o(){var t=n.prng.create(r);return t.getBytes=function(e,r){return t.generate(e,r)},t.getBytesSync=function(e){return t.generate(e)},t}r.formatKey=function(t){var e=n.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),n.aes._expandKey(t,!1)},r.formatSeed=function(t){var e=n.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),t},r.cipher=function(t,e){return n.aes._updateBlock(t,e,i,!1),a.putInt32(i[0]),a.putInt32(i[1]),a.putInt32(i[2]),a.putInt32(i[3]),a.getBytes()},r.increment=function(t){return++t[3],t},r.md=n.md.sha256;var s=o(),u=null,c=n.util.globalScope,l=c.crypto||c.msCrypto;if(l&&l.getRandomValues&&(u=function(t){return l.getRandomValues(t)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"==typeof window||window.document,s.collectInt(+new Date,32),"undefined"!=typeof navigator){var f="";for(var h in navigator)try{"string"==typeof navigator[h]&&(f+=navigator[h])}catch(t){}s.collect(f),f=null}e&&(e().mousemove((function(t){s.collectInt(t.clientX,16),s.collectInt(t.clientY,16)})),e().keypress((function(t){s.collectInt(t.charCode,8)})))}if(n.random)for(var h in s)n.random[h]=s[h];else n.random=s;n.random.createInstance=o,t.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},3038:(t,e,r)=>{var n=r(4602);r(8533);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],a=[1,2,3,5],o=function(t,e){return t<<e&65535|(65535&t)>>16-e},s=function(t,e){return(65535&t)>>e|t<<16-e&65535};t.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(t,e){"string"==typeof t&&(t=n.util.createBuffer(t)),e=e||128;var r,a=t,o=t.length(),s=e,u=Math.ceil(s/8),c=255>>(7&s);for(r=o;r<128;r++)a.putByte(i[a.at(r-1)+a.at(r-o)&255]);for(a.setAt(128-u,i[a.at(128-u)&c]),r=127-u;r>=0;r--)a.setAt(r,i[a.at(r+1)^a.at(r+u)]);return a};var u=function(t,e,r){var i,u,c,l,f=!1,h=null,p=null,d=null,y=[];for(t=n.rc2.expandKey(t,e),c=0;c<64;c++)y.push(t.getInt16Le());r?(i=function(t){for(c=0;c<4;c++)t[c]+=y[l]+(t[(c+3)%4]&t[(c+2)%4])+(~t[(c+3)%4]&t[(c+1)%4]),t[c]=o(t[c],a[c]),l++},u=function(t){for(c=0;c<4;c++)t[c]+=y[63&t[(c+3)%4]]}):(i=function(t){for(c=3;c>=0;c--)t[c]=s(t[c],a[c]),t[c]-=y[l]+(t[(c+3)%4]&t[(c+2)%4])+(~t[(c+3)%4]&t[(c+1)%4]),l--},u=function(t){for(c=3;c>=0;c--)t[c]-=y[63&t[(c+3)%4]]});var g=function(t){var e=[];for(c=0;c<4;c++){var n=h.getInt16Le();null!==d&&(r?n^=d.getInt16Le():d.putInt16Le(n)),e.push(65535&n)}l=r?0:63;for(var i=0;i<t.length;i++)for(var a=0;a<t[i][0];a++)t[i][1](e);for(c=0;c<4;c++)null!==d&&(r?d.putInt16Le(e[c]):e[c]^=d.getInt16Le()),p.putInt16Le(e[c])},v=null;return v={start:function(t,e){t&&"string"==typeof t&&(t=n.util.createBuffer(t)),f=!1,h=n.util.createBuffer(),p=e||new n.util.createBuffer,d=t,v.output=p},update:function(t){for(f||h.putBuffer(t);h.length()>=8;)g([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(t){var e=!0;if(r)if(t)e=t(8,h,!r);else{var n=8===h.length()?8:8-h.length();h.fillWithByte(n,n)}if(e&&(f=!0,v.update()),!r&&(e=0===h.length()))if(t)e=t(8,p,!r);else{var i=p.length(),a=p.at(i-1);a>i?e=!1:p.truncate(a)}return e}}};n.rc2.startEncrypting=function(t,e,r){var i=n.rc2.createEncryptionCipher(t,128);return i.start(e,r),i},n.rc2.createEncryptionCipher=function(t,e){return u(t,e,!0)},n.rc2.startDecrypting=function(t,e,r){var i=n.rc2.createDecryptionCipher(t,128);return i.start(e,r),i},n.rc2.createDecryptionCipher=function(t,e){return u(t,e,!1)}},107:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4602);if(r(9452),r(9818),r(8724),r(1711),r(9686),r(2930),r(8533),void 0===a)var a=i.jsbn.BigInteger;var o=i.util.isNodejs?r(6982):null,s=i.asn1,u=i.util;i.pki=i.pki||{},t.exports=i.pki.rsa=i.rsa=i.rsa||{};var c=i.pki,l=[6,4,2,4,2,4,6,2],f={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},h={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},p={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=i.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(t){var e;if(!(t.algorithm in c.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}e=c.oids[t.algorithm];var n=s.oidToDer(e).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),a=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);a.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),a.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var o=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,t.digest().getBytes());return i.value.push(a),i.value.push(o),s.toDer(i).getBytes()},v=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);var n;e.dP||(e.dP=e.d.mod(e.p.subtract(a.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(a.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));do{n=new a(i.util.bytesToHex(i.random.getBytes(e.n.bitLength()/8)),16)}while(n.compareTo(e.n)>=0||!n.gcd(e.n).equals(a.ONE));for(var o=(t=t.multiply(n.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),s=t.mod(e.q).modPow(e.dQ,e.q);o.compareTo(s)<0;)o=o.add(e.p);var u=o.subtract(s).multiply(e.qInv).mod(e.p).multiply(e.q).add(s);return u.multiply(n.modInverse(e.n)).mod(e.n)};function m(t,e,r){var n=i.util.createBuffer(),a=Math.ceil(e.n.bitLength()/8);if(t.length>a-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=t.length,o.max=a-11,o}n.putByte(0),n.putByte(r);var s,u=a-3-t.length;if(0===r||1===r){s=0===r?0:255;for(var c=0;c<u;++c)n.putByte(s)}else for(;u>0;){var l=0,f=i.random.getBytes(u);for(c=0;c<u;++c)0===(s=f.charCodeAt(c))?++l:n.putByte(s);u=l}return n.putByte(0),n.putBytes(t),n}function E(t,e,r,n){var a=Math.ceil(e.n.bitLength()/8),o=i.util.createBuffer(t),s=o.getByte(),u=o.getByte();if(0!==s||r&&0!==u&&1!==u||!r&&2!=u||r&&0===u&&void 0===n)throw new Error("Encryption block is invalid.");var c=0;if(0===u){c=a-3-n;for(var l=0;l<c;++l)if(0!==o.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(c=0;o.length()>1;){if(255!==o.getByte()){--o.read;break}++c}else if(2===u)for(c=0;o.length()>1;){if(0===o.getByte()){--o.read;break}++c}if(0!==o.getByte()||c!==a-3-o.length())throw new Error("Encryption block is invalid.");return o.getBytes()}function C(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=i.util.hexToBytes(e);return!(r.length>1)||(0!==r.charCodeAt(0)||128&r.charCodeAt(1))&&(255!==r.charCodeAt(0)||128&~r.charCodeAt(1))?r:r.substr(1)}function b(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function S(t){return i.util.isNodejs&&"function"==typeof o[t]}function w(t){return void 0!==u.globalScope&&"object"===n(u.globalScope.crypto)&&"object"===n(u.globalScope.crypto.subtle)&&"function"==typeof u.globalScope.crypto.subtle[t]}function A(t){return void 0!==u.globalScope&&"object"===n(u.globalScope.msCrypto)&&"object"===n(u.globalScope.msCrypto.subtle)&&"function"==typeof u.globalScope.msCrypto.subtle[t]}function T(t){for(var e=i.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}c.rsa.encrypt=function(t,e,r){var n,o=r,s=Math.ceil(e.n.bitLength()/8);!1!==r&&!0!==r?(o=2===r,n=m(t,e,r)):(n=i.util.createBuffer()).putBytes(t);for(var u=new a(n.toHex(),16),c=v(u,e,o).toString(16),l=i.util.createBuffer(),f=s-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(i.util.hexToBytes(c)),l.getBytes()},c.rsa.decrypt=function(t,e,r,n){var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var s=new Error("Encrypted message length is invalid.");throw s.length=t.length,s.expected=o,s}var u=new a(i.util.createBuffer(t).toHex(),16);if(u.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=v(u,e,r).toString(16),l=i.util.createBuffer(),f=o-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(i.util.hexToBytes(c)),!1!==n?E(l.getBytes(),e,r):l.getBytes()},c.rsa.createKeyPairGenerationState=function(t,e,r){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var n,o=(r=r||{}).prng||i.random,s={nextBytes:function(t){for(var e=o.getBytesSync(t.length),r=0;r<t.length;++r)t[r]=e.charCodeAt(r)}},u=r.algorithm||"PRIMEINC";if("PRIMEINC"!==u)throw new Error("Invalid key generation algorithm: "+u);return(n={algorithm:u,state:0,bits:t,rng:s,eInt:e||65537,e:new a(null),p:null,q:null,qBits:t>>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(n.eInt),n},c.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new a(null);r.fromInt(30);for(var n,i=0,o=function(t,e){return t|e},s=+new Date,u=0;null===t.keys&&(e<=0||u<e);){if(0===t.state){var f=null===t.p?t.pBits:t.qBits,h=f-1;0===t.pqState?(t.num=new a(f,t.rng),t.num.testBit(h)||t.num.bitwiseTo(a.ONE.shiftLeft(h),o,t.num),t.num.dAddOffset(31-t.num.mod(r).byteValue(),0),i=0,++t.pqState):1===t.pqState?t.num.bitLength()>f?t.pqState=0:t.num.isProbablePrime(b(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(l[i++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(a.ONE).gcd(t.e).compareTo(a.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(a.ONE),t.q1=t.q.subtract(a.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(a.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var p=t.e.modInverse(t.phi);t.keys={privateKey:c.rsa.setPrivateKey(t.n,t.e,p,t.p,t.q,p.mod(t.p1),p.mod(t.q1),t.q.modInverse(t.p)),publicKey:c.rsa.setPublicKey(t.n,t.e)}}u+=(n=+new Date)-s,s=n}return null!==t.keys},c.rsa.generateKeyPair=function(t,e,r,l){if(1===arguments.length?"object"===n(t)?(r=t,t=void 0):"function"==typeof t&&(l=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof e?(l=e,e=void 0):"number"!=typeof e&&(r=e,e=void 0):(r=t,l=e,t=void 0,e=void 0):3===arguments.length&&("number"==typeof e?"function"==typeof r&&(l=r,r=void 0):(l=r,r=e,e=void 0)),r=r||{},void 0===t&&(t=r.bits||2048),void 0===e&&(e=r.e||65537),!i.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(65537===e||3===e))if(l){if(S("generateKeyPair"))return o.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(t,e,r){if(t)return l(t);l(null,{privateKey:c.privateKeyFromPem(r),publicKey:c.publicKeyFromPem(e)})}));if(w("generateKey")&&w("exportKey"))return u.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:T(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(t){return u.globalScope.crypto.subtle.exportKey("pkcs8",t.privateKey)})).then(void 0,(function(t){l(t)})).then((function(t){if(t){var e=c.privateKeyFromAsn1(s.fromDer(i.util.createBuffer(t)));l(null,{privateKey:e,publicKey:c.setRsaPublicKey(e.n,e.e)})}}));if(A("generateKey")&&A("exportKey")){var f=u.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:T(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return f.oncomplete=function(t){var e=t.target.result,r=u.globalScope.msCrypto.subtle.exportKey("pkcs8",e.privateKey);r.oncomplete=function(t){var e=t.target.result,r=c.privateKeyFromAsn1(s.fromDer(i.util.createBuffer(e)));l(null,{privateKey:r,publicKey:c.setRsaPublicKey(r.n,r.e)})},r.onerror=function(t){l(t)}},void(f.onerror=function(t){l(t)})}}else if(S("generateKeyPairSync")){var h=o.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:c.privateKeyFromPem(h.privateKey),publicKey:c.publicKeyFromPem(h.publicKey)}}var p=c.rsa.createKeyPairGenerationState(t,e,r);if(!l)return c.rsa.stepKeyPairGenerationState(p,0),p.keys;!function(t,e,r){"function"==typeof e&&(r=e,e={});var n={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};function o(){s(t.pBits,(function(e,n){return e?r(e):(t.p=n,null!==t.q?u(e,t.q):void s(t.qBits,u))}))}function s(t,e){i.prime.generateProbablePrime(t,n,e)}function u(e,n){if(e)return r(e);if(t.q=n,t.p.compareTo(t.q)<0){var i=t.p;t.p=t.q,t.q=i}if(0!==t.p.subtract(a.ONE).gcd(t.e).compareTo(a.ONE))return t.p=null,void o();if(0!==t.q.subtract(a.ONE).gcd(t.e).compareTo(a.ONE))return t.q=null,void s(t.qBits,u);if(t.p1=t.p.subtract(a.ONE),t.q1=t.q.subtract(a.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(a.ONE))return t.p=t.q=null,void o();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void s(t.qBits,u);var l=t.e.modInverse(t.phi);t.keys={privateKey:c.rsa.setPrivateKey(t.n,t.e,l,t.p,t.q,l.mod(t.p1),l.mod(t.q1),t.q.modInverse(t.p)),publicKey:c.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}"prng"in e&&(n.prng=e.prng),o()}(p,r,l)},c.setRsaPublicKey=c.rsa.setPublicKey=function(t,e){var r={n:t,e,encrypt:function(t,e,n){if("string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,r){return m(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return i.pkcs1.encode_rsa_oaep(e,t,n)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"==typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var a=e.encode(t,r,!0);return c.rsa.encrypt(a,r,!0)},verify:function(t,e,n,a){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),void 0===a&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===n?n={verify:function(t,e){e=E(e,r,!0);var n=s.fromDer(e,{parseAllBytes:a._parseAllDigestBytes}),o={},u=[];if(!s.validate(n,y,o,u))throw(c=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=u,c;var c,l=s.derToOid(o.algorithmIdentifier);if(l!==i.oids.md2&&l!==i.oids.md5&&l!==i.oids.sha1&&l!==i.oids.sha224&&l!==i.oids.sha256&&l!==i.oids.sha384&&l!==i.oids.sha512&&l!==i.oids["sha512-224"]&&l!==i.oids["sha512-256"])throw(c=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=l,c;if((l===i.oids.md2||l===i.oids.md5)&&!("parameters"in o))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return t===o.digest}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(t,e){return t===E(e,r,!0)}});var o=c.rsa.decrypt(e,r,!0,!1);return n.verify(t,o,r.n.bitLength())}};return r},c.setRsaPrivateKey=c.rsa.setPrivateKey=function(t,e,r,n,a,o,s,u){var l={n:t,e,d:r,p:n,q:a,dP:o,dQ:s,qInv:u,decrypt:function(t,e,r){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var n=c.rsa.decrypt(t,l,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:E};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return i.pkcs1.decode_rsa_oaep(e,t,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(n,l,!1)},sign:function(t,e){var r=!1;"string"==typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:g},r=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},r=1);var n=e.encode(t,l.n.bitLength());return c.rsa.encrypt(n,l,r)}};return l},c.wrapRsaPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(t).getBytes())])},c.privateKeyFromAsn1=function(t){var e,r,n,o,u,l,p,d,y={},g=[];if(s.validate(t,f,y,g)&&(t=s.fromDer(i.util.createBuffer(y.privateKey))),y={},g=[],!s.validate(t,h,y,g)){var v=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw v.errors=g,v}return e=i.util.createBuffer(y.privateKeyModulus).toHex(),r=i.util.createBuffer(y.privateKeyPublicExponent).toHex(),n=i.util.createBuffer(y.privateKeyPrivateExponent).toHex(),o=i.util.createBuffer(y.privateKeyPrime1).toHex(),u=i.util.createBuffer(y.privateKeyPrime2).toHex(),l=i.util.createBuffer(y.privateKeyExponent1).toHex(),p=i.util.createBuffer(y.privateKeyExponent2).toHex(),d=i.util.createBuffer(y.privateKeyCoefficient).toHex(),c.setRsaPrivateKey(new a(e,16),new a(r,16),new a(n,16),new a(o,16),new a(u,16),new a(l,16),new a(p,16),new a(d,16))},c.privateKeyToAsn1=c.privateKeyToRSAPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.qInv))])},c.publicKeyFromAsn1=function(t){var e={},r=[];if(s.validate(t,d,e,r)){var n,o=s.derToOid(e.publicKeyOid);if(o!==c.oids.rsaEncryption)throw(n=new Error("Cannot read public key. Unknown OID.")).oid=o,n;t=e.rsaPublicKey}if(r=[],!s.validate(t,p,e,r))throw(n=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,n;var u=i.util.createBuffer(e.publicKeyModulus).toHex(),l=i.util.createBuffer(e.publicKeyExponent).toHex();return c.setRsaPublicKey(new a(u,16),new a(l,16))},c.publicKeyToAsn1=c.publicKeyToSubjectPublicKeyInfo=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[c.publicKeyToRSAPublicKey(t)])])},c.publicKeyToRSAPublicKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,C(t.e))])}},4924:(t,e,r)=>{var n=r(4602);r(7668),r(8533);var i=t.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=!0);var t=null,e=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return e=n.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var u=a.length;i.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=u[1],u[1]=u[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(a),s(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(e.bytes());var u,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-c));for(var l=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)l+=(u=8*i.fullMessageLength[f+1])/4294967296>>>0,o.putInt32(l>>>0),l=u>>>0;o.putInt32(l);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};s(h,r,o);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},i};var a=null,o=!1;function s(t,e,r){for(var n,i,a,o,s,u,c,l=r.length();l>=64;){for(i=t.h0,a=t.h1,o=t.h2,s=t.h3,u=t.h4,c=0;c<16;++c)n=r.getInt32(),e[c]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+u+1518500249+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<20;++c)n=(n=e[c-3]^e[c-8]^e[c-14]^e[c-16])<<1|n>>>31,e[c]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+u+1518500249+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<32;++c)n=(n=e[c-3]^e[c-8]^e[c-14]^e[c-16])<<1|n>>>31,e[c]=n,n=(i<<5|i>>>27)+(a^o^s)+u+1859775393+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<40;++c)n=(n=e[c-6]^e[c-16]^e[c-28]^e[c-32])<<2|n>>>30,e[c]=n,n=(i<<5|i>>>27)+(a^o^s)+u+1859775393+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<60;++c)n=(n=e[c-6]^e[c-16]^e[c-28]^e[c-32])<<2|n>>>30,e[c]=n,n=(i<<5|i>>>27)+(a&o|s&(a^o))+u+2400959708+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<80;++c)n=(n=e[c-6]^e[c-16]^e[c-28]^e[c-32])<<2|n>>>30,e[c]=n,n=(i<<5|i>>>27)+(a^o^s)+u+3395469782+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;t.h0=t.h0+i|0,t.h1=t.h1+a|0,t.h2=t.h2+o|0,t.h3=t.h3+s|0,t.h4=t.h4+u|0,l-=64}}},5330:(t,e,r)=>{var n=r(4602);r(7668),r(8533);var i=t.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),s=[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=!0);var t=null,e=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return e=n.util.createBuffer(),t={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var s=a.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=s[1],s[1]=s[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,s[0]=s[1]/4294967296>>>0;return e.putBytes(a),u(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(e.bytes());var s,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-c));for(var l=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)l+=(s=8*i.fullMessageLength[f+1])/4294967296>>>0,o.putInt32(l>>>0),l=s>>>0;o.putInt32(l);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};u(h,r,o);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},i};var a=null,o=!1,s=null;function u(t,e,r){for(var n,i,a,o,u,c,l,f,h,p,d,y,g,v=r.length();v>=64;){for(u=0;u<16;++u)e[u]=r.getInt32();for(;u<64;++u)n=((n=e[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=e[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[u]=n+e[u-7]+i+e[u-16]|0;for(c=t.h0,l=t.h1,f=t.h2,h=t.h3,p=t.h4,d=t.h5,y=t.h6,g=t.h7,u=0;u<64;++u)a=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),o=c&l|f&(c^l),n=g+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(y^p&(d^y))+s[u]+e[u],g=y,y=d,d=p,p=h+n>>>0,h=f,f=l,l=c,c=n+(i=a+o)>>>0;t.h0=t.h0+c|0,t.h1=t.h1+l|0,t.h2=t.h2+f|0,t.h3=t.h3+h|0,t.h4=t.h4+p|0,t.h5=t.h5+d|0,t.h6=t.h6+y|0,t.h7=t.h7+g|0,v-=64}}},9019:(t,e,r)=>{var n=r(4602);r(7668),r(8533);var i=t.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var a=n.sha384=n.sha512.sha384=n.sha512.sha384||{};a.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=a,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(t){if(s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),128),u=[[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]],(c={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],c["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],c["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],c["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],s=!0),void 0===t&&(t="SHA-512"),!(t in c))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=c[t],r=null,i=n.util.createBuffer(),a=new Array(80),f=0;f<80;++f)a[f]=new Array(2);var h=64;switch(t){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var p={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){p.messageLength=0,p.fullMessageLength=p.messageLength128=[];for(var t=p.messageLengthSize/4,a=0;a<t;++a)p.fullMessageLength.push(0);for(i=n.util.createBuffer(),r=new Array(e.length),a=0;a<e.length;++a)r[a]=e[a].slice(0);return p}};return p.start(),p.update=function(t,e){"utf8"===e&&(t=n.util.encodeUtf8(t));var o=t.length;p.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var s=p.fullMessageLength.length-1;s>=0;--s)p.fullMessageLength[s]+=o[1],o[1]=o[0]+(p.fullMessageLength[s]/4294967296>>>0),p.fullMessageLength[s]=p.fullMessageLength[s]>>>0,o[0]=o[1]/4294967296>>>0;return i.putBytes(t),l(r,a,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var e=n.util.createBuffer();e.putBytes(i.bytes());var s,u=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize&p.blockLength-1;e.putBytes(o.substr(0,p.blockLength-u));for(var c=8*p.fullMessageLength[0],f=0;f<p.fullMessageLength.length-1;++f)c+=(s=8*p.fullMessageLength[f+1])/4294967296>>>0,e.putInt32(c>>>0),c=s>>>0;e.putInt32(c);var h=new Array(r.length);for(f=0;f<r.length;++f)h[f]=r[f].slice(0);l(h,a,e);var d,y=n.util.createBuffer();for(d="SHA-512"===t?h.length:"SHA-384"===t?h.length-2:h.length-4,f=0;f<d;++f)y.putInt32(h[f][0]),f===d-1&&"SHA-512/224"===t||y.putInt32(h[f][1]);return y},p};var o=null,s=!1,u=null,c=null;function l(t,e,r){for(var n,i,a,o,s,c,l,f,h,p,d,y,g,v,m,E,C,b,S,w,A,T,I,B,_,k,N,R,P,F,x,U,O,L=r.length();L>=128;){for(N=0;N<16;++N)e[N][0]=r.getInt32()>>>0,e[N][1]=r.getInt32()>>>0;for(;N<80;++N)n=(((R=(F=e[N-2])[0])>>>19|(P=F[1])<<13)^(P>>>29|R<<3)^R>>>6)>>>0,i=((R<<13|P>>>19)^(P<<3|R>>>29)^(R<<26|P>>>6))>>>0,a=(((R=(U=e[N-15])[0])>>>1|(P=U[1])<<31)^(R>>>8|P<<24)^R>>>7)>>>0,o=((R<<31|P>>>1)^(R<<24|P>>>8)^(R<<25|P>>>7))>>>0,x=e[N-7],O=e[N-16],P=i+x[1]+o+O[1],e[N][0]=n+x[0]+a+O[0]+(P/4294967296>>>0)>>>0,e[N][1]=P>>>0;for(d=t[0][0],y=t[0][1],g=t[1][0],v=t[1][1],m=t[2][0],E=t[2][1],C=t[3][0],b=t[3][1],S=t[4][0],w=t[4][1],A=t[5][0],T=t[5][1],I=t[6][0],B=t[6][1],_=t[7][0],k=t[7][1],N=0;N<80;++N)l=((S>>>14|w<<18)^(S>>>18|w<<14)^(w>>>9|S<<23))>>>0,f=(I^S&(A^I))>>>0,s=((d>>>28|y<<4)^(y>>>2|d<<30)^(y>>>7|d<<25))>>>0,c=((d<<4|y>>>28)^(y<<30|d>>>2)^(y<<25|d>>>7))>>>0,h=(d&g|m&(d^g))>>>0,p=(y&v|E&(y^v))>>>0,P=k+(((S<<18|w>>>14)^(S<<14|w>>>18)^(w<<23|S>>>9))>>>0)+((B^w&(T^B))>>>0)+u[N][1]+e[N][1],n=_+l+f+u[N][0]+e[N][0]+(P/4294967296>>>0)>>>0,i=P>>>0,a=s+h+((P=c+p)/4294967296>>>0)>>>0,o=P>>>0,_=I,k=B,I=A,B=T,A=S,T=w,S=C+n+((P=b+i)/4294967296>>>0)>>>0,w=P>>>0,C=m,b=E,m=g,E=v,g=d,v=y,d=n+a+((P=i+o)/4294967296>>>0)>>>0,y=P>>>0;P=t[0][1]+y,t[0][0]=t[0][0]+d+(P/4294967296>>>0)>>>0,t[0][1]=P>>>0,P=t[1][1]+v,t[1][0]=t[1][0]+g+(P/4294967296>>>0)>>>0,t[1][1]=P>>>0,P=t[2][1]+E,t[2][0]=t[2][0]+m+(P/4294967296>>>0)>>>0,t[2][1]=P>>>0,P=t[3][1]+b,t[3][0]=t[3][0]+C+(P/4294967296>>>0)>>>0,t[3][1]=P>>>0,P=t[4][1]+w,t[4][0]=t[4][0]+S+(P/4294967296>>>0)>>>0,t[4][1]=P>>>0,P=t[5][1]+T,t[5][0]=t[5][0]+A+(P/4294967296>>>0)>>>0,t[5][1]=P>>>0,P=t[6][1]+B,t[6][0]=t[6][0]+I+(P/4294967296>>>0)>>>0,t[6][1]=P>>>0,P=t[7][1]+k,t[7][0]=t[7][0]+_+(P/4294967296>>>0)>>>0,t[7][1]=P>>>0,L-=128}}},8533:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4602),a=r(5980),o=t.exports=i.util=i.util||{};function s(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}function u(t){if(this.data="",this.read=0,"string"==typeof t)this.data=t;else if(o.isArrayBuffer(t)||o.isArrayBufferView(t))if("undefined"!=typeof Buffer&&t instanceof Buffer)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(t){for(var r=0;r<e.length;++r)this.putByte(e[r])}}else(t instanceof u||"object"===n(t)&&"string"==typeof t.data&&"number"==typeof t.read)&&(this.data=t.data,this.read=t.read);this._constructedStringLength=0}!function(){if("undefined"!=typeof process&&process.nextTick&&!process.browser)return o.nextTick=process.nextTick,void("function"==typeof setImmediate?o.setImmediate=setImmediate:o.setImmediate=o.nextTick);if("function"==typeof setImmediate)return o.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(o.nextTick=function(t){return setImmediate(t)});if(o.setImmediate=function(t){setTimeout(t,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var t="forge.setImmediate",e=[];o.setImmediate=function(r){e.push(r),1===e.length&&window.postMessage(t,"*")},window.addEventListener("message",(function(r){if(r.source===window&&r.data===t){r.stopPropagation();var n=e.slice();e.length=0,n.forEach((function(t){t()}))}}),!0)}if("undefined"!=typeof MutationObserver){var r=Date.now(),n=!0,i=document.createElement("div");e=[],new MutationObserver((function(){var t=e.slice();e.length=0,t.forEach((function(t){t()}))})).observe(i,{attributes:!0});var a=o.setImmediate;o.setImmediate=function(t){Date.now()-r>15?(r=Date.now(),a(t)):(e.push(t),1===e.length&&i.setAttribute("a",n=!n))}}o.nextTick=o.setImmediate}(),o.isNodejs="undefined"!=typeof process&&process.versions&&process.versions.node,o.globalScope=o.isNodejs?global:"undefined"==typeof self?window:self,o.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},o.isArrayBufferView=function(t){return t&&o.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},o.ByteBuffer=u,o.ByteStringBuffer=u,o.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},o.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},o.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},o.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},o.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this},o.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},o.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(o.encodeUtf8(t))},o.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},o.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},o.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},o.ByteStringBuffer.prototype.putInt=function(t,e){s(e);var r="";do{e-=8,r+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(r)},o.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<<e-1),this.putInt(t,e)},o.ByteStringBuffer.prototype.putBuffer=function(t){return this.putBytes(t.getBytes())},o.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},o.ByteStringBuffer.prototype.getInt16=function(){var t=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,t},o.ByteStringBuffer.prototype.getInt24=function(){var t=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,t},o.ByteStringBuffer.prototype.getInt32=function(){var t=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,t},o.ByteStringBuffer.prototype.getInt16Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,t},o.ByteStringBuffer.prototype.getInt24Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,t},o.ByteStringBuffer.prototype.getInt32Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,t},o.ByteStringBuffer.prototype.getInt=function(t){s(t);var e=0;do{e=(e<<8)+this.data.charCodeAt(this.read++),t-=8}while(t>0);return e},o.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<<t-2;return e>=r&&(e-=r<<1),e},o.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.ByteStringBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},o.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},o.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},o.ByteStringBuffer.prototype.copy=function(){var t=o.createBuffer(this.data);return t.read=this.read,t},o.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},o.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},o.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},o.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.length;++e){var r=this.data.charCodeAt(e);r<16&&(t+="0"),t+=r.toString(16)}return t},o.ByteStringBuffer.prototype.toString=function(){return o.decodeUtf8(this.bytes())},o.DataBuffer=function(t,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var r=o.isArrayBuffer(t),n=o.isArrayBufferView(t);if(r||n)return this.data=r?new DataView(t):new DataView(t.buffer,t.byteOffset,t.byteLength),void(this.write="writeOffset"in e?e.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=t&&this.putBytes(t),"writeOffset"in e&&(this.write=e.writeOffset)},o.DataBuffer.prototype.length=function(){return this.write-this.read},o.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},o.DataBuffer.prototype.accommodate=function(t,e){if(this.length()>=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this},o.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},o.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r<e;++r)this.data.setUint8(t);return this},o.DataBuffer.prototype.putBytes=function(t,e){if(o.isArrayBufferView(t)){var r=(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).byteLength-i.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(i),this.write+=r,this}if(o.isArrayBuffer(t)){var i=new Uint8Array(t);return this.accommodate(i.byteLength),new Uint8Array(this.data.buffer).set(i,this.write),this.write+=i.byteLength,this}if(t instanceof o.DataBuffer||"object"===n(t)&&"number"==typeof t.read&&"number"==typeof t.write&&o.isArrayBufferView(t.data))return i=new Uint8Array(t.data.byteLength,t.read,t.length()),this.accommodate(i.byteLength),new Uint8Array(t.data.byteLength,this.write).set(i),this.write+=i.byteLength,this;if(t instanceof o.ByteStringBuffer&&(t=t.data,e="binary"),e=e||"binary","string"==typeof t){var a;if("hex"===e)return this.accommodate(Math.ceil(t.length/2)),a=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.hex.decode(t,a,this.write),this;if("base64"===e)return this.accommodate(3*Math.ceil(t.length/4)),a=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.base64.decode(t,a,this.write),this;if("utf8"===e&&(t=o.encodeUtf8(t),e="binary"),"binary"===e||"raw"===e)return this.accommodate(t.length),a=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.raw.decode(a),this;if("utf16"===e)return this.accommodate(2*t.length),a=new Uint16Array(this.data.buffer,this.write),this.write+=o.text.utf16.encode(a),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+t)},o.DataBuffer.prototype.putBuffer=function(t){return this.putBytes(t),t.clear(),this},o.DataBuffer.prototype.putString=function(t){return this.putBytes(t,"utf16")},o.DataBuffer.prototype.putInt16=function(t){return this.accommodate(2),this.data.setInt16(this.write,t),this.write+=2,this},o.DataBuffer.prototype.putInt24=function(t){return this.accommodate(3),this.data.setInt16(this.write,t>>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},o.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},o.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},o.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},o.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},o.DataBuffer.prototype.putInt=function(t,e){s(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},o.DataBuffer.prototype.putSignedInt=function(t,e){return s(e),this.accommodate(e/8),t<0&&(t+=2<<e-1),this.putInt(t,e)},o.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},o.DataBuffer.prototype.getInt16=function(){var t=this.data.getInt16(this.read);return this.read+=2,t},o.DataBuffer.prototype.getInt24=function(){var t=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,t},o.DataBuffer.prototype.getInt32=function(){var t=this.data.getInt32(this.read);return this.read+=4,t},o.DataBuffer.prototype.getInt16Le=function(){var t=this.data.getInt16(this.read,!0);return this.read+=2,t},o.DataBuffer.prototype.getInt24Le=function(){var t=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,t},o.DataBuffer.prototype.getInt32Le=function(){var t=this.data.getInt32(this.read,!0);return this.read+=4,t},o.DataBuffer.prototype.getInt=function(t){s(t);var e=0;do{e=(e<<8)+this.data.getInt8(this.read++),t-=8}while(t>0);return e},o.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<<t-2;return e>=r&&(e-=r<<1),e},o.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.DataBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},o.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},o.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},o.DataBuffer.prototype.copy=function(){return new o.DataBuffer(this)},o.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},o.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},o.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},o.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.byteLength;++e){var r=this.data.getUint8(e);r<16&&(t+="0"),t+=r.toString(16)}return t},o.DataBuffer.prototype.toString=function(t){var e=new Uint8Array(this.data,this.read,this.length());if("binary"===(t=t||"utf8")||"raw"===t)return o.binary.raw.encode(e);if("hex"===t)return o.binary.hex.encode(e);if("base64"===t)return o.binary.base64.encode(e);if("utf8"===t)return o.text.utf8.decode(e);if("utf16"===t)return o.text.utf16.decode(e);throw new Error("Invalid encoding: "+t)},o.createBuffer=function(t,e){return e=e||"raw",void 0!==t&&"utf8"===e&&(t=o.encodeUtf8(t)),new o.ByteBuffer(t)},o.fillString=function(t,e){for(var r="";e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return r},o.xorBytes=function(t,e,r){for(var n="",i="",a="",o=0,s=0;r>0;--r,++o)i=t.charCodeAt(o)^e.charCodeAt(o),s>=10&&(n+=a,a="",s=0),a+=String.fromCharCode(i),++s;return n+a},o.hexToBytes=function(t){var e="",r=0;for(!0&t.length&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r<t.length;r+=2)e+=String.fromCharCode(parseInt(t.substr(r,2),16));return e},o.bytesToHex=function(t){return o.createBuffer(t).toHex()},o.int32ToBytes=function(t){return String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],f="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";o.encode64=function(t,e){for(var r,n,i,a="",o="",s=0;s<t.length;)r=t.charCodeAt(s++),n=t.charCodeAt(s++),i=t.charCodeAt(s++),a+=c.charAt(r>>2),a+=c.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=c.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":c.charAt(63&i)),e&&a.length>e&&(o+=a.substr(0,e)+"\r\n",a=a.substr(e));return o+a},o.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,r,n,i,a="",o=0;o<t.length;)e=l[t.charCodeAt(o++)-43],r=l[t.charCodeAt(o++)-43],n=l[t.charCodeAt(o++)-43],i=l[t.charCodeAt(o++)-43],a+=String.fromCharCode(e<<2|r>>4),64!==n&&(a+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(a+=String.fromCharCode((3&n)<<6|i)));return a},o.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},o.decodeUtf8=function(t){return decodeURIComponent(escape(t))},o.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:a.encode,decode:a.decode}},o.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},o.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,a=0;a<t.length;++a)n[i++]=t.charCodeAt(a);return e?i-r:n},o.binary.hex.encode=o.bytesToHex,o.binary.hex.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(Math.ceil(t.length/2)));var i=0,a=r=r||0;for(1&t.length&&(i=1,n[a++]=parseInt(t[0],16));i<t.length;i+=2)n[a++]=parseInt(t.substr(i,2),16);return e?a-r:n},o.binary.base64.encode=function(t,e){for(var r,n,i,a="",o="",s=0;s<t.byteLength;)r=t[s++],n=t[s++],i=t[s++],a+=c.charAt(r>>2),a+=c.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=c.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":c.charAt(63&i)),e&&a.length>e&&(o+=a.substr(0,e)+"\r\n",a=a.substr(e));return o+a},o.binary.base64.decode=function(t,e,r){var n,i,a,o,s=e;s||(s=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,c=r=r||0;u<t.length;)n=l[t.charCodeAt(u++)-43],i=l[t.charCodeAt(u++)-43],a=l[t.charCodeAt(u++)-43],o=l[t.charCodeAt(u++)-43],s[c++]=n<<2|i>>4,64!==a&&(s[c++]=(15&i)<<4|a>>2,64!==o&&(s[c++]=(3&a)<<6|o));return e?c-r:s.subarray(0,c)},o.binary.base58.encode=function(t,e){return o.binary.baseN.encode(t,f,e)},o.binary.base58.decode=function(t,e){return o.binary.baseN.decode(t,f,e)},o.text={utf8:{},utf16:{}},o.text.utf8.encode=function(t,e,r){t=o.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,a=0;a<t.length;++a)n[i++]=t.charCodeAt(a);return e?i-r:n},o.text.utf8.decode=function(t){return o.decodeUtf8(String.fromCharCode.apply(null,t))},o.text.utf16.encode=function(t,e,r){var n=e;n||(n=new Uint8Array(2*t.length));for(var i=new Uint16Array(n.buffer),a=r=r||0,o=r,s=0;s<t.length;++s)i[o++]=t.charCodeAt(s),a+=2;return e?a-r:n},o.text.utf16.decode=function(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))},o.deflate=function(t,e,r){if(e=o.decode64(t.deflate(o.encode64(e)).rval),r){var n=2;32&e.charCodeAt(1)&&(n=6),e=e.substring(n,e.length-4)}return e},o.inflate=function(t,e,r){var n=t.inflate(o.encode64(e)).rval;return null===n?null:o.decode64(n)};var h=function(t,e,r){if(!t)throw new Error("WebStorage not available.");var n;if(null===r?n=t.removeItem(e):(r=o.encode64(JSON.stringify(r)),n=t.setItem(e,r)),void 0!==n&&!0!==n.rval){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},p=function(t,e){if(!t)throw new Error("WebStorage not available.");var r=t.getItem(e);if(t.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(o.decode64(r))),r},d=function(t,e,r,n){var i=p(t,e);null===i&&(i={}),i[r]=n,h(t,e,i)},y=function(t,e,r){var n=p(t,e);return null!==n&&(n=r in n?n[r]:null),n},g=function(t,e,r){var n=p(t,e);if(null!==n&&r in n){delete n[r];var i=!0;for(var a in n){i=!1;break}i&&(n=null),h(t,e,n)}},v=function(t,e){h(t,e,null)},m=function(t,e,r){var n,i=null;void 0===r&&(r=["web","flash"]);var a=!1,o=null;for(var s in r){n=r[s];try{if("flash"===n||"both"===n){if(null===e[0])throw new Error("Flash local storage not available.");i=t.apply(this,e),a="flash"===n}"web"!==n&&"both"!==n||(e[0]=localStorage,i=t.apply(this,e),a=!0)}catch(t){o=t}if(a)break}if(!a)throw o;return i};o.setItem=function(t,e,r,n,i){m(d,arguments,i)},o.getItem=function(t,e,r,n){return m(y,arguments,n)},o.removeItem=function(t,e,r,n){m(g,arguments,n)},o.clearItems=function(t,e,r){m(v,arguments,r)},o.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},o.format=function(t){for(var e,r,n=/%./g,i=0,a=[],o=0;e=n.exec(t);){(r=t.substring(o,n.lastIndex-2)).length>0&&a.push(r),o=n.lastIndex;var s=e[0][1];switch(s){case"s":case"o":i<arguments.length?a.push(arguments[1+i++]):a.push("<?>");break;case"%":a.push("%");break;default:a.push("<%"+s+"?>")}}return a.push(t.substring(o)),a.join("")},o.formatNumber=function(t,e,r,n){var i=t,a=isNaN(e=Math.abs(e))?2:e,o=void 0===r?",":r,s=void 0===n?".":n,u=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(a),10)+"",l=c.length>3?c.length%3:0;return u+(l?c.substr(0,l)+s:"")+c.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+s)+(a?o+Math.abs(i-c).toFixed(a).slice(2):"")},o.formatSize=function(t){return t>=1073741824?o.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?o.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?o.formatNumber(t/1024,0)+" KiB":o.formatNumber(t,0)+" bytes"},o.bytesFromIP=function(t){return-1!==t.indexOf(".")?o.bytesFromIPv4(t):-1!==t.indexOf(":")?o.bytesFromIPv6(t):null},o.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=o.createBuffer(),r=0;r<t.length;++r){var n=parseInt(t[r],10);if(isNaN(n))return null;e.putByte(n)}return e.getBytes()},o.bytesFromIPv6=function(t){for(var e=0,r=2*(8-(t=t.split(":").filter((function(t){return 0===t.length&&++e,!0}))).length+e),n=o.createBuffer(),i=0;i<8;++i)if(t[i]&&0!==t[i].length){var a=o.hexToBytes(t[i]);a.length<2&&n.putByte(0),n.putBytes(a)}else n.fillWithByte(0,r),r=0;return n.getBytes()},o.bytesToIP=function(t){return 4===t.length?o.bytesToIPv4(t):16===t.length?o.bytesToIPv6(t):null},o.bytesToIPv4=function(t){if(4!==t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e.join(".")},o.bytesToIPv6=function(t){if(16!==t.length)return null;for(var e=[],r=[],n=0,i=0;i<t.length;i+=2){for(var a=o.bytesToHex(t[i]+t[i+1]);"0"===a[0]&&"0"!==a;)a=a.substr(1);if("0"===a){var s=r[r.length-1],u=e.length;s&&u===s.end+1?(s.end=u,s.end-s.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:u,end:u})}e.push(a)}if(r.length>0){var c=r[n];c.end-c.start>0&&(e.splice(c.start,c.end-c.start+1,""),0===c.start&&e.unshift(""),7===c.end&&e.push(""))}return e.join(":")},o.estimateCores=function(t,e){if("function"==typeof t&&(e=t,t={}),t=t||{},"cores"in o&&!t.update)return e(null,o.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return o.cores=navigator.hardwareConcurrency,e(null,o.cores);if("undefined"==typeof Worker)return o.cores=1,e(null,o.cores);if("undefined"==typeof Blob)return o.cores=2,e(null,o.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(t){for(var e=Date.now(),r=e+4;Date.now()<r;);self.postMessage({st:e,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function t(n,i,a){if(0===i){var s=Math.floor(n.reduce((function(t,e){return t+e}),0)/n.length);return o.cores=Math.max(1,s),URL.revokeObjectURL(r),e(null,o.cores)}!function(t,e){for(var n=[],i=[],a=0;a<t;++a){var o=new Worker(r);o.addEventListener("message",(function(r){if(i.push(r.data),i.length===t){for(var a=0;a<t;++a)n[a].terminate();e(0,i)}})),n.push(o)}for(a=0;a<t;++a)n[a].postMessage(a)}(a,(function(e,r){n.push(function(t,e){for(var r=[],n=0;n<t;++n)for(var i=e[n],a=r[n]=[],o=0;o<t;++o)if(n!==o){var s=e[o];(i.st>s.st&&i.st<s.et||s.st>i.st&&s.st<i.et)&&a.push(o)}return r.reduce((function(t,e){return Math.max(t,e.length)}),0)}(a,r)),t(n,i-1,a)}))}([],5,16)}},4541:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4602);r(7962),r(9452),r(7161),r(7668),r(1451),r(8724),r(8999),r(2095),r(107),r(8533);var a=i.asn1,o=t.exports=i.pki=i.pki||{},s=o.oids,u={};u.CN=s.commonName,u.commonName="CN",u.C=s.countryName,u.countryName="C",u.L=s.localityName,u.localityName="L",u.ST=s.stateOrProvinceName,u.stateOrProvinceName="ST",u.O=s.organizationName,u.organizationName="O",u.OU=s.organizationalUnitName,u.organizationalUnitName="OU",u.E=s.emailAddress,u.emailAddress="E";var c=i.pki.rsa.publicKeyValidator,l={name:"Certificate",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:a.Class.UNIVERSAL,type:a.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:a.Class.UNIVERSAL,type:a.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:a.Class.UNIVERSAL,type:a.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:a.Class.UNIVERSAL,type:a.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},c,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},f={name:"rsapss",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:a.Class.UNIVERSAL,type:a.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:a.Class.UNIVERSAL,type:a.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},h={name:"CertificationRequestInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},c,{name:"CertificationRequestInfo.attributes",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0}]}]}]},p={name:"CertificationRequest",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[h,{name:"CertificationRequest.signatureAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function d(t,e){"string"==typeof e&&(e={shortName:e});for(var r,n=null,i=0;null===n&&i<t.attributes.length;++i)r=t.attributes[i],(e.type&&e.type===r.type||e.name&&e.name===r.name||e.shortName&&e.shortName===r.shortName)&&(n=r);return n}o.RDNAttributesAsArray=function(t,e){for(var r,n,i,o=[],c=0;c<t.value.length;++c){r=t.value[c];for(var l=0;l<r.value.length;++l)i={},n=r.value[l],i.type=a.derToOid(n.value[0].value),i.value=n.value[1].value,i.valueTagClass=n.value[1].type,i.type in s&&(i.name=s[i.type],i.name in u&&(i.shortName=u[i.name])),e&&(e.update(i.type),e.update(i.value)),o.push(i)}return o},o.CRIAttributesAsArray=function(t){for(var e=[],r=0;r<t.length;++r)for(var n=t[r],i=a.derToOid(n.value[0].value),c=n.value[1].value,l=0;l<c.length;++l){var f={};if(f.type=i,f.value=c[l].value,f.valueTagClass=c[l].type,f.type in s&&(f.name=s[f.type],f.name in u&&(f.shortName=u[f.name])),f.type===s.extensionRequest){f.extensions=[];for(var h=0;h<f.value.length;++h)f.extensions.push(o.certificateExtensionFromAsn1(f.value[h]))}e.push(f)}return e};var y=function(t,e,r){var n={};if(t!==s["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:s.sha1},mgf:{algorithmOid:s.mgf1,hash:{algorithmOid:s.sha1}},saltLength:20});var i={},o=[];if(!a.validate(e,f,i,o)){var u=new Error("Cannot read RSASSA-PSS parameter block.");throw u.errors=o,u}return void 0!==i.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=a.derToOid(i.hashOid)),void 0!==i.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=a.derToOid(i.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=a.derToOid(i.maskGenHashOid)),void 0!==i.saltLength&&(n.saltLength=i.saltLength.charCodeAt(0)),n},g=function(t){switch(s[t.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return i.md.sha1.create();case"md5WithRSAEncryption":return i.md.md5.create();case"sha256WithRSAEncryption":case"RSASSA-PSS":return i.md.sha256.create();case"sha384WithRSAEncryption":return i.md.sha384.create();case"sha512WithRSAEncryption":return i.md.sha512.create();default:var e=new Error("Could not compute "+t.type+" digest. Unknown signature OID.");throw e.signatureOid=t.signatureOid,e}},v=function(t){var e,r=t.certificate;switch(r.signatureOid){case s.sha1WithRSAEncryption:case s.sha1WithRSASignature:break;case s["RSASSA-PSS"]:var n,a,o;if(void 0===(n=s[r.signatureParameters.mgf.hash.algorithmOid])||void 0===i.md[n])throw(o=new Error("Unsupported MGF hash function.")).oid=r.signatureParameters.mgf.hash.algorithmOid,o.name=n,o;if(void 0===(a=s[r.signatureParameters.mgf.algorithmOid])||void 0===i.mgf[a])throw(o=new Error("Unsupported MGF function.")).oid=r.signatureParameters.mgf.algorithmOid,o.name=a,o;if(a=i.mgf[a].create(i.md[n].create()),void 0===(n=s[r.signatureParameters.hash.algorithmOid])||void 0===i.md[n])throw(o=new Error("Unsupported RSASSA-PSS hash function.")).oid=r.signatureParameters.hash.algorithmOid,o.name=n,o;e=i.pss.create(i.md[n].create(),a,r.signatureParameters.saltLength)}return r.publicKey.verify(t.md.digest().getBytes(),t.signature,e)};function m(t){for(var e,r,n=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),o=t.attributes,s=0;s<o.length;++s){var u=(e=o[s]).value,c=a.Type.PRINTABLESTRING;"valueTagClass"in e&&(c=e.valueTagClass)===a.Type.UTF8&&(u=i.util.encodeUtf8(u)),r=a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.type).getBytes()),a.create(a.Class.UNIVERSAL,c,!1,u)])]),n.value.push(r)}return n}function E(t){for(var e,r=0;r<t.length;++r){if(void 0===(e=t[r]).name&&(e.type&&e.type in o.oids?e.name=o.oids[e.type]:e.shortName&&e.shortName in u&&(e.name=o.oids[u[e.shortName]])),void 0===e.type){if(!e.name||!(e.name in o.oids))throw(i=new Error("Attribute type not specified.")).attribute=e,i;e.type=o.oids[e.name]}if(void 0===e.shortName&&e.name&&e.name in u&&(e.shortName=u[e.name]),e.type===s.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=a.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var n=0;n<e.extensions.length;++n)e.value.push(o.certificateExtensionToAsn1(C(e.extensions[n])))}var i;if(void 0===e.value)throw(i=new Error("Attribute value not specified.")).attribute=e,i}}function C(t,e){if(e=e||{},void 0===t.name&&t.id&&t.id in o.oids&&(t.name=o.oids[t.id]),void 0===t.id){if(!t.name||!(t.name in o.oids))throw(b=new Error("Extension ID not specified.")).extension=t,b;t.id=o.oids[t.name]}if(void 0!==t.value)return t;if("keyUsage"===t.name){var r=0,n=0,u=0;t.digitalSignature&&(n|=128,r=7),t.nonRepudiation&&(n|=64,r=6),t.keyEncipherment&&(n|=32,r=5),t.dataEncipherment&&(n|=16,r=4),t.keyAgreement&&(n|=8,r=3),t.keyCertSign&&(n|=4,r=2),t.cRLSign&&(n|=2,r=1),t.encipherOnly&&(n|=1,r=0),t.decipherOnly&&(u|=128,r=7);var c=String.fromCharCode(r);0!==u?c+=String.fromCharCode(n)+String.fromCharCode(u):0!==n&&(c+=String.fromCharCode(n)),t.value=a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,c)}else if("basicConstraints"===t.name)t.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),t.cA&&t.value.value.push(a.create(a.Class.UNIVERSAL,a.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in t&&t.value.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.pathLenConstraint).getBytes()));else if("extKeyUsage"===t.name){t.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);var l=t.value.value;for(var f in t)!0===t[f]&&(f in s?l.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s[f]).getBytes())):-1!==f.indexOf(".")&&l.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(f).getBytes())))}else if("nsCertType"===t.name)r=0,n=0,t.client&&(n|=128,r=7),t.server&&(n|=64,r=6),t.email&&(n|=32,r=5),t.objsign&&(n|=16,r=4),t.reserved&&(n|=8,r=3),t.sslCA&&(n|=4,r=2),t.emailCA&&(n|=2,r=1),t.objCA&&(n|=1,r=0),c=String.fromCharCode(r),0!==n&&(c+=String.fromCharCode(n)),t.value=a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,c);else if("subjectAltName"===t.name||"issuerAltName"===t.name){t.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);for(var h=0;h<t.altNames.length;++h){if(c=(v=t.altNames[h]).value,7===v.type&&v.ip){if(null===(c=i.util.bytesFromIP(v.ip)))throw(b=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=t,b}else 8===v.type&&(c=v.oid?a.oidToDer(a.oidToDer(v.oid)):a.oidToDer(c));t.value.value.push(a.create(a.Class.CONTEXT_SPECIFIC,v.type,!1,c))}}else if("nsComment"===t.name&&e.cert){if(!/^[\x00-\x7F]*$/.test(t.comment)||t.comment.length<1||t.comment.length>128)throw new Error('Invalid "nsComment" content.');t.value=a.create(a.Class.UNIVERSAL,a.Type.IA5STRING,!1,t.comment)}else if("subjectKeyIdentifier"===t.name&&e.cert){var p=e.cert.generateSubjectKeyIdentifier();t.subjectKeyIdentifier=p.toHex(),t.value=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,p.getBytes())}else if("authorityKeyIdentifier"===t.name&&e.cert){if(t.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),l=t.value.value,t.keyIdentifier){var d=!0===t.keyIdentifier?e.cert.generateSubjectKeyIdentifier().getBytes():t.keyIdentifier;l.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!1,d))}if(t.authorityCertIssuer){var y=[a.create(a.Class.CONTEXT_SPECIFIC,4,!0,[m(!0===t.authorityCertIssuer?e.cert.issuer:t.authorityCertIssuer)])];l.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,y))}if(t.serialNumber){var g=i.util.hexToBytes(!0===t.serialNumber?e.cert.serialNumber:t.serialNumber);l.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if("cRLDistributionPoints"===t.name){t.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),l=t.value.value;var v,E=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),C=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[]);for(h=0;h<t.altNames.length;++h){if(c=(v=t.altNames[h]).value,7===v.type&&v.ip){if(null===(c=i.util.bytesFromIP(v.ip)))throw(b=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=t,b}else 8===v.type&&(c=v.oid?a.oidToDer(a.oidToDer(v.oid)):a.oidToDer(c));C.value.push(a.create(a.Class.CONTEXT_SPECIFIC,v.type,!1,c))}E.value.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[C])),l.push(E)}var b;if(void 0===t.value)throw(b=new Error("Extension value not specified.")).extension=t,b;return t}function b(t,e){if(t===s["RSASSA-PSS"]){var r=[];return void 0!==e.hash.algorithmOid&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.hash.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])])),void 0!==e.mgf.algorithmOid&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.mgf.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.mgf.hash.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])])])),void 0!==e.saltLength&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.saltLength).getBytes())])),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,r)}return a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")}function S(t){var e=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===t.attributes.length)return e;for(var r=t.attributes,n=0;n<r.length;++n){var o=r[n],s=o.value,u=a.Type.UTF8;"valueTagClass"in o&&(u=o.valueTagClass),u===a.Type.UTF8&&(s=i.util.encodeUtf8(s));var c=!1;"valueConstructed"in o&&(c=o.valueConstructed);var l=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.type).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,u,c,s)])]);e.value.push(l)}return e}o.certificateFromPem=function(t,e,r){var n=i.pem.decode(t)[0];if("CERTIFICATE"!==n.type&&"X509 CERTIFICATE"!==n.type&&"TRUSTED CERTIFICATE"!==n.type){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=n.type,s}if(n.procType&&"ENCRYPTED"===n.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=a.fromDer(n.body,r);return o.certificateFromAsn1(u,e)},o.certificateToPem=function(t,e){var r={type:"CERTIFICATE",body:a.toDer(o.certificateToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},o.publicKeyFromPem=function(t){var e=i.pem.decode(t)[0];if("PUBLIC KEY"!==e.type&&"RSA PUBLIC KEY"!==e.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=a.fromDer(e.body);return o.publicKeyFromAsn1(n)},o.publicKeyToPem=function(t,e){var r={type:"PUBLIC KEY",body:a.toDer(o.publicKeyToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},o.publicKeyToRSAPublicKeyPem=function(t,e){var r={type:"RSA PUBLIC KEY",body:a.toDer(o.publicKeyToRSAPublicKey(t)).getBytes()};return i.pem.encode(r,{maxline:e})},o.getPublicKeyFingerprint=function(t,e){var r,n=(e=e||{}).md||i.md.sha1.create();switch(e.type||"RSAPublicKey"){case"RSAPublicKey":r=a.toDer(o.publicKeyToRSAPublicKey(t)).getBytes();break;case"SubjectPublicKeyInfo":r=a.toDer(o.publicKeyToAsn1(t)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+e.type+'".')}n.start(),n.update(r);var s=n.digest();if("hex"===e.encoding){var u=s.toHex();return e.delimiter?u.match(/.{2}/g).join(e.delimiter):u}if("binary"===e.encoding)return s.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".');return s},o.certificationRequestFromPem=function(t,e,r){var n=i.pem.decode(t)[0];if("CERTIFICATE REQUEST"!==n.type){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=n.type,s}if(n.procType&&"ENCRYPTED"===n.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var u=a.fromDer(n.body,r);return o.certificationRequestFromAsn1(u,e)},o.certificationRequestToPem=function(t,e){var r={type:"CERTIFICATE REQUEST",body:a.toDer(o.certificationRequestToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},o.createCertificate=function(){var t={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return t.siginfo.algorithmOid=null,t.validity={},t.validity.notBefore=new Date,t.validity.notAfter=new Date,t.issuer={},t.issuer.getField=function(e){return d(t.issuer,e)},t.issuer.addField=function(e){E([e]),t.issuer.attributes.push(e)},t.issuer.attributes=[],t.issuer.hash=null,t.subject={},t.subject.getField=function(e){return d(t.subject,e)},t.subject.addField=function(e){E([e]),t.subject.attributes.push(e)},t.subject.attributes=[],t.subject.hash=null,t.extensions=[],t.publicKey=null,t.md=null,t.setSubject=function(e,r){E(e),t.subject.attributes=e,delete t.subject.uniqueId,r&&(t.subject.uniqueId=r),t.subject.hash=null},t.setIssuer=function(e,r){E(e),t.issuer.attributes=e,delete t.issuer.uniqueId,r&&(t.issuer.uniqueId=r),t.issuer.hash=null},t.setExtensions=function(e){for(var r=0;r<e.length;++r)C(e[r],{cert:t});t.extensions=e},t.getExtension=function(e){"string"==typeof e&&(e={name:e});for(var r,n=null,i=0;null===n&&i<t.extensions.length;++i)r=t.extensions[i],(e.id&&r.id===e.id||e.name&&r.name===e.name)&&(n=r);return n},t.sign=function(e,r){t.md=r||i.md.sha1.create();var n=s[t.md.algorithm+"WithRSAEncryption"];if(!n){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw u.algorithm=t.md.algorithm,u}t.signatureOid=t.siginfo.algorithmOid=n,t.tbsCertificate=o.getTBSCertificate(t);var c=a.toDer(t.tbsCertificate);t.md.update(c.getBytes()),t.signature=e.sign(t.md)},t.verify=function(e){var r=!1;if(!t.issued(e)){var n=e.issuer,i=t.subject,s=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw s.expectedIssuer=i.attributes,s.actualIssuer=n.attributes,s}var u=e.md;if(null===u){u=g({signatureOid:e.signatureOid,type:"certificate"});var c=e.tbsCertificate||o.getTBSCertificate(e),l=a.toDer(c);u.update(l.getBytes())}return null!==u&&(r=v({certificate:t,md:u,signature:e.signature})),r},t.isIssuer=function(e){var r=!1,n=t.issuer,i=e.subject;if(n.hash&&i.hash)r=n.hash===i.hash;else if(n.attributes.length===i.attributes.length){var a,o;r=!0;for(var s=0;r&&s<n.attributes.length;++s)a=n.attributes[s],o=i.attributes[s],a.type===o.type&&a.value===o.value||(r=!1)}return r},t.issued=function(e){return e.isIssuer(t)},t.generateSubjectKeyIdentifier=function(){return o.getPublicKeyFingerprint(t.publicKey,{type:"RSAPublicKey"})},t.verifySubjectKeyIdentifier=function(){for(var e=s.subjectKeyIdentifier,r=0;r<t.extensions.length;++r){var n=t.extensions[r];if(n.id===e){var a=t.generateSubjectKeyIdentifier().getBytes();return i.util.hexToBytes(n.subjectKeyIdentifier)===a}}return!1},t},o.certificateFromAsn1=function(t,e){var r={},n=[];if(!a.validate(t,l,r,n)){var s=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw s.errors=n,s}if(a.derToOid(r.publicKeyOid)!==o.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=o.createCertificate();u.version=r.certVersion?r.certVersion.charCodeAt(0):0;var c=i.util.createBuffer(r.certSerialNumber);u.serialNumber=c.toHex(),u.signatureOid=i.asn1.derToOid(r.certSignatureOid),u.signatureParameters=y(u.signatureOid,r.certSignatureParams,!0),u.siginfo.algorithmOid=i.asn1.derToOid(r.certinfoSignatureOid),u.siginfo.parameters=y(u.siginfo.algorithmOid,r.certinfoSignatureParams,!1),u.signature=r.certSignature;var f=[];if(void 0!==r.certValidity1UTCTime&&f.push(a.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&f.push(a.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&f.push(a.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&f.push(a.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=f[0],u.validity.notAfter=f[1],u.tbsCertificate=r.tbsCertificate,e){u.md=g({signatureOid:u.signatureOid,type:"certificate"});var h=a.toDer(u.tbsCertificate);u.md.update(h.getBytes())}var p=i.md.sha1.create(),v=a.toDer(r.certIssuer);p.update(v.getBytes()),u.issuer.getField=function(t){return d(u.issuer,t)},u.issuer.addField=function(t){E([t]),u.issuer.attributes.push(t)},u.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=p.digest().toHex();var m=i.md.sha1.create(),C=a.toDer(r.certSubject);return m.update(C.getBytes()),u.subject.getField=function(t){return d(u.subject,t)},u.subject.addField=function(t){E([t]),u.subject.attributes.push(t)},u.subject.attributes=o.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=m.digest().toHex(),r.certExtensions?u.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},o.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r<t.value.length;++r)for(var n=t.value[r],i=0;i<n.value.length;++i)e.push(o.certificateExtensionFromAsn1(n.value[i]));return e},o.certificateExtensionFromAsn1=function(t){var e={};if(e.id=a.derToOid(t.value[0].value),e.critical=!1,t.value[1].type===a.Type.BOOLEAN?(e.critical=0!==t.value[1].value.charCodeAt(0),e.value=t.value[2].value):e.value=t.value[1].value,e.id in s)if(e.name=s[e.id],"keyUsage"===e.name){var r=0,n=0;(u=a.fromDer(e.value)).value.length>1&&(r=u.value.charCodeAt(1),n=u.value.length>2?u.value.charCodeAt(2):0),e.digitalSignature=!(128&~r),e.nonRepudiation=!(64&~r),e.keyEncipherment=!(32&~r),e.dataEncipherment=!(16&~r),e.keyAgreement=!(8&~r),e.keyCertSign=!(4&~r),e.cRLSign=!(2&~r),e.encipherOnly=!(1&~r),e.decipherOnly=!(128&~n)}else if("basicConstraints"===e.name){(u=a.fromDer(e.value)).value.length>0&&u.value[0].type===a.Type.BOOLEAN?e.cA=0!==u.value[0].value.charCodeAt(0):e.cA=!1;var o=null;u.value.length>0&&u.value[0].type===a.Type.INTEGER?o=u.value[0].value:u.value.length>1&&(o=u.value[1].value),null!==o&&(e.pathLenConstraint=a.derToInteger(o))}else if("extKeyUsage"===e.name)for(var u=a.fromDer(e.value),c=0;c<u.value.length;++c){var l=a.derToOid(u.value[c].value);l in s?e[s[l]]=!0:e[l]=!0}else if("nsCertType"===e.name)r=0,(u=a.fromDer(e.value)).value.length>1&&(r=u.value.charCodeAt(1)),e.client=!(128&~r),e.server=!(64&~r),e.email=!(32&~r),e.objsign=!(16&~r),e.reserved=!(8&~r),e.sslCA=!(4&~r),e.emailCA=!(2&~r),e.objCA=!(1&~r);else if("subjectAltName"===e.name||"issuerAltName"===e.name){var f;e.altNames=[],u=a.fromDer(e.value);for(var h=0;h<u.value.length;++h){var p={type:(f=u.value[h]).type,value:f.value};switch(e.altNames.push(p),f.type){case 1:case 2:case 6:break;case 7:p.ip=i.util.bytesToIP(f.value);break;case 8:p.oid=a.derToOid(f.value)}}}else"subjectKeyIdentifier"===e.name&&(u=a.fromDer(e.value),e.subjectKeyIdentifier=i.util.bytesToHex(u.value));return e},o.certificationRequestFromAsn1=function(t,e){var r={},n=[];if(!a.validate(t,p,r,n)){var s=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw s.errors=n,s}if(a.derToOid(r.publicKeyOid)!==o.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=o.createCertificationRequest();if(u.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,u.signatureOid=i.asn1.derToOid(r.csrSignatureOid),u.signatureParameters=y(u.signatureOid,r.csrSignatureParams,!0),u.siginfo.algorithmOid=i.asn1.derToOid(r.csrSignatureOid),u.siginfo.parameters=y(u.siginfo.algorithmOid,r.csrSignatureParams,!1),u.signature=r.csrSignature,u.certificationRequestInfo=r.certificationRequestInfo,e){u.md=g({signatureOid:u.signatureOid,type:"certification request"});var c=a.toDer(u.certificationRequestInfo);u.md.update(c.getBytes())}var l=i.md.sha1.create();return u.subject.getField=function(t){return d(u.subject,t)},u.subject.addField=function(t){E([t]),u.subject.attributes.push(t)},u.subject.attributes=o.RDNAttributesAsArray(r.certificationRequestInfoSubject,l),u.subject.hash=l.digest().toHex(),u.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),u.getAttribute=function(t){return d(u,t)},u.addAttribute=function(t){E([t]),u.attributes.push(t)},u.attributes=o.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),u},o.createCertificationRequest=function(){var t={version:0,signatureOid:null,signature:null,siginfo:{}};return t.siginfo.algorithmOid=null,t.subject={},t.subject.getField=function(e){return d(t.subject,e)},t.subject.addField=function(e){E([e]),t.subject.attributes.push(e)},t.subject.attributes=[],t.subject.hash=null,t.publicKey=null,t.attributes=[],t.getAttribute=function(e){return d(t,e)},t.addAttribute=function(e){E([e]),t.attributes.push(e)},t.md=null,t.setSubject=function(e){E(e),t.subject.attributes=e,t.subject.hash=null},t.setAttributes=function(e){E(e),t.attributes=e},t.sign=function(e,r){t.md=r||i.md.sha1.create();var n=s[t.md.algorithm+"WithRSAEncryption"];if(!n){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw u.algorithm=t.md.algorithm,u}t.signatureOid=t.siginfo.algorithmOid=n,t.certificationRequestInfo=o.getCertificationRequestInfo(t);var c=a.toDer(t.certificationRequestInfo);t.md.update(c.getBytes()),t.signature=e.sign(t.md)},t.verify=function(){var e=!1,r=t.md;if(null===r){r=g({signatureOid:t.signatureOid,type:"certification request"});var n=t.certificationRequestInfo||o.getCertificationRequestInfo(t),i=a.toDer(n);r.update(i.getBytes())}return null!==r&&(e=v({certificate:t,md:r,signature:t.signature})),e},t};var w=new Date("1950-01-01T00:00:00Z"),A=new Date("2050-01-01T00:00:00Z");function T(t){return t>=w&&t<A?a.create(a.Class.UNIVERSAL,a.Type.UTCTIME,!1,a.dateToUtcTime(t)):a.create(a.Class.UNIVERSAL,a.Type.GENERALIZEDTIME,!1,a.dateToGeneralizedTime(t))}o.getTBSCertificate=function(t){var e=T(t.validity.notBefore),r=T(t.validity.notAfter),n=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.version).getBytes())]),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,i.util.hexToBytes(t.serialNumber)),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.siginfo.algorithmOid).getBytes()),b(t.siginfo.algorithmOid,t.siginfo.parameters)]),m(t.issuer),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[e,r]),m(t.subject),o.publicKeyToAsn1(t.publicKey)]);return t.issuer.uniqueId&&n.value.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,[a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+t.issuer.uniqueId)])),t.subject.uniqueId&&n.value.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!0,[a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+t.subject.uniqueId)])),t.extensions.length>0&&n.value.push(o.certificateExtensionsToAsn1(t.extensions)),n},o.getCertificationRequestInfo=function(t){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.version).getBytes()),m(t.subject),o.publicKeyToAsn1(t.publicKey),S(t)])},o.distinguishedNameToAsn1=function(t){return m(t)},o.certificateToAsn1=function(t){var e=t.tbsCertificate||o.getTBSCertificate(t);return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[e,a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.signatureOid).getBytes()),b(t.signatureOid,t.signatureParameters)]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},o.certificateExtensionsToAsn1=function(t){var e=a.create(a.Class.CONTEXT_SPECIFIC,3,!0,[]),r=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);e.value.push(r);for(var n=0;n<t.length;++n)r.value.push(o.certificateExtensionToAsn1(t[n]));return e},o.certificateExtensionToAsn1=function(t){var e=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);e.value.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.id).getBytes())),t.critical&&e.value.push(a.create(a.Class.UNIVERSAL,a.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=t.value;return"string"!=typeof t.value&&(r=a.toDer(r).getBytes()),e.value.push(a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,r)),e},o.certificationRequestToAsn1=function(t){var e=t.certificationRequestInfo||o.getCertificationRequestInfo(t);return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[e,a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.signatureOid).getBytes()),b(t.signatureOid,t.signatureParameters)]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},o.createCaStore=function(t){var e={certs:{}};function r(t){return n(t),e.certs[t.hash]||null}function n(t){if(!t.hash){var e=i.md.sha1.create();t.attributes=o.RDNAttributesAsArray(m(t),e),t.hash=e.digest().toHex()}}if(e.getIssuer=function(t){return r(t.issuer)},e.addCertificate=function(t){if("string"==typeof t&&(t=i.pki.certificateFromPem(t)),n(t.subject),!e.hasCertificate(t))if(t.subject.hash in e.certs){var r=e.certs[t.subject.hash];i.util.isArray(r)||(r=[r]),r.push(t),e.certs[t.subject.hash]=r}else e.certs[t.subject.hash]=t},e.hasCertificate=function(t){"string"==typeof t&&(t=i.pki.certificateFromPem(t));var e=r(t.subject);if(!e)return!1;i.util.isArray(e)||(e=[e]);for(var n=a.toDer(o.certificateToAsn1(t)).getBytes(),s=0;s<e.length;++s)if(n===a.toDer(o.certificateToAsn1(e[s])).getBytes())return!0;return!1},e.listAllCertificates=function(){var t=[];for(var r in e.certs)if(e.certs.hasOwnProperty(r)){var n=e.certs[r];if(i.util.isArray(n))for(var a=0;a<n.length;++a)t.push(n[a]);else t.push(n)}return t},e.removeCertificate=function(t){var s;if("string"==typeof t&&(t=i.pki.certificateFromPem(t)),n(t.subject),!e.hasCertificate(t))return null;var u=r(t.subject);if(!i.util.isArray(u))return s=e.certs[t.subject.hash],delete e.certs[t.subject.hash],s;for(var c=a.toDer(o.certificateToAsn1(t)).getBytes(),l=0;l<u.length;++l)c===a.toDer(o.certificateToAsn1(u[l])).getBytes()&&(s=u[l],u.splice(l,1));return 0===u.length&&delete e.certs[t.subject.hash],s},t)for(var s=0;s<t.length;++s){var u=t[s];e.addCertificate(u)}return e},o.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},o.verifyCertificateChain=function(t,e,r){"function"==typeof r&&(r={verify:r}),r=r||{};var a=(e=e.slice(0)).slice(0),s=r.validityCheckDate;void 0===s&&(s=new Date);var u=!0,c=null,l=0;do{var f=e.shift(),h=null,p=!1;if(s&&(s<f.validity.notBefore||s>f.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:s}),null===c){if(null===(h=e[0]||t.getIssuer(f))&&f.isIssuer(f)&&(p=!0,h=f),h){var d=h;i.util.isArray(d)||(d=[d]);for(var y=!1;!y&&d.length>0;){h=d.shift();try{y=h.verify(f)}catch(t){}}y||(c={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==c||h&&!p||t.hasCertificate(f)||(c={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===c&&h&&!f.isIssuer(h)&&(c={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===c)for(var g={keyUsage:!0,basicConstraints:!0},v=0;null===c&&v<f.extensions.length;++v){var m=f.extensions[v];m.critical&&!(m.name in g)&&(c={message:"Certificate has an unsupported critical extension.",error:o.certificateError.unsupported_certificate})}if(null===c&&(!u||0===e.length&&(!h||p))){var E=f.getExtension("basicConstraints"),C=f.getExtension("keyUsage");null!==C&&(C.keyCertSign&&null!==E||(c={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:o.certificateError.bad_certificate})),null!==c||null===E||E.cA||(c={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:o.certificateError.bad_certificate}),null===c&&null!==C&&"pathLenConstraint"in E&&l-1>E.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var b=null===c||c.error,S=r.verify?r.verify(b,l,a):b;if(!0!==S)throw!0===b&&(c={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(S||0===S)&&("object"!==n(S)||i.util.isArray(S)?"string"==typeof S&&(c.error=S):(S.message&&(c.message=S.message),S.error&&(c.error=S.error))),c;c=null,u=!1,++l}while(e.length>0);return!0}},711:(t,e,r)=>{"use strict";var n=r(1933),i=r(1061),a=r(6486),o=r(9943),s=r(2926),u=r(246);function c(t){if(16!==t.length)throw new Error("invalid iv")}function l(t){return n.setupFallback((function(e,r,i){try{c(i)}catch(t){return Promise.reject(t)}var a=Promise.resolve(r);return a=a.then((function(r){var a="AES-"+t+"-CBC",o=n.nodeCrypto.createCipheriv(a,e,i);return Buffer.concat([o.update(r),o.final()])})),a}),(function(t,e,r){try{c(r)}catch(t){return Promise.reject(t)}var i=Promise.resolve();return(i=(i=i.then((function(){return n.subtleCrypto.importKey("raw",t,{name:"AES-CBC"},!0,["encrypt"])}))).then((function(t){var i={name:"AES-CBC",iv:r};return n.subtleCrypto.encrypt(i,t,e)}))).then((function(t){return Buffer.from(t)}))}),(function(t,e,r){try{c(r)}catch(t){return Promise.reject(t)}var n=Promise.resolve();return n.then((function(){var n=o.cipher.createCipher("AES-CBC",new s(t));return n.start({iv:new s(r)}),n.update(new s(e)),n.finish()?Buffer.from(n.output.bytes(),"binary"):Promise.reject(new Error("encryption failed"))}))}))}function f(t){return n.setupFallback((function(e,r,i){try{c(i)}catch(t){return Promise.reject(t)}var a=Promise.resolve();return a.then((function(){var a="AES-"+t+"-CBC",o=n.nodeCrypto.createDecipheriv(a,e,i);return Buffer.concat([o.update(r),o.final()])}))}),(function(t,e,r){try{c(r)}catch(t){return Promise.reject(t)}var i=Promise.resolve();return(i=(i=i.then((function(){return n.subtleCrypto.importKey("raw",t,{name:"AES-CBC"},!0,["decrypt"])}))).then((function(t){var i={name:"AES-CBC",iv:r};return n.subtleCrypto.decrypt(i,t,e)}))).then((function(t){return Buffer.from(t)}))}),(function(t,e,r){try{c(r)}catch(t){return Promise.reject(t)}var n=Promise.resolve();return n.then((function(){var n=o.cipher.createDecipher("AES-CBC",new s(t));return n.start({iv:new s(r)}),n.update(new s(e)),n.finish()?Buffer.from(n.output.bytes(),"binary"):Promise.reject(new Error("encryption failed"))}))}))}function h(t,e){if(e<<1!=t.length<<3)throw new Error("invalid encryption key size")}function p(t){var e=l(t);return function(r,a,o){try{h(r,t)}catch(t){return Promise.reject(t)}var s=r.slice(t/8),u=r.slice(0,t/8),c=o.iv||Buffer.alloc(0),l=o.aad||o.adata||Buffer.alloc(0),f=e(s,a,c);return f.then((function(e){var r=Buffer.concat([l,c,e,n.int64ToBuffer(8*l.length)]);return i["HS"+2*t].sign(u,r,{length:t}).then((function(r){var n=r.mac.slice(0,t/8);return{data:e,tag:n}}))}))}}function d(t){var e=f(t);return function(r,a,o){try{h(r,t)}catch(t){return Promise.reject(t)}var s=r.slice(t/8),u=r.slice(0,t/8),c=o.iv||Buffer.alloc(0),l=o.aad||o.adata||Buffer.alloc(0),f=o.tag||o.mac||Buffer.alloc(0),p=Promise.resolve();return(p=p.then((function(){var e=Buffer.concat([l,c,a,n.int64ToBuffer(8*l.length)]);return i["HS"+2*t].verify(u,e,f,{length:t}).then((function(){return a}),(function(){throw new Error("mac check failed")}))}))).then((function(){return e(s,a,c)}))}}var y=Buffer.from("Encryption","utf8"),g=Buffer.from("Integrity","utf8"),v=Buffer.from(".","utf8");function m(t,e,r,i){var o=8*t.length,s=o/2,u=Promise.resolve();return u=(u=u.then((function(){return Buffer.concat([n.int32ToBuffer(1),t,n.int32ToBuffer(s),Buffer.from(e,"utf8"),r,i,y])}))).then((function(t){return a["SHA-"+o].digest(t).then((function(t){return t.slice(0,s/8)}))})),Promise.resolve(u)}function E(t,e,r,i){var o=8*t.length,s=o,u=Promise.resolve();return u=(u=u.then((function(){return Buffer.concat([n.int32ToBuffer(1),t,n.int32ToBuffer(s),Buffer.from(e,"utf8"),r,i,g])}))).then((function(t){return a["SHA-"+o].digest(t).then((function(t){return t.slice(0,s/8)}))})),Promise.resolve(u)}function C(t,e){var r=l(t);return function(a,o,s){var c,l,f=s.epu||n.int32ToBuffer(0),h=s.epv||n.int32ToBuffer(0),p=s.iv||Buffer.alloc(0),d=s.aad||s.adata||Buffer.alloc(0),y=s.kdata||Buffer.alloc(0),g=[m(a,e,f,h),E(a,e,f,h)],C=Promise.all(g).then((function(t){c=t[0],l=t[1]}));return(C=(C=C.then((function(){return r(c,o,p)}))).then((function(e){var r=Buffer.concat([d,v,Buffer.from(y),v,Buffer.from(u.base64url.encode(p),"utf8"),v,Buffer.from(u.base64url.encode(e),"utf8")]);return Promise.all([Promise.resolve(e),i["HS"+2*t].sign(l,r,{length:t})])}))).then((function(t){return{data:t[0],tag:t[1].mac}}))}}function b(t,e){var r=f(t);return function(a,o,s){var c,l,f=s.epu||n.int32ToBuffer(0),h=s.epv||n.int32ToBuffer(0),p=s.iv||Buffer.alloc(0),d=s.aad||s.adata||Buffer.alloc(0),y=s.kdata||Buffer.alloc(0),g=s.tag||s.mac||Buffer.alloc(0),C=[m(a,e,f,h),E(a,e,f,h)],b=Promise.all(C).then((function(t){c=t[0],l=t[1]}));return(b=b.then((function(){var e=Buffer.concat([d,v,Buffer.from(y),v,Buffer.from(u.base64url.encode(p),"utf8"),v,Buffer.from(u.base64url.encode(o),"utf8")]);try{return i["HS"+2*t].verify(l,e,g,{loose:!1})}catch(t){throw new Error("mac check failed")}}))).then((function(){return r(c,o,p)}))}}var S={};["A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"].forEach((function(t){var e=parseInt(/A(\d+)CBC-HS(\d+)?/g.exec(t)[1]);S[t]={encrypt:p(e),decrypt:d(e)}})),["A128CBC+HS256","A192CBC+HS384","A256CBC+HS512"].forEach((function(t){var e=parseInt(/A(\d+)CBC\+HS(\d+)?/g.exec(t)[1]);S[t]={encrypt:C(e,t),decrypt:b(e,t)}})),t.exports=S},4915:(t,e,r)=>{"use strict";var n=r(1933),i=r(246),a=r(2293),o=r(1496);function s(t,e){function r(r,n){if(t!==r.length<<3)throw new Error("invalid key size");if(!n&&!e)throw new Error("invalid iv");if(n&&12!==n.length)throw new Error("invalid iv")}function s(t){if(e){var r=i.base64url.encode(t.iv),n=i.base64url.encode(t.tag);t={data:t.data,header:{iv:r,tag:n}}}return t}return n.setupFallback((function(t,e,a){var o=a.iv,u=a.aad||a.adata||Buffer.alloc(0);try{r(t,o)}catch(t){return Promise.reject(t)}o=o||i.randomBytes(12);var c,l="aes-"+8*t.length+"-gcm";try{c=n.nodeCrypto.createCipheriv(l,t,o)}catch(t){throw new Error("unsupported algorithm: "+l)}if("function"!=typeof c.setAAD)throw new Error("unsupported algorithm: "+l);return u.length&&c.setAAD(u),s({data:Buffer.concat([c.update(e),c.final()]),iv:o,tag:c.getAuthTag()})}),(function(t,e,a){var o=a.iv,u=a.aad||a.adata||Buffer.alloc(0);try{r(t,o)}catch(t){return Promise.reject(t)}o=o||i.randomBytes(12);var c={name:"AES-GCM"};return n.subtleCrypto.importKey("raw",t,c,!0,["encrypt"]).then((function(t){return c.iv=o,c.tagLength=128,u.length&&(c.additionalData=u),n.subtleCrypto.encrypt(c,t,e)})).then((function(t){var e=t.byteLength-16,r=t.slice(e);r=Buffer.from(r);var n=t.slice(0,e);return s({data:n=Buffer.from(n),iv:o,tag:r})}))}),(function(t,e,n){var u,c,l=n.iv,f=n.aad||n.adata||Buffer.alloc(0);try{r(t,l)}catch(t){return Promise.reject(t)}return l=l||i.randomBytes(12),u=o.createCipher({key:t,iv:l,additionalData:f}),c=Buffer.alloc(e.length),new Promise((function(t,r){var n=a.CHUNK_SIZE,i=0,o=0;!function a(){var f=Math.min(n,e.length-o);if(i+=u.update(e,o,f,c,i),o+=f,e.length>o)setTimeout(a,0);else if((i+=u.finish(c,i))===e.length){var h=u.tag;t(s({data:c,iv:l,tag:h}))}else r(new Error("encryption failed"))}()}))}))}function u(t){function e(e,r,n){if(t!==e.length<<3)throw new Error("invalid key size");if(12!==r.length)throw new Error("invalid iv");if(16!==n.length)throw new Error("invalid tag length")}return n.setupFallback((function(t,r,i){var a=i.aad||i.adata||Buffer.alloc(0),o=i.iv||Buffer.alloc(0),s=i.tag||i.mac||Buffer.alloc(0);try{e(t,o,s)}catch(t){return Promise.reject(t)}var u,c="aes-"+8*t.length+"-gcm";try{u=n.nodeCrypto.createDecipheriv(c,t,o)}catch(t){throw new Error("unsupported algorithm: "+c)}if("function"!=typeof u.setAAD)throw new Error("unsupported algorithm: "+c);u.setAuthTag(s),a.length&&u.setAAD(a);try{return Buffer.concat([u.update(r),u.final()])}catch(t){throw new Error("decryption failed")}}),(function(t,r,i){var a=i.aad||i.adata||Buffer.alloc(0),o=i.iv||Buffer.alloc(0),s=i.tag||i.mac||Buffer.alloc(0);try{e(t,o,s)}catch(t){return Promise.reject(t)}var u={name:"AES-GCM"};return n.subtleCrypto.importKey("raw",t,u,!0,["decrypt"]).then((function(t){return u.iv=o,u.tagLength=128,a.length&&(u.additionalData=a),r=Buffer.concat([r,s],r.length+s.length),n.subtleCrypto.decrypt(u,t,r)})).then((function(t){return Buffer.from(t)}))}),(function(t,r,n){var i,s,u=n.aad||n.adata||Buffer.alloc(0),c=n.iv||Buffer.alloc(0),l=n.tag||n.mac||Buffer.alloc(0);try{e(t,c,l)}catch(t){return Promise.reject(t)}return i=o.createDecipher({key:t,iv:c,additionalData:u,tag:l}),s=Buffer.alloc(r.length),new Promise((function(t,e){var n=a.CHUNK_SIZE,o=0,u=0;!function a(){var c=Math.min(n,r.length-u);if(o+=i.update(r,u,c,s,o),u+=c,r.length>u)setTimeout(a,0);else{try{o+=i.finish(s,o)}catch(t){return void e(new Error("decryption failed"))}o===r.length?t(s):e(new Error("decryption failed"))}}()}))}))}var c={};["A128GCM","A192GCM","A256GCM","A128GCMKW","A192GCMKW","A256GCMKW"].forEach((function(t){var e=/A(\d+)GCM(KW)?/g.exec(t),r=parseInt(e[1]),n="KW"===e[2];c[t]={encrypt:s(r,n),decrypt:u(r)}})),t.exports=c},5714:(t,e,r)=>{"use strict";var n=r(1933),i=r(9943),a=r(2926),o=Buffer.from("a6a6a6a6a6a6a6a6","hex");function s(t,e){for(var r=Math.max(t.length,e.length),n=Buffer.alloc(r),i=0;r>i;i++)n[i]=(t[i]||0)^(e[i]||0);return n}function u(t,e){for(var r=[],n=0;t.length>n;n+=e)r.push(t.slice(n,n+e));return r}function c(t){var e=Math.floor(t/4294967296),r=t%4294967296,n=Buffer.alloc(8);return n[0]=255&e>>>24,n[1]=255&e>>>16,n[2]=255&e>>>8,n[3]=255&e>>>0,n[4]=255&r>>>24,n[5]=255&r>>>16,n[6]=255&r>>>8,n[7]=255&r>>>0,n}function l(t){function e(e,r){if(t!==e.length<<3)throw new Error("invalid key size");if(0<r.length&&0!=r.length%8)throw new Error("invalid data length")}return n.setupFallback((function(r,i){try{e(r,i)}catch(t){return Promise.reject(t)}var a,l,f,h=u(i,8),p=Buffer.alloc(16);a=o;for(var d=0;6>d;d++)for(var y=0;h.length>y;y++)f=h.length*d+y+1,l=Buffer.concat([a,h[y]]),a=s((l=n.nodeCrypto.createCipheriv("AES"+t,r,p).update(l)).slice(0,8),c(f)),h[y]=l.slice(8,16);h=[a].concat(h);var g=Buffer.concat(h);return Promise.resolve({data:g})}),(function(t,r){try{e(t,r)}catch(t){return Promise.reject(t)}var i={name:"AES-KW"},a=[n.subtleCrypto.importKey("raw",r,{name:"HMAC",hash:"SHA-256"},!0,["sign"]),n.subtleCrypto.importKey("raw",t,i,!0,["wrapKey"])];return(a=(a=Promise.all(a)).then((function(t){return n.subtleCrypto.wrapKey("raw",t[0],t[1],i)}))).then((function(t){return{data:t=Buffer.from(t)}}))}),(function(t,r){try{e(t,r)}catch(t){return Promise.reject(t)}var n,l,f,h=i.cipher.createCipher("AES",new a(t)),p=u(r,8);n=o;for(var d=0;6>d;d++)for(var y=0;p.length>y;y++)f=p.length*d+y+1,l=Buffer.concat([n,p[y]]),h.start(),h.update(new a(l)),h.finish(),n=s((l=Buffer.from(h.output.bytes(),"binary")).slice(0,8),c(f)),p[y]=l.slice(8,16);p=[n].concat(p);var g=Buffer.concat(p);return Promise.resolve({data:g})}))}function f(t){function e(e,r){if(t!==e.length<<3)throw new Error("invalid key size");if(0<r.length-8&&0!=r.length%8)throw new Error("invalid data length")}return n.setupFallback((function(r,i){try{e(r,i)}catch(t){return Promise.reject(t)}var a,l,f=u(i,8),h=Buffer.alloc(16);a=f[0],f=f.slice(1);for(var p=5;0<=p;--p)for(var d=f.length-1;0<=d;--d)l=s(a,c(f.length*p+d+1)),l=Buffer.concat([l,f[d],h]),a=(l=n.nodeCrypto.createDecipheriv("AES"+t,r,h).update(l)).slice(0,8),f[d]=l.slice(8,16);if(a.toString()!==o.toString())return Promise.reject(new Error("decryption failed"));var y=Buffer.concat(f);return Promise.resolve(y)}),(function(t,r){try{e(t,r)}catch(t){return Promise.reject(t)}var i={name:"AES-KW"},a=n.subtleCrypto.importKey("raw",t,i,!0,["unwrapKey"]);return a=a.then((function(t){return n.subtleCrypto.unwrapKey("raw",r,t,i,{name:"HMAC",hash:"SHA-256"},!0,["sign"])})),(a=a.then((function(t){return n.subtleCrypto.exportKey("raw",t)}))).then((function(t){return Buffer.from(t)}))}),(function(t,r){try{e(t,r)}catch(t){return Promise.reject(t)}var n,l,f=i.cipher.createDecipher("AES",new a(t)),h=u(r,8);n=h[0],h=h.slice(1);for(var p=5;0<=p;--p)for(var d=h.length-1;0<=d;--d)l=s(n,c(h.length*p+d+1)),l=Buffer.concat([l,h[d]]),f.start(),f.update(new a(l)),f.finish(),n=(l=Buffer.from(f.output.bytes(),"binary")).slice(0,8),h[d]=l.slice(8,16);if(n.toString()!==o.toString())return Promise.reject(new Error("decryption failed"));var y=Buffer.concat(h);return Promise.resolve(y)}))}var h={};["A128KW","A192KW","A256KW"].forEach((function(t){var e=parseInt(/A(\d+)KW/g.exec(t)[1]);h[t]={encrypt:l(e),decrypt:f(e)}})),t.exports=h},6774:(t,e,r)=>{"use strict";var n=r(2293),i=r(6486);function a(t){return t=t.replace("CONCAT-",""),function(e,r){var a=(r=r||{}).length,o=n.HASHLENGTH[t];if(!a)return Promise.reject(new Error("invalid key length"));if(!r.otherInfo)return Promise.reject(new Error("invalid otherInfo"));var s=r.otherInfo,u=i[t].digest,c=Math.ceil(a/o),l=0,f=[];return function t(){if(c===l++)return Buffer.concat(f).slice(0,a);var r=Buffer.alloc(4+e.length+s.length);return r.writeUInt32BE(l,0),e.copy(r,4),s.copy(r,4+e.length),u(r).then((function(e){return f.push(e),t()}))}()}}var o={};["CONCAT-SHA-1","CONCAT-SHA-256","CONCAT-SHA-384","CONCAT-SHA-512"].forEach((function(t){o[t]={derive:a(t)}})),t.exports=o},2293:t=>{"use strict";t.exports={CHUNK_SIZE:1024,HASHLENGTH:{"SHA-1":160,"SHA-256":256,"SHA-384":384,"SHA-512":512},ENCLENGTH:{"AES-128-CBC":128,"AES-192-CBC":192,"AES-256-CBC":256,"AES-128-KW":128,"AES-192-KW":192,"AES-256-KW":256},KEYLENGTH:{"A128CBC-HS256":256,"A192CBC-HS384":384,"A256CBC-HS512":512,"A128CBC+HS256":256,"A192CBC+HS384":384,"A256CBC+HS512":512,A128GCM:128,A192GCM:192,A256GCM:256,A128KW:128,A192KW:192,A256KW:256,"ECDH-ES+A128KW":128,"ECDH-ES+A192KW":192,"ECDH-ES+A256KW":256},NONCELENGTH:{"A128CBC-HS256":128,"A192CBC-HS384":128,"A256CBC-HS512":128,"A128CBC+HS256":128,"A192CBC+HS384":128,"A256CBC+HS512":128,A128GCM:96,A192GCM:96,A256GCM:96}}},1339:t=>{"use strict";var e={dir:{encrypt:function(t){return Promise.resolve({data:t,once:!0,direct:!0})},decrypt:function(t){return Promise.resolve(t)}}};t.exports=e},8223:(t,e,r)=>{"use strict";var n=r(4127),i=r(642),a=r(9943),o=r(246),s={"P-256":256,"P-384":384,"P-521":521};function u(t,e){var r=n(t);return(e?["x","y"]:["d"]).forEach((function(t){r[t]=o.asBuffer(r[t],"base64url")})),r}var c=Buffer.from([4]),l="1.2.840.10045.2.1",f="Could not extract parameters from DER signature";function h(t,e,r){for(var n=0;e+n<r&&0===t[e+n];)++n;return t[e+n]>=128&&--n,n}t.exports={convertToForge:function(t,e){var r=e?["x","y"]:["d"];return r=r.map((function(e){return new a.jsbn.BigInteger(t[e].toString("hex"),16)})),r=[t.crv].concat(r),(e?i.asPublicKey:i.asPrivateKey).apply(i,r)},convertToJWK:function(t,e){var r=n(t);return(e?["x","y"]:["x","y","d"]).forEach((function(t){r[t]=o.base64url.encode(r[t])})),delete r.key_ops,delete r.use,delete r.alg,e&&delete r.d,r},convertToObj:u,convertToBuffer:function(t,e){return t=u(t,e),e?Buffer.concat([c,t.x,t.y]):t.d},curveSize:function(t){return s[t||""]||NaN},derToConcat:function(t,e){var r=0;if(48!==t[r++])throw new Error(f);var n=t[r++];if(129===n&&(n=t[r++]),n>t.length-r)throw new Error(f);if(2!==t[r++])throw new Error(f);var i=t[r++];if(i>t.length-r-2)throw new Error(f);if(i>e+1)throw new Error(f);var a=r;if(r+=i,2!==t[r++])throw new Error(f);var o=t[r++];if(o!==t.length-r)throw new Error(f);if(o>e+1)throw new Error(f);var s=r;if((r+=o)!==t.length)throw new Error(f);var u=e-i,c=e-o,l=Buffer.alloc(u+i+c+o);for(r=0;r<u;++r)l[r]=0;var h=Math.max(-u,0);t.copy(l,r,a+h,a+i);for(var p=r=e;r<p+c;++r)l[r]=0;var d=Math.max(-c,0);return t.copy(l,r,s+d,s+o),l},concatToDer:function(t,e){var r=h(t,0,e),n=h(t,e,t.length),i=e-r,a=e-n,o=i+a+4,s=o<128,u=Buffer.alloc((s?2:3)+o),c=0;return u[c++]=48,s?u[c++]=o:(u[c++]=129,u[c++]=255&o),u[c++]=2,u[c++]=i,r<0?(u[c++]=0,c+=t.copy(u,c,0,e)):c+=t.copy(u,c,r,e),u[c++]=2,u[c++]=a,n<0?(u[c++]=0,t.copy(u,c,e)):t.copy(u,c,e+n),u},convertToPEM:function(t,e){var r,n,i,o=t.crv;return o=function(t){switch(t){case"P-256":return"1.2.840.10045.3.1.7";case"P-384":return"1.3.132.0.34";case"P-521":return"1.3.132.0.35";default:return null}}(o),o=a.asn1.oidToDer(o),e?(r="EC PRIVATE KEY",n=Buffer.concat([Buffer.from([0,4]),t.x,t.y]).toString("binary"),t=t.d.toString("binary"),i=a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.SEQUENCE,!0,[a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.INTEGER,!1,""),a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.OCTETSTRING,!1,t),a.asn1.create(a.asn1.Class.CONTEXT_SPECIFIC,0,!0,[a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.OID,!1,o.bytes())]),a.asn1.create(a.asn1.Class.CONTEXT_SPECIFIC,1,!0,[a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.BITSTRING,!1,n)])])):(r="PUBLIC KEY",t=Buffer.concat([Buffer.from([0,4]),t.x,t.y]).toString("binary"),i=a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.SEQUENCE,!0,[a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.SEQUENCE,!0,[a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.OID,!1,a.asn1.oidToDer(l).bytes()),a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.OID,!1,o.bytes())]),a.asn1.create(a.asn1.Class.UNIVERSAL,a.asn1.Type.BITSTRING,!1,t)])),i=a.asn1.toDer(i).bytes(),a.pem.encode({type:r,body:i})},EC_OID:l}},670:(t,e,r)=>{"use strict";var n=r(4350),i=r(246),a=r(8223),o=r(981),s=r(6774),u=r(5714),c=r(1933),l=r(2293),f=r(4127),h=r(2057),p=r(3601);function d(t){switch(t){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Error("unsupported curve: "+t)}}var y=t.exports={};function g(t,e,r){function n(t){return Buffer.concat([c.int32ToBuffer(t.length),t])}var a=r.algorithm||"",o=l.KEYLENGTH[a],s=i.asBuffer(r.apu||"","base64url"),u=i.asBuffer(r.apv||"","base64url"),f={public:e,length:o/8,hash:"SHA-256",otherInfo:Buffer.concat([n(Buffer.from(a,"utf8")),n(s),n(u),c.int32ToBuffer(o)])};return y["ECDH-CONCAT"].derive(t,f)}["ECDH","ECDH-HKDF","ECDH-CONCAT"].forEach((function(t){var e,r,i=/^ECDH(?:-(\w+))?$/g.exec(t||"")[1],u=y[t]=y[t]||{};switch(i||""){case"CONCAT":u.derive=function(t,e){var r;e=e||{};try{if(!(r=e.hash||d(t.crv)))throw new Error("invalid hash: "+r);r.toUpperCase()}catch(t){return Promise.reject(t)}var n=["public"];return y.ECDH.derive(t,p(e,n)).then((function(t){return s["CONCAT-"+r].derive(t,h(e,n))}))};break;case"HKDF":u.derive=function(t,e){var r;e=e||{};try{if(!(r=e.hash||d(t.crv)))throw new Error("invalid hash: "+r);r.toUpperCase()}catch(t){return Promise.reject(t)}var n=["public"];return y.ECDH.derive(t,p(e,n)).then((function(t){return o["HKDF-"+r].derive(t,h(e,n))}))};break;case"":u.derive=(e={name:"ECDH"},r=function(t,e){var r=t&&a.convertToForge(t,!0);if(!r||!r.isValid())return Promise.reject(new Error("invalid EC public key"));switch(e){case"jwk":r=a.convertToJWK(t,!0);break;case"buffer":r=a.convertToBuffer(t,!0)}return Promise.resolve(r)},c.setupFallback((function(t,e){if("function"!=typeof c.nodeCrypto.createECDH)throw new Error("unsupported algorithm: ECDH");var n,i=(e=e||{}).length||0;switch(t.crv){case"P-256":n="prime256v1";break;case"P-384":n="secp384r1";break;case"P-521":n="secp521r1";break;default:return Promise.reject(new Error("invalid curve: "+n))}var o=a.convertToBuffer(t,!1),s=r(e.public,"buffer");return s=s.then((function(t){var e=c.nodeCrypto.createECDH(n);e.setPrivateKey(o);var r=e.computeSecret(t);if(i){if(r.length<i)return Promise.reject(new Error("key length too large: "+i));r=r.slice(0,i)}return r})),s}),(function(t,i){t=t||{};var o=(i=i||{}).length||0,s=n(f(e),{namedCurve:t.crv});o||(o=t.d.length);var u=a.convertToJWK(t,!1);u=c.subtleCrypto.importKey("jwk",u,s,!1,["deriveBits"]);var l=r(i.public,"jwk");l=l.then((function(t){return c.subtleCrypto.importKey("jwk",t,s,!1,[])}));var h=Promise.all([u,l]);return h=h.then((function(t){var r=t[0],i=t[1],a=n(f(e),{public:i});return c.subtleCrypto.deriveBits(a,r,8*o)})),h.then((function(t){return Buffer.from(t)}))}),(function(t,e){var n=(e=e||{}).length||0,i=a.convertToForge(t,!1);return r(e.public,"forge").then((function(t){var e=i.computeSecret(t);if(n){if(e.length<n)return Promise.reject(new Error("key length too large: "+n));e=e.slice(0,n)}return e}))})));break;default:u.derive=null}})),["ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"].forEach((function(t){var e,r,n=/^ECDH-ES(?:\+(.+))?/g.exec(t||"")[1],i=y[t]=y[t]||{};n?(n=u[n])?(i.encrypt=(r=n.encrypt,function(t,e,n){if(!(n=n||{}).epk||!n.epk.d)return Promise.reject(new Error("missing ephemeral private key"));var i=a.convertToObj(n.epk,!1);return t&&t.x&&t.y?g(i,a.convertToObj(t,!0),{algorithm:n.alg,apu:n.apu,apv:n.apv}).then((function(t){return r(t,e)})):Promise.reject(new Error("missing static public key"))}),i.decrypt=(e=n.decrypt,function(t,r,n){if(!(n=n||{}).epk||!n.epk.x||!n.epk.y)return Promise.reject(new Error("missing ephemeral public key"));var i=a.convertToObj(n.epk,!0);return t&&t.d?g(a.convertToObj(t,!1),i,{algorithm:n.alg,apu:n.apu,apv:n.apv}).then((function(t){return e(t,r)})):Promise.reject(new Error("missing static private key"))})):i.ecrypt=i.decrypt=null:(i.encrypt=function(t,e,r){if(!(r=r||{}).epk||!r.epk.d)return Promise.reject(new Error("missing ephemeral private key"));var n=a.convertToObj(r.epk,!1);return t&&t.x&&t.y?g(n,a.convertToObj(t,!0),{algorithm:r.enc,apu:r.apu,apv:r.apv}).then((function(t){return{data:t,once:!0,direct:!0}})):Promise.reject(new Error("missing static public key"))},i.decrypt=function(t,e,r){if(!(r=r||{}).epk||!r.epk.x||!r.epk.y)return Promise.reject(new Error("missing ephemeral public key"));var n=a.convertToObj(r.epk,!0);return t&&t.d?g(a.convertToObj(t,!1),n,{algorithm:r.enc,apu:r.apu,apv:r.apv}).then((function(t){return t})):Promise.reject(new Error("missing static private key"))})}))},1292:(t,e,r)=>{"use strict";var n=r(8223),i=r(1933),a=r(6486);function o(t){switch(t){case"SHA-256":return"P-256";case"SHA-384":return"P-384";case"SHA-512":return"P-521";default:throw new Error("unsupported hash: "+t)}}function s(t){var e,r=o(t),s=t.toLowerCase().replace("-","");return i.nodeCrypto&&i.nodeCrypto.getHashes().indexOf(s)>-1&&(e=function(t,e){if(r!==t.crv)return Promise.reject(new Error("invalid curve"));var a,o;switch(a=(a=Promise.resolve(i.nodeCrypto.createSign(s))).then((function(t){return t.update(e),t})),s.slice(-3)){case"384":o=48;break;case"512":o=66;break;default:o=32}return(a=a.then((function(e){return n.derToConcat(e.sign(n.convertToPEM(t,!0)),o)}))).then((function(t){return{data:e,mac:t}}))}),i.setupFallback(e,(function(e,a){if(r!==e.crv)return Promise.reject(new Error("invalid curve"));var o,s=n.convertToJWK(e,!1),u={name:"ECDSA",namedCurve:s.crv,hash:{name:t}};return o=(o=i.subtleCrypto.importKey("jwk",s,u,!0,["sign"])).then((function(t){return i.subtleCrypto.sign(u,t,a)})),o.then((function(t){return t=Buffer.from(t),{data:a,mac:t}}))}),(function(e,i){if(r!==e.crv)return Promise.reject(new Error("invalid curve"));var o=n.convertToForge(e,!1);return a[t].digest(i).then((function(t){return t=o.sign(t),t=Buffer.concat([t.r,t.s]),{data:i,mac:t}}))}))}function u(t){var e,r=o(t),s=t.toLowerCase().replace("-","");return i.nodeCrypto&&i.nodeCrypto.getHashes().indexOf(s)>-1&&(e=function(t,e,a){if(r!==t.crv)return Promise.reject(new Error("invalid curve"));var o;switch(s.slice(-3)){case"384":o=48;break;case"512":o=66;break;default:o=32}return Promise.resolve(i.nodeCrypto.createVerify(s)).then((function(r){return r.update(e),r.end(),r.verify(n.convertToPEM(t,!1),n.concatToDer(a,o))})).then((function(t){if(!t)throw new Error("verification failed");return{data:e,mac:a,valid:!0}}))}),i.setupFallback(e,(function(e,a,o){if(r!==e.crv)return Promise.reject(new Error("invalid curve"));var s,u=n.convertToJWK(e,!0),c={name:"ECDSA",namedCurve:u.crv,hash:{name:t}};return s=(s=i.subtleCrypto.importKey("jwk",u,c,!0,["verify"])).then((function(t){return i.subtleCrypto.verify(c,t,o,a)})),s.then((function(t){return t?{data:a,mac:o,valid:!0}:Promise.reject(new Error("verification failed"))}))}),(function(e,i,o){if(r!==e.crv)return Promise.reject(new Error("invalid curve"));var s=n.convertToForge(e,!0);return a[t].digest(i).then((function(t){var e=o.length/2,r={r:o.slice(0,e),s:o.slice(e)};return s.verify(t,r)?{data:i,mac:o,valid:!0}:Promise.reject(new Error("verification failed"))}))}))}var c={};["ES256","ES384","ES512"].forEach((function(t){var e=t.replace(/ES(\d+)/g,(function(t,e){return"SHA-"+e}));c[t]={sign:s(e),verify:u(e)}})),t.exports=c},1933:(t,e,r)=>{"use strict";"undefined"==typeof Promise&&r(9658).polyfill(),e.int32ToBuffer=function(t,e){return(e=e||Buffer.alloc(4))[0]=t>>>24&255,e[1]=t>>>16&255,e[2]=t>>>8&255,e[3]=255&t,e};var n=Math.pow(2,32);e.int64ToBuffer=function(t,r){r=r||Buffer.alloc(8);var i=Math.floor(t/n),a=t%n;return i=e.int32ToBuffer(i),a=e.int32ToBuffer(a),Buffer.concat([i,a])};var i={};Object.defineProperty(e,"subtleCrypto",{get:function(){return"subtleCrypto"in i?i.subtleCrypto:i.subtleCrypto=function(){if("undefined"!=typeof crypto&&void 0!==crypto.subtle)return crypto.subtle}()},enumerable:!0}),Object.defineProperty(e,"nodeCrypto",{get:function(){return"nodeCrypto"in i?i.nodeCrypto:i.nodeCrypto=function(){var t;try{t=r(6982)}catch(t){return}if(Object.keys(t).length)return t}()},enumerable:!0}),e.setupFallback=function(t,r,n){var i;return i=t&&e.nodeCrypto?function(){var e,r=arguments;try{e=Promise.resolve(t.apply(null,r))}catch(t){e=function(t){return 0===t.message.indexOf("unsupported algorithm:")?(i=n).apply(null,r):Promise.reject(t)}(t)}return e}:r&&e.subtleCrypto?function(){var t,e=arguments;function a(t){return t.code!==DOMException.NOT_SUPPORTED_ERR&&"Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData"!==t.message&&t instanceof Error?Promise.reject(t):(i=n).apply(null,e)}try{t=(t=r.apply(null,e)).catch(a)}catch(e){t=a(e)}return t}:n,i}},981:(t,e,r)=>{"use strict";var n=r(2293),i=r(1061);function a(t){var e=t.replace("HKDF-",""),r=t.replace("HKDF-SHA-","HS");return function(t,a){var o=n.HASHLENGTH[e]/8;"string"==typeof r&&(r=i[r].sign);var s=(a=a||{}).salt;s&&0!==s.length||(s=Buffer.alloc(o));var u=a.info||Buffer.alloc(0),c=a.length||o,l=Math.ceil(c/o),f=[],h=0;function p(t,e){return l===h++?Buffer.concat(f).slice(0,c):(e||(e=Buffer.alloc(0)),e=Buffer.concat([e,u,Buffer.from([h])]),e=(e=r(t,e)).then((function(r){return e=r.mac,f.push(e),p(t,e)})))}return r(s,t,{length:8*s.length}).then((function(t){return p(t.mac)}))}}var o={};["HKDF-SHA-1","HKDF-SHA-256","HKDF-SHA-384","HKDF-SHA-512"].forEach((function(t){o[t]={derive:a(t)}})),t.exports=o},1061:(t,e,r)=>{"use strict";var n=r(2293),i=r(9943),a=r(2926),o=r(1933);function s(t){var e=t.replace("HS","SHA").toLowerCase(),r=t.replace("HS","SHA-");function a(t,e){return(t=(t||n.HASHLENGTH[r])/8)>e.length?Promise.reject(new Error("invalid key length")):Promise.resolve(e)}return o.setupFallback((function(t,r,n){var i;return i=(i=a((n=n||{}).length,t)).then((function(){var n=o.nodeCrypto.createHmac(e,t);n.update(r);var i=n.digest();return{data:r,mac:i}})),i}),(function(t,e,n){var i={name:"HMAC",hash:{name:r}};return a((n=n||{}).length,t).then((function(){return o.subtleCrypto.importKey("raw",t,i,!0,["sign"])})).then((function(t){return o.subtleCrypto.sign(i,t,e)})).then((function(t){var r=Buffer.from(t);return{data:e,mac:r}}))}),(function(t,r,n){return a((n=n||{}).length,t).then((function(){var n=i.hmac.create();return n.start(e,t.toString("binary")),n.update(r.toString("binary")),n=Buffer.from(n.digest().bytes(),"binary"),{data:r,mac:n}}))}))}function u(t){var e=t.replace("HS","SHA").toLowerCase(),r=t.replace("HS","SHA-");function s(t,e,i){t=(t||n.HASHLENGTH[r])/8;for(var a=!0,o=0;t>o;o++)a=a&&e[o]===i[o];return a}return o.setupFallback((function(t,r,n,i){i=i||{};var a=o.nodeCrypto.createHmac(e,t);a.update(r);var u=a.digest();if(!s(i.length,n,u))throw new Error("verification failed");return{data:r,mac:u,valid:!0}}),(function(t,e,n,i){var a={name:"HMAC",hash:{name:r}};return((i=i||{}).length?o.subtleCrypto.importKey("raw",t,a,!0,["sign"]).then((function(t){return o.subtleCrypto.sign(a,t,e)})).then((function(t){var e=Buffer.from(t);return s(i.length,n,e)})):o.subtleCrypto.importKey("raw",t,a,!0,["verify"]).then((function(t){return o.subtleCrypto.verify(a,t,n,e)}))).then((function(t){return t?{data:e,mac:n,valid:!0}:Promise.reject(new Error("verifaction failed"))}))}),(function(t,r,n,o){o=o||{};var u=i.hmac.create();return u.start(e,new a(t)),u.update(r.toString("binary")),u=Buffer.from(u.digest().bytes(),"binary"),s(o.length,n,u)?Promise.resolve({data:r,mac:n,valid:!0}):Promise.reject(new Error("verification failed"))}))}var c={};["HS1","HS256","HS384","HS512"].forEach((function(t){c[t]={sign:s(t),verify:u(t)}})),t.exports=c},9952:(t,e,r)=>{"use strict";var n=[r(711),r(4915),r(5714),r(6774),r(1339),r(670),r(1292),r(981),r(1061),r(9892),r(8518),r(8165),r(6486)],i={},a={},o={},s={},u={},c={};n.forEach((function(t){Object.keys(t).forEach((function(e){var r=t[e];"function"==typeof r.encrypt&&(u[e]=r.encrypt),"function"==typeof r.decrypt&&(c[e]=r.decrypt),"function"==typeof r.sign&&(o[e]=r.sign),"function"==typeof r.verify&&(s[e]=r.verify),"function"==typeof r.digest&&(i[e]=r.digest),"function"==typeof r.derive&&(a[e]=r.derive)}))})),e.digest=function(t,e,r){var n=i[t];return n?n(e,r):Promise.reject(new Error("unsupported algorithm: "+t))},e.derive=function(t,e,r){var n=a[t];return n?n(e,r):Promise.reject(new Error("unsupported algorithm: "+t))},e.sign=function(t,e,r,n){var i=o[t];return i?i(e,r,n||{}):Promise.reject(new Error("unsupported algorithm: "+t))},e.verify=function(t,e,r,n,i){var a=s[t];return a?a(e,r,n,i||{}):Promise.reject(new Error("unsupported algorithm: "+t))},e.encrypt=function(t,e,r,n){var i=u[t];return i?i(e,r,n||{}):Promise.reject(new Error("unsupported algorithm: "+t))},e.decrypt=function(t,e,r,n){var i=c[t];return i?i(e,r,n||{}):Promise.reject(new Error("unsupported algorithm: "+t))}},9892:(t,e,r)=>{"use strict";var n=r(9943),i=r(4350),a=r(246),o=r(1933),s=r(2293),u=r(5714),c=Buffer.from([0]);function l(t,e,r){var n="PBES2-"+t+"+"+e,i=[Buffer.from(n,"utf8"),c,r];return Buffer.concat(i)}function f(t){function e(t){var e=(t=t||{}).length||0,r=a.asBuffer(t.salt||Buffer.alloc(0),"base64u4l"),n=t.iterations||0;if(0>=e)throw new Error("invalid key length");if(0>=n)throw new Error("invalid iteration count");return t.length=e,t.salt=r,t.iterations=n,t}return o.setupFallback((function(r,n){if(6>o.nodeCrypto.pbkdf2.length)throw new Error("unsupported algorithm: PBKDF2-"+t);try{n=e(n)}catch(t){return Promise.reject(t)}var i=n.length,a=n.salt,s=n.iterations,u=t.replace("-","");return new Promise((function(t,e){o.nodeCrypto.pbkdf2(r,a,s,i,u,(function(r,n){r?e(r):t(n)}))}))}),(function(r,n){try{n=e(n)}catch(t){return Promise.reject(t)}var i=n.length,s=n.salt,u=n.iterations,c=Promise.resolve(r);return c=(c=c.then((function(t){return o.subtleCrypto.importKey("raw",t,"PBKDF2",!1,["deriveBits"])}))).then((function(e){var r={name:"PBKDF2",salt:new Uint8Array(s),iterations:u,hash:t};return o.subtleCrypto.deriveBits(r,e,8*i)})),c.then((function(t){return a.asBuffer(t)}))}),(function(r,i){try{i=e(i)}catch(t){return Promise.reject(t)}var a=i.length,o=i.salt,s=i.iterations;return new Promise((function(e,i){var u=n.md[t.replace("-","").toLowerCase()].create();n.pkcs5.pbkdf2(r.toString("binary"),o.toString("binary"),s,a,u,(function(t,r){t?i(t):(r=Buffer.from(r,"binary"),e(r))}))}))}))}function h(t,e){var r="PBKDF2-"+t.replace("HS","SHA-"),n=s.KEYLENGTH[e]/8;return function(o,s,c){c=c||{};var f=a.asBuffer(c.p2s||Buffer.alloc(0),"base64url"),h=c.p2c||8192;if(0>=h)throw new Error("invalid iteration count");if(0===f.length)f=a.randomBytes(16);else if(8>f.length)throw new Error("salt too small");var p={p2s:a.base64url.encode(f),p2c:h};f=l(t,e,f),c=i(c,{salt:f,iterations:h,length:n});var y=Promise.resolve(o);return y=y.then((function(t){return d[r].derive(t,c)})),(y=y.then((function(t){return u[e].encrypt(t,s)}))).then((function(t){return t.header=i(t.header||{},p),t}))}}function p(t,e){var r="PBKDF2-"+t.replace("HS","SHA-"),n=s.KEYLENGTH[e]/8;return function(o,s,c){c=c||{};var f=a.asBuffer(c.p2s||Buffer.alloc(0),"base64url"),h=c.p2c||0;if(0>=h)return Promise.reject(new Error("invalid iteration count"));if(8>f.length)return Promise.reject(new Error("salt too small"));f=l(t,e,f),c=i(c,{salt:f,iterations:h,length:n});var p=Promise.resolve(o);return p=p.then((function(t){return d[r].derive(t,c)})),p.then((function(t){return u[e].decrypt(t,s)}))}}var d={};["PBKDF2-SHA-256","PBKDF2-SHA-384","PBKDF2-SHA-512"].forEach((function(t){var e=t.replace("PBKDF2-","");d[t]={derive:f(e)}})),["PBES2-HS256+A128KW","PBES2-HS384+A192KW","PBES2-HS512+A256KW"].forEach((function(t){var e=/PBES2-(HS\d+)\+(A\d+KW)/g.exec(t),r=e[1],n=e[2];d[t]={encrypt:h(r,n),decrypt:p(r,n)}})),t.exports=d},6463:(t,e,r)=>{"use strict";var n=r(4127),i=r(9943),a=r(246);function o(t,e){var r=e?["n","e"]:["n","e","d","p","q","dp","dq","qi"];return r=r.map((function(e){return new i.jsbn.BigInteger(t[e].toString("hex"),16)})),(e?i.pki.rsa.setPublicKey:i.pki.rsa.setPrivateKey).apply(i.pki.rsa,r)}t.exports={convertToForge:o,convertToJWK:function(t,e){var r=n(t);return(e?["n","e"]:["n","e","d","p","q","dp","dq","qi"]).forEach((function(t){r[t]=a.base64url.encode(r[t])})),delete r.key_ops,delete r.use,delete r.alg,e&&(delete r.d,delete r.p,delete r.q,delete r.dp,delete r.dq,delete r.qi),r},convertToPem:function(t,e){var r,n=e?"__cachedPublicPem":"__cachedPrivatePem";return t[n]?t[n]:(r=e?i.pki.publicKeyToPem(o(t,e)):i.pki.privateKeyToPem(o(t,e)),Object.defineProperty(t,n,{value:r}),r)}}},8518:(t,e,r)=>{"use strict";var n=r(9943),i=r(1933),a=r(2926),o=r(6463),s={"RSA-OAEP":"RSA_PKCS1_OAEP_PADDING",RSA1_5:"RSA_PKCS1_PADDING"};function u(t){return i.nodeCrypto&&i.nodeCrypto.constants&&-1!==Object.keys(s).indexOf(t)}function c(t){var e,r,c={name:t};return"RSA-OAEP-256"===t?(c.name="RSA-OAEP",c.hash={name:"SHA-256"}):"RSA-OAEP"===t?c.hash={name:"SHA-1"}:c.name="RSAES-PKCS1-v1_5",e="RSAES-PKCS1-v1_5"!==c.name?function(t,e){return t=o.convertToJWK(t,!0),i.subtleCrypto.importKey("jwk",t,c,!0,["encrypt"]).then((function(t){return i.subtleCrypto.encrypt(c,t,e)})).then((function(t){return{data:Buffer.from(t)}}))}:null,u(t)&&(r=function(e,r){return e=o.convertToPem(e,!0),{data:i.nodeCrypto.publicEncrypt({key:e,padding:i.nodeCrypto.constants[s[t]]},r)}}),i.setupFallback(r,e,(function(t,e){e=new a(e).bytes();var r=o.convertToForge(t,!0),i={};"RSA-OAEP"===c.name&&(i.md=c.hash.name.toLowerCase().replace(/-/g,""),i.md=n.md[i.md].create());var s=r.encrypt(e,c.name.toUpperCase(),i);return s=new a(s).native(),Promise.resolve({data:s})}))}function l(t){var e,r,c={name:t};return"RSA-OAEP-256"===t?(c.name="RSA-OAEP",c.hash={name:"SHA-256"}):"RSA-OAEP"===t?c.hash={name:"SHA-1"}:c.name="RSAES-PKCS1-v1_5",e="RSAES-PKCS1-v1_5"!==c.name?function(t,e){return t=o.convertToJWK(t,!1),i.subtleCrypto.importKey("jwk",t,c,!0,["decrypt"]).then((function(t){return i.subtleCrypto.decrypt(c,t,e)})).then((function(t){return Buffer.from(t)}))}:null,u(t)?r=function(e,r){return e=o.convertToPem(e,!1),i.nodeCrypto.privateDecrypt({key:e,padding:i.nodeCrypto.constants[s[t]]},r)}:i.nodeCrypto&&"RSA-OAEP"===t&&(r=function(t,e){return t=o.convertToPem(t,!1),i.nodeCrypto.privateDecrypt(t,e)}),i.setupFallback(r,e,(function(t,e){e=new a(e).bytes();var r=o.convertToForge(t,!1),i={};"RSA-OAEP"===c.name&&(i.md=c.hash.name.toLowerCase().replace(/-/g,""),i.md=n.md[i.md].create());var s=r.decrypt(e,c.name.toUpperCase(),i);return s=new a(s).native(),Promise.resolve(s)}))}var f={};["RSA-OAEP","RSA-OAEP-256","RSA1_5"].forEach((function(t){f[t]={encrypt:c(t),decrypt:l(t)}})),t.exports=f},8165:(t,e,r)=>{"use strict";var n=r(9943),i=r(2293),a=r(1933),o=r(6463);function s(){return a.nodeCrypto&&a.nodeCrypto.constants&&a.nodeCrypto.constants.RSA_PSS_SALTLEN_DIGEST}function u(t){var e,r=t.replace("RS","SHA").toLowerCase(),i=t.replace("RS","SHA-"),s={name:"RSASSA-PKCS1-V1_5",hash:{name:i}},u="RSA-"+i.replace("-","");return a.nodeCrypto&&a.nodeCrypto.getHashes().indexOf(u)>-1&&(e=function(t,e){var r=a.nodeCrypto.createSign(u);return r.update(e),{data:e,mac:r.sign(o.convertToPem(t,!1))}}),a.setupFallback(e,(function(t,e){return t=o.convertToJWK(t,!1),a.subtleCrypto.importKey("jwk",t,s,!0,["sign"]).then((function(t){return a.subtleCrypto.sign(s,t,e)})).then((function(t){var r=Buffer.from(t);return{data:e,mac:r}}))}),(function(t,e){var i=n.md[r].create();i.start(),i.update(e);var a=o.convertToForge(t,!1).sign(i,"RSASSA-PKCS1-V1_5");return a=Buffer.from(a,"binary"),Promise.resolve({data:e,mac:a})}))}function c(t){var e,r=t.replace("RS","SHA").toLowerCase(),i={name:"RSASSA-PKCS1-V1_5",hash:{name:t.replace("RS","SHA-")}};return a.nodeCrypto&&a.nodeCrypto.getHashes().indexOf(r)>-1&&(e=function(t,e,n){var i=a.nodeCrypto.createVerify(r);return i.update(e),i.end(),i.verify(o.convertToPem(t,!0),n)?{data:e,mac:n,valid:!0}:Promise.reject(new Error("verification failed"))}),a.setupFallback(e,(function(t,e,r){return t=o.convertToJWK(t,!0),a.subtleCrypto.importKey("jwk",t,i,!0,["verify"]).then((function(t){return a.subtleCrypto.verify(i,t,r,e)})).then((function(t){return t?{data:e,mac:r,valid:!0}:Promise.reject(new Error("verification failed"))}))}),(function(t,e,i){var a=n.md[r].create();a.start(),a.update(e),a=a.digest().bytes();var s=o.convertToForge(t,!0),u=i.toString("binary");return s.verify(a,u,"RSASSA-PKCS1-V1_5")?Promise.resolve({data:e,mac:i,valid:!0}):Promise.reject(new Error("verification failed"))}))}function l(t){var e,r=t.replace("PS","SHA").toLowerCase(),u=t.replace("PS","SHA-"),c={name:"RSA-PSS",hash:{name:u},saltLength:i.HASHLENGTH[u]/8},l="RSA-"+u.replace("-","");return s()&&(e=function(t,e){var r=a.nodeCrypto.createSign(l);return r.update(e),{data:e,mac:r.sign({key:o.convertToPem(t,!1),padding:a.nodeCrypto.constants.RSA_PKCS1_PSS_PADDING,saltLength:a.nodeCrypto.constants.RSA_PSS_SALTLEN_DIGEST})}}),a.setupFallback(e,(function(t,e){return t=o.convertToJWK(t,!1),a.subtleCrypto.importKey("jwk",t,c,!0,["sign"]).then((function(t){return a.subtleCrypto.sign(c,t,e)})).then((function(t){var r=Buffer.from(t);return{data:e,mac:r}}))}),(function(t,e){var a=n.md[r].create();a.start(),a.update(e);var s=n.pss.create({md:n.md[r].create(),mgf:n.mgf.mgf1.create(n.md[r].create()),saltLength:i.HASHLENGTH[u]/8}),c=o.convertToForge(t,!1).sign(a,s);return c=Buffer.from(c,"binary"),Promise.resolve({data:e,mac:c})}))}function f(t){var e,r=t.replace("PS","SHA").toLowerCase(),u=t.replace("PS","SHA-"),c={name:"RSA-PSS",hash:{name:u},saltLength:i.HASHLENGTH[u]/8};return s()&&(e=function(t,e,n){var i=a.nodeCrypto.createVerify(r);return i.update(e),i.end(),i.verify({key:o.convertToPem(t,!0),padding:a.nodeCrypto.constants.RSA_PKCS1_PSS_PADDING,saltLength:a.nodeCrypto.constants.RSA_PSS_SALTLEN_DIGEST},n)?{data:e,mac:n,valid:!0}:Promise.reject(new Error("verification failed"))}),a.setupFallback(e,(function(t,e,r){return t=o.convertToJWK(t,!0),a.subtleCrypto.importKey("jwk",t,c,!0,["verify"]).then((function(t){return a.subtleCrypto.verify(c,t,r,e)})).then((function(t){return t?{data:e,mac:r,valid:!0}:Promise.reject(new Error("verification failed"))}))}),(function(t,e,a){var s=n.md[r].create();s.start(),s.update(e),s=s.digest().bytes();var c=n.pss.create({md:n.md[r].create(),mgf:n.mgf.mgf1.create(n.md[r].create()),saltLength:i.HASHLENGTH[u]/8}),l=o.convertToForge(t,!0),f=a.toString("binary");return l.verify(s,f,c)?Promise.resolve({data:e,mac:a,valid:!0}):Promise.reject(new Error("verification failed"))}))}var h={};["PS256","PS384","PS512"].forEach((function(t){h[t]={sign:l(t),verify:f(t)}})),["RS256","RS384","RS512"].forEach((function(t){h[t]={sign:u(t),verify:c(t)}})),t.exports=h},6486:(t,e,r)=>{"use strict";var n=r(9943),i=r(1933),a={};["SHA-1","SHA-256","SHA-384","SHA-512"].forEach((function(t){var e,r,o;a[t]={digest:(e=t,r=e.replace("SHA-","SHA").toLowerCase(),o={name:e},i.setupFallback((function(t){var e=i.nodeCrypto.createHash(r);return e.update(t),e.digest()}),(function(t){return i.subtleCrypto.digest(o,t).then((function(t){return Buffer.from(t)}))}),(function(t){var e=n.md[r].create();return e.update(t.toString("binary")),e=Buffer.from(e.digest().bytes(),"binary"),Promise.resolve(e)})))}})),t.exports=a},7029:(t,e,r)=>{"use strict";var n=r(8991),i=r(4877),a=r(4113),o=3774873600,s=new n(o>>8),u=t.exports={E1:o,E1B:225,E1L:s,LOOKUP:function(){for(var t=[],e=0;e<256;++e){for(var r=0,n=7;n>=0;--n)e&1<<n&&(r^=o>>>7-n);t.push(r)}return t}(),arrayCopy:function(t,e,r,n,i){if(e<0||n<0||i<0)throw new TypeError("Invalid input.");if(r instanceof Uint8Array){if(n>=r.length||n+i>r.length)throw new TypeError("Invalid input.");(0!==e||i<t.length)&&(t=t instanceof Uint8Array?t.subarray(e,e+i):t.slice(e,e+i)),r.set(t,n)}else for(var a=0;a<i;++a)r[n+a]=t[e+a]},arrayEqual:function(t,e){t=t||[],e=e||[];for(var r=Math.min(t.length,e.length),n=t.length===e.length,i=0;i<r;i++)n=n&&void 0!==t[i]&&void 0!==e[i]&&t[i]===e[i];return n},asBytes:function(t,e){switch(arguments.length){case 1:return e=Buffer.alloc(16),a.intToBigEndian(t,e,0),e;case 2:a.intToBigEndian(t,e,0);break;default:throw new TypeError("Expected 1 or 2 arguments.")}},asInts:function(t,e){switch(arguments.length){case 1:return i(e=[],0,0,4),a.bigEndianToInt(t,0,e),e;case 2:a.bigEndianToInt(t,0,e);break;default:throw new TypeError("Expected 1 or 2 arguments.")}},oneAsInts:function(){for(var t=[],e=0;e<4;++e)t.push(1<<31);return t},shiftRight:function(t,e){var r,n;switch(arguments.length){case 1:return r=t[0],t[0]=r>>>1,n=r<<31,r=t[1],t[1]=r>>>1|n,n=r<<31,r=t[2],t[2]=r>>>1|n,n=r<<31,r=t[3],t[3]=r>>>1|n,r<<31&4294967295;case 2:return r=t[0],e[0]=r>>>1,n=r<<31,r=t[1],e[1]=r>>>1|n,n=r<<31,r=t[2],e[2]=r>>>1|n,n=r<<31,r=t[3],e[3]=r>>>1|n,r<<31&4294967295;default:throw new TypeError("Expected 1 or 2 arguments.")}},shiftRightN:function(t,e,r){var n,i,a;switch(arguments.length){case 2:return i=t[0],n=32-e,t[0]=i>>>e,a=i<<n,i=t[1],t[1]=i>>>e|a,a=i<<n,i=t[2],t[2]=i>>>e|a,a=i<<n,i=t[3],t[3]=i>>>e|a,i<<n;case 3:return i=t[0],n=32-e,r[0]=i>>>e,a=i<<n,i=t[1],r[1]=i>>>e|a,a=i<<n,i=t[2],r[2]=i>>>e|a,a=i<<n,i=t[3],r[3]=i>>>e|a,i<<n;default:throw new TypeError("Expected 2 or 3 arguments.")}},xor:function(t,e,r){switch(arguments.length){case 2:t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3];break;case 3:r[0]=t[0]^e[0],r[1]=t[1]^e[1],r[2]=t[2]^e[2],r[3]=t[3]^e[3];break;default:throw new TypeError("Expected 2 or 3 arguments.")}},multiply:function(t,e){for(var r=t.slice(),n=[],i=0;i<4;++i)for(var a=e[i],o=31;o>=0;--o)a&1<<o&&u.xor(n,r),0!==u.shiftRight(r)&&(r[0]^=u.E1);u.arrayCopy(n,0,t,0,4)},multiplyP:function(t,e){switch(arguments.length){case 1:0!==u.shiftRight(t)&&(t[0]^=u.E1);break;case 2:0!==u.shiftRight(t,e)&&(e[0]^=u.E1);break;default:throw new TypeError("Expected 1 or 2 arguments.")}},multiplyP8:function(t,e){var r;switch(arguments.length){case 1:r=u.shiftRightN(t,8),t[0]^=u.LOOKUP[r>>>24];break;case 2:r=u.shiftRightN(t,8,e),e[0]^=u.LOOKUP[r>>>24];break;default:throw new TypeError("Expected 1 or 2 arguments.")}}}},1496:(t,e,r)=>{"use strict";var n=r(8991),i=r(9943),a=r(9164),o=r(7029),s=r(4113),u=r(2926),c=r(9547);function l(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=this.blockSize||16}t.exports={createCipher:function(t){var e=new i.aes.Algorithm("AES-GCM",l);return e.initialize({key:new u(t.key)}),e.mode.start(t),e.mode},createDecipher:function(t){var e=new i.aes.Algorithm("AES-GCM",l);return e.initialize({key:new u(t.key)}),e.mode._decrypt=!0,e.mode.start(t),e.mode}},l.prototype.start=function(t){if(this.tag=null,!("iv"in(t=t||{})))throw new Error("Gcm needs ParametersWithIV or AEADParameters");if(this.nonce=t.iv,null==this.nonce||this.nonce.length<1)throw new Error("IV must be at least 1 byte");this.tagLength=16,"tag"in t&&(this.tag=Buffer.from(t.tag));var e=this._decrypt?this.blockSize+this.tagLength:this.blockSize;this.bufBlock=Buffer.alloc(e);var r=t.multiplier;if(null==r&&(r=new a["8k"]),this.multiplier=r,this.H=this.zeroBlock(),c.encrypt(this.cipher,this.H,0,this.H,0),this.multiplier.init(this.H),this.exp=null,this.J0=this.zeroBlock(),12===this.nonce.length)this.nonce.copy(this.J0,0,0,this.nonce.length),this.J0[this.blockSize-1]=1;else{this.gHASH(this.J0,this.nonce,this.nonce.length);var i=this.zeroBlock();s.longToBigEndian(new n(this.nonce.length).multiply(8),i,8),this.gHASHBlock(this.J0,i)}this.S=this.zeroBlock(),this.SAt=this.zeroBlock(),this.SAtPre=this.zeroBlock(),this.atBlock=this.zeroBlock(),this.atBlockPos=0,this.atLength=n.ZERO,this.atLengthPre=n.ZERO,this.counter=Buffer.from(this.J0),this.bufOff=0,this.totalLength=n.ZERO,"additionalData"in t&&this.processAADBytes(t.additionalData,0,t.additionalData.length)},l.prototype.update=function(t,e,r,n,i){for(var a=0;r>0;){var o=Math.min(r,this.bufBlock.length-this.bufOff);t.copy(this.bufBlock,this.bufOff,e,e+o),r-=o,e+=o,this.bufOff+=o,this.bufOff===this.bufBlock.length&&(this.outputBlock(n,i+a),a+=this.blockSize)}return a},l.prototype.finish=function(t,e){var r=0;this._decrypt&&(r+=this.update(this.tag,0,this.tag.length,t,e)),this.totalLength.isZero()&&this.initCipher();var n=this.bufOff;if(this._decrypt){if(n<this.tagLength)throw new Error("data too short");n-=this.tagLength}n>0&&(this.gCTRPartial(this.bufBlock,0,n,t,e+r),r+=n),this.atLength=this.atLength.add(this.atBlockPos);var i=this.zeroBlock();s.longToBigEndian(this.atLength.multiply(8),i,0),s.longToBigEndian(this.totalLength.multiply(8),i,8),this.gHASHBlock(this.S,i);var a=Buffer.alloc(this.blockSize);if(c.encrypt(this.cipher,this.J0,0,a,0),this.xor(a,this.S),this._decrypt){if(!o.arrayEqual(this.tag,a))throw new Error("mac check in Gcm failed")}else this.tag=Buffer.alloc(this.tagLength),a.copy(this.tag,0,0,this.tagLength);return r},l.prototype.initCipher=function(){this.atLength.greaterThan(n.ZERO)&&(this.SAt.copy(this.SAtPre,0,0,this.blockSize),this.atLengthPre=this.atLength.add(n.ZERO)),this.atBlockPos>0&&(this.gHASHPartial(this.SAtPre,this.atBlock,0,this.atBlockPos),this.atLengthPre=this.atLengthPre.add(this.atBlockPos)),this.atLengthPre.greaterThan(n.ZERO)&&this.SAtPre.copy(this.S,0,0,this.blockSize)},l.prototype.outputBlock=function(t,e){this.totalLength.isZero()&&this.initCipher(),this.gCTRBlock(this.bufBlock,t,e),this._decrypt?(this.bufBlock.copy(this.bufBlock,0,this.blockSize,this.blockSize+this.tagLength),this.bufOff=this.tagLength):this.bufOff=0},l.prototype.processAADBytes=function(t,e,r){for(var n=0;n<r;++n)this.atBlock[this.atBlockPos]=t[e+n],++this.atBlockPos===this.blockSize&&(this.gHASHBlock(this.SAt,this.atBlock),this.atBlockPos=0,this.atLength=this.atLength.add(this.blockSize))},l.prototype.getNextCounterBlock=function(){for(var t=15;t>=12;--t){var e=this.counter[t]+1&255;if(this.counter[t]=e,0!==e)break}var r=Buffer.alloc(this.blockSize);return c.encrypt(this.cipher,this.counter,0,r,0),r},l.prototype.gCTRBlock=function(t,e,r){var n=this.getNextCounterBlock();this.xor(n,t),n.copy(e,r,0,this.blockSize),this.gHASHBlock(this.S,this._decrypt?t:n),this.totalLength=this.totalLength.add(this.blockSize)},l.prototype.gCTRPartial=function(t,e,r,n,i){var a=this.getNextCounterBlock();this.xor(a,t,e,r),a.copy(n,i,0,r),this.gHASHPartial(this.S,this._decrypt?t:a,0,r),this.totalLength=this.totalLength.add(r)},l.prototype.gHASHBlock=function(t,e){this.xor(t,e),this.multiplier.multiplyH(t)},l.prototype.gHASHPartial=function(t,e,r,n){this.xor(t,e,r,n),this.multiplier.multiplyH(t)},l.prototype.xor=function(t,e,r,n){switch(arguments.length){case 2:for(var i=15;i>=0;--i)t[i]^=e[i];break;case 4:for(;n-- >0;)t[n]^=e[r+n];break;default:throw new TypeError("Expected 2 or 4 arguments.")}return t},l.prototype.zeroBlock=function(){return Buffer.alloc(16)}},9164:(t,e,r)=>{"use strict";var n=r(7029),i=r(4113);function a(){this.H=[],this.M=null}a.prototype.init=function(t){var e,r,i;if(null==this.M)for(this.M=[],e=0;e<32;++e)for(this.M[e]=[],r=0;r<16;++r)for(this.M[e][r]=[],i=0;i<4;++i)this.M[e][r][i]=0;else if(n.arrayEqual(this.H,t))return;for(this.H=t.slice(),n.asInts(t,this.M[1][8]),r=4;r>=1;r>>=1)n.multiplyP(this.M[1][r+r],this.M[1][r]);for(n.multiplyP(this.M[1][1],this.M[0][8]),r=4;r>=1;r>>=1)n.multiplyP(this.M[0][r+r],this.M[0][r]);for(e=0;;){for(r=2;r<16;r+=r)for(i=1;i<r;++i)n.xor(this.M[e][r],this.M[e][i],this.M[e][r+i]);if(32==++e)return;if(e>1)for(r=8;r>0;r>>=1)n.multiplyP8(this.M[e-2][r],this.M[e][r])}},a.prototype.multiplyH=function(t){for(var e=[],r=15;r>=0;--r){var n=this.M[r+r][15&t[r]];e[0]^=n[0],e[1]^=n[1],e[2]^=n[2],e[3]^=n[3],n=this.M[r+r+1][(240&t[r])>>>4],e[0]^=n[0],e[1]^=n[1],e[2]^=n[2],e[3]^=n[3]}i.intToBigEndian(e,t,0)},t.exports={"8k":a}},9547:(t,e,r)=>{"use strict";var n=r(4113);t.exports={encrypt:function(t,e,r,i,a){var o=new Array(4),s=new Array(4);n.bigEndianToInt(e,r,o),t.encrypt(o,s),n.intToBigEndian(s,i,a)}}},4113:(t,e,r)=>{"use strict";var n=r(8991),i=t.exports={intToBigEndian:function(t,e,r){if("number"==typeof t)switch(arguments.length){case 1:e=Buffer.alloc(4),i.intToBigEndian(t,e,0);break;case 3:e[r]=255&t>>>24,e[++r]=255&t>>>16,e[++r]=255&t>>>8,e[++r]=255&t;break;default:throw new TypeError("Expected 1 or 3 arguments.")}else switch(arguments.length){case 1:e=Buffer.alloc(4*t.length),i.intToBigEndian(t,e,0);break;case 3:for(var n=0;n<t.length;++n)i.intToBigEndian(t[n],e,r),r+=4;break;default:throw new TypeError("Expected 1 or 3 arguments.")}return e},longToBigEndian:function(t,e,r){if(Array.isArray(t))switch(arguments.length){case 1:e=Buffer.alloc(8*t.length),i.longToBigEndian(t,e,0);break;case 3:for(var n=0;n<t.length;++n)i.longToBigEndian(t[n],e,r),r+=8;break;default:throw new TypeError("Expected 1 or 3 arguments.")}else switch(arguments.length){case 1:e=Buffer.alloc(8),i.longToBigEndian(t,e,0);break;case 3:var a=t.low,o=t.high;i.intToBigEndian(o,e,r),i.intToBigEndian(a,e,r+4);break;default:throw new TypeError("Expected 1 or 3 arguments.")}return e},bigEndianToInt:function(t,e,r){switch(arguments.length){case 2:var n=t[e]<<24;return n|=(255&t[++e])<<16,(n|=(255&t[++e])<<8)|255&t[++e];case 3:for(var a=0;a<r.length;++a)r[a]=i.bigEndianToInt(t,e),e+=4;break;default:throw new TypeError("Expected 2 or 3 arguments.")}},bigEndianToLong:function(t,e,r){switch(arguments.length){case 2:var a=i.bigEndianToInt(t,e),o=i.bigEndianToInt(t,e+4);return new n(o,a);case 3:for(var s=0;s<r.length;++s)r[s]=i.bigEndianToLong(t,e),e+=8;break;default:throw new TypeError("Expected 2 or 3 arguments.")}}}},4912:(t,e,r)=>{"use strict";var n=r(9943).jsbn.BigInteger,i=r(1446);function a(t,e,r,n){this.curve=t,this.g=e,this.n=r,this.h=n}function o(t){return new n(t,16)}a.prototype.getCurve=function(){return this.curve},a.prototype.getG=function(){return this.g},a.prototype.getN=function(){return this.n},a.prototype.getH=function(){return this.h};var s,u,c,l,f,h,p,d=t.exports={secp256r1:(s=o("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),u=o("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),c=o("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),l=o("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),f=n.ONE,h=new i.ECCurveFp(s,u,c),p=h.decodePointHex("046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"),new a(h,p,l,f)),secp384r1:function(){var t=o("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF"),e=o("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC"),r=o("B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF"),s=o("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973"),u=n.ONE,c=new i.ECCurveFp(t,e,r),l=c.decodePointHex("04AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB73617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F");return new a(c,l,s,u)}(),secp521r1:function(){var t=o("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),e=o("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC"),r=o("0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00"),s=o("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409"),u=n.ONE,c=new i.ECCurveFp(t,e,r),l=c.decodePointHex("0400C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650");return new a(c,l,s,u)}()};d["P-256"]=d.secp256r1,d["P-384"]=d.secp384r1,d["P-521"]=d.secp521r1},642:(t,e,r)=>{"use strict";var n=r(9943),i=n.jsbn.BigInteger,a=r(1446),o=r(4912);function s(t){return new i(t,16)}function u(t,e){e||(e=Math.ceil(t.bitLength()/8)),e*=2;var r=t.toString(16);for(r=r.substring(Math.max(r.length-e,0));e>r.length;)r="0"+r;return Buffer.from(r,"hex")}function c(t){return"string"==typeof t&&(t=Buffer.from(t,"binary")),s(t.toString("hex"))}function l(t){return Math.ceil(t.getN().bitLength()/8)}function f(t){var e=o[t];if(!e)throw new TypeError("unsupported named curve: "+t);return e}function h(t,e){var r=t.getN().bitLength(),n=8*e.length,i=c(e);return r<n&&(i=i.shiftRight(n-r)),i}function p(t,e,r){var n=f(t),i=n.getCurve(),o=new a.ECPointFp(i,i.fromBigInteger(e),i.fromBigInteger(r));this.curve=t,this.params=n,this.point=o;var s=l(n);this.x=u(e,s),this.y=u(r,s)}function d(t,e){var r=f(t);this.curve=t,this.params=r;var n=l(r);this.d=u(e,n)}p.prototype.isValid=function(){return this.params.curve.contains(this.point)},p.prototype.verify=function(t,e){var r=this.params.getN(),n=this.params.getG(),a=c(e.r),o=c(e.s);if(a.compareTo(i.ONE)<0||a.compareTo(r)>=0)return!1;if(o.compareTo(i.ONE)<0||a.compareTo(r)>=0)return!1;var s=h(this.params,t),u=o.modInverse(r),l=s.multiply(u).mod(r),f=a.multiply(u).mod(r),p=n.multiplyTwo(l,this.point,f).getX().toBigInteger();return(p=p.mod(r)).equals(a)},d.prototype.toPublicKey=function(){var t=c(this.d),e=this.params.getG().multiply(t);return new p(this.curve,e.getX().toBigInteger(),e.getY().toBigInteger())},d.prototype.sign=function(t){var e,r,a,o,s=l(this.params),f=this.params.getN(),p=this.params.getG(),d=h(this.params,t),y=c(this.d);do{do{do{a=c(n.random.getBytes(s))}while(a.equals(i.ZERO)||a.compareTo(f)>=0);e=p.multiply(a).getX().toBigInteger().mod(f)}while(e.equals(i.ZERO));o=y.multiply(e),o=d.add(o),r=a.modInverse(f).multiply(o).mod(f)}while(r.equals(i.ONE));var g=l(this.params);return{r:e=u(e,g),s:r=u(r,g)}},d.prototype.isValid=function(){var t=c(this.d),e=this.params.getN().subtract(i.ONE);return t.compareTo(i.ONE)>=0&&t.compareTo(e)<0},d.prototype.computeSecret=function(t){var e=c(this.d),r=t.point.multiply(e).getX().toBigInteger();return u(r,l(this.params))},e.generateKeyPair=function(t){var e=f(t),r=e.getN(),a=n.random.getBytes(l(e));a=c(a);var o=r.subtract(i.ONE),s=new d(t,a.mod(o).add(i.ONE)),u=s.toPublicKey();return{private:s,public:u}},e.asPublicKey=function(t,e,r){return"string"==typeof e?e=s(e):Buffer.isBuffer(e)&&(e=c(e)),"string"==typeof r?r=s(r):Buffer.isBuffer(r)&&(r=c(r)),new p(t,e,r)},e.asPrivateKey=function(t,e){return"string"==typeof e?e=s(e):Buffer.isBuffer(e)&&(e=c(e)),new d(t,e)}},1446:(t,e,r)=>{"use strict";var n=r(9943).jsbn.BigInteger;function i(){return new n(null)}function a(t){this.r2=i(),this.q3=i(),n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function o(t,e){this.x=e,this.p=t}function s(t,e,r,i){this.curve=t,this.x=e,this.y=r,this.z=i||n.ONE,this.zinv=null}function u(t,e,r){this.p=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new s(this,null,null),this.reducer=new a(this.p)}a.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e},a.prototype.revert=function(t){return t},a.prototype.reduce=function(t){if(t.s<0)throw Error("Barrett reduction on negative input");for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},a.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},a.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},o.prototype.equals=function(t){return t===this||this.p.equals(t.p)&&this.x.equals(t.x)},o.prototype.toBigInteger=function(){return this.x},o.prototype.negate=function(){return new o(this.p,this.x.negate().mod(this.p))},o.prototype.add=function(t){return new o(this.p,this.x.add(t.toBigInteger()).mod(this.p))},o.prototype.subtract=function(t){return new o(this.p,this.x.subtract(t.toBigInteger()).mod(this.p))},o.prototype.multiply=function(t){return new o(this.p,this.x.multiply(t.toBigInteger()).mod(this.p))},o.prototype.square=function(){return new o(this.p,this.x.pow(2).mod(this.p))},o.prototype.divide=function(t){return new o(this.p,this.x.multiply(t.toBigInteger().modInverse(this.p)).mod(this.p))},s.prototype.getX=function(){this.zinv||(this.zinv=this.z.modInverse(this.curve.p));var t=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(t),this.curve.fromBigInteger(t)},s.prototype.getY=function(){this.zinv||(this.zinv=this.z.modInverse(this.curve.p));var t=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(t),this.curve.fromBigInteger(t)},s.prototype.equals=function(t){return t===this||(this.isInfinity()?t.isInfinity():t.isInfinity()?this.isInfinity():!!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.p).equals(n.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.p).equals(n.ZERO))},s.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(n.ZERO)&&!this.y.toBigInteger().equals(n.ZERO)},s.prototype.negate=function(){return new s(this.curve,this.x,this.y.negate(),this.z)},s.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.p),r=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.p);if(n.ZERO.equals(r))return n.ZERO.equals(e)?this.twice():this.curve.getInfinity();var i=new n("3"),a=this.x.toBigInteger(),o=this.y.toBigInteger(),u=r.pow(2),c=u.multiply(r),l=a.multiply(u),f=e.pow(2).multiply(this.z),h=f.subtract(l.shiftLeft(1)).multiply(t.z).subtract(c).multiply(r).mod(this.curve.p),p=l.multiply(i).multiply(e).subtract(o.multiply(c)).subtract(f.multiply(e)).multiply(t.z).add(e.multiply(c)).mod(this.curve.p),d=c.multiply(this.z).multiply(t.z).mod(this.curve.p);return new s(this.curve,this.curve.fromBigInteger(h),this.curve.fromBigInteger(p),d)},s.prototype.twice=function(){if(this.isInfinity())return this;if(0===this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new n("3"),e=this.x.toBigInteger(),r=this.y.toBigInteger(),i=r.multiply(this.z),a=i.multiply(r).mod(this.curve.p),o=this.curve.a.toBigInteger(),u=e.pow(2).multiply(t);n.ZERO.equals(o)||(u=u.add(this.z.pow(2).multiply(o)));var c=(u=u.mod(this.curve.p)).pow(2).subtract(e.shiftLeft(3).multiply(a)).shiftLeft(1).multiply(i).mod(this.curve.p),l=u.multiply(t).multiply(e).subtract(a.shiftLeft(1)).shiftLeft(2).multiply(a).subtract(u.pow(2).multiply(u)).mod(this.curve.p),f=i.pow(2).multiply(i).shiftLeft(3).mod(this.curve.p);return new s(this.curve,this.curve.fromBigInteger(c),this.curve.fromBigInteger(l),f)},s.prototype.multiply=function(t){if(this.isInfinity())return this;if(0===t.signum())return this.curve.getInfinity();var e,r=t,i=r.multiply(new n("3")),a=this.negate(),o=this;for(e=i.bitLength()-2;e>0;--e){o=o.twice();var s=i.testBit(e);s!==r.testBit(e)&&(o=o.add(s?this:a))}return o},s.prototype.multiplyTwo=function(t,e,r){var n;n=t.bitLength()>r.bitLength()?t.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),a=this.add(e);n>=0;)i=i.twice(),t.testBit(n)?i=r.testBit(n)?i.add(a):i.add(this):r.testBit(n)&&(i=i.add(e)),--n;return i},u.prototype.getP=function(){return this.p},u.prototype.getA=function(){return this.a},u.prototype.getB=function(){return this.b},u.prototype.equals=function(t){return t===this||this.p.equals(t.p)&&this.a.equals(t.a)&&this.b.equals(t.b)},u.prototype.contains=function(t){var e=t.getX().toBigInteger(),r=t.getY().toBigInteger(),n=this.a.toBigInteger(),i=this.b.toBigInteger(),a=this.p,o=r.pow(2).mod(a),s=e.pow(3).add(n.multiply(e)).add(i).mod(a);return o.equals(s)},u.prototype.getInfinity=function(){return this.infinity},u.prototype.fromBigInteger=function(t){return new o(this.p,t)},u.prototype.reduce=function(t){this.reducer.reduce(t)},u.prototype.decodePointHex=function(t){switch(parseInt(t.substring(0,2),16)){case 0:return this.infinity;case 2:case 3:default:return null;case 4:case 6:case 7:var e=(t.length-2)/2,r=t.substr(2,e),i=t.substr(e+2,e);return new s(this,this.fromBigInteger(new n(r,16)),this.fromBigInteger(new n(i,16)))}},u.prototype.encodePointHex=function(t){if(t.isInfinity())return"00";var e=t.getX().toBigInteger().toString(16),r=t.getY().toBigInteger().toString(16),n=this.getP().toString(16).length;for(n%2!=0&&n++;e.length<n;)e="0"+e;for(;r.length<n;)r="0"+r;return"04"+e+r},t.exports={ECFieldElementFp:o,ECPointFp:s,ECCurveFp:u}},9943:(t,e,r)=>{"use strict";var n,i,a=r(4602);function o(t){t=t||{},this.name="",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._blocks=this.blockSize/4,this._inBlock=new Array(this._blocks),this._outBlock=new Array(this._blocks)}r(7962),r(9452),r(6174),r(2814),r(2132),r(600),r(8999),r(1711),r(6445),r(4305),r(9686),r(6428),r(2095),r(2930),r(4924),r(5330),r(9019),r(8533),o.prototype.start=function(){},o.prototype.encrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;var n;for(n=0;n<this._blocks;++n)this._inBlock[n]=t.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),n=0;n<this._blocks;++n)e.putInt32(this._outBlock[n])},o.prototype.decrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;var n;for(n=0;n<this._blocks;++n)this._inBlock[n]=t.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),n=0;n<this._blocks;++n)e.putInt32(this._outBlock[n])},i=o,n=function(){return new a.aes.Algorithm("AES",i)},a.cipher.registerAlgorithm("AES",n);var s=a.jsbn.BigInteger.prototype.modInverse;a.jsbn.BigInteger.prototype.modInverse=function(t){return s.apply(this,[t]).mod(t)},t.exports=a},5085:(t,e,r)=>{"use strict";"undefined"==typeof Promise&&r(9658).polyfill(),"undefined"==typeof Buffer&&((global||window).Buffer=r(181).Buffer),"undefined"==typeof process&&((global||window).process=r(932)),process.version||(process.version="");var n=r(4802);t.exports={JWA:r(9952),JWE:r(7116),JWK:r(5178),JWS:n,util:r(246),parse:r(2049),canYouSee:n.createVerify}},8969:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(6018),a=r(6342),o=r(5178),s=r(4350),u=r(9950),c={algorithms:"*"};function l(t,e){var r,l;if(o.isKey(t))l=(r=t).keystore;else{if(!o.isKeyStore(t))throw new TypeError("Keystore must be provided");l=t}e=s({},c,e),Object.defineProperty(this,"decrypt",{value:function(t,c){var f,h=(c=s({},e,c||{})).handlers||{},p=Object.keys(h),d=new a(c.algorithms);if("string"==typeof t)t={protected:(t=t.split("."))[0],recipients:[{encrypted_key:t[1]}],iv:t[2],ciphertext:t[3],tag:t[4]};else if(!t||"object"!==n(t))throw new Error("invalid input");"encrypted_key"in t&&(t.recipients=[{encrypted_key:t.encrypted_key}]);var y,g,v,m,E,C=t.recipients||[{}];return f=(f=Promise.resolve(C)).then((function(e){if(t.protected){g=i.decode(t.protected).toString("utf8");var r=(g=JSON.parse(g)).crit;if(r){if(!Array.isArray(r))return Promise.reject(new Error("Invalid 'crit' header"));for(var n=0;r.length>n;n++)if(-1===p.indexOf(r[n]))return Promise.reject(new Error("Critical extension is not supported: "+r[n]))}y=g,g=Object.keys(g)}else y={},g=[];return y=s(t.unprotected||{},y),e=e.map((function(t){var e=Promise.resolve(),r=t.header||{};return r=s(r,y),t.header=r,t.protected=g,d.match(r.alg)||(e=e.then((function(){return Promise.reject(new Error("Algorithm not allowed: "+r.alg))}))),d.match(r.enc)||(e=e.then((function(){return Promise.reject(new Error("Algorithm not allowed: "+r.enc))}))),r.epk&&(e=(e=e.then((function(){return o.asKey(r.epk)}))).then((function(t){r.epk=t.toObject(!1)}))),e.then((function(){return t}))})),Promise.all(e)})),f=f.then((function(t){var e={};return new Promise((function(n,a){var s=function(){var u=t.shift();if(u){var c=Promise.resolve(u);c=c.then((function(t){var e=E=t.encrypted_key||"";return e=i.decode(e),(v=r||l.get({use:"enc",alg:t.header.alg,kid:t.header.kid}))?v.unwrap(t.header.alg,e,t.header):Promise.reject()})),(c=c.then((function(t){m={kty:"oct",k:i.encode(t)},m=o.asKey(m),e.key=v,e.header=u.header,e.protected=u.protected,n(e)}))).catch(s)}else a(new Error("no key found"))};s()}))})),(f=(f=(f=(f=(f=f.then((function(e){return e.iv=t.iv,e.tag=t.tag,e.ciphertext=t.ciphertext,e}))).then((function(t){var e=[];return p.forEach((function(r){var i;"function"==typeof(r=h[r])?i=r(t):"object"===n(r)&&"function"==typeof r.prepare&&(i=r.prepare(t)),i&&e.push(Promise.resolve(i))})),Promise.all(e).then((function(){return t}))}))).then((function(t){return Buffer.isBuffer(t.ciphertext)||(t.ciphertext=i.decode(t.ciphertext)),t}))).then((function(e){var r=t.protected;"aad"in t&&null!=t.aad&&(r+="."+t.aad);var n={iv:e.iv,adata:r,tag:e.tag,kdata:E,epu:e.epu,epv:e.epv},i=e.ciphertext;return delete e.iv,delete e.tag,delete e.ciphertext,m.then((function(t){return t.decrypt(e.header.enc,i,n).then((function(t){return e.payload=e.plaintext=t,e}))}))}))).then((function(t){return"DEF"===t.header.zip?new Promise((function(e,r){try{var n=u.inflateRaw(Buffer.from(t.plaintext));t.payload=t.plaintext=Buffer.from(n),e(t)}catch(t){r(t)}})):t}))).then((function(t){var e=[];return p.forEach((function(r){var i;"object"===n(r=h[r])&&"function"==typeof r.complete&&(i=r.complete(t)),i&&e.push(Promise.resolve(i))})),Promise.all(e).then((function(){return t}))}))}})}t.exports={decrypter:l,createDecrypt:function(t,e){return new l(t,e)}}},6640:t=>{"use strict";t.exports={zip:!1,format:"general",contentAlg:"A128CBC-HS256",protect:"*"}},7793:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(246),a=r(3753).generateCEK,o=r(5178),s=r(3753).slice,u=r(9950),c=r(2293),l=r(6605),f=r(4127),h=r(6640);function p(t,e,r){var s=!1,h=t.format||"general",p=!!t.protectAll,d=Buffer.alloc(0);Object.defineProperty(this,"zip",{get:function(){return e.zip||""},enumerable:!0}),Object.defineProperty(this,"compact",{get:function(){return"compact"===h},enumerable:!0}),Object.defineProperty(this,"format",{get:function(){return h},enumerable:!0}),Object.defineProperty(this,"protected",{get:function(){return f(t.protect)},enumerable:!0}),Object.defineProperty(this,"header",{get:function(){return f(e)},enumerable:!0}),Object.defineProperty(this,"update",{value:function(t,e){if(s)throw new Error("already final");return null!=t&&(t=i.asBuffer(t,e),d=d.length?Buffer.concat([d,t],d.length+t.length):t),this}}),Object.defineProperty(this,"final",{value:function(y,g){if(s)return Promise.reject(new Error("already final"));this.update(y,g),s=!0;var v,m=Promise.resolve({}),E=e.enc;m=(m=m.then((function(e){return t.cek&&(v=o.asKey(t.cek)),e}))).then((function(n){var s=Promise.all(r);return s=s.then((function(r){var n=1===r.length;return r=r.map((function(r){return function(r,n){var s={};s=l(s,e),s=l(s,r.header);var u,c,h=r.key,p=s.alg;return 0===(s.alg||"").indexOf("ECDH-ES")?(u=h.keystore.temp(),c=r.epk?Promise.resolve(r.epk).then((function(t){r.header.epk=t.toJSON(!1,["kid"]),s.epk=t.toObject(!0,["kid"])})):u.generate("EC",h.get("crv")).then((function(t){r.header.epk=t.toJSON(!1,["kid"]),s.epk=t.toObject(!0,["kid"])}))):c=Promise.resolve(),c=c.then((function(){var r,i;return"dir"===p&&n?i=(v=Promise.resolve(h)).then((function(t){return E||(s.enc=e.enc=E=t.algorithms(o.MODE_ENCRYPT)[0]),{once:!0,direct:!0}})):(v||(E||(s.enc=e.enc=E=t.contentAlg),v=a(E)),i=(i=v.then((function(t){return r=t.get("k",!0),h}))).then((function(t){return t.wrap(p,r,s)}))),i})),c.then((function(t){if(t.once&&!n)return Promise.reject(new Error("cannot use 'alg':'"+p+"' with multiple recipients"));var e,a={};return t.data&&(e=t.data,e=i.base64url.encode(e)),t.direct&&e?v=o.asKey({kty:"oct",k:e}):e&&(a.encrypted_key=e),r.header&&Object.keys(r.header).length&&(a.header=f(r.header||{})),t.header&&(a.header=l(a.header||{},t.header)),a}))}(r,n)})),Promise.all(r)})),s.then((function(t){return n.recipients=t.filter((function(t){return!!t})),n}))}));var C={};switch(m=(m=m.then((function(r){var n,a,o,s;return o=f(e),p&&1===r.recipients.length||"compact"===h?(n={},n=l({},o,r.recipients[0].header),a=Object.keys(n).length,o=void 0,s=0,delete r.recipients[0].header,0===Object.keys(r.recipients[0]).length&&r.recipients.splice(0,1)):(n={},a=0,s=Object.keys(o).length,t.protect.forEach((function(t){t in o&&(n[t]=o[t],a++,delete o[t],s--)})),r.recipients=(r.recipients||[]).map((function(t){var e=(t=t||{}).header;return e&&(Object.keys(e).forEach((function(t){t in n&&delete e[t]})),Object.keys(e).length||delete t.header),t}))),r.recipients&&0!==r.recipients.length||delete r.recipients,o&&s>0&&(C=l(C,o),r.unprotected=o),n&&a>0&&(C=l(C,n),n=JSON.stringify(n),r.protected=i.base64url.encode(n,"utf8")),r}))).then((function(t){var e=d;return C.zip?"DEF"===C.zip?new Promise((function(r,n){try{var i=u.deflateRaw(Buffer.from(e,"binary"));t.plaintext=Buffer.from(i),r(t)}catch(t){n(t)}})):Promise.reject(new Error("unsupported 'zip' mode")):(t.plaintext=e,t)})),m=m.then((function(e){C.adata=e.protected,"aad"in t&&null!=t.aad&&(C.adata+="."+t.aad,C.adata=Buffer.from(C.adata,"utf8"));var r=t.iv||i.randomBytes(c.NONCELENGTH[E]/8);"string"==typeof r&&(r=i.base64url.decode(r)),C.iv=r,"recipients"in e&&1===e.recipients.length&&(C.kdata=e.recipients[0].encrypted_key),"epu"in t&&null!=t.epu&&(C.epu=t.epu),"epv"in t&&null!=t.epv&&(C.epv=t.epv);var n=e.plaintext;return delete e.plaintext,v.then((function(a){var o=a.encrypt(E,n,C);return o.then((function(n){return e.iv=i.base64url.encode(r,"binary"),"aad"in t&&null!=t.aad&&(e.aad=t.aad),e.ciphertext=i.base64url.encode(n.data,"binary"),e.tag=i.base64url.encode(n.tag,"binary"),e}))}))})),h){case"compact":m=m.then((function(t){var e=new Array(5);return e[0]=t.protected,t.recipients&&t.recipients[0]&&(e[1]=t.recipients[0].encrypted_key),e[2]=t.iv,e[3]=t.ciphertext,e[4]=t.tag,e.join(".")}));break;case"flattened":m=m.then((function(t){var e={},r=t.recipients&&t.recipients[0];return t.protected&&(e.protected=t.protected),t.unprotected&&(e.unprotected=t.unprotected),["header","encrypted_key"].forEach((function(t){r&&t in r&&r[t]&&("object"!==n(r[t])||Object.keys(r[t]).length)&&(e[t]=r[t])})),t.aad&&(e.aad=t.aad),e.iv=t.iv,e.ciphertext=t.ciphertext,e.tag=t.tag,e}));break;case"general":m=m.then((function(t){var e=t.recipients||[];return(e=(e=e.map((function(t){if(Object.keys(t).length)return t}))).filter((function(t){return!!t}))).length?t.recipients=e:delete t.recipients,t}))}return m}})}t.exports={encrypter:p,createEncrypt:function(t,e){var r=t,n=1,a=e;if(0===arguments.length)throw new Error("at least one recipient must be provided");1===arguments.length||o.isKey(t)||t&&"kty"in t||t&&"key"in t&&(o.isKey(t.key)||"kty"in t.key)?(a=t,n=0,r={}):r=f(t),Array.isArray(a)||(a=s(arguments,n)),r=l(f(h),r);var u=f(r.fields||{});switch(r.zip&&(u.zip="boolean"==typeof r.zip?!!r.zip&&"DEF":r.zip),r.format=(r.compact?"compact":r.format)||"general",r.format){case"compact":if("aad"in t)throw new Error("additional authenticated data cannot be used for compact serialization");case"flattened":if(a.length>1)throw new Error("too many recipients for compact serialization")}var c=!1;if("compact"===r.format||"*"===r.protect)c=!0,r.protect=Object.keys(u).concat("enc");else if("string"==typeof r.protect)r.protect=[r.protect];else if(Array.isArray(r.protect))r.protect=r.protect.concat();else{if(r.protect)throw new Error("protect must be a list of fields");r.protect=[]}if(c&&1<a.length)throw new Error("too many recipients to protect all header parameters");return a=a.map((function(t,e){var r;return r=t&&"kty"in t?(r=o.asKey(t)).then((function(t){return{key:t}})):t?(r=o.asKey(t.key)).then((function(e){return{header:t.header,reference:t.reference,key:e}})):Promise.reject(new Error("missing key for recipient "+e)),t.epk&&(r=r.then((function(e){return o.asKey(t.epk).then((function(t){return e.epk=t,e}))}))),r.then((function(t){var r=t.key,n=t.header||{};t.header=n;var i={};if(i=l(i,u),(i=l(i,t.header)).alg||(i.alg=r.algorithms(o.MODE_WRAP)[0],n.alg=i.alg),!i.alg)return Promise.reject(new Error("key not valid for encrypting to recipient "+e));n.alg=i.alg;var a,s=t.reference;if(delete t.reference,void 0===s?s=(s=["kid","jku","x5c","x5t","x5u"].some((function(t){return t in n})))?null:"kid":"boolean"==typeof s&&(s=s?"kid":null),s)if(a=r.toJSON(),"jwk"===s){if("oct"===r.kty)return Promise.reject(new Error("cannot embed key"));n.jwk=a}else s in a&&(n[s]=a[s]);return Object.freeze(t)}))})),new p({aad:"aad"in r?i.base64url.encode(r.aad||""):null,contentAlg:r.contentAlg,format:r.format,protect:r.protect,cek:r.cek,iv:r.iv,protectAll:c},u,a)}}},3753:(t,e,r)=>{"use strict";var n=r(2293),i=r(5178);t.exports={slice:function(t,e){return Array.prototype.slice.call(t,e||0)},generateCEK:function(t){var e=i.createKeyStore(),r=n.KEYLENGTH[t];if(r)return e.generate("oct",r);throw new Error("unsupported encryption algorithm")}}},7116:(t,e,r)=>{"use strict";var n={createEncrypt:r(7793).createEncrypt,createDecrypt:r(8969).createDecrypt};t.exports=n},5929:(t,e,r)=>{"use strict";var n=r(4350),i=r(4293).v4,a=r(6605),o=r(4127),s=r(3120),u=r(6641),c=r(2057),l=r(3601),f=r(5525),h=r(9952),p=r(1467),d=r(731),y=r(246);t.exports=function(t,e,r,g){if(!t)throw new Error("kty cannot be null");if(!e)throw new Error("keystore cannot be null");if(!r)throw new Error("props cannot be null");if("string"==typeof r&&(r=JSON.parse(r)),!g)throw new Error("cfg cannot be null");var v,m,E=[],C={},b={};r=o(r),v=a({},r[d.INTERNALS.THUMBPRINT_KEY]||{}),delete r[d.INTERNALS.THUMBPRINT_KEY],Object.keys(v).forEach((function(t){var e=v[t];m||(m=e,Buffer.isBuffer(m)&&(m=y.base64url.encode(m))),Buffer.isBuffer(e)||(e=y.base64url.decode(e),v[t]=e)})),r.kty=t,r.kid=r.kid||m||i();var S,w=Object.keys(d.COMMON_PROPS).map((function(t){return d.COMMON_PROPS[t].name}));b.base=l(r,w),E=E.concat(Object.keys(b.base)),b.public=o(r),C.public=g.publicKey(b.public),C.public&&(E=E.concat(Object.keys(b.public))),b.private=o(r),C.private=g.privateKey(b.private),C.private&&(E=E.concat(Object.keys(b.private))),b.extra=c(r,E),S=C.public&&"length"in C.public?C.public.length:C.private&&"length"in C.private?C.private.length:NaN,Object.defineProperty(this,"keystore",{value:e,enumerable:!0}),Object.defineProperty(this,"length",{value:S,enumerable:!0}),Object.defineProperty(this,"kty",{value:t,enumerable:!0}),Object.defineProperty(this,"kid",{value:b.base.kid,enumerable:!0}),Object.defineProperty(this,"use",{value:b.base.use||"",enumerable:!0}),Object.defineProperty(this,"alg",{value:b.base.alg||"",enumerable:!0}),Object.defineProperty(this,"thumbprint",{value:function(t){if(t=(t||d.INTERNALS.THUMBPRINT_HASH).toUpperCase(),v[t])return Promise.resolve(v[t]);var e=d.thumbprint(g,b,t);return e.then((function(e){return e&&(v[t]=e),e}))}}),Object.defineProperty(this,"algorithms",{value:function(e){var r=[];this.use&&"sig"!==this.use||(e&&p.MODE_SIGN!==e||r.push(p.MODE_SIGN),e&&p.MODE_VERIFY!==e||r.push(p.MODE_VERIFY)),this.use&&"enc"!==this.use||(e&&p.MODE_ENCRYPT!==e||r.push(p.MODE_ENCRYPT),e&&p.MODE_DECRYPT!==e||r.push(p.MODE_DECRYPT),e&&p.MODE_WRAP!==e||r.push(p.MODE_WRAP),e&&p.MODE_UNWRAP!==e||r.push(p.MODE_UNWRAP));var n,i=this,a=r.map((function(t){return g.algorithms.call(i,C,t)}));return a=s(a),a=f(a),this.alg&&(n="oct"===t?[this.alg,"dir"]:[this.alg],a=u(a,n)),a}}),Object.defineProperty(this,"supports",{value:function(t,e){return-1!==this.algorithms(e).indexOf(t)}}),Object.defineProperty(this,"has",{value:function(t,e){var r=!1;return(r=(r=(r=r||!(!b.base||!(t in b.base)))||!(!C.public||!(t in C.public)))||!(!b.extra||!(t in b.extra)))||!!(e&&C.private&&t in C.private)}}),Object.defineProperty(this,"get",{value:function(t,e){var r;return b.base&&t in b.base?r=b.base:C.public&&t in C.public?r=C.public:b.extra&&t in b.extra?r=b.extra:e&&C.private&&t in C.private&&(r=C.private),r&&r[t]||null}}),Object.defineProperty(this,"toJSON",{value:function(t,e){Array.isArray(t)&&(e=t,t=!1);var r={};return r=n(r,b.base,b.public,"boolean"==typeof t&&t?b.private:{},b.extra),c(r,e||[])}}),Object.defineProperty(this,"toPEM",{value:function(t){if(null===t&&(t=!1),!g.convertToPEM)throw new Error("Unsupported key type for PEM encoding");var e=t?C.private:C.public;if(!e)throw new Error("Invalid key");return g.convertToPEM.call(this,e,t)}}),Object.defineProperty(this,"toObject",{value:function(t,e){Array.isArray(t)&&(e=t,t=!1);var r={};return r=n(r,b.base,C.public,"boolean"==typeof t&&t?C.private:{},b.extra),c(r,(e||[]).concat("length"))}}),Object.defineProperty(this,"sign",{value:function(t,e,r){if(-1===this.algorithms("sign").indexOf(t))return Promise.reject(new Error("unsupported algorithm"));var i=g.signKey.call(this,t,C);return i?(r=r?o(r):{},g.signProps&&(r=n(r,g.signProps.call(this,t,r))),h.sign(t,i,e,r)):Promise.reject(new Error("improper key"))}}),Object.defineProperty(this,"verify",{value:function(t,e,r,i){if(-1===this.algorithms("verify").indexOf(t))return Promise.reject(new Error("unsupported algorithm"));var a=g.verifyKey.call(this,t,C);return a?(i=i?o(i):{},g.verifyProps&&(i=n(i,g.verifyProps.call(this,t,i))),h.verify(t,a,e,r,i)):Promise.reject(new Error("improper key"))}}),Object.defineProperty(this,"encrypt",{value:function(t,e,r){if(-1===this.algorithms("encrypt").indexOf(t))return Promise.reject(new Error("unsupported algorithm"));var i=g.encryptKey.call(this,t,C);return i?(r=r?o(r):{},g.encryptProps&&(r=n(r,g.encryptProps.call(this,t,r))),h.encrypt(t,i,e,r)):Promise.reject(new Error("improper key"))}}),Object.defineProperty(this,"decrypt",{value:function(t,e,r){if(-1===this.algorithms("decrypt").indexOf(t))return Promise.reject(new Error("unsupported algorithm"));var i=g.decryptKey.call(this,t,C);return i?(r=r?o(r):{},g.decryptProps&&(r=n(r,g.decryptProps.call(this,t,r))),h.decrypt(t,i,e,r)):Promise.reject(new Error("improper key"))}}),Object.defineProperty(this,"wrap",{value:function(t,e,r){if(-1===this.algorithms("wrap").indexOf(t))return Promise.reject(new Error("unsupported algorithm"));var i=g.wrapKey.call(this,t,C);return i?(r=r?o(r):{},g.wrapProps&&(r=n(r,g.wrapProps.call(this,t,r))),h.encrypt(t,i,e,r)):Promise.reject(new Error("improper key"))}}),Object.defineProperty(this,"unwrap",{value:function(t,e,r){if(-1===this.algorithms("unwrap").indexOf(t))return Promise.reject(new Error("unsupported algorithm"));var i=g.unwrapKey.call(this,t,C);return i?(r=r?o(r):{},g.unwrapProps&&(r=n(r,g.unwrapProps.call(this,t,r))),h.decrypt(t,i,e,r)):Promise.reject(new Error("improper key"))}})}},1467:t=>{"use strict";t.exports={MODE_SIGN:"sign",MODE_VERIFY:"verify",MODE_ENCRYPT:"encrypt",MODE_DECRYPT:"decrypt",MODE_WRAP:"wrap",MODE_UNWRAP:"unwrap"}},3645:(t,e,r)=>{"use strict";var n=r(8223),i=r(9943),a=r(642),o={BaseKey:r(5929),helpers:r(731)},s=["ES256","ES384","ES512"],u=["ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"],c=n.EC_OID;function l(t){switch(t){case"1.2.840.10045.3.1.7":return"P-256";case"1.3.132.0.34":return"P-384";case"1.3.132.0.35":return"P-521";default:return null}}var f={publicKey:function(t){var e=o.helpers.COMMON_PROPS.concat([{name:"crv",type:"string"},{name:"x",type:"binary"},{name:"y",type:"binary"}]),r=o.helpers.unpackProps(t,e);return r&&r.crv&&r.x&&r.y?r.length=n.curveSize(r.crv):(delete r.crv,delete r.x,delete r.y),r},privateKey:function(t){var e=o.helpers.COMMON_PROPS.concat([{name:"crv",type:"string"},{name:"x",type:"binary"},{name:"y",type:"binary"},{name:"d",type:"binary"}]),r=o.helpers.unpackProps(t,e);return r&&r.crv&&r.x&&r.y&&r.d?r.length=n.curveSize(r.crv):r=void 0,r},thumbprint:function(t){return t.public&&(t=t.public),{crv:t.crv,kty:"EC",x:t.x,y:t.y}},algorithms:function(t,e){var r=t.public&&t.public.length||t.private&&t.private.length||0;switch(521===r&&(r=512),e){case"encrypt":case"decrypt":return[];case"wrap":return t.public&&u||[];case"unwrap":return t.private&&u||[];case"sign":return t.private?s.filter((function(t){return t==="ES"+r})):[];case"verify":return t.public?s.filter((function(t){return t==="ES"+r})):[]}},encryptKey:function(t,e){return e.public},decryptKey:function(t,e){return e.private},wrapKey:function(t,e){return e.public},unwrapKey:function(t,e){return e.private},signKey:function(t,e){return e.private},verifyKey:function(t,e){return e.public}};f.convertToPEM=n.convertToPEM;var h={oid:c,privateKey:{name:"ECPrivateKey",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"ECPrivateKey.version",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.INTEGER,constructed:!1},{name:"ECPrivateKey.private",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.OCTETSTRING,constructed:!1,capture:"d"},{tagClass:i.asn1.Class.CONTEXT_SPECIFIC,name:"ECPrivateKey.parameters",constructed:!0,value:[{name:"ECPrivateKey.namedCurve",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.OID,constructed:!1,capture:"crv"}]},{name:"ECPrivateKey.publicKey",tagClass:i.asn1.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"ECPrivateKey.point",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.BITSTRING,constructed:!1,capture:"point"}]}]},embeddedPrivateKey:{name:"ECPrivateKey",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"ECPrivateKey.version",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.INTEGER,constructed:!1},{name:"ECPrivateKey.private",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.OCTETSTRING,constructed:!1,capture:"d"},{name:"ECPrivateKey.publicKey",tagClass:i.asn1.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"ECPrivateKey.point",tagClass:i.asn1.Class.UNIVERSAL,type:i.asn1.Type.BITSTRING,constructed:!1,capture:"point"}]}]}},p={kty:"EC",validators:h,prepare:function(t){var e=f,r=Promise.resolve(t);return(r=r.then((function(t){return o.helpers.thumbprint(e,t)}))).then((function(r){var n={};return n[o.helpers.INTERNALS.THUMBPRINT_HASH]=r,t[o.helpers.INTERNALS.THUMBPRINT_KEY]=n,e}))},generate:function(t){var e=a.generateKeyPair(t),r={crv:t,x:e.public.x,y:e.public.y,d:e.private.d};return Promise.resolve(r)},import:function(t){if(h.oid!==t.keyOid)return null;var e;if(t.keyParams&&i.asn1.Type.OID===t.keyParams.type?e=l(e=i.asn1.derToOid(t.keyParams.value)):t.crv&&(e=l(e=i.asn1.derToOid(t.crv))),!e)return null;if(!t.parsed){var r={};if("private"===t.type){if("string"==typeof t.keyValue?t.keyValue=i.asn1.fromDer(t.keyValue):Array.isArray(t.keyValue)&&(t.keyValue=t.keyValue[0]),!i.asn1.validate(t.keyValue,h.embeddedPrivateKey,r,[]))return null}else r.point=t.keyValue;t=r}var n={kty:"EC",crv:e};if(t.d&&(n.d=Buffer.from(t.d,"binary")),t.point){var a=Buffer.from(t.point,"binary");if(4!==a.readUInt16BE(0))return null;var o=(a=a.slice(2)).length/2;n.x=a.slice(0,o),n.y=a.slice(o)}return n}};t.exports=Object.freeze({config:f,factory:p}),r(5736).registry.register(p)},731:(t,e,r)=>{"use strict";var n=r(4127),i=r(246),a=r(9943),o=r(9952),s={name:"PrivateKeyInfo",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.INTEGER,constructed:!1,capture:"keyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.OID,constructed:!1,capture:"keyOid"},{name:"AlgorithmIdentifier.parameters",captureAsn1:"keyParams"}]},{name:"PrivateKeyInfo",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.OCTETSTRING,constructed:!1,capture:"keyValue"}]},u={name:"SubjectPublicKeyInfo",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.OID,constructed:!1,capture:"keyOid"},{name:"AlgorithmIdentifier.parameters",captureAsn1:"keyParams"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.BITSTRING,constructed:!1,capture:"keyValue"}]},c={name:"Certificate",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,captureAsn1:"certificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:a.asn1.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.asn1.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},u,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:a.asn1.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:a.asn1.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:a.asn1.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.asn1.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:a.asn1.Class.UNIVERSAL,type:a.asn1.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},l={THUMBPRINT_KEY:"internal\0thumbprint",THUMBPRINT_HASH:"SHA-256"};t.exports={validators:{privateKey:s,publicKey:u,certificate:c},thumbprint:function(t,e,r){if("function"!=typeof t.thumbprint)return Promise.reject(new Error("thumbprint not supported"));r=(r||l.THUMBPRINT_HASH).toUpperCase();var n=t.thumbprint(e),a=Object.keys(n).sort().map((function(t){var e=n[t];return Buffer.isBuffer(e)&&(e=i.base64url.encode(e)),JSON.stringify(t)+":"+JSON.stringify(e)}));a="{"+a.join(",")+"}";try{return o.digest(r,Buffer.from(a,"utf8"))}catch(t){return Promise.reject(t)}},unpackProps:function(t,e){var r;e.forEach((function(e){if(e.name in t){r=r||{};var a=t[e.name];switch(e.type){case"binary":Buffer.isBuffer(a)?t[e.name]=i.base64url.encode(a):a=i.base64url.decode(a);break;case"string":case"number":case"boolean":default:break;case"array":a=[].concat(a);break;case"object":a=n(a)}r[e.name]=a}}));var a=r||{};return Object.keys(t).forEach((function(e){e in a||delete t[e]})),r},COMMON_PROPS:[{name:"kty",type:"string"},{name:"kid",type:"string"},{name:"use",type:"string"},{name:"alg",type:"string"},{name:"x5c",type:"array"},{name:"x5t",type:"binary"},{name:"x5u",type:"string"},{name:"key_ops",type:"array"}],INTERNALS:l}},5178:(t,e,r)=>{"use strict";var n=r(5736);Object.keys(n.KeyStore).forEach((function(t){e[t]=n.KeyStore[t]}));var i=r(1467);Object.keys(i).forEach((function(t){e[t]=i[t]})),r(5533),r(2637),r(3645)},5736:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4127),a=r(4350),o=r(9943),s=r(246),u={BaseKey:r(5929),helpers:r(731)},c=function(){var t={};Object.defineProperty(this,"register",{value:function(e){if(!e||"string"!=typeof e.kty||!e.kty)throw new Error("invalid Key factory");var r=e.kty;return t[r]=e,this}}),Object.defineProperty(this,"unregister",{value:function(e){if(!e||"string"!=typeof e.kty||!e.kty)throw new Error("invalid Key factory");var r=e.kty;return e===t[r]&&delete t[r],this}}),Object.defineProperty(this,"get",{value:function(e){return t[e||""]||void 0}}),Object.defineProperty(this,"all",{value:function(){return Object.keys(t).map((function(e){return t[e]}))}})},l=new c;var f=function(t,e){var r={};Object.defineProperty(this,"generate",{value:function(e,r,n){var o=t.get(e);if(!o)return Promise.reject(new Error("unsupported key type"));(n=i(n||{})).kty=e;var s=this;return o.generate(r).then((function(t){return t=a(n,t,{kty:e}),s.add(t)}))}}),Object.defineProperty(this,"add",{value:function(e,n,a){var c;if(a=a||{},Buffer.isBuffer(e)||"string"==typeof e)if("json"===(n=(n||"json").toLowerCase()))e=JSON.parse(e.toString("utf8"));else try{if(c="pem"===n?function(t){var e={};if(!o.pem.decode(t).some((function(t){switch(t.type){case"CERTIFICATE":e.form="pkix";break;case"PUBLIC KEY":e.form="spki";break;case"PRIVATE KEY":e.form="pkcs8";break;case"EC PRIVATE KEY":case"RSA PRIVATE KEY":e.form="private";break;default:return!1}return e.body=t.body,!0})))throw new Error("supported PEM type not found");return e}(e):{body:e.toString("binary"),form:n},!(e=function(t,e){var r,n={},i=[],a=e.form,c=e.body,f=null;switch(e=o.asn1.fromDer(c),a){case"private":t.all().some((function(t){if(r)return!1;if(!t.validators)return!1;var a=t.validators.oid,s=t.validators.privateKey;return!!s&&(n={},i=[],(r=o.asn1.validate(e,s,n,i))&&(n.keyOid=o.asn1.oidToDer(a),n.parsed=!0),r)})),n.type="private";break;case"pkcs8":r=o.asn1.validate(e,u.helpers.validators.privateKey,n,i),n.type="private";break;case"public":case"spki":r=o.asn1.validate(e,u.helpers.validators.publicKey,n,i),n.type="public";break;case"pkix":case"x509":if(r=o.asn1.validate(e,u.helpers.validators.certificate,n,i)){n=function(t){return["certIssuer","certSubject"].forEach((function(e){var r=o.pki.RDNAttributesAsArray(t[e]),n=t[e]={};r.forEach((function(t){n[t.name||t.type]=t.value}))})),t}(n);var h=o.md.sha1.create();h.update(c),f=s.base64url.encode(Buffer.from(h.digest().toHex(),"hex"))}n.type="public"}return r?(n.keyOid&&(n.keyOid=o.asn1.derToOid(n.keyOid)),r=null,l.all().forEach((function(t){r||t&&"function"==typeof t.import&&(r=t.import(n))})),r&&n.certSubject&&n.certSubject.commonName&&(r.kid=n.certSubject.commonName),r&&f&&(r.x5t=f),r):null}(t,c)))throw new Error("no importer for key");Object.keys(a).forEach((function(t){e[t]=a[t]}))}catch(t){return Promise.reject(t)}else e=f.isKey(e)?e.toJSON(!0):i(e);var h=t.get(e.kty);if(!h)return Promise.reject(new Error("unsupported key type"));var p=this;return h.prepare(e).then((function(t){return new u.BaseKey(e.kty,p,e,t)})).then((function(t){var e=t.kid||"";return(r[e]=r[e]||[]).push(t),t}))}}),Object.defineProperty(this,"remove",{value:function(t){if(t){var e=r[t.kid];if(e){var n=e.indexOf(t);-1!==n&&(e.splice(n,1),e.length||delete r[t.kid])}}}}),Object.defineProperty(this,"all",{value:function(t,n){void 0!==(t=t||{}).kid&&null!==t.kid&&"string"!=typeof t.kid&&(t.kid=String(t.kid));var i=[],a=function(e){return(!t.kty||!e.kty||t.kty===e.kty)&&(!t.use||!e.use||t.use===e.use)&&(!t.alg||("dir"===t.alg||!e.alg||t.alg===e.alg)&&e.supports(t.alg))};return Object.keys(r).forEach((function(e){if(!t.kid||t.kid===e){var n=r[e].filter(a);n.length&&(i=i.concat(n))}})),!n&&e&&(i=i.concat(e.all(t))),i}}),Object.defineProperty(this,"get",{value:function(t,r,i){"boolean"==typeof t?(i=t,r=t=null):"object"===n(t)&&(i=r,r=t,t=null),r=r||{},t&&(r.kid=t),void 0!==r.kid&&null!==r.kid&&"string"!=typeof r.kid&&(r.kid=String(r.kid));var a=this.all(r,!0);return a.length||!e||i||(a=e.get(r,i)),a[0]||null}}),Object.defineProperty(this,"temp",{value:function(){return new f(t,this)}}),Object.defineProperty(this,"toJSON",{value:function(t){var e=[];return Object.keys(r).forEach((function(n){var i=r[n].map((function(e){return e.toJSON(t)}));e=e.concat(i)})),{keys:e}}})};f.isKeyStore=function(t){return!!t&&"object"===n(t)&&"function"==typeof t.get&&"function"==typeof t.all&&"function"==typeof t.generate&&"function"==typeof t.add&&"function"==typeof t.remove},f.createKeyStore=function(){return new f(l)},f.asKeyStore=function(t){if(f.isKeyStore(t))return Promise.resolve(t);var e,r=f.createKeyStore();if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t))e=t;else{if(!("keys"in t))return Promise.reject(new Error("invalid keystore"));e=t.keys}e=e.map((function(t){return r.add(t)}));var n=Promise.all(e);return n.then((function(){return r}))},f.isKey=function(t){return!!t&&"object"===n(t)&&!!f.isKeyStore(t.keystore)&&"string"==typeof t.kty&&"number"==typeof t.length&&"function"==typeof t.algorithms&&"function"==typeof t.supports&&"function"==typeof t.encrypt&&"function"==typeof t.decrypt&&"function"==typeof t.wrap&&"function"==typeof t.unwrap&&"function"==typeof t.sign&&"function"==typeof t.verify},f.createKey=function(t,e,r){return f.createKeyStore().generate(t,e,r)},f.asKey=function(t,e,r){return f.isKey(t)?Promise.resolve(t):t=f.createKeyStore().add(t,e,r)},t.exports={KeyRegistry:c,KeyStore:f,registry:l}},5533:(t,e,r)=>{"use strict";var n=r(246),i={BaseKey:r(5929),helpers:r(731)},a=["HS256","HS384","HS512"],o=["A128GCM","A192GCM","A256GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512","A128CBC+HS256","A192CBC+HS384","A256CBC+HS512"],s=["A128KW","A192KW","A256KW","A128GCMKW","A192GCMKW","A256GCMKW","PBES2-HS256+A128KW","PBES2-HS384+A192KW","PBES2-HS512+A256KW","dir"];function u(t,e){return"iv"in e&&(e.iv=Buffer.isBuffer(e.iv)?e.iv:n.base64url.decode(e.iv||"")),"adata"in e&&(e.adata=Buffer.isBuffer(e.adata)?e.adata:Buffer.from(e.adata||"","utf8")),"mac"in e&&(e.mac=Buffer.isBuffer(e.mac)?e.mac:n.base64url.decode(e.mac||"")),"tag"in e&&(e.tag=Buffer.isBuffer(e.tag)?e.tag:n.base64url.decode(e.tag||"")),e}function c(t,e){return"iv"in e&&(e.iv=Buffer.isBuffer(e.iv)?e.iv:n.base64url.decode(e.iv||"")),"adata"in e&&(e.adata=Buffer.isBuffer(e.adata)?e.adata:Buffer.from(e.adata||"","utf8")),e}var l={publicKey:function(t){var e=i.helpers.COMMON_PROPS.concat([]);return i.helpers.unpackProps(t,e)},privateKey:function(t){var e,r=i.helpers.COMMON_PROPS.concat([{name:"k",type:"binary"}]);return(e=i.helpers.unpackProps(t,r))&&e.k?e.length=8*e.k.length:e=void 0,e},thumbprint:function(t){return t.private&&(t=t.private),{k:t.k||"",kty:"oct"}},algorithms:function(t,e){var r=t.private&&8*t.private.k.length,n=[256,384,512];if(!r)return[];switch(e){case"encrypt":case"decrypt":return o.filter((function(t){return t==="A"+r/2+"CBC-HS"+r||t==="A"+r/2+"CBC+HS"+r||t==="A"+r+"GCM"}));case"sign":case"verify":return a.filter((function(t){var e=!1;return n.forEach((function(n){n>r||(e|=t==="HS"+n)})),e}));case"wrap":case"unwrap":return s.filter((function(t){return t==="A"+r+"KW"||t==="A"+r+"GCMKW"||0===t.indexOf("PBES2-")||"dir"===t}))}return[]},encryptKey:function(t,e){return e.private&&e.private.k},encryptProps:c,decryptKey:function(t,e){return e.private&&e.private.k},decryptProps:u,wrapKey:function(t,e){return e.private&&e.private.k},wrapProps:c,unwrapKey:function(t,e){return e.private&&e.private.k},unwrapProps:u,signKey:function(t,e){return e.private&&e.private.k},verifyKey:function(t,e){return e.private&&e.private.k}},f={kty:"oct",prepare:function(t){var e=l,r=Promise.resolve(t);return(r=r.then((function(t){return i.helpers.thumbprint(e,t)}))).then((function(r){var n={};return n[i.helpers.INTERNALS.THUMBPRINT_HASH]=r,t[i.helpers.INTERNALS.THUMBPRINT_KEY]=n,e}))},generate:function(t){var e=n.randomBytes(t/8);return Promise.resolve({k:e})}};t.exports=Object.freeze({config:l,factory:f}),r(5736).registry.register(f)},2637:(t,e,r)=>{"use strict";var n=r(9943),i=r(6463),a=r(1933).nodeCrypto,o={BaseKey:r(5929),helpers:r(731)},s=["RS256","RS384","RS512","PS256","PS384","PS512"],u=["RSA-OAEP","RSA-OAEP-256","RSA1_5"],c={publicKey:function(t){var e,r=o.helpers.COMMON_PROPS.concat([{name:"n",type:"binary"},{name:"e",type:"binary"}]);return(e=o.helpers.unpackProps(t,r))&&e.n&&e.e?e.length=8*e.n.length:(delete e.e,delete e.n),e},privateKey:function(t){var e,r=o.helpers.COMMON_PROPS.concat([{name:"n",type:"binary"},{name:"e",type:"binary"},{name:"d",type:"binary"},{name:"p",type:"binary"},{name:"q",type:"binary"},{name:"dp",type:"binary"},{name:"dq",type:"binary"},{name:"qi",type:"binary"}]);return(e=o.helpers.unpackProps(t,r))&&e.d&&e.n&&e.e&&e.p&&e.q&&e.dp&&e.dq&&e.qi?e.length=8*e.d.length:e=void 0,e},thumbprint:function(t){return t.public&&(t=t.public),{e:t.e,kty:"RSA",n:t.n}},algorithms:function(t,e){switch(e){case"encrypt":case"decrypt":return[];case"wrap":return t.public&&u.slice()||[];case"unwrap":return t.private&&u.slice()||[];case"sign":return t.private&&s.slice()||[];case"verify":return t.public&&s.slice()||[]}return[]},wrapKey:function(t,e){return e.public},unwrapKey:function(t,e){return e.private},signKey:function(t,e){return e.private},verifyKey:function(t,e){return e.public},convertToPEM:function(t,e){var r=i.convertToForge(t,!e);return e?n.pki.privateKeyToPem(r):n.pki.publicKeyToPem(r)}},l={oid:"1.2.840.113549.1.1.1",privateKey:{name:"RSAPrivateKey",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"version"},{name:"RSAPrivateKey.modulus",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"n"},{name:"RSAPrivateKey.publicExponent",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"e"},{name:"RSAPrivateKey.privateExponent",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"d"},{name:"RSAPrivateKey.prime1",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"p"},{name:"RSAPrivateKey.prime2",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"q"},{name:"RSAPrivateKey.exponent1",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"dp"},{name:"RSAPrivateKey.exponent2",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"dq"},{name:"RSAPrivateKey.coefficient",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"qi"}]},publicKey:{name:"RSAPublicKey",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"n"},{name:"RSAPublicKey.exponent",tagClass:n.asn1.Class.UNIVERSAL,type:n.asn1.Type.INTEGER,constructed:!1,capture:"e"}]}},f={kty:"RSA",validators:l,prepare:function(t){var e=c,r=Promise.resolve(t);return(r=r.then((function(t){return o.helpers.thumbprint(e,t)}))).then((function(r){var n={};return n[o.helpers.INTERNALS.THUMBPRINT_HASH]=r,t[o.helpers.INTERNALS.THUMBPRINT_KEY]=n,e}))},generate:function(t){var e;if(a)e=new Promise((function(e,r){n.pki.rsa.generateKeyPair({bits:t,e:65537},(function(t,n){if(t)return r(t);e(n.privateKey)}))}));else{var r=n.pki.rsa.generateKeyPair({bits:t,e:65537});e=Promise.resolve(r.privateKey)}return e.then((function(t){var e={};return["e","n","d","p","q",{incoming:"dP",outgoing:"dp"},{incoming:"dQ",outgoing:"dq"},{incoming:"qInv",outgoing:"qi"}].forEach((function(r){var n,i,a;"string"==typeof r?n=i=r:(n=r.incoming,i=r.outgoing),n in t&&(e[i]=((a=(a=t[n]).toString(16)).length%2&&(a="0"+a),Buffer.from(a,"hex")))})),e}))},import:function(t){if(l.oid!==t.keyOid)return null;if(!t.parsed){"string"==typeof t.keyValue?t.keyValue=n.asn1.fromDer(t.keyValue):Array.isArray(t.keyValue)&&(t.keyValue=t.keyValue[0]);var e="private"===t.type?l.privateKey:l.publicKey,r={};if(!n.asn1.validate(t.keyValue,e,r,[]))return null;t=r}var i={kty:"RSA"};return["n","e","d","p","q","dp","dq","qi"].forEach((function(e){if(e in t){var r=Buffer.from(t[e],"binary");0===r[0]&&(r=r.slice(1)),i[e]=r}})),i}};t.exports=Object.freeze({config:c,factory:f}),r(5736).registry.register(f)},3302:t=>{"use strict";t.exports={compact:!1,protect:"*"}},7539:t=>{"use strict";t.exports={slice:function(t,e){return Array.prototype.slice.call(t,e||0)}}},4802:(t,e,r)=>{"use strict";var n={createSign:r(8633).createSign,createVerify:r(1777).createVerify};t.exports=n},8633:(t,e,r)=>{"use strict";var n=r(4350),i=r(246),a=r(5178),o=r(7539).slice,s=r(4127),u=r(5525),c=r(3302),l=function(t,e){var r=!1,n=t.format||"general",a=Buffer.alloc(0);Object.defineProperty(this,"compact",{get:function(){return"compact"===n},enumerable:!0}),Object.defineProperty(this,"format",{get:function(){return n},enumerable:!0}),Object.defineProperty(this,"update",{value:function(t,e){if(r)throw new Error("already final");return null!=t&&(t=i.asBuffer(t,e),a=a.length?Buffer.concat([a,t],a.length+t.length):t),this}}),Object.defineProperty(this,"final",{value:function(t,o){if(r)return Promise.reject(new Error("already final"));var u;switch(this.update(t,o),r=!0,u=(u=Promise.all(e)).then((function(t){return a=i.base64url.encode(a),t=t.map((function(t){var e={},r=0,n=s(t.header),o=Object.keys(n).length;t.protected.forEach((function(t){t in n&&(e[t]=n[t],r++,delete n[t],o--)})),r>0?(e=JSON.stringify(e),e=i.base64url.encode(e)):e="";var u=Buffer.from(e+"."+a,"ascii");return(t=t.key.sign(t.header.alg,u,t.header)).then((function(t){var a={};return 0<r&&(a.protected=e),0<o&&(a.header=n),a.signature=i.base64url.encode(t.mac),a}))})),t=[Promise.resolve(a)].concat(t),Promise.all(t)})),u=u.then((function(t){return{payload:t[0],signatures:t.slice(1)}})),n){case"compact":u=u.then((function(t){var e=[t.signatures[0].protected,t.payload,t.signatures[0].signature];return e.join(".")}));break;case"flattened":u=u.then((function(t){var e={};e.payload=t.payload;var r=t.signatures[0];return r.protected&&(e.protected=r.protected),r.header&&(e.header=r.header),e.signature=r.signature,e}))}return u}})};t.exports={signer:l,createSign:function(t,e){var r=t,i=1,f=e;if(0===arguments.length)throw new Error("at least one signatory must be provided");1===arguments.length||a.isKey(t)||t&&"kty"in t||t&&"key"in t&&(a.isKey(t.key)||"kty"in t.key)?(f=t,i=0,r={}):r=s(t),Array.isArray(f)||(f=o(arguments,i));var h=(r=n(s(c),r)).fields||{},p=r.format;if(p||(p=r.compact?"compact":"general"),("compact"===p||"flattened"===p)&&1<f.length)throw new Error("too many signatories for compact or flattened JSON serialization");var d="*"===r.protect;return r.compact&&(d=!0),f=f.map((function(t,e){return(t&&"kty"in t?a.asKey(t).then((function(t){return{key:t}})):t?a.asKey(t.key).then((function(e){return{header:t.header,reference:t.reference,protect:t.protect,key:e}})):Promise.reject(new Error("missing key for signatory "+e))).then((function(t){var e=t.key,r=t.header||{};r=n(n({},h),r),t.header=r,r.alg||(r.alg=e.algorithms(a.MODE_SIGN)[0]||"");var i,o=t.reference;if(delete t.reference,void 0===o?o=(o=["kid","jku","x5c","x5t","x5u"].some((function(t){return t in r})))?null:"kid":"boolean"==typeof o&&(o=o?"kid":null),o)if(i=e.toJSON(),"jwk"===o){if("oct"===e.kty)return Promise.reject(new Error("cannot embed key"));r.jwk=i}else o in i&&(r[o]=i[o]);var s=t.protect;if(d||"*"===s)s=Object.keys(r);else if("string"===s)s=[s];else if(Array.isArray(s))s=s.concat();else{if(s)return Promise.reject(new Error("protect must be a list of fields"));s=[]}return s=u(s),t.protected=s,Object.freeze(t)}))})),new l({format:p},f)}}},1777:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(4127),a=r(4350),o=r(6018),s=r(6342),u=r(5178),c={algorithms:"*",allowEmbeddedKey:!1},l=function(t,e){var r,l;l=u.isKey(t)?(r=t).keystore:u.isKeyStore(t)?t:u.createKeyStore(),e=a(c,e),Object.defineProperty(this,"defaultKey",{value:r||void 0,enumerable:!0}),Object.defineProperty(this,"keystore",{value:l,enumerable:!0}),Object.defineProperty(this,"verify",{value:function(t,c){var f=(c=a({},e,c||{})).handlers||{},h=Object.keys(f),p=new s(c.algorithms);if("string"==typeof t)t={payload:(t=t.split("."))[1],signatures:[{protected:t[0],signature:t[2]}]};else if(!t||"object"!==n(t))throw new Error("invalid input");t.signature&&(t.signatures=[{protected:t.protected||void 0,header:t.header||void 0,signature:t.signature}]);var d=t.signatures||[{}];d=d.map((function(t){var e=i(t.header||{}),r=t.protected?JSON.parse(o.decode(t.protected,"utf8")):{};e=a(e,r);var n=o.decode(t.signature);if(!p.match(e.alg))return Promise.reject(new Error("Algorithm not allowed: "+e.alg));var s=r.crit;if(s){if(!Array.isArray(s))return Promise.reject(new Error("Invalid 'crit' header"));for(var u=0;s.length>u;u++)if(-1===h.indexOf(s[u]))return Promise.reject(new Error("Critical extension is not supported: "+s[u]))}return r=Object.keys(r),Promise.resolve({protected:r,aad:t.protected||"",header:e,signature:n})}));var y=Promise.all(d);return y=y.then((function(e){return new Promise((function(i,s){var p=function(){var d=e.shift();if(d){d=a({},d,{payload:t.payload});var y=Promise.resolve(d);y=y.then((function(t){var e;return c.allowEmbeddedKey&&t.header.jwk?e=u.asKey(t.header.jwk):c.allowEmbeddedKey&&t.header.x5c?(e=t.header.x5c[0],e=Buffer.from(e,"base64"),e=u.asKey(e,"pkix")):e=Promise.resolve(r||l.get({use:"sig",alg:t.header.alg,kid:t.header.kid})),e.then((function(e){return e?(t.key=e,t):Promise.reject(new Error("key does not match"))}))})),y=y.then((function(t){var e=[];return h.forEach((function(r){var i;"function"==typeof(r=f[r])?i=r(t):"object"===n(r)&&"function"==typeof r.prepare&&(i=r.prepare(t)),i&&e.push(Promise.resolve(i))})),Promise.all(e).then((function(){return t}))})),y=y.then((function(t){var e=t.aad||"",r=t.payload||"",n=Buffer.alloc(1+e.length+r.length),i=0;return n.write(e,i,"ascii"),i+=e.length,n.write(".",i,"ascii"),i++,Buffer.isBuffer(r)?r.copy(n,i):n.write(r,i,"binary"),t.content=n,t})),y=y.then((function(t){return t.key.verify(t.header.alg,t.content,t.signature)})),(y=(y=y.then((function(t){var e=d.payload;return e=o.decode(e),{protected:d.protected,header:d.header,payload:e,signature:t.mac,key:d.key}}))).then((function(t){var e=[];return h.forEach((function(r){var i;"object"===n(r=f[r])&&"function"==typeof r.complete&&(i=r.complete(t)),i&&e.push(Promise.resolve(i))})),Promise.all(e).then((function(){return t}))}))).then(i,p)}else s(new Error("no key found"))};p()}))})),y}})};t.exports={verifier:l,createVerify:function(t,e){return new l(t,e)}}},4708:(t,e,r)=>{"use strict";var n={JWE:r(7116),JWS:r(4802),util:r(246)};t.exports=function(t){var e,r,i,a=t.split(".");if(3===a.length)e="JWS",r=function(e,r){return n.JWS.createVerify(e).verify(t,r)};else{if(5!==a.length)throw new TypeError("invalid jose serialization");e="JWE",r=function(e,r){return n.JWE.createDecrypt(e).decrypt(t,r)}}return i=n.util.base64url.decode(a[0],"utf8"),i=JSON.parse(i),{type:e,format:"compact",input:t,header:i,perform:r}}},2049:(t,e,r)=>{"use strict";var n=r(4708),i=r(3507),a=t.exports=function(t){if(Buffer.isBuffer(t))return n(t.toString("ascii"));if("string"==typeof t)return n(t);if(t)return i(t);throw new TypeError("invalid input")};a.compact=n,a.json=i},3507:(t,e,r)=>{"use strict";var n=r(4350),i={JWE:r(7116),JWS:r(4802),util:r(246)};t.exports=function(t){var e,r,a;if("signatures"in t||"signature"in t)e="JWS",r=function(e,r){return i.JWS.createVerify(e).verify(t,r)},a=(a=t.signatures||[{protected:t.protected,header:t.header,signature:t.signature}]).map((function(t){var e,r={};return t.header&&(r=n(r,t.header)),t.protected&&(e=t.protected,e=i.util.base64url.decode(e,"utf8"),e=JSON.parse(e),r=n(r,e)),r}));else if("ciphertext"in t){e="JWE",r=function(e,r){return i.JWE.createDecrypt(e).decrypt(t,r)};var o={};t.protected&&(o.protected=t.protected,o.protected=i.util.base64url.decode(o.protected,"utf8"),o.protected=JSON.parse(o.protected)),t.unprotected&&(o.unprotected=t.unprotected),a=(a=t.recipients||[{}]).map((function(t){var e={};return t.header&&(e=n(e,t.header)),o.unprotected&&(e=n(e,o.unprotected)),o.protected&&(e=n(e,o.protected)),e}))}return{type:e,format:"json",input:t,all:a,perform:r}}},6342:t=>{"use strict";function e(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}t.exports=function(t){t?"string"==typeof t&&(t=t.split(" ")):t=[];var r,n=[],i=[],a=[],o=[],s=/^(!)?([^*]*)(\*?)([^*]*)$/;t.forEach((function(t){if(t){s.lastIndex=0;var u=s.exec(t);u&&(r="("+function(t,r,n){var i=[];return i.push("^"),t&&(t=e(t),i.push(t)),r&&i.push(t||n?".*":".+"),n&&(n=e(n),i.push(n)),i.push("$"),i.join("")}(u[2],u[3],u[4])+")",u[1]?(o.push(r),i.push(u[0])):(a.push(r),n.push(u[0])))}})),a=a.length?new RegExp(a.join("|")):null,o=o.length?new RegExp(o.join("|")):null,n.length||(n=["*"]),Object.defineProperty(this,"spec",{value:n.join(" ")+" "+i.join(" "),enumerable:!0}),Object.defineProperty(this,"match",{value:function(t){var e=Boolean(t);return e&&a&&(a.lastIndex=0,e=a.test(t)),e&&o&&(o.lastIndex=0,e=!o.test(t)),e}})}},6018:(t,e,r)=>{"use strict";var n=r(4085),i={encode:function(t,e){return t instanceof ArrayBuffer&&(t=new Uint8Array(t)),Buffer.isBuffer(t)||(t=Buffer.from(t,e)),n.encode(t)},decode:n.toBuffer};t.exports=i},2926:(t,e,r)=>{"use strict";var n=r(9943),i=r(6018);function a(t,e){e=e||{},Buffer.isBuffer(t)?this.data=t:n.util.isArrayBuffer(t)?(t=new Uint8Array(t),this.data=Buffer.from(t)):n.util.isArrayBufferView(t)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),this.data=Buffer.from(t)),this.data&&(this.write=this.data.length,t=void 0),this.growSize=e.growSize||a.DEFAULT_GROW_SIZE,this.write=this.write||0,this.read=this.read||0,t?this.putBytes(t):this.data||this.accommodate(0),e.readOffset="readOffset"in e?e.readOffset:this.read,this.write="writeOffset"in e?e.writeOffset:this.write,this.read=Math.min(e.readOffset,this.write)}a.DEFAULT_GROW_SIZE=16,a.prototype.length=function(){return this.write-this.read},a.prototype.available=function(){return this.data.length-this.write},a.prototype.isEmpty=function(){return this.length()<=0},a.prototype.accommodate=function(t){if(this.data){if(this.available()<t){t=Math.max(t,this.growSize);var e=this.data,r=Buffer.alloc(e.length+t);e.copy(r,0),this.data=r}}else t=Math.max(this.write+t,this.growSize),this.data=Buffer.alloc(t);return this.data.fill(0,this.write),this},a.prototype.clear=function(){return this.read=this.write=0,this.data=Buffer.alloc(0),this},a.prototype.truncate=function(t){return this.write=this.read+Math.max(0,this.length()-t),this.data.fill(0,this.write),this},a.prototype.compact=function(){return this.read>0&&(this.write===this.read?this.read=this.write=0:(this.data.copy(this.data,0,this.read,this.write),this.write=this.write-this.read,this.read=0),this.data.fill(0,this.write)),this},a.prototype.copy=function(){return new a(this,{readOffset:this.read,writeOffset:this.write,growSize:this.growSize})},a.prototype.equals=function(t){if(!a.isBuffer(t))return!1;if(t.length()!==this.length())return!1;for(var e=!0,r=this.read-t.read,n=t.read;t.write>n;n++)e=e&&this.data[n+r]===t.data[n];return e},a.prototype.at=function(t){return this.data[this.read+t]},a.prototype.setAt=function(t,e){return this.data[this.read+t]=e,this},a.prototype.last=function(){return this.data[this.write-1]},a.prototype.bytes=function(t){var e;if(void 0===t?t=this.length():t&&(t=Math.min(t,this.length())),0===t)e="";else{var r=this.read,n=r+t,i=this.data.slice(r,n);e=String.fromCharCode.apply(null,i)}return e},a.prototype.buffer=function(t){var e;if(void 0===t?t=this.length():t&&(t=Math.min(t,this.length())),0===t)e=new ArrayBuffer(0);else{var r=this.read,n=r+t,i=this.data.slice(r,n);(e=new Uint8Array(n-r)).set(i)}return e},a.prototype.native=function(t){var e;if(void 0===t?t=this.length():t&&(t=Math.min(t,this.length())),0===t)e=Buffer.alloc(0);else{var r=this.read,n=r+t;e=this.data.slice(r,n)}return e},a.prototype.toHex=function(){return this.toString("hex")},a.prototype.toString=function(t){if(0===this.length())return"";var e=this.data.slice(this.read,this.write);switch(t=t||"utf8"){case"raw":return e.toString("binary");case"base64url":return i.encode(e);case"utf16":return e.toString("ucs2");default:return e.toString(t)}},a.prototype.fillWithByte=function(t,e){return e||(e=this.available()),this.accommodate(e),this.data.fill(t,this.write,this.write+e),this.write+=e,this},a.prototype.getBuffer=function(t){var e=this.buffer(t);return this.read+=e.byteLength,e},a.prototype.putBuffer=function(t){return this.putBytes(t)},a.prototype.getBytes=function(t){var e=this.bytes(t);return this.read+=e.length,e},a.prototype.putBytes=function(t,e){if("string"==typeof t){switch(e=e||"binary"){case"utf16":e="ucs-2";break;case"raw":e="binary";break;case"base64url":t=i.decode(t)}Buffer.isBuffer(t)||(t=Buffer.from(t,e))}var r,o;if(t instanceof a){var s=t;t=s.data.slice(s.read,s.write),s.read=s.write}else t instanceof n.util.ByteStringBuffer&&(t=t.getBytes());if(Buffer.isBuffer(t))r=t;else if(Array.isArray(t))r=Buffer.from(t);else if(n.util.isArrayBuffer(t))r=new Uint8Array(t),r=Buffer.from(r);else{if(!n.util.isArrayBufferView(t))throw new TypeError("invalid source type");r=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=Buffer.from(r)}return this.accommodate(r.length),o=this.data,r.copy(o,this.write),this.write+=r.length,this},a.prototype.getNative=function(t){var e=this.native(t);return this.read+=e.length,e},a.prototype.putNative=a.prototype.putBuffer,a.prototype.getByte=function(){var t=this.data[this.read];return this.read=Math.min(this.read+1,this.write),t},a.prototype.putByte=function(t){return this.accommodate(1),this.data[this.write]=255&t,this.write++,this},a.prototype.getInt16=function(){var t=this.data[this.read]<<8^this.data[this.read+1];return this.read=Math.min(this.read+2,this.write),t},a.prototype.putInt16=function(t){return this.accommodate(2),this.data[this.write]=t>>>8&255,this.data[this.write+1]=255&t,this.write+=2,this},a.prototype.getInt24=function(){var t=this.data[this.read]<<16^this.data[this.read+1]<<8^this.data[this.read+2];return this.read=Math.min(this.read+3,this.write),t},a.prototype.putInt24=function(t){return this.accommodate(3),this.data[this.write]=t>>>16&255,this.data[this.write+1]=t>>>8&255,this.data[this.write+2]=255&t,this.write+=3,this},a.prototype.getInt32=function(){var t=this.data[this.read]<<24^this.data[this.read+1]<<16^this.data[this.read+2]<<8^this.data[this.read+3];return this.read=Math.min(this.read+4,this.write),t},a.prototype.putInt32=function(t){return this.accommodate(4),this.data[this.write]=t>>>24&255,this.data[this.write+1]=t>>>16&255,this.data[this.write+2]=t>>>8&255,this.data[this.write+3]=255&t,this.write+=4,this},a.prototype.getInt16Le=function(){var t=this.data[this.read+1]<<8^this.data[this.read];return this.read=Math.min(this.read+2,this.write),t},a.prototype.putInt16Le=function(t){return this.accommodate(2),this.data[this.write+1]=t>>>8&255,this.data[this.write]=255&t,this.write+=2,this},a.prototype.getInt24Le=function(){var t=this.data[this.read+2]<<16^this.data[this.read+1]<<8^this.data[this.read];return this.read=Math.min(this.read+3,this.write),t},a.prototype.putInt24Le=function(t){return this.accommodate(3),this.data[this.write+2]=t>>>16&255,this.data[this.write+1]=t>>>8&255,this.data[this.write]=255&t,this.write+=3,this},a.prototype.getInt32Le=function(){var t=this.data[this.read+3]<<24^this.data[this.read+2]<<16^this.data[this.read+1]<<8^this.data[this.read];return this.read=Math.min(this.read+4,this.write),t},a.prototype.putInt32Le=function(t){return this.accommodate(4),this.data[this.write+3]=t>>>24&255,this.data[this.write+2]=t>>>16&255,this.data[this.write+1]=t>>>8&255,this.data[this.write]=255&t,this.write+=4,this},a.prototype.getInt=function(t){var e=0;do{e=e<<8|this.getByte(),t-=8}while(t>0);return e},a.prototype.putInt=function(t,e){this.accommodate(Math.ceil(e/8));do{e-=8,this.putByte(t>>e&255)}while(e>0);return this},a.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<<e-1),this.putInt(t,e)},a.prototype.putString=function(t){return this.putBytes(t,"utf16")},a.isBuffer=function(t){return t instanceof a},a.asBuffer=function(t){return a.isBuffer(t)?t:t?new a(t):new a},t.exports=a},246:(t,e,r)=>{"use strict";var n,i=r(9943);n={base64url:r(6018),utf8:r(2375),asBuffer:function(t,e){return Buffer.isBuffer(t)?t:"string"==typeof t?"base64url"===(e=e||"binary")?n.base64url.decode(t):Buffer.from(t,e):(i.util.isArrayBufferView(t)?t=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteOffset+t.byteLength):i.util.isArrayBuffer(t)&&(t=new Uint8Array(t)),Buffer.from(t))},randomBytes:function(t){return Buffer.from(i.random.getBytes(t),"binary")}},t.exports=n},4350:(t,e,r)=>{"use strict";var n,i=r(2405),a=r(8402),o=(n=[],"undefined"!=typeof Uint8ClampedArray&&n.push(Uint8ClampedArray),"undefined"!=typeof Uint8Array&&n.push(Uint8Array),"undefined"!=typeof Uint16Array&&n.push(Uint16Array),"undefined"!=typeof Uint32Array&&n.push(Uint32Array),"undefined"!=typeof Float32Array&&n.push(Float32Array),"undefined"!=typeof Float64Array&&n.push(Float64Array),n);t.exports=i(a,(function(t,e){if(Buffer.isBuffer(e))e=Buffer.from(e);else{var r=function(t){for(var e,r=0;!e&&o.length>r;r++)t instanceof o[r]&&(e=o[r]);return e}(e);e=r?new r(e,e.byteOffset,e.byteLength):void 0}return e}))},2375:(t,e)=>{"use strict";var r=e;r.encode=function(t){var e=encodeURIComponent(t||"");return e.replace(/%([0-9a-fA-F]{2})/g,(function(t,e){return e=parseInt(e,16),String.fromCharCode(e)}))},r.decode=function(t){var e=(t||"").replace(/[\u0080-\u00ff]/g,(function(t){return"%"+(256|t.charCodeAt(0)).toString(16).substring(1)}));return decodeURIComponent(e)}},9950:(t,e,r)=>{"use strict";var n=r(9441),i=n.Deflate,a=n.deflate,o=n.deflateRaw,s=n.gzip,u=r(9481),c=u.Inflate,l=u.inflate,f=u.inflateRaw,h=u.ungzip,p=r(3524);t.exports.Deflate=i,t.exports.deflate=a,t.exports.deflateRaw=o,t.exports.gzip=s,t.exports.Inflate=c,t.exports.inflate=l,t.exports.inflateRaw=f,t.exports.ungzip=h,t.exports.constants=p},9441:(t,e,r)=>{"use strict";var n=r(5213),i=r(8765),a=r(8166),o=r(7684),s=r(5788),u=Object.prototype.toString,c=r(3524),l=c.Z_NO_FLUSH,f=c.Z_SYNC_FLUSH,h=c.Z_FULL_FLUSH,p=c.Z_FINISH,d=c.Z_OK,y=c.Z_STREAM_END,g=c.Z_DEFAULT_COMPRESSION,v=c.Z_DEFAULT_STRATEGY,m=c.Z_DEFLATED;function E(t){this.options=i.assign({level:g,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:v},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==d)throw new Error(o[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var c;if(c="string"==typeof e.dictionary?a.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=n.deflateSetDictionary(this.strm,c))!==d)throw new Error(o[r]);this._dict_set=!0}}function C(t,e){var r=new E(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}E.prototype.push=function(t,e){var r,i,o=this.strm,s=this.options.chunkSize;if(this.ended)return!1;for(i=e===~~e?e:!0===e?p:l,"string"==typeof t?o.input=a.string2buf(t):"[object ArrayBuffer]"===u.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;;)if(0===o.avail_out&&(o.output=new Uint8Array(s),o.next_out=0,o.avail_out=s),(i===f||i===h)&&o.avail_out<=6)this.onData(o.output.subarray(0,o.next_out)),o.avail_out=0;else{if((r=n.deflate(o,i))===y)return o.next_out>0&&this.onData(o.output.subarray(0,o.next_out)),r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===d;if(0!==o.avail_out){if(i>0&&o.next_out>0)this.onData(o.output.subarray(0,o.next_out)),o.avail_out=0;else if(0===o.avail_in)break}else this.onData(o.output)}return!0},E.prototype.onData=function(t){this.chunks.push(t)},E.prototype.onEnd=function(t){t===d&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Deflate=E,t.exports.deflate=C,t.exports.deflateRaw=function(t,e){return(e=e||{}).raw=!0,C(t,e)},t.exports.gzip=function(t,e){return(e=e||{}).gzip=!0,C(t,e)},t.exports.constants=r(3524)},9481:(t,e,r)=>{"use strict";var n=r(7133),i=r(8765),a=r(8166),o=r(7684),s=r(5788),u=r(7924),c=Object.prototype.toString,l=r(3524),f=l.Z_NO_FLUSH,h=l.Z_FINISH,p=l.Z_OK,d=l.Z_STREAM_END,y=l.Z_NEED_DICT,g=l.Z_STREAM_ERROR,v=l.Z_DATA_ERROR,m=l.Z_MEM_ERROR;function E(t){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==p)throw new Error(o[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=a.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==p))throw new Error(o[r])}function C(t,e){var r=new E(e);if(r.push(t),r.err)throw r.msg||o[r.err];return r.result}E.prototype.push=function(t,e){var r,i,o,s=this.strm,u=this.options.chunkSize,l=this.options.dictionary;if(this.ended)return!1;for(i=e===~~e?e:!0===e?h:f,"[object ArrayBuffer]"===c.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(u),s.next_out=0,s.avail_out=u),(r=n.inflate(s,i))===y&&l&&((r=n.inflateSetDictionary(s,l))===p?r=n.inflate(s,i):r===v&&(r=y));s.avail_in>0&&r===d&&s.state.wrap>0&&0!==t[s.next_in];)n.inflateReset(s),r=n.inflate(s,i);switch(r){case g:case v:case y:case m:return this.onEnd(r),this.ended=!0,!1}if(o=s.avail_out,s.next_out&&(0===s.avail_out||r===d))if("string"===this.options.to){var E=a.utf8border(s.output,s.next_out),C=s.next_out-E,b=a.buf2string(s.output,E);s.next_out=C,s.avail_out=u-C,C&&s.output.set(s.output.subarray(E,E+C),0),this.onData(b)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(r!==p||0!==o){if(r===d)return r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},E.prototype.onData=function(t){this.chunks.push(t)},E.prototype.onEnd=function(t){t===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},t.exports.Inflate=E,t.exports.inflate=C,t.exports.inflateRaw=function(t,e){return(e=e||{}).raw=!0,C(t,e)},t.exports.ungzip=C,t.exports.constants=r(3524)},8765:t=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var r=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};t.exports.assign=function(t){for(var n=Array.prototype.slice.call(arguments,1);n.length;){var i=n.shift();if(i){if("object"!==e(i))throw new TypeError(i+"must be non-object");for(var a in i)r(i,a)&&(t[a]=i[a])}}return t},t.exports.flattenChunks=function(t){for(var e=0,r=0,n=t.length;r<n;r++)e+=t[r].length;for(var i=new Uint8Array(e),a=0,o=0,s=t.length;a<s;a++){var u=t[a];i.set(u,o),o+=u.length}return i}},8166:t=>{"use strict";var e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e=!1}for(var r=new Uint8Array(256),n=0;n<256;n++)r[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;r[254]=r[254]=1,t.exports.string2buf=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,r,n,i,a,o=t.length,s=0;for(i=0;i<o;i++)55296==(64512&(r=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=t.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),a=0,i=0;a<s;i++)55296==(64512&(r=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=t.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?e[a++]=r:r<2048?(e[a++]=192|r>>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},t.exports.buf2string=function(t,n){var i,a,o=n||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,n));var s=new Array(2*o);for(a=0,i=0;i<o;){var u=t[i++];if(u<128)s[a++]=u;else{var c=r[u];if(c>4)s[a++]=65533,i+=c-1;else{for(u&=2===c?31:3===c?15:7;c>1&&i<o;)u=u<<6|63&t[i++],c--;c>1?s[a++]=65533:u<65536?s[a++]=u:(u-=65536,s[a++]=55296|u>>10&1023,s[a++]=56320|1023&u)}}}return function(t,r){if(r<65534&&t.subarray&&e)return String.fromCharCode.apply(null,t.length===r?t:t.subarray(0,r));for(var n="",i=0;i<r;i++)n+=String.fromCharCode(t[i]);return n}(s,a)},t.exports.utf8border=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+r[t[n]]>e?n:e}},959:t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,a=t>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+e[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16}},3524:t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2073:t=>{"use strict";var e=new Uint32Array(function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}());t.exports=function(t,r,n,i){var a=e,o=i+n;t^=-1;for(var s=i;s<o;s++)t=t>>>8^a[255&(t^r[s])];return~t}},5213:(t,e,r)=>{"use strict";var n=r(607),i=n._tr_init,a=n._tr_stored_block,o=n._tr_flush_block,s=n._tr_tally,u=n._tr_align,c=r(959),l=r(2073),f=r(7684),h=r(3524),p=h.Z_NO_FLUSH,d=h.Z_PARTIAL_FLUSH,y=h.Z_FULL_FLUSH,g=h.Z_FINISH,v=h.Z_BLOCK,m=h.Z_OK,E=h.Z_STREAM_END,C=h.Z_STREAM_ERROR,b=h.Z_DATA_ERROR,S=h.Z_BUF_ERROR,w=h.Z_DEFAULT_COMPRESSION,A=h.Z_FILTERED,T=h.Z_HUFFMAN_ONLY,I=h.Z_RLE,B=h.Z_FIXED,_=h.Z_DEFAULT_STRATEGY,k=h.Z_UNKNOWN,N=h.Z_DEFLATED,R=258,P=262,F=42,x=113,U=666,O=function(t,e){return t.msg=f[e],e},L=function(t){return 2*t-(t>4?9:0)},D=function(t){for(var e=t.length;--e>=0;)t[e]=0},K=function(t){var e,r,n,i=t.w_size;n=e=t.hash_size;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);n=e=i;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)},j=function(t,e,r){return(e<<t.hash_shift^r)&t.hash_mask},V=function(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},M=function(t,e){o(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,V(t.strm)},z=function(t,e){t.pending_buf[t.pending++]=e},H=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},G=function(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=c(t.adler,e,i,r):2===t.state.wrap&&(t.adler=l(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},q=function(t,e){var r,n,i=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-P?t.strstart-(t.w_size-P):0,c=t.window,l=t.w_mask,f=t.prev,h=t.strstart+R,p=c[a+o-1],d=c[a+o];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+o]===d&&c[r+o-1]===p&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&a<h);if(n=R-(h-a),a=h-R,n>o){if(t.match_start=e,o=n,n>=s)break;p=c[a+o-1],d=c[a+o]}}}while((e=f[e&l])>u&&0!=--i);return o<=t.lookahead?o:t.lookahead},Q=function(t){var e,r,n,i=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=i+(i-P)&&(t.window.set(t.window.subarray(i,i+i-r),0),t.match_start-=i,t.strstart-=i,t.block_start-=i,t.insert>t.strstart&&(t.insert=t.strstart),K(t),r+=i),0===t.strm.avail_in)break;if(e=G(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=e,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=j(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=j(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<P&&0!==t.strm.avail_in)},W=function(t,e){var r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,u=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,r>(n=t.strstart-t.block_start)+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r<o&&(0===r&&e!==g||e===p||r!==n+t.strm.avail_in))break;s=e===g&&r===n+t.strm.avail_in?1:0,a(t,0,0,s),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,V(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(G(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===s);return(u-=t.strm.avail_in)&&(u>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=u&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-u,t.strm.next_in),t.strstart),t.strstart+=u,t.insert+=u>t.w_size-t.insert?t.w_size-t.insert:u),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==p&&e!==g&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(G(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,o=(i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i)>t.w_size?t.w_size:i,((n=t.strstart-t.block_start)>=o||(n||e===g)&&e!==p&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,s=e===g&&0===t.strm.avail_in&&r===n?1:0,a(t,t.block_start,r,s),t.block_start+=r,V(t.strm)),s?3:1)},Z=function(t,e){for(var r,n;;){if(t.lookahead<P){if(Q(t),t.lookahead<P&&e===p)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=j(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-P&&(t.match_length=q(t,r)),t.match_length>=3)if(n=s(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=j(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=j(t,t.ins_h,t.window[t.strstart+1]);else n=s(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(M(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===g?(M(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(M(t,!1),0===t.strm.avail_out)?1:2},X=function(t,e){for(var r,n,i;;){if(t.lookahead<P){if(Q(t),t.lookahead<P&&e===p)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=j(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-P&&(t.match_length=q(t,r),t.match_length<=5&&(t.strategy===A||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=s(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=j(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(M(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=s(t,0,t.window[t.strstart-1]))&&M(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===g?(M(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(M(t,!1),0===t.strm.avail_out)?1:2};function Y(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}var J=[new Y(0,0,0,0,W),new Y(4,4,8,4,Z),new Y(4,5,16,8,Z),new Y(4,6,32,32,Z),new Y(4,4,16,16,X),new Y(8,16,32,32,X),new Y(8,16,128,128,X),new Y(8,32,128,256,X),new Y(32,128,258,1024,X),new Y(32,258,258,4096,X)];function $(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=N,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),D(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var tt=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==F&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==x&&e.status!==U?1:0},et=function(t){if(tt(t))return O(t,C);t.total_in=t.total_out=0,t.data_type=k;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?F:x,t.adler=2===e.wrap?0:1,e.last_flush=-2,i(e),m},rt=function(t){var e,r=et(t);return r===m&&((e=t.state).window_size=2*e.w_size,D(e.head),e.max_lazy_match=J[e.level].max_lazy,e.good_match=J[e.level].good_length,e.nice_match=J[e.level].nice_length,e.max_chain_length=J[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r},nt=function(t,e,r,n,i,a){if(!t)return C;var o=1;if(e===w&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>9||r!==N||n<8||n>15||e<0||e>9||a<0||a>B||8===n&&1!==o)return O(t,C);8===n&&(n=9);var s=new $;return t.state=s,s.strm=t,s.status=F,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=3*(s.lit_bufsize-1),s.level=e,s.strategy=a,s.method=r,rt(t)};t.exports.deflateInit=function(t,e){return nt(t,e,N,15,8,_)},t.exports.deflateInit2=nt,t.exports.deflateReset=rt,t.exports.deflateResetKeep=et,t.exports.deflateSetHeader=function(t,e){return tt(t)||2!==t.state.wrap?C:(t.state.gzhead=e,m)},t.exports.deflate=function(t,e){if(tt(t)||e>v||e<0)return t?O(t,C):C;var r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===U&&e!==g)return O(t,0===t.avail_out?S:C);var n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(V(t),0===t.avail_out)return r.last_flush=-1,m}else if(0===t.avail_in&&L(e)<=L(n)&&e!==g)return O(t,S);if(r.status===U&&0!==t.avail_in)return O(t,S);if(r.status===F&&0===r.wrap&&(r.status=x),r.status===F){var i=N+(r.w_bits-8<<4)<<8;if(i|=(r.strategy>=T||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(i|=32),H(r,i+=31-i%31),0!==r.strstart&&(H(r,t.adler>>>16),H(r,65535&t.adler)),t.adler=1,r.status=x,V(t),0!==r.pending)return r.last_flush=-1,m}if(57===r.status)if(t.adler=0,z(r,31),z(r,139),z(r,8),r.gzhead)z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),z(r,255&r.gzhead.time),z(r,r.gzhead.time>>8&255),z(r,r.gzhead.time>>16&255),z(r,r.gzhead.time>>24&255),z(r,9===r.level?2:r.strategy>=T||r.level<2?4:0),z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(z(r,255&r.gzhead.extra.length),z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=l(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(z(r,0),z(r,0),z(r,0),z(r,0),z(r,0),z(r,9===r.level?2:r.strategy>=T||r.level<2?4:0),z(r,3),r.status=x,V(t),0!==r.pending)return r.last_flush=-1,m;if(69===r.status){if(r.gzhead.extra){for(var o=r.pending,c=(65535&r.gzhead.extra.length)-r.gzindex;r.pending+c>r.pending_buf_size;){var f=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+f),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>o&&(t.adler=l(t.adler,r.pending_buf,r.pending-o,o)),r.gzindex+=f,V(t),0!==r.pending)return r.last_flush=-1,m;o=0,c-=f}var h=new Uint8Array(r.gzhead.extra);r.pending_buf.set(h.subarray(r.gzindex,r.gzindex+c),r.pending),r.pending+=c,r.gzhead.hcrc&&r.pending>o&&(t.adler=l(t.adler,r.pending_buf,r.pending-o,o)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){var b,w=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>w&&(t.adler=l(t.adler,r.pending_buf,r.pending-w,w)),V(t),0!==r.pending)return r.last_flush=-1,m;w=0}b=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,z(r,b)}while(0!==b);r.gzhead.hcrc&&r.pending>w&&(t.adler=l(t.adler,r.pending_buf,r.pending-w,w)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){var A,B=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>B&&(t.adler=l(t.adler,r.pending_buf,r.pending-B,B)),V(t),0!==r.pending)return r.last_flush=-1,m;B=0}A=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,z(r,A)}while(0!==A);r.gzhead.hcrc&&r.pending>B&&(t.adler=l(t.adler,r.pending_buf,r.pending-B,B))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(V(t),0!==r.pending))return r.last_flush=-1,m;z(r,255&t.adler),z(r,t.adler>>8&255),t.adler=0}if(r.status=x,V(t),0!==r.pending)return r.last_flush=-1,m}if(0!==t.avail_in||0!==r.lookahead||e!==p&&r.status!==U){var _=0===r.level?W(r,e):r.strategy===T?function(t,e){for(var r;;){if(0===t.lookahead&&(Q(t),0===t.lookahead)){if(e===p)return 1;break}if(t.match_length=0,r=s(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(M(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===g?(M(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(M(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===I?function(t,e){for(var r,n,i,a,o=t.window;;){if(t.lookahead<=R){if(Q(t),t.lookahead<=R&&e===p)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[i=t.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){a=t.strstart+R;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<a);t.match_length=R-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=s(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(M(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===g?(M(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(M(t,!1),0===t.strm.avail_out)?1:2}(r,e):J[r.level].func(r,e);if(3!==_&&4!==_||(r.status=U),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),m;if(2===_&&(e===d?u(r):e!==v&&(a(r,0,0,!1),e===y&&(D(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),V(t),0===t.avail_out))return r.last_flush=-1,m}return e!==g?m:r.wrap<=0?E:(2===r.wrap?(z(r,255&t.adler),z(r,t.adler>>8&255),z(r,t.adler>>16&255),z(r,t.adler>>24&255),z(r,255&t.total_in),z(r,t.total_in>>8&255),z(r,t.total_in>>16&255),z(r,t.total_in>>24&255)):(H(r,t.adler>>>16),H(r,65535&t.adler)),V(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?m:E)},t.exports.deflateEnd=function(t){if(tt(t))return C;var e=t.state.status;return t.state=null,e===x?O(t,b):m},t.exports.deflateSetDictionary=function(t,e){var r=e.length;if(tt(t))return C;var n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==F||n.lookahead)return C;if(1===i&&(t.adler=c(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(D(n.head),n.strstart=0,n.block_start=0,n.insert=0);var a=new Uint8Array(n.w_size);a.set(e.subarray(r-n.w_size,r),0),e=a,r=n.w_size}var o=t.avail_in,s=t.next_in,u=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Q(n);n.lookahead>=3;){var l=n.strstart,f=n.lookahead-2;do{n.ins_h=j(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--f);n.strstart=l,n.lookahead=2,Q(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=s,t.input=u,t.avail_in=o,n.wrap=i,m},t.exports.deflateInfo="pako deflate (from Nodeca project)"},7924:t=>{"use strict";t.exports=function(){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}},139:t=>{"use strict";var e=16209;t.exports=function(t,r){var n,i,a,o,s,u,c,l,f,h,p,d,y,g,v,m,E,C,b,S,w,A,T,I,B=t.state;n=t.next_in,T=t.input,i=n+(t.avail_in-5),a=t.next_out,I=t.output,o=a-(r-t.avail_out),s=a+(t.avail_out-257),u=B.dmax,c=B.wsize,l=B.whave,f=B.wnext,h=B.window,p=B.hold,d=B.bits,y=B.lencode,g=B.distcode,v=(1<<B.lenbits)-1,m=(1<<B.distbits)-1;t:do{d<15&&(p+=T[n++]<<d,d+=8,p+=T[n++]<<d,d+=8),E=y[p&v];e:for(;;){if(p>>>=C=E>>>24,d-=C,0==(C=E>>>16&255))I[a++]=65535&E;else{if(!(16&C)){if(64&C){if(32&C){B.mode=16191;break t}t.msg="invalid literal/length code",B.mode=e;break t}E=y[(65535&E)+(p&(1<<C)-1)];continue e}for(b=65535&E,(C&=15)&&(d<C&&(p+=T[n++]<<d,d+=8),b+=p&(1<<C)-1,p>>>=C,d-=C),d<15&&(p+=T[n++]<<d,d+=8,p+=T[n++]<<d,d+=8),E=g[p&m];;){if(p>>>=C=E>>>24,d-=C,16&(C=E>>>16&255)){if(S=65535&E,d<(C&=15)&&(p+=T[n++]<<d,(d+=8)<C&&(p+=T[n++]<<d,d+=8)),(S+=p&(1<<C)-1)>u){t.msg="invalid distance too far back",B.mode=e;break t}if(p>>>=C,d-=C,S>(C=a-o)){if((C=S-C)>l&&B.sane){t.msg="invalid distance too far back",B.mode=e;break t}if(w=0,A=h,0===f){if(w+=c-C,C<b){b-=C;do{I[a++]=h[w++]}while(--C);w=a-S,A=I}}else if(f<C){if(w+=c+f-C,(C-=f)<b){b-=C;do{I[a++]=h[w++]}while(--C);if(w=0,f<b){b-=C=f;do{I[a++]=h[w++]}while(--C);w=a-S,A=I}}}else if(w+=f-C,C<b){b-=C;do{I[a++]=h[w++]}while(--C);w=a-S,A=I}for(;b>2;)I[a++]=A[w++],I[a++]=A[w++],I[a++]=A[w++],b-=3;b&&(I[a++]=A[w++],b>1&&(I[a++]=A[w++]))}else{w=a-S;do{I[a++]=I[w++],I[a++]=I[w++],I[a++]=I[w++],b-=3}while(b>2);b&&(I[a++]=I[w++],b>1&&(I[a++]=I[w++]))}break}if(64&C){t.msg="invalid distance code",B.mode=e;break t}E=g[(65535&E)+(p&(1<<C)-1)]}}break}}while(n<i&&a<s);n-=b=d>>3,p&=(1<<(d-=b<<3))-1,t.next_in=n,t.next_out=a,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=a<s?s-a+257:257-(a-s),B.hold=p,B.bits=d}},7133:(t,e,r)=>{"use strict";var n=r(959),i=r(2073),a=r(139),o=r(9288),s=r(3524),u=s.Z_FINISH,c=s.Z_BLOCK,l=s.Z_TREES,f=s.Z_OK,h=s.Z_STREAM_END,p=s.Z_NEED_DICT,d=s.Z_STREAM_ERROR,y=s.Z_DATA_ERROR,g=s.Z_MEM_ERROR,v=s.Z_BUF_ERROR,m=s.Z_DEFLATED,E=16180,C=16190,b=16191,S=16192,w=16194,A=16199,T=16200,I=16206,B=16209,_=16210,k=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function N(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var R,P,F=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode<E||e.mode>16211?1:0},x=function(t){if(F(t))return d;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=E,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,f},U=function(t){if(F(t))return d;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,x(t)},O=function(t,e){var r;if(F(t))return d;var n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?d:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,U(t))},L=function(t,e){if(!t)return d;var r=new N;t.state=r,r.strm=t,r.window=null,r.mode=E;var n=O(t,e);return n!==f&&(t.state=null),n},D=!0,K=function(t){if(D){R=new Int32Array(512),P=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(o(1,t.lens,0,288,R,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;o(2,t.lens,0,32,P,0,t.work,{bits:5}),D=!1}t.lencode=R,t.lenbits=9,t.distcode=P,t.distbits=5},j=function(t,e,r,n){var i,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(e.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>n&&(i=n),a.window.set(e.subarray(r-n,r-n+i),a.wnext),(n-=i)?(a.window.set(e.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0};t.exports.inflateReset=U,t.exports.inflateReset2=O,t.exports.inflateResetKeep=x,t.exports.inflateInit=function(t){return L(t,15)},t.exports.inflateInit2=L,t.exports.inflate=function(t,e){var r,s,N,R,P,x,U,O,L,D,V,M,z,H,G,q,Q,W,Z,X,Y,J,$,tt,et=0,rt=new Uint8Array(4),nt=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(F(t)||!t.output||!t.input&&0!==t.avail_in)return d;(r=t.state).mode===b&&(r.mode=S),P=t.next_out,N=t.output,U=t.avail_out,R=t.next_in,s=t.input,x=t.avail_in,O=r.hold,L=r.bits,D=x,V=U,J=f;t:for(;;)switch(r.mode){case E:if(0===r.wrap){r.mode=S;break}for(;L<16;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(2&r.wrap&&35615===O){0===r.wbits&&(r.wbits=15),r.check=0,rt[0]=255&O,rt[1]=O>>>8&255,r.check=i(r.check,rt,2,0),O=0,L=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&O)<<8)+(O>>8))%31){t.msg="incorrect header check",r.mode=B;break}if((15&O)!==m){t.msg="unknown compression method",r.mode=B;break}if(L-=4,Y=8+(15&(O>>>=4)),0===r.wbits&&(r.wbits=Y),Y>15||Y>r.wbits){t.msg="invalid window size",r.mode=B;break}r.dmax=1<<r.wbits,r.flags=0,t.adler=r.check=1,r.mode=512&O?16189:b,O=0,L=0;break;case 16181:for(;L<16;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(r.flags=O,(255&r.flags)!==m){t.msg="unknown compression method",r.mode=B;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=B;break}r.head&&(r.head.text=O>>8&1),512&r.flags&&4&r.wrap&&(rt[0]=255&O,rt[1]=O>>>8&255,r.check=i(r.check,rt,2,0)),O=0,L=0,r.mode=16182;case 16182:for(;L<32;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}r.head&&(r.head.time=O),512&r.flags&&4&r.wrap&&(rt[0]=255&O,rt[1]=O>>>8&255,rt[2]=O>>>16&255,rt[3]=O>>>24&255,r.check=i(r.check,rt,4,0)),O=0,L=0,r.mode=16183;case 16183:for(;L<16;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}r.head&&(r.head.xflags=255&O,r.head.os=O>>8),512&r.flags&&4&r.wrap&&(rt[0]=255&O,rt[1]=O>>>8&255,r.check=i(r.check,rt,2,0)),O=0,L=0,r.mode=16184;case 16184:if(1024&r.flags){for(;L<16;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}r.length=O,r.head&&(r.head.extra_len=O),512&r.flags&&4&r.wrap&&(rt[0]=255&O,rt[1]=O>>>8&255,r.check=i(r.check,rt,2,0)),O=0,L=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&((M=r.length)>x&&(M=x),M&&(r.head&&(Y=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(s.subarray(R,R+M),Y)),512&r.flags&&4&r.wrap&&(r.check=i(r.check,s,M,R)),x-=M,R+=M,r.length-=M),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===x)break t;M=0;do{Y=s[R+M++],r.head&&Y&&r.length<65536&&(r.head.name+=String.fromCharCode(Y))}while(Y&&M<x);if(512&r.flags&&4&r.wrap&&(r.check=i(r.check,s,M,R)),x-=M,R+=M,Y)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===x)break t;M=0;do{Y=s[R+M++],r.head&&Y&&r.length<65536&&(r.head.comment+=String.fromCharCode(Y))}while(Y&&M<x);if(512&r.flags&&4&r.wrap&&(r.check=i(r.check,s,M,R)),x-=M,R+=M,Y)break t}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;L<16;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(4&r.wrap&&O!==(65535&r.check)){t.msg="header crc mismatch",r.mode=B;break}O=0,L=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=b;break;case 16189:for(;L<32;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}t.adler=r.check=k(O),O=0,L=0,r.mode=C;case C:if(0===r.havedict)return t.next_out=P,t.avail_out=U,t.next_in=R,t.avail_in=x,r.hold=O,r.bits=L,p;t.adler=r.check=1,r.mode=b;case b:if(e===c||e===l)break t;case S:if(r.last){O>>>=7&L,L-=7&L,r.mode=I;break}for(;L<3;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}switch(r.last=1&O,L-=1,3&(O>>>=1)){case 0:r.mode=16193;break;case 1:if(K(r),r.mode=A,e===l){O>>>=2,L-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=B}O>>>=2,L-=2;break;case 16193:for(O>>>=7&L,L-=7&L;L<32;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if((65535&O)!=(O>>>16^65535)){t.msg="invalid stored block lengths",r.mode=B;break}if(r.length=65535&O,O=0,L=0,r.mode=w,e===l)break t;case w:r.mode=16195;case 16195:if(M=r.length){if(M>x&&(M=x),M>U&&(M=U),0===M)break t;N.set(s.subarray(R,R+M),P),x-=M,R+=M,U-=M,P+=M,r.length-=M;break}r.mode=b;break;case 16196:for(;L<14;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(r.nlen=257+(31&O),O>>>=5,L-=5,r.ndist=1+(31&O),O>>>=5,L-=5,r.ncode=4+(15&O),O>>>=4,L-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=B;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;L<3;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}r.lens[nt[r.have++]]=7&O,O>>>=3,L-=3}for(;r.have<19;)r.lens[nt[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,$={bits:r.lenbits},J=o(0,r.lens,0,19,r.lencode,0,r.work,$),r.lenbits=$.bits,J){t.msg="invalid code lengths set",r.mode=B;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;q=(et=r.lencode[O&(1<<r.lenbits)-1])>>>16&255,Q=65535&et,!((G=et>>>24)<=L);){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(Q<16)O>>>=G,L-=G,r.lens[r.have++]=Q;else{if(16===Q){for(tt=G+2;L<tt;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(O>>>=G,L-=G,0===r.have){t.msg="invalid bit length repeat",r.mode=B;break}Y=r.lens[r.have-1],M=3+(3&O),O>>>=2,L-=2}else if(17===Q){for(tt=G+3;L<tt;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}L-=G,Y=0,M=3+(7&(O>>>=G)),O>>>=3,L-=3}else{for(tt=G+7;L<tt;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}L-=G,Y=0,M=11+(127&(O>>>=G)),O>>>=7,L-=7}if(r.have+M>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=B;break}for(;M--;)r.lens[r.have++]=Y}}if(r.mode===B)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=B;break}if(r.lenbits=9,$={bits:r.lenbits},J=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,$),r.lenbits=$.bits,J){t.msg="invalid literal/lengths set",r.mode=B;break}if(r.distbits=6,r.distcode=r.distdyn,$={bits:r.distbits},J=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,$),r.distbits=$.bits,J){t.msg="invalid distances set",r.mode=B;break}if(r.mode=A,e===l)break t;case A:r.mode=T;case T:if(x>=6&&U>=258){t.next_out=P,t.avail_out=U,t.next_in=R,t.avail_in=x,r.hold=O,r.bits=L,a(t,V),P=t.next_out,N=t.output,U=t.avail_out,R=t.next_in,s=t.input,x=t.avail_in,O=r.hold,L=r.bits,r.mode===b&&(r.back=-1);break}for(r.back=0;q=(et=r.lencode[O&(1<<r.lenbits)-1])>>>16&255,Q=65535&et,!((G=et>>>24)<=L);){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(q&&!(240&q)){for(W=G,Z=q,X=Q;q=(et=r.lencode[X+((O&(1<<W+Z)-1)>>W)])>>>16&255,Q=65535&et,!(W+(G=et>>>24)<=L);){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}O>>>=W,L-=W,r.back+=W}if(O>>>=G,L-=G,r.back+=G,r.length=Q,0===q){r.mode=16205;break}if(32&q){r.back=-1,r.mode=b;break}if(64&q){t.msg="invalid literal/length code",r.mode=B;break}r.extra=15&q,r.mode=16201;case 16201:if(r.extra){for(tt=r.extra;L<tt;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}r.length+=O&(1<<r.extra)-1,O>>>=r.extra,L-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;q=(et=r.distcode[O&(1<<r.distbits)-1])>>>16&255,Q=65535&et,!((G=et>>>24)<=L);){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(!(240&q)){for(W=G,Z=q,X=Q;q=(et=r.distcode[X+((O&(1<<W+Z)-1)>>W)])>>>16&255,Q=65535&et,!(W+(G=et>>>24)<=L);){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}O>>>=W,L-=W,r.back+=W}if(O>>>=G,L-=G,r.back+=G,64&q){t.msg="invalid distance code",r.mode=B;break}r.offset=Q,r.extra=15&q,r.mode=16203;case 16203:if(r.extra){for(tt=r.extra;L<tt;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}r.offset+=O&(1<<r.extra)-1,O>>>=r.extra,L-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=B;break}r.mode=16204;case 16204:if(0===U)break t;if(M=V-U,r.offset>M){if((M=r.offset-M)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=B;break}M>r.wnext?(M-=r.wnext,z=r.wsize-M):z=r.wnext-M,M>r.length&&(M=r.length),H=r.window}else H=N,z=P-r.offset,M=r.length;M>U&&(M=U),U-=M,r.length-=M;do{N[P++]=H[z++]}while(--M);0===r.length&&(r.mode=T);break;case 16205:if(0===U)break t;N[P++]=r.length,U--,r.mode=T;break;case I:if(r.wrap){for(;L<32;){if(0===x)break t;x--,O|=s[R++]<<L,L+=8}if(V-=U,t.total_out+=V,r.total+=V,4&r.wrap&&V&&(t.adler=r.check=r.flags?i(r.check,N,V,P-V):n(r.check,N,V,P-V)),V=U,4&r.wrap&&(r.flags?O:k(O))!==r.check){t.msg="incorrect data check",r.mode=B;break}O=0,L=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;L<32;){if(0===x)break t;x--,O+=s[R++]<<L,L+=8}if(4&r.wrap&&O!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=B;break}O=0,L=0}r.mode=16208;case 16208:J=h;break t;case B:J=y;break t;case _:return g;default:return d}return t.next_out=P,t.avail_out=U,t.next_in=R,t.avail_in=x,r.hold=O,r.bits=L,(r.wsize||V!==t.avail_out&&r.mode<B&&(r.mode<I||e!==u))&&j(t,t.output,t.next_out,V-t.avail_out)?(r.mode=_,g):(D-=t.avail_in,V-=t.avail_out,t.total_in+=D,t.total_out+=V,r.total+=V,4&r.wrap&&V&&(t.adler=r.check=r.flags?i(r.check,N,V,t.next_out-V):n(r.check,N,V,t.next_out-V)),t.data_type=r.bits+(r.last?64:0)+(r.mode===b?128:0)+(r.mode===A||r.mode===w?256:0),(0===D&&0===V||e===u)&&J===f&&(J=v),J)},t.exports.inflateEnd=function(t){if(F(t))return d;var e=t.state;return e.window&&(e.window=null),t.state=null,f},t.exports.inflateGetHeader=function(t,e){if(F(t))return d;var r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,f):d},t.exports.inflateSetDictionary=function(t,e){var r,i=e.length;return F(t)||0!==(r=t.state).wrap&&r.mode!==C?d:r.mode===C&&n(1,e,i,0)!==r.check?y:j(t,e,i,i)?(r.mode=_,g):(r.havedict=1,f)},t.exports.inflateInfo="pako inflate (from Nodeca project)"},9288:t=>{"use strict";var e=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),r=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),n=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),i=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);t.exports=function(t,a,o,s,u,c,l,f){var h,p,d,y,g,v,m,E,C,b=f.bits,S=0,w=0,A=0,T=0,I=0,B=0,_=0,k=0,N=0,R=0,P=null,F=new Uint16Array(16),x=new Uint16Array(16),U=null;for(S=0;S<=15;S++)F[S]=0;for(w=0;w<s;w++)F[a[o+w]]++;for(I=b,T=15;T>=1&&0===F[T];T--);if(I>T&&(I=T),0===T)return u[c++]=20971520,u[c++]=20971520,f.bits=1,0;for(A=1;A<T&&0===F[A];A++);for(I<A&&(I=A),k=1,S=1;S<=15;S++)if(k<<=1,(k-=F[S])<0)return-1;if(k>0&&(0===t||1!==T))return-1;for(x[1]=0,S=1;S<15;S++)x[S+1]=x[S]+F[S];for(w=0;w<s;w++)0!==a[o+w]&&(l[x[a[o+w]]++]=w);if(0===t?(P=U=l,v=20):1===t?(P=e,U=r,v=257):(P=n,U=i,v=0),R=0,w=0,S=A,g=c,B=I,_=0,d=-1,y=(N=1<<I)-1,1===t&&N>852||2===t&&N>592)return 1;for(;;){m=S-_,l[w]+1<v?(E=0,C=l[w]):l[w]>=v?(E=U[l[w]-v],C=P[l[w]-v]):(E=96,C=0),h=1<<S-_,A=p=1<<B;do{u[g+(R>>_)+(p-=h)]=m<<24|E<<16|C}while(0!==p);for(h=1<<S-1;R&h;)h>>=1;if(0!==h?(R&=h-1,R+=h):R=0,w++,0==--F[S]){if(S===T)break;S=a[o+l[w]]}if(S>I&&(R&y)!==d){for(0===_&&(_=I),g+=A,k=1<<(B=S-_);B+_<T&&!((k-=F[B+_])<=0);)B++,k<<=1;if(N+=1<<B,1===t&&N>852||2===t&&N>592)return 1;u[d=R&y]=I<<24|B<<16|g-c}}return 0!==R&&(u[g+R]=S-_<<24|64<<16),f.bits=I,0}},7684:t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},607:t=>{"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var s=new Array(60);e(s);var u=new Array(512);e(u);var c=new Array(256);e(c);var l=new Array(29);e(l);var f,h,p,d=new Array(30);function y(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(d);var v=function(t){return t<256?u[t]:u[256+(t>>>7)]},m=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},E=function(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,m(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},C=function(t,e,r){E(t,r[2*e],r[2*e+1])},b=function(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},S=function(t,e,r){var n,i,a=new Array(16),o=0;for(n=1;n<=15;n++)o=o+r[n-1]<<1,a[n]=o;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=b(a[s]++,s))}},w=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},A=function(t){t.bi_valid>8?m(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},T=function(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]},I=function(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&T(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!T(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},B=function(t,e,i){var a,o,s,u,f=0;if(0!==t.sym_next)do{a=255&t.pending_buf[t.sym_buf+f++],a+=(255&t.pending_buf[t.sym_buf+f++])<<8,o=t.pending_buf[t.sym_buf+f++],0===a?C(t,o,e):(s=c[o],C(t,s+256+1,e),0!==(u=r[s])&&(o-=l[s],E(t,o,u)),a--,s=v(a),C(t,s,i),0!==(u=n[s])&&(a-=d[s],E(t,a,u)))}while(f<t.sym_next);C(t,256,e)},_=function(t,e){var r,n,i,a=e.dyn_tree,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<u;r++)0!==a[2*r]?(t.heap[++t.heap_len]=c=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)a[2*(i=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=o[2*i+1]);for(e.max_code=c,r=t.heap_len>>1;r>=1;r--)I(t,a,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,I(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,o,s,u=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,d=e.stat_desc.max_length,y=0;for(a=0;a<=15;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(a=u[2*u[2*(n=t.heap[r])+1]+1]+1)>d&&(a=d,y++),u[2*n+1]=a,n>c||(t.bl_count[a]++,o=0,n>=p&&(o=h[n-p]),s=u[2*n],t.opt_len+=s*(a+o),f&&(t.static_len+=s*(l[2*n+1]+o)));if(0!==y){do{for(a=d-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[d]--,y-=2}while(y>0);for(a=d;0!==a;a--)for(n=t.bl_count[a];0!==n;)(i=t.heap[--r])>c||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}(t,e),S(a,c,t.bl_count)},k=function(t,e,r){var n,i,a=-1,o=e[1],s=0,u=7,c=4;for(0===o&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=e[2*(n+1)+1],++s<u&&i===o||(s<c?t.bl_tree[2*i]+=s:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,a=i,0===o?(u=138,c=3):i===o?(u=6,c=3):(u=7,c=4))},N=function(t,e,r){var n,i,a=-1,o=e[1],s=0,u=7,c=4;for(0===o&&(u=138,c=3),n=0;n<=r;n++)if(i=o,o=e[2*(n+1)+1],!(++s<u&&i===o)){if(s<c)do{C(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(C(t,i,t.bl_tree),s--),C(t,16,t.bl_tree),E(t,s-3,2)):s<=10?(C(t,17,t.bl_tree),E(t,s-3,3)):(C(t,18,t.bl_tree),E(t,s-11,7));s=0,a=i,0===o?(u=138,c=3):i===o?(u=6,c=3):(u=7,c=4)}},R=!1,P=function(t,e,r,n){E(t,0+(n?1:0),3),A(t),m(t,r),m(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};t.exports._tr_init=function(t){R||(function(){var t,e,a,g,v,m=new Array(16);for(a=0,g=0;g<28;g++)for(l[g]=a,t=0;t<1<<r[g];t++)c[a++]=g;for(c[a-1]=g,v=0,g=0;g<16;g++)for(d[g]=v,t=0;t<1<<n[g];t++)u[v++]=g;for(v>>=7;g<30;g++)for(d[g]=v<<7,t=0;t<1<<n[g]-7;t++)u[256+v++]=g;for(e=0;e<=15;e++)m[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,m[8]++;for(;t<=255;)o[2*t+1]=9,t++,m[9]++;for(;t<=279;)o[2*t+1]=7,t++,m[7]++;for(;t<=287;)o[2*t+1]=8,t++,m[8]++;for(S(o,287,m),t=0;t<30;t++)s[2*t+1]=5,s[2*t]=b(t,5);f=new y(o,r,257,286,15),h=new y(s,n,0,30,15),p=new y(new Array(0),i,0,19,7)}(),R=!0),t.l_desc=new g(t.dyn_ltree,f),t.d_desc=new g(t.dyn_dtree,h),t.bl_desc=new g(t.bl_tree,p),t.bi_buf=0,t.bi_valid=0,w(t)},t.exports._tr_stored_block=P,t.exports._tr_flush_block=function(t,e,r,n){var i,u,c=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),_(t,t.l_desc),_(t,t.d_desc),c=function(t){var e;for(k(t,t.dyn_ltree,t.l_desc.max_code),k(t,t.dyn_dtree,t.d_desc.max_code),_(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*a[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(u=t.static_len+3+7>>>3)<=i&&(i=u)):i=u=r+5,r+4<=i&&-1!==e?P(t,e,r,n):4===t.strategy||u===i?(E(t,2+(n?1:0),3),B(t,o,s)):(E(t,4+(n?1:0),3),function(t,e,r,n){var i;for(E(t,e-257,5),E(t,r-1,5),E(t,n-4,4),i=0;i<n;i++)E(t,t.bl_tree[2*a[i]+1],3);N(t,t.dyn_ltree,e-1),N(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,c+1),B(t,t.dyn_ltree,t.dyn_dtree)),w(t),n&&A(t)},t.exports._tr_tally=function(t,e,r){return t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(c[r]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.sym_next===t.sym_end},t.exports._tr_align=function(t){E(t,2,3),C(t,256,o),function(t){16===t.bi_valid?(m(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},5788:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4293:(t,e,r)=>{"use strict";r.r(e),r.d(e,{NIL:()=>T,parse:()=>E,stringify:()=>p,v1:()=>m,v3:()=>b,v4:()=>w,v5:()=>A,validate:()=>c,version:()=>I});var n=r(6982),i=r.n(n),a=new Uint8Array(256),o=a.length;function s(){return o>a.length-16&&(i().randomFillSync(a),o=0),a.slice(o,o+=16)}const u=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,c=function(t){return"string"==typeof t&&u.test(t)};for(var l=[],f=0;f<256;++f)l.push((f+256).toString(16).slice(1));function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]}const p=function(t){var e=h(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!c(e))throw TypeError("Stringified UUID is invalid");return e};var d,y,g=0,v=0;const m=function(t,e,r){var n=e&&r||0,i=e||new Array(16),a=(t=t||{}).node||d,o=void 0!==t.clockseq?t.clockseq:y;if(null==a||null==o){var u=t.random||(t.rng||s)();null==a&&(a=d=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==o&&(o=y=16383&(u[6]<<8|u[7]))}var c=void 0!==t.msecs?t.msecs:Date.now(),l=void 0!==t.nsecs?t.nsecs:v+1,f=c-g+(l-v)/1e4;if(f<0&&void 0===t.clockseq&&(o=o+1&16383),(f<0||c>g)&&void 0===t.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=c,v=l,y=o;var p=(1e4*(268435455&(c+=122192928e5))+l)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;var m=c/4294967296*1e4&268435455;i[n++]=m>>>8&255,i[n++]=255&m,i[n++]=m>>>24&15|16,i[n++]=m>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var E=0;E<6;++E)i[n+E]=a[E];return e||h(i)},E=function(t){if(!c(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function C(t,e,r){function n(t,n,i,a){var o;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"==typeof n&&(n=E(n)),16!==(null===(o=n)||void 0===o?void 0:o.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+t.length);if(s.set(n),s.set(t,n.length),(s=r(s))[6]=15&s[6]|e,s[8]=63&s[8]|128,i){a=a||0;for(var u=0;u<16;++u)i[a+u]=s[u];return i}return h(s)}try{n.name=t}catch(t){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}const b=C("v3",48,(function(t){return Array.isArray(t)?t=Buffer.from(t):"string"==typeof t&&(t=Buffer.from(t,"utf8")),i().createHash("md5").update(t).digest()})),S={randomUUID:i().randomUUID},w=function(t,e,r){if(S.randomUUID&&!e&&!t)return S.randomUUID();var n=(t=t||{}).random||(t.rng||s)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return h(n)},A=C("v5",80,(function(t){return Array.isArray(t)?t=Buffer.from(t):"string"==typeof t&&(t=Buffer.from(t,"utf8")),i().createHash("sha1").update(t).digest()})),T="00000000-0000-0000-0000-000000000000",I=function(t){if(!c(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}},181:t=>{"use strict";t.exports=require("buffer")},6982:t=>{"use strict";t.exports=require("crypto")},932:t=>{"use strict";t.exports=require("process")},8991:(t,e)=>{var r,n=function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}function r(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function n(t){return!0===(t&&t.__isLong__)}function i(t){var e=Math.clz32(t&-t);return t?31-e:e}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var a={},o={};function s(t,e){var r,n,i;return e?(i=0<=(t>>>=0)&&t<256)&&(n=o[t])?n:(r=c(t,0,!0),i&&(o[t]=r),r):(i=-128<=(t|=0)&&t<128)&&(n=a[t])?n:(r=c(t,t<0?-1:0,!1),i&&(a[t]=r),r)}function u(t,e){if(isNaN(t))return e?m:v;if(e){if(t<0)return m;if(t>=d)return w}else{if(t<=-y)return A;if(t+1>=y)return S}return t<0?u(-t,e).neg():c(t%p|0,t/p|0,e)}function c(t,e,n){return new r(t,e,n)}r.fromInt=s,r.fromNumber=u,r.fromBits=c;var l=Math.pow;function f(t,e,r){if(0===t.length)throw Error("empty string");if("number"==typeof e?(r=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?m:v;if((r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return f(t.substring(1),e,r).neg();for(var i=u(l(r,8)),a=v,o=0;o<t.length;o+=8){var s=Math.min(8,t.length-o),c=parseInt(t.substring(o,o+s),r);if(s<8){var h=u(l(r,s));a=a.mul(h).add(u(c))}else a=(a=a.mul(i)).add(u(c))}return a.unsigned=e,a}function h(t,e){return"number"==typeof t?u(t,e):"string"==typeof t?f(t,e):c(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}r.fromString=f,r.fromValue=h;var p=4294967296,d=p*p,y=d/2,g=s(1<<24),v=s(0);r.ZERO=v;var m=s(0,!0);r.UZERO=m;var E=s(1);r.ONE=E;var C=s(1,!0);r.UONE=C;var b=s(-1);r.NEG_ONE=b;var S=c(-1,2147483647,!1);r.MAX_VALUE=S;var w=c(-1,-1,!0);r.MAX_UNSIGNED_VALUE=w;var A=c(0,-2147483648,!1);r.MIN_VALUE=A;var T=r.prototype;return T.toInt=function(){return this.unsigned?this.low>>>0:this.low},T.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},T.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(A)){var e=u(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=u(l(t,6),this.unsigned),a=this,o="";;){var s=a.div(i),c=(a.sub(s.mul(i)).toInt()>>>0).toString(t);if((a=s).isZero())return c+o;for(;c.length<6;)c="0"+c;o=""+c+o}},T.getHighBits=function(){return this.high},T.getHighBitsUnsigned=function(){return this.high>>>0},T.getLowBits=function(){return this.low},T.getLowBitsUnsigned=function(){return this.low>>>0},T.getNumBitsAbs=function(){if(this.isNegative())return this.eq(A)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},T.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&!(0===this.low&&-2097152===this.high)},T.isZero=function(){return 0===this.high&&0===this.low},T.eqz=T.isZero,T.isNegative=function(){return!this.unsigned&&this.high<0},T.isPositive=function(){return this.unsigned||this.high>=0},T.isOdd=function(){return!(1&~this.low)},T.isEven=function(){return!(1&this.low)},T.equals=function(t){return n(t)||(t=h(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},T.eq=T.equals,T.notEquals=function(t){return!this.eq(t)},T.neq=T.notEquals,T.ne=T.notEquals,T.lessThan=function(t){return this.comp(t)<0},T.lt=T.lessThan,T.lessThanOrEqual=function(t){return this.comp(t)<=0},T.lte=T.lessThanOrEqual,T.le=T.lessThanOrEqual,T.greaterThan=function(t){return this.comp(t)>0},T.gt=T.greaterThan,T.greaterThanOrEqual=function(t){return this.comp(t)>=0},T.gte=T.greaterThanOrEqual,T.ge=T.greaterThanOrEqual,T.compare=function(t){if(n(t)||(t=h(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},T.comp=T.compare,T.negate=function(){return!this.unsigned&&this.eq(A)?A:this.not().add(E)},T.neg=T.negate,T.add=function(t){n(t)||(t=h(t));var e=this.high>>>16,r=65535&this.high,i=this.low>>>16,a=65535&this.low,o=t.high>>>16,s=65535&t.high,u=t.low>>>16,l=0,f=0,p=0,d=0;return p+=(d+=a+(65535&t.low))>>>16,f+=(p+=i+u)>>>16,l+=(f+=r+s)>>>16,l+=e+o,c((p&=65535)<<16|(d&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},T.subtract=function(t){return n(t)||(t=h(t)),this.add(t.neg())},T.sub=T.subtract,T.multiply=function(t){if(this.isZero())return this;if(n(t)||(t=h(t)),e)return c(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return this.unsigned?m:v;if(this.eq(A))return t.isOdd()?A:v;if(t.eq(A))return this.isOdd()?A:v;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(g)&&t.lt(g))return u(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,a=this.low>>>16,o=65535&this.low,s=t.high>>>16,l=65535&t.high,f=t.low>>>16,p=65535&t.low,d=0,y=0,E=0,C=0;return E+=(C+=o*p)>>>16,y+=(E+=a*p)>>>16,E&=65535,y+=(E+=o*f)>>>16,d+=(y+=i*p)>>>16,y&=65535,d+=(y+=a*f)>>>16,y&=65535,d+=(y+=o*l)>>>16,d+=r*p+i*f+a*l+o*s,c((E&=65535)<<16|(C&=65535),(d&=65535)<<16|(y&=65535),this.unsigned)},T.mul=T.multiply,T.divide=function(t){if(n(t)||(t=h(t)),t.isZero())throw Error("division by zero");var r,i,a;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?c((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:v;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return m;if(t.gt(this.shru(1)))return C;a=m}else{if(this.eq(A))return t.eq(E)||t.eq(b)?A:t.eq(A)?E:(r=this.shr(1).div(t).shl(1)).eq(v)?t.isNegative()?E:b:(i=this.sub(t.mul(r)),a=r.add(i.div(t)));if(t.eq(A))return this.unsigned?m:v;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=v}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),s=o<=48?1:l(2,o-48),f=u(r),p=f.mul(t);p.isNegative()||p.gt(i);)p=(f=u(r-=s,this.unsigned)).mul(t);f.isZero()&&(f=E),a=a.add(f),i=i.sub(p)}return a},T.div=T.divide,T.modulo=function(t){return n(t)||(t=h(t)),e?c((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},T.mod=T.modulo,T.rem=T.modulo,T.not=function(){return c(~this.low,~this.high,this.unsigned)},T.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},T.clz=T.countLeadingZeros,T.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},T.ctz=T.countTrailingZeros,T.and=function(t){return n(t)||(t=h(t)),c(this.low&t.low,this.high&t.high,this.unsigned)},T.or=function(t){return n(t)||(t=h(t)),c(this.low|t.low,this.high|t.high,this.unsigned)},T.xor=function(t){return n(t)||(t=h(t)),c(this.low^t.low,this.high^t.high,this.unsigned)},T.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?c(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):c(0,this.low<<t-32,this.unsigned)},T.shl=T.shiftLeft,T.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?c(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):c(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},T.shr=T.shiftRight,T.shiftRightUnsigned=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?c(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):c(32===t?this.high:this.high>>>t-32,0,this.unsigned)},T.shru=T.shiftRightUnsigned,T.shr_u=T.shiftRightUnsigned,T.rotateLeft=function(t){var e;return n(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?c(this.high,this.low,this.unsigned):t<32?(e=32-t,c(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(e=32-(t-=32),c(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},T.rotl=T.rotateLeft,T.rotateRight=function(t){var e;return n(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?c(this.high,this.low,this.unsigned):t<32?(e=32-t,c(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(e=32-(t-=32),c(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},T.rotr=T.rotateRight,T.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},T.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},T.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},T.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},T.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},r.fromBytes=function(t,e,n){return n?r.fromBytesLE(t,e):r.fromBytesBE(t,e)},r.fromBytesLE=function(t,e){return new r(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},r.fromBytesBE=function(t,e){return new r(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)},"function"==typeof BigInt&&(r.fromBigInt=function(t,e){return c(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),e)},r.fromValue=function(t,e){return"bigint"==typeof t?fromBigInt(t,e):h(t,e)},T.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t}),t.default=r,"default"in t?t.default:t}({});void 0===(r=function(){return n}.apply(e,[]))||(t.exports=r)}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n=r(9264);module.exports=n})();
3
- exports.__oidcSpaBundle = true;