Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/3d/e594bffb667fa05b379328f1c1d46fe36e43443283f39ca382a06b17726d9a040aca7c
T
2025-11-07 20:14:32 +00:00

1 line
30 KiB
Plaintext

{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":166},"end":{"line":5,"column":40,"index":191}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.HealthCheckError = void 0;\n exports.healthChecker = healthChecker;\n const util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n /*\n * Creates a new health checker.\n *\n * The role of the health checker is to report to the user the health of a smoldot chain.\n *\n * In order to use it, start by creating a health checker, and call `setSendJsonRpc` to set the\n * way to send a JSON-RPC request to a chain. The health checker is disabled by default. Use\n * `start()` in order to start the health checks. The `start()` function must be passed a callback called\n * when an update to the health of the node is available.\n *\n * In order to send a JSON-RPC request to the chain, you **must** use the `sendJsonRpc` function\n * of the health checker. The health checker rewrites the `id` of the requests it receives.\n *\n * When the chain send a JSON-RPC response, it must be passed to `responsePassThrough()`. This\n * function intercepts the responses destined to the requests that have been emitted by the health\n * checker and returns `null`. If the response doesn't concern the health checker, the response is\n * simply returned by the function.\n *\n * # How it works\n *\n * The health checker periodically calls the `system_health` JSON-RPC call in order to determine\n * the health of the chain.\n *\n * In addition to this, as long as the health check reports that `isSyncing` is `true`, the\n * health checker also maintains a subscription to new best blocks using `chain_subscribeNewHeads`.\n * Whenever a new block is notified, a health check is performed immediately in order to determine\n * whether `isSyncing` has changed to `false`.\n *\n * Thanks to this subscription, the latency of the report of the switch from `isSyncing: true` to\n * `isSyncing: false` is very low.\n *\n */\n function healthChecker() {\n // `null` if health checker is not started.\n let checker = null;\n let sendJsonRpc = null;\n return {\n responsePassThrough: jsonRpcResponse => {\n if (checker === null) {\n return jsonRpcResponse;\n }\n return checker.responsePassThrough(jsonRpcResponse);\n },\n sendJsonRpc: request => {\n if (!sendJsonRpc) {\n throw new Error('setSendJsonRpc must be called before sending requests');\n }\n if (checker === null) {\n sendJsonRpc(request);\n } else {\n checker.sendJsonRpc(request);\n }\n },\n setSendJsonRpc: cb => {\n sendJsonRpc = cb;\n },\n start: healthCallback => {\n if (checker !== null) {\n throw new Error(\"Can't start the health checker multiple times in parallel\");\n } else if (!sendJsonRpc) {\n throw new Error('setSendJsonRpc must be called before starting the health checks');\n }\n checker = new InnerChecker(healthCallback, sendJsonRpc);\n checker.update(true);\n },\n stop: () => {\n if (checker === null) {\n return;\n } // Already stopped.\n checker.destroy();\n checker = null;\n }\n };\n }\n class InnerChecker {\n #healthCallback;\n #currentHealthCheckId = null;\n #currentHealthTimeout = null;\n #currentSubunsubRequestId = null;\n #currentSubscriptionId = null;\n #requestToSmoldot;\n #isSyncing = false;\n #nextRequestId = 0;\n constructor(healthCallback, requestToSmoldot) {\n this.#healthCallback = healthCallback;\n this.#requestToSmoldot = request => requestToSmoldot((0, util_1.stringify)(request));\n }\n sendJsonRpc = request => {\n // Replace the `id` in the request to prefix the request ID with `extern:`.\n let parsedRequest;\n try {\n parsedRequest = JSON.parse(request);\n } catch {\n return;\n }\n if (parsedRequest.id) {\n const newId = 'extern:' + (0, util_1.stringify)(parsedRequest.id);\n parsedRequest.id = newId;\n }\n this.#requestToSmoldot(parsedRequest);\n };\n responsePassThrough = jsonRpcResponse => {\n let parsedResponse;\n try {\n parsedResponse = JSON.parse(jsonRpcResponse);\n } catch {\n return jsonRpcResponse;\n }\n // Check whether response is a response to `system_health`.\n if (parsedResponse.id && this.#currentHealthCheckId === parsedResponse.id) {\n this.#currentHealthCheckId = null;\n // Check whether query was successful. It is possible for queries to fail for\n // various reasons, such as the client being overloaded.\n if (!parsedResponse.result) {\n this.update(false);\n return null;\n }\n this.#healthCallback(parsedResponse.result);\n this.#isSyncing = parsedResponse.result.isSyncing;\n this.update(false);\n return null;\n }\n // Check whether response is a response to the subscription or unsubscription.\n if (parsedResponse.id && this.#currentSubunsubRequestId === parsedResponse.id) {\n this.#currentSubunsubRequestId = null;\n // Check whether query was successful. It is possible for queries to fail for\n // various reasons, such as the client being overloaded.\n if (!parsedResponse.result) {\n this.update(false);\n return null;\n }\n if (this.#currentSubscriptionId) {\n this.#currentSubscriptionId = null;\n } else {\n this.#currentSubscriptionId = parsedResponse.result;\n }\n this.update(false);\n return null;\n }\n // Check whether response is a notification to a subscription.\n if (parsedResponse.params && this.#currentSubscriptionId && parsedResponse.params.subscription === this.#currentSubscriptionId) {\n // Note that after a successful subscription, a notification containing\n // the current best block is always returned. Considering that a\n // subscription is performed in response to a health check, calling\n // `startHealthCheck()` here will lead to a second health check.\n // It might seem redundant to perform two health checks in a quick\n // succession, but doing so doesn't lead to any problem, and it is\n // actually possible for the health to have changed in between as the\n // current best block might have been updated during the subscription\n // request.\n this.update(true);\n return null;\n }\n // Response doesn't concern us.\n if (parsedResponse.id) {\n const id = parsedResponse.id;\n // Need to remove the `extern:` prefix.\n if (!id.startsWith('extern:')) {\n throw new Error('State inconsistency in health checker');\n }\n const newId = JSON.parse(id.slice('extern:'.length));\n parsedResponse.id = newId;\n }\n return (0, util_1.stringify)(parsedResponse);\n };\n update = startNow => {\n // If `startNow`, clear `#currentHealthTimeout` so that it is set below.\n if (startNow && this.#currentHealthTimeout) {\n clearTimeout(this.#currentHealthTimeout);\n this.#currentHealthTimeout = null;\n }\n if (!this.#currentHealthTimeout) {\n const startHealthRequest = () => {\n this.#currentHealthTimeout = null;\n // No matter what, don't start a health request if there is already one in progress.\n // This is sane to do because receiving a response to a health request calls `update()`.\n if (this.#currentHealthCheckId) {\n return;\n }\n // Actual request starting.\n this.#currentHealthCheckId = `health-checker:${this.#nextRequestId}`;\n this.#nextRequestId += 1;\n this.#requestToSmoldot({\n id: this.#currentHealthCheckId,\n jsonrpc: '2.0',\n method: 'system_health',\n params: []\n });\n };\n if (startNow) {\n startHealthRequest();\n } else {\n this.#currentHealthTimeout = setTimeout(startHealthRequest, 1000);\n }\n }\n if (this.#isSyncing && !this.#currentSubscriptionId && !this.#currentSubunsubRequestId) {\n this.startSubscription();\n }\n if (!this.#isSyncing && this.#currentSubscriptionId && !this.#currentSubunsubRequestId) {\n this.endSubscription();\n }\n };\n startSubscription = () => {\n if (this.#currentSubunsubRequestId || this.#currentSubscriptionId) {\n throw new Error('Internal error in health checker');\n }\n this.#currentSubunsubRequestId = `health-checker:${this.#nextRequestId}`;\n this.#nextRequestId += 1;\n this.#requestToSmoldot({\n id: this.#currentSubunsubRequestId,\n jsonrpc: '2.0',\n method: 'chain_subscribeNewHeads',\n params: []\n });\n };\n endSubscription = () => {\n if (this.#currentSubunsubRequestId || !this.#currentSubscriptionId) {\n throw new Error('Internal error in health checker');\n }\n this.#currentSubunsubRequestId = `health-checker:${this.#nextRequestId}`;\n this.#nextRequestId += 1;\n this.#requestToSmoldot({\n id: this.#currentSubunsubRequestId,\n jsonrpc: '2.0',\n method: 'chain_unsubscribeNewHeads',\n params: [this.#currentSubscriptionId]\n });\n };\n destroy = () => {\n if (this.#currentHealthTimeout) {\n clearTimeout(this.#currentHealthTimeout);\n this.#currentHealthTimeout = null;\n }\n };\n }\n class HealthCheckError extends Error {\n #cause;\n getCause() {\n return this.#cause;\n }\n constructor(response, message = 'Got error response asking for system health') {\n super(message);\n this.#cause = response;\n }\n }\n exports.HealthCheckError = HealthCheckError;\n});","lineCount":256,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"HealthCheckError"],[7,26,3,24],[7,29,3,27],[7,34,3,32],[7,35,3,33],[8,2,4,0,"exports"],[8,9,4,7],[8,10,4,8,"healthChecker"],[8,23,4,21],[8,26,4,24,"healthChecker"],[8,39,4,37],[9,2,5,0],[9,8,5,6,"util_1"],[9,14,5,12],[9,17,5,15,"require"],[9,24,5,22],[9,25,5,22,"_dependencyMap"],[9,39,5,22],[9,60,5,39],[9,61,5,40],[10,2,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,0,15,0],[20,0,16,0],[21,0,17,0],[22,0,18,0],[23,0,19,0],[24,0,20,0],[25,0,21,0],[26,0,22,0],[27,0,23,0],[28,0,24,0],[29,0,25,0],[30,0,26,0],[31,0,27,0],[32,0,28,0],[33,0,29,0],[34,0,30,0],[35,0,31,0],[36,0,32,0],[37,0,33,0],[38,0,34,0],[39,0,35,0],[40,0,36,0],[41,0,37,0],[42,2,38,0],[42,11,38,9,"healthChecker"],[42,24,38,22,"healthChecker"],[42,25,38,22],[42,27,38,25],[43,4,39,4],[44,4,40,4],[44,8,40,8,"checker"],[44,15,40,15],[44,18,40,18],[44,22,40,22],[45,4,41,4],[45,8,41,8,"sendJsonRpc"],[45,19,41,19],[45,22,41,22],[45,26,41,26],[46,4,42,4],[46,11,42,11],[47,6,43,8,"responsePassThrough"],[47,25,43,27],[47,27,43,30,"jsonRpcResponse"],[47,42,43,45],[47,46,43,50],[48,8,44,12],[48,12,44,16,"checker"],[48,19,44,23],[48,24,44,28],[48,28,44,32],[48,30,44,34],[49,10,45,16],[49,17,45,23,"jsonRpcResponse"],[49,32,45,38],[50,8,46,12],[51,8,47,12],[51,15,47,19,"checker"],[51,22,47,26],[51,23,47,27,"responsePassThrough"],[51,42,47,46],[51,43,47,47,"jsonRpcResponse"],[51,58,47,62],[51,59,47,63],[52,6,48,8],[52,7,48,9],[53,6,49,8,"sendJsonRpc"],[53,17,49,19],[53,19,49,22,"request"],[53,26,49,29],[53,30,49,34],[54,8,50,12],[54,12,50,16],[54,13,50,17,"sendJsonRpc"],[54,24,50,28],[54,26,50,30],[55,10,51,16],[55,16,51,22],[55,20,51,26,"Error"],[55,25,51,31],[55,26,51,32],[55,81,51,87],[55,82,51,88],[56,8,52,12],[57,8,53,12],[57,12,53,16,"checker"],[57,19,53,23],[57,24,53,28],[57,28,53,32],[57,30,53,34],[58,10,54,16,"sendJsonRpc"],[58,21,54,27],[58,22,54,28,"request"],[58,29,54,35],[58,30,54,36],[59,8,55,12],[59,9,55,13],[59,15,56,17],[60,10,57,16,"checker"],[60,17,57,23],[60,18,57,24,"sendJsonRpc"],[60,29,57,35],[60,30,57,36,"request"],[60,37,57,43],[60,38,57,44],[61,8,58,12],[62,6,59,8],[62,7,59,9],[63,6,60,8,"setSendJsonRpc"],[63,20,60,22],[63,22,60,25,"cb"],[63,24,60,27],[63,28,60,32],[64,8,61,12,"sendJsonRpc"],[64,19,61,23],[64,22,61,26,"cb"],[64,24,61,28],[65,6,62,8],[65,7,62,9],[66,6,63,8,"start"],[66,11,63,13],[66,13,63,16,"healthCallback"],[66,27,63,30],[66,31,63,35],[67,8,64,12],[67,12,64,16,"checker"],[67,19,64,23],[67,24,64,28],[67,28,64,32],[67,30,64,34],[68,10,65,16],[68,16,65,22],[68,20,65,26,"Error"],[68,25,65,31],[68,26,65,32],[68,85,65,91],[68,86,65,92],[69,8,66,12],[69,9,66,13],[69,15,67,17],[69,19,67,21],[69,20,67,22,"sendJsonRpc"],[69,31,67,33],[69,33,67,35],[70,10,68,16],[70,16,68,22],[70,20,68,26,"Error"],[70,25,68,31],[70,26,68,32],[70,91,68,97],[70,92,68,98],[71,8,69,12],[72,8,70,12,"checker"],[72,15,70,19],[72,18,70,22],[72,22,70,26,"InnerChecker"],[72,34,70,38],[72,35,70,39,"healthCallback"],[72,49,70,53],[72,51,70,55,"sendJsonRpc"],[72,62,70,66],[72,63,70,67],[73,8,71,12,"checker"],[73,15,71,19],[73,16,71,20,"update"],[73,22,71,26],[73,23,71,27],[73,27,71,31],[73,28,71,32],[74,6,72,8],[74,7,72,9],[75,6,73,8,"stop"],[75,10,73,12],[75,12,73,14,"stop"],[75,13,73,14],[75,18,73,20],[76,8,74,12],[76,12,74,16,"checker"],[76,19,74,23],[76,24,74,28],[76,28,74,32],[76,30,74,34],[77,10,75,16],[78,8,76,12],[78,9,76,13],[78,10,76,14],[79,8,77,12,"checker"],[79,15,77,19],[79,16,77,20,"destroy"],[79,23,77,27],[79,24,77,28],[79,25,77,29],[80,8,78,12,"checker"],[80,15,78,19],[80,18,78,22],[80,22,78,26],[81,6,79,8],[82,4,80,4],[82,5,80,5],[83,2,81,0],[84,2,82,0],[84,8,82,6,"InnerChecker"],[84,20,82,18],[84,21,82,19],[85,4,83,4],[85,5,83,5,"healthCallback"],[85,19,83,19],[86,4,84,4],[86,5,84,5,"currentHealthCheckId"],[86,25,84,25],[86,28,84,28],[86,32,84,32],[87,4,85,4],[87,5,85,5,"currentHealthTimeout"],[87,25,85,25],[87,28,85,28],[87,32,85,32],[88,4,86,4],[88,5,86,5,"currentSubunsubRequestId"],[88,29,86,29],[88,32,86,32],[88,36,86,36],[89,4,87,4],[89,5,87,5,"currentSubscriptionId"],[89,26,87,26],[89,29,87,29],[89,33,87,33],[90,4,88,4],[90,5,88,5,"requestToSmoldot"],[90,21,88,21],[91,4,89,4],[91,5,89,5,"isSyncing"],[91,14,89,14],[91,17,89,17],[91,22,89,22],[92,4,90,4],[92,5,90,5,"nextRequestId"],[92,18,90,18],[92,21,90,21],[92,22,90,22],[93,4,91,4,"constructor"],[93,15,91,15,"constructor"],[93,16,91,16,"healthCallback"],[93,30,91,30],[93,32,91,32,"requestToSmoldot"],[93,48,91,48],[93,50,91,50],[94,6,92,8],[94,10,92,12],[94,11,92,13],[94,12,92,14,"healthCallback"],[94,26,92,28],[94,29,92,31,"healthCallback"],[94,43,92,45],[95,6,93,8],[95,10,93,12],[95,11,93,13],[95,12,93,14,"requestToSmoldot"],[95,28,93,30],[95,31,93,34,"request"],[95,38,93,41],[95,42,93,46,"requestToSmoldot"],[95,58,93,62],[95,59,93,63],[95,60,93,64],[95,61,93,65],[95,63,93,67,"util_1"],[95,69,93,73],[95,70,93,74,"stringify"],[95,79,93,83],[95,81,93,85,"request"],[95,88,93,92],[95,89,93,93],[95,90,93,94],[96,4,94,4],[97,4,95,4,"sendJsonRpc"],[97,15,95,15],[97,18,95,19,"request"],[97,25,95,26],[97,29,95,31],[98,6,96,8],[99,6,97,8],[99,10,97,12,"parsedRequest"],[99,23,97,25],[100,6,98,8],[100,10,98,12],[101,8,99,12,"parsedRequest"],[101,21,99,25],[101,24,99,28,"JSON"],[101,28,99,32],[101,29,99,33,"parse"],[101,34,99,38],[101,35,99,39,"request"],[101,42,99,46],[101,43,99,47],[102,6,100,8],[102,7,100,9],[102,8,101,8],[102,14,101,14],[103,8,102,12],[104,6,103,8],[105,6,104,8],[105,10,104,12,"parsedRequest"],[105,23,104,25],[105,24,104,26,"id"],[105,26,104,28],[105,28,104,30],[106,8,105,12],[106,14,105,18,"newId"],[106,19,105,23],[106,22,105,26],[106,31,105,35],[106,34,105,38],[106,35,105,39],[106,36,105,40],[106,38,105,42,"util_1"],[106,44,105,48],[106,45,105,49,"stringify"],[106,54,105,58],[106,56,105,60,"parsedRequest"],[106,69,105,73],[106,70,105,74,"id"],[106,72,105,76],[106,73,105,77],[107,8,106,12,"parsedRequest"],[107,21,106,25],[107,22,106,26,"id"],[107,24,106,28],[107,27,106,31,"newId"],[107,32,106,36],[108,6,107,8],[109,6,108,8],[109,10,108,12],[109,11,108,13],[109,12,108,14,"requestToSmoldot"],[109,28,108,30],[109,29,108,31,"parsedRequest"],[109,42,108,44],[109,43,108,45],[110,4,109,4],[110,5,109,5],[111,4,110,4,"responsePassThrough"],[111,23,110,23],[111,26,110,27,"jsonRpcResponse"],[111,41,110,42],[111,45,110,47],[112,6,111,8],[112,10,111,12,"parsedResponse"],[112,24,111,26],[113,6,112,8],[113,10,112,12],[114,8,113,12,"parsedResponse"],[114,22,113,26],[114,25,113,29,"JSON"],[114,29,113,33],[114,30,113,34,"parse"],[114,35,113,39],[114,36,113,40,"jsonRpcResponse"],[114,51,113,55],[114,52,113,56],[115,6,114,8],[115,7,114,9],[115,8,115,8],[115,14,115,14],[116,8,116,12],[116,15,116,19,"jsonRpcResponse"],[116,30,116,34],[117,6,117,8],[118,6,118,8],[119,6,119,8],[119,10,119,12,"parsedResponse"],[119,24,119,26],[119,25,119,27,"id"],[119,27,119,29],[119,31,119,33],[119,35,119,37],[119,36,119,38],[119,37,119,39,"currentHealthCheckId"],[119,57,119,59],[119,62,119,64,"parsedResponse"],[119,76,119,78],[119,77,119,79,"id"],[119,79,119,81],[119,81,119,83],[120,8,120,12],[120,12,120,16],[120,13,120,17],[120,14,120,18,"currentHealthCheckId"],[120,34,120,38],[120,37,120,41],[120,41,120,45],[121,8,121,12],[122,8,122,12],[123,8,123,12],[123,12,123,16],[123,13,123,17,"parsedResponse"],[123,27,123,31],[123,28,123,32,"result"],[123,34,123,38],[123,36,123,40],[124,10,124,16],[124,14,124,20],[124,15,124,21,"update"],[124,21,124,27],[124,22,124,28],[124,27,124,33],[124,28,124,34],[125,10,125,16],[125,17,125,23],[125,21,125,27],[126,8,126,12],[127,8,127,12],[127,12,127,16],[127,13,127,17],[127,14,127,18,"healthCallback"],[127,28,127,32],[127,29,127,33,"parsedResponse"],[127,43,127,47],[127,44,127,48,"result"],[127,50,127,54],[127,51,127,55],[128,8,128,12],[128,12,128,16],[128,13,128,17],[128,14,128,18,"isSyncing"],[128,23,128,27],[128,26,128,30,"parsedResponse"],[128,40,128,44],[128,41,128,45,"result"],[128,47,128,51],[128,48,128,52,"isSyncing"],[128,57,128,61],[129,8,129,12],[129,12,129,16],[129,13,129,17,"update"],[129,19,129,23],[129,20,129,24],[129,25,129,29],[129,26,129,30],[130,8,130,12],[130,15,130,19],[130,19,130,23],[131,6,131,8],[132,6,132,8],[133,6,133,8],[133,10,133,12,"parsedResponse"],[133,24,133,26],[133,25,133,27,"id"],[133,27,133,29],[133,31,134,12],[133,35,134,16],[133,36,134,17],[133,37,134,18,"currentSubunsubRequestId"],[133,61,134,42],[133,66,134,47,"parsedResponse"],[133,80,134,61],[133,81,134,62,"id"],[133,83,134,64],[133,85,134,66],[134,8,135,12],[134,12,135,16],[134,13,135,17],[134,14,135,18,"currentSubunsubRequestId"],[134,38,135,42],[134,41,135,45],[134,45,135,49],[135,8,136,12],[136,8,137,12],[137,8,138,12],[137,12,138,16],[137,13,138,17,"parsedResponse"],[137,27,138,31],[137,28,138,32,"result"],[137,34,138,38],[137,36,138,40],[138,10,139,16],[138,14,139,20],[138,15,139,21,"update"],[138,21,139,27],[138,22,139,28],[138,27,139,33],[138,28,139,34],[139,10,140,16],[139,17,140,23],[139,21,140,27],[140,8,141,12],[141,8,142,12],[141,12,142,16],[141,16,142,20],[141,17,142,21],[141,18,142,22,"currentSubscriptionId"],[141,39,142,43],[141,41,142,45],[142,10,143,16],[142,14,143,20],[142,15,143,21],[142,16,143,22,"currentSubscriptionId"],[142,37,143,43],[142,40,143,46],[142,44,143,50],[143,8,144,12],[143,9,144,13],[143,15,145,17],[144,10,146,16],[144,14,146,20],[144,15,146,21],[144,16,146,22,"currentSubscriptionId"],[144,37,146,43],[144,40,146,46,"parsedResponse"],[144,54,146,60],[144,55,146,61,"result"],[144,61,146,67],[145,8,147,12],[146,8,148,12],[146,12,148,16],[146,13,148,17,"update"],[146,19,148,23],[146,20,148,24],[146,25,148,29],[146,26,148,30],[147,8,149,12],[147,15,149,19],[147,19,149,23],[148,6,150,8],[149,6,151,8],[150,6,152,8],[150,10,152,12,"parsedResponse"],[150,24,152,26],[150,25,152,27,"params"],[150,31,152,33],[150,35,153,12],[150,39,153,16],[150,40,153,17],[150,41,153,18,"currentSubscriptionId"],[150,62,153,39],[150,66,154,12,"parsedResponse"],[150,80,154,26],[150,81,154,27,"params"],[150,87,154,33],[150,88,154,34,"subscription"],[150,100,154,46],[150,105,154,51],[150,109,154,55],[150,110,154,56],[150,111,154,57,"currentSubscriptionId"],[150,132,154,78],[150,134,154,80],[151,8,155,12],[152,8,156,12],[153,8,157,12],[154,8,158,12],[155,8,159,12],[156,8,160,12],[157,8,161,12],[158,8,162,12],[159,8,163,12],[160,8,164,12],[160,12,164,16],[160,13,164,17,"update"],[160,19,164,23],[160,20,164,24],[160,24,164,28],[160,25,164,29],[161,8,165,12],[161,15,165,19],[161,19,165,23],[162,6,166,8],[163,6,167,8],[164,6,168,8],[164,10,168,12,"parsedResponse"],[164,24,168,26],[164,25,168,27,"id"],[164,27,168,29],[164,29,168,31],[165,8,169,12],[165,14,169,18,"id"],[165,16,169,20],[165,19,169,23,"parsedResponse"],[165,33,169,37],[165,34,169,38,"id"],[165,36,169,40],[166,8,170,12],[167,8,171,12],[167,12,171,16],[167,13,171,17,"id"],[167,15,171,19],[167,16,171,20,"startsWith"],[167,26,171,30],[167,27,171,31],[167,36,171,40],[167,37,171,41],[167,39,171,43],[168,10,172,16],[168,16,172,22],[168,20,172,26,"Error"],[168,25,172,31],[168,26,172,32],[168,65,172,71],[168,66,172,72],[169,8,173,12],[170,8,174,12],[170,14,174,18,"newId"],[170,19,174,23],[170,22,174,26,"JSON"],[170,26,174,30],[170,27,174,31,"parse"],[170,32,174,36],[170,33,174,37,"id"],[170,35,174,39],[170,36,174,40,"slice"],[170,41,174,45],[170,42,174,46],[170,51,174,55],[170,52,174,56,"length"],[170,58,174,62],[170,59,174,63],[170,60,174,64],[171,8,175,12,"parsedResponse"],[171,22,175,26],[171,23,175,27,"id"],[171,25,175,29],[171,28,175,32,"newId"],[171,33,175,37],[172,6,176,8],[173,6,177,8],[173,13,177,15],[173,14,177,16],[173,15,177,17],[173,17,177,19,"util_1"],[173,23,177,25],[173,24,177,26,"stringify"],[173,33,177,35],[173,35,177,37,"parsedResponse"],[173,49,177,51],[173,50,177,52],[174,4,178,4],[174,5,178,5],[175,4,179,4,"update"],[175,10,179,10],[175,13,179,14,"startNow"],[175,21,179,22],[175,25,179,27],[176,6,180,8],[177,6,181,8],[177,10,181,12,"startNow"],[177,18,181,20],[177,22,181,24],[177,26,181,28],[177,27,181,29],[177,28,181,30,"currentHealthTimeout"],[177,48,181,50],[177,50,181,52],[178,8,182,12,"clearTimeout"],[178,20,182,24],[178,21,182,25],[178,25,182,29],[178,26,182,30],[178,27,182,31,"currentHealthTimeout"],[178,47,182,51],[178,48,182,52],[179,8,183,12],[179,12,183,16],[179,13,183,17],[179,14,183,18,"currentHealthTimeout"],[179,34,183,38],[179,37,183,41],[179,41,183,45],[180,6,184,8],[181,6,185,8],[181,10,185,12],[181,11,185,13],[181,15,185,17],[181,16,185,18],[181,17,185,19,"currentHealthTimeout"],[181,37,185,39],[181,39,185,41],[182,8,186,12],[182,14,186,18,"startHealthRequest"],[182,32,186,36],[182,35,186,39,"startHealthRequest"],[182,36,186,39],[182,41,186,45],[183,10,187,16],[183,14,187,20],[183,15,187,21],[183,16,187,22,"currentHealthTimeout"],[183,36,187,42],[183,39,187,45],[183,43,187,49],[184,10,188,16],[185,10,189,16],[186,10,190,16],[186,14,190,20],[186,18,190,24],[186,19,190,25],[186,20,190,26,"currentHealthCheckId"],[186,40,190,46],[186,42,190,48],[187,12,191,20],[188,10,192,16],[189,10,193,16],[190,10,194,16],[190,14,194,20],[190,15,194,21],[190,16,194,22,"currentHealthCheckId"],[190,36,194,42],[190,39,194,45],[190,57,194,63],[190,61,194,67],[190,62,194,68],[190,63,194,69,"nextRequestId"],[190,76,194,82],[190,78,194,84],[191,10,195,16],[191,14,195,20],[191,15,195,21],[191,16,195,22,"nextRequestId"],[191,29,195,35],[191,33,195,39],[191,34,195,40],[192,10,196,16],[192,14,196,20],[192,15,196,21],[192,16,196,22,"requestToSmoldot"],[192,32,196,38],[192,33,196,39],[193,12,197,20,"id"],[193,14,197,22],[193,16,197,24],[193,20,197,28],[193,21,197,29],[193,22,197,30,"currentHealthCheckId"],[193,42,197,50],[194,12,198,20,"jsonrpc"],[194,19,198,27],[194,21,198,29],[194,26,198,34],[195,12,199,20,"method"],[195,18,199,26],[195,20,199,28],[195,35,199,43],[196,12,200,20,"params"],[196,18,200,26],[196,20,200,28],[197,10,201,16],[197,11,201,17],[197,12,201,18],[198,8,202,12],[198,9,202,13],[199,8,203,12],[199,12,203,16,"startNow"],[199,20,203,24],[199,22,203,26],[200,10,204,16,"startHealthRequest"],[200,28,204,34],[200,29,204,35],[200,30,204,36],[201,8,205,12],[201,9,205,13],[201,15,206,17],[202,10,207,16],[202,14,207,20],[202,15,207,21],[202,16,207,22,"currentHealthTimeout"],[202,36,207,42],[202,39,207,45,"setTimeout"],[202,49,207,55],[202,50,207,56,"startHealthRequest"],[202,68,207,74],[202,70,207,76],[202,74,207,80],[202,75,207,81],[203,8,208,12],[204,6,209,8],[205,6,210,8],[205,10,210,12],[205,14,210,16],[205,15,210,17],[205,16,210,18,"isSyncing"],[205,25,210,27],[205,29,211,12],[205,30,211,13],[205,34,211,17],[205,35,211,18],[205,36,211,19,"currentSubscriptionId"],[205,57,211,40],[205,61,212,12],[205,62,212,13],[205,66,212,17],[205,67,212,18],[205,68,212,19,"currentSubunsubRequestId"],[205,92,212,43],[205,94,212,45],[206,8,213,12],[206,12,213,16],[206,13,213,17,"startSubscription"],[206,30,213,34],[206,31,213,35],[206,32,213,36],[207,6,214,8],[208,6,215,8],[208,10,215,12],[208,11,215,13],[208,15,215,17],[208,16,215,18],[208,17,215,19,"isSyncing"],[208,26,215,28],[208,30,216,12],[208,34,216,16],[208,35,216,17],[208,36,216,18,"currentSubscriptionId"],[208,57,216,39],[208,61,217,12],[208,62,217,13],[208,66,217,17],[208,67,217,18],[208,68,217,19,"currentSubunsubRequestId"],[208,92,217,43],[208,94,217,45],[209,8,218,12],[209,12,218,16],[209,13,218,17,"endSubscription"],[209,28,218,32],[209,29,218,33],[209,30,218,34],[210,6,219,8],[211,4,220,4],[211,5,220,5],[212,4,221,4,"startSubscription"],[212,21,221,21],[212,24,221,24,"startSubscription"],[212,25,221,24],[212,30,221,30],[213,6,222,8],[213,10,222,12],[213,14,222,16],[213,15,222,17],[213,16,222,18,"currentSubunsubRequestId"],[213,40,222,42],[213,44,222,46],[213,48,222,50],[213,49,222,51],[213,50,222,52,"currentSubscriptionId"],[213,71,222,73],[213,73,222,75],[214,8,223,12],[214,14,223,18],[214,18,223,22,"Error"],[214,23,223,27],[214,24,223,28],[214,58,223,62],[214,59,223,63],[215,6,224,8],[216,6,225,8],[216,10,225,12],[216,11,225,13],[216,12,225,14,"currentSubunsubRequestId"],[216,36,225,38],[216,39,225,41],[216,57,225,59],[216,61,225,63],[216,62,225,64],[216,63,225,65,"nextRequestId"],[216,76,225,78],[216,78,225,80],[217,6,226,8],[217,10,226,12],[217,11,226,13],[217,12,226,14,"nextRequestId"],[217,25,226,27],[217,29,226,31],[217,30,226,32],[218,6,227,8],[218,10,227,12],[218,11,227,13],[218,12,227,14,"requestToSmoldot"],[218,28,227,30],[218,29,227,31],[219,8,228,12,"id"],[219,10,228,14],[219,12,228,16],[219,16,228,20],[219,17,228,21],[219,18,228,22,"currentSubunsubRequestId"],[219,42,228,46],[220,8,229,12,"jsonrpc"],[220,15,229,19],[220,17,229,21],[220,22,229,26],[221,8,230,12,"method"],[221,14,230,18],[221,16,230,20],[221,41,230,45],[222,8,231,12,"params"],[222,14,231,18],[222,16,231,20],[223,6,232,8],[223,7,232,9],[223,8,232,10],[224,4,233,4],[224,5,233,5],[225,4,234,4,"endSubscription"],[225,19,234,19],[225,22,234,22,"endSubscription"],[225,23,234,22],[225,28,234,28],[226,6,235,8],[226,10,235,12],[226,14,235,16],[226,15,235,17],[226,16,235,18,"currentSubunsubRequestId"],[226,40,235,42],[226,44,235,46],[226,45,235,47],[226,49,235,51],[226,50,235,52],[226,51,235,53,"currentSubscriptionId"],[226,72,235,74],[226,74,235,76],[227,8,236,12],[227,14,236,18],[227,18,236,22,"Error"],[227,23,236,27],[227,24,236,28],[227,58,236,62],[227,59,236,63],[228,6,237,8],[229,6,238,8],[229,10,238,12],[229,11,238,13],[229,12,238,14,"currentSubunsubRequestId"],[229,36,238,38],[229,39,238,41],[229,57,238,59],[229,61,238,63],[229,62,238,64],[229,63,238,65,"nextRequestId"],[229,76,238,78],[229,78,238,80],[230,6,239,8],[230,10,239,12],[230,11,239,13],[230,12,239,14,"nextRequestId"],[230,25,239,27],[230,29,239,31],[230,30,239,32],[231,6,240,8],[231,10,240,12],[231,11,240,13],[231,12,240,14,"requestToSmoldot"],[231,28,240,30],[231,29,240,31],[232,8,241,12,"id"],[232,10,241,14],[232,12,241,16],[232,16,241,20],[232,17,241,21],[232,18,241,22,"currentSubunsubRequestId"],[232,42,241,46],[233,8,242,12,"jsonrpc"],[233,15,242,19],[233,17,242,21],[233,22,242,26],[234,8,243,12,"method"],[234,14,243,18],[234,16,243,20],[234,43,243,47],[235,8,244,12,"params"],[235,14,244,18],[235,16,244,20],[235,17,244,21],[235,21,244,25],[235,22,244,26],[235,23,244,27,"currentSubscriptionId"],[235,44,244,48],[236,6,245,8],[236,7,245,9],[236,8,245,10],[237,4,246,4],[237,5,246,5],[238,4,247,4,"destroy"],[238,11,247,11],[238,14,247,14,"destroy"],[238,15,247,14],[238,20,247,20],[239,6,248,8],[239,10,248,12],[239,14,248,16],[239,15,248,17],[239,16,248,18,"currentHealthTimeout"],[239,36,248,38],[239,38,248,40],[240,8,249,12,"clearTimeout"],[240,20,249,24],[240,21,249,25],[240,25,249,29],[240,26,249,30],[240,27,249,31,"currentHealthTimeout"],[240,47,249,51],[240,48,249,52],[241,8,250,12],[241,12,250,16],[241,13,250,17],[241,14,250,18,"currentHealthTimeout"],[241,34,250,38],[241,37,250,41],[241,41,250,45],[242,6,251,8],[243,4,252,4],[243,5,252,5],[244,2,253,0],[245,2,254,0],[245,8,254,6,"HealthCheckError"],[245,24,254,22],[245,33,254,31,"Error"],[245,38,254,36],[245,39,254,37],[246,4,255,4],[246,5,255,5,"cause"],[246,10,255,10],[247,4,256,4,"getCause"],[247,12,256,12,"getCause"],[247,13,256,12],[247,15,256,15],[248,6,257,8],[248,13,257,15],[248,17,257,19],[248,18,257,20],[248,19,257,21,"cause"],[248,24,257,26],[249,4,258,4],[250,4,259,4,"constructor"],[250,15,259,15,"constructor"],[250,16,259,16,"response"],[250,24,259,24],[250,26,259,26,"message"],[250,33,259,33],[250,36,259,36],[250,81,259,81],[250,83,259,83],[251,6,260,8],[251,11,260,13],[251,12,260,14,"message"],[251,19,260,21],[251,20,260,22],[252,6,261,8],[252,10,261,12],[252,11,261,13],[252,12,261,14,"cause"],[252,17,261,19],[252,20,261,22,"response"],[252,28,261,30],[253,4,262,4],[254,2,263,0],[255,2,264,0,"exports"],[255,9,264,7],[255,10,264,8,"HealthCheckError"],[255,26,264,24],[255,29,264,27,"HealthCheckError"],[255,45,264,43],[256,0,264,44],[256,3]],"functionMap":{"names":["<global>","healthChecker","responsePassThrough","sendJsonRpc","setSendJsonRpc","start","stop","InnerChecker","InnerChecker#constructor","<anonymous>","InnerChecker#sendJsonRpc","InnerChecker#responsePassThrough","InnerChecker#update","startHealthRequest","InnerChecker#startSubscription","InnerChecker#endSubscription","InnerChecker#destroy","HealthCheckError","HealthCheckError#getCause","HealthCheckError#constructor"],"mappings":"AAA;ACqC;6BCK;SDK;qBEC;SFU;wBGC;SHE;eIC;SJS;cKC;SLM;CDE;AOC;ICS;iCCE,6DD;KDC;kBGC;KHc;0BIC;KJoE;aKC;uCCO;aDgB;KLkB;wBOC;KPY;sBQC;KRY;cSC;KTK;CPC;AiBC;ICE;KDE;IEC;KFG;CjBC"},"hasCjsExports":true},"type":"js/module"}]}