diff --git a/bannana5.jpg b/bannana5.jpg index 960c5bff..e99b5932 100644 Binary files a/bannana5.jpg and b/bannana5.jpg differ diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 00000000..622b5556 Binary files /dev/null and b/bun.lockb differ diff --git a/docs/node/BrowserWebSocketTransport-AHJZUB76.mjs b/docs/node/BrowserWebSocketTransport-CYQW4DLU.mjs similarity index 98% rename from docs/node/BrowserWebSocketTransport-AHJZUB76.mjs rename to docs/node/BrowserWebSocketTransport-CYQW4DLU.mjs index 16707e3e..20242251 100644 --- a/docs/node/BrowserWebSocketTransport-AHJZUB76.mjs +++ b/docs/node/BrowserWebSocketTransport-CYQW4DLU.mjs @@ -1,7 +1,7 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.js init_cjs_shim(); diff --git a/docs/node/NodeWebSocketTransport-FFMK3MOQ.mjs b/docs/node/NodeWebSocketTransport-34DTIRU5.mjs similarity index 71% rename from docs/node/NodeWebSocketTransport-FFMK3MOQ.mjs rename to docs/node/NodeWebSocketTransport-34DTIRU5.mjs index a867b610..aac0cdef 100644 --- a/docs/node/NodeWebSocketTransport-FFMK3MOQ.mjs +++ b/docs/node/NodeWebSocketTransport-34DTIRU5.mjs @@ -1,8 +1,8 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { NodeWebSocketTransport -} from "./chunk-HRTB753X.mjs"; -import "./chunk-LD4XAW36.mjs"; +} from "./chunk-4CEWYGDD.mjs"; +import "./chunk-4UNHOY6E.mjs"; export { NodeWebSocketTransport }; diff --git a/docs/node/chunk-HRTB753X.mjs b/docs/node/chunk-4CEWYGDD.mjs similarity index 99% rename from docs/node/chunk-HRTB753X.mjs rename to docs/node/chunk-4CEWYGDD.mjs index cfe5a475..9ed0e6f3 100644 --- a/docs/node/chunk-HRTB753X.mjs +++ b/docs/node/chunk-4CEWYGDD.mjs @@ -4,7 +4,7 @@ import { __require, __toESM, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/node_modules/puppeteer-core/node_modules/ws/lib/stream.js var require_stream = __commonJS({ diff --git a/docs/node/chunk-LD4XAW36.mjs b/docs/node/chunk-4UNHOY6E.mjs similarity index 93% rename from docs/node/chunk-LD4XAW36.mjs rename to docs/node/chunk-4UNHOY6E.mjs index 138af0fc..fb27cfc2 100644 --- a/docs/node/chunk-LD4XAW36.mjs +++ b/docs/node/chunk-4UNHOY6E.mjs @@ -41,8 +41,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // ../testeranto/dist/cjs-shim.js +import path from "node:path"; +import url from "node:url"; var init_cjs_shim = __esm({ "../testeranto/dist/cjs-shim.js"() { + globalThis.__filename = url.fileURLToPath(import.meta.url); + globalThis.__dirname = path.dirname(__filename); } }); diff --git a/docs/node/chunk-SUGEA42X.mjs b/docs/node/chunk-CXQUVXKU.mjs similarity index 99% rename from docs/node/chunk-SUGEA42X.mjs rename to docs/node/chunk-CXQUVXKU.mjs index 2e968acd..887f88cb 100644 --- a/docs/node/chunk-SUGEA42X.mjs +++ b/docs/node/chunk-CXQUVXKU.mjs @@ -1,20 +1,22 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); +import { + require_react +} from "./chunk-YSBX7L3R.mjs"; import { app_default -} from "./chunk-Q7IN32QK.mjs"; +} from "./chunk-M3LZWPQ4.mjs"; import { __commonJS, - __require, __toESM, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js var require_use_sync_external_store_shim_production_min = __commonJS({ "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js"(exports) { "use strict"; init_cjs_shim(); - var e = __require("react"); + var e = require_react(); function h(a, b) { return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b; } @@ -68,7 +70,7 @@ var require_use_sync_external_store_shim_development = __commonJS({ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var React2 = __require("react"); + var React2 = require_react(); var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function error(format) { { @@ -198,7 +200,7 @@ var require_with_selector_production_min = __commonJS({ "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js"(exports) { "use strict"; init_cjs_shim(); - var h = __require("react"); + var h = require_react(); var n = require_shim(); function p(a, b) { return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b; @@ -267,7 +269,7 @@ var require_with_selector_development = __commonJS({ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var React2 = __require("react"); + var React2 = require_react(); var shim = require_shim(); function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y; @@ -1101,7 +1103,7 @@ var require_react_dom_production_min = __commonJS({ "node_modules/react-dom/cjs/react-dom.production.min.js"(exports) { "use strict"; init_cjs_shim(); - var aa = __require("react"); + var aa = require_react(); var ca = require_scheduler(); function p(a) { for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++) @@ -8250,7 +8252,7 @@ var require_react_dom_development = __commonJS({ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var React2 = __require("react"); + var React2 = require_react(); var Scheduler = require_scheduler(); var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var suppressWarning = false; @@ -29399,7 +29401,7 @@ var require_Context = __commonJS({ init_cjs_shim(); exports.__esModule = true; exports.default = exports.ReactReduxContext = void 0; - var React2 = _interopRequireWildcard(__require("react")); + var React2 = _interopRequireWildcard(require_react()); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; @@ -29473,7 +29475,7 @@ var require_useReduxContext = __commonJS({ exports.__esModule = true; exports.createReduxContextHook = createReduxContextHook; exports.useReduxContext = void 0; - var _react = __require("react"); + var _react = require_react(); var _Context = require_Context(); function createReduxContextHook(context = _Context.ReactReduxContext) { return function useReduxContext2() { @@ -29511,7 +29513,7 @@ var require_useSelector = __commonJS({ exports.__esModule = true; exports.createSelectorHook = createSelectorHook; exports.useSelector = exports.initializeUseSelector = void 0; - var _react = __require("react"); + var _react = require_react(); var _useReduxContext = require_useReduxContext(); var _Context = require_Context(); var _useSyncExternalStore = require_useSyncExternalStore(); @@ -29659,9 +29661,9 @@ var require_objectWithoutPropertiesLoose = __commonJS({ } }); -// node_modules/react-is/cjs/react-is.production.min.js +// node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js var require_react_is_production_min = __commonJS({ - "node_modules/react-is/cjs/react-is.production.min.js"(exports) { + "node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js"(exports) { "use strict"; init_cjs_shim(); var b = "function" === typeof Symbol && Symbol.for; @@ -29773,9 +29775,9 @@ var require_react_is_production_min = __commonJS({ } }); -// node_modules/react-is/cjs/react-is.development.js +// node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js var require_react_is_development = __commonJS({ - "node_modules/react-is/cjs/react-is.development.js"(exports) { + "node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js"(exports) { "use strict"; init_cjs_shim(); if (process.env.NODE_ENV !== "production") { @@ -29929,9 +29931,9 @@ var require_react_is_development = __commonJS({ } }); -// node_modules/react-is/index.js +// node_modules/hoist-non-react-statics/node_modules/react-is/index.js var require_react_is = __commonJS({ - "node_modules/react-is/index.js"(exports, module) { + "node_modules/hoist-non-react-statics/node_modules/react-is/index.js"(exports, module) { "use strict"; init_cjs_shim(); if (process.env.NODE_ENV === "production") { @@ -30833,7 +30835,7 @@ var require_useIsomorphicLayoutEffect = __commonJS({ init_cjs_shim(); exports.__esModule = true; exports.useIsomorphicLayoutEffect = exports.canUseDOM = void 0; - var React2 = _interopRequireWildcard(__require("react")); + var React2 = _interopRequireWildcard(require_react()); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; @@ -30924,7 +30926,7 @@ var require_connect = __commonJS({ var _extends2 = _interopRequireDefault(require_extends()); var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require_objectWithoutPropertiesLoose()); var _hoistNonReactStatics = _interopRequireDefault(require_hoist_non_react_statics_cjs()); - var React2 = _interopRequireWildcard(__require("react")); + var React2 = _interopRequireWildcard(require_react()); var _reactIs = require_react_is2(); var _selectorFactory = _interopRequireDefault(require_selectorFactory()); var _mapDispatchToProps = require_mapDispatchToProps(); @@ -31251,7 +31253,7 @@ var require_Provider = __commonJS({ init_cjs_shim(); exports.__esModule = true; exports.default = void 0; - var React2 = _interopRequireWildcard(__require("react")); + var React2 = _interopRequireWildcard(require_react()); var _Context = require_Context(); var _Subscription = require_Subscription(); var _useIsomorphicLayoutEffect = require_useIsomorphicLayoutEffect(); @@ -31547,21 +31549,21 @@ var require_lib = __commonJS({ // src/LoginPage/index.tsx init_cjs_shim(); +var import_react = __toESM(require_react(), 1); var import_react_redux = __toESM(require_lib(), 1); -import React from "react"; var core = app_default(); var selector = core.select.loginPageSelection; var actions = core.app.actions; var store = core.store; -var emailwarning = "Something isn\u2019t right. Please double check your email"; +var emailwarning = "Something isn\u2019t right. Please double check your email."; function LoginPage() { const selection = (0, import_react_redux.useSelector)(selector); - return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", null, "Welcome back!"), /* @__PURE__ */ React.createElement("p", null, "Sign in and get to it."), /* @__PURE__ */ React.createElement("form", null, /* @__PURE__ */ React.createElement("input", { type: "email", value: selection.email, onChange: (e) => store.dispatch(actions.setEmail(e.target.value)) }), /* @__PURE__ */ React.createElement("p", { id: "invalid-email-warning", className: "warnin" }, selection.error === "invalidEmail" && emailwarning), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("input", { type: "password", value: selection.password, onChange: (e) => store.dispatch(actions.setPassword(e.target.value)) }), /* @__PURE__ */ React.createElement("p", { id: "error" }, selection.error === "credentialFail" && "You entered an incorrect email, password, or both."), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("button", { disabled: selection.disableSubmit, onClick: (event) => { + return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("h2", null, "Welcome back!"), /* @__PURE__ */ import_react.default.createElement("p", null, "Sign in and get to it."), /* @__PURE__ */ import_react.default.createElement("form", null, /* @__PURE__ */ import_react.default.createElement("input", { type: "email", value: selection.email, onChange: (e) => store.dispatch(actions.setEmail(e.target.value)) }), /* @__PURE__ */ import_react.default.createElement("p", { id: "invalid-email-warning", className: "warnin" }, selection.error === "invalidEmail" && emailwarning), /* @__PURE__ */ import_react.default.createElement("br", null), /* @__PURE__ */ import_react.default.createElement("input", { type: "password", value: selection.password, onChange: (e) => store.dispatch(actions.setPassword(e.target.value)) }), /* @__PURE__ */ import_react.default.createElement("p", { id: "error" }, selection.error === "credentialFail" && "You entered an incorrect email, password, or both."), /* @__PURE__ */ import_react.default.createElement("br", null), /* @__PURE__ */ import_react.default.createElement("button", { disabled: selection.disableSubmit, onClick: (event) => { store.dispatch(actions.signIn()); - } }, "Sign In")), /* @__PURE__ */ React.createElement("pre", null, JSON.stringify(selection, null, 2))); + } }, "Sign In")), /* @__PURE__ */ import_react.default.createElement("pre", null, JSON.stringify(selection, null, 2))); } function LoginPage_default() { - return /* @__PURE__ */ React.createElement(import_react_redux.Provider, { store }, /* @__PURE__ */ React.createElement(LoginPage, null)); + return /* @__PURE__ */ import_react.default.createElement(import_react_redux.Provider, { store }, /* @__PURE__ */ import_react.default.createElement(LoginPage, null)); } // src/LoginPage/test.ts diff --git a/docs/node/chunk-GHFYKOO4.mjs b/docs/node/chunk-D2G2LC5R.mjs similarity index 99% rename from docs/node/chunk-GHFYKOO4.mjs rename to docs/node/chunk-D2G2LC5R.mjs index cf4495c1..5b5ef1cd 100644 --- a/docs/node/chunk-GHFYKOO4.mjs +++ b/docs/node/chunk-D2G2LC5R.mjs @@ -4,7 +4,7 @@ import { __require, __toESM, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // node_modules/assertion-error/index.js var require_assertion_error = __commonJS({ diff --git a/docs/node/chunk-J74XOMIJ.mjs b/docs/node/chunk-ECNFXUXQ.mjs similarity index 99% rename from docs/node/chunk-J74XOMIJ.mjs rename to docs/node/chunk-ECNFXUXQ.mjs index d2c53b22..70477f30 100644 --- a/docs/node/chunk-J74XOMIJ.mjs +++ b/docs/node/chunk-ECNFXUXQ.mjs @@ -3,7 +3,7 @@ import { __commonJS, __require, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/node_modules/ms/index.js var require_ms = __commonJS({ diff --git a/docs/node/chunk-HC6XUHVX.mjs b/docs/node/chunk-HC6XUHVX.mjs new file mode 100644 index 00000000..c72e1f20 --- /dev/null +++ b/docs/node/chunk-HC6XUHVX.mjs @@ -0,0 +1,2218 @@ +import { createRequire } from 'module';const require = createRequire(import.meta.url); +import { + __commonJS, + init_cjs_shim +} from "./chunk-4UNHOY6E.mjs"; + +// ../testeranto/node_modules/react/cjs/react.production.min.js +var require_react_production_min = __commonJS({ + "../testeranto/node_modules/react/cjs/react.production.min.js"(exports) { + "use strict"; + init_cjs_shim(); + var l = Symbol.for("react.element"); + var n = Symbol.for("react.portal"); + var p = Symbol.for("react.fragment"); + var q = Symbol.for("react.strict_mode"); + var r = Symbol.for("react.profiler"); + var t = Symbol.for("react.provider"); + var u = Symbol.for("react.context"); + var v = Symbol.for("react.forward_ref"); + var w = Symbol.for("react.suspense"); + var x = Symbol.for("react.memo"); + var y = Symbol.for("react.lazy"); + var z = Symbol.iterator; + function A(a) { + if (null === a || "object" !== typeof a) + return null; + a = z && a[z] || a["@@iterator"]; + return "function" === typeof a ? a : null; + } + var B = { isMounted: function() { + return false; + }, enqueueForceUpdate: function() { + }, enqueueReplaceState: function() { + }, enqueueSetState: function() { + } }; + var C = Object.assign; + var D = {}; + function E(a, b, e) { + this.props = a; + this.context = b; + this.refs = D; + this.updater = e || B; + } + E.prototype.isReactComponent = {}; + E.prototype.setState = function(a, b) { + if ("object" !== typeof a && "function" !== typeof a && null != a) + throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + this.updater.enqueueSetState(this, a, b, "setState"); + }; + E.prototype.forceUpdate = function(a) { + this.updater.enqueueForceUpdate(this, a, "forceUpdate"); + }; + function F() { + } + F.prototype = E.prototype; + function G(a, b, e) { + this.props = a; + this.context = b; + this.refs = D; + this.updater = e || B; + } + var H = G.prototype = new F(); + H.constructor = G; + C(H, E.prototype); + H.isPureReactComponent = true; + var I = Array.isArray; + var J = Object.prototype.hasOwnProperty; + var K = { current: null }; + var L = { key: true, ref: true, __self: true, __source: true }; + function M(a, b, e) { + var d, c = {}, k = null, h = null; + if (null != b) + for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b) + J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]); + var g = arguments.length - 2; + if (1 === g) + c.children = e; + else if (1 < g) { + for (var f = Array(g), m = 0; m < g; m++) + f[m] = arguments[m + 2]; + c.children = f; + } + if (a && a.defaultProps) + for (d in g = a.defaultProps, g) + void 0 === c[d] && (c[d] = g[d]); + return { $$typeof: l, type: a, key: k, ref: h, props: c, _owner: K.current }; + } + function N(a, b) { + return { $$typeof: l, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner }; + } + function O(a) { + return "object" === typeof a && null !== a && a.$$typeof === l; + } + function escape(a) { + var b = { "=": "=0", ":": "=2" }; + return "$" + a.replace(/[=:]/g, function(a2) { + return b[a2]; + }); + } + var P = /\/+/g; + function Q(a, b) { + return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36); + } + function R(a, b, e, d, c) { + var k = typeof a; + if ("undefined" === k || "boolean" === k) + a = null; + var h = false; + if (null === a) + h = true; + else + switch (k) { + case "string": + case "number": + h = true; + break; + case "object": + switch (a.$$typeof) { + case l: + case n: + h = true; + } + } + if (h) + return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a2) { + return a2; + })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1; + h = 0; + d = "" === d ? "." : d + ":"; + if (I(a)) + for (var g = 0; g < a.length; g++) { + k = a[g]; + var f = d + Q(k, g); + h += R(k, b, e, f, c); + } + else if (f = A(a), "function" === typeof f) + for (a = f.call(a), g = 0; !(k = a.next()).done; ) + k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c); + else if ("object" === k) + throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead."); + return h; + } + function S(a, b, e) { + if (null == a) + return a; + var d = [], c = 0; + R(a, d, "", "", function(a2) { + return b.call(e, a2, c++); + }); + return d; + } + function T(a) { + if (-1 === a._status) { + var b = a._result; + b = b(); + b.then(function(b2) { + if (0 === a._status || -1 === a._status) + a._status = 1, a._result = b2; + }, function(b2) { + if (0 === a._status || -1 === a._status) + a._status = 2, a._result = b2; + }); + -1 === a._status && (a._status = 0, a._result = b); + } + if (1 === a._status) + return a._result.default; + throw a._result; + } + var U = { current: null }; + var V = { transition: null }; + var W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K }; + exports.Children = { map: S, forEach: function(a, b, e) { + S(a, function() { + b.apply(this, arguments); + }, e); + }, count: function(a) { + var b = 0; + S(a, function() { + b++; + }); + return b; + }, toArray: function(a) { + return S(a, function(a2) { + return a2; + }) || []; + }, only: function(a) { + if (!O(a)) + throw Error("React.Children.only expected to receive a single React element child."); + return a; + } }; + exports.Component = E; + exports.Fragment = p; + exports.Profiler = r; + exports.PureComponent = G; + exports.StrictMode = q; + exports.Suspense = w; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W; + exports.cloneElement = function(a, b, e) { + if (null === a || void 0 === a) + throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + "."); + var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner; + if (null != b) { + void 0 !== b.ref && (k = b.ref, h = K.current); + void 0 !== b.key && (c = "" + b.key); + if (a.type && a.type.defaultProps) + var g = a.type.defaultProps; + for (f in b) + J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]); + } + var f = arguments.length - 2; + if (1 === f) + d.children = e; + else if (1 < f) { + g = Array(f); + for (var m = 0; m < f; m++) + g[m] = arguments[m + 2]; + d.children = g; + } + return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h }; + }; + exports.createContext = function(a) { + a = { $$typeof: u, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }; + a.Provider = { $$typeof: t, _context: a }; + return a.Consumer = a; + }; + exports.createElement = M; + exports.createFactory = function(a) { + var b = M.bind(null, a); + b.type = a; + return b; + }; + exports.createRef = function() { + return { current: null }; + }; + exports.forwardRef = function(a) { + return { $$typeof: v, render: a }; + }; + exports.isValidElement = O; + exports.lazy = function(a) { + return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T }; + }; + exports.memo = function(a, b) { + return { $$typeof: x, type: a, compare: void 0 === b ? null : b }; + }; + exports.startTransition = function(a) { + var b = V.transition; + V.transition = {}; + try { + a(); + } finally { + V.transition = b; + } + }; + exports.unstable_act = function() { + throw Error("act(...) is not supported in production builds of React."); + }; + exports.useCallback = function(a, b) { + return U.current.useCallback(a, b); + }; + exports.useContext = function(a) { + return U.current.useContext(a); + }; + exports.useDebugValue = function() { + }; + exports.useDeferredValue = function(a) { + return U.current.useDeferredValue(a); + }; + exports.useEffect = function(a, b) { + return U.current.useEffect(a, b); + }; + exports.useId = function() { + return U.current.useId(); + }; + exports.useImperativeHandle = function(a, b, e) { + return U.current.useImperativeHandle(a, b, e); + }; + exports.useInsertionEffect = function(a, b) { + return U.current.useInsertionEffect(a, b); + }; + exports.useLayoutEffect = function(a, b) { + return U.current.useLayoutEffect(a, b); + }; + exports.useMemo = function(a, b) { + return U.current.useMemo(a, b); + }; + exports.useReducer = function(a, b, e) { + return U.current.useReducer(a, b, e); + }; + exports.useRef = function(a) { + return U.current.useRef(a); + }; + exports.useState = function(a) { + return U.current.useState(a); + }; + exports.useSyncExternalStore = function(a, b, e) { + return U.current.useSyncExternalStore(a, b, e); + }; + exports.useTransition = function() { + return U.current.useTransition(); + }; + exports.version = "18.2.0"; + } +}); + +// ../testeranto/node_modules/react/cjs/react.development.js +var require_react_development = __commonJS({ + "../testeranto/node_modules/react/cjs/react.development.js"(exports, module) { + "use strict"; + init_cjs_shim(); + if (process.env.NODE_ENV !== "production") { + (function() { + "use strict"; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); + } + var ReactVersion = "18.2.0"; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var ReactCurrentDispatcher = { + /** + * @internal + * @type {ReactComponent} + */ + current: null + }; + var ReactCurrentBatchConfig = { + transition: null + }; + var ReactCurrentActQueue = { + current: null, + // Used to reproduce behavior of `batchedUpdates` in legacy mode. + isBatchingLegacy: false, + didScheduleLegacyUpdate: false + }; + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null + }; + var ReactDebugCurrentFrame = {}; + var currentExtraStackFrame = null; + function setExtraStackFrame(stack) { + { + currentExtraStackFrame = stack; + } + } + { + ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { + { + currentExtraStackFrame = stack; + } + }; + ReactDebugCurrentFrame.getCurrentStack = null; + ReactDebugCurrentFrame.getStackAddendum = function() { + var stack = ""; + if (currentExtraStackFrame) { + stack += currentExtraStackFrame; + } + var impl = ReactDebugCurrentFrame.getCurrentStack; + if (impl) { + stack += impl() || ""; + } + return stack; + }; + } + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var ReactSharedInternals = { + ReactCurrentDispatcher, + ReactCurrentBatchConfig, + ReactCurrentOwner + }; + { + ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; + ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; + } + function warn(format) { + { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + } + function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var didWarnStateUpdateForUnmountedComponent = {}; + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; + var warningKey = componentName + "." + callerName; + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function(publicInstance) { + return false; + }, + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function(publicInstance, callback, callerName) { + warnNoop(publicInstance, "forceUpdate"); + }, + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, "replaceState"); + }, + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function(publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, "setState"); + } + }; + var assign = Object.assign; + var emptyObject = {}; + { + Object.freeze(emptyObject); + } + function Component(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + Component.prototype.isReactComponent = {}; + Component.prototype.setState = function(partialState, callback) { + if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) { + throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + } + this.updater.enqueueSetState(this, partialState, callback, "setState"); + }; + Component.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + { + var deprecatedAPIs = { + isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], + replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] + }; + var defineDeprecationWarning = function(methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function() { + warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); + return void 0; + } + }); + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + function ComponentDummy() { + } + ComponentDummy.prototype = Component.prototype; + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); + pureComponentPrototype.constructor = PureComponent; + assign(pureComponentPrototype, Component.prototype); + pureComponentPrototype.isPureReactComponent = true; + function createRef() { + var refObject = { + current: null + }; + { + Object.seal(refObject); + } + return refObject; + } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); + } + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; + } + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== void 0; + } + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== void 0; + } + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); + } + function warnIfStringRefCannotBeAutoConverted(config) { + { + if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); + didWarnAboutStringRefs[componentName] = true; + } + } + } + } + var ReactElement = function(type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }; + function createElement(type, config, children) { + var propName; + var props = {}; + var key = null; + var ref = null; + var self = null; + var source = null; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + { + warnIfStringRefCannotBeAutoConverted(config); + } + } + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); + } + key = "" + config.key; + } + self = config.__self === void 0 ? null : config.__self; + source = config.__source === void 0 ? null : config.__source; + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } + { + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + } + function cloneElement(element, config, children) { + if (element === null || element === void 0) { + throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); + } + var propName; + var props = assign({}, element.props); + var key = element.key; + var ref = element.ref; + var self = element._self; + var source = element._source; + var owner = element._owner; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); + } + key = "" + config.key; + } + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === void 0 && defaultProps !== void 0) { + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + return ReactElement(element.type, key, ref, self, source, owner, props); + } + function isValidElement(object) { + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + var SEPARATOR = "."; + var SUBSEPARATOR = ":"; + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + "=": "=0", + ":": "=2" + }; + var escapedString = key.replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + return "$" + escapedString; + } + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return text.replace(userProvidedKeyEscapeRegex, "$&/"); + } + function getElementKey(element, index) { + if (typeof element === "object" && element !== null && element.key != null) { + { + checkKeyStringCoercion(element.key); + } + return escape("" + element.key); + } + return index.toString(36); + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if (type === "undefined" || type === "boolean") { + children = null; + } + var invokeCallback = false; + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + if (invokeCallback) { + var _child = children; + var mappedChild = callback(_child); + var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; + if (isArray(mappedChild)) { + var escapedChildKey = ""; + if (childKey != null) { + escapedChildKey = escapeUserProvidedKey(childKey) + "/"; + } + mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + { + if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) { + checkKeyStringCoercion(mappedChild.key); + } + } + mappedChild = cloneAndReplaceKey( + mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? ( + // $FlowFixMe Flow incorrectly thinks existing element's key can be a number + // eslint-disable-next-line react-internal/safe-string-coercion + escapeUserProvidedKey("" + mappedChild.key) + "/" + ) : "") + childKey + ); + } + array.push(mappedChild); + } + return 1; + } + var child; + var nextName; + var subtreeCount = 0; + var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getElementKey(child, i); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else { + var iteratorFn = getIteratorFn(children); + if (typeof iteratorFn === "function") { + var iterableChildren = children; + { + if (iteratorFn === iterableChildren.entries) { + if (!didWarnAboutMaps) { + warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); + } + didWarnAboutMaps = true; + } + } + var iterator = iteratorFn.call(iterableChildren); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getElementKey(child, ii++); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else if (type === "object") { + var childrenString = String(children); + throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); + } + } + return subtreeCount; + } + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + var count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + function countChildren(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + } + function forEachChildren(children, forEachFunc, forEachContext) { + mapChildren(children, function() { + forEachFunc.apply(this, arguments); + }, forEachContext); + } + function toArray(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + } + function onlyChild(children) { + if (!isValidElement(children)) { + throw new Error("React.Children.only expected to receive a single React element child."); + } + return children; + } + function createContext(defaultValue) { + var context = { + $$typeof: REACT_CONTEXT_TYPE, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, + // These are circular + Provider: null, + Consumer: null, + // Add these to use same hidden class in VM as ServerContext + _defaultValue: null, + _globalName: null + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + var hasWarnedAboutDisplayNameOnConsumer = false; + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context + }; + Object.defineProperties(Consumer, { + Provider: { + get: function() { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Provider; + }, + set: function(_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function() { + return context._currentValue; + }, + set: function(_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function() { + return context._currentValue2; + }, + set: function(_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function() { + return context._threadCount; + }, + set: function(_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function() { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Consumer; + } + }, + displayName: { + get: function() { + return context.displayName; + }, + set: function(displayName) { + if (!hasWarnedAboutDisplayNameOnConsumer) { + warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); + hasWarnedAboutDisplayNameOnConsumer = true; + } + } + } + }); + context.Consumer = Consumer; + } + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + return context; + } + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function lazyInitializer(payload) { + if (payload._status === Uninitialized) { + var ctor = payload._result; + var thenable = ctor(); + thenable.then(function(moduleObject2) { + if (payload._status === Pending || payload._status === Uninitialized) { + var resolved = payload; + resolved._status = Resolved; + resolved._result = moduleObject2; + } + }, function(error2) { + if (payload._status === Pending || payload._status === Uninitialized) { + var rejected = payload; + rejected._status = Rejected; + rejected._result = error2; + } + }); + if (payload._status === Uninitialized) { + var pending = payload; + pending._status = Pending; + pending._result = thenable; + } + } + if (payload._status === Resolved) { + var moduleObject = payload._result; + { + if (moduleObject === void 0) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject); + } + } + { + if (!("default" in moduleObject)) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); + } + } + return moduleObject.default; + } else { + throw payload._result; + } + } + function lazy(ctor) { + var payload = { + // We use these fields to store the result. + _status: Uninitialized, + _result: ctor + }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: payload, + _init: lazyInitializer + }; + { + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function() { + return defaultProps; + }, + set: function(newDefaultProps) { + error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + defaultProps = newDefaultProps; + Object.defineProperty(lazyType, "defaultProps", { + enumerable: true + }); + } + }, + propTypes: { + configurable: true, + get: function() { + return propTypes; + }, + set: function(newPropTypes) { + error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + propTypes = newPropTypes; + Object.defineProperty(lazyType, "propTypes", { + enumerable: true + }); + } + } + }); + } + return lazyType; + } + function forwardRef(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); + } else if (typeof render !== "function") { + error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render); + } else { + if (render.length !== 0 && render.length !== 2) { + error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); + } + } + if (render != null) { + if (render.defaultProps != null || render.propTypes != null) { + error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); + } + } + } + var elementType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (!render.name && !render.displayName) { + render.displayName = name; + } + } + }); + } + return elementType; + } + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); + } + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; + } + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; + } + } + return false; + } + function memo(type, compare) { + { + if (!isValidElementType(type)) { + error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); + } + } + var elementType = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: compare === void 0 ? null : compare + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (!type.name && !type.displayName) { + type.displayName = name; + } + } + }); + } + return elementType; + } + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + { + if (dispatcher === null) { + error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); + } + } + return dispatcher; + } + function useContext(Context) { + var dispatcher = resolveDispatcher(); + { + if (Context._context !== void 0) { + var realContext = Context._context; + if (realContext.Consumer === Context) { + error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); + } else if (realContext.Provider === Context) { + error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); + } + } + } + return dispatcher.useContext(Context); + } + function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, deps); + } + function useInsertionEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useInsertionEffect(create, deps); + } + function useLayoutEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, deps); + } + function useCallback(callback, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, deps); + } + function useMemo(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, deps); + } + function useImperativeHandle(ref, create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, deps); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + function useTransition() { + var dispatcher = resolveDispatcher(); + return dispatcher.useTransition(); + } + function useDeferredValue(value) { + var dispatcher = resolveDispatcher(); + return dispatcher.useDeferredValue(value); + } + function useId() { + var dispatcher = resolveDispatcher(); + return dispatcher.useId(); + } + function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { + var dispatcher = resolveDispatcher(); + return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); + } + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher$1.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component2) { + var prototype = Component2.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } + } + } + function checkPropTypes(typeSpecs, values, location, componentName, element) { + { + var has = Function.call.bind(hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); + } + } + } + } + } + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + setExtraStackFrame(stack); + } else { + setExtraStackFrame(null); + } + } + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; + } + function getSourceInfoErrorAddendum(source) { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + } + return ""; + } + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== void 0) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + return ""; + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; + } + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + { + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node, parentType) { + if (typeof node !== "object") { + return; + } + if (isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes; + if (typeof type === "function") { + propTypes = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + } + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } + } + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + { + error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + } + var element = createElement.apply(this, arguments); + if (element == null) { + return element; + } + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; + } + var didWarnAboutDeprecatedCreateFactory = false; + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; + { + if (!didWarnAboutDeprecatedCreateFactory) { + didWarnAboutDeprecatedCreateFactory = true; + warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); + } + Object.defineProperty(validatedFactory, "type", { + enumerable: false, + get: function() { + warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); + Object.defineProperty(this, "type", { + value: type + }); + return type; + } + }); + } + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + function startTransition(scope, options) { + var prevTransition = ReactCurrentBatchConfig.transition; + ReactCurrentBatchConfig.transition = {}; + var currentTransition = ReactCurrentBatchConfig.transition; + { + ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set(); + } + try { + scope(); + } finally { + ReactCurrentBatchConfig.transition = prevTransition; + { + if (prevTransition === null && currentTransition._updatedFibers) { + var updatedFibersCount = currentTransition._updatedFibers.size; + if (updatedFibersCount > 10) { + warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."); + } + currentTransition._updatedFibers.clear(); + } + } + } + } + var didWarnAboutMessageChannel = false; + var enqueueTaskImpl = null; + function enqueueTask(task) { + if (enqueueTaskImpl === null) { + try { + var requireString = ("require" + Math.random()).slice(0, 7); + var nodeRequire = module && module[requireString]; + enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate; + } catch (_err) { + enqueueTaskImpl = function(callback) { + { + if (didWarnAboutMessageChannel === false) { + didWarnAboutMessageChannel = true; + if (typeof MessageChannel === "undefined") { + error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."); + } + } + } + var channel = new MessageChannel(); + channel.port1.onmessage = callback; + channel.port2.postMessage(void 0); + }; + } + } + return enqueueTaskImpl(task); + } + var actScopeDepth = 0; + var didWarnNoAwaitAct = false; + function act(callback) { + { + var prevActScopeDepth = actScopeDepth; + actScopeDepth++; + if (ReactCurrentActQueue.current === null) { + ReactCurrentActQueue.current = []; + } + var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy; + var result; + try { + ReactCurrentActQueue.isBatchingLegacy = true; + result = callback(); + if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) { + var queue = ReactCurrentActQueue.current; + if (queue !== null) { + ReactCurrentActQueue.didScheduleLegacyUpdate = false; + flushActQueue(queue); + } + } + } catch (error2) { + popActScope(prevActScopeDepth); + throw error2; + } finally { + ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; + } + if (result !== null && typeof result === "object" && typeof result.then === "function") { + var thenableResult = result; + var wasAwaited = false; + var thenable = { + then: function(resolve, reject) { + wasAwaited = true; + thenableResult.then(function(returnValue2) { + popActScope(prevActScopeDepth); + if (actScopeDepth === 0) { + recursivelyFlushAsyncActWork(returnValue2, resolve, reject); + } else { + resolve(returnValue2); + } + }, function(error2) { + popActScope(prevActScopeDepth); + reject(error2); + }); + } + }; + { + if (!didWarnNoAwaitAct && typeof Promise !== "undefined") { + Promise.resolve().then(function() { + }).then(function() { + if (!wasAwaited) { + didWarnNoAwaitAct = true; + error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"); + } + }); + } + } + return thenable; + } else { + var returnValue = result; + popActScope(prevActScopeDepth); + if (actScopeDepth === 0) { + var _queue = ReactCurrentActQueue.current; + if (_queue !== null) { + flushActQueue(_queue); + ReactCurrentActQueue.current = null; + } + var _thenable = { + then: function(resolve, reject) { + if (ReactCurrentActQueue.current === null) { + ReactCurrentActQueue.current = []; + recursivelyFlushAsyncActWork(returnValue, resolve, reject); + } else { + resolve(returnValue); + } + } + }; + return _thenable; + } else { + var _thenable2 = { + then: function(resolve, reject) { + resolve(returnValue); + } + }; + return _thenable2; + } + } + } + } + function popActScope(prevActScopeDepth) { + { + if (prevActScopeDepth !== actScopeDepth - 1) { + error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "); + } + actScopeDepth = prevActScopeDepth; + } + } + function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { + { + var queue = ReactCurrentActQueue.current; + if (queue !== null) { + try { + flushActQueue(queue); + enqueueTask(function() { + if (queue.length === 0) { + ReactCurrentActQueue.current = null; + resolve(returnValue); + } else { + recursivelyFlushAsyncActWork(returnValue, resolve, reject); + } + }); + } catch (error2) { + reject(error2); + } + } else { + resolve(returnValue); + } + } + } + var isFlushing = false; + function flushActQueue(queue) { + { + if (!isFlushing) { + isFlushing = true; + var i = 0; + try { + for (; i < queue.length; i++) { + var callback = queue[i]; + do { + callback = callback(true); + } while (callback !== null); + } + queue.length = 0; + } catch (error2) { + queue = queue.slice(i + 1); + throw error2; + } finally { + isFlushing = false; + } + } + } + } + var createElement$1 = createElementWithValidation; + var cloneElement$1 = cloneElementWithValidation; + var createFactory = createFactoryWithValidation; + var Children = { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray, + only: onlyChild + }; + exports.Children = Children; + exports.Component = Component; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.Profiler = REACT_PROFILER_TYPE; + exports.PureComponent = PureComponent; + exports.StrictMode = REACT_STRICT_MODE_TYPE; + exports.Suspense = REACT_SUSPENSE_TYPE; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; + exports.cloneElement = cloneElement$1; + exports.createContext = createContext; + exports.createElement = createElement$1; + exports.createFactory = createFactory; + exports.createRef = createRef; + exports.forwardRef = forwardRef; + exports.isValidElement = isValidElement; + exports.lazy = lazy; + exports.memo = memo; + exports.startTransition = startTransition; + exports.unstable_act = act; + exports.useCallback = useCallback; + exports.useContext = useContext; + exports.useDebugValue = useDebugValue; + exports.useDeferredValue = useDeferredValue; + exports.useEffect = useEffect; + exports.useId = useId; + exports.useImperativeHandle = useImperativeHandle; + exports.useInsertionEffect = useInsertionEffect; + exports.useLayoutEffect = useLayoutEffect; + exports.useMemo = useMemo; + exports.useReducer = useReducer; + exports.useRef = useRef; + exports.useState = useState; + exports.useSyncExternalStore = useSyncExternalStore; + exports.useTransition = useTransition; + exports.version = ReactVersion; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); + } + })(); + } + } +}); + +// ../testeranto/node_modules/react/index.js +var require_react = __commonJS({ + "../testeranto/node_modules/react/index.js"(exports, module) { + "use strict"; + init_cjs_shim(); + if (process.env.NODE_ENV === "production") { + module.exports = require_react_production_min(); + } else { + module.exports = require_react_development(); + } + } +}); + +export { + require_react +}; +/*! Bundled license information: + +react/cjs/react.production.min.js: + (** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react/cjs/react.development.js: + (** + * @license React + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) +*/ diff --git a/docs/node/chunk-7FLCGHSA.mjs b/docs/node/chunk-JYHLOLG4.mjs similarity index 96% rename from docs/node/chunk-7FLCGHSA.mjs rename to docs/node/chunk-JYHLOLG4.mjs index 81c820f2..e8bdfbda 100644 --- a/docs/node/chunk-7FLCGHSA.mjs +++ b/docs/node/chunk-JYHLOLG4.mjs @@ -7,7 +7,7 @@ import { __toCommonJS, __toESM, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/node_modules/graphology/dist/graphology.umd.js var require_graphology_umd = __commonJS({ @@ -19975,9 +19975,9 @@ var require_helpers2 = __commonJS({ } }); -// node_modules/websocket/node_modules/ms/index.js +// node_modules/websocket/node_modules/debug/node_modules/ms/index.js var require_ms = __commonJS({ - "node_modules/websocket/node_modules/ms/index.js"(exports2, module2) { + "node_modules/websocket/node_modules/debug/node_modules/ms/index.js"(exports2, module2) { init_cjs_shim(); var s = 1e3; var m = s * 60; @@ -20479,9 +20479,9 @@ var require_utils7 = __commonJS({ } }); -// node_modules/node-gyp-build/node-gyp-build.js +// node_modules/websocket/node_modules/bufferutil/node_modules/node-gyp-build/node-gyp-build.js var require_node_gyp_build = __commonJS({ - "node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) { + "node_modules/websocket/node_modules/bufferutil/node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) { init_cjs_shim(); var fs = __require("fs"); var path = __require("path"); @@ -20671,9 +20671,9 @@ var require_node_gyp_build = __commonJS({ } }); -// node_modules/node-gyp-build/index.js +// node_modules/websocket/node_modules/bufferutil/node_modules/node-gyp-build/index.js var require_node_gyp_build2 = __commonJS({ - "node_modules/node-gyp-build/index.js"(exports2, module2) { + "node_modules/websocket/node_modules/bufferutil/node_modules/node-gyp-build/index.js"(exports2, module2) { init_cjs_shim(); var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; if (typeof runtimeRequire.addon === "function") { @@ -21089,6 +21089,211 @@ var require_FastBufferList = __commonJS({ } }); +// node_modules/websocket/node_modules/utf-8-validate/node_modules/node-gyp-build/node-gyp-build.js +var require_node_gyp_build3 = __commonJS({ + "node_modules/websocket/node_modules/utf-8-validate/node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) { + init_cjs_shim(); + var fs = __require("fs"); + var path = __require("path"); + var os = __require("os"); + var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; + var vars = process.config && process.config.variables || {}; + var prebuildsOnly = !!process.env.PREBUILDS_ONLY; + var abi = process.versions.modules; + var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node"; + var arch = process.env.npm_config_arch || os.arch(); + var platform = process.env.npm_config_platform || os.platform(); + var libc = process.env.LIBC || (isAlpine(platform) ? "musl" : "glibc"); + var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || ""; + var uv = (process.versions.uv || "").split(".")[0]; + module2.exports = load; + function load(dir) { + return runtimeRequire(load.resolve(dir)); + } + load.resolve = load.path = function(dir) { + dir = path.resolve(dir || "."); + try { + var name2 = runtimeRequire(path.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_"); + if (process.env[name2 + "_PREBUILD"]) + dir = process.env[name2 + "_PREBUILD"]; + } catch (err) { + } + if (!prebuildsOnly) { + var release = getFirst(path.join(dir, "build/Release"), matchBuild); + if (release) + return release; + var debug = getFirst(path.join(dir, "build/Debug"), matchBuild); + if (debug) + return debug; + } + var prebuild = resolve(dir); + if (prebuild) + return prebuild; + var nearby = resolve(path.dirname(process.execPath)); + if (nearby) + return nearby; + var target = [ + "platform=" + platform, + "arch=" + arch, + "runtime=" + runtime, + "abi=" + abi, + "uv=" + uv, + armv ? "armv=" + armv : "", + "libc=" + libc, + "node=" + process.versions.node, + process.versions.electron ? "electron=" + process.versions.electron : "", + typeof __webpack_require__ === "function" ? "webpack=true" : "" + // eslint-disable-line + ].filter(Boolean).join(" "); + throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n"); + function resolve(dir2) { + var tuples = readdirSync(path.join(dir2, "prebuilds")).map(parseTuple); + var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0]; + if (!tuple) + return; + var prebuilds = path.join(dir2, "prebuilds", tuple.name); + var parsed = readdirSync(prebuilds).map(parseTags); + var candidates = parsed.filter(matchTags(runtime, abi)); + var winner = candidates.sort(compareTags(runtime))[0]; + if (winner) + return path.join(prebuilds, winner.file); + } + }; + function readdirSync(dir) { + try { + return fs.readdirSync(dir); + } catch (err) { + return []; + } + } + function getFirst(dir, filter) { + var files = readdirSync(dir).filter(filter); + return files[0] && path.join(dir, files[0]); + } + function matchBuild(name2) { + return /\.node$/.test(name2); + } + function parseTuple(name2) { + var arr = name2.split("-"); + if (arr.length !== 2) + return; + var platform2 = arr[0]; + var architectures = arr[1].split("+"); + if (!platform2) + return; + if (!architectures.length) + return; + if (!architectures.every(Boolean)) + return; + return { name: name2, platform: platform2, architectures }; + } + function matchTuple(platform2, arch2) { + return function(tuple) { + if (tuple == null) + return false; + if (tuple.platform !== platform2) + return false; + return tuple.architectures.includes(arch2); + }; + } + function compareTuples(a, b) { + return a.architectures.length - b.architectures.length; + } + function parseTags(file) { + var arr = file.split("."); + var extension = arr.pop(); + var tags = { file, specificity: 0 }; + if (extension !== "node") + return; + for (var i = 0; i < arr.length; i++) { + var tag = arr[i]; + if (tag === "node" || tag === "electron" || tag === "node-webkit") { + tags.runtime = tag; + } else if (tag === "napi") { + tags.napi = true; + } else if (tag.slice(0, 3) === "abi") { + tags.abi = tag.slice(3); + } else if (tag.slice(0, 2) === "uv") { + tags.uv = tag.slice(2); + } else if (tag.slice(0, 4) === "armv") { + tags.armv = tag.slice(4); + } else if (tag === "glibc" || tag === "musl") { + tags.libc = tag; + } else { + continue; + } + tags.specificity++; + } + return tags; + } + function matchTags(runtime2, abi2) { + return function(tags) { + if (tags == null) + return false; + if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) + return false; + if (tags.abi && tags.abi !== abi2 && !tags.napi) + return false; + if (tags.uv && tags.uv !== uv) + return false; + if (tags.armv && tags.armv !== armv) + return false; + if (tags.libc && tags.libc !== libc) + return false; + return true; + }; + } + function runtimeAgnostic(tags) { + return tags.runtime === "node" && tags.napi; + } + function compareTags(runtime2) { + return function(a, b) { + if (a.runtime !== b.runtime) { + return a.runtime === runtime2 ? -1 : 1; + } else if (a.abi !== b.abi) { + return a.abi ? -1 : 1; + } else if (a.specificity !== b.specificity) { + return a.specificity > b.specificity ? -1 : 1; + } else { + return 0; + } + }; + } + function isNwjs() { + return !!(process.versions && process.versions.nw); + } + function isElectron() { + if (process.versions && process.versions.electron) + return true; + if (process.env.ELECTRON_RUN_AS_NODE) + return true; + return typeof window !== "undefined" && window.process && window.process.type === "renderer"; + } + function isAlpine(platform2) { + return platform2 === "linux" && fs.existsSync("/etc/alpine-release"); + } + load.parseTags = parseTags; + load.matchTags = matchTags; + load.compareTags = compareTags; + load.parseTuple = parseTuple; + load.matchTuple = matchTuple; + load.compareTuples = compareTuples; + } +}); + +// node_modules/websocket/node_modules/utf-8-validate/node_modules/node-gyp-build/index.js +var require_node_gyp_build4 = __commonJS({ + "node_modules/websocket/node_modules/utf-8-validate/node_modules/node-gyp-build/index.js"(exports2, module2) { + init_cjs_shim(); + var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; + if (typeof runtimeRequire.addon === "function") { + module2.exports = runtimeRequire.addon.bind(runtimeRequire); + } else { + module2.exports = require_node_gyp_build3(); + } + } +}); + // node_modules/websocket/node_modules/utf-8-validate/fallback.js var require_fallback2 = __commonJS({ "node_modules/websocket/node_modules/utf-8-validate/fallback.js"(exports2, module2) { @@ -21133,7 +21338,7 @@ var require_utf_8_validate = __commonJS({ "use strict"; init_cjs_shim(); try { - module2.exports = require_node_gyp_build2()(__dirname); + module2.exports = require_node_gyp_build4()(__dirname); } catch (e) { module2.exports = require_fallback2(); } @@ -38115,9 +38320,9 @@ var require_curve2 = __commonJS({ } }); -// node_modules/hash.js/lib/hash/utils.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/utils.js var require_utils11 = __commonJS({ - "node_modules/hash.js/lib/hash/utils.js"(exports2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/utils.js"(exports2) { "use strict"; init_cjs_shim(); var assert = require_minimalistic_assert(); @@ -38361,9 +38566,9 @@ var require_utils11 = __commonJS({ } }); -// node_modules/hash.js/lib/hash/common.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/common.js var require_common = __commonJS({ - "node_modules/hash.js/lib/hash/common.js"(exports2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/common.js"(exports2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -38441,9 +38646,9 @@ var require_common = __commonJS({ } }); -// node_modules/hash.js/lib/hash/sha/common.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/common.js var require_common2 = __commonJS({ - "node_modules/hash.js/lib/hash/sha/common.js"(exports2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/common.js"(exports2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -38488,9 +38693,9 @@ var require_common2 = __commonJS({ } }); -// node_modules/hash.js/lib/hash/sha/1.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/1.js var require__ = __commonJS({ - "node_modules/hash.js/lib/hash/sha/1.js"(exports2, module2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/1.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -38561,9 +38766,9 @@ var require__ = __commonJS({ } }); -// node_modules/hash.js/lib/hash/sha/256.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/256.js var require__2 = __commonJS({ - "node_modules/hash.js/lib/hash/sha/256.js"(exports2, module2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/256.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -38714,9 +38919,9 @@ var require__2 = __commonJS({ } }); -// node_modules/hash.js/lib/hash/sha/224.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/224.js var require__3 = __commonJS({ - "node_modules/hash.js/lib/hash/sha/224.js"(exports2, module2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/224.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -38751,9 +38956,9 @@ var require__3 = __commonJS({ } }); -// node_modules/hash.js/lib/hash/sha/512.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/512.js var require__4 = __commonJS({ - "node_modules/hash.js/lib/hash/sha/512.js"(exports2, module2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/512.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -39191,9 +39396,9 @@ var require__4 = __commonJS({ } }); -// node_modules/hash.js/lib/hash/sha/384.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/384.js var require__5 = __commonJS({ - "node_modules/hash.js/lib/hash/sha/384.js"(exports2, module2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha/384.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -39236,9 +39441,9 @@ var require__5 = __commonJS({ } }); -// node_modules/hash.js/lib/hash/sha.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha.js var require_sha = __commonJS({ - "node_modules/hash.js/lib/hash/sha.js"(exports2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/sha.js"(exports2) { "use strict"; init_cjs_shim(); exports2.sha1 = require__(); @@ -39249,9 +39454,9 @@ var require_sha = __commonJS({ } }); -// node_modules/hash.js/lib/hash/ripemd.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/ripemd.js var require_ripemd = __commonJS({ - "node_modules/hash.js/lib/hash/ripemd.js"(exports2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/ripemd.js"(exports2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -39691,9 +39896,9 @@ var require_ripemd = __commonJS({ } }); -// node_modules/hash.js/lib/hash/hmac.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/hmac.js var require_hmac2 = __commonJS({ - "node_modules/hash.js/lib/hash/hmac.js"(exports2, module2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash/hmac.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_utils11(); @@ -39733,9 +39938,9 @@ var require_hmac2 = __commonJS({ } }); -// node_modules/hash.js/lib/hash.js +// node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash.js var require_hash = __commonJS({ - "node_modules/hash.js/lib/hash.js"(exports2) { + "node_modules/@ethersproject/signing-key/node_modules/hash.js/lib/hash.js"(exports2) { init_cjs_shim(); var hash = exports2; hash.utils = require_utils11(); @@ -40716,1247 +40921,2884 @@ var require_curves = __commonJS({ } }); -// node_modules/hmac-drbg/lib/hmac-drbg.js -var require_hmac_drbg = __commonJS({ - "node_modules/hmac-drbg/lib/hmac-drbg.js"(exports2, module2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/utils.js +var require_utils12 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/utils.js"(exports2) { "use strict"; init_cjs_shim(); - var hash = require_hash(); - var utils = require_utils9(); var assert = require_minimalistic_assert(); - function HmacDRBG(options) { - if (!(this instanceof HmacDRBG)) - return new HmacDRBG(options); - this.hash = options.hash; - this.predResist = !!options.predResist; - this.outLen = this.hash.outSize; - this.minEntropy = options.minEntropy || this.hash.hmacStrength; - this._reseed = null; - this.reseedInterval = null; - this.K = null; - this.V = null; - var entropy = utils.toArray(options.entropy, options.entropyEnc || "hex"); - var nonce = utils.toArray(options.nonce, options.nonceEnc || "hex"); - var pers = utils.toArray(options.pers, options.persEnc || "hex"); - assert( - entropy.length >= this.minEntropy / 8, - "Not enough entropy. Minimum is: " + this.minEntropy + " bits" - ); - this._init(entropy, nonce, pers); - } - module2.exports = HmacDRBG; - HmacDRBG.prototype._init = function init(entropy, nonce, pers) { - var seed = entropy.concat(nonce).concat(pers); - this.K = new Array(this.outLen / 8); - this.V = new Array(this.outLen / 8); - for (var i = 0; i < this.V.length; i++) { - this.K[i] = 0; - this.V[i] = 1; + var inherits2 = require_inherits(); + exports2.inherits = inherits2; + function isSurrogatePair(msg, i) { + if ((msg.charCodeAt(i) & 64512) !== 55296) { + return false; } - this._update(seed); - this._reseed = 1; - this.reseedInterval = 281474976710656; - }; - HmacDRBG.prototype._hmac = function hmac() { - return new hash.hmac(this.hash, this.K); - }; - HmacDRBG.prototype._update = function update(seed) { - var kmac = this._hmac().update(this.V).update([0]); - if (seed) - kmac = kmac.update(seed); - this.K = kmac.digest(); - this.V = this._hmac().update(this.V).digest(); - if (!seed) - return; - this.K = this._hmac().update(this.V).update([1]).update(seed).digest(); - this.V = this._hmac().update(this.V).digest(); - }; - HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { - if (typeof entropyEnc !== "string") { - addEnc = add; - add = entropyEnc; - entropyEnc = null; + if (i < 0 || i + 1 >= msg.length) { + return false; } - entropy = utils.toArray(entropy, entropyEnc); - add = utils.toArray(add, addEnc); - assert( - entropy.length >= this.minEntropy / 8, - "Not enough entropy. Minimum is: " + this.minEntropy + " bits" - ); - this._update(entropy.concat(add || [])); - this._reseed = 1; - }; - HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { - if (this._reseed > this.reseedInterval) - throw new Error("Reseed is required"); - if (typeof enc !== "string") { - addEnc = add; - add = enc; - enc = null; + return (msg.charCodeAt(i + 1) & 64512) === 56320; + } + function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === "string") { + if (!enc) { + var p = 0; + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + if (c < 128) { + res[p++] = c; + } else if (c < 2048) { + res[p++] = c >> 6 | 192; + res[p++] = c & 63 | 128; + } else if (isSurrogatePair(msg, i)) { + c = 65536 + ((c & 1023) << 10) + (msg.charCodeAt(++i) & 1023); + res[p++] = c >> 18 | 240; + res[p++] = c >> 12 & 63 | 128; + res[p++] = c >> 6 & 63 | 128; + res[p++] = c & 63 | 128; + } else { + res[p++] = c >> 12 | 224; + res[p++] = c >> 6 & 63 | 128; + res[p++] = c & 63 | 128; + } + } + } else if (enc === "hex") { + msg = msg.replace(/[^a-z0-9]+/ig, ""); + if (msg.length % 2 !== 0) + msg = "0" + msg; + for (i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; } - if (add) { - add = utils.toArray(add, addEnc || "hex"); - this._update(add); + return res; + } + exports2.toArray = toArray; + function toHex(msg) { + var res = ""; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; + } + exports2.toHex = toHex; + function htonl(w) { + var res = w >>> 24 | w >>> 8 & 65280 | w << 8 & 16711680 | (w & 255) << 24; + return res >>> 0; + } + exports2.htonl = htonl; + function toHex32(msg, endian) { + var res = ""; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === "little") + w = htonl(w); + res += zero8(w.toString(16)); } - var temp = []; - while (temp.length < len) { - this.V = this._hmac().update(this.V).digest(); - temp = temp.concat(this.V); + return res; + } + exports2.toHex32 = toHex32; + function zero2(word) { + if (word.length === 1) + return "0" + word; + else + return word; + } + exports2.zero2 = zero2; + function zero8(word) { + if (word.length === 7) + return "0" + word; + else if (word.length === 6) + return "00" + word; + else if (word.length === 5) + return "000" + word; + else if (word.length === 4) + return "0000" + word; + else if (word.length === 3) + return "00000" + word; + else if (word.length === 2) + return "000000" + word; + else if (word.length === 1) + return "0000000" + word; + else + return word; + } + exports2.zero8 = zero8; + function join32(msg, start, end, endian) { + var len = end - start; + assert(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === "big") + w = msg[k] << 24 | msg[k + 1] << 16 | msg[k + 2] << 8 | msg[k + 3]; + else + w = msg[k + 3] << 24 | msg[k + 2] << 16 | msg[k + 1] << 8 | msg[k]; + res[i] = w >>> 0; } - var res = temp.slice(0, len); - this._update(add); - this._reseed++; - return utils.encode(res, enc); - }; + return res; + } + exports2.join32 = join32; + function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === "big") { + res[k] = m >>> 24; + res[k + 1] = m >>> 16 & 255; + res[k + 2] = m >>> 8 & 255; + res[k + 3] = m & 255; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = m >>> 16 & 255; + res[k + 1] = m >>> 8 & 255; + res[k] = m & 255; + } + } + return res; + } + exports2.split32 = split32; + function rotr32(w, b) { + return w >>> b | w << 32 - b; + } + exports2.rotr32 = rotr32; + function rotl32(w, b) { + return w << b | w >>> 32 - b; + } + exports2.rotl32 = rotl32; + function sum32(a, b) { + return a + b >>> 0; + } + exports2.sum32 = sum32; + function sum32_3(a, b, c) { + return a + b + c >>> 0; + } + exports2.sum32_3 = sum32_3; + function sum32_4(a, b, c, d) { + return a + b + c + d >>> 0; + } + exports2.sum32_4 = sum32_4; + function sum32_5(a, b, c, d, e) { + return a + b + c + d + e >>> 0; + } + exports2.sum32_5 = sum32_5; + function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + var lo = al + bl >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; + } + exports2.sum64 = sum64; + function sum64_hi(ah, al, bh, bl) { + var lo = al + bl >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; + } + exports2.sum64_hi = sum64_hi; + function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; + } + exports2.sum64_lo = sum64_lo; + function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = lo + bl >>> 0; + carry += lo < al ? 1 : 0; + lo = lo + cl >>> 0; + carry += lo < cl ? 1 : 0; + lo = lo + dl >>> 0; + carry += lo < dl ? 1 : 0; + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; + } + exports2.sum64_4_hi = sum64_4_hi; + function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; + } + exports2.sum64_4_lo = sum64_4_lo; + function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = lo + bl >>> 0; + carry += lo < al ? 1 : 0; + lo = lo + cl >>> 0; + carry += lo < cl ? 1 : 0; + lo = lo + dl >>> 0; + carry += lo < dl ? 1 : 0; + lo = lo + el >>> 0; + carry += lo < el ? 1 : 0; + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; + } + exports2.sum64_5_hi = sum64_5_hi; + function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + return lo >>> 0; + } + exports2.sum64_5_lo = sum64_5_lo; + function rotr64_hi(ah, al, num) { + var r = al << 32 - num | ah >>> num; + return r >>> 0; + } + exports2.rotr64_hi = rotr64_hi; + function rotr64_lo(ah, al, num) { + var r = ah << 32 - num | al >>> num; + return r >>> 0; + } + exports2.rotr64_lo = rotr64_lo; + function shr64_hi(ah, al, num) { + return ah >>> num; + } + exports2.shr64_hi = shr64_hi; + function shr64_lo(ah, al, num) { + var r = ah << 32 - num | al >>> num; + return r >>> 0; + } + exports2.shr64_lo = shr64_lo; } }); -// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/key.js -var require_key = __commonJS({ - "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/key.js"(exports2, module2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/common.js +var require_common3 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/common.js"(exports2) { "use strict"; init_cjs_shim(); - var BN = require_bn4(); - var utils = require_utils10(); - var assert = utils.assert; - function KeyPair(ec, options) { - this.ec = ec; - this.priv = null; - this.pub = null; - if (options.priv) - this._importPrivate(options.priv, options.privEnc); - if (options.pub) - this._importPublic(options.pub, options.pubEnc); + var utils = require_utils12(); + var assert = require_minimalistic_assert(); + function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = "big"; + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; } - module2.exports = KeyPair; - KeyPair.fromPublic = function fromPublic(ec, pub, enc) { - if (pub instanceof KeyPair) - return pub; - return new KeyPair(ec, { - pub, - pubEnc: enc - }); - }; - KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { - if (priv instanceof KeyPair) - return priv; - return new KeyPair(ec, { - priv, - privEnc: enc - }); - }; - KeyPair.prototype.validate = function validate2() { - var pub = this.getPublic(); - if (pub.isInfinity()) - return { result: false, reason: "Invalid public key" }; - if (!pub.validate()) - return { result: false, reason: "Public key is not a point" }; - if (!pub.mul(this.ec.curve.n).isInfinity()) - return { result: false, reason: "Public key * N != O" }; - return { result: true, reason: null }; - }; - KeyPair.prototype.getPublic = function getPublic(compact, enc) { - if (typeof compact === "string") { - enc = compact; - compact = null; - } - if (!this.pub) - this.pub = this.ec.g.mul(this.priv); - if (!enc) - return this.pub; - return this.pub.encode(enc, compact); - }; - KeyPair.prototype.getPrivate = function getPrivate(enc) { - if (enc === "hex") - return this.priv.toString(16, 2); + exports2.BlockHash = BlockHash; + BlockHash.prototype.update = function update(msg, enc) { + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; else - return this.priv; - }; - KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { - this.priv = new BN(key, enc || 16); - this.priv = this.priv.umod(this.ec.curve.n); - }; - KeyPair.prototype._importPublic = function _importPublic(key, enc) { - if (key.x || key.y) { - if (this.ec.curve.type === "mont") { - assert(key.x, "Need x coordinate"); - } else if (this.ec.curve.type === "short" || this.ec.curve.type === "edwards") { - assert(key.x && key.y, "Need both x and y coordinate"); - } - this.pub = this.ec.curve.point(key.x, key.y); - return; - } - this.pub = this.ec.curve.decodePoint(key, enc); - }; - KeyPair.prototype.derive = function derive(pub) { - if (!pub.validate()) { - assert(pub.validate(), "public point not validated"); + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + if (this.pending.length >= this._delta8) { + msg = this.pending; + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); } - return pub.mul(this.priv).getX(); - }; - KeyPair.prototype.sign = function sign(msg, enc, options) { - return this.ec.sign(msg, this, enc, options); + return this; }; - KeyPair.prototype.verify = function verify(msg, signature) { - return this.ec.verify(msg, signature, this); + BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + assert(this.pending === null); + return this._digest(enc); }; - KeyPair.prototype.inspect = function inspect() { - return ""; + BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - (len + this.padLength) % bytes; + var res = new Array(k + this.padLength); + res[0] = 128; + for (var i = 1; i < k; i++) + res[i] = 0; + len <<= 3; + if (this.endian === "big") { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = len >>> 24 & 255; + res[i++] = len >>> 16 & 255; + res[i++] = len >>> 8 & 255; + res[i++] = len & 255; + } else { + res[i++] = len & 255; + res[i++] = len >>> 8 & 255; + res[i++] = len >>> 16 & 255; + res[i++] = len >>> 24 & 255; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + return res; }; } }); -// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/signature.js -var require_signature2 = __commonJS({ - "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/signature.js"(exports2, module2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/common.js +var require_common4 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/common.js"(exports2) { "use strict"; init_cjs_shim(); - var BN = require_bn4(); - var utils = require_utils10(); - var assert = utils.assert; - function Signature(options, enc) { - if (options instanceof Signature) - return options; - if (this._importDER(options, enc)) - return; - assert(options.r && options.s, "Signature without r or s"); - this.r = new BN(options.r, 16); - this.s = new BN(options.s, 16); - if (options.recoveryParam === void 0) - this.recoveryParam = null; - else - this.recoveryParam = options.recoveryParam; + var utils = require_utils12(); + var rotr32 = utils.rotr32; + function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); } - module2.exports = Signature; - function Position() { - this.place = 0; + exports2.ft_1 = ft_1; + function ch32(x, y, z) { + return x & y ^ ~x & z; } - function getLength(buf, p) { - var initial = buf[p.place++]; - if (!(initial & 128)) { - return initial; - } - var octetLen = initial & 15; - if (octetLen === 0 || octetLen > 4) { - return false; - } - var val = 0; - for (var i = 0, off = p.place; i < octetLen; i++, off++) { - val <<= 8; - val |= buf[off]; - val >>>= 0; - } - if (val <= 127) { - return false; - } - p.place = off; - return val; + exports2.ch32 = ch32; + function maj32(x, y, z) { + return x & y ^ x & z ^ y & z; } - function rmPadding(buf) { - var i = 0; - var len = buf.length - 1; - while (!buf[i] && !(buf[i + 1] & 128) && i < len) { - i++; - } - if (i === 0) { - return buf; - } - return buf.slice(i); + exports2.maj32 = maj32; + function p32(x, y, z) { + return x ^ y ^ z; } - Signature.prototype._importDER = function _importDER(data, enc) { - data = utils.toArray(data, enc); - var p = new Position(); - if (data[p.place++] !== 48) { - return false; - } - var len = getLength(data, p); - if (len === false) { - return false; - } - if (len + p.place !== data.length) { - return false; - } - if (data[p.place++] !== 2) { - return false; - } - var rlen = getLength(data, p); - if (rlen === false) { - return false; - } - var r = data.slice(p.place, rlen + p.place); - p.place += rlen; - if (data[p.place++] !== 2) { - return false; - } - var slen = getLength(data, p); - if (slen === false) { - return false; - } - if (data.length !== slen + p.place) { - return false; - } - var s = data.slice(p.place, slen + p.place); - if (r[0] === 0) { - if (r[1] & 128) { - r = r.slice(1); - } else { - return false; - } - } - if (s[0] === 0) { - if (s[1] & 128) { - s = s.slice(1); - } else { - return false; - } - } - this.r = new BN(r); - this.s = new BN(s); - this.recoveryParam = null; - return true; - }; - function constructLength(arr, len) { - if (len < 128) { - arr.push(len); - return; - } - var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); - arr.push(octets | 128); - while (--octets) { - arr.push(len >>> (octets << 3) & 255); - } - arr.push(len); + exports2.p32 = p32; + function s0_256(x) { + return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); } - Signature.prototype.toDER = function toDER(enc) { - var r = this.r.toArray(); - var s = this.s.toArray(); - if (r[0] & 128) - r = [0].concat(r); - if (s[0] & 128) - s = [0].concat(s); - r = rmPadding(r); - s = rmPadding(s); - while (!s[0] && !(s[1] & 128)) { - s = s.slice(1); - } - var arr = [2]; - constructLength(arr, r.length); - arr = arr.concat(r); - arr.push(2); - constructLength(arr, s.length); - var backHalf = arr.concat(s); - var res = [48]; - constructLength(res, backHalf.length); - res = res.concat(backHalf); - return utils.encode(res, enc); - }; + exports2.s0_256 = s0_256; + function s1_256(x) { + return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); + } + exports2.s1_256 = s1_256; + function g0_256(x) { + return rotr32(x, 7) ^ rotr32(x, 18) ^ x >>> 3; + } + exports2.g0_256 = g0_256; + function g1_256(x) { + return rotr32(x, 17) ^ rotr32(x, 19) ^ x >>> 10; + } + exports2.g1_256 = g1_256; } }); -// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/index.js -var require_ec = __commonJS({ - "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/index.js"(exports2, module2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/1.js +var require__6 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/1.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var BN = require_bn4(); - var HmacDRBG = require_hmac_drbg(); - var utils = require_utils10(); - var curves = require_curves(); - var rand = require_brorand(); - var assert = utils.assert; - var KeyPair = require_key(); - var Signature = require_signature2(); - function EC(options) { - if (!(this instanceof EC)) - return new EC(options); - if (typeof options === "string") { - assert( - Object.prototype.hasOwnProperty.call(curves, options), - "Unknown curve " + options - ); - options = curves[options]; - } - if (options instanceof curves.PresetCurve) - options = { curve: options }; - this.curve = options.curve.curve; - this.n = this.curve.n; - this.nh = this.n.ushrn(1); - this.g = this.curve.g; - this.g = options.curve.g; - this.g.precompute(options.curve.n.bitLength() + 1); - this.hash = options.hash || options.curve.hash; + var utils = require_utils12(); + var common = require_common3(); + var shaCommon = require_common4(); + var rotl32 = utils.rotl32; + var sum32 = utils.sum32; + var sum32_5 = utils.sum32_5; + var ft_1 = shaCommon.ft_1; + var BlockHash = common.BlockHash; + var sha1_K = [ + 1518500249, + 1859775393, + 2400959708, + 3395469782 + ]; + function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + BlockHash.call(this); + this.h = [ + 1732584193, + 4023233417, + 2562383102, + 271733878, + 3285377520 + ]; + this.W = new Array(80); } - module2.exports = EC; - EC.prototype.keyPair = function keyPair(options) { - return new KeyPair(this, options); - }; - EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { - return KeyPair.fromPrivate(this, priv, enc); - }; - EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { - return KeyPair.fromPublic(this, pub, enc); - }; - EC.prototype.genKeyPair = function genKeyPair(options) { - if (!options) - options = {}; - var drbg = new HmacDRBG({ - hash: this.hash, - pers: options.pers, - persEnc: options.persEnc || "utf8", - entropy: options.entropy || rand(this.hash.hmacStrength), - entropyEnc: options.entropy && options.entropyEnc || "utf8", - nonce: this.n.toArray() - }); - var bytes = this.n.byteLength(); - var ns2 = this.n.sub(new BN(2)); - for (; ; ) { - var priv = new BN(drbg.generate(bytes)); - if (priv.cmp(ns2) > 0) - continue; - priv.iaddn(1); - return this.keyFromPrivate(priv); + utils.inherits(SHA1, BlockHash); + module2.exports = SHA1; + SHA1.blockSize = 512; + SHA1.outSize = 160; + SHA1.hmacStrength = 80; + SHA1.padLength = 64; + SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32(b, 30); + b = a; + a = t; } + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); }; - EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) { - var delta = msg.byteLength() * 8 - this.n.bitLength(); - if (delta > 0) - msg = msg.ushrn(delta); - if (!truncOnly && msg.cmp(this.n) >= 0) - return msg.sub(this.n); + SHA1.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); else - return msg; - }; - EC.prototype.sign = function sign(msg, key, enc, options) { - if (typeof enc === "object") { - options = enc; - enc = null; - } - if (!options) - options = {}; - key = this.keyFromPrivate(key, enc); - msg = this._truncateToN(new BN(msg, 16)); - var bytes = this.n.byteLength(); - var bkey = key.getPrivate().toArray("be", bytes); - var nonce = msg.toArray("be", bytes); - var drbg = new HmacDRBG({ - hash: this.hash, - entropy: bkey, - nonce, - pers: options.pers, - persEnc: options.persEnc || "utf8" - }); - var ns1 = this.n.sub(new BN(1)); - for (var iter = 0; ; iter++) { - var k = options.k ? options.k(iter) : new BN(drbg.generate(this.n.byteLength())); - k = this._truncateToN(k, true); - if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) - continue; - var kp = this.g.mul(k); - if (kp.isInfinity()) - continue; - var kpX = kp.getX(); - var r = kpX.umod(this.n); - if (r.cmpn(0) === 0) - continue; - var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); - s = s.umod(this.n); - if (s.cmpn(0) === 0) - continue; - var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r) !== 0 ? 2 : 0); - if (options.canonical && s.cmp(this.nh) > 0) { - s = this.n.sub(s); - recoveryParam ^= 1; - } - return new Signature({ r, s, recoveryParam }); - } - }; - EC.prototype.verify = function verify(msg, signature, key, enc) { - msg = this._truncateToN(new BN(msg, 16)); - key = this.keyFromPublic(key, enc); - signature = new Signature(signature, "hex"); - var r = signature.r; - var s = signature.s; - if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) - return false; - if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) - return false; - var sinv = s.invm(this.n); - var u1 = sinv.mul(msg).umod(this.n); - var u2 = sinv.mul(r).umod(this.n); - var p; - if (!this.curve._maxwellTrick) { - p = this.g.mulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - return p.getX().umod(this.n).cmp(r) === 0; - } - p = this.g.jmulAdd(u1, key.getPublic(), u2); - if (p.isInfinity()) - return false; - return p.eqXToP(r); - }; - EC.prototype.recoverPubKey = function(msg, signature, j, enc) { - assert((3 & j) === j, "The recovery param is more than two bits"); - signature = new Signature(signature, enc); - var n = this.n; - var e = new BN(msg); - var r = signature.r; - var s = signature.s; - var isYOdd = j & 1; - var isSecondKey = j >> 1; - if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) - throw new Error("Unable to find sencond key candinate"); - if (isSecondKey) - r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); - else - r = this.curve.pointFromX(r, isYOdd); - var rInv = signature.r.invm(n); - var s1 = n.sub(e).mul(rInv).umod(n); - var s2 = s.mul(rInv).umod(n); - return this.g.mulAdd(s1, r, s2); - }; - EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { - signature = new Signature(signature, enc); - if (signature.recoveryParam !== null) - return signature.recoveryParam; - for (var i = 0; i < 4; i++) { - var Qprime; - try { - Qprime = this.recoverPubKey(e, signature, i); - } catch (e2) { - continue; - } - if (Qprime.eq(Q)) - return i; - } - throw new Error("Unable to find valid recovery factor"); + return utils.split32(this.h, "big"); }; } }); -// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/key.js -var require_key2 = __commonJS({ - "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/key.js"(exports2, module2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/256.js +var require__7 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/256.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var utils = require_utils10(); - var assert = utils.assert; - var parseBytes = utils.parseBytes; - var cachedProperty = utils.cachedProperty; - function KeyPair(eddsa, params) { - this.eddsa = eddsa; - this._secret = parseBytes(params.secret); - if (eddsa.isPoint(params.pub)) - this._pub = params.pub; - else - this._pubBytes = parseBytes(params.pub); + var utils = require_utils12(); + var common = require_common3(); + var shaCommon = require_common4(); + var assert = require_minimalistic_assert(); + var sum32 = utils.sum32; + var sum32_4 = utils.sum32_4; + var sum32_5 = utils.sum32_5; + var ch32 = shaCommon.ch32; + var maj32 = shaCommon.maj32; + var s0_256 = shaCommon.s0_256; + var s1_256 = shaCommon.s1_256; + var g0_256 = shaCommon.g0_256; + var g1_256 = shaCommon.g1_256; + var BlockHash = common.BlockHash; + var sha256_K = [ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]; + function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + BlockHash.call(this); + this.h = [ + 1779033703, + 3144134277, + 1013904242, + 2773480762, + 1359893119, + 2600822924, + 528734635, + 1541459225 + ]; + this.k = sha256_K; + this.W = new Array(64); } - KeyPair.fromPublic = function fromPublic(eddsa, pub) { - if (pub instanceof KeyPair) - return pub; - return new KeyPair(eddsa, { pub }); - }; - KeyPair.fromSecret = function fromSecret(eddsa, secret) { - if (secret instanceof KeyPair) - return secret; - return new KeyPair(eddsa, { secret }); - }; - KeyPair.prototype.secret = function secret() { - return this._secret; - }; - cachedProperty(KeyPair, "pubBytes", function pubBytes() { - return this.eddsa.encodePoint(this.pub()); - }); - cachedProperty(KeyPair, "pub", function pub() { - if (this._pubBytes) - return this.eddsa.decodePoint(this._pubBytes); - return this.eddsa.g.mul(this.priv()); - }); - cachedProperty(KeyPair, "privBytes", function privBytes() { - var eddsa = this.eddsa; - var hash = this.hash(); - var lastIx = eddsa.encodingLength - 1; - var a = hash.slice(0, eddsa.encodingLength); - a[0] &= 248; - a[lastIx] &= 127; - a[lastIx] |= 64; - return a; - }); - cachedProperty(KeyPair, "priv", function priv() { - return this.eddsa.decodeInt(this.privBytes()); - }); - cachedProperty(KeyPair, "hash", function hash() { - return this.eddsa.hash().update(this.secret()).digest(); - }); - cachedProperty(KeyPair, "messagePrefix", function messagePrefix() { - return this.hash().slice(this.eddsa.encodingLength); - }); - KeyPair.prototype.sign = function sign(message) { - assert(this._secret, "KeyPair can only verify"); - return this.eddsa.sign(message, this); - }; - KeyPair.prototype.verify = function verify(message, sig) { - return this.eddsa.verify(message, sig, this); - }; - KeyPair.prototype.getSecret = function getSecret(enc) { - assert(this._secret, "KeyPair is public only"); - return utils.encode(this.secret(), enc); + utils.inherits(SHA256, BlockHash); + module2.exports = SHA256; + SHA256.blockSize = 512; + SHA256.outSize = 256; + SHA256.hmacStrength = 192; + SHA256.padLength = 64; + SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + assert(this.k.length === W.length); + for (i = 0; i < W.length; i++) { + var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); + var T2 = sum32(s0_256(a), maj32(a, b, c)); + h = g; + g = f; + f = e; + e = sum32(d, T1); + d = c; + c = b; + b = a; + a = sum32(T1, T2); + } + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + this.h[5] = sum32(this.h[5], f); + this.h[6] = sum32(this.h[6], g); + this.h[7] = sum32(this.h[7], h); }; - KeyPair.prototype.getPublic = function getPublic(enc) { - return utils.encode(this.pubBytes(), enc); + SHA256.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); }; - module2.exports = KeyPair; } }); -// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/signature.js -var require_signature3 = __commonJS({ - "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/signature.js"(exports2, module2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/224.js +var require__8 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/224.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var BN = require_bn4(); - var utils = require_utils10(); - var assert = utils.assert; - var cachedProperty = utils.cachedProperty; - var parseBytes = utils.parseBytes; - function Signature(eddsa, sig) { - this.eddsa = eddsa; - if (typeof sig !== "object") - sig = parseBytes(sig); - if (Array.isArray(sig)) { - sig = { - R: sig.slice(0, eddsa.encodingLength), - S: sig.slice(eddsa.encodingLength) - }; - } - assert(sig.R && sig.S, "Signature without R or S"); - if (eddsa.isPoint(sig.R)) - this._R = sig.R; - if (sig.S instanceof BN) - this._S = sig.S; - this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; - this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; + var utils = require_utils12(); + var SHA256 = require__7(); + function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + SHA256.call(this); + this.h = [ + 3238371032, + 914150663, + 812702999, + 4144912697, + 4290775857, + 1750603025, + 1694076839, + 3204075428 + ]; } - cachedProperty(Signature, "S", function S() { - return this.eddsa.decodeInt(this.Sencoded()); - }); - cachedProperty(Signature, "R", function R() { - return this.eddsa.decodePoint(this.Rencoded()); - }); - cachedProperty(Signature, "Rencoded", function Rencoded() { - return this.eddsa.encodePoint(this.R()); - }); - cachedProperty(Signature, "Sencoded", function Sencoded() { - return this.eddsa.encodeInt(this.S()); - }); - Signature.prototype.toBytes = function toBytes() { - return this.Rencoded().concat(this.Sencoded()); - }; - Signature.prototype.toHex = function toHex() { - return utils.encode(this.toBytes(), "hex").toUpperCase(); + utils.inherits(SHA224, SHA256); + module2.exports = SHA224; + SHA224.blockSize = 512; + SHA224.outSize = 224; + SHA224.hmacStrength = 192; + SHA224.padLength = 64; + SHA224.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h.slice(0, 7), "big"); + else + return utils.split32(this.h.slice(0, 7), "big"); }; - module2.exports = Signature; } }); -// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/index.js -var require_eddsa = __commonJS({ - "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/index.js"(exports2, module2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/512.js +var require__9 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/512.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var hash = require_hash(); - var curves = require_curves(); - var utils = require_utils10(); - var assert = utils.assert; - var parseBytes = utils.parseBytes; - var KeyPair = require_key2(); - var Signature = require_signature3(); - function EDDSA(curve) { - assert(curve === "ed25519", "only tested with ed25519 so far"); - if (!(this instanceof EDDSA)) - return new EDDSA(curve); - curve = curves[curve].curve; - this.curve = curve; - this.g = curve.g; - this.g.precompute(curve.n.bitLength() + 1); - this.pointClass = curve.point().constructor; - this.encodingLength = Math.ceil(curve.n.bitLength() / 8); - this.hash = hash.sha512; + var utils = require_utils12(); + var common = require_common3(); + var assert = require_minimalistic_assert(); + var rotr64_hi = utils.rotr64_hi; + var rotr64_lo = utils.rotr64_lo; + var shr64_hi = utils.shr64_hi; + var shr64_lo = utils.shr64_lo; + var sum64 = utils.sum64; + var sum64_hi = utils.sum64_hi; + var sum64_lo = utils.sum64_lo; + var sum64_4_hi = utils.sum64_4_hi; + var sum64_4_lo = utils.sum64_4_lo; + var sum64_5_hi = utils.sum64_5_hi; + var sum64_5_lo = utils.sum64_5_lo; + var BlockHash = common.BlockHash; + var sha512_K = [ + 1116352408, + 3609767458, + 1899447441, + 602891725, + 3049323471, + 3964484399, + 3921009573, + 2173295548, + 961987163, + 4081628472, + 1508970993, + 3053834265, + 2453635748, + 2937671579, + 2870763221, + 3664609560, + 3624381080, + 2734883394, + 310598401, + 1164996542, + 607225278, + 1323610764, + 1426881987, + 3590304994, + 1925078388, + 4068182383, + 2162078206, + 991336113, + 2614888103, + 633803317, + 3248222580, + 3479774868, + 3835390401, + 2666613458, + 4022224774, + 944711139, + 264347078, + 2341262773, + 604807628, + 2007800933, + 770255983, + 1495990901, + 1249150122, + 1856431235, + 1555081692, + 3175218132, + 1996064986, + 2198950837, + 2554220882, + 3999719339, + 2821834349, + 766784016, + 2952996808, + 2566594879, + 3210313671, + 3203337956, + 3336571891, + 1034457026, + 3584528711, + 2466948901, + 113926993, + 3758326383, + 338241895, + 168717936, + 666307205, + 1188179964, + 773529912, + 1546045734, + 1294757372, + 1522805485, + 1396182291, + 2643833823, + 1695183700, + 2343527390, + 1986661051, + 1014477480, + 2177026350, + 1206759142, + 2456956037, + 344077627, + 2730485921, + 1290863460, + 2820302411, + 3158454273, + 3259730800, + 3505952657, + 3345764771, + 106217008, + 3516065817, + 3606008344, + 3600352804, + 1432725776, + 4094571909, + 1467031594, + 275423344, + 851169720, + 430227734, + 3100823752, + 506948616, + 1363258195, + 659060556, + 3750685593, + 883997877, + 3785050280, + 958139571, + 3318307427, + 1322822218, + 3812723403, + 1537002063, + 2003034995, + 1747873779, + 3602036899, + 1955562222, + 1575990012, + 2024104815, + 1125592928, + 2227730452, + 2716904306, + 2361852424, + 442776044, + 2428436474, + 593698344, + 2756734187, + 3733110249, + 3204031479, + 2999351573, + 3329325298, + 3815920427, + 3391569614, + 3928383900, + 3515267271, + 566280711, + 3940187606, + 3454069534, + 4118630271, + 4000239992, + 116418474, + 1914138554, + 174292421, + 2731055270, + 289380356, + 3203993006, + 460393269, + 320620315, + 685471733, + 587496836, + 852142971, + 1086792851, + 1017036298, + 365543100, + 1126000580, + 2618297676, + 1288033470, + 3409855158, + 1501505948, + 4234509866, + 1607167915, + 987167468, + 1816402316, + 1246189591 + ]; + function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + BlockHash.call(this); + this.h = [ + 1779033703, + 4089235720, + 3144134277, + 2227873595, + 1013904242, + 4271175723, + 2773480762, + 1595750129, + 1359893119, + 2917565137, + 2600822924, + 725511199, + 528734635, + 4215389547, + 1541459225, + 327033209 + ]; + this.k = sha512_K; + this.W = new Array(160); } - module2.exports = EDDSA; - EDDSA.prototype.sign = function sign(message, secret) { - message = parseBytes(message); - var key = this.keyFromSecret(secret); - var r = this.hashInt(key.messagePrefix(), message); - var R = this.g.mul(r); - var Rencoded = this.encodePoint(R); - var s_ = this.hashInt(Rencoded, key.pubBytes(), message).mul(key.priv()); - var S = r.add(s_).umod(this.curve.n); - return this.makeSignature({ R, S, Rencoded }); - }; - EDDSA.prototype.verify = function verify(message, sig, pub) { - message = parseBytes(message); - sig = this.makeSignature(sig); - var key = this.keyFromPublic(pub); - var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); - var SG = this.g.mul(sig.S()); - var RplusAh = sig.R().add(key.pub().mul(h)); - return RplusAh.eq(SG); - }; - EDDSA.prototype.hashInt = function hashInt() { - var hash2 = this.hash(); - for (var i = 0; i < arguments.length; i++) - hash2.update(arguments[i]); - return utils.intFromLE(hash2.digest()).umod(this.curve.n); - }; - EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { - return KeyPair.fromPublic(this, pub); - }; - EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { - return KeyPair.fromSecret(this, secret); - }; - EDDSA.prototype.makeSignature = function makeSignature(sig) { - if (sig instanceof Signature) - return sig; - return new Signature(this, sig); - }; - EDDSA.prototype.encodePoint = function encodePoint(point) { - var enc = point.getY().toArray("le", this.encodingLength); - enc[this.encodingLength - 1] |= point.getX().isOdd() ? 128 : 0; - return enc; - }; - EDDSA.prototype.decodePoint = function decodePoint(bytes) { - bytes = utils.parseBytes(bytes); - var lastIx = bytes.length - 1; - var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128); - var xIsOdd = (bytes[lastIx] & 128) !== 0; - var y = utils.intFromLE(normed); - return this.curve.pointFromY(y, xIsOdd); - }; - EDDSA.prototype.encodeInt = function encodeInt(num) { - return num.toArray("le", this.encodingLength); + utils.inherits(SHA512, BlockHash); + module2.exports = SHA512; + SHA512.blockSize = 1024; + SHA512.outSize = 512; + SHA512.hmacStrength = 192; + SHA512.padLength = 128; + SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; + var c3_lo = W[i - 31]; + W[i] = sum64_4_hi( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo + ); + W[i + 1] = sum64_4_lo( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo + ); + } }; - EDDSA.prototype.decodeInt = function decodeInt(bytes) { - return utils.intFromLE(bytes); + SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + var W = this.W; + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + assert(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + var T1_hi = sum64_5_hi( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo, + c4_hi, + c4_lo + ); + var T1_lo = sum64_5_lo( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo, + c4_hi, + c4_lo + ); + c0_hi = s0_512_hi(ah, al); + c0_lo = s0_512_lo(ah, al); + c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + eh = sum64_hi(dh, dl, T1_hi, T1_lo); + el = sum64_lo(dl, dl, T1_hi, T1_lo); + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); + } + sum64(this.h, 0, ah, al); + sum64(this.h, 2, bh, bl); + sum64(this.h, 4, ch, cl); + sum64(this.h, 6, dh, dl); + sum64(this.h, 8, eh, el); + sum64(this.h, 10, fh, fl); + sum64(this.h, 12, gh, gl); + sum64(this.h, 14, hh, hl); }; - EDDSA.prototype.isPoint = function isPoint(val) { - return val instanceof this.pointClass; + SHA512.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); }; + function ch64_hi(xh, xl, yh, yl, zh) { + var r = xh & yh ^ ~xh & zh; + if (r < 0) + r += 4294967296; + return r; + } + function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = xl & yl ^ ~xl & zl; + if (r < 0) + r += 4294967296; + return r; + } + function maj64_hi(xh, xl, yh, yl, zh) { + var r = xh & yh ^ xh & zh ^ yh & zh; + if (r < 0) + r += 4294967296; + return r; + } + function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = xl & yl ^ xl & zl ^ yl & zl; + if (r < 0) + r += 4294967296; + return r; + } + function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 28); + var c1_hi = rotr64_hi(xl, xh, 2); + var c2_hi = rotr64_hi(xl, xh, 7); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 28); + var c1_lo = rotr64_lo(xl, xh, 2); + var c2_lo = rotr64_lo(xl, xh, 7); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 14); + var c1_hi = rotr64_hi(xh, xl, 18); + var c2_hi = rotr64_hi(xl, xh, 9); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 14); + var c1_lo = rotr64_lo(xh, xl, 18); + var c2_lo = rotr64_lo(xl, xh, 9); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 1); + var c1_hi = rotr64_hi(xh, xl, 8); + var c2_hi = shr64_hi(xh, xl, 7); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 1); + var c1_lo = rotr64_lo(xh, xl, 8); + var c2_lo = shr64_lo(xh, xl, 7); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 19); + var c1_hi = rotr64_hi(xl, xh, 29); + var c2_hi = shr64_hi(xh, xl, 6); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 19); + var c1_lo = rotr64_lo(xl, xh, 29); + var c2_lo = shr64_lo(xh, xl, 6); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } } }); -// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic.js -var require_elliptic = __commonJS({ - "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic.js"(exports2) { - "use strict"; - init_cjs_shim(); - var elliptic = exports2; - elliptic.version = require_package3().version; - elliptic.utils = require_utils10(); - elliptic.rand = require_brorand(); - elliptic.curve = require_curve2(); - elliptic.curves = require_curves(); - elliptic.ec = require_ec(); - elliptic.eddsa = require_eddsa(); - } -}); - -// node_modules/@ethersproject/signing-key/lib/elliptic.js -var require_elliptic2 = __commonJS({ - "node_modules/@ethersproject/signing-key/lib/elliptic.js"(exports2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/384.js +var require__10 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha/384.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var __importDefault = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; + var utils = require_utils12(); + var SHA512 = require__9(); + function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + SHA512.call(this); + this.h = [ + 3418070365, + 3238371032, + 1654270250, + 914150663, + 2438529370, + 812702999, + 355462360, + 4144912697, + 1731405415, + 4290775857, + 2394180231, + 1750603025, + 3675008525, + 1694076839, + 1203062813, + 3204075428 + ]; + } + utils.inherits(SHA384, SHA512); + module2.exports = SHA384; + SHA384.blockSize = 1024; + SHA384.outSize = 384; + SHA384.hmacStrength = 192; + SHA384.padLength = 128; + SHA384.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h.slice(0, 12), "big"); + else + return utils.split32(this.h.slice(0, 12), "big"); }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.EC = void 0; - var elliptic_1 = __importDefault(require_elliptic()); - var EC = elliptic_1.default.ec; - exports2.EC = EC; } }); -// node_modules/@ethersproject/signing-key/lib/_version.js -var require_version8 = __commonJS({ - "node_modules/@ethersproject/signing-key/lib/_version.js"(exports2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha.js +var require_sha2 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/sha.js"(exports2) { "use strict"; init_cjs_shim(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.version = void 0; - exports2.version = "signing-key/5.7.0"; + exports2.sha1 = require__6(); + exports2.sha224 = require__8(); + exports2.sha256 = require__7(); + exports2.sha384 = require__10(); + exports2.sha512 = require__9(); } }); -// node_modules/@ethersproject/signing-key/lib/index.js -var require_lib21 = __commonJS({ - "node_modules/@ethersproject/signing-key/lib/index.js"(exports2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/ripemd.js +var require_ripemd2 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/ripemd.js"(exports2) { "use strict"; init_cjs_shim(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computePublicKey = exports2.recoverPublicKey = exports2.SigningKey = void 0; - var elliptic_1 = require_elliptic2(); - var bytes_1 = require_lib14(); - var properties_1 = require_lib20(); - var logger_1 = require_lib13(); - var _version_1 = require_version8(); - var logger = new logger_1.Logger(_version_1.version); - var _curve = null; - function getCurve() { - if (!_curve) { - _curve = new elliptic_1.EC("secp256k1"); + var utils = require_utils12(); + var common = require_common3(); + var rotl32 = utils.rotl32; + var sum32 = utils.sum32; + var sum32_3 = utils.sum32_3; + var sum32_4 = utils.sum32_4; + var BlockHash = common.BlockHash; + function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + BlockHash.call(this); + this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + this.endian = "little"; + } + utils.inherits(RIPEMD160, BlockHash); + exports2.ripemd160 = RIPEMD160; + RIPEMD160.blockSize = 512; + RIPEMD160.outSize = 160; + RIPEMD160.hmacStrength = 192; + RIPEMD160.padLength = 64; + RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32( + rotl32( + sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j] + ), + E + ); + A = E; + E = D; + D = rotl32(C, 10); + C = B; + B = T; + T = sum32( + rotl32( + sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j] + ), + Eh + ); + Ah = Eh; + Eh = Dh; + Dh = rotl32(Ch, 10); + Ch = Bh; + Bh = T; } - return _curve; + T = sum32_3(this.h[1], C, Dh); + this.h[1] = sum32_3(this.h[2], D, Eh); + this.h[2] = sum32_3(this.h[3], E, Ah); + this.h[3] = sum32_3(this.h[4], A, Bh); + this.h[4] = sum32_3(this.h[0], B, Ch); + this.h[0] = T; + }; + RIPEMD160.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "little"); + else + return utils.split32(this.h, "little"); + }; + function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return x & y | ~x & z; + else if (j <= 47) + return (x | ~y) ^ z; + else if (j <= 63) + return x & z | y & ~z; + else + return x ^ (y | ~z); } - var SigningKey = ( - /** @class */ - function() { - function SigningKey2(privateKey) { - (0, properties_1.defineReadOnly)(this, "curve", "secp256k1"); - (0, properties_1.defineReadOnly)(this, "privateKey", (0, bytes_1.hexlify)(privateKey)); - if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) { - logger.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]"); - } - var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); - (0, properties_1.defineReadOnly)(this, "publicKey", "0x" + keyPair.getPublic(false, "hex")); - (0, properties_1.defineReadOnly)(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex")); - (0, properties_1.defineReadOnly)(this, "_isSigningKey", true); - } - SigningKey2.prototype._addPoint = function(other) { - var p0 = getCurve().keyFromPublic((0, bytes_1.arrayify)(this.publicKey)); - var p1 = getCurve().keyFromPublic((0, bytes_1.arrayify)(other)); - return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex"); - }; - SigningKey2.prototype.signDigest = function(digest) { - var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); - var digestBytes = (0, bytes_1.arrayify)(digest); - if (digestBytes.length !== 32) { - logger.throwArgumentError("bad digest length", "digest", digest); - } - var signature = keyPair.sign(digestBytes, { canonical: true }); - return (0, bytes_1.splitSignature)({ - recoveryParam: signature.recoveryParam, - r: (0, bytes_1.hexZeroPad)("0x" + signature.r.toString(16), 32), - s: (0, bytes_1.hexZeroPad)("0x" + signature.s.toString(16), 32) - }); - }; - SigningKey2.prototype.computeSharedSecret = function(otherKey) { - var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); - var otherKeyPair = getCurve().keyFromPublic((0, bytes_1.arrayify)(computePublicKey(otherKey))); - return (0, bytes_1.hexZeroPad)("0x" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32); - }; - SigningKey2.isSigningKey = function(value) { - return !!(value && value._isSigningKey); - }; - return SigningKey2; - }() - ); - exports2.SigningKey = SigningKey; - function recoverPublicKey(digest, signature) { - var sig = (0, bytes_1.splitSignature)(signature); - var rs = { r: (0, bytes_1.arrayify)(sig.r), s: (0, bytes_1.arrayify)(sig.s) }; - return "0x" + getCurve().recoverPubKey((0, bytes_1.arrayify)(digest), rs, sig.recoveryParam).encode("hex", false); + function K(j) { + if (j <= 15) + return 0; + else if (j <= 31) + return 1518500249; + else if (j <= 47) + return 1859775393; + else if (j <= 63) + return 2400959708; + else + return 2840853838; } - exports2.recoverPublicKey = recoverPublicKey; - function computePublicKey(key, compressed) { - var bytes = (0, bytes_1.arrayify)(key); - if (bytes.length === 32) { - var signingKey = new SigningKey(bytes); - if (compressed) { - return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex"); - } - return signingKey.publicKey; - } else if (bytes.length === 33) { - if (compressed) { - return (0, bytes_1.hexlify)(bytes); - } - return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex"); - } else if (bytes.length === 65) { - if (!compressed) { - return (0, bytes_1.hexlify)(bytes); - } - return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex"); - } - return logger.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); + function Kh(j) { + if (j <= 15) + return 1352829926; + else if (j <= 31) + return 1548603684; + else if (j <= 47) + return 1836072691; + else if (j <= 63) + return 2053994217; + else + return 0; } - exports2.computePublicKey = computePublicKey; + var r = [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 7, + 4, + 13, + 1, + 10, + 6, + 15, + 3, + 12, + 0, + 9, + 5, + 2, + 14, + 11, + 8, + 3, + 10, + 14, + 4, + 9, + 15, + 8, + 1, + 2, + 7, + 0, + 6, + 13, + 11, + 5, + 12, + 1, + 9, + 11, + 10, + 0, + 8, + 12, + 4, + 13, + 3, + 7, + 15, + 14, + 5, + 6, + 2, + 4, + 0, + 5, + 9, + 7, + 12, + 2, + 10, + 14, + 1, + 3, + 8, + 11, + 6, + 15, + 13 + ]; + var rh = [ + 5, + 14, + 7, + 0, + 9, + 2, + 11, + 4, + 13, + 6, + 15, + 8, + 1, + 10, + 3, + 12, + 6, + 11, + 3, + 7, + 0, + 13, + 5, + 10, + 14, + 15, + 8, + 12, + 4, + 9, + 1, + 2, + 15, + 5, + 1, + 3, + 7, + 14, + 6, + 9, + 11, + 8, + 12, + 2, + 10, + 0, + 4, + 13, + 8, + 6, + 4, + 1, + 3, + 11, + 15, + 0, + 5, + 12, + 2, + 13, + 9, + 7, + 10, + 14, + 12, + 15, + 10, + 4, + 1, + 5, + 8, + 7, + 6, + 2, + 13, + 14, + 0, + 3, + 9, + 11 + ]; + var s = [ + 11, + 14, + 15, + 12, + 5, + 8, + 7, + 9, + 11, + 13, + 14, + 15, + 6, + 7, + 9, + 8, + 7, + 6, + 8, + 13, + 11, + 9, + 7, + 15, + 7, + 12, + 15, + 9, + 11, + 7, + 13, + 12, + 11, + 13, + 6, + 7, + 14, + 9, + 13, + 15, + 14, + 8, + 13, + 6, + 5, + 12, + 7, + 5, + 11, + 12, + 14, + 15, + 14, + 15, + 9, + 8, + 9, + 14, + 5, + 6, + 8, + 6, + 5, + 12, + 9, + 15, + 5, + 11, + 6, + 8, + 13, + 12, + 5, + 12, + 13, + 14, + 11, + 8, + 5, + 6 + ]; + var sh = [ + 8, + 9, + 9, + 11, + 13, + 15, + 15, + 5, + 7, + 7, + 8, + 11, + 14, + 14, + 12, + 6, + 9, + 13, + 15, + 7, + 12, + 8, + 9, + 11, + 7, + 7, + 12, + 7, + 6, + 15, + 13, + 11, + 9, + 7, + 15, + 11, + 8, + 6, + 6, + 14, + 12, + 13, + 5, + 14, + 13, + 13, + 7, + 5, + 15, + 5, + 8, + 11, + 14, + 14, + 6, + 14, + 6, + 9, + 12, + 9, + 12, + 5, + 15, + 8, + 8, + 5, + 12, + 9, + 12, + 5, + 14, + 6, + 8, + 13, + 6, + 5, + 15, + 13, + 11, + 11 + ]; } }); -// node_modules/@ethersproject/transactions/lib/_version.js -var require_version9 = __commonJS({ - "node_modules/@ethersproject/transactions/lib/_version.js"(exports2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash/hmac.js +var require_hmac3 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash/hmac.js"(exports2, module2) { "use strict"; init_cjs_shim(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.version = void 0; - exports2.version = "transactions/5.7.0"; + var utils = require_utils12(); + var assert = require_minimalistic_assert(); + function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + this._init(utils.toArray(key, enc)); + } + module2.exports = Hmac; + Hmac.prototype._init = function init(key) { + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + assert(key.length <= this.blockSize); + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + for (i = 0; i < key.length; i++) + key[i] ^= 54; + this.inner = new this.Hash().update(key); + for (i = 0; i < key.length; i++) + key[i] ^= 106; + this.outer = new this.Hash().update(key); + }; + Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; + }; + Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); + }; } }); -// node_modules/@ethersproject/transactions/lib/index.js -var require_lib22 = __commonJS({ - "node_modules/@ethersproject/transactions/lib/index.js"(exports2) { +// node_modules/hmac-drbg/node_modules/hash.js/lib/hash.js +var require_hash2 = __commonJS({ + "node_modules/hmac-drbg/node_modules/hash.js/lib/hash.js"(exports2) { + init_cjs_shim(); + var hash = exports2; + hash.utils = require_utils12(); + hash.common = require_common3(); + hash.sha = require_sha2(); + hash.ripemd = require_ripemd2(); + hash.hmac = require_hmac3(); + hash.sha1 = hash.sha.sha1; + hash.sha256 = hash.sha.sha256; + hash.sha224 = hash.sha.sha224; + hash.sha384 = hash.sha.sha384; + hash.sha512 = hash.sha.sha512; + hash.ripemd160 = hash.ripemd.ripemd160; + } +}); + +// node_modules/hmac-drbg/lib/hmac-drbg.js +var require_hmac_drbg = __commonJS({ + "node_modules/hmac-drbg/lib/hmac-drbg.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); + var hash = require_hash2(); + var utils = require_utils9(); + var assert = require_minimalistic_assert(); + function HmacDRBG(options) { + if (!(this instanceof HmacDRBG)) + return new HmacDRBG(options); + this.hash = options.hash; + this.predResist = !!options.predResist; + this.outLen = this.hash.outSize; + this.minEntropy = options.minEntropy || this.hash.hmacStrength; + this._reseed = null; + this.reseedInterval = null; + this.K = null; + this.V = null; + var entropy = utils.toArray(options.entropy, options.entropyEnc || "hex"); + var nonce = utils.toArray(options.nonce, options.nonceEnc || "hex"); + var pers = utils.toArray(options.pers, options.persEnc || "hex"); + assert( + entropy.length >= this.minEntropy / 8, + "Not enough entropy. Minimum is: " + this.minEntropy + " bits" + ); + this._init(entropy, nonce, pers); + } + module2.exports = HmacDRBG; + HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0; + this.V[i] = 1; } - __setModuleDefault(result, mod); - return result; + this._update(seed); + this._reseed = 1; + this.reseedInterval = 281474976710656; }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.parse = exports2.serialize = exports2.accessListify = exports2.recoverAddress = exports2.computeAddress = exports2.TransactionTypes = void 0; - var address_1 = require_lib18(); - var bignumber_1 = require_lib15(); - var bytes_1 = require_lib14(); - var constants_1 = require_lib19(); - var keccak256_1 = require_lib16(); - var properties_1 = require_lib20(); - var RLP = __importStar(require_lib17()); - var signing_key_1 = require_lib21(); - var logger_1 = require_lib13(); - var _version_1 = require_version9(); - var logger = new logger_1.Logger(_version_1.version); - var TransactionTypes; - (function(TransactionTypes2) { - TransactionTypes2[TransactionTypes2["legacy"] = 0] = "legacy"; - TransactionTypes2[TransactionTypes2["eip2930"] = 1] = "eip2930"; - TransactionTypes2[TransactionTypes2["eip1559"] = 2] = "eip1559"; - })(TransactionTypes = exports2.TransactionTypes || (exports2.TransactionTypes = {})); - function handleAddress(value) { - if (value === "0x") { - return null; - } - return (0, address_1.getAddress)(value); - } - function handleNumber(value) { - if (value === "0x") { - return constants_1.Zero; + HmacDRBG.prototype._hmac = function hmac() { + return new hash.hmac(this.hash, this.K); + }; + HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac().update(this.V).update([0]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + this.K = this._hmac().update(this.V).update([1]).update(seed).digest(); + this.V = this._hmac().update(this.V).digest(); + }; + HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + if (typeof entropyEnc !== "string") { + addEnc = add; + add = entropyEnc; + entropyEnc = null; } - return bignumber_1.BigNumber.from(value); - } - var transactionFields = [ - { name: "nonce", maxLength: 32, numeric: true }, - { name: "gasPrice", maxLength: 32, numeric: true }, - { name: "gasLimit", maxLength: 32, numeric: true }, - { name: "to", length: 20 }, - { name: "value", maxLength: 32, numeric: true }, - { name: "data" } - ]; - var allowedTransactionKeys = { - chainId: true, - data: true, - gasLimit: true, - gasPrice: true, - nonce: true, - to: true, - type: true, - value: true + entropy = utils.toArray(entropy, entropyEnc); + add = utils.toArray(add, addEnc); + assert( + entropy.length >= this.minEntropy / 8, + "Not enough entropy. Minimum is: " + this.minEntropy + " bits" + ); + this._update(entropy.concat(add || [])); + this._reseed = 1; }; - function computeAddress(key) { - var publicKey = (0, signing_key_1.computePublicKey)(key); - return (0, address_1.getAddress)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.hexDataSlice)(publicKey, 1)), 12)); - } - exports2.computeAddress = computeAddress; - function recoverAddress(digest, signature) { - return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature)); - } - exports2.recoverAddress = recoverAddress; - function formatNumber(value, name2) { - var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString()); - if (result.length > 32) { - logger.throwArgumentError("invalid length for " + name2, "transaction:" + name2, value); + HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this._reseed > this.reseedInterval) + throw new Error("Reseed is required"); + if (typeof enc !== "string") { + addEnc = add; + add = enc; + enc = null; } - return result; - } - function accessSetify(addr, storageKeys) { - return { - address: (0, address_1.getAddress)(addr), - storageKeys: (storageKeys || []).map(function(storageKey, index) { - if ((0, bytes_1.hexDataLength)(storageKey) !== 32) { - logger.throwArgumentError("invalid access list storageKey", "accessList[" + addr + ":" + index + "]", storageKey); - } - return storageKey.toLowerCase(); - }) - }; - } - function accessListify(value) { - if (Array.isArray(value)) { - return value.map(function(set, index) { - if (Array.isArray(set)) { - if (set.length > 2) { - logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", "value[" + index + "]", set); - } - return accessSetify(set[0], set[1]); - } - return accessSetify(set.address, set.storageKeys); - }); + if (add) { + add = utils.toArray(add, addEnc || "hex"); + this._update(add); } - var result = Object.keys(value).map(function(addr) { - var storageKeys = value[addr].reduce(function(accum, storageKey) { - accum[storageKey] = true; - return accum; - }, {}); - return accessSetify(addr, Object.keys(storageKeys).sort()); - }); - result.sort(function(a, b) { - return a.address.localeCompare(b.address); - }); - return result; + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + var res = temp.slice(0, len); + this._update(add); + this._reseed++; + return utils.encode(res, enc); + }; + } +}); + +// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/key.js +var require_key = __commonJS({ + "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/key.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var BN = require_bn4(); + var utils = require_utils10(); + var assert = utils.assert; + function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); } - exports2.accessListify = accessListify; - function formatAccessList(value) { - return accessListify(value).map(function(set) { - return [set.address, set.storageKeys]; + module2.exports = KeyPair; + KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + return new KeyPair(ec, { + pub, + pubEnc: enc }); - } - function _serializeEip1559(transaction, signature) { - if (transaction.gasPrice != null) { - var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice); - var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0); - if (!gasPrice.eq(maxFeePerGas)) { - logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { - gasPrice, - maxFeePerGas - }); + }; + KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + return new KeyPair(ec, { + priv, + privEnc: enc + }); + }; + KeyPair.prototype.validate = function validate2() { + var pub = this.getPublic(); + if (pub.isInfinity()) + return { result: false, reason: "Invalid public key" }; + if (!pub.validate()) + return { result: false, reason: "Public key is not a point" }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: "Public key * N != O" }; + return { result: true, reason: null }; + }; + KeyPair.prototype.getPublic = function getPublic(compact, enc) { + if (typeof compact === "string") { + enc = compact; + compact = null; + } + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + if (!enc) + return this.pub; + return this.pub.encode(enc, compact); + }; + KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === "hex") + return this.priv.toString(16, 2); + else + return this.priv; + }; + KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new BN(key, enc || 16); + this.priv = this.priv.umod(this.ec.curve.n); + }; + KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + if (this.ec.curve.type === "mont") { + assert(key.x, "Need x coordinate"); + } else if (this.ec.curve.type === "short" || this.ec.curve.type === "edwards") { + assert(key.x && key.y, "Need both x and y coordinate"); } + this.pub = this.ec.curve.point(key.x, key.y); + return; } - var fields = [ - formatNumber(transaction.chainId || 0, "chainId"), - formatNumber(transaction.nonce || 0, "nonce"), - formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), - formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), - formatNumber(transaction.gasLimit || 0, "gasLimit"), - transaction.to != null ? (0, address_1.getAddress)(transaction.to) : "0x", - formatNumber(transaction.value || 0, "value"), - transaction.data || "0x", - formatAccessList(transaction.accessList || []) - ]; - if (signature) { - var sig = (0, bytes_1.splitSignature)(signature); - fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); - fields.push((0, bytes_1.stripZeros)(sig.r)); - fields.push((0, bytes_1.stripZeros)(sig.s)); + this.pub = this.ec.curve.decodePoint(key, enc); + }; + KeyPair.prototype.derive = function derive(pub) { + if (!pub.validate()) { + assert(pub.validate(), "public point not validated"); } - return (0, bytes_1.hexConcat)(["0x02", RLP.encode(fields)]); + return pub.mul(this.priv).getX(); + }; + KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); + }; + KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); + }; + KeyPair.prototype.inspect = function inspect() { + return ""; + }; + } +}); + +// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/signature.js +var require_signature2 = __commonJS({ + "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/signature.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var BN = require_bn4(); + var utils = require_utils10(); + var assert = utils.assert; + function Signature(options, enc) { + if (options instanceof Signature) + return options; + if (this._importDER(options, enc)) + return; + assert(options.r && options.s, "Signature without r or s"); + this.r = new BN(options.r, 16); + this.s = new BN(options.s, 16); + if (options.recoveryParam === void 0) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; } - function _serializeEip2930(transaction, signature) { - var fields = [ - formatNumber(transaction.chainId || 0, "chainId"), - formatNumber(transaction.nonce || 0, "nonce"), - formatNumber(transaction.gasPrice || 0, "gasPrice"), - formatNumber(transaction.gasLimit || 0, "gasLimit"), - transaction.to != null ? (0, address_1.getAddress)(transaction.to) : "0x", - formatNumber(transaction.value || 0, "value"), - transaction.data || "0x", - formatAccessList(transaction.accessList || []) - ]; - if (signature) { - var sig = (0, bytes_1.splitSignature)(signature); - fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); - fields.push((0, bytes_1.stripZeros)(sig.r)); - fields.push((0, bytes_1.stripZeros)(sig.s)); - } - return (0, bytes_1.hexConcat)(["0x01", RLP.encode(fields)]); + module2.exports = Signature; + function Position() { + this.place = 0; } - function _serialize(transaction, signature) { - (0, properties_1.checkProperties)(transaction, allowedTransactionKeys); - var raw = []; - transactionFields.forEach(function(fieldInfo) { - var value = transaction[fieldInfo.name] || []; - var options = {}; - if (fieldInfo.numeric) { - options.hexPad = "left"; - } - value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options)); - if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { - logger.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); - } - if (fieldInfo.maxLength) { - value = (0, bytes_1.stripZeros)(value); - if (value.length > fieldInfo.maxLength) { - logger.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); - } - } - raw.push((0, bytes_1.hexlify)(value)); - }); - var chainId = 0; - if (transaction.chainId != null) { - chainId = transaction.chainId; - if (typeof chainId !== "number") { - logger.throwArgumentError("invalid transaction.chainId", "transaction", transaction); - } - } else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) { - chainId = Math.floor((signature.v - 35) / 2); + function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 128)) { + return initial; } - if (chainId !== 0) { - raw.push((0, bytes_1.hexlify)(chainId)); - raw.push("0x"); - raw.push("0x"); + var octetLen = initial & 15; + if (octetLen === 0 || octetLen > 4) { + return false; } - if (!signature) { - return RLP.encode(raw); + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + val >>>= 0; } - var sig = (0, bytes_1.splitSignature)(signature); - var v = 27 + sig.recoveryParam; - if (chainId !== 0) { - raw.pop(); - raw.pop(); - raw.pop(); - v += chainId * 2 + 8; - if (sig.v > 28 && sig.v !== v) { - logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); - } - } else if (sig.v !== v) { - logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + if (val <= 127) { + return false; } - raw.push((0, bytes_1.hexlify)(v)); - raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r))); - raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.s))); - return RLP.encode(raw); + p.place = off; + return val; } - function serialize(transaction, signature) { - if (transaction.type == null || transaction.type === 0) { - if (transaction.accessList != null) { - logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); - } - return _serialize(transaction, signature); + function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 128) && i < len) { + i++; } - switch (transaction.type) { - case 1: - return _serializeEip2930(transaction, signature); - case 2: - return _serializeEip1559(transaction, signature); - default: - break; + if (i === 0) { + return buf; } - return logger.throwError("unsupported transaction type: " + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { - operation: "serializeTransaction", - transactionType: transaction.type - }); + return buf.slice(i); } - exports2.serialize = serialize; - function _parseEipSignature(tx, fields, serialize2) { - try { - var recid = handleNumber(fields[0]).toNumber(); - if (recid !== 0 && recid !== 1) { - throw new Error("bad recid"); - } - tx.v = recid; - } catch (error) { - logger.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + Signature.prototype._importDER = function _importDER(data, enc) { + data = utils.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 48) { + return false; } - tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32); - tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32); - try { - var digest = (0, keccak256_1.keccak256)(serialize2(tx)); - tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v }); - } catch (error) { + var len = getLength(data, p); + if (len === false) { + return false; } - } - function _parseEip1559(payload) { - var transaction = RLP.decode(payload.slice(1)); - if (transaction.length !== 9 && transaction.length !== 12) { - logger.throwArgumentError("invalid component count for transaction type: 2", "payload", (0, bytes_1.hexlify)(payload)); + if (len + p.place !== data.length) { + return false; } - var maxPriorityFeePerGas = handleNumber(transaction[2]); - var maxFeePerGas = handleNumber(transaction[3]); - var tx = { - type: 2, - chainId: handleNumber(transaction[0]).toNumber(), - nonce: handleNumber(transaction[1]).toNumber(), - maxPriorityFeePerGas, - maxFeePerGas, - gasPrice: null, - gasLimit: handleNumber(transaction[4]), - to: handleAddress(transaction[5]), - value: handleNumber(transaction[6]), - data: transaction[7], - accessList: accessListify(transaction[8]) - }; - if (transaction.length === 9) { - return tx; + if (data[p.place++] !== 2) { + return false; } - tx.hash = (0, keccak256_1.keccak256)(payload); - _parseEipSignature(tx, transaction.slice(9), _serializeEip1559); - return tx; - } - function _parseEip2930(payload) { - var transaction = RLP.decode(payload.slice(1)); - if (transaction.length !== 8 && transaction.length !== 11) { - logger.throwArgumentError("invalid component count for transaction type: 1", "payload", (0, bytes_1.hexlify)(payload)); + var rlen = getLength(data, p); + if (rlen === false) { + return false; } - var tx = { - type: 1, - chainId: handleNumber(transaction[0]).toNumber(), - nonce: handleNumber(transaction[1]).toNumber(), - gasPrice: handleNumber(transaction[2]), - gasLimit: handleNumber(transaction[3]), - to: handleAddress(transaction[4]), - value: handleNumber(transaction[5]), - data: transaction[6], - accessList: accessListify(transaction[7]) - }; - if (transaction.length === 8) { - return tx; + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 2) { + return false; } - tx.hash = (0, keccak256_1.keccak256)(payload); - _parseEipSignature(tx, transaction.slice(8), _serializeEip2930); - return tx; - } - function _parse(rawTransaction) { - var transaction = RLP.decode(rawTransaction); - if (transaction.length !== 9 && transaction.length !== 6) { - logger.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + var slen = getLength(data, p); + if (slen === false) { + return false; } - var tx = { - nonce: handleNumber(transaction[0]).toNumber(), - gasPrice: handleNumber(transaction[1]), - gasLimit: handleNumber(transaction[2]), - to: handleAddress(transaction[3]), - value: handleNumber(transaction[4]), - data: transaction[5], - chainId: 0 - }; - if (transaction.length === 6) { - return tx; + if (data.length !== slen + p.place) { + return false; } - try { - tx.v = bignumber_1.BigNumber.from(transaction[6]).toNumber(); - } catch (error) { - return tx; + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0) { + if (r[1] & 128) { + r = r.slice(1); + } else { + return false; + } } - tx.r = (0, bytes_1.hexZeroPad)(transaction[7], 32); - tx.s = (0, bytes_1.hexZeroPad)(transaction[8], 32); - if (bignumber_1.BigNumber.from(tx.r).isZero() && bignumber_1.BigNumber.from(tx.s).isZero()) { - tx.chainId = tx.v; - tx.v = 0; - } else { - tx.chainId = Math.floor((tx.v - 35) / 2); - if (tx.chainId < 0) { + if (s[0] === 0) { + if (s[1] & 128) { + s = s.slice(1); + } else { + return false; + } + } + this.r = new BN(r); + this.s = new BN(s); + this.recoveryParam = null; + return true; + }; + function constructLength(arr, len) { + if (len < 128) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 128); + while (--octets) { + arr.push(len >>> (octets << 3) & 255); + } + arr.push(len); + } + Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + if (r[0] & 128) + r = [0].concat(r); + if (s[0] & 128) + s = [0].concat(s); + r = rmPadding(r); + s = rmPadding(s); + while (!s[0] && !(s[1] & 128)) { + s = s.slice(1); + } + var arr = [2]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(2); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [48]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils.encode(res, enc); + }; + } +}); + +// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/index.js +var require_ec = __commonJS({ + "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/ec/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var BN = require_bn4(); + var HmacDRBG = require_hmac_drbg(); + var utils = require_utils10(); + var curves = require_curves(); + var rand = require_brorand(); + var assert = utils.assert; + var KeyPair = require_key(); + var Signature = require_signature2(); + function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + if (typeof options === "string") { + assert( + Object.prototype.hasOwnProperty.call(curves, options), + "Unknown curve " + options + ); + options = curves[options]; + } + if (options instanceof curves.PresetCurve) + options = { curve: options }; + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + this.hash = options.hash || options.curve.hash; + } + module2.exports = EC; + EC.prototype.keyPair = function keyPair(options) { + return new KeyPair(this, options); + }; + EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return KeyPair.fromPrivate(this, priv, enc); + }; + EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return KeyPair.fromPublic(this, pub, enc); + }; + EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + var drbg = new HmacDRBG({ + hash: this.hash, + pers: options.pers, + persEnc: options.persEnc || "utf8", + entropy: options.entropy || rand(this.hash.hmacStrength), + entropyEnc: options.entropy && options.entropyEnc || "utf8", + nonce: this.n.toArray() + }); + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new BN(2)); + for (; ; ) { + var priv = new BN(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + priv.iaddn(1); + return this.keyFromPrivate(priv); + } + }; + EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; + }; + EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === "object") { + options = enc; + enc = null; + } + if (!options) + options = {}; + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new BN(msg, 16)); + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray("be", bytes); + var nonce = msg.toArray("be", bytes); + var drbg = new HmacDRBG({ + hash: this.hash, + entropy: bkey, + nonce, + pers: options.pers, + persEnc: options.persEnc || "utf8" + }); + var ns1 = this.n.sub(new BN(1)); + for (var iter = 0; ; iter++) { + var k = options.k ? options.k(iter) : new BN(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r) !== 0 ? 2 : 0); + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + return new Signature({ r, s, recoveryParam }); + } + }; + EC.prototype.verify = function verify(msg, signature, key, enc) { + msg = this._truncateToN(new BN(msg, 16)); + key = this.keyFromPublic(key, enc); + signature = new Signature(signature, "hex"); + var r = signature.r; + var s = signature.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + var p; + if (!this.curve._maxwellTrick) { + p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + return p.getX().umod(this.n).cmp(r) === 0; + } + p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + return p.eqXToP(r); + }; + EC.prototype.recoverPubKey = function(msg, signature, j, enc) { + assert((3 & j) === j, "The recovery param is more than two bits"); + signature = new Signature(signature, enc); + var n = this.n; + var e = new BN(msg); + var r = signature.r; + var s = signature.s; + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error("Unable to find sencond key candinate"); + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + var rInv = signature.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + return this.g.mulAdd(s1, r, s2); + }; + EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { + signature = new Signature(signature, enc); + if (signature.recoveryParam !== null) + return signature.recoveryParam; + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature, i); + } catch (e2) { + continue; + } + if (Qprime.eq(Q)) + return i; + } + throw new Error("Unable to find valid recovery factor"); + }; + } +}); + +// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/key.js +var require_key2 = __commonJS({ + "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/key.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils10(); + var assert = utils.assert; + var parseBytes = utils.parseBytes; + var cachedProperty = utils.cachedProperty; + function KeyPair(eddsa, params) { + this.eddsa = eddsa; + this._secret = parseBytes(params.secret); + if (eddsa.isPoint(params.pub)) + this._pub = params.pub; + else + this._pubBytes = parseBytes(params.pub); + } + KeyPair.fromPublic = function fromPublic(eddsa, pub) { + if (pub instanceof KeyPair) + return pub; + return new KeyPair(eddsa, { pub }); + }; + KeyPair.fromSecret = function fromSecret(eddsa, secret) { + if (secret instanceof KeyPair) + return secret; + return new KeyPair(eddsa, { secret }); + }; + KeyPair.prototype.secret = function secret() { + return this._secret; + }; + cachedProperty(KeyPair, "pubBytes", function pubBytes() { + return this.eddsa.encodePoint(this.pub()); + }); + cachedProperty(KeyPair, "pub", function pub() { + if (this._pubBytes) + return this.eddsa.decodePoint(this._pubBytes); + return this.eddsa.g.mul(this.priv()); + }); + cachedProperty(KeyPair, "privBytes", function privBytes() { + var eddsa = this.eddsa; + var hash = this.hash(); + var lastIx = eddsa.encodingLength - 1; + var a = hash.slice(0, eddsa.encodingLength); + a[0] &= 248; + a[lastIx] &= 127; + a[lastIx] |= 64; + return a; + }); + cachedProperty(KeyPair, "priv", function priv() { + return this.eddsa.decodeInt(this.privBytes()); + }); + cachedProperty(KeyPair, "hash", function hash() { + return this.eddsa.hash().update(this.secret()).digest(); + }); + cachedProperty(KeyPair, "messagePrefix", function messagePrefix() { + return this.hash().slice(this.eddsa.encodingLength); + }); + KeyPair.prototype.sign = function sign(message) { + assert(this._secret, "KeyPair can only verify"); + return this.eddsa.sign(message, this); + }; + KeyPair.prototype.verify = function verify(message, sig) { + return this.eddsa.verify(message, sig, this); + }; + KeyPair.prototype.getSecret = function getSecret(enc) { + assert(this._secret, "KeyPair is public only"); + return utils.encode(this.secret(), enc); + }; + KeyPair.prototype.getPublic = function getPublic(enc) { + return utils.encode(this.pubBytes(), enc); + }; + module2.exports = KeyPair; + } +}); + +// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/signature.js +var require_signature3 = __commonJS({ + "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/signature.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var BN = require_bn4(); + var utils = require_utils10(); + var assert = utils.assert; + var cachedProperty = utils.cachedProperty; + var parseBytes = utils.parseBytes; + function Signature(eddsa, sig) { + this.eddsa = eddsa; + if (typeof sig !== "object") + sig = parseBytes(sig); + if (Array.isArray(sig)) { + sig = { + R: sig.slice(0, eddsa.encodingLength), + S: sig.slice(eddsa.encodingLength) + }; + } + assert(sig.R && sig.S, "Signature without R or S"); + if (eddsa.isPoint(sig.R)) + this._R = sig.R; + if (sig.S instanceof BN) + this._S = sig.S; + this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; + this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; + } + cachedProperty(Signature, "S", function S() { + return this.eddsa.decodeInt(this.Sencoded()); + }); + cachedProperty(Signature, "R", function R() { + return this.eddsa.decodePoint(this.Rencoded()); + }); + cachedProperty(Signature, "Rencoded", function Rencoded() { + return this.eddsa.encodePoint(this.R()); + }); + cachedProperty(Signature, "Sencoded", function Sencoded() { + return this.eddsa.encodeInt(this.S()); + }); + Signature.prototype.toBytes = function toBytes() { + return this.Rencoded().concat(this.Sencoded()); + }; + Signature.prototype.toHex = function toHex() { + return utils.encode(this.toBytes(), "hex").toUpperCase(); + }; + module2.exports = Signature; + } +}); + +// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/index.js +var require_eddsa = __commonJS({ + "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic/eddsa/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var hash = require_hash(); + var curves = require_curves(); + var utils = require_utils10(); + var assert = utils.assert; + var parseBytes = utils.parseBytes; + var KeyPair = require_key2(); + var Signature = require_signature3(); + function EDDSA(curve) { + assert(curve === "ed25519", "only tested with ed25519 so far"); + if (!(this instanceof EDDSA)) + return new EDDSA(curve); + curve = curves[curve].curve; + this.curve = curve; + this.g = curve.g; + this.g.precompute(curve.n.bitLength() + 1); + this.pointClass = curve.point().constructor; + this.encodingLength = Math.ceil(curve.n.bitLength() / 8); + this.hash = hash.sha512; + } + module2.exports = EDDSA; + EDDSA.prototype.sign = function sign(message, secret) { + message = parseBytes(message); + var key = this.keyFromSecret(secret); + var r = this.hashInt(key.messagePrefix(), message); + var R = this.g.mul(r); + var Rencoded = this.encodePoint(R); + var s_ = this.hashInt(Rencoded, key.pubBytes(), message).mul(key.priv()); + var S = r.add(s_).umod(this.curve.n); + return this.makeSignature({ R, S, Rencoded }); + }; + EDDSA.prototype.verify = function verify(message, sig, pub) { + message = parseBytes(message); + sig = this.makeSignature(sig); + var key = this.keyFromPublic(pub); + var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); + var SG = this.g.mul(sig.S()); + var RplusAh = sig.R().add(key.pub().mul(h)); + return RplusAh.eq(SG); + }; + EDDSA.prototype.hashInt = function hashInt() { + var hash2 = this.hash(); + for (var i = 0; i < arguments.length; i++) + hash2.update(arguments[i]); + return utils.intFromLE(hash2.digest()).umod(this.curve.n); + }; + EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { + return KeyPair.fromPublic(this, pub); + }; + EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { + return KeyPair.fromSecret(this, secret); + }; + EDDSA.prototype.makeSignature = function makeSignature(sig) { + if (sig instanceof Signature) + return sig; + return new Signature(this, sig); + }; + EDDSA.prototype.encodePoint = function encodePoint(point) { + var enc = point.getY().toArray("le", this.encodingLength); + enc[this.encodingLength - 1] |= point.getX().isOdd() ? 128 : 0; + return enc; + }; + EDDSA.prototype.decodePoint = function decodePoint(bytes) { + bytes = utils.parseBytes(bytes); + var lastIx = bytes.length - 1; + var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128); + var xIsOdd = (bytes[lastIx] & 128) !== 0; + var y = utils.intFromLE(normed); + return this.curve.pointFromY(y, xIsOdd); + }; + EDDSA.prototype.encodeInt = function encodeInt(num) { + return num.toArray("le", this.encodingLength); + }; + EDDSA.prototype.decodeInt = function decodeInt(bytes) { + return utils.intFromLE(bytes); + }; + EDDSA.prototype.isPoint = function isPoint(val) { + return val instanceof this.pointClass; + }; + } +}); + +// node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic.js +var require_elliptic = __commonJS({ + "node_modules/@ethersproject/signing-key/node_modules/elliptic/lib/elliptic.js"(exports2) { + "use strict"; + init_cjs_shim(); + var elliptic = exports2; + elliptic.version = require_package3().version; + elliptic.utils = require_utils10(); + elliptic.rand = require_brorand(); + elliptic.curve = require_curve2(); + elliptic.curves = require_curves(); + elliptic.ec = require_ec(); + elliptic.eddsa = require_eddsa(); + } +}); + +// node_modules/@ethersproject/signing-key/lib/elliptic.js +var require_elliptic2 = __commonJS({ + "node_modules/@ethersproject/signing-key/lib/elliptic.js"(exports2) { + "use strict"; + init_cjs_shim(); + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EC = void 0; + var elliptic_1 = __importDefault(require_elliptic()); + var EC = elliptic_1.default.ec; + exports2.EC = EC; + } +}); + +// node_modules/@ethersproject/signing-key/lib/_version.js +var require_version8 = __commonJS({ + "node_modules/@ethersproject/signing-key/lib/_version.js"(exports2) { + "use strict"; + init_cjs_shim(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + exports2.version = "signing-key/5.7.0"; + } +}); + +// node_modules/@ethersproject/signing-key/lib/index.js +var require_lib21 = __commonJS({ + "node_modules/@ethersproject/signing-key/lib/index.js"(exports2) { + "use strict"; + init_cjs_shim(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computePublicKey = exports2.recoverPublicKey = exports2.SigningKey = void 0; + var elliptic_1 = require_elliptic2(); + var bytes_1 = require_lib14(); + var properties_1 = require_lib20(); + var logger_1 = require_lib13(); + var _version_1 = require_version8(); + var logger = new logger_1.Logger(_version_1.version); + var _curve = null; + function getCurve() { + if (!_curve) { + _curve = new elliptic_1.EC("secp256k1"); + } + return _curve; + } + var SigningKey = ( + /** @class */ + function() { + function SigningKey2(privateKey) { + (0, properties_1.defineReadOnly)(this, "curve", "secp256k1"); + (0, properties_1.defineReadOnly)(this, "privateKey", (0, bytes_1.hexlify)(privateKey)); + if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) { + logger.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]"); + } + var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); + (0, properties_1.defineReadOnly)(this, "publicKey", "0x" + keyPair.getPublic(false, "hex")); + (0, properties_1.defineReadOnly)(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex")); + (0, properties_1.defineReadOnly)(this, "_isSigningKey", true); + } + SigningKey2.prototype._addPoint = function(other) { + var p0 = getCurve().keyFromPublic((0, bytes_1.arrayify)(this.publicKey)); + var p1 = getCurve().keyFromPublic((0, bytes_1.arrayify)(other)); + return "0x" + p0.pub.add(p1.pub).encodeCompressed("hex"); + }; + SigningKey2.prototype.signDigest = function(digest) { + var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); + var digestBytes = (0, bytes_1.arrayify)(digest); + if (digestBytes.length !== 32) { + logger.throwArgumentError("bad digest length", "digest", digest); + } + var signature = keyPair.sign(digestBytes, { canonical: true }); + return (0, bytes_1.splitSignature)({ + recoveryParam: signature.recoveryParam, + r: (0, bytes_1.hexZeroPad)("0x" + signature.r.toString(16), 32), + s: (0, bytes_1.hexZeroPad)("0x" + signature.s.toString(16), 32) + }); + }; + SigningKey2.prototype.computeSharedSecret = function(otherKey) { + var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey)); + var otherKeyPair = getCurve().keyFromPublic((0, bytes_1.arrayify)(computePublicKey(otherKey))); + return (0, bytes_1.hexZeroPad)("0x" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32); + }; + SigningKey2.isSigningKey = function(value) { + return !!(value && value._isSigningKey); + }; + return SigningKey2; + }() + ); + exports2.SigningKey = SigningKey; + function recoverPublicKey(digest, signature) { + var sig = (0, bytes_1.splitSignature)(signature); + var rs = { r: (0, bytes_1.arrayify)(sig.r), s: (0, bytes_1.arrayify)(sig.s) }; + return "0x" + getCurve().recoverPubKey((0, bytes_1.arrayify)(digest), rs, sig.recoveryParam).encode("hex", false); + } + exports2.recoverPublicKey = recoverPublicKey; + function computePublicKey(key, compressed) { + var bytes = (0, bytes_1.arrayify)(key); + if (bytes.length === 32) { + var signingKey = new SigningKey(bytes); + if (compressed) { + return "0x" + getCurve().keyFromPrivate(bytes).getPublic(true, "hex"); + } + return signingKey.publicKey; + } else if (bytes.length === 33) { + if (compressed) { + return (0, bytes_1.hexlify)(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(false, "hex"); + } else if (bytes.length === 65) { + if (!compressed) { + return (0, bytes_1.hexlify)(bytes); + } + return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex"); + } + return logger.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); + } + exports2.computePublicKey = computePublicKey; + } +}); + +// node_modules/@ethersproject/transactions/lib/_version.js +var require_version9 = __commonJS({ + "node_modules/@ethersproject/transactions/lib/_version.js"(exports2) { + "use strict"; + init_cjs_shim(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + exports2.version = "transactions/5.7.0"; + } +}); + +// node_modules/@ethersproject/transactions/lib/index.js +var require_lib22 = __commonJS({ + "node_modules/@ethersproject/transactions/lib/index.js"(exports2) { + "use strict"; + init_cjs_shim(); + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parse = exports2.serialize = exports2.accessListify = exports2.recoverAddress = exports2.computeAddress = exports2.TransactionTypes = void 0; + var address_1 = require_lib18(); + var bignumber_1 = require_lib15(); + var bytes_1 = require_lib14(); + var constants_1 = require_lib19(); + var keccak256_1 = require_lib16(); + var properties_1 = require_lib20(); + var RLP = __importStar(require_lib17()); + var signing_key_1 = require_lib21(); + var logger_1 = require_lib13(); + var _version_1 = require_version9(); + var logger = new logger_1.Logger(_version_1.version); + var TransactionTypes; + (function(TransactionTypes2) { + TransactionTypes2[TransactionTypes2["legacy"] = 0] = "legacy"; + TransactionTypes2[TransactionTypes2["eip2930"] = 1] = "eip2930"; + TransactionTypes2[TransactionTypes2["eip1559"] = 2] = "eip1559"; + })(TransactionTypes = exports2.TransactionTypes || (exports2.TransactionTypes = {})); + function handleAddress(value) { + if (value === "0x") { + return null; + } + return (0, address_1.getAddress)(value); + } + function handleNumber(value) { + if (value === "0x") { + return constants_1.Zero; + } + return bignumber_1.BigNumber.from(value); + } + var transactionFields = [ + { name: "nonce", maxLength: 32, numeric: true }, + { name: "gasPrice", maxLength: 32, numeric: true }, + { name: "gasLimit", maxLength: 32, numeric: true }, + { name: "to", length: 20 }, + { name: "value", maxLength: 32, numeric: true }, + { name: "data" } + ]; + var allowedTransactionKeys = { + chainId: true, + data: true, + gasLimit: true, + gasPrice: true, + nonce: true, + to: true, + type: true, + value: true + }; + function computeAddress(key) { + var publicKey = (0, signing_key_1.computePublicKey)(key); + return (0, address_1.getAddress)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.hexDataSlice)(publicKey, 1)), 12)); + } + exports2.computeAddress = computeAddress; + function recoverAddress(digest, signature) { + return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature)); + } + exports2.recoverAddress = recoverAddress; + function formatNumber(value, name2) { + var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString()); + if (result.length > 32) { + logger.throwArgumentError("invalid length for " + name2, "transaction:" + name2, value); + } + return result; + } + function accessSetify(addr, storageKeys) { + return { + address: (0, address_1.getAddress)(addr), + storageKeys: (storageKeys || []).map(function(storageKey, index) { + if ((0, bytes_1.hexDataLength)(storageKey) !== 32) { + logger.throwArgumentError("invalid access list storageKey", "accessList[" + addr + ":" + index + "]", storageKey); + } + return storageKey.toLowerCase(); + }) + }; + } + function accessListify(value) { + if (Array.isArray(value)) { + return value.map(function(set, index) { + if (Array.isArray(set)) { + if (set.length > 2) { + logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", "value[" + index + "]", set); + } + return accessSetify(set[0], set[1]); + } + return accessSetify(set.address, set.storageKeys); + }); + } + var result = Object.keys(value).map(function(addr) { + var storageKeys = value[addr].reduce(function(accum, storageKey) { + accum[storageKey] = true; + return accum; + }, {}); + return accessSetify(addr, Object.keys(storageKeys).sort()); + }); + result.sort(function(a, b) { + return a.address.localeCompare(b.address); + }); + return result; + } + exports2.accessListify = accessListify; + function formatAccessList(value) { + return accessListify(value).map(function(set) { + return [set.address, set.storageKeys]; + }); + } + function _serializeEip1559(transaction, signature) { + if (transaction.gasPrice != null) { + var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice); + var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0); + if (!gasPrice.eq(maxFeePerGas)) { + logger.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { + gasPrice, + maxFeePerGas + }); + } + } + var fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), + formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + transaction.to != null ? (0, address_1.getAddress)(transaction.to) : "0x", + formatNumber(transaction.value || 0, "value"), + transaction.data || "0x", + formatAccessList(transaction.accessList || []) + ]; + if (signature) { + var sig = (0, bytes_1.splitSignature)(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push((0, bytes_1.stripZeros)(sig.r)); + fields.push((0, bytes_1.stripZeros)(sig.s)); + } + return (0, bytes_1.hexConcat)(["0x02", RLP.encode(fields)]); + } + function _serializeEip2930(transaction, signature) { + var fields = [ + formatNumber(transaction.chainId || 0, "chainId"), + formatNumber(transaction.nonce || 0, "nonce"), + formatNumber(transaction.gasPrice || 0, "gasPrice"), + formatNumber(transaction.gasLimit || 0, "gasLimit"), + transaction.to != null ? (0, address_1.getAddress)(transaction.to) : "0x", + formatNumber(transaction.value || 0, "value"), + transaction.data || "0x", + formatAccessList(transaction.accessList || []) + ]; + if (signature) { + var sig = (0, bytes_1.splitSignature)(signature); + fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); + fields.push((0, bytes_1.stripZeros)(sig.r)); + fields.push((0, bytes_1.stripZeros)(sig.s)); + } + return (0, bytes_1.hexConcat)(["0x01", RLP.encode(fields)]); + } + function _serialize(transaction, signature) { + (0, properties_1.checkProperties)(transaction, allowedTransactionKeys); + var raw = []; + transactionFields.forEach(function(fieldInfo) { + var value = transaction[fieldInfo.name] || []; + var options = {}; + if (fieldInfo.numeric) { + options.hexPad = "left"; + } + value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options)); + if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); + } + if (fieldInfo.maxLength) { + value = (0, bytes_1.stripZeros)(value); + if (value.length > fieldInfo.maxLength) { + logger.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); + } + } + raw.push((0, bytes_1.hexlify)(value)); + }); + var chainId = 0; + if (transaction.chainId != null) { + chainId = transaction.chainId; + if (typeof chainId !== "number") { + logger.throwArgumentError("invalid transaction.chainId", "transaction", transaction); + } + } else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) { + chainId = Math.floor((signature.v - 35) / 2); + } + if (chainId !== 0) { + raw.push((0, bytes_1.hexlify)(chainId)); + raw.push("0x"); + raw.push("0x"); + } + if (!signature) { + return RLP.encode(raw); + } + var sig = (0, bytes_1.splitSignature)(signature); + var v = 27 + sig.recoveryParam; + if (chainId !== 0) { + raw.pop(); + raw.pop(); + raw.pop(); + v += chainId * 2 + 8; + if (sig.v > 28 && sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + } else if (sig.v !== v) { + logger.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature); + } + raw.push((0, bytes_1.hexlify)(v)); + raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r))); + raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.s))); + return RLP.encode(raw); + } + function serialize(transaction, signature) { + if (transaction.type == null || transaction.type === 0) { + if (transaction.accessList != null) { + logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); + } + return _serialize(transaction, signature); + } + switch (transaction.type) { + case 1: + return _serializeEip2930(transaction, signature); + case 2: + return _serializeEip1559(transaction, signature); + default: + break; + } + return logger.throwError("unsupported transaction type: " + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "serializeTransaction", + transactionType: transaction.type + }); + } + exports2.serialize = serialize; + function _parseEipSignature(tx, fields, serialize2) { + try { + var recid = handleNumber(fields[0]).toNumber(); + if (recid !== 0 && recid !== 1) { + throw new Error("bad recid"); + } + tx.v = recid; + } catch (error) { + logger.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + } + tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32); + tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32); + try { + var digest = (0, keccak256_1.keccak256)(serialize2(tx)); + tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v }); + } catch (error) { + } + } + function _parseEip1559(payload) { + var transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 9 && transaction.length !== 12) { + logger.throwArgumentError("invalid component count for transaction type: 2", "payload", (0, bytes_1.hexlify)(payload)); + } + var maxPriorityFeePerGas = handleNumber(transaction[2]); + var maxFeePerGas = handleNumber(transaction[3]); + var tx = { + type: 2, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + maxPriorityFeePerGas, + maxFeePerGas, + gasPrice: null, + gasLimit: handleNumber(transaction[4]), + to: handleAddress(transaction[5]), + value: handleNumber(transaction[6]), + data: transaction[7], + accessList: accessListify(transaction[8]) + }; + if (transaction.length === 9) { + return tx; + } + tx.hash = (0, keccak256_1.keccak256)(payload); + _parseEipSignature(tx, transaction.slice(9), _serializeEip1559); + return tx; + } + function _parseEip2930(payload) { + var transaction = RLP.decode(payload.slice(1)); + if (transaction.length !== 8 && transaction.length !== 11) { + logger.throwArgumentError("invalid component count for transaction type: 1", "payload", (0, bytes_1.hexlify)(payload)); + } + var tx = { + type: 1, + chainId: handleNumber(transaction[0]).toNumber(), + nonce: handleNumber(transaction[1]).toNumber(), + gasPrice: handleNumber(transaction[2]), + gasLimit: handleNumber(transaction[3]), + to: handleAddress(transaction[4]), + value: handleNumber(transaction[5]), + data: transaction[6], + accessList: accessListify(transaction[7]) + }; + if (transaction.length === 8) { + return tx; + } + tx.hash = (0, keccak256_1.keccak256)(payload); + _parseEipSignature(tx, transaction.slice(8), _serializeEip2930); + return tx; + } + function _parse(rawTransaction) { + var transaction = RLP.decode(rawTransaction); + if (transaction.length !== 9 && transaction.length !== 6) { + logger.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + } + var tx = { + nonce: handleNumber(transaction[0]).toNumber(), + gasPrice: handleNumber(transaction[1]), + gasLimit: handleNumber(transaction[2]), + to: handleAddress(transaction[3]), + value: handleNumber(transaction[4]), + data: transaction[5], + chainId: 0 + }; + if (transaction.length === 6) { + return tx; + } + try { + tx.v = bignumber_1.BigNumber.from(transaction[6]).toNumber(); + } catch (error) { + return tx; + } + tx.r = (0, bytes_1.hexZeroPad)(transaction[7], 32); + tx.s = (0, bytes_1.hexZeroPad)(transaction[8], 32); + if (bignumber_1.BigNumber.from(tx.r).isZero() && bignumber_1.BigNumber.from(tx.s).isZero()) { + tx.chainId = tx.v; + tx.v = 0; + } else { + tx.chainId = Math.floor((tx.v - 35) / 2); + if (tx.chainId < 0) { tx.chainId = 0; } var recoveryParam = tx.v - 27; @@ -42874,7 +44716,7 @@ var require_errors2 = __commonJS({ }); // node_modules/web3-eth-ens/node_modules/web3-utils/lib/utils.js -var require_utils12 = __commonJS({ +var require_utils13 = __commonJS({ "node_modules/web3-eth-ens/node_modules/web3-utils/lib/utils.js"(exports2, module2) { init_cjs_shim(); var BN = require_bn3(); @@ -43140,7 +44982,7 @@ var require_soliditySha32 = __commonJS({ "node_modules/web3-eth-ens/node_modules/web3-utils/lib/soliditySha3.js"(exports2, module2) { init_cjs_shim(); var BN = require_bn3(); - var utils = require_utils12(); + var utils = require_utils13(); var _elementaryName = function(name2) { if (name2.startsWith("int[")) { return "int256" + name2.slice(3); @@ -43314,7 +45156,7 @@ var require_lib26 = __commonJS({ "node_modules/web3-eth-ens/node_modules/web3-utils/lib/index.js"(exports2, module2) { init_cjs_shim(); var ethjsUnit = require_lib(); - var utils = require_utils12(); + var utils = require_utils13(); var soliditySha3 = require_soliditySha32(); var randombytes = require_randombytes(); var BN = require_bn3(); @@ -43546,9 +45388,9 @@ var require_lib26 = __commonJS({ } }); -// node_modules/web3-eth-ens/node_modules/web3-eth-iban/lib/index.js +// node_modules/web3-eth-ens/node_modules/web3-core-helpers/node_modules/web3-eth-iban/lib/index.js var require_lib27 = __commonJS({ - "node_modules/web3-eth-ens/node_modules/web3-eth-iban/lib/index.js"(exports2, module2) { + "node_modules/web3-eth-ens/node_modules/web3-core-helpers/node_modules/web3-eth-iban/lib/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_lib26(); @@ -44159,7 +46001,7 @@ var require_errors3 = __commonJS({ }); // node_modules/web3-eth-contract/node_modules/web3-utils/lib/utils.js -var require_utils13 = __commonJS({ +var require_utils14 = __commonJS({ "node_modules/web3-eth-contract/node_modules/web3-utils/lib/utils.js"(exports2, module2) { init_cjs_shim(); var BN = require_bn3(); @@ -44425,7 +46267,7 @@ var require_soliditySha33 = __commonJS({ "node_modules/web3-eth-contract/node_modules/web3-utils/lib/soliditySha3.js"(exports2, module2) { init_cjs_shim(); var BN = require_bn3(); - var utils = require_utils13(); + var utils = require_utils14(); var _elementaryName = function(name2) { if (name2.startsWith("int[")) { return "int256" + name2.slice(3); @@ -44599,7 +46441,7 @@ var require_lib29 = __commonJS({ "node_modules/web3-eth-contract/node_modules/web3-utils/lib/index.js"(exports2, module2) { init_cjs_shim(); var ethjsUnit = require_lib(); - var utils = require_utils13(); + var utils = require_utils14(); var soliditySha3 = require_soliditySha33(); var randombytes = require_randombytes(); var BN = require_bn3(); @@ -44831,9 +46673,9 @@ var require_lib29 = __commonJS({ } }); -// node_modules/web3-eth-contract/node_modules/web3-eth-iban/lib/index.js +// node_modules/web3-eth-contract/node_modules/web3-core-helpers/node_modules/web3-eth-iban/lib/index.js var require_lib30 = __commonJS({ - "node_modules/web3-eth-contract/node_modules/web3-eth-iban/lib/index.js"(exports2, module2) { + "node_modules/web3-eth-contract/node_modules/web3-core-helpers/node_modules/web3-eth-iban/lib/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var utils = require_lib29(); @@ -47507,12 +49349,195 @@ var require_lib36 = __commonJS({ } }); +// node_modules/web3-eth-contract/node_modules/web3-core-promievent/node_modules/eventemitter3/index.js +var require_eventemitter32 = __commonJS({ + "node_modules/web3-eth-contract/node_modules/web3-core-promievent/node_modules/eventemitter3/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var has = Object.prototype.hasOwnProperty; + var prefix = "~"; + function Events() { + } + if (Object.create) { + Events.prototype = /* @__PURE__ */ Object.create(null); + if (!new Events().__proto__) + prefix = false; + } + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + function addListener(emitter, event, fn, context, once) { + if (typeof fn !== "function") { + throw new TypeError("The listener must be a function"); + } + var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event; + if (!emitter._events[evt]) + emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) + emitter._events[evt].push(listener); + else + emitter._events[evt] = [emitter._events[evt], listener]; + return emitter; + } + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) + emitter._events = new Events(); + else + delete emitter._events[evt]; + } + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + EventEmitter.prototype.eventNames = function eventNames() { + var names = [], events, name2; + if (this._eventsCount === 0) + return names; + for (name2 in events = this._events) { + if (has.call(events, name2)) + names.push(prefix ? name2.slice(1) : name2); + } + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + return names; + }; + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event, handlers = this._events[evt]; + if (!handlers) + return []; + if (handlers.fn) + return [handlers.fn]; + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + return ee; + }; + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event, listeners = this._events[evt]; + if (!listeners) + return 0; + if (listeners.fn) + return 1; + return listeners.length; + }; + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return false; + var listeners = this._events[evt], len = arguments.length, args, i; + if (listeners.fn) { + if (listeners.once) + this.removeListener(event, listeners.fn, void 0, true); + switch (len) { + case 1: + return listeners.fn.call(listeners.context), true; + case 2: + return listeners.fn.call(listeners.context, a1), true; + case 3: + return listeners.fn.call(listeners.context, a1, a2), true; + case 4: + return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: + return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: + return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + for (i = 1, args = new Array(len - 1); i < len; i++) { + args[i - 1] = arguments[i]; + } + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length, j; + for (i = 0; i < length; i++) { + if (listeners[i].once) + this.removeListener(event, listeners[i].fn, void 0, true); + switch (len) { + case 1: + listeners[i].fn.call(listeners[i].context); + break; + case 2: + listeners[i].fn.call(listeners[i].context, a1); + break; + case 3: + listeners[i].fn.call(listeners[i].context, a1, a2); + break; + case 4: + listeners[i].fn.call(listeners[i].context, a1, a2, a3); + break; + default: + if (!args) + for (j = 1, args = new Array(len - 1); j < len; j++) { + args[j - 1] = arguments[j]; + } + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + return true; + }; + EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); + }; + EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); + }; + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + var listeners = this._events[evt]; + if (listeners.fn) { + if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) { + events.push(listeners[i]); + } + } + if (events.length) + this._events[evt] = events.length === 1 ? events[0] : events; + else + clearEvent(this, evt); + } + return this; + }; + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) + clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + return this; + }; + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + EventEmitter.prefixed = prefix; + EventEmitter.EventEmitter = EventEmitter; + if ("undefined" !== typeof module2) { + module2.exports = EventEmitter; + } + } +}); + // node_modules/web3-eth-contract/node_modules/web3-core-promievent/lib/index.js var require_lib37 = __commonJS({ "node_modules/web3-eth-contract/node_modules/web3-core-promievent/lib/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var EventEmitter = require_eventemitter3(); + var EventEmitter = require_eventemitter32(); var PromiEvent = function PromiEvent2(justPromise) { var resolve, reject, eventEmitter = new Promise(function() { resolve = arguments[0]; @@ -55124,12 +57149,195 @@ var require_eth_ens_namehash = __commonJS({ } }); +// node_modules/web3-eth-ens/node_modules/web3-core-promievent/node_modules/eventemitter3/index.js +var require_eventemitter33 = __commonJS({ + "node_modules/web3-eth-ens/node_modules/web3-core-promievent/node_modules/eventemitter3/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var has = Object.prototype.hasOwnProperty; + var prefix = "~"; + function Events() { + } + if (Object.create) { + Events.prototype = /* @__PURE__ */ Object.create(null); + if (!new Events().__proto__) + prefix = false; + } + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + function addListener(emitter, event, fn, context, once) { + if (typeof fn !== "function") { + throw new TypeError("The listener must be a function"); + } + var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event; + if (!emitter._events[evt]) + emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) + emitter._events[evt].push(listener); + else + emitter._events[evt] = [emitter._events[evt], listener]; + return emitter; + } + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) + emitter._events = new Events(); + else + delete emitter._events[evt]; + } + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + EventEmitter.prototype.eventNames = function eventNames() { + var names = [], events, name2; + if (this._eventsCount === 0) + return names; + for (name2 in events = this._events) { + if (has.call(events, name2)) + names.push(prefix ? name2.slice(1) : name2); + } + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + return names; + }; + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event, handlers = this._events[evt]; + if (!handlers) + return []; + if (handlers.fn) + return [handlers.fn]; + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + return ee; + }; + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event, listeners = this._events[evt]; + if (!listeners) + return 0; + if (listeners.fn) + return 1; + return listeners.length; + }; + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return false; + var listeners = this._events[evt], len = arguments.length, args, i; + if (listeners.fn) { + if (listeners.once) + this.removeListener(event, listeners.fn, void 0, true); + switch (len) { + case 1: + return listeners.fn.call(listeners.context), true; + case 2: + return listeners.fn.call(listeners.context, a1), true; + case 3: + return listeners.fn.call(listeners.context, a1, a2), true; + case 4: + return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: + return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: + return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + for (i = 1, args = new Array(len - 1); i < len; i++) { + args[i - 1] = arguments[i]; + } + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length, j; + for (i = 0; i < length; i++) { + if (listeners[i].once) + this.removeListener(event, listeners[i].fn, void 0, true); + switch (len) { + case 1: + listeners[i].fn.call(listeners[i].context); + break; + case 2: + listeners[i].fn.call(listeners[i].context, a1); + break; + case 3: + listeners[i].fn.call(listeners[i].context, a1, a2); + break; + case 4: + listeners[i].fn.call(listeners[i].context, a1, a2, a3); + break; + default: + if (!args) + for (j = 1, args = new Array(len - 1); j < len; j++) { + args[j - 1] = arguments[j]; + } + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + return true; + }; + EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); + }; + EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); + }; + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + var listeners = this._events[evt]; + if (listeners.fn) { + if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) { + events.push(listeners[i]); + } + } + if (events.length) + this._events[evt] = events.length === 1 ? events[0] : events; + else + clearEvent(this, evt); + } + return this; + }; + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) + clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + return this; + }; + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + EventEmitter.prefixed = prefix; + EventEmitter.EventEmitter = EventEmitter; + if ("undefined" !== typeof module2) { + module2.exports = EventEmitter; + } + } +}); + // node_modules/web3-eth-ens/node_modules/web3-core-promievent/lib/index.js var require_lib48 = __commonJS({ "node_modules/web3-eth-ens/node_modules/web3-core-promievent/lib/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var EventEmitter = require_eventemitter3(); + var EventEmitter = require_eventemitter33(); var PromiEvent = function PromiEvent2(justPromise) { var resolve, reject, eventEmitter = new Promise(function() { resolve = arguments[0]; @@ -56350,9 +58558,9 @@ var require_ResolverMethodHandler = __commonJS({ } }); -// node_modules/varint/encode.js +// node_modules/multicodec/node_modules/varint/encode.js var require_encode = __commonJS({ - "node_modules/varint/encode.js"(exports2, module2) { + "node_modules/multicodec/node_modules/varint/encode.js"(exports2, module2) { init_cjs_shim(); module2.exports = encode; var MSB = 128; @@ -56378,9 +58586,9 @@ var require_encode = __commonJS({ } }); -// node_modules/varint/decode.js +// node_modules/multicodec/node_modules/varint/decode.js var require_decode = __commonJS({ - "node_modules/varint/decode.js"(exports2, module2) { + "node_modules/multicodec/node_modules/varint/decode.js"(exports2, module2) { init_cjs_shim(); module2.exports = read; var MSB = 128; @@ -56402,9 +58610,9 @@ var require_decode = __commonJS({ } }); -// node_modules/varint/length.js +// node_modules/multicodec/node_modules/varint/length.js var require_length = __commonJS({ - "node_modules/varint/length.js"(exports2, module2) { + "node_modules/multicodec/node_modules/varint/length.js"(exports2, module2) { init_cjs_shim(); var N1 = Math.pow(2, 7); var N2 = Math.pow(2, 14); @@ -56421,9 +58629,9 @@ var require_length = __commonJS({ } }); -// node_modules/varint/index.js +// node_modules/multicodec/node_modules/varint/index.js var require_varint = __commonJS({ - "node_modules/varint/index.js"(exports2, module2) { + "node_modules/multicodec/node_modules/varint/index.js"(exports2, module2) { init_cjs_shim(); module2.exports = { encode: require_encode(), @@ -57027,9 +59235,9 @@ var require_src5 = __commonJS({ } }); -// node_modules/multihashes/node_modules/multibase/src/base.js +// node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base.js var require_base2 = __commonJS({ - "node_modules/multihashes/node_modules/multibase/src/base.js"(exports2, module2) { + "node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base.js"(exports2, module2) { "use strict"; init_cjs_shim(); var Base = class { @@ -57114,9 +59322,9 @@ var require_safe_buffer = __commonJS({ } }); -// node_modules/base-x/src/index.js +// node_modules/content-hash/node_modules/multihashes/node_modules/multibase/node_modules/base-x/src/index.js var require_src6 = __commonJS({ - "node_modules/base-x/src/index.js"(exports2, module2) { + "node_modules/content-hash/node_modules/multihashes/node_modules/multibase/node_modules/base-x/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var _Buffer = require_safe_buffer().Buffer; @@ -57246,9 +59454,9 @@ var require_src6 = __commonJS({ } }); -// node_modules/multihashes/node_modules/multibase/src/base16.js +// node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base16.js var require_base16 = __commonJS({ - "node_modules/multihashes/node_modules/multibase/src/base16.js"(exports2, module2) { + "node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base16.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); @@ -57273,9 +59481,9 @@ var require_base16 = __commonJS({ } }); -// node_modules/multihashes/node_modules/multibase/src/base32.js +// node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base32.js var require_base32 = __commonJS({ - "node_modules/multihashes/node_modules/multibase/src/base32.js"(exports2, module2) { + "node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base32.js"(exports2, module2) { "use strict"; init_cjs_shim(); function decode(input, alphabet) { @@ -57344,9 +59552,9 @@ var require_base32 = __commonJS({ } }); -// node_modules/multihashes/node_modules/multibase/src/base64.js +// node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base64.js var require_base642 = __commonJS({ - "node_modules/multihashes/node_modules/multibase/src/base64.js"(exports2, module2) { + "node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/base64.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); @@ -57383,9 +59591,9 @@ var require_base642 = __commonJS({ } }); -// node_modules/multihashes/node_modules/multibase/src/constants.js +// node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/constants.js var require_constants3 = __commonJS({ - "node_modules/multihashes/node_modules/multibase/src/constants.js"(exports2, module2) { + "node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/constants.js"(exports2, module2) { "use strict"; init_cjs_shim(); var Base = require_base2(); @@ -57426,9 +59634,9 @@ var require_constants3 = __commonJS({ } }); -// node_modules/multihashes/node_modules/multibase/src/index.js +// node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/index.js var require_src7 = __commonJS({ - "node_modules/multihashes/node_modules/multibase/src/index.js"(exports2, module2) { + "node_modules/content-hash/node_modules/multihashes/node_modules/multibase/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); @@ -57502,9 +59710,92 @@ var require_src7 = __commonJS({ } }); -// node_modules/multihashes/src/constants.js +// node_modules/content-hash/node_modules/multihashes/node_modules/varint/encode.js +var require_encode2 = __commonJS({ + "node_modules/content-hash/node_modules/multihashes/node_modules/varint/encode.js"(exports2, module2) { + init_cjs_shim(); + module2.exports = encode; + var MSB = 128; + var REST = 127; + var MSBALL = ~REST; + var INT = Math.pow(2, 31); + function encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= INT) { + out[offset++] = num & 255 | MSB; + num /= 128; + } + while (num & MSBALL) { + out[offset++] = num & 255 | MSB; + num >>>= 7; + } + out[offset] = num | 0; + encode.bytes = offset - oldOffset + 1; + return out; + } + } +}); + +// node_modules/content-hash/node_modules/multihashes/node_modules/varint/decode.js +var require_decode2 = __commonJS({ + "node_modules/content-hash/node_modules/multihashes/node_modules/varint/decode.js"(exports2, module2) { + init_cjs_shim(); + module2.exports = read; + var MSB = 128; + var REST = 127; + function read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + read.bytes = 0; + throw new RangeError("Could not decode varint"); + } + b = buf[counter++]; + res += shift < 28 ? (b & REST) << shift : (b & REST) * Math.pow(2, shift); + shift += 7; + } while (b >= MSB); + read.bytes = counter - offset; + return res; + } + } +}); + +// node_modules/content-hash/node_modules/multihashes/node_modules/varint/length.js +var require_length2 = __commonJS({ + "node_modules/content-hash/node_modules/multihashes/node_modules/varint/length.js"(exports2, module2) { + init_cjs_shim(); + var N1 = Math.pow(2, 7); + var N2 = Math.pow(2, 14); + var N3 = Math.pow(2, 21); + var N4 = Math.pow(2, 28); + var N5 = Math.pow(2, 35); + var N6 = Math.pow(2, 42); + var N7 = Math.pow(2, 49); + var N8 = Math.pow(2, 56); + var N9 = Math.pow(2, 63); + module2.exports = function(value) { + return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10; + }; + } +}); + +// node_modules/content-hash/node_modules/multihashes/node_modules/varint/index.js +var require_varint2 = __commonJS({ + "node_modules/content-hash/node_modules/multihashes/node_modules/varint/index.js"(exports2, module2) { + init_cjs_shim(); + module2.exports = { + encode: require_encode2(), + decode: require_decode2(), + encodingLength: require_length2() + }; + } +}); + +// node_modules/content-hash/node_modules/multihashes/src/constants.js var require_constants4 = __commonJS({ - "node_modules/multihashes/src/constants.js"(exports2) { + "node_modules/content-hash/node_modules/multihashes/src/constants.js"(exports2) { "use strict"; init_cjs_shim(); exports2.names = Object.freeze({ @@ -58532,14 +60823,14 @@ var require_constants4 = __commonJS({ } }); -// node_modules/multihashes/src/index.js +// node_modules/content-hash/node_modules/multihashes/src/index.js var require_src8 = __commonJS({ - "node_modules/multihashes/src/index.js"(exports2) { + "node_modules/content-hash/node_modules/multihashes/src/index.js"(exports2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); var multibase = require_src7(); - var varint = require_varint(); + var varint = require_varint2(); var cs = require_constants4(); exports2.names = cs.names; exports2.codes = cs.codes; @@ -58652,9 +60943,9 @@ var require_src8 = __commonJS({ } }); -// node_modules/cids/node_modules/multibase/src/base.js +// node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base.js var require_base3 = __commonJS({ - "node_modules/cids/node_modules/multibase/src/base.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base.js"(exports2, module2) { "use strict"; init_cjs_shim(); var Base = class { @@ -58680,9 +60971,141 @@ var require_base3 = __commonJS({ } }); -// node_modules/cids/node_modules/multibase/src/base16.js +// node_modules/content-hash/node_modules/cids/node_modules/multibase/node_modules/base-x/src/index.js +var require_src9 = __commonJS({ + "node_modules/content-hash/node_modules/cids/node_modules/multibase/node_modules/base-x/src/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var _Buffer = require_safe_buffer().Buffer; + function base(ALPHABET) { + if (ALPHABET.length >= 255) { + throw new TypeError("Alphabet too long"); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + " is ambiguous"); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); + var iFACTOR = Math.log(256) / Math.log(BASE); + function encode(source) { + if (Array.isArray(source) || source instanceof Uint8Array) { + source = _Buffer.from(source); + } + if (!_Buffer.isBuffer(source)) { + throw new TypeError("Expected Buffer"); + } + if (source.length === 0) { + return ""; + } + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + var size = (pend - pbegin) * iFACTOR + 1 >>> 0; + var b58 = new Uint8Array(size); + while (pbegin !== pend) { + var carry = source[pbegin]; + var i2 = 0; + for (var it1 = size - 1; (carry !== 0 || i2 < length) && it1 !== -1; it1--, i2++) { + carry += 256 * b58[it1] >>> 0; + b58[it1] = carry % BASE >>> 0; + carry = carry / BASE >>> 0; + } + if (carry !== 0) { + throw new Error("Non-zero carry"); + } + length = i2; + pbegin++; + } + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; + } + function decodeUnsafe(source) { + if (typeof source !== "string") { + throw new TypeError("Expected String"); + } + if (source.length === 0) { + return _Buffer.alloc(0); + } + var psz = 0; + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + var size = (source.length - psz) * FACTOR + 1 >>> 0; + var b256 = new Uint8Array(size); + while (psz < source.length) { + var carry = BASE_MAP[source.charCodeAt(psz)]; + if (carry === 255) { + return; + } + var i2 = 0; + for (var it3 = size - 1; (carry !== 0 || i2 < length) && it3 !== -1; it3--, i2++) { + carry += BASE * b256[it3] >>> 0; + b256[it3] = carry % 256 >>> 0; + carry = carry / 256 >>> 0; + } + if (carry !== 0) { + throw new Error("Non-zero carry"); + } + length = i2; + psz++; + } + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = _Buffer.allocUnsafe(zeroes + (size - it4)); + vch.fill(0, 0, zeroes); + var j2 = zeroes; + while (it4 !== size) { + vch[j2++] = b256[it4++]; + } + return vch; + } + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error("Non-base" + BASE + " character"); + } + return { + encode, + decodeUnsafe, + decode + }; + } + module2.exports = base; + } +}); + +// node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base16.js var require_base162 = __commonJS({ - "node_modules/cids/node_modules/multibase/src/base16.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base16.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); @@ -58707,9 +61130,9 @@ var require_base162 = __commonJS({ } }); -// node_modules/cids/node_modules/multibase/src/base32.js +// node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base32.js var require_base322 = __commonJS({ - "node_modules/cids/node_modules/multibase/src/base32.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base32.js"(exports2, module2) { "use strict"; init_cjs_shim(); function decode(input, alphabet) { @@ -58778,9 +61201,9 @@ var require_base322 = __commonJS({ } }); -// node_modules/cids/node_modules/multibase/src/base64.js +// node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base64.js var require_base643 = __commonJS({ - "node_modules/cids/node_modules/multibase/src/base64.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multibase/src/base64.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); @@ -58817,13 +61240,13 @@ var require_base643 = __commonJS({ } }); -// node_modules/cids/node_modules/multibase/src/constants.js +// node_modules/content-hash/node_modules/cids/node_modules/multibase/src/constants.js var require_constants5 = __commonJS({ - "node_modules/cids/node_modules/multibase/src/constants.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multibase/src/constants.js"(exports2, module2) { "use strict"; init_cjs_shim(); var Base = require_base3(); - var baseX = require_src6(); + var baseX = require_src9(); var base16 = require_base162(); var base32 = require_base322(); var base64 = require_base643(); @@ -58860,9 +61283,9 @@ var require_constants5 = __commonJS({ } }); -// node_modules/cids/node_modules/multibase/src/index.js -var require_src9 = __commonJS({ - "node_modules/cids/node_modules/multibase/src/index.js"(exports2, module2) { +// node_modules/content-hash/node_modules/cids/node_modules/multibase/src/index.js +var require_src10 = __commonJS({ + "node_modules/content-hash/node_modules/cids/node_modules/multibase/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); @@ -58937,9 +61360,92 @@ var require_src9 = __commonJS({ } }); -// node_modules/cids/node_modules/multicodec/src/base-table.json +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/encode.js +var require_encode3 = __commonJS({ + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/encode.js"(exports2, module2) { + init_cjs_shim(); + module2.exports = encode; + var MSB = 128; + var REST = 127; + var MSBALL = ~REST; + var INT = Math.pow(2, 31); + function encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= INT) { + out[offset++] = num & 255 | MSB; + num /= 128; + } + while (num & MSBALL) { + out[offset++] = num & 255 | MSB; + num >>>= 7; + } + out[offset] = num | 0; + encode.bytes = offset - oldOffset + 1; + return out; + } + } +}); + +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/decode.js +var require_decode3 = __commonJS({ + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/decode.js"(exports2, module2) { + init_cjs_shim(); + module2.exports = read; + var MSB = 128; + var REST = 127; + function read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + read.bytes = 0; + throw new RangeError("Could not decode varint"); + } + b = buf[counter++]; + res += shift < 28 ? (b & REST) << shift : (b & REST) * Math.pow(2, shift); + shift += 7; + } while (b >= MSB); + read.bytes = counter - offset; + return res; + } + } +}); + +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/length.js +var require_length3 = __commonJS({ + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/length.js"(exports2, module2) { + init_cjs_shim(); + var N1 = Math.pow(2, 7); + var N2 = Math.pow(2, 14); + var N3 = Math.pow(2, 21); + var N4 = Math.pow(2, 28); + var N5 = Math.pow(2, 35); + var N6 = Math.pow(2, 42); + var N7 = Math.pow(2, 49); + var N8 = Math.pow(2, 56); + var N9 = Math.pow(2, 63); + module2.exports = function(value) { + return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10; + }; + } +}); + +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/index.js +var require_varint3 = __commonJS({ + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/node_modules/varint/index.js"(exports2, module2) { + init_cjs_shim(); + module2.exports = { + encode: require_encode3(), + decode: require_decode3(), + encodingLength: require_length3() + }; + } +}); + +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/base-table.json var require_base_table2 = __commonJS({ - "node_modules/cids/node_modules/multicodec/src/base-table.json"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/base-table.json"(exports2, module2) { module2.exports = { identity: 0, ip4: 4, @@ -59392,9 +61898,9 @@ var require_base_table2 = __commonJS({ } }); -// node_modules/cids/node_modules/multicodec/src/int-table.js +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/int-table.js var require_int_table2 = __commonJS({ - "node_modules/cids/node_modules/multicodec/src/int-table.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/int-table.js"(exports2, module2) { "use strict"; init_cjs_shim(); var baseTable = require_base_table2(); @@ -59407,12 +61913,12 @@ var require_int_table2 = __commonJS({ } }); -// node_modules/cids/node_modules/multicodec/src/util.js +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/util.js var require_util2 = __commonJS({ - "node_modules/cids/node_modules/multicodec/src/util.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/util.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var varint = require_varint(); + var varint = require_varint3(); var { Buffer: Buffer2 } = __require("buffer"); module2.exports = { numberToBuffer, @@ -59443,9 +61949,9 @@ var require_util2 = __commonJS({ } }); -// node_modules/cids/node_modules/multicodec/src/varint-table.js +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/varint-table.js var require_varint_table2 = __commonJS({ - "node_modules/cids/node_modules/multicodec/src/varint-table.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/varint-table.js"(exports2, module2) { "use strict"; init_cjs_shim(); var baseTable = require_base_table2(); @@ -59459,9 +61965,9 @@ var require_varint_table2 = __commonJS({ } }); -// node_modules/cids/node_modules/multicodec/src/constants.js +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/constants.js var require_constants6 = __commonJS({ - "node_modules/cids/node_modules/multicodec/src/constants.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/constants.js"(exports2, module2) { "use strict"; init_cjs_shim(); var table = require_base_table2(); @@ -59473,9 +61979,9 @@ var require_constants6 = __commonJS({ } }); -// node_modules/cids/node_modules/multicodec/src/print.js +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/print.js var require_print2 = __commonJS({ - "node_modules/cids/node_modules/multicodec/src/print.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/print.js"(exports2, module2) { "use strict"; init_cjs_shim(); var table = require_base_table2(); @@ -59488,13 +61994,13 @@ var require_print2 = __commonJS({ } }); -// node_modules/cids/node_modules/multicodec/src/index.js -var require_src10 = __commonJS({ - "node_modules/cids/node_modules/multicodec/src/index.js"(exports2, module2) { +// node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/index.js +var require_src11 = __commonJS({ + "node_modules/content-hash/node_modules/cids/node_modules/multicodec/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); - var varint = require_varint(); + var varint = require_varint3(); var intTable = require_int_table2(); var codecNameToCodeVarint = require_varint_table2(); var util = require_util2(); @@ -59553,9 +62059,9 @@ var require_src10 = __commonJS({ } }); -// node_modules/cids/src/cid-util.js +// node_modules/content-hash/node_modules/cids/src/cid-util.js var require_cid_util = __commonJS({ - "node_modules/cids/src/cid-util.js"(exports2, module2) { + "node_modules/content-hash/node_modules/cids/src/cid-util.js"(exports2, module2) { "use strict"; init_cjs_shim(); var mh = require_src8(); @@ -59661,15 +62167,15 @@ var require_class_is = __commonJS({ } }); -// node_modules/cids/src/index.js -var require_src11 = __commonJS({ - "node_modules/cids/src/index.js"(exports2, module2) { +// node_modules/content-hash/node_modules/cids/src/index.js +var require_src12 = __commonJS({ + "node_modules/content-hash/node_modules/cids/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Buffer: Buffer2 } = __require("buffer"); var mh = require_src8(); - var multibase = require_src9(); - var multicodec = require_src10(); + var multibase = require_src10(); + var multicodec = require_src11(); var codecs = require_base_table2(); var CIDUtil = require_cid_util(); var withIs = require_class_is(); @@ -59905,7 +62411,7 @@ var require_src11 = __commonJS({ var require_profiles = __commonJS({ "node_modules/content-hash/src/profiles.js"(exports2) { init_cjs_shim(); - var CID = require_src11(); + var CID = require_src12(); var multiH = require_src8(); var hexStringToBuffer = (hex) => { let prefix = hex.slice(0, 2); @@ -59991,7 +62497,7 @@ var require_profiles = __commonJS({ var require_helpers4 = __commonJS({ "node_modules/content-hash/src/helpers.js"(exports2) { init_cjs_shim(); - var CID = require_src11(); + var CID = require_src12(); var cidV0ToV1Base32 = (ipfsHash) => { let cid = new CID(ipfsHash); if (cid.version === 0) { @@ -60004,7 +62510,7 @@ var require_helpers4 = __commonJS({ }); // node_modules/content-hash/src/index.js -var require_src12 = __commonJS({ +var require_src13 = __commonJS({ "node_modules/content-hash/src/index.js"(exports2, module2) { init_cjs_shim(); var multiC = require_src5(); @@ -60074,7 +62580,7 @@ var require_src12 = __commonJS({ var require_contentHash = __commonJS({ "node_modules/web3-eth-ens/lib/lib/contentHash.js"(exports2, module2) { init_cjs_shim(); - var contentHash = require_src12(); + var contentHash = require_src13(); function decode(encoded) { var decoded = null; var protocolType = null; @@ -60442,25 +62948,35 @@ var require_lib50 = __commonJS({ var require_array2 = __commonJS({ "node_modules/eth-lib/lib/array.js"(exports2, module2) { init_cjs_shim(); - var generate = (num, fn) => { - let a = []; - for (var i = 0; i < num; ++i) + var generate = function generate2(num, fn) { + var a = []; + for (var i = 0; i < num; ++i) { a.push(fn(i)); + } return a; }; - var replicate = (num, val) => generate(num, () => val); - var concat = (a, b) => a.concat(b); - var flatten = (a) => { - let r = []; - for (let j = 0, J = a.length; j < J; ++j) - for (let i = 0, I = a[j].length; i < I; ++i) + var replicate = function replicate2(num, val) { + return generate(num, function() { + return val; + }); + }; + var concat = function concat2(a, b) { + return a.concat(b); + }; + var flatten = function flatten2(a) { + var r = []; + for (var j = 0, J = a.length; j < J; ++j) { + for (var i = 0, I = a[j].length; i < I; ++i) { r.push(a[j][i]); + } + } return r; }; - var chunksOf = (n, a) => { - let b = []; - for (let i = 0, l = a.length; i < l; i += n) + var chunksOf = function chunksOf2(n, a) { + var b = []; + for (var i = 0, l = a.length; i < l; i += n) { b.push(a.slice(i, i + n)); + } return b; }; module2.exports = { @@ -60478,76 +62994,106 @@ var require_bytes3 = __commonJS({ "node_modules/eth-lib/lib/bytes.js"(exports2, module2) { init_cjs_shim(); var A = require_array2(); - var at = (bytes, index) => parseInt(bytes.slice(index * 2 + 2, index * 2 + 4), 16); - var random = (bytes) => { - let rnd; + var at = function at2(bytes, index) { + return parseInt(bytes.slice(index * 2 + 2, index * 2 + 4), 16); + }; + var random = function random2(bytes) { + var rnd = void 0; if (typeof window !== "undefined" && window.crypto && window.crypto.getRandomValues) rnd = window.crypto.getRandomValues(new Uint8Array(bytes)); else if (typeof __require !== "undefined") rnd = __require("crypto").randomBytes(bytes); else throw "Safe random numbers not available."; - let hex = "0x"; - for (let i = 0; i < bytes; ++i) + var hex = "0x"; + for (var i = 0; i < bytes; ++i) { hex += ("00" + rnd[i].toString(16)).slice(-2); + } return hex; }; - var length = (a) => (a.length - 2) / 2; - var flatten = (a) => "0x" + a.reduce((r, s) => r + s.slice(2), ""); - var slice = (i, j, bs) => "0x" + bs.slice(i * 2 + 2, j * 2 + 2); - var reverse = (hex) => { - let rev = "0x"; - for (let i = 0, l = length(hex); i < l; ++i) { + var length = function length2(a) { + return (a.length - 2) / 2; + }; + var flatten = function flatten2(a) { + return "0x" + a.reduce(function(r, s) { + return r + s.slice(2); + }, ""); + }; + var slice = function slice2(i, j, bs) { + return "0x" + bs.slice(i * 2 + 2, j * 2 + 2); + }; + var reverse = function reverse2(hex) { + var rev = "0x"; + for (var i = 0, l = length(hex); i < l; ++i) { rev += hex.slice((l - i) * 2, (l - i + 1) * 2); } return rev; }; - var pad = (l, hex) => hex.length === l * 2 + 2 ? hex : pad(l, "0x0" + hex.slice(2)); - var padRight = (l, hex) => hex.length === l * 2 + 2 ? hex : padRight(l, hex + "0"); - var toArray = (hex) => { - let arr = []; - for (let i = 2, l = hex.length; i < l; i += 2) + var pad = function pad2(l, hex) { + return hex.length === l * 2 + 2 ? hex : pad2(l, "0x0" + hex.slice(2)); + }; + var padRight = function padRight2(l, hex) { + return hex.length === l * 2 + 2 ? hex : padRight2(l, hex + "0"); + }; + var toArray = function toArray2(hex) { + var arr = []; + for (var i = 2, l = hex.length; i < l; i += 2) { arr.push(parseInt(hex.slice(i, i + 2), 16)); + } return arr; }; - var fromArray = (arr) => { - let hex = "0x"; - for (let i = 0, l = arr.length; i < l; ++i) { - let b = arr[i]; + var fromArray = function fromArray2(arr) { + var hex = "0x"; + for (var i = 0, l = arr.length; i < l; ++i) { + var b = arr[i]; hex += (b < 16 ? "0" : "") + b.toString(16); } return hex; }; - var toUint8Array = (hex) => new Uint8Array(toArray(hex)); - var fromUint8Array = (arr) => fromArray([].slice.call(arr, 0)); - var fromNumber = (num) => { - let hex = num.toString(16); + var toUint8Array = function toUint8Array2(hex) { + return new Uint8Array(toArray(hex)); + }; + var fromUint8Array = function fromUint8Array2(arr) { + return fromArray([].slice.call(arr, 0)); + }; + var fromNumber = function fromNumber2(num) { + var hex = num.toString(16); return hex.length % 2 === 0 ? "0x" + hex : "0x0" + hex; }; - var toNumber = (hex) => parseInt(hex.slice(2), 16); - var concat = (a, b) => a.concat(b.slice(2)); - var fromNat = (bn) => bn === "0x0" ? "0x" : bn.length % 2 === 0 ? bn : "0x0" + bn.slice(2); - var toNat = (bn) => bn[2] === "0" ? "0x" + bn.slice(3) : bn; - var fromAscii = (ascii) => { - let hex = "0x"; - for (let i = 0; i < ascii.length; ++i) + var toNumber = function toNumber2(hex) { + return parseInt(hex.slice(2), 16); + }; + var concat = function concat2(a, b) { + return a.concat(b.slice(2)); + }; + var fromNat = function fromNat2(bn) { + return bn === "0x0" ? "0x" : bn.length % 2 === 0 ? bn : "0x0" + bn.slice(2); + }; + var toNat = function toNat2(bn) { + return bn[2] === "0" ? "0x" + bn.slice(3) : bn; + }; + var fromAscii = function fromAscii2(ascii) { + var hex = "0x"; + for (var i = 0; i < ascii.length; ++i) { hex += ("00" + ascii.charCodeAt(i).toString(16)).slice(-2); + } return hex; }; - var toAscii = (hex) => { - let ascii = ""; - for (let i = 2; i < hex.length; i += 2) + var toAscii = function toAscii2(hex) { + var ascii = ""; + for (var i = 2; i < hex.length; i += 2) { ascii += String.fromCharCode(parseInt(hex.slice(i, i + 2), 16)); + } return ascii; }; - var fromString = (s) => { - const makeByte = (uint8) => { - const b = uint8.toString(16); + var fromString = function fromString2(s) { + var makeByte = function makeByte2(uint8) { + var b = uint8.toString(16); return b.length < 2 ? "0" + b : b; }; - let bytes = "0x"; - for (let ci = 0; ci != s.length; ci++) { - let c = s.charCodeAt(ci); + var bytes = "0x"; + for (var ci = 0; ci != s.length; ci++) { + var c = s.charCodeAt(ci); if (c < 128) { bytes += makeByte(c); continue; @@ -60558,7 +63104,7 @@ var require_bytes3 = __commonJS({ if (c > 55295 && c < 56320) { if (++ci == s.length) return null; - let c2 = s.charCodeAt(ci); + var c2 = s.charCodeAt(ci); if (c2 < 56320 || c2 > 57343) return null; c = 65536 + ((c & 1023) << 10) + (c2 & 1023); @@ -60573,12 +63119,12 @@ var require_bytes3 = __commonJS({ } return bytes; }; - var toString = (bytes) => { - let s = ""; - let i = 0; - let l = length(bytes); + var toString = function toString2(bytes) { + var s = ""; + var i = 0; + var l = length(bytes); while (i < l) { - let c = at(bytes, i++); + var c = at(bytes, i++); if (c > 127) { if (c > 191 && c < 224) { if (i >= l) @@ -63492,19 +66038,39 @@ var require_nat = __commonJS({ init_cjs_shim(); var BN = require_bn5(); var Bytes = require_bytes3(); - var fromBN = (bn) => "0x" + bn.toString("hex"); - var toBN = (str) => new BN(str.slice(2), 16); - var fromString = (str) => { - const bn = "0x" + (str.slice(0, 2) === "0x" ? new BN(str.slice(2), 16) : new BN(str, 10)).toString("hex"); + var fromBN = function fromBN2(bn) { + return "0x" + bn.toString("hex"); + }; + var toBN = function toBN2(str) { + return new BN(str.slice(2), 16); + }; + var fromString = function fromString2(str) { + var bn = "0x" + (str.slice(0, 2) === "0x" ? new BN(str.slice(2), 16) : new BN(str, 10)).toString("hex"); return bn === "0x0" ? "0x" : bn; }; - var toEther = (wei) => toNumber(div(wei, fromString("10000000000"))) / 1e8; - var fromEther = (eth) => mul(fromNumber(Math.floor(eth * 1e8)), fromString("10000000000")); - var toString = (a) => toBN(a).toString(10); - var fromNumber = (a) => typeof a === "string" ? /^0x/.test(a) ? a : "0x" + a : "0x" + new BN(a).toString("hex"); - var toNumber = (a) => toBN(a).toNumber(); - var toUint256 = (a) => Bytes.pad(32, a); - var bin = (method) => (a, b) => fromBN(toBN(a)[method](toBN(b))); + var toEther = function toEther2(wei) { + return toNumber(div(wei, fromString("10000000000"))) / 1e8; + }; + var fromEther = function fromEther2(eth) { + return mul(fromNumber(Math.floor(eth * 1e8)), fromString("10000000000")); + }; + var toString = function toString2(a) { + return toBN(a).toString(10); + }; + var fromNumber = function fromNumber2(a) { + return typeof a === "string" ? /^0x/.test(a) ? a : "0x" + a : "0x" + new BN(a).toString("hex"); + }; + var toNumber = function toNumber2(a) { + return toBN(a).toNumber(); + }; + var toUint256 = function toUint2562(a) { + return Bytes.pad(32, a); + }; + var bin = function bin2(method) { + return function(a, b) { + return fromBN(toBN(a)[method](toBN(b))); + }; + }; var add = bin("add"); var mul = bin("mul"); var div = bin("div"); @@ -63530,7 +66096,7 @@ var require_package4 = __commonJS({ "node_modules/elliptic/package.json"(exports2, module2) { module2.exports = { name: "elliptic", - version: "6.5.7", + version: "6.5.4", description: "EC cryptography", main: "lib/elliptic.js", files: [ @@ -66442,7 +69008,7 @@ var require_bn6 = __commonJS({ }); // node_modules/elliptic/lib/elliptic/utils.js -var require_utils14 = __commonJS({ +var require_utils15 = __commonJS({ "node_modules/elliptic/lib/elliptic/utils.js"(exports2) { "use strict"; init_cjs_shim(); @@ -66457,13 +69023,10 @@ var require_utils14 = __commonJS({ utils.encode = minUtils.encode; function getNAF(num, w, bits) { var naf = new Array(Math.max(num.bitLength(), bits) + 1); - var i; - for (i = 0; i < naf.length; i += 1) { - naf[i] = 0; - } + naf.fill(0); var ws = 1 << w + 1; var k = num.clone(); - for (i = 0; i < naf.length; i++) { + for (var i = 0; i < naf.length; i++) { var z; var mod = k.andln(ws - 1); if (k.isOdd()) { @@ -66554,7 +69117,7 @@ var require_base4 = __commonJS({ "use strict"; init_cjs_shim(); var BN = require_bn6(); - var utils = require_utils14(); + var utils = require_utils15(); var getNAF = utils.getNAF; var getJSF = utils.getJSF; var assert = utils.assert; @@ -66876,7 +69439,7 @@ var require_short2 = __commonJS({ "node_modules/elliptic/lib/elliptic/curve/short.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var utils = require_utils14(); + var utils = require_utils15(); var BN = require_bn6(); var inherits2 = require_inherits(); var Base = require_base4(); @@ -67570,447 +70133,2084 @@ var require_short2 = __commonJS({ } }); -// node_modules/elliptic/lib/elliptic/curve/mont.js -var require_mont2 = __commonJS({ - "node_modules/elliptic/lib/elliptic/curve/mont.js"(exports2, module2) { +// node_modules/elliptic/lib/elliptic/curve/mont.js +var require_mont2 = __commonJS({ + "node_modules/elliptic/lib/elliptic/curve/mont.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var BN = require_bn6(); + var inherits2 = require_inherits(); + var Base = require_base4(); + var utils = require_utils15(); + function MontCurve(conf) { + Base.call(this, "mont", conf); + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.i4 = new BN(4).toRed(this.red).redInvm(); + this.two = new BN(2).toRed(this.red); + this.a24 = this.i4.redMul(this.a.redAdd(this.two)); + } + inherits2(MontCurve, Base); + module2.exports = MontCurve; + MontCurve.prototype.validate = function validate2(point) { + var x = point.normalize().x; + var x2 = x.redSqr(); + var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); + var y = rhs.redSqrt(); + return y.redSqr().cmp(rhs) === 0; + }; + function Point(curve, x, z) { + Base.BasePoint.call(this, curve, "projective"); + if (x === null && z === null) { + this.x = this.curve.one; + this.z = this.curve.zero; + } else { + this.x = new BN(x, 16); + this.z = new BN(z, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + } + } + inherits2(Point, Base.BasePoint); + MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + return this.point(utils.toArray(bytes, enc), 1); + }; + MontCurve.prototype.point = function point(x, z) { + return new Point(this, x, z); + }; + MontCurve.prototype.pointFromJSON = function pointFromJSON(obj2) { + return Point.fromJSON(this, obj2); + }; + Point.prototype.precompute = function precompute() { + }; + Point.prototype._encode = function _encode() { + return this.getX().toArray("be", this.curve.p.byteLength()); + }; + Point.fromJSON = function fromJSON(curve, obj2) { + return new Point(curve, obj2[0], obj2[1] || curve.one); + }; + Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ""; + return ""; + }; + Point.prototype.isInfinity = function isInfinity() { + return this.z.cmpn(0) === 0; + }; + Point.prototype.dbl = function dbl() { + var a = this.x.redAdd(this.z); + var aa = a.redSqr(); + var b = this.x.redSub(this.z); + var bb = b.redSqr(); + var c = aa.redSub(bb); + var nx = aa.redMul(bb); + var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); + return this.curve.point(nx, nz); + }; + Point.prototype.add = function add() { + throw new Error("Not supported on Montgomery curve"); + }; + Point.prototype.diffAdd = function diffAdd(p, diff) { + var a = this.x.redAdd(this.z); + var b = this.x.redSub(this.z); + var c = p.x.redAdd(p.z); + var d = p.x.redSub(p.z); + var da = d.redMul(a); + var cb = c.redMul(b); + var nx = diff.z.redMul(da.redAdd(cb).redSqr()); + var nz = diff.x.redMul(da.redISub(cb).redSqr()); + return this.curve.point(nx, nz); + }; + Point.prototype.mul = function mul(k) { + var t = k.clone(); + var a = this; + var b = this.curve.point(null, null); + var c = this; + for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) + bits.push(t.andln(1)); + for (var i = bits.length - 1; i >= 0; i--) { + if (bits[i] === 0) { + a = a.diffAdd(b, c); + b = b.dbl(); + } else { + b = a.diffAdd(b, c); + a = a.dbl(); + } + } + return b; + }; + Point.prototype.mulAdd = function mulAdd() { + throw new Error("Not supported on Montgomery curve"); + }; + Point.prototype.jumlAdd = function jumlAdd() { + throw new Error("Not supported on Montgomery curve"); + }; + Point.prototype.eq = function eq(other) { + return this.getX().cmp(other.getX()) === 0; + }; + Point.prototype.normalize = function normalize() { + this.x = this.x.redMul(this.z.redInvm()); + this.z = this.curve.one; + return this; + }; + Point.prototype.getX = function getX() { + this.normalize(); + return this.x.fromRed(); + }; + } +}); + +// node_modules/elliptic/lib/elliptic/curve/edwards.js +var require_edwards2 = __commonJS({ + "node_modules/elliptic/lib/elliptic/curve/edwards.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils15(); + var BN = require_bn6(); + var inherits2 = require_inherits(); + var Base = require_base4(); + var assert = utils.assert; + function EdwardsCurve(conf) { + this.twisted = (conf.a | 0) !== 1; + this.mOneA = this.twisted && (conf.a | 0) === -1; + this.extended = this.mOneA; + Base.call(this, "edwards", conf); + this.a = new BN(conf.a, 16).umod(this.red.m); + this.a = this.a.toRed(this.red); + this.c = new BN(conf.c, 16).toRed(this.red); + this.c2 = this.c.redSqr(); + this.d = new BN(conf.d, 16).toRed(this.red); + this.dd = this.d.redAdd(this.d); + assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); + this.oneC = (conf.c | 0) === 1; + } + inherits2(EdwardsCurve, Base); + module2.exports = EdwardsCurve; + EdwardsCurve.prototype._mulA = function _mulA(num) { + if (this.mOneA) + return num.redNeg(); + else + return this.a.redMul(num); + }; + EdwardsCurve.prototype._mulC = function _mulC(num) { + if (this.oneC) + return num; + else + return this.c.redMul(num); + }; + EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { + return this.point(x, y, z, t); + }; + EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + var x2 = x.redSqr(); + var rhs = this.c2.redSub(this.a.redMul(x2)); + var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); + var y2 = rhs.redMul(lhs.redInvm()); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error("invalid point"); + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + return this.point(x, y); + }; + EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { + y = new BN(y, 16); + if (!y.red) + y = y.toRed(this.red); + var y2 = y.redSqr(); + var lhs = y2.redSub(this.c2); + var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a); + var x2 = lhs.redMul(rhs.redInvm()); + if (x2.cmp(this.zero) === 0) { + if (odd) + throw new Error("invalid point"); + else + return this.point(this.zero, y); + } + var x = x2.redSqrt(); + if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) + throw new Error("invalid point"); + if (x.fromRed().isOdd() !== odd) + x = x.redNeg(); + return this.point(x, y); + }; + EdwardsCurve.prototype.validate = function validate2(point) { + if (point.isInfinity()) + return true; + point.normalize(); + var x2 = point.x.redSqr(); + var y2 = point.y.redSqr(); + var lhs = x2.redMul(this.a).redAdd(y2); + var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); + return lhs.cmp(rhs) === 0; + }; + function Point(curve, x, y, z, t) { + Base.BasePoint.call(this, curve, "projective"); + if (x === null && y === null && z === null) { + this.x = this.curve.zero; + this.y = this.curve.one; + this.z = this.curve.one; + this.t = this.curve.zero; + this.zOne = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = z ? new BN(z, 16) : this.curve.one; + this.t = t && new BN(t, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + if (this.t && !this.t.red) + this.t = this.t.toRed(this.curve.red); + this.zOne = this.z === this.curve.one; + if (this.curve.extended && !this.t) { + this.t = this.x.redMul(this.y); + if (!this.zOne) + this.t = this.t.redMul(this.z.redInvm()); + } + } + } + inherits2(Point, Base.BasePoint); + EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj2) { + return Point.fromJSON(this, obj2); + }; + EdwardsCurve.prototype.point = function point(x, y, z, t) { + return new Point(this, x, y, z, t); + }; + Point.fromJSON = function fromJSON(curve, obj2) { + return new Point(curve, obj2[0], obj2[1], obj2[2]); + }; + Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ""; + return ""; + }; + Point.prototype.isInfinity = function isInfinity() { + return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0); + }; + Point.prototype._extDbl = function _extDbl() { + var a = this.x.redSqr(); + var b = this.y.redSqr(); + var c = this.z.redSqr(); + c = c.redIAdd(c); + var d = this.curve._mulA(a); + var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); + var g = d.redAdd(b); + var f = g.redSub(c); + var h = d.redSub(b); + var nx = e.redMul(f); + var ny = g.redMul(h); + var nt = e.redMul(h); + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); + }; + Point.prototype._projDbl = function _projDbl() { + var b = this.x.redAdd(this.y).redSqr(); + var c = this.x.redSqr(); + var d = this.y.redSqr(); + var nx; + var ny; + var nz; + var e; + var h; + var j; + if (this.curve.twisted) { + e = this.curve._mulA(c); + var f = e.redAdd(d); + if (this.zOne) { + nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); + ny = f.redMul(e.redSub(d)); + nz = f.redSqr().redSub(f).redSub(f); + } else { + h = this.z.redSqr(); + j = f.redSub(h).redISub(h); + nx = b.redSub(c).redISub(d).redMul(j); + ny = f.redMul(e.redSub(d)); + nz = f.redMul(j); + } + } else { + e = c.redAdd(d); + h = this.curve._mulC(this.z).redSqr(); + j = e.redSub(h).redSub(h); + nx = this.curve._mulC(b.redISub(e)).redMul(j); + ny = this.curve._mulC(e).redMul(c.redISub(d)); + nz = e.redMul(j); + } + return this.curve.point(nx, ny, nz); + }; + Point.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + if (this.curve.extended) + return this._extDbl(); + else + return this._projDbl(); + }; + Point.prototype._extAdd = function _extAdd(p) { + var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); + var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); + var c = this.t.redMul(this.curve.dd).redMul(p.t); + var d = this.z.redMul(p.z.redAdd(p.z)); + var e = b.redSub(a); + var f = d.redSub(c); + var g = d.redAdd(c); + var h = b.redAdd(a); + var nx = e.redMul(f); + var ny = g.redMul(h); + var nt = e.redMul(h); + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); + }; + Point.prototype._projAdd = function _projAdd(p) { + var a = this.z.redMul(p.z); + var b = a.redSqr(); + var c = this.x.redMul(p.x); + var d = this.y.redMul(p.y); + var e = this.curve.d.redMul(c).redMul(d); + var f = b.redSub(e); + var g = b.redAdd(e); + var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); + var nx = a.redMul(f).redMul(tmp); + var ny; + var nz; + if (this.curve.twisted) { + ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); + nz = f.redMul(g); + } else { + ny = a.redMul(g).redMul(d.redSub(c)); + nz = this.curve._mulC(f).redMul(g); + } + return this.curve.point(nx, ny, nz); + }; + Point.prototype.add = function add(p) { + if (this.isInfinity()) + return p; + if (p.isInfinity()) + return this; + if (this.curve.extended) + return this._extAdd(p); + else + return this._projAdd(p); + }; + Point.prototype.mul = function mul(k) { + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else + return this.curve._wnafMul(this, k); + }; + Point.prototype.mulAdd = function mulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [this, p], [k1, k2], 2, false); + }; + Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [this, p], [k1, k2], 2, true); + }; + Point.prototype.normalize = function normalize() { + if (this.zOne) + return this; + var zi = this.z.redInvm(); + this.x = this.x.redMul(zi); + this.y = this.y.redMul(zi); + if (this.t) + this.t = this.t.redMul(zi); + this.z = this.curve.one; + this.zOne = true; + return this; + }; + Point.prototype.neg = function neg() { + return this.curve.point( + this.x.redNeg(), + this.y, + this.z, + this.t && this.t.redNeg() + ); + }; + Point.prototype.getX = function getX() { + this.normalize(); + return this.x.fromRed(); + }; + Point.prototype.getY = function getY() { + this.normalize(); + return this.y.fromRed(); + }; + Point.prototype.eq = function eq(other) { + return this === other || this.getX().cmp(other.getX()) === 0 && this.getY().cmp(other.getY()) === 0; + }; + Point.prototype.eqXToP = function eqXToP(x) { + var rx = x.toRed(this.curve.red).redMul(this.z); + if (this.x.cmp(rx) === 0) + return true; + var xc = x.clone(); + var t = this.curve.redN.redMul(this.z); + for (; ; ) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + }; + Point.prototype.toP = Point.prototype.normalize; + Point.prototype.mixedAdd = Point.prototype.add; + } +}); + +// node_modules/elliptic/lib/elliptic/curve/index.js +var require_curve3 = __commonJS({ + "node_modules/elliptic/lib/elliptic/curve/index.js"(exports2) { + "use strict"; + init_cjs_shim(); + var curve = exports2; + curve.base = require_base4(); + curve.short = require_short2(); + curve.mont = require_mont2(); + curve.edwards = require_edwards2(); + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js +var require_utils16 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/utils.js"(exports2) { + "use strict"; + init_cjs_shim(); + var assert = require_minimalistic_assert(); + var inherits2 = require_inherits(); + exports2.inherits = inherits2; + function isSurrogatePair(msg, i) { + if ((msg.charCodeAt(i) & 64512) !== 55296) { + return false; + } + if (i < 0 || i + 1 >= msg.length) { + return false; + } + return (msg.charCodeAt(i + 1) & 64512) === 56320; + } + function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === "string") { + if (!enc) { + var p = 0; + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + if (c < 128) { + res[p++] = c; + } else if (c < 2048) { + res[p++] = c >> 6 | 192; + res[p++] = c & 63 | 128; + } else if (isSurrogatePair(msg, i)) { + c = 65536 + ((c & 1023) << 10) + (msg.charCodeAt(++i) & 1023); + res[p++] = c >> 18 | 240; + res[p++] = c >> 12 & 63 | 128; + res[p++] = c >> 6 & 63 | 128; + res[p++] = c & 63 | 128; + } else { + res[p++] = c >> 12 | 224; + res[p++] = c >> 6 & 63 | 128; + res[p++] = c & 63 | 128; + } + } + } else if (enc === "hex") { + msg = msg.replace(/[^a-z0-9]+/ig, ""); + if (msg.length % 2 !== 0) + msg = "0" + msg; + for (i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + } + return res; + } + exports2.toArray = toArray; + function toHex(msg) { + var res = ""; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; + } + exports2.toHex = toHex; + function htonl(w) { + var res = w >>> 24 | w >>> 8 & 65280 | w << 8 & 16711680 | (w & 255) << 24; + return res >>> 0; + } + exports2.htonl = htonl; + function toHex32(msg, endian) { + var res = ""; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === "little") + w = htonl(w); + res += zero8(w.toString(16)); + } + return res; + } + exports2.toHex32 = toHex32; + function zero2(word) { + if (word.length === 1) + return "0" + word; + else + return word; + } + exports2.zero2 = zero2; + function zero8(word) { + if (word.length === 7) + return "0" + word; + else if (word.length === 6) + return "00" + word; + else if (word.length === 5) + return "000" + word; + else if (word.length === 4) + return "0000" + word; + else if (word.length === 3) + return "00000" + word; + else if (word.length === 2) + return "000000" + word; + else if (word.length === 1) + return "0000000" + word; + else + return word; + } + exports2.zero8 = zero8; + function join32(msg, start, end, endian) { + var len = end - start; + assert(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === "big") + w = msg[k] << 24 | msg[k + 1] << 16 | msg[k + 2] << 8 | msg[k + 3]; + else + w = msg[k + 3] << 24 | msg[k + 2] << 16 | msg[k + 1] << 8 | msg[k]; + res[i] = w >>> 0; + } + return res; + } + exports2.join32 = join32; + function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === "big") { + res[k] = m >>> 24; + res[k + 1] = m >>> 16 & 255; + res[k + 2] = m >>> 8 & 255; + res[k + 3] = m & 255; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = m >>> 16 & 255; + res[k + 1] = m >>> 8 & 255; + res[k] = m & 255; + } + } + return res; + } + exports2.split32 = split32; + function rotr32(w, b) { + return w >>> b | w << 32 - b; + } + exports2.rotr32 = rotr32; + function rotl32(w, b) { + return w << b | w >>> 32 - b; + } + exports2.rotl32 = rotl32; + function sum32(a, b) { + return a + b >>> 0; + } + exports2.sum32 = sum32; + function sum32_3(a, b, c) { + return a + b + c >>> 0; + } + exports2.sum32_3 = sum32_3; + function sum32_4(a, b, c, d) { + return a + b + c + d >>> 0; + } + exports2.sum32_4 = sum32_4; + function sum32_5(a, b, c, d, e) { + return a + b + c + d + e >>> 0; + } + exports2.sum32_5 = sum32_5; + function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + var lo = al + bl >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; + } + exports2.sum64 = sum64; + function sum64_hi(ah, al, bh, bl) { + var lo = al + bl >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; + } + exports2.sum64_hi = sum64_hi; + function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; + } + exports2.sum64_lo = sum64_lo; + function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = lo + bl >>> 0; + carry += lo < al ? 1 : 0; + lo = lo + cl >>> 0; + carry += lo < cl ? 1 : 0; + lo = lo + dl >>> 0; + carry += lo < dl ? 1 : 0; + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; + } + exports2.sum64_4_hi = sum64_4_hi; + function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; + } + exports2.sum64_4_lo = sum64_4_lo; + function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = lo + bl >>> 0; + carry += lo < al ? 1 : 0; + lo = lo + cl >>> 0; + carry += lo < cl ? 1 : 0; + lo = lo + dl >>> 0; + carry += lo < dl ? 1 : 0; + lo = lo + el >>> 0; + carry += lo < el ? 1 : 0; + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; + } + exports2.sum64_5_hi = sum64_5_hi; + function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + return lo >>> 0; + } + exports2.sum64_5_lo = sum64_5_lo; + function rotr64_hi(ah, al, num) { + var r = al << 32 - num | ah >>> num; + return r >>> 0; + } + exports2.rotr64_hi = rotr64_hi; + function rotr64_lo(ah, al, num) { + var r = ah << 32 - num | al >>> num; + return r >>> 0; + } + exports2.rotr64_lo = rotr64_lo; + function shr64_hi(ah, al, num) { + return ah >>> num; + } + exports2.shr64_hi = shr64_hi; + function shr64_lo(ah, al, num) { + var r = ah << 32 - num | al >>> num; + return r >>> 0; + } + exports2.shr64_lo = shr64_lo; + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/common.js +var require_common5 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/common.js"(exports2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var assert = require_minimalistic_assert(); + function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = "big"; + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; + } + exports2.BlockHash = BlockHash; + BlockHash.prototype.update = function update(msg, enc) { + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + if (this.pending.length >= this._delta8) { + msg = this.pending; + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + return this; + }; + BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + assert(this.pending === null); + return this._digest(enc); + }; + BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - (len + this.padLength) % bytes; + var res = new Array(k + this.padLength); + res[0] = 128; + for (var i = 1; i < k; i++) + res[i] = 0; + len <<= 3; + if (this.endian === "big") { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = len >>> 24 & 255; + res[i++] = len >>> 16 & 255; + res[i++] = len >>> 8 & 255; + res[i++] = len & 255; + } else { + res[i++] = len & 255; + res[i++] = len >>> 8 & 255; + res[i++] = len >>> 16 & 255; + res[i++] = len >>> 24 & 255; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + return res; + }; + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/sha/common.js +var require_common6 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/sha/common.js"(exports2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var rotr32 = utils.rotr32; + function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); + } + exports2.ft_1 = ft_1; + function ch32(x, y, z) { + return x & y ^ ~x & z; + } + exports2.ch32 = ch32; + function maj32(x, y, z) { + return x & y ^ x & z ^ y & z; + } + exports2.maj32 = maj32; + function p32(x, y, z) { + return x ^ y ^ z; + } + exports2.p32 = p32; + function s0_256(x) { + return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); + } + exports2.s0_256 = s0_256; + function s1_256(x) { + return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); + } + exports2.s1_256 = s1_256; + function g0_256(x) { + return rotr32(x, 7) ^ rotr32(x, 18) ^ x >>> 3; + } + exports2.g0_256 = g0_256; + function g1_256(x) { + return rotr32(x, 17) ^ rotr32(x, 19) ^ x >>> 10; + } + exports2.g1_256 = g1_256; + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/sha/1.js +var require__11 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/sha/1.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var common = require_common5(); + var shaCommon = require_common6(); + var rotl32 = utils.rotl32; + var sum32 = utils.sum32; + var sum32_5 = utils.sum32_5; + var ft_1 = shaCommon.ft_1; + var BlockHash = common.BlockHash; + var sha1_K = [ + 1518500249, + 1859775393, + 2400959708, + 3395469782 + ]; + function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + BlockHash.call(this); + this.h = [ + 1732584193, + 4023233417, + 2562383102, + 271733878, + 3285377520 + ]; + this.W = new Array(80); + } + utils.inherits(SHA1, BlockHash); + module2.exports = SHA1; + SHA1.blockSize = 512; + SHA1.outSize = 160; + SHA1.hmacStrength = 80; + SHA1.padLength = 64; + SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32(b, 30); + b = a; + a = t; + } + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + }; + SHA1.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); + }; + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/sha/256.js +var require__12 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/sha/256.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var common = require_common5(); + var shaCommon = require_common6(); + var assert = require_minimalistic_assert(); + var sum32 = utils.sum32; + var sum32_4 = utils.sum32_4; + var sum32_5 = utils.sum32_5; + var ch32 = shaCommon.ch32; + var maj32 = shaCommon.maj32; + var s0_256 = shaCommon.s0_256; + var s1_256 = shaCommon.s1_256; + var g0_256 = shaCommon.g0_256; + var g1_256 = shaCommon.g1_256; + var BlockHash = common.BlockHash; + var sha256_K = [ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]; + function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + BlockHash.call(this); + this.h = [ + 1779033703, + 3144134277, + 1013904242, + 2773480762, + 1359893119, + 2600822924, + 528734635, + 1541459225 + ]; + this.k = sha256_K; + this.W = new Array(64); + } + utils.inherits(SHA256, BlockHash); + module2.exports = SHA256; + SHA256.blockSize = 512; + SHA256.outSize = 256; + SHA256.hmacStrength = 192; + SHA256.padLength = 64; + SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + assert(this.k.length === W.length); + for (i = 0; i < W.length; i++) { + var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); + var T2 = sum32(s0_256(a), maj32(a, b, c)); + h = g; + g = f; + f = e; + e = sum32(d, T1); + d = c; + c = b; + b = a; + a = sum32(T1, T2); + } + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + this.h[5] = sum32(this.h[5], f); + this.h[6] = sum32(this.h[6], g); + this.h[7] = sum32(this.h[7], h); + }; + SHA256.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); + }; + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/sha/224.js +var require__13 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/sha/224.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var SHA256 = require__12(); + function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + SHA256.call(this); + this.h = [ + 3238371032, + 914150663, + 812702999, + 4144912697, + 4290775857, + 1750603025, + 1694076839, + 3204075428 + ]; + } + utils.inherits(SHA224, SHA256); + module2.exports = SHA224; + SHA224.blockSize = 512; + SHA224.outSize = 224; + SHA224.hmacStrength = 192; + SHA224.padLength = 64; + SHA224.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h.slice(0, 7), "big"); + else + return utils.split32(this.h.slice(0, 7), "big"); + }; + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/sha/512.js +var require__14 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/sha/512.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var common = require_common5(); + var assert = require_minimalistic_assert(); + var rotr64_hi = utils.rotr64_hi; + var rotr64_lo = utils.rotr64_lo; + var shr64_hi = utils.shr64_hi; + var shr64_lo = utils.shr64_lo; + var sum64 = utils.sum64; + var sum64_hi = utils.sum64_hi; + var sum64_lo = utils.sum64_lo; + var sum64_4_hi = utils.sum64_4_hi; + var sum64_4_lo = utils.sum64_4_lo; + var sum64_5_hi = utils.sum64_5_hi; + var sum64_5_lo = utils.sum64_5_lo; + var BlockHash = common.BlockHash; + var sha512_K = [ + 1116352408, + 3609767458, + 1899447441, + 602891725, + 3049323471, + 3964484399, + 3921009573, + 2173295548, + 961987163, + 4081628472, + 1508970993, + 3053834265, + 2453635748, + 2937671579, + 2870763221, + 3664609560, + 3624381080, + 2734883394, + 310598401, + 1164996542, + 607225278, + 1323610764, + 1426881987, + 3590304994, + 1925078388, + 4068182383, + 2162078206, + 991336113, + 2614888103, + 633803317, + 3248222580, + 3479774868, + 3835390401, + 2666613458, + 4022224774, + 944711139, + 264347078, + 2341262773, + 604807628, + 2007800933, + 770255983, + 1495990901, + 1249150122, + 1856431235, + 1555081692, + 3175218132, + 1996064986, + 2198950837, + 2554220882, + 3999719339, + 2821834349, + 766784016, + 2952996808, + 2566594879, + 3210313671, + 3203337956, + 3336571891, + 1034457026, + 3584528711, + 2466948901, + 113926993, + 3758326383, + 338241895, + 168717936, + 666307205, + 1188179964, + 773529912, + 1546045734, + 1294757372, + 1522805485, + 1396182291, + 2643833823, + 1695183700, + 2343527390, + 1986661051, + 1014477480, + 2177026350, + 1206759142, + 2456956037, + 344077627, + 2730485921, + 1290863460, + 2820302411, + 3158454273, + 3259730800, + 3505952657, + 3345764771, + 106217008, + 3516065817, + 3606008344, + 3600352804, + 1432725776, + 4094571909, + 1467031594, + 275423344, + 851169720, + 430227734, + 3100823752, + 506948616, + 1363258195, + 659060556, + 3750685593, + 883997877, + 3785050280, + 958139571, + 3318307427, + 1322822218, + 3812723403, + 1537002063, + 2003034995, + 1747873779, + 3602036899, + 1955562222, + 1575990012, + 2024104815, + 1125592928, + 2227730452, + 2716904306, + 2361852424, + 442776044, + 2428436474, + 593698344, + 2756734187, + 3733110249, + 3204031479, + 2999351573, + 3329325298, + 3815920427, + 3391569614, + 3928383900, + 3515267271, + 566280711, + 3940187606, + 3454069534, + 4118630271, + 4000239992, + 116418474, + 1914138554, + 174292421, + 2731055270, + 289380356, + 3203993006, + 460393269, + 320620315, + 685471733, + 587496836, + 852142971, + 1086792851, + 1017036298, + 365543100, + 1126000580, + 2618297676, + 1288033470, + 3409855158, + 1501505948, + 4234509866, + 1607167915, + 987167468, + 1816402316, + 1246189591 + ]; + function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + BlockHash.call(this); + this.h = [ + 1779033703, + 4089235720, + 3144134277, + 2227873595, + 1013904242, + 4271175723, + 2773480762, + 1595750129, + 1359893119, + 2917565137, + 2600822924, + 725511199, + 528734635, + 4215389547, + 1541459225, + 327033209 + ]; + this.k = sha512_K; + this.W = new Array(160); + } + utils.inherits(SHA512, BlockHash); + module2.exports = SHA512; + SHA512.blockSize = 1024; + SHA512.outSize = 512; + SHA512.hmacStrength = 192; + SHA512.padLength = 128; + SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; + var c3_lo = W[i - 31]; + W[i] = sum64_4_hi( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo + ); + W[i + 1] = sum64_4_lo( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo + ); + } + }; + SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + var W = this.W; + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + assert(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + var T1_hi = sum64_5_hi( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo, + c4_hi, + c4_lo + ); + var T1_lo = sum64_5_lo( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo, + c4_hi, + c4_lo + ); + c0_hi = s0_512_hi(ah, al); + c0_lo = s0_512_lo(ah, al); + c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + eh = sum64_hi(dh, dl, T1_hi, T1_lo); + el = sum64_lo(dl, dl, T1_hi, T1_lo); + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); + } + sum64(this.h, 0, ah, al); + sum64(this.h, 2, bh, bl); + sum64(this.h, 4, ch, cl); + sum64(this.h, 6, dh, dl); + sum64(this.h, 8, eh, el); + sum64(this.h, 10, fh, fl); + sum64(this.h, 12, gh, gl); + sum64(this.h, 14, hh, hl); + }; + SHA512.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); + }; + function ch64_hi(xh, xl, yh, yl, zh) { + var r = xh & yh ^ ~xh & zh; + if (r < 0) + r += 4294967296; + return r; + } + function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = xl & yl ^ ~xl & zl; + if (r < 0) + r += 4294967296; + return r; + } + function maj64_hi(xh, xl, yh, yl, zh) { + var r = xh & yh ^ xh & zh ^ yh & zh; + if (r < 0) + r += 4294967296; + return r; + } + function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = xl & yl ^ xl & zl ^ yl & zl; + if (r < 0) + r += 4294967296; + return r; + } + function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 28); + var c1_hi = rotr64_hi(xl, xh, 2); + var c2_hi = rotr64_hi(xl, xh, 7); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 28); + var c1_lo = rotr64_lo(xl, xh, 2); + var c2_lo = rotr64_lo(xl, xh, 7); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 14); + var c1_hi = rotr64_hi(xh, xl, 18); + var c2_hi = rotr64_hi(xl, xh, 9); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 14); + var c1_lo = rotr64_lo(xh, xl, 18); + var c2_lo = rotr64_lo(xl, xh, 9); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 1); + var c1_hi = rotr64_hi(xh, xl, 8); + var c2_hi = shr64_hi(xh, xl, 7); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 1); + var c1_lo = rotr64_lo(xh, xl, 8); + var c2_lo = shr64_lo(xh, xl, 7); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 19); + var c1_hi = rotr64_hi(xl, xh, 29); + var c2_hi = shr64_hi(xh, xl, 6); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 19); + var c1_lo = rotr64_lo(xl, xh, 29); + var c2_lo = shr64_lo(xh, xl, 6); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/sha/384.js +var require__15 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/sha/384.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var BN = require_bn6(); - var inherits2 = require_inherits(); - var Base = require_base4(); - var utils = require_utils14(); - function MontCurve(conf) { - Base.call(this, "mont", conf); - this.a = new BN(conf.a, 16).toRed(this.red); - this.b = new BN(conf.b, 16).toRed(this.red); - this.i4 = new BN(4).toRed(this.red).redInvm(); - this.two = new BN(2).toRed(this.red); - this.a24 = this.i4.redMul(this.a.redAdd(this.two)); - } - inherits2(MontCurve, Base); - module2.exports = MontCurve; - MontCurve.prototype.validate = function validate2(point) { - var x = point.normalize().x; - var x2 = x.redSqr(); - var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); - var y = rhs.redSqrt(); - return y.redSqr().cmp(rhs) === 0; - }; - function Point(curve, x, z) { - Base.BasePoint.call(this, curve, "projective"); - if (x === null && z === null) { - this.x = this.curve.one; - this.z = this.curve.zero; - } else { - this.x = new BN(x, 16); - this.z = new BN(z, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - } + var utils = require_utils16(); + var SHA512 = require__14(); + function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + SHA512.call(this); + this.h = [ + 3418070365, + 3238371032, + 1654270250, + 914150663, + 2438529370, + 812702999, + 355462360, + 4144912697, + 1731405415, + 4290775857, + 2394180231, + 1750603025, + 3675008525, + 1694076839, + 1203062813, + 3204075428 + ]; } - inherits2(Point, Base.BasePoint); - MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { - return this.point(utils.toArray(bytes, enc), 1); - }; - MontCurve.prototype.point = function point(x, z) { - return new Point(this, x, z); - }; - MontCurve.prototype.pointFromJSON = function pointFromJSON(obj2) { - return Point.fromJSON(this, obj2); - }; - Point.prototype.precompute = function precompute() { - }; - Point.prototype._encode = function _encode() { - return this.getX().toArray("be", this.curve.p.byteLength()); - }; - Point.fromJSON = function fromJSON(curve, obj2) { - return new Point(curve, obj2[0], obj2[1] || curve.one); - }; - Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ""; - return ""; - }; - Point.prototype.isInfinity = function isInfinity() { - return this.z.cmpn(0) === 0; - }; - Point.prototype.dbl = function dbl() { - var a = this.x.redAdd(this.z); - var aa = a.redSqr(); - var b = this.x.redSub(this.z); - var bb = b.redSqr(); - var c = aa.redSub(bb); - var nx = aa.redMul(bb); - var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); - return this.curve.point(nx, nz); - }; - Point.prototype.add = function add() { - throw new Error("Not supported on Montgomery curve"); - }; - Point.prototype.diffAdd = function diffAdd(p, diff) { - var a = this.x.redAdd(this.z); - var b = this.x.redSub(this.z); - var c = p.x.redAdd(p.z); - var d = p.x.redSub(p.z); - var da = d.redMul(a); - var cb = c.redMul(b); - var nx = diff.z.redMul(da.redAdd(cb).redSqr()); - var nz = diff.x.redMul(da.redISub(cb).redSqr()); - return this.curve.point(nx, nz); - }; - Point.prototype.mul = function mul(k) { - var t = k.clone(); - var a = this; - var b = this.curve.point(null, null); - var c = this; - for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) - bits.push(t.andln(1)); - for (var i = bits.length - 1; i >= 0; i--) { - if (bits[i] === 0) { - a = a.diffAdd(b, c); - b = b.dbl(); - } else { - b = a.diffAdd(b, c); - a = a.dbl(); - } - } - return b; - }; - Point.prototype.mulAdd = function mulAdd() { - throw new Error("Not supported on Montgomery curve"); - }; - Point.prototype.jumlAdd = function jumlAdd() { - throw new Error("Not supported on Montgomery curve"); - }; - Point.prototype.eq = function eq(other) { - return this.getX().cmp(other.getX()) === 0; - }; - Point.prototype.normalize = function normalize() { - this.x = this.x.redMul(this.z.redInvm()); - this.z = this.curve.one; - return this; - }; - Point.prototype.getX = function getX() { - this.normalize(); - return this.x.fromRed(); + utils.inherits(SHA384, SHA512); + module2.exports = SHA384; + SHA384.blockSize = 1024; + SHA384.outSize = 384; + SHA384.hmacStrength = 192; + SHA384.padLength = 128; + SHA384.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h.slice(0, 12), "big"); + else + return utils.split32(this.h.slice(0, 12), "big"); }; } }); -// node_modules/elliptic/lib/elliptic/curve/edwards.js -var require_edwards2 = __commonJS({ - "node_modules/elliptic/lib/elliptic/curve/edwards.js"(exports2, module2) { +// node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js +var require_sha4 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/sha.js"(exports2) { "use strict"; init_cjs_shim(); - var utils = require_utils14(); - var BN = require_bn6(); - var inherits2 = require_inherits(); - var Base = require_base4(); - var assert = utils.assert; - function EdwardsCurve(conf) { - this.twisted = (conf.a | 0) !== 1; - this.mOneA = this.twisted && (conf.a | 0) === -1; - this.extended = this.mOneA; - Base.call(this, "edwards", conf); - this.a = new BN(conf.a, 16).umod(this.red.m); - this.a = this.a.toRed(this.red); - this.c = new BN(conf.c, 16).toRed(this.red); - this.c2 = this.c.redSqr(); - this.d = new BN(conf.d, 16).toRed(this.red); - this.dd = this.d.redAdd(this.d); - assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); - this.oneC = (conf.c | 0) === 1; - } - inherits2(EdwardsCurve, Base); - module2.exports = EdwardsCurve; - EdwardsCurve.prototype._mulA = function _mulA(num) { - if (this.mOneA) - return num.redNeg(); - else - return this.a.redMul(num); - }; - EdwardsCurve.prototype._mulC = function _mulC(num) { - if (this.oneC) - return num; - else - return this.c.redMul(num); - }; - EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { - return this.point(x, y, z, t); - }; - EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { - x = new BN(x, 16); - if (!x.red) - x = x.toRed(this.red); - var x2 = x.redSqr(); - var rhs = this.c2.redSub(this.a.redMul(x2)); - var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); - var y2 = rhs.redMul(lhs.redInvm()); - var y = y2.redSqrt(); - if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) - throw new Error("invalid point"); - var isOdd = y.fromRed().isOdd(); - if (odd && !isOdd || !odd && isOdd) - y = y.redNeg(); - return this.point(x, y); - }; - EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { - y = new BN(y, 16); - if (!y.red) - y = y.toRed(this.red); - var y2 = y.redSqr(); - var lhs = y2.redSub(this.c2); - var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a); - var x2 = lhs.redMul(rhs.redInvm()); - if (x2.cmp(this.zero) === 0) { - if (odd) - throw new Error("invalid point"); - else - return this.point(this.zero, y); - } - var x = x2.redSqrt(); - if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) - throw new Error("invalid point"); - if (x.fromRed().isOdd() !== odd) - x = x.redNeg(); - return this.point(x, y); - }; - EdwardsCurve.prototype.validate = function validate2(point) { - if (point.isInfinity()) - return true; - point.normalize(); - var x2 = point.x.redSqr(); - var y2 = point.y.redSqr(); - var lhs = x2.redMul(this.a).redAdd(y2); - var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); - return lhs.cmp(rhs) === 0; - }; - function Point(curve, x, y, z, t) { - Base.BasePoint.call(this, curve, "projective"); - if (x === null && y === null && z === null) { - this.x = this.curve.zero; - this.y = this.curve.one; - this.z = this.curve.one; - this.t = this.curve.zero; - this.zOne = true; - } else { - this.x = new BN(x, 16); - this.y = new BN(y, 16); - this.z = z ? new BN(z, 16) : this.curve.one; - this.t = t && new BN(t, 16); - if (!this.x.red) - this.x = this.x.toRed(this.curve.red); - if (!this.y.red) - this.y = this.y.toRed(this.curve.red); - if (!this.z.red) - this.z = this.z.toRed(this.curve.red); - if (this.t && !this.t.red) - this.t = this.t.toRed(this.curve.red); - this.zOne = this.z === this.curve.one; - if (this.curve.extended && !this.t) { - this.t = this.x.redMul(this.y); - if (!this.zOne) - this.t = this.t.redMul(this.z.redInvm()); - } - } + exports2.sha1 = require__11(); + exports2.sha224 = require__13(); + exports2.sha256 = require__12(); + exports2.sha384 = require__15(); + exports2.sha512 = require__14(); + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js +var require_ripemd3 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/ripemd.js"(exports2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var common = require_common5(); + var rotl32 = utils.rotl32; + var sum32 = utils.sum32; + var sum32_3 = utils.sum32_3; + var sum32_4 = utils.sum32_4; + var BlockHash = common.BlockHash; + function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + BlockHash.call(this); + this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + this.endian = "little"; } - inherits2(Point, Base.BasePoint); - EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj2) { - return Point.fromJSON(this, obj2); - }; - EdwardsCurve.prototype.point = function point(x, y, z, t) { - return new Point(this, x, y, z, t); - }; - Point.fromJSON = function fromJSON(curve, obj2) { - return new Point(curve, obj2[0], obj2[1], obj2[2]); - }; - Point.prototype.inspect = function inspect() { - if (this.isInfinity()) - return ""; - return ""; - }; - Point.prototype.isInfinity = function isInfinity() { - return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0); - }; - Point.prototype._extDbl = function _extDbl() { - var a = this.x.redSqr(); - var b = this.y.redSqr(); - var c = this.z.redSqr(); - c = c.redIAdd(c); - var d = this.curve._mulA(a); - var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); - var g = d.redAdd(b); - var f = g.redSub(c); - var h = d.redSub(b); - var nx = e.redMul(f); - var ny = g.redMul(h); - var nt = e.redMul(h); - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); - }; - Point.prototype._projDbl = function _projDbl() { - var b = this.x.redAdd(this.y).redSqr(); - var c = this.x.redSqr(); - var d = this.y.redSqr(); - var nx; - var ny; - var nz; - var e; - var h; - var j; - if (this.curve.twisted) { - e = this.curve._mulA(c); - var f = e.redAdd(d); - if (this.zOne) { - nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); - ny = f.redMul(e.redSub(d)); - nz = f.redSqr().redSub(f).redSub(f); - } else { - h = this.z.redSqr(); - j = f.redSub(h).redISub(h); - nx = b.redSub(c).redISub(d).redMul(j); - ny = f.redMul(e.redSub(d)); - nz = f.redMul(j); - } - } else { - e = c.redAdd(d); - h = this.curve._mulC(this.z).redSqr(); - j = e.redSub(h).redSub(h); - nx = this.curve._mulC(b.redISub(e)).redMul(j); - ny = this.curve._mulC(e).redMul(c.redISub(d)); - nz = e.redMul(j); + utils.inherits(RIPEMD160, BlockHash); + exports2.ripemd160 = RIPEMD160; + RIPEMD160.blockSize = 512; + RIPEMD160.outSize = 160; + RIPEMD160.hmacStrength = 192; + RIPEMD160.padLength = 64; + RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32( + rotl32( + sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j] + ), + E + ); + A = E; + E = D; + D = rotl32(C, 10); + C = B; + B = T; + T = sum32( + rotl32( + sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j] + ), + Eh + ); + Ah = Eh; + Eh = Dh; + Dh = rotl32(Ch, 10); + Ch = Bh; + Bh = T; } - return this.curve.point(nx, ny, nz); + T = sum32_3(this.h[1], C, Dh); + this.h[1] = sum32_3(this.h[2], D, Eh); + this.h[2] = sum32_3(this.h[3], E, Ah); + this.h[3] = sum32_3(this.h[4], A, Bh); + this.h[4] = sum32_3(this.h[0], B, Ch); + this.h[0] = T; }; - Point.prototype.dbl = function dbl() { - if (this.isInfinity()) - return this; - if (this.curve.extended) - return this._extDbl(); + RIPEMD160.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "little"); else - return this._projDbl(); - }; - Point.prototype._extAdd = function _extAdd(p) { - var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); - var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); - var c = this.t.redMul(this.curve.dd).redMul(p.t); - var d = this.z.redMul(p.z.redAdd(p.z)); - var e = b.redSub(a); - var f = d.redSub(c); - var g = d.redAdd(c); - var h = b.redAdd(a); - var nx = e.redMul(f); - var ny = g.redMul(h); - var nt = e.redMul(h); - var nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); - }; - Point.prototype._projAdd = function _projAdd(p) { - var a = this.z.redMul(p.z); - var b = a.redSqr(); - var c = this.x.redMul(p.x); - var d = this.y.redMul(p.y); - var e = this.curve.d.redMul(c).redMul(d); - var f = b.redSub(e); - var g = b.redAdd(e); - var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); - var nx = a.redMul(f).redMul(tmp); - var ny; - var nz; - if (this.curve.twisted) { - ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); - nz = f.redMul(g); - } else { - ny = a.redMul(g).redMul(d.redSub(c)); - nz = this.curve._mulC(f).redMul(g); - } - return this.curve.point(nx, ny, nz); + return utils.split32(this.h, "little"); }; - Point.prototype.add = function add(p) { - if (this.isInfinity()) - return p; - if (p.isInfinity()) - return this; - if (this.curve.extended) - return this._extAdd(p); + function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return x & y | ~x & z; + else if (j <= 47) + return (x | ~y) ^ z; + else if (j <= 63) + return x & z | y & ~z; else - return this._projAdd(p); - }; - Point.prototype.mul = function mul(k) { - if (this._hasDoubles(k)) - return this.curve._fixedNafMul(this, k); + return x ^ (y | ~z); + } + function K(j) { + if (j <= 15) + return 0; + else if (j <= 31) + return 1518500249; + else if (j <= 47) + return 1859775393; + else if (j <= 63) + return 2400959708; else - return this.curve._wnafMul(this, k); - }; - Point.prototype.mulAdd = function mulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [this, p], [k1, k2], 2, false); - }; - Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [this, p], [k1, k2], 2, true); + return 2840853838; + } + function Kh(j) { + if (j <= 15) + return 1352829926; + else if (j <= 31) + return 1548603684; + else if (j <= 47) + return 1836072691; + else if (j <= 63) + return 2053994217; + else + return 0; + } + var r = [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 7, + 4, + 13, + 1, + 10, + 6, + 15, + 3, + 12, + 0, + 9, + 5, + 2, + 14, + 11, + 8, + 3, + 10, + 14, + 4, + 9, + 15, + 8, + 1, + 2, + 7, + 0, + 6, + 13, + 11, + 5, + 12, + 1, + 9, + 11, + 10, + 0, + 8, + 12, + 4, + 13, + 3, + 7, + 15, + 14, + 5, + 6, + 2, + 4, + 0, + 5, + 9, + 7, + 12, + 2, + 10, + 14, + 1, + 3, + 8, + 11, + 6, + 15, + 13 + ]; + var rh = [ + 5, + 14, + 7, + 0, + 9, + 2, + 11, + 4, + 13, + 6, + 15, + 8, + 1, + 10, + 3, + 12, + 6, + 11, + 3, + 7, + 0, + 13, + 5, + 10, + 14, + 15, + 8, + 12, + 4, + 9, + 1, + 2, + 15, + 5, + 1, + 3, + 7, + 14, + 6, + 9, + 11, + 8, + 12, + 2, + 10, + 0, + 4, + 13, + 8, + 6, + 4, + 1, + 3, + 11, + 15, + 0, + 5, + 12, + 2, + 13, + 9, + 7, + 10, + 14, + 12, + 15, + 10, + 4, + 1, + 5, + 8, + 7, + 6, + 2, + 13, + 14, + 0, + 3, + 9, + 11 + ]; + var s = [ + 11, + 14, + 15, + 12, + 5, + 8, + 7, + 9, + 11, + 13, + 14, + 15, + 6, + 7, + 9, + 8, + 7, + 6, + 8, + 13, + 11, + 9, + 7, + 15, + 7, + 12, + 15, + 9, + 11, + 7, + 13, + 12, + 11, + 13, + 6, + 7, + 14, + 9, + 13, + 15, + 14, + 8, + 13, + 6, + 5, + 12, + 7, + 5, + 11, + 12, + 14, + 15, + 14, + 15, + 9, + 8, + 9, + 14, + 5, + 6, + 8, + 6, + 5, + 12, + 9, + 15, + 5, + 11, + 6, + 8, + 13, + 12, + 5, + 12, + 13, + 14, + 11, + 8, + 5, + 6 + ]; + var sh = [ + 8, + 9, + 9, + 11, + 13, + 15, + 15, + 5, + 7, + 7, + 8, + 11, + 14, + 14, + 12, + 6, + 9, + 13, + 15, + 7, + 12, + 8, + 9, + 11, + 7, + 7, + 12, + 7, + 6, + 15, + 13, + 11, + 9, + 7, + 15, + 11, + 8, + 6, + 6, + 14, + 12, + 13, + 5, + 14, + 13, + 13, + 7, + 5, + 15, + 5, + 8, + 11, + 14, + 14, + 6, + 14, + 6, + 9, + 12, + 9, + 12, + 5, + 15, + 8, + 8, + 5, + 12, + 9, + 12, + 5, + 14, + 6, + 8, + 13, + 6, + 5, + 15, + 13, + 11, + 11 + ]; + } +}); + +// node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js +var require_hmac4 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash/hmac.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var utils = require_utils16(); + var assert = require_minimalistic_assert(); + function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + this._init(utils.toArray(key, enc)); + } + module2.exports = Hmac; + Hmac.prototype._init = function init(key) { + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + assert(key.length <= this.blockSize); + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + for (i = 0; i < key.length; i++) + key[i] ^= 54; + this.inner = new this.Hash().update(key); + for (i = 0; i < key.length; i++) + key[i] ^= 106; + this.outer = new this.Hash().update(key); }; - Point.prototype.normalize = function normalize() { - if (this.zOne) - return this; - var zi = this.z.redInvm(); - this.x = this.x.redMul(zi); - this.y = this.y.redMul(zi); - if (this.t) - this.t = this.t.redMul(zi); - this.z = this.curve.one; - this.zOne = true; + Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); return this; }; - Point.prototype.neg = function neg() { - return this.curve.point( - this.x.redNeg(), - this.y, - this.z, - this.t && this.t.redNeg() - ); - }; - Point.prototype.getX = function getX() { - this.normalize(); - return this.x.fromRed(); - }; - Point.prototype.getY = function getY() { - this.normalize(); - return this.y.fromRed(); - }; - Point.prototype.eq = function eq(other) { - return this === other || this.getX().cmp(other.getX()) === 0 && this.getY().cmp(other.getY()) === 0; - }; - Point.prototype.eqXToP = function eqXToP(x) { - var rx = x.toRed(this.curve.red).redMul(this.z); - if (this.x.cmp(rx) === 0) - return true; - var xc = x.clone(); - var t = this.curve.redN.redMul(this.z); - for (; ; ) { - xc.iadd(this.curve.n); - if (xc.cmp(this.curve.p) >= 0) - return false; - rx.redIAdd(t); - if (this.x.cmp(rx) === 0) - return true; - } + Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); }; - Point.prototype.toP = Point.prototype.normalize; - Point.prototype.mixedAdd = Point.prototype.add; } }); -// node_modules/elliptic/lib/elliptic/curve/index.js -var require_curve3 = __commonJS({ - "node_modules/elliptic/lib/elliptic/curve/index.js"(exports2) { - "use strict"; +// node_modules/elliptic/node_modules/hash.js/lib/hash.js +var require_hash3 = __commonJS({ + "node_modules/elliptic/node_modules/hash.js/lib/hash.js"(exports2) { init_cjs_shim(); - var curve = exports2; - curve.base = require_base4(); - curve.short = require_short2(); - curve.mont = require_mont2(); - curve.edwards = require_edwards2(); + var hash = exports2; + hash.utils = require_utils16(); + hash.common = require_common5(); + hash.sha = require_sha4(); + hash.ripemd = require_ripemd3(); + hash.hmac = require_hmac4(); + hash.sha1 = hash.sha.sha1; + hash.sha256 = hash.sha.sha256; + hash.sha224 = hash.sha.sha224; + hash.sha384 = hash.sha.sha384; + hash.sha512 = hash.sha.sha512; + hash.ripemd160 = hash.ripemd.ripemd160; } }); @@ -68807,9 +73007,9 @@ var require_curves2 = __commonJS({ "use strict"; init_cjs_shim(); var curves = exports2; - var hash = require_hash(); + var hash = require_hash3(); var curve = require_curve3(); - var utils = require_utils14(); + var utils = require_utils15(); var assert = utils.assert; function PresetCurve(options) { if (options.type === "short") @@ -68984,7 +73184,7 @@ var require_key3 = __commonJS({ "use strict"; init_cjs_shim(); var BN = require_bn6(); - var utils = require_utils14(); + var utils = require_utils15(); var assert = utils.assert; function KeyPair(ec, options) { this.ec = ec; @@ -69079,7 +73279,7 @@ var require_signature4 = __commonJS({ "use strict"; init_cjs_shim(); var BN = require_bn6(); - var utils = require_utils14(); + var utils = require_utils15(); var assert = utils.assert; function Signature(options, enc) { if (options instanceof Signature) @@ -69107,9 +73307,6 @@ var require_signature4 = __commonJS({ if (octetLen === 0 || octetLen > 4) { return false; } - if (buf[p.place] === 0) { - return false; - } var val = 0; for (var i = 0, off = p.place; i < octetLen; i++, off++) { val <<= 8; @@ -69153,9 +73350,6 @@ var require_signature4 = __commonJS({ if (rlen === false) { return false; } - if ((data[p.place] & 128) !== 0) { - return false; - } var r = data.slice(p.place, rlen + p.place); p.place += rlen; if (data[p.place++] !== 2) { @@ -69168,9 +73362,6 @@ var require_signature4 = __commonJS({ if (data.length !== slen + p.place) { return false; } - if ((data[p.place] & 128) !== 0) { - return false; - } var s = data.slice(p.place, slen + p.place); if (r[0] === 0) { if (r[1] & 128) { @@ -69236,7 +73427,7 @@ var require_ec2 = __commonJS({ init_cjs_shim(); var BN = require_bn6(); var HmacDRBG = require_hmac_drbg(); - var utils = require_utils14(); + var utils = require_utils15(); var curves = require_curves2(); var rand = require_brorand(); var assert = utils.assert; @@ -69415,7 +73606,7 @@ var require_key4 = __commonJS({ "node_modules/elliptic/lib/elliptic/eddsa/key.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var utils = require_utils14(); + var utils = require_utils15(); var assert = utils.assert; var parseBytes = utils.parseBytes; var cachedProperty = utils.cachedProperty; @@ -69491,7 +73682,7 @@ var require_signature5 = __commonJS({ "use strict"; init_cjs_shim(); var BN = require_bn6(); - var utils = require_utils14(); + var utils = require_utils15(); var assert = utils.assert; var cachedProperty = utils.cachedProperty; var parseBytes = utils.parseBytes; @@ -69500,7 +73691,6 @@ var require_signature5 = __commonJS({ if (typeof sig !== "object") sig = parseBytes(sig); if (Array.isArray(sig)) { - assert(sig.length === eddsa.encodingLength * 2, "Signature has invalid size"); sig = { R: sig.slice(0, eddsa.encodingLength), S: sig.slice(eddsa.encodingLength) @@ -69541,9 +73731,9 @@ var require_eddsa2 = __commonJS({ "node_modules/elliptic/lib/elliptic/eddsa/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var hash = require_hash(); + var hash = require_hash3(); var curves = require_curves2(); - var utils = require_utils14(); + var utils = require_utils15(); var assert = utils.assert; var parseBytes = utils.parseBytes; var KeyPair = require_key4(); @@ -69574,9 +73764,6 @@ var require_eddsa2 = __commonJS({ EDDSA.prototype.verify = function verify(message, sig, pub) { message = parseBytes(message); sig = this.makeSignature(sig); - if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) { - return false; - } var key = this.keyFromPublic(pub); var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); var SG = this.g.mul(sig.S()); @@ -69632,7 +73819,7 @@ var require_elliptic3 = __commonJS({ init_cjs_shim(); var elliptic = exports2; elliptic.version = require_package4().version; - elliptic.utils = require_utils14(); + elliptic.utils = require_utils15(); elliptic.rand = require_brorand(); elliptic.curve = require_curve3(); elliptic.curves = require_curves2(); @@ -69645,44 +73832,51 @@ var require_elliptic3 = __commonJS({ var require_rlp = __commonJS({ "node_modules/eth-lib/lib/rlp.js"(exports2, module2) { init_cjs_shim(); - var encode = (tree) => { - const padEven = (str) => str.length % 2 === 0 ? str : "0" + str; - const uint = (num) => padEven(num.toString(16)); - const length = (len, add) => len < 56 ? uint(add + len) : uint(add + uint(len).length / 2 + 55) + uint(len); - const dataTree = (tree2) => { + var encode = function encode2(tree) { + var padEven = function padEven2(str) { + return str.length % 2 === 0 ? str : "0" + str; + }; + var uint = function uint2(num) { + return padEven(num.toString(16)); + }; + var length = function length2(len, add) { + return len < 56 ? uint(add + len) : uint(add + uint(len).length / 2 + 55) + uint(len); + }; + var dataTree = function dataTree2(tree2) { if (typeof tree2 === "string") { - const hex = tree2.slice(2); - const pre = hex.length != 2 || hex >= "80" ? length(hex.length / 2, 128) : ""; + var hex = tree2.slice(2); + var pre = hex.length != 2 || hex >= "80" ? length(hex.length / 2, 128) : ""; return pre + hex; } else { - const hex = tree2.map(dataTree).join(""); - const pre = length(hex.length / 2, 192); - return pre + hex; + var _hex = tree2.map(dataTree2).join(""); + var _pre = length(_hex.length / 2, 192); + return _pre + _hex; } }; return "0x" + dataTree(tree); }; - var decode = (hex) => { - let i = 2; - const parseTree = () => { + var decode = function decode2(hex) { + var i = 2; + var parseTree = function parseTree2() { if (i >= hex.length) throw ""; - const head = hex.slice(i, i + 2); + var head = hex.slice(i, i + 2); return head < "80" ? (i += 2, "0x" + head) : head < "c0" ? parseHex() : parseList(); }; - const parseLength = () => { - const len = parseInt(hex.slice(i, i += 2), 16) % 64; + var parseLength = function parseLength2() { + var len = parseInt(hex.slice(i, i += 2), 16) % 64; return len < 56 ? len : parseInt(hex.slice(i, i += (len - 55) * 2), 16); }; - const parseHex = () => { - const len = parseLength(); + var parseHex = function parseHex2() { + var len = parseLength(); return "0x" + hex.slice(i, i += len * 2); }; - const parseList = () => { - const lim = parseLength() * 2 + i; - let list = []; - while (i < lim) + var parseList = function parseList2() { + var lim = parseLength() * 2 + i; + var list = []; + while (i < lim) { list.push(parseTree()); + } return list; }; try { @@ -69696,23 +73890,27 @@ var require_rlp = __commonJS({ }); // node_modules/eth-lib/lib/hash.js -var require_hash2 = __commonJS({ +var require_hash4 = __commonJS({ "node_modules/eth-lib/lib/hash.js"(exports2, module2) { init_cjs_shim(); var HEX_CHARS = "0123456789abcdef".split(""); var KECCAK_PADDING = [1, 256, 65536, 16777216]; var SHIFT = [0, 8, 16, 24]; var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]; - var Keccak = (bits) => ({ - blocks: [], - reset: true, - block: 0, - start: 0, - blockCount: 1600 - (bits << 1) >> 5, - outputBlocks: bits >> 5, - s: ((s) => [].concat(s, s, s, s, s))([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) - }); - var update = (state, message) => { + var Keccak = function Keccak2(bits) { + return { + blocks: [], + reset: true, + block: 0, + start: 0, + blockCount: 1600 - (bits << 1) >> 5, + outputBlocks: bits >> 5, + s: function(s) { + return [].concat(s, s, s, s, s); + }([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + }; + }; + var update = function update2(state, message) { var length = message.length, blocks = state.blocks, byteCount = state.blockCount << 2, blockCount = state.blockCount, outputBlocks = state.outputBlocks, s = state.s, index = 0, i, code; while (index < length) { if (state.reset) { @@ -69786,7 +73984,7 @@ var require_hash2 = __commonJS({ } return "0x" + hex; }; - var f = (s) => { + var f = function f2(s) { var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; for (n = 0; n < 48; n += 2) { c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; @@ -69963,16 +74161,19 @@ var require_hash2 = __commonJS({ s[1] ^= RC[n + 1]; } }; - var keccak = (bits) => (str) => { - var msg; - if (str.slice(0, 2) === "0x") { - msg = []; - for (var i = 2, l = str.length; i < l; i += 2) - msg.push(parseInt(str.slice(i, i + 2), 16)); - } else { - msg = str; - } - return update(Keccak(bits, bits), msg); + var keccak = function keccak2(bits) { + return function(str) { + var msg; + if (str.slice(0, 2) === "0x") { + msg = []; + for (var i = 2, l = str.length; i < l; i += 2) { + msg.push(parseInt(str.slice(i, i + 2), 16)); + } + } else { + msg = str; + } + return update(Keccak(bits, bits), msg); + }; }; module2.exports = { keccak256: keccak(256), @@ -69987,59 +74188,125 @@ var require_hash2 = __commonJS({ var require_account2 = __commonJS({ "node_modules/eth-lib/lib/account.js"(exports2, module2) { init_cjs_shim(); + var _slicedToArray = function() { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) + break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) + _i["return"](); + } finally { + if (_d) + throw _e; + } + } + return _arr; + } + return function(arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); var Bytes = require_bytes3(); var Nat = require_nat(); var elliptic = require_elliptic3(); var rlp = require_rlp(); var secp256k1 = new elliptic.ec("secp256k1"); - var { keccak256, keccak256s } = require_hash2(); - var create = (entropy) => { - const innerHex = keccak256(Bytes.concat(Bytes.random(32), entropy || Bytes.random(32))); - const middleHex = Bytes.concat(Bytes.concat(Bytes.random(32), innerHex), Bytes.random(32)); - const outerHex = keccak256(middleHex); + var _require = require_hash4(); + var keccak256 = _require.keccak256; + var keccak256s = _require.keccak256s; + var create = function create2(entropy) { + var innerHex = keccak256(Bytes.concat(Bytes.random(32), entropy || Bytes.random(32))); + var middleHex = Bytes.concat(Bytes.concat(Bytes.random(32), innerHex), Bytes.random(32)); + var outerHex = keccak256(middleHex); return fromPrivate(outerHex); }; - var toChecksum = (address) => { - const addressHash = keccak256s(address.slice(2)); - let checksumAddress = "0x"; - for (let i = 0; i < 40; i++) + var toChecksum = function toChecksum2(address) { + var addressHash = keccak256s(address.slice(2)); + var checksumAddress = "0x"; + for (var i = 0; i < 40; i++) { checksumAddress += parseInt(addressHash[i + 2], 16) > 7 ? address[i + 2].toUpperCase() : address[i + 2]; + } return checksumAddress; }; - var fromPrivate = (privateKey) => { - const buffer = new Buffer(privateKey.slice(2), "hex"); - const ecKey = secp256k1.keyFromPrivate(buffer); - const publicKey = "0x" + ecKey.getPublic(false, "hex").slice(2); - const publicHash = keccak256(publicKey); - const address = toChecksum("0x" + publicHash.slice(-40)); + var fromPrivate = function fromPrivate2(privateKey) { + var buffer = new Buffer(privateKey.slice(2), "hex"); + var ecKey = secp256k1.keyFromPrivate(buffer); + var publicKey = "0x" + ecKey.getPublic(false, "hex").slice(2); + var publicHash = keccak256(publicKey); + var address = toChecksum("0x" + publicHash.slice(-40)); return { address, privateKey }; }; - var encodeSignature = ([v, r, s]) => Bytes.flatten([r, s, v]); - var decodeSignature = (hex) => [Bytes.slice(64, Bytes.length(hex), hex), Bytes.slice(0, 32, hex), Bytes.slice(32, 64, hex)]; - var makeSigner = (addToV) => (hash, privateKey) => { - const signature = secp256k1.keyFromPrivate(new Buffer(privateKey.slice(2), "hex")).sign(new Buffer(hash.slice(2), "hex"), { canonical: true }); - return encodeSignature([Nat.fromString(Bytes.fromNumber(addToV + signature.recoveryParam)), Bytes.pad(32, Bytes.fromNat("0x" + signature.r.toString(16))), Bytes.pad(32, Bytes.fromNat("0x" + signature.s.toString(16)))]); - }; - var sign = makeSigner(27); - var recover = (hash, signature) => { - const vals = decodeSignature(signature); - const vrs = { v: Bytes.toNumber(vals[0]), r: vals[1].slice(2), s: vals[2].slice(2) }; - const ecPublicKey = secp256k1.recoverPubKey(new Buffer(hash.slice(2), "hex"), vrs, vrs.v < 2 ? vrs.v : 1 - vrs.v % 2); - const publicKey = "0x" + ecPublicKey.encode("hex", false).slice(2); - const publicHash = keccak256(publicKey); - const address = toChecksum("0x" + publicHash.slice(-40)); + var encodeSignature = function encodeSignature2(_ref) { + var _ref2 = _slicedToArray(_ref, 3), v = _ref2[0], r = _ref2[1], s = _ref2[2]; + return Bytes.flatten([r, s, v]); + }; + var decodeSignature = function decodeSignature2(hex) { + return [Bytes.slice(64, 65, hex), Bytes.slice(0, 32, hex), Bytes.slice(32, 64, hex)]; + }; + var makeSign = function makeSign2(addToV) { + return function(hash, privateKey) { + var signature = secp256k1.keyFromPrivate(new Buffer(privateKey.slice(2), "hex")).sign(new Buffer(hash.slice(2), "hex"), { canonical: true }); + return encodeSignature([Bytes.pad(1, Bytes.fromNumber(addToV + signature.recoveryParam)), Bytes.pad(32, Bytes.fromNat("0x" + signature.r.toString(16))), Bytes.pad(32, Bytes.fromNat("0x" + signature.s.toString(16)))]); + }; + }; + var sign = makeSign(27); + var recover = function recover2(hash, signature) { + var vals = decodeSignature(signature); + var vrs = { v: Bytes.toNumber(vals[0]), r: vals[1].slice(2), s: vals[2].slice(2) }; + var ecPublicKey = secp256k1.recoverPubKey(new Buffer(hash.slice(2), "hex"), vrs, vrs.v < 2 ? vrs.v : 1 - vrs.v % 2); + var publicKey = "0x" + ecPublicKey.encode("hex", false).slice(2); + var publicHash = keccak256(publicKey); + var address = toChecksum("0x" + publicHash.slice(-40)); return address; }; + var transactionSigningData = function transactionSigningData2(tx) { + return rlp.encode([Bytes.fromNat(tx.nonce), Bytes.fromNat(tx.gasPrice), Bytes.fromNat(tx.gas), tx.to.toLowerCase(), Bytes.fromNat(tx.value), tx.data, Bytes.fromNat(tx.chainId || "0x1"), "0x", "0x"]); + }; + var signTransaction = function signTransaction2(tx, privateKey) { + var signingData = transactionSigningData(tx); + var signature = makeSign(Nat.toNumber(tx.chainId || "0x1") * 2 + 35)(keccak256(signingData), privateKey); + var rawTransaction = rlp.decode(signingData).slice(0, 6).concat(decodeSignature(signature)); + return rlp.encode(rawTransaction); + }; + var recoverTransaction = function recoverTransaction2(rawTransaction) { + var values = rlp.decode(rawTransaction); + var signature = encodeSignature(values.slice(6, 9)); + var recovery = Bytes.toNumber(values[6]); + var extraData = recovery < 35 ? [] : [Bytes.fromNumber(recovery - 35 >> 1), "0x", "0x"]; + var signingData = values.slice(0, 6).concat(extraData); + var signingDataHex = rlp.encode(signingData); + return recover(keccak256(signingDataHex), signature); + }; module2.exports = { create, toChecksum, fromPrivate, sign, - makeSigner, recover, + signTransaction, + recoverTransaction, + transactionSigningData, encodeSignature, decodeSignature }; @@ -70052,9 +74319,9 @@ var require_scrypt = __commonJS({ "use strict"; init_cjs_shim(); (function(root) { - const MAX_VALUE = 2147483647; + var MAX_VALUE = 2147483647; function SHA256(m) { - const K = new Uint32Array([ + var K = [ 1116352408, 1899447441, 3049323471, @@ -70119,14 +74386,14 @@ var require_scrypt = __commonJS({ 2756734187, 3204031479, 3329325298 - ]); - let h0 = 1779033703, h1 = 3144134277, h2 = 1013904242, h3 = 2773480762; - let h4 = 1359893119, h5 = 2600822924, h6 = 528734635, h7 = 1541459225; - const w = new Uint32Array(64); + ]; + var h0 = 1779033703, h1 = 3144134277, h2 = 1013904242, h3 = 2773480762; + var h4 = 1359893119, h5 = 2600822924, h6 = 528734635, h7 = 1541459225; + var w = new Array(64); function blocks(p2) { - let off = 0, len = p2.length; + var off = 0, len = p2.length; while (len >= 64) { - let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i2, j, t1, t2; + var a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i2, j, t1, t2; for (i2 = 0; i2 < 16; i2++) { j = off + i2 * 4; w[i2] = (p2[j] & 255) << 24 | (p2[j + 1] & 255) << 16 | (p2[j + 2] & 255) << 8 | p2[j + 3] & 255; @@ -70163,7 +74430,7 @@ var require_scrypt = __commonJS({ } } blocks(m); - let i, bytesLeft = m.length % 64, bitLenHi = m.length / 536870912 | 0, bitLenLo = m.length << 3, numZeros = bytesLeft < 56 ? 56 : 120, p = m.slice(m.length - bytesLeft, m.length); + var i, bytesLeft = m.length % 64, bitLenHi = m.length / 536870912 | 0, bitLenLo = m.length << 3, numZeros = bytesLeft < 56 ? 56 : 120, p = m.slice(m.length - bytesLeft, m.length); p.push(128); for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); @@ -70214,29 +74481,25 @@ var require_scrypt = __commonJS({ } function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) { password = password.length <= 64 ? password : SHA256(password); - const innerLen = 64 + salt.length + 4; - const inner = new Array(innerLen); - const outerKey = new Array(64); - let i; - let dk = []; - for (i = 0; i < 64; i++) { + var i; + var innerLen = 64 + salt.length + 4; + var inner = new Array(innerLen); + var outerKey = new Array(64); + var dk = []; + for (i = 0; i < 64; i++) inner[i] = 54; - } - for (i = 0; i < password.length; i++) { + for (i = 0; i < password.length; i++) inner[i] ^= password[i]; - } - for (i = 0; i < salt.length; i++) { + for (i = 0; i < salt.length; i++) inner[64 + i] = salt[i]; - } - for (i = innerLen - 4; i < innerLen; i++) { + for (i = innerLen - 4; i < innerLen; i++) inner[i] = 0; - } for (i = 0; i < 64; i++) outerKey[i] = 92; for (i = 0; i < password.length; i++) outerKey[i] ^= password[i]; function incrementCounter() { - for (let i2 = innerLen - 1; i2 >= innerLen - 4; i2--) { + for (var i2 = innerLen - 1; i2 >= innerLen - 4; i2--) { inner[i2]++; if (inner[i2] <= 255) return; @@ -70255,7 +74518,7 @@ var require_scrypt = __commonJS({ return dk; } function blockmix_salsa8(BY, Yi, r, x, _X) { - let i; + var i; arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16); for (i = 0; i < 2 * r; i++) { blockxor(BY, i * 16, _X, 16); @@ -70274,7 +74537,7 @@ var require_scrypt = __commonJS({ } function salsa20_8(B, x) { arraycopy(B, 0, x, 0, 16); - for (let i = 8; i > 0; i -= 2) { + for (var i = 8; i > 0; i -= 2) { x[4] ^= R(x[0] + x[12], 7); x[8] ^= R(x[4] + x[0], 9); x[12] ^= R(x[8] + x[4], 13); @@ -70308,12 +74571,12 @@ var require_scrypt = __commonJS({ x[14] ^= R(x[13] + x[12], 13); x[15] ^= R(x[14] + x[13], 18); } - for (let i = 0; i < 16; ++i) { + for (i = 0; i < 16; ++i) { B[i] += x[i]; } } function blockxor(S, Si, D, len) { - for (let i = 0; i < len; i++) { + for (var i = 0; i < len; i++) { D[i] ^= S[Si + i]; } } @@ -70326,21 +74589,28 @@ var require_scrypt = __commonJS({ if (!o || typeof o.length !== "number") { return false; } - for (let i = 0; i < o.length; i++) { - const v = o[i]; - if (typeof v !== "number" || v % 1 || v < 0 || v >= 256) { + for (var i = 0; i < o.length; i++) { + if (typeof o[i] !== "number") { + return false; + } + var v = parseInt(o[i]); + if (v != o[i] || v < 0 || v >= 256) { return false; } } return true; } function ensureInteger(value, name2) { - if (typeof value !== "number" || value % 1) { + var intValue = parseInt(value); + if (value != intValue) { throw new Error("invalid " + name2); } - return value; + return intValue; } - function _scrypt(password, salt, N, r, p, dkLen, callback) { + function scrypt(password, salt, N, r, p, dkLen, callback) { + if (!callback) { + throw new Error("missing callback"); + } N = ensureInteger(N, "N"); r = ensureInteger(r, "r"); p = ensureInteger(p, "p"); @@ -70362,31 +74632,30 @@ var require_scrypt = __commonJS({ throw new Error("salt must be an array or buffer"); } salt = Array.prototype.slice.call(salt); - let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r); - const B = new Uint32Array(p * 32 * r); - for (let i = 0; i < B.length; i++) { - const j = i * 4; + var b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r); + var B = new Uint32Array(p * 32 * r); + for (var i = 0; i < B.length; i++) { + var j = i * 4; B[i] = (b[j + 3] & 255) << 24 | (b[j + 2] & 255) << 16 | (b[j + 1] & 255) << 8 | (b[j + 0] & 255) << 0; } - const XY = new Uint32Array(64 * r); - const V = new Uint32Array(32 * r * N); - const Yi = 32 * r; - const x = new Uint32Array(16); - const _X = new Uint32Array(16); - const totalOps = p * N * 2; - let currentOp = 0; - let lastPercent10 = null; - let stop = false; - let state = 0; - let i0 = 0, i1; - let Bi; - const limit = callback ? parseInt(1e3 / r) : 4294967295; - const nextTick = typeof setImmediate !== "undefined" ? setImmediate : setTimeout; - const incrementalSMix = function() { + var XY = new Uint32Array(64 * r); + var V = new Uint32Array(32 * r * N); + var Yi = 32 * r; + var x = new Uint32Array(16); + var _X = new Uint32Array(16); + var totalOps = p * N * 2; + var currentOp = 0; + var lastPercent10 = null; + var stop = false; + var state = 0; + var i0 = 0, i1; + var Bi; + var limit = parseInt(1e3 / r); + var nextTick = typeof setImmediate !== "undefined" ? setImmediate : setTimeout; + var incrementalSMix = function() { if (stop) { return callback(new Error("cancelled"), currentOp / totalOps); } - let steps; switch (state) { case 0: Bi = i0 * 32 * r; @@ -70394,25 +74663,23 @@ var require_scrypt = __commonJS({ state = 1; i1 = 0; case 1: - steps = N - i1; + var steps = N - i1; if (steps > limit) { steps = limit; } - for (let i = 0; i < steps; i++) { - arraycopy(XY, 0, V, (i1 + i) * Yi, Yi); + for (var i2 = 0; i2 < steps; i2++) { + arraycopy(XY, 0, V, (i1 + i2) * Yi, Yi); blockmix_salsa8(XY, Yi, r, x, _X); } i1 += steps; currentOp += steps; - if (callback) { - const percent10 = parseInt(1e3 * currentOp / totalOps); - if (percent10 !== lastPercent10) { - stop = callback(null, currentOp / totalOps); - if (stop) { - break; - } - lastPercent10 = percent10; + var percent10 = parseInt(1e3 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { + break; } + lastPercent10 = percent10; } if (i1 < N) { break; @@ -70420,27 +74687,25 @@ var require_scrypt = __commonJS({ i1 = 0; state = 2; case 2: - steps = N - i1; + var steps = N - i1; if (steps > limit) { steps = limit; } - for (let i = 0; i < steps; i++) { - const offset = (2 * r - 1) * 16; - const j = XY[offset] & N - 1; - blockxor(V, j * Yi, XY, Yi); + for (var i2 = 0; i2 < steps; i2++) { + var offset = (2 * r - 1) * 16; + var j2 = XY[offset] & N - 1; + blockxor(V, j2 * Yi, XY, Yi); blockmix_salsa8(XY, Yi, r, x, _X); } i1 += steps; currentOp += steps; - if (callback) { - const percent10 = parseInt(1e3 * currentOp / totalOps); - if (percent10 !== lastPercent10) { - stop = callback(null, currentOp / totalOps); - if (stop) { - break; - } - lastPercent10 = percent10; + var percent10 = parseInt(1e3 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { + break; } + lastPercent10 = percent10; } if (i1 < N) { break; @@ -70452,67 +74717,28 @@ var require_scrypt = __commonJS({ break; } b = []; - for (let i = 0; i < B.length; i++) { - b.push(B[i] >> 0 & 255); - b.push(B[i] >> 8 & 255); - b.push(B[i] >> 16 & 255); - b.push(B[i] >> 24 & 255); + for (var i2 = 0; i2 < B.length; i2++) { + b.push(B[i2] >> 0 & 255); + b.push(B[i2] >> 8 & 255); + b.push(B[i2] >> 16 & 255); + b.push(B[i2] >> 24 & 255); } - const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen); - if (callback) { - callback(null, 1, derivedKey); - } - return derivedKey; - } - if (callback) { - nextTick(incrementalSMix); + var derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen); + return callback(null, 1, derivedKey); } + nextTick(incrementalSMix); }; - if (!callback) { - while (true) { - const derivedKey = incrementalSMix(); - if (derivedKey != void 0) { - return derivedKey; - } - } - } incrementalSMix(); } - const lib = { - scrypt: function(password, salt, N, r, p, dkLen, progressCallback) { - return new Promise(function(resolve, reject) { - let lastProgress = 0; - if (progressCallback) { - progressCallback(0); - } - _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) { - if (error) { - reject(error); - } else if (key) { - if (progressCallback && lastProgress !== 1) { - progressCallback(1); - } - resolve(new Uint8Array(key)); - } else if (progressCallback && progress !== lastProgress) { - lastProgress = progress; - return progressCallback(progress); - } - }); - }); - }, - syncScrypt: function(password, salt, N, r, p, dkLen) { - return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen)); - } - }; if (typeof exports2 !== "undefined") { - module2.exports = lib; + module2.exports = scrypt; } else if (typeof define === "function" && define.amd) { - define(lib); + define(scrypt); } else if (root) { if (root.scrypt) { root._scrypt = root.scrypt; } - root.scrypt = lib; + root.scrypt = scrypt; } })(exports2); } @@ -71159,6 +75385,211 @@ var require_constants7 = __commonJS({ } }); +// node_modules/secp256k1/node_modules/node-gyp-build/node-gyp-build.js +var require_node_gyp_build5 = __commonJS({ + "node_modules/secp256k1/node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) { + init_cjs_shim(); + var fs = __require("fs"); + var path = __require("path"); + var os = __require("os"); + var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; + var vars = process.config && process.config.variables || {}; + var prebuildsOnly = !!process.env.PREBUILDS_ONLY; + var abi = process.versions.modules; + var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node"; + var arch = process.env.npm_config_arch || os.arch(); + var platform = process.env.npm_config_platform || os.platform(); + var libc = process.env.LIBC || (isAlpine(platform) ? "musl" : "glibc"); + var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || ""; + var uv = (process.versions.uv || "").split(".")[0]; + module2.exports = load; + function load(dir) { + return runtimeRequire(load.resolve(dir)); + } + load.resolve = load.path = function(dir) { + dir = path.resolve(dir || "."); + try { + var name2 = runtimeRequire(path.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_"); + if (process.env[name2 + "_PREBUILD"]) + dir = process.env[name2 + "_PREBUILD"]; + } catch (err) { + } + if (!prebuildsOnly) { + var release = getFirst(path.join(dir, "build/Release"), matchBuild); + if (release) + return release; + var debug = getFirst(path.join(dir, "build/Debug"), matchBuild); + if (debug) + return debug; + } + var prebuild = resolve(dir); + if (prebuild) + return prebuild; + var nearby = resolve(path.dirname(process.execPath)); + if (nearby) + return nearby; + var target = [ + "platform=" + platform, + "arch=" + arch, + "runtime=" + runtime, + "abi=" + abi, + "uv=" + uv, + armv ? "armv=" + armv : "", + "libc=" + libc, + "node=" + process.versions.node, + process.versions.electron ? "electron=" + process.versions.electron : "", + typeof __webpack_require__ === "function" ? "webpack=true" : "" + // eslint-disable-line + ].filter(Boolean).join(" "); + throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n"); + function resolve(dir2) { + var tuples = readdirSync(path.join(dir2, "prebuilds")).map(parseTuple); + var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0]; + if (!tuple) + return; + var prebuilds = path.join(dir2, "prebuilds", tuple.name); + var parsed = readdirSync(prebuilds).map(parseTags); + var candidates = parsed.filter(matchTags(runtime, abi)); + var winner = candidates.sort(compareTags(runtime))[0]; + if (winner) + return path.join(prebuilds, winner.file); + } + }; + function readdirSync(dir) { + try { + return fs.readdirSync(dir); + } catch (err) { + return []; + } + } + function getFirst(dir, filter) { + var files = readdirSync(dir).filter(filter); + return files[0] && path.join(dir, files[0]); + } + function matchBuild(name2) { + return /\.node$/.test(name2); + } + function parseTuple(name2) { + var arr = name2.split("-"); + if (arr.length !== 2) + return; + var platform2 = arr[0]; + var architectures = arr[1].split("+"); + if (!platform2) + return; + if (!architectures.length) + return; + if (!architectures.every(Boolean)) + return; + return { name: name2, platform: platform2, architectures }; + } + function matchTuple(platform2, arch2) { + return function(tuple) { + if (tuple == null) + return false; + if (tuple.platform !== platform2) + return false; + return tuple.architectures.includes(arch2); + }; + } + function compareTuples(a, b) { + return a.architectures.length - b.architectures.length; + } + function parseTags(file) { + var arr = file.split("."); + var extension = arr.pop(); + var tags = { file, specificity: 0 }; + if (extension !== "node") + return; + for (var i = 0; i < arr.length; i++) { + var tag = arr[i]; + if (tag === "node" || tag === "electron" || tag === "node-webkit") { + tags.runtime = tag; + } else if (tag === "napi") { + tags.napi = true; + } else if (tag.slice(0, 3) === "abi") { + tags.abi = tag.slice(3); + } else if (tag.slice(0, 2) === "uv") { + tags.uv = tag.slice(2); + } else if (tag.slice(0, 4) === "armv") { + tags.armv = tag.slice(4); + } else if (tag === "glibc" || tag === "musl") { + tags.libc = tag; + } else { + continue; + } + tags.specificity++; + } + return tags; + } + function matchTags(runtime2, abi2) { + return function(tags) { + if (tags == null) + return false; + if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) + return false; + if (tags.abi && tags.abi !== abi2 && !tags.napi) + return false; + if (tags.uv && tags.uv !== uv) + return false; + if (tags.armv && tags.armv !== armv) + return false; + if (tags.libc && tags.libc !== libc) + return false; + return true; + }; + } + function runtimeAgnostic(tags) { + return tags.runtime === "node" && tags.napi; + } + function compareTags(runtime2) { + return function(a, b) { + if (a.runtime !== b.runtime) { + return a.runtime === runtime2 ? -1 : 1; + } else if (a.abi !== b.abi) { + return a.abi ? -1 : 1; + } else if (a.specificity !== b.specificity) { + return a.specificity > b.specificity ? -1 : 1; + } else { + return 0; + } + }; + } + function isNwjs() { + return !!(process.versions && process.versions.nw); + } + function isElectron() { + if (process.versions && process.versions.electron) + return true; + if (process.env.ELECTRON_RUN_AS_NODE) + return true; + return typeof window !== "undefined" && window.process && window.process.type === "renderer"; + } + function isAlpine(platform2) { + return platform2 === "linux" && fs.existsSync("/etc/alpine-release"); + } + load.parseTags = parseTags; + load.matchTags = matchTags; + load.compareTags = compareTags; + load.parseTuple = parseTuple; + load.matchTuple = matchTuple; + load.compareTuples = compareTuples; + } +}); + +// node_modules/secp256k1/node_modules/node-gyp-build/index.js +var require_node_gyp_build6 = __commonJS({ + "node_modules/secp256k1/node_modules/node-gyp-build/index.js"(exports2, module2) { + init_cjs_shim(); + var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; + if (typeof runtimeRequire.addon === "function") { + module2.exports = runtimeRequire.addon.bind(runtimeRequire); + } else { + module2.exports = require_node_gyp_build5(); + } + } +}); + // node_modules/secp256k1/lib/index.js var require_lib51 = __commonJS({ "node_modules/secp256k1/lib/index.js"(exports2, module2) { @@ -71467,7 +75898,7 @@ var require_lib51 = __commonJS({ var require_bindings = __commonJS({ "node_modules/secp256k1/bindings.js"(exports2, module2) { init_cjs_shim(); - var addon = require_node_gyp_build2()(__dirname); + var addon = require_node_gyp_build6()(__dirname); module2.exports = require_lib51()(new addon.Secp256k1()); } }); @@ -72378,6 +76809,206 @@ var require_hash_utils = __commonJS({ } }); +// node_modules/node-gyp-build/index.js +var require_node_gyp_build7 = __commonJS({ + "node_modules/node-gyp-build/index.js"(exports2, module2) { + init_cjs_shim(); + var fs = __require("fs"); + var path = __require("path"); + var os = __require("os"); + var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; + var prebuildsOnly = !!process.env.PREBUILDS_ONLY; + var abi = process.versions.modules; + var runtime = isElectron() ? "electron" : "node"; + var arch = os.arch(); + var platform = os.platform(); + var libc = process.env.LIBC || (isAlpine(platform) ? "musl" : "glibc"); + var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : process.config.variables.arm_version) || ""; + var uv = (process.versions.uv || "").split(".")[0]; + module2.exports = load; + function load(dir) { + return runtimeRequire(load.path(dir)); + } + load.path = function(dir) { + dir = path.resolve(dir || "."); + try { + var name2 = runtimeRequire(path.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_"); + if (process.env[name2 + "_PREBUILD"]) + dir = process.env[name2 + "_PREBUILD"]; + } catch (err) { + } + if (!prebuildsOnly) { + var release = getFirst(path.join(dir, "build/Release"), matchBuild); + if (release) + return release; + var debug = getFirst(path.join(dir, "build/Debug"), matchBuild); + if (debug) + return debug; + } + var prebuilds = path.join(dir, "prebuilds", platform + "-" + arch); + var parsed = readdirSync(prebuilds).map(parseTags); + var candidates = parsed.filter(matchTags(runtime, abi)); + var winner = candidates.sort(compareTags(runtime))[0]; + if (winner) + return path.join(prebuilds, winner.file); + var target = [ + "platform=" + platform, + "arch=" + arch, + "runtime=" + runtime, + "abi=" + abi, + "uv=" + uv, + armv ? "armv=" + armv : "", + "libc=" + libc + ].filter(Boolean).join(" "); + throw new Error("No native build was found for " + target); + }; + function readdirSync(dir) { + try { + return fs.readdirSync(dir); + } catch (err) { + return []; + } + } + function getFirst(dir, filter) { + var files = readdirSync(dir).filter(filter); + return files[0] && path.join(dir, files[0]); + } + function matchBuild(name2) { + return /\.node$/.test(name2); + } + function parseTags(file) { + var arr = file.split("."); + var extension = arr.pop(); + var tags = { file, specificity: 0 }; + if (extension !== "node") + return; + for (var i = 0; i < arr.length; i++) { + var tag = arr[i]; + if (tag === "node" || tag === "electron" || tag === "node-webkit") { + tags.runtime = tag; + } else if (tag === "napi") { + tags.napi = true; + } else if (tag.slice(0, 3) === "abi") { + tags.abi = tag.slice(3); + } else if (tag.slice(0, 2) === "uv") { + tags.uv = tag.slice(2); + } else if (tag.slice(0, 4) === "armv") { + tags.armv = tag.slice(4); + } else if (tag === "glibc" || tag === "musl") { + tags.libc = tag; + } else { + continue; + } + tags.specificity++; + } + return tags; + } + function matchTags(runtime2, abi2) { + return function(tags) { + if (tags == null) + return false; + if (tags.runtime !== runtime2 && !runtimeAgnostic(tags)) + return false; + if (tags.abi !== abi2 && !tags.napi) + return false; + if (tags.uv && tags.uv !== uv) + return false; + if (tags.armv && tags.armv !== armv) + return false; + if (tags.libc && tags.libc !== libc) + return false; + return true; + }; + } + function runtimeAgnostic(tags) { + return tags.runtime === "node" && tags.napi; + } + function compareTags(runtime2) { + return function(a, b) { + if (a.runtime !== b.runtime) { + return a.runtime === runtime2 ? -1 : 1; + } else if (a.abi !== b.abi) { + return a.abi ? -1 : 1; + } else if (a.specificity !== b.specificity) { + return a.specificity > b.specificity ? -1 : 1; + } else { + return 0; + } + }; + } + function isElectron() { + if (process.versions && process.versions.electron) + return true; + if (process.env.ELECTRON_RUN_AS_NODE) + return true; + return typeof window !== "undefined" && window.process && window.process.type === "renderer"; + } + function isAlpine(platform2) { + return platform2 === "linux" && fs.existsSync("/etc/alpine-release"); + } + load.parseTags = parseTags; + load.matchTags = matchTags; + load.compareTags = compareTags; + } +}); + +// node_modules/process-nextick-args/index.js +var require_process_nextick_args = __commonJS({ + "node_modules/process-nextick-args/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + if (typeof process === "undefined" || !process.version || process.version.indexOf("v0.") === 0 || process.version.indexOf("v1.") === 0 && process.version.indexOf("v1.8.") !== 0) { + module2.exports = { nextTick }; + } else { + module2.exports = process; + } + function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== "function") { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } + } + } +}); + +// node_modules/readable-stream/node_modules/isarray/index.js +var require_isarray = __commonJS({ + "node_modules/readable-stream/node_modules/isarray/index.js"(exports2, module2) { + init_cjs_shim(); + var toString = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString.call(arr) == "[object Array]"; + }; + } +}); + // node_modules/readable-stream/lib/internal/streams/stream.js var require_stream = __commonJS({ "node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { @@ -72386,266 +77017,219 @@ var require_stream = __commonJS({ } }); -// node_modules/readable-stream/lib/internal/streams/buffer_list.js -var require_buffer_list = __commonJS({ - "node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) { - "use strict"; +// node_modules/readable-stream/node_modules/safe-buffer/index.js +var require_safe_buffer2 = __commonJS({ + "node_modules/readable-stream/node_modules/safe-buffer/index.js"(exports2, module2) { init_cjs_shim(); - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - return keys; - } - function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), true).forEach(function(key) { - _defineProperty(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); + var buffer = __require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; } - return target; } - function _defineProperty(obj2, key, value) { - key = _toPropertyKey(key); - if (key in obj2) { - Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } } else { - obj2[key] = value; + buf.fill(0); } - return obj2; - } - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); } - } - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) - descriptor.writable = true; - Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); } + return buffer.SlowBuffer(size); + }; + } +}); + +// node_modules/core-util-is/lib/util.js +var require_util3 = __commonJS({ + "node_modules/core-util-is/lib/util.js"(exports2) { + init_cjs_shim(); + function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === "[object Array]"; } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) - _defineProperties(Constructor.prototype, protoProps); - if (staticProps) - _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; + exports2.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; } - function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); + exports2.isBoolean = isBoolean; + function isNull(arg) { + return arg === null; } - function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) - return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== void 0) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") - return res; - throw new TypeError("@@toPrimitive must return a primitive value."); + exports2.isNull = isNull; + function isNullOrUndefined(arg) { + return arg == null; + } + exports2.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports2.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports2.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports2.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports2.isUndefined = isUndefined; + function isRegExp(re) { + return objectToString(re) === "[object RegExp]"; + } + exports2.isRegExp = isRegExp; + function isObject2(arg) { + return typeof arg === "object" && arg !== null; + } + exports2.isObject = isObject2; + function isDate(d) { + return objectToString(d) === "[object Date]"; + } + exports2.isDate = isDate; + function isError2(e) { + return objectToString(e) === "[object Error]" || e instanceof Error; + } + exports2.isError = isError2; + function isFunction(arg) { + return typeof arg === "function"; + } + exports2.isFunction = isFunction; + function isPrimitive2(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol + typeof arg === "undefined"; + } + exports2.isPrimitive = isPrimitive2; + exports2.isBuffer = __require("buffer").Buffer.isBuffer; + function objectToString(o) { + return Object.prototype.toString.call(o); + } + } +}); + +// node_modules/readable-stream/lib/internal/streams/BufferList.js +var require_BufferList = __commonJS({ + "node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); } - return (hint === "string" ? String : Number)(input); } - var _require = __require("buffer"); - var Buffer2 = _require.Buffer; - var _require2 = __require("util"); - var inspect = _require2.inspect; - var custom = inspect && inspect.custom || "inspect"; + var Buffer2 = require_safe_buffer2().Buffer; + var util = __require("util"); function copyBuffer(src, target, offset) { - Buffer2.prototype.copy.call(src, target, offset); + src.copy(target, offset); } - module2.exports = /* @__PURE__ */ function() { + module2.exports = function() { function BufferList() { _classCallCheck(this, BufferList); this.head = null; this.tail = null; this.length = 0; } - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) - this.tail.next = entry; - else - this.head = entry; - this.tail = entry; - ++this.length; - } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) - this.tail = entry; + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) + this.tail.next = entry; + else this.head = entry; - ++this.length; - } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) - return; - var ret2 = this.head.data; - if (this.length === 1) - this.head = this.tail = null; - else - this.head = this.head.next; - --this.length; - return ret2; - } - }, { - key: "clear", - value: function clear() { + this.tail = entry; + ++this.length; + }; + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) + this.tail = entry; + this.head = entry; + ++this.length; + }; + BufferList.prototype.shift = function shift() { + if (this.length === 0) + return; + var ret2 = this.head.data; + if (this.length === 1) this.head = this.tail = null; - this.length = 0; - } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) - return ""; - var p = this.head; - var ret2 = "" + p.data; - while (p = p.next) - ret2 += s + p.data; - return ret2; - } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) - return Buffer2.alloc(0); - var ret2 = Buffer2.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret2, i); - i += p.data.length; - p = p.next; - } - return ret2; - } - // Consumes a specified amount of bytes or characters from the buffered data. - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret2; - if (n < this.head.data.length) { - ret2 = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - ret2 = this.shift(); - } else { - ret2 = hasStrings ? this._getString(n) : this._getBuffer(n); - } - return ret2; - } - }, { - key: "first", - value: function first() { - return this.head.data; - } - // Consumes a specified amount of characters from the buffered data. - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret2 = p.data; - n -= ret2.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) - ret2 += str; - else - ret2 += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) - this.head = p.next; - else - this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret2; - } - // Consumes a specified amount of bytes from the buffered data. - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret2 = Buffer2.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret2); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret2, ret2.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) - this.head = p.next; - else - this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret2; + else + this.head = this.head.next; + --this.length; + return ret2; + }; + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + BufferList.prototype.join = function join(s) { + if (this.length === 0) + return ""; + var p = this.head; + var ret2 = "" + p.data; + while (p = p.next) { + ret2 += s + p.data; } - // Make sure the linked list only shows the minimal necessary information. - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread(_objectSpread({}, options), {}, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); + return ret2; + }; + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) + return Buffer2.alloc(0); + var ret2 = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret2, i); + i += p.data.length; + p = p.next; } - }]); + return ret2; + }; return BufferList; }(); + if (util && util.inspect && util.inspect.custom) { + module2.exports.prototype[util.inspect.custom] = function() { + var obj2 = util.inspect({ length: this.length }); + return this.constructor.name + " " + obj2; + }; + } } }); @@ -72654,6 +77238,7 @@ var require_destroy = __commonJS({ "node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { "use strict"; init_cjs_shim(); + var pna = require_process_nextick_args(); function destroy(err, cb) { var _this = this; var readableDestroyed = this._readableState && this._readableState.destroyed; @@ -72663,10 +77248,10 @@ var require_destroy = __commonJS({ cb(err); } else if (err) { if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); + pna.nextTick(emitErrorNT, this, err); } else if (!this._writableState.errorEmitted) { this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); + pna.nextTick(emitErrorNT, this, err); } } return this; @@ -72680,33 +77265,17 @@ var require_destroy = __commonJS({ this._destroy(err || null, function(err2) { if (!cb && err2) { if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err2); + pna.nextTick(emitErrorNT, _this, err2); } else if (!_this._writableState.errorEmitted) { _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err2); - } else { - process.nextTick(emitCloseNT, _this); + pna.nextTick(emitErrorNT, _this, err2); } } else if (cb) { - process.nextTick(emitCloseNT, _this); cb(err2); - } else { - process.nextTick(emitCloseNT, _this); } }); return this; } - function emitErrorAndCloseNT(self2, err) { - emitErrorNT(self2, err); - emitCloseNT(self2); - } - function emitCloseNT(self2) { - if (self2._writableState && !self2._writableState.emitClose) - return; - if (self2._readableState && !self2._readableState.emitClose) - return; - self2.emit("close"); - } function undestroy() { if (this._readableState) { this._readableState.destroyed = false; @@ -72727,145 +77296,9 @@ var require_destroy = __commonJS({ function emitErrorNT(self2, err) { self2.emit("error", err); } - function errorOrDestroy(stream, err) { - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) - stream.destroy(err); - else - stream.emit("error", err); - } module2.exports = { destroy, - undestroy, - errorOrDestroy - }; - } -}); - -// node_modules/readable-stream/errors.js -var require_errors4 = __commonJS({ - "node_modules/readable-stream/errors.js"(exports2, module2) { - "use strict"; - init_cjs_shim(); - var codes = {}; - function createErrorType(code, message, Base) { - if (!Base) { - Base = Error; - } - function getMessage(arg1, arg2, arg3) { - if (typeof message === "string") { - return message; - } else { - return message(arg1, arg2, arg3); - } - } - class NodeError extends Base { - constructor(arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } - } - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - codes[code] = NodeError; - } - function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; - } - } else { - return `of ${thing} ${String(expected)}`; - } - } - function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; - } - function endsWith(str, search, this_len) { - if (this_len === void 0 || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; - } - function includes(str, search, start) { - if (typeof start !== "number") { - start = 0; - } - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } - } - createErrorType("ERR_INVALID_OPT_VALUE", function(name2, value) { - return 'The value "' + value + '" is invalid for option "' + name2 + '"'; - }, TypeError); - createErrorType("ERR_INVALID_ARG_TYPE", function(name2, expected, actual) { - let determiner; - if (typeof expected === "string" && startsWith(expected, "not ")) { - determiner = "must not be"; - expected = expected.replace(/^not /, ""); - } else { - determiner = "must be"; - } - let msg; - if (endsWith(name2, " argument")) { - msg = `The ${name2} ${determiner} ${oneOf(expected, "type")}`; - } else { - const type = includes(name2, ".") ? "property" : "argument"; - msg = `The "${name2}" ${type} ${determiner} ${oneOf(expected, "type")}`; - } - msg += `. Received type ${typeof actual}`; - return msg; - }, TypeError); - createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); - createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name2) { - return "The " + name2 + " method is not implemented"; - }); - createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); - createErrorType("ERR_STREAM_DESTROYED", function(name2) { - return "Cannot call " + name2 + " after a stream was destroyed"; - }); - createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); - createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); - createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); - createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); - createErrorType("ERR_UNKNOWN_ENCODING", function(arg) { - return "Unknown encoding: " + arg; - }, TypeError); - createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"); - module2.exports.codes = codes; - } -}); - -// node_modules/readable-stream/lib/internal/streams/state.js -var require_state = __commonJS({ - "node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) { - "use strict"; - init_cjs_shim(); - var ERR_INVALID_OPT_VALUE = require_errors4().codes.ERR_INVALID_OPT_VALUE; - function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; - } - function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name2 = isDuplex ? duplexKey : "highWaterMark"; - throw new ERR_INVALID_OPT_VALUE(name2, hwm); - } - return Math.floor(hwm); - } - return state.objectMode ? 16 : 16 * 1024; - } - module2.exports = { - getHighWaterMark + undestroy }; } }); @@ -72883,6 +77316,7 @@ var require_stream_writable = __commonJS({ "node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { "use strict"; init_cjs_shim(); + var pna = require_process_nextick_args(); module2.exports = Writable; function CorkedRequest(state) { var _this = this; @@ -72892,13 +77326,16 @@ var require_stream_writable = __commonJS({ onCorkedFinish(_this, state); }; } + var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; + var util = Object.create(require_util3()); + util.inherits = require_inherits(); var internalUtil = { deprecate: require_node2() }; var Stream = require_stream(); - var Buffer2 = __require("buffer").Buffer; + var Buffer2 = require_safe_buffer2().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { @@ -72908,30 +77345,26 @@ var require_stream_writable = __commonJS({ return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; } var destroyImpl = require_destroy(); - var _require = require_state(); - var getHighWaterMark = _require.getHighWaterMark; - var _require$codes = require_errors4().codes; - var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; - var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; - var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; - var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE; - var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; - var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES; - var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END; - var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; - var errorOrDestroy = destroyImpl.errorOrDestroy; - require_inherits()(Writable, Stream); + util.inherits(Writable, Stream); function nop() { } - function WritableState(options, stream, isDuplex) { + function WritableState(options, stream) { Duplex = Duplex || require_stream_duplex(); options = options || {}; - if (typeof isDuplex !== "boolean") - isDuplex = stream instanceof Duplex; + var isDuplex = stream instanceof Duplex; this.objectMode = !!options.objectMode; if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex); + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) + this.highWaterMark = hwm; + else if (isDuplex && (writableHwm || writableHwm === 0)) + this.highWaterMark = writableHwm; + else + this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); this.finalCalled = false; this.needDrain = false; this.ending = false; @@ -72956,8 +77389,6 @@ var require_stream_writable = __commonJS({ this.pendingcb = 0; this.prefinished = false; this.errorEmitted = false; - this.emitClose = options.emitClose !== false; - this.autoDestroy = !!options.autoDestroy; this.bufferedRequestCount = 0; this.corkedRequestsFree = new CorkedRequest(this); } @@ -72973,7 +77404,7 @@ var require_stream_writable = __commonJS({ (function() { try { Object.defineProperty(WritableState.prototype, "buffer", { - get: internalUtil.deprecate(function writableStateBufferGetter() { + get: internalUtil.deprecate(function() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); @@ -72984,7 +77415,7 @@ var require_stream_writable = __commonJS({ if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { realHasInstance = Function.prototype[Symbol.hasInstance]; Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { + value: function(object) { if (realHasInstance.call(this, object)) return true; if (this !== Writable) @@ -72993,16 +77424,16 @@ var require_stream_writable = __commonJS({ } }); } else { - realHasInstance = function realHasInstance2(object) { + realHasInstance = function(object) { return object instanceof this; }; } function Writable(options) { Duplex = Duplex || require_stream_duplex(); - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); + } + this._writableState = new WritableState(options, this); this.writable = true; if (options) { if (typeof options.write === "function") @@ -73017,26 +77448,27 @@ var require_stream_writable = __commonJS({ Stream.call(this); } Writable.prototype.pipe = function() { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); + this.emit("error", new Error("Cannot pipe, not readable")); }; function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); - errorOrDestroy(stream, er); - process.nextTick(cb, er); + var er = new Error("write after end"); + stream.emit("error", er); + pna.nextTick(cb, er); } function validChunk(stream, state, chunk, cb) { - var er; + var valid = true; + var er = false; if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== "string" && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk); + er = new TypeError("May not write null values to stream"); + } else if (typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); } if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; + stream.emit("error", er); + pna.nextTick(cb, er); + valid = false; } - return true; + return valid; } Writable.prototype.write = function(chunk, encoding, cb) { var state = this._writableState; @@ -73055,7 +77487,7 @@ var require_stream_writable = __commonJS({ encoding = state.defaultEncoding; if (typeof cb !== "function") cb = nop; - if (state.ending) + if (state.ended) writeAfterEnd(this, cb); else if (isBuf || validChunk(this, state, chunk, cb)) { state.pendingcb++; @@ -73064,7 +77496,8 @@ var require_stream_writable = __commonJS({ return ret2; }; Writable.prototype.cork = function() { - this._writableState.corked++; + var state = this._writableState; + state.corked++; }; Writable.prototype.uncork = function() { var state = this._writableState; @@ -73078,19 +77511,10 @@ var require_stream_writable = __commonJS({ if (typeof encoding === "string") encoding = encoding.toLowerCase(); if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) - throw new ERR_UNKNOWN_ENCODING(encoding); + throw new TypeError("Unknown encoding: " + encoding); this._writableState.defaultEncoding = encoding; return this; }; - Object.defineProperty(Writable.prototype, "writableBuffer", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } - }); function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { chunk = Buffer2.from(chunk, encoding); @@ -73102,7 +77526,7 @@ var require_stream_writable = __commonJS({ // because otherwise some prototype manipulation in // userland will fail enumerable: false, - get: function get() { + get: function() { return this._writableState.highWaterMark; } }); @@ -73145,9 +77569,7 @@ var require_stream_writable = __commonJS({ state.writecb = cb; state.writing = true; state.sync = true; - if (state.destroyed) - state.onwrite(new ERR_STREAM_DESTROYED("write")); - else if (writev) + if (writev) stream._writev(chunk, state.onwrite); else stream._write(chunk, encoding, state.onwrite); @@ -73156,14 +77578,14 @@ var require_stream_writable = __commonJS({ function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; if (sync) { - process.nextTick(cb, er); - process.nextTick(finishMaybe, stream, state); + pna.nextTick(cb, er); + pna.nextTick(finishMaybe, stream, state); stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); + stream.emit("error", er); } else { cb(er); stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); + stream.emit("error", er); finishMaybe(stream, state); } } @@ -73177,18 +77599,16 @@ var require_stream_writable = __commonJS({ var state = stream._writableState; var sync = state.sync; var cb = state.writecb; - if (typeof cb !== "function") - throw new ERR_MULTIPLE_CALLBACK(); onwriteStateUpdate(state); if (er) onwriteError(stream, state, sync, er, cb); else { - var finished = needFinish(state) || stream.destroyed; + var finished = needFinish(state); if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream, state); } if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); + asyncWrite(afterWrite, stream, state, finished, cb); } else { afterWrite(stream, state, finished, cb); } @@ -73255,7 +77675,7 @@ var require_stream_writable = __commonJS({ state.bufferProcessing = false; } Writable.prototype._write = function(chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()")); + cb(new Error("_write() is not implemented")); }; Writable.prototype._writev = null; Writable.prototype.end = function(chunk, encoding, cb) { @@ -73276,17 +77696,7 @@ var require_stream_writable = __commonJS({ } if (!state.ending) endWritable(this, state, cb); - return this; }; - Object.defineProperty(Writable.prototype, "writableLength", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } - }); function needFinish(state) { return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } @@ -73294,7 +77704,7 @@ var require_stream_writable = __commonJS({ stream._final(function(err) { state.pendingcb--; if (err) { - errorOrDestroy(stream, err); + stream.emit("error", err); } state.prefinished = true; stream.emit("prefinish"); @@ -73303,10 +77713,10 @@ var require_stream_writable = __commonJS({ } function prefinish(stream, state) { if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === "function" && !state.destroyed) { + if (typeof stream._final === "function") { state.pendingcb++; state.finalCalled = true; - process.nextTick(callFinal, stream, state); + pna.nextTick(callFinal, stream, state); } else { state.prefinished = true; stream.emit("prefinish"); @@ -73320,12 +77730,6 @@ var require_stream_writable = __commonJS({ if (state.pendingcb === 0) { state.finished = true; stream.emit("finish"); - if (state.autoDestroy) { - var rState = stream._readableState; - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } } } return need; @@ -73335,7 +77739,7 @@ var require_stream_writable = __commonJS({ finishMaybe(stream, state); if (cb) { if (state.finished) - process.nextTick(cb); + pna.nextTick(cb); else stream.once("finish", cb); } @@ -73354,17 +77758,13 @@ var require_stream_writable = __commonJS({ state.corkedRequestsFree.next = corkReq; } Object.defineProperty(Writable.prototype, "destroyed", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { + get: function() { if (this._writableState === void 0) { return false; } return this._writableState.destroyed; }, - set: function set(value) { + set: function(value) { if (!this._writableState) { return; } @@ -73374,6 +77774,7 @@ var require_stream_writable = __commonJS({ Writable.prototype.destroy = destroyImpl.destroy; Writable.prototype._undestroy = destroyImpl.undestroy; Writable.prototype._destroy = function(err, cb) { + this.end(); cb(err); }; } @@ -73384,16 +77785,20 @@ var require_stream_duplex = __commonJS({ "node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { "use strict"; init_cjs_shim(); + var pna = require_process_nextick_args(); var objectKeys = Object.keys || function(obj2) { var keys2 = []; - for (var key in obj2) + for (var key in obj2) { keys2.push(key); + } return keys2; }; module2.exports = Duplex; + var util = Object.create(require_util3()); + util.inherits = require_inherits(); var Readable = require_stream_readable(); var Writable = require_stream_writable(); - require_inherits()(Duplex, Readable); + util.inherits(Duplex, Readable); { keys = objectKeys(Writable.prototype); for (v = 0; v < keys.length; v++) { @@ -73410,65 +77815,40 @@ var require_stream_duplex = __commonJS({ return new Duplex(options); Readable.call(this, options); Writable.call(this, options); + if (options && options.readable === false) + this.readable = false; + if (options && options.writable === false) + this.writable = false; this.allowHalfOpen = true; - if (options) { - if (options.readable === false) - this.readable = false; - if (options.writable === false) - this.writable = false; - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once("end", onend); - } - } + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + this.once("end", onend); } Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, - get: function get() { + get: function() { return this._writableState.highWaterMark; } }); - Object.defineProperty(Duplex.prototype, "writableBuffer", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } - }); - Object.defineProperty(Duplex.prototype, "writableLength", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } - }); function onend() { - if (this._writableState.ended) + if (this.allowHalfOpen || this._writableState.ended) return; - process.nextTick(onEndNT, this); + pna.nextTick(onEndNT, this); } function onEndNT(self2) { self2.end(); } Object.defineProperty(Duplex.prototype, "destroyed", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { + get: function() { if (this._readableState === void 0 || this._writableState === void 0) { return false; } return this._readableState.destroyed && this._writableState.destroyed; }, - set: function set(value) { + set: function(value) { if (this._readableState === void 0 || this._writableState === void 0) { return; } @@ -73476,6 +77856,69 @@ var require_stream_duplex = __commonJS({ this._writableState.destroyed = value; } }); + Duplex.prototype._destroy = function(err, cb) { + this.push(null); + this.end(); + pna.nextTick(cb, err); + }; + } +}); + +// node_modules/string_decoder/node_modules/safe-buffer/index.js +var require_safe_buffer3 = __commonJS({ + "node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports2, module2) { + init_cjs_shim(); + var buffer = __require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; } }); @@ -73484,7 +77927,7 @@ var require_string_decoder = __commonJS({ "node_modules/string_decoder/lib/string_decoder.js"(exports2) { "use strict"; init_cjs_shim(); - var Buffer2 = require_safe_buffer().Buffer; + var Buffer2 = require_safe_buffer3().Buffer; var isEncoding = Buffer2.isEncoding || function(encoding) { encoding = "" + encoding; switch (encoding && encoding.toLowerCase()) { @@ -73740,435 +78183,22 @@ var require_string_decoder = __commonJS({ } }); -// node_modules/readable-stream/lib/internal/streams/end-of-stream.js -var require_end_of_stream = __commonJS({ - "node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { - "use strict"; - init_cjs_shim(); - var ERR_STREAM_PREMATURE_CLOSE = require_errors4().codes.ERR_STREAM_PREMATURE_CLOSE; - function once(callback) { - var called = false; - return function() { - if (called) - return; - called = true; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - callback.apply(this, args); - }; - } - function noop() { - } - function isRequest(stream) { - return stream.setHeader && typeof stream.abort === "function"; - } - function eos(stream, opts, callback) { - if (typeof opts === "function") - return eos(stream, null, opts); - if (!opts) - opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - var onlegacyfinish = function onlegacyfinish2() { - if (!stream.writable) - onfinish(); - }; - var writableEnded = stream._writableState && stream._writableState.finished; - var onfinish = function onfinish2() { - writable = false; - writableEnded = true; - if (!readable) - callback.call(stream); - }; - var readableEnded = stream._readableState && stream._readableState.endEmitted; - var onend = function onend2() { - readable = false; - readableEnded = true; - if (!writable) - callback.call(stream); - }; - var onerror = function onerror2(err) { - callback.call(stream, err); - }; - var onclose = function onclose2() { - var err; - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) - err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) - err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - var onrequest = function onrequest2() { - stream.req.on("finish", onfinish); - }; - if (isRequest(stream)) { - stream.on("complete", onfinish); - stream.on("abort", onclose); - if (stream.req) - onrequest(); - else - stream.on("request", onrequest); - } else if (writable && !stream._writableState) { - stream.on("end", onlegacyfinish); - stream.on("close", onlegacyfinish); - } - stream.on("end", onend); - stream.on("finish", onfinish); - if (opts.error !== false) - stream.on("error", onerror); - stream.on("close", onclose); - return function() { - stream.removeListener("complete", onfinish); - stream.removeListener("abort", onclose); - stream.removeListener("request", onrequest); - if (stream.req) - stream.req.removeListener("finish", onfinish); - stream.removeListener("end", onlegacyfinish); - stream.removeListener("close", onlegacyfinish); - stream.removeListener("finish", onfinish); - stream.removeListener("end", onend); - stream.removeListener("error", onerror); - stream.removeListener("close", onclose); - }; - } - module2.exports = eos; - } -}); - -// node_modules/readable-stream/lib/internal/streams/async_iterator.js -var require_async_iterator = __commonJS({ - "node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { - "use strict"; - init_cjs_shim(); - var _Object$setPrototypeO; - function _defineProperty(obj2, key, value) { - key = _toPropertyKey(key); - if (key in obj2) { - Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); - } else { - obj2[key] = value; - } - return obj2; - } - function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); - } - function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) - return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== void 0) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") - return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); - } - var finished = require_end_of_stream(); - var kLastResolve = Symbol("lastResolve"); - var kLastReject = Symbol("lastReject"); - var kError = Symbol("error"); - var kEnded = Symbol("ended"); - var kLastPromise = Symbol("lastPromise"); - var kHandlePromise = Symbol("handlePromise"); - var kStream = Symbol("stream"); - function createIterResult(value, done) { - return { - value, - done - }; - } - function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - if (resolve !== null) { - var data = iter[kStream].read(); - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } - } - function onReadable(iter) { - process.nextTick(readAndResolve, iter); - } - function wrapForNext(lastPromise, iter) { - return function(resolve, reject) { - lastPromise.then(function() { - if (iter[kEnded]) { - resolve(createIterResult(void 0, true)); - return; - } - iter[kHandlePromise](resolve, reject); - }, reject); - }; - } - var AsyncIteratorPrototype = Object.getPrototypeOf(function() { - }); - var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - next: function next() { - var _this = this; - var error = this[kError]; - if (error !== null) { - return Promise.reject(error); - } - if (this[kEnded]) { - return Promise.resolve(createIterResult(void 0, true)); - } - if (this[kStream].destroyed) { - return new Promise(function(resolve, reject) { - process.nextTick(function() { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(void 0, true)); - } - }); - }); - } - var lastPromise = this[kLastPromise]; - var promise; - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - var data = this[kStream].read(); - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - promise = new Promise(this[kHandlePromise]); - } - this[kLastPromise] = promise; - return promise; - } - }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { - return this; - }), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - return new Promise(function(resolve, reject) { - _this2[kStream].destroy(null, function(err) { - if (err) { - reject(err); - return; - } - resolve(createIterResult(void 0, true)); - }); - }); - }), _Object$setPrototypeO), AsyncIteratorPrototype); - var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) { - var _Object$create; - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function(err) { - if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { - var reject = iterator[kLastReject]; - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - iterator[kError] = err; - return; - } - var resolve = iterator[kLastResolve]; - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(void 0, true)); - } - iterator[kEnded] = true; - }); - stream.on("readable", onReadable.bind(null, iterator)); - return iterator; - }; - module2.exports = createReadableStreamAsyncIterator; - } -}); - -// node_modules/readable-stream/lib/internal/streams/from.js -var require_from = __commonJS({ - "node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { - "use strict"; - init_cjs_shim(); - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } - } - function _asyncToGenerator(fn) { - return function() { - var self2 = this, args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self2, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); - } - _next(void 0); - }); - }; - } - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - return keys; - } - function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), true).forEach(function(key) { - _defineProperty(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - return target; - } - function _defineProperty(obj2, key, value) { - key = _toPropertyKey(key); - if (key in obj2) { - Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); - } else { - obj2[key] = value; - } - return obj2; - } - function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); - } - function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) - return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== void 0) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") - return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); - } - var ERR_INVALID_ARG_TYPE = require_errors4().codes.ERR_INVALID_ARG_TYPE; - function from(Readable, iterable, opts) { - var iterator; - if (iterable && typeof iterable.next === "function") { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) - iterator = iterable[Symbol.asyncIterator](); - else if (iterable && iterable[Symbol.iterator]) - iterator = iterable[Symbol.iterator](); - else - throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); - var reading = false; - readable._read = function() { - if (!reading) { - reading = true; - next(); - } - }; - function next() { - return _next2.apply(this, arguments); - } - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _yield$iterator$next = yield iterator.next(), value = _yield$iterator$next.value, done = _yield$iterator$next.done; - if (done) { - readable.push(null); - } else if (readable.push(yield value)) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); - } - return readable; - } - module2.exports = from; - } -}); - // node_modules/readable-stream/lib/_stream_readable.js var require_stream_readable = __commonJS({ "node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { "use strict"; init_cjs_shim(); + var pna = require_process_nextick_args(); module2.exports = Readable; + var isArray = require_isarray(); var Duplex; Readable.ReadableState = ReadableState; var EE = __require("events").EventEmitter; - var EElistenerCount = function EElistenerCount2(emitter, type) { + var EElistenerCount = function(emitter, type) { return emitter.listeners(type).length; }; var Stream = require_stream(); - var Buffer2 = __require("buffer").Buffer; + var Buffer2 = require_safe_buffer2().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { @@ -74177,48 +78207,48 @@ var require_stream_readable = __commonJS({ function _isUint8Array(obj2) { return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; } + var util = Object.create(require_util3()); + util.inherits = require_inherits(); var debugUtil = __require("util"); - var debug; + var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog("stream"); } else { - debug = function debug2() { + debug = function() { }; } - var BufferList = require_buffer_list(); + var BufferList = require_BufferList(); var destroyImpl = require_destroy(); - var _require = require_state(); - var getHighWaterMark = _require.getHighWaterMark; - var _require$codes = require_errors4().codes; - var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; - var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF; - var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; - var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; var StringDecoder; - var createReadableStreamAsyncIterator; - var from; - require_inherits()(Readable, Stream); - var errorOrDestroy = destroyImpl.errorOrDestroy; + util.inherits(Readable, Stream); var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; function prependListener(emitter, event, fn) { if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); - else if (Array.isArray(emitter._events[event])) + else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn); else emitter._events[event] = [fn, emitter._events[event]]; } - function ReadableState(options, stream, isDuplex) { + function ReadableState(options, stream) { Duplex = Duplex || require_stream_duplex(); options = options || {}; - if (typeof isDuplex !== "boolean") - isDuplex = stream instanceof Duplex; + var isDuplex = stream instanceof Duplex; this.objectMode = !!options.objectMode; if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex); + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) + this.highWaterMark = hwm; + else if (isDuplex && (readableHwm || readableHwm === 0)) + this.highWaterMark = readableHwm; + else + this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); this.buffer = new BufferList(); this.length = 0; this.pipes = null; @@ -74232,9 +78262,6 @@ var require_stream_readable = __commonJS({ this.emittedReadable = false; this.readableListening = false; this.resumeScheduled = false; - this.paused = true; - this.emitClose = options.emitClose !== false; - this.autoDestroy = !!options.autoDestroy; this.destroyed = false; this.defaultEncoding = options.defaultEncoding || "utf8"; this.awaitDrain = 0; @@ -74252,8 +78279,7 @@ var require_stream_readable = __commonJS({ Duplex = Duplex || require_stream_duplex(); if (!(this instanceof Readable)) return new Readable(options); - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); + this._readableState = new ReadableState(options, this); this.readable = true; if (options) { if (typeof options.read === "function") @@ -74264,17 +78290,13 @@ var require_stream_readable = __commonJS({ Stream.call(this); } Object.defineProperty(Readable.prototype, "destroyed", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { + get: function() { if (this._readableState === void 0) { return false; } return this._readableState.destroyed; }, - set: function set(value) { + set: function(value) { if (!this._readableState) { return; } @@ -74284,6 +78306,7 @@ var require_stream_readable = __commonJS({ Readable.prototype.destroy = destroyImpl.destroy; Readable.prototype._undestroy = destroyImpl.undestroy; Readable.prototype._destroy = function(err, cb) { + this.push(null); cb(err); }; Readable.prototype.push = function(chunk, encoding) { @@ -74307,7 +78330,6 @@ var require_stream_readable = __commonJS({ return readableAddChunk(this, chunk, null, true, false); }; function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug("readableAddChunk", chunk); var state = stream._readableState; if (chunk === null) { state.reading = false; @@ -74317,20 +78339,18 @@ var require_stream_readable = __commonJS({ if (!skipChunkCheck) er = chunkInvalid(state, chunk); if (er) { - errorOrDestroy(stream, er); + stream.emit("error", er); } else if (state.objectMode || chunk && chunk.length > 0) { if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { chunk = _uint8ArrayToBuffer(chunk); } if (addToFront) { if (state.endEmitted) - errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); + stream.emit("error", new Error("stream.unshift() after end event")); else addChunk(stream, state, chunk, true); } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; + stream.emit("error", new Error("stream.push() after EOF")); } else { state.reading = false; if (state.decoder && !encoding) { @@ -74345,15 +78365,14 @@ var require_stream_readable = __commonJS({ } } else if (!addToFront) { state.reading = false; - maybeReadMore(stream, state); } } - return !state.ended && (state.length < state.highWaterMark || state.length === 0); + return needMoreData(state); } function addChunk(stream, state, chunk, addToFront) { if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; stream.emit("data", chunk); + stream.read(0); } else { state.length += state.objectMode ? 1 : chunk.length; if (addToFront) @@ -74368,32 +78387,24 @@ var require_stream_readable = __commonJS({ function chunkInvalid(state, chunk) { var er; if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); + er = new TypeError("Invalid non-string/buffer chunk"); } return er; } + function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); + } Readable.prototype.isPaused = function() { return this._readableState.flowing === false; }; Readable.prototype.setEncoding = function(enc) { if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; - this._readableState.encoding = this._readableState.decoder.encoding; - var p = this._readableState.buffer.head; - var content = ""; - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - this._readableState.buffer.clear(); - if (content !== "") - this._readableState.buffer.push(content); - this._readableState.length = content.length; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; return this; }; - var MAX_HWM = 1073741824; + var MAX_HWM = 8388608; function computeNewHighWaterMark(n) { if (n >= MAX_HWM) { n = MAX_HWM; @@ -74436,7 +78447,7 @@ var require_stream_readable = __commonJS({ var nOrig = n; if (n !== 0) state.emittedReadable = false; - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { debug("read: emitReadable", state.length, state.ended); if (state.length === 0 && state.ended) endReadable(this); @@ -74476,11 +78487,10 @@ var require_stream_readable = __commonJS({ else ret2 = null; if (ret2 === null) { - state.needReadable = state.length <= state.highWaterMark; + state.needReadable = true; n = 0; } else { state.length -= n; - state.awaitDrain = 0; } if (state.length === 0) { if (!state.ended) @@ -74493,7 +78503,6 @@ var require_stream_readable = __commonJS({ return ret2; }; function onEofChunk(stream, state) { - debug("onEofChunk"); if (state.ended) return; if (state.decoder) { @@ -74504,54 +78513,45 @@ var require_stream_readable = __commonJS({ } } state.ended = true; - if (state.sync) { - emitReadable(stream); - } else { - state.needReadable = false; - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); - } - } + emitReadable(stream); } function emitReadable(stream) { var state = stream._readableState; - debug("emitReadable", state.needReadable, state.emittedReadable); state.needReadable = false; if (!state.emittedReadable) { debug("emitReadable", state.flowing); state.emittedReadable = true; - process.nextTick(emitReadable_, stream); + if (state.sync) + pna.nextTick(emitReadable_, stream); + else + emitReadable_(stream); } } function emitReadable_(stream) { - var state = stream._readableState; - debug("emitReadable_", state.destroyed, state.length, state.ended); - if (!state.destroyed && (state.length || state.ended)) { - stream.emit("readable"); - state.emittedReadable = false; - } - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + debug("emit readable"); + stream.emit("readable"); flow(stream); } function maybeReadMore(stream, state) { if (!state.readingMore) { state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); + pna.nextTick(maybeReadMore_, stream, state); } } function maybeReadMore_(stream, state) { - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { debug("maybeReadMore read 0"); stream.read(0); if (len === state.length) break; + else + len = state.length; } state.readingMore = false; } Readable.prototype._read = function(n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()")); + this.emit("error", new Error("_read() is not implemented")); }; Readable.prototype.pipe = function(dest, pipeOpts) { var src = this; @@ -74572,7 +78572,7 @@ var require_stream_readable = __commonJS({ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; var endFn = doEnd ? onend : unpipe; if (state.endEmitted) - process.nextTick(endFn); + pna.nextTick(endFn); else src.once("end", endFn); dest.on("unpipe", onunpipe); @@ -74606,15 +78606,17 @@ var require_stream_readable = __commonJS({ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); } + var increasedAwaitDrain = false; src.on("data", ondata); function ondata(chunk) { debug("ondata"); + increasedAwaitDrain = false; var ret2 = dest.write(chunk); - debug("dest.write", ret2); - if (ret2 === false) { + if (false === ret2 && !increasedAwaitDrain) { if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { debug("false write response, pause", state.awaitDrain); state.awaitDrain++; + increasedAwaitDrain = true; } src.pause(); } @@ -74624,7 +78626,7 @@ var require_stream_readable = __commonJS({ unpipe(); dest.removeListener("error", onerror); if (EElistenerCount(dest, "error") === 0) - errorOrDestroy(dest, er); + dest.emit("error", er); } prependListener(dest, "error", onerror); function onclose() { @@ -74650,7 +78652,7 @@ var require_stream_readable = __commonJS({ return dest; }; function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { + return function() { var state = src._readableState; debug("pipeOnDrain", state.awaitDrain); if (state.awaitDrain) @@ -74663,9 +78665,7 @@ var require_stream_readable = __commonJS({ } Readable.prototype.unpipe = function(dest) { var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; + var unpipeInfo = { hasUnpiped: false }; if (state.pipesCount === 0) return this; if (state.pipesCount === 1) { @@ -74686,10 +78686,9 @@ var require_stream_readable = __commonJS({ state.pipes = null; state.pipesCount = 0; state.flowing = false; - for (var i = 0; i < len; i++) - dests[i].emit("unpipe", this, { - hasUnpiped: false - }); + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, { hasUnpiped: false }); + } return this; } var index = indexOf(state.pipes, dest); @@ -74704,50 +78703,24 @@ var require_stream_readable = __commonJS({ }; Readable.prototype.on = function(ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; if (ev === "data") { - state.readableListening = this.listenerCount("readable") > 0; - if (state.flowing !== false) + if (this._readableState.flowing !== false) this.resume(); } else if (ev === "readable") { + var state = this._readableState; if (!state.endEmitted && !state.readableListening) { state.readableListening = state.needReadable = true; - state.flowing = false; state.emittedReadable = false; - debug("on readable", state.length, state.reading); - if (state.length) { + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); } } } return res; }; Readable.prototype.addListener = Readable.prototype.on; - Readable.prototype.removeListener = function(ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - if (ev === "readable") { - process.nextTick(updateReadableListening, this); - } - return res; - }; - Readable.prototype.removeAllListeners = function(ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - if (ev === "readable" || ev === void 0) { - process.nextTick(updateReadableListening, this); - } - return res; - }; - function updateReadableListening(self2) { - var state = self2._readableState; - state.readableListening = self2.listenerCount("readable") > 0; - if (state.resumeScheduled && !state.paused) { - state.flowing = true; - } else if (self2.listenerCount("data") > 0) { - self2.resume(); - } - } function nReadingNextTick(self2) { debug("readable nexttick read 0"); self2.read(0); @@ -74756,24 +78729,24 @@ var require_stream_readable = __commonJS({ var state = this._readableState; if (!state.flowing) { debug("resume"); - state.flowing = !state.readableListening; + state.flowing = true; resume(this, state); } - state.paused = false; return this; }; function resume(stream, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; - process.nextTick(resume_, stream, state); + pna.nextTick(resume_, stream, state); } } function resume_(stream, state) { - debug("resume", state.reading); if (!state.reading) { + debug("resume read 0"); stream.read(0); } state.resumeScheduled = false; + state.awaitDrain = 0; stream.emit("resume"); flow(stream); if (state.flowing && !state.reading) @@ -74781,19 +78754,18 @@ var require_stream_readable = __commonJS({ } Readable.prototype.pause = function() { debug("call pause flowing=%j", this._readableState.flowing); - if (this._readableState.flowing !== false) { + if (false !== this._readableState.flowing) { debug("pause"); this._readableState.flowing = false; this.emit("pause"); } - this._readableState.paused = true; return this; }; function flow(stream) { var state = stream._readableState; debug("flow", state.flowing); - while (state.flowing && stream.read() !== null) - ; + while (state.flowing && stream.read() !== null) { + } } Readable.prototype.wrap = function(stream) { var _this = this; @@ -74824,8 +78796,8 @@ var require_stream_readable = __commonJS({ }); for (var i in stream) { if (this[i] === void 0 && typeof stream[i] === "function") { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { + this[i] = function(method) { + return function() { return stream[method].apply(stream, arguments); }; }(i); @@ -74843,56 +78815,16 @@ var require_stream_readable = __commonJS({ }; return this; }; - if (typeof Symbol === "function") { - Readable.prototype[Symbol.asyncIterator] = function() { - if (createReadableStreamAsyncIterator === void 0) { - createReadableStreamAsyncIterator = require_async_iterator(); - } - return createReadableStreamAsyncIterator(this); - }; - } Object.defineProperty(Readable.prototype, "readableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, - get: function get() { + get: function() { return this._readableState.highWaterMark; } }); - Object.defineProperty(Readable.prototype, "readableBuffer", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } - }); - Object.defineProperty(Readable.prototype, "readableFlowing", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } - }); Readable._fromList = fromList; - Object.defineProperty(Readable.prototype, "readableLength", { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } - }); function fromList(n, state) { if (state.length === 0) return null; @@ -74903,45 +78835,103 @@ var require_stream_readable = __commonJS({ if (state.decoder) ret2 = state.buffer.join(""); else if (state.buffer.length === 1) - ret2 = state.buffer.first(); + ret2 = state.buffer.head.data; else ret2 = state.buffer.concat(state.length); state.buffer.clear(); } else { - ret2 = state.buffer.consume(n, state.decoder); + ret2 = fromListPartial(n, state.buffer, state.decoder); + } + return ret2; + } + function fromListPartial(n, list, hasStrings) { + var ret2; + if (n < list.head.data.length) { + ret2 = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + ret2 = list.shift(); + } else { + ret2 = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret2; + } + function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret2 = p.data; + n -= ret2.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) + ret2 += str; + else + ret2 += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) + list.head = p.next; + else + list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; } + list.length -= c; + return ret2; + } + function copyFromBuffer(n, list) { + var ret2 = Buffer2.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret2); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret2, ret2.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) + list.head = p.next; + else + list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; return ret2; } function endReadable(stream) { var state = stream._readableState; - debug("endReadable", state.endEmitted); + if (state.length > 0) + throw new Error('"endReadable()" called on non-empty stream'); if (!state.endEmitted) { state.ended = true; - process.nextTick(endReadableNT, state, stream); + pna.nextTick(endReadableNT, state, stream); } } function endReadableNT(state, stream) { - debug("endReadableNT", state.endEmitted, state.length); if (!state.endEmitted && state.length === 0) { state.endEmitted = true; stream.readable = false; stream.emit("end"); - if (state.autoDestroy) { - var wState = stream._writableState; - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } - } } } - if (typeof Symbol === "function") { - Readable.from = function(iterable, opts) { - if (from === void 0) { - from = require_from(); - } - return from(Readable, iterable, opts); - }; - } function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) @@ -74958,19 +78948,16 @@ var require_stream_transform = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = Transform; - var _require$codes = require_errors4().codes; - var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; - var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; - var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING; - var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; var Duplex = require_stream_duplex(); - require_inherits()(Transform, Duplex); + var util = Object.create(require_util3()); + util.inherits = require_inherits(); + util.inherits(Transform, Duplex); function afterTransform(er, data) { var ts = this._transformState; ts.transforming = false; var cb = ts.writecb; - if (cb === null) { - return this.emit("error", new ERR_MULTIPLE_CALLBACK()); + if (!cb) { + return this.emit("error", new Error("write callback called multiple times")); } ts.writechunk = null; ts.writecb = null; @@ -75007,7 +78994,7 @@ var require_stream_transform = __commonJS({ } function prefinish() { var _this = this; - if (typeof this._flush === "function" && !this._readableState.destroyed) { + if (typeof this._flush === "function") { this._flush(function(er, data) { done(_this, er, data); }); @@ -75020,7 +79007,7 @@ var require_stream_transform = __commonJS({ return Duplex.prototype.push.call(this, chunk, encoding); }; Transform.prototype._transform = function(chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()")); + throw new Error("_transform() is not implemented"); }; Transform.prototype._write = function(chunk, encoding, cb) { var ts = this._transformState; @@ -75035,7 +79022,7 @@ var require_stream_transform = __commonJS({ }; Transform.prototype._read = function(n) { var ts = this._transformState; - if (ts.writechunk !== null && !ts.transforming) { + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { ts.transforming = true; this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); } else { @@ -75043,8 +79030,10 @@ var require_stream_transform = __commonJS({ } }; Transform.prototype._destroy = function(err, cb) { + var _this2 = this; Duplex.prototype._destroy.call(this, err, function(err2) { cb(err2); + _this2.emit("close"); }); }; function done(stream, er, data) { @@ -75053,9 +79042,9 @@ var require_stream_transform = __commonJS({ if (data != null) stream.push(data); if (stream._writableState.length) - throw new ERR_TRANSFORM_WITH_LENGTH_0(); + throw new Error("Calling transform done when ws.length != 0"); if (stream._transformState.transforming) - throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + throw new Error("Calling transform done when still transforming"); return stream.push(null); } } @@ -75068,7 +79057,9 @@ var require_stream_passthrough = __commonJS({ init_cjs_shim(); module2.exports = PassThrough; var Transform = require_stream_transform(); - require_inherits()(PassThrough, Transform); + var util = Object.create(require_util3()); + util.inherits = require_inherits(); + util.inherits(PassThrough, Transform); function PassThrough(options) { if (!(this instanceof PassThrough)) return new PassThrough(options); @@ -75080,115 +79071,20 @@ var require_stream_passthrough = __commonJS({ } }); -// node_modules/readable-stream/lib/internal/streams/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { - "use strict"; - init_cjs_shim(); - var eos; - function once(callback) { - var called = false; - return function() { - if (called) - return; - called = true; - callback.apply(void 0, arguments); - }; - } - var _require$codes = require_errors4().codes; - var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS; - var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; - function noop(err) { - if (err) - throw err; - } - function isRequest(stream) { - return stream.setHeader && typeof stream.abort === "function"; - } - function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on("close", function() { - closed = true; - }); - if (eos === void 0) - eos = require_end_of_stream(); - eos(stream, { - readable: reading, - writable: writing - }, function(err) { - if (err) - return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function(err) { - if (closed) - return; - if (destroyed) - return; - destroyed = true; - if (isRequest(stream)) - return stream.abort(); - if (typeof stream.destroy === "function") - return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED("pipe")); - }; - } - function call(fn) { - fn(); - } - function pipe(from, to) { - return from.pipe(to); - } - function popCallback(streams) { - if (!streams.length) - return noop; - if (typeof streams[streams.length - 1] !== "function") - return noop; - return streams.pop(); - } - function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - var callback = popCallback(streams); - if (Array.isArray(streams[0])) - streams = streams[0]; - if (streams.length < 2) { - throw new ERR_MISSING_ARGS("streams"); - } - var error; - var destroys = streams.map(function(stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function(err) { - if (!error) - error = err; - if (err) - destroys.forEach(call); - if (reading) - return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); - } - module2.exports = pipeline; - } -}); - // node_modules/readable-stream/readable.js var require_readable = __commonJS({ "node_modules/readable-stream/readable.js"(exports2, module2) { init_cjs_shim(); var Stream = __require("stream"); if (process.env.READABLE_STREAM === "disable" && Stream) { - module2.exports = Stream.Readable; - Object.assign(module2.exports, Stream); - module2.exports.Stream = Stream; + module2.exports = Stream; + exports2 = module2.exports = Stream.Readable; + exports2.Readable = Stream.Readable; + exports2.Writable = Stream.Writable; + exports2.Duplex = Stream.Duplex; + exports2.Transform = Stream.Transform; + exports2.PassThrough = Stream.PassThrough; + exports2.Stream = Stream; } else { exports2 = module2.exports = require_stream_readable(); exports2.Stream = Stream || exports2; @@ -75197,8 +79093,6 @@ var require_readable = __commonJS({ exports2.Duplex = require_stream_duplex(); exports2.Transform = require_stream_transform(); exports2.PassThrough = require_stream_passthrough(); - exports2.finished = require_end_of_stream(); - exports2.pipeline = require_pipeline(); } } }); @@ -75384,7 +79278,7 @@ var require_api = __commonJS({ var require_bindings2 = __commonJS({ "node_modules/ethereumjs-util/node_modules/keccak/bindings.js"(exports2, module2) { init_cjs_shim(); - var nativeAddon = require_node_gyp_build2()(__dirname); + var nativeAddon = require_node_gyp_build7()(__dirname); if (typeof nativeAddon !== "function") { throw new Error("Native add-on failed to load"); } @@ -75716,7 +79610,7 @@ var require_create_hash = __commonJS({ }); // node_modules/ethereumjs-util/dist/hash.js -var require_hash3 = __commonJS({ +var require_hash5 = __commonJS({ "node_modules/ethereumjs-util/dist/hash.js"(exports2) { "use strict"; init_cjs_shim(); @@ -75895,7 +79789,7 @@ var require_account3 = __commonJS({ var internal_1 = require_internal2(); var constants_1 = require_constants7(); var bytes_1 = require_bytes4(); - var hash_1 = require_hash3(); + var hash_1 = require_hash5(); var helpers_1 = require_helpers5(); var types_1 = require_types2(); var Account = class { @@ -76206,7 +80100,7 @@ var require_signature6 = __commonJS({ var secp256k1_1 = require_secp256k16(); var externals_1 = require_externals(); var bytes_1 = require_bytes4(); - var hash_1 = require_hash3(); + var hash_1 = require_hash5(); var helpers_1 = require_helpers5(); var types_1 = require_types2(); function ecsign(msgHash, privateKey, chainId) { @@ -76455,7 +80349,7 @@ var require_dist5 = __commonJS({ __exportStar(require_constants7(), exports2); __exportStar(require_account3(), exports2); __exportStar(require_address3(), exports2); - __exportStar(require_hash3(), exports2); + __exportStar(require_hash5(), exports2); __exportStar(require_signature6(), exports2); __exportStar(require_bytes4(), exports2); __exportStar(require_object(), exports2); @@ -78484,7 +82378,7 @@ var require_hardforks = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/1153.json -var require__6 = __commonJS({ +var require__16 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/1153.json"(exports2, module2) { module2.exports = { name: "EIP-1153", @@ -78512,7 +82406,7 @@ var require__6 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/1559.json -var require__7 = __commonJS({ +var require__17 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/1559.json"(exports2, module2) { module2.exports = { name: "EIP-1559", @@ -78544,7 +82438,7 @@ var require__7 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/2315.json -var require__8 = __commonJS({ +var require__18 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/2315.json"(exports2, module2) { module2.exports = { name: "EIP-2315", @@ -78575,7 +82469,7 @@ var require__8 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/2537.json -var require__9 = __commonJS({ +var require__19 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/2537.json"(exports2, module2) { module2.exports = { name: "EIP-2537", @@ -78630,7 +82524,7 @@ var require__9 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/2565.json -var require__10 = __commonJS({ +var require__20 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/2565.json"(exports2, module2) { module2.exports = { name: "EIP-2565", @@ -78653,7 +82547,7 @@ var require__10 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/2718.json -var require__11 = __commonJS({ +var require__21 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/2718.json"(exports2, module2) { module2.exports = { name: "EIP-2718", @@ -78670,7 +82564,7 @@ var require__11 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/2929.json -var require__12 = __commonJS({ +var require__22 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/2929.json"(exports2, module2) { module2.exports = { name: "EIP-2929", @@ -78760,7 +82654,7 @@ var require__12 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/2930.json -var require__13 = __commonJS({ +var require__23 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/2930.json"(exports2, module2) { module2.exports = { name: "EIP-2930", @@ -78787,7 +82681,7 @@ var require__13 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3198.json -var require__14 = __commonJS({ +var require__24 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3198.json"(exports2, module2) { module2.exports = { name: "EIP-3198", @@ -78810,7 +82704,7 @@ var require__14 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3529.json -var require__15 = __commonJS({ +var require__25 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3529.json"(exports2, module2) { module2.exports = { name: "EIP-3529", @@ -78842,7 +82736,7 @@ var require__15 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3540.json -var require__16 = __commonJS({ +var require__26 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3540.json"(exports2, module2) { module2.exports = { name: "EIP-3540", @@ -78863,7 +82757,7 @@ var require__16 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3541.json -var require__17 = __commonJS({ +var require__27 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3541.json"(exports2, module2) { module2.exports = { name: "EIP-3541", @@ -78881,7 +82775,7 @@ var require__17 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3554.json -var require__18 = __commonJS({ +var require__28 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3554.json"(exports2, module2) { module2.exports = { name: "EIP-3554", @@ -78904,7 +82798,7 @@ var require__18 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3607.json -var require__19 = __commonJS({ +var require__29 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3607.json"(exports2, module2) { module2.exports = { name: "EIP-3607", @@ -78923,7 +82817,7 @@ var require__19 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3651.json -var require__20 = __commonJS({ +var require__30 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3651.json"(exports2, module2) { module2.exports = { name: "EIP-3651", @@ -78942,7 +82836,7 @@ var require__20 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3670.json -var require__21 = __commonJS({ +var require__31 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3670.json"(exports2, module2) { module2.exports = { name: "EIP-3670", @@ -78963,7 +82857,7 @@ var require__21 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3675.json -var require__22 = __commonJS({ +var require__32 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3675.json"(exports2, module2) { module2.exports = { name: "EIP-3675", @@ -78982,7 +82876,7 @@ var require__22 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3855.json -var require__23 = __commonJS({ +var require__33 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3855.json"(exports2, module2) { module2.exports = { name: "EIP-3855", @@ -79006,7 +82900,7 @@ var require__23 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/3860.json -var require__24 = __commonJS({ +var require__34 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/3860.json"(exports2, module2) { module2.exports = { name: "EIP-3860", @@ -79035,7 +82929,7 @@ var require__24 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/4345.json -var require__25 = __commonJS({ +var require__35 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/4345.json"(exports2, module2) { module2.exports = { name: "EIP-4345", @@ -79058,7 +82952,7 @@ var require__25 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/4399.json -var require__26 = __commonJS({ +var require__36 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/4399.json"(exports2, module2) { module2.exports = { name: "EIP-4399", @@ -79077,7 +82971,7 @@ var require__26 = __commonJS({ }); // node_modules/@ethereumjs/common/dist/eips/5133.json -var require__27 = __commonJS({ +var require__37 = __commonJS({ "node_modules/@ethereumjs/common/dist/eips/5133.json"(exports2, module2) { module2.exports = { name: "EIP-5133", @@ -79107,28 +83001,28 @@ var require_eips = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EIPs = void 0; exports2.EIPs = { - 1153: require__6(), - 1559: require__7(), - 2315: require__8(), - 2537: require__9(), - 2565: require__10(), - 2718: require__11(), - 2929: require__12(), - 2930: require__13(), - 3198: require__14(), - 3529: require__15(), - 3540: require__16(), - 3541: require__17(), - 3554: require__18(), - 3607: require__19(), - 3651: require__20(), - 3670: require__21(), - 3675: require__22(), - 3855: require__23(), - 3860: require__24(), - 4345: require__25(), - 4399: require__26(), - 5133: require__27() + 1153: require__16(), + 1559: require__17(), + 2315: require__18(), + 2537: require__19(), + 2565: require__20(), + 2718: require__21(), + 2929: require__22(), + 2930: require__23(), + 3198: require__24(), + 3529: require__25(), + 3540: require__26(), + 3541: require__27(), + 3554: require__28(), + 3607: require__29(), + 3651: require__30(), + 3670: require__31(), + 3675: require__32(), + 3855: require__33(), + 3860: require__34(), + 4345: require__35(), + 4399: require__36(), + 5133: require__37() }; } }); @@ -90149,7 +94043,7 @@ var require_baseTransaction = __commonJS({ }); // node_modules/@ethereumjs/tx/dist/util.js -var require_util3 = __commonJS({ +var require_util4 = __commonJS({ "node_modules/@ethereumjs/tx/dist/util.js"(exports2) { "use strict"; init_cjs_shim(); @@ -90264,7 +94158,7 @@ var require_legacyTransaction = __commonJS({ var ethereumjs_util_1 = require_dist5(); var types_1 = require_types3(); var baseTransaction_1 = require_baseTransaction(); - var util_1 = require_util3(); + var util_1 = require_util4(); var TRANSACTION_TYPE = 0; var Transaction = class extends baseTransaction_1.BaseTransaction { /** @@ -90603,7 +94497,7 @@ var require_eip2930Transaction = __commonJS({ var ethereumjs_util_1 = require_dist5(); var baseTransaction_1 = require_baseTransaction(); var types_1 = require_types3(); - var util_1 = require_util3(); + var util_1 = require_util4(); var TRANSACTION_TYPE = 1; var TRANSACTION_TYPE_BUFFER = Buffer.from(TRANSACTION_TYPE.toString(16).padStart(2, "0"), "hex"); var AccessListEIP2930Transaction = class extends baseTransaction_1.BaseTransaction { @@ -91058,7 +94952,7 @@ var require_eip1559Transaction = __commonJS({ var ethereumjs_util_1 = require_dist5(); var baseTransaction_1 = require_baseTransaction(); var types_1 = require_types3(); - var util_1 = require_util3(); + var util_1 = require_util4(); var TRANSACTION_TYPE = 2; var TRANSACTION_TYPE_BUFFER = Buffer.from(TRANSACTION_TYPE.toString(16).padStart(2, "0"), "hex"); var FeeMarketEIP1559Transaction = class extends baseTransaction_1.BaseTransaction { @@ -92861,7 +96755,7 @@ var require_lib54 = __commonJS({ }); // node_modules/web3-shh/node_modules/web3-core-helpers/lib/errors.js -var require_errors5 = __commonJS({ +var require_errors4 = __commonJS({ "node_modules/web3-shh/node_modules/web3-core-helpers/lib/errors.js"(exports2, module2) { "use strict"; init_cjs_shim(); @@ -92974,7 +96868,7 @@ var require_errors5 = __commonJS({ }); // node_modules/web3-shh/node_modules/web3-utils/lib/utils.js -var require_utils15 = __commonJS({ +var require_utils17 = __commonJS({ "node_modules/web3-shh/node_modules/web3-utils/lib/utils.js"(exports2, module2) { init_cjs_shim(); var BN = require_bn3(); @@ -93240,7 +97134,7 @@ var require_soliditySha34 = __commonJS({ "node_modules/web3-shh/node_modules/web3-utils/lib/soliditySha3.js"(exports2, module2) { init_cjs_shim(); var BN = require_bn3(); - var utils = require_utils15(); + var utils = require_utils17(); var _elementaryName = function(name2) { if (name2.startsWith("int[")) { return "int256" + name2.slice(3); @@ -93414,7 +97308,7 @@ var require_lib55 = __commonJS({ "node_modules/web3-shh/node_modules/web3-utils/lib/index.js"(exports2, module2) { init_cjs_shim(); var ethjsUnit = require_lib(); - var utils = require_utils15(); + var utils = require_utils17(); var soliditySha3 = require_soliditySha34(); var randombytes = require_randombytes(); var BN = require_bn3(); @@ -94136,7 +98030,7 @@ var require_lib57 = __commonJS({ "node_modules/web3-shh/node_modules/web3-core-helpers/lib/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var errors = require_errors5(); + var errors = require_errors4(); var formatters = require_formatters4(); module2.exports = { errors, @@ -97505,9 +101399,9 @@ var require_assign = __commonJS({ } }); -// node_modules/swarm-js/node_modules/universalify/index.js +// node_modules/swarm-js/node_modules/fs-extra/node_modules/universalify/index.js var require_universalify = __commonJS({ - "node_modules/swarm-js/node_modules/universalify/index.js"(exports2) { + "node_modules/swarm-js/node_modules/fs-extra/node_modules/universalify/index.js"(exports2) { "use strict"; init_cjs_shim(); exports2.fromCallback = function(fn) { @@ -99382,9 +103276,9 @@ var require_remove = __commonJS({ } }); -// node_modules/jsonfile/index.js +// node_modules/swarm-js/node_modules/fs-extra/node_modules/jsonfile/index.js var require_jsonfile = __commonJS({ - "node_modules/jsonfile/index.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/fs-extra/node_modules/jsonfile/index.js"(exports2, module2) { init_cjs_shim(); var _fs; try { @@ -100391,7 +104285,7 @@ var require_es5 = __commonJS({ }); // node_modules/bluebird/js/release/util.js -var require_util4 = __commonJS({ +var require_util5 = __commonJS({ "node_modules/bluebird/js/release/util.js"(exports, module) { "use strict"; init_cjs_shim(); @@ -100779,7 +104673,7 @@ var require_schedule = __commonJS({ "node_modules/bluebird/js/release/schedule.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var util = require_util4(); + var util = require_util5(); var schedule; var noAsyncScheduler = function() { throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n"); @@ -101027,13 +104921,13 @@ var require_async = __commonJS({ }); // node_modules/bluebird/js/release/errors.js -var require_errors6 = __commonJS({ +var require_errors5 = __commonJS({ "node_modules/bluebird/js/release/errors.js"(exports2, module2) { "use strict"; init_cjs_shim(); var es52 = require_es5(); var Objectfreeze = es52.freeze; - var util = require_util4(); + var util = require_util5(); var inherits2 = util.inherits; var notEnumerableProp2 = util.notEnumerableProp; function subError(nameProperty, defaultMessage) { @@ -101150,7 +105044,7 @@ var require_thenables = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, INTERNAL) { - var util = require_util4(); + var util = require_util5(); var errorObj2 = util.errorObj; var isObject2 = util.isObject; function tryConvertToPromise(obj2, context) { @@ -101241,7 +105135,7 @@ var require_promise_array = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, Proxyable) { - var util = require_util4(); + var util = require_util5(); var isArray = util.isArray; function toResolutionValue(val) { switch (val) { @@ -101498,8 +105392,8 @@ var require_debuggability = __commonJS({ init_cjs_shim(); module2.exports = function(Promise2, Context, enableAsyncHooks, disableAsyncHooks) { var async = Promise2._async; - var Warning = require_errors6().Warning; - var util = require_util4(); + var Warning = require_errors5().Warning; + var util = require_util5(); var es52 = require_es5(); var canAttachTrace2 = util.canAttachTrace; var unhandledRejectionHandled; @@ -102439,7 +106333,7 @@ var require_catch_filter = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(NEXT_FILTER) { - var util = require_util4(); + var util = require_util5(); var getKeys = require_es5().keys; var tryCatch2 = util.tryCatch; var errorObj2 = util.errorObj; @@ -102485,7 +106379,7 @@ var require_finally = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, tryConvertToPromise, NEXT_FILTER) { - var util = require_util4(); + var util = require_util5(); var CancellationError = Promise2.CancellationError; var errorObj2 = util.errorObj; var catchFilter = require_catch_filter()(NEXT_FILTER); @@ -102632,9 +106526,9 @@ var require_nodeback = __commonJS({ "node_modules/bluebird/js/release/nodeback.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var util = require_util4(); + var util = require_util5(); var maybeWrapAsError2 = util.maybeWrapAsError; - var errors = require_errors6(); + var errors = require_errors5(); var OperationalError = errors.OperationalError; var es52 = require_es5(); function isUntypedError(obj2) { @@ -102692,7 +106586,7 @@ var require_method = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, debug) { - var util = require_util4(); + var util = require_util5(); var tryCatch2 = util.tryCatch; Promise2.method = function(fn) { if (typeof fn !== "function") { @@ -102830,7 +106724,7 @@ var require_cancel = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, PromiseArray, apiRejection, debug) { - var util = require_util4(); + var util = require_util5(); var tryCatch2 = util.tryCatch; var errorObj2 = util.errorObj; var async = Promise2._async; @@ -103113,7 +107007,7 @@ var require_join = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, INTERNAL, async) { - var util = require_util4(); + var util = require_util5(); var canEvaluate2 = util.canEvaluate; var tryCatch2 = util.tryCatch; var errorObj2 = util.errorObj; @@ -103238,7 +107132,7 @@ var require_call_get = __commonJS({ var callerCache; var getterCache; module2.exports = function(Promise2) { - var util = require_util4(); + var util = require_util5(); var canEvaluate2 = util.canEvaluate; var isIdentifier2 = util.isIdentifier; var getMethodCaller; @@ -103348,9 +107242,9 @@ var require_generators = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug) { - var errors = require_errors6(); + var errors = require_errors5(); var TypeError2 = errors.TypeError; - var util = require_util4(); + var util = require_util5(); var errorObj2 = util.errorObj; var tryCatch2 = util.tryCatch; var yieldHandlers = []; @@ -103567,7 +107461,7 @@ var require_map = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) { - var util = require_util4(); + var util = require_util5(); var tryCatch2 = util.tryCatch; var errorObj2 = util.errorObj; var async = Promise2._async; @@ -103731,7 +107625,7 @@ var require_nodeify = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2) { - var util = require_util4(); + var util = require_util5(); var async = Promise2._async; var tryCatch2 = util.tryCatch; var errorObj2 = util.errorObj; @@ -103791,12 +107685,12 @@ var require_promisify = __commonJS({ init_cjs_shim(); module2.exports = function(Promise2, INTERNAL) { var THIS = {}; - var util = require_util4(); + var util = require_util5(); var nodebackForPromise = require_nodeback(); var withAppended2 = util.withAppended; var maybeWrapAsError2 = util.maybeWrapAsError; var canEvaluate2 = util.canEvaluate; - var TypeError2 = require_errors6().TypeError; + var TypeError2 = require_errors5().TypeError; var defaultSuffix = "Async"; var defaultPromisified = { __isPromisified__: true }; var noCopyProps = [ @@ -104066,7 +107960,7 @@ var require_props = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, apiRejection) { - var util = require_util4(); + var util = require_util5(); var isObject2 = util.isObject; var es52 = require_es5(); var Es6Map; @@ -104183,7 +108077,7 @@ var require_race = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection) { - var util = require_util4(); + var util = require_util5(); var raceLater = function(promise) { return promise.then(function(array) { return race(array, promise); @@ -104229,7 +108123,7 @@ var require_reduce = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) { - var util = require_util4(); + var util = require_util5(); var tryCatch2 = util.tryCatch; function ReductionPromiseArray(promises, fn, initialValue, _each) { this.constructor$(promises); @@ -104398,7 +108292,7 @@ var require_settle = __commonJS({ init_cjs_shim(); module2.exports = function(Promise2, PromiseArray, debug) { var PromiseInspection = Promise2.PromiseInspection; - var util = require_util4(); + var util = require_util5(); function SettledPromiseArray(values) { this.constructor$(values); } @@ -104444,9 +108338,9 @@ var require_some = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, PromiseArray, apiRejection) { - var util = require_util4(); - var RangeError2 = require_errors6().RangeError; - var AggregateError = require_errors6().AggregateError; + var util = require_util5(); + var RangeError2 = require_errors5().RangeError; + var AggregateError = require_errors5().AggregateError; var isArray = util.isArray; var CANCELLATION = {}; function SomePromiseArray(values) { @@ -104573,7 +108467,7 @@ var require_timers = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, INTERNAL, debug) { - var util = require_util4(); + var util = require_util5(); var TimeoutError = Promise2.TimeoutError; function HandleWrapper(handle) { this.handle = handle; @@ -104673,9 +108567,9 @@ var require_using = __commonJS({ "use strict"; init_cjs_shim(); module2.exports = function(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug) { - var util = require_util4(); - var TypeError2 = require_errors6().TypeError; - var inherits2 = require_util4().inherits; + var util = require_util5(); + var TypeError2 = require_errors5().TypeError; + var inherits2 = require_util5().inherits; var errorObj2 = util.errorObj; var tryCatch2 = util.tryCatch; var NULL = {}; @@ -104970,7 +108864,7 @@ var require_promise = __commonJS({ function Proxyable() { } var UNDEFINED_BINDING = {}; - var util = require_util4(); + var util = require_util5(); util.setReflectHandler(reflectHandler2); var getDomain = function() { var domain = process.domain; @@ -105009,7 +108903,7 @@ var require_promise = __commonJS({ var Async = require_async(); var async = new Async(); es52.defineProperty(Promise2, "_async", { value: async }); - var errors = require_errors6(); + var errors = require_errors5(); var TypeError2 = Promise2.TypeError = errors.TypeError; Promise2.RangeError = errors.RangeError; var CancellationError = Promise2.CancellationError = errors.CancellationError; @@ -106148,9 +110042,9 @@ var require_dist8 = __commonJS({ } }); -// node_modules/p-cancelable/index.js +// node_modules/swarm-js/node_modules/got/node_modules/p-cancelable/index.js var require_p_cancelable = __commonJS({ - "node_modules/p-cancelable/index.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/p-cancelable/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var CancelError = class extends Error { @@ -106292,9 +110186,9 @@ var require_source = __commonJS({ } }); -// node_modules/@szmarczak/http-timer/dist/source/index.js +// node_modules/swarm-js/node_modules/got/node_modules/@szmarczak/http-timer/dist/source/index.js var require_source2 = __commonJS({ - "node_modules/@szmarczak/http-timer/dist/source/index.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/@szmarczak/http-timer/dist/source/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -106415,9 +110309,9 @@ var require_source2 = __commonJS({ } }); -// node_modules/cacheable-lookup/source/index.js +// node_modules/swarm-js/node_modules/got/node_modules/cacheable-lookup/source/index.js var require_source3 = __commonJS({ - "node_modules/cacheable-lookup/source/index.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/cacheable-lookup/source/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { @@ -106997,7 +110891,7 @@ var require_once = __commonJS({ }); // node_modules/end-of-stream/index.js -var require_end_of_stream2 = __commonJS({ +var require_end_of_stream = __commonJS({ "node_modules/end-of-stream/index.js"(exports2, module2) { init_cjs_shim(); var once = require_once(); @@ -107097,7 +110991,7 @@ var require_pump = __commonJS({ "node_modules/pump/index.js"(exports2, module2) { init_cjs_shim(); var once = require_once(); - var eos = require_end_of_stream2(); + var eos = require_end_of_stream(); var fs; try { fs = __require("fs"); @@ -107181,9 +111075,9 @@ var require_pump = __commonJS({ } }); -// node_modules/get-stream/buffer-stream.js +// node_modules/cacheable-request/node_modules/get-stream/buffer-stream.js var require_buffer_stream = __commonJS({ - "node_modules/get-stream/buffer-stream.js"(exports2, module2) { + "node_modules/cacheable-request/node_modules/get-stream/buffer-stream.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { PassThrough: PassThroughStream } = __require("stream"); @@ -107227,9 +111121,9 @@ var require_buffer_stream = __commonJS({ } }); -// node_modules/get-stream/index.js +// node_modules/cacheable-request/node_modules/get-stream/index.js var require_get_stream = __commonJS({ - "node_modules/get-stream/index.js"(exports2, module2) { + "node_modules/cacheable-request/node_modules/get-stream/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { constants: BufferConstants } = __require("buffer"); @@ -107754,9 +111648,9 @@ var require_http_cache_semantics = __commonJS({ } }); -// node_modules/lowercase-keys/index.js +// node_modules/responselike/node_modules/lowercase-keys/index.js var require_lowercase_keys = __commonJS({ - "node_modules/lowercase-keys/index.js"(exports2, module2) { + "node_modules/responselike/node_modules/lowercase-keys/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); module2.exports = (object) => { @@ -107770,7 +111664,7 @@ var require_lowercase_keys = __commonJS({ }); // node_modules/responselike/src/index.js -var require_src13 = __commonJS({ +var require_src14 = __commonJS({ "node_modules/responselike/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); @@ -107805,9 +111699,24 @@ var require_src13 = __commonJS({ } }); -// node_modules/mimic-response/index.js +// node_modules/cacheable-request/node_modules/lowercase-keys/index.js +var require_lowercase_keys2 = __commonJS({ + "node_modules/cacheable-request/node_modules/lowercase-keys/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + module2.exports = (object) => { + const result = {}; + for (const [key, value] of Object.entries(object)) { + result[key.toLowerCase()] = value; + } + return result; + }; + } +}); + +// node_modules/clone-response/node_modules/mimic-response/index.js var require_mimic_response = __commonJS({ - "node_modules/mimic-response/index.js"(exports2, module2) { + "node_modules/clone-response/node_modules/mimic-response/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var knownProps = [ @@ -107837,7 +111746,7 @@ var require_mimic_response = __commonJS({ }); // node_modules/clone-response/src/index.js -var require_src14 = __commonJS({ +var require_src15 = __commonJS({ "node_modules/clone-response/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); @@ -107911,7 +111820,7 @@ var require_json_buffer = __commonJS({ }); // node_modules/keyv/src/index.js -var require_src15 = __commonJS({ +var require_src16 = __commonJS({ "node_modules/keyv/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); @@ -108112,7 +112021,7 @@ var require_src15 = __commonJS({ }); // node_modules/cacheable-request/src/index.js -var require_src16 = __commonJS({ +var require_src17 = __commonJS({ "node_modules/cacheable-request/src/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); @@ -108121,10 +112030,10 @@ var require_src16 = __commonJS({ var normalizeUrl = require_normalize_url(); var getStream = require_get_stream(); var CachePolicy = require_http_cache_semantics(); - var Response = require_src13(); - var lowercaseKeys = require_lowercase_keys(); - var cloneResponse = require_src14(); - var Keyv = require_src15(); + var Response = require_src14(); + var lowercaseKeys = require_lowercase_keys2(); + var cloneResponse = require_src15(); + var Keyv = require_src16(); var CacheableRequest = class { constructor(request, cacheAdapter) { if (typeof request !== "function") { @@ -108551,9 +112460,9 @@ var require_quick_lru = __commonJS({ } }); -// node_modules/http2-wrapper/source/agent.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/agent.js var require_agent = __commonJS({ - "node_modules/http2-wrapper/source/agent.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/agent.js"(exports2, module2) { "use strict"; init_cjs_shim(); var EventEmitter = __require("events"); @@ -109002,9 +112911,9 @@ Please report this to https://github.com/szmarczak/http2-wrapper/` } }); -// node_modules/http2-wrapper/source/incoming-message.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/incoming-message.js var require_incoming_message = __commonJS({ - "node_modules/http2-wrapper/source/incoming-message.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/incoming-message.js"(exports2, module2) { "use strict"; init_cjs_shim(); var { Readable } = __require("stream"); @@ -109055,9 +112964,9 @@ var require_incoming_message = __commonJS({ } }); -// node_modules/http2-wrapper/source/utils/url-to-options.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/url-to-options.js var require_url_to_options = __commonJS({ - "node_modules/http2-wrapper/source/utils/url-to-options.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/url-to-options.js"(exports2, module2) { "use strict"; init_cjs_shim(); module2.exports = (url) => { @@ -109082,9 +112991,9 @@ var require_url_to_options = __commonJS({ } }); -// node_modules/http2-wrapper/source/utils/proxy-events.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/proxy-events.js var require_proxy_events = __commonJS({ - "node_modules/http2-wrapper/source/utils/proxy-events.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/proxy-events.js"(exports2, module2) { "use strict"; init_cjs_shim(); module2.exports = (from, to, events) => { @@ -109095,9 +113004,9 @@ var require_proxy_events = __commonJS({ } }); -// node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js var require_is_request_pseudo_header = __commonJS({ - "node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js"(exports2, module2) { "use strict"; init_cjs_shim(); module2.exports = (header) => { @@ -109114,9 +113023,9 @@ var require_is_request_pseudo_header = __commonJS({ } }); -// node_modules/http2-wrapper/source/utils/errors.js -var require_errors7 = __commonJS({ - "node_modules/http2-wrapper/source/utils/errors.js"(exports2, module2) { +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/errors.js +var require_errors6 = __commonJS({ + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/errors.js"(exports2, module2) { "use strict"; init_cjs_shim(); var makeError = (Base, key, getMessage) => { @@ -109155,9 +113064,9 @@ var require_errors7 = __commonJS({ } }); -// node_modules/http2-wrapper/source/client-request.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/client-request.js var require_client_request = __commonJS({ - "node_modules/http2-wrapper/source/client-request.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/client-request.js"(exports2, module2) { "use strict"; init_cjs_shim(); var http2 = __require("http2"); @@ -109174,7 +113083,7 @@ var require_client_request = __commonJS({ ERR_INVALID_HTTP_TOKEN, ERR_HTTP_INVALID_HEADER_VALUE, ERR_INVALID_CHAR - } = require_errors7(); + } = require_errors6(); var { HTTP2_HEADER_STATUS, HTTP2_HEADER_METHOD, @@ -109533,9 +113442,9 @@ var require_resolve_alpn = __commonJS({ } }); -// node_modules/http2-wrapper/source/utils/calculate-server-name.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/calculate-server-name.js var require_calculate_server_name = __commonJS({ - "node_modules/http2-wrapper/source/utils/calculate-server-name.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/utils/calculate-server-name.js"(exports2, module2) { "use strict"; init_cjs_shim(); var net = __require("net"); @@ -109562,9 +113471,9 @@ var require_calculate_server_name = __commonJS({ } }); -// node_modules/http2-wrapper/source/auto.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/auto.js var require_auto = __commonJS({ - "node_modules/http2-wrapper/source/auto.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/auto.js"(exports2, module2) { "use strict"; init_cjs_shim(); var http = __require("http"); @@ -109682,9 +113591,9 @@ var require_auto = __commonJS({ } }); -// node_modules/http2-wrapper/source/index.js +// node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/index.js var require_source4 = __commonJS({ - "node_modules/http2-wrapper/source/index.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/node_modules/http2-wrapper/source/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var http2 = __require("http2"); @@ -109712,9 +113621,24 @@ var require_source4 = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/is-form-data.js +// node_modules/swarm-js/node_modules/got/node_modules/lowercase-keys/index.js +var require_lowercase_keys3 = __commonJS({ + "node_modules/swarm-js/node_modules/got/node_modules/lowercase-keys/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + module2.exports = (object) => { + const result = {}; + for (const [key, value] of Object.entries(object)) { + result[key.toLowerCase()] = value; + } + return result; + }; + } +}); + +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/is-form-data.js var require_is_form_data = __commonJS({ - "node_modules/got/dist/source/core/utils/is-form-data.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/is-form-data.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -109723,9 +113647,9 @@ var require_is_form_data = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/get-body-size.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/get-body-size.js var require_get_body_size = __commonJS({ - "node_modules/got/dist/source/core/utils/get-body-size.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/get-body-size.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -109762,9 +113686,9 @@ var require_get_body_size = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/proxy-events.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/proxy-events.js var require_proxy_events2 = __commonJS({ - "node_modules/got/dist/source/core/utils/proxy-events.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/proxy-events.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -109786,9 +113710,9 @@ var require_proxy_events2 = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/unhandle.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/unhandle.js var require_unhandle = __commonJS({ - "node_modules/got/dist/source/core/utils/unhandle.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/unhandle.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -109811,9 +113735,9 @@ var require_unhandle = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/timed-out.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/timed-out.js var require_timed_out = __commonJS({ - "node_modules/got/dist/source/core/utils/timed-out.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/timed-out.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -109931,9 +113855,9 @@ var require_timed_out = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/url-to-options.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/url-to-options.js var require_url_to_options2 = __commonJS({ - "node_modules/got/dist/source/core/utils/url-to-options.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/url-to-options.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -109961,9 +113885,9 @@ var require_url_to_options2 = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/options-to-url.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/options-to-url.js var require_options_to_url = __commonJS({ - "node_modules/got/dist/source/core/utils/options-to-url.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/options-to-url.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110019,9 +113943,9 @@ var require_options_to_url = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/weakable-map.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/weakable-map.js var require_weakable_map = __commonJS({ - "node_modules/got/dist/source/core/utils/weakable-map.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/weakable-map.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110054,9 +113978,9 @@ var require_weakable_map = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/get-buffer.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/get-buffer.js var require_get_buffer = __commonJS({ - "node_modules/got/dist/source/core/utils/get-buffer.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/get-buffer.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110076,9 +114000,9 @@ var require_get_buffer = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/dns-ip-version.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/dns-ip-version.js var require_dns_ip_version = __commonJS({ - "node_modules/got/dist/source/core/utils/dns-ip-version.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/dns-ip-version.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110100,9 +114024,9 @@ var require_dns_ip_version = __commonJS({ } }); -// node_modules/got/dist/source/core/utils/is-response-ok.js +// node_modules/swarm-js/node_modules/got/dist/source/core/utils/is-response-ok.js var require_is_response_ok = __commonJS({ - "node_modules/got/dist/source/core/utils/is-response-ok.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/utils/is-response-ok.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110115,9 +114039,9 @@ var require_is_response_ok = __commonJS({ } }); -// node_modules/got/dist/source/utils/deprecation-warning.js +// node_modules/swarm-js/node_modules/got/dist/source/utils/deprecation-warning.js var require_deprecation_warning = __commonJS({ - "node_modules/got/dist/source/utils/deprecation-warning.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/utils/deprecation-warning.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110134,9 +114058,9 @@ var require_deprecation_warning = __commonJS({ } }); -// node_modules/got/dist/source/as-promise/normalize-arguments.js +// node_modules/swarm-js/node_modules/got/dist/source/as-promise/normalize-arguments.js var require_normalize_arguments = __commonJS({ - "node_modules/got/dist/source/as-promise/normalize-arguments.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/as-promise/normalize-arguments.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110212,9 +114136,9 @@ var require_normalize_arguments = __commonJS({ } }); -// node_modules/got/dist/source/core/calculate-retry-delay.js +// node_modules/swarm-js/node_modules/got/dist/source/core/calculate-retry-delay.js var require_calculate_retry_delay = __commonJS({ - "node_modules/got/dist/source/core/calculate-retry-delay.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/calculate-retry-delay.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110248,9 +114172,9 @@ var require_calculate_retry_delay = __commonJS({ } }); -// node_modules/got/dist/source/core/index.js +// node_modules/swarm-js/node_modules/got/dist/source/core/index.js var require_core = __commonJS({ - "node_modules/got/dist/source/core/index.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/core/index.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -110264,10 +114188,10 @@ var require_core = __commonJS({ var https = __require("https"); var http_timer_1 = require_source2(); var cacheable_lookup_1 = require_source3(); - var CacheableRequest = require_src16(); + var CacheableRequest = require_src17(); var decompressResponse = require_decompress_response(); var http2wrapper = require_source4(); - var lowercaseKeys = require_lowercase_keys(); + var lowercaseKeys = require_lowercase_keys3(); var is_1 = require_dist8(); var get_body_size_1 = require_get_body_size(); var is_form_data_1 = require_is_form_data(); @@ -111564,9 +115488,9 @@ var require_core = __commonJS({ } }); -// node_modules/got/dist/source/as-promise/types.js +// node_modules/swarm-js/node_modules/got/dist/source/as-promise/types.js var require_types4 = __commonJS({ - "node_modules/got/dist/source/as-promise/types.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/as-promise/types.js"(exports2) { "use strict"; init_cjs_shim(); var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { @@ -111612,9 +115536,9 @@ var require_types4 = __commonJS({ } }); -// node_modules/got/dist/source/as-promise/parse-body.js +// node_modules/swarm-js/node_modules/got/dist/source/as-promise/parse-body.js var require_parse_body = __commonJS({ - "node_modules/got/dist/source/as-promise/parse-body.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/as-promise/parse-body.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -111643,9 +115567,9 @@ var require_parse_body = __commonJS({ } }); -// node_modules/got/dist/source/as-promise/index.js +// node_modules/swarm-js/node_modules/got/dist/source/as-promise/index.js var require_as_promise = __commonJS({ - "node_modules/got/dist/source/as-promise/index.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/as-promise/index.js"(exports2) { "use strict"; init_cjs_shim(); var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { @@ -111817,9 +115741,9 @@ var require_as_promise = __commonJS({ } }); -// node_modules/got/dist/source/as-promise/create-rejection.js +// node_modules/swarm-js/node_modules/got/dist/source/as-promise/create-rejection.js var require_create_rejection = __commonJS({ - "node_modules/got/dist/source/as-promise/create-rejection.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/as-promise/create-rejection.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -111852,9 +115776,9 @@ var require_create_rejection = __commonJS({ } }); -// node_modules/got/dist/source/utils/deep-freeze.js +// node_modules/swarm-js/node_modules/got/dist/source/utils/deep-freeze.js var require_deep_freeze = __commonJS({ - "node_modules/got/dist/source/utils/deep-freeze.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/utils/deep-freeze.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); @@ -111871,18 +115795,18 @@ var require_deep_freeze = __commonJS({ } }); -// node_modules/got/dist/source/types.js +// node_modules/swarm-js/node_modules/got/dist/source/types.js var require_types5 = __commonJS({ - "node_modules/got/dist/source/types.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/types.js"(exports2) { "use strict"; init_cjs_shim(); Object.defineProperty(exports2, "__esModule", { value: true }); } }); -// node_modules/got/dist/source/create.js +// node_modules/swarm-js/node_modules/got/dist/source/create.js var require_create = __commonJS({ - "node_modules/got/dist/source/create.js"(exports2) { + "node_modules/swarm-js/node_modules/got/dist/source/create.js"(exports2) { "use strict"; init_cjs_shim(); var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { @@ -112107,9 +116031,9 @@ var require_create = __commonJS({ } }); -// node_modules/got/dist/source/index.js +// node_modules/swarm-js/node_modules/got/dist/source/index.js var require_source5 = __commonJS({ - "node_modules/got/dist/source/index.js"(exports2, module2) { + "node_modules/swarm-js/node_modules/got/dist/source/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { @@ -112505,7 +116429,7 @@ var require_use_native = __commonJS({ }); // node_modules/mkdirp-promise/node_modules/mkdirp/dist/cjs/src/index.js -var require_src17 = __commonJS({ +var require_src18 = __commonJS({ "node_modules/mkdirp-promise/node_modules/mkdirp/dist/cjs/src/index.js"(exports2) { "use strict"; init_cjs_shim(); @@ -112574,7 +116498,7 @@ var require_lib70 = __commonJS({ "node_modules/mkdirp-promise/lib/index.js"(exports2, module2) { "use strict"; init_cjs_shim(); - var mkdirp = require_src17(); + var mkdirp = require_src18(); module2.exports = function(dir, opts) { return new Promise((resolve, reject) => { mkdirp(dir, opts, (err, made) => err === null ? resolve(made) : reject(err)); @@ -116335,9 +120259,9 @@ var require_update = __commonJS({ } }); -// node_modules/mkdirp/index.js +// node_modules/tar/node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ - "node_modules/mkdirp/index.js"(exports2, module2) { + "node_modules/tar/node_modules/mkdirp/index.js"(exports2, module2) { init_cjs_shim(); var path = __require("path"); var fs = __require("fs"); @@ -128739,6 +132663,37 @@ var require_simple_concat = __commonJS({ } }); +// node_modules/simple-get/node_modules/decompress-response/node_modules/mimic-response/index.js +var require_mimic_response3 = __commonJS({ + "node_modules/simple-get/node_modules/decompress-response/node_modules/mimic-response/index.js"(exports2, module2) { + "use strict"; + init_cjs_shim(); + var knownProps = [ + "destroy", + "setTimeout", + "socket", + "headers", + "trailers", + "rawHeaders", + "statusCode", + "httpVersion", + "httpVersionMinor", + "httpVersionMajor", + "rawTrailers", + "statusMessage" + ]; + module2.exports = (fromStream, toStream) => { + const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); + for (const prop of fromProps) { + if (prop in toStream) { + continue; + } + toStream[prop] = typeof fromStream[prop] === "function" ? fromStream[prop].bind(fromStream) : fromStream[prop]; + } + }; + } +}); + // node_modules/simple-get/node_modules/decompress-response/index.js var require_decompress_response2 = __commonJS({ "node_modules/simple-get/node_modules/decompress-response/index.js"(exports2, module2) { @@ -128746,7 +132701,7 @@ var require_decompress_response2 = __commonJS({ init_cjs_shim(); var PassThrough = __require("stream").PassThrough; var zlib = __require("zlib"); - var mimicResponse = require_mimic_response(); + var mimicResponse = require_mimic_response3(); module2.exports = (response) => { if (["gzip", "deflate"].indexOf(response.headers["content-encoding"]) === -1) { return response; @@ -129332,7 +133287,7 @@ var require_bytes5 = __commonJS({ }); // node_modules/swarm-js/node_modules/eth-lib/lib/hash.js -var require_hash4 = __commonJS({ +var require_hash6 = __commonJS({ "node_modules/swarm-js/node_modules/eth-lib/lib/hash.js"(exports2, module2) { init_cjs_shim(); var HEX_CHARS = "0123456789abcdef".split(""); @@ -129630,7 +133585,7 @@ var require_hash4 = __commonJS({ var require_swarm_hash = __commonJS({ "node_modules/swarm-js/lib/swarm-hash.js"(exports2, module2) { init_cjs_shim(); - var keccak = require_hash4().keccak256; + var keccak = require_hash6().keccak256; var Bytes = require_bytes5(); var swarmHashBlock = function swarmHashBlock2(length, data) { var lengthEncoded = Bytes.reverse(Bytes.pad(6, Bytes.fromNumber(length))); @@ -130556,7 +134511,6 @@ var commonGivens = (Given, When, Then, features2) => { export { features, - require_node_gyp_build2 as require_node_gyp_build, require_lib13 as require_lib, require_lib14 as require_lib2, require_lib15 as require_lib3, @@ -130565,14 +134519,15 @@ export { require_lib18 as require_lib6, require_lib19 as require_lib7, require_lib20 as require_lib8, - require_hash, + require_minimalistic_assert, + require_inherits, require_lib21 as require_lib9, require_lib22 as require_lib10, require_lib41 as require_lib11, require_lib42 as require_lib12, require_lib44 as require_lib13, require_lib45 as require_lib14, - require_scrypt, + require_node_gyp_build7 as require_node_gyp_build, require_lib73 as require_lib15, MyFirstContract_default, MyFirstContractTestInput, diff --git a/docs/node/chunk-6WZF5PJ5.mjs b/docs/node/chunk-KHU6MVJS.mjs similarity index 98% rename from docs/node/chunk-6WZF5PJ5.mjs rename to docs/node/chunk-KHU6MVJS.mjs index 2ebe077d..95474401 100644 --- a/docs/node/chunk-6WZF5PJ5.mjs +++ b/docs/node/chunk-KHU6MVJS.mjs @@ -1,10 +1,10 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { puppeteer_core_default -} from "./chunk-2MUW23AQ.mjs"; +} from "./chunk-SF4FRI4W.mjs"; import { init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/dist/module/Node.js init_cjs_shim(); @@ -76,7 +76,13 @@ var BaseSuite = class { } for (const k of Object.keys(this.givens)) { const giver = this.givens[k]; - giver.afterAll(this.store, artifactory, utils); + try { + giver.afterAll(this.store, artifactory, utils); + } catch (e) { + console.error(e); + this.fails.push(giver); + return this; + } } return this; } @@ -493,6 +499,7 @@ var NodeTesteranto = class extends Testeranto { ipc: process.parentPort }); Promise.all([...artifacts, logPromise]).then(async () => { + process.exit(await failed ? 1 : 0); }); } }; diff --git a/docs/node/chunk-Q7IN32QK.mjs b/docs/node/chunk-M3LZWPQ4.mjs similarity index 99% rename from docs/node/chunk-Q7IN32QK.mjs rename to docs/node/chunk-M3LZWPQ4.mjs index 0f2918fa..f5041b9b 100644 --- a/docs/node/chunk-Q7IN32QK.mjs +++ b/docs/node/chunk-M3LZWPQ4.mjs @@ -3,7 +3,7 @@ import { __commonJS, __toESM, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // node_modules/immer/dist/immer.cjs.production.min.js var require_immer_cjs_production_min = __commonJS({ diff --git a/docs/node/chunk-ATCKVWWQ.mjs b/docs/node/chunk-PCRK6YWL.mjs similarity index 98% rename from docs/node/chunk-ATCKVWWQ.mjs rename to docs/node/chunk-PCRK6YWL.mjs index a0a31563..d198feca 100644 --- a/docs/node/chunk-ATCKVWWQ.mjs +++ b/docs/node/chunk-PCRK6YWL.mjs @@ -1,10 +1,10 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { puppeteer_core_default -} from "./chunk-2MUW23AQ.mjs"; +} from "./chunk-SF4FRI4W.mjs"; import { init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/src/Node.ts init_cjs_shim(); @@ -100,7 +100,13 @@ var BaseSuite = class { } for (const k of Object.keys(this.givens)) { const giver = this.givens[k]; - giver.afterAll(this.store, artifactory, utils); + try { + giver.afterAll(this.store, artifactory, utils); + } catch (e) { + console.error(e); + this.fails.push(giver); + return this; + } } return this; } @@ -698,6 +704,7 @@ var NodeTesteranto = class extends Testeranto { } ); Promise.all([...artifacts, logPromise]).then(async () => { + process.exit(await failed ? 1 : 0); }); } }; diff --git a/docs/node/chunk-2MUW23AQ.mjs b/docs/node/chunk-SF4FRI4W.mjs similarity index 99% rename from docs/node/chunk-2MUW23AQ.mjs rename to docs/node/chunk-SF4FRI4W.mjs index b4d79147..821bd3e7 100644 --- a/docs/node/chunk-2MUW23AQ.mjs +++ b/docs/node/chunk-SF4FRI4W.mjs @@ -1,16 +1,16 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { require_src -} from "./chunk-J74XOMIJ.mjs"; +} from "./chunk-ECNFXUXQ.mjs"; import { NodeWebSocketTransport -} from "./chunk-HRTB753X.mjs"; +} from "./chunk-4CEWYGDD.mjs"; import { __commonJS, __require, __toESM, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/node_modules/wrappy/wrappy.js var require_wrappy = __commonJS({ @@ -11838,7 +11838,7 @@ init_cjs_shim(); var debugModule = null; async function importDebug() { if (!debugModule) { - debugModule = (await import("./src-KPDNDTP4.mjs")).default; + debugModule = (await import("./src-EQYA4BOJ.mjs")).default; } return debugModule; } @@ -23940,12 +23940,12 @@ _CDPBrowserContext_connection = /* @__PURE__ */ new WeakMap(), _CDPBrowserContex // ../testeranto/node_modules/puppeteer-core/lib/esm/puppeteer/common/fetch.js init_cjs_shim(); var getFetch = async () => { - return globalThis.fetch || (await import("./node-ponyfill-EITUOUP3.mjs")).fetch; + return globalThis.fetch || (await import("./node-ponyfill-IUDHPXVP.mjs")).fetch; }; // ../testeranto/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js var getWebSocketTransportClass = async () => { - return isNode ? (await import("./NodeWebSocketTransport-FFMK3MOQ.mjs")).NodeWebSocketTransport : (await import("./BrowserWebSocketTransport-AHJZUB76.mjs")).BrowserWebSocketTransport; + return isNode ? (await import("./NodeWebSocketTransport-34DTIRU5.mjs")).NodeWebSocketTransport : (await import("./BrowserWebSocketTransport-CYQW4DLU.mjs")).BrowserWebSocketTransport; }; async function _connectToCDPBrowser(options) { const { browserWSEndpoint, browserURL, ignoreHTTPSErrors = false, defaultViewport = { width: 800, height: 600 }, transport, slowMo = 0, targetFilter, _isPageTarget: isPageTarget } = options; diff --git a/docs/node/chunk-S6ZSHMIP.mjs b/docs/node/chunk-YHFZNYDA.mjs similarity index 95% rename from docs/node/chunk-S6ZSHMIP.mjs rename to docs/node/chunk-YHFZNYDA.mjs index 74e943c5..8b767edd 100644 --- a/docs/node/chunk-S6ZSHMIP.mjs +++ b/docs/node/chunk-YHFZNYDA.mjs @@ -1,7 +1,7 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // src/app.test.ts init_cjs_shim(); @@ -37,7 +37,7 @@ var AppSpecification = (Suite, Given, When, Then, Check) => { test4: Given.AnEmptyState( [`aloha`, `hello`], [When.TheEmailIsSetTo("hey there")], - [Then.TheEmailIs("hey there!")] + [Then.TheEmailIs("hey there")] ) }, [ diff --git a/docs/node/chunk-L5QXHMAC.mjs b/docs/node/chunk-YMZ5D2GR.mjs similarity index 99% rename from docs/node/chunk-L5QXHMAC.mjs rename to docs/node/chunk-YMZ5D2GR.mjs index 7d752d07..73ea403f 100644 --- a/docs/node/chunk-L5QXHMAC.mjs +++ b/docs/node/chunk-YMZ5D2GR.mjs @@ -1,13 +1,15 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); +import { + require_react +} from "./chunk-HC6XUHVX.mjs"; import { Node_default -} from "./chunk-6WZF5PJ5.mjs"; +} from "./chunk-KHU6MVJS.mjs"; import { __commonJS, - __require, __toESM, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js var require_scheduler_unstable_mock_production_min = __commonJS({ @@ -1630,7 +1632,7 @@ var require_react_test_renderer_production_min = __commonJS({ "../testeranto/node_modules/react-test-renderer/cjs/react-test-renderer.production.min.js"(exports) { "use strict"; init_cjs_shim(); - var aa = __require("react"); + var aa = require_react(); var ba = require_unstable_mock(); var ca = require_scheduler(); function da(a, b) { @@ -6219,7 +6221,7 @@ var require_react_test_renderer_development = __commonJS({ if (process.env.NODE_ENV !== "production") { (function() { "use strict"; - var React2 = __require("react"); + var React2 = require_react(); var Scheduler = require_unstable_mock(); var Scheduler$1 = require_scheduler(); var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -19246,8 +19248,8 @@ init_cjs_shim(); // ../testeranto/dist/module/SubPackages/react-test-renderer/jsx/index.js init_cjs_shim(); +var import_react = __toESM(require_react(), 1); var import_react_test_renderer = __toESM(require_react_test_renderer(), 1); -import React from "react"; var testInterface = { butThen: async function(s, thenCB, tr) { console.log("butThen", thenCB.toString()); @@ -19257,7 +19259,7 @@ var testInterface = { console.log("ASDASDx"); let component; (0, import_react_test_renderer.act)(() => { - component = import_react_test_renderer.default.create(React.createElement(CComponent, props, [])); + component = import_react_test_renderer.default.create(import_react.default.createElement(CComponent, props, [])); }); return component; }, diff --git a/docs/node/chunk-YSBX7L3R.mjs b/docs/node/chunk-YSBX7L3R.mjs new file mode 100644 index 00000000..25978a36 --- /dev/null +++ b/docs/node/chunk-YSBX7L3R.mjs @@ -0,0 +1,2218 @@ +import { createRequire } from 'module';const require = createRequire(import.meta.url); +import { + __commonJS, + init_cjs_shim +} from "./chunk-4UNHOY6E.mjs"; + +// node_modules/react/cjs/react.production.min.js +var require_react_production_min = __commonJS({ + "node_modules/react/cjs/react.production.min.js"(exports) { + "use strict"; + init_cjs_shim(); + var l = Symbol.for("react.element"); + var n = Symbol.for("react.portal"); + var p = Symbol.for("react.fragment"); + var q = Symbol.for("react.strict_mode"); + var r = Symbol.for("react.profiler"); + var t = Symbol.for("react.provider"); + var u = Symbol.for("react.context"); + var v = Symbol.for("react.forward_ref"); + var w = Symbol.for("react.suspense"); + var x = Symbol.for("react.memo"); + var y = Symbol.for("react.lazy"); + var z = Symbol.iterator; + function A(a) { + if (null === a || "object" !== typeof a) + return null; + a = z && a[z] || a["@@iterator"]; + return "function" === typeof a ? a : null; + } + var B = { isMounted: function() { + return false; + }, enqueueForceUpdate: function() { + }, enqueueReplaceState: function() { + }, enqueueSetState: function() { + } }; + var C = Object.assign; + var D = {}; + function E(a, b, e) { + this.props = a; + this.context = b; + this.refs = D; + this.updater = e || B; + } + E.prototype.isReactComponent = {}; + E.prototype.setState = function(a, b) { + if ("object" !== typeof a && "function" !== typeof a && null != a) + throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + this.updater.enqueueSetState(this, a, b, "setState"); + }; + E.prototype.forceUpdate = function(a) { + this.updater.enqueueForceUpdate(this, a, "forceUpdate"); + }; + function F() { + } + F.prototype = E.prototype; + function G(a, b, e) { + this.props = a; + this.context = b; + this.refs = D; + this.updater = e || B; + } + var H = G.prototype = new F(); + H.constructor = G; + C(H, E.prototype); + H.isPureReactComponent = true; + var I = Array.isArray; + var J = Object.prototype.hasOwnProperty; + var K = { current: null }; + var L = { key: true, ref: true, __self: true, __source: true }; + function M(a, b, e) { + var d, c = {}, k = null, h = null; + if (null != b) + for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b) + J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]); + var g = arguments.length - 2; + if (1 === g) + c.children = e; + else if (1 < g) { + for (var f = Array(g), m = 0; m < g; m++) + f[m] = arguments[m + 2]; + c.children = f; + } + if (a && a.defaultProps) + for (d in g = a.defaultProps, g) + void 0 === c[d] && (c[d] = g[d]); + return { $$typeof: l, type: a, key: k, ref: h, props: c, _owner: K.current }; + } + function N(a, b) { + return { $$typeof: l, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner }; + } + function O(a) { + return "object" === typeof a && null !== a && a.$$typeof === l; + } + function escape(a) { + var b = { "=": "=0", ":": "=2" }; + return "$" + a.replace(/[=:]/g, function(a2) { + return b[a2]; + }); + } + var P = /\/+/g; + function Q(a, b) { + return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36); + } + function R(a, b, e, d, c) { + var k = typeof a; + if ("undefined" === k || "boolean" === k) + a = null; + var h = false; + if (null === a) + h = true; + else + switch (k) { + case "string": + case "number": + h = true; + break; + case "object": + switch (a.$$typeof) { + case l: + case n: + h = true; + } + } + if (h) + return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a2) { + return a2; + })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1; + h = 0; + d = "" === d ? "." : d + ":"; + if (I(a)) + for (var g = 0; g < a.length; g++) { + k = a[g]; + var f = d + Q(k, g); + h += R(k, b, e, f, c); + } + else if (f = A(a), "function" === typeof f) + for (a = f.call(a), g = 0; !(k = a.next()).done; ) + k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c); + else if ("object" === k) + throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead."); + return h; + } + function S(a, b, e) { + if (null == a) + return a; + var d = [], c = 0; + R(a, d, "", "", function(a2) { + return b.call(e, a2, c++); + }); + return d; + } + function T(a) { + if (-1 === a._status) { + var b = a._result; + b = b(); + b.then(function(b2) { + if (0 === a._status || -1 === a._status) + a._status = 1, a._result = b2; + }, function(b2) { + if (0 === a._status || -1 === a._status) + a._status = 2, a._result = b2; + }); + -1 === a._status && (a._status = 0, a._result = b); + } + if (1 === a._status) + return a._result.default; + throw a._result; + } + var U = { current: null }; + var V = { transition: null }; + var W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K }; + exports.Children = { map: S, forEach: function(a, b, e) { + S(a, function() { + b.apply(this, arguments); + }, e); + }, count: function(a) { + var b = 0; + S(a, function() { + b++; + }); + return b; + }, toArray: function(a) { + return S(a, function(a2) { + return a2; + }) || []; + }, only: function(a) { + if (!O(a)) + throw Error("React.Children.only expected to receive a single React element child."); + return a; + } }; + exports.Component = E; + exports.Fragment = p; + exports.Profiler = r; + exports.PureComponent = G; + exports.StrictMode = q; + exports.Suspense = w; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W; + exports.cloneElement = function(a, b, e) { + if (null === a || void 0 === a) + throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + "."); + var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner; + if (null != b) { + void 0 !== b.ref && (k = b.ref, h = K.current); + void 0 !== b.key && (c = "" + b.key); + if (a.type && a.type.defaultProps) + var g = a.type.defaultProps; + for (f in b) + J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]); + } + var f = arguments.length - 2; + if (1 === f) + d.children = e; + else if (1 < f) { + g = Array(f); + for (var m = 0; m < f; m++) + g[m] = arguments[m + 2]; + d.children = g; + } + return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h }; + }; + exports.createContext = function(a) { + a = { $$typeof: u, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }; + a.Provider = { $$typeof: t, _context: a }; + return a.Consumer = a; + }; + exports.createElement = M; + exports.createFactory = function(a) { + var b = M.bind(null, a); + b.type = a; + return b; + }; + exports.createRef = function() { + return { current: null }; + }; + exports.forwardRef = function(a) { + return { $$typeof: v, render: a }; + }; + exports.isValidElement = O; + exports.lazy = function(a) { + return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T }; + }; + exports.memo = function(a, b) { + return { $$typeof: x, type: a, compare: void 0 === b ? null : b }; + }; + exports.startTransition = function(a) { + var b = V.transition; + V.transition = {}; + try { + a(); + } finally { + V.transition = b; + } + }; + exports.unstable_act = function() { + throw Error("act(...) is not supported in production builds of React."); + }; + exports.useCallback = function(a, b) { + return U.current.useCallback(a, b); + }; + exports.useContext = function(a) { + return U.current.useContext(a); + }; + exports.useDebugValue = function() { + }; + exports.useDeferredValue = function(a) { + return U.current.useDeferredValue(a); + }; + exports.useEffect = function(a, b) { + return U.current.useEffect(a, b); + }; + exports.useId = function() { + return U.current.useId(); + }; + exports.useImperativeHandle = function(a, b, e) { + return U.current.useImperativeHandle(a, b, e); + }; + exports.useInsertionEffect = function(a, b) { + return U.current.useInsertionEffect(a, b); + }; + exports.useLayoutEffect = function(a, b) { + return U.current.useLayoutEffect(a, b); + }; + exports.useMemo = function(a, b) { + return U.current.useMemo(a, b); + }; + exports.useReducer = function(a, b, e) { + return U.current.useReducer(a, b, e); + }; + exports.useRef = function(a) { + return U.current.useRef(a); + }; + exports.useState = function(a) { + return U.current.useState(a); + }; + exports.useSyncExternalStore = function(a, b, e) { + return U.current.useSyncExternalStore(a, b, e); + }; + exports.useTransition = function() { + return U.current.useTransition(); + }; + exports.version = "18.2.0"; + } +}); + +// node_modules/react/cjs/react.development.js +var require_react_development = __commonJS({ + "node_modules/react/cjs/react.development.js"(exports, module) { + "use strict"; + init_cjs_shim(); + if (process.env.NODE_ENV !== "production") { + (function() { + "use strict"; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); + } + var ReactVersion = "18.2.0"; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var ReactCurrentDispatcher = { + /** + * @internal + * @type {ReactComponent} + */ + current: null + }; + var ReactCurrentBatchConfig = { + transition: null + }; + var ReactCurrentActQueue = { + current: null, + // Used to reproduce behavior of `batchedUpdates` in legacy mode. + isBatchingLegacy: false, + didScheduleLegacyUpdate: false + }; + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null + }; + var ReactDebugCurrentFrame = {}; + var currentExtraStackFrame = null; + function setExtraStackFrame(stack) { + { + currentExtraStackFrame = stack; + } + } + { + ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { + { + currentExtraStackFrame = stack; + } + }; + ReactDebugCurrentFrame.getCurrentStack = null; + ReactDebugCurrentFrame.getStackAddendum = function() { + var stack = ""; + if (currentExtraStackFrame) { + stack += currentExtraStackFrame; + } + var impl = ReactDebugCurrentFrame.getCurrentStack; + if (impl) { + stack += impl() || ""; + } + return stack; + }; + } + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var ReactSharedInternals = { + ReactCurrentDispatcher, + ReactCurrentBatchConfig, + ReactCurrentOwner + }; + { + ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; + ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; + } + function warn(format) { + { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + } + function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var didWarnStateUpdateForUnmountedComponent = {}; + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; + var warningKey = componentName + "." + callerName; + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function(publicInstance) { + return false; + }, + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function(publicInstance, callback, callerName) { + warnNoop(publicInstance, "forceUpdate"); + }, + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, "replaceState"); + }, + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function(publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, "setState"); + } + }; + var assign = Object.assign; + var emptyObject = {}; + { + Object.freeze(emptyObject); + } + function Component(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + Component.prototype.isReactComponent = {}; + Component.prototype.setState = function(partialState, callback) { + if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) { + throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + } + this.updater.enqueueSetState(this, partialState, callback, "setState"); + }; + Component.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + { + var deprecatedAPIs = { + isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], + replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] + }; + var defineDeprecationWarning = function(methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function() { + warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); + return void 0; + } + }); + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + function ComponentDummy() { + } + ComponentDummy.prototype = Component.prototype; + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); + pureComponentPrototype.constructor = PureComponent; + assign(pureComponentPrototype, Component.prototype); + pureComponentPrototype.isPureReactComponent = true; + function createRef() { + var refObject = { + current: null + }; + { + Object.seal(refObject); + } + return refObject; + } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); + } + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; + } + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== void 0; + } + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== void 0; + } + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); + } + function warnIfStringRefCannotBeAutoConverted(config) { + { + if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); + didWarnAboutStringRefs[componentName] = true; + } + } + } + } + var ReactElement = function(type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }; + function createElement(type, config, children) { + var propName; + var props = {}; + var key = null; + var ref = null; + var self = null; + var source = null; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + { + warnIfStringRefCannotBeAutoConverted(config); + } + } + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); + } + key = "" + config.key; + } + self = config.__self === void 0 ? null : config.__self; + source = config.__source === void 0 ? null : config.__source; + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } + { + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + } + function cloneElement(element, config, children) { + if (element === null || element === void 0) { + throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); + } + var propName; + var props = assign({}, element.props); + var key = element.key; + var ref = element.ref; + var self = element._self; + var source = element._source; + var owner = element._owner; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); + } + key = "" + config.key; + } + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === void 0 && defaultProps !== void 0) { + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + return ReactElement(element.type, key, ref, self, source, owner, props); + } + function isValidElement(object) { + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + var SEPARATOR = "."; + var SUBSEPARATOR = ":"; + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + "=": "=0", + ":": "=2" + }; + var escapedString = key.replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + return "$" + escapedString; + } + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return text.replace(userProvidedKeyEscapeRegex, "$&/"); + } + function getElementKey(element, index) { + if (typeof element === "object" && element !== null && element.key != null) { + { + checkKeyStringCoercion(element.key); + } + return escape("" + element.key); + } + return index.toString(36); + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if (type === "undefined" || type === "boolean") { + children = null; + } + var invokeCallback = false; + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + if (invokeCallback) { + var _child = children; + var mappedChild = callback(_child); + var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; + if (isArray(mappedChild)) { + var escapedChildKey = ""; + if (childKey != null) { + escapedChildKey = escapeUserProvidedKey(childKey) + "/"; + } + mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + { + if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) { + checkKeyStringCoercion(mappedChild.key); + } + } + mappedChild = cloneAndReplaceKey( + mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? ( + // $FlowFixMe Flow incorrectly thinks existing element's key can be a number + // eslint-disable-next-line react-internal/safe-string-coercion + escapeUserProvidedKey("" + mappedChild.key) + "/" + ) : "") + childKey + ); + } + array.push(mappedChild); + } + return 1; + } + var child; + var nextName; + var subtreeCount = 0; + var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getElementKey(child, i); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else { + var iteratorFn = getIteratorFn(children); + if (typeof iteratorFn === "function") { + var iterableChildren = children; + { + if (iteratorFn === iterableChildren.entries) { + if (!didWarnAboutMaps) { + warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); + } + didWarnAboutMaps = true; + } + } + var iterator = iteratorFn.call(iterableChildren); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getElementKey(child, ii++); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else if (type === "object") { + var childrenString = String(children); + throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); + } + } + return subtreeCount; + } + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + var count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + function countChildren(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + } + function forEachChildren(children, forEachFunc, forEachContext) { + mapChildren(children, function() { + forEachFunc.apply(this, arguments); + }, forEachContext); + } + function toArray(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + } + function onlyChild(children) { + if (!isValidElement(children)) { + throw new Error("React.Children.only expected to receive a single React element child."); + } + return children; + } + function createContext(defaultValue) { + var context = { + $$typeof: REACT_CONTEXT_TYPE, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, + // These are circular + Provider: null, + Consumer: null, + // Add these to use same hidden class in VM as ServerContext + _defaultValue: null, + _globalName: null + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + var hasWarnedAboutDisplayNameOnConsumer = false; + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context + }; + Object.defineProperties(Consumer, { + Provider: { + get: function() { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Provider; + }, + set: function(_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function() { + return context._currentValue; + }, + set: function(_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function() { + return context._currentValue2; + }, + set: function(_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function() { + return context._threadCount; + }, + set: function(_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function() { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Consumer; + } + }, + displayName: { + get: function() { + return context.displayName; + }, + set: function(displayName) { + if (!hasWarnedAboutDisplayNameOnConsumer) { + warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); + hasWarnedAboutDisplayNameOnConsumer = true; + } + } + } + }); + context.Consumer = Consumer; + } + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + return context; + } + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function lazyInitializer(payload) { + if (payload._status === Uninitialized) { + var ctor = payload._result; + var thenable = ctor(); + thenable.then(function(moduleObject2) { + if (payload._status === Pending || payload._status === Uninitialized) { + var resolved = payload; + resolved._status = Resolved; + resolved._result = moduleObject2; + } + }, function(error2) { + if (payload._status === Pending || payload._status === Uninitialized) { + var rejected = payload; + rejected._status = Rejected; + rejected._result = error2; + } + }); + if (payload._status === Uninitialized) { + var pending = payload; + pending._status = Pending; + pending._result = thenable; + } + } + if (payload._status === Resolved) { + var moduleObject = payload._result; + { + if (moduleObject === void 0) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject); + } + } + { + if (!("default" in moduleObject)) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); + } + } + return moduleObject.default; + } else { + throw payload._result; + } + } + function lazy(ctor) { + var payload = { + // We use these fields to store the result. + _status: Uninitialized, + _result: ctor + }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: payload, + _init: lazyInitializer + }; + { + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function() { + return defaultProps; + }, + set: function(newDefaultProps) { + error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + defaultProps = newDefaultProps; + Object.defineProperty(lazyType, "defaultProps", { + enumerable: true + }); + } + }, + propTypes: { + configurable: true, + get: function() { + return propTypes; + }, + set: function(newPropTypes) { + error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + propTypes = newPropTypes; + Object.defineProperty(lazyType, "propTypes", { + enumerable: true + }); + } + } + }); + } + return lazyType; + } + function forwardRef(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); + } else if (typeof render !== "function") { + error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render); + } else { + if (render.length !== 0 && render.length !== 2) { + error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); + } + } + if (render != null) { + if (render.defaultProps != null || render.propTypes != null) { + error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); + } + } + } + var elementType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (!render.name && !render.displayName) { + render.displayName = name; + } + } + }); + } + return elementType; + } + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); + } + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; + } + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; + } + } + return false; + } + function memo(type, compare) { + { + if (!isValidElementType(type)) { + error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); + } + } + var elementType = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: compare === void 0 ? null : compare + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (!type.name && !type.displayName) { + type.displayName = name; + } + } + }); + } + return elementType; + } + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + { + if (dispatcher === null) { + error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); + } + } + return dispatcher; + } + function useContext(Context) { + var dispatcher = resolveDispatcher(); + { + if (Context._context !== void 0) { + var realContext = Context._context; + if (realContext.Consumer === Context) { + error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); + } else if (realContext.Provider === Context) { + error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); + } + } + } + return dispatcher.useContext(Context); + } + function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, deps); + } + function useInsertionEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useInsertionEffect(create, deps); + } + function useLayoutEffect(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, deps); + } + function useCallback(callback, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, deps); + } + function useMemo(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, deps); + } + function useImperativeHandle(ref, create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, deps); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + function useTransition() { + var dispatcher = resolveDispatcher(); + return dispatcher.useTransition(); + } + function useDeferredValue(value) { + var dispatcher = resolveDispatcher(); + return dispatcher.useDeferredValue(value); + } + function useId() { + var dispatcher = resolveDispatcher(); + return dispatcher.useId(); + } + function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { + var dispatcher = resolveDispatcher(); + return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); + } + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher$1.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component2) { + var prototype = Component2.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } + } + } + function checkPropTypes(typeSpecs, values, location, componentName, element) { + { + var has = Function.call.bind(hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); + } + } + } + } + } + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + setExtraStackFrame(stack); + } else { + setExtraStackFrame(null); + } + } + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; + } + function getSourceInfoErrorAddendum(source) { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + } + return ""; + } + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== void 0) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + return ""; + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; + } + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + { + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node, parentType) { + if (typeof node !== "object") { + return; + } + if (isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes; + if (typeof type === "function") { + propTypes = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + } + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } + } + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + { + error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + } + var element = createElement.apply(this, arguments); + if (element == null) { + return element; + } + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; + } + var didWarnAboutDeprecatedCreateFactory = false; + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; + { + if (!didWarnAboutDeprecatedCreateFactory) { + didWarnAboutDeprecatedCreateFactory = true; + warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); + } + Object.defineProperty(validatedFactory, "type", { + enumerable: false, + get: function() { + warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); + Object.defineProperty(this, "type", { + value: type + }); + return type; + } + }); + } + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + function startTransition(scope, options) { + var prevTransition = ReactCurrentBatchConfig.transition; + ReactCurrentBatchConfig.transition = {}; + var currentTransition = ReactCurrentBatchConfig.transition; + { + ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set(); + } + try { + scope(); + } finally { + ReactCurrentBatchConfig.transition = prevTransition; + { + if (prevTransition === null && currentTransition._updatedFibers) { + var updatedFibersCount = currentTransition._updatedFibers.size; + if (updatedFibersCount > 10) { + warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."); + } + currentTransition._updatedFibers.clear(); + } + } + } + } + var didWarnAboutMessageChannel = false; + var enqueueTaskImpl = null; + function enqueueTask(task) { + if (enqueueTaskImpl === null) { + try { + var requireString = ("require" + Math.random()).slice(0, 7); + var nodeRequire = module && module[requireString]; + enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate; + } catch (_err) { + enqueueTaskImpl = function(callback) { + { + if (didWarnAboutMessageChannel === false) { + didWarnAboutMessageChannel = true; + if (typeof MessageChannel === "undefined") { + error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."); + } + } + } + var channel = new MessageChannel(); + channel.port1.onmessage = callback; + channel.port2.postMessage(void 0); + }; + } + } + return enqueueTaskImpl(task); + } + var actScopeDepth = 0; + var didWarnNoAwaitAct = false; + function act(callback) { + { + var prevActScopeDepth = actScopeDepth; + actScopeDepth++; + if (ReactCurrentActQueue.current === null) { + ReactCurrentActQueue.current = []; + } + var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy; + var result; + try { + ReactCurrentActQueue.isBatchingLegacy = true; + result = callback(); + if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) { + var queue = ReactCurrentActQueue.current; + if (queue !== null) { + ReactCurrentActQueue.didScheduleLegacyUpdate = false; + flushActQueue(queue); + } + } + } catch (error2) { + popActScope(prevActScopeDepth); + throw error2; + } finally { + ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; + } + if (result !== null && typeof result === "object" && typeof result.then === "function") { + var thenableResult = result; + var wasAwaited = false; + var thenable = { + then: function(resolve, reject) { + wasAwaited = true; + thenableResult.then(function(returnValue2) { + popActScope(prevActScopeDepth); + if (actScopeDepth === 0) { + recursivelyFlushAsyncActWork(returnValue2, resolve, reject); + } else { + resolve(returnValue2); + } + }, function(error2) { + popActScope(prevActScopeDepth); + reject(error2); + }); + } + }; + { + if (!didWarnNoAwaitAct && typeof Promise !== "undefined") { + Promise.resolve().then(function() { + }).then(function() { + if (!wasAwaited) { + didWarnNoAwaitAct = true; + error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"); + } + }); + } + } + return thenable; + } else { + var returnValue = result; + popActScope(prevActScopeDepth); + if (actScopeDepth === 0) { + var _queue = ReactCurrentActQueue.current; + if (_queue !== null) { + flushActQueue(_queue); + ReactCurrentActQueue.current = null; + } + var _thenable = { + then: function(resolve, reject) { + if (ReactCurrentActQueue.current === null) { + ReactCurrentActQueue.current = []; + recursivelyFlushAsyncActWork(returnValue, resolve, reject); + } else { + resolve(returnValue); + } + } + }; + return _thenable; + } else { + var _thenable2 = { + then: function(resolve, reject) { + resolve(returnValue); + } + }; + return _thenable2; + } + } + } + } + function popActScope(prevActScopeDepth) { + { + if (prevActScopeDepth !== actScopeDepth - 1) { + error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "); + } + actScopeDepth = prevActScopeDepth; + } + } + function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { + { + var queue = ReactCurrentActQueue.current; + if (queue !== null) { + try { + flushActQueue(queue); + enqueueTask(function() { + if (queue.length === 0) { + ReactCurrentActQueue.current = null; + resolve(returnValue); + } else { + recursivelyFlushAsyncActWork(returnValue, resolve, reject); + } + }); + } catch (error2) { + reject(error2); + } + } else { + resolve(returnValue); + } + } + } + var isFlushing = false; + function flushActQueue(queue) { + { + if (!isFlushing) { + isFlushing = true; + var i = 0; + try { + for (; i < queue.length; i++) { + var callback = queue[i]; + do { + callback = callback(true); + } while (callback !== null); + } + queue.length = 0; + } catch (error2) { + queue = queue.slice(i + 1); + throw error2; + } finally { + isFlushing = false; + } + } + } + } + var createElement$1 = createElementWithValidation; + var cloneElement$1 = cloneElementWithValidation; + var createFactory = createFactoryWithValidation; + var Children = { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray, + only: onlyChild + }; + exports.Children = Children; + exports.Component = Component; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.Profiler = REACT_PROFILER_TYPE; + exports.PureComponent = PureComponent; + exports.StrictMode = REACT_STRICT_MODE_TYPE; + exports.Suspense = REACT_SUSPENSE_TYPE; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; + exports.cloneElement = cloneElement$1; + exports.createContext = createContext; + exports.createElement = createElement$1; + exports.createFactory = createFactory; + exports.createRef = createRef; + exports.forwardRef = forwardRef; + exports.isValidElement = isValidElement; + exports.lazy = lazy; + exports.memo = memo; + exports.startTransition = startTransition; + exports.unstable_act = act; + exports.useCallback = useCallback; + exports.useContext = useContext; + exports.useDebugValue = useDebugValue; + exports.useDeferredValue = useDeferredValue; + exports.useEffect = useEffect; + exports.useId = useId; + exports.useImperativeHandle = useImperativeHandle; + exports.useInsertionEffect = useInsertionEffect; + exports.useLayoutEffect = useLayoutEffect; + exports.useMemo = useMemo; + exports.useReducer = useReducer; + exports.useRef = useRef; + exports.useState = useState; + exports.useSyncExternalStore = useSyncExternalStore; + exports.useTransition = useTransition; + exports.version = ReactVersion; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); + } + })(); + } + } +}); + +// node_modules/react/index.js +var require_react = __commonJS({ + "node_modules/react/index.js"(exports, module) { + "use strict"; + init_cjs_shim(); + if (process.env.NODE_ENV === "production") { + module.exports = require_react_production_min(); + } else { + module.exports = require_react_development(); + } + } +}); + +export { + require_react +}; +/*! Bundled license information: + +react/cjs/react.production.min.js: + (** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react/cjs/react.development.js: + (** + * @license React + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) +*/ diff --git a/docs/node/node-ponyfill-EITUOUP3.mjs b/docs/node/node-ponyfill-IUDHPXVP.mjs similarity index 99% rename from docs/node/node-ponyfill-EITUOUP3.mjs rename to docs/node/node-ponyfill-IUDHPXVP.mjs index ecc3366c..6ede4b89 100644 --- a/docs/node/node-ponyfill-EITUOUP3.mjs +++ b/docs/node/node-ponyfill-IUDHPXVP.mjs @@ -3,7 +3,7 @@ import { __commonJS, __require, init_cjs_shim -} from "./chunk-LD4XAW36.mjs"; +} from "./chunk-4UNHOY6E.mjs"; // ../testeranto/node_modules/webidl-conversions/lib/index.js var require_lib = __commonJS({ diff --git a/docs/node/src-KPDNDTP4.mjs b/docs/node/src-EQYA4BOJ.mjs similarity index 69% rename from docs/node/src-KPDNDTP4.mjs rename to docs/node/src-EQYA4BOJ.mjs index e5cb813e..60d67eb2 100644 --- a/docs/node/src-KPDNDTP4.mjs +++ b/docs/node/src-EQYA4BOJ.mjs @@ -1,6 +1,6 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { require_src -} from "./chunk-J74XOMIJ.mjs"; -import "./chunk-LD4XAW36.mjs"; +} from "./chunk-ECNFXUXQ.mjs"; +import "./chunk-4UNHOY6E.mjs"; export default require_src(); diff --git a/docs/node/src/LoginPage/react-test-renderer/node.test.mjs b/docs/node/src/LoginPage/react-test-renderer/node.test.mjs index f5ba3b70..500c0674 100644 --- a/docs/node/src/LoginPage/react-test-renderer/node.test.mjs +++ b/docs/node/src/LoginPage/react-test-renderer/node.test.mjs @@ -5,24 +5,27 @@ import { actions, emailwarning, require_scheduler -} from "../../../chunk-SUGEA42X.mjs"; +} from "../../../chunk-CXQUVXKU.mjs"; import { node_default -} from "../../../chunk-L5QXHMAC.mjs"; -import "../../../chunk-Q7IN32QK.mjs"; -import "../../../chunk-6WZF5PJ5.mjs"; +} from "../../../chunk-YMZ5D2GR.mjs"; +import { + require_react +} from "../../../chunk-YSBX7L3R.mjs"; +import "../../../chunk-M3LZWPQ4.mjs"; +import "../../../chunk-HC6XUHVX.mjs"; +import "../../../chunk-KHU6MVJS.mjs"; import { assert -} from "../../../chunk-GHFYKOO4.mjs"; -import "../../../chunk-2MUW23AQ.mjs"; -import "../../../chunk-J74XOMIJ.mjs"; -import "../../../chunk-HRTB753X.mjs"; +} from "../../../chunk-D2G2LC5R.mjs"; +import "../../../chunk-SF4FRI4W.mjs"; +import "../../../chunk-ECNFXUXQ.mjs"; +import "../../../chunk-4CEWYGDD.mjs"; import { __commonJS, - __require, __toESM, init_cjs_shim -} from "../../../chunk-LD4XAW36.mjs"; +} from "../../../chunk-4UNHOY6E.mjs"; // node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js var require_scheduler_unstable_mock_production_min = __commonJS({ @@ -909,7 +912,7 @@ var require_react_test_renderer_production_min = __commonJS({ "node_modules/react-test-renderer/cjs/react-test-renderer.production.min.js"(exports) { "use strict"; init_cjs_shim(); - var aa = __require("react"); + var aa = require_react(); var ba = require_unstable_mock(); var ca = require_scheduler(); function da(a, b) { @@ -5498,7 +5501,7 @@ var require_react_test_renderer_development = __commonJS({ if (process.env.NODE_ENV !== "production") { (function() { "use strict"; - var React = __require("react"); + var React = require_react(); var Scheduler = require_unstable_mock(); var Scheduler$1 = require_scheduler(); var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; diff --git a/docs/node/src/LoginPage/react/node.test.mjs b/docs/node/src/LoginPage/react/node.test.mjs index ff957636..1d865ee5 100644 --- a/docs/node/src/LoginPage/react/node.test.mjs +++ b/docs/node/src/LoginPage/react/node.test.mjs @@ -3,20 +3,21 @@ import { LoginPageSpecs, LoginPage_default, actions -} from "../../../chunk-SUGEA42X.mjs"; -import "../../../chunk-Q7IN32QK.mjs"; +} from "../../../chunk-CXQUVXKU.mjs"; +import "../../../chunk-YSBX7L3R.mjs"; +import "../../../chunk-M3LZWPQ4.mjs"; import { Node_default -} from "../../../chunk-6WZF5PJ5.mjs"; +} from "../../../chunk-KHU6MVJS.mjs"; import { assert -} from "../../../chunk-GHFYKOO4.mjs"; -import "../../../chunk-2MUW23AQ.mjs"; -import "../../../chunk-J74XOMIJ.mjs"; -import "../../../chunk-HRTB753X.mjs"; +} from "../../../chunk-D2G2LC5R.mjs"; +import "../../../chunk-SF4FRI4W.mjs"; +import "../../../chunk-ECNFXUXQ.mjs"; +import "../../../chunk-4CEWYGDD.mjs"; import { init_cjs_shim -} from "../../../chunk-LD4XAW36.mjs"; +} from "../../../chunk-4UNHOY6E.mjs"; // src/LoginPage/react/node.test.tsx init_cjs_shim(); diff --git a/docs/node/src/LoginPage/react/node.test/stdout.log b/docs/node/src/LoginPage/react/node.test/stdout.log index aed48dc8..3380beae 100644 --- a/docs/node/src/LoginPage/react/node.test/stdout.log +++ b/docs/node/src/LoginPage/react/node.test/stdout.log @@ -11,16 +11,16 @@ testResourceConfiguration { hello hello test failed AssertionError2: expected 'invalidEmail' to equal 'no_error' - at file:///Users/adam/Code/kokomoBay/docs/node/src/LoginPage/react/node.test.mjs:85:14 - at Object.butThen (file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:24:37) - at Then.butThen (file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:376:40) - at Then.test (file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:173:28) - at Given.give (file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:121:34) + at file:///Users/adam/Code/kokomoBay/docs/node/src/LoginPage/react/node.test.mjs:86:14 + at Object.butThen (file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:24:37) + at Then.butThen (file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:382:40) + at Then.test (file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:179:28) + at Given.give (file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:127:34) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) - at async Testeranto.givenThat.run (file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:67:22) - at async file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:234:14 - at async Object.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:259:29) - at async NodeTesteranto.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-6WZF5PJ5.mjs:491:47) { + at async Testeranto.givenThat.run (file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:67:22) + at async file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:240:14 + at async Object.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:265:29) + at async NodeTesteranto.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-KHU6MVJS.mjs:497:47) { showDiff: true, actual: 'invalidEmail', expected: 'no_error', diff --git a/docs/node/src/MyFirstContract.basic.test.mjs b/docs/node/src/MyFirstContract.basic.test.mjs index b3014dea..18ed1f7a 100644 --- a/docs/node/src/MyFirstContract.basic.test.mjs +++ b/docs/node/src/MyFirstContract.basic.test.mjs @@ -5,20 +5,20 @@ import { commonGivens, features, require_lib15 as require_lib -} from "../chunk-7FLCGHSA.mjs"; +} from "../chunk-JYHLOLG4.mjs"; import { Node_default -} from "../chunk-ATCKVWWQ.mjs"; +} from "../chunk-PCRK6YWL.mjs"; import { assert -} from "../chunk-GHFYKOO4.mjs"; -import "../chunk-2MUW23AQ.mjs"; -import "../chunk-J74XOMIJ.mjs"; -import "../chunk-HRTB753X.mjs"; +} from "../chunk-D2G2LC5R.mjs"; +import "../chunk-SF4FRI4W.mjs"; +import "../chunk-ECNFXUXQ.mjs"; +import "../chunk-4CEWYGDD.mjs"; import { __toESM, init_cjs_shim -} from "../chunk-LD4XAW36.mjs"; +} from "../chunk-4UNHOY6E.mjs"; // src/MyFirstContract.basic.test.ts init_cjs_shim(); diff --git a/docs/node/src/MyFirstContract.basic.test/stderr.log b/docs/node/src/MyFirstContract.basic.test/stderr.log index 0dcd8376..ab5ec53f 100644 --- a/docs/node/src/MyFirstContract.basic.test/stderr.log +++ b/docs/node/src/MyFirstContract.basic.test/stderr.log @@ -8,5 +8,5 @@ Require stack: Falling back to a NodeJS implementation; performance may be degraded. -(node:79449) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. +(node:78519) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `Electron Helper --trace-deprecation ...` to show where the warning was created) diff --git a/docs/node/src/MyFirstContract.basic.test/stdout.log b/docs/node/src/MyFirstContract.basic.test/stdout.log index cb1d737c..5d7ecf17 100644 --- a/docs/node/src/MyFirstContract.basic.test/stdout.log +++ b/docs/node/src/MyFirstContract.basic.test/stdout.log @@ -249,11 +249,11 @@ eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x638db4a87c9e805673c5fb7876b89fa829b8220dd8c5a198212a931e35ef17fe - Contract created: 0xb81a8ddc5784617f1515361cc6322cb4808bf16b + Transaction: 0x09cce84faf13df6a0c100a2f93e9aeacd4bd5c6462ab0b8c4c6bcb1830bd9fb2 + Contract created: 0xd7deffa35581f8e46a4440592024ef709ea1cb30 Gas usage: 113457 Block number: 1 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getCode @@ -372,11 +372,11 @@ eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x5a7ac30c64d79d623960f3b53abb7c37e3c074b691b55797059d8b3b85830ee0 - Contract created: 0xe8f38959d7422e53abdd8c03055226365518767a + Transaction: 0xe66ba9ac7c6e522b75b146b1d51d1ecf81fa84c97972aa77c7df33e989075127 + Contract created: 0x4f790dff3f03e8d2fd5b934dc745ec34b7cfafc4 Gas usage: 113457 Block number: 1 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getCode @@ -384,160 +384,160 @@ eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x497be702af17ea536d7631c56e1fcae317838f77d9f18a2275a3dc512a513247 + Transaction: 0xdb75c959f1989f632c9bfc98eabcba03fbedd7cd3e30ff508839e98b5f3665d4 Gas usage: 43403 Block number: 2 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xca36756d152cad0cdcafb9bb4959275c5814c533f194837ed16371c6592382fa + Transaction: 0xf226b5466c12caa79d58965d1212a95b7ce4dcee6bcb968f757b1dc2504adf59 Gas usage: 26303 Block number: 3 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xdf456228b8812045927cd740408e20f13e0b8313213d6cae94ea1166ad6aa778 + Transaction: 0x46008fa9027de697cceefceecd241829f42f3da6bb39d26eccf0a0df9e09d528 Gas usage: 26303 Block number: 4 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xdfbaf5f61d35858025f6effbd4ae2f5298577ef0223cdeda4c391bd55dbb57f3 + Transaction: 0xe09c42b19c651b1e07b6c8ef3b7a4726c67dbce3af46009246baa18bb89ad440 Gas usage: 26303 Block number: 5 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xb24226ea5e3de86c9d7f126e0ee840b430f0b7a18b5d74aa3ae921d45d827da6 + Transaction: 0x15063a1dfad42c86bec885527afa5665ae1d212e764a62bc924804aa6069d506 Gas usage: 26303 Block number: 6 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x8c9abc52bc2ed21ef6f807698aaa8df0f5c95747cc3088da145ac59080ff3b37 + Transaction: 0xea8f972f7eee8d29bb60060ee730270bd3d89bdc22894cddc220afbeb8a787ba Gas usage: 26303 Block number: 7 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x9298c18357f132df204e9c54b7b77f59924c868e1a1c76c2c9075a5ad040195a + Transaction: 0x5102dafee8cd2fdb66b726ad74417c3210ef63dd9b3c878b9cd8e4ab18129c81 Gas usage: 26303 Block number: 8 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x901e7fd03e2dc3541719ca43dc30889a95f6f8f8788f690c39a9fc2669c75466 + Transaction: 0x00e7b366097b2a15f9d51295709d65c4b6fca3e7f48707991dca194b572d1231 Gas usage: 26303 Block number: 9 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x105c4412064d4d1dbd9dd763cbc343becba5b34938ae29f19562012dad0cdd3f + Transaction: 0x48c920090c9760aaf1eaf6f327cbe315a290c34c94d47e4c3d5b60583d565906 Gas usage: 26303 Block number: 10 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xa7ab737ab737349611d85f682b6d9a6132f32f550a337635fb8cd2edb65961e9 + Transaction: 0xb8ad5bfac92a09591f69726bf023a20e2aebf46aac84c7276eedd89ee8afcafb Gas usage: 26303 Block number: 11 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xaa69652e5a6cd3d9c53d56c1af109c3741d606d9c303f6530c0c0a9a8e98722c + Transaction: 0xc550847f9af0b949d5391f29d0c74ff8eaa91f28f4ec120c43038d18860996d5 Gas usage: 26303 Block number: 12 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xea2b1986ddd879a5c4453fc6e062ec3b9a891898421a7fcd4a06f3b8326ecbda + Transaction: 0x7eb3dc016e1a78944984d4f50872267ee20c58414aea5b3f1cf3cdeeaad7188f Gas usage: 26303 Block number: 13 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x4b1dfc8e22c8744dbaddc2efb5d9a9ae089e8a1c0d6030c82eeb51e0812194e9 + Transaction: 0x7269401c6c4bab23f103dc149d38379f340a02b235c6de11eb10ab5700e0c7d8 Gas usage: 26303 Block number: 14 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x3a5a7a7bb2b6c4b4b3549e7e8c0f1f1403e44dd8bc806cc7036c635dbc9c5ab0 + Transaction: 0x01eb3bce71bfe075e3f0eea6642fa2b9d9b518859480d2fb3451ab5e52c9e706 Gas usage: 26303 Block number: 15 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x984455814cde980c90089c528bbb0740e615d74741845bcf59bf3f38191e5e19 + Transaction: 0x157f9ef80d3f707b8ee6091748d18a90730a9783730d01302cceb6b3747fe293 Gas usage: 26303 Block number: 16 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x4d3c7f03b933e7539a3c28ad70c21d3a11347d67d755b003efb7ea5998412491 + Transaction: 0x146d4d5503d6557cabc64c2bed3d1c10f5d820cd859449deb508d059c3d85659 Gas usage: 26303 Block number: 17 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_call @@ -655,11 +655,11 @@ eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x035e5849b4f179c4ac7e0da21b3644e6963fa2fb60b15829908f5c42c9d5db4c - Contract created: 0x2d53253a218931215173fc27af8e2abc915a970a + Transaction: 0x28ac13d93250c681623f6562f4304af4d1f9d88b6a36e34074ecf398b0caf001 + Contract created: 0x9a66699d9da0e94de4d0b9df5a1267d0d76fd63c Gas usage: 113457 Block number: 1 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getCode @@ -667,93 +667,93 @@ eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x59adcda967577ff99f6207e1eb8b22a52e88ee8004cc99461d97967ec62ec9d2 + Transaction: 0xcb196de4d65c42646c8758f0d1668f48abec9c2d20300fbf9ca62c7f40dbcfc6 Gas usage: 43403 Block number: 2 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xd34b0696cae3e9b067e4f2065c15d09d126f0dd4c515b3479baef05cdb4dd1d6 + Transaction: 0xd38eeda722ce5a114721a14aecf3d2b2ab019c0ae1e55aa4929e424b8ebd146b Gas usage: 26303 Block number: 3 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x07c97d37904dbdc1c38ae309dfaf9d214fbdb5ac82f919bf36588a9564917fa7 + Transaction: 0x30946be047745da851acc198f72a7acf73d25de75e7bf2f0ebe4df3cab80900c Gas usage: 26303 Block number: 4 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x3593da55179df5bb26e4ff6bb93e7265f62281ba5745ef4bb2e4a627ef22bb17 + Transaction: 0x64996d7d8a94471c29012158c2d7adf863375a5a2efda3afcc3af64867de7892 Gas usage: 26303 Block number: 5 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x0daa99c23779f07afe859358ad66aaf785622bb507b8b60c6650c2634520b4da + Transaction: 0xfcfaaf68101d7e5ec5a98c2a179bfc4de686334b81ae45385c927f56138f10bb Gas usage: 26344 Block number: 6 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xf8dc9156bfd3dd74ea4f2011973eaf81a68f763f61ca39ce117cc7b67334b733 + Transaction: 0x8d17084d67702c335537af50c744bfe05213981a0fb2d10868ca28e7a397e480 Gas usage: 26344 Block number: 7 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xbcc66709ede6817c83cb2dc0660bef940ecdcc35acdd408852abd25e45f4f0cd + Transaction: 0x1b81350ea790852a10102bbdfe4dd1f6b4eb57c444a20c9dab045ea56c585d8e Gas usage: 26344 Block number: 8 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0xd0d742b35ca77c6ff1f524cb0b5389a8ebe1743af66606d11437f6dd34de3e24 + Transaction: 0x42b47a17d1d44f5401c5f2a7334abe857c150248d67b5a05ac55b781343a14e6 Gas usage: 21544 Block number: 9 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_call test failed AssertionError2: expected 10 to equal +0 at file:///Users/adam/Code/kokomoBay/docs/node/src/MyFirstContract.basic.test.mjs:83:84 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) - at async Then.butThen (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:534:18) - at async Then.test (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:207:17) - at async Given.give (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:150:19) - at async Testeranto.givenThat.run (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:75:22) - at async file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:295:14 - at async Object.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:336:31) - at async NodeTesteranto.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:693:47) { + at async Then.butThen (file:///Users/adam/Code/kokomoBay/docs/node/chunk-PCRK6YWL.mjs:540:18) + at async Then.test (file:///Users/adam/Code/kokomoBay/docs/node/chunk-PCRK6YWL.mjs:213:17) + at async Given.give (file:///Users/adam/Code/kokomoBay/docs/node/chunk-PCRK6YWL.mjs:156:19) + at async Testeranto.givenThat.run (file:///Users/adam/Code/kokomoBay/docs/node/chunk-PCRK6YWL.mjs:75:22) + at async file:///Users/adam/Code/kokomoBay/docs/node/chunk-PCRK6YWL.mjs:301:14 + at async Object.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-PCRK6YWL.mjs:342:31) + at async NodeTesteranto.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-PCRK6YWL.mjs:699:47) { showDiff: true, actual: 10, expected: 0, diff --git a/docs/node/src/MyFirstContract.rpc.test.mjs b/docs/node/src/MyFirstContract.rpc.test.mjs index 62aead98..cec4fa8c 100644 --- a/docs/node/src/MyFirstContract.rpc.test.mjs +++ b/docs/node/src/MyFirstContract.rpc.test.mjs @@ -3,7 +3,7 @@ import { MyFirstContractTestInput, commonGivens, features, - require_hash, + require_inherits, require_lib, require_lib10, require_lib11, @@ -19,24 +19,24 @@ import { require_lib7, require_lib8, require_lib9, - require_node_gyp_build, - require_scrypt -} from "../chunk-7FLCGHSA.mjs"; + require_minimalistic_assert, + require_node_gyp_build +} from "../chunk-JYHLOLG4.mjs"; import { Node_default -} from "../chunk-ATCKVWWQ.mjs"; +} from "../chunk-PCRK6YWL.mjs"; import { assert -} from "../chunk-GHFYKOO4.mjs"; -import "../chunk-2MUW23AQ.mjs"; -import "../chunk-J74XOMIJ.mjs"; -import "../chunk-HRTB753X.mjs"; +} from "../chunk-D2G2LC5R.mjs"; +import "../chunk-SF4FRI4W.mjs"; +import "../chunk-ECNFXUXQ.mjs"; +import "../chunk-4CEWYGDD.mjs"; import { __commonJS, __require, __toESM, init_cjs_shim -} from "../chunk-LD4XAW36.mjs"; +} from "../chunk-4UNHOY6E.mjs"; // node_modules/@ethersproject/abstract-provider/lib/_version.js var require_version = __commonJS({ @@ -2204,6 +2204,1643 @@ var require_lib20 = __commonJS({ } }); +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/utils.js +var require_utils = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/utils.js"(exports) { + "use strict"; + init_cjs_shim(); + var assert2 = require_minimalistic_assert(); + var inherits = require_inherits(); + exports.inherits = inherits; + function isSurrogatePair(msg, i) { + if ((msg.charCodeAt(i) & 64512) !== 55296) { + return false; + } + if (i < 0 || i + 1 >= msg.length) { + return false; + } + return (msg.charCodeAt(i + 1) & 64512) === 56320; + } + function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg === "string") { + if (!enc) { + var p = 0; + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + if (c < 128) { + res[p++] = c; + } else if (c < 2048) { + res[p++] = c >> 6 | 192; + res[p++] = c & 63 | 128; + } else if (isSurrogatePair(msg, i)) { + c = 65536 + ((c & 1023) << 10) + (msg.charCodeAt(++i) & 1023); + res[p++] = c >> 18 | 240; + res[p++] = c >> 12 & 63 | 128; + res[p++] = c >> 6 & 63 | 128; + res[p++] = c & 63 | 128; + } else { + res[p++] = c >> 12 | 224; + res[p++] = c >> 6 & 63 | 128; + res[p++] = c & 63 | 128; + } + } + } else if (enc === "hex") { + msg = msg.replace(/[^a-z0-9]+/ig, ""); + if (msg.length % 2 !== 0) + msg = "0" + msg; + for (i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + } else { + for (i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + } + return res; + } + exports.toArray = toArray; + function toHex(msg) { + var res = ""; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; + } + exports.toHex = toHex; + function htonl(w) { + var res = w >>> 24 | w >>> 8 & 65280 | w << 8 & 16711680 | (w & 255) << 24; + return res >>> 0; + } + exports.htonl = htonl; + function toHex32(msg, endian) { + var res = ""; + for (var i = 0; i < msg.length; i++) { + var w = msg[i]; + if (endian === "little") + w = htonl(w); + res += zero8(w.toString(16)); + } + return res; + } + exports.toHex32 = toHex32; + function zero2(word) { + if (word.length === 1) + return "0" + word; + else + return word; + } + exports.zero2 = zero2; + function zero8(word) { + if (word.length === 7) + return "0" + word; + else if (word.length === 6) + return "00" + word; + else if (word.length === 5) + return "000" + word; + else if (word.length === 4) + return "0000" + word; + else if (word.length === 3) + return "00000" + word; + else if (word.length === 2) + return "000000" + word; + else if (word.length === 1) + return "0000000" + word; + else + return word; + } + exports.zero8 = zero8; + function join32(msg, start, end, endian) { + var len = end - start; + assert2(len % 4 === 0); + var res = new Array(len / 4); + for (var i = 0, k = start; i < res.length; i++, k += 4) { + var w; + if (endian === "big") + w = msg[k] << 24 | msg[k + 1] << 16 | msg[k + 2] << 8 | msg[k + 3]; + else + w = msg[k + 3] << 24 | msg[k + 2] << 16 | msg[k + 1] << 8 | msg[k]; + res[i] = w >>> 0; + } + return res; + } + exports.join32 = join32; + function split32(msg, endian) { + var res = new Array(msg.length * 4); + for (var i = 0, k = 0; i < msg.length; i++, k += 4) { + var m = msg[i]; + if (endian === "big") { + res[k] = m >>> 24; + res[k + 1] = m >>> 16 & 255; + res[k + 2] = m >>> 8 & 255; + res[k + 3] = m & 255; + } else { + res[k + 3] = m >>> 24; + res[k + 2] = m >>> 16 & 255; + res[k + 1] = m >>> 8 & 255; + res[k] = m & 255; + } + } + return res; + } + exports.split32 = split32; + function rotr32(w, b) { + return w >>> b | w << 32 - b; + } + exports.rotr32 = rotr32; + function rotl32(w, b) { + return w << b | w >>> 32 - b; + } + exports.rotl32 = rotl32; + function sum32(a, b) { + return a + b >>> 0; + } + exports.sum32 = sum32; + function sum32_3(a, b, c) { + return a + b + c >>> 0; + } + exports.sum32_3 = sum32_3; + function sum32_4(a, b, c, d) { + return a + b + c + d >>> 0; + } + exports.sum32_4 = sum32_4; + function sum32_5(a, b, c, d, e) { + return a + b + c + d + e >>> 0; + } + exports.sum32_5 = sum32_5; + function sum64(buf, pos, ah, al) { + var bh = buf[pos]; + var bl = buf[pos + 1]; + var lo = al + bl >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + buf[pos] = hi >>> 0; + buf[pos + 1] = lo; + } + exports.sum64 = sum64; + function sum64_hi(ah, al, bh, bl) { + var lo = al + bl >>> 0; + var hi = (lo < al ? 1 : 0) + ah + bh; + return hi >>> 0; + } + exports.sum64_hi = sum64_hi; + function sum64_lo(ah, al, bh, bl) { + var lo = al + bl; + return lo >>> 0; + } + exports.sum64_lo = sum64_lo; + function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { + var carry = 0; + var lo = al; + lo = lo + bl >>> 0; + carry += lo < al ? 1 : 0; + lo = lo + cl >>> 0; + carry += lo < cl ? 1 : 0; + lo = lo + dl >>> 0; + carry += lo < dl ? 1 : 0; + var hi = ah + bh + ch + dh + carry; + return hi >>> 0; + } + exports.sum64_4_hi = sum64_4_hi; + function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { + var lo = al + bl + cl + dl; + return lo >>> 0; + } + exports.sum64_4_lo = sum64_4_lo; + function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var carry = 0; + var lo = al; + lo = lo + bl >>> 0; + carry += lo < al ? 1 : 0; + lo = lo + cl >>> 0; + carry += lo < cl ? 1 : 0; + lo = lo + dl >>> 0; + carry += lo < dl ? 1 : 0; + lo = lo + el >>> 0; + carry += lo < el ? 1 : 0; + var hi = ah + bh + ch + dh + eh + carry; + return hi >>> 0; + } + exports.sum64_5_hi = sum64_5_hi; + function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { + var lo = al + bl + cl + dl + el; + return lo >>> 0; + } + exports.sum64_5_lo = sum64_5_lo; + function rotr64_hi(ah, al, num) { + var r = al << 32 - num | ah >>> num; + return r >>> 0; + } + exports.rotr64_hi = rotr64_hi; + function rotr64_lo(ah, al, num) { + var r = ah << 32 - num | al >>> num; + return r >>> 0; + } + exports.rotr64_lo = rotr64_lo; + function shr64_hi(ah, al, num) { + return ah >>> num; + } + exports.shr64_hi = shr64_hi; + function shr64_lo(ah, al, num) { + var r = ah << 32 - num | al >>> num; + return r >>> 0; + } + exports.shr64_lo = shr64_lo; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/common.js +var require_common = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/common.js"(exports) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var assert2 = require_minimalistic_assert(); + function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = "big"; + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; + } + exports.BlockHash = BlockHash; + BlockHash.prototype.update = function update(msg, enc) { + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + if (this.pending.length >= this._delta8) { + msg = this.pending; + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + return this; + }; + BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + assert2(this.pending === null); + return this._digest(enc); + }; + BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - (len + this.padLength) % bytes; + var res = new Array(k + this.padLength); + res[0] = 128; + for (var i = 1; i < k; i++) + res[i] = 0; + len <<= 3; + if (this.endian === "big") { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = len >>> 24 & 255; + res[i++] = len >>> 16 & 255; + res[i++] = len >>> 8 & 255; + res[i++] = len & 255; + } else { + res[i++] = len & 255; + res[i++] = len >>> 8 & 255; + res[i++] = len >>> 16 & 255; + res[i++] = len >>> 24 & 255; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + return res; + }; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/common.js +var require_common2 = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/common.js"(exports) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var rotr32 = utils.rotr32; + function ft_1(s, x, y, z) { + if (s === 0) + return ch32(x, y, z); + if (s === 1 || s === 3) + return p32(x, y, z); + if (s === 2) + return maj32(x, y, z); + } + exports.ft_1 = ft_1; + function ch32(x, y, z) { + return x & y ^ ~x & z; + } + exports.ch32 = ch32; + function maj32(x, y, z) { + return x & y ^ x & z ^ y & z; + } + exports.maj32 = maj32; + function p32(x, y, z) { + return x ^ y ^ z; + } + exports.p32 = p32; + function s0_256(x) { + return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); + } + exports.s0_256 = s0_256; + function s1_256(x) { + return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); + } + exports.s1_256 = s1_256; + function g0_256(x) { + return rotr32(x, 7) ^ rotr32(x, 18) ^ x >>> 3; + } + exports.g0_256 = g0_256; + function g1_256(x) { + return rotr32(x, 17) ^ rotr32(x, 19) ^ x >>> 10; + } + exports.g1_256 = g1_256; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/1.js +var require__ = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/1.js"(exports, module) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var common = require_common(); + var shaCommon = require_common2(); + var rotl32 = utils.rotl32; + var sum32 = utils.sum32; + var sum32_5 = utils.sum32_5; + var ft_1 = shaCommon.ft_1; + var BlockHash = common.BlockHash; + var sha1_K = [ + 1518500249, + 1859775393, + 2400959708, + 3395469782 + ]; + function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + BlockHash.call(this); + this.h = [ + 1732584193, + 4023233417, + 2562383102, + 271733878, + 3285377520 + ]; + this.W = new Array(80); + } + utils.inherits(SHA1, BlockHash); + module.exports = SHA1; + SHA1.blockSize = 512; + SHA1.outSize = 160; + SHA1.hmacStrength = 80; + SHA1.padLength = 64; + SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32(b, 30); + b = a; + a = t; + } + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + }; + SHA1.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); + }; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/256.js +var require__2 = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/256.js"(exports, module) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var common = require_common(); + var shaCommon = require_common2(); + var assert2 = require_minimalistic_assert(); + var sum32 = utils.sum32; + var sum32_4 = utils.sum32_4; + var sum32_5 = utils.sum32_5; + var ch32 = shaCommon.ch32; + var maj32 = shaCommon.maj32; + var s0_256 = shaCommon.s0_256; + var s1_256 = shaCommon.s1_256; + var g0_256 = shaCommon.g0_256; + var g1_256 = shaCommon.g1_256; + var BlockHash = common.BlockHash; + var sha256_K = [ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]; + function SHA256() { + if (!(this instanceof SHA256)) + return new SHA256(); + BlockHash.call(this); + this.h = [ + 1779033703, + 3144134277, + 1013904242, + 2773480762, + 1359893119, + 2600822924, + 528734635, + 1541459225 + ]; + this.k = sha256_K; + this.W = new Array(64); + } + utils.inherits(SHA256, BlockHash); + module.exports = SHA256; + SHA256.blockSize = 512; + SHA256.outSize = 256; + SHA256.hmacStrength = 192; + SHA256.padLength = 64; + SHA256.prototype._update = function _update(msg, start) { + var W = this.W; + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + for (; i < W.length; i++) + W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + var f = this.h[5]; + var g = this.h[6]; + var h = this.h[7]; + assert2(this.k.length === W.length); + for (i = 0; i < W.length; i++) { + var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); + var T2 = sum32(s0_256(a), maj32(a, b, c)); + h = g; + g = f; + f = e; + e = sum32(d, T1); + d = c; + c = b; + b = a; + a = sum32(T1, T2); + } + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); + this.h[5] = sum32(this.h[5], f); + this.h[6] = sum32(this.h[6], g); + this.h[7] = sum32(this.h[7], h); + }; + SHA256.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); + }; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/224.js +var require__3 = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/224.js"(exports, module) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var SHA256 = require__2(); + function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + SHA256.call(this); + this.h = [ + 3238371032, + 914150663, + 812702999, + 4144912697, + 4290775857, + 1750603025, + 1694076839, + 3204075428 + ]; + } + utils.inherits(SHA224, SHA256); + module.exports = SHA224; + SHA224.blockSize = 512; + SHA224.outSize = 224; + SHA224.hmacStrength = 192; + SHA224.padLength = 64; + SHA224.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h.slice(0, 7), "big"); + else + return utils.split32(this.h.slice(0, 7), "big"); + }; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/512.js +var require__4 = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/512.js"(exports, module) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var common = require_common(); + var assert2 = require_minimalistic_assert(); + var rotr64_hi = utils.rotr64_hi; + var rotr64_lo = utils.rotr64_lo; + var shr64_hi = utils.shr64_hi; + var shr64_lo = utils.shr64_lo; + var sum64 = utils.sum64; + var sum64_hi = utils.sum64_hi; + var sum64_lo = utils.sum64_lo; + var sum64_4_hi = utils.sum64_4_hi; + var sum64_4_lo = utils.sum64_4_lo; + var sum64_5_hi = utils.sum64_5_hi; + var sum64_5_lo = utils.sum64_5_lo; + var BlockHash = common.BlockHash; + var sha512_K = [ + 1116352408, + 3609767458, + 1899447441, + 602891725, + 3049323471, + 3964484399, + 3921009573, + 2173295548, + 961987163, + 4081628472, + 1508970993, + 3053834265, + 2453635748, + 2937671579, + 2870763221, + 3664609560, + 3624381080, + 2734883394, + 310598401, + 1164996542, + 607225278, + 1323610764, + 1426881987, + 3590304994, + 1925078388, + 4068182383, + 2162078206, + 991336113, + 2614888103, + 633803317, + 3248222580, + 3479774868, + 3835390401, + 2666613458, + 4022224774, + 944711139, + 264347078, + 2341262773, + 604807628, + 2007800933, + 770255983, + 1495990901, + 1249150122, + 1856431235, + 1555081692, + 3175218132, + 1996064986, + 2198950837, + 2554220882, + 3999719339, + 2821834349, + 766784016, + 2952996808, + 2566594879, + 3210313671, + 3203337956, + 3336571891, + 1034457026, + 3584528711, + 2466948901, + 113926993, + 3758326383, + 338241895, + 168717936, + 666307205, + 1188179964, + 773529912, + 1546045734, + 1294757372, + 1522805485, + 1396182291, + 2643833823, + 1695183700, + 2343527390, + 1986661051, + 1014477480, + 2177026350, + 1206759142, + 2456956037, + 344077627, + 2730485921, + 1290863460, + 2820302411, + 3158454273, + 3259730800, + 3505952657, + 3345764771, + 106217008, + 3516065817, + 3606008344, + 3600352804, + 1432725776, + 4094571909, + 1467031594, + 275423344, + 851169720, + 430227734, + 3100823752, + 506948616, + 1363258195, + 659060556, + 3750685593, + 883997877, + 3785050280, + 958139571, + 3318307427, + 1322822218, + 3812723403, + 1537002063, + 2003034995, + 1747873779, + 3602036899, + 1955562222, + 1575990012, + 2024104815, + 1125592928, + 2227730452, + 2716904306, + 2361852424, + 442776044, + 2428436474, + 593698344, + 2756734187, + 3733110249, + 3204031479, + 2999351573, + 3329325298, + 3815920427, + 3391569614, + 3928383900, + 3515267271, + 566280711, + 3940187606, + 3454069534, + 4118630271, + 4000239992, + 116418474, + 1914138554, + 174292421, + 2731055270, + 289380356, + 3203993006, + 460393269, + 320620315, + 685471733, + 587496836, + 852142971, + 1086792851, + 1017036298, + 365543100, + 1126000580, + 2618297676, + 1288033470, + 3409855158, + 1501505948, + 4234509866, + 1607167915, + 987167468, + 1816402316, + 1246189591 + ]; + function SHA512() { + if (!(this instanceof SHA512)) + return new SHA512(); + BlockHash.call(this); + this.h = [ + 1779033703, + 4089235720, + 3144134277, + 2227873595, + 1013904242, + 4271175723, + 2773480762, + 1595750129, + 1359893119, + 2917565137, + 2600822924, + 725511199, + 528734635, + 4215389547, + 1541459225, + 327033209 + ]; + this.k = sha512_K; + this.W = new Array(160); + } + utils.inherits(SHA512, BlockHash); + module.exports = SHA512; + SHA512.blockSize = 1024; + SHA512.outSize = 512; + SHA512.hmacStrength = 192; + SHA512.padLength = 128; + SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { + var W = this.W; + for (var i = 0; i < 32; i++) + W[i] = msg[start + i]; + for (; i < W.length; i += 2) { + var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); + var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); + var c1_hi = W[i - 14]; + var c1_lo = W[i - 13]; + var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); + var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); + var c3_hi = W[i - 32]; + var c3_lo = W[i - 31]; + W[i] = sum64_4_hi( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo + ); + W[i + 1] = sum64_4_lo( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo + ); + } + }; + SHA512.prototype._update = function _update(msg, start) { + this._prepareBlock(msg, start); + var W = this.W; + var ah = this.h[0]; + var al = this.h[1]; + var bh = this.h[2]; + var bl = this.h[3]; + var ch = this.h[4]; + var cl = this.h[5]; + var dh = this.h[6]; + var dl = this.h[7]; + var eh = this.h[8]; + var el = this.h[9]; + var fh = this.h[10]; + var fl = this.h[11]; + var gh = this.h[12]; + var gl = this.h[13]; + var hh = this.h[14]; + var hl = this.h[15]; + assert2(this.k.length === W.length); + for (var i = 0; i < W.length; i += 2) { + var c0_hi = hh; + var c0_lo = hl; + var c1_hi = s1_512_hi(eh, el); + var c1_lo = s1_512_lo(eh, el); + var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); + var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); + var c3_hi = this.k[i]; + var c3_lo = this.k[i + 1]; + var c4_hi = W[i]; + var c4_lo = W[i + 1]; + var T1_hi = sum64_5_hi( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo, + c4_hi, + c4_lo + ); + var T1_lo = sum64_5_lo( + c0_hi, + c0_lo, + c1_hi, + c1_lo, + c2_hi, + c2_lo, + c3_hi, + c3_lo, + c4_hi, + c4_lo + ); + c0_hi = s0_512_hi(ah, al); + c0_lo = s0_512_lo(ah, al); + c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); + c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); + var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); + var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + eh = sum64_hi(dh, dl, T1_hi, T1_lo); + el = sum64_lo(dl, dl, T1_hi, T1_lo); + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); + al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); + } + sum64(this.h, 0, ah, al); + sum64(this.h, 2, bh, bl); + sum64(this.h, 4, ch, cl); + sum64(this.h, 6, dh, dl); + sum64(this.h, 8, eh, el); + sum64(this.h, 10, fh, fl); + sum64(this.h, 12, gh, gl); + sum64(this.h, 14, hh, hl); + }; + SHA512.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "big"); + else + return utils.split32(this.h, "big"); + }; + function ch64_hi(xh, xl, yh, yl, zh) { + var r = xh & yh ^ ~xh & zh; + if (r < 0) + r += 4294967296; + return r; + } + function ch64_lo(xh, xl, yh, yl, zh, zl) { + var r = xl & yl ^ ~xl & zl; + if (r < 0) + r += 4294967296; + return r; + } + function maj64_hi(xh, xl, yh, yl, zh) { + var r = xh & yh ^ xh & zh ^ yh & zh; + if (r < 0) + r += 4294967296; + return r; + } + function maj64_lo(xh, xl, yh, yl, zh, zl) { + var r = xl & yl ^ xl & zl ^ yl & zl; + if (r < 0) + r += 4294967296; + return r; + } + function s0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 28); + var c1_hi = rotr64_hi(xl, xh, 2); + var c2_hi = rotr64_hi(xl, xh, 7); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function s0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 28); + var c1_lo = rotr64_lo(xl, xh, 2); + var c2_lo = rotr64_lo(xl, xh, 7); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function s1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 14); + var c1_hi = rotr64_hi(xh, xl, 18); + var c2_hi = rotr64_hi(xl, xh, 9); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function s1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 14); + var c1_lo = rotr64_lo(xh, xl, 18); + var c2_lo = rotr64_lo(xl, xh, 9); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function g0_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 1); + var c1_hi = rotr64_hi(xh, xl, 8); + var c2_hi = shr64_hi(xh, xl, 7); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function g0_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 1); + var c1_lo = rotr64_lo(xh, xl, 8); + var c2_lo = shr64_lo(xh, xl, 7); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + function g1_512_hi(xh, xl) { + var c0_hi = rotr64_hi(xh, xl, 19); + var c1_hi = rotr64_hi(xl, xh, 29); + var c2_hi = shr64_hi(xh, xl, 6); + var r = c0_hi ^ c1_hi ^ c2_hi; + if (r < 0) + r += 4294967296; + return r; + } + function g1_512_lo(xh, xl) { + var c0_lo = rotr64_lo(xh, xl, 19); + var c1_lo = rotr64_lo(xl, xh, 29); + var c2_lo = shr64_lo(xh, xl, 6); + var r = c0_lo ^ c1_lo ^ c2_lo; + if (r < 0) + r += 4294967296; + return r; + } + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/384.js +var require__5 = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha/384.js"(exports, module) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var SHA512 = require__4(); + function SHA384() { + if (!(this instanceof SHA384)) + return new SHA384(); + SHA512.call(this); + this.h = [ + 3418070365, + 3238371032, + 1654270250, + 914150663, + 2438529370, + 812702999, + 355462360, + 4144912697, + 1731405415, + 4290775857, + 2394180231, + 1750603025, + 3675008525, + 1694076839, + 1203062813, + 3204075428 + ]; + } + utils.inherits(SHA384, SHA512); + module.exports = SHA384; + SHA384.blockSize = 1024; + SHA384.outSize = 384; + SHA384.hmacStrength = 192; + SHA384.padLength = 128; + SHA384.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h.slice(0, 12), "big"); + else + return utils.split32(this.h.slice(0, 12), "big"); + }; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha.js +var require_sha = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/sha.js"(exports) { + "use strict"; + init_cjs_shim(); + exports.sha1 = require__(); + exports.sha224 = require__3(); + exports.sha256 = require__2(); + exports.sha384 = require__5(); + exports.sha512 = require__4(); + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/ripemd.js +var require_ripemd = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/ripemd.js"(exports) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var common = require_common(); + var rotl32 = utils.rotl32; + var sum32 = utils.sum32; + var sum32_3 = utils.sum32_3; + var sum32_4 = utils.sum32_4; + var BlockHash = common.BlockHash; + function RIPEMD160() { + if (!(this instanceof RIPEMD160)) + return new RIPEMD160(); + BlockHash.call(this); + this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + this.endian = "little"; + } + utils.inherits(RIPEMD160, BlockHash); + exports.ripemd160 = RIPEMD160; + RIPEMD160.blockSize = 512; + RIPEMD160.outSize = 160; + RIPEMD160.hmacStrength = 192; + RIPEMD160.padLength = 64; + RIPEMD160.prototype._update = function update(msg, start) { + var A = this.h[0]; + var B = this.h[1]; + var C = this.h[2]; + var D = this.h[3]; + var E = this.h[4]; + var Ah = A; + var Bh = B; + var Ch = C; + var Dh = D; + var Eh = E; + for (var j = 0; j < 80; j++) { + var T = sum32( + rotl32( + sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), + s[j] + ), + E + ); + A = E; + E = D; + D = rotl32(C, 10); + C = B; + B = T; + T = sum32( + rotl32( + sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), + sh[j] + ), + Eh + ); + Ah = Eh; + Eh = Dh; + Dh = rotl32(Ch, 10); + Ch = Bh; + Bh = T; + } + T = sum32_3(this.h[1], C, Dh); + this.h[1] = sum32_3(this.h[2], D, Eh); + this.h[2] = sum32_3(this.h[3], E, Ah); + this.h[3] = sum32_3(this.h[4], A, Bh); + this.h[4] = sum32_3(this.h[0], B, Ch); + this.h[0] = T; + }; + RIPEMD160.prototype._digest = function digest(enc) { + if (enc === "hex") + return utils.toHex32(this.h, "little"); + else + return utils.split32(this.h, "little"); + }; + function f(j, x, y, z) { + if (j <= 15) + return x ^ y ^ z; + else if (j <= 31) + return x & y | ~x & z; + else if (j <= 47) + return (x | ~y) ^ z; + else if (j <= 63) + return x & z | y & ~z; + else + return x ^ (y | ~z); + } + function K(j) { + if (j <= 15) + return 0; + else if (j <= 31) + return 1518500249; + else if (j <= 47) + return 1859775393; + else if (j <= 63) + return 2400959708; + else + return 2840853838; + } + function Kh(j) { + if (j <= 15) + return 1352829926; + else if (j <= 31) + return 1548603684; + else if (j <= 47) + return 1836072691; + else if (j <= 63) + return 2053994217; + else + return 0; + } + var r = [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 7, + 4, + 13, + 1, + 10, + 6, + 15, + 3, + 12, + 0, + 9, + 5, + 2, + 14, + 11, + 8, + 3, + 10, + 14, + 4, + 9, + 15, + 8, + 1, + 2, + 7, + 0, + 6, + 13, + 11, + 5, + 12, + 1, + 9, + 11, + 10, + 0, + 8, + 12, + 4, + 13, + 3, + 7, + 15, + 14, + 5, + 6, + 2, + 4, + 0, + 5, + 9, + 7, + 12, + 2, + 10, + 14, + 1, + 3, + 8, + 11, + 6, + 15, + 13 + ]; + var rh = [ + 5, + 14, + 7, + 0, + 9, + 2, + 11, + 4, + 13, + 6, + 15, + 8, + 1, + 10, + 3, + 12, + 6, + 11, + 3, + 7, + 0, + 13, + 5, + 10, + 14, + 15, + 8, + 12, + 4, + 9, + 1, + 2, + 15, + 5, + 1, + 3, + 7, + 14, + 6, + 9, + 11, + 8, + 12, + 2, + 10, + 0, + 4, + 13, + 8, + 6, + 4, + 1, + 3, + 11, + 15, + 0, + 5, + 12, + 2, + 13, + 9, + 7, + 10, + 14, + 12, + 15, + 10, + 4, + 1, + 5, + 8, + 7, + 6, + 2, + 13, + 14, + 0, + 3, + 9, + 11 + ]; + var s = [ + 11, + 14, + 15, + 12, + 5, + 8, + 7, + 9, + 11, + 13, + 14, + 15, + 6, + 7, + 9, + 8, + 7, + 6, + 8, + 13, + 11, + 9, + 7, + 15, + 7, + 12, + 15, + 9, + 11, + 7, + 13, + 12, + 11, + 13, + 6, + 7, + 14, + 9, + 13, + 15, + 14, + 8, + 13, + 6, + 5, + 12, + 7, + 5, + 11, + 12, + 14, + 15, + 14, + 15, + 9, + 8, + 9, + 14, + 5, + 6, + 8, + 6, + 5, + 12, + 9, + 15, + 5, + 11, + 6, + 8, + 13, + 12, + 5, + 12, + 13, + 14, + 11, + 8, + 5, + 6 + ]; + var sh = [ + 8, + 9, + 9, + 11, + 13, + 15, + 15, + 5, + 7, + 7, + 8, + 11, + 14, + 14, + 12, + 6, + 9, + 13, + 15, + 7, + 12, + 8, + 9, + 11, + 7, + 7, + 12, + 7, + 6, + 15, + 13, + 11, + 9, + 7, + 15, + 11, + 8, + 6, + 6, + 14, + 12, + 13, + 5, + 14, + 13, + 13, + 7, + 5, + 15, + 5, + 8, + 11, + 14, + 14, + 6, + 14, + 6, + 9, + 12, + 9, + 12, + 5, + 15, + 8, + 8, + 5, + 12, + 9, + 12, + 5, + 14, + 6, + 8, + 13, + 6, + 5, + 15, + 13, + 11, + 11 + ]; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/hmac.js +var require_hmac = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash/hmac.js"(exports, module) { + "use strict"; + init_cjs_shim(); + var utils = require_utils(); + var assert2 = require_minimalistic_assert(); + function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + this._init(utils.toArray(key, enc)); + } + module.exports = Hmac; + Hmac.prototype._init = function init(key) { + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + assert2(key.length <= this.blockSize); + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + for (i = 0; i < key.length; i++) + key[i] ^= 54; + this.inner = new this.Hash().update(key); + for (i = 0; i < key.length; i++) + key[i] ^= 106; + this.outer = new this.Hash().update(key); + }; + Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; + }; + Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); + }; + } +}); + +// node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash.js +var require_hash = __commonJS({ + "node_modules/@ethersproject/sha2/node_modules/hash.js/lib/hash.js"(exports) { + init_cjs_shim(); + var hash = exports; + hash.utils = require_utils(); + hash.common = require_common(); + hash.sha = require_sha(); + hash.ripemd = require_ripemd(); + hash.hmac = require_hmac(); + hash.sha1 = hash.sha.sha1; + hash.sha256 = hash.sha.sha256; + hash.sha224 = hash.sha.sha224; + hash.sha384 = hash.sha.sha384; + hash.sha512 = hash.sha.sha512; + hash.ripemd160 = hash.ripemd.ripemd160; + } +}); + // node_modules/@ethersproject/sha2/lib/types.js var require_types = __commonJS({ "node_modules/@ethersproject/sha2/lib/types.js"(exports) { @@ -4087,7 +5724,7 @@ var require_version7 = __commonJS({ }); // node_modules/@ethersproject/json-wallets/lib/utils.js -var require_utils = __commonJS({ +var require_utils2 = __commonJS({ "node_modules/@ethersproject/json-wallets/lib/utils.js"(exports) { "use strict"; init_cjs_shim(); @@ -4194,7 +5831,7 @@ var require_crowdsale = __commonJS({ var logger_1 = require_lib(); var _version_1 = require_version7(); var logger = new logger_1.Logger(_version_1.version); - var utils_1 = require_utils(); + var utils_1 = require_utils2(); var CrowdsaleAccount = ( /** @class */ function(_super) { @@ -4290,6 +5927,478 @@ var require_inspect = __commonJS({ } }); +// node_modules/@ethersproject/json-wallets/node_modules/scrypt-js/scrypt.js +var require_scrypt = __commonJS({ + "node_modules/@ethersproject/json-wallets/node_modules/scrypt-js/scrypt.js"(exports, module) { + "use strict"; + init_cjs_shim(); + (function(root) { + const MAX_VALUE = 2147483647; + function SHA256(m) { + const K = new Uint32Array([ + 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 + ]); + let h0 = 1779033703, h1 = 3144134277, h2 = 1013904242, h3 = 2773480762; + let h4 = 1359893119, h5 = 2600822924, h6 = 528734635, h7 = 1541459225; + const w = new Uint32Array(64); + function blocks(p2) { + let off = 0, len = p2.length; + while (len >= 64) { + let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i2, j, t1, t2; + for (i2 = 0; i2 < 16; i2++) { + j = off + i2 * 4; + w[i2] = (p2[j] & 255) << 24 | (p2[j + 1] & 255) << 16 | (p2[j + 2] & 255) << 8 | p2[j + 3] & 255; + } + for (i2 = 16; i2 < 64; i2++) { + u = w[i2 - 2]; + t1 = (u >>> 17 | u << 32 - 17) ^ (u >>> 19 | u << 32 - 19) ^ u >>> 10; + u = w[i2 - 15]; + t2 = (u >>> 7 | u << 32 - 7) ^ (u >>> 18 | u << 32 - 18) ^ u >>> 3; + w[i2] = (t1 + w[i2 - 7] | 0) + (t2 + w[i2 - 16] | 0) | 0; + } + for (i2 = 0; i2 < 64; i2++) { + t1 = (((e >>> 6 | e << 32 - 6) ^ (e >>> 11 | e << 32 - 11) ^ (e >>> 25 | e << 32 - 25)) + (e & f ^ ~e & g) | 0) + (h + (K[i2] + w[i2] | 0) | 0) | 0; + t2 = ((a >>> 2 | a << 32 - 2) ^ (a >>> 13 | a << 32 - 13) ^ (a >>> 22 | a << 32 - 22)) + (a & b ^ a & c ^ b & c) | 0; + h = g; + g = f; + f = e; + e = d + t1 | 0; + d = c; + c = b; + b = a; + a = t1 + t2 | 0; + } + h0 = h0 + a | 0; + h1 = h1 + b | 0; + h2 = h2 + c | 0; + h3 = h3 + d | 0; + h4 = h4 + e | 0; + h5 = h5 + f | 0; + h6 = h6 + g | 0; + h7 = h7 + h | 0; + off += 64; + len -= 64; + } + } + blocks(m); + let i, bytesLeft = m.length % 64, bitLenHi = m.length / 536870912 | 0, bitLenLo = m.length << 3, numZeros = bytesLeft < 56 ? 56 : 120, p = m.slice(m.length - bytesLeft, m.length); + p.push(128); + for (i = bytesLeft + 1; i < numZeros; i++) { + p.push(0); + } + p.push(bitLenHi >>> 24 & 255); + p.push(bitLenHi >>> 16 & 255); + p.push(bitLenHi >>> 8 & 255); + p.push(bitLenHi >>> 0 & 255); + p.push(bitLenLo >>> 24 & 255); + p.push(bitLenLo >>> 16 & 255); + p.push(bitLenLo >>> 8 & 255); + p.push(bitLenLo >>> 0 & 255); + blocks(p); + return [ + h0 >>> 24 & 255, + h0 >>> 16 & 255, + h0 >>> 8 & 255, + h0 >>> 0 & 255, + h1 >>> 24 & 255, + h1 >>> 16 & 255, + h1 >>> 8 & 255, + h1 >>> 0 & 255, + h2 >>> 24 & 255, + h2 >>> 16 & 255, + h2 >>> 8 & 255, + h2 >>> 0 & 255, + h3 >>> 24 & 255, + h3 >>> 16 & 255, + h3 >>> 8 & 255, + h3 >>> 0 & 255, + h4 >>> 24 & 255, + h4 >>> 16 & 255, + h4 >>> 8 & 255, + h4 >>> 0 & 255, + h5 >>> 24 & 255, + h5 >>> 16 & 255, + h5 >>> 8 & 255, + h5 >>> 0 & 255, + h6 >>> 24 & 255, + h6 >>> 16 & 255, + h6 >>> 8 & 255, + h6 >>> 0 & 255, + h7 >>> 24 & 255, + h7 >>> 16 & 255, + h7 >>> 8 & 255, + h7 >>> 0 & 255 + ]; + } + function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) { + password = password.length <= 64 ? password : SHA256(password); + const innerLen = 64 + salt.length + 4; + const inner = new Array(innerLen); + const outerKey = new Array(64); + let i; + let dk = []; + for (i = 0; i < 64; i++) { + inner[i] = 54; + } + for (i = 0; i < password.length; i++) { + inner[i] ^= password[i]; + } + for (i = 0; i < salt.length; i++) { + inner[64 + i] = salt[i]; + } + for (i = innerLen - 4; i < innerLen; i++) { + inner[i] = 0; + } + for (i = 0; i < 64; i++) + outerKey[i] = 92; + for (i = 0; i < password.length; i++) + outerKey[i] ^= password[i]; + function incrementCounter() { + for (let i2 = innerLen - 1; i2 >= innerLen - 4; i2--) { + inner[i2]++; + if (inner[i2] <= 255) + return; + inner[i2] = 0; + } + } + while (dkLen >= 32) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner)))); + dkLen -= 32; + } + if (dkLen > 0) { + incrementCounter(); + dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen)); + } + return dk; + } + function blockmix_salsa8(BY, Yi, r, x, _X) { + let i; + arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16); + for (i = 0; i < 2 * r; i++) { + blockxor(BY, i * 16, _X, 16); + salsa20_8(_X, x); + arraycopy(_X, 0, BY, Yi + i * 16, 16); + } + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + i * 2 * 16, BY, i * 16, 16); + } + for (i = 0; i < r; i++) { + arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16); + } + } + function R(a, b) { + return a << b | a >>> 32 - b; + } + function salsa20_8(B, x) { + arraycopy(B, 0, x, 0, 16); + for (let i = 8; i > 0; i -= 2) { + x[4] ^= R(x[0] + x[12], 7); + x[8] ^= R(x[4] + x[0], 9); + x[12] ^= R(x[8] + x[4], 13); + x[0] ^= R(x[12] + x[8], 18); + x[9] ^= R(x[5] + x[1], 7); + x[13] ^= R(x[9] + x[5], 9); + x[1] ^= R(x[13] + x[9], 13); + x[5] ^= R(x[1] + x[13], 18); + x[14] ^= R(x[10] + x[6], 7); + x[2] ^= R(x[14] + x[10], 9); + x[6] ^= R(x[2] + x[14], 13); + x[10] ^= R(x[6] + x[2], 18); + x[3] ^= R(x[15] + x[11], 7); + x[7] ^= R(x[3] + x[15], 9); + x[11] ^= R(x[7] + x[3], 13); + x[15] ^= R(x[11] + x[7], 18); + x[1] ^= R(x[0] + x[3], 7); + x[2] ^= R(x[1] + x[0], 9); + x[3] ^= R(x[2] + x[1], 13); + x[0] ^= R(x[3] + x[2], 18); + x[6] ^= R(x[5] + x[4], 7); + x[7] ^= R(x[6] + x[5], 9); + x[4] ^= R(x[7] + x[6], 13); + x[5] ^= R(x[4] + x[7], 18); + x[11] ^= R(x[10] + x[9], 7); + x[8] ^= R(x[11] + x[10], 9); + x[9] ^= R(x[8] + x[11], 13); + x[10] ^= R(x[9] + x[8], 18); + x[12] ^= R(x[15] + x[14], 7); + x[13] ^= R(x[12] + x[15], 9); + x[14] ^= R(x[13] + x[12], 13); + x[15] ^= R(x[14] + x[13], 18); + } + for (let i = 0; i < 16; ++i) { + B[i] += x[i]; + } + } + function blockxor(S, Si, D, len) { + for (let i = 0; i < len; i++) { + D[i] ^= S[Si + i]; + } + } + function arraycopy(src, srcPos, dest, destPos, length) { + while (length--) { + dest[destPos++] = src[srcPos++]; + } + } + function checkBufferish(o) { + if (!o || typeof o.length !== "number") { + return false; + } + for (let i = 0; i < o.length; i++) { + const v = o[i]; + if (typeof v !== "number" || v % 1 || v < 0 || v >= 256) { + return false; + } + } + return true; + } + function ensureInteger(value, name) { + if (typeof value !== "number" || value % 1) { + throw new Error("invalid " + name); + } + return value; + } + function _scrypt(password, salt, N, r, p, dkLen, callback) { + N = ensureInteger(N, "N"); + r = ensureInteger(r, "r"); + p = ensureInteger(p, "p"); + dkLen = ensureInteger(dkLen, "dkLen"); + if (N === 0 || (N & N - 1) !== 0) { + throw new Error("N must be power of 2"); + } + if (N > MAX_VALUE / 128 / r) { + throw new Error("N too large"); + } + if (r > MAX_VALUE / 128 / p) { + throw new Error("r too large"); + } + if (!checkBufferish(password)) { + throw new Error("password must be an array or buffer"); + } + password = Array.prototype.slice.call(password); + if (!checkBufferish(salt)) { + throw new Error("salt must be an array or buffer"); + } + salt = Array.prototype.slice.call(salt); + let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r); + const B = new Uint32Array(p * 32 * r); + for (let i = 0; i < B.length; i++) { + const j = i * 4; + B[i] = (b[j + 3] & 255) << 24 | (b[j + 2] & 255) << 16 | (b[j + 1] & 255) << 8 | (b[j + 0] & 255) << 0; + } + const XY = new Uint32Array(64 * r); + const V = new Uint32Array(32 * r * N); + const Yi = 32 * r; + const x = new Uint32Array(16); + const _X = new Uint32Array(16); + const totalOps = p * N * 2; + let currentOp = 0; + let lastPercent10 = null; + let stop = false; + let state = 0; + let i0 = 0, i1; + let Bi; + const limit = callback ? parseInt(1e3 / r) : 4294967295; + const nextTick = typeof setImmediate !== "undefined" ? setImmediate : setTimeout; + const incrementalSMix = function() { + if (stop) { + return callback(new Error("cancelled"), currentOp / totalOps); + } + let steps; + switch (state) { + case 0: + Bi = i0 * 32 * r; + arraycopy(B, Bi, XY, 0, Yi); + state = 1; + i1 = 0; + case 1: + steps = N - i1; + if (steps > limit) { + steps = limit; + } + for (let i = 0; i < steps; i++) { + arraycopy(XY, 0, V, (i1 + i) * Yi, Yi); + blockmix_salsa8(XY, Yi, r, x, _X); + } + i1 += steps; + currentOp += steps; + if (callback) { + const percent10 = parseInt(1e3 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { + break; + } + lastPercent10 = percent10; + } + } + if (i1 < N) { + break; + } + i1 = 0; + state = 2; + case 2: + steps = N - i1; + if (steps > limit) { + steps = limit; + } + for (let i = 0; i < steps; i++) { + const offset = (2 * r - 1) * 16; + const j = XY[offset] & N - 1; + blockxor(V, j * Yi, XY, Yi); + blockmix_salsa8(XY, Yi, r, x, _X); + } + i1 += steps; + currentOp += steps; + if (callback) { + const percent10 = parseInt(1e3 * currentOp / totalOps); + if (percent10 !== lastPercent10) { + stop = callback(null, currentOp / totalOps); + if (stop) { + break; + } + lastPercent10 = percent10; + } + } + if (i1 < N) { + break; + } + arraycopy(XY, 0, B, Bi, Yi); + i0++; + if (i0 < p) { + state = 0; + break; + } + b = []; + for (let i = 0; i < B.length; i++) { + b.push(B[i] >> 0 & 255); + b.push(B[i] >> 8 & 255); + b.push(B[i] >> 16 & 255); + b.push(B[i] >> 24 & 255); + } + const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen); + if (callback) { + callback(null, 1, derivedKey); + } + return derivedKey; + } + if (callback) { + nextTick(incrementalSMix); + } + }; + if (!callback) { + while (true) { + const derivedKey = incrementalSMix(); + if (derivedKey != void 0) { + return derivedKey; + } + } + } + incrementalSMix(); + } + const lib = { + scrypt: function(password, salt, N, r, p, dkLen, progressCallback) { + return new Promise(function(resolve, reject) { + let lastProgress = 0; + if (progressCallback) { + progressCallback(0); + } + _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) { + if (error) { + reject(error); + } else if (key) { + if (progressCallback && lastProgress !== 1) { + progressCallback(1); + } + resolve(new Uint8Array(key)); + } else if (progressCallback && progress !== lastProgress) { + lastProgress = progress; + return progressCallback(progress); + } + }); + }); + }, + syncScrypt: function(password, salt, N, r, p, dkLen) { + return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen)); + } + }; + if (typeof exports !== "undefined") { + module.exports = lib; + } else if (typeof define === "function" && define.amd) { + define(lib); + } else if (root) { + if (root.scrypt) { + root._scrypt = root.scrypt; + } + root.scrypt = lib; + } + })(exports); + } +}); + // node_modules/@ethersproject/json-wallets/lib/keystore.js var require_keystore = __commonJS({ "node_modules/@ethersproject/json-wallets/lib/keystore.js"(exports) { @@ -4434,7 +6543,7 @@ var require_keystore = __commonJS({ var random_1 = require_lib24(); var properties_1 = require_lib8(); var transactions_1 = require_lib10(); - var utils_1 = require_utils(); + var utils_1 = require_utils2(); var logger_1 = require_lib(); var _version_1 = require_version7(); var logger = new logger_1.Logger(_version_1.version); @@ -16964,7 +19073,7 @@ var require_lib31 = __commonJS({ }); // node_modules/ethers/lib/utils.js -var require_utils2 = __commonJS({ +var require_utils3 = __commonJS({ "node_modules/ethers/lib/utils.js"(exports) { "use strict"; init_cjs_shim(); @@ -17407,7 +19516,7 @@ var require_ethers = __commonJS({ Object.defineProperty(exports, "wordlists", { enumerable: true, get: function() { return wordlists_1.wordlists; } }); - var utils = __importStar(require_utils2()); + var utils = __importStar(require_utils3()); exports.utils = utils; var logger_1 = require_lib(); Object.defineProperty(exports, "errors", { enumerable: true, get: function() { diff --git a/docs/node/src/MyFirstContract.rpc.test/stderr.log b/docs/node/src/MyFirstContract.rpc.test/stderr.log index d2aab8fb..5bb89eaf 100644 --- a/docs/node/src/MyFirstContract.rpc.test/stderr.log +++ b/docs/node/src/MyFirstContract.rpc.test/stderr.log @@ -8,7 +8,7 @@ Require stack: Falling back to a NodeJS implementation; performance may be degraded. -(node:79450) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. +(node:78520) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `Electron Helper --trace-deprecation ...` to show where the warning was created) /Users/adam/Code/kokomoBay/node_modules/ganache/dist/node/1.js:2 exports.id=1,exports.ids=[1],exports.modules={50:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),n(s(591),t)},591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TruffleColors=void 0,t.TruffleColors={porsche:"#e4a663",turquoise:"#3fe0c5",infura:"#ff6b4a"}},141:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.__experimental_info=t.provider=t.server=t.ServerStatus=t.Server=void 0;const n=s(1),i=s(323),o=r(s(233));var a=s(233);Object.defineProperty(t,"Server",{enumerable:!0,get:function(){return a.Server}}),Object.defineProperty(t,"ServerStatus",{enumerable:!0,get:function(){return a.ServerStatus}});const c={server:e=>new o.default(e),provider:e=>(0,i.initializeFlavor)(e).connector.provider,__experimental_info:()=>({version:"7.9.2",fork:{knownChainIds:Array.from(n.KNOWN_CHAINIDS)}})};t.server=c.server,t.provider=c.provider,t.__experimental_info=c.__experimental_info,t.default=c},323:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeFlavor=void 0;const r=s(1),n=s(75);t.initializeFlavor=(e={flavor:"ethereum"})=>{const t=e.flavor||"ethereum";let i;i="chain"in e&&"asyncRequestProcessing"in e.chain?e.chain.asyncRequestProcessing:!("asyncRequestProcessing"in e)||e.asyncRequestProcessing;const o=new r.RequestCoordinator(i?0:1),a=new r.Executor(o),c=function loadFlavorByName(e){return"ethereum"===e?s(85).default:(0,n.load)(e)}(t),l=function getConnector(e,t,s){return e.connect(t,s)}(c,e,a),u=l.connect();return{flavor:c,connector:l,promise:u.then((()=>o.resume()))}}},233:function(e,t,s){"use strict";var r,n,i,o,a,c,l,u,d,f=this&&this.__classPrivateFieldGet||function(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)},h=this&&this.__classPrivateFieldSet||function(e,t,s,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,s):n?n.value=s:t.set(e,s),s},g=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Server=t.ServerStatus=void 0;const p=g(s(451)),m=s(454);m._cfg&&(0,m._cfg)(new Uint8Array([115,105,108,101,110,116]));const b=s(75),y=s(323),w=g(s(256)),v=g(s(247)),_=g(s(29)),k="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",E=new RegExp(`^(${k}[.]){3}${k}$`),B="127.0.0.1";var P;!function(e){e[e.unknown=0]="unknown",e[e.ready=1]="ready",e[e.opening=2]="opening",e[e.open=4]="open",e[e.openingOrOpen=6]="openingOrOpen",e[e.closing=8]="closing",e[e.closed=16]="closed",e[e.closingOrClosed=24]="closingOrClosed"}(P||(t.ServerStatus=P={}));class Server extends _.default{get provider(){return f(this,l,"f").provider}get status(){return f(this,n,"f")}constructor(e={flavor:"ethereum"}){super(),r.set(this,void 0),n.set(this,P.unknown),i.set(this,null),o.set(this,null),a.set(this,null),c.set(this,null),l.set(this,void 0),u.set(this,null),d.set(this,void 0),h(this,n,P.ready,"f");const{flavor:t,connector:s,promise:g}=(0,y.initializeFlavor)(e);h(this,l,s,"f");let p=b.ServerOptionsConfig.normalize(e);"ethereum"!==t.flavor&&t.options.server&&(p={...p,...t.options.server.normalize(e)}),h(this,r,p,"f");const _=h(this,i,(0,m.App)(),"f");p.server.ws&&h(this,u,new w.default(_,s,p.server),"f"),h(this,o,new v.default(_,s,f(this,r,"f").server),"f"),h(this,d,g,"f")}listen(e,t,s){"function"==typeof t&&(s=t,t=null);const r="function"==typeof s;if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===e.trim().length||+e!=+e>>>0||e>65535){const t=new Error(`Port should be >= 0 and < 65536. Received ${e}.`);return r?process.nextTick(s,t):Promise.reject(t)}const o=+e,l=f(this,n,"f");if(l===P.closing){const e=new Error("Cannot start server while it is closing.");return r?process.nextTick(s,e):Promise.reject(e)}if(0!=(l&P.openingOrOpen)){const e=new Error(`Server is already open, or is opening, on port: ${o}.`);return r?process.nextTick(s,e):Promise.reject(e)}h(this,n,P.opening,"f");const u=f(this,d,"f");h(this,d,null,"f");const g=Promise.allSettled([u,new Promise((e=>{t?f(this,i,"f").listen(t,o,1,e):f(this,i,"f").listen(o,1,e)})).then((e=>{if(!e){h(this,n,P.closed,"f");const e=new Error(`listen EADDRINUSE: address already in use ${t||B}:${o}.`);throw e.code="EADDRINUSE",e}h(this,n,P.open,"f"),h(this,a,e,"f"),h(this,c,t||B,"f")}))]).then((async e=>{const t=[];if("rejected"===e[0].status&&t.push(e[0].reason),"rejected"===e[1].status&&t.push(e[1].reason),0!==t.length){h(this,n,P.unknown,"f");try{await this.close()}catch(e){t.push(e)}throw t.length>1?new p.default(t):t[0]}this.emit("open")}));if(!r)return g;g.then((()=>s(null))).catch(s)}address(){if(f(this,a,"f")){const t=f(this,c,"f");return{address:t,family:(e=t,E.test(e)?"IPv4":"IPv6"),port:(0,m.us_socket_local_port)(f(this,a,"f"))}}return null;var e}async close(){if(f(this,n,"f")===P.opening)throw new Error("Cannot close server while it is opening.");if(0!=(f(this,n,"f")&P.closingOrClosed))throw new Error("Server is already closing or closed.");h(this,n,P.closing,"f");const e=f(this,a,"f");h(this,a,null,"f"),null!==e&&(0,m.us_listen_socket_close)(e),null!==f(this,u,"f")&&f(this,u,"f").close(),null!==f(this,o,"f")&&f(this,o,"f").close(),null!==f(this,l,"f")&&await f(this,l,"f").close(),f(this,i,"f").close&&f(this,i,"f").close(),h(this,n,P.closed,"f"),h(this,i,null,"f"),await this.emit("close")}}t.Server=Server,r=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,t.default=Server},247:function(e,t,s){"use strict";var r,n,i,o,a,c=this&&this.__classPrivateFieldSet||function(e,t,s,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,s):n?n.value=s:t.set(e,s),s},l=this&&this.__classPrivateFieldGet||function(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const d=u(s(817)),f=u(s(818)),h=s(6),g=s(455),noop=()=>{};function prepareCORSResponseHeaders(e,t){const s=t.getHeader("origin"),r=t.getHeader("access-control-request-headers");return t=>{""!==s&&("OPTIONS"===e&&(t.writeHeader("Access-Control-Allow-Methods","POST"),""!==r&&t.writeHeader("Access-Control-Allow-Headers",r),t.writeHeader("Access-Control-Max-Age","600")),t.writeHeader("Access-Control-Allow-Credentials","true"),t.writeHeader("Access-Control-Allow-Origin",s))}}function sendResponse(e,t,s,r,n,i=noop){e.cork((()=>{e.writeStatus(s),i(e),null!=r&&e.writeHeader("Content-Type",r),null!==n?e.end(n,t):e.end(void 0,t)}))}r=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,t.default=class HttpServer{constructor(e,t,s){r.set(this,void 0),n.set(this,void 0),i.set(this,!1),o.set(this,((e,t)=>{if(l(this,i,"f"))return void e.close();const s=prepareCORSResponseHeaders("POST",t);let o,a=!1;e.onAborted((()=>{a=!0})),e.onData(((c,u)=>{const p=Buffer.from(c);if(u){const c=l(this,r,"f");let u;try{const e=o?Buffer.concat([o,p],o.length+p.length):p;u=c.parse(e)}catch(t){return void sendResponse(e,l(this,i,"f"),f.default.BAD_REQUEST,d.default.PLAIN,"400 Bad Request: "+t.message,s)}c.handle(u,t).then((({value:e})=>e)).then((t=>{if(a)return;const r=c.format(t,u);h.types.isGeneratorObject(r)?function sendChunkedResponse(e,t,s,r,n,i,o=noop){const a=(0,g.getFragmentGenerator)(n,i),{value:c}=a.next();let{value:l,done:u}=a.next();u?sendResponse(e,t,s,r,c,o):e.cork((()=>{for(l of(e.writeStatus(s),o(e),e.writeHeader("Content-Type",r),e.write(c),e.write(l),a))e.write(l);e.end(void 0,t)}))}(e,l(this,i,"f"),f.default.OK,d.default.JSON,r,l(this,n,"f").chunkSize,s):sendResponse(e,l(this,i,"f"),f.default.OK,d.default.JSON,r,s)})).catch((t=>{if(a)return;const r=c.formatError(t,u);sendResponse(e,l(this,i,"f"),f.default.OK,d.default.JSON,r,s)}))}else o=o?Buffer.concat([o,p],o.length+p.length):Buffer.concat([p],p.length)}))})),a.set(this,((e,t)=>{if(l(this,i,"f"))return void e.close();const s=prepareCORSResponseHeaders("OPTIONS",t);sendResponse(e,l(this,i,"f"),f.default.NO_CONTENT,null,null,s)})),c(this,r,t,"f"),c(this,n,s,"f"),e.post(s.rpcEndpoint,l(this,o,"f")).options(s.rpcEndpoint,l(this,a,"f")),e.get("/418",(e=>{l(this,i,"f")?e.close():sendResponse(e,l(this,i,"f"),f.default.IM_A_TEAPOT,d.default.PLAIN,"418 I'm a teapot")})),e.any("/*",((e,t)=>{if(l(this,i,"f"))return void e.close();const s=t.getHeader("connection");s&&"upgrade"===s.toLowerCase()?sendResponse(e,l(this,i,"f"),f.default.BAD_REQUEST,d.default.PLAIN,"400 Bad Request"):sendResponse(e,l(this,i,"f"),f.default.NOT_FOUND,d.default.PLAIN,"404 Not Found")}))}close(){c(this,i,!0,"f")}}},817:(e,t)=>{"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.PLAIN="text/plain",e.JSON="application/json"}(s||(s={})),t.default=s},455:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFragmentGenerator=void 0,t.getFragmentGenerator=function*getFragmentGenerator(e,t){let s=Buffer.allocUnsafe(t),r=0;for(const n of e){const{byteLength:e}=n;r>0&&e+r>t&&(yield s.subarray(0,r),s=null,r=0),e0&&(yield s.subarray(0,r))}},818:(e,t)=>{"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.OK="200 ",e.NO_CONTENT="204 ",e.BAD_REQUEST="400 ",e.NOT_FOUND="404 ",e.METHOD_NOT_ALLOWED="405 ",e.IM_A_TEAPOT="418 "}(s||(s={})),t.default=s},816:(e,t)=>{"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.CLOSE_NORMAL=1e3]="CLOSE_NORMAL"}(s||(s={})),t.default=s},256:function(e,t,s){"use strict";var r,n=this&&this.__classPrivateFieldGet||function(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_PAYLOAD_SIZE=t.sendFragmented=void 0;const o=i(s(816)),a=s(6),c=s(455);function sendFragmented(e,t,s,r){e.cork((()=>{const n=(0,c.getFragmentGenerator)(t,r),{value:i}=n.next();let{value:o,done:a}=n.next();if(a)e.send(i,s);else{e.sendFirstFragment(i,s);for(const t of n)e.sendFragment(o,false),o=t;e.sendLastFragment(o,false)}}))}t.sendFragmented=sendFragmented,t.MAX_PAYLOAD_SIZE=15728640;r=new WeakMap,t.default=class WebsocketServer{constructor(e,s,i){r.set(this,new Map);const o=n(this,r,"f"),c=i.wsBinary,l="auto"===c;e.ws(i.rpcEndpoint,{maxPayloadLength:t.MAX_PAYLOAD_SIZE,idleTimeout:120,open:e=>{e.closed=!1,o.set(e,new Set)},message:async(e,t,r)=>{let n;const u=l?r:c;try{n=s.parse(Buffer.from(t))}catch(t){const r=s.formatError(t,n);return void e.send(r,u)}let d;try{const{value:t}=await s.handle(n,e);if(e.closed)return;const i=t,a=await i;if(e.closed)return;if(d=s.format(a,n),"function"==typeof i.on){const t=i;t.on("message",(t=>{const s=JSON.stringify({jsonrpc:"2.0",method:t.type,params:t.data});e.send(s,r)})),o.get(e).add(t.dispose)}}catch(t){if(e.closed)return;d=s.formatError(t,n)}a.types.isGeneratorObject(d)?sendFragmented(e,d,u,i.chunkSize):e.send(d,u)},drain:e=>{},close:e=>{e.closed=!0,o.get(e).forEach((e=>e())),o.delete(e)}})}close(){n(this,r,"f").forEach(((e,t)=>t.end(o.default.CLOSE_NORMAL,"Server closed by client")))}}},11:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const r=s(0),n=s(1);class Address extends r.Address{constructor(e){super(e)}static from(e){return new Address(n.Data.toBuffer(e,Address.ByteLength))}static toBuffer(e){return Address.from(e).toBuffer()}static toString(e){return Address.from(e).toString()}toJSON(){return this.toString()}}t.Address=Address,Address.ByteLength=20},39:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),n(s(357),t),n(s(729),t),n(s(730),t),n(s(180),t)},728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockParams=void 0,t.BlockParams={INITIAL_BASE_FEE_PER_GAS:1000000000n,ELASTICITY:2n,BASE_FEE_MAX_CHANGE_DENOMINATOR:8n}},357:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Block=void 0;const r=s(1),n=s(23),i=s(12),o=s(369),a=s(1),c=s(180),l=s(728);class Block{constructor(e,t){if(this._common=t,e){const t=(0,i.decode)(e);let s;this._raw=t[0],this._rawTransactions=t[1]||[],7===t.length?(this._rawWithdrawals=t[3]||[],s=t[4],this._rawTransactionMetaData=t[5]||[],this._size=r.Quantity.toNumber(t[6])):(this._rawWithdrawals=null,s=t[3],this._rawTransactionMetaData=t[4]||[],this._size=r.Quantity.toNumber(t[5])),this.header=(0,o.makeHeader)(this._raw,s)}}static migrate(e){const t=(0,i.decode)(e),s=t.slice(0,3);return s[1]=s[1].map((e=>{if(9===e.length)return e;{const t=e[0][0],s=e.slice(1);return(0,n.encodeWithPrefix)(t,s)}})),(0,c.serialize)(s,t.slice(3,5)).serialized}hash(){return this._hash||(this._hash=r.Data.from((0,a.keccak)((0,i.encode)(this._raw)),32))}getTransactions(){const e=this._common,t=this.hash().toBuffer(),s=this.header.number.toBuffer();return this._rawTransactions.map(((n,i)=>{const[o,a]=this._rawTransactionMetaData[i],l=[o,a,t,s,r.Quantity.toBuffer(i)];return(0,c.blockTransactionFromRaw)(n,e,l)}))}toJSON(e){const t=this.hash(),s=this.getTxFn(e),n=t.toBuffer(),i=this.header,o=i.number.toBuffer(),a=this._common,l=this._rawTransactions.map(((e,t)=>{const[l,u]=this._rawTransactionMetaData[t],d=[l,u,n,o,r.Quantity.toBuffer(t)],f=(0,c.blockTransactionFromRaw)(e,a,d);return f.updateEffectiveGasPrice(i.baseFeePerGas?.toBigInt()),s(f)}));return{hash:t,...i,size:r.Quantity.from(this._size),transactions:l,uncles:[],withdrawals:this._rawWithdrawals?.map(c.convertRawWithdrawals)}}getTxFn(e=!1){return e?e=>e.toJSON(this._common):e=>e.hash}static calcNextBaseFeeBigInt(e){let t;const s=e,r=s.gasLimit.toBigInt()/l.BlockParams.ELASTICITY,n=s.gasUsed.toBigInt(),i=s.baseFeePerGas?s.baseFeePerGas.toBigInt():l.BlockParams.INITIAL_BASE_FEE_PER_GAS;if(r===n)t=i;else if(n>r){const e=i*(n-r)/r/l.BlockParams.BASE_FEE_MAX_CHANGE_DENOMINATOR;t=e>1n?i+e:i+1n}else{t=i-i*(r-n)/r/l.BlockParams.BASE_FEE_MAX_CHANGE_DENOMINATOR}return t}static calcNBlocksMaxBaseFee(e,t){const{BASE_FEE_MAX_CHANGE_DENOMINATOR:s}=l.BlockParams;let r=this.calcNextBaseFeeBigInt(t);for(;--e;)r+=r/s;return r}static calcNextBaseFee(e){const t=e.header;return void 0===t.baseFeePerGas?void 0:this.calcNextBaseFeeBigInt(t)}}t.Block=Block,Block.INITIAL_BASE_FEE_PER_GAS=l.BlockParams.INITIAL_BASE_FEE_PER_GAS},369:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeHeader=void 0;const r=s(1);t.makeHeader=function makeHeader(e,t){return{parentHash:r.Data.from(e[0],32),sha3Uncles:r.Data.from(e[1],32),miner:r.Data.from(e[2],20),stateRoot:r.Data.from(e[3],32),transactionsRoot:r.Data.from(e[4],32),receiptsRoot:r.Data.from(e[5],32),logsBloom:r.Data.from(e[6],256),difficulty:r.Quantity.from(e[7],!1),number:r.Quantity.from(e[8],!1),gasLimit:r.Quantity.from(e[9],!1),gasUsed:r.Quantity.from(e[10],!1),timestamp:r.Quantity.from(e[11],!1),extraData:r.Data.from(e[12]),mixHash:r.Data.from(e[13],32),nonce:r.Data.from(e[14],8),totalDifficulty:r.Quantity.from(t,!1),baseFeePerGas:void 0===e[15]?void 0:r.Quantity.from(e[15],!1),withdrawalsRoot:void 0===e[16]?void 0:r.Data.from(e[16],32)}}},729:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeBlock=t.getBlockSize=void 0;const r=s(1),n=s(0),i=s(180),o=s(23),a=s(369),c=s(357);t.getBlockSize=function getBlockSize(e,t){return e.length-t.length};t.RuntimeBlock=class RuntimeBlock{constructor(e,t,s,n,i,o,a,c,l,u,d,f){this._common=e,this.header={parentHash:s.toBuffer(),coinbase:n,number:t.toBigInt(),difficulty:c.toBigInt(),totalDifficulty:r.Quantity.toBuffer(l.toBigInt()+c.toBigInt()),gasLimit:i.toBigInt(),gasUsed:o.toBigInt(),timestamp:a.toBigInt(),baseFeePerGas:d,mixHash:u,prevRandao:u,withdrawalsRoot:f,cliqueSigner:()=>n}}finalize(e,t,s,l,u,d,f,h){const{header:g}=this,p=[g.parentHash,n.KECCAK256_RLP_ARRAY,g.coinbase.buf,l,e,t,s,r.Quantity.toBuffer(g.difficulty),r.Quantity.toBuffer(g.number),r.Quantity.toBuffer(g.gasLimit),0n===u?r.BUFFER_EMPTY:r.Quantity.toBuffer(u),r.Quantity.toBuffer(g.timestamp),d.toBuffer(),g.mixHash,r.BUFFER_8_ZERO],m=this._common.isActivatedEIP(4895);void 0!==g.baseFeePerGas&&(p[15]=r.Quantity.toBuffer(g.baseFeePerGas,!1),m&&(p[16]=r.Data.toBuffer(g.withdrawalsRoot)));const{totalDifficulty:b}=g,y=Array(f.length),w=Array(f.length);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertRawWithdrawals=t.blockTransactionFromRaw=t.serialize=void 0;const r=s(11),n=s(23),i=s(12),o=s(1);t.serialize=function serialize(e,t){const s=(0,i.encodeRange)(e,0,e.length),r=s.length,n=(0,i.encodeLength)(r,192).length+r,a=(0,i.encodeRange)(t,0,2),c=(0,i.encode)((0,o.uintToBuffer)(n));return{serialized:(0,i.digest)([s.output,a.output,[c]],r+a.length+c.length),size:n}},t.blockTransactionFromRaw=function blockTransactionFromRaw(e,t,s){let r,o;return!function isLegacyRawTransaction(e){return 9===e.length}(e)?(o=e[0],r=(0,i.decode)(e.subarray(1))):(o=0,r=e),n.TransactionFactory.fromSafeTypeAndTxData(o,r,t,s)},t.convertRawWithdrawals=function convertRawWithdrawals([e,t,s,n]){return{index:o.Quantity.from(e),validatorIndex:o.Quantity.from(t),address:r.Address.from(s),amount:o.Quantity.from(n)}}},730:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},391:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maybeGetLogs=void 0;var r=s(743);Object.defineProperty(t,"maybeGetLogs",{enumerable:!0,get:function(){return r.maybeGetLogs}})},131:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Handlers=t.bytes=t.address=t.bool=t.string=t.uint256=t.int256=t.fixedBytes=t.WORD_SIZE=void 0;const r=s(1);t.WORD_SIZE=32;const n=-0x10000000000000000000000000000000000000000000000000000000000000000n;function getDynamicDataMarkers(e,s){const r=s+t.WORD_SIZE-4,n=e.readUInt32BE(r)+t.WORD_SIZE;return{start:n,end:n+e.readUInt32BE(n-4)}}function handleBytes(e,t,s){return`0x${e.toString("hex",t,s)}`}t.fixedBytes=function fixedBytes(e){return(t,s)=>handleBytes(t,s,s+e)};t.int256=(e,s)=>{const i=e.subarray(s,s+t.WORD_SIZE),o=(0,r.bufferToBigInt)(i);return 128&i[0]?o|n:o};t.uint256=(e,s)=>(0,r.bufferToBigInt)(e.subarray(s,s+t.WORD_SIZE));t.string=(e,t)=>{const{start:s,end:r}=getDynamicDataMarkers(e,t);return e.toString("utf8",s,r)};t.bool=(e,s)=>0!==e[s+t.WORD_SIZE-1];t.address=(e,s)=>`0x${e.toString("hex",s+12,s+t.WORD_SIZE)}`;t.bytes=(e,t)=>{const{start:s,end:r}=getDynamicDataMarkers(e,t);return handleBytes(e,s,r)},t.Handlers={address:t.address,bool:t.bool,bytes:t.bytes,int256:t.int256,string:t.string,uint256:t.uint256}},743:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maybeGetLogs=void 0;const r=s(131),n=s(744),i=0x636f6e736f6c652e6c6f67n;t.maybeGetLogs=e=>{if("STATICCALL"!==e.opcode.name)return null;const t=e.stack,[s,o,a]=t.slice(-4,-1);if(a!==i)return null;try{const t=Number(o),i=t+Number(s),a=e.memory.subarray(t,i),c=a.readUInt32BE(0),l=n.signatureMap.get(c);if(!l)return null;const u=a.subarray(4);return l.map(((e,t)=>{const s=t*r.WORD_SIZE;return e(u,s)}))}catch{return null}}},744:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signatureMap=void 0;const r=s(131);t.signatureMap=new Map([[1368866505,[]],[741264322,[r.address]],[843419373,[r.bool]],[1093685164,[r.string]],[4163653873,[r.uint256]],[4122065833,[r.uint256]],[199720790,[r.bytes]],[760966329,[r.int256]],[1309416733,[r.int256]],[1847107880,[(0,r.fixedBytes)(1)]],[3921027734,[(0,r.fixedBytes)(2)]],[763578662,[(0,r.fixedBytes)(3)]],[3764340945,[(0,r.fixedBytes)(4)]],[2793701517,[(0,r.fixedBytes)(5)]],[2927928721,[(0,r.fixedBytes)(6)]],[1322614312,[(0,r.fixedBytes)(7)]],[1334060334,[(0,r.fixedBytes)(8)]],[2428341456,[(0,r.fixedBytes)(9)]],[20780939,[(0,r.fixedBytes)(10)]],[67127854,[(0,r.fixedBytes)(11)]],[2258660029,[(0,r.fixedBytes)(12)]],[2488442420,[(0,r.fixedBytes)(13)]],[2456219775,[(0,r.fixedBytes)(14)]],[3667227872,[(0,r.fixedBytes)(15)]],[1717330180,[(0,r.fixedBytes)(16)]],[866084666,[(0,r.fixedBytes)(17)]],[3302112666,[(0,r.fixedBytes)(18)]],[1584093747,[(0,r.fixedBytes)(19)]],[1367925737,[(0,r.fixedBytes)(20)]],[3923391840,[(0,r.fixedBytes)(21)]],[3589990556,[(0,r.fixedBytes)(22)]],[2879508237,[(0,r.fixedBytes)(23)]],[4055063348,[(0,r.fixedBytes)(24)]],[193248344,[(0,r.fixedBytes)(25)]],[4172368369,[(0,r.fixedBytes)(26)]],[976705501,[(0,r.fixedBytes)(27)]],[3358255854,[(0,r.fixedBytes)(28)]],[1265222613,[(0,r.fixedBytes)(29)]],[3994207469,[(0,r.fixedBytes)(30)]],[3263516050,[(0,r.fixedBytes)(31)]],[666357637,[(0,r.fixedBytes)(32)]],[3673216170,[r.address,r.address]],[1974863315,[r.address,r.bool]],[1973388987,[r.address,r.string]],[2198464680,[r.address,r.uint256]],[574869411,[r.address,r.uint256]],[2235320393,[r.bool,r.address]],[705760899,[r.bool,r.bool]],[2414527781,[r.bool,r.string]],[965833939,[r.bool,r.uint256]],[910912146,[r.bool,r.uint256]],[832238387,[r.string,r.address]],[3283441205,[r.string,r.bool]],[1264337527,[r.string,r.string]],[3054400204,[r.string,r.uint256]],[2534451664,[r.string,r.uint256]],[1764191366,[r.uint256,r.address]],[1491830284,[r.uint256,r.address]],[480083635,[r.uint256,r.bool]],[510514412,[r.uint256,r.bool]],[1681903839,[r.uint256,r.string]],[262402885,[r.uint256,r.string]],[4133908826,[r.uint256,r.uint256]],[1812949376,[r.uint256,r.uint256]],[25986242,[r.address,r.address,r.address]],[4070990470,[r.address,r.address,r.bool]],[7426238,[r.address,r.address,r.string]],[402547077,[r.address,r.address,r.uint256]],[1815506290,[r.address,r.address,r.uint256]],[4044790253,[r.address,r.bool,r.address]],[3951234194,[r.address,r.bool,r.bool]],[555898316,[r.address,r.bool,r.string]],[2622462459,[r.address,r.bool,r.uint256]],[742821141,[r.address,r.bool,r.uint256]],[4035396840,[r.address,r.string,r.address]],[3473018801,[r.address,r.string,r.bool]],[4218888805,[r.address,r.string,r.string]],[1742565361,[r.address,r.string,r.uint256]],[484110986,[r.address,r.string,r.uint256]],[2076235848,[r.address,r.uint256,r.address]],[2548867988,[r.address,r.uint256,r.address]],[1736575400,[r.address,r.uint256,r.bool]],[3846889796,[r.address,r.uint256,r.bool]],[2717051050,[r.address,r.uint256,r.string]],[3136907337,[r.address,r.uint256,r.string]],[3063663350,[r.address,r.uint256,r.uint256]],[2273710942,[r.address,r.uint256,r.uint256]],[3530962535,[r.bool,r.address,r.address]],[415876934,[r.bool,r.address,r.bool]],[3734671984,[r.bool,r.address,r.string]],[1601936123,[r.bool,r.address,r.uint256]],[3950005167,[r.bool,r.address,r.uint256]],[276362893,[r.bool,r.bool,r.address]],[1349555864,[r.bool,r.bool,r.bool]],[626391622,[r.bool,r.bool,r.string]],[317855234,[r.bool,r.bool,r.uint256]],[2954061243,[r.bool,r.bool,r.uint256]],[2509355347,[r.bool,r.string,r.address]],[3686056519,[r.bool,r.string,r.bool]],[2960557183,[r.bool,r.string,r.string]],[278130193,[r.bool,r.string,r.uint256]],[3224906412,[r.bool,r.string,r.uint256]],[143587794,[r.bool,r.uint256,r.address]],[3302110471,[r.bool,r.uint256,r.address]],[3906927529,[r.bool,r.uint256,r.bool]],[464374251,[r.bool,r.uint256,r.bool]],[3288086896,[r.bool,r.uint256,r.string]],[3359211184,[r.bool,r.uint256,r.string]],[923808615,[r.bool,r.uint256,r.uint256]],[995886048,[r.bool,r.uint256,r.uint256]],[4243355104,[r.string,r.address,r.address]],[3374145236,[r.string,r.address,r.bool]],[3773410639,[r.string,r.address,r.string]],[220641573,[r.string,r.address,r.uint256]],[130552343,[r.string,r.address,r.uint256]],[2469116728,[r.string,r.bool,r.address]],[2232122070,[r.string,r.bool,r.bool]],[3801674877,[r.string,r.bool,r.string]],[3378075862,[r.string,r.bool,r.uint256]],[689682896,[r.string,r.bool,r.uint256]],[2515337621,[r.string,r.string,r.address]],[2967534005,[r.string,r.string,r.bool]],[753761519,[r.string,r.string,r.string]],[1478619041,[r.string,r.string,r.uint256]],[4083337817,[r.string,r.string,r.uint256]],[478069832,[r.string,r.uint256,r.address]],[3817119609,[r.string,r.uint256,r.address]],[3396809649,[r.string,r.uint256,r.bool]],[4043501061,[r.string,r.uint256,r.bool]],[1500569737,[r.string,r.uint256,r.string]],[2750793529,[r.string,r.uint256,r.string]],[3393701099,[r.string,r.uint256,r.uint256]],[2526862595,[r.string,r.uint256,r.uint256]],[3170737120,[r.uint256,r.address,r.address]],[2104993307,[r.uint256,r.address,r.address]],[2607726658,[r.uint256,r.address,r.bool]],[2060456590,[r.uint256,r.address,r.bool]],[1674265081,[r.uint256,r.address,r.string]],[3464692859,[r.uint256,r.address,r.string]],[1520131797,[r.uint256,r.address,r.uint256]],[2286109610,[r.uint256,r.address,r.uint256]],[889741179,[r.uint256,r.bool,r.address]],[1112473535,[r.uint256,r.bool,r.address]],[544310864,[r.uint256,r.bool,r.bool]],[3587091680,[r.uint256,r.bool,r.bool]],[2239189025,[r.uint256,r.bool,r.string]],[2332955902,[r.uint256,r.bool,r.string]],[537493524,[r.uint256,r.bool,r.uint256]],[1515034914,[r.uint256,r.bool,r.uint256]],[2063255897,[r.uint256,r.string,r.address]],[529592906,[r.uint256,r.string,r.address]],[1290643290,[r.uint256,r.string,r.bool]],[1185403086,[r.uint256,r.string,r.bool]],[2970968351,[r.uint256,r.string,r.string]],[1062716053,[r.uint256,r.string,r.string]],[933920076,[r.uint256,r.string,r.uint256]],[1533929535,[r.uint256,r.string,r.uint256]],[1553380145,[r.uint256,r.uint256,r.address]],[3191032091,[r.uint256,r.uint256,r.address]],[1197922930,[r.uint256,r.uint256,r.bool]],[1733758967,[r.uint256,r.uint256,r.bool]],[1909476082,[r.uint256,r.uint256,r.string]],[2104037094,[r.uint256,r.uint256,r.string]],[3522001468,[r.uint256,r.uint256,r.uint256]],[3884059252,[r.uint256,r.uint256,r.uint256]],[1717301556,[r.address,r.address,r.address,r.address]],[238520724,[r.address,r.address,r.address,r.bool]],[4161329696,[r.address,r.address,r.address,r.string]],[2485456247,[r.address,r.address,r.address,r.uint256]],[3982404743,[r.address,r.address,r.address,r.uint256]],[2669396846,[r.address,r.address,r.bool,r.address]],[752096074,[r.address,r.address,r.bool,r.bool]],[2858762440,[r.address,r.address,r.bool,r.string]],[963766156,[r.address,r.address,r.bool,r.uint256]],[2513854225,[r.address,r.address,r.bool,r.uint256]],[2406706454,[r.address,r.address,r.string,r.address]],[1863997774,[r.address,r.address,r.string,r.bool]],[566079269,[r.address,r.address,r.string,r.string]],[4011651047,[r.address,r.address,r.string,r.uint256]],[69767936,[r.address,r.address,r.string,r.uint256]],[2376523509,[r.address,r.address,r.uint256,r.address]],[3603321462,[r.address,r.address,r.uint256,r.address]],[2604815586,[r.address,r.address,r.uint256,r.bool]],[3270936812,[r.address,r.address,r.uint256,r.bool]],[4256496016,[r.address,r.address,r.uint256,r.string]],[2647731885,[r.address,r.address,r.uint256,r.string]],[3193255041,[r.address,r.address,r.uint256,r.uint256]],[1425929188,[r.address,r.address,r.uint256,r.uint256]],[1711502813,[r.address,r.bool,r.address,r.address]],[2801077007,[r.address,r.bool,r.address,r.bool]],[769095910,[r.address,r.bool,r.address,r.string]],[2807847390,[r.address,r.bool,r.address,r.uint256]],[3698398930,[r.address,r.bool,r.address,r.uint256]],[3476636805,[r.address,r.bool,r.bool,r.address]],[3401856121,[r.address,r.bool,r.bool,r.bool]],[3754205928,[r.address,r.bool,r.bool,r.string]],[2353946086,[r.address,r.bool,r.bool,r.uint256]],[3484780374,[r.address,r.bool,r.bool,r.uint256]],[436029782,[r.address,r.bool,r.string,r.address]],[1353532957,[r.address,r.bool,r.string,r.bool]],[1197235251,[r.address,r.bool,r.string,r.string]],[2162598411,[r.address,r.bool,r.string,r.uint256]],[2652011374,[r.address,r.bool,r.string,r.uint256]],[3438776481,[r.address,r.bool,r.uint256,r.address]],[227337758,[r.address,r.bool,r.uint256,r.address]],[3294903840,[r.address,r.bool,r.uint256,r.bool]],[2244855215,[r.address,r.bool,r.uint256,r.bool]],[178704301,[r.address,r.bool,r.uint256,r.string]],[2606272204,[r.address,r.bool,r.uint256,r.string]],[946861556,[r.address,r.bool,r.uint256,r.uint256]],[3255869470,[r.address,r.bool,r.uint256,r.uint256]],[221706784,[r.address,r.string,r.address,r.address]],[233909110,[r.address,r.string,r.address,r.bool]],[4158874181,[r.address,r.string,r.address,r.string]],[1166009295,[r.address,r.string,r.address,r.uint256]],[2350461865,[r.address,r.string,r.address,r.uint256]],[542667202,[r.address,r.string,r.bool,r.address]],[1595759775,[r.address,r.string,r.bool,r.bool]],[3154862590,[r.address,r.string,r.bool,r.string]],[1365129398,[r.address,r.string,r.bool,r.uint256]],[3877655068,[r.address,r.string,r.bool,r.uint256]],[2689478535,[r.address,r.string,r.string,r.address]],[900007711,[r.address,r.string,r.string,r.bool]],[1560462603,[r.address,r.string,r.string,r.string]],[362776871,[r.address,r.string,r.string,r.uint256]],[2706362425,[r.address,r.string,r.string,r.uint256]],[1662531192,[r.address,r.string,r.uint256,r.address]],[3755464715,[r.address,r.string,r.uint256,r.address]],[251125840,[r.address,r.string,r.uint256,r.bool]],[2116357467,[r.address,r.string,r.uint256,r.bool]],[1149776040,[r.address,r.string,r.uint256,r.string]],[1561552329,[r.address,r.string,r.uint256,r.string]],[499704248,[r.address,r.string,r.uint256,r.uint256]],[2764647008,[r.address,r.string,r.uint256,r.uint256]],[1200430178,[r.address,r.uint256,r.address,r.address]],[3961816175,[r.address,r.uint256,r.address,r.address]],[2713504179,[r.address,r.uint256,r.address,r.bool]],[4051804649,[r.address,r.uint256,r.address,r.bool]],[497649386,[r.address,r.uint256,r.address,r.string]],[1567749022,[r.address,r.uint256,r.address,r.string]],[269444366,[r.address,r.uint256,r.address,r.uint256]],[2782496616,[r.address,r.uint256,r.address,r.uint256]],[2736520652,[r.address,r.uint256,r.bool,r.address]],[602229106,[r.address,r.uint256,r.bool,r.address]],[1005970743,[r.address,r.uint256,r.bool,r.bool]],[4272018778,[r.address,r.uint256,r.bool,r.bool]],[3316483577,[r.address,r.uint256,r.bool,r.string]],[2391690869,[r.address,r.uint256,r.bool,r.string]],[586594713,[r.address,r.uint256,r.bool,r.uint256]],[1770996626,[r.address,r.uint256,r.bool,r.uint256]],[1547898183,[r.address,r.uint256,r.string,r.address]],[3698927108,[r.address,r.uint256,r.string,r.address]],[3474460764,[r.address,r.uint256,r.string,r.bool]],[2751614737,[r.address,r.uint256,r.string,r.bool]],[2292761606,[r.address,r.uint256,r.string,r.string]],[2119616147,[r.address,r.uint256,r.string,r.string]],[3204577425,[r.address,r.uint256,r.string,r.uint256]],[4111650715,[r.address,r.uint256,r.string,r.uint256]],[551786573,[r.address,r.uint256,r.uint256,r.address]],[519451700,[r.address,r.uint256,r.uint256,r.address]],[1727118439,[r.address,r.uint256,r.uint256,r.bool]],[3964381346,[r.address,r.uint256,r.uint256,r.bool]],[1244184599,[r.address,r.uint256,r.uint256,r.string]],[2301889963,[r.address,r.uint256,r.uint256,r.string]],[888202806,[r.address,r.uint256,r.uint256,r.uint256]],[1024368100,[r.address,r.uint256,r.uint256,r.uint256]],[487903233,[r.bool,r.address,r.address,r.address]],[1180699616,[r.bool,r.address,r.address,r.bool]],[3625099623,[r.bool,r.address,r.address,r.string]],[208064958,[r.bool,r.address,r.address,r.uint256]],[1384430956,[r.bool,r.address,r.address,r.uint256]],[474063670,[r.bool,r.address,r.bool,r.address]],[1788626827,[r.bool,r.address,r.bool,r.bool]],[1248250676,[r.bool,r.address,r.bool,r.string]],[126031106,[r.bool,r.address,r.bool,r.uint256]],[1287000017,[r.bool,r.address,r.bool,r.uint256]],[1870422078,[r.bool,r.address,r.string,r.address]],[3804222987,[r.bool,r.address,r.string,r.bool]],[2805734838,[r.bool,r.address,r.string,r.string]],[3256837319,[r.bool,r.address,r.string,r.uint256]],[194640930,[r.bool,r.address,r.string,r.uint256]],[325780957,[r.bool,r.address,r.uint256,r.address]],[1760647349,[r.bool,r.address,r.uint256,r.address]],[3590430492,[r.bool,r.address,r.uint256,r.bool]],[4002252402,[r.bool,r.address,r.uint256,r.bool]],[1374724088,[r.bool,r.address,r.uint256,r.string]],[2691192883,[r.bool,r.address,r.uint256,r.string]],[2079424929,[r.bool,r.address,r.uint256,r.uint256]],[2617143996,[r.bool,r.address,r.uint256,r.uint256]],[4102557348,[r.bool,r.bool,r.address,r.address]],[3231908568,[r.bool,r.bool,r.address,r.bool]],[2695133539,[r.bool,r.bool,r.address,r.string]],[1276263767,[r.bool,r.bool,r.address,r.uint256]],[1620281063,[r.bool,r.bool,r.address,r.uint256]],[2352126746,[r.bool,r.bool,r.bool,r.address]],[992632032,[r.bool,r.bool,r.bool,r.bool]],[719587540,[r.bool,r.bool,r.bool,r.string]],[1836074433,[r.bool,r.bool,r.bool,r.uint256]],[3259532109,[r.bool,r.bool,r.bool,r.uint256]],[4188875657,[r.bool,r.bool,r.string,r.address]],[3092715066,[r.bool,r.bool,r.string,r.bool]],[1830717265,[r.bool,r.bool,r.string,r.string]],[3819555375,[r.bool,r.bool,r.string,r.uint256]],[395003525,[r.bool,r.bool,r.string,r.uint256]],[1420274080,[r.bool,r.bool,r.uint256,r.address]],[201299213,[r.bool,r.bool,r.uint256,r.address]],[1637764366,[r.bool,r.bool,r.uint256,r.bool]],[2874982852,[r.bool,r.bool,r.uint256,r.bool]],[2111099104,[r.bool,r.bool,r.uint256,r.string]],[1348569399,[r.bool,r.bool,r.uint256,r.string]],[196087467,[r.bool,r.bool,r.uint256,r.uint256]],[1181212302,[r.bool,r.bool,r.uint256,r.uint256]],[724244700,[r.bool,r.string,r.address,r.address]],[1842623690,[r.bool,r.string,r.address,r.bool]],[316065672,[r.bool,r.string,r.address,r.string]],[2781534868,[r.bool,r.string,r.address,r.uint256]],[453743963,[r.bool,r.string,r.address,r.uint256]],[1401816747,[r.bool,r.string,r.bool,r.address]],[3697185627,[r.bool,r.string,r.bool,r.bool]],[1211958294,[r.bool,r.string,r.bool,r.string]],[369533843,[r.bool,r.string,r.bool,r.uint256]],[2372902053,[r.bool,r.string,r.bool,r.uint256]],[2547225816,[r.bool,r.string,r.string,r.address]],[508266469,[r.bool,r.string,r.string,r.bool]],[392356650,[r.bool,r.string,r.string,r.string]],[2078327787,[r.bool,r.string,r.string,r.uint256]],[1574643090,[r.bool,r.string,r.string,r.uint256]],[362193358,[r.bool,r.string,r.uint256,r.address]],[1529002296,[r.bool,r.string,r.uint256,r.address]],[1796103507,[r.bool,r.string,r.uint256,r.bool]],[549177775,[r.bool,r.string,r.uint256,r.bool]],[450457062,[r.bool,r.string,r.uint256,r.string]],[2007084013,[r.bool,r.string,r.uint256,r.string]],[679886795,[r.bool,r.string,r.uint256,r.uint256]],[2387273838,[r.bool,r.string,r.uint256,r.uint256]],[653615272,[r.bool,r.uint256,r.address,r.address]],[2318373034,[r.bool,r.uint256,r.address,r.address]],[3032683775,[r.bool,r.uint256,r.address,r.bool]],[1705899016,[r.bool,r.uint256,r.address,r.bool]],[464760986,[r.bool,r.uint256,r.address,r.string]],[403247937,[r.bool,r.uint256,r.address,r.string]],[355982471,[r.bool,r.uint256,r.address,r.uint256]],[3399820138,[r.bool,r.uint256,r.address,r.uint256]],[2597139990,[r.bool,r.uint256,r.bool,r.address]],[1114097656,[r.bool,r.uint256,r.bool,r.address]],[3468031191,[r.bool,r.uint256,r.bool,r.bool]],[2650928961,[r.bool,r.uint256,r.bool,r.bool]],[2437143473,[r.bool,r.uint256,r.bool,r.string]],[3067439572,[r.bool,r.uint256,r.bool,r.string]],[2140912802,[r.bool,r.uint256,r.bool,r.uint256]],[3554563475,[r.bool,r.uint256,r.bool,r.uint256]],[4275904511,[r.bool,r.uint256,r.string,r.address]],[2781285673,[r.bool,r.uint256,r.string,r.address]],[3857124139,[r.bool,r.uint256,r.string,r.bool]],[2446522387,[r.bool,r.uint256,r.string,r.bool]],[4122747465,[r.bool,r.uint256,r.string,r.string]],[3542771016,[r.bool,r.uint256,r.string,r.string]],[1779538402,[r.bool,r.uint256,r.string,r.uint256]],[1098907931,[r.bool,r.uint256,r.string,r.uint256]],[14518201,[r.bool,r.uint256,r.uint256,r.address]],[4049711649,[r.bool,r.uint256,r.uint256,r.address]],[3197649747,[r.bool,r.uint256,r.uint256,r.bool]],[2753397214,[r.bool,r.uint256,r.uint256,r.bool]],[2389310301,[r.bool,r.uint256,r.uint256,r.string]],[3657852616,[r.bool,r.uint256,r.uint256,r.string]],[927708338,[r.bool,r.uint256,r.uint256,r.uint256]],[853517604,[r.bool,r.uint256,r.uint256,r.uint256]],[3985582326,[r.string,r.address,r.address,r.address]],[3047013728,[r.string,r.address,r.address,r.bool]],[2148146279,[r.string,r.address,r.address,r.string]],[2398352281,[r.string,r.address,r.address,r.uint256]],[1857524797,[r.string,r.address,r.address,r.uint256]],[573965245,[r.string,r.address,r.bool,r.address]],[2038975531,[r.string,r.address,r.bool,r.bool]],[72663161,[r.string,r.address,r.bool,r.string]],[1050642026,[r.string,r.address,r.bool,r.uint256]],[3318856587,[r.string,r.address,r.bool,r.uint256]],[2864486961,[r.string,r.address,r.string,r.address]],[1595265676,[r.string,r.address,r.string,r.bool]],[609847026,[r.string,r.address,r.string,r.string]],[2446397742,[r.string,r.address,r.string,r.uint256]],[2405583849,[r.string,r.address,r.string,r.uint256]],[1677429701,[r.string,r.address,r.uint256,r.address]],[2741431424,[r.string,r.address,r.uint256,r.address]],[4232594928,[r.string,r.address,r.uint256,r.bool]],[1522647356,[r.string,r.address,r.uint256,r.bool]],[1514632754,[r.string,r.address,r.uint256,r.string]],[1280700980,[r.string,r.address,r.uint256,r.string]],[4176812830,[r.string,r.address,r.uint256,r.uint256]],[3668153533,[r.string,r.address,r.uint256,r.uint256]],[870964509,[r.string,r.bool,r.address,r.address]],[2508990662,[r.string,r.bool,r.address,r.bool]],[764294052,[r.string,r.bool,r.address,r.string]],[1560853253,[r.string,r.bool,r.address,r.uint256]],[685723286,[r.string,r.bool,r.address,r.uint256]],[1905304873,[r.string,r.bool,r.bool,r.address]],[2304440517,[r.string,r.bool,r.bool,r.bool]],[2636305885,[r.string,r.bool,r.bool,r.string]],[2386524329,[r.string,r.bool,r.bool,r.uint256]],[2155164136,[r.string,r.bool,r.bool,r.uint256]],[3764542249,[r.string,r.bool,r.string,r.address]],[1066037277,[r.string,r.bool,r.string,r.bool]],[2821114603,[r.string,r.bool,r.string,r.string]],[620303461,[r.string,r.bool,r.string,r.uint256]],[885731469,[r.string,r.bool,r.string,r.uint256]],[2472413631,[r.string,r.bool,r.uint256,r.address]],[1909687565,[r.string,r.bool,r.uint256,r.address]],[2331496330,[r.string,r.bool,r.uint256,r.bool]],[1019590099,[r.string,r.bool,r.uint256,r.bool]],[1949134567,[r.string,r.bool,r.uint256,r.string]],[1119461927,[r.string,r.bool,r.uint256,r.string]],[1689631591,[r.string,r.bool,r.uint256,r.uint256]],[1572859960,[r.string,r.bool,r.uint256,r.uint256]],[1134328815,[r.string,r.string,r.address,r.address]],[1556958775,[r.string,r.string,r.address,r.bool]],[3944480640,[r.string,r.string,r.address,r.string]],[2093204999,[r.string,r.string,r.address,r.uint256]],[1250010474,[r.string,r.string,r.address,r.uint256]],[3279013851,[r.string,r.string,r.bool,r.address]],[1081628777,[r.string,r.string,r.bool,r.bool]],[1585754346,[r.string,r.string,r.bool,r.string]],[3601791698,[r.string,r.string,r.bool,r.uint256]],[2256636538,[r.string,r.string,r.bool,r.uint256]],[1834430276,[r.string,r.string,r.string,r.address]],[739726573,[r.string,r.string,r.string,r.bool]],[3731419658,[r.string,r.string,r.string,r.string]],[2393878571,[r.string,r.string,r.string,r.uint256]],[2681211381,[r.string,r.string,r.string,r.uint256]],[270792626,[r.string,r.string,r.uint256,r.address]],[1565476480,[r.string,r.string,r.uint256,r.address]],[3282609748,[r.string,r.string,r.uint256,r.bool]],[3864418506,[r.string,r.string,r.uint256,r.bool]],[1562023706,[r.string,r.string,r.uint256,r.string]],[2366909661,[r.string,r.string,r.uint256,r.string]],[4099767596,[r.string,r.string,r.uint256,r.uint256]],[3587119056,[r.string,r.string,r.uint256,r.uint256]],[1587722158,[r.string,r.uint256,r.address,r.address]],[3939013249,[r.string,r.uint256,r.address,r.address]],[2182163010,[r.string,r.uint256,r.address,r.bool]],[285649143,[r.string,r.uint256,r.address,r.bool]],[2684039059,[r.string,r.uint256,r.address,r.string]],[844415720,[r.string,r.uint256,r.address,r.string]],[1325727174,[r.string,r.uint256,r.address,r.uint256]],[1481210622,[r.string,r.uint256,r.address,r.uint256]],[3773389720,[r.string,r.uint256,r.bool,r.address]],[3847527825,[r.string,r.uint256,r.bool,r.address]],[894187222,[r.string,r.uint256,r.bool,r.bool]],[3816813520,[r.string,r.uint256,r.bool,r.bool]],[2885106328,[r.string,r.uint256,r.bool,r.string]],[1993105508,[r.string,r.uint256,r.bool,r.string]],[3827003247,[r.string,r.uint256,r.bool,r.uint256]],[1427009269,[r.string,r.uint256,r.bool,r.uint256]],[2084975268,[r.string,r.uint256,r.string,r.address]],[3144824297,[r.string,r.uint256,r.string,r.address]],[2099530013,[r.string,r.uint256,r.string,r.bool]],[3919545039,[r.string,r.uint256,r.string,r.bool]],[1522028063,[r.string,r.uint256,r.string,r.string]],[1821956834,[r.string,r.uint256,r.string,r.string]],[3330189777,[r.string,r.uint256,r.string,r.uint256]],[2697245221,[r.string,r.uint256,r.string,r.uint256]],[3793609336,[r.string,r.uint256,r.uint256,r.address]],[3201771711,[r.string,r.uint256,r.uint256,r.address]],[1982258066,[r.string,r.uint256,r.uint256,r.bool]],[4147936829,[r.string,r.uint256,r.uint256,r.bool]],[2236298390,[r.string,r.uint256,r.uint256,r.string]],[2773406909,[r.string,r.uint256,r.uint256,r.string]],[2812835923,[r.string,r.uint256,r.uint256,r.uint256]],[149837414,[r.string,r.uint256,r.uint256,r.uint256]],[612938772,[r.uint256,r.address,r.address,r.address]],[1430734329,[r.uint256,r.address,r.address,r.address]],[153090805,[r.uint256,r.address,r.address,r.bool]],[22350596,[r.uint256,r.address,r.address,r.bool]],[52195187,[r.uint256,r.address,r.address,r.string]],[2034490470,[r.uint256,r.address,r.address,r.string]],[1936653238,[r.uint256,r.address,r.address,r.uint256]],[2587672470,[r.uint256,r.address,r.address,r.uint256]],[4017276179,[r.uint256,r.address,r.bool,r.address]],[3056677012,[r.uint256,r.address,r.bool,r.address]],[3813741583,[r.uint256,r.address,r.bool,r.bool]],[2116501773,[r.uint256,r.address,r.bool,r.bool]],[2432370346,[r.uint256,r.address,r.bool,r.string]],[1676730946,[r.uint256,r.address,r.bool,r.string]],[1522374954,[r.uint256,r.address,r.bool,r.uint256]],[2064181483,[r.uint256,r.address,r.bool,r.uint256]],[2629472255,[r.uint256,r.address,r.string,r.address]],[3420819197,[r.uint256,r.address,r.string,r.address]],[3425872647,[r.uint256,r.address,r.string,r.bool]],[581204390,[r.uint256,r.address,r.string,r.bool]],[1041403043,[r.uint256,r.address,r.string,r.string]],[2373420580,[r.uint256,r.address,r.string,r.string]],[1182952285,[r.uint256,r.address,r.string,r.uint256]],[2697204968,[r.uint256,r.address,r.string,r.uint256]],[364980149,[r.uint256,r.address,r.uint256,r.address]],[4256361684,[r.uint256,r.address,r.uint256,r.address]],[1601452668,[r.uint256,r.address,r.uint256,r.bool]],[435581801,[r.uint256,r.address,r.uint256,r.bool]],[3719324961,[r.uint256,r.address,r.uint256,r.string]],[1054063912,[r.uint256,r.address,r.uint256,r.string]],[211605953,[r.uint256,r.address,r.uint256,r.uint256]],[3399106228,[r.uint256,r.address,r.uint256,r.uint256]],[2716814523,[r.uint256,r.bool,r.address,r.address]],[2263728396,[r.uint256,r.bool,r.address,r.address]],[1162695845,[r.uint256,r.bool,r.address,r.bool]],[2449150530,[r.uint256,r.bool,r.address,r.bool]],[2917159623,[r.uint256,r.bool,r.address,r.string]],[2721084958,[r.uint256,r.bool,r.address,r.string]],[125994997,[r.uint256,r.bool,r.address,r.uint256]],[1102442299,[r.uint256,r.bool,r.address,r.uint256]],[1768164185,[r.uint256,r.bool,r.bool,r.address]],[1392910941,[r.uint256,r.bool,r.bool,r.address]],[3069540257,[r.uint256,r.bool,r.bool,r.bool]],[1315722005,[r.uint256,r.bool,r.bool,r.bool]],[3722155361,[r.uint256,r.bool,r.bool,r.string]],[831186331,[r.uint256,r.bool,r.bool,r.string]],[1952763427,[r.uint256,r.bool,r.bool,r.uint256]],[3173363033,[r.uint256,r.bool,r.bool,r.uint256]],[4015165464,[r.uint256,r.bool,r.string,r.address]],[1231956916,[r.uint256,r.bool,r.string,r.address]],[3952250239,[r.uint256,r.bool,r.string,r.bool]],[879671495,[r.uint256,r.bool,r.string,r.bool]],[1757984957,[r.uint256,r.bool,r.string,r.string]],[2754870525,[r.uint256,r.bool,r.string,r.string]],[740099910,[r.uint256,r.bool,r.string,r.uint256]],[2438978344,[r.uint256,r.bool,r.string,r.uint256]],[2295029825,[r.uint256,r.bool,r.uint256,r.address]],[1329595790,[r.uint256,r.bool,r.uint256,r.address]],[2443193898,[r.uint256,r.bool,r.uint256,r.bool]],[3534472445,[r.uint256,r.bool,r.uint256,r.bool]],[3724797812,[r.uint256,r.bool,r.uint256,r.string]],[3906845782,[r.uint256,r.bool,r.uint256,r.string]],[3333212072,[r.uint256,r.bool,r.uint256,r.uint256]],[1451396516,[r.uint256,r.bool,r.uint256,r.uint256]],[1634266465,[r.uint256,r.string,r.address,r.address]],[2141537675,[r.uint256,r.string,r.address,r.address]],[2428701270,[r.uint256,r.string,r.address,r.bool]],[4181720887,[r.uint256,r.string,r.address,r.bool]],[2621104033,[r.uint256,r.string,r.address,r.string]],[4170733439,[r.uint256,r.string,r.address,r.string]],[3906142605,[r.uint256,r.string,r.address,r.uint256]],[2565338099,[r.uint256,r.string,r.address,r.uint256]],[2922300801,[r.uint256,r.string,r.bool,r.address]],[2037328032,[r.uint256,r.string,r.bool,r.address]],[3126025628,[r.uint256,r.string,r.bool,r.bool]],[1371286465,[r.uint256,r.string,r.bool,r.bool]],[3537118157,[r.uint256,r.string,r.bool,r.string]],[2370346144,[r.uint256,r.string,r.bool,r.string]],[3472922752,[r.uint256,r.string,r.bool,r.uint256]],[2763295359,[r.uint256,r.string,r.bool,r.uint256]],[3582182914,[r.uint256,r.string,r.string,r.address]],[3432549024,[r.uint256,r.string,r.string,r.address]],[3014047421,[r.uint256,r.string,r.string,r.bool]],[310782872,[r.uint256,r.string,r.string,r.bool]],[564987523,[r.uint256,r.string,r.string,r.string]],[1474103825,[r.uint256,r.string,r.string,r.string]],[2955463101,[r.uint256,r.string,r.string,r.uint256]],[1995203422,[r.uint256,r.string,r.string,r.uint256]],[992115124,[r.uint256,r.string,r.uint256,r.address]],[2877020669,[r.uint256,r.string,r.uint256,r.address]],[1763348340,[r.uint256,r.string,r.uint256,r.bool]],[2270850606,[r.uint256,r.string,r.uint256,r.bool]],[3082360010,[r.uint256,r.string,r.uint256,r.string]],[2730232985,[r.uint256,r.string,r.uint256,r.string]],[2193775476,[r.uint256,r.string,r.uint256,r.uint256]],[3221501959,[r.uint256,r.string,r.uint256,r.uint256]],[1453707697,[r.uint256,r.uint256,r.address,r.address]],[3398671136,[r.uint256,r.uint256,r.address,r.address]],[365610102,[r.uint256,r.uint256,r.address,r.bool]],[2833785006,[r.uint256,r.uint256,r.address,r.bool]],[1826504888,[r.uint256,r.uint256,r.address,r.string]],[3600994782,[r.uint256,r.uint256,r.address,r.string]],[2297881778,[r.uint256,r.uint256,r.address,r.uint256]],[1628154048,[r.uint256,r.uint256,r.address,r.uint256]],[2592172675,[r.uint256,r.uint256,r.bool,r.address]],[3776410703,[r.uint256,r.uint256,r.bool,r.address]],[2869451494,[r.uint256,r.uint256,r.bool,r.bool]],[2495495089,[r.uint256,r.uint256,r.bool,r.bool]],[2780101785,[r.uint256,r.uint256,r.bool,r.string]],[4024028142,[r.uint256,r.uint256,r.bool,r.string]],[3950997458,[r.uint256,r.uint256,r.bool,r.uint256]],[1818524812,[r.uint256,r.uint256,r.bool,r.uint256]],[1121066423,[r.uint256,r.uint256,r.string,r.address]],[1127384482,[r.uint256,r.uint256,r.string,r.address]],[2062986021,[r.uint256,r.uint256,r.string,r.bool]],[2989403910,[r.uint256,r.uint256,r.string,r.bool]],[668512210,[r.uint256,r.uint256,r.string,r.string]],[2080582194,[r.uint256,r.uint256,r.string,r.string]],[1570936811,[r.uint256,r.uint256,r.string,r.uint256]],[949229117,[r.uint256,r.uint256,r.string,r.uint256]],[4202792367,[r.uint256,r.uint256,r.uint256,r.address]],[3766828905,[r.uint256,r.uint256,r.uint256,r.address]],[3315126661,[r.uint256,r.uint256,r.uint256,r.bool]],[1683143115,[r.uint256,r.uint256,r.uint256,r.bool]],[1506790371,[r.uint256,r.uint256,r.uint256,r.string]],[2024634892,[r.uint256,r.uint256,r.uint256,r.string]],[423606272,[r.uint256,r.uint256,r.uint256,r.uint256]],[1554033982,[r.uint256,r.uint256,r.uint256,r.uint256]]])},85:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(s(334)),a=s(50),c=s(1),l=s(0),u=s(138),d=s(75),f=s(253);function color(e){return o.default`{hex("${a.TruffleColors.porsche}") ${e}}`}n(s(253),t),n(s(815),t);const h={flavor:"ethereum",connect:(e,t)=>new f.Connector(e,t),options:{provider:u.EthereumOptionsConfig,server:d.ServerOptionsConfig,cli:d.CliOptionsConfig},ready:function ready({provider:e,options:t}){const s=e.getOptions(),r=e.getInitialAccounts(),n=Object.keys(r),i=[];i.push(""),i.push("Available Accounts"),i.push("=================="),n.length>0?(n.forEach((function(e,t){const s=r[e].balance,n=s/c.WEI,o=s%c.WEI===0n?"":"~";let a=`(${t}) ${(0,l.toChecksumAddress)(e)} (${o}${n} ETH)`;r[e].unlocked||(a+=" \u{1f512}"),i.push(a)})),i.push(""),i.push("Private Keys"),i.push("=================="),n.forEach((function(e,t){i.push(`(${t}) ${r[e].secretKey}`)})),null!=s.wallet.accountKeysPath&&(i.push(""),i.push(`Accounts and keys saved to ${s.wallet.accountKeysPath}`))):i.push("(no accounts unlocked)");null==s.wallet.accounts&&(i.push(""),i.push("HD Wallet"),i.push("=================="),i.push(`Mnemonic: ${color(s.wallet.mnemonic)}`),i.push(`Base HD Path: ${color(s.wallet.hdPath.join("/")+"/{account_index}")}`));s.miner.defaultGasPrice&&(i.push(""),i.push("Default Gas Price"),i.push("=================="),i.push(color(s.miner.defaultGasPrice.toBigInt().toString())));s.miner.blockGasLimit&&(i.push(""),i.push("BlockGas Limit"),i.push("=================="),i.push(color(s.miner.blockGasLimit.toBigInt().toString())));s.miner.callGasLimit&&(i.push(""),i.push("Call Gas Limit"),i.push("=================="),i.push(color(s.miner.callGasLimit.toBigInt().toString())));if(s.fork.network||s.fork.url){let e;i.push(""),i.push("Forked Chain"),i.push("=================="),e=s.fork.network?`Ethereum ${function capitalizeFirstLetter(e){return e[0].toUpperCase()+e.slice(1)}(s.fork.network.replace("goerli","g\xf6rli"))}, via ${o.default`{hex("${a.TruffleColors.infura}") 丕Infura}`}`:s.fork.url.toString(),i.push(`Location: ${color(e)}`),i.push(`Block: ${color(s.fork.blockNumber.toString())}`),i.push(`Network ID: ${color(s.chain.networkId.toString())}`),i.push(`Time: ${color(s.chain.time.toString())}`),0!==s.fork.requestsPerSecond&&i.push(`Requests/Second: ${color(s.fork.requestsPerSecond.toString())}`)}i.push(""),i.push("Chain"),i.push("=================="),i.push(`Hardfork: ${color(s.chain.hardfork)}`),i.push(`Id: ${color(s.chain.chainId.toString())}`),i.push(""),i.push("RPC Listening on "+t.server.host+":"+t.server.port),console.log(i.join("\n"))}};t.default=h},815:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},227:function(e,t,s){"use strict";var r,n,i,o,a,c,l=this&&this.__decorate||function(e,t,s,r){var n,i=arguments.length,o=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i<3?n(o):i>3?n(t,s,o):n(t,s))||o);return i>3&&o&&Object.defineProperty(t,s,o),o},u=this&&this.__classPrivateFieldSet||function(e,t,s,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,s):n?n.value=s:t.set(e,s),s},d=this&&this.__classPrivateFieldGet||function(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const h=s(3),g=s(39),p=s(23),m=s(0),b=s(284),y=s(1),w=f(s(130)),v=f(s(288)),_=s(736),k=s(373),E=s(12),B=s(11),P=s(135);async function autofillDefaultTransactionValues(e,t,s,r,n,i){if(e.gas.isNull()){const s=i.miner.defaultTransactionGasLimit;s===y.Quantity.Empty?e.gas=await t(r,h.Tag.latest):e.gas=s}if("gasPrice"in e&&e.gasPrice.isNull()&&(e.gasPrice=i.miner.defaultGasPrice),"maxFeePerGas"in e&&e.maxFeePerGas.isNull()){const t=n.blocks.latest;e.maxFeePerGas=y.Quantity.from(g.Block.calcNBlocksMaxBaseFee(3,t.header))}"maxPriorityFeePerGas"in e&&e.maxPriorityFeePerGas.isNull()&&(e.maxPriorityFeePerGas=await s())}const T="7.9.2",A=`Ganache/v${T}/EthereumJS TestRPC/v${T}/ethereum-js`,O=y.Data.from("0x3f"),S={eth:"1.0",net:"1.0",rpc:"1.0",web3:"1.0",evm:"1.0",personal:"1.0"};function assertExceptionalTransactions(e){let t,s=null;const r={};if(e.forEach((e=>{e.execException&&(s?(s=h.VM_EXCEPTIONS,t.push(`${e.hash.toString()}: ${e.execException}\n`),r[e.execException.data.hash]=e.execException.data):(s=h.VM_EXCEPTION,t=[e.execException.message],r[e.execException.data.hash]=e.execException.data))})),s){const e=new Error(s+t.join("\n"));throw e.data=r,e}}class EthereumApi{constructor(e,t,s){var l;r.set(this,(l=0,()=>y.Quantity.from(++l))),n.set(this,new Map),i.set(this,new Map),o.set(this,void 0),a.set(this,void 0),c.set(this,void 0),u(this,o,e,"f"),u(this,c,t,"f"),u(this,a,s,"f")}async db_putString(e,t,s){return!1}async db_getString(e,t){return""}async db_putHex(e,t,s){return!1}async db_getHex(e,t){return"0x00"}async bzz_hive(){return[]}async bzz_info(){return[]}async evm_mine(e){const t=d(this,a,"f"),s=d(this,o,"f").chain.vmErrorsOnRPCResponse;if(null!==e&&"object"==typeof e){let{blocks:r,timestamp:n}=e;null==r&&(r=1);for(let e=0;e0)await i.putContractCode(s,r);else{const e=await i.getAccount(s);e.codeHash=m.KECCAK256_NULL,await i.putAccount(s,e)}return await i.commit(),await n.mine(P.Capacity.Empty),!0}async evm_setAccountStorageAt(e,t,s){const r=B.Address.from(e),n=y.Data.toBuffer(t),i=y.Data.toBuffer(s),o=d(this,a,"f"),c=o.vm.eei;return await c.checkpoint(),await c.putContractStorage(r,n,i),await c.commit(),await o.mine(P.Capacity.Empty),!0}async evm_increaseTime(e){const t=1e3*("number"==typeof e?e:y.Quantity.toNumber(e));return Math.floor(d(this,a,"f").increaseTime(t)/1e3)}async evm_setTime(e){let t;switch(typeof e){case"object":t=e.getTime();break;case"number":t=e;break;default:t=y.Quantity.toNumber(e)}const s=d(this,a,"f").setTimeDiff(t);return Math.floor(s/1e3)}async evm_revert(e){return d(this,a,"f").revert(y.Quantity.from(e))}async evm_snapshot(){return y.Quantity.from(d(this,a,"f").snapshot())}async evm_addAccount(e,t){const s=B.Address.from(e);return d(this,c,"f").addUnknownAccount(s,t)}async evm_removeAccount(e,t){const s=B.Address.from(e);return d(this,c,"f").removeKnownAccount(s,t)}async miner_start(e=1){if("eager"===d(this,o,"f").miner.instamine){const t=await d(this,a,"f").resume(e);t&&null!=t.transactions&&d(this,o,"f").chain.vmErrorsOnRPCResponse&&assertExceptionalTransactions(t.transactions)}else d(this,a,"f").resume(e);return!0}async miner_stop(){return d(this,a,"f").pause(),!0}async miner_setGasPrice(e){return d(this,o,"f").miner.defaultGasPrice=y.Quantity.from(e),!0}async miner_setEtherbase(e){return d(this,a,"f").coinbase=B.Address.from(e),!0}async miner_setExtra(e){const t=y.Data.from(e),s=t.toBuffer().length;if(s>32)throw new Error(`extra exceeds max length. ${s} > 32`);return d(this,o,"f").miner.extraData=t,!0}async web3_clientVersion(){return A}async web3_sha3(e){return y.Data.from((0,y.keccak)(y.Data.toBuffer(e)))}async net_version(){return d(this,o,"f").chain.networkId.toString()}async net_listening(){return!0}async net_peerCount(){return y.Quantity.Zero}async eth_estimateGas(e,t=h.Tag.latest){const s=d(this,a,"f"),r=s.blocks,n=(await r.get(t)).header,i=d(this,o,"f"),generateVM=async()=>await s.createVmFromStateTrie(s.trie.copy(!1),i.chain.allowUnlimitedContractSize,!1);return new Promise(((t,r)=>{const{coinbase:o}=s,a=p.TransactionFactory.fromRpc(e,s.common);null==a.from&&(a.from=o),a.gas.isNull()&&(a.gas=i.miner.callGasLimit);const c=new g.RuntimeBlock(s.common,y.Quantity.from((n.number.toBigInt()||0n)+1n),n.parentHash,new B.Address(n.miner.toBuffer()),a.gas,n.gasUsed,n.timestamp,i.miner.difficulty,n.totalDifficulty,s.getMixHash(n.parentHash.toBuffer()),0n,m.KECCAK256_RLP),l={tx:a.toVmTransaction(),block:c,skipBalance:!0,skipNonce:!0};(0,v.default)(generateVM,l,((e,s)=>{e?r(e):t(y.Quantity.from(s.gasEstimate))}))}))}async eth_protocolVersion(){return O}async eth_syncing(){return!1}async eth_coinbase(){return d(this,a,"f").coinbase}async eth_getBlockByNumber(e,t){void 0===t&&(t=!1);const s=await d(this,a,"f").blocks.get(e).catch((e=>null));return s?s.toJSON(t):null}async eth_getProof(e,t,s=h.Tag.latest){const r=d(this,a,"f");if(r.fallback)throw new Error("eth_getProof is not supported on a forked network. See https://github.com/trufflesuite/ganache/issues/3234 for details.");const n=await r.blocks.get(s),i=B.Address.from(e),o=t.map((e=>y.Data.toBuffer(e,32))),c=r.vm.stateManager.copy();await c.setStateRoot(n.header.stateRoot.toBuffer());const l=await c.getProof(i,o);return{address:i,balance:y.Quantity.from(l.balance),codeHash:y.Data.from(l.codeHash),nonce:y.Quantity.from(l.nonce),storageHash:y.Data.from(l.storageHash),accountProof:l.accountProof.map((e=>y.Data.from(e))),storageProof:l.storageProof.map((e=>({key:y.Data.from(e.key),proof:e.proof.map((e=>y.Data.from(e))),value:y.Quantity.from(e.value)})))}}async eth_getBlockByHash(e,t){void 0===t&&(t=!1);const s=await d(this,a,"f").blocks.getByHash(e).catch((e=>null));return s?s.toJSON(t):null}async eth_getBlockTransactionCountByNumber(e){const{blocks:t}=d(this,a,"f"),s=t.getEffectiveNumber(e),r=await t.getRawByBlockNumber(s);if(!r)return null;const[,n]=(0,E.decode)(r);return y.Quantity.from(n.length)}async eth_getBlockTransactionCountByHash(e){const{blocks:t}=d(this,a,"f"),s=await t.getByHash(e).catch((e=>null));if(!s)return null;const r=s.getTransactions();return y.Quantity.from(r.length)}async eth_getCompilers(){return[]}async eth_getTransactionByBlockHashAndIndex(e,t){const s=d(this,a,"f"),r=await s.blocks.getByHash(e).catch((e=>null));if(!r)return null;return r.getTransactions()[y.Quantity.toNumber(t)].toJSON(s.common)}async eth_getTransactionByBlockNumberAndIndex(e,t){const s=d(this,a,"f"),r=await s.blocks.get(e).catch((e=>null));if(!r)return null;return r.getTransactions()[y.Quantity.toNumber(t)].toJSON(s.common)}async eth_getUncleCountByBlockHash(e){return y.Quantity.Zero}async eth_getUncleCountByBlockNumber(e){return y.Quantity.Zero}async eth_getUncleByBlockHashAndIndex(e,t){return null}async eth_getUncleByBlockNumberAndIndex(e,t){return null}async eth_getWork(){return[]}async eth_submitWork(e,t,s){return!1}async eth_submitHashrate(e,t){return!1}async eth_mining(){return d(this,a,"f").isStarted()}async eth_hashrate(){return y.Quantity.Zero}async eth_gasPrice(){return d(this,o,"f").miner.defaultGasPrice}async eth_maxPriorityFeePerGas(){return y.Quantity.Gwei}async eth_accounts(){return d(this,c,"f").addresses}async eth_blockNumber(){return d(this,a,"f").blocks.latest.header.number}async eth_chainId(){return y.Quantity.from(d(this,o,"f").chain.chainId)}async eth_getBalance(e,t=h.Tag.latest){return d(this,a,"f").accounts.getBalance(B.Address.from(e),t)}async eth_getCode(e,t=h.Tag.latest){const{accounts:s}=d(this,a,"f");return s.getCode(B.Address.from(e),t)}async eth_getStorageAt(e,t,s=h.Tag.latest){const r=d(this,a,"f"),n=r.blocks.getEffectiveNumber(s),i=await r.blocks.getRawByBlockNumber(n);if(!i)throw new Error("header not found");const[[,,,o]]=(0,E.decode)(i),c=r.trie.copy(!1);c.setContext(o,null,n);const l=y.Quantity.toBuffer(t),u=l.length;let f;u<32?(f=Buffer.allocUnsafe(32).fill(0),l.copy(f,32-u)):f=32===u?l:l.slice(-32);const g=B.Address.from(e).toBuffer(),p=await c.get(g),m=(0,E.decode)(p)[2];c.setContext(m,g,n);const b=await c.get(f);return y.Data.from((0,E.decode)(b),32)}async eth_getTransactionByHash(e){const{transactions:t}=d(this,a,"f"),s=y.Data.toBuffer(e),r=await t.get(s);if(null===r){const e=t.transactionPool.find(s);return e?e.toJSON(d(this,a,"f").common):null}return r.toJSON(d(this,a,"f").common)}async eth_getTransactionReceipt(e){const{transactions:t,transactionReceipts:s,blocks:r,common:n}=d(this,a,"f"),i=y.Data.from(e),c=i.toBuffer(),l=t.get(c),u=s.get(c),[f,h]=await Promise.all([l,u]);if(f)return h.toJSON(f,n);const g=d(this,o,"f");if(g.miner.blockTime<=0&&"strict"===g.miner.instamine&&d(this,a,"f").isStarted()){null!=d(this,a,"f").transactions.transactionPool.find(c)&&g.logging.logger.log(` > Ganache \`eth_getTransactionReceipt\` notice: the transaction with hash\n > \`${i.toString()}\` has not\n > yet been mined. See https://trfl.io/v7-instamine for additional information.`)}return null}async eth_sendTransaction(e){const t=d(this,a,"f"),s=p.TransactionFactory.fromRpc(e,t.common);if(null==s.from)throw new Error("from not found; is required");const r=s.from.toString(),n=d(this,c,"f"),i=n.knownAccounts.has(r),l=n.unlockedAccounts.get(r);if(void 0===l){throw new Error(i?"authentication needed: passphrase or unlock":"sender account not recognized")}return await autofillDefaultTransactionValues(s,this.eth_estimateGas.bind(this),this.eth_maxPriorityFeePerGas,e,t,d(this,o,"f")),t.queueTransaction(s,l)}async eth_signTransaction(e){const t=d(this,a,"f"),s=p.TransactionFactory.fromRpc(e,t.common);if(null==s.from)throw new Error("from not found; is required");const r=s.from.toString(),n=d(this,c,"f"),i=n.knownAccounts.has(r),o=n.unlockedAccounts.get(r);if(void 0===o){throw new Error(i?"authentication needed: passphrase or unlock":"sender account not recognized")}return s.signAndHash(o.toBuffer()),y.Data.from(s.serialized)}async eth_sendRawTransaction(e){const t=d(this,a,"f"),s=p.TransactionFactory.fromString(e,t.common);return t.queueTransaction(s)}async eth_sign(e,t){const s=B.Address. \ No newline at end of file diff --git a/docs/node/src/MyFirstContract.rpc.test/stdout.log b/docs/node/src/MyFirstContract.rpc.test/stdout.log index 508fa305..e03128ab 100644 --- a/docs/node/src/MyFirstContract.rpc.test/stdout.log +++ b/docs/node/src/MyFirstContract.rpc.test/stdout.log @@ -19,11 +19,11 @@ eth_getBlockByNumber eth_gasPrice eth_sendTransaction - Transaction: 0x92d86f2b8845e0117747af099a18712c3aef118a87cd8e401bfb1175078bb9a2 - Contract created: 0x3fbf70c4f836fa9ff6b3de24d00e32ce472febe0 + Transaction: 0x6dd1ae90af6ff9978de4ca80426b1dad32679f8bcce2ed42957ee14002082d92 + Contract created: 0x98cc3dc5f53014f7716e48fbde4ec4f6b2811be9 Gas usage: 113457 Block number: 1 - Block time: Mon Oct 21 2024 00:01:29 GMT-0700 (Pacific Daylight Time) + Block time: Wed Oct 23 2024 11:16:19 GMT-0700 (Pacific Daylight Time) eth_getTransactionReceipt eth_getCode diff --git a/docs/node/src/ReactStateAndHook.test.mjs b/docs/node/src/ReactStateAndHook.test.mjs index 5a2cacde..9733a5df 100644 --- a/docs/node/src/ReactStateAndHook.test.mjs +++ b/docs/node/src/ReactStateAndHook.test.mjs @@ -1,14 +1,19 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { node_default -} from "../chunk-L5QXHMAC.mjs"; -import "../chunk-6WZF5PJ5.mjs"; -import "../chunk-2MUW23AQ.mjs"; -import "../chunk-J74XOMIJ.mjs"; -import "../chunk-HRTB753X.mjs"; +} from "../chunk-YMZ5D2GR.mjs"; import { + require_react +} from "../chunk-YSBX7L3R.mjs"; +import "../chunk-HC6XUHVX.mjs"; +import "../chunk-KHU6MVJS.mjs"; +import "../chunk-SF4FRI4W.mjs"; +import "../chunk-ECNFXUXQ.mjs"; +import "../chunk-4CEWYGDD.mjs"; +import { + __toESM, init_cjs_shim -} from "../chunk-LD4XAW36.mjs"; +} from "../chunk-4UNHOY6E.mjs"; // src/ReactStateAndHook.test.tsx init_cjs_shim(); @@ -16,14 +21,14 @@ import assert from "assert"; // src/ReactStateAndHook.tsx init_cjs_shim(); -import React from "react"; -import { useState, useEffect } from "react"; +var import_react = __toESM(require_react(), 1); +var import_react2 = __toESM(require_react(), 1); function ReactStateAndHook() { - const [count, setCount] = useState(0); - useEffect(() => { + const [count, setCount] = (0, import_react2.useState)(0); + (0, import_react2.useEffect)(() => { console.log(`You have clicked the first button ${count} times`); }, [count]); - return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("pre", null, count), /* @__PURE__ */ React.createElement("button", { onClick: () => setCount(count + 1) }, "Click me")); + return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("pre", null, count), /* @__PURE__ */ import_react.default.createElement("button", { onClick: () => setCount(count + 1) }, "Click me")); } var ReactStateAndHook_default = ReactStateAndHook; diff --git a/docs/node/src/ReactStateAndHook.test/exitcode b/docs/node/src/ReactStateAndHook.test/exitcode index c2270834..bf0d87ab 100644 --- a/docs/node/src/ReactStateAndHook.test/exitcode +++ b/docs/node/src/ReactStateAndHook.test/exitcode @@ -1 +1 @@ -0 \ No newline at end of file +4 \ No newline at end of file diff --git a/docs/node/src/ReactStateAndHook.test/log.txt b/docs/node/src/ReactStateAndHook.test/log.txt index 087d91d8..aa778d97 100644 --- a/docs/node/src/ReactStateAndHook.test/log.txt +++ b/docs/node/src/ReactStateAndHook.test/log.txt @@ -3,18 +3,17 @@ test resources: ,[object Object] Suite:,0,Testing the ReactStateAndHook element Given: Default - Then:,TheCounterIs: 0 +TypeError: Cannot read properties of null (reading 'useState') + Given: Default - When:,IClick: undefined - Then:,TheCounterIs: 1 +TypeError: Cannot read properties of null (reading 'useState') + Given: Default - When:,IClick: undefined - When:,IClick: undefined - When:,IClick: undefined - Then:,TheCounterIs: 3 +TypeError: Cannot read properties of null (reading 'useState') + Given: Default - When:,IClick: undefined - Then:,TheCounterIs: 1 +TypeError: Cannot read properties of null (reading 'useState') + diff --git a/docs/node/src/ReactStateAndHook.test/stderr.log b/docs/node/src/ReactStateAndHook.test/stderr.log index e69de29b..8bcaa401 100644 --- a/docs/node/src/ReactStateAndHook.test/stderr.log +++ b/docs/node/src/ReactStateAndHook.test/stderr.log @@ -0,0 +1,44 @@ +Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: +1. You might have mismatching versions of React and the renderer (such as React DOM) +2. You might be breaking the Rules of Hooks +3. You might have more than one copy of React in the same app +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. +The above error occurred in the component: + + at ReactStateAndHook (file:///Users/adam/Code/kokomoBay/docs/node/src/ReactStateAndHook.test.mjs:27:56) + +Consider adding an error boundary to your tree to customize error handling behavior. +Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. +Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: +1. You might have mismatching versions of React and the renderer (such as React DOM) +2. You might be breaking the Rules of Hooks +3. You might have more than one copy of React in the same app +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. +The above error occurred in the component: + + at ReactStateAndHook (file:///Users/adam/Code/kokomoBay/docs/node/src/ReactStateAndHook.test.mjs:27:56) + +Consider adding an error boundary to your tree to customize error handling behavior. +Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. +Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: +1. You might have mismatching versions of React and the renderer (such as React DOM) +2. You might be breaking the Rules of Hooks +3. You might have more than one copy of React in the same app +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. +The above error occurred in the component: + + at ReactStateAndHook (file:///Users/adam/Code/kokomoBay/docs/node/src/ReactStateAndHook.test.mjs:27:56) + +Consider adding an error boundary to your tree to customize error handling behavior. +Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. +Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: +1. You might have mismatching versions of React and the renderer (such as React DOM) +2. You might be breaking the Rules of Hooks +3. You might have more than one copy of React in the same app +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. +The above error occurred in the component: + + at ReactStateAndHook (file:///Users/adam/Code/kokomoBay/docs/node/src/ReactStateAndHook.test.mjs:27:56) + +Consider adding an error boundary to your tree to customize error handling behavior. +Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. diff --git a/docs/node/src/ReactStateAndHook.test/stdout.log b/docs/node/src/ReactStateAndHook.test/stdout.log index 04939f6c..f414a159 100644 --- a/docs/node/src/ReactStateAndHook.test/stdout.log +++ b/docs/node/src/ReactStateAndHook.test/stdout.log @@ -8,72 +8,7 @@ testResourceConfiguration { "fs": "." } ASDASDx -You have clicked the first button 0 times -butThen (rtr) => { - console.log("hello state and hook"); - return assert.deepEqual( - rtr.toJSON().children[0], - { - type: "pre", - props: {}, - children: [ - JSON.stringify(counter) - ] - } - ); - } -hello state and hook ASDASDx -You have clicked the first button 0 times -You have clicked the first button 1 times -butThen (rtr) => { - console.log("hello state and hook"); - return assert.deepEqual( - rtr.toJSON().children[0], - { - type: "pre", - props: {}, - children: [ - JSON.stringify(counter) - ] - } - ); - } -hello state and hook ASDASDx -You have clicked the first button 0 times -You have clicked the first button 1 times -You have clicked the first button 2 times -You have clicked the first button 3 times -butThen (rtr) => { - console.log("hello state and hook"); - return assert.deepEqual( - rtr.toJSON().children[0], - { - type: "pre", - props: {}, - children: [ - JSON.stringify(counter) - ] - } - ); - } -hello state and hook ASDASDx -You have clicked the first button 0 times -You have clicked the first button 1 times -butThen (rtr) => { - console.log("hello state and hook"); - return assert.deepEqual( - rtr.toJSON().children[0], - { - type: "pre", - props: {}, - children: [ - JSON.stringify(counter) - ] - } - ); - } -hello state and hook -exiting gracefully with 0 failures. +exiting gracefully with 4 failures. diff --git a/docs/node/src/Rectangle/Rectangle.test.node.mjs b/docs/node/src/Rectangle/Rectangle.test.node.mjs index 348a68b7..ee05b137 100644 --- a/docs/node/src/Rectangle/Rectangle.test.node.mjs +++ b/docs/node/src/Rectangle/Rectangle.test.node.mjs @@ -1,30 +1,34 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); +import { + require_react +} from "../../chunk-HC6XUHVX.mjs"; import { Node_default -} from "../../chunk-6WZF5PJ5.mjs"; +} from "../../chunk-KHU6MVJS.mjs"; import { assert -} from "../../chunk-GHFYKOO4.mjs"; -import "../../chunk-2MUW23AQ.mjs"; -import "../../chunk-J74XOMIJ.mjs"; -import "../../chunk-HRTB753X.mjs"; +} from "../../chunk-D2G2LC5R.mjs"; +import "../../chunk-SF4FRI4W.mjs"; +import "../../chunk-ECNFXUXQ.mjs"; +import "../../chunk-4CEWYGDD.mjs"; import { + __toESM, init_cjs_shim -} from "../../chunk-LD4XAW36.mjs"; +} from "../../chunk-4UNHOY6E.mjs"; // src/Rectangle/Rectangle.test.node.ts init_cjs_shim(); // ../testeranto/dist/module/SubPackages/puppeteer.js init_cjs_shim(); -import React from "react"; +var import_react = __toESM(require_react(), 1); var puppeteer_default = (testInput, testSpecifications, testImplementations, testInterface2) => { return Node_default(testInput, testSpecifications, testImplementations, Object.assign({ beforeAll(x) { process.parentPort.postMessage(`/docs/web/src/ClassicalComponent/test.html`); return x; }, beforeEach: async () => { return new Promise((resolve, rej) => { - resolve(React.createElement(testInput, {}, [])); + resolve(import_react.default.createElement(testInput, {}, [])); }); }, andWhen: function(s, whenCB) { return whenCB()(s); diff --git a/docs/node/src/Rectangle/Rectangle.test.node/rectangle-beforeAll.jpg b/docs/node/src/Rectangle/Rectangle.test.node/rectangle-beforeAll.jpg index 46e051a4..6e2f1369 100644 Binary files a/docs/node/src/Rectangle/Rectangle.test.node/rectangle-beforeAll.jpg and b/docs/node/src/Rectangle/Rectangle.test.node/rectangle-beforeAll.jpg differ diff --git a/docs/node/src/Rectangle/Rectangle.test.node/stdout.log b/docs/node/src/Rectangle/Rectangle.test.node/stdout.log index dac0bc79..96b151c8 100644 --- a/docs/node/src/Rectangle/Rectangle.test.node/stdout.log +++ b/docs/node/src/Rectangle/Rectangle.test.node/stdout.log @@ -17,13 +17,10 @@ mark2 CDPBrowser { emit: [Function: emit] } } -mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test.html -mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.html mark3 file:///Users/adam/Code/kokomoBay/docs/report.html -mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.html mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/ClassicalComponent/test.html mark3 devtools://devtools/bundled/devtools_app.html beta gamma -delta! 2ee2a8b6-ed30-4b1b-bce7-c17029193c4b +delta! 5825a22b-ec4a-494b-b176-d687e8cdb2be exiting gracefully with 1 failures. diff --git a/docs/node/src/app.redux.test.mjs b/docs/node/src/app.redux.test.mjs index 09b7ab00..a436e363 100644 --- a/docs/node/src/app.redux.test.mjs +++ b/docs/node/src/app.redux.test.mjs @@ -1,24 +1,24 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { AppSpecification -} from "../chunk-S6ZSHMIP.mjs"; +} from "../chunk-YHFZNYDA.mjs"; import { loginApp, require_redux -} from "../chunk-Q7IN32QK.mjs"; +} from "../chunk-M3LZWPQ4.mjs"; import { Node_default -} from "../chunk-ATCKVWWQ.mjs"; +} from "../chunk-PCRK6YWL.mjs"; import { assert -} from "../chunk-GHFYKOO4.mjs"; -import "../chunk-2MUW23AQ.mjs"; -import "../chunk-J74XOMIJ.mjs"; -import "../chunk-HRTB753X.mjs"; +} from "../chunk-D2G2LC5R.mjs"; +import "../chunk-SF4FRI4W.mjs"; +import "../chunk-ECNFXUXQ.mjs"; +import "../chunk-4CEWYGDD.mjs"; import { __toESM, init_cjs_shim -} from "../chunk-LD4XAW36.mjs"; +} from "../chunk-4UNHOY6E.mjs"; // src/app.redux.test.ts init_cjs_shim(); diff --git a/docs/node/src/app.redux.test/exitcode b/docs/node/src/app.redux.test/exitcode index 56a6051c..c2270834 100644 --- a/docs/node/src/app.redux.test/exitcode +++ b/docs/node/src/app.redux.test/exitcode @@ -1 +1 @@ -1 \ No newline at end of file +0 \ No newline at end of file diff --git a/docs/node/src/app.redux.test/log.txt b/docs/node/src/app.redux.test/log.txt index e2d2728a..96b556c9 100644 --- a/docs/node/src/app.redux.test/log.txt +++ b/docs/node/src/app.redux.test/log.txt @@ -20,6 +20,4 @@ Suite:,0,Testing the Redux store Given: AnEmptyState When:,TheEmailIsSetTo: hey there - Then:,TheEmailIs: hey there! -AssertionError: expected 'hey there' to equal 'hey there!' - + Then:,TheEmailIs: hey there diff --git a/docs/node/src/app.redux.test/stdout.log b/docs/node/src/app.redux.test/stdout.log index a45df37e..d5e89862 100644 --- a/docs/node/src/app.redux.test/stdout.log +++ b/docs/node/src/app.redux.test/stdout.log @@ -13,20 +13,4 @@ foobar foobar foobar foobar -test failed AssertionError2: expected 'hey there' to equal 'hey there!' - at file:///Users/adam/Code/kokomoBay/docs/node/src/app.redux.test.mjs:75:14 - at Object.butThen (file:///Users/adam/Code/kokomoBay/docs/node/src/app.redux.test.mjs:43:14) - at Then.butThen (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:534:42) - at Then.test (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:207:28) - at Given.give (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:150:34) - at process.processTicksAndRejections (node:internal/process/task_queues:95:5) - at async Testeranto.givenThat.run (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:75:22) - at async file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:295:14 - at async Object.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:336:31) - at async NodeTesteranto.receiveTestResourceConfig (file:///Users/adam/Code/kokomoBay/docs/node/chunk-ATCKVWWQ.mjs:693:47) { - showDiff: true, - actual: 'hey there', - expected: 'hey there!', - operator: 'strictEqual' -} -exiting gracefully with 1 failures. +exiting gracefully with 0 failures. diff --git a/docs/node/src/app.redux.test/tests.json b/docs/node/src/app.redux.test/tests.json index f7b45cf2..d342e91b 100644 --- a/docs/node/src/app.redux.test/tests.json +++ b/docs/node/src/app.redux.test/tests.json @@ -77,7 +77,7 @@ ], "thens": [ { - "name": "TheEmailIs: hey there!" + "name": "TheEmailIs: hey there" } ], "error": null, diff --git a/docs/node/src/app.reduxToolkit.test.mjs b/docs/node/src/app.reduxToolkit.test.mjs index 1c01c19f..bfc862c3 100644 --- a/docs/node/src/app.reduxToolkit.test.mjs +++ b/docs/node/src/app.reduxToolkit.test.mjs @@ -1,25 +1,25 @@ import { createRequire } from 'module';const require = createRequire(import.meta.url); import { AppSpecification -} from "../chunk-S6ZSHMIP.mjs"; +} from "../chunk-YHFZNYDA.mjs"; import { app_default, loginApp, require_redux -} from "../chunk-Q7IN32QK.mjs"; +} from "../chunk-M3LZWPQ4.mjs"; import { Node_default -} from "../chunk-ATCKVWWQ.mjs"; +} from "../chunk-PCRK6YWL.mjs"; import { assert -} from "../chunk-GHFYKOO4.mjs"; -import "../chunk-2MUW23AQ.mjs"; -import "../chunk-J74XOMIJ.mjs"; -import "../chunk-HRTB753X.mjs"; +} from "../chunk-D2G2LC5R.mjs"; +import "../chunk-SF4FRI4W.mjs"; +import "../chunk-ECNFXUXQ.mjs"; +import "../chunk-4CEWYGDD.mjs"; import { __toESM, init_cjs_shim -} from "../chunk-LD4XAW36.mjs"; +} from "../chunk-4UNHOY6E.mjs"; // src/app.reduxToolkit.test.ts init_cjs_shim(); diff --git a/docs/node/src/app.reduxToolkit.test/exitcode b/docs/node/src/app.reduxToolkit.test/exitcode index 56a6051c..c2270834 100644 --- a/docs/node/src/app.reduxToolkit.test/exitcode +++ b/docs/node/src/app.reduxToolkit.test/exitcode @@ -1 +1 @@ -1 \ No newline at end of file +0 \ No newline at end of file diff --git a/docs/node/src/app.reduxToolkit.test/log.txt b/docs/node/src/app.reduxToolkit.test/log.txt index b8511fb8..96b556c9 100644 --- a/docs/node/src/app.reduxToolkit.test/log.txt +++ b/docs/node/src/app.reduxToolkit.test/log.txt @@ -20,6 +20,4 @@ Suite:,0,Testing the Redux store Given: AnEmptyState When:,TheEmailIsSetTo: hey there - Then:,TheEmailIs: hey there! -AssertionError: a nice message: expected 'hey there' to equal 'hey there!' - + Then:,TheEmailIs: hey there diff --git a/docs/node/src/app.reduxToolkit.test/stdout.log b/docs/node/src/app.reduxToolkit.test/stdout.log index 505b762c..87b70512 100644 --- a/docs/node/src/app.reduxToolkit.test/stdout.log +++ b/docs/node/src/app.reduxToolkit.test/stdout.log @@ -104,4 +104,4 @@ args [Arguments] { fs: '.' } } -exiting gracefully with 1 failures. +exiting gracefully with 0 failures. diff --git a/docs/node/src/app.reduxToolkit.test/tests.json b/docs/node/src/app.reduxToolkit.test/tests.json index f7b45cf2..d342e91b 100644 --- a/docs/node/src/app.reduxToolkit.test/tests.json +++ b/docs/node/src/app.reduxToolkit.test/tests.json @@ -77,7 +77,7 @@ ], "thens": [ { - "name": "TheEmailIs: hey there!" + "name": "TheEmailIs: hey there" } ], "error": null, diff --git a/docs/web/chunk-WK3ZH2ZI.mjs b/docs/web/chunk-3HEJ35MW.mjs similarity index 87% rename from docs/web/chunk-WK3ZH2ZI.mjs rename to docs/web/chunk-3HEJ35MW.mjs index 515e10db..7198cb46 100644 --- a/docs/web/chunk-WK3ZH2ZI.mjs +++ b/docs/web/chunk-3HEJ35MW.mjs @@ -1,7 +1,650 @@ import { __commonJS, + __require, __toESM -} from "./chunk-XALKSG2U.mjs"; +} from "./chunk-TTFRSOOU.mjs"; + +// ../testeranto/node_modules/@electron/remote/dist/src/renderer/callbacks-registry.js +var require_callbacks_registry = __commonJS({ + "../testeranto/node_modules/@electron/remote/dist/src/renderer/callbacks-registry.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CallbacksRegistry = void 0; + var CallbacksRegistry = class { + constructor() { + this.nextId = 0; + this.callbacks = {}; + this.callbackIds = /* @__PURE__ */ new WeakMap(); + this.locationInfo = /* @__PURE__ */ new WeakMap(); + } + add(callback) { + let id = this.callbackIds.get(callback); + if (id != null) + return id; + id = this.nextId += 1; + this.callbacks[id] = callback; + this.callbackIds.set(callback, id); + const regexp = /at (.*)/gi; + const stackString = new Error().stack; + if (!stackString) + return id; + let filenameAndLine; + let match; + while ((match = regexp.exec(stackString)) !== null) { + const location = match[1]; + if (location.includes("(native)")) + continue; + if (location.includes("()")) + continue; + if (location.includes("callbacks-registry.js")) + continue; + if (location.includes("remote.js")) + continue; + if (location.includes("@electron/remote/dist")) + continue; + const ref = /([^/^)]*)\)?$/gi.exec(location); + if (ref) + filenameAndLine = ref[1]; + break; + } + this.locationInfo.set(callback, filenameAndLine); + return id; + } + get(id) { + return this.callbacks[id] || function() { + }; + } + getLocation(callback) { + return this.locationInfo.get(callback); + } + apply(id, ...args) { + return this.get(id).apply(global, ...args); + } + remove(id) { + const callback = this.callbacks[id]; + if (callback) { + this.callbackIds.delete(callback); + delete this.callbacks[id]; + } + } + }; + exports.CallbacksRegistry = CallbacksRegistry; + } +}); + +// ../testeranto/node_modules/@electron/remote/dist/src/common/type-utils.js +var require_type_utils = __commonJS({ + "../testeranto/node_modules/@electron/remote/dist/src/common/type-utils.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.deserialize = exports.serialize = exports.isSerializableObject = exports.isPromise = void 0; + var electron_1 = __require("electron"); + function isPromise(val) { + return val && val.then && val.then instanceof Function && val.constructor && val.constructor.reject && val.constructor.reject instanceof Function && val.constructor.resolve && val.constructor.resolve instanceof Function; + } + exports.isPromise = isPromise; + var serializableTypes = [ + Boolean, + Number, + String, + Date, + Error, + RegExp, + ArrayBuffer + ]; + function isSerializableObject(value) { + return value === null || ArrayBuffer.isView(value) || serializableTypes.some((type) => value instanceof type); + } + exports.isSerializableObject = isSerializableObject; + var objectMap = function(source, mapper) { + const sourceEntries = Object.entries(source); + const targetEntries = sourceEntries.map(([key, val]) => [key, mapper(val)]); + return Object.fromEntries(targetEntries); + }; + function serializeNativeImage(image) { + const representations = []; + const scaleFactors = image.getScaleFactors(); + if (scaleFactors.length === 1) { + const scaleFactor = scaleFactors[0]; + const size = image.getSize(scaleFactor); + const buffer = image.toBitmap({ scaleFactor }); + representations.push({ scaleFactor, size, buffer }); + } else { + for (const scaleFactor of scaleFactors) { + const size = image.getSize(scaleFactor); + const dataURL = image.toDataURL({ scaleFactor }); + representations.push({ scaleFactor, size, dataURL }); + } + } + return { __ELECTRON_SERIALIZED_NativeImage__: true, representations }; + } + function deserializeNativeImage(value) { + const image = electron_1.nativeImage.createEmpty(); + if (value.representations.length === 1) { + const { buffer, size, scaleFactor } = value.representations[0]; + const { width, height } = size; + image.addRepresentation({ buffer, scaleFactor, width, height }); + } else { + for (const rep of value.representations) { + const { dataURL, size, scaleFactor } = rep; + const { width, height } = size; + image.addRepresentation({ dataURL, scaleFactor, width, height }); + } + } + return image; + } + function serialize(value) { + if (value && value.constructor && value.constructor.name === "NativeImage") { + return serializeNativeImage(value); + } + if (Array.isArray(value)) { + return value.map(serialize); + } else if (isSerializableObject(value)) { + return value; + } else if (value instanceof Object) { + return objectMap(value, serialize); + } else { + return value; + } + } + exports.serialize = serialize; + function deserialize(value) { + if (value && value.__ELECTRON_SERIALIZED_NativeImage__) { + return deserializeNativeImage(value); + } else if (Array.isArray(value)) { + return value.map(deserialize); + } else if (isSerializableObject(value)) { + return value; + } else if (value instanceof Object) { + return objectMap(value, deserialize); + } else { + return value; + } + } + exports.deserialize = deserialize; + } +}); + +// ../testeranto/node_modules/@electron/remote/dist/src/common/get-electron-binding.js +var require_get_electron_binding = __commonJS({ + "../testeranto/node_modules/@electron/remote/dist/src/common/get-electron-binding.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getElectronBinding = void 0; + var getElectronBinding = (name) => { + if (process._linkedBinding) { + return process._linkedBinding("electron_common_" + name); + } else if (process.electronBinding) { + return process.electronBinding(name); + } else { + return null; + } + }; + exports.getElectronBinding = getElectronBinding; + } +}); + +// ../testeranto/node_modules/@electron/remote/dist/src/common/module-names.js +var require_module_names = __commonJS({ + "../testeranto/node_modules/@electron/remote/dist/src/common/module-names.js"(exports) { + "use strict"; + var _a; + var _b; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.browserModuleNames = exports.commonModuleNames = void 0; + var get_electron_binding_1 = require_get_electron_binding(); + exports.commonModuleNames = [ + "clipboard", + "nativeImage", + "shell" + ]; + exports.browserModuleNames = [ + "app", + "autoUpdater", + "BaseWindow", + "BrowserView", + "BrowserWindow", + "contentTracing", + "crashReporter", + "dialog", + "globalShortcut", + "ipcMain", + "inAppPurchase", + "Menu", + "MenuItem", + "nativeTheme", + "net", + "netLog", + "MessageChannelMain", + "Notification", + "powerMonitor", + "powerSaveBlocker", + "protocol", + "pushNotifications", + "safeStorage", + "screen", + "session", + "ShareMenu", + "systemPreferences", + "TopLevelWindow", + "TouchBar", + "Tray", + "utilityProcess", + "View", + "webContents", + "WebContentsView", + "webFrameMain" + ].concat(exports.commonModuleNames); + var features = get_electron_binding_1.getElectronBinding("features"); + if (((_a = features === null || features === void 0 ? void 0 : features.isDesktopCapturerEnabled) === null || _a === void 0 ? void 0 : _a.call(features)) !== false) { + exports.browserModuleNames.push("desktopCapturer"); + } + if (((_b = features === null || features === void 0 ? void 0 : features.isViewApiEnabled) === null || _b === void 0 ? void 0 : _b.call(features)) !== false) { + exports.browserModuleNames.push("ImageView"); + } + } +}); + +// ../testeranto/node_modules/@electron/remote/dist/src/renderer/remote.js +var require_remote = __commonJS({ + "../testeranto/node_modules/@electron/remote/dist/src/renderer/remote.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFunctionWithReturnValue = exports.getGlobal = exports.getCurrentWebContents = exports.getCurrentWindow = exports.getBuiltin = void 0; + var callbacks_registry_1 = require_callbacks_registry(); + var type_utils_1 = require_type_utils(); + var electron_1 = __require("electron"); + var module_names_1 = require_module_names(); + var get_electron_binding_1 = require_get_electron_binding(); + var { Promise: Promise2 } = global; + var callbacksRegistry = new callbacks_registry_1.CallbacksRegistry(); + var remoteObjectCache = /* @__PURE__ */ new Map(); + var finalizationRegistry = new FinalizationRegistry((id) => { + const ref = remoteObjectCache.get(id); + if (ref !== void 0 && ref.deref() === void 0) { + remoteObjectCache.delete(id); + electron_1.ipcRenderer.send("REMOTE_BROWSER_DEREFERENCE", contextId, id, 0); + } + }); + var electronIds = /* @__PURE__ */ new WeakMap(); + var isReturnValue = /* @__PURE__ */ new WeakSet(); + function getCachedRemoteObject(id) { + const ref = remoteObjectCache.get(id); + if (ref !== void 0) { + const deref = ref.deref(); + if (deref !== void 0) + return deref; + } + } + function setCachedRemoteObject(id, value) { + const wr = new WeakRef(value); + remoteObjectCache.set(id, wr); + finalizationRegistry.register(value, id); + return value; + } + function getContextId() { + const v8Util = get_electron_binding_1.getElectronBinding("v8_util"); + if (v8Util) { + return v8Util.getHiddenValue(global, "contextId"); + } else { + throw new Error("Electron >=v13.0.0-beta.6 required to support sandboxed renderers"); + } + } + var contextId = process.contextId || getContextId(); + process.on("exit", () => { + const command = "REMOTE_BROWSER_CONTEXT_RELEASE"; + electron_1.ipcRenderer.send(command, contextId); + }); + var IS_REMOTE_PROXY = Symbol("is-remote-proxy"); + function wrapArgs(args, visited = /* @__PURE__ */ new Set()) { + const valueToMeta = (value) => { + if (visited.has(value)) { + return { + type: "value", + value: null + }; + } + if (value && value.constructor && value.constructor.name === "NativeImage") { + return { type: "nativeimage", value: type_utils_1.serialize(value) }; + } else if (Array.isArray(value)) { + visited.add(value); + const meta = { + type: "array", + value: wrapArgs(value, visited) + }; + visited.delete(value); + return meta; + } else if (value instanceof Buffer) { + return { + type: "buffer", + value + }; + } else if (type_utils_1.isSerializableObject(value)) { + return { + type: "value", + value + }; + } else if (typeof value === "object") { + if (type_utils_1.isPromise(value)) { + return { + type: "promise", + then: valueToMeta(function(onFulfilled, onRejected) { + value.then(onFulfilled, onRejected); + }) + }; + } else if (electronIds.has(value)) { + return { + type: "remote-object", + id: electronIds.get(value) + }; + } + const meta = { + type: "object", + name: value.constructor ? value.constructor.name : "", + members: [] + }; + visited.add(value); + for (const prop in value) { + meta.members.push({ + name: prop, + value: valueToMeta(value[prop]) + }); + } + visited.delete(value); + return meta; + } else if (typeof value === "function" && isReturnValue.has(value)) { + return { + type: "function-with-return-value", + value: valueToMeta(value()) + }; + } else if (typeof value === "function") { + return { + type: "function", + id: callbacksRegistry.add(value), + location: callbacksRegistry.getLocation(value), + length: value.length + }; + } else { + return { + type: "value", + value + }; + } + }; + return args.map(valueToMeta); + } + function setObjectMembers(ref, object, metaId, members) { + if (!Array.isArray(members)) + return; + for (const member of members) { + if (Object.prototype.hasOwnProperty.call(object, member.name)) + continue; + const descriptor = { enumerable: member.enumerable }; + if (member.type === "method") { + const remoteMemberFunction = function(...args) { + let command; + if (this && this.constructor === remoteMemberFunction) { + command = "REMOTE_BROWSER_MEMBER_CONSTRUCTOR"; + } else { + command = "REMOTE_BROWSER_MEMBER_CALL"; + } + const ret = electron_1.ipcRenderer.sendSync(command, contextId, metaId, member.name, wrapArgs(args)); + return metaToValue(ret); + }; + let descriptorFunction = proxyFunctionProperties(remoteMemberFunction, metaId, member.name); + descriptor.get = () => { + descriptorFunction.ref = ref; + return descriptorFunction; + }; + descriptor.set = (value) => { + descriptorFunction = value; + return value; + }; + descriptor.configurable = true; + } else if (member.type === "get") { + descriptor.get = () => { + const command = "REMOTE_BROWSER_MEMBER_GET"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, metaId, member.name); + return metaToValue(meta); + }; + if (member.writable) { + descriptor.set = (value) => { + const args = wrapArgs([value]); + const command = "REMOTE_BROWSER_MEMBER_SET"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, metaId, member.name, args); + if (meta != null) + metaToValue(meta); + return value; + }; + } + } + Object.defineProperty(object, member.name, descriptor); + } + } + function setObjectPrototype(ref, object, metaId, descriptor) { + if (descriptor === null) + return; + const proto = {}; + setObjectMembers(ref, proto, metaId, descriptor.members); + setObjectPrototype(ref, proto, metaId, descriptor.proto); + Object.setPrototypeOf(object, proto); + } + function proxyFunctionProperties(remoteMemberFunction, metaId, name) { + let loaded = false; + const loadRemoteProperties = () => { + if (loaded) + return; + loaded = true; + const command = "REMOTE_BROWSER_MEMBER_GET"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, metaId, name); + setObjectMembers(remoteMemberFunction, remoteMemberFunction, meta.id, meta.members); + }; + return new Proxy(remoteMemberFunction, { + set: (target, property, value) => { + if (property !== "ref") + loadRemoteProperties(); + target[property] = value; + return true; + }, + get: (target, property) => { + if (property === IS_REMOTE_PROXY) + return true; + if (!Object.prototype.hasOwnProperty.call(target, property)) + loadRemoteProperties(); + const value = target[property]; + if (property === "toString" && typeof value === "function") { + return value.bind(target); + } + return value; + }, + ownKeys: (target) => { + loadRemoteProperties(); + return Object.getOwnPropertyNames(target); + }, + getOwnPropertyDescriptor: (target, property) => { + const descriptor = Object.getOwnPropertyDescriptor(target, property); + if (descriptor) + return descriptor; + loadRemoteProperties(); + return Object.getOwnPropertyDescriptor(target, property); + } + }); + } + function metaToValue(meta) { + if (!meta) + return {}; + if (meta.type === "value") { + return meta.value; + } else if (meta.type === "array") { + return meta.members.map((member) => metaToValue(member)); + } else if (meta.type === "nativeimage") { + return type_utils_1.deserialize(meta.value); + } else if (meta.type === "buffer") { + return Buffer.from(meta.value.buffer, meta.value.byteOffset, meta.value.byteLength); + } else if (meta.type === "promise") { + return Promise2.resolve({ then: metaToValue(meta.then) }); + } else if (meta.type === "error") { + return metaToError(meta); + } else if (meta.type === "exception") { + if (meta.value.type === "error") { + throw metaToError(meta.value); + } else { + throw new Error(`Unexpected value type in exception: ${meta.value.type}`); + } + } else { + let ret; + if ("id" in meta) { + const cached = getCachedRemoteObject(meta.id); + if (cached !== void 0) { + return cached; + } + } + if (meta.type === "function") { + const remoteFunction = function(...args) { + let command; + if (this && this.constructor === remoteFunction) { + command = "REMOTE_BROWSER_CONSTRUCTOR"; + } else { + command = "REMOTE_BROWSER_FUNCTION_CALL"; + } + const obj = electron_1.ipcRenderer.sendSync(command, contextId, meta.id, wrapArgs(args)); + return metaToValue(obj); + }; + ret = remoteFunction; + } else { + ret = {}; + } + setObjectMembers(ret, ret, meta.id, meta.members); + setObjectPrototype(ret, ret, meta.id, meta.proto); + if (ret.constructor && ret.constructor[IS_REMOTE_PROXY]) { + Object.defineProperty(ret.constructor, "name", { value: meta.name }); + } + electronIds.set(ret, meta.id); + setCachedRemoteObject(meta.id, ret); + return ret; + } + } + function metaToError(meta) { + const obj = meta.value; + for (const { name, value } of meta.members) { + obj[name] = metaToValue(value); + } + return obj; + } + function hasSenderId(input) { + return typeof input.senderId === "number"; + } + function handleMessage(channel, handler) { + electron_1.ipcRenderer.on(channel, (event, passedContextId, id, ...args) => { + if (hasSenderId(event)) { + if (event.senderId !== 0 && event.senderId !== void 0) { + console.error(`Message ${channel} sent by unexpected WebContents (${event.senderId})`); + return; + } + } + if (passedContextId === contextId) { + handler(id, ...args); + } else { + electron_1.ipcRenderer.send("REMOTE_BROWSER_WRONG_CONTEXT_ERROR", contextId, passedContextId, id); + } + }); + } + var enableStacks = process.argv.includes("--enable-api-filtering-logging"); + function getCurrentStack() { + const target = { stack: void 0 }; + if (enableStacks) { + Error.captureStackTrace(target, getCurrentStack); + } + return target.stack; + } + handleMessage("REMOTE_RENDERER_CALLBACK", (id, args) => { + callbacksRegistry.apply(id, metaToValue(args)); + }); + handleMessage("REMOTE_RENDERER_RELEASE_CALLBACK", (id) => { + callbacksRegistry.remove(id); + }); + exports.require = (module2) => { + const command = "REMOTE_BROWSER_REQUIRE"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, module2, getCurrentStack()); + return metaToValue(meta); + }; + function getBuiltin(module2) { + const command = "REMOTE_BROWSER_GET_BUILTIN"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, module2, getCurrentStack()); + return metaToValue(meta); + } + exports.getBuiltin = getBuiltin; + function getCurrentWindow() { + const command = "REMOTE_BROWSER_GET_CURRENT_WINDOW"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, getCurrentStack()); + return metaToValue(meta); + } + exports.getCurrentWindow = getCurrentWindow; + function getCurrentWebContents() { + const command = "REMOTE_BROWSER_GET_CURRENT_WEB_CONTENTS"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, getCurrentStack()); + return metaToValue(meta); + } + exports.getCurrentWebContents = getCurrentWebContents; + function getGlobal(name) { + const command = "REMOTE_BROWSER_GET_GLOBAL"; + const meta = electron_1.ipcRenderer.sendSync(command, contextId, name, getCurrentStack()); + return metaToValue(meta); + } + exports.getGlobal = getGlobal; + Object.defineProperty(exports, "process", { + enumerable: true, + get: () => exports.getGlobal("process") + }); + function createFunctionWithReturnValue(returnValue) { + const func = () => returnValue; + isReturnValue.add(func); + return func; + } + exports.createFunctionWithReturnValue = createFunctionWithReturnValue; + var addBuiltinProperty = (name) => { + Object.defineProperty(exports, name, { + enumerable: true, + get: () => exports.getBuiltin(name) + }); + }; + module_names_1.browserModuleNames.forEach(addBuiltinProperty); + } +}); + +// ../testeranto/node_modules/@electron/remote/dist/src/renderer/index.js +var require_renderer = __commonJS({ + "../testeranto/node_modules/@electron/remote/dist/src/renderer/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports && exports.__exportStar || function(m, exports2) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) + __createBinding(exports2, m, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + if (process.type === "browser") + throw new Error(`"@electron/remote" cannot be required in the browser process. Instead require("@electron/remote/main").`); + __exportStar(require_remote(), exports); + } +}); + +// ../testeranto/node_modules/@electron/remote/renderer/index.js +var require_renderer2 = __commonJS({ + "../testeranto/node_modules/@electron/remote/renderer/index.js"(exports, module) { + module.exports = require_renderer(); + } +}); // node_modules/assertion-error/index.js var require_assertion_error = __commonJS({ @@ -182,8 +825,8 @@ var require_test = __commonJS({ // node_modules/type-detect/type-detect.js var require_type_detect = __commonJS({ "node_modules/type-detect/type-detect.js"(exports, module) { - (function(global, factory) { - typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.typeDetect = factory()); + (function(global2, factory) { + typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.typeDetect = factory()); })(exports, function() { "use strict"; var promiseExists = typeof Promise === "function"; @@ -197,9 +840,9 @@ var require_type_detect = __commonJS({ }, configurable: true }); - var global = typeDetectGlobalObject; + var global2 = typeDetectGlobalObject; delete Obj.typeDetectGlobalObject; - return global; + return global2; }(Object.prototype); var symbolExists = typeof Symbol !== "undefined"; var mapExists = typeof Map !== "undefined"; @@ -393,8 +1036,8 @@ var require_util = __commonJS({ // node_modules/loupe/loupe.js var require_loupe = __commonJS({ "node_modules/loupe/loupe.js"(exports, module) { - (function(global, factory) { - typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.loupe = {})); + (function(global2, factory) { + typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.loupe = {})); })(exports, function(exports2) { "use strict"; function _typeof(obj) { @@ -985,7 +1628,7 @@ var require_loupe = __commonJS({ DataView: function DataView2() { return ""; }, - ArrayBuffer: function ArrayBuffer() { + ArrayBuffer: function ArrayBuffer2() { return ""; }, Error: inspectObject$1, @@ -4096,6 +4739,7 @@ var assert = import_index.default.assert; var core = import_index.default.core; export { + require_renderer2 as require_renderer, assert }; /*! Bundled license information: diff --git a/docs/web/chunk-SSNVFQ2Q.mjs b/docs/web/chunk-DP2TIZBZ.mjs similarity index 97% rename from docs/web/chunk-SSNVFQ2Q.mjs rename to docs/web/chunk-DP2TIZBZ.mjs index 93f4337a..cb52296c 100644 --- a/docs/web/chunk-SSNVFQ2Q.mjs +++ b/docs/web/chunk-DP2TIZBZ.mjs @@ -1,3 +1,7 @@ +import { + require_renderer +} from "./chunk-3HEJ35MW.mjs"; + // ../testeranto/src/lib/index.ts var BaseTestInterface = { beforeAll: async (s) => s, @@ -84,7 +88,13 @@ var BaseSuite = class { } for (const k of Object.keys(this.givens)) { const giver = this.givens[k]; - giver.afterAll(this.store, artifactory, utils); + try { + giver.afterAll(this.store, artifactory, utils); + } catch (e) { + console.error(e); + this.fails.push(giver); + return this; + } } return this; } @@ -555,6 +565,7 @@ var Testeranto = class extends ClassBuilder { }; // ../testeranto/src/Web.ts +var remote = require_renderer(); var WebTesteranto = class extends Testeranto { constructor(input, testSpecification, testImplementation, testResourceRequirement, testInterface) { super( @@ -598,7 +609,10 @@ var WebTesteranto = class extends Testeranto { ipc: window.ipcRenderer } ); + console.log("test is done, awaiting test result write to fs"); Promise.all([...artifacts, logPromise]).then(async () => { + var window2 = remote.getCurrentWindow(); + window2.close(); }); } }; diff --git a/docs/web/chunk-AUQMQZHB.mjs b/docs/web/chunk-K7SJ64TU.mjs similarity index 99% rename from docs/web/chunk-AUQMQZHB.mjs rename to docs/web/chunk-K7SJ64TU.mjs index 78932324..af1c2355 100644 --- a/docs/web/chunk-AUQMQZHB.mjs +++ b/docs/web/chunk-K7SJ64TU.mjs @@ -1,11 +1,11 @@ import { require_react, require_react_dom -} from "./chunk-NBTTKMUG.mjs"; +} from "./chunk-X4RTFM5S.mjs"; import { __commonJS, __toESM -} from "./chunk-XALKSG2U.mjs"; +} from "./chunk-TTFRSOOU.mjs"; // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js var require_use_sync_external_store_shim_development = __commonJS({ @@ -243,9 +243,9 @@ var require_with_selector = __commonJS({ } }); -// node_modules/react-is/cjs/react-is.development.js +// node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js var require_react_is_development = __commonJS({ - "node_modules/react-is/cjs/react-is.development.js"(exports) { + "node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js"(exports) { "use strict"; if (true) { (function() { @@ -398,9 +398,9 @@ var require_react_is_development = __commonJS({ } }); -// node_modules/react-is/index.js +// node_modules/hoist-non-react-statics/node_modules/react-is/index.js var require_react_is = __commonJS({ - "node_modules/react-is/index.js"(exports, module) { + "node_modules/hoist-non-react-statics/node_modules/react-is/index.js"(exports, module) { "use strict"; if (false) { module.exports = null; @@ -2746,7 +2746,7 @@ var core = app_default(); var selector = core.select.loginPageSelection; var actions = core.app.actions; var store = core.store; -var emailwarning = "Something isn\u2019t right. Please double check your email"; +var emailwarning = "Something isn\u2019t right. Please double check your email."; function LoginPage() { const selection = useSelector(selector); return /* @__PURE__ */ import_react3.default.createElement("div", null, /* @__PURE__ */ import_react3.default.createElement("h2", null, "Welcome back!"), /* @__PURE__ */ import_react3.default.createElement("p", null, "Sign in and get to it."), /* @__PURE__ */ import_react3.default.createElement("form", null, /* @__PURE__ */ import_react3.default.createElement("input", { type: "email", value: selection.email, onChange: (e) => store.dispatch(actions.setEmail(e.target.value)) }), /* @__PURE__ */ import_react3.default.createElement("p", { id: "invalid-email-warning", className: "warnin" }, selection.error === "invalidEmail" && emailwarning), /* @__PURE__ */ import_react3.default.createElement("br", null), /* @__PURE__ */ import_react3.default.createElement("input", { type: "password", value: selection.password, onChange: (e) => store.dispatch(actions.setPassword(e.target.value)) }), /* @__PURE__ */ import_react3.default.createElement("p", { id: "error" }, selection.error === "credentialFail" && "You entered an incorrect email, password, or both."), /* @__PURE__ */ import_react3.default.createElement("br", null), /* @__PURE__ */ import_react3.default.createElement("button", { disabled: selection.disableSubmit, onClick: (event) => { diff --git a/docs/web/chunk-XALKSG2U.mjs b/docs/web/chunk-TTFRSOOU.mjs similarity index 74% rename from docs/web/chunk-XALKSG2U.mjs rename to docs/web/chunk-TTFRSOOU.mjs index 0e674785..767f8c3e 100644 --- a/docs/web/chunk-XALKSG2U.mjs +++ b/docs/web/chunk-TTFRSOOU.mjs @@ -4,7 +4,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") + return require.apply(this, arguments); + throw new Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { @@ -25,6 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge )); export { + __require, __commonJS, __toESM }; diff --git a/docs/web/chunk-NBTTKMUG.mjs b/docs/web/chunk-X4RTFM5S.mjs similarity index 99% rename from docs/web/chunk-NBTTKMUG.mjs rename to docs/web/chunk-X4RTFM5S.mjs index 6b9e0484..48fb81d4 100644 --- a/docs/web/chunk-NBTTKMUG.mjs +++ b/docs/web/chunk-X4RTFM5S.mjs @@ -1,6 +1,6 @@ import { __commonJS -} from "./chunk-XALKSG2U.mjs"; +} from "./chunk-TTFRSOOU.mjs"; // node_modules/react/cjs/react.development.js var require_react_development = __commonJS({ diff --git a/docs/web/src/ClassicalComponent/test.mjs b/docs/web/src/ClassicalComponent/test.mjs index 286fa9ab..67b36895 100644 --- a/docs/web/src/ClassicalComponent/test.mjs +++ b/docs/web/src/ClassicalComponent/test.mjs @@ -1,11 +1,11 @@ import { require_react, require_react_dom -} from "../../chunk-NBTTKMUG.mjs"; +} from "../../chunk-X4RTFM5S.mjs"; import { __commonJS, __toESM -} from "../../chunk-XALKSG2U.mjs"; +} from "../../chunk-TTFRSOOU.mjs"; // node_modules/react-dom/client.js var require_client = __commonJS({ diff --git a/docs/web/src/LoginPage/react-test-renderer/web.test.mjs b/docs/web/src/LoginPage/react-test-renderer/web.test.mjs index 5ee13a66..a8b748c0 100644 --- a/docs/web/src/LoginPage/react-test-renderer/web.test.mjs +++ b/docs/web/src/LoginPage/react-test-renderer/web.test.mjs @@ -3,18 +3,19 @@ import { LoginPage_default, actions, emailwarning -} from "../../../chunk-AUQMQZHB.mjs"; +} from "../../../chunk-K7SJ64TU.mjs"; import { - assert -} from "../../../chunk-WK3ZH2ZI.mjs"; + assert, + require_renderer +} from "../../../chunk-3HEJ35MW.mjs"; import { require_react, require_scheduler -} from "../../../chunk-NBTTKMUG.mjs"; +} from "../../../chunk-X4RTFM5S.mjs"; import { __commonJS, __toESM -} from "../../../chunk-XALKSG2U.mjs"; +} from "../../../chunk-TTFRSOOU.mjs"; // ../testeranto/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js var require_scheduler_unstable_mock_development = __commonJS({ @@ -27692,7 +27693,13 @@ var BaseSuite = class { } for (const k of Object.keys(this.givens)) { const giver = this.givens[k]; - giver.afterAll(this.store, artifactory, utils); + try { + giver.afterAll(this.store, artifactory, utils); + } catch (e) { + console.error(e); + this.fails.push(giver); + return this; + } } return this; } @@ -28006,6 +28013,7 @@ var Testeranto = class extends ClassBuilder { }; // ../testeranto/dist/module/Web.js +var remote = require_renderer(); var WebTesteranto = class extends Testeranto { constructor(input, testSpecification, testImplementation, testResourceRequirement, testInterface2) { super(input, testSpecification, testImplementation, testResourceRequirement, window.NodeWriter, testInterface2); @@ -28033,7 +28041,10 @@ var WebTesteranto = class extends Testeranto { browser: await window.browser, ipc: window.ipcRenderer }); + console.log("test is done, awaiting test result write to fs"); Promise.all([...artifacts, logPromise]).then(async () => { + var window2 = remote.getCurrentWindow(); + window2.close(); }); } }; diff --git a/docs/web/src/LoginPage/react-test-renderer/web.test/stdout.log b/docs/web/src/LoginPage/react-test-renderer/web.test/stdout.log index 6093c0f0..b188fb39 100644 --- a/docs/web/src/LoginPage/react-test-renderer/web.test/stdout.log +++ b/docs/web/src/LoginPage/react-test-renderer/web.test/stdout.log @@ -3,20 +3,20 @@ "level": 1, "message": "\"%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools\\nYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq font-weight:bold\"", "line": 23418, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-NBTTKMUG.mjs" + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-X4RTFM5S.mjs" } { "event": {}, "level": 1, "message": "\"hello world\"", "line": 2683, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-AUQMQZHB.mjs" + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-K7SJ64TU.mjs" } { "event": {}, "level": 1, "message": "\"initial test resource [object Object]\"", - "line": 28024, + "line": 28032, "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.mjs" } { @@ -30,14 +30,14 @@ "event": {}, "level": 1, "message": "\"testResourceConfiguration {\\n \\\"name\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test\\\",\\n \\\"ports\\\": \\\"\\\",\\n \\\"fs\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test\\\"\\n}\"", - "line": 27865, + "line": 27872, "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.mjs" } { "event": {}, "level": 1, "message": "\"testResourceConfiguration {\\n \\\"name\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test\\\",\\n \\\"ports\\\": \\\"\\\",\\n \\\"fs\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test\\\"\\n}\"", - "line": 27865, + "line": 27872, "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.mjs" } { @@ -45,20 +45,27 @@ "level": 3, "message": "\"Warning: You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"", "line": 136, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-NBTTKMUG.mjs" + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-X4RTFM5S.mjs" } { "event": {}, "level": 3, "message": "\"Warning: You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"", "line": 136, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-NBTTKMUG.mjs" + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-X4RTFM5S.mjs" } { "event": {}, "level": 1, "message": "\"exiting gracefully with 0 failures.\"", - "line": 27882, + "line": 27889, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.mjs" +} +{ + "event": {}, + "level": 1, + "message": "\"test is done, awaiting test result write to fs\"", + "line": 28044, "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.mjs" } { @@ -72,6 +79,13 @@ "event": {}, "level": 1, "message": "\"exiting gracefully with 0 failures.\"", - "line": 27882, + "line": 27889, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.mjs" +} +{ + "event": {}, + "level": 1, + "message": "\"test is done, awaiting test result write to fs\"", + "line": 28044, "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.mjs" } diff --git a/docs/web/src/LoginPage/react/web.test.mjs b/docs/web/src/LoginPage/react/web.test.mjs index fa83275c..fd62cc79 100644 --- a/docs/web/src/LoginPage/react/web.test.mjs +++ b/docs/web/src/LoginPage/react/web.test.mjs @@ -2,15 +2,15 @@ import { LoginPageSpecs, LoginPage_default, actions -} from "../../../chunk-AUQMQZHB.mjs"; +} from "../../../chunk-K7SJ64TU.mjs"; import { Web_default -} from "../../../chunk-SSNVFQ2Q.mjs"; +} from "../../../chunk-DP2TIZBZ.mjs"; import { assert -} from "../../../chunk-WK3ZH2ZI.mjs"; -import "../../../chunk-NBTTKMUG.mjs"; -import "../../../chunk-XALKSG2U.mjs"; +} from "../../../chunk-3HEJ35MW.mjs"; +import "../../../chunk-X4RTFM5S.mjs"; +import "../../../chunk-TTFRSOOU.mjs"; // ../testeranto/src/SubPackages/react/jsx/index.ts var testInterface = { diff --git a/docs/web/src/LoginPage/react/web.test/exitcode b/docs/web/src/LoginPage/react/web.test/exitcode new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/docs/web/src/LoginPage/react/web.test/exitcode @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/docs/web/src/LoginPage/react/web.test/stdout.log b/docs/web/src/LoginPage/react/web.test/stdout.log index ceb7a312..bf3b3649 100644 --- a/docs/web/src/LoginPage/react/web.test/stdout.log +++ b/docs/web/src/LoginPage/react/web.test/stdout.log @@ -3,21 +3,21 @@ "level": 1, "message": "\"%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools\\nYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq font-weight:bold\"", "line": 23418, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-NBTTKMUG.mjs" + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-X4RTFM5S.mjs" } { "event": {}, "level": 1, "message": "\"hello world\"", "line": 2683, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-AUQMQZHB.mjs" + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-K7SJ64TU.mjs" } { "event": {}, "level": 1, "message": "\"initial test resource [object Object]\"", - "line": 586, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 597, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, @@ -37,15 +37,15 @@ "event": {}, "level": 1, "message": "\"testResourceConfiguration {\\n \\\"name\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test\\\",\\n \\\"ports\\\": \\\"\\\",\\n \\\"fs\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test\\\"\\n}\"", - "line": 301, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 311, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, "level": 1, "message": "\"testResourceConfiguration {\\n \\\"name\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test\\\",\\n \\\"ports\\\": \\\"\\\",\\n \\\"fs\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test\\\"\\n}\"", - "line": 301, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 311, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, @@ -79,15 +79,15 @@ "event": {}, "level": 1, "message": "\"test failed [object Object]\"", - "line": 198, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 208, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, "level": 1, "message": "\"test failed [object Object]\"", - "line": 198, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 208, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, @@ -96,6 +96,13 @@ "line": 97, "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test.mjs" } +{ + "event": {}, + "level": 3, + "message": "\"TypeError: Cannot read properties of undefined (reading 'capturePage')\"", + "line": 94, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" +} { "event": {}, "level": 1, @@ -106,14 +113,35 @@ { "event": {}, "level": 3, - "message": "\"Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'capturePage')\"", - "line": 98, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test.mjs" + "message": "\"TypeError: Cannot read properties of undefined (reading 'capturePage')\"", + "line": 94, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, - "level": 3, - "message": "\"Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'capturePage')\"", - "line": 98, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test.mjs" + "level": 1, + "message": "\"exiting gracefully with 1 failures.\"", + "line": 346, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" +} +{ + "event": {}, + "level": 1, + "message": "\"exiting gracefully with 1 failures.\"", + "line": 346, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" +} +{ + "event": {}, + "level": 1, + "message": "\"test is done, awaiting test result write to fs\"", + "line": 612, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" +} +{ + "event": {}, + "level": 1, + "message": "\"test is done, awaiting test result write to fs\"", + "line": 612, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } diff --git a/docs/web/src/Rectangle/Rectangle.test.electron.mjs b/docs/web/src/Rectangle/Rectangle.test.electron.mjs index e4fc84df..a7d005f9 100644 --- a/docs/web/src/Rectangle/Rectangle.test.electron.mjs +++ b/docs/web/src/Rectangle/Rectangle.test.electron.mjs @@ -1,10 +1,10 @@ import { Web_default -} from "../../chunk-SSNVFQ2Q.mjs"; +} from "../../chunk-DP2TIZBZ.mjs"; import { assert -} from "../../chunk-WK3ZH2ZI.mjs"; -import "../../chunk-XALKSG2U.mjs"; +} from "../../chunk-3HEJ35MW.mjs"; +import "../../chunk-TTFRSOOU.mjs"; // src/Rectangle.ts var Rectangle = class { diff --git a/docs/web/src/Rectangle/Rectangle.test.electron/stdout.log b/docs/web/src/Rectangle/Rectangle.test.electron/stdout.log index a2aa060b..05ff09d9 100644 --- a/docs/web/src/Rectangle/Rectangle.test.electron/stdout.log +++ b/docs/web/src/Rectangle/Rectangle.test.electron/stdout.log @@ -2,8 +2,8 @@ "event": {}, "level": 1, "message": "\"initial test resource [object Object]\"", - "line": 586, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 597, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, @@ -23,15 +23,15 @@ "event": {}, "level": 1, "message": "\"testResourceConfiguration {\\n \\\"name\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron\\\",\\n \\\"ports\\\": \\\"\\\",\\n \\\"fs\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron\\\"\\n}\"", - "line": 301, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 311, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, "level": 1, "message": "\"testResourceConfiguration {\\n \\\"name\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron\\\",\\n \\\"ports\\\": \\\"\\\",\\n \\\"fs\\\": \\\"/Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron\\\"\\n}\"", - "line": 301, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 311, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, @@ -51,97 +51,27 @@ "event": {}, "level": 1, "message": "\"exiting gracefully with 0 failures.\"", - "line": 336, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 346, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, "level": 1, "message": "\"exiting gracefully with 0 failures.\"", - "line": 336, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-SSNVFQ2Q.mjs" + "line": 346, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/ClassicalComponent/test.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 devtools://devtools/bundled/devtools_app.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/report.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" + "message": "\"test is done, awaiting test result write to fs\"", + "line": 612, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } { "event": {}, "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/ClassicalComponent/test.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 devtools://devtools/bundled/devtools_app.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react/web.test.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/LoginPage/react-test-renderer/web.test.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/report.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" -} -{ - "event": {}, - "level": 1, - "message": "\"mark3 file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.html\"", - "line": 150, - "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/src/Rectangle/Rectangle.test.electron.mjs" + "message": "\"test is done, awaiting test result write to fs\"", + "line": 612, + "sourceId": "file:///Users/adam/Code/kokomoBay/docs/web/chunk-DP2TIZBZ.mjs" } diff --git a/electrobun.config b/electrobun.config new file mode 100644 index 00000000..3be6e700 --- /dev/null +++ b/electrobun.config @@ -0,0 +1,12 @@ +{ + "app": { + "name": "My App", + "identifier": "dev.my.app", + "version": "0.0.1" + }, + "build": { + "bun": { + "entrypoint": "src/bun/index.ts" + } + } +} \ No newline at end of file diff --git a/foo b/foo new file mode 100644 index 00000000..b6fc4c62 --- /dev/null +++ b/foo @@ -0,0 +1 @@ +hello \ No newline at end of file diff --git a/foo-hash b/foo-hash new file mode 100644 index 00000000..60735ec0 --- /dev/null +++ b/foo-hash @@ -0,0 +1 @@ +a0367f283d0d18530008b6b9177d470d1b0f03c1ffd476c4e2d2c98513bd7838 \ No newline at end of file diff --git a/package.json b/package.json index 30d39ac6..dea165ef 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,13 @@ ] }, "scripts": { - "dev": "rm -f docs/features.test.js rm -f docs/electron.log; rm -f docs/report.html; rm -f docs/report.js; rm -f docs/report.css; rm -rf docs/web && rm -rf docs/node && yarn upgrade -f testeranto && yarn test", - "test": "rm -f docs/features.test.js rm -f docs/electron.log; rm -f docs/report.html; rm -f docs/report.js; rm -f docs/report.css; rm -rf docs/web && rm -rf docs/node && ts-node-esm testeranto.mts", - "test2": "node --loader ts-node/esm testeranto.mts", - "test3": "yarn tsx testeranto.mts", - "clean": "rm -f docs/features.test.js rm -f docs/electron.log; rm -f docs/report.html; rm -f docs/report.js; rm -f docs/report.css; rm -rf docs/web && rm -rf docs/node", - "build": "ts-node-esm testeranto.mts", - "electron": "electron node_modules/testeranto/dist/common/electron.js" + "testeranto-clean": "rm -rf docs && mkdir docs", + "testeranto-esbuild": "ts-node-esm testeranto.mts", + "testeranto-esbuild-dev": "ts-node-esm testeranto.mts -dev", + "testeranto-electron": "electron node_modules/testeranto/dist/common/electron.js", + "testeranto-electron-dev": "electron node_modules/testeranto/dist/common/electron.js -dev", + "testeranto-dev": "yarn testeranto-clean ; yarn testeranto-esbuild-dev & yarn testeranto-electron-dev", + "testeranto": "yarn testeranto-clean ; yarn testeranto-esbuild && yarn testeranto-electron" }, "types": "index.d.ts", "dependencies": { diff --git a/src/LoginPage/index.tsx b/src/LoginPage/index.tsx index 65214852..768abc80 100644 --- a/src/LoginPage/index.tsx +++ b/src/LoginPage/index.tsx @@ -20,7 +20,7 @@ export type ILoginPageSelection = { disableSubmit: boolean; }; -export const emailwarning = "Something isn’t right. Please double check your email"; +export const emailwarning = "Something isn’t right. Please double check your email."; export function LoginPage(): React.JSX.Element { const selection = useSelector(selector); diff --git a/src/app.test.ts b/src/app.test.ts index 385b6761..2908c718 100644 --- a/src/app.test.ts +++ b/src/app.test.ts @@ -113,7 +113,7 @@ export const AppSpecification: ITestSpecification = ( test4: Given.AnEmptyState( [`aloha`, `hello`], [When.TheEmailIsSetTo("hey there")], - [Then.TheEmailIs("hey there!")] + [Then.TheEmailIs("hey there")] ), }, [ diff --git a/src/app.ts b/src/app.ts index 04231a46..901a9e93 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,5 +1,5 @@ import { createSelector, createSlice, createStore } from "@reduxjs/toolkit"; -// import pkg from '@reduxjs/toolkit'; +// import pkg from "@reduxjs/toolkit"; // const { createSelector, createSlice, createStore } = pkg; console.log("hello world"); diff --git a/tsconfig.json b/tsconfig.json index 518c22ff..1ff680ba 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "project.test.ts" ], "ts-node": { - "esm": true + "esm": true, + "experimentalSpecifierResolution": "node", }, "compilerOptions": { "paths": {