mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 06:31:03 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":57,"index":57}}],"key":"PnOMrhZAPWoeW3ygrvUJ7ff768Y=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":58},"end":{"line":2,"column":46,"index":104}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":105},"end":{"line":3,"column":40,"index":145}}],"key":"GRJlO1cmIj14nBxcasNpiq30og4=","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.progress = progress;\n Object.defineProperty(exports, \"eraLength\", {\n enumerable: true,\n get: function () {\n return eraLength;\n }\n });\n Object.defineProperty(exports, \"eraProgress\", {\n enumerable: true,\n get: function () {\n return eraProgress;\n }\n });\n Object.defineProperty(exports, \"sessionProgress\", {\n enumerable: true,\n get: function () {\n return sessionProgress;\n }\n });\n var _rxjs = require(_dependencyMap[0], \"rxjs\");\n var _polkadotUtil = require(_dependencyMap[1], \"@polkadot/util\");\n var _utilIndexJs = require(_dependencyMap[2], \"../util/index.js\");\n function withProgressField(field) {\n return (instanceId, api) => (0, _utilIndexJs.memo)(instanceId, () => api.derive.session.progress().pipe((0, _rxjs.map)(info => info[field])));\n }\n function createDerive(api, info, [currentSlot, epochIndex, epochOrGenesisStartSlot, activeEraStartSessionIndex]) {\n const epochStartSlot = epochIndex.mul(info.sessionLength).iadd(epochOrGenesisStartSlot);\n const sessionProgress = currentSlot.sub(epochStartSlot);\n const eraProgress = info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress);\n return (0, _polkadotUtil.objectSpread)({\n eraProgress: api.registry.createType('BlockNumber', eraProgress),\n sessionProgress: api.registry.createType('BlockNumber', sessionProgress)\n }, info);\n }\n function queryAura(api) {\n return api.derive.session.info().pipe((0, _rxjs.map)(info => (0, _polkadotUtil.objectSpread)({\n eraProgress: api.registry.createType('BlockNumber'),\n sessionProgress: api.registry.createType('BlockNumber')\n }, info)));\n }\n function queryBabe(api) {\n return api.derive.session.info().pipe((0, _rxjs.switchMap)(info => (0, _rxjs.combineLatest)([(0, _rxjs.of)(info),\n // we may have no staking, but have babe (permissioned)\n api.query.staking?.erasStartSessionIndex ? api.queryMulti([api.query.babe.currentSlot, api.query.babe.epochIndex, api.query.babe.genesisSlot, [api.query.staking.erasStartSessionIndex, info.activeEra]]) : api.queryMulti([api.query.babe.currentSlot, api.query.babe.epochIndex, api.query.babe.genesisSlot])])), (0, _rxjs.map)(([info, [currentSlot, epochIndex, genesisSlot, optStartIndex]]) => [info, [currentSlot, epochIndex, genesisSlot, optStartIndex && optStartIndex.isSome ? optStartIndex.unwrap() : api.registry.createType('SessionIndex', 1)]]));\n }\n /**\n * @name progress\n * @description Retrieves session information and progress.\n * @example\n * ```javascript\n * api.derive.session.progress((progress) => {\n * console.log(`Session progress ${JSON.stringify(progress)}`);\n * });\n * ```\n */\n function progress(instanceId, api) {\n return (0, _utilIndexJs.memo)(instanceId, () => api.query.babe ? queryBabe(api).pipe((0, _rxjs.map)(([info, slots]) => createDerive(api, info, slots))) : queryAura(api));\n }\n /**\n * @name eraLenght\n * @description Retrieves the total length of the current era.\n * @example\n * ```javascript\n * api.derive.session.eraLength((length) => {\n * console.log(`Current era length: ${length} sessions`);\n * });\n * ```\n */\n const eraLength = /*#__PURE__*/withProgressField('eraLength');\n /**\n * @name eraProgress\n * @description Retrieves the progress of the current era.\n * @example\n * ```javascript\n * api.derive.session.eraProgress((progress) => {\n * console.log(`Current era progress: ${progress} sessions`);\n * });\n * ```\n */\n const eraProgress = /*#__PURE__*/withProgressField('eraProgress');\n /**\n * @name sessionProgress\n * @description Retrieves the progress of the current session.\n * @example\n * ```javascript\n * api.derive.session.sessionProgress((progress) => {\n * console.log(`Current session progress: ${progress} slots`);\n * });\n * ```\n */\n const sessionProgress = /*#__PURE__*/withProgressField('sessionProgress');\n});","lineCount":98,"map":[[7,2,52,0,"exports"],[7,9,52,0],[7,10,52,0,"progress"],[7,18,52,0],[7,21,52,0,"progress"],[7,29,52,0],[8,2,67,0,"Object"],[8,8,67,0],[8,9,67,0,"defineProperty"],[8,23,67,0],[8,24,67,0,"exports"],[8,31,67,0],[9,4,67,0,"enumerable"],[9,14,67,0],[10,4,67,0,"get"],[10,7,67,0],[10,18,67,0,"get"],[10,19,67,0],[11,6,67,0],[11,13,67,0,"eraLength"],[11,22,67,0],[12,4,67,0],[13,2,67,0],[14,2,78,0,"Object"],[14,8,78,0],[14,9,78,0,"defineProperty"],[14,23,78,0],[14,24,78,0,"exports"],[14,31,78,0],[15,4,78,0,"enumerable"],[15,14,78,0],[16,4,78,0,"get"],[16,7,78,0],[16,18,78,0,"get"],[16,19,78,0],[17,6,78,0],[17,13,78,0,"eraProgress"],[17,24,78,0],[18,4,78,0],[19,2,78,0],[20,2,89,0,"Object"],[20,8,89,0],[20,9,89,0,"defineProperty"],[20,23,89,0],[20,24,89,0,"exports"],[20,31,89,0],[21,4,89,0,"enumerable"],[21,14,89,0],[22,4,89,0,"get"],[22,7,89,0],[22,18,89,0,"get"],[22,19,89,0],[23,6,89,0],[23,13,89,0,"sessionProgress"],[23,28,89,0],[24,4,89,0],[25,2,89,0],[26,2,1,0],[26,6,1,0,"_rxjs"],[26,11,1,0],[26,14,1,0,"require"],[26,21,1,0],[26,22,1,0,"_dependencyMap"],[26,36,1,0],[27,2,2,0],[27,6,2,0,"_polkadotUtil"],[27,19,2,0],[27,22,2,0,"require"],[27,29,2,0],[27,30,2,0,"_dependencyMap"],[27,44,2,0],[28,2,3,0],[28,6,3,0,"_utilIndexJs"],[28,18,3,0],[28,21,3,0,"require"],[28,28,3,0],[28,29,3,0,"_dependencyMap"],[28,43,3,0],[29,2,4,0],[29,11,4,9,"withProgressField"],[29,28,4,26,"withProgressField"],[29,29,4,27,"field"],[29,34,4,32],[29,36,4,34],[30,4,5,4],[30,11,5,11],[30,12,5,12,"instanceId"],[30,22,5,22],[30,24,5,24,"api"],[30,27,5,27],[30,32,5,32],[30,36,5,32,"memo"],[30,48,5,36],[30,49,5,36,"memo"],[30,53,5,36],[30,55,5,37,"instanceId"],[30,65,5,47],[30,67,5,49],[30,73,5,55,"api"],[30,76,5,58],[30,77,5,59,"derive"],[30,83,5,65],[30,84,5,66,"session"],[30,91,5,73],[30,92,5,74,"progress"],[30,100,5,82],[30,101,5,83],[30,102,5,84],[30,103,5,85,"pipe"],[30,107,5,89],[30,108,5,90],[30,112,5,90,"map"],[30,117,5,93],[30,118,5,93,"map"],[30,121,5,93],[30,123,5,95,"info"],[30,127,5,99],[30,131,5,104,"info"],[30,135,5,108],[30,136,5,109,"field"],[30,141,5,114],[30,142,5,115],[30,143,5,116],[30,144,5,117],[30,145,5,118],[31,2,6,0],[32,2,7,0],[32,11,7,9,"createDerive"],[32,23,7,21,"createDerive"],[32,24,7,22,"api"],[32,27,7,25],[32,29,7,27,"info"],[32,33,7,31],[32,35,7,33],[32,36,7,34,"currentSlot"],[32,47,7,45],[32,49,7,47,"epochIndex"],[32,59,7,57],[32,61,7,59,"epochOrGenesisStartSlot"],[32,84,7,82],[32,86,7,84,"activeEraStartSessionIndex"],[32,112,7,110],[32,113,7,111],[32,115,7,113],[33,4,8,4],[33,10,8,10,"epochStartSlot"],[33,24,8,24],[33,27,8,27,"epochIndex"],[33,37,8,37],[33,38,8,38,"mul"],[33,41,8,41],[33,42,8,42,"info"],[33,46,8,46],[33,47,8,47,"sessionLength"],[33,60,8,60],[33,61,8,61],[33,62,8,62,"iadd"],[33,66,8,66],[33,67,8,67,"epochOrGenesisStartSlot"],[33,90,8,90],[33,91,8,91],[34,4,9,4],[34,10,9,10,"sessionProgress"],[34,25,9,25],[34,28,9,28,"currentSlot"],[34,39,9,39],[34,40,9,40,"sub"],[34,43,9,43],[34,44,9,44,"epochStartSlot"],[34,58,9,58],[34,59,9,59],[35,4,10,4],[35,10,10,10,"eraProgress"],[35,21,10,21],[35,24,10,24,"info"],[35,28,10,28],[35,29,10,29,"currentIndex"],[35,41,10,41],[35,42,10,42,"sub"],[35,45,10,45],[35,46,10,46,"activeEraStartSessionIndex"],[35,72,10,72],[35,73,10,73],[35,74,10,74,"imul"],[35,78,10,78],[35,79,10,79,"info"],[35,83,10,83],[35,84,10,84,"sessionLength"],[35,97,10,97],[35,98,10,98],[35,99,10,99,"iadd"],[35,103,10,103],[35,104,10,104,"sessionProgress"],[35,119,10,119],[35,120,10,120],[36,4,11,4],[36,11,11,11],[36,15,11,11,"objectSpread"],[36,28,11,23],[36,29,11,23,"objectSpread"],[36,41,11,23],[36,43,11,24],[37,6,12,8,"eraProgress"],[37,17,12,19],[37,19,12,21,"api"],[37,22,12,24],[37,23,12,25,"registry"],[37,31,12,33],[37,32,12,34,"createType"],[37,42,12,44],[37,43,12,45],[37,56,12,58],[37,58,12,60,"eraProgress"],[37,69,12,71],[37,70,12,72],[38,6,13,8,"sessionProgress"],[38,21,13,23],[38,23,13,25,"api"],[38,26,13,28],[38,27,13,29,"registry"],[38,35,13,37],[38,36,13,38,"createType"],[38,46,13,48],[38,47,13,49],[38,60,13,62],[38,62,13,64,"sessionProgress"],[38,77,13,79],[39,4,14,4],[39,5,14,5],[39,7,14,7,"info"],[39,11,14,11],[39,12,14,12],[40,2,15,0],[41,2,16,0],[41,11,16,9,"queryAura"],[41,20,16,18,"queryAura"],[41,21,16,19,"api"],[41,24,16,22],[41,26,16,24],[42,4,17,4],[42,11,17,11,"api"],[42,14,17,14],[42,15,17,15,"derive"],[42,21,17,21],[42,22,17,22,"session"],[42,29,17,29],[42,30,17,30,"info"],[42,34,17,34],[42,35,17,35],[42,36,17,36],[42,37,17,37,"pipe"],[42,41,17,41],[42,42,17,42],[42,46,17,42,"map"],[42,51,17,45],[42,52,17,45,"map"],[42,55,17,45],[42,57,17,47,"info"],[42,61,17,51],[42,65,17,56],[42,69,17,56,"objectSpread"],[42,82,17,68],[42,83,17,68,"objectSpread"],[42,95,17,68],[42,97,17,69],[43,6,18,8,"eraProgress"],[43,17,18,19],[43,19,18,21,"api"],[43,22,18,24],[43,23,18,25,"registry"],[43,31,18,33],[43,32,18,34,"createType"],[43,42,18,44],[43,43,18,45],[43,56,18,58],[43,57,18,59],[44,6,19,8,"sessionProgress"],[44,21,19,23],[44,23,19,25,"api"],[44,26,19,28],[44,27,19,29,"registry"],[44,35,19,37],[44,36,19,38,"createType"],[44,46,19,48],[44,47,19,49],[44,60,19,62],[45,4,20,4],[45,5,20,5],[45,7,20,7,"info"],[45,11,20,11],[45,12,20,12],[45,13,20,13],[45,14,20,14],[46,2,21,0],[47,2,22,0],[47,11,22,9,"queryBabe"],[47,20,22,18,"queryBabe"],[47,21,22,19,"api"],[47,24,22,22],[47,26,22,24],[48,4,23,4],[48,11,23,11,"api"],[48,14,23,14],[48,15,23,15,"derive"],[48,21,23,21],[48,22,23,22,"session"],[48,29,23,29],[48,30,23,30,"info"],[48,34,23,34],[48,35,23,35],[48,36,23,36],[48,37,23,37,"pipe"],[48,41,23,41],[48,42,23,42],[48,46,23,42,"switchMap"],[48,51,23,51],[48,52,23,51,"switchMap"],[48,61,23,51],[48,63,23,53,"info"],[48,67,23,57],[48,71,23,62],[48,75,23,62,"combineLatest"],[48,80,23,75],[48,81,23,75,"combineLatest"],[48,94,23,75],[48,96,23,76],[48,97,24,8],[48,101,24,8,"of"],[48,106,24,10],[48,107,24,10,"of"],[48,109,24,10],[48,111,24,11,"info"],[48,115,24,15],[48,116,24,16],[49,4,25,8],[50,4,26,8,"api"],[50,7,26,11],[50,8,26,12,"query"],[50,13,26,17],[50,14,26,18,"staking"],[50,21,26,25],[50,23,26,27,"erasStartSessionIndex"],[50,44,26,48],[50,47,27,14,"api"],[50,50,27,17],[50,51,27,18,"queryMulti"],[50,61,27,28],[50,62,27,29],[50,63,28,16,"api"],[50,66,28,19],[50,67,28,20,"query"],[50,72,28,25],[50,73,28,26,"babe"],[50,77,28,30],[50,78,28,31,"currentSlot"],[50,89,28,42],[50,91,29,16,"api"],[50,94,29,19],[50,95,29,20,"query"],[50,100,29,25],[50,101,29,26,"babe"],[50,105,29,30],[50,106,29,31,"epochIndex"],[50,116,29,41],[50,118,30,16,"api"],[50,121,30,19],[50,122,30,20,"query"],[50,127,30,25],[50,128,30,26,"babe"],[50,132,30,30],[50,133,30,31,"genesisSlot"],[50,144,30,42],[50,146,31,16],[50,147,31,17,"api"],[50,150,31,20],[50,151,31,21,"query"],[50,156,31,26],[50,157,31,27,"staking"],[50,164,31,34],[50,165,31,35,"erasStartSessionIndex"],[50,186,31,56],[50,188,31,58,"info"],[50,192,31,62],[50,193,31,63,"activeEra"],[50,202,31,72],[50,203,31,73],[50,204,32,13],[50,205,32,14],[50,208,33,14,"api"],[50,211,33,17],[50,212,33,18,"queryMulti"],[50,222,33,28],[50,223,33,29],[50,224,34,16,"api"],[50,227,34,19],[50,228,34,20,"query"],[50,233,34,25],[50,234,34,26,"babe"],[50,238,34,30],[50,239,34,31,"currentSlot"],[50,250,34,42],[50,252,35,16,"api"],[50,255,35,19],[50,256,35,20,"query"],[50,261,35,25],[50,262,35,26,"babe"],[50,266,35,30],[50,267,35,31,"epochIndex"],[50,277,35,41],[50,279,36,16,"api"],[50,282,36,19],[50,283,36,20,"query"],[50,288,36,25],[50,289,36,26,"babe"],[50,293,36,30],[50,294,36,31,"genesisSlot"],[50,305,36,42],[50,306,37,13],[50,307,37,14],[50,308,38,5],[50,309,38,6],[50,310,38,7],[50,312,38,9],[50,316,38,9,"map"],[50,321,38,12],[50,322,38,12,"map"],[50,325,38,12],[50,327,38,13],[50,328,38,14],[50,329,38,15,"info"],[50,333,38,19],[50,335,38,21],[50,336,38,22,"currentSlot"],[50,347,38,33],[50,349,38,35,"epochIndex"],[50,359,38,45],[50,361,38,47,"genesisSlot"],[50,372,38,58],[50,374,38,60,"optStartIndex"],[50,387,38,73],[50,388,38,74],[50,389,38,75],[50,394,38,80],[50,395,39,8,"info"],[50,399,39,12],[50,401,39,14],[50,402,39,15,"currentSlot"],[50,413,39,26],[50,415,39,28,"epochIndex"],[50,425,39,38],[50,427,39,40,"genesisSlot"],[50,438,39,51],[50,440,39,53,"optStartIndex"],[50,453,39,66],[50,457,39,70,"optStartIndex"],[50,470,39,83],[50,471,39,84,"isSome"],[50,477,39,90],[50,480,39,93,"optStartIndex"],[50,493,39,106],[50,494,39,107,"unwrap"],[50,500,39,113],[50,501,39,114],[50,502,39,115],[50,505,39,118,"api"],[50,508,39,121],[50,509,39,122,"registry"],[50,517,39,130],[50,518,39,131,"createType"],[50,528,39,141],[50,529,39,142],[50,543,39,156],[50,545,39,158],[50,546,39,159],[50,547,39,160],[50,548,39,161],[50,549,40,5],[50,550,40,6],[50,551,40,7],[51,2,41,0],[52,2,42,0],[53,0,43,0],[54,0,44,0],[55,0,45,0],[56,0,46,0],[57,0,47,0],[58,0,48,0],[59,0,49,0],[60,0,50,0],[61,0,51,0],[62,2,52,7],[62,11,52,16,"progress"],[62,19,52,24,"progress"],[62,20,52,25,"instanceId"],[62,30,52,35],[62,32,52,37,"api"],[62,35,52,40],[62,37,52,42],[63,4,53,4],[63,11,53,11],[63,15,53,11,"memo"],[63,27,53,15],[63,28,53,15,"memo"],[63,32,53,15],[63,34,53,16,"instanceId"],[63,44,53,26],[63,46,53,28],[63,52,53,34,"api"],[63,55,53,37],[63,56,53,38,"query"],[63,61,53,43],[63,62,53,44,"babe"],[63,66,53,48],[63,69,54,10,"queryBabe"],[63,78,54,19],[63,79,54,20,"api"],[63,82,54,23],[63,83,54,24],[63,84,54,25,"pipe"],[63,88,54,29],[63,89,54,30],[63,93,54,30,"map"],[63,98,54,33],[63,99,54,33,"map"],[63,102,54,33],[63,104,54,34],[63,105,54,35],[63,106,54,36,"info"],[63,110,54,40],[63,112,54,42,"slots"],[63,117,54,47],[63,118,54,48],[63,123,54,53,"createDerive"],[63,135,54,65],[63,136,54,66,"api"],[63,139,54,69],[63,141,54,71,"info"],[63,145,54,75],[63,147,54,77,"slots"],[63,152,54,82],[63,153,54,83],[63,154,54,84],[63,155,54,85],[63,158,55,10,"queryAura"],[63,167,55,19],[63,168,55,20,"api"],[63,171,55,23],[63,172,55,24],[63,173,55,25],[64,2,56,0],[65,2,57,0],[66,0,58,0],[67,0,59,0],[68,0,60,0],[69,0,61,0],[70,0,62,0],[71,0,63,0],[72,0,64,0],[73,0,65,0],[74,0,66,0],[75,2,67,7],[75,8,67,13,"eraLength"],[75,17,67,22],[75,20,67,25],[75,33,67,39,"withProgressField"],[75,50,67,56],[75,51,67,57],[75,62,67,68],[75,63,67,69],[76,2,68,0],[77,0,69,0],[78,0,70,0],[79,0,71,0],[80,0,72,0],[81,0,73,0],[82,0,74,0],[83,0,75,0],[84,0,76,0],[85,0,77,0],[86,2,78,7],[86,8,78,13,"eraProgress"],[86,19,78,24],[86,22,78,27],[86,35,78,41,"withProgressField"],[86,52,78,58],[86,53,78,59],[86,66,78,72],[86,67,78,73],[87,2,79,0],[88,0,80,0],[89,0,81,0],[90,0,82,0],[91,0,83,0],[92,0,84,0],[93,0,85,0],[94,0,86,0],[95,0,87,0],[96,0,88,0],[97,2,89,7],[97,8,89,13,"sessionProgress"],[97,23,89,28],[97,26,89,31],[97,39,89,45,"withProgressField"],[97,56,89,62],[97,57,89,63],[97,74,89,80],[97,75,89,81],[98,0,89,82],[98,3]],"functionMap":{"names":["<global>","withProgressField","<anonymous>","memo$argument_1","map$argument_0","createDerive","queryAura","queryBabe","switchMap$argument_0","progress"],"mappings":"AAA;ACG;WCC,sCC,6CC,qBD,ED,CD;CDC;AKC;CLQ;AMC;8CFC;YEG;CNC;AOC;oDCC;MDe,OH;KGE;CPC;OSW;4BNC;kCCC,iDD;wBMC;CTC"},"hasCjsExports":false},"type":"js/module"}]} |