asterui 0.10.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +12 -9
  2. package/dist/components/Segmented.d.ts +37 -0
  3. package/dist/components/Tour.d.ts +61 -0
  4. package/dist/hooks/useClickOutside.d.ts +17 -0
  5. package/dist/hooks/useClipboard.d.ts +20 -0
  6. package/dist/hooks/useDebounce.d.ts +18 -0
  7. package/dist/hooks/useDisclosure.d.ts +20 -0
  8. package/dist/hooks/useHover.d.ts +18 -0
  9. package/dist/hooks/useKeyPress.d.ts +40 -0
  10. package/dist/hooks/useLocalStorage.d.ts +12 -0
  11. package/dist/hooks/usePrevious.d.ts +15 -0
  12. package/dist/hooks/useWindowSize.d.ts +21 -0
  13. package/dist/index.d.ts +18 -0
  14. package/dist/index.js +143 -120
  15. package/dist/index.js.map +1 -1
  16. package/dist/index100.js +5 -21
  17. package/dist/index100.js.map +1 -1
  18. package/dist/index101.js +41 -23
  19. package/dist/index101.js.map +1 -1
  20. package/dist/index102.js +2 -20
  21. package/dist/index102.js.map +1 -1
  22. package/dist/index103.js +6 -99
  23. package/dist/index103.js.map +1 -1
  24. package/dist/index104.js +149 -357
  25. package/dist/index104.js.map +1 -1
  26. package/dist/index105.js +28 -23
  27. package/dist/index105.js.map +1 -1
  28. package/dist/index106.js +28 -71
  29. package/dist/index106.js.map +1 -1
  30. package/dist/index107.js +2 -16
  31. package/dist/index107.js.map +1 -1
  32. package/dist/index108.js +71 -65
  33. package/dist/index108.js.map +1 -1
  34. package/dist/index109.js +34 -139
  35. package/dist/index109.js.map +1 -1
  36. package/dist/index110.js +26 -2
  37. package/dist/index110.js.map +1 -1
  38. package/dist/index111.js +20 -55
  39. package/dist/index111.js.map +1 -1
  40. package/dist/index112.js +24 -2
  41. package/dist/index112.js.map +1 -1
  42. package/dist/index113.js +20 -2
  43. package/dist/index113.js.map +1 -1
  44. package/dist/index114.js +100 -2
  45. package/dist/index114.js.map +1 -1
  46. package/dist/index115.js +360 -2
  47. package/dist/index115.js.map +1 -1
  48. package/dist/index116.js +25 -2
  49. package/dist/index116.js.map +1 -1
  50. package/dist/index117.js +73 -2
  51. package/dist/index117.js.map +1 -1
  52. package/dist/index118.js +16 -2
  53. package/dist/index118.js.map +1 -1
  54. package/dist/index119.js +66 -2
  55. package/dist/index119.js.map +1 -1
  56. package/dist/index120.js +140 -28
  57. package/dist/index120.js.map +1 -1
  58. package/dist/index121.js +2 -2
  59. package/dist/index122.js +55 -7
  60. package/dist/index122.js.map +1 -1
  61. package/dist/index123.js +2 -2
  62. package/dist/index124.js +2 -2
  63. package/dist/index125.js +2 -21
  64. package/dist/index125.js.map +1 -1
  65. package/dist/index126.js +2 -2
  66. package/dist/index127.js +2 -24
  67. package/dist/index127.js.map +1 -1
  68. package/dist/index128.js +2 -71
  69. package/dist/index128.js.map +1 -1
  70. package/dist/index129.js +2 -21
  71. package/dist/index129.js.map +1 -1
  72. package/dist/index130.js +31 -33
  73. package/dist/index130.js.map +1 -1
  74. package/dist/index131.js +2 -70
  75. package/dist/index131.js.map +1 -1
  76. package/dist/index132.js +8 -2
  77. package/dist/index132.js.map +1 -1
  78. package/dist/index133.js +2 -22
  79. package/dist/index133.js.map +1 -1
  80. package/dist/index135.js +21 -2
  81. package/dist/index135.js.map +1 -1
  82. package/dist/index137.js +24 -2
  83. package/dist/index137.js.map +1 -1
  84. package/dist/index138.js +70 -3
  85. package/dist/index138.js.map +1 -1
  86. package/dist/index139.js +24 -0
  87. package/dist/index139.js.map +1 -0
  88. package/dist/index14.js +1 -1
  89. package/dist/index140.js +37 -0
  90. package/dist/index140.js.map +1 -0
  91. package/dist/index141.js +73 -0
  92. package/dist/index141.js.map +1 -0
  93. package/dist/index142.js +5 -0
  94. package/dist/index142.js.map +1 -0
  95. package/dist/index143.js +5 -0
  96. package/dist/index143.js.map +1 -0
  97. package/dist/index144.js +25 -0
  98. package/dist/index144.js.map +1 -0
  99. package/dist/index145.js +5 -0
  100. package/dist/index145.js.map +1 -0
  101. package/dist/index146.js +5 -0
  102. package/dist/index146.js.map +1 -0
  103. package/dist/index147.js +5 -0
  104. package/dist/index147.js.map +1 -0
  105. package/dist/index148.js +5 -0
  106. package/dist/index148.js.map +1 -0
  107. package/dist/index149.js +7 -0
  108. package/dist/index149.js.map +1 -0
  109. package/dist/index59.js +1 -1
  110. package/dist/index66.js +66 -19
  111. package/dist/index66.js.map +1 -1
  112. package/dist/index67.js +18 -43
  113. package/dist/index67.js.map +1 -1
  114. package/dist/index68.js +44 -132
  115. package/dist/index68.js.map +1 -1
  116. package/dist/index69.js +132 -50
  117. package/dist/index69.js.map +1 -1
  118. package/dist/index70.js +51 -21
  119. package/dist/index70.js.map +1 -1
  120. package/dist/index71.js +19 -19
  121. package/dist/index71.js.map +1 -1
  122. package/dist/index72.js +20 -327
  123. package/dist/index72.js.map +1 -1
  124. package/dist/index73.js +323 -50
  125. package/dist/index73.js.map +1 -1
  126. package/dist/index74.js +56 -40
  127. package/dist/index74.js.map +1 -1
  128. package/dist/index75.js +40 -95
  129. package/dist/index75.js.map +1 -1
  130. package/dist/index76.js +88 -123
  131. package/dist/index76.js.map +1 -1
  132. package/dist/index77.js +123 -154
  133. package/dist/index77.js.map +1 -1
  134. package/dist/index78.js +159 -63
  135. package/dist/index78.js.map +1 -1
  136. package/dist/index79.js +65 -35
  137. package/dist/index79.js.map +1 -1
  138. package/dist/index80.js +35 -34
  139. package/dist/index80.js.map +1 -1
  140. package/dist/index81.js +222 -198
  141. package/dist/index81.js.map +1 -1
  142. package/dist/index82.js +34 -213
  143. package/dist/index82.js.map +1 -1
  144. package/dist/index83.js +190 -275
  145. package/dist/index83.js.map +1 -1
  146. package/dist/index84.js +202 -167
  147. package/dist/index84.js.map +1 -1
  148. package/dist/index85.js +263 -226
  149. package/dist/index85.js.map +1 -1
  150. package/dist/index86.js +176 -12
  151. package/dist/index86.js.map +1 -1
  152. package/dist/index87.js +257 -32
  153. package/dist/index87.js.map +1 -1
  154. package/dist/index88.js +13 -10792
  155. package/dist/index88.js.map +1 -1
  156. package/dist/index89.js +33 -5
  157. package/dist/index89.js.map +1 -1
  158. package/dist/index90.js +5 -41
  159. package/dist/index90.js.map +1 -1
  160. package/dist/index91.js +14 -2
  161. package/dist/index91.js.map +1 -1
  162. package/dist/index92.js +45 -6
  163. package/dist/index92.js.map +1 -1
  164. package/dist/index93.js +11 -150
  165. package/dist/index93.js.map +1 -1
  166. package/dist/index94.js +13 -28
  167. package/dist/index94.js.map +1 -1
  168. package/dist/index95.js +7 -29
  169. package/dist/index95.js.map +1 -1
  170. package/dist/index96.js +13 -2
  171. package/dist/index96.js.map +1 -1
  172. package/dist/index97.js +30 -71
  173. package/dist/index97.js.map +1 -1
  174. package/dist/index98.js +16 -37
  175. package/dist/index98.js.map +1 -1
  176. package/dist/index99.js +10792 -25
  177. package/dist/index99.js.map +1 -1
  178. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index103.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js"],"sourcesContent":["/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n"],"names":["exports","PenaltyScores","mask","value","data","size","points","sameCountCol","sameCountRow","lastCol","lastRow","row","col","module","last","bitsCol","bitsRow","darkCount","modulesCount","i","getMaskAt","maskPattern","j","pattern","setupFormatFunc","numPatterns","bestPattern","lowerPenalty","p","penalty"],"mappings":";;;;AAIAA,IAAAA,EAAA,WAAmB;AAAA,MACjB,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,IACd;AAMA,UAAMC,IAAgB;AAAA,MACpB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAQAD,IAAAA,EAAA,UAAkB,SAAkBE,GAAM;AACxC,aAAOA,KAAQ,QAAQA,MAAS,MAAM,CAAC,MAAMA,CAAI,KAAKA,KAAQ,KAAKA,KAAQ;AAAA,IAC7E,GASAF,EAAA,OAAe,SAAeG,GAAO;AACnC,aAAOH,EAAQ,QAAQG,CAAK,IAAI,SAASA,GAAO,EAAE,IAAI;AAAA,IACxD,GASAH,EAAA,eAAuB,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,IAAIG,IAAK,IAAKH,IAAIG,IAAK,KAAK,MAAM;AAAA,QAC7E,KAAKtB,EAAQ,SAAS;AAAY,kBAASmB,IAAIG,IAAK,KAAKH,IAAIG,KAAK,KAAK,MAAM;AAAA,QAE7E;AAAS,gBAAM,IAAI,MAAM,qBAAqBD,CAAW;AAAA,MAC7D;AAAA,IACA;AAQArB,IAAAA,EAAA,YAAoB,SAAoBuB,GAASnB,GAAM;AACrD,YAAMC,IAAOD,EAAK;AAElB,eAASQ,IAAM,GAAGA,IAAMP,GAAMO;AAC5B,iBAASD,IAAM,GAAGA,IAAMN,GAAMM;AAC5B,UAAIP,EAAK,WAAWO,GAAKC,CAAG,KAC5BR,EAAK,IAAIO,GAAKC,GAAKQ,EAAUG,GAASZ,GAAKC,CAAG,CAAC;AAAA,IAGrD,GAQAZ,EAAA,cAAsB,SAAsBI,GAAMoB,GAAiB;AACjE,YAAMC,IAAc,OAAO,KAAKzB,EAAQ,QAAQ,EAAE;AAClD,UAAI0B,IAAc,GACdC,IAAe;AAEnB,eAASC,IAAI,GAAGA,IAAIH,GAAaG,KAAK;AACpC,QAAAJ,EAAgBI,CAAC,GACjB5B,EAAQ,UAAU4B,GAAGxB,CAAI;AAGzB,cAAMyB,IACJ7B,EAAQ,aAAaI,CAAI,IACzBJ,EAAQ,aAAaI,CAAI,IACzBJ,EAAQ,aAAaI,CAAI,IACzBJ,EAAQ,aAAaI,CAAI;AAG3BJ,QAAAA,EAAQ,UAAU4B,GAAGxB,CAAI,GAErByB,IAAUF,MACZA,IAAeE,GACfH,IAAcE;AAAA,MAEpB;AAEE,aAAOF;AAAA,IACT;AAAA;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index103.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"],"sourcesContent":["// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n"],"names":["canPromise"],"mappings":";;sBAIAA,IAAiB,WAAY;AAC3B,WAAO,OAAO,WAAY,cAAc,QAAQ,aAAa,QAAQ,UAAU;AAAA,EACjF;;","x_google_ignoreList":[0]}
package/dist/index104.js CHANGED
@@ -1,363 +1,155 @@
1
- import { __exports as u } from "./index119.js";
2
- import { __require as a } from "./index98.js";
3
- var c;
4
- function i() {
5
- if (c) return u;
6
- c = 1;
7
- const e = a(), t = [
8
- // L M Q H
9
- 1,
10
- 1,
11
- 1,
12
- 1,
13
- 1,
14
- 1,
15
- 1,
16
- 1,
17
- 1,
18
- 1,
19
- 2,
20
- 2,
21
- 1,
22
- 2,
23
- 2,
24
- 4,
25
- 1,
26
- 2,
27
- 4,
28
- 4,
29
- 2,
30
- 4,
31
- 4,
32
- 4,
33
- 2,
34
- 4,
35
- 6,
36
- 5,
37
- 2,
38
- 4,
39
- 6,
40
- 6,
41
- 2,
42
- 5,
43
- 8,
44
- 8,
45
- 4,
46
- 5,
47
- 8,
48
- 8,
49
- 4,
50
- 5,
51
- 8,
52
- 11,
53
- 4,
54
- 8,
55
- 10,
56
- 11,
57
- 4,
58
- 9,
59
- 12,
60
- 16,
61
- 4,
62
- 9,
63
- 16,
64
- 16,
65
- 6,
66
- 10,
67
- 12,
68
- 18,
69
- 6,
70
- 10,
71
- 17,
72
- 16,
73
- 6,
74
- 11,
75
- 16,
76
- 19,
77
- 6,
78
- 13,
79
- 18,
80
- 21,
81
- 7,
82
- 14,
83
- 21,
84
- 25,
85
- 8,
86
- 16,
87
- 20,
88
- 25,
89
- 8,
90
- 17,
91
- 23,
92
- 25,
93
- 9,
94
- 17,
95
- 23,
96
- 34,
97
- 9,
98
- 18,
99
- 25,
100
- 30,
101
- 10,
102
- 20,
103
- 27,
104
- 32,
105
- 12,
106
- 21,
107
- 29,
108
- 35,
109
- 12,
110
- 23,
111
- 34,
112
- 37,
113
- 12,
114
- 25,
115
- 34,
116
- 40,
117
- 13,
118
- 26,
119
- 35,
120
- 42,
121
- 14,
122
- 28,
123
- 38,
124
- 45,
125
- 15,
126
- 29,
127
- 40,
128
- 48,
129
- 16,
130
- 31,
131
- 43,
132
- 51,
133
- 17,
134
- 33,
135
- 45,
136
- 54,
137
- 18,
138
- 35,
139
- 48,
140
- 57,
141
- 19,
142
- 37,
143
- 51,
144
- 60,
145
- 19,
146
- 38,
147
- 53,
148
- 63,
149
- 20,
150
- 40,
151
- 56,
152
- 66,
153
- 21,
154
- 43,
155
- 59,
156
- 70,
157
- 22,
158
- 45,
159
- 62,
160
- 74,
161
- 24,
162
- 47,
163
- 65,
164
- 77,
165
- 25,
166
- 49,
167
- 68,
168
- 81
169
- ], o = [
170
- // L M Q H
171
- 7,
172
- 10,
173
- 13,
174
- 17,
175
- 10,
176
- 16,
177
- 22,
178
- 28,
179
- 15,
180
- 26,
181
- 36,
182
- 44,
183
- 20,
184
- 36,
185
- 52,
186
- 64,
187
- 26,
188
- 48,
189
- 72,
190
- 88,
191
- 36,
192
- 64,
193
- 96,
194
- 112,
195
- 40,
196
- 72,
197
- 108,
198
- 130,
199
- 48,
200
- 88,
201
- 132,
202
- 156,
203
- 60,
204
- 110,
205
- 160,
206
- 192,
207
- 72,
208
- 130,
209
- 192,
210
- 224,
211
- 80,
212
- 150,
213
- 224,
214
- 264,
215
- 96,
216
- 176,
217
- 260,
218
- 308,
219
- 104,
220
- 198,
221
- 288,
222
- 352,
223
- 120,
224
- 216,
225
- 320,
226
- 384,
227
- 132,
228
- 240,
229
- 360,
230
- 432,
231
- 144,
232
- 280,
233
- 408,
234
- 480,
235
- 168,
236
- 308,
237
- 448,
238
- 532,
239
- 180,
240
- 338,
241
- 504,
242
- 588,
243
- 196,
244
- 364,
245
- 546,
246
- 650,
247
- 224,
248
- 416,
249
- 600,
250
- 700,
251
- 224,
252
- 442,
253
- 644,
254
- 750,
255
- 252,
256
- 476,
257
- 690,
258
- 816,
259
- 270,
260
- 504,
261
- 750,
262
- 900,
263
- 300,
264
- 560,
265
- 810,
266
- 960,
267
- 312,
268
- 588,
269
- 870,
270
- 1050,
271
- 336,
272
- 644,
273
- 952,
274
- 1110,
275
- 360,
276
- 700,
277
- 1020,
278
- 1200,
279
- 390,
280
- 728,
281
- 1050,
282
- 1260,
283
- 420,
284
- 784,
285
- 1140,
286
- 1350,
287
- 450,
288
- 812,
289
- 1200,
290
- 1440,
291
- 480,
292
- 868,
293
- 1290,
294
- 1530,
295
- 510,
296
- 924,
297
- 1350,
298
- 1620,
299
- 540,
300
- 980,
301
- 1440,
302
- 1710,
303
- 570,
304
- 1036,
305
- 1530,
306
- 1800,
307
- 570,
308
- 1064,
309
- 1590,
310
- 1890,
311
- 600,
312
- 1120,
313
- 1680,
314
- 1980,
315
- 630,
316
- 1204,
317
- 1770,
318
- 2100,
319
- 660,
320
- 1260,
321
- 1860,
322
- 2220,
323
- 720,
324
- 1316,
325
- 1950,
326
- 2310,
327
- 750,
328
- 1372,
329
- 2040,
330
- 2430
331
- ];
332
- return u.getBlocksCount = function(r, n) {
333
- switch (n) {
334
- case e.L:
335
- return t[(r - 1) * 4 + 0];
336
- case e.M:
337
- return t[(r - 1) * 4 + 1];
338
- case e.Q:
339
- return t[(r - 1) * 4 + 2];
340
- case e.H:
341
- return t[(r - 1) * 4 + 3];
342
- default:
343
- return;
1
+ import { __exports as M } from "./index107.js";
2
+ import { __require as Y } from "./index108.js";
3
+ import { __require as Z } from "./index109.js";
4
+ import { __require as $ } from "./index110.js";
5
+ import { __require as x } from "./index111.js";
6
+ import { __require as v } from "./index112.js";
7
+ import { __require as ee } from "./index113.js";
8
+ import { __require as te } from "./index114.js";
9
+ import { __require as oe } from "./index115.js";
10
+ import { __require as re } from "./index116.js";
11
+ import { __require as ne } from "./index117.js";
12
+ import { __require as se } from "./index118.js";
13
+ import { __require as ie } from "./index119.js";
14
+ import { __require as ue } from "./index120.js";
15
+ var F;
16
+ function Be() {
17
+ if (F) return M;
18
+ F = 1;
19
+ const g = Y(), q = Z(), A = $(), k = x(), P = v(), D = ee(), _ = te(), h = oe(), V = re(), w = ne(), R = se(), G = ie(), C = ue();
20
+ function Q(r, u) {
21
+ const n = r.size, e = D.getPositions(u);
22
+ for (let c = 0; c < e.length; c++) {
23
+ const t = e[c][0], o = e[c][1];
24
+ for (let i = -1; i <= 7; i++)
25
+ if (!(t + i <= -1 || n <= t + i))
26
+ for (let s = -1; s <= 7; s++)
27
+ o + s <= -1 || n <= o + s || (i >= 0 && i <= 6 && (s === 0 || s === 6) || s >= 0 && s <= 6 && (i === 0 || i === 6) || i >= 2 && i <= 4 && s >= 2 && s <= 4 ? r.set(t + i, o + s, !0, !0) : r.set(t + i, o + s, !1, !0));
344
28
  }
345
- }, u.getTotalCodewordsCount = function(r, n) {
346
- switch (n) {
347
- case e.L:
348
- return o[(r - 1) * 4 + 0];
349
- case e.M:
350
- return o[(r - 1) * 4 + 1];
351
- case e.Q:
352
- return o[(r - 1) * 4 + 2];
353
- case e.H:
354
- return o[(r - 1) * 4 + 3];
355
- default:
356
- return;
29
+ }
30
+ function U(r) {
31
+ const u = r.size;
32
+ for (let n = 8; n < u - 8; n++) {
33
+ const e = n % 2 === 0;
34
+ r.set(n, 6, e, !0), r.set(6, n, e, !0);
357
35
  }
358
- }, u;
36
+ }
37
+ function J(r, u) {
38
+ const n = P.getPositions(u);
39
+ for (let e = 0; e < n.length; e++) {
40
+ const c = n[e][0], t = n[e][1];
41
+ for (let o = -2; o <= 2; o++)
42
+ for (let i = -2; i <= 2; i++)
43
+ o === -2 || o === 2 || i === -2 || i === 2 || o === 0 && i === 0 ? r.set(c + o, t + i, !0, !0) : r.set(c + o, t + i, !1, !0);
44
+ }
45
+ }
46
+ function N(r, u) {
47
+ const n = r.size, e = w.getEncodedBits(u);
48
+ let c, t, o;
49
+ for (let i = 0; i < 18; i++)
50
+ c = Math.floor(i / 3), t = i % 3 + n - 8 - 3, o = (e >> i & 1) === 1, r.set(c, t, o, !0), r.set(t, c, o, !0);
51
+ }
52
+ function b(r, u, n) {
53
+ const e = r.size, c = R.getEncodedBits(u, n);
54
+ let t, o;
55
+ for (t = 0; t < 15; t++)
56
+ o = (c >> t & 1) === 1, t < 6 ? r.set(t, 8, o, !0) : t < 8 ? r.set(t + 1, 8, o, !0) : r.set(e - 15 + t, 8, o, !0), t < 8 ? r.set(8, e - t - 1, o, !0) : t < 9 ? r.set(8, 15 - t - 1 + 1, o, !0) : r.set(8, 15 - t - 1, o, !0);
57
+ r.set(e - 8, 8, 1, !0);
58
+ }
59
+ function L(r, u) {
60
+ const n = r.size;
61
+ let e = -1, c = n - 1, t = 7, o = 0;
62
+ for (let i = n - 1; i > 0; i -= 2)
63
+ for (i === 6 && i--; ; ) {
64
+ for (let s = 0; s < 2; s++)
65
+ if (!r.isReserved(c, i - s)) {
66
+ let a = !1;
67
+ o < u.length && (a = (u[o] >>> t & 1) === 1), r.set(c, i - s, a), t--, t === -1 && (o++, t = 7);
68
+ }
69
+ if (c += e, c < 0 || n <= c) {
70
+ c -= e, e = -e;
71
+ break;
72
+ }
73
+ }
74
+ }
75
+ function j(r, u, n) {
76
+ const e = new A();
77
+ n.forEach(function(s) {
78
+ e.put(s.mode.bit, 4), e.put(s.getLength(), G.getCharCountIndicator(s.mode, r)), s.write(e);
79
+ });
80
+ const c = g.getSymbolTotalCodewords(r), t = h.getTotalCodewordsCount(r, u), o = (c - t) * 8;
81
+ for (e.getLengthInBits() + 4 <= o && e.put(0, 4); e.getLengthInBits() % 8 !== 0; )
82
+ e.putBit(0);
83
+ const i = (o - e.getLengthInBits()) / 8;
84
+ for (let s = 0; s < i; s++)
85
+ e.put(s % 2 ? 17 : 236, 8);
86
+ return H(e, r, u);
87
+ }
88
+ function H(r, u, n) {
89
+ const e = g.getSymbolTotalCodewords(u), c = h.getTotalCodewordsCount(u, n), t = e - c, o = h.getBlocksCount(u, n), i = e % o, s = o - i, a = Math.floor(e / o), m = Math.floor(t / o), O = m + 1, E = a - m, W = new V(E);
90
+ let B = 0;
91
+ const p = new Array(o), z = new Array(o);
92
+ let S = 0;
93
+ const X = new Uint8Array(r.buffer);
94
+ for (let d = 0; d < o; d++) {
95
+ const y = d < s ? m : O;
96
+ p[d] = X.slice(B, B + y), z[d] = W.encode(p[d]), B += y, S = Math.max(S, y);
97
+ }
98
+ const I = new Uint8Array(e);
99
+ let T = 0, f, l;
100
+ for (f = 0; f < S; f++)
101
+ for (l = 0; l < o; l++)
102
+ f < p[l].length && (I[T++] = p[l][f]);
103
+ for (f = 0; f < E; f++)
104
+ for (l = 0; l < o; l++)
105
+ I[T++] = z[l][f];
106
+ return I;
107
+ }
108
+ function K(r, u, n, e) {
109
+ let c;
110
+ if (Array.isArray(r))
111
+ c = C.fromArray(r);
112
+ else if (typeof r == "string") {
113
+ let a = u;
114
+ if (!a) {
115
+ const m = C.rawSplit(r);
116
+ a = w.getBestVersionForData(m, n);
117
+ }
118
+ c = C.fromString(r, a || 40);
119
+ } else
120
+ throw new Error("Invalid data");
121
+ const t = w.getBestVersionForData(c, n);
122
+ if (!t)
123
+ throw new Error("The amount of data is too big to be stored in a QR Code");
124
+ if (!u)
125
+ u = t;
126
+ else if (u < t)
127
+ throw new Error(
128
+ `
129
+ The chosen QR Code version cannot contain this amount of data.
130
+ Minimum version required to store current data is: ` + t + `.
131
+ `
132
+ );
133
+ const o = j(u, n, c), i = g.getSymbolSize(u), s = new k(i);
134
+ return Q(s, u), U(s), J(s, u), b(s, n, 0), u >= 7 && N(s, u), L(s, o), isNaN(e) && (e = _.getBestMask(
135
+ s,
136
+ b.bind(null, s, n)
137
+ )), _.applyMask(e, s), b(s, n, e), {
138
+ modules: s,
139
+ version: u,
140
+ errorCorrectionLevel: n,
141
+ maskPattern: e,
142
+ segments: c
143
+ };
144
+ }
145
+ return M.create = function(u, n) {
146
+ if (typeof u > "u" || u === "")
147
+ throw new Error("No input text");
148
+ let e = q.M, c, t;
149
+ return typeof n < "u" && (e = q.from(n.errorCorrectionLevel, q.M), c = w.from(n.version), t = _.from(n.maskPattern), n.toSJISFunc && g.setToSJISFunction(n.toSJISFunc)), K(u, c, e, t);
150
+ }, M;
359
151
  }
360
152
  export {
361
- i as __require
153
+ Be as __require
362
154
  };
363
155
  //# sourceMappingURL=index104.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index104.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"],"sourcesContent":["const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n"],"names":["ECLevel","require$$0","EC_BLOCKS_TABLE","EC_CODEWORDS_TABLE","errorCorrectionCode","version","errorCorrectionLevel"],"mappings":";;;;;;AAAA,QAAMA,IAAUC,EAAA,GAEVC,IAAkB;AAAA;AAAA,IAEtB;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAG;AAAA,IACT;AAAA,IAAG;AAAA,IAAG;AAAA,IAAI;AAAA,IACV;AAAA,IAAG;AAAA,IAAG;AAAA,IAAI;AAAA,IACV;AAAA,IAAG;AAAA,IA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U,KAAK,IAAI,CAAC;AAAA,MACjD,KAAKL,EAAQ;AACX,eAAOG,GAAoBE,IAAU,KAAK,IAAI,CAAC;AAAA,MACjD,KAAKL,EAAQ;AACX,eAAOG,GAAoBE,IAAU,KAAK,IAAI,CAAC;AAAA,MACjD,KAAKL,EAAQ;AACX,eAAOG,GAAoBE,IAAU,KAAK,IAAI,CAAC;AAAA,MACjD;AACE;AAAA;EAEN;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index104.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"],"sourcesContent":["const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n"],"names":["Utils","require$$0","ECLevel","require$$1","BitBuffer","require$$2","BitMatrix","require$$3","AlignmentPattern","require$$4","FinderPattern","require$$5","MaskPattern","require$$6","ECCode","require$$7","ReedSolomonEncoder","require$$8","Version","require$$9","FormatInfo","require$$10","Mode","require$$11","Segments","require$$12","setupFinderPattern","matrix","version","size","pos","i","row","col","r","c","setupTimingPattern","value","setupAlignmentPattern","setupVersionInfo","bits","mod","setupFormatInfo","errorCorrectionLevel","maskPattern","setupData","data","inc","bitIndex","byteIndex","dark","createData","segments","buffer","totalCodewords","ecTotalCodewords","dataTotalCodewordsBits","remainingByte","createCodewords","bitBuffer","dataTotalCodewords","ecTotalBlocks","blocksInGroup2","blocksInGroup1","totalCodewordsInGroup1","dataCodewordsInGroup1","dataCodewordsInGroup2","ecCount","rs","offset","dcData","ecData","maxDataSize","b","dataSize","index","createSymbol","estimatedVersion","rawSegments","bestVersion","dataBits","moduleCount","modules","qrcode","options","mask"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,QAAMA,IAAQC,EAAA,GACRC,IAAUC,EAAA,GACVC,IAAYC,EAAA,GACZC,IAAYC,EAAA,GACZC,IAAmBC,EAAA,GACnBC,IAAgBC,GAAA,GAChBC,IAAcC,GAAA,GACdC,IAASC,GAAA,GACTC,IAAqBC,GAAA,GACrBC,IAAUC,GAAA,GACVC,IAAaC,GAAA,GACbC,IAAOC,GAAA,GACPC,IAAWC,GAAA;AAkCjB,WAASC,EAAoBC,GAAQC,GAAS;AAC5C,UAAMC,IAAOF,EAAO,MACdG,IAAMpB,EAAc,aAAakB,CAAO;AAE9C,aAASG,IAAI,GAAGA,IAAID,EAAI,QAAQC,KAAK;AACnC,YAAMC,IAAMF,EAAIC,CAAC,EAAE,CAAC,GACdE,IAAMH,EAAIC,CAAC,EAAE,CAAC;AAEpB,eAASG,IAAI,IAAIA,KAAK,GAAGA;AACvB,YAAI,EAAAF,IAAME,KAAK,MAAML,KAAQG,IAAME;AAEnC,mBAASC,IAAI,IAAIA,KAAK,GAAGA;AACvB,YAAIF,IAAME,KAAK,MAAMN,KAAQI,IAAME,MAE9BD,KAAK,KAAKA,KAAK,MAAMC,MAAM,KAAKA,MAAM,MACxCA,KAAK,KAAKA,KAAK,MAAMD,MAAM,KAAKA,MAAM,MACtCA,KAAK,KAAKA,KAAK,KAAKC,KAAK,KAAKA,KAAK,IACpCR,EAAO,IAAIK,IAAME,GAAGD,IAAME,GAAG,IAAM,EAAI,IAEvCR,EAAO,IAAIK,IAAME,GAAGD,IAAME,GAAG,IAAO,EAAI;AAAA,IAIlD;AAAA,EACA;AASA,WAASC,EAAo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,IAAUV,EAAQ,KAAKkE,EAAQ,OAAO,GACtCC,IAAOzE,EAAY,KAAKwE,EAAQ,WAAW,GAEvCA,EAAQ,cACVpF,EAAM,kBAAkBoF,EAAQ,UAAU,IAIvCR,EAAa9B,GAAMlB,GAASe,GAAsB0C,CAAI;AAAA,EAC/D;;","x_google_ignoreList":[0]}
package/dist/index105.js CHANGED
@@ -1,28 +1,33 @@
1
- import { __require as h } from "./index120.js";
2
- var o, a;
3
- function g() {
4
- if (a) return o;
5
- a = 1;
6
- const t = h();
7
- function n(i) {
8
- this.genPoly = void 0, this.degree = i, this.degree && this.initialize(this.degree);
9
- }
10
- return n.prototype.initialize = function(e) {
11
- this.degree = e, this.genPoly = t.generateECPolynomial(this.degree);
12
- }, n.prototype.encode = function(e) {
13
- if (!this.genPoly)
14
- throw new Error("Encoder not initialized");
15
- const d = new Uint8Array(e.length + this.degree);
16
- d.set(e);
17
- const r = t.mod(d, this.genPoly), s = this.degree - r.length;
18
- if (s > 0) {
19
- const l = new Uint8Array(this.degree);
20
- return l.set(r, s), l;
1
+ import { __exports as a } from "./index121.js";
2
+ import { __require as h } from "./index122.js";
3
+ var p;
4
+ function C() {
5
+ return p ? a : (p = 1, (function(u) {
6
+ const f = h();
7
+ function m(d, r, e) {
8
+ d.clearRect(0, 0, r.width, r.height), r.style || (r.style = {}), r.height = e, r.width = e, r.style.height = e + "px", r.style.width = e + "px";
21
9
  }
22
- return r;
23
- }, o = n, o;
10
+ function s() {
11
+ try {
12
+ return document.createElement("canvas");
13
+ } catch {
14
+ throw new Error("You need to specify a canvas element");
15
+ }
16
+ }
17
+ u.render = function(r, e, l) {
18
+ let t = l, n = e;
19
+ typeof t > "u" && (!e || !e.getContext) && (t = e, e = void 0), e || (n = s()), t = f.getOptions(t);
20
+ const i = f.getImageWidth(r.modules.size, t), o = n.getContext("2d"), g = o.createImageData(i, i);
21
+ return f.qrToImageData(g.data, r, t), m(o, n, i), o.putImageData(g, 0, 0), n;
22
+ }, u.renderToDataURL = function(r, e, l) {
23
+ let t = l;
24
+ typeof t > "u" && (!e || !e.getContext) && (t = e, e = void 0), t || (t = {});
25
+ const n = u.render(r, e, t), i = t.type || "image/png", o = t.rendererOpts || {};
26
+ return n.toDataURL(i, o.quality);
27
+ };
28
+ })(a), a);
24
29
  }
25
30
  export {
26
- g as __require
31
+ C as __require
27
32
  };
28
33
  //# sourceMappingURL=index105.js.map