{"dependencies":[{"name":"./utils","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":32,"index":32}}],"key":"Arg6QRuIuy5D/jfcnxX1qJiHjX8=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n var Utils = require(_dependencyMap[0], \"./utils\");\n var G15 = 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0;\n var G15_MASK = 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1;\n var G15_BCH = Utils.getBCHDigit(G15);\n\n /**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\n exports.getEncodedBits = function getEncodedBits(errorCorrectionLevel, mask) {\n var data = errorCorrectionLevel.bit << 3 | mask;\n var d = data << 10;\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= G15 << Utils.getBCHDigit(d) - G15_BCH;\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return (data << 10 | d) ^ G15_MASK;\n };\n});","lineCount":29,"map":[[2,2,1,0],[2,6,1,6,"Utils"],[2,11,1,11],[2,14,1,14,"require"],[2,21,1,21],[2,22,1,21,"_dependencyMap"],[2,36,1,21],[2,50,1,31],[2,51,1,32],[3,2,3,0],[3,6,3,6,"G15"],[3,9,3,9],[3,12,3,13],[3,13,3,14],[3,17,3,18],[3,19,3,20],[3,22,3,25],[3,23,3,26],[3,27,3,30],[3,28,3,32],[3,31,3,36],[3,32,3,37],[3,36,3,41],[3,37,3,43],[3,40,3,47],[3,41,3,48],[3,45,3,52],[3,46,3,54],[3,49,3,58],[3,50,3,59],[3,54,3,63],[3,55,3,65],[3,58,3,69],[3,59,3,70],[3,63,3,74],[3,64,3,76],[3,67,3,80],[3,68,3,81],[3,72,3,85],[3,73,3,87],[4,2,4,0],[4,6,4,6,"G15_MASK"],[4,14,4,14],[4,17,4,18],[4,18,4,19],[4,22,4,23],[4,24,4,25],[4,27,4,30],[4,28,4,31],[4,32,4,35],[4,34,4,38],[4,37,4,42],[4,38,4,43],[4,42,4,47],[4,44,4,50],[4,47,4,54],[4,48,4,55],[4,52,4,59],[4,53,4,61],[4,56,4,65],[4,57,4,66],[4,61,4,70],[4,62,4,72],[5,2,5,0],[5,6,5,6,"G15_BCH"],[5,13,5,13],[5,16,5,16,"Utils"],[5,21,5,21],[5,22,5,22,"getBCHDigit"],[5,33,5,33],[5,34,5,34,"G15"],[5,37,5,37],[5,38,5,38],[7,2,7,0],[8,0,8,0],[9,0,9,0],[10,0,10,0],[11,0,11,0],[12,0,12,0],[13,0,13,0],[14,0,14,0],[15,0,15,0],[16,0,16,0],[17,2,17,0,"exports"],[17,9,17,7],[17,10,17,8,"getEncodedBits"],[17,24,17,22],[17,27,17,25],[17,36,17,34,"getEncodedBits"],[17,50,17,48,"getEncodedBits"],[17,51,17,50,"errorCorrectionLevel"],[17,71,17,70],[17,73,17,72,"mask"],[17,77,17,76],[17,79,17,78],[18,4,18,2],[18,8,18,8,"data"],[18,12,18,12],[18,15,18,17,"errorCorrectionLevel"],[18,35,18,37],[18,36,18,38,"bit"],[18,39,18,41],[18,43,18,45],[18,44,18,46],[18,47,18,50,"mask"],[18,51,18,55],[19,4,19,2],[19,8,19,6,"d"],[19,9,19,7],[19,12,19,10,"data"],[19,16,19,14],[19,20,19,18],[19,22,19,20],[20,4,21,2],[20,11,21,9,"Utils"],[20,16,21,14],[20,17,21,15,"getBCHDigit"],[20,28,21,26],[20,29,21,27,"d"],[20,30,21,28],[20,31,21,29],[20,34,21,32,"G15_BCH"],[20,41,21,39],[20,45,21,43],[20,46,21,44],[20,48,21,46],[21,6,22,4,"d"],[21,7,22,5],[21,11,22,10,"G15"],[21,14,22,13],[21,18,22,18,"Utils"],[21,23,22,23],[21,24,22,24,"getBCHDigit"],[21,35,22,35],[21,36,22,36,"d"],[21,37,22,37],[21,38,22,38],[21,41,22,41,"G15_BCH"],[21,48,22,50],[22,4,23,2],[24,4,25,2],[25,4,26,2],[26,4,27,2],[27,4,28,2],[27,11,28,9],[27,12,28,11,"data"],[27,16,28,15],[27,20,28,19],[27,22,28,21],[27,25,28,25,"d"],[27,26,28,26],[27,30,28,30,"G15_MASK"],[27,38,28,38],[28,2,29,0],[28,3,29,1],[29,0,29,1],[29,3]],"functionMap":{"names":["","getEncodedBits"],"mappings":"AAA;yBCgB;CDY"},"hasCjsExports":true},"type":"js/module"}]}