mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 20:21:01 +00:00
1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/types-codec","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":55,"index":55}}],"key":"4J9mGJyxcRzjwnWeFPHBw1ClKiw=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":56},"end":{"line":2,"column":73,"index":129}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","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 Object.defineProperty(exports, \"GenericVote\", {\n enumerable: true,\n get: function () {\n return GenericVote;\n }\n });\n var _polkadotTypesCodec = require(_dependencyMap[0], \"@polkadot/types-codec\");\n var _polkadotUtil = require(_dependencyMap[1], \"@polkadot/util\");\n const AYE_BITS = 0b10000000;\n const NAY_BITS = 0b00000000;\n const CON_MASK = 0b01111111;\n const DEF_CONV = 0b00000000; // the default conviction, None\n /** @internal */\n function decodeVoteBool(value) {\n return value ? new Uint8Array([AYE_BITS | DEF_CONV]) : new Uint8Array([NAY_BITS]);\n }\n /** @internal */\n function decodeVoteU8a(value) {\n return value.length ? value.subarray(0, 1) : new Uint8Array([NAY_BITS]);\n }\n /** @internal */\n function decodeVoteType(registry, value) {\n return new Uint8Array([(new _polkadotTypesCodec.Bool(registry, value.aye).isTrue ? AYE_BITS : NAY_BITS) | registry.createTypeUnsafe('Conviction', [value.conviction || DEF_CONV]).index]);\n }\n /** @internal */\n function decodeVote(registry, value) {\n if ((0, _polkadotUtil.isU8a)(value)) {\n return decodeVoteU8a(value);\n } else if ((0, _polkadotUtil.isUndefined)(value) || value instanceof Boolean || (0, _polkadotUtil.isBoolean)(value)) {\n return decodeVoteBool(new _polkadotTypesCodec.Bool(registry, value).isTrue);\n } else if ((0, _polkadotUtil.isNumber)(value)) {\n return decodeVoteBool(value < 0);\n }\n return decodeVoteType(registry, value);\n }\n /**\n * @name GenericVote\n * @description\n * A number of lock periods, plus a vote, one way or the other.\n */\n class GenericVote extends _polkadotTypesCodec.U8aFixed {\n #aye;\n #conviction;\n constructor(registry, value) {\n // decoded is just 1 byte\n // Aye: Most Significant Bit\n // Conviction: 0000 - 0101\n const decoded = decodeVote(registry, value);\n super(registry, decoded, 8);\n this.#aye = (decoded[0] & AYE_BITS) === AYE_BITS;\n this.#conviction = this.registry.createTypeUnsafe('Conviction', [decoded[0] & CON_MASK]);\n }\n /**\n * @description returns a V2 conviction\n */\n get conviction() {\n return this.#conviction;\n }\n /**\n * @description true if the wrapped value is a positive vote\n */\n get isAye() {\n return this.#aye;\n }\n /**\n * @description true if the wrapped value is a negative vote\n */\n get isNay() {\n return !this.isAye;\n }\n /**\n * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information\n */\n toHuman(isExpanded) {\n return {\n conviction: this.conviction.toHuman(isExpanded),\n vote: this.isAye ? 'Aye' : 'Nay'\n };\n }\n /**\n * @description Converts the value in a best-fit primitive form\n */\n toPrimitive() {\n return {\n aye: this.isAye,\n conviction: this.conviction.toPrimitive()\n };\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n return 'Vote';\n }\n }\n});","lineCount":102,"map":[[7,2,46,0,"Object"],[7,8,46,0],[7,9,46,0,"defineProperty"],[7,23,46,0],[7,24,46,0,"exports"],[7,31,46,0],[8,4,46,0,"enumerable"],[8,14,46,0],[9,4,46,0,"get"],[9,7,46,0],[9,18,46,0,"get"],[9,19,46,0],[10,6,46,0],[10,13,46,0,"GenericVote"],[10,24,46,0],[11,4,46,0],[12,2,46,0],[13,2,1,0],[13,6,1,0,"_polkadotTypesCodec"],[13,25,1,0],[13,28,1,0,"require"],[13,35,1,0],[13,36,1,0,"_dependencyMap"],[13,50,1,0],[14,2,2,0],[14,6,2,0,"_polkadotUtil"],[14,19,2,0],[14,22,2,0,"require"],[14,29,2,0],[14,30,2,0,"_dependencyMap"],[14,44,2,0],[15,2,3,0],[15,8,3,6,"AYE_BITS"],[15,16,3,14],[15,19,3,17],[15,29,3,27],[16,2,4,0],[16,8,4,6,"NAY_BITS"],[16,16,4,14],[16,19,4,17],[16,29,4,27],[17,2,5,0],[17,8,5,6,"CON_MASK"],[17,16,5,14],[17,19,5,17],[17,29,5,27],[18,2,6,0],[18,8,6,6,"DEF_CONV"],[18,16,6,14],[18,19,6,17],[18,29,6,27],[18,30,6,28],[18,31,6,29],[19,2,7,0],[20,2,8,0],[20,11,8,9,"decodeVoteBool"],[20,25,8,23,"decodeVoteBool"],[20,26,8,24,"value"],[20,31,8,29],[20,33,8,31],[21,4,9,4],[21,11,9,11,"value"],[21,16,9,16],[21,19,10,10],[21,23,10,14,"Uint8Array"],[21,33,10,24],[21,34,10,25],[21,35,10,26,"AYE_BITS"],[21,43,10,34],[21,46,10,37,"DEF_CONV"],[21,54,10,45],[21,55,10,46],[21,56,10,47],[21,59,11,10],[21,63,11,14,"Uint8Array"],[21,73,11,24],[21,74,11,25],[21,75,11,26,"NAY_BITS"],[21,83,11,34],[21,84,11,35],[21,85,11,36],[22,2,12,0],[23,2,13,0],[24,2,14,0],[24,11,14,9,"decodeVoteU8a"],[24,24,14,22,"decodeVoteU8a"],[24,25,14,23,"value"],[24,30,14,28],[24,32,14,30],[25,4,15,4],[25,11,15,11,"value"],[25,16,15,16],[25,17,15,17,"length"],[25,23,15,23],[25,26,16,10,"value"],[25,31,16,15],[25,32,16,16,"subarray"],[25,40,16,24],[25,41,16,25],[25,42,16,26],[25,44,16,28],[25,45,16,29],[25,46,16,30],[25,49,17,10],[25,53,17,14,"Uint8Array"],[25,63,17,24],[25,64,17,25],[25,65,17,26,"NAY_BITS"],[25,73,17,34],[25,74,17,35],[25,75,17,36],[26,2,18,0],[27,2,19,0],[28,2,20,0],[28,11,20,9,"decodeVoteType"],[28,25,20,23,"decodeVoteType"],[28,26,20,24,"registry"],[28,34,20,32],[28,36,20,34,"value"],[28,41,20,39],[28,43,20,41],[29,4,21,4],[29,11,21,11],[29,15,21,15,"Uint8Array"],[29,25,21,25],[29,26,21,26],[29,27,22,8],[29,28,22,9],[29,32,22,13,"Bool"],[29,51,22,17],[29,52,22,17,"Bool"],[29,56,22,17],[29,57,22,18,"registry"],[29,65,22,26],[29,67,22,28,"value"],[29,72,22,33],[29,73,22,34,"aye"],[29,76,22,37],[29,77,22,38],[29,78,22,39,"isTrue"],[29,84,22,45],[29,87,23,14,"AYE_BITS"],[29,95,23,22],[29,98,24,14,"NAY_BITS"],[29,106,24,22],[29,110,25,12,"registry"],[29,118,25,20],[29,119,25,21,"createTypeUnsafe"],[29,135,25,37],[29,136,25,38],[29,148,25,50],[29,150,25,52],[29,151,25,53,"value"],[29,156,25,58],[29,157,25,59,"conviction"],[29,167,25,69],[29,171,25,73,"DEF_CONV"],[29,179,25,81],[29,180,25,82],[29,181,25,83],[29,182,25,84,"index"],[29,187,25,89],[29,188,26,5],[29,189,26,6],[30,2,27,0],[31,2,28,0],[32,2,29,0],[32,11,29,9,"decodeVote"],[32,21,29,19,"decodeVote"],[32,22,29,20,"registry"],[32,30,29,28],[32,32,29,30,"value"],[32,37,29,35],[32,39,29,37],[33,4,30,4],[33,8,30,8],[33,12,30,8,"isU8a"],[33,25,30,13],[33,26,30,13,"isU8a"],[33,31,30,13],[33,33,30,14,"value"],[33,38,30,19],[33,39,30,20],[33,41,30,22],[34,6,31,8],[34,13,31,15,"decodeVoteU8a"],[34,26,31,28],[34,27,31,29,"value"],[34,32,31,34],[34,33,31,35],[35,4,32,4],[35,5,32,5],[35,11,33,9],[35,15,33,13],[35,19,33,13,"isUndefined"],[35,32,33,24],[35,33,33,24,"isUndefined"],[35,44,33,24],[35,46,33,25,"value"],[35,51,33,30],[35,52,33,31],[35,56,33,35,"value"],[35,61,33,40],[35,73,33,52,"Boolean"],[35,80,33,59],[35,84,33,63],[35,88,33,63,"isBoolean"],[35,101,33,72],[35,102,33,72,"isBoolean"],[35,111,33,72],[35,113,33,73,"value"],[35,118,33,78],[35,119,33,79],[35,121,33,81],[36,6,34,8],[36,13,34,15,"decodeVoteBool"],[36,27,34,29],[36,28,34,30],[36,32,34,34,"Bool"],[36,51,34,38],[36,52,34,38,"Bool"],[36,56,34,38],[36,57,34,39,"registry"],[36,65,34,47],[36,67,34,49,"value"],[36,72,34,54],[36,73,34,55],[36,74,34,56,"isTrue"],[36,80,34,62],[36,81,34,63],[37,4,35,4],[37,5,35,5],[37,11,36,9],[37,15,36,13],[37,19,36,13,"isNumber"],[37,32,36,21],[37,33,36,21,"isNumber"],[37,41,36,21],[37,43,36,22,"value"],[37,48,36,27],[37,49,36,28],[37,51,36,30],[38,6,37,8],[38,13,37,15,"decodeVoteBool"],[38,27,37,29],[38,28,37,30,"value"],[38,33,37,35],[38,36,37,38],[38,37,37,39],[38,38,37,40],[39,4,38,4],[40,4,39,4],[40,11,39,11,"decodeVoteType"],[40,25,39,25],[40,26,39,26,"registry"],[40,34,39,34],[40,36,39,36,"value"],[40,41,39,41],[40,42,39,42],[41,2,40,0],[42,2,41,0],[43,0,42,0],[44,0,43,0],[45,0,44,0],[46,0,45,0],[47,2,46,7],[47,8,46,13,"GenericVote"],[47,19,46,24],[47,28,46,33,"U8aFixed"],[47,47,46,41],[47,48,46,41,"U8aFixed"],[47,56,46,41],[47,57,46,42],[48,4,47,4],[48,5,47,5,"aye"],[48,8,47,8],[49,4,48,4],[49,5,48,5,"conviction"],[49,15,48,15],[50,4,49,4,"constructor"],[50,15,49,15,"constructor"],[50,16,49,16,"registry"],[50,24,49,24],[50,26,49,26,"value"],[50,31,49,31],[50,33,49,33],[51,6,50,8],[52,6,51,8],[53,6,52,8],[54,6,53,8],[54,12,53,14,"decoded"],[54,19,53,21],[54,22,53,24,"decodeVote"],[54,32,53,34],[54,33,53,35,"registry"],[54,41,53,43],[54,43,53,45,"value"],[54,48,53,50],[54,49,53,51],[55,6,54,8],[55,11,54,13],[55,12,54,14,"registry"],[55,20,54,22],[55,22,54,24,"decoded"],[55,29,54,31],[55,31,54,33],[55,32,54,34],[55,33,54,35],[56,6,55,8],[56,10,55,12],[56,11,55,13],[56,12,55,14,"aye"],[56,15,55,17],[56,18,55,20],[56,19,55,21,"decoded"],[56,26,55,28],[56,27,55,29],[56,28,55,30],[56,29,55,31],[56,32,55,34,"AYE_BITS"],[56,40,55,42],[56,46,55,48,"AYE_BITS"],[56,54,55,56],[57,6,56,8],[57,10,56,12],[57,11,56,13],[57,12,56,14,"conviction"],[57,22,56,24],[57,25,56,27],[57,29,56,31],[57,30,56,32,"registry"],[57,38,56,40],[57,39,56,41,"createTypeUnsafe"],[57,55,56,57],[57,56,56,58],[57,68,56,70],[57,70,56,72],[57,71,56,73,"decoded"],[57,78,56,80],[57,79,56,81],[57,80,56,82],[57,81,56,83],[57,84,56,86,"CON_MASK"],[57,92,56,94],[57,93,56,95],[57,94,56,96],[58,4,57,4],[59,4,58,4],[60,0,59,0],[61,0,60,0],[62,4,61,4],[62,8,61,8,"conviction"],[62,18,61,18,"conviction"],[62,19,61,18],[62,21,61,21],[63,6,62,8],[63,13,62,15],[63,17,62,19],[63,18,62,20],[63,19,62,21,"conviction"],[63,29,62,31],[64,4,63,4],[65,4,64,4],[66,0,65,0],[67,0,66,0],[68,4,67,4],[68,8,67,8,"isAye"],[68,13,67,13,"isAye"],[68,14,67,13],[68,16,67,16],[69,6,68,8],[69,13,68,15],[69,17,68,19],[69,18,68,20],[69,19,68,21,"aye"],[69,22,68,24],[70,4,69,4],[71,4,70,4],[72,0,71,0],[73,0,72,0],[74,4,73,4],[74,8,73,8,"isNay"],[74,13,73,13,"isNay"],[74,14,73,13],[74,16,73,16],[75,6,74,8],[75,13,74,15],[75,14,74,16],[75,18,74,20],[75,19,74,21,"isAye"],[75,24,74,26],[76,4,75,4],[77,4,76,4],[78,0,77,0],[79,0,78,0],[80,4,79,4,"toHuman"],[80,11,79,11,"toHuman"],[80,12,79,12,"isExpanded"],[80,22,79,22],[80,24,79,24],[81,6,80,8],[81,13,80,15],[82,8,81,12,"conviction"],[82,18,81,22],[82,20,81,24],[82,24,81,28],[82,25,81,29,"conviction"],[82,35,81,39],[82,36,81,40,"toHuman"],[82,43,81,47],[82,44,81,48,"isExpanded"],[82,54,81,58],[82,55,81,59],[83,8,82,12,"vote"],[83,12,82,16],[83,14,82,18],[83,18,82,22],[83,19,82,23,"isAye"],[83,24,82,28],[83,27,82,31],[83,32,82,36],[83,35,82,39],[84,6,83,8],[84,7,83,9],[85,4,84,4],[86,4,85,4],[87,0,86,0],[88,0,87,0],[89,4,88,4,"toPrimitive"],[89,15,88,15,"toPrimitive"],[89,16,88,15],[89,18,88,18],[90,6,89,8],[90,13,89,15],[91,8,90,12,"aye"],[91,11,90,15],[91,13,90,17],[91,17,90,21],[91,18,90,22,"isAye"],[91,23,90,27],[92,8,91,12,"conviction"],[92,18,91,22],[92,20,91,24],[92,24,91,28],[92,25,91,29,"conviction"],[92,35,91,39],[92,36,91,40,"toPrimitive"],[92,47,91,51],[92,48,91,52],[93,6,92,8],[93,7,92,9],[94,4,93,4],[95,4,94,4],[96,0,95,0],[97,0,96,0],[98,4,97,4,"toRawType"],[98,13,97,13,"toRawType"],[98,14,97,13],[98,16,97,16],[99,6,98,8],[99,13,98,15],[99,19,98,21],[100,4,99,4],[101,2,100,0],[102,0,100,1],[102,3]],"functionMap":{"names":["<global>","decodeVoteBool","decodeVoteU8a","decodeVoteType","decodeVote","GenericVote","GenericVote#constructor","GenericVote#get__conviction","GenericVote#get__isAye","GenericVote#get__isNay","GenericVote#toHuman","GenericVote#toPrimitive","GenericVote#toRawType"],"mappings":"AAA;ACO;CDI;AEE;CFI;AGE;CHO;AIE;CJW;OKM;ICG;KDQ;IEI;KFE;IGI;KHE;III;KJE;IKI;KLK;IMI;KNK;IOI;KPE;CLC"},"hasCjsExports":false},"type":"js/module"}]} |