auto-commit for 49610908-ca1e-46b7-8671-ad75c85b7aa2

This commit is contained in:
emergent-agent-e1
2025-11-08 11:08:44 +00:00
parent 0373b73c4f
commit 32d0877be4
340 changed files with 340 additions and 0 deletions
@@ -0,0 +1 @@
{"dependencies":[],"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.formatDecimal = formatDecimal;\n const NUMBER_REGEX = new RegExp('(\\\\d+?)(?=(\\\\d{3})+(?!\\\\d)|$)', 'g');\n /**\n * @name formatDecimal\n * @description Formats a number into string format with thousand separators\n */\n function formatDecimal(value, separator = ',') {\n // We can do this by adjusting the regx, however for the sake of clarity\n // we rather strip and re-add the negative sign in the output\n const isNegative = value[0].startsWith('-');\n const matched = isNegative ? value.substring(1).match(NUMBER_REGEX) : value.match(NUMBER_REGEX);\n return matched ? `${isNegative ? '-' : ''}${matched.join(separator)}` : value;\n }\n});","lineCount":20,"map":[[7,2,6,0,"exports"],[7,9,6,0],[7,10,6,0,"formatDecimal"],[7,23,6,0],[7,26,6,0,"formatDecimal"],[7,39,6,0],[8,2,1,0],[8,8,1,6,"NUMBER_REGEX"],[8,20,1,18],[8,23,1,21],[8,27,1,25,"RegExp"],[8,33,1,31],[8,34,1,32],[8,65,1,63],[8,67,1,65],[8,70,1,68],[8,71,1,69],[9,2,2,0],[10,0,3,0],[11,0,4,0],[12,0,5,0],[13,2,6,7],[13,11,6,16,"formatDecimal"],[13,24,6,29,"formatDecimal"],[13,25,6,30,"value"],[13,30,6,35],[13,32,6,37,"separator"],[13,41,6,46],[13,44,6,49],[13,47,6,52],[13,49,6,54],[14,4,7,4],[15,4,8,4],[16,4,9,4],[16,10,9,10,"isNegative"],[16,20,9,20],[16,23,9,23,"value"],[16,28,9,28],[16,29,9,29],[16,30,9,30],[16,31,9,31],[16,32,9,32,"startsWith"],[16,42,9,42],[16,43,9,43],[16,46,9,46],[16,47,9,47],[17,4,10,4],[17,10,10,10,"matched"],[17,17,10,17],[17,20,10,20,"isNegative"],[17,30,10,30],[17,33,11,10,"value"],[17,38,11,15],[17,39,11,16,"substring"],[17,48,11,25],[17,49,11,26],[17,50,11,27],[17,51,11,28],[17,52,11,29,"match"],[17,57,11,34],[17,58,11,35,"NUMBER_REGEX"],[17,70,11,47],[17,71,11,48],[17,74,12,10,"value"],[17,79,12,15],[17,80,12,16,"match"],[17,85,12,21],[17,86,12,22,"NUMBER_REGEX"],[17,98,12,34],[17,99,12,35],[18,4,13,4],[18,11,13,11,"matched"],[18,18,13,18],[18,21,14,10],[18,24,14,13,"isNegative"],[18,34,14,23],[18,37,14,26],[18,40,14,29],[18,43,14,32],[18,45,14,34],[18,48,14,37,"matched"],[18,55,14,44],[18,56,14,45,"join"],[18,60,14,49],[18,61,14,50,"separator"],[18,70,14,59],[18,71,14,60],[18,73,14,62],[18,76,15,10,"value"],[18,81,15,15],[19,2,16,0],[20,0,16,1],[20,3]],"functionMap":{"names":["<global>","formatDecimal"],"mappings":"AAA;OCK;CDU"},"hasCjsExports":false},"type":"js/module"}]}
@@ -0,0 +1 @@
{"dependencies":[],"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, \"REGEX_HEX_PREFIXED\", {\n enumerable: true,\n get: function () {\n return REGEX_HEX_PREFIXED;\n }\n });\n Object.defineProperty(exports, \"REGEX_HEX_NOPREFIX\", {\n enumerable: true,\n get: function () {\n return REGEX_HEX_NOPREFIX;\n }\n });\n exports.isHex = isHex;\n const REGEX_HEX_PREFIXED = /^0x[\\da-fA-F]+$/;\n const REGEX_HEX_NOPREFIX = /^[\\da-fA-F]+$/;\n /**\n * @name isHex\n * @summary Tests for a hex string.\n * @description\n * Checks to see if the input value is a `0x` prefixed hex string. Optionally (`bitLength` !== -1) checks to see if the bitLength is correct.\n * @example\n * <BR>\n *\n * ```javascript\n * import { isHex } from '@polkadot/util';\n *\n * isHex('0x1234'); // => true\n * isHex('0x1234', 8); // => false\n * ```\n */\n function isHex(value, bitLength = -1, ignoreLength) {\n return typeof value === 'string' && (value === '0x' || REGEX_HEX_PREFIXED.test(value)) && (bitLength === -1 ? ignoreLength || value.length % 2 === 0 : value.length === 2 + Math.ceil(bitLength / 4));\n }\n});","lineCount":40,"map":[[7,2,1,0,"Object"],[7,8,1,0],[7,9,1,0,"defineProperty"],[7,23,1,0],[7,24,1,0,"exports"],[7,31,1,0],[8,4,1,0,"enumerable"],[8,14,1,0],[9,4,1,0,"get"],[9,7,1,0],[9,18,1,0,"get"],[9,19,1,0],[10,6,1,0],[10,13,1,0,"REGEX_HEX_PREFIXED"],[10,31,1,0],[11,4,1,0],[12,2,1,0],[13,2,2,0,"Object"],[13,8,2,0],[13,9,2,0,"defineProperty"],[13,23,2,0],[13,24,2,0,"exports"],[13,31,2,0],[14,4,2,0,"enumerable"],[14,14,2,0],[15,4,2,0,"get"],[15,7,2,0],[15,18,2,0,"get"],[15,19,2,0],[16,6,2,0],[16,13,2,0,"REGEX_HEX_NOPREFIX"],[16,31,2,0],[17,4,2,0],[18,2,2,0],[19,2,18,0,"exports"],[19,9,18,0],[19,10,18,0,"isHex"],[19,15,18,0],[19,18,18,0,"isHex"],[19,23,18,0],[20,2,1,7],[20,8,1,13,"REGEX_HEX_PREFIXED"],[20,26,1,31],[20,29,1,34],[20,46,1,51],[21,2,2,7],[21,8,2,13,"REGEX_HEX_NOPREFIX"],[21,26,2,31],[21,29,2,34],[21,44,2,49],[22,2,3,0],[23,0,4,0],[24,0,5,0],[25,0,6,0],[26,0,7,0],[27,0,8,0],[28,0,9,0],[29,0,10,0],[30,0,11,0],[31,0,12,0],[32,0,13,0],[33,0,14,0],[34,0,15,0],[35,0,16,0],[36,0,17,0],[37,2,18,7],[37,11,18,16,"isHex"],[37,16,18,21,"isHex"],[37,17,18,22,"value"],[37,22,18,27],[37,24,18,29,"bitLength"],[37,33,18,38],[37,36,18,41],[37,37,18,42],[37,38,18,43],[37,40,18,45,"ignoreLength"],[37,52,18,57],[37,54,18,59],[38,4,19,4],[38,11,19,12],[38,18,19,19,"value"],[38,23,19,24],[38,28,19,29],[38,36,19,37],[38,41,19,42,"value"],[38,46,19,47],[38,51,19,52],[38,55,19,56],[38,59,20,8,"REGEX_HEX_PREFIXED"],[38,77,20,26],[38,78,20,27,"test"],[38,82,20,31],[38,83,20,32,"value"],[38,88,20,37],[38,89,20,38],[38,90,20,39],[38,95,20,45,"bitLength"],[38,104,20,54],[38,109,20,59],[38,110,20,60],[38,111,20,61],[38,114,21,11,"ignoreLength"],[38,126,21,23],[38,130,21,28,"value"],[38,135,21,33],[38,136,21,34,"length"],[38,142,21,40],[38,145,21,43],[38,146,21,44],[38,151,21,49],[38,152,21,51],[38,155,22,11,"value"],[38,160,22,16],[38,161,22,17,"length"],[38,167,22,23],[38,172,22,29],[38,173,22,30],[38,176,22,33,"Math"],[38,180,22,37],[38,181,22,38,"ceil"],[38,185,22,42],[38,186,22,43,"bitLength"],[38,195,22,52],[38,198,22,55],[38,199,22,56],[38,200,22,59],[38,201,22,60],[39,2,23,0],[40,0,23,1],[40,3]],"functionMap":{"names":["<global>","isHex"],"mappings":"AAA;OCiB;CDK"},"hasCjsExports":false},"type":"js/module"}]}