mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 21:31:02 +00:00
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":116},"end":{"line":4,"column":40,"index":141}}],"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.Float = void 0;\n const util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n /**\n * @name Float\n * @description\n * A Codec wrapper for F32 & F64 values. You generally don't want to be using\n * f32/f64 in your runtime, operations on fixed points numbers are preferable. This class\n * was explicitly added since scale-codec has a flag that enables this and it is available\n * in some eth_* RPCs\n */\n class Float extends Number {\n #bitLength;\n constructor(registry, value, {\n bitLength = 32\n } = {}) {\n super((0, util_1.isU8a)(value) || (0, util_1.isHex)(value) ? value.length === 0 ? 0 : (0, util_1.u8aToFloat)((0, util_1.u8aToU8a)(value), {\n bitLength\n }) : value || 0);\n this.#bitLength = bitLength;\n this.encodedLength = bitLength / 8;\n this.initialU8aLength = this.encodedLength;\n this.registry = registry;\n }\n static with(bitLength) {\n return class extends Float {\n constructor(registry, value) {\n super(registry, value, {\n bitLength\n });\n }\n };\n }\n /**\n * @description returns a hash of the contents\n */\n get hash() {\n return this.registry.hash(this.toU8a());\n }\n /**\n * @description Returns true if the type wraps an empty/default all-0 value\n */\n get isEmpty() {\n return this.valueOf() === 0;\n }\n /**\n * @description Compares the value of the input to see if there is a match\n */\n eq(other) {\n return this.valueOf() === Number(other);\n }\n /**\n * @description Returns a breakdown of the hex encoding for this Codec\n */\n inspect() {\n return {\n outer: [this.toU8a()]\n };\n }\n /**\n * @description Returns a hex string representation of the value\n */\n toHex() {\n return (0, util_1.u8aToHex)(this.toU8a());\n }\n /**\n * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information\n */\n toHuman() {\n return this.toString();\n }\n /**\n * @description Converts the Object to JSON, typically used for RPC transfers\n */\n toJSON() {\n // Not sure if this is actually a hex or a string value\n // (would need to check against RPCs to see the result here)\n return this.toHex();\n }\n /**\n * @description Returns the number representation (Same as valueOf)\n */\n toNumber() {\n return this.valueOf();\n }\n /**\n * @description Converts the value in a best-fit primitive form\n */\n toPrimitive() {\n return this.toNumber();\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n return `f${this.#bitLength}`;\n }\n /**\n * @description Encodes the value as a Uint8Array as per the SCALE specifications\n */\n toU8a(_isBare) {\n return (0, util_1.floatToU8a)(this, {\n bitLength: this.#bitLength\n });\n }\n }\n exports.Float = Float;\n});","lineCount":113,"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,"Float"],[7,15,3,13],[7,18,3,16],[7,23,3,21],[7,24,3,22],[8,2,4,0],[8,8,4,6,"util_1"],[8,14,4,12],[8,17,4,15,"require"],[8,24,4,22],[8,25,4,22,"_dependencyMap"],[8,39,4,22],[8,60,4,39],[8,61,4,40],[9,2,5,0],[10,0,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,2,13,0],[17,8,13,6,"Float"],[17,13,13,11],[17,22,13,20,"Number"],[17,28,13,26],[17,29,13,27],[18,4,19,4],[18,5,19,5,"bitLength"],[18,14,19,14],[19,4,20,4,"constructor"],[19,15,20,15,"constructor"],[19,16,20,16,"registry"],[19,24,20,24],[19,26,20,26,"value"],[19,31,20,31],[19,33,20,33],[20,6,20,35,"bitLength"],[20,15,20,44],[20,18,20,47],[21,4,20,50],[21,5,20,51],[21,8,20,54],[21,9,20,55],[21,10,20,56],[21,12,20,58],[22,6,21,8],[22,11,21,13],[22,12,21,14],[22,13,21,15],[22,14,21,16],[22,16,21,18,"util_1"],[22,22,21,24],[22,23,21,25,"isU8a"],[22,28,21,30],[22,30,21,32,"value"],[22,35,21,37],[22,36,21,38],[22,40,21,42],[22,41,21,43],[22,42,21,44],[22,44,21,46,"util_1"],[22,50,21,52],[22,51,21,53,"isHex"],[22,56,21,58],[22,58,21,60,"value"],[22,63,21,65],[22,64,21,66],[22,67,22,14,"value"],[22,72,22,19],[22,73,22,20,"length"],[22,79,22,26],[22,84,22,31],[22,85,22,32],[22,88,23,18],[22,89,23,19],[22,92,24,18],[22,93,24,19],[22,94,24,20],[22,96,24,22,"util_1"],[22,102,24,28],[22,103,24,29,"u8aToFloat"],[22,113,24,39],[22,115,24,41],[22,116,24,42],[22,117,24,43],[22,119,24,45,"util_1"],[22,125,24,51],[22,126,24,52,"u8aToU8a"],[22,134,24,60],[22,136,24,62,"value"],[22,141,24,67],[22,142,24,68],[22,144,24,70],[23,8,24,72,"bitLength"],[24,6,24,82],[24,7,24,83],[24,8,24,84],[24,11,25,15,"value"],[24,16,25,20],[24,20,25,24],[24,21,25,26],[24,22,25,27],[25,6,26,8],[25,10,26,12],[25,11,26,13],[25,12,26,14,"bitLength"],[25,21,26,23],[25,24,26,26,"bitLength"],[25,33,26,35],[26,6,27,8],[26,10,27,12],[26,11,27,13,"encodedLength"],[26,24,27,26],[26,27,27,29,"bitLength"],[26,36,27,38],[26,39,27,41],[26,40,27,42],[27,6,28,8],[27,10,28,12],[27,11,28,13,"initialU8aLength"],[27,27,28,29],[27,30,28,32],[27,34,28,36],[27,35,28,37,"encodedLength"],[27,48,28,50],[28,6,29,8],[28,10,29,12],[28,11,29,13,"registry"],[28,19,29,21],[28,22,29,24,"registry"],[28,30,29,32],[29,4,30,4],[30,4,31,4],[30,11,31,11,"with"],[30,15,31,15,"with"],[30,16,31,16,"bitLength"],[30,25,31,25],[30,27,31,27],[31,6,32,8],[31,13,32,15],[31,27,32,29,"Float"],[31,32,32,34],[31,33,32,35],[32,8,33,12,"constructor"],[32,19,33,23,"constructor"],[32,20,33,24,"registry"],[32,28,33,32],[32,30,33,34,"value"],[32,35,33,39],[32,37,33,41],[33,10,34,16],[33,15,34,21],[33,16,34,22,"registry"],[33,24,34,30],[33,26,34,32,"value"],[33,31,34,37],[33,33,34,39],[34,12,34,41,"bitLength"],[35,10,34,51],[35,11,34,52],[35,12,34,53],[36,8,35,12],[37,6,36,8],[37,7,36,9],[38,4,37,4],[39,4,38,4],[40,0,39,0],[41,0,40,0],[42,4,41,4],[42,8,41,8,"hash"],[42,12,41,12,"hash"],[42,13,41,12],[42,15,41,15],[43,6,42,8],[43,13,42,15],[43,17,42,19],[43,18,42,20,"registry"],[43,26,42,28],[43,27,42,29,"hash"],[43,31,42,33],[43,32,42,34],[43,36,42,38],[43,37,42,39,"toU8a"],[43,42,42,44],[43,43,42,45],[43,44,42,46],[43,45,42,47],[44,4,43,4],[45,4,44,4],[46,0,45,0],[47,0,46,0],[48,4,47,4],[48,8,47,8,"isEmpty"],[48,15,47,15,"isEmpty"],[48,16,47,15],[48,18,47,18],[49,6,48,8],[49,13,48,15],[49,17,48,19],[49,18,48,20,"valueOf"],[49,25,48,27],[49,26,48,28],[49,27,48,29],[49,32,48,34],[49,33,48,35],[50,4,49,4],[51,4,50,4],[52,0,51,0],[53,0,52,0],[54,4,53,4,"eq"],[54,6,53,6,"eq"],[54,7,53,7,"other"],[54,12,53,12],[54,14,53,14],[55,6,54,8],[55,13,54,15],[55,17,54,19],[55,18,54,20,"valueOf"],[55,25,54,27],[55,26,54,28],[55,27,54,29],[55,32,54,34,"Number"],[55,38,54,40],[55,39,54,41,"other"],[55,44,54,46],[55,45,54,47],[56,4,55,4],[57,4,56,4],[58,0,57,0],[59,0,58,0],[60,4,59,4,"inspect"],[60,11,59,11,"inspect"],[60,12,59,11],[60,14,59,14],[61,6,60,8],[61,13,60,15],[62,8,61,12,"outer"],[62,13,61,17],[62,15,61,19],[62,16,61,20],[62,20,61,24],[62,21,61,25,"toU8a"],[62,26,61,30],[62,27,61,31],[62,28,61,32],[63,6,62,8],[63,7,62,9],[64,4,63,4],[65,4,64,4],[66,0,65,0],[67,0,66,0],[68,4,67,4,"toHex"],[68,9,67,9,"toHex"],[68,10,67,9],[68,12,67,12],[69,6,68,8],[69,13,68,15],[69,14,68,16],[69,15,68,17],[69,17,68,19,"util_1"],[69,23,68,25],[69,24,68,26,"u8aToHex"],[69,32,68,34],[69,34,68,36],[69,38,68,40],[69,39,68,41,"toU8a"],[69,44,68,46],[69,45,68,47],[69,46,68,48],[69,47,68,49],[70,4,69,4],[71,4,70,4],[72,0,71,0],[73,0,72,0],[74,4,73,4,"toHuman"],[74,11,73,11,"toHuman"],[74,12,73,11],[74,14,73,14],[75,6,74,8],[75,13,74,15],[75,17,74,19],[75,18,74,20,"toString"],[75,26,74,28],[75,27,74,29],[75,28,74,30],[76,4,75,4],[77,4,76,4],[78,0,77,0],[79,0,78,0],[80,4,79,4,"toJSON"],[80,10,79,10,"toJSON"],[80,11,79,10],[80,13,79,13],[81,6,80,8],[82,6,81,8],[83,6,82,8],[83,13,82,15],[83,17,82,19],[83,18,82,20,"toHex"],[83,23,82,25],[83,24,82,26],[83,25,82,27],[84,4,83,4],[85,4,84,4],[86,0,85,0],[87,0,86,0],[88,4,87,4,"toNumber"],[88,12,87,12,"toNumber"],[88,13,87,12],[88,15,87,15],[89,6,88,8],[89,13,88,15],[89,17,88,19],[89,18,88,20,"valueOf"],[89,25,88,27],[89,26,88,28],[89,27,88,29],[90,4,89,4],[91,4,90,4],[92,0,91,0],[93,0,92,0],[94,4,93,4,"toPrimitive"],[94,15,93,15,"toPrimitive"],[94,16,93,15],[94,18,93,18],[95,6,94,8],[95,13,94,15],[95,17,94,19],[95,18,94,20,"toNumber"],[95,26,94,28],[95,27,94,29],[95,28,94,30],[96,4,95,4],[97,4,96,4],[98,0,97,0],[99,0,98,0],[100,4,99,4,"toRawType"],[100,13,99,13,"toRawType"],[100,14,99,13],[100,16,99,16],[101,6,100,8],[101,13,100,15],[101,17,100,19],[101,21,100,23],[101,22,100,24],[101,23,100,25,"bitLength"],[101,32,100,34],[101,34,100,36],[102,4,101,4],[103,4,102,4],[104,0,103,0],[105,0,104,0],[106,4,105,4,"toU8a"],[106,9,105,9,"toU8a"],[106,10,105,10,"_isBare"],[106,17,105,17],[106,19,105,19],[107,6,106,8],[107,13,106,15],[107,14,106,16],[107,15,106,17],[107,17,106,19,"util_1"],[107,23,106,25],[107,24,106,26,"floatToU8a"],[107,34,106,36],[107,36,106,38],[107,40,106,42],[107,42,106,44],[108,8,107,12,"bitLength"],[108,17,107,21],[108,19,107,23],[108,23,107,27],[108,24,107,28],[108,25,107,29,"bitLength"],[109,6,108,8],[109,7,108,9],[109,8,108,10],[110,4,109,4],[111,2,110,0],[112,2,111,0,"exports"],[112,9,111,7],[112,10,111,8,"Float"],[112,15,111,13],[112,18,111,16,"Float"],[112,23,111,21],[113,0,111,22],[113,3]],"functionMap":{"names":["<global>","Float","constructor","_with","<anonymous>","get__hash","get__isEmpty","eq","inspect","toHex","toHuman","toJSON","toNumber","toPrimitive","toRawType","toU8a"],"mappings":"AAA;ACY;ICO;KDU;IEC;eCC;YFC;aEE;SDC;KFC;III;KJE;IKI;KLE;IMI;KNE;IOI;KPI;IQI;KRE;ISI;KTE;IUI;KVI;IWI;KXE;IYI;KZE;IaI;KbE;IcI;KdI;CDC"},"hasCjsExports":true},"type":"js/module"}]} |