ngwr 14.7.0 → 14.9.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 (482) hide show
  1. package/README.md +66 -332
  2. package/alert/styles/_index.scss +10 -0
  3. package/avatar/styles/_index.scss +18 -7
  4. package/badge/styles/_index.scss +7 -0
  5. package/badge/styles/_tag.scss +7 -1
  6. package/bar-chart/styles/_index.scss +1 -0
  7. package/button/styles/_index.scss +6 -0
  8. package/calendar-heatmap/styles/_index.scss +1 -0
  9. package/cascader/styles/_rules.scss +87 -15
  10. package/checkbox/styles/_index.scss +4 -0
  11. package/command-palette/styles/_index.scss +1 -1
  12. package/date-picker/styles/_index.scss +30 -0
  13. package/density/styles/_index.scss +4 -2
  14. package/divider/styles/_index.scss +2 -0
  15. package/donut-chart/styles/_index.scss +10 -0
  16. package/dropdown/styles/_index.scss +67 -5
  17. package/editor/styles/_index.scss +441 -0
  18. package/event-calendar/styles/_index.scss +209 -35
  19. package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -1
  20. package/fesm2022/ngwr-action-sheet.mjs +3 -3
  21. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  22. package/fesm2022/ngwr-affix.mjs +3 -3
  23. package/fesm2022/ngwr-affix.mjs.map +1 -1
  24. package/fesm2022/ngwr-alert.mjs +3 -3
  25. package/fesm2022/ngwr-alert.mjs.map +1 -1
  26. package/fesm2022/ngwr-anchor.mjs +3 -3
  27. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  28. package/fesm2022/ngwr-aurora.mjs +3 -3
  29. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  30. package/fesm2022/ngwr-avatar.mjs +3 -3
  31. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  32. package/fesm2022/ngwr-back-top.mjs +3 -3
  33. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  34. package/fesm2022/ngwr-badge.mjs +28 -13
  35. package/fesm2022/ngwr-badge.mjs.map +1 -1
  36. package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
  37. package/fesm2022/ngwr-bar-chart.mjs +31 -6
  38. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  39. package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -1
  40. package/fesm2022/ngwr-blur-text.mjs +3 -3
  41. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  42. package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -1
  43. package/fesm2022/ngwr-border-glow.mjs +3 -3
  44. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  45. package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
  46. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-burger.mjs.map +1 -1
  49. package/fesm2022/ngwr-button-testing.mjs.map +1 -1
  50. package/fesm2022/ngwr-button.mjs +6 -6
  51. package/fesm2022/ngwr-button.mjs.map +1 -1
  52. package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
  53. package/fesm2022/ngwr-calendar-heatmap.mjs +61 -6
  54. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  55. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-calendar.mjs +3 -3
  57. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  58. package/fesm2022/ngwr-card.mjs +9 -9
  59. package/fesm2022/ngwr-card.mjs.map +1 -1
  60. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  61. package/fesm2022/ngwr-carousel.mjs +6 -6
  62. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  63. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
  64. package/fesm2022/ngwr-cascader.mjs +4 -4
  65. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  66. package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
  67. package/fesm2022/ngwr-checkbox.mjs +18 -8
  68. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -1
  70. package/fesm2022/ngwr-circular-text.mjs +3 -3
  71. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  72. package/fesm2022/ngwr-click-spark.mjs +3 -3
  73. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  74. package/fesm2022/ngwr-clipboard.mjs +3 -3
  75. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  76. package/fesm2022/ngwr-collapse-testing.mjs.map +1 -1
  77. package/fesm2022/ngwr-collapse.mjs +9 -9
  78. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  79. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  80. package/fesm2022/ngwr-color-picker.mjs +6 -6
  81. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  82. package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -1
  83. package/fesm2022/ngwr-command-palette.mjs +3 -3
  84. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  85. package/fesm2022/ngwr-compare.mjs +3 -3
  86. package/fesm2022/ngwr-compare.mjs.map +1 -1
  87. package/fesm2022/ngwr-confetti.mjs +3 -3
  88. package/fesm2022/ngwr-confetti.mjs.map +1 -1
  89. package/fesm2022/ngwr-config.mjs.map +1 -1
  90. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  91. package/fesm2022/ngwr-context-menu.mjs +12 -12
  92. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  93. package/fesm2022/ngwr-cookie.mjs +3 -3
  94. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  95. package/fesm2022/ngwr-counter.mjs +6 -6
  96. package/fesm2022/ngwr-counter.mjs.map +1 -1
  97. package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
  98. package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
  99. package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
  100. package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -1
  101. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  102. package/fesm2022/ngwr-date-picker.mjs +721 -62
  103. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  104. package/fesm2022/ngwr-date.mjs +3 -3
  105. package/fesm2022/ngwr-date.mjs.map +1 -1
  106. package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  108. package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
  109. package/fesm2022/ngwr-density.mjs +6 -6
  110. package/fesm2022/ngwr-density.mjs.map +1 -1
  111. package/fesm2022/ngwr-descriptions.mjs +6 -6
  112. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  113. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
  114. package/fesm2022/ngwr-dialog.mjs +15 -15
  115. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  116. package/fesm2022/ngwr-directives.mjs +12 -12
  117. package/fesm2022/ngwr-directives.mjs.map +1 -1
  118. package/fesm2022/ngwr-divider.mjs +3 -3
  119. package/fesm2022/ngwr-divider.mjs.map +1 -1
  120. package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-donut-chart.mjs +48 -6
  122. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  123. package/fesm2022/ngwr-drag-drop.mjs +6 -6
  124. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  125. package/fesm2022/ngwr-drawer-testing.mjs.map +1 -1
  126. package/fesm2022/ngwr-drawer.mjs +18 -18
  127. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  128. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  129. package/fesm2022/ngwr-dropdown.mjs +174 -25
  130. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  131. package/fesm2022/ngwr-editor-testing.mjs +568 -0
  132. package/fesm2022/ngwr-editor-testing.mjs.map +1 -0
  133. package/fesm2022/ngwr-editor.mjs +2601 -0
  134. package/fesm2022/ngwr-editor.mjs.map +1 -0
  135. package/fesm2022/ngwr-empty.mjs +3 -3
  136. package/fesm2022/ngwr-empty.mjs.map +1 -1
  137. package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
  138. package/fesm2022/ngwr-event-calendar.mjs +14 -7
  139. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  140. package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
  141. package/fesm2022/ngwr-falling-text.mjs +3 -3
  142. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  143. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  144. package/fesm2022/ngwr-file-upload.mjs +3 -3
  145. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  146. package/fesm2022/ngwr-form-testing.mjs.map +1 -1
  147. package/fesm2022/ngwr-form.mjs +61 -10
  148. package/fesm2022/ngwr-form.mjs.map +1 -1
  149. package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -1
  150. package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
  151. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  152. package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
  153. package/fesm2022/ngwr-gauge.mjs +35 -6
  154. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  155. package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
  156. package/fesm2022/ngwr-glitch-text.mjs +3 -3
  157. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  158. package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
  159. package/fesm2022/ngwr-gradient-text.mjs +3 -3
  160. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  161. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  162. package/fesm2022/ngwr-graph.mjs +6 -6
  163. package/fesm2022/ngwr-graph.mjs.map +1 -1
  164. package/fesm2022/ngwr-hotkey.mjs +6 -6
  165. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-ar.mjs +31 -0
  167. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-cs.mjs +31 -0
  169. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-de.mjs +31 -0
  171. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-en.mjs +39 -0
  173. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-es.mjs +31 -0
  175. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-fr.mjs +31 -0
  177. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-he.mjs +31 -0
  179. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-hi.mjs +31 -0
  181. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-id.mjs +31 -0
  183. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-it.mjs +31 -0
  185. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-ja.mjs +31 -0
  187. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-ko.mjs +31 -0
  189. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-nl.mjs +31 -0
  191. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-pl.mjs +31 -0
  193. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-pt.mjs +31 -0
  195. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n-ru.mjs +31 -0
  197. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  198. package/fesm2022/ngwr-i18n-sv.mjs +31 -0
  199. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  200. package/fesm2022/ngwr-i18n-tr.mjs +31 -0
  201. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  202. package/fesm2022/ngwr-i18n-uk.mjs +31 -0
  203. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  204. package/fesm2022/ngwr-i18n-vi.mjs +31 -0
  205. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  206. package/fesm2022/ngwr-i18n-zh-TW.mjs +31 -0
  207. package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
  208. package/fesm2022/ngwr-i18n-zh.mjs +31 -0
  209. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  210. package/fesm2022/ngwr-i18n.mjs +9 -9
  211. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  212. package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
  213. package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
  214. package/fesm2022/ngwr-icon.mjs +6 -6
  215. package/fesm2022/ngwr-icon.mjs.map +1 -1
  216. package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  218. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  219. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  220. package/fesm2022/ngwr-input-number.mjs +15 -3
  221. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  222. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
  223. package/fesm2022/ngwr-input-otp.mjs +3 -3
  224. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  225. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  226. package/fesm2022/ngwr-input.mjs +15 -15
  227. package/fesm2022/ngwr-input.mjs.map +1 -1
  228. package/fesm2022/ngwr-keyboard.mjs +3 -3
  229. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  230. package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
  231. package/fesm2022/ngwr-knob.mjs +3 -3
  232. package/fesm2022/ngwr-knob.mjs.map +1 -1
  233. package/fesm2022/ngwr-layout.mjs +15 -15
  234. package/fesm2022/ngwr-layout.mjs.map +1 -1
  235. package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
  236. package/fesm2022/ngwr-lightbox.mjs +3 -3
  237. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  238. package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
  239. package/fesm2022/ngwr-line-chart.mjs +18 -7
  240. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  241. package/fesm2022/ngwr-list.mjs +6 -6
  242. package/fesm2022/ngwr-list.mjs.map +1 -1
  243. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  244. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  245. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  246. package/fesm2022/ngwr-markdown-testing.mjs.map +1 -1
  247. package/fesm2022/ngwr-markdown.mjs +798 -17
  248. package/fesm2022/ngwr-markdown.mjs.map +1 -1
  249. package/fesm2022/ngwr-marquee-testing.mjs.map +1 -1
  250. package/fesm2022/ngwr-marquee.mjs +3 -3
  251. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  252. package/fesm2022/ngwr-media.mjs +3 -3
  253. package/fesm2022/ngwr-media.mjs.map +1 -1
  254. package/fesm2022/ngwr-mention-testing.mjs.map +1 -1
  255. package/fesm2022/ngwr-mention.mjs +6 -6
  256. package/fesm2022/ngwr-mention.mjs.map +1 -1
  257. package/fesm2022/ngwr-meta.mjs +6 -6
  258. package/fesm2022/ngwr-meta.mjs.map +1 -1
  259. package/fesm2022/ngwr-meter-group-testing.mjs +7 -3
  260. package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
  261. package/fesm2022/ngwr-meter-group.mjs +26 -6
  262. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  263. package/fesm2022/ngwr-overlay.mjs +6 -6
  264. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  265. package/fesm2022/ngwr-page-header.mjs +13 -5
  266. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  267. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  268. package/fesm2022/ngwr-pagination.mjs +3 -3
  269. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  270. package/fesm2022/ngwr-pipes.mjs +21 -21
  271. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  272. package/fesm2022/ngwr-platform.mjs +9 -9
  273. package/fesm2022/ngwr-platform.mjs.map +1 -1
  274. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  275. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  276. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  277. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  278. package/fesm2022/ngwr-popover.mjs +578 -16
  279. package/fesm2022/ngwr-popover.mjs.map +1 -1
  280. package/fesm2022/ngwr-progress.mjs +3 -3
  281. package/fesm2022/ngwr-progress.mjs.map +1 -1
  282. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  283. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  284. package/fesm2022/ngwr-qr.mjs +3 -3
  285. package/fesm2022/ngwr-qr.mjs.map +1 -1
  286. package/fesm2022/ngwr-radio-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-radio.mjs +6 -6
  288. package/fesm2022/ngwr-radio.mjs.map +1 -1
  289. package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
  290. package/fesm2022/ngwr-rating.mjs +3 -3
  291. package/fesm2022/ngwr-rating.mjs.map +1 -1
  292. package/fesm2022/ngwr-result.mjs +12 -12
  293. package/fesm2022/ngwr-result.mjs.map +1 -1
  294. package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -1
  295. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  296. package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
  297. package/fesm2022/ngwr-schema-form.mjs +3 -3
  298. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  299. package/fesm2022/ngwr-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  301. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
  302. package/fesm2022/ngwr-segmented.mjs +3 -3
  303. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  304. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  305. package/fesm2022/ngwr-select.mjs +12 -12
  306. package/fesm2022/ngwr-select.mjs.map +1 -1
  307. package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -1
  308. package/fesm2022/ngwr-shiny-text.mjs +6 -6
  309. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  310. package/fesm2022/ngwr-sidebar.mjs +10 -3
  311. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  312. package/fesm2022/ngwr-skeleton.mjs +3 -3
  313. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  314. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  315. package/fesm2022/ngwr-slider.mjs +3 -3
  316. package/fesm2022/ngwr-slider.mjs.map +1 -1
  317. package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -1
  318. package/fesm2022/ngwr-sparkline.mjs +84 -10
  319. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  320. package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
  321. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  322. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  323. package/fesm2022/ngwr-spinner.mjs +3 -3
  324. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  325. package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -1
  326. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  327. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  328. package/fesm2022/ngwr-split-text-testing.mjs.map +1 -1
  329. package/fesm2022/ngwr-split-text.mjs +3 -3
  330. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  331. package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
  332. package/fesm2022/ngwr-splitter.mjs +3 -3
  333. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  334. package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -1
  335. package/fesm2022/ngwr-spotlight-card.mjs +6 -6
  336. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  337. package/fesm2022/ngwr-squircle.mjs +6 -6
  338. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  339. package/fesm2022/ngwr-star-border-testing.mjs.map +1 -1
  340. package/fesm2022/ngwr-star-border.mjs +3 -3
  341. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  342. package/fesm2022/ngwr-statistic.mjs +9 -9
  343. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  344. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
  345. package/fesm2022/ngwr-stepper.mjs +6 -6
  346. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  347. package/fesm2022/ngwr-storage.mjs +3 -3
  348. package/fesm2022/ngwr-storage.mjs.map +1 -1
  349. package/fesm2022/ngwr-switch-testing.mjs.map +1 -1
  350. package/fesm2022/ngwr-switch.mjs +3 -3
  351. package/fesm2022/ngwr-switch.mjs.map +1 -1
  352. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  353. package/fesm2022/ngwr-table.mjs +18 -18
  354. package/fesm2022/ngwr-table.mjs.map +1 -1
  355. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  356. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  357. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  358. package/fesm2022/ngwr-tabs.mjs +6 -6
  359. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  360. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  361. package/fesm2022/ngwr-textarea.mjs +3 -3
  362. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  363. package/fesm2022/ngwr-theme.mjs +3 -3
  364. package/fesm2022/ngwr-theme.mjs.map +1 -1
  365. package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -1
  366. package/fesm2022/ngwr-tilt-card.mjs +6 -6
  367. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  368. package/fesm2022/ngwr-timeline.mjs +6 -6
  369. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  370. package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
  371. package/fesm2022/ngwr-toast.mjs +9 -9
  372. package/fesm2022/ngwr-toast.mjs.map +1 -1
  373. package/fesm2022/ngwr-toolbar.mjs +10 -3
  374. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  375. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  376. package/fesm2022/ngwr-tour.mjs +6 -6
  377. package/fesm2022/ngwr-tour.mjs.map +1 -1
  378. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  379. package/fesm2022/ngwr-transfer.mjs +3 -3
  380. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  381. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  382. package/fesm2022/ngwr-tree.mjs +3 -3
  383. package/fesm2022/ngwr-tree.mjs.map +1 -1
  384. package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
  385. package/fesm2022/ngwr-typewriter.mjs +3 -3
  386. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  387. package/fesm2022/ngwr-typography.mjs +7 -3
  388. package/fesm2022/ngwr-typography.mjs.map +1 -1
  389. package/fesm2022/ngwr-utils.mjs.map +1 -1
  390. package/fesm2022/ngwr-validators.mjs.map +1 -1
  391. package/fesm2022/ngwr-version.mjs +1 -1
  392. package/fesm2022/ngwr-version.mjs.map +1 -1
  393. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  394. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  395. package/fesm2022/ngwr-waves-testing.mjs.map +1 -1
  396. package/fesm2022/ngwr-waves.mjs +3 -3
  397. package/fesm2022/ngwr-waves.mjs.map +1 -1
  398. package/fesm2022/ngwr-window-testing.mjs.map +1 -1
  399. package/fesm2022/ngwr-window.mjs +12 -12
  400. package/fesm2022/ngwr-window.mjs.map +1 -1
  401. package/form/styles/_index.scss +16 -1
  402. package/gauge/styles/_index.scss +1 -0
  403. package/i18n/ar.json +32 -1
  404. package/i18n/cs.json +32 -1
  405. package/i18n/de.json +32 -1
  406. package/i18n/en.json +32 -1
  407. package/i18n/es.json +32 -1
  408. package/i18n/fr.json +32 -1
  409. package/i18n/he.json +32 -1
  410. package/i18n/hi.json +32 -1
  411. package/i18n/id.json +32 -1
  412. package/i18n/it.json +32 -1
  413. package/i18n/ja.json +32 -1
  414. package/i18n/ko.json +32 -1
  415. package/i18n/nl.json +32 -1
  416. package/i18n/pl.json +32 -1
  417. package/i18n/pt.json +32 -1
  418. package/i18n/ru.json +32 -1
  419. package/i18n/sv.json +32 -1
  420. package/i18n/tr.json +32 -1
  421. package/i18n/uk.json +32 -1
  422. package/i18n/vi.json +32 -1
  423. package/i18n/zh-TW.json +32 -1
  424. package/i18n/zh.json +32 -1
  425. package/input/styles/_index.scss +24 -1
  426. package/input-number/styles/_index.scss +69 -0
  427. package/input-otp/styles/_index.scss +5 -5
  428. package/line-chart/styles/_index.scss +30 -2
  429. package/llms-full.txt +14 -4
  430. package/llms.txt +188 -132
  431. package/mcp/providers.js +2 -2
  432. package/mcp/server.js +1 -1
  433. package/meter-group/styles/_index.scss +1 -0
  434. package/overlay/styles/_arrow.scss +30 -2
  435. package/package.json +43 -2
  436. package/page-header/styles/_index.scss +37 -1
  437. package/pagination/styles/_index.scss +9 -5
  438. package/popover/styles/_index.scss +73 -5
  439. package/progress/styles/_index.scss +4 -0
  440. package/radio/styles/_index.scss +4 -1
  441. package/schematics/use/symbol-map.json +1 -0
  442. package/select/styles/_index.scss +51 -12
  443. package/sidebar/styles/_index.scss +44 -2
  444. package/skeleton/styles/_index.scss +3 -0
  445. package/skills/ngwr/SKILL.md +5 -5
  446. package/skills/ngwr/references/catalog.md +2 -0
  447. package/skills/ngwr/references/setup.md +3 -3
  448. package/sparkline/styles/_index.scss +19 -0
  449. package/styles.scss +1 -0
  450. package/table/styles/_index.scss +7 -0
  451. package/textarea/styles/_index.scss +12 -3
  452. package/theme/styles/_colors.scss +39 -13
  453. package/theme/styles/_contrast.scss +9 -7
  454. package/toast/styles/_index.scss +4 -0
  455. package/toolbar/styles/_index.scss +35 -1
  456. package/tree/styles/_index.scss +46 -7
  457. package/types/ngwr-badge.d.ts +22 -7
  458. package/types/ngwr-bar-chart.d.ts +19 -1
  459. package/types/ngwr-calendar-heatmap.d.ts +29 -1
  460. package/types/ngwr-checkbox.d.ts +2 -0
  461. package/types/ngwr-config.d.ts +12 -0
  462. package/types/ngwr-date-picker.d.ts +308 -43
  463. package/types/ngwr-donut-chart.d.ts +24 -1
  464. package/types/ngwr-dropdown.d.ts +22 -2
  465. package/types/ngwr-editor-testing.d.ts +378 -0
  466. package/types/ngwr-editor.d.ts +449 -0
  467. package/types/ngwr-event-calendar.d.ts +8 -0
  468. package/types/ngwr-form.d.ts +35 -5
  469. package/types/ngwr-gauge.d.ts +20 -1
  470. package/types/ngwr-input-number.d.ts +7 -0
  471. package/types/ngwr-line-chart.d.ts +9 -1
  472. package/types/ngwr-markdown.d.ts +61 -2
  473. package/types/ngwr-meter-group-testing.d.ts +3 -2
  474. package/types/ngwr-meter-group.d.ts +14 -1
  475. package/types/ngwr-page-header.d.ts +10 -2
  476. package/types/ngwr-popover.d.ts +154 -3
  477. package/types/ngwr-sidebar.d.ts +7 -0
  478. package/types/ngwr-sparkline.d.ts +43 -1
  479. package/types/ngwr-toolbar.d.ts +7 -0
  480. package/types/ngwr-typography.d.ts +4 -0
  481. package/types/ngwr-version.d.ts +1 -1
  482. package/typography/styles/_index.scss +16 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-qr.mjs","sources":["../../../projects/lib/qr/qrcodegen.ts","../../../projects/lib/qr/generator.ts","../../../projects/lib/qr/qr.ts","../../../projects/lib/qr/qr.html","../../../projects/lib/qr/ngwr-qr.ts"],"sourcesContent":["/* eslint-disable */\n// @ts-nocheck\n/*\n * QR Code generator library (TypeScript)\n *\n * Copyright (c) Project Nayuki. (MIT License)\n * https://www.nayuki.io/page/qr-code-generator-library\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n * - The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * - The Software is provided \"as is\", without warranty of any kind, express or\n * implied, including but not limited to the warranties of merchantability,\n * fitness for a particular purpose and noninfringement. In no event shall the\n * authors or copyright holders be liable for any claim, damages or other\n * liability, whether in an action of contract, tort or otherwise, arising from,\n * out of or in connection with the Software or the use or other dealings in the\n * Software.\n */\n\n'use strict';\n\nnamespace qrcodegen {\n type bit = number;\n type byte = number;\n type int = number;\n\n /*---- QR Code symbol class ----*/\n\n /*\n * A QR Code symbol, which is a type of two-dimension barcode.\n * Invented by Denso Wave and described in the ISO/IEC 18004 standard.\n * Instances of this class represent an immutable square grid of dark and light cells.\n * The class provides static factory functions to create a QR Code from text or binary data.\n * The class covers the QR Code Model 2 specification, supporting all versions (sizes)\n * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.\n *\n * Ways to create a QR Code object:\n * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().\n * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().\n * - Low level: Custom-make the array of data codeword bytes (including\n * segment headers and final padding, excluding error correction codewords),\n * supply the appropriate version number, and call the QrCode() constructor.\n * (Note that all ways require supplying the desired error correction level.)\n */\n export class QrCode {\n /*-- Static factory functions (high level) --*/\n\n // Returns a QR Code representing the given Unicode text string at the given error correction level.\n // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer\n // Unicode code points (not UTF-16 code units) if the low error correction level is used. The smallest possible\n // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the\n // ecl argument if it can be done without increasing the version.\n public static encodeText(text: string, ecl: QrCode.Ecc): QrCode {\n const segs: QrSegment[] = qrcodegen.QrSegment.makeSegments(text);\n return QrCode.encodeSegments(segs, ecl);\n }\n\n // Returns a QR Code representing the given binary data at the given error correction level.\n // This function always encodes using the binary segment mode, not any text mode. The maximum number of\n // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.\n // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.\n public static encodeBinary(data: readonly byte[], ecl: QrCode.Ecc): QrCode {\n const seg: QrSegment = qrcodegen.QrSegment.makeBytes(data);\n return QrCode.encodeSegments([seg], ecl);\n }\n\n /*-- Static factory functions (mid level) --*/\n\n // Returns a QR Code representing the given segments with the given encoding parameters.\n // The smallest possible QR Code version within the given range is automatically\n // chosen for the output. Iff boostEcl is true, then the ECC level of the result\n // may be higher than the ecl argument if it can be done without increasing the\n // version. The mask number is either between 0 to 7 (inclusive) to force that\n // mask, or -1 to automatically choose an appropriate mask (which may be slow).\n // This function allows the user to create a custom sequence of segments that switches\n // between modes (such as alphanumeric and byte) to encode text in less space.\n // This is a mid-level API; the high-level API is encodeText() and encodeBinary().\n public static encodeSegments(\n segs: readonly QrSegment[],\n ecl: QrCode.Ecc,\n minVersion: int = 1,\n maxVersion: int = 40,\n mask: int = -1,\n boostEcl = true\n ): QrCode {\n if (\n !(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION) ||\n mask < -1 ||\n mask > 7\n )\n throw new RangeError('Invalid value');\n\n // Find the minimal version number to use\n let version: int;\n let dataUsedBits: int;\n for (version = minVersion; ; version++) {\n const dataCapacityBits: int = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available\n const usedBits: number = QrSegment.getTotalBits(segs, version);\n if (usedBits <= dataCapacityBits) {\n dataUsedBits = usedBits;\n break; // This version number is found to be suitable\n }\n if (version >= maxVersion)\n // All versions in the range could not fit the given data\n throw new RangeError('Data too long');\n }\n\n // Increase the error correction level while the data still fits in the current version number\n for (const newEcl of [QrCode.Ecc.MEDIUM, QrCode.Ecc.QUARTILE, QrCode.Ecc.HIGH]) {\n // From low to high\n if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8) ecl = newEcl;\n }\n\n // Concatenate all segments to create the data bit string\n const bb: bit[] = [];\n for (const seg of segs) {\n appendBits(seg.mode.modeBits, 4, bb);\n appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);\n for (const b of seg.getData()) bb.push(b);\n }\n assert(bb.length == dataUsedBits);\n\n // Add terminator and pad up to a byte if applicable\n const dataCapacityBits: int = QrCode.getNumDataCodewords(version, ecl) * 8;\n assert(bb.length <= dataCapacityBits);\n appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);\n appendBits(0, (8 - (bb.length % 8)) % 8, bb);\n assert(bb.length % 8 == 0);\n\n // Pad with alternating bytes until data capacity is reached\n for (let padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11) appendBits(padByte, 8, bb);\n\n // Pack bits into bytes in big endian\n const dataCodewords: byte[] = [];\n while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);\n bb.forEach((b: bit, i: int) => (dataCodewords[i >>> 3] |= b << (7 - (i & 7))));\n\n // Create the QR Code object\n return new QrCode(version, ecl, dataCodewords, mask);\n }\n\n /*-- Fields --*/\n\n // The width and height of this QR Code, measured in modules, between\n // 21 and 177 (inclusive). This is equal to version * 4 + 17.\n public readonly size: int;\n\n // The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).\n // Even if a QR Code is created with automatic masking requested (mask = -1),\n // the resulting object still has a mask value between 0 and 7.\n public readonly mask: int;\n\n // The modules of this QR Code (false = light, true = dark).\n // Immutable after constructor finishes. Accessed through getModule().\n private readonly modules: boolean[][] = [];\n\n // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.\n private readonly isFunction: boolean[][] = [];\n\n /*-- Constructor (low level) and fields --*/\n\n // Creates a new QR Code with the given version number,\n // error correction level, data codeword bytes, and mask number.\n // This is a low-level API that most users should not use directly.\n // A mid-level API is the encodeSegments() function.\n public constructor(\n // The version number of this QR Code, which is between 1 and 40 (inclusive).\n // This determines the size of this barcode.\n public readonly version: int,\n\n // The error correction level used in this QR Code.\n public readonly errorCorrectionLevel: QrCode.Ecc,\n\n dataCodewords: readonly byte[],\n\n msk: int\n ) {\n // Check scalar arguments\n if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION)\n throw new RangeError('Version value out of range');\n if (msk < -1 || msk > 7) throw new RangeError('Mask value out of range');\n this.size = version * 4 + 17;\n\n // Initialize both grids to be size*size arrays of Boolean false\n const row: boolean[] = [];\n for (let i = 0; i < this.size; i++) row.push(false);\n for (let i = 0; i < this.size; i++) {\n this.modules.push(row.slice()); // Initially all light\n this.isFunction.push(row.slice());\n }\n\n // Compute ECC, draw modules\n this.drawFunctionPatterns();\n const allCodewords: byte[] = this.addEccAndInterleave(dataCodewords);\n this.drawCodewords(allCodewords);\n\n // Do masking\n if (msk == -1) {\n // Automatically choose best mask\n let minPenalty: int = 1000000000;\n for (let i = 0; i < 8; i++) {\n this.applyMask(i);\n this.drawFormatBits(i);\n const penalty: int = this.getPenaltyScore();\n if (penalty < minPenalty) {\n msk = i;\n minPenalty = penalty;\n }\n this.applyMask(i); // Undoes the mask due to XOR\n }\n }\n assert(msk >= 0 && msk <= 7);\n this.mask = msk;\n this.applyMask(msk); // Apply the final choice of mask\n this.drawFormatBits(msk); // Overwrite old format bits\n\n this.isFunction = [];\n }\n\n /*-- Accessor methods --*/\n\n // Returns the color of the module (pixel) at the given coordinates, which is false\n // for light or true for dark. The top left corner has the coordinates (x=0, y=0).\n // If the given coordinates are out of bounds, then false (light) is returned.\n public getModule(x: int, y: int): boolean {\n return x >= 0 && x < this.size && y >= 0 && y < this.size && this.modules[y][x];\n }\n\n /*-- Private helper methods for constructor: Drawing function modules --*/\n\n // Reads this object's version field, and draws and marks all function modules.\n private drawFunctionPatterns(): void {\n // Draw horizontal and vertical timing patterns\n for (let i = 0; i < this.size; i++) {\n this.setFunctionModule(6, i, i % 2 == 0);\n this.setFunctionModule(i, 6, i % 2 == 0);\n }\n\n // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)\n this.drawFinderPattern(3, 3);\n this.drawFinderPattern(this.size - 4, 3);\n this.drawFinderPattern(3, this.size - 4);\n\n // Draw numerous alignment patterns\n const alignPatPos: int[] = this.getAlignmentPatternPositions();\n const numAlign: int = alignPatPos.length;\n for (let i = 0; i < numAlign; i++) {\n for (let j = 0; j < numAlign; j++) {\n // Don't draw on the three finder corners\n if (!((i == 0 && j == 0) || (i == 0 && j == numAlign - 1) || (i == numAlign - 1 && j == 0)))\n this.drawAlignmentPattern(alignPatPos[i], alignPatPos[j]);\n }\n }\n\n // Draw configuration data\n this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor\n this.drawVersion();\n }\n\n // Draws two copies of the format bits (with its own error correction code)\n // based on the given mask and this object's error correction level field.\n private drawFormatBits(mask: int): void {\n // Calculate error correction code and pack bits\n const data: int = (this.errorCorrectionLevel.formatBits << 3) | mask; // errCorrLvl is uint2, mask is uint3\n let rem: int = data;\n for (let i = 0; i < 10; i++) rem = (rem << 1) ^ ((rem >>> 9) * 0x537);\n const bits = ((data << 10) | rem) ^ 0x5412; // uint15\n assert(bits >>> 15 == 0);\n\n // Draw first copy\n for (let i = 0; i <= 5; i++) this.setFunctionModule(8, i, getBit(bits, i));\n this.setFunctionModule(8, 7, getBit(bits, 6));\n this.setFunctionModule(8, 8, getBit(bits, 7));\n this.setFunctionModule(7, 8, getBit(bits, 8));\n for (let i = 9; i < 15; i++) this.setFunctionModule(14 - i, 8, getBit(bits, i));\n\n // Draw second copy\n for (let i = 0; i < 8; i++) this.setFunctionModule(this.size - 1 - i, 8, getBit(bits, i));\n for (let i = 8; i < 15; i++) this.setFunctionModule(8, this.size - 15 + i, getBit(bits, i));\n this.setFunctionModule(8, this.size - 8, true); // Always dark\n }\n\n // Draws two copies of the version bits (with its own error correction code),\n // based on this object's version field, iff 7 <= version <= 40.\n private drawVersion(): void {\n if (this.version < 7) return;\n\n // Calculate error correction code and pack bits\n let rem: int = this.version; // version is uint6, in the range [7, 40]\n for (let i = 0; i < 12; i++) rem = (rem << 1) ^ ((rem >>> 11) * 0x1f25);\n const bits: int = (this.version << 12) | rem; // uint18\n assert(bits >>> 18 == 0);\n\n // Draw two copies\n for (let i = 0; i < 18; i++) {\n const color: boolean = getBit(bits, i);\n const a: int = this.size - 11 + (i % 3);\n const b: int = Math.floor(i / 3);\n this.setFunctionModule(a, b, color);\n this.setFunctionModule(b, a, color);\n }\n }\n\n // Draws a 9*9 finder pattern including the border separator,\n // with the center module at (x, y). Modules can be out of bounds.\n private drawFinderPattern(x: int, y: int): void {\n for (let dy = -4; dy <= 4; dy++) {\n for (let dx = -4; dx <= 4; dx++) {\n const dist: int = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm\n const xx: int = x + dx;\n const yy: int = y + dy;\n if (xx >= 0 && xx < this.size && yy >= 0 && yy < this.size)\n this.setFunctionModule(xx, yy, dist != 2 && dist != 4);\n }\n }\n }\n\n // Draws a 5*5 alignment pattern, with the center module\n // at (x, y). All modules must be in bounds.\n private drawAlignmentPattern(x: int, y: int): void {\n for (let dy = -2; dy <= 2; dy++) {\n for (let dx = -2; dx <= 2; dx++)\n this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);\n }\n }\n\n // Sets the color of a module and marks it as a function module.\n // Only used by the constructor. Coordinates must be in bounds.\n private setFunctionModule(x: int, y: int, isDark: boolean): void {\n this.modules[y][x] = isDark;\n this.isFunction[y][x] = true;\n }\n\n /*-- Private helper methods for constructor: Codewords and masking --*/\n\n // Returns a new byte string representing the given data with the appropriate error correction\n // codewords appended to it, based on this object's version and error correction level.\n private addEccAndInterleave(data: readonly byte[]): byte[] {\n const ver: int = this.version;\n const ecl: QrCode.Ecc = this.errorCorrectionLevel;\n if (data.length != QrCode.getNumDataCodewords(ver, ecl)) throw new RangeError('Invalid argument');\n\n // Calculate parameter numbers\n const numBlocks: int = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n const blockEccLen: int = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];\n const rawCodewords: int = Math.floor(QrCode.getNumRawDataModules(ver) / 8);\n const numShortBlocks: int = numBlocks - (rawCodewords % numBlocks);\n const shortBlockLen: int = Math.floor(rawCodewords / numBlocks);\n\n // Split data into blocks and append ECC to each block\n const blocks: byte[][] = [];\n const rsDiv: byte[] = QrCode.reedSolomonComputeDivisor(blockEccLen);\n for (let i = 0, k = 0; i < numBlocks; i++) {\n const dat: byte[] = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));\n k += dat.length;\n const ecc: byte[] = QrCode.reedSolomonComputeRemainder(dat, rsDiv);\n if (i < numShortBlocks) dat.push(0);\n blocks.push(dat.concat(ecc));\n }\n\n // Interleave (not concatenate) the bytes from every block into a single sequence\n const result: byte[] = [];\n for (let i = 0; i < blocks[0].length; i++) {\n blocks.forEach((block, j) => {\n // Skip the padding byte in short blocks\n if (i != shortBlockLen - blockEccLen || j >= numShortBlocks) result.push(block[i]);\n });\n }\n assert(result.length == rawCodewords);\n return result;\n }\n\n // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire\n // data area of this QR Code. Function modules need to be marked off before this is called.\n private drawCodewords(data: readonly byte[]): void {\n if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8))\n throw new RangeError('Invalid argument');\n let i: int = 0; // Bit index into the data\n // Do the funny zigzag scan\n for (let right = this.size - 1; right >= 1; right -= 2) {\n // Index of right column in each column pair\n if (right == 6) right = 5;\n for (let vert = 0; vert < this.size; vert++) {\n // Vertical counter\n for (let j = 0; j < 2; j++) {\n const x: int = right - j; // Actual x coordinate\n const upward: boolean = ((right + 1) & 2) == 0;\n const y: int = upward ? this.size - 1 - vert : vert; // Actual y coordinate\n if (!this.isFunction[y][x] && i < data.length * 8) {\n this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));\n i++;\n }\n // If this QR Code has any remainder bits (0 to 7), they were assigned as\n // 0/false/light by the constructor and are left unchanged by this method\n }\n }\n }\n assert(i == data.length * 8);\n }\n\n // XORs the codeword modules in this QR Code with the given mask pattern.\n // The function modules must be marked and the codeword bits must be drawn\n // before masking. Due to the arithmetic of XOR, calling applyMask() with\n // the same mask value a second time will undo the mask. A final well-formed\n // QR Code needs exactly one (not zero, two, etc.) mask applied.\n private applyMask(mask: int): void {\n if (mask < 0 || mask > 7) throw new RangeError('Mask value out of range');\n for (let y = 0; y < this.size; y++) {\n for (let x = 0; x < this.size; x++) {\n let invert: boolean;\n switch (mask) {\n case 0:\n invert = (x + y) % 2 == 0;\n break;\n case 1:\n invert = y % 2 == 0;\n break;\n case 2:\n invert = x % 3 == 0;\n break;\n case 3:\n invert = (x + y) % 3 == 0;\n break;\n case 4:\n invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;\n break;\n case 5:\n invert = ((x * y) % 2) + ((x * y) % 3) == 0;\n break;\n case 6:\n invert = (((x * y) % 2) + ((x * y) % 3)) % 2 == 0;\n break;\n case 7:\n invert = (((x + y) % 2) + ((x * y) % 3)) % 2 == 0;\n break;\n default:\n throw new Error('Unreachable');\n }\n if (!this.isFunction[y][x] && invert) this.modules[y][x] = !this.modules[y][x];\n }\n }\n }\n\n // Calculates and returns the penalty score based on state of this QR Code's current modules.\n // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.\n private getPenaltyScore(): int {\n let result: int = 0;\n\n // Adjacent modules in row having same color, and finder-like patterns\n for (let y = 0; y < this.size; y++) {\n let runColor = false;\n let runX = 0;\n const runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (let x = 0; x < this.size; x++) {\n if (this.modules[y][x] == runColor) {\n runX++;\n if (runX == 5) result += QrCode.PENALTY_N1;\n else if (runX > 5) result++;\n } else {\n this.finderPenaltyAddHistory(runX, runHistory);\n if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runX = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;\n }\n // Adjacent modules in column having same color, and finder-like patterns\n for (let x = 0; x < this.size; x++) {\n let runColor = false;\n let runY = 0;\n const runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (let y = 0; y < this.size; y++) {\n if (this.modules[y][x] == runColor) {\n runY++;\n if (runY == 5) result += QrCode.PENALTY_N1;\n else if (runY > 5) result++;\n } else {\n this.finderPenaltyAddHistory(runY, runHistory);\n if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runY = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runY, runHistory) * QrCode.PENALTY_N3;\n }\n\n // 2*2 blocks of modules having same color\n for (let y = 0; y < this.size - 1; y++) {\n for (let x = 0; x < this.size - 1; x++) {\n const color: boolean = this.modules[y][x];\n if (color == this.modules[y][x + 1] && color == this.modules[y + 1][x] && color == this.modules[y + 1][x + 1])\n result += QrCode.PENALTY_N2;\n }\n }\n\n // Balance of dark and light modules\n let dark: int = 0;\n for (const row of this.modules) dark = row.reduce((sum, color) => sum + (color ? 1 : 0), dark);\n const total: int = this.size * this.size; // Note that size is odd, so dark/total != 1/2\n // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%\n const k: int = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;\n assert(k >= 0 && k <= 9);\n result += k * QrCode.PENALTY_N4;\n assert(result >= 0 && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4\n return result;\n }\n\n /*-- Private helper functions --*/\n\n // Returns an ascending list of positions of alignment patterns for this version number.\n // Each position is in the range [0,177), and are used on both the x and y axes.\n // This could be implemented as lookup table of 40 variable-length lists of integers.\n private getAlignmentPatternPositions(): int[] {\n if (this.version == 1) return [];\n else {\n const numAlign: int = Math.floor(this.version / 7) + 2;\n const step: int = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;\n const result: int[] = [6];\n for (let pos = this.size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);\n return result;\n }\n }\n\n // Returns the number of data bits that can be stored in a QR Code of the given version number, after\n // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.\n // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.\n private static getNumRawDataModules(ver: int): int {\n if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) throw new RangeError('Version number out of range');\n let result: int = (16 * ver + 128) * ver + 64;\n if (ver >= 2) {\n const numAlign: int = Math.floor(ver / 7) + 2;\n result -= (25 * numAlign - 10) * numAlign - 55;\n if (ver >= 7) result -= 36;\n }\n assert(result >= 208 && result <= 29648);\n return result;\n }\n\n // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any\n // QR Code of the given version number and error correction level, with remainder bits discarded.\n // This stateless pure function could be implemented as a (40*4)-cell lookup table.\n private static getNumDataCodewords(ver: int, ecl: QrCode.Ecc): int {\n return (\n Math.floor(QrCode.getNumRawDataModules(ver) / 8) -\n QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] * QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver]\n );\n }\n\n // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be\n // implemented as a lookup table over all possible parameter values, instead of as an algorithm.\n private static reedSolomonComputeDivisor(degree: int): byte[] {\n if (degree < 1 || degree > 255) throw new RangeError('Degree out of range');\n // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.\n // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93].\n const result: byte[] = [];\n for (let i = 0; i < degree - 1; i++) result.push(0);\n result.push(1); // Start off with the monomial x^0\n\n // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),\n // and drop the highest monomial term which is always 1x^degree.\n // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).\n let root = 1;\n for (let i = 0; i < degree; i++) {\n // Multiply the current product by (x - r^i)\n for (let j = 0; j < result.length; j++) {\n result[j] = QrCode.reedSolomonMultiply(result[j], root);\n if (j + 1 < result.length) result[j] ^= result[j + 1];\n }\n root = QrCode.reedSolomonMultiply(root, 0x02);\n }\n return result;\n }\n\n // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.\n private static reedSolomonComputeRemainder(data: readonly byte[], divisor: readonly byte[]): byte[] {\n const result: byte[] = divisor.map(_ => 0);\n for (const b of data) {\n // Polynomial division\n const factor: byte = b ^ (result.shift() as byte);\n result.push(0);\n divisor.forEach((coef, i) => (result[i] ^= QrCode.reedSolomonMultiply(coef, factor)));\n }\n return result;\n }\n\n // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result\n // are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.\n private static reedSolomonMultiply(x: byte, y: byte): byte {\n if (x >>> 8 != 0 || y >>> 8 != 0) throw new RangeError('Byte out of range');\n // Russian peasant multiplication\n let z: int = 0;\n for (let i = 7; i >= 0; i--) {\n z = (z << 1) ^ ((z >>> 7) * 0x11d);\n z ^= ((y >>> i) & 1) * x;\n }\n assert(z >>> 8 == 0);\n return z as byte;\n }\n\n // Can only be called immediately after a light run is added, and\n // returns either 0, 1, or 2. A helper function for getPenaltyScore().\n private finderPenaltyCountPatterns(runHistory: readonly int[]): int {\n const n: int = runHistory[1];\n assert(n <= this.size * 3);\n const core: boolean =\n n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;\n return (\n (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) +\n (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0)\n );\n }\n\n // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().\n private finderPenaltyTerminateAndCount(currentRunColor: boolean, currentRunLength: int, runHistory: int[]): int {\n if (currentRunColor) {\n // Terminate dark run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n currentRunLength = 0;\n }\n currentRunLength += this.size; // Add light border to final run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n return this.finderPenaltyCountPatterns(runHistory);\n }\n\n // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().\n private finderPenaltyAddHistory(currentRunLength: int, runHistory: int[]): void {\n if (runHistory[0] == 0) currentRunLength += this.size; // Add light border to initial run\n runHistory.pop();\n runHistory.unshift(currentRunLength);\n }\n\n /*-- Constants and tables --*/\n\n // The minimum version number supported in the QR Code Model 2 standard.\n public static readonly MIN_VERSION: int = 1;\n // The maximum version number supported in the QR Code Model 2 standard.\n public static readonly MAX_VERSION: int = 40;\n\n // For use in getPenaltyScore(), when evaluating which mask is best.\n private static readonly PENALTY_N1: int = 3;\n private static readonly PENALTY_N2: int = 3;\n private static readonly PENALTY_N3: int = 40;\n private static readonly PENALTY_N4: int = 10;\n\n private static readonly ECC_CODEWORDS_PER_BLOCK: int[][] = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [\n -1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30,\n 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,\n ], // Low\n [\n -1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28,\n 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n ], // Medium\n [\n -1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30,\n 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,\n ], // Quartile\n [\n -1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30,\n 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,\n ], // High\n ];\n\n private static readonly NUM_ERROR_CORRECTION_BLOCKS: int[][] = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [\n -1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18,\n 19, 19, 20, 21, 22, 24, 25,\n ], // Low\n [\n -1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29,\n 31, 33, 35, 37, 38, 40, 43, 45, 47, 49,\n ], // Medium\n [\n -1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40,\n 43, 45, 48, 51, 53, 56, 59, 62, 65, 68,\n ], // Quartile\n [\n -1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45,\n 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81,\n ], // High\n ];\n }\n\n // Appends the given number of low-order bits of the given value\n // to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.\n function appendBits(val: int, len: int, bb: bit[]): void {\n if (len < 0 || len > 31 || val >>> len != 0) throw new RangeError('Value out of range');\n for (\n let i = len - 1;\n i >= 0;\n i-- // Append bit by bit\n )\n bb.push((val >>> i) & 1);\n }\n\n // Returns true iff the i'th bit of x is set to 1.\n function getBit(x: int, i: int): boolean {\n return ((x >>> i) & 1) != 0;\n }\n\n // Throws an exception if the given condition is false.\n function assert(cond: boolean): void {\n if (!cond) throw new Error('Assertion error');\n }\n\n /*---- Data segment class ----*/\n\n /*\n * A segment of character/binary/control data in a QR Code symbol.\n * Instances of this class are immutable.\n * The mid-level way to create a segment is to take the payload data\n * and call a static factory function such as QrSegment.makeNumeric().\n * The low-level way to create a segment is to custom-make the bit buffer\n * and call the QrSegment() constructor with appropriate values.\n * This segment class imposes no length restrictions, but QR Codes have restrictions.\n * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.\n * Any segment longer than this is meaningless for the purpose of generating QR Codes.\n */\n export class QrSegment {\n /*-- Static factory functions (mid level) --*/\n\n // Returns a segment representing the given binary data encoded in\n // byte mode. All input byte arrays are acceptable. Any text string\n // can be converted to UTF-8 bytes and encoded as a byte mode segment.\n public static makeBytes(data: readonly byte[]): QrSegment {\n const bb: bit[] = [];\n for (const b of data) appendBits(b, 8, bb);\n return new QrSegment(QrSegment.Mode.BYTE, data.length, bb);\n }\n\n // Returns a segment representing the given string of decimal digits encoded in numeric mode.\n public static makeNumeric(digits: string): QrSegment {\n if (!QrSegment.isNumeric(digits)) throw new RangeError('String contains non-numeric characters');\n const bb: bit[] = [];\n for (let i = 0; i < digits.length;) {\n // Consume up to 3 digits per iteration\n const n: int = Math.min(digits.length - i, 3);\n appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);\n i += n;\n }\n return new QrSegment(QrSegment.Mode.NUMERIC, digits.length, bb);\n }\n\n // Returns a segment representing the given text string encoded in alphanumeric mode.\n // The characters allowed are: 0 to 9, A to Z (uppercase only), space,\n // dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n public static makeAlphanumeric(text: string): QrSegment {\n if (!QrSegment.isAlphanumeric(text))\n throw new RangeError('String contains unencodable characters in alphanumeric mode');\n const bb: bit[] = [];\n let i: int;\n for (i = 0; i + 2 <= text.length; i += 2) {\n // Process groups of 2\n let temp: int = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;\n temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));\n appendBits(temp, 11, bb);\n }\n if (i < text.length)\n // 1 character remaining\n appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);\n return new QrSegment(QrSegment.Mode.ALPHANUMERIC, text.length, bb);\n }\n\n // Returns a new mutable list of zero or more segments to represent the given Unicode text string.\n // The result may use various segment modes and switch modes to optimize the length of the bit stream.\n public static makeSegments(text: string): QrSegment[] {\n // Select the most efficient segment encoding automatically\n if (text == '') return [];\n else if (QrSegment.isNumeric(text)) return [QrSegment.makeNumeric(text)];\n else if (QrSegment.isAlphanumeric(text)) return [QrSegment.makeAlphanumeric(text)];\n else return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];\n }\n\n // Returns a segment representing an Extended Channel Interpretation\n // (ECI) designator with the given assignment value.\n public static makeEci(assignVal: int): QrSegment {\n const bb: bit[] = [];\n if (assignVal < 0) throw new RangeError('ECI assignment value out of range');\n else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb);\n else if (assignVal < 1 << 14) {\n appendBits(0b10, 2, bb);\n appendBits(assignVal, 14, bb);\n } else if (assignVal < 1000000) {\n appendBits(0b110, 3, bb);\n appendBits(assignVal, 21, bb);\n } else throw new RangeError('ECI assignment value out of range');\n return new QrSegment(QrSegment.Mode.ECI, 0, bb);\n }\n\n // Tests whether the given string can be encoded as a segment in numeric mode.\n // A string is encodable iff each character is in the range 0 to 9.\n public static isNumeric(text: string): boolean {\n return QrSegment.NUMERIC_REGEX.test(text);\n }\n\n // Tests whether the given string can be encoded as a segment in alphanumeric mode.\n // A string is encodable iff each character is in the following set: 0 to 9, A to Z\n // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n public static isAlphanumeric(text: string): boolean {\n return QrSegment.ALPHANUMERIC_REGEX.test(text);\n }\n\n /*-- Constructor (low level) and fields --*/\n\n // Creates a new QR Code segment with the given attributes and data.\n // The character count (numChars) must agree with the mode and the bit buffer length,\n // but the constraint isn't checked. The given bit buffer is cloned and stored.\n public constructor(\n // The mode indicator of this segment.\n public readonly mode: QrSegment.Mode,\n\n // The length of this segment's unencoded data. Measured in characters for\n // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.\n // Always zero or positive. Not the same as the data's bit length.\n public readonly numChars: int,\n\n // The data bits of this segment. Accessed through getData().\n private readonly bitData: bit[]\n ) {\n if (numChars < 0) throw new RangeError('Invalid argument');\n this.bitData = bitData.slice(); // Make defensive copy\n }\n\n /*-- Methods --*/\n\n // Returns a new copy of the data bits of this segment.\n public getData(): bit[] {\n return this.bitData.slice(); // Make defensive copy\n }\n\n // (Package-private) Calculates and returns the number of bits needed to encode the given segments at\n // the given version. The result is infinity if a segment has too many characters to fit its length field.\n public static getTotalBits(segs: readonly QrSegment[], version: int): number {\n let result = 0;\n for (const seg of segs) {\n const ccbits: int = seg.mode.numCharCountBits(version);\n if (seg.numChars >= 1 << ccbits) return Infinity; // The segment's length doesn't fit the field's bit width\n result += 4 + ccbits + seg.bitData.length;\n }\n return result;\n }\n\n // Returns a new array of bytes representing the given string encoded in UTF-8.\n private static toUtf8ByteArray(str: string): byte[] {\n str = encodeURI(str);\n const result: byte[] = [];\n for (let i = 0; i < str.length; i++) {\n if (str.charAt(i) != '%') result.push(str.charCodeAt(i));\n else {\n result.push(parseInt(str.substring(i + 1, i + 3), 16));\n i += 2;\n }\n }\n return result;\n }\n\n /*-- Constants --*/\n\n // Describes precisely all strings that are encodable in numeric mode.\n private static readonly NUMERIC_REGEX: RegExp = /^[0-9]*$/;\n\n // Describes precisely all strings that are encodable in alphanumeric mode.\n private static readonly ALPHANUMERIC_REGEX: RegExp = /^[A-Z0-9 $%*+.\\/:-]*$/;\n\n // The set of all legal characters in alphanumeric mode,\n // where each character value maps to the index in the string.\n private static readonly ALPHANUMERIC_CHARSET: string = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';\n }\n}\n\n/*---- Public helper enumeration ----*/\n\nnamespace qrcodegen {\n /*\n * The error correction level in a QR Code symbol. Immutable.\n */\n export namespace QrCode {\n export class Ecc {\n /*-- Constants --*/\n\n public static readonly LOW = new Ecc(0, 1); // The QR Code can tolerate about 7% erroneous codewords\n public static readonly MEDIUM = new Ecc(1, 0); // The QR Code can tolerate about 15% erroneous codewords\n public static readonly QUARTILE = new Ecc(2, 3); // The QR Code can tolerate about 25% erroneous codewords\n public static readonly HIGH = new Ecc(3, 2); // The QR Code can tolerate about 30% erroneous codewords\n\n /*-- Constructor and fields --*/\n\n private constructor(\n // In the range 0 to 3 (unsigned 2-bit integer).\n public readonly ordinal: int,\n // (Package-private) In the range 0 to 3 (unsigned 2-bit integer).\n public readonly formatBits: int\n ) {}\n }\n }\n\n /*\n * Describes how a segment's data bits are interpreted. Immutable.\n */\n export namespace QrSegment {\n export class Mode {\n /*-- Constants --*/\n\n public static readonly NUMERIC = new Mode(0x1, [10, 12, 14]);\n public static readonly ALPHANUMERIC = new Mode(0x2, [9, 11, 13]);\n public static readonly BYTE = new Mode(0x4, [8, 16, 16]);\n public static readonly KANJI = new Mode(0x8, [8, 10, 12]);\n public static readonly ECI = new Mode(0x7, [0, 0, 0]);\n\n /*-- Constructor and fields --*/\n\n private constructor(\n // The mode indicator bits, which is a uint4 value (range 0 to 15).\n public readonly modeBits: int,\n // Number of character count bits for three different version ranges.\n private readonly numBitsCharCount: [int, int, int]\n ) {}\n\n /*-- Method --*/\n\n // (Package-private) Returns the bit width of the character count field for a segment in\n // this mode in a QR Code at the given version number. The result is in the range [0, 16].\n public numCharCountBits(ver: int): int {\n return this.numBitsCharCount[Math.floor((ver + 7) / 17)];\n }\n }\n }\n}\n\nexport default qrcodegen;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isDevMode } from '@angular/core';\n\nimport type { WrQrErrorLevel } from './interfaces';\nimport qrcodegen from './qrcodegen';\n\ninterface DrawOptionsInternal {\n readonly value: string;\n readonly size: number;\n readonly padding: number;\n readonly color: string;\n readonly bgColor: string;\n readonly level: WrQrErrorLevel;\n readonly iconUrl?: string | null;\n readonly iconSize?: number;\n}\n\nconst ERROR_LEVEL_MAP: Record<WrQrErrorLevel, qrcodegen.QrCode.Ecc> = {\n L: qrcodegen.QrCode.Ecc.LOW,\n M: qrcodegen.QrCode.Ecc.MEDIUM,\n Q: qrcodegen.QrCode.Ecc.QUARTILE,\n H: qrcodegen.QrCode.Ecc.HIGH,\n};\n\nconst SCALE = 10;\n\nfunction drawBackground(ctx: CanvasRenderingContext2D, width: number, height: number, bgColor: string): void {\n ctx.fillStyle = bgColor;\n ctx.fillRect(0, 0, width, height);\n}\n\nfunction drawModules(ctx: CanvasRenderingContext2D, code: qrcodegen.QrCode, padding: number, color: string): void {\n ctx.fillStyle = color;\n for (let y = 0; y < code.size; y++) {\n for (let x = 0; x < code.size; x++) {\n if (code.getModule(x, y)) {\n ctx.fillRect(padding + x * SCALE, padding + y * SCALE, SCALE, SCALE);\n }\n }\n }\n}\n\n/**\n * The `iconUrl` a consumer bound, or `null` when it names a scheme an image must\n * not fetch.\n *\n * A security audit of 13.0.0 bound an attacker-shaped `[iconUrl]` and watched the\n * page make the request: the value went to `new Image().src` verbatim, which is\n * the one thing Angular would have sanitised had the template written `[src]`\n * itself. The library does the loading here, so the app loses that protection\n * without being told.\n *\n * Same rules as `safeMarkdownUrl` in `ngwr/markdown`, and deliberately a copy\n * rather than an import: an entry point may not depend on another's internals,\n * and one call site does not earn a shared util. A third would — put it in\n * `ngwr/utils` beside `isSafeCssValue` when that happens.\n *\n * `data:` is allowed for raster types only. An SVG can carry script, and\n * `data:text/html` is a same-origin document.\n */\nfunction safeIconUrl(raw: string): string | null {\n const url = raw.trim();\n // Control characters are stripped BEFORE the scheme is read: a browser ignores\n // them while resolving, so a check reading the raw string sees a relative path\n // and waves `java\\u0000script:` through.\n // eslint-disable-next-line no-control-regex\n const bare = url.replace(/[\\s\\u0000-\\u001f\\u007f]/g, '');\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(bare);\n\n // No scheme: a relative path or `//host` — nothing executable.\n if (!scheme) return url;\n\n const name = scheme[1].toLowerCase();\n if (name === 'data') return /^data:image\\/(?:png|jpe?g|gif|webp|avif);base64,[a-z0-9+/=]+$/i.test(bare) ? bare : null;\n\n return name === 'http' || name === 'https' ? url : null;\n}\n\nfunction overlayIcon(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D, options: DrawOptionsInternal): void {\n const src = safeIconUrl(options.iconUrl!);\n if (src === null) return;\n\n const iconImg = new Image();\n iconImg.crossOrigin = 'anonymous';\n iconImg.src = src;\n\n const ratio = canvas.width / options.size;\n const iconPx = (options.iconSize ?? 42) * ratio;\n const coord = canvas.width / 2 - iconPx / 2;\n\n iconImg.onload = (): void => {\n ctx.fillStyle = options.bgColor;\n ctx.fillRect(coord, coord, iconPx, iconPx);\n ctx.drawImage(iconImg, coord + 10, coord + 10, iconPx - 20, iconPx - 20);\n };\n}\n\n/**\n * Encodes the payload, or reports `null` when it does not fit.\n *\n * A version-40 code tops out around 2953 bytes at level L and 1273 at level H, and the\n * vendored encoder answers a longer one by throwing `RangeError('Data too long')`. That\n * is a value the consumer bound, not a bug — and `WrQr` calls this from an `effect()`,\n * where an exception escapes into `runEffectsInView` and abandons every remaining effect\n * in the view, so one over-long string would stop the OTHER QR codes on the page from\n * repainting. Same policy as `wr-icon` with an unregistered name: reported in dev,\n * never thrown.\n *\n * Only that one RangeError is absorbed. Anything else the encoder raises is a genuine\n * bug in it, and swallowing those would turn a crash into a silently blank code.\n */\nfunction encode(options: DrawOptionsInternal): qrcodegen.QrCode | null {\n try {\n return qrcodegen.QrCode.encodeText(options.value, ERROR_LEVEL_MAP[options.level]);\n } catch (error) {\n if (!(error instanceof RangeError) || error.message !== 'Data too long') throw error;\n if (isDevMode()) {\n // eslint-disable-next-line no-console -- a payload that cannot be encoded must be visible, but must not throw\n console.error(\n `[NGWR] <wr-qr> cannot encode ${options.value.length} characters at error-correction level ` +\n `\"${options.level}\" — the largest QR code holds about 2953 bytes at level \"L\" and 1273 at \"H\", ` +\n `and non-ASCII text costs several bytes per character. Shorten the value, or lower the level.`\n );\n }\n return null;\n }\n}\n\nfunction draw(canvas: HTMLCanvasElement, options: DrawOptionsInternal): void {\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n\n canvas.style.width = `${options.size}px`;\n canvas.style.height = `${options.size}px`;\n\n if (!options.value) {\n ctx.fillStyle = options.bgColor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n return;\n }\n\n const code = encode(options);\n if (!code) {\n // Over capacity: leave a blank surface rather than a stale code. Painting the\n // whole bitmap is what clears the previous value — `canvas.width` is only reassigned\n // once an encode succeeds, so the surface still holds the last code's modules.\n drawBackground(ctx, canvas.width, canvas.height, options.bgColor);\n return;\n }\n\n const padding = options.padding;\n canvas.width = code.size * SCALE + padding * 2;\n canvas.height = code.size * SCALE + padding * 2;\n\n drawBackground(ctx, canvas.width, canvas.height, options.bgColor);\n drawModules(ctx, code, padding, options.color);\n\n if (options.iconUrl) {\n overlayIcon(canvas, ctx, options);\n }\n}\n\n/** Options accepted by {@link drawQrCode}. @internal */\nexport type DrawOptions = DrawOptionsInternal;\n\n/**\n * Renders a QR code (with optional center icon) onto the given canvas.\n *\n * @internal\n */\nexport const drawQrCode = draw;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport type { ElementRef } from '@angular/core';\nimport { Component, PLATFORM_ID, ViewEncapsulation, effect, inject, input, viewChild } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { numAttr } from 'ngwr/utils';\n\nimport { drawQrCode } from './generator';\nimport type { WrQrErrorLevel } from './interfaces';\n\n/**\n * Renders a QR code on a `<canvas>`.\n *\n * @example\n * ```html\n * <wr-qr value=\"https://ngwr.dev\" [size]=\"200\" level=\"H\" />\n * <wr-qr value=\"...\" iconUrl=\"/logo.png\" [iconSize]=\"48\" level=\"H\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/qrcode\n */\n@Component({\n selector: 'wr-qr',\n templateUrl: './qr.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-qr', '[style.background]': 'bgColor()' },\n})\nexport class WrQr {\n /** Text or URL to encode. Required. */\n readonly value = input.required<string>();\n\n /** Error correction level. Use `'H'` if you overlay an icon. @default 'M' */\n readonly level = input<WrQrErrorLevel>('M');\n\n /** Side length of the rendered canvas, in pixels. @default 160 */\n readonly size = input(160, { transform: numAttr(160) });\n\n /** Outer quiet-zone padding in pixels. @default 10 */\n readonly padding = input(10, { transform: numAttr(10) });\n\n /** Module (dot) color. @default '#000000' */\n readonly color = input<string>('#000000');\n\n /** Background color of the canvas + host. @default '#ffffff' */\n readonly bgColor = input<string>('#ffffff');\n\n /** Optional image URL or data URL to overlay in the center. */\n readonly iconUrl = input<string | null>(null);\n\n /** Center icon size in logical pixels. @default 42 */\n readonly iconSize = input(42, { transform: numAttr(42) });\n\n /**\n * Accessible name. A QR code is content — it usually encodes a URL — and a\n * `<canvas>` carries no implicit role and no text alternative, so without a name it\n * is nothing at all to a screen reader. Say what the code is FOR when you can.\n * Falls back to `qr.label`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'qr.label', 'QR code');\n\n protected readonly canvas = viewChild<ElementRef<HTMLCanvasElement>>('canvas');\n protected readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n effect(() => {\n // Read every input to register reactive deps\n const opts = {\n value: this.value(),\n size: this.size(),\n padding: this.padding(),\n color: this.color(),\n bgColor: this.bgColor(),\n level: this.level(),\n iconUrl: this.iconUrl(),\n iconSize: this.iconSize(),\n };\n if (!this.isBrowser) return;\n const el = this.canvas()?.nativeElement;\n if (!el) return;\n drawQrCode(el, opts);\n });\n }\n}\n","<!--\n Always emit the canvas — painting is guarded in the effect instead. Gating\n the element itself on the platform makes the server and client render\n different structures, which breaks hydration; a bare canvas costs nothing\n and matches how the other canvas-backed components behave.\n-->\n<canvas #canvas role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\"></canvas>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["qrcodegen"],"mappings":";;;;;;AAAA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEH,YAAY;AAEZ,IAAU,SAAS;AAAnB,CAAA,UAAU,SAAS,EAAA;;AAOjB;;;;;;;;;;;;;;;AAeG;AACH,IAAA,MAAa,MAAM,CAAA;AA4HC,QAAA,OAAA;AAGA,QAAA,oBAAA;;;;;;;AAvHX,QAAA,OAAO,UAAU,CAAC,IAAY,EAAE,GAAe,EAAA;YACpD,MAAM,IAAI,GAAgB,SAAS,CAAC,SAAS,CAAC,Y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B,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,sYAAA,EAAA;+5BAqCU,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErE/E;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-qr.mjs","sources":["../../../projects/lib/qr/qrcodegen.ts","../../../projects/lib/qr/generator.ts","../../../projects/lib/qr/qr.ts","../../../projects/lib/qr/qr.html","../../../projects/lib/qr/ngwr-qr.ts"],"sourcesContent":["/* eslint-disable */\n// @ts-nocheck\n/*\n * QR Code generator library (TypeScript)\n *\n * Copyright (c) Project Nayuki. (MIT License)\n * https://www.nayuki.io/page/qr-code-generator-library\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n * - The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * - The Software is provided \"as is\", without warranty of any kind, express or\n * implied, including but not limited to the warranties of merchantability,\n * fitness for a particular purpose and noninfringement. In no event shall the\n * authors or copyright holders be liable for any claim, damages or other\n * liability, whether in an action of contract, tort or otherwise, arising from,\n * out of or in connection with the Software or the use or other dealings in the\n * Software.\n */\n\n'use strict';\n\nnamespace qrcodegen {\n type bit = number;\n type byte = number;\n type int = number;\n\n /*---- QR Code symbol class ----*/\n\n /*\n * A QR Code symbol, which is a type of two-dimension barcode.\n * Invented by Denso Wave and described in the ISO/IEC 18004 standard.\n * Instances of this class represent an immutable square grid of dark and light cells.\n * The class provides static factory functions to create a QR Code from text or binary data.\n * The class covers the QR Code Model 2 specification, supporting all versions (sizes)\n * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.\n *\n * Ways to create a QR Code object:\n * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().\n * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().\n * - Low level: Custom-make the array of data codeword bytes (including\n * segment headers and final padding, excluding error correction codewords),\n * supply the appropriate version number, and call the QrCode() constructor.\n * (Note that all ways require supplying the desired error correction level.)\n */\n export class QrCode {\n /*-- Static factory functions (high level) --*/\n\n // Returns a QR Code representing the given Unicode text string at the given error correction level.\n // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer\n // Unicode code points (not UTF-16 code units) if the low error correction level is used. The smallest possible\n // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the\n // ecl argument if it can be done without increasing the version.\n public static encodeText(text: string, ecl: QrCode.Ecc): QrCode {\n const segs: QrSegment[] = qrcodegen.QrSegment.makeSegments(text);\n return QrCode.encodeSegments(segs, ecl);\n }\n\n // Returns a QR Code representing the given binary data at the given error correction level.\n // This function always encodes using the binary segment mode, not any text mode. The maximum number of\n // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.\n // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.\n public static encodeBinary(data: readonly byte[], ecl: QrCode.Ecc): QrCode {\n const seg: QrSegment = qrcodegen.QrSegment.makeBytes(data);\n return QrCode.encodeSegments([seg], ecl);\n }\n\n /*-- Static factory functions (mid level) --*/\n\n // Returns a QR Code representing the given segments with the given encoding parameters.\n // The smallest possible QR Code version within the given range is automatically\n // chosen for the output. Iff boostEcl is true, then the ECC level of the result\n // may be higher than the ecl argument if it can be done without increasing the\n // version. The mask number is either between 0 to 7 (inclusive) to force that\n // mask, or -1 to automatically choose an appropriate mask (which may be slow).\n // This function allows the user to create a custom sequence of segments that switches\n // between modes (such as alphanumeric and byte) to encode text in less space.\n // This is a mid-level API; the high-level API is encodeText() and encodeBinary().\n public static encodeSegments(\n segs: readonly QrSegment[],\n ecl: QrCode.Ecc,\n minVersion: int = 1,\n maxVersion: int = 40,\n mask: int = -1,\n boostEcl = true\n ): QrCode {\n if (\n !(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION) ||\n mask < -1 ||\n mask > 7\n )\n throw new RangeError('Invalid value');\n\n // Find the minimal version number to use\n let version: int;\n let dataUsedBits: int;\n for (version = minVersion; ; version++) {\n const dataCapacityBits: int = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available\n const usedBits: number = QrSegment.getTotalBits(segs, version);\n if (usedBits <= dataCapacityBits) {\n dataUsedBits = usedBits;\n break; // This version number is found to be suitable\n }\n if (version >= maxVersion)\n // All versions in the range could not fit the given data\n throw new RangeError('Data too long');\n }\n\n // Increase the error correction level while the data still fits in the current version number\n for (const newEcl of [QrCode.Ecc.MEDIUM, QrCode.Ecc.QUARTILE, QrCode.Ecc.HIGH]) {\n // From low to high\n if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8) ecl = newEcl;\n }\n\n // Concatenate all segments to create the data bit string\n const bb: bit[] = [];\n for (const seg of segs) {\n appendBits(seg.mode.modeBits, 4, bb);\n appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);\n for (const b of seg.getData()) bb.push(b);\n }\n assert(bb.length == dataUsedBits);\n\n // Add terminator and pad up to a byte if applicable\n const dataCapacityBits: int = QrCode.getNumDataCodewords(version, ecl) * 8;\n assert(bb.length <= dataCapacityBits);\n appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);\n appendBits(0, (8 - (bb.length % 8)) % 8, bb);\n assert(bb.length % 8 == 0);\n\n // Pad with alternating bytes until data capacity is reached\n for (let padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11) appendBits(padByte, 8, bb);\n\n // Pack bits into bytes in big endian\n const dataCodewords: byte[] = [];\n while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);\n bb.forEach((b: bit, i: int) => (dataCodewords[i >>> 3] |= b << (7 - (i & 7))));\n\n // Create the QR Code object\n return new QrCode(version, ecl, dataCodewords, mask);\n }\n\n /*-- Fields --*/\n\n // The width and height of this QR Code, measured in modules, between\n // 21 and 177 (inclusive). This is equal to version * 4 + 17.\n public readonly size: int;\n\n // The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).\n // Even if a QR Code is created with automatic masking requested (mask = -1),\n // the resulting object still has a mask value between 0 and 7.\n public readonly mask: int;\n\n // The modules of this QR Code (false = light, true = dark).\n // Immutable after constructor finishes. Accessed through getModule().\n private readonly modules: boolean[][] = [];\n\n // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.\n private readonly isFunction: boolean[][] = [];\n\n /*-- Constructor (low level) and fields --*/\n\n // Creates a new QR Code with the given version number,\n // error correction level, data codeword bytes, and mask number.\n // This is a low-level API that most users should not use directly.\n // A mid-level API is the encodeSegments() function.\n public constructor(\n // The version number of this QR Code, which is between 1 and 40 (inclusive).\n // This determines the size of this barcode.\n public readonly version: int,\n\n // The error correction level used in this QR Code.\n public readonly errorCorrectionLevel: QrCode.Ecc,\n\n dataCodewords: readonly byte[],\n\n msk: int\n ) {\n // Check scalar arguments\n if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION)\n throw new RangeError('Version value out of range');\n if (msk < -1 || msk > 7) throw new RangeError('Mask value out of range');\n this.size = version * 4 + 17;\n\n // Initialize both grids to be size*size arrays of Boolean false\n const row: boolean[] = [];\n for (let i = 0; i < this.size; i++) row.push(false);\n for (let i = 0; i < this.size; i++) {\n this.modules.push(row.slice()); // Initially all light\n this.isFunction.push(row.slice());\n }\n\n // Compute ECC, draw modules\n this.drawFunctionPatterns();\n const allCodewords: byte[] = this.addEccAndInterleave(dataCodewords);\n this.drawCodewords(allCodewords);\n\n // Do masking\n if (msk == -1) {\n // Automatically choose best mask\n let minPenalty: int = 1000000000;\n for (let i = 0; i < 8; i++) {\n this.applyMask(i);\n this.drawFormatBits(i);\n const penalty: int = this.getPenaltyScore();\n if (penalty < minPenalty) {\n msk = i;\n minPenalty = penalty;\n }\n this.applyMask(i); // Undoes the mask due to XOR\n }\n }\n assert(msk >= 0 && msk <= 7);\n this.mask = msk;\n this.applyMask(msk); // Apply the final choice of mask\n this.drawFormatBits(msk); // Overwrite old format bits\n\n this.isFunction = [];\n }\n\n /*-- Accessor methods --*/\n\n // Returns the color of the module (pixel) at the given coordinates, which is false\n // for light or true for dark. The top left corner has the coordinates (x=0, y=0).\n // If the given coordinates are out of bounds, then false (light) is returned.\n public getModule(x: int, y: int): boolean {\n return x >= 0 && x < this.size && y >= 0 && y < this.size && this.modules[y][x];\n }\n\n /*-- Private helper methods for constructor: Drawing function modules --*/\n\n // Reads this object's version field, and draws and marks all function modules.\n private drawFunctionPatterns(): void {\n // Draw horizontal and vertical timing patterns\n for (let i = 0; i < this.size; i++) {\n this.setFunctionModule(6, i, i % 2 == 0);\n this.setFunctionModule(i, 6, i % 2 == 0);\n }\n\n // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)\n this.drawFinderPattern(3, 3);\n this.drawFinderPattern(this.size - 4, 3);\n this.drawFinderPattern(3, this.size - 4);\n\n // Draw numerous alignment patterns\n const alignPatPos: int[] = this.getAlignmentPatternPositions();\n const numAlign: int = alignPatPos.length;\n for (let i = 0; i < numAlign; i++) {\n for (let j = 0; j < numAlign; j++) {\n // Don't draw on the three finder corners\n if (!((i == 0 && j == 0) || (i == 0 && j == numAlign - 1) || (i == numAlign - 1 && j == 0)))\n this.drawAlignmentPattern(alignPatPos[i], alignPatPos[j]);\n }\n }\n\n // Draw configuration data\n this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor\n this.drawVersion();\n }\n\n // Draws two copies of the format bits (with its own error correction code)\n // based on the given mask and this object's error correction level field.\n private drawFormatBits(mask: int): void {\n // Calculate error correction code and pack bits\n const data: int = (this.errorCorrectionLevel.formatBits << 3) | mask; // errCorrLvl is uint2, mask is uint3\n let rem: int = data;\n for (let i = 0; i < 10; i++) rem = (rem << 1) ^ ((rem >>> 9) * 0x537);\n const bits = ((data << 10) | rem) ^ 0x5412; // uint15\n assert(bits >>> 15 == 0);\n\n // Draw first copy\n for (let i = 0; i <= 5; i++) this.setFunctionModule(8, i, getBit(bits, i));\n this.setFunctionModule(8, 7, getBit(bits, 6));\n this.setFunctionModule(8, 8, getBit(bits, 7));\n this.setFunctionModule(7, 8, getBit(bits, 8));\n for (let i = 9; i < 15; i++) this.setFunctionModule(14 - i, 8, getBit(bits, i));\n\n // Draw second copy\n for (let i = 0; i < 8; i++) this.setFunctionModule(this.size - 1 - i, 8, getBit(bits, i));\n for (let i = 8; i < 15; i++) this.setFunctionModule(8, this.size - 15 + i, getBit(bits, i));\n this.setFunctionModule(8, this.size - 8, true); // Always dark\n }\n\n // Draws two copies of the version bits (with its own error correction code),\n // based on this object's version field, iff 7 <= version <= 40.\n private drawVersion(): void {\n if (this.version < 7) return;\n\n // Calculate error correction code and pack bits\n let rem: int = this.version; // version is uint6, in the range [7, 40]\n for (let i = 0; i < 12; i++) rem = (rem << 1) ^ ((rem >>> 11) * 0x1f25);\n const bits: int = (this.version << 12) | rem; // uint18\n assert(bits >>> 18 == 0);\n\n // Draw two copies\n for (let i = 0; i < 18; i++) {\n const color: boolean = getBit(bits, i);\n const a: int = this.size - 11 + (i % 3);\n const b: int = Math.floor(i / 3);\n this.setFunctionModule(a, b, color);\n this.setFunctionModule(b, a, color);\n }\n }\n\n // Draws a 9*9 finder pattern including the border separator,\n // with the center module at (x, y). Modules can be out of bounds.\n private drawFinderPattern(x: int, y: int): void {\n for (let dy = -4; dy <= 4; dy++) {\n for (let dx = -4; dx <= 4; dx++) {\n const dist: int = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm\n const xx: int = x + dx;\n const yy: int = y + dy;\n if (xx >= 0 && xx < this.size && yy >= 0 && yy < this.size)\n this.setFunctionModule(xx, yy, dist != 2 && dist != 4);\n }\n }\n }\n\n // Draws a 5*5 alignment pattern, with the center module\n // at (x, y). All modules must be in bounds.\n private drawAlignmentPattern(x: int, y: int): void {\n for (let dy = -2; dy <= 2; dy++) {\n for (let dx = -2; dx <= 2; dx++)\n this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);\n }\n }\n\n // Sets the color of a module and marks it as a function module.\n // Only used by the constructor. Coordinates must be in bounds.\n private setFunctionModule(x: int, y: int, isDark: boolean): void {\n this.modules[y][x] = isDark;\n this.isFunction[y][x] = true;\n }\n\n /*-- Private helper methods for constructor: Codewords and masking --*/\n\n // Returns a new byte string representing the given data with the appropriate error correction\n // codewords appended to it, based on this object's version and error correction level.\n private addEccAndInterleave(data: readonly byte[]): byte[] {\n const ver: int = this.version;\n const ecl: QrCode.Ecc = this.errorCorrectionLevel;\n if (data.length != QrCode.getNumDataCodewords(ver, ecl)) throw new RangeError('Invalid argument');\n\n // Calculate parameter numbers\n const numBlocks: int = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n const blockEccLen: int = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];\n const rawCodewords: int = Math.floor(QrCode.getNumRawDataModules(ver) / 8);\n const numShortBlocks: int = numBlocks - (rawCodewords % numBlocks);\n const shortBlockLen: int = Math.floor(rawCodewords / numBlocks);\n\n // Split data into blocks and append ECC to each block\n const blocks: byte[][] = [];\n const rsDiv: byte[] = QrCode.reedSolomonComputeDivisor(blockEccLen);\n for (let i = 0, k = 0; i < numBlocks; i++) {\n const dat: byte[] = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));\n k += dat.length;\n const ecc: byte[] = QrCode.reedSolomonComputeRemainder(dat, rsDiv);\n if (i < numShortBlocks) dat.push(0);\n blocks.push(dat.concat(ecc));\n }\n\n // Interleave (not concatenate) the bytes from every block into a single sequence\n const result: byte[] = [];\n for (let i = 0; i < blocks[0].length; i++) {\n blocks.forEach((block, j) => {\n // Skip the padding byte in short blocks\n if (i != shortBlockLen - blockEccLen || j >= numShortBlocks) result.push(block[i]);\n });\n }\n assert(result.length == rawCodewords);\n return result;\n }\n\n // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire\n // data area of this QR Code. Function modules need to be marked off before this is called.\n private drawCodewords(data: readonly byte[]): void {\n if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8))\n throw new RangeError('Invalid argument');\n let i: int = 0; // Bit index into the data\n // Do the funny zigzag scan\n for (let right = this.size - 1; right >= 1; right -= 2) {\n // Index of right column in each column pair\n if (right == 6) right = 5;\n for (let vert = 0; vert < this.size; vert++) {\n // Vertical counter\n for (let j = 0; j < 2; j++) {\n const x: int = right - j; // Actual x coordinate\n const upward: boolean = ((right + 1) & 2) == 0;\n const y: int = upward ? this.size - 1 - vert : vert; // Actual y coordinate\n if (!this.isFunction[y][x] && i < data.length * 8) {\n this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));\n i++;\n }\n // If this QR Code has any remainder bits (0 to 7), they were assigned as\n // 0/false/light by the constructor and are left unchanged by this method\n }\n }\n }\n assert(i == data.length * 8);\n }\n\n // XORs the codeword modules in this QR Code with the given mask pattern.\n // The function modules must be marked and the codeword bits must be drawn\n // before masking. Due to the arithmetic of XOR, calling applyMask() with\n // the same mask value a second time will undo the mask. A final well-formed\n // QR Code needs exactly one (not zero, two, etc.) mask applied.\n private applyMask(mask: int): void {\n if (mask < 0 || mask > 7) throw new RangeError('Mask value out of range');\n for (let y = 0; y < this.size; y++) {\n for (let x = 0; x < this.size; x++) {\n let invert: boolean;\n switch (mask) {\n case 0:\n invert = (x + y) % 2 == 0;\n break;\n case 1:\n invert = y % 2 == 0;\n break;\n case 2:\n invert = x % 3 == 0;\n break;\n case 3:\n invert = (x + y) % 3 == 0;\n break;\n case 4:\n invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;\n break;\n case 5:\n invert = ((x * y) % 2) + ((x * y) % 3) == 0;\n break;\n case 6:\n invert = (((x * y) % 2) + ((x * y) % 3)) % 2 == 0;\n break;\n case 7:\n invert = (((x + y) % 2) + ((x * y) % 3)) % 2 == 0;\n break;\n default:\n throw new Error('Unreachable');\n }\n if (!this.isFunction[y][x] && invert) this.modules[y][x] = !this.modules[y][x];\n }\n }\n }\n\n // Calculates and returns the penalty score based on state of this QR Code's current modules.\n // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.\n private getPenaltyScore(): int {\n let result: int = 0;\n\n // Adjacent modules in row having same color, and finder-like patterns\n for (let y = 0; y < this.size; y++) {\n let runColor = false;\n let runX = 0;\n const runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (let x = 0; x < this.size; x++) {\n if (this.modules[y][x] == runColor) {\n runX++;\n if (runX == 5) result += QrCode.PENALTY_N1;\n else if (runX > 5) result++;\n } else {\n this.finderPenaltyAddHistory(runX, runHistory);\n if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runX = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;\n }\n // Adjacent modules in column having same color, and finder-like patterns\n for (let x = 0; x < this.size; x++) {\n let runColor = false;\n let runY = 0;\n const runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (let y = 0; y < this.size; y++) {\n if (this.modules[y][x] == runColor) {\n runY++;\n if (runY == 5) result += QrCode.PENALTY_N1;\n else if (runY > 5) result++;\n } else {\n this.finderPenaltyAddHistory(runY, runHistory);\n if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runY = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runY, runHistory) * QrCode.PENALTY_N3;\n }\n\n // 2*2 blocks of modules having same color\n for (let y = 0; y < this.size - 1; y++) {\n for (let x = 0; x < this.size - 1; x++) {\n const color: boolean = this.modules[y][x];\n if (color == this.modules[y][x + 1] && color == this.modules[y + 1][x] && color == this.modules[y + 1][x + 1])\n result += QrCode.PENALTY_N2;\n }\n }\n\n // Balance of dark and light modules\n let dark: int = 0;\n for (const row of this.modules) dark = row.reduce((sum, color) => sum + (color ? 1 : 0), dark);\n const total: int = this.size * this.size; // Note that size is odd, so dark/total != 1/2\n // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%\n const k: int = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;\n assert(k >= 0 && k <= 9);\n result += k * QrCode.PENALTY_N4;\n assert(result >= 0 && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4\n return result;\n }\n\n /*-- Private helper functions --*/\n\n // Returns an ascending list of positions of alignment patterns for this version number.\n // Each position is in the range [0,177), and are used on both the x and y axes.\n // This could be implemented as lookup table of 40 variable-length lists of integers.\n private getAlignmentPatternPositions(): int[] {\n if (this.version == 1) return [];\n else {\n const numAlign: int = Math.floor(this.version / 7) + 2;\n const step: int = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;\n const result: int[] = [6];\n for (let pos = this.size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);\n return result;\n }\n }\n\n // Returns the number of data bits that can be stored in a QR Code of the given version number, after\n // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.\n // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.\n private static getNumRawDataModules(ver: int): int {\n if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) throw new RangeError('Version number out of range');\n let result: int = (16 * ver + 128) * ver + 64;\n if (ver >= 2) {\n const numAlign: int = Math.floor(ver / 7) + 2;\n result -= (25 * numAlign - 10) * numAlign - 55;\n if (ver >= 7) result -= 36;\n }\n assert(result >= 208 && result <= 29648);\n return result;\n }\n\n // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any\n // QR Code of the given version number and error correction level, with remainder bits discarded.\n // This stateless pure function could be implemented as a (40*4)-cell lookup table.\n private static getNumDataCodewords(ver: int, ecl: QrCode.Ecc): int {\n return (\n Math.floor(QrCode.getNumRawDataModules(ver) / 8) -\n QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] * QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver]\n );\n }\n\n // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be\n // implemented as a lookup table over all possible parameter values, instead of as an algorithm.\n private static reedSolomonComputeDivisor(degree: int): byte[] {\n if (degree < 1 || degree > 255) throw new RangeError('Degree out of range');\n // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.\n // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93].\n const result: byte[] = [];\n for (let i = 0; i < degree - 1; i++) result.push(0);\n result.push(1); // Start off with the monomial x^0\n\n // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),\n // and drop the highest monomial term which is always 1x^degree.\n // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).\n let root = 1;\n for (let i = 0; i < degree; i++) {\n // Multiply the current product by (x - r^i)\n for (let j = 0; j < result.length; j++) {\n result[j] = QrCode.reedSolomonMultiply(result[j], root);\n if (j + 1 < result.length) result[j] ^= result[j + 1];\n }\n root = QrCode.reedSolomonMultiply(root, 0x02);\n }\n return result;\n }\n\n // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.\n private static reedSolomonComputeRemainder(data: readonly byte[], divisor: readonly byte[]): byte[] {\n const result: byte[] = divisor.map(_ => 0);\n for (const b of data) {\n // Polynomial division\n const factor: byte = b ^ (result.shift() as byte);\n result.push(0);\n divisor.forEach((coef, i) => (result[i] ^= QrCode.reedSolomonMultiply(coef, factor)));\n }\n return result;\n }\n\n // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result\n // are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.\n private static reedSolomonMultiply(x: byte, y: byte): byte {\n if (x >>> 8 != 0 || y >>> 8 != 0) throw new RangeError('Byte out of range');\n // Russian peasant multiplication\n let z: int = 0;\n for (let i = 7; i >= 0; i--) {\n z = (z << 1) ^ ((z >>> 7) * 0x11d);\n z ^= ((y >>> i) & 1) * x;\n }\n assert(z >>> 8 == 0);\n return z as byte;\n }\n\n // Can only be called immediately after a light run is added, and\n // returns either 0, 1, or 2. A helper function for getPenaltyScore().\n private finderPenaltyCountPatterns(runHistory: readonly int[]): int {\n const n: int = runHistory[1];\n assert(n <= this.size * 3);\n const core: boolean =\n n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;\n return (\n (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) +\n (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0)\n );\n }\n\n // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().\n private finderPenaltyTerminateAndCount(currentRunColor: boolean, currentRunLength: int, runHistory: int[]): int {\n if (currentRunColor) {\n // Terminate dark run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n currentRunLength = 0;\n }\n currentRunLength += this.size; // Add light border to final run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n return this.finderPenaltyCountPatterns(runHistory);\n }\n\n // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().\n private finderPenaltyAddHistory(currentRunLength: int, runHistory: int[]): void {\n if (runHistory[0] == 0) currentRunLength += this.size; // Add light border to initial run\n runHistory.pop();\n runHistory.unshift(currentRunLength);\n }\n\n /*-- Constants and tables --*/\n\n // The minimum version number supported in the QR Code Model 2 standard.\n public static readonly MIN_VERSION: int = 1;\n // The maximum version number supported in the QR Code Model 2 standard.\n public static readonly MAX_VERSION: int = 40;\n\n // For use in getPenaltyScore(), when evaluating which mask is best.\n private static readonly PENALTY_N1: int = 3;\n private static readonly PENALTY_N2: int = 3;\n private static readonly PENALTY_N3: int = 40;\n private static readonly PENALTY_N4: int = 10;\n\n private static readonly ECC_CODEWORDS_PER_BLOCK: int[][] = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [\n -1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30,\n 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,\n ], // Low\n [\n -1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28,\n 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n ], // Medium\n [\n -1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30,\n 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,\n ], // Quartile\n [\n -1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30,\n 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,\n ], // High\n ];\n\n private static readonly NUM_ERROR_CORRECTION_BLOCKS: int[][] = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [\n -1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18,\n 19, 19, 20, 21, 22, 24, 25,\n ], // Low\n [\n -1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29,\n 31, 33, 35, 37, 38, 40, 43, 45, 47, 49,\n ], // Medium\n [\n -1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40,\n 43, 45, 48, 51, 53, 56, 59, 62, 65, 68,\n ], // Quartile\n [\n -1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45,\n 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81,\n ], // High\n ];\n }\n\n // Appends the given number of low-order bits of the given value\n // to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.\n function appendBits(val: int, len: int, bb: bit[]): void {\n if (len < 0 || len > 31 || val >>> len != 0) throw new RangeError('Value out of range');\n for (\n let i = len - 1;\n i >= 0;\n i-- // Append bit by bit\n )\n bb.push((val >>> i) & 1);\n }\n\n // Returns true iff the i'th bit of x is set to 1.\n function getBit(x: int, i: int): boolean {\n return ((x >>> i) & 1) != 0;\n }\n\n // Throws an exception if the given condition is false.\n function assert(cond: boolean): void {\n if (!cond) throw new Error('Assertion error');\n }\n\n /*---- Data segment class ----*/\n\n /*\n * A segment of character/binary/control data in a QR Code symbol.\n * Instances of this class are immutable.\n * The mid-level way to create a segment is to take the payload data\n * and call a static factory function such as QrSegment.makeNumeric().\n * The low-level way to create a segment is to custom-make the bit buffer\n * and call the QrSegment() constructor with appropriate values.\n * This segment class imposes no length restrictions, but QR Codes have restrictions.\n * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.\n * Any segment longer than this is meaningless for the purpose of generating QR Codes.\n */\n export class QrSegment {\n /*-- Static factory functions (mid level) --*/\n\n // Returns a segment representing the given binary data encoded in\n // byte mode. All input byte arrays are acceptable. Any text string\n // can be converted to UTF-8 bytes and encoded as a byte mode segment.\n public static makeBytes(data: readonly byte[]): QrSegment {\n const bb: bit[] = [];\n for (const b of data) appendBits(b, 8, bb);\n return new QrSegment(QrSegment.Mode.BYTE, data.length, bb);\n }\n\n // Returns a segment representing the given string of decimal digits encoded in numeric mode.\n public static makeNumeric(digits: string): QrSegment {\n if (!QrSegment.isNumeric(digits)) throw new RangeError('String contains non-numeric characters');\n const bb: bit[] = [];\n for (let i = 0; i < digits.length;) {\n // Consume up to 3 digits per iteration\n const n: int = Math.min(digits.length - i, 3);\n appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);\n i += n;\n }\n return new QrSegment(QrSegment.Mode.NUMERIC, digits.length, bb);\n }\n\n // Returns a segment representing the given text string encoded in alphanumeric mode.\n // The characters allowed are: 0 to 9, A to Z (uppercase only), space,\n // dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n public static makeAlphanumeric(text: string): QrSegment {\n if (!QrSegment.isAlphanumeric(text))\n throw new RangeError('String contains unencodable characters in alphanumeric mode');\n const bb: bit[] = [];\n let i: int;\n for (i = 0; i + 2 <= text.length; i += 2) {\n // Process groups of 2\n let temp: int = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;\n temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));\n appendBits(temp, 11, bb);\n }\n if (i < text.length)\n // 1 character remaining\n appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);\n return new QrSegment(QrSegment.Mode.ALPHANUMERIC, text.length, bb);\n }\n\n // Returns a new mutable list of zero or more segments to represent the given Unicode text string.\n // The result may use various segment modes and switch modes to optimize the length of the bit stream.\n public static makeSegments(text: string): QrSegment[] {\n // Select the most efficient segment encoding automatically\n if (text == '') return [];\n else if (QrSegment.isNumeric(text)) return [QrSegment.makeNumeric(text)];\n else if (QrSegment.isAlphanumeric(text)) return [QrSegment.makeAlphanumeric(text)];\n else return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];\n }\n\n // Returns a segment representing an Extended Channel Interpretation\n // (ECI) designator with the given assignment value.\n public static makeEci(assignVal: int): QrSegment {\n const bb: bit[] = [];\n if (assignVal < 0) throw new RangeError('ECI assignment value out of range');\n else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb);\n else if (assignVal < 1 << 14) {\n appendBits(0b10, 2, bb);\n appendBits(assignVal, 14, bb);\n } else if (assignVal < 1000000) {\n appendBits(0b110, 3, bb);\n appendBits(assignVal, 21, bb);\n } else throw new RangeError('ECI assignment value out of range');\n return new QrSegment(QrSegment.Mode.ECI, 0, bb);\n }\n\n // Tests whether the given string can be encoded as a segment in numeric mode.\n // A string is encodable iff each character is in the range 0 to 9.\n public static isNumeric(text: string): boolean {\n return QrSegment.NUMERIC_REGEX.test(text);\n }\n\n // Tests whether the given string can be encoded as a segment in alphanumeric mode.\n // A string is encodable iff each character is in the following set: 0 to 9, A to Z\n // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n public static isAlphanumeric(text: string): boolean {\n return QrSegment.ALPHANUMERIC_REGEX.test(text);\n }\n\n /*-- Constructor (low level) and fields --*/\n\n // Creates a new QR Code segment with the given attributes and data.\n // The character count (numChars) must agree with the mode and the bit buffer length,\n // but the constraint isn't checked. The given bit buffer is cloned and stored.\n public constructor(\n // The mode indicator of this segment.\n public readonly mode: QrSegment.Mode,\n\n // The length of this segment's unencoded data. Measured in characters for\n // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.\n // Always zero or positive. Not the same as the data's bit length.\n public readonly numChars: int,\n\n // The data bits of this segment. Accessed through getData().\n private readonly bitData: bit[]\n ) {\n if (numChars < 0) throw new RangeError('Invalid argument');\n this.bitData = bitData.slice(); // Make defensive copy\n }\n\n /*-- Methods --*/\n\n // Returns a new copy of the data bits of this segment.\n public getData(): bit[] {\n return this.bitData.slice(); // Make defensive copy\n }\n\n // (Package-private) Calculates and returns the number of bits needed to encode the given segments at\n // the given version. The result is infinity if a segment has too many characters to fit its length field.\n public static getTotalBits(segs: readonly QrSegment[], version: int): number {\n let result = 0;\n for (const seg of segs) {\n const ccbits: int = seg.mode.numCharCountBits(version);\n if (seg.numChars >= 1 << ccbits) return Infinity; // The segment's length doesn't fit the field's bit width\n result += 4 + ccbits + seg.bitData.length;\n }\n return result;\n }\n\n // Returns a new array of bytes representing the given string encoded in UTF-8.\n private static toUtf8ByteArray(str: string): byte[] {\n str = encodeURI(str);\n const result: byte[] = [];\n for (let i = 0; i < str.length; i++) {\n if (str.charAt(i) != '%') result.push(str.charCodeAt(i));\n else {\n result.push(parseInt(str.substring(i + 1, i + 3), 16));\n i += 2;\n }\n }\n return result;\n }\n\n /*-- Constants --*/\n\n // Describes precisely all strings that are encodable in numeric mode.\n private static readonly NUMERIC_REGEX: RegExp = /^[0-9]*$/;\n\n // Describes precisely all strings that are encodable in alphanumeric mode.\n private static readonly ALPHANUMERIC_REGEX: RegExp = /^[A-Z0-9 $%*+.\\/:-]*$/;\n\n // The set of all legal characters in alphanumeric mode,\n // where each character value maps to the index in the string.\n private static readonly ALPHANUMERIC_CHARSET: string = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';\n }\n}\n\n/*---- Public helper enumeration ----*/\n\nnamespace qrcodegen {\n /*\n * The error correction level in a QR Code symbol. Immutable.\n */\n export namespace QrCode {\n export class Ecc {\n /*-- Constants --*/\n\n public static readonly LOW = new Ecc(0, 1); // The QR Code can tolerate about 7% erroneous codewords\n public static readonly MEDIUM = new Ecc(1, 0); // The QR Code can tolerate about 15% erroneous codewords\n public static readonly QUARTILE = new Ecc(2, 3); // The QR Code can tolerate about 25% erroneous codewords\n public static readonly HIGH = new Ecc(3, 2); // The QR Code can tolerate about 30% erroneous codewords\n\n /*-- Constructor and fields --*/\n\n private constructor(\n // In the range 0 to 3 (unsigned 2-bit integer).\n public readonly ordinal: int,\n // (Package-private) In the range 0 to 3 (unsigned 2-bit integer).\n public readonly formatBits: int\n ) {}\n }\n }\n\n /*\n * Describes how a segment's data bits are interpreted. Immutable.\n */\n export namespace QrSegment {\n export class Mode {\n /*-- Constants --*/\n\n public static readonly NUMERIC = new Mode(0x1, [10, 12, 14]);\n public static readonly ALPHANUMERIC = new Mode(0x2, [9, 11, 13]);\n public static readonly BYTE = new Mode(0x4, [8, 16, 16]);\n public static readonly KANJI = new Mode(0x8, [8, 10, 12]);\n public static readonly ECI = new Mode(0x7, [0, 0, 0]);\n\n /*-- Constructor and fields --*/\n\n private constructor(\n // The mode indicator bits, which is a uint4 value (range 0 to 15).\n public readonly modeBits: int,\n // Number of character count bits for three different version ranges.\n private readonly numBitsCharCount: [int, int, int]\n ) {}\n\n /*-- Method --*/\n\n // (Package-private) Returns the bit width of the character count field for a segment in\n // this mode in a QR Code at the given version number. The result is in the range [0, 16].\n public numCharCountBits(ver: int): int {\n return this.numBitsCharCount[Math.floor((ver + 7) / 17)];\n }\n }\n }\n}\n\nexport default qrcodegen;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isDevMode } from '@angular/core';\n\nimport type { WrQrErrorLevel } from './interfaces';\nimport qrcodegen from './qrcodegen';\n\ninterface DrawOptionsInternal {\n readonly value: string;\n readonly size: number;\n readonly padding: number;\n readonly color: string;\n readonly bgColor: string;\n readonly level: WrQrErrorLevel;\n readonly iconUrl?: string | null;\n readonly iconSize?: number;\n}\n\nconst ERROR_LEVEL_MAP: Record<WrQrErrorLevel, qrcodegen.QrCode.Ecc> = {\n L: qrcodegen.QrCode.Ecc.LOW,\n M: qrcodegen.QrCode.Ecc.MEDIUM,\n Q: qrcodegen.QrCode.Ecc.QUARTILE,\n H: qrcodegen.QrCode.Ecc.HIGH,\n};\n\nconst SCALE = 10;\n\nfunction drawBackground(ctx: CanvasRenderingContext2D, width: number, height: number, bgColor: string): void {\n ctx.fillStyle = bgColor;\n ctx.fillRect(0, 0, width, height);\n}\n\nfunction drawModules(ctx: CanvasRenderingContext2D, code: qrcodegen.QrCode, padding: number, color: string): void {\n ctx.fillStyle = color;\n for (let y = 0; y < code.size; y++) {\n for (let x = 0; x < code.size; x++) {\n if (code.getModule(x, y)) {\n ctx.fillRect(padding + x * SCALE, padding + y * SCALE, SCALE, SCALE);\n }\n }\n }\n}\n\n/**\n * The `iconUrl` a consumer bound, or `null` when it names a scheme an image must\n * not fetch.\n *\n * A security audit of 13.0.0 bound an attacker-shaped `[iconUrl]` and watched the\n * page make the request: the value went to `new Image().src` verbatim, which is\n * the one thing Angular would have sanitised had the template written `[src]`\n * itself. The library does the loading here, so the app loses that protection\n * without being told.\n *\n * Same rules as `safeMarkdownUrl` in `ngwr/markdown`, and deliberately a copy\n * rather than an import: an entry point may not depend on another's internals,\n * and one call site does not earn a shared util. A third would — put it in\n * `ngwr/utils` beside `isSafeCssValue` when that happens.\n *\n * `data:` is allowed for raster types only. An SVG can carry script, and\n * `data:text/html` is a same-origin document.\n */\nfunction safeIconUrl(raw: string): string | null {\n const url = raw.trim();\n // Control characters are stripped BEFORE the scheme is read: a browser ignores\n // them while resolving, so a check reading the raw string sees a relative path\n // and waves `java\\u0000script:` through.\n // eslint-disable-next-line no-control-regex\n const bare = url.replace(/[\\s\\u0000-\\u001f\\u007f]/g, '');\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(bare);\n\n // No scheme: a relative path or `//host` — nothing executable.\n if (!scheme) return url;\n\n const name = scheme[1].toLowerCase();\n if (name === 'data') return /^data:image\\/(?:png|jpe?g|gif|webp|avif);base64,[a-z0-9+/=]+$/i.test(bare) ? bare : null;\n\n return name === 'http' || name === 'https' ? url : null;\n}\n\nfunction overlayIcon(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D, options: DrawOptionsInternal): void {\n const src = safeIconUrl(options.iconUrl!);\n if (src === null) return;\n\n const iconImg = new Image();\n iconImg.crossOrigin = 'anonymous';\n iconImg.src = src;\n\n const ratio = canvas.width / options.size;\n const iconPx = (options.iconSize ?? 42) * ratio;\n const coord = canvas.width / 2 - iconPx / 2;\n\n iconImg.onload = (): void => {\n ctx.fillStyle = options.bgColor;\n ctx.fillRect(coord, coord, iconPx, iconPx);\n ctx.drawImage(iconImg, coord + 10, coord + 10, iconPx - 20, iconPx - 20);\n };\n}\n\n/**\n * Encodes the payload, or reports `null` when it does not fit.\n *\n * A version-40 code tops out around 2953 bytes at level L and 1273 at level H, and the\n * vendored encoder answers a longer one by throwing `RangeError('Data too long')`. That\n * is a value the consumer bound, not a bug — and `WrQr` calls this from an `effect()`,\n * where an exception escapes into `runEffectsInView` and abandons every remaining effect\n * in the view, so one over-long string would stop the OTHER QR codes on the page from\n * repainting. Same policy as `wr-icon` with an unregistered name: reported in dev,\n * never thrown.\n *\n * Only that one RangeError is absorbed. Anything else the encoder raises is a genuine\n * bug in it, and swallowing those would turn a crash into a silently blank code.\n */\nfunction encode(options: DrawOptionsInternal): qrcodegen.QrCode | null {\n try {\n return qrcodegen.QrCode.encodeText(options.value, ERROR_LEVEL_MAP[options.level]);\n } catch (error) {\n if (!(error instanceof RangeError) || error.message !== 'Data too long') throw error;\n if (isDevMode()) {\n // eslint-disable-next-line no-console -- a payload that cannot be encoded must be visible, but must not throw\n console.error(\n `[NGWR] <wr-qr> cannot encode ${options.value.length} characters at error-correction level ` +\n `\"${options.level}\" — the largest QR code holds about 2953 bytes at level \"L\" and 1273 at \"H\", ` +\n `and non-ASCII text costs several bytes per character. Shorten the value, or lower the level.`\n );\n }\n return null;\n }\n}\n\nfunction draw(canvas: HTMLCanvasElement, options: DrawOptionsInternal): void {\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n\n canvas.style.width = `${options.size}px`;\n canvas.style.height = `${options.size}px`;\n\n if (!options.value) {\n ctx.fillStyle = options.bgColor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n return;\n }\n\n const code = encode(options);\n if (!code) {\n // Over capacity: leave a blank surface rather than a stale code. Painting the\n // whole bitmap is what clears the previous value — `canvas.width` is only reassigned\n // once an encode succeeds, so the surface still holds the last code's modules.\n drawBackground(ctx, canvas.width, canvas.height, options.bgColor);\n return;\n }\n\n const padding = options.padding;\n canvas.width = code.size * SCALE + padding * 2;\n canvas.height = code.size * SCALE + padding * 2;\n\n drawBackground(ctx, canvas.width, canvas.height, options.bgColor);\n drawModules(ctx, code, padding, options.color);\n\n if (options.iconUrl) {\n overlayIcon(canvas, ctx, options);\n }\n}\n\n/** Options accepted by {@link drawQrCode}. @internal */\nexport type DrawOptions = DrawOptionsInternal;\n\n/**\n * Renders a QR code (with optional center icon) onto the given canvas.\n *\n * @internal\n */\nexport const drawQrCode = draw;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport type { ElementRef } from '@angular/core';\nimport { Component, PLATFORM_ID, ViewEncapsulation, effect, inject, input, viewChild } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { numAttr } from 'ngwr/utils';\n\nimport { drawQrCode } from './generator';\nimport type { WrQrErrorLevel } from './interfaces';\n\n/**\n * Renders a QR code on a `<canvas>`.\n *\n * @example\n * ```html\n * <wr-qr value=\"https://ngwr.dev\" [size]=\"200\" level=\"H\" />\n * <wr-qr value=\"...\" iconUrl=\"/logo.png\" [iconSize]=\"48\" level=\"H\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/qrcode\n */\n@Component({\n selector: 'wr-qr',\n templateUrl: './qr.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-qr', '[style.background]': 'bgColor()' },\n})\nexport class WrQr {\n /** Text or URL to encode. Required. */\n readonly value = input.required<string>();\n\n /** Error correction level. Use `'H'` if you overlay an icon. @default 'M' */\n readonly level = input<WrQrErrorLevel>('M');\n\n /** Side length of the rendered canvas, in pixels. @default 160 */\n readonly size = input(160, { transform: numAttr(160) });\n\n /** Outer quiet-zone padding in pixels. @default 10 */\n readonly padding = input(10, { transform: numAttr(10) });\n\n /** Module (dot) color. @default '#000000' */\n readonly color = input<string>('#000000');\n\n /** Background color of the canvas + host. @default '#ffffff' */\n readonly bgColor = input<string>('#ffffff');\n\n /** Optional image URL or data URL to overlay in the center. */\n readonly iconUrl = input<string | null>(null);\n\n /** Center icon size in logical pixels. @default 42 */\n readonly iconSize = input(42, { transform: numAttr(42) });\n\n /**\n * Accessible name. A QR code is content — it usually encodes a URL — and a\n * `<canvas>` carries no implicit role and no text alternative, so without a name it\n * is nothing at all to a screen reader. Say what the code is FOR when you can.\n * Falls back to `qr.label`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'qr.label', 'QR code');\n\n protected readonly canvas = viewChild<ElementRef<HTMLCanvasElement>>('canvas');\n protected readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n effect(() => {\n // Read every input to register reactive deps\n const opts = {\n value: this.value(),\n size: this.size(),\n padding: this.padding(),\n color: this.color(),\n bgColor: this.bgColor(),\n level: this.level(),\n iconUrl: this.iconUrl(),\n iconSize: this.iconSize(),\n };\n if (!this.isBrowser) return;\n const el = this.canvas()?.nativeElement;\n if (!el) return;\n drawQrCode(el, opts);\n });\n }\n}\n","<!--\n Always emit the canvas — painting is guarded in the effect instead. Gating\n the element itself on the platform makes the server and client render\n different structures, which breaks hydration; a bare canvas costs nothing\n and matches how the other canvas-backed components behave.\n-->\n<canvas #canvas role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\"></canvas>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["qrcodegen"],"mappings":";;;;;;AAAA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEH,YAAY;AAEZ,IAAU,SAAS;AAAnB,CAAA,UAAU,SAAS,EAAA;;AAOjB;;;;;;;;;;;;;;;AAeG;AACH,IAAA,MAAa,MAAM,CAAA;AA4HC,QAAA,OAAA;AAGA,QAAA,oBAAA;;;;;;;AAvHX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OAAO,EAAA,aAAA,EAEF,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,sYAAA,EAAA;+5BAqCU,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErE/E;;AAEG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-radio-testing.mjs","sources":["../../../projects/lib/radio/testing/wr-radio-harness.ts","../../../projects/lib/radio/testing/wr-radio-group-harness.ts","../../../projects/lib/radio/testing/ngwr-radio-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrRadioSize } from 'ngwr/radio';\n\nimport type { WrRadioHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one `<wr-radio>` — an option, not a control.\n *\n * The visible dot is a `<span>` the stylesheet paints; the state lives on a real\n * `<input type=\"radio\">` inside the label, and that is what this reads and clicks.\n * A radio cannot exist alone — the component throws when it is constructed outside\n * a `<wr-radio-group>` — so `WrRadioGroupHarness` is where the SELECTION lives and\n * this answers questions about one option.\n *\n * There is no `aria-checked` here to prefer over the DOM, and that is right: a\n * native radio carries its state in the `checked` IDL property, so the ARIA\n * attribute would only be a second source of truth for a screen reader to\n * disagree with. {@link isChecked} reads the property, which is the state.\n *\n * @example\n * ```ts\n * const medium = await loader.getHarness(WrRadioHarness.with({ label: 'Medium' }));\n * await medium.check();\n * expect(await medium.isChecked()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRadioHarness extends ComponentHarness {\n static hostSelector = 'wr-radio';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRadioHarnessFilters = {}): HarnessPredicate<WrRadioHarness> {\n return new HarnessPredicate(WrRadioHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('value', options.value, (harness, value) => HarnessPredicate.stringMatches(harness.getValue(), value))\n .addOption('checked', options.checked, async (harness, checked) => (await harness.isChecked()) === checked)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly input = this.locatorFor('input.wr-radio__input');\n private readonly label = this.locatorFor('label.wr-radio__label');\n\n /** The projected label text, trimmed. An icon lives in the dot, so it is not part of it. */\n async getLabel(): Promise<string> {\n return (await this.locatorFor('.wr-radio__text')()).text();\n }\n\n /**\n * The option's value as the template WROTE it, or `null` when it was bound.\n *\n * The gap worth knowing about before a spec leans on this: `value` is `unknown`,\n * and the component never puts it on the native input — the group holds the\n * selection and a radio only says which one it is. So the only `value` in the\n * DOM is the static attribute Angular leaves behind for a literal `value=\"sm\"`;\n * `[value]=\"size\"` reaches the component without ever touching the page and\n * reads `null` here whatever it holds, which for an object value it always will.\n *\n * Address options by their LABEL when it matters, and assert the picked value on\n * the host's own model, which is the only place it exists.\n */\n async getValue(): Promise<string | null> {\n return (await this.host()).getAttribute('value');\n }\n\n /**\n * The `name` the group stamps on this radio's native input.\n *\n * It is the whole of the group's keyboard behaviour: one shared name is what\n * makes a browser treat the radios as a single tab stop, walk the arrow keys\n * between them and announce \"1 of 3\". None of that is implemented in the\n * component, so a name that stops being shared takes all of it away silently.\n */\n async getName(): Promise<string> {\n return (await this.input()).getProperty<string>('name');\n }\n\n /**\n * Whether this option is the group's answer.\n *\n * Read from the input's `checked` PROPERTY: `[checked]` is a property binding,\n * so the attribute is never written and reading it would report `null` for a\n * radio with a visible dot.\n */\n async isChecked(): Promise<boolean> {\n return (await this.input()).getProperty<boolean>('checked');\n }\n\n /**\n * Whether the option refuses selection — for either reason.\n *\n * The native input is disabled by this radio's own `disabled` OR by the group's,\n * and from outside they are the same thing: the option cannot be picked.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.input()).getProperty<boolean>('disabled');\n }\n\n /**\n * The control size, from the host modifier.\n *\n * `md` is the default and carries NO modifier class, so its absence is the\n * answer rather than a missing one.\n */\n async getSize(): Promise<WrRadioSize> {\n const host = await this.host();\n if (await host.hasClass('wr-radio--sm')) return 'sm';\n if (await host.hasClass('wr-radio--lg')) return 'lg';\n return 'md';\n }\n\n /** Whether the dot is filled by an icon instead of the default solid circle. */\n async hasIcon(): Promise<boolean> {\n return (await this.host()).hasClass('wr-radio--has-icon');\n }\n\n /**\n * Whether the `<label for>` really points at this radio's input.\n *\n * Not the option's only naming route, and worth being precise about: the input\n * sits INSIDE the `<label>`, so the implicit association already names it and a\n * `for` that misses does not leave the radio unnamed. What a stray `for` does\n * take away is the pairing every consumer assumes — it hands label clicks, and\n * anything that references the label, to whatever else on the page owns that id.\n */\n async isLabelBound(): Promise<boolean> {\n const forAttr = await (await this.label()).getAttribute('for');\n return forAttr !== null && forAttr === (await (await this.input()).getProperty<string>('id'));\n }\n\n /**\n * Pick this option, the way a user does — a click on the native input.\n *\n * Nothing happens when it is already checked (a radio has no untick), and\n * nothing happens when it is disabled, so assert the result rather than assume\n * it — or reach for `WrRadioGroupHarness.select()`, which says which of the two\n * it was.\n *\n * A click rather than a keypress, despite jsdom having no layout: the events are\n * dispatched onto the input itself, so nothing is hit-tested and the zero-sized\n * rect jsdom reports for every element cannot miss its target, and the\n * `change` event it produces is exactly the one the component listens for. The\n * arrow keys that would move a real user between options are the BROWSER's\n * behaviour over a shared `name`, not the component's, and jsdom implements none\n * of it — there is nothing here for a keyboard to drive.\n */\n async check(): Promise<void> {\n if (await this.isChecked()) return;\n await (await this.input()).click();\n }\n\n /** Move keyboard focus onto the real control. */\n async focus(): Promise<void> {\n return (await this.input()).focus();\n }\n\n /**\n * Take focus off the radio — which is what makes the GROUP emit `touch`, since a\n * blur from any child is what marks a bound field touched.\n */\n async blur(): Promise<void> {\n return (await this.input()).blur();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.input()).isFocused();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrRadioGroupHarnessFilters, WrRadioHarnessFilters } from './interfaces';\nimport { WrRadioHarness } from './wr-radio-harness';\n\n/**\n * Test harness for `<wr-radio-group>` — the control a `<wr-radio>` only means\n * anything inside of, and the root of a two-part family with {@link WrRadioHarness}.\n *\n * Options are addressed by their LABEL rather than by their value, and there is\n * deliberately no `getValue()` here. The group's value is a signal of `unknown`\n * that the component never writes to the DOM: not to the group element, not to a\n * radio's native input. The one thing on the page is whatever static attribute the\n * template happened to leave behind, so a selection made through `[(value)]`, a\n * `[formField]` or an object is not there at all, and a harness reporting it would\n * be guessing. {@link getSelectedLabel} says what the page says, and a spec that\n * needs the value itself asserts the host's own model — which is the assertion that\n * would have caught the bug anyway.\n *\n * Arrow-key navigation is not this component's either: the radios share one `name`\n * attribute and the browser does the rest, so jsdom — which implements none of it\n * — leaves nothing for a keyboard to drive. {@link getName} is what a spec should\n * pin instead, because losing the shared name is what actually takes arrow\n * navigation away, and {@link getTabStopLabel} answers the other half.\n *\n * @example\n * ```ts\n * const size = await loader.getHarness(WrRadioGroupHarness.with({ name: 'size' }));\n *\n * expect(await size.getRadioLabels()).toEqual(['Small', 'Medium', 'Large']);\n * await size.select({ label: 'Large' });\n * expect(await size.getSelectedLabel()).toBe('Large');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRadioGroupHarness extends ComponentHarness {\n static hostSelector = 'wr-radio-group';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRadioGroupHarnessFilters = {}): HarnessPredicate<WrRadioGroupHarness> {\n return new HarnessPredicate(WrRadioGroupHarness, options)\n .addOption('name', options.name, (harness, name) => HarnessPredicate.stringMatches(harness.getName(), name))\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /**\n * The role the group announces — `radiogroup`, which is what tells a screen\n * reader that the options belong to one question and how many of them there are.\n */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * The group's accessible name, resolved in the order a screen reader resolves it:\n * the text of every element `aria-labelledby` points at, and `aria-label` only\n * when that named nothing. `null` when the consumer wired neither.\n *\n * The order is not interchangeable — `aria-labelledby` WINS over `aria-label` in\n * the accessible-name computation, so a group carrying both is announced by the\n * heading it points at and reporting the `aria-label` would describe a name\n * nobody hears.\n *\n * That `null` is a finding rather than a detail — a `radiogroup` with no name\n * announces three answers and never the question. The component ships no label\n * input on purpose (the question is the consumer's own heading), so this is the\n * only way to check the wiring held.\n */\n async getAccessibleName(): Promise<string | null> {\n const host = await this.host();\n\n const labelledBy = await host.getAttribute('aria-labelledby');\n if (labelledBy !== null) {\n // Resolved from the document root: `aria-labelledby` may point anywhere on the\n // page, and the heading above a group is normally outside it.\n const root = this.documentRootLocatorFactory();\n const texts: string[] = [];\n for (const id of labelledBy.split(/\\s+/).filter(Boolean)) {\n const target = await root.locatorForOptional(`#${id}`)();\n if (target) texts.push(await target.text());\n }\n\n // A reference that resolves to nothing names nothing, and the computation\n // falls through to `aria-label` exactly as it does in a browser.\n if (texts.length) return texts.join(' ');\n }\n\n return host.getAttribute('aria-label');\n }\n\n /**\n * The `name` every radio in the group shares.\n *\n * Read off the radios because they are the only place it is RELIABLY written: the\n * group's `name` input reaches the page as an attribute on each native input, and\n * a bound `[name]=\"…\"` never lands on the group element at all. A literal\n * `name=\"size\"` does survive on the group element — Angular leaves a static\n * attribute alone — which is exactly the trap: reading it there works for the\n * literal form and quietly returns nothing for the bound one.\n */\n async getName(): Promise<string> {\n const [first] = await this.radiosOrThrow();\n return first.getName();\n }\n\n /**\n * Whether the group refuses every option.\n *\n * Answered from the radios, and it could not be otherwise: a bound `[disabled]`\n * on the group reaches the page only by disabling each native input, so a group\n * disabled as a whole and a group whose every option is individually disabled\n * are the same page. They are also the same thing to the person using it, which\n * is the question a harness should be answering.\n */\n async isDisabled(): Promise<boolean> {\n for (const radio of await this.radiosOrThrow()) {\n if (!(await radio.isDisabled())) return false;\n }\n return true;\n }\n\n /** The group's own options, in DOM order. A sibling group's radios are not here. */\n async getRadios(filters: WrRadioHarnessFilters = {}): Promise<WrRadioHarness[]> {\n return this.locatorForAll(WrRadioHarness.with(filters))();\n }\n\n /** The label of every option, in DOM order. */\n async getRadioLabels(): Promise<string[]> {\n const radios = await this.getRadios();\n return Promise.all(radios.map(radio => radio.getLabel()));\n }\n\n /** The checked option, or `null` while the group is unanswered. */\n async getSelectedRadio(): Promise<WrRadioHarness | null> {\n const [checked] = await this.getRadios({ checked: true });\n return checked ?? null;\n }\n\n /**\n * The label of the checked option, or `null` while the group is unanswered.\n *\n * Also `null` for a value that matches no radio — the group holds it, nothing is\n * checked, and the page shows an unanswered question.\n */\n async getSelectedLabel(): Promise<string | null> {\n const selected = await this.getSelectedRadio();\n return selected ? selected.getLabel() : null;\n }\n\n /**\n * Pick the first option matching the filters — this is how the group's value\n * changes.\n *\n * Throws when nothing matches, naming the options that do exist, and throws\n * again when the option is still unchecked afterwards. That second failure has\n * exactly two causes and reports both, because a click that quietly did nothing\n * surfaces as an unrelated assertion three lines later.\n */\n async select(filters: WrRadioHarnessFilters): Promise<void> {\n const [radio] = await this.getRadios(filters);\n if (!radio) {\n throw new Error(\n `WrRadioGroupHarness.select(): no radio matched ${JSON.stringify(filters)}. This group offers: ` +\n `${(await this.getRadioLabels()).join(', ')}.`\n );\n }\n\n await radio.check();\n\n if (!(await radio.isChecked())) {\n throw new Error(\n `WrRadioGroupHarness.select(): \"${await radio.getLabel()}\" is still unchecked after being clicked — ` +\n 'either that option carries `disabled` or the whole group does.'\n );\n }\n }\n\n /**\n * The label of the option a Tab press would land on, or `null` when every option\n * is disabled and the group is skipped over entirely.\n *\n * A radio group is ONE tab stop, and which radio it is is written down nowhere:\n * the component authors no roving `tabindex`, because the browser already\n * applies the native rule to a shared `name` — the checked radio, or the first\n * enabled one while nothing is checked. So this is DERIVED from the rendered\n * state rather than read off an attribute, there being no attribute to read.\n *\n * Worth asking precisely because those two answers are different radios exactly\n * when a form opens unanswered, which is the state most specs start in.\n */\n async getTabStopLabel(): Promise<string | null> {\n const stop = await this.tabStop();\n return stop ? stop.getLabel() : null;\n }\n\n /** Put focus where a Tab press would put it. Throws when the group has no tab stop. */\n async focusTabStop(): Promise<void> {\n const stop = await this.tabStop();\n if (!stop) {\n throw new Error(\n 'WrRadioGroupHarness.focusTabStop(): every option in this group is disabled, so the group is not a ' +\n 'tab stop at all — Tab skips it rather than entering it.'\n );\n }\n await stop.focus();\n }\n\n /**\n * The label of the option that currently holds focus, or `null` when focus is\n * elsewhere. The counterpart to {@link focusTabStop}: in a real browser the\n * arrow keys move this, and moving it is also what picks a new answer.\n */\n async getFocusedLabel(): Promise<string | null> {\n for (const radio of await this.getRadios()) {\n if (await radio.isFocused()) return radio.getLabel();\n }\n return null;\n }\n\n /** The radio Tab would enter on, applying the browser's rule to the rendered state. */\n private async tabStop(): Promise<WrRadioHarness | null> {\n const enabled: WrRadioHarness[] = [];\n for (const radio of await this.getRadios()) {\n if (!(await radio.isDisabled())) enabled.push(radio);\n }\n\n for (const radio of enabled) {\n if (await radio.isChecked()) return radio;\n }\n return enabled[0] ?? null;\n }\n\n /** The options, or a failure saying why an empty group has nothing to report. */\n private async radiosOrThrow(): Promise<WrRadioHarness[]> {\n const radios = await this.getRadios();\n if (!radios.length) {\n throw new Error(\n 'WrRadioGroupHarness: this group has no <wr-radio> children, and every group-level fact here is read ' +\n 'off them — the shared name and the disabled state reach the DOM through the radios, and a bound ' +\n '[name] / [disabled] leaves nothing on the group element to read instead.'\n );\n }\n return radios;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;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M,IAAI,KAAK,CACb,sGAAsG;gBACpG,kGAAkG;AAClG,gBAAA,0EAA0E,CAC7E;QACH;AACA,QAAA,OAAO,MAAM;IACf;;;AC3PF;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-radio-testing.mjs","sources":["../../../projects/lib/radio/testing/wr-radio-harness.ts","../../../projects/lib/radio/testing/wr-radio-group-harness.ts","../../../projects/lib/radio/testing/ngwr-radio-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrRadioSize } from 'ngwr/radio';\n\nimport type { WrRadioHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one `<wr-radio>` — an option, not a control.\n *\n * The visible dot is a `<span>` the stylesheet paints; the state lives on a real\n * `<input type=\"radio\">` inside the label, and that is what this reads and clicks.\n * A radio cannot exist alone — the component throws when it is constructed outside\n * a `<wr-radio-group>` — so `WrRadioGroupHarness` is where the SELECTION lives and\n * this answers questions about one option.\n *\n * There is no `aria-checked` here to prefer over the DOM, and that is right: a\n * native radio carries its state in the `checked` IDL property, so the ARIA\n * attribute would only be a second source of truth for a screen reader to\n * disagree with. {@link isChecked} reads the property, which is the state.\n *\n * @example\n * ```ts\n * const medium = await loader.getHarness(WrRadioHarness.with({ label: 'Medium' }));\n * await medium.check();\n * expect(await medium.isChecked()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRadioHarness extends ComponentHarness {\n static hostSelector = 'wr-radio';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRadioHarnessFilters = {}): HarnessPredicate<WrRadioHarness> {\n return new HarnessPredicate(WrRadioHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('value', options.value, (harness, value) => HarnessPredicate.stringMatches(harness.getValue(), value))\n .addOption('checked', options.checked, async (harness, checked) => (await harness.isChecked()) === checked)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly input = this.locatorFor('input.wr-radio__input');\n private readonly label = this.locatorFor('label.wr-radio__label');\n\n /** The projected label text, trimmed. An icon lives in the dot, so it is not part of it. */\n async getLabel(): Promise<string> {\n return (await this.locatorFor('.wr-radio__text')()).text();\n }\n\n /**\n * The option's value as the template WROTE it, or `null` when it was bound.\n *\n * The gap worth knowing about before a spec leans on this: `value` is `unknown`,\n * and the component never puts it on the native input — the group holds the\n * selection and a radio only says which one it is. So the only `value` in the\n * DOM is the static attribute Angular leaves behind for a literal `value=\"sm\"`;\n * `[value]=\"size\"` reaches the component without ever touching the page and\n * reads `null` here whatever it holds, which for an object value it always will.\n *\n * Address options by their LABEL when it matters, and assert the picked value on\n * the host's own model, which is the only place it exists.\n */\n async getValue(): Promise<string | null> {\n return (await this.host()).getAttribute('value');\n }\n\n /**\n * The `name` the group stamps on this radio's native input.\n *\n * It is the whole of the group's keyboard behaviour: one shared name is what\n * makes a browser treat the radios as a single tab stop, walk the arrow keys\n * between them and announce \"1 of 3\". None of that is implemented in the\n * component, so a name that stops being shared takes all of it away silently.\n */\n async getName(): Promise<string> {\n return (await this.input()).getProperty<string>('name');\n }\n\n /**\n * Whether this option is the group's answer.\n *\n * Read from the input's `checked` PROPERTY: `[checked]` is a property binding,\n * so the attribute is never written and reading it would report `null` for a\n * radio with a visible dot.\n */\n async isChecked(): Promise<boolean> {\n return (await this.input()).getProperty<boolean>('checked');\n }\n\n /**\n * Whether the option refuses selection — for either reason.\n *\n * The native input is disabled by this radio's own `disabled` OR by the group's,\n * and from outside they are the same thing: the option cannot be picked.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.input()).getProperty<boolean>('disabled');\n }\n\n /**\n * The control size, from the host modifier.\n *\n * `md` is the default and carries NO modifier class, so its absence is the\n * answer rather than a missing one.\n */\n async getSize(): Promise<WrRadioSize> {\n const host = await this.host();\n if (await host.hasClass('wr-radio--sm')) return 'sm';\n if (await host.hasClass('wr-radio--lg')) return 'lg';\n return 'md';\n }\n\n /** Whether the dot is filled by an icon instead of the default solid circle. */\n async hasIcon(): Promise<boolean> {\n return (await this.host()).hasClass('wr-radio--has-icon');\n }\n\n /**\n * Whether the `<label for>` really points at this radio's input.\n *\n * Not the option's only naming route, and worth being precise about: the input\n * sits INSIDE the `<label>`, so the implicit association already names it and a\n * `for` that misses does not leave the radio unnamed. What a stray `for` does\n * take away is the pairing every consumer assumes — it hands label clicks, and\n * anything that references the label, to whatever else on the page owns that id.\n */\n async isLabelBound(): Promise<boolean> {\n const forAttr = await (await this.label()).getAttribute('for');\n return forAttr !== null && forAttr === (await (await this.input()).getProperty<string>('id'));\n }\n\n /**\n * Pick this option, the way a user does — a click on the native input.\n *\n * Nothing happens when it is already checked (a radio has no untick), and\n * nothing happens when it is disabled, so assert the result rather than assume\n * it — or reach for `WrRadioGroupHarness.select()`, which says which of the two\n * it was.\n *\n * A click rather than a keypress, despite jsdom having no layout: the events are\n * dispatched onto the input itself, so nothing is hit-tested and the zero-sized\n * rect jsdom reports for every element cannot miss its target, and the\n * `change` event it produces is exactly the one the component listens for. The\n * arrow keys that would move a real user between options are the BROWSER's\n * behaviour over a shared `name`, not the component's, and jsdom implements none\n * of it — there is nothing here for a keyboard to drive.\n */\n async check(): Promise<void> {\n if (await this.isChecked()) return;\n await (await this.input()).click();\n }\n\n /** Move keyboard focus onto the real control. */\n async focus(): Promise<void> {\n return (await this.input()).focus();\n }\n\n /**\n * Take focus off the radio — which is what makes the GROUP emit `touch`, since a\n * blur from any child is what marks a bound field touched.\n */\n async blur(): Promise<void> {\n return (await this.input()).blur();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.input()).isFocused();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrRadioGroupHarnessFilters, WrRadioHarnessFilters } from './interfaces';\nimport { WrRadioHarness } from './wr-radio-harness';\n\n/**\n * Test harness for `<wr-radio-group>` — the control a `<wr-radio>` only means\n * anything inside of, and the root of a two-part family with {@link WrRadioHarness}.\n *\n * Options are addressed by their LABEL rather than by their value, and there is\n * deliberately no `getValue()` here. The group's value is a signal of `unknown`\n * that the component never writes to the DOM: not to the group element, not to a\n * radio's native input. The one thing on the page is whatever static attribute the\n * template happened to leave behind, so a selection made through `[(value)]`, a\n * `[formField]` or an object is not there at all, and a harness reporting it would\n * be guessing. {@link getSelectedLabel} says what the page says, and a spec that\n * needs the value itself asserts the host's own model — which is the assertion that\n * would have caught the bug anyway.\n *\n * Arrow-key navigation is not this component's either: the radios share one `name`\n * attribute and the browser does the rest, so jsdom — which implements none of it\n * — leaves nothing for a keyboard to drive. {@link getName} is what a spec should\n * pin instead, because losing the shared name is what actually takes arrow\n * navigation away, and {@link getTabStopLabel} answers the other half.\n *\n * @example\n * ```ts\n * const size = await loader.getHarness(WrRadioGroupHarness.with({ name: 'size' }));\n *\n * expect(await size.getRadioLabels()).toEqual(['Small', 'Medium', 'Large']);\n * await size.select({ label: 'Large' });\n * expect(await size.getSelectedLabel()).toBe('Large');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRadioGroupHarness extends ComponentHarness {\n static hostSelector = 'wr-radio-group';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRadioGroupHarnessFilters = {}): HarnessPredicate<WrRadioGroupHarness> {\n return new HarnessPredicate(WrRadioGroupHarness, options)\n .addOption('name', options.name, (harness, name) => HarnessPredicate.stringMatches(harness.getName(), name))\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /**\n * The role the group announces — `radiogroup`, which is what tells a screen\n * reader that the options belong to one question and how many of them there are.\n */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * The group's accessible name, resolved in the order a screen reader resolves it:\n * the text of every element `aria-labelledby` points at, and `aria-label` only\n * when that named nothing. `null` when the consumer wired neither.\n *\n * The order is not interchangeable — `aria-labelledby` WINS over `aria-label` in\n * the accessible-name computation, so a group carrying both is announced by the\n * heading it points at and reporting the `aria-label` would describe a name\n * nobody hears.\n *\n * That `null` is a finding rather than a detail — a `radiogroup` with no name\n * announces three answers and never the question. The component ships no label\n * input on purpose (the question is the consumer's own heading), so this is the\n * only way to check the wiring held.\n */\n async getAccessibleName(): Promise<string | null> {\n const host = await this.host();\n\n const labelledBy = await host.getAttribute('aria-labelledby');\n if (labelledBy !== null) {\n // Resolved from the document root: `aria-labelledby` may point anywhere on the\n // page, and the heading above a group is normally outside it.\n const root = this.documentRootLocatorFactory();\n const texts: string[] = [];\n for (const id of labelledBy.split(/\\s+/).filter(Boolean)) {\n const target = await root.locatorForOptional(`#${id}`)();\n if (target) texts.push(await target.text());\n }\n\n // A reference that resolves to nothing names nothing, and the computation\n // falls through to `aria-label` exactly as it does in a browser.\n if (texts.length) return texts.join(' ');\n }\n\n return host.getAttribute('aria-label');\n }\n\n /**\n * The `name` every radio in the group shares.\n *\n * Read off the radios because they are the only place it is RELIABLY written: the\n * group's `name` input reaches the page as an attribute on each native input, and\n * a bound `[name]=\"…\"` never lands on the group element at all. A literal\n * `name=\"size\"` does survive on the group element — Angular leaves a static\n * attribute alone — which is exactly the trap: reading it there works for the\n * literal form and quietly returns nothing for the bound one.\n */\n async getName(): Promise<string> {\n const [first] = await this.radiosOrThrow();\n return first.getName();\n }\n\n /**\n * Whether the group refuses every option.\n *\n * Answered from the radios, and it could not be otherwise: a bound `[disabled]`\n * on the group reaches the page only by disabling each native input, so a group\n * disabled as a whole and a group whose every option is individually disabled\n * are the same page. They are also the same thing to the person using it, which\n * is the question a harness should be answering.\n */\n async isDisabled(): Promise<boolean> {\n for (const radio of await this.radiosOrThrow()) {\n if (!(await radio.isDisabled())) return false;\n }\n return true;\n }\n\n /** The group's own options, in DOM order. A sibling group's radios are not here. */\n async getRadios(filters: WrRadioHarnessFilters = {}): Promise<WrRadioHarness[]> {\n return this.locatorForAll(WrRadioHarness.with(filters))();\n }\n\n /** The label of every option, in DOM order. */\n async getRadioLabels(): Promise<string[]> {\n const radios = await this.getRadios();\n return Promise.all(radios.map(radio => radio.getLabel()));\n }\n\n /** The checked option, or `null` while the group is unanswered. */\n async getSelectedRadio(): Promise<WrRadioHarness | null> {\n const [checked] = await this.getRadios({ checked: true });\n return checked ?? null;\n }\n\n /**\n * The label of the checked option, or `null` while the group is unanswered.\n *\n * Also `null` for a value that matches no radio — the group holds it, nothing is\n * checked, and the page shows an unanswered question.\n */\n async getSelectedLabel(): Promise<string | null> {\n const selected = await this.getSelectedRadio();\n return selected ? selected.getLabel() : null;\n }\n\n /**\n * Pick the first option matching the filters — this is how the group's value\n * changes.\n *\n * Throws when nothing matches, naming the options that do exist, and throws\n * again when the option is still unchecked afterwards. That second failure has\n * exactly two causes and reports both, because a click that quietly did nothing\n * surfaces as an unrelated assertion three lines later.\n */\n async select(filters: WrRadioHarnessFilters): Promise<void> {\n const [radio] = await this.getRadios(filters);\n if (!radio) {\n throw new Error(\n `WrRadioGroupHarness.select(): no radio matched ${JSON.stringify(filters)}. This group offers: ` +\n `${(await this.getRadioLabels()).join(', ')}.`\n );\n }\n\n await radio.check();\n\n if (!(await radio.isChecked())) {\n throw new Error(\n `WrRadioGroupHarness.select(): \"${await radio.getLabel()}\" is still unchecked after being clicked — ` +\n 'either that option carries `disabled` or the whole group does.'\n );\n }\n }\n\n /**\n * The label of the option a Tab press would land on, or `null` when every option\n * is disabled and the group is skipped over entirely.\n *\n * A radio group is ONE tab stop, and which radio it is is written down nowhere:\n * the component authors no roving `tabindex`, because the browser already\n * applies the native rule to a shared `name` — the checked radio, or the first\n * enabled one while nothing is checked. So this is DERIVED from the rendered\n * state rather than read off an attribute, there being no attribute to read.\n *\n * Worth asking precisely because those two answers are different radios exactly\n * when a form opens unanswered, which is the state most specs start in.\n */\n async getTabStopLabel(): Promise<string | null> {\n const stop = await this.tabStop();\n return stop ? stop.getLabel() : null;\n }\n\n /** Put focus where a Tab press would put it. Throws when the group has no tab stop. */\n async focusTabStop(): Promise<void> {\n const stop = await this.tabStop();\n if (!stop) {\n throw new Error(\n 'WrRadioGroupHarness.focusTabStop(): every option in this group is disabled, so the group is not a ' +\n 'tab stop at all — Tab skips it rather than entering it.'\n );\n }\n await stop.focus();\n }\n\n /**\n * The label of the option that currently holds focus, or `null` when focus is\n * elsewhere. The counterpart to {@link focusTabStop}: in a real browser the\n * arrow keys move this, and moving it is also what picks a new answer.\n */\n async getFocusedLabel(): Promise<string | null> {\n for (const radio of await this.getRadios()) {\n if (await radio.isFocused()) return radio.getLabel();\n }\n return null;\n }\n\n /** The radio Tab would enter on, applying the browser's rule to the rendered state. */\n private async tabStop(): Promise<WrRadioHarness | null> {\n const enabled: WrRadioHarness[] = [];\n for (const radio of await this.getRadios()) {\n if (!(await radio.isDisabled())) enabled.push(radio);\n }\n\n for (const radio of enabled) {\n if (await radio.isChecked()) return radio;\n }\n return enabled[0] ?? null;\n }\n\n /** The options, or a failure saying why an empty group has nothing to report. */\n private async radiosOrThrow(): Promise<WrRadioHarness[]> {\n const radios = await this.getRadios();\n if (!radios.length) {\n throw new Error(\n 'WrRadioGroupHarness: this group has no <wr-radio> children, and every group-level fact here is read ' +\n 'off them — the shared name and the disabled state reach the DOM through the radios, and a bound ' +\n '[name] / [disabled] leaves nothing on the group element to read instead.'\n );\n }\n return radios;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAQH;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,MAAO,cAAe,SAAQ,gBAAgB,CAAA;AAClD,IAAA,OAAO,YAAY,GAAG,UAAU;;AAGhC,IAAA,O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