mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 06:31:03 +00:00
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/types-codec","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":47,"index":47}}],"key":"4J9mGJyxcRzjwnWeFPHBw1ClKiw=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":48},"end":{"line":2,"column":73,"index":121}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"./class.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":122},"end":{"line":3,"column":47,"index":169}}],"key":"nDWPIJjsQzx+SONQ0T/o5CLrR+Y=","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.createTypeUnsafe = createTypeUnsafe;\n var _polkadotTypesCodec = require(_dependencyMap[0], \"@polkadot/types-codec\");\n var _polkadotUtil = require(_dependencyMap[1], \"@polkadot/util\");\n var _classJs = require(_dependencyMap[2], \"./class.js\");\n function checkInstance(created, matcher) {\n const u8a = created.toU8a();\n const rawType = created.toRawType();\n const isOk =\n // full match, all ok\n (0, _polkadotUtil.u8aEq)(u8a, matcher) ||\n // on a length-prefixed type, just check the actual length\n ['Bytes', 'Text', 'Type'].includes(rawType) && matcher.length === created.length ||\n // when the created is empty and matcher is also empty, let it slide...\n created.isEmpty && matcher.every(v => !v);\n if (!isOk) {\n throw new Error(`${rawType}:: Decoded input doesn't match input, received ${(0, _polkadotUtil.u8aToHex)(matcher, 512)} (${matcher.length} bytes), created ${(0, _polkadotUtil.u8aToHex)(u8a, 512)} (${u8a.length} bytes)`);\n }\n }\n function checkPedantic(created, [value]) {\n if ((0, _polkadotUtil.isU8a)(value)) {\n checkInstance(created, value);\n } else if ((0, _polkadotUtil.isHex)(value)) {\n checkInstance(created, (0, _polkadotUtil.u8aToU8a)(value));\n }\n }\n function initType(registry, Type, params = [], {\n blockHash,\n isFallback,\n isOptional,\n isPedantic\n } = {}) {\n const created = new (isOptional ? _polkadotTypesCodec.Option.with(Type) : Type)(registry, ...params);\n isPedantic && checkPedantic(created, params);\n if (blockHash) {\n created.createdAtHash = createTypeUnsafe(registry, 'BlockHash', [blockHash]);\n }\n if (isFallback) {\n created.isStorageFallback = true;\n }\n return created;\n }\n function createTypeUnsafe(registry, type, params = [], options = {}) {\n let Clazz = null;\n let firstError = null;\n try {\n Clazz = (0, _classJs.createClassUnsafe)(registry, type);\n return initType(registry, Clazz, params, options);\n } catch (error) {\n firstError = new Error(`createType(${type}):: ${error.message}`);\n }\n if (Clazz?.__fallbackType) {\n try {\n Clazz = (0, _classJs.createClassUnsafe)(registry, Clazz.__fallbackType);\n return initType(registry, Clazz, params, options);\n } catch {\n // swallow, we will throw the first error again\n }\n }\n throw firstError;\n }\n});","lineCount":67,"map":[[7,2,43,0,"exports"],[7,9,43,0],[7,10,43,0,"createTypeUnsafe"],[7,26,43,0],[7,29,43,0,"createTypeUnsafe"],[7,45,43,0],[8,2,1,0],[8,6,1,0,"_polkadotTypesCodec"],[8,25,1,0],[8,28,1,0,"require"],[8,35,1,0],[8,36,1,0,"_dependencyMap"],[8,50,1,0],[9,2,2,0],[9,6,2,0,"_polkadotUtil"],[9,19,2,0],[9,22,2,0,"require"],[9,29,2,0],[9,30,2,0,"_dependencyMap"],[9,44,2,0],[10,2,3,0],[10,6,3,0,"_classJs"],[10,14,3,0],[10,17,3,0,"require"],[10,24,3,0],[10,25,3,0,"_dependencyMap"],[10,39,3,0],[11,2,4,0],[11,11,4,9,"checkInstance"],[11,24,4,22,"checkInstance"],[11,25,4,23,"created"],[11,32,4,30],[11,34,4,32,"matcher"],[11,41,4,39],[11,43,4,41],[12,4,5,4],[12,10,5,10,"u8a"],[12,13,5,13],[12,16,5,16,"created"],[12,23,5,23],[12,24,5,24,"toU8a"],[12,29,5,29],[12,30,5,30],[12,31,5,31],[13,4,6,4],[13,10,6,10,"rawType"],[13,17,6,17],[13,20,6,20,"created"],[13,27,6,27],[13,28,6,28,"toRawType"],[13,37,6,37],[13,38,6,38],[13,39,6,39],[14,4,7,4],[14,10,7,10,"isOk"],[14,14,7,14],[15,4,8,4],[16,4,9,4],[16,8,9,4,"u8aEq"],[16,21,9,9],[16,22,9,9,"u8aEq"],[16,27,9,9],[16,29,9,10,"u8a"],[16,32,9,13],[16,34,9,15,"matcher"],[16,41,9,22],[16,42,9,23],[17,4,11,8],[18,4,12,8],[18,5,12,9],[18,12,12,16],[18,14,12,18],[18,20,12,24],[18,22,12,26],[18,28,12,32],[18,29,12,33],[18,30,12,34,"includes"],[18,38,12,42],[18,39,12,43,"rawType"],[18,46,12,50],[18,47,12,51],[18,51,13,12,"matcher"],[18,58,13,19],[18,59,13,20,"length"],[18,65,13,26],[18,70,13,31,"created"],[18,77,13,38],[18,78,13,39,"length"],[18,84,13,46],[19,4,15,8],[20,4,16,8,"created"],[20,11,16,15],[20,12,16,16,"isEmpty"],[20,19,16,23],[20,23,17,12,"matcher"],[20,30,17,19],[20,31,17,20,"every"],[20,36,17,25],[20,37,17,27,"v"],[20,38,17,28],[20,42,17,33],[20,43,17,34,"v"],[20,44,17,35],[20,45,17,38],[21,4,18,4],[21,8,18,8],[21,9,18,9,"isOk"],[21,13,18,13],[21,15,18,15],[22,6,19,8],[22,12,19,14],[22,16,19,18,"Error"],[22,21,19,23],[22,22,19,24],[22,25,19,27,"rawType"],[22,32,19,34],[22,82,19,84],[22,86,19,84,"u8aToHex"],[22,99,19,92],[22,100,19,92,"u8aToHex"],[22,108,19,92],[22,110,19,93,"matcher"],[22,117,19,100],[22,119,19,102],[22,122,19,105],[22,123,19,106],[22,128,19,111,"matcher"],[22,135,19,118],[22,136,19,119,"length"],[22,142,19,125],[22,162,19,145],[22,166,19,145,"u8aToHex"],[22,179,19,153],[22,180,19,153,"u8aToHex"],[22,188,19,153],[22,190,19,154,"u8a"],[22,193,19,157],[22,195,19,159],[22,198,19,162],[22,199,19,163],[22,204,19,168,"u8a"],[22,207,19,171],[22,208,19,172,"length"],[22,214,19,178],[22,223,19,187],[22,224,19,188],[23,4,20,4],[24,2,21,0],[25,2,22,0],[25,11,22,9,"checkPedantic"],[25,24,22,22,"checkPedantic"],[25,25,22,23,"created"],[25,32,22,30],[25,34,22,32],[25,35,22,33,"value"],[25,40,22,38],[25,41,22,39],[25,43,22,41],[26,4,23,4],[26,8,23,8],[26,12,23,8,"isU8a"],[26,25,23,13],[26,26,23,13,"isU8a"],[26,31,23,13],[26,33,23,14,"value"],[26,38,23,19],[26,39,23,20],[26,41,23,22],[27,6,24,8,"checkInstance"],[27,19,24,21],[27,20,24,22,"created"],[27,27,24,29],[27,29,24,31,"value"],[27,34,24,36],[27,35,24,37],[28,4,25,4],[28,5,25,5],[28,11,26,9],[28,15,26,13],[28,19,26,13,"isHex"],[28,32,26,18],[28,33,26,18,"isHex"],[28,38,26,18],[28,40,26,19,"value"],[28,45,26,24],[28,46,26,25],[28,48,26,27],[29,6,27,8,"checkInstance"],[29,19,27,21],[29,20,27,22,"created"],[29,27,27,29],[29,29,27,31],[29,33,27,31,"u8aToU8a"],[29,46,27,39],[29,47,27,39,"u8aToU8a"],[29,55,27,39],[29,57,27,40,"value"],[29,62,27,45],[29,63,27,46],[29,64,27,47],[30,4,28,4],[31,2,29,0],[32,2,30,0],[32,11,30,9,"initType"],[32,19,30,17,"initType"],[32,20,30,18,"registry"],[32,28,30,26],[32,30,30,28,"Type"],[32,34,30,32],[32,36,30,34,"params"],[32,42,30,40],[32,45,30,43],[32,47,30,45],[32,49,30,47],[33,4,30,49,"blockHash"],[33,13,30,58],[34,4,30,60,"isFallback"],[34,14,30,70],[35,4,30,72,"isOptional"],[35,14,30,82],[36,4,30,84,"isPedantic"],[37,2,30,95],[37,3,30,96],[37,6,30,99],[37,7,30,100],[37,8,30,101],[37,10,30,103],[38,4,31,4],[38,10,31,10,"created"],[38,17,31,17],[38,20,31,20],[38,25,31,25,"isOptional"],[38,35,31,35],[38,38,32,10,"Option"],[38,57,32,16],[38,58,32,16,"Option"],[38,64,32,16],[38,65,32,17,"with"],[38,69,32,21],[38,70,32,22,"Type"],[38,74,32,26],[38,75,32,27],[38,78,33,10,"Type"],[38,82,33,14],[38,84,33,16,"registry"],[38,92,33,24],[38,94,33,26],[38,97,33,29,"params"],[38,103,33,35],[38,104,33,36],[39,4,34,4,"isPedantic"],[39,14,34,14],[39,18,34,18,"checkPedantic"],[39,31,34,31],[39,32,34,32,"created"],[39,39,34,39],[39,41,34,41,"params"],[39,47,34,47],[39,48,34,48],[40,4,35,4],[40,8,35,8,"blockHash"],[40,17,35,17],[40,19,35,19],[41,6,36,8,"created"],[41,13,36,15],[41,14,36,16,"createdAtHash"],[41,27,36,29],[41,30,36,32,"createTypeUnsafe"],[41,46,36,48],[41,47,36,49,"registry"],[41,55,36,57],[41,57,36,59],[41,68,36,70],[41,70,36,72],[41,71,36,73,"blockHash"],[41,80,36,82],[41,81,36,83],[41,82,36,84],[42,4,37,4],[43,4,38,4],[43,8,38,8,"isFallback"],[43,18,38,18],[43,20,38,20],[44,6,39,8,"created"],[44,13,39,15],[44,14,39,16,"isStorageFallback"],[44,31,39,33],[44,34,39,36],[44,38,39,40],[45,4,40,4],[46,4,41,4],[46,11,41,11,"created"],[46,18,41,18],[47,2,42,0],[48,2,43,7],[48,11,43,16,"createTypeUnsafe"],[48,27,43,32,"createTypeUnsafe"],[48,28,43,33,"registry"],[48,36,43,41],[48,38,43,43,"type"],[48,42,43,47],[48,44,43,49,"params"],[48,50,43,55],[48,53,43,58],[48,55,43,60],[48,57,43,62,"options"],[48,64,43,69],[48,67,43,72],[48,68,43,73],[48,69,43,74],[48,71,43,76],[49,4,44,4],[49,8,44,8,"Clazz"],[49,13,44,13],[49,16,44,16],[49,20,44,20],[50,4,45,4],[50,8,45,8,"firstError"],[50,18,45,18],[50,21,45,21],[50,25,45,25],[51,4,46,4],[51,8,46,8],[52,6,47,8,"Clazz"],[52,11,47,13],[52,14,47,16],[52,18,47,16,"createClassUnsafe"],[52,26,47,33],[52,27,47,33,"createClassUnsafe"],[52,44,47,33],[52,46,47,34,"registry"],[52,54,47,42],[52,56,47,44,"type"],[52,60,47,48],[52,61,47,49],[53,6,48,8],[53,13,48,15,"initType"],[53,21,48,23],[53,22,48,24,"registry"],[53,30,48,32],[53,32,48,34,"Clazz"],[53,37,48,39],[53,39,48,41,"params"],[53,45,48,47],[53,47,48,49,"options"],[53,54,48,56],[53,55,48,57],[54,4,49,4],[54,5,49,5],[54,6,50,4],[54,13,50,11,"error"],[54,18,50,16],[54,20,50,18],[55,6,51,8,"firstError"],[55,16,51,18],[55,19,51,21],[55,23,51,25,"Error"],[55,28,51,30],[55,29,51,31],[55,43,51,45,"type"],[55,47,51,49],[55,54,51,56,"error"],[55,59,51,61],[55,60,51,62,"message"],[55,67,51,69],[55,69,51,71],[55,70,51,72],[56,4,52,4],[57,4,53,4],[57,8,53,8,"Clazz"],[57,13,53,13],[57,15,53,15,"__fallbackType"],[57,29,53,29],[57,31,53,31],[58,6,54,8],[58,10,54,12],[59,8,55,12,"Clazz"],[59,13,55,17],[59,16,55,20],[59,20,55,20,"createClassUnsafe"],[59,28,55,37],[59,29,55,37,"createClassUnsafe"],[59,46,55,37],[59,48,55,38,"registry"],[59,56,55,46],[59,58,55,48,"Clazz"],[59,63,55,53],[59,64,55,54,"__fallbackType"],[59,78,55,68],[59,79,55,69],[60,8,56,12],[60,15,56,19,"initType"],[60,23,56,27],[60,24,56,28,"registry"],[60,32,56,36],[60,34,56,38,"Clazz"],[60,39,56,43],[60,41,56,45,"params"],[60,47,56,51],[60,49,56,53,"options"],[60,56,56,60],[60,57,56,61],[61,6,57,8],[61,7,57,9],[61,8,58,8],[61,14,58,14],[62,8,59,12],[63,6,59,12],[64,4,61,4],[65,4,62,4],[65,10,62,10,"firstError"],[65,20,62,20],[66,2,63,0],[67,0,63,1],[67,3]],"functionMap":{"names":["<global>","checkInstance","matcher.every$argument_0","checkPedantic","initType","createTypeUnsafe"],"mappings":"AAA;ACG;0BCa,SD;CDI;AGC;CHO;AIC;CJY;OKC;CLoB"},"hasCjsExports":false},"type":"js/module"}]} |