mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 11:11:01 +00:00
1 line
13 KiB
Plaintext
1 line
13 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":120},"end":{"line":4,"column":40,"index":145}}],"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.CodecDate = void 0;\n const util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n const BITLENGTH = 64;\n const U8A_OPTS = {\n bitLength: BITLENGTH,\n isLe: true\n };\n function decodeDate(value) {\n if ((0, util_1.isU8a)(value)) {\n value = (0, util_1.u8aToBn)(value.subarray(0, BITLENGTH / 8));\n } else if (value instanceof Date) {\n return value;\n } else if ((0, util_1.isString)(value)) {\n value = new util_1.BN(value.toString(), 10, 'le');\n }\n return new Date((0, util_1.bnToBn)(value).toNumber() * 1000);\n }\n /**\n * @name Date\n * @description\n * A wrapper around seconds/timestamps. Internally the representation only has\n * second precicion (aligning with Rust), so any numbers passed an/out are always\n * per-second. For any encoding/decoding the 1000 multiplier would be applied to\n * get it in line with JavaScript formats. It extends the base JS `Date` object\n * and has all the methods available that are applicable to any `Date`\n * @noInheritDoc\n */\n class CodecDate extends Date {\n initialU8aLength = BITLENGTH / 8;\n constructor(registry, value = 0) {\n super(decodeDate(value));\n this.registry = registry;\n }\n /**\n * @description The length of the value when encoded as a Uint8Array\n */\n get encodedLength() {\n return BITLENGTH / 8;\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 Checks if the value is an empty value\n */\n get isEmpty() {\n return this.getTime() === 0;\n }\n /**\n * @description Returns the number of bits in the value\n */\n bitLength() {\n return BITLENGTH;\n }\n /**\n * @description Compares the value of the input to see if there is a match\n */\n eq(other) {\n return decodeDate(other).getTime() === this.getTime();\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 BigInt representation of the number\n */\n toBigInt() {\n return BigInt(this.toNumber());\n }\n /**\n * @description Returns the BN representation of the timestamp\n */\n toBn() {\n return new util_1.BN(this.toNumber());\n }\n /**\n * @description Returns a hex string representation of the value\n */\n toHex(isLe = false) {\n return (0, util_1.bnToHex)(this.toBn(), {\n bitLength: BITLENGTH,\n isLe,\n isNegative: false\n });\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.toISOString();\n }\n /**\n * @description Converts the Object to JSON, typically used for RPC transfers\n */\n toJSON() {\n // FIXME Return type should be number, but conflicts with Date.toJSON()\n // which returns string\n return this.toNumber();\n }\n /**\n * @description Returns the number representation for the timestamp\n */\n toNumber() {\n return Math.ceil(this.getTime() / 1000);\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 'Moment';\n }\n /**\n * @description Returns the string representation of the value\n */\n toString() {\n // only included here since we do not inherit docs\n return super.toString();\n }\n /**\n * @description Encodes the value as a Uint8Array as per the SCALE specifications\n */\n toU8a(_isBare) {\n return (0, util_1.bnToU8a)(this.toNumber(), U8A_OPTS);\n }\n }\n exports.CodecDate = CodecDate;\n});","lineCount":147,"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,"CodecDate"],[7,19,3,17],[7,22,3,20],[7,27,3,25],[7,28,3,26],[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],[9,8,5,6,"BITLENGTH"],[9,17,5,15],[9,20,5,18],[9,22,5,20],[10,2,6,0],[10,8,6,6,"U8A_OPTS"],[10,16,6,14],[10,19,6,17],[11,4,6,19,"bitLength"],[11,13,6,28],[11,15,6,30,"BITLENGTH"],[11,24,6,39],[12,4,6,41,"isLe"],[12,8,6,45],[12,10,6,47],[13,2,6,52],[13,3,6,53],[14,2,7,0],[14,11,7,9,"decodeDate"],[14,21,7,19,"decodeDate"],[14,22,7,20,"value"],[14,27,7,25],[14,29,7,27],[15,4,8,4],[15,8,8,8],[15,9,8,9],[15,10,8,10],[15,12,8,12,"util_1"],[15,18,8,18],[15,19,8,19,"isU8a"],[15,24,8,24],[15,26,8,26,"value"],[15,31,8,31],[15,32,8,32],[15,34,8,34],[16,6,9,8,"value"],[16,11,9,13],[16,14,9,16],[16,15,9,17],[16,16,9,18],[16,18,9,20,"util_1"],[16,24,9,26],[16,25,9,27,"u8aToBn"],[16,32,9,34],[16,34,9,36,"value"],[16,39,9,41],[16,40,9,42,"subarray"],[16,48,9,50],[16,49,9,51],[16,50,9,52],[16,52,9,54,"BITLENGTH"],[16,61,9,63],[16,64,9,66],[16,65,9,67],[16,66,9,68],[16,67,9,69],[17,4,10,4],[17,5,10,5],[17,11,11,9],[17,15,11,13,"value"],[17,20,11,18],[17,32,11,30,"Date"],[17,36,11,34],[17,38,11,36],[18,6,12,8],[18,13,12,15,"value"],[18,18,12,20],[19,4,13,4],[19,5,13,5],[19,11,14,9],[19,15,14,13],[19,16,14,14],[19,17,14,15],[19,19,14,17,"util_1"],[19,25,14,23],[19,26,14,24,"isString"],[19,34,14,32],[19,36,14,34,"value"],[19,41,14,39],[19,42,14,40],[19,44,14,42],[20,6,15,8,"value"],[20,11,15,13],[20,14,15,16],[20,18,15,20,"util_1"],[20,24,15,26],[20,25,15,27,"BN"],[20,27,15,29],[20,28,15,30,"value"],[20,33,15,35],[20,34,15,36,"toString"],[20,42,15,44],[20,43,15,45],[20,44,15,46],[20,46,15,48],[20,48,15,50],[20,50,15,52],[20,54,15,56],[20,55,15,57],[21,4,16,4],[22,4,17,4],[22,11,17,11],[22,15,17,15,"Date"],[22,19,17,19],[22,20,17,20],[22,21,17,21],[22,22,17,22],[22,24,17,24,"util_1"],[22,30,17,30],[22,31,17,31,"bnToBn"],[22,37,17,37],[22,39,17,39,"value"],[22,44,17,44],[22,45,17,45],[22,46,17,46,"toNumber"],[22,54,17,54],[22,55,17,55],[22,56,17,56],[22,59,17,59],[22,63,17,63],[22,64,17,64],[23,2,18,0],[24,2,19,0],[25,0,20,0],[26,0,21,0],[27,0,22,0],[28,0,23,0],[29,0,24,0],[30,0,25,0],[31,0,26,0],[32,0,27,0],[33,0,28,0],[34,2,29,0],[34,8,29,6,"CodecDate"],[34,17,29,15],[34,26,29,24,"Date"],[34,30,29,28],[34,31,29,29],[35,4,32,4,"initialU8aLength"],[35,20,32,20],[35,23,32,23,"BITLENGTH"],[35,32,32,32],[35,35,32,35],[35,36,32,36],[36,4,34,4,"constructor"],[36,15,34,15,"constructor"],[36,16,34,16,"registry"],[36,24,34,24],[36,26,34,26,"value"],[36,31,34,31],[36,34,34,34],[36,35,34,35],[36,37,34,37],[37,6,35,8],[37,11,35,13],[37,12,35,14,"decodeDate"],[37,22,35,24],[37,23,35,25,"value"],[37,28,35,30],[37,29,35,31],[37,30,35,32],[38,6,36,8],[38,10,36,12],[38,11,36,13,"registry"],[38,19,36,21],[38,22,36,24,"registry"],[38,30,36,32],[39,4,37,4],[40,4,38,4],[41,0,39,0],[42,0,40,0],[43,4,41,4],[43,8,41,8,"encodedLength"],[43,21,41,21,"encodedLength"],[43,22,41,21],[43,24,41,24],[44,6,42,8],[44,13,42,15,"BITLENGTH"],[44,22,42,24],[44,25,42,27],[44,26,42,28],[45,4,43,4],[46,4,44,4],[47,0,45,0],[48,0,46,0],[49,4,47,4],[49,8,47,8,"hash"],[49,12,47,12,"hash"],[49,13,47,12],[49,15,47,15],[50,6,48,8],[50,13,48,15],[50,17,48,19],[50,18,48,20,"registry"],[50,26,48,28],[50,27,48,29,"hash"],[50,31,48,33],[50,32,48,34],[50,36,48,38],[50,37,48,39,"toU8a"],[50,42,48,44],[50,43,48,45],[50,44,48,46],[50,45,48,47],[51,4,49,4],[52,4,50,4],[53,0,51,0],[54,0,52,0],[55,4,53,4],[55,8,53,8,"isEmpty"],[55,15,53,15,"isEmpty"],[55,16,53,15],[55,18,53,18],[56,6,54,8],[56,13,54,15],[56,17,54,19],[56,18,54,20,"getTime"],[56,25,54,27],[56,26,54,28],[56,27,54,29],[56,32,54,34],[56,33,54,35],[57,4,55,4],[58,4,56,4],[59,0,57,0],[60,0,58,0],[61,4,59,4,"bitLength"],[61,13,59,13,"bitLength"],[61,14,59,13],[61,16,59,16],[62,6,60,8],[62,13,60,15,"BITLENGTH"],[62,22,60,24],[63,4,61,4],[64,4,62,4],[65,0,63,0],[66,0,64,0],[67,4,65,4,"eq"],[67,6,65,6,"eq"],[67,7,65,7,"other"],[67,12,65,12],[67,14,65,14],[68,6,66,8],[68,13,66,15,"decodeDate"],[68,23,66,25],[68,24,66,26,"other"],[68,29,66,31],[68,30,66,32],[68,31,66,33,"getTime"],[68,38,66,40],[68,39,66,41],[68,40,66,42],[68,45,66,47],[68,49,66,51],[68,50,66,52,"getTime"],[68,57,66,59],[68,58,66,60],[68,59,66,61],[69,4,67,4],[70,4,68,4],[71,0,69,0],[72,0,70,0],[73,4,71,4,"inspect"],[73,11,71,11,"inspect"],[73,12,71,11],[73,14,71,14],[74,6,72,8],[74,13,72,15],[75,8,73,12,"outer"],[75,13,73,17],[75,15,73,19],[75,16,73,20],[75,20,73,24],[75,21,73,25,"toU8a"],[75,26,73,30],[75,27,73,31],[75,28,73,32],[76,6,74,8],[76,7,74,9],[77,4,75,4],[78,4,76,4],[79,0,77,0],[80,0,78,0],[81,4,79,4,"toBigInt"],[81,12,79,12,"toBigInt"],[81,13,79,12],[81,15,79,15],[82,6,80,8],[82,13,80,15,"BigInt"],[82,19,80,21],[82,20,80,22],[82,24,80,26],[82,25,80,27,"toNumber"],[82,33,80,35],[82,34,80,36],[82,35,80,37],[82,36,80,38],[83,4,81,4],[84,4,82,4],[85,0,83,0],[86,0,84,0],[87,4,85,4,"toBn"],[87,8,85,8,"toBn"],[87,9,85,8],[87,11,85,11],[88,6,86,8],[88,13,86,15],[88,17,86,19,"util_1"],[88,23,86,25],[88,24,86,26,"BN"],[88,26,86,28],[88,27,86,29],[88,31,86,33],[88,32,86,34,"toNumber"],[88,40,86,42],[88,41,86,43],[88,42,86,44],[88,43,86,45],[89,4,87,4],[90,4,88,4],[91,0,89,0],[92,0,90,0],[93,4,91,4,"toHex"],[93,9,91,9,"toHex"],[93,10,91,10,"isLe"],[93,14,91,14],[93,17,91,17],[93,22,91,22],[93,24,91,24],[94,6,92,8],[94,13,92,15],[94,14,92,16],[94,15,92,17],[94,17,92,19,"util_1"],[94,23,92,25],[94,24,92,26,"bnToHex"],[94,31,92,33],[94,33,92,35],[94,37,92,39],[94,38,92,40,"toBn"],[94,42,92,44],[94,43,92,45],[94,44,92,46],[94,46,92,48],[95,8,93,12,"bitLength"],[95,17,93,21],[95,19,93,23,"BITLENGTH"],[95,28,93,32],[96,8,94,12,"isLe"],[96,12,94,16],[97,8,95,12,"isNegative"],[97,18,95,22],[97,20,95,24],[98,6,96,8],[98,7,96,9],[98,8,96,10],[99,4,97,4],[100,4,98,4],[101,0,99,0],[102,0,100,0],[103,4,101,4,"toHuman"],[103,11,101,11,"toHuman"],[103,12,101,11],[103,14,101,14],[104,6,102,8],[104,13,102,15],[104,17,102,19],[104,18,102,20,"toISOString"],[104,29,102,31],[104,30,102,32],[104,31,102,33],[105,4,103,4],[106,4,104,4],[107,0,105,0],[108,0,106,0],[109,4,107,4,"toJSON"],[109,10,107,10,"toJSON"],[109,11,107,10],[109,13,107,13],[110,6,108,8],[111,6,109,8],[112,6,110,8],[112,13,110,15],[112,17,110,19],[112,18,110,20,"toNumber"],[112,26,110,28],[112,27,110,29],[112,28,110,30],[113,4,111,4],[114,4,112,4],[115,0,113,0],[116,0,114,0],[117,4,115,4,"toNumber"],[117,12,115,12,"toNumber"],[117,13,115,12],[117,15,115,15],[118,6,116,8],[118,13,116,15,"Math"],[118,17,116,19],[118,18,116,20,"ceil"],[118,22,116,24],[118,23,116,25],[118,27,116,29],[118,28,116,30,"getTime"],[118,35,116,37],[118,36,116,38],[118,37,116,39],[118,40,116,42],[118,44,116,46],[118,45,116,47],[119,4,117,4],[120,4,118,4],[121,0,119,0],[122,0,120,0],[123,4,121,4,"toPrimitive"],[123,15,121,15,"toPrimitive"],[123,16,121,15],[123,18,121,18],[124,6,122,8],[124,13,122,15],[124,17,122,19],[124,18,122,20,"toNumber"],[124,26,122,28],[124,27,122,29],[124,28,122,30],[125,4,123,4],[126,4,124,4],[127,0,125,0],[128,0,126,0],[129,4,127,4,"toRawType"],[129,13,127,13,"toRawType"],[129,14,127,13],[129,16,127,16],[130,6,128,8],[130,13,128,15],[130,21,128,23],[131,4,129,4],[132,4,130,4],[133,0,131,0],[134,0,132,0],[135,4,133,4,"toString"],[135,12,133,12,"toString"],[135,13,133,12],[135,15,133,15],[136,6,134,8],[137,6,135,8],[137,13,135,15],[137,18,135,20],[137,19,135,21,"toString"],[137,27,135,29],[137,28,135,30],[137,29,135,31],[138,4,136,4],[139,4,137,4],[140,0,138,0],[141,0,139,0],[142,4,140,4,"toU8a"],[142,9,140,9,"toU8a"],[142,10,140,10,"_isBare"],[142,17,140,17],[142,19,140,19],[143,6,141,8],[143,13,141,15],[143,14,141,16],[143,15,141,17],[143,17,141,19,"util_1"],[143,23,141,25],[143,24,141,26,"bnToU8a"],[143,31,141,33],[143,33,141,35],[143,37,141,39],[143,38,141,40,"toNumber"],[143,46,141,48],[143,47,141,49],[143,48,141,50],[143,50,141,52,"U8A_OPTS"],[143,58,141,60],[143,59,141,61],[144,4,142,4],[145,2,143,0],[146,2,144,0,"exports"],[146,9,144,7],[146,10,144,8,"CodecDate"],[146,19,144,17],[146,22,144,20,"CodecDate"],[146,31,144,29],[147,0,144,30],[147,3]],"functionMap":{"names":["<global>","decodeDate","CodecDate","CodecDate#constructor","CodecDate#get__encodedLength","CodecDate#get__hash","CodecDate#get__isEmpty","CodecDate#bitLength","CodecDate#eq","CodecDate#inspect","CodecDate#toBigInt","CodecDate#toBn","CodecDate#toHex","CodecDate#toHuman","CodecDate#toJSON","CodecDate#toNumber","CodecDate#toPrimitive","CodecDate#toRawType","CodecDate#toString","CodecDate#toU8a"],"mappings":"AAA;ACM;CDW;AEW;ICK;KDG;IEI;KFE;IGI;KHE;III;KJE;IKI;KLE;IMI;KNE;IOI;KPI;IQI;KRE;ISI;KTE;IUI;KVM;IWI;KXE;IYI;KZI;IaI;KbE;IcI;KdE;IeI;KfE;IgBI;KhBG;IiBI;KjBE;CFC"},"hasCjsExports":true},"type":"js/module"}]} |