{"dependencies":[{"name":"@babel/runtime/helpers/slicedToArray","data":{"asyncType":null,"isESMImport":false,"locs":[],"key":"5y7e5+zC7teYEEC6niD9f5zII1M=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":131},"end":{"line":4,"column":40,"index":156}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","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.augmentObject = augmentObject;\n var util_1 = require(_dependencyMap[1], \"@polkadot/util\");\n var l = (0, util_1.logger)('api/augment');\n function logLength(type, values) {\n var and = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return values.length ? ` ${values.length} ${type}${and.length ? ' and' : ''}` : '';\n }\n function logValues(type, values) {\n return values.length ? `\\n\\t${type.padStart(7)}: ${values.sort().join(', ')}` : '';\n }\n function warn(prefix, type, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n added = _ref2[0],\n removed = _ref2[1];\n if (added.length || removed.length) {\n l.warn(`api.${prefix}: Found${logLength('added', added, removed)}${logLength('removed', removed)} ${type}:${logValues('added', added)}${logValues('removed', removed)}`);\n }\n }\n function findSectionExcludes(a, b) {\n return a.filter(function (s) {\n return !b.includes(s);\n });\n }\n function findSectionIncludes(a, b) {\n return a.filter(function (s) {\n return b.includes(s);\n });\n }\n function extractSections(src, dst) {\n var srcSections = Object.keys(src);\n var dstSections = Object.keys(dst);\n return [findSectionExcludes(srcSections, dstSections), findSectionExcludes(dstSections, srcSections)];\n }\n function findMethodExcludes(src, dst) {\n var srcSections = Object.keys(src);\n var dstSections = findSectionIncludes(Object.keys(dst), srcSections);\n var excludes = [];\n for (var s = 0, scount = dstSections.length; s < scount; s++) {\n var section = dstSections[s];\n var srcMethods = Object.keys(src[section]);\n var dstMethods = Object.keys(dst[section]);\n for (var d = 0, mcount = dstMethods.length; d < mcount; d++) {\n var method = dstMethods[d];\n if (!srcMethods.includes(method)) {\n excludes.push(`${section}.${method}`);\n }\n }\n }\n return excludes;\n }\n function extractMethods(src, dst) {\n return [findMethodExcludes(dst, src), findMethodExcludes(src, dst)];\n }\n /**\n * @description Takes a decorated api section (e.g. api.tx) and augment it with the details. It does not override what is\n * already available, but rather just adds new missing items into the result object.\n * @internal\n */\n function augmentObject(prefix, src, dst) {\n var fromEmpty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n fromEmpty && (0, util_1.objectClear)(dst);\n // NOTE: This part is slightly problematic since it will get the\n // values for at least all the sections and the names of the methods\n // (Since methods won't be decorated before lazy, this _may_ be ok)\n if (prefix && Object.keys(dst).length) {\n warn(prefix, 'modules', extractSections(src, dst));\n warn(prefix, 'calls', extractMethods(src, dst));\n }\n var sections = Object.keys(src);\n var _loop = function _loop() {\n var section = sections[i];\n var methods = src[section];\n // We don't set here with a lazy interface, we decorate based\n // on the top-level structure (this bypasses adding lazy onto lazy)\n if (!dst[section]) {\n dst[section] = {};\n }\n (0, util_1.lazyMethods)(dst[section], Object.keys(methods), function (m) {\n return methods[m];\n });\n };\n for (var i = 0, count = sections.length; i < count; i++) {\n _loop();\n }\n return dst;\n }\n});","lineCount":94,"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,"augmentObject"],[8,23,3,21],[8,26,3,24,"augmentObject"],[8,39,3,37],[9,2,4,0],[9,6,4,6,"util_1"],[9,12,4,12],[9,15,4,15,"require"],[9,22,4,22],[9,23,4,22,"_dependencyMap"],[9,37,4,22],[9,58,4,39],[9,59,4,40],[10,2,5,0],[10,6,5,6,"l"],[10,7,5,7],[10,10,5,10],[10,11,5,11],[10,12,5,12],[10,14,5,14,"util_1"],[10,20,5,20],[10,21,5,21,"logger"],[10,27,5,27],[10,29,5,29],[10,42,5,42],[10,43,5,43],[11,2,6,0],[11,11,6,9,"logLength"],[11,20,6,18,"logLength"],[11,21,6,19,"type"],[11,25,6,23],[11,27,6,25,"values"],[11,33,6,31],[11,35,6,43],[12,4,6,43],[12,8,6,33,"and"],[12,11,6,36],[12,14,6,36,"arguments"],[12,23,6,36],[12,24,6,36,"length"],[12,30,6,36],[12,38,6,36,"arguments"],[12,47,6,36],[12,55,6,36,"undefined"],[12,64,6,36],[12,67,6,36,"arguments"],[12,76,6,36],[12,82,6,39],[12,84,6,41],[13,4,7,4],[13,11,7,11,"values"],[13,17,7,17],[13,18,7,18,"length"],[13,24,7,24],[13,27,8,10],[13,31,8,14,"values"],[13,37,8,20],[13,38,8,21,"length"],[13,44,8,27],[13,48,8,31,"type"],[13,52,8,35],[13,55,8,38,"and"],[13,58,8,41],[13,59,8,42,"length"],[13,65,8,48],[13,68,8,51],[13,74,8,57],[13,77,8,60],[13,79,8,62],[13,81,8,64],[13,84,9,10],[13,86,9,12],[14,2,10,0],[15,2,11,0],[15,11,11,9,"logValues"],[15,20,11,18,"logValues"],[15,21,11,19,"type"],[15,25,11,23],[15,27,11,25,"values"],[15,33,11,31],[15,35,11,33],[16,4,12,4],[16,11,12,11,"values"],[16,17,12,17],[16,18,12,18,"length"],[16,24,12,24],[16,27,13,10],[16,34,13,17,"type"],[16,38,13,21],[16,39,13,22,"padStart"],[16,47,13,30],[16,48,13,31],[16,49,13,32],[16,50,13,33],[16,55,13,38,"values"],[16,61,13,44],[16,62,13,45,"sort"],[16,66,13,49],[16,67,13,50],[16,68,13,51],[16,69,13,52,"join"],[16,73,13,56],[16,74,13,57],[16,78,13,61],[16,79,13,62],[16,81,13,64],[16,84,14,10],[16,86,14,12],[17,2,15,0],[18,2,16,0],[18,11,16,9,"warn"],[18,15,16,13,"warn"],[18,16,16,14,"prefix"],[18,22,16,20],[18,24,16,22,"type"],[18,28,16,26],[18,30,16,26,"_ref"],[18,34,16,26],[18,36,16,46],[19,4,16,46],[19,8,16,46,"_ref2"],[19,13,16,46],[19,16,16,46,"_slicedToArray"],[19,30,16,46],[19,31,16,46,"_ref"],[19,35,16,46],[20,6,16,29,"added"],[20,11,16,34],[20,14,16,34,"_ref2"],[20,19,16,34],[21,6,16,36,"removed"],[21,13,16,43],[21,16,16,43,"_ref2"],[21,21,16,43],[22,4,17,4],[22,8,17,8,"added"],[22,13,17,13],[22,14,17,14,"length"],[22,20,17,20],[22,24,17,24,"removed"],[22,31,17,31],[22,32,17,32,"length"],[22,38,17,38],[22,40,17,40],[23,6,18,8,"l"],[23,7,18,9],[23,8,18,10,"warn"],[23,12,18,14],[23,13,18,15],[23,20,18,22,"prefix"],[23,26,18,28],[23,36,18,38,"logLength"],[23,45,18,47],[23,46,18,48],[23,53,18,55],[23,55,18,57,"added"],[23,60,18,62],[23,62,18,64,"removed"],[23,69,18,71],[23,70,18,72],[23,73,18,75,"logLength"],[23,82,18,84],[23,83,18,85],[23,92,18,94],[23,94,18,96,"removed"],[23,101,18,103],[23,102,18,104],[23,106,18,108,"type"],[23,110,18,112],[23,114,18,116,"logValues"],[23,123,18,125],[23,124,18,126],[23,131,18,133],[23,133,18,135,"added"],[23,138,18,140],[23,139,18,141],[23,142,18,144,"logValues"],[23,151,18,153],[23,152,18,154],[23,161,18,163],[23,163,18,165,"removed"],[23,170,18,172],[23,171,18,173],[23,173,18,175],[23,174,18,176],[24,4,19,4],[25,2,20,0],[26,2,21,0],[26,11,21,9,"findSectionExcludes"],[26,30,21,28,"findSectionExcludes"],[26,31,21,29,"a"],[26,32,21,30],[26,34,21,32,"b"],[26,35,21,33],[26,37,21,35],[27,4,22,4],[27,11,22,11,"a"],[27,12,22,12],[27,13,22,13,"filter"],[27,19,22,19],[27,20,22,20],[27,30,22,21,"s"],[27,31,22,22],[28,6,22,22],[28,13,22,27],[28,14,22,28,"b"],[28,15,22,29],[28,16,22,30,"includes"],[28,24,22,38],[28,25,22,39,"s"],[28,26,22,40],[28,27,22,41],[29,4,22,41],[29,6,22,42],[30,2,23,0],[31,2,24,0],[31,11,24,9,"findSectionIncludes"],[31,30,24,28,"findSectionIncludes"],[31,31,24,29,"a"],[31,32,24,30],[31,34,24,32,"b"],[31,35,24,33],[31,37,24,35],[32,4,25,4],[32,11,25,11,"a"],[32,12,25,12],[32,13,25,13,"filter"],[32,19,25,19],[32,20,25,20],[32,30,25,21,"s"],[32,31,25,22],[33,6,25,22],[33,13,25,27,"b"],[33,14,25,28],[33,15,25,29,"includes"],[33,23,25,37],[33,24,25,38,"s"],[33,25,25,39],[33,26,25,40],[34,4,25,40],[34,6,25,41],[35,2,26,0],[36,2,27,0],[36,11,27,9,"extractSections"],[36,26,27,24,"extractSections"],[36,27,27,25,"src"],[36,30,27,28],[36,32,27,30,"dst"],[36,35,27,33],[36,37,27,35],[37,4,28,4],[37,8,28,10,"srcSections"],[37,19,28,21],[37,22,28,24,"Object"],[37,28,28,30],[37,29,28,31,"keys"],[37,33,28,35],[37,34,28,36,"src"],[37,37,28,39],[37,38,28,40],[38,4,29,4],[38,8,29,10,"dstSections"],[38,19,29,21],[38,22,29,24,"Object"],[38,28,29,30],[38,29,29,31,"keys"],[38,33,29,35],[38,34,29,36,"dst"],[38,37,29,39],[38,38,29,40],[39,4,30,4],[39,11,30,11],[39,12,31,8,"findSectionExcludes"],[39,31,31,27],[39,32,31,28,"srcSections"],[39,43,31,39],[39,45,31,41,"dstSections"],[39,56,31,52],[39,57,31,53],[39,59,32,8,"findSectionExcludes"],[39,78,32,27],[39,79,32,28,"dstSections"],[39,90,32,39],[39,92,32,41,"srcSections"],[39,103,32,52],[39,104,32,53],[39,105,33,5],[40,2,34,0],[41,2,35,0],[41,11,35,9,"findMethodExcludes"],[41,29,35,27,"findMethodExcludes"],[41,30,35,28,"src"],[41,33,35,31],[41,35,35,33,"dst"],[41,38,35,36],[41,40,35,38],[42,4,36,4],[42,8,36,10,"srcSections"],[42,19,36,21],[42,22,36,24,"Object"],[42,28,36,30],[42,29,36,31,"keys"],[42,33,36,35],[42,34,36,36,"src"],[42,37,36,39],[42,38,36,40],[43,4,37,4],[43,8,37,10,"dstSections"],[43,19,37,21],[43,22,37,24,"findSectionIncludes"],[43,41,37,43],[43,42,37,44,"Object"],[43,48,37,50],[43,49,37,51,"keys"],[43,53,37,55],[43,54,37,56,"dst"],[43,57,37,59],[43,58,37,60],[43,60,37,62,"srcSections"],[43,71,37,73],[43,72,37,74],[44,4,38,4],[44,8,38,10,"excludes"],[44,16,38,18],[44,19,38,21],[44,21,38,23],[45,4,39,4],[45,9,39,9],[45,13,39,13,"s"],[45,14,39,14],[45,17,39,17],[45,18,39,18],[45,20,39,20,"scount"],[45,26,39,26],[45,29,39,29,"dstSections"],[45,40,39,40],[45,41,39,41,"length"],[45,47,39,47],[45,49,39,49,"s"],[45,50,39,50],[45,53,39,53,"scount"],[45,59,39,59],[45,61,39,61,"s"],[45,62,39,62],[45,64,39,64],[45,66,39,66],[46,6,40,8],[46,10,40,14,"section"],[46,17,40,21],[46,20,40,24,"dstSections"],[46,31,40,35],[46,32,40,36,"s"],[46,33,40,37],[46,34,40,38],[47,6,41,8],[47,10,41,14,"srcMethods"],[47,20,41,24],[47,23,41,27,"Object"],[47,29,41,33],[47,30,41,34,"keys"],[47,34,41,38],[47,35,41,39,"src"],[47,38,41,42],[47,39,41,43,"section"],[47,46,41,50],[47,47,41,51],[47,48,41,52],[48,6,42,8],[48,10,42,14,"dstMethods"],[48,20,42,24],[48,23,42,27,"Object"],[48,29,42,33],[48,30,42,34,"keys"],[48,34,42,38],[48,35,42,39,"dst"],[48,38,42,42],[48,39,42,43,"section"],[48,46,42,50],[48,47,42,51],[48,48,42,52],[49,6,43,8],[49,11,43,13],[49,15,43,17,"d"],[49,16,43,18],[49,19,43,21],[49,20,43,22],[49,22,43,24,"mcount"],[49,28,43,30],[49,31,43,33,"dstMethods"],[49,41,43,43],[49,42,43,44,"length"],[49,48,43,50],[49,50,43,52,"d"],[49,51,43,53],[49,54,43,56,"mcount"],[49,60,43,62],[49,62,43,64,"d"],[49,63,43,65],[49,65,43,67],[49,67,43,69],[50,8,44,12],[50,12,44,18,"method"],[50,18,44,24],[50,21,44,27,"dstMethods"],[50,31,44,37],[50,32,44,38,"d"],[50,33,44,39],[50,34,44,40],[51,8,45,12],[51,12,45,16],[51,13,45,17,"srcMethods"],[51,23,45,27],[51,24,45,28,"includes"],[51,32,45,36],[51,33,45,37,"method"],[51,39,45,43],[51,40,45,44],[51,42,45,46],[52,10,46,16,"excludes"],[52,18,46,24],[52,19,46,25,"push"],[52,23,46,29],[52,24,46,30],[52,27,46,33,"section"],[52,34,46,40],[52,38,46,44,"method"],[52,44,46,50],[52,46,46,52],[52,47,46,53],[53,8,47,12],[54,6,48,8],[55,4,49,4],[56,4,50,4],[56,11,50,11,"excludes"],[56,19,50,19],[57,2,51,0],[58,2,52,0],[58,11,52,9,"extractMethods"],[58,25,52,23,"extractMethods"],[58,26,52,24,"src"],[58,29,52,27],[58,31,52,29,"dst"],[58,34,52,32],[58,36,52,34],[59,4,53,4],[59,11,53,11],[59,12,54,8,"findMethodExcludes"],[59,30,54,26],[59,31,54,27,"dst"],[59,34,54,30],[59,36,54,32,"src"],[59,39,54,35],[59,40,54,36],[59,42,55,8,"findMethodExcludes"],[59,60,55,26],[59,61,55,27,"src"],[59,64,55,30],[59,66,55,32,"dst"],[59,69,55,35],[59,70,55,36],[59,71,56,5],[60,2,57,0],[61,2,58,0],[62,0,59,0],[63,0,60,0],[64,0,61,0],[65,0,62,0],[66,2,63,0],[66,11,63,9,"augmentObject"],[66,24,63,22,"augmentObject"],[66,25,63,23,"prefix"],[66,31,63,29],[66,33,63,31,"src"],[66,36,63,34],[66,38,63,36,"dst"],[66,41,63,39],[66,43,63,60],[67,4,63,60],[67,8,63,41,"fromEmpty"],[67,17,63,50],[67,20,63,50,"arguments"],[67,29,63,50],[67,30,63,50,"length"],[67,36,63,50],[67,44,63,50,"arguments"],[67,53,63,50],[67,61,63,50,"undefined"],[67,70,63,50],[67,73,63,50,"arguments"],[67,82,63,50],[67,88,63,53],[67,93,63,58],[68,4,64,4,"fromEmpty"],[68,13,64,13],[68,17,64,17],[68,18,64,18],[68,19,64,19],[68,21,64,21,"util_1"],[68,27,64,27],[68,28,64,28,"objectClear"],[68,39,64,39],[68,41,64,41,"dst"],[68,44,64,44],[68,45,64,45],[69,4,65,4],[70,4,66,4],[71,4,67,4],[72,4,68,4],[72,8,68,8,"prefix"],[72,14,68,14],[72,18,68,18,"Object"],[72,24,68,24],[72,25,68,25,"keys"],[72,29,68,29],[72,30,68,30,"dst"],[72,33,68,33],[72,34,68,34],[72,35,68,35,"length"],[72,41,68,41],[72,43,68,43],[73,6,69,8,"warn"],[73,10,69,12],[73,11,69,13,"prefix"],[73,17,69,19],[73,19,69,21],[73,28,69,30],[73,30,69,32,"extractSections"],[73,45,69,47],[73,46,69,48,"src"],[73,49,69,51],[73,51,69,53,"dst"],[73,54,69,56],[73,55,69,57],[73,56,69,58],[74,6,70,8,"warn"],[74,10,70,12],[74,11,70,13,"prefix"],[74,17,70,19],[74,19,70,21],[74,26,70,28],[74,28,70,30,"extractMethods"],[74,42,70,44],[74,43,70,45,"src"],[74,46,70,48],[74,48,70,50,"dst"],[74,51,70,53],[74,52,70,54],[74,53,70,55],[75,4,71,4],[76,4,72,4],[76,8,72,10,"sections"],[76,16,72,18],[76,19,72,21,"Object"],[76,25,72,27],[76,26,72,28,"keys"],[76,30,72,32],[76,31,72,33,"src"],[76,34,72,36],[76,35,72,37],[77,4,72,38],[77,8,72,38,"_loop"],[77,13,72,38],[77,25,72,38,"_loop"],[77,31,72,38],[77,33,73,61],[78,6,74,8],[78,10,74,14,"section"],[78,17,74,21],[78,20,74,24,"sections"],[78,28,74,32],[78,29,74,33,"i"],[78,30,74,34],[78,31,74,35],[79,6,75,8],[79,10,75,14,"methods"],[79,17,75,21],[79,20,75,24,"src"],[79,23,75,27],[79,24,75,28,"section"],[79,31,75,35],[79,32,75,36],[80,6,76,8],[81,6,77,8],[82,6,78,8],[82,10,78,12],[82,11,78,13,"dst"],[82,14,78,16],[82,15,78,17,"section"],[82,22,78,24],[82,23,78,25],[82,25,78,27],[83,8,79,12,"dst"],[83,11,79,15],[83,12,79,16,"section"],[83,19,79,23],[83,20,79,24],[83,23,79,27],[83,24,79,28],[83,25,79,29],[84,6,80,8],[85,6,81,8],[85,7,81,9],[85,8,81,10],[85,10,81,12,"util_1"],[85,16,81,18],[85,17,81,19,"lazyMethods"],[85,28,81,30],[85,30,81,32,"dst"],[85,33,81,35],[85,34,81,36,"section"],[85,41,81,43],[85,42,81,44],[85,44,81,46,"Object"],[85,50,81,52],[85,51,81,53,"keys"],[85,55,81,57],[85,56,81,58,"methods"],[85,63,81,65],[85,64,81,66],[85,66,81,68],[85,76,81,69,"m"],[85,77,81,70],[86,8,81,70],[86,15,81,75,"methods"],[86,22,81,82],[86,23,81,83,"m"],[86,24,81,84],[86,25,81,85],[87,6,81,85],[87,8,81,86],[88,4,82,4],[88,5,82,5],[89,4,73,4],[89,9,73,9],[89,13,73,13,"i"],[89,14,73,14],[89,17,73,17],[89,18,73,18],[89,20,73,20,"count"],[89,25,73,25],[89,28,73,28,"sections"],[89,36,73,36],[89,37,73,37,"length"],[89,43,73,43],[89,45,73,45,"i"],[89,46,73,46],[89,49,73,49,"count"],[89,54,73,54],[89,56,73,56,"i"],[89,57,73,57],[89,59,73,59],[90,6,73,59,"_loop"],[90,11,73,59],[91,4,73,59],[92,4,83,4],[92,11,83,11,"dst"],[92,14,83,14],[93,2,84,0],[94,0,84,1],[94,3]],"functionMap":{"names":["","logLength","logValues","warn","findSectionExcludes","a.filter$argument_0","findSectionIncludes","extractSections","findMethodExcludes","extractMethods","augmentObject",""],"mappings":"AAA;ACK;CDI;AEC;CFI;AGC;CHI;AIC;oBCC,qBD;CJC;AMC;oBDC,oBC;CNC;AOC;CPO;AQC;CRgB;ASC;CTK;AUM;oECkB,iBD;CVG"},"hasCjsExports":true},"type":"js/module"}]}