Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/5e/c1d5a39cd5fc692bc7fb0764b8d0b615fef362e62fa18e9044b1ce5c52876bc50c894c
T
2025-11-07 20:14:32 +00:00

1 line
4.7 KiB
Plaintext

{"dependencies":[{"name":"@babel/runtime/helpers/slicedToArray","data":{"asyncType":null,"isESMImport":false,"locs":[],"key":"5y7e5+zC7teYEEC6niD9f5zII1M=","exportNames":["*"],"imports":1}},{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":119},"end":{"line":4,"column":30,"index":134}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":19,"index":155},"end":{"line":5,"column":46,"index":182}}],"key":"H94lp+EitftSFqDHaenrSs5zKB0=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n var _slicedToArray = require(_dependencyMap[0], \"@babel/runtime/helpers/slicedToArray\").default;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.votesOf = votesOf;\n var rxjs_1 = require(_dependencyMap[1], \"rxjs\");\n var index_js_1 = require(_dependencyMap[2], \"../util/index.js\");\n /**\n * @name votesOf\n * @description Retrieves the council votes associated with a given account.\n * @returns The stake and the list of candidates the account has voted for.\n * @param {string | Uint8Array | AccountId} accountId The accountId to retrieve votes for.\n * @example\n * ```javascript\n * const accountId = \"5Gw3s7qQ9Z...\"; // Replace with a valid account ID\n * const votes = await api.derive.council.votesOf(accountId);\n * console.log(\"Account votes:\", votes);\n * ```\n */\n function votesOf(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, accountId => api.derive.council.votes().pipe((0, rxjs_1.map)(votes => (votes.find(_ref => {\n var _ref2 = _slicedToArray(_ref, 1),\n from = _ref2[0];\n return from.eq(accountId);\n }) || [null, {\n stake: api.registry.createType('Balance'),\n votes: []\n }])[1])));\n }\n});","lineCount":33,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13],[4,6,1,13,"_slicedToArray"],[4,20,1,13],[4,23,1,13,"require"],[4,30,1,13],[4,31,1,13,"_dependencyMap"],[4,45,1,13],[4,90,1,13,"default"],[4,97,1,13],[5,2,2,0,"Object"],[5,8,2,6],[5,9,2,7,"defineProperty"],[5,23,2,21],[5,24,2,22,"exports"],[5,31,2,29],[5,33,2,31],[5,45,2,43],[5,47,2,45],[6,4,2,47,"value"],[6,9,2,52],[6,11,2,54],[7,2,2,59],[7,3,2,60],[7,4,2,61],[8,2,3,0,"exports"],[8,9,3,7],[8,10,3,8,"votesOf"],[8,17,3,15],[8,20,3,18,"votesOf"],[8,27,3,25],[9,2,4,0],[9,6,4,6,"rxjs_1"],[9,12,4,12],[9,15,4,15,"require"],[9,22,4,22],[9,23,4,22,"_dependencyMap"],[9,37,4,22],[9,48,4,29],[9,49,4,30],[10,2,5,0],[10,6,5,6,"index_js_1"],[10,16,5,16],[10,19,5,19,"require"],[10,26,5,26],[10,27,5,26,"_dependencyMap"],[10,41,5,26],[10,64,5,45],[10,65,5,46],[11,2,6,0],[12,0,7,0],[13,0,8,0],[14,0,9,0],[15,0,10,0],[16,0,11,0],[17,0,12,0],[18,0,13,0],[19,0,14,0],[20,0,15,0],[21,0,16,0],[22,0,17,0],[23,2,18,0],[23,11,18,9,"votesOf"],[23,18,18,16,"votesOf"],[23,19,18,17,"instanceId"],[23,29,18,27],[23,31,18,29,"api"],[23,34,18,32],[23,36,18,34],[24,4,19,4],[24,11,19,11],[24,12,19,12],[24,13,19,13],[24,15,19,15,"index_js_1"],[24,25,19,25],[24,26,19,26,"memo"],[24,30,19,30],[24,32,19,32,"instanceId"],[24,42,19,42],[24,44,19,45,"accountId"],[24,53,19,54],[24,57,19,59,"api"],[24,60,19,62],[24,61,19,63,"derive"],[24,67,19,69],[24,68,19,70,"council"],[24,75,19,77],[24,76,19,78,"votes"],[24,81,19,83],[24,82,19,84],[24,83,19,85],[24,84,19,86,"pipe"],[24,88,19,90],[24,89,19,91],[24,90,19,92],[24,91,19,93],[24,93,19,95,"rxjs_1"],[24,99,19,101],[24,100,19,102,"map"],[24,103,19,105],[24,105,19,108,"votes"],[24,110,19,113],[24,114,19,118],[24,115,19,119,"votes"],[24,120,19,124],[24,121,19,125,"find"],[24,125,19,129],[24,126,19,130,"_ref"],[24,130,19,130],[25,6,19,130],[25,10,19,130,"_ref2"],[25,15,19,130],[25,18,19,130,"_slicedToArray"],[25,32,19,130],[25,33,19,130,"_ref"],[25,37,19,130],[26,8,19,132,"from"],[26,12,19,136],[26,15,19,136,"_ref2"],[26,20,19,136],[27,6,19,136],[27,13,19,142,"from"],[27,17,19,146],[27,18,19,147,"eq"],[27,20,19,149],[27,21,19,150,"accountId"],[27,30,19,159],[27,31,19,160],[28,4,19,160],[28,6,19,161],[28,10,20,8],[28,11,20,9],[28,15,20,13],[28,17,20,15],[29,6,20,17,"stake"],[29,11,20,22],[29,13,20,24,"api"],[29,16,20,27],[29,17,20,28,"registry"],[29,25,20,36],[29,26,20,37,"createType"],[29,36,20,47],[29,37,20,48],[29,46,20,57],[29,47,20,58],[30,6,20,60,"votes"],[30,11,20,65],[30,13,20,67],[31,4,20,70],[31,5,20,71],[31,6,20,72],[31,8,20,74],[31,9,20,75],[31,10,20,76],[31,11,20,77],[31,12,20,78],[31,13,20,79],[32,2,21,0],[33,0,21,1],[33,3]],"functionMap":{"names":["<global>","votesOf","<anonymous>","votes.find$argument_0"],"mappings":"AAA;ACiB;4CCC,sFC,8BD;8EDC;CDC"},"hasCjsExports":true},"type":"js/module"}]}