mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 10:01:02 +00:00
1 line
5.7 KiB
Plaintext
1 line
5.7 KiB
Plaintext
{"dependencies":[],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n const EXP_TABLE = new Uint8Array(512);\n const LOG_TABLE = new Uint8Array(256)\n /**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */;\n (function initTables() {\n let x = 1;\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x;\n LOG_TABLE[x] = i;\n x <<= 1; // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) {\n // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D;\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255];\n }\n })();\n\n /**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\n exports.log = function log(n) {\n if (n < 1) throw new Error('log(' + n + ')');\n return LOG_TABLE[n];\n };\n\n /**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\n exports.exp = function exp(n) {\n return EXP_TABLE[n];\n };\n\n /**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\n exports.mul = function mul(x, y) {\n if (x === 0 || y === 0) return 0;\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]];\n };\n});","lineCount":71,"map":[[2,2,1,0],[2,8,1,6,"EXP_TABLE"],[2,17,1,15],[2,20,1,18],[2,24,1,22,"Uint8Array"],[2,34,1,32],[2,35,1,33],[2,38,1,36],[2,39,1,37],[3,2,2,0],[3,8,2,6,"LOG_TABLE"],[3,17,2,15],[3,20,2,18],[3,24,2,22,"Uint8Array"],[3,34,2,32],[3,35,2,33],[3,38,2,36],[4,2,3,0],[5,0,4,0],[6,0,5,0],[7,0,6,0],[8,0,7,0],[9,0,8,0],[10,0,9,0],[11,0,10,0],[11,5,3,0],[12,2,11,2],[12,12,11,11,"initTables"],[12,22,11,21,"initTables"],[12,23,11,21],[12,25,11,25],[13,4,12,2],[13,8,12,6,"x"],[13,9,12,7],[13,12,12,10],[13,13,12,11],[14,4,13,2],[14,9,13,7],[14,13,13,11,"i"],[14,14,13,12],[14,17,13,15],[14,18,13,16],[14,20,13,18,"i"],[14,21,13,19],[14,24,13,22],[14,27,13,25],[14,29,13,27,"i"],[14,30,13,28],[14,32,13,30],[14,34,13,32],[15,6,14,4,"EXP_TABLE"],[15,15,14,13],[15,16,14,14,"i"],[15,17,14,15],[15,18,14,16],[15,21,14,19,"x"],[15,22,14,20],[16,6,15,4,"LOG_TABLE"],[16,15,15,13],[16,16,15,14,"x"],[16,17,15,15],[16,18,15,16],[16,21,15,19,"i"],[16,22,15,20],[17,6,17,4,"x"],[17,7,17,5],[17,12,17,10],[17,13,17,11],[17,15,17,12],[19,6,19,4],[20,6,20,4],[21,6,21,4],[21,10,21,8,"x"],[21,11,21,9],[21,14,21,12],[21,19,21,17],[21,21,21,19],[22,8,21,21],[23,8,22,6,"x"],[23,9,22,7],[23,13,22,11],[23,18,22,16],[24,6,23,4],[25,4,24,2],[27,4,26,2],[28,4,27,2],[29,4,28,2],[30,4,29,2],[31,4,30,2],[31,9,30,7],[31,13,30,11,"i"],[31,14,30,12],[31,17,30,15],[31,20,30,18],[31,22,30,20,"i"],[31,23,30,21],[31,26,30,24],[31,29,30,27],[31,31,30,29,"i"],[31,32,30,30],[31,34,30,32],[31,36,30,34],[32,6,31,4,"EXP_TABLE"],[32,15,31,13],[32,16,31,14,"i"],[32,17,31,15],[32,18,31,16],[32,21,31,19,"EXP_TABLE"],[32,30,31,28],[32,31,31,29,"i"],[32,32,31,30],[32,35,31,33],[32,38,31,36],[32,39,31,37],[33,4,32,2],[34,2,33,0],[34,3,33,1],[34,5,33,2],[34,6,33,3],[36,2,35,0],[37,0,36,0],[38,0,37,0],[39,0,38,0],[40,0,39,0],[41,0,40,0],[42,2,41,0,"exports"],[42,9,41,7],[42,10,41,8,"log"],[42,13,41,11],[42,16,41,14],[42,25,41,23,"log"],[42,28,41,26,"log"],[42,29,41,28,"n"],[42,30,41,29],[42,32,41,31],[43,4,42,2],[43,8,42,6,"n"],[43,9,42,7],[43,12,42,10],[43,13,42,11],[43,15,42,13],[43,21,42,19],[43,25,42,23,"Error"],[43,30,42,28],[43,31,42,29],[43,37,42,35],[43,40,42,38,"n"],[43,41,42,39],[43,44,42,42],[43,47,42,45],[43,48,42,46],[44,4,43,2],[44,11,43,9,"LOG_TABLE"],[44,20,43,18],[44,21,43,19,"n"],[44,22,43,20],[44,23,43,21],[45,2,44,0],[45,3,44,1],[47,2,46,0],[48,0,47,0],[49,0,48,0],[50,0,49,0],[51,0,50,0],[52,0,51,0],[53,2,52,0,"exports"],[53,9,52,7],[53,10,52,8,"exp"],[53,13,52,11],[53,16,52,14],[53,25,52,23,"exp"],[53,28,52,26,"exp"],[53,29,52,28,"n"],[53,30,52,29],[53,32,52,31],[54,4,53,2],[54,11,53,9,"EXP_TABLE"],[54,20,53,18],[54,21,53,19,"n"],[54,22,53,20],[54,23,53,21],[55,2,54,0],[55,3,54,1],[57,2,56,0],[58,0,57,0],[59,0,58,0],[60,0,59,0],[61,0,60,0],[62,0,61,0],[63,0,62,0],[64,2,63,0,"exports"],[64,9,63,7],[64,10,63,8,"mul"],[64,13,63,11],[64,16,63,14],[64,25,63,23,"mul"],[64,28,63,26,"mul"],[64,29,63,28,"x"],[64,30,63,29],[64,32,63,31,"y"],[64,33,63,32],[64,35,63,34],[65,4,64,2],[65,8,64,6,"x"],[65,9,64,7],[65,14,64,12],[65,15,64,13],[65,19,64,17,"y"],[65,20,64,18],[65,25,64,23],[65,26,64,24],[65,28,64,26],[65,35,64,33],[65,36,64,34],[67,4,66,2],[68,4,67,2],[69,4,68,2],[69,11,68,9,"EXP_TABLE"],[69,20,68,18],[69,21,68,19,"LOG_TABLE"],[69,30,68,28],[69,31,68,29,"x"],[69,32,68,30],[69,33,68,31],[69,36,68,34,"LOG_TABLE"],[69,45,68,43],[69,46,68,44,"y"],[69,47,68,45],[69,48,68,46],[69,49,68,47],[70,2,69,0],[70,3,69,1],[71,0,69,1],[71,3]],"functionMap":{"names":["<global>","initTables","log","exp","mul"],"mappings":"AAA;ECU;CDsB;cEQ;CFG;cGQ;CHE;cIS;CJM"},"hasCjsExports":true},"type":"js/module"}]} |