@postnord/pn-marketweb-components 3.5.2 → 4.0.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 (1186) hide show
  1. package/cjs/FetchHelper-2d4c697c.js +85 -0
  2. package/cjs/FetchHelper-2d4c697c.js.map +1 -0
  3. package/cjs/HeadingTag-19376e1f.js +12 -0
  4. package/cjs/HeadingTag-19376e1f.js.map +1 -0
  5. package/cjs/LocalStorageService-e1ee3fac.js +66 -0
  6. package/cjs/LocalStorageService-e1ee3fac.js.map +1 -0
  7. package/cjs/{FetchHelper-e951824f.js → MarketWebContextService-0fdc43c8.js} +1 -82
  8. package/cjs/MarketWebContextService-0fdc43c8.js.map +1 -0
  9. package/cjs/alert_exclamation_circle-24f29a5b.js +8 -0
  10. package/cjs/alert_exclamation_circle-24f29a5b.js.map +1 -0
  11. package/cjs/angle_up-049ec1d8.js +12 -0
  12. package/cjs/angle_up-049ec1d8.js.map +1 -0
  13. package/cjs/close-9e014a80.js +8 -0
  14. package/cjs/close-9e014a80.js.map +1 -0
  15. package/cjs/{index-1d8c9211.js → index-4067c6a5.js} +2 -2
  16. package/cjs/{index-1d8c9211.js.map → index-4067c6a5.js.map} +1 -1
  17. package/cjs/{index-34e1c673.js → index-b02670c2.js} +65 -8
  18. package/cjs/index-b02670c2.js.map +1 -0
  19. package/cjs/index.cjs.js +1 -1
  20. package/cjs/loader.cjs.js +2 -2
  21. package/cjs/pn-address-autofill.cjs.entry.js +51 -75
  22. package/cjs/pn-address-autofill.cjs.entry.js.map +1 -1
  23. package/cjs/pn-animated-tile.cjs.entry.js +2 -2
  24. package/cjs/pn-animated-tile.cjs.entry.js.map +1 -1
  25. package/cjs/pn-app-banner.cjs.entry.js +3 -3
  26. package/cjs/pn-app-banner.cjs.entry.js.map +1 -1
  27. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +2 -2
  28. package/cjs/pn-bonus-progressbar-level.cjs.entry.js.map +1 -1
  29. package/cjs/pn-bonus-progressbar.cjs.entry.js +2 -2
  30. package/cjs/pn-bonus-progressbar.cjs.entry.js.map +1 -1
  31. package/cjs/pn-breakpoints.cjs.entry.js +3 -3
  32. package/cjs/pn-breakpoints.cjs.entry.js.map +1 -1
  33. package/cjs/pn-chart.cjs.entry.js +2 -2
  34. package/cjs/pn-chart.cjs.entry.js.map +1 -1
  35. package/cjs/pn-charts-card.cjs.entry.js +2 -2
  36. package/cjs/pn-charts-card.cjs.entry.js.map +1 -1
  37. package/cjs/pn-chat-message_2.cjs.entry.js +346 -0
  38. package/cjs/pn-chat-message_2.cjs.entry.js.map +1 -0
  39. package/cjs/pn-chat.cjs.entry.js +474 -0
  40. package/cjs/pn-chat.cjs.entry.js.map +1 -0
  41. package/cjs/pn-chat.service-eaf6ed50.js +157 -0
  42. package/cjs/pn-chat.service-eaf6ed50.js.map +1 -0
  43. package/cjs/pn-choice-button.cjs.entry.js +2 -2
  44. package/cjs/pn-choice-button.cjs.entry.js.map +1 -1
  45. package/cjs/pn-cta-block.cjs.entry.js +2 -2
  46. package/cjs/pn-cta-block.cjs.entry.js.map +1 -1
  47. package/cjs/pn-customernumber-selector-option.cjs.entry.js +3 -3
  48. package/cjs/pn-customernumber-selector-option.cjs.entry.js.map +1 -1
  49. package/cjs/pn-customernumber-selector.cjs.entry.js +4 -9
  50. package/cjs/pn-customernumber-selector.cjs.entry.js.map +1 -1
  51. package/cjs/pn-date-and-time.cjs.entry.js +2 -2
  52. package/cjs/pn-date-and-time.cjs.entry.js.map +1 -1
  53. package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +20 -8
  54. package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js.map +1 -1
  55. package/cjs/pn-dropdown-with-multi-input-rows-row.cjs.entry.js +2 -2
  56. package/cjs/pn-dropdown-with-multi-input-rows-row.cjs.entry.js.map +1 -1
  57. package/cjs/pn-dropdown-with-multi-input-rows.cjs.entry.js +2 -2
  58. package/cjs/pn-dropdown-with-multi-input-rows.cjs.entry.js.map +1 -1
  59. package/cjs/pn-filter-checkbox.cjs.entry.js +2 -2
  60. package/cjs/pn-filter-checkbox.cjs.entry.js.map +1 -1
  61. package/cjs/pn-find-price-result.cjs.entry.js +5 -5
  62. package/cjs/pn-find-price-result.cjs.entry.js.map +1 -1
  63. package/cjs/{pn-find-price-store-051e931b.js → pn-find-price-store-0c8256c7.js} +2 -2
  64. package/cjs/{pn-find-price-store-051e931b.js.map → pn-find-price-store-0c8256c7.js.map} +1 -1
  65. package/cjs/pn-find-price.cjs.entry.js +6 -6
  66. package/cjs/pn-find-price.cjs.entry.js.map +1 -1
  67. package/cjs/pn-find-service-and-price-result.cjs.entry.js +5 -5
  68. package/cjs/pn-find-service-and-price-result.cjs.entry.js.map +1 -1
  69. package/cjs/{pn-find-service-and-price-store-3cec3d31.js → pn-find-service-and-price-store-13f060e0.js} +2 -2
  70. package/cjs/{pn-find-service-and-price-store-3cec3d31.js.map → pn-find-service-and-price-store-13f060e0.js.map} +1 -1
  71. package/cjs/pn-find-service-and-price.cjs.entry.js +5 -5
  72. package/cjs/pn-find-service-and-price.cjs.entry.js.map +1 -1
  73. package/cjs/pn-hero-block-international.cjs.entry.js +3 -3
  74. package/cjs/pn-hero-block-international.cjs.entry.js.map +1 -1
  75. package/cjs/pn-language-selector_9.cjs.entry.js +25 -27
  76. package/cjs/pn-language-selector_9.cjs.entry.js.map +1 -1
  77. package/cjs/pn-level-up-modal.cjs.entry.js +77 -0
  78. package/cjs/pn-level-up-modal.cjs.entry.js.map +1 -0
  79. package/cjs/pn-level-up.cjs.entry.js +139 -0
  80. package/cjs/pn-level-up.cjs.entry.js.map +1 -0
  81. package/cjs/pn-level-up.service-0e8e67c2.js +71 -0
  82. package/cjs/pn-level-up.service-0e8e67c2.js.map +1 -0
  83. package/cjs/pn-line-shape.cjs.entry.js +2 -2
  84. package/cjs/pn-line-shape.cjs.entry.js.map +1 -1
  85. package/cjs/pn-link-list.cjs.entry.js +3 -3
  86. package/cjs/pn-link-list.cjs.entry.js.map +1 -1
  87. package/cjs/pn-mainnav-link.cjs.entry.js +5 -5
  88. package/cjs/pn-mainnav-link.cjs.entry.js.map +1 -1
  89. package/cjs/{pn-mainnav-store-1a8153fd.js → pn-mainnav-store-5732f3ca.js} +2 -2
  90. package/cjs/{pn-mainnav-store-1a8153fd.js.map → pn-mainnav-store-5732f3ca.js.map} +1 -1
  91. package/cjs/pn-market-web-components.cjs.js +2 -2
  92. package/cjs/pn-marketweb-icon.cjs.entry.js +3 -3
  93. package/cjs/pn-marketweb-icon.cjs.entry.js.map +1 -1
  94. package/cjs/pn-marketweb-input.cjs.entry.js +4 -6
  95. package/cjs/pn-marketweb-input.cjs.entry.js.map +1 -1
  96. package/cjs/pn-marketweb-search.cjs.entry.js +6 -5
  97. package/cjs/pn-marketweb-search.cjs.entry.js.map +1 -1
  98. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +7 -10
  99. package/cjs/pn-marketweb-sitefooter.cjs.entry.js.map +1 -1
  100. package/cjs/{pn-marketweb-siteheader-login-button_5.cjs.entry.js → pn-marketweb-siteheader-login-button_4.cjs.entry.js} +8 -26
  101. package/cjs/pn-marketweb-siteheader-login-button_4.cjs.entry.js.map +1 -0
  102. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +4 -4
  103. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js.map +1 -1
  104. package/cjs/pn-marketweb-siteheader-login-mypage-button.cjs.entry.js +25 -0
  105. package/cjs/pn-marketweb-siteheader-login-mypage-button.cjs.entry.js.map +1 -0
  106. package/cjs/{pn-marketweb-siteheader-store-75853609.js → pn-marketweb-siteheader-store-ce9d9ac7.js} +2 -2
  107. package/cjs/{pn-marketweb-siteheader-store-75853609.js.map → pn-marketweb-siteheader-store-ce9d9ac7.js.map} +1 -1
  108. package/cjs/pn-marketweb-siteheader.cjs.entry.js +11 -10
  109. package/cjs/pn-marketweb-siteheader.cjs.entry.js.map +1 -1
  110. package/cjs/pn-marketweb-table.cjs.entry.js +459 -0
  111. package/cjs/pn-marketweb-table.cjs.entry.js.map +1 -0
  112. package/cjs/pn-media-block.cjs.entry.js +6 -6
  113. package/cjs/pn-media-block.cjs.entry.js.map +1 -1
  114. package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js +2 -2
  115. package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js.map +1 -1
  116. package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js +2 -2
  117. package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js.map +1 -1
  118. package/cjs/pn-multiple-input.cjs.entry.js +1 -1
  119. package/cjs/pn-parcel-tracker.cjs.entry.js +2 -2
  120. package/cjs/pn-parcel-tracker.cjs.entry.js.map +1 -1
  121. package/cjs/pn-pex-pricefinder.cjs.entry.js +3 -3
  122. package/cjs/pn-pex-pricefinder.cjs.entry.js.map +1 -1
  123. package/cjs/pn-play-on-scroll.cjs.entry.js +1 -1
  124. package/cjs/pn-product-card_3.cjs.entry.js +5 -5
  125. package/cjs/pn-product-card_3.cjs.entry.js.map +1 -1
  126. package/cjs/pn-product-pricelist-result.cjs.entry.js +4 -4
  127. package/cjs/pn-product-pricelist-result.cjs.entry.js.map +1 -1
  128. package/cjs/pn-product-pricelist.cjs.entry.js +6 -6
  129. package/cjs/pn-product-pricelist.cjs.entry.js.map +1 -1
  130. package/cjs/pn-product-tile-info_2.cjs.entry.js +4 -4
  131. package/cjs/pn-product-tile-info_2.cjs.entry.js.map +1 -1
  132. package/cjs/pn-product-tile.cjs.entry.js +3 -3
  133. package/cjs/pn-product-tile.cjs.entry.js.map +1 -1
  134. package/cjs/pn-profile-modal-customernumber.cjs.entry.js +3 -3
  135. package/cjs/pn-profile-modal-customernumber.cjs.entry.js.map +1 -1
  136. package/cjs/pn-profile-modal-profile.cjs.entry.js +6 -6
  137. package/cjs/pn-profile-modal-profile.cjs.entry.js.map +1 -1
  138. package/cjs/{pn-profile-modal-store-3b6fea24.js → pn-profile-modal-store-16f8092a.js} +2 -2
  139. package/cjs/{pn-profile-modal-store-3b6fea24.js.map → pn-profile-modal-store-16f8092a.js.map} +1 -1
  140. package/cjs/pn-profile-modal-type.cjs.entry.js +5 -5
  141. package/cjs/pn-profile-modal-type.cjs.entry.js.map +1 -1
  142. package/cjs/pn-profile-modal.cjs.entry.js +5 -5
  143. package/cjs/pn-profile-modal.cjs.entry.js.map +1 -1
  144. package/cjs/pn-profile-selector-option.cjs.entry.js +3 -3
  145. package/cjs/pn-profile-selector-option.cjs.entry.js.map +1 -1
  146. package/cjs/pn-profile-selector.cjs.entry.js +3 -3
  147. package/cjs/pn-profile-selector.cjs.entry.js.map +1 -1
  148. package/cjs/pn-proxio-findprice-result.cjs.entry.js +3 -3
  149. package/cjs/pn-proxio-findprice-result.cjs.entry.js.map +1 -1
  150. package/cjs/pn-proxio-findprice.cjs.entry.js +9 -8
  151. package/cjs/pn-proxio-findprice.cjs.entry.js.map +1 -1
  152. package/cjs/pn-proxio-pricegroup.cjs.entry.js +6 -5
  153. package/cjs/pn-proxio-pricegroup.cjs.entry.js.map +1 -1
  154. package/cjs/pn-proxio-productcard_4.cjs.entry.js +8 -8
  155. package/cjs/pn-proxio-productcard_4.cjs.entry.js.map +1 -1
  156. package/cjs/pn-qr-code-generator.cjs.entry.js +2945 -0
  157. package/cjs/pn-qr-code-generator.cjs.entry.js.map +1 -0
  158. package/cjs/pn-quick-cta.cjs.entry.js +2 -2
  159. package/cjs/pn-quick-cta.cjs.entry.js.map +1 -1
  160. package/cjs/pn-quote-card.cjs.entry.js +2 -2
  161. package/cjs/pn-quote-card.cjs.entry.js.map +1 -1
  162. package/cjs/pn-scroll_2.cjs.entry.js +2 -2
  163. package/cjs/pn-scroll_2.cjs.entry.js.map +1 -1
  164. package/cjs/pn-search.cjs.entry.js +54 -0
  165. package/cjs/pn-search.cjs.entry.js.map +1 -0
  166. package/cjs/pn-share-item.cjs.entry.js +2 -2
  167. package/cjs/pn-share-item.cjs.entry.js.map +1 -1
  168. package/cjs/pn-share.cjs.entry.js +2 -2
  169. package/cjs/pn-share.cjs.entry.js.map +1 -1
  170. package/cjs/pn-sidenav-level.cjs.entry.js +5 -5
  171. package/cjs/pn-sidenav-level.cjs.entry.js.map +1 -1
  172. package/cjs/pn-sidenav-link.cjs.entry.js +5 -5
  173. package/cjs/pn-sidenav-link.cjs.entry.js.map +1 -1
  174. package/cjs/{pn-sidenav-store-cf9c4996.js → pn-sidenav-store-236c8806.js} +2 -2
  175. package/cjs/{pn-sidenav-store-cf9c4996.js.map → pn-sidenav-store-236c8806.js.map} +1 -1
  176. package/cjs/pn-sidenav-togglebutton.cjs.entry.js +5 -5
  177. package/cjs/pn-sidenav-togglebutton.cjs.entry.js.map +1 -1
  178. package/cjs/pn-sidenav.cjs.entry.js +5 -5
  179. package/cjs/pn-sidenav.cjs.entry.js.map +1 -1
  180. package/cjs/pn-site-footer_3.cjs.entry.js +7 -7
  181. package/cjs/pn-site-footer_3.cjs.entry.js.map +1 -1
  182. package/cjs/pn-spotlight.cjs.entry.js +2 -2
  183. package/cjs/pn-spotlight.cjs.entry.js.map +1 -1
  184. package/cjs/pn-stats-info-data.cjs.entry.js +2 -2
  185. package/cjs/pn-stats-info-data.cjs.entry.js.map +1 -1
  186. package/cjs/pn-stats-info.cjs.entry.js +2 -2
  187. package/cjs/pn-stats-info.cjs.entry.js.map +1 -1
  188. package/cjs/pn-teaser-card.cjs.entry.js +5 -9
  189. package/cjs/pn-teaser-card.cjs.entry.js.map +1 -1
  190. package/cjs/pn-titletag.cjs.entry.js +3 -3
  191. package/cjs/pn-titletag.cjs.entry.js.map +1 -1
  192. package/cjs/pn-usp-promoter.cjs.entry.js +3 -3
  193. package/cjs/pn-usp-promoter.cjs.entry.js.map +1 -1
  194. package/cjs/pn-usp-simple.cjs.entry.js +56 -0
  195. package/cjs/pn-usp-simple.cjs.entry.js.map +1 -0
  196. package/collection/collection-manifest.json +10 -1
  197. package/collection/components/animation/pn-animated-tile/pn-animated-tile.css +25 -0
  198. package/collection/components/animation/pn-play-on-scroll/pn-video-overlay/pn-video-overlay.css +25 -0
  199. package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.css +25 -0
  200. package/collection/components/cards/pn-quote-card/pn-quote-card.css +25 -0
  201. package/collection/components/cards/pn-teaser-card/pn-teaser-card.css +25 -0
  202. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +8 -11
  203. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js.map +1 -1
  204. package/collection/components/cards/pn-teaser-card/pn-teaser-card.stories.js +3 -3
  205. package/collection/components/charts/pn-chart/pn-chart.css +25 -0
  206. package/collection/components/charts/pn-charts-card/pn-charts-card.css +25 -0
  207. package/collection/components/cta/pn-cta-block/pn-cta-block.css +25 -0
  208. package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.css +25 -0
  209. package/collection/components/cta/pn-quick-cta/pn-quick-cta.css +25 -0
  210. package/collection/components/cta/pn-share/pn-share-item.css +25 -0
  211. package/collection/components/cta/pn-share/pn-share.css +25 -0
  212. package/collection/components/cta/pn-spotlight/pn-spotlight.css +25 -0
  213. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.css +25 -0
  214. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.css +25 -0
  215. package/collection/components/input/pn-address-autofill/pn-address-autofill.css +31 -1
  216. package/collection/components/input/pn-address-autofill/pn-address-autofill.js +58 -68
  217. package/collection/components/input/pn-address-autofill/pn-address-autofill.js.map +1 -1
  218. package/collection/components/input/pn-address-autofill/pn-address-autofill.stories.js +2 -1
  219. package/collection/components/input/pn-address-autofill/translations.js +6 -3
  220. package/collection/components/input/pn-address-autofill/translations.js.map +1 -1
  221. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.css +25 -0
  222. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.css +25 -0
  223. package/collection/components/input/pn-choice-button/pn-choice-button.css +25 -0
  224. package/collection/components/input/pn-date-and-time/pn-date-and-time.css +25 -0
  225. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.css +25 -0
  226. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +18 -6
  227. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
  228. package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows-row.css +25 -0
  229. package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.css +25 -0
  230. package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.css +25 -0
  231. package/collection/components/input/pn-marketweb-input/pn-marketweb-input.css +25 -0
  232. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.css +25 -0
  233. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +4 -3
  234. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js.map +1 -1
  235. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.css +25 -0
  236. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.css +25 -0
  237. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.css +50 -0
  238. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +1 -1
  239. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js.map +1 -1
  240. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +25 -0
  241. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.css +25 -0
  242. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.css +25 -0
  243. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +1 -0
  244. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js.map +1 -1
  245. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.css +25 -0
  246. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +1 -1
  247. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js.map +1 -1
  248. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.css +25 -0
  249. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js +1 -37
  250. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js.map +1 -1
  251. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css +25 -0
  252. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +4 -4
  253. package/collection/components/media/pn-media-block/pn-media-block.css +25 -0
  254. package/collection/components/media/pn-media-block/pn-media-block.js +8 -8
  255. package/collection/components/media/pn-media-block/pn-media-block.js.map +1 -1
  256. package/collection/components/media/pn-media-block/pn-media-block.stories.js +76 -76
  257. package/collection/components/minor/pn-app-banner/pn-app-banner.css +25 -0
  258. package/collection/components/minor/pn-app-banner/pn-app-banner.js +1 -1
  259. package/collection/components/minor/pn-marketweb-icon/pn-marketweb-icon.css +25 -0
  260. package/collection/components/minor/pn-marketweb-icon/pn-marketweb-icon.js +1 -1
  261. package/collection/components/minor/pn-swan/pn-swan.css +25 -0
  262. package/collection/components/minor/pn-swan/pn-swan.js +1 -1
  263. package/collection/components/minor/pn-titletag/pn-titletag.css +25 -0
  264. package/collection/components/minor/pn-titletag/pn-titletag.js +1 -1
  265. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.css +50 -0
  266. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +1 -1
  267. package/collection/components/navigation/pn-language-selector/pn-language-selector.css +50 -0
  268. package/collection/components/navigation/pn-language-selector/pn-language-selector.js +1 -1
  269. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.css +25 -0
  270. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +2 -2
  271. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.css +25 -0
  272. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +1 -1
  273. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.css +25 -0
  274. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +1 -1
  275. package/collection/components/navigation/pn-mainnav/pn-mainnav.css +25 -0
  276. package/collection/components/navigation/pn-mainnav/pn-mainnav.js +1 -1
  277. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.css +25 -0
  278. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +1 -1
  279. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.css +25 -0
  280. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +1 -1
  281. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.css +25 -0
  282. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +1 -1
  283. package/collection/components/navigation/pn-sidenav/pn-sidenav.css +25 -0
  284. package/collection/components/navigation/pn-sidenav/pn-sidenav.js +1 -1
  285. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.css +50 -0
  286. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +1 -1
  287. package/collection/components/navigation/pn-site-footer/pn-site-footer.css +50 -0
  288. package/collection/components/navigation/pn-site-footer/pn-site-footer.js +1 -1
  289. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.css +25 -0
  290. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +1 -1
  291. package/collection/components/navigation/pn-site-selector/pn-site-selector.css +25 -0
  292. package/collection/components/navigation/pn-site-selector/pn-site-selector.js +1 -1
  293. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.css +25 -0
  294. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +1 -1
  295. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.css +25 -0
  296. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +1 -1
  297. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.css +25 -0
  298. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +1 -1
  299. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.css +25 -0
  300. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +2 -2
  301. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.css +25 -0
  302. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +1 -1
  303. package/collection/components/profile/pn-profile-modal/pn-profile-modal.css +25 -0
  304. package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +1 -1
  305. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.css +25 -0
  306. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +1 -1
  307. package/collection/components/profile/pn-profile-selector/pn-profile-selector.css +25 -0
  308. package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +1 -1
  309. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.css +25 -0
  310. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +1 -1
  311. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.css +146 -0
  312. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js +118 -0
  313. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js.map +1 -0
  314. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.stories.js +219 -0
  315. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.stories.js.map +1 -0
  316. package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js +243 -0
  317. package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js.map +1 -0
  318. package/collection/components/widgets/pn-chat/pn-chat.css +238 -0
  319. package/collection/components/widgets/pn-chat/pn-chat.js +840 -0
  320. package/collection/components/widgets/pn-chat/pn-chat.js.map +1 -0
  321. package/collection/components/widgets/pn-chat/pn-chat.models.js +2 -0
  322. package/collection/components/widgets/pn-chat/pn-chat.models.js.map +1 -0
  323. package/collection/components/widgets/pn-chat/pn-chat.service.js +151 -0
  324. package/collection/components/widgets/pn-chat/pn-chat.service.js.map +1 -0
  325. package/collection/components/widgets/pn-chat/pn-chat.stories.js +116 -0
  326. package/collection/components/widgets/pn-chat/pn-chat.stories.js.map +1 -0
  327. package/collection/components/widgets/pn-chat/translations.js +78 -0
  328. package/collection/components/widgets/pn-chat/translations.js.map +1 -0
  329. package/collection/components/widgets/pn-chat/types.js +2 -0
  330. package/collection/components/widgets/pn-chat/types.js.map +1 -0
  331. package/collection/components/widgets/pn-find-price/pn-find-price-result.css +25 -0
  332. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +1 -1
  333. package/collection/components/widgets/pn-find-price/pn-find-price.css +25 -0
  334. package/collection/components/widgets/pn-find-price/pn-find-price.js +2 -2
  335. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.css +25 -0
  336. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +1 -1
  337. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.css +25 -0
  338. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +1 -1
  339. package/collection/components/widgets/pn-hero-block-international/pn-hero-block-international.css +25 -0
  340. package/collection/components/widgets/pn-hero-block-international/pn-hero-block-international.js +1 -1
  341. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.css +94 -0
  342. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.js +262 -0
  343. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.js.map +1 -0
  344. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.stories.js +31 -0
  345. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.stories.js.map +1 -0
  346. package/collection/components/widgets/pn-level-up/pn-level-up.css +114 -0
  347. package/collection/components/widgets/pn-level-up/pn-level-up.js +476 -0
  348. package/collection/components/widgets/pn-level-up/pn-level-up.js.map +1 -0
  349. package/collection/components/widgets/pn-level-up/pn-level-up.models.js +2 -0
  350. package/collection/components/widgets/pn-level-up/pn-level-up.models.js.map +1 -0
  351. package/collection/components/widgets/pn-level-up/pn-level-up.service.js +65 -0
  352. package/collection/components/widgets/pn-level-up/pn-level-up.service.js.map +1 -0
  353. package/collection/components/widgets/pn-level-up/pn-level-up.stories.js +88 -0
  354. package/collection/components/widgets/pn-level-up/pn-level-up.stories.js.map +1 -0
  355. package/collection/components/widgets/pn-level-up/types.js +2 -0
  356. package/collection/components/widgets/pn-level-up/types.js.map +1 -0
  357. package/collection/components/widgets/pn-link-list/pn-link-list.css +25 -0
  358. package/collection/components/widgets/pn-link-list/pn-link-list.js +1 -1
  359. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.css +96 -0
  360. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.js +494 -0
  361. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.js.map +1 -0
  362. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.stories.js +82 -0
  363. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.stories.js.map +1 -0
  364. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.css +255 -0
  365. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.js +701 -0
  366. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.js.map +1 -0
  367. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.service.js +38 -0
  368. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.service.js.map +1 -0
  369. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.stories.js +122 -0
  370. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.stories.js.map +1 -0
  371. package/collection/components/widgets/pn-marketweb-table/translations.js +73 -0
  372. package/collection/components/widgets/pn-marketweb-table/translations.js.map +1 -0
  373. package/collection/components/widgets/pn-marketweb-table/types.js +2 -0
  374. package/collection/components/widgets/pn-marketweb-table/types.js.map +1 -0
  375. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.css +25 -0
  376. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +1 -1
  377. package/collection/components/widgets/pn-product-card/pn-product-card-info.css +25 -0
  378. package/collection/components/widgets/pn-product-card/pn-product-card-price.css +25 -0
  379. package/collection/components/widgets/pn-product-card/pn-product-card.css +25 -0
  380. package/collection/components/widgets/pn-product-card/pn-product-card.js +1 -1
  381. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.css +25 -0
  382. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +1 -1
  383. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.css +25 -0
  384. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +2 -2
  385. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.css +25 -0
  386. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +1 -1
  387. package/collection/components/widgets/pn-product-tile/pn-product-tile-price.css +25 -0
  388. package/collection/components/widgets/pn-product-tile/pn-product-tile.css +25 -0
  389. package/collection/components/widgets/pn-product-tile/pn-product-tile.js +1 -1
  390. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.css +25 -0
  391. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +1 -1
  392. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.css +25 -0
  393. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +3 -3
  394. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +25 -0
  395. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +1 -1
  396. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.css +25 -0
  397. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +1 -1
  398. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.css +25 -0
  399. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +1 -1
  400. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.css +25 -0
  401. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.css +25 -0
  402. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +1 -1
  403. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.css +61 -0
  404. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.js +198 -0
  405. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.js.map +1 -0
  406. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.stories.js +29 -0
  407. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.stories.js.map +1 -0
  408. package/collection/components/widgets/pn-search/pn-search.css +140 -0
  409. package/collection/components/widgets/pn-search/pn-search.js +368 -0
  410. package/collection/components/widgets/pn-search/pn-search.js.map +1 -0
  411. package/collection/components/widgets/pn-search/pn-search.stories.js +54 -0
  412. package/collection/components/widgets/pn-search/pn-search.stories.js.map +1 -0
  413. package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.css +25 -0
  414. package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.js +1 -1
  415. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.css +116 -0
  416. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.js +269 -0
  417. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.js.map +1 -0
  418. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.stories.js +63 -0
  419. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.stories.js.map +1 -0
  420. package/collection/globals/HeadingTag.js +2 -2
  421. package/collection/globals/HeadingTag.js.map +1 -1
  422. package/collection/globals/LocalStorageService.js +50 -0
  423. package/collection/globals/LocalStorageService.js.map +1 -0
  424. package/collection/globals/ScreensizeDetect.js +80 -0
  425. package/collection/globals/ScreensizeDetect.js.map +1 -0
  426. package/collection/globals/types.js +2 -0
  427. package/collection/globals/types.js.map +1 -0
  428. package/collection/utils/utils.js +11 -0
  429. package/collection/utils/utils.js.map +1 -1
  430. package/components/FetchHelper.js +1 -243
  431. package/components/FetchHelper.js.map +1 -1
  432. package/components/HeadingTag.js +10 -0
  433. package/components/HeadingTag.js.map +1 -0
  434. package/components/LocalStorageService.js +64 -0
  435. package/components/LocalStorageService.js.map +1 -0
  436. package/{esm/FetchHelper-746f2bb6.js → components/MarketWebContextService.js} +2 -82
  437. package/components/MarketWebContextService.js.map +1 -0
  438. package/components/alert_exclamation_circle.js +6 -0
  439. package/components/alert_exclamation_circle.js.map +1 -0
  440. package/components/angle_up.js +9 -0
  441. package/components/angle_up.js.map +1 -0
  442. package/components/close.js +6 -0
  443. package/components/close.js.map +1 -0
  444. package/components/pn-address-autofill.js +50 -73
  445. package/components/pn-address-autofill.js.map +1 -1
  446. package/components/pn-animated-tile.js +1 -1
  447. package/components/pn-animated-tile.js.map +1 -1
  448. package/components/pn-app-banner.js +2 -2
  449. package/components/pn-app-banner.js.map +1 -1
  450. package/components/pn-bonus-progressbar-level.js +1 -1
  451. package/components/pn-bonus-progressbar-level.js.map +1 -1
  452. package/components/pn-bonus-progressbar.js +1 -1
  453. package/components/pn-bonus-progressbar.js.map +1 -1
  454. package/components/pn-breakpoints.js +2 -2
  455. package/components/pn-breakpoints.js.map +1 -1
  456. package/components/pn-chart.js +1 -1
  457. package/components/pn-chart.js.map +1 -1
  458. package/components/pn-charts-card.js +1 -1
  459. package/components/pn-charts-card.js.map +1 -1
  460. package/components/pn-chat-message.d.ts +11 -0
  461. package/components/pn-chat-message.js +8 -0
  462. package/components/pn-chat-message.js.map +1 -0
  463. package/components/pn-chat-message2.js +69 -0
  464. package/components/pn-chat-message2.js.map +1 -0
  465. package/components/pn-chat.d.ts +11 -0
  466. package/components/pn-chat.js +534 -0
  467. package/components/pn-chat.js.map +1 -0
  468. package/components/pn-chat.service.js +155 -0
  469. package/components/pn-chat.service.js.map +1 -0
  470. package/components/pn-choice-button2.js +1 -1
  471. package/components/pn-choice-button2.js.map +1 -1
  472. package/components/pn-cta-block.js +1 -1
  473. package/components/pn-cta-block.js.map +1 -1
  474. package/components/pn-customernumber-selector-option.js +2 -2
  475. package/components/pn-customernumber-selector-option.js.map +1 -1
  476. package/components/pn-customernumber-selector.js +3 -8
  477. package/components/pn-customernumber-selector.js.map +1 -1
  478. package/components/pn-date-and-time.js +1 -1
  479. package/components/pn-date-and-time.js.map +1 -1
  480. package/components/pn-dropdown-choice-adds-row.js +19 -7
  481. package/components/pn-dropdown-choice-adds-row.js.map +1 -1
  482. package/components/pn-dropdown-with-multi-input-rows-row2.js +1 -1
  483. package/components/pn-dropdown-with-multi-input-rows-row2.js.map +1 -1
  484. package/components/pn-dropdown-with-multi-input-rows.js +1 -1
  485. package/components/pn-dropdown-with-multi-input-rows.js.map +1 -1
  486. package/components/pn-filter-checkbox2.js +1 -1
  487. package/components/pn-filter-checkbox2.js.map +1 -1
  488. package/components/pn-find-price-result2.js +2 -2
  489. package/components/pn-find-price-result2.js.map +1 -1
  490. package/components/pn-find-price.js +3 -3
  491. package/components/pn-find-price.js.map +1 -1
  492. package/components/pn-find-service-and-price-result2.js +2 -2
  493. package/components/pn-find-service-and-price-result2.js.map +1 -1
  494. package/components/pn-find-service-and-price.js +2 -2
  495. package/components/pn-find-service-and-price.js.map +1 -1
  496. package/components/pn-hero-block-international.js +2 -2
  497. package/components/pn-hero-block-international.js.map +1 -1
  498. package/components/pn-language-selector-option2.js +2 -2
  499. package/components/pn-language-selector-option2.js.map +1 -1
  500. package/components/pn-language-selector2.js +2 -2
  501. package/components/pn-language-selector2.js.map +1 -1
  502. package/components/pn-level-up-modal.d.ts +11 -0
  503. package/components/pn-level-up-modal.js +8 -0
  504. package/components/pn-level-up-modal.js.map +1 -0
  505. package/components/pn-level-up-modal2.js +170 -0
  506. package/components/pn-level-up-modal2.js.map +1 -0
  507. package/components/pn-level-up.d.ts +11 -0
  508. package/components/pn-level-up.js +185 -0
  509. package/components/pn-level-up.js.map +1 -0
  510. package/components/pn-line-shape.js +1 -1
  511. package/components/pn-line-shape.js.map +1 -1
  512. package/components/pn-link-list.js +2 -2
  513. package/components/pn-link-list.js.map +1 -1
  514. package/components/pn-mainnav-level2.js +3 -3
  515. package/components/pn-mainnav-level2.js.map +1 -1
  516. package/components/pn-mainnav-link2.js +2 -2
  517. package/components/pn-mainnav-link2.js.map +1 -1
  518. package/components/pn-mainnav-list2.js +2 -2
  519. package/components/pn-mainnav-list2.js.map +1 -1
  520. package/components/pn-mainnav2.js +3 -5
  521. package/components/pn-mainnav2.js.map +1 -1
  522. package/components/pn-marketweb-carousel.d.ts +11 -0
  523. package/components/pn-marketweb-carousel.js +8 -0
  524. package/components/pn-marketweb-carousel.js.map +1 -0
  525. package/components/pn-marketweb-carousel2.js +326 -0
  526. package/components/pn-marketweb-carousel2.js.map +1 -0
  527. package/components/pn-marketweb-icon.js +2 -2
  528. package/components/pn-marketweb-icon.js.map +1 -1
  529. package/components/pn-marketweb-input2.js +2 -4
  530. package/components/pn-marketweb-input2.js.map +1 -1
  531. package/components/pn-marketweb-search.js +1 -125
  532. package/components/pn-marketweb-search.js.map +1 -1
  533. package/components/pn-marketweb-search2.js +130 -0
  534. package/components/pn-marketweb-search2.js.map +1 -0
  535. package/components/pn-marketweb-sitefooter.js +6 -9
  536. package/components/pn-marketweb-sitefooter.js.map +1 -1
  537. package/components/pn-marketweb-siteheader-login-linklist2.js +1 -1
  538. package/components/pn-marketweb-siteheader-login-linklist2.js.map +1 -1
  539. package/components/pn-marketweb-siteheader-login-links2.js +1 -1
  540. package/components/pn-marketweb-siteheader-login-links2.js.map +1 -1
  541. package/components/pn-marketweb-siteheader-login-mypage-button.js +34 -1
  542. package/components/pn-marketweb-siteheader-login-mypage-button.js.map +1 -1
  543. package/components/pn-marketweb-siteheader-login-profileselection2.js +2 -1
  544. package/components/pn-marketweb-siteheader-login-profileselection2.js.map +1 -1
  545. package/components/pn-marketweb-siteheader-login2.js +8 -14
  546. package/components/pn-marketweb-siteheader-login2.js.map +1 -1
  547. package/components/pn-marketweb-siteheader-search2.js +1 -1
  548. package/components/pn-marketweb-siteheader-search2.js.map +1 -1
  549. package/components/pn-marketweb-siteheader-unified-login2.js +3 -13
  550. package/components/pn-marketweb-siteheader-unified-login2.js.map +1 -1
  551. package/components/pn-marketweb-siteheader.js +27 -32
  552. package/components/pn-marketweb-siteheader.js.map +1 -1
  553. package/components/pn-marketweb-table.d.ts +11 -0
  554. package/components/pn-marketweb-table.js +502 -0
  555. package/components/pn-marketweb-table.js.map +1 -0
  556. package/components/pn-media-block.js +6 -6
  557. package/components/pn-media-block.js.map +1 -1
  558. package/components/pn-multi-row-connected-dropdown-row2.js +1 -1
  559. package/components/pn-multi-row-connected-dropdown-row2.js.map +1 -1
  560. package/components/pn-multi-row-connected-dropdown.js +1 -1
  561. package/components/pn-multi-row-connected-dropdown.js.map +1 -1
  562. package/components/pn-parcel-tracker.js +1 -1
  563. package/components/pn-parcel-tracker.js.map +1 -1
  564. package/components/pn-pex-pricefinder.js +2 -2
  565. package/components/pn-pex-pricefinder.js.map +1 -1
  566. package/components/pn-product-card-info2.js +1 -1
  567. package/components/pn-product-card-info2.js.map +1 -1
  568. package/components/pn-product-card-price2.js +1 -1
  569. package/components/pn-product-card-price2.js.map +1 -1
  570. package/components/pn-product-card2.js +2 -2
  571. package/components/pn-product-card2.js.map +1 -1
  572. package/components/pn-product-pricelist-result.js +2 -2
  573. package/components/pn-product-pricelist-result.js.map +1 -1
  574. package/components/pn-product-pricelist.js +3 -3
  575. package/components/pn-product-pricelist.js.map +1 -1
  576. package/components/pn-product-tile-info2.js +2 -2
  577. package/components/pn-product-tile-info2.js.map +1 -1
  578. package/components/pn-product-tile-price2.js +1 -1
  579. package/components/pn-product-tile-price2.js.map +1 -1
  580. package/components/pn-product-tile.js +2 -2
  581. package/components/pn-product-tile.js.map +1 -1
  582. package/components/pn-profile-modal-customernumber.js +2 -2
  583. package/components/pn-profile-modal-customernumber.js.map +1 -1
  584. package/components/pn-profile-modal-profile.js +3 -3
  585. package/components/pn-profile-modal-profile.js.map +1 -1
  586. package/components/pn-profile-modal-type.js +2 -2
  587. package/components/pn-profile-modal-type.js.map +1 -1
  588. package/components/pn-profile-modal.js +2 -2
  589. package/components/pn-profile-modal.js.map +1 -1
  590. package/components/pn-profile-selector-option.js +2 -2
  591. package/components/pn-profile-selector-option.js.map +1 -1
  592. package/components/pn-profile-selector.js +2 -2
  593. package/components/pn-profile-selector.js.map +1 -1
  594. package/components/pn-proxio-findprice-result2.js +2 -2
  595. package/components/pn-proxio-findprice-result2.js.map +1 -1
  596. package/components/pn-proxio-findprice.js +6 -5
  597. package/components/pn-proxio-findprice.js.map +1 -1
  598. package/components/pn-proxio-pricegroup.js +4 -3
  599. package/components/pn-proxio-pricegroup.js.map +1 -1
  600. package/components/pn-proxio-productcard-description2.js +2 -2
  601. package/components/pn-proxio-productcard-description2.js.map +1 -1
  602. package/components/pn-proxio-productcard-information2.js +2 -2
  603. package/components/pn-proxio-productcard-information2.js.map +1 -1
  604. package/components/pn-proxio-productcard-pricelink2.js +1 -1
  605. package/components/pn-proxio-productcard-pricelink2.js.map +1 -1
  606. package/components/pn-proxio-productcard2.js +2 -2
  607. package/components/pn-proxio-productcard2.js.map +1 -1
  608. package/components/pn-qr-code-generator.d.ts +11 -0
  609. package/components/pn-qr-code-generator.js +8 -0
  610. package/components/pn-qr-code-generator.js.map +1 -0
  611. package/components/pn-qr-code-generator2.js +2967 -0
  612. package/components/pn-qr-code-generator2.js.map +1 -0
  613. package/components/pn-quick-cta.js +1 -1
  614. package/components/pn-quick-cta.js.map +1 -1
  615. package/components/pn-quote-card.js +1 -1
  616. package/components/pn-quote-card.js.map +1 -1
  617. package/components/pn-search.d.ts +11 -0
  618. package/components/pn-search.js +91 -0
  619. package/components/pn-search.js.map +1 -0
  620. package/components/pn-share-item2.js +1 -1
  621. package/components/pn-share-item2.js.map +1 -1
  622. package/components/pn-share.js +1 -1
  623. package/components/pn-share.js.map +1 -1
  624. package/components/pn-sidenav-level.js +2 -2
  625. package/components/pn-sidenav-level.js.map +1 -1
  626. package/components/pn-sidenav-link.js +2 -2
  627. package/components/pn-sidenav-link.js.map +1 -1
  628. package/components/pn-sidenav-togglebutton.js +2 -2
  629. package/components/pn-sidenav-togglebutton.js.map +1 -1
  630. package/components/pn-sidenav.js +2 -2
  631. package/components/pn-sidenav.js.map +1 -1
  632. package/components/pn-site-footer-col2.js +2 -2
  633. package/components/pn-site-footer-col2.js.map +1 -1
  634. package/components/pn-site-footer2.js +2 -2
  635. package/components/pn-site-footer2.js.map +1 -1
  636. package/components/pn-site-selector-item2.js +2 -2
  637. package/components/pn-site-selector-item2.js.map +1 -1
  638. package/components/pn-site-selector2.js +2 -2
  639. package/components/pn-site-selector2.js.map +1 -1
  640. package/components/pn-spotlight.js +1 -1
  641. package/components/pn-spotlight.js.map +1 -1
  642. package/components/pn-stats-info-data2.js +1 -1
  643. package/components/pn-stats-info-data2.js.map +1 -1
  644. package/components/pn-stats-info.js +1 -1
  645. package/components/pn-stats-info.js.map +1 -1
  646. package/components/pn-swan2.js +2 -2
  647. package/components/pn-swan2.js.map +1 -1
  648. package/components/pn-teaser-card.js +5 -9
  649. package/components/pn-teaser-card.js.map +1 -1
  650. package/components/pn-titletag2.js +2 -2
  651. package/components/pn-titletag2.js.map +1 -1
  652. package/components/pn-usp-promoter.js +2 -2
  653. package/components/pn-usp-promoter.js.map +1 -1
  654. package/components/pn-usp-simple.d.ts +11 -0
  655. package/components/pn-usp-simple.js +82 -0
  656. package/components/pn-usp-simple.js.map +1 -0
  657. package/components/pn-video-overlay2.js +1 -1
  658. package/components/pn-video-overlay2.js.map +1 -1
  659. package/esm/FetchHelper-4789695a.js +83 -0
  660. package/esm/FetchHelper-4789695a.js.map +1 -0
  661. package/esm/HeadingTag-e20016ab.js +10 -0
  662. package/esm/HeadingTag-e20016ab.js.map +1 -0
  663. package/esm/LocalStorageService-78b1794d.js +64 -0
  664. package/esm/LocalStorageService-78b1794d.js.map +1 -0
  665. package/esm/MarketWebContextService-16c15670.js +245 -0
  666. package/esm/MarketWebContextService-16c15670.js.map +1 -0
  667. package/esm/alert_exclamation_circle-f0fe7c7b.js +6 -0
  668. package/esm/alert_exclamation_circle-f0fe7c7b.js.map +1 -0
  669. package/esm/angle_up-b5f955ea.js +9 -0
  670. package/esm/angle_up-b5f955ea.js.map +1 -0
  671. package/esm/close-9e7bd787.js +6 -0
  672. package/esm/close-9e7bd787.js.map +1 -0
  673. package/esm/{index-89124075.js → index-ae60ebec.js} +2 -2
  674. package/esm/{index-89124075.js.map → index-ae60ebec.js.map} +1 -1
  675. package/esm/{index-51d67461.js → index-c311acd6.js} +65 -9
  676. package/esm/index-c311acd6.js.map +1 -0
  677. package/esm/index.js +1 -1
  678. package/esm/loader.js +3 -3
  679. package/esm/pn-address-autofill.entry.js +50 -74
  680. package/esm/pn-address-autofill.entry.js.map +1 -1
  681. package/esm/pn-animated-tile.entry.js +2 -2
  682. package/esm/pn-animated-tile.entry.js.map +1 -1
  683. package/esm/pn-app-banner.entry.js +3 -3
  684. package/esm/pn-app-banner.entry.js.map +1 -1
  685. package/esm/pn-bonus-progressbar-level.entry.js +2 -2
  686. package/esm/pn-bonus-progressbar-level.entry.js.map +1 -1
  687. package/esm/pn-bonus-progressbar.entry.js +2 -2
  688. package/esm/pn-bonus-progressbar.entry.js.map +1 -1
  689. package/esm/pn-breakpoints.entry.js +3 -3
  690. package/esm/pn-breakpoints.entry.js.map +1 -1
  691. package/esm/pn-chart.entry.js +2 -2
  692. package/esm/pn-chart.entry.js.map +1 -1
  693. package/esm/pn-charts-card.entry.js +2 -2
  694. package/esm/pn-charts-card.entry.js.map +1 -1
  695. package/esm/pn-chat-message_2.entry.js +341 -0
  696. package/esm/pn-chat-message_2.entry.js.map +1 -0
  697. package/esm/pn-chat.entry.js +470 -0
  698. package/esm/pn-chat.entry.js.map +1 -0
  699. package/esm/pn-chat.service-f4037d6f.js +155 -0
  700. package/esm/pn-chat.service-f4037d6f.js.map +1 -0
  701. package/esm/pn-choice-button.entry.js +2 -2
  702. package/esm/pn-choice-button.entry.js.map +1 -1
  703. package/esm/pn-cta-block.entry.js +2 -2
  704. package/esm/pn-cta-block.entry.js.map +1 -1
  705. package/esm/pn-customernumber-selector-option.entry.js +3 -3
  706. package/esm/pn-customernumber-selector-option.entry.js.map +1 -1
  707. package/esm/pn-customernumber-selector.entry.js +4 -9
  708. package/esm/pn-customernumber-selector.entry.js.map +1 -1
  709. package/esm/pn-date-and-time.entry.js +2 -2
  710. package/esm/pn-date-and-time.entry.js.map +1 -1
  711. package/esm/pn-dropdown-choice-adds-row.entry.js +20 -8
  712. package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
  713. package/esm/pn-dropdown-with-multi-input-rows-row.entry.js +2 -2
  714. package/esm/pn-dropdown-with-multi-input-rows-row.entry.js.map +1 -1
  715. package/esm/pn-dropdown-with-multi-input-rows.entry.js +2 -2
  716. package/esm/pn-dropdown-with-multi-input-rows.entry.js.map +1 -1
  717. package/esm/pn-filter-checkbox.entry.js +2 -2
  718. package/esm/pn-filter-checkbox.entry.js.map +1 -1
  719. package/esm/pn-find-price-result.entry.js +5 -5
  720. package/esm/pn-find-price-result.entry.js.map +1 -1
  721. package/esm/{pn-find-price-store-c9a9d3d4.js → pn-find-price-store-f97f2325.js} +2 -2
  722. package/esm/{pn-find-price-store-c9a9d3d4.js.map → pn-find-price-store-f97f2325.js.map} +1 -1
  723. package/esm/pn-find-price.entry.js +6 -6
  724. package/esm/pn-find-price.entry.js.map +1 -1
  725. package/esm/pn-find-service-and-price-result.entry.js +5 -5
  726. package/esm/pn-find-service-and-price-result.entry.js.map +1 -1
  727. package/esm/{pn-find-service-and-price-store-60aa5801.js → pn-find-service-and-price-store-6553566d.js} +2 -2
  728. package/esm/{pn-find-service-and-price-store-60aa5801.js.map → pn-find-service-and-price-store-6553566d.js.map} +1 -1
  729. package/esm/pn-find-service-and-price.entry.js +5 -5
  730. package/esm/pn-find-service-and-price.entry.js.map +1 -1
  731. package/esm/pn-hero-block-international.entry.js +3 -3
  732. package/esm/pn-hero-block-international.entry.js.map +1 -1
  733. package/esm/pn-language-selector_9.entry.js +25 -27
  734. package/esm/pn-language-selector_9.entry.js.map +1 -1
  735. package/esm/pn-level-up-modal.entry.js +73 -0
  736. package/esm/pn-level-up-modal.entry.js.map +1 -0
  737. package/esm/pn-level-up.entry.js +135 -0
  738. package/esm/pn-level-up.entry.js.map +1 -0
  739. package/esm/pn-level-up.service-5c602f23.js +69 -0
  740. package/esm/pn-level-up.service-5c602f23.js.map +1 -0
  741. package/esm/pn-line-shape.entry.js +2 -2
  742. package/esm/pn-line-shape.entry.js.map +1 -1
  743. package/esm/pn-link-list.entry.js +3 -3
  744. package/esm/pn-link-list.entry.js.map +1 -1
  745. package/esm/pn-mainnav-link.entry.js +5 -5
  746. package/esm/pn-mainnav-link.entry.js.map +1 -1
  747. package/esm/{pn-mainnav-store-9c42bc66.js → pn-mainnav-store-23387019.js} +2 -2
  748. package/esm/{pn-mainnav-store-9c42bc66.js.map → pn-mainnav-store-23387019.js.map} +1 -1
  749. package/esm/pn-market-web-components.js +3 -3
  750. package/esm/pn-marketweb-icon.entry.js +3 -3
  751. package/esm/pn-marketweb-icon.entry.js.map +1 -1
  752. package/esm/pn-marketweb-input.entry.js +3 -5
  753. package/esm/pn-marketweb-input.entry.js.map +1 -1
  754. package/esm/pn-marketweb-search.entry.js +6 -5
  755. package/esm/pn-marketweb-search.entry.js.map +1 -1
  756. package/esm/pn-marketweb-sitefooter.entry.js +6 -9
  757. package/esm/pn-marketweb-sitefooter.entry.js.map +1 -1
  758. package/esm/{pn-marketweb-siteheader-login-button_5.entry.js → pn-marketweb-siteheader-login-button_4.entry.js} +9 -26
  759. package/esm/pn-marketweb-siteheader-login-button_4.entry.js.map +1 -0
  760. package/esm/pn-marketweb-siteheader-login-linklist.entry.js +4 -4
  761. package/esm/pn-marketweb-siteheader-login-linklist.entry.js.map +1 -1
  762. package/esm/pn-marketweb-siteheader-login-mypage-button.entry.js +21 -0
  763. package/esm/pn-marketweb-siteheader-login-mypage-button.entry.js.map +1 -0
  764. package/esm/{pn-marketweb-siteheader-store-91f74255.js → pn-marketweb-siteheader-store-f60eb1e4.js} +2 -2
  765. package/esm/{pn-marketweb-siteheader-store-91f74255.js.map → pn-marketweb-siteheader-store-f60eb1e4.js.map} +1 -1
  766. package/esm/pn-marketweb-siteheader.entry.js +10 -9
  767. package/esm/pn-marketweb-siteheader.entry.js.map +1 -1
  768. package/esm/pn-marketweb-table.entry.js +455 -0
  769. package/esm/pn-marketweb-table.entry.js.map +1 -0
  770. package/esm/pn-media-block.entry.js +6 -6
  771. package/esm/pn-media-block.entry.js.map +1 -1
  772. package/esm/pn-multi-row-connected-dropdown-row.entry.js +2 -2
  773. package/esm/pn-multi-row-connected-dropdown-row.entry.js.map +1 -1
  774. package/esm/pn-multi-row-connected-dropdown.entry.js +2 -2
  775. package/esm/pn-multi-row-connected-dropdown.entry.js.map +1 -1
  776. package/esm/pn-multiple-input.entry.js +1 -1
  777. package/esm/pn-parcel-tracker.entry.js +2 -2
  778. package/esm/pn-parcel-tracker.entry.js.map +1 -1
  779. package/esm/pn-pex-pricefinder.entry.js +3 -3
  780. package/esm/pn-pex-pricefinder.entry.js.map +1 -1
  781. package/esm/pn-play-on-scroll.entry.js +1 -1
  782. package/esm/pn-product-card_3.entry.js +5 -5
  783. package/esm/pn-product-card_3.entry.js.map +1 -1
  784. package/esm/pn-product-pricelist-result.entry.js +4 -4
  785. package/esm/pn-product-pricelist-result.entry.js.map +1 -1
  786. package/esm/pn-product-pricelist.entry.js +6 -6
  787. package/esm/pn-product-pricelist.entry.js.map +1 -1
  788. package/esm/pn-product-tile-info_2.entry.js +4 -4
  789. package/esm/pn-product-tile-info_2.entry.js.map +1 -1
  790. package/esm/pn-product-tile.entry.js +3 -3
  791. package/esm/pn-product-tile.entry.js.map +1 -1
  792. package/esm/pn-profile-modal-customernumber.entry.js +3 -3
  793. package/esm/pn-profile-modal-customernumber.entry.js.map +1 -1
  794. package/esm/pn-profile-modal-profile.entry.js +6 -6
  795. package/esm/pn-profile-modal-profile.entry.js.map +1 -1
  796. package/esm/{pn-profile-modal-store-4655b124.js → pn-profile-modal-store-5d651bd5.js} +2 -2
  797. package/esm/{pn-profile-modal-store-4655b124.js.map → pn-profile-modal-store-5d651bd5.js.map} +1 -1
  798. package/esm/pn-profile-modal-type.entry.js +5 -5
  799. package/esm/pn-profile-modal-type.entry.js.map +1 -1
  800. package/esm/pn-profile-modal.entry.js +5 -5
  801. package/esm/pn-profile-modal.entry.js.map +1 -1
  802. package/esm/pn-profile-selector-option.entry.js +3 -3
  803. package/esm/pn-profile-selector-option.entry.js.map +1 -1
  804. package/esm/pn-profile-selector.entry.js +3 -3
  805. package/esm/pn-profile-selector.entry.js.map +1 -1
  806. package/esm/pn-proxio-findprice-result.entry.js +3 -3
  807. package/esm/pn-proxio-findprice-result.entry.js.map +1 -1
  808. package/esm/pn-proxio-findprice.entry.js +8 -7
  809. package/esm/pn-proxio-findprice.entry.js.map +1 -1
  810. package/esm/pn-proxio-pricegroup.entry.js +5 -4
  811. package/esm/pn-proxio-pricegroup.entry.js.map +1 -1
  812. package/esm/pn-proxio-productcard_4.entry.js +8 -8
  813. package/esm/pn-proxio-productcard_4.entry.js.map +1 -1
  814. package/esm/pn-qr-code-generator.entry.js +2941 -0
  815. package/esm/pn-qr-code-generator.entry.js.map +1 -0
  816. package/esm/pn-quick-cta.entry.js +2 -2
  817. package/esm/pn-quick-cta.entry.js.map +1 -1
  818. package/esm/pn-quote-card.entry.js +2 -2
  819. package/esm/pn-quote-card.entry.js.map +1 -1
  820. package/esm/pn-scroll_2.entry.js +2 -2
  821. package/esm/pn-scroll_2.entry.js.map +1 -1
  822. package/esm/pn-search.entry.js +50 -0
  823. package/esm/pn-search.entry.js.map +1 -0
  824. package/esm/pn-share-item.entry.js +2 -2
  825. package/esm/pn-share-item.entry.js.map +1 -1
  826. package/esm/pn-share.entry.js +2 -2
  827. package/esm/pn-share.entry.js.map +1 -1
  828. package/esm/pn-sidenav-level.entry.js +5 -5
  829. package/esm/pn-sidenav-level.entry.js.map +1 -1
  830. package/esm/pn-sidenav-link.entry.js +5 -5
  831. package/esm/pn-sidenav-link.entry.js.map +1 -1
  832. package/esm/{pn-sidenav-store-85bdb1e6.js → pn-sidenav-store-e2038d79.js} +2 -2
  833. package/esm/{pn-sidenav-store-85bdb1e6.js.map → pn-sidenav-store-e2038d79.js.map} +1 -1
  834. package/esm/pn-sidenav-togglebutton.entry.js +5 -5
  835. package/esm/pn-sidenav-togglebutton.entry.js.map +1 -1
  836. package/esm/pn-sidenav.entry.js +5 -5
  837. package/esm/pn-sidenav.entry.js.map +1 -1
  838. package/esm/pn-site-footer_3.entry.js +7 -7
  839. package/esm/pn-site-footer_3.entry.js.map +1 -1
  840. package/esm/pn-spotlight.entry.js +2 -2
  841. package/esm/pn-spotlight.entry.js.map +1 -1
  842. package/esm/pn-stats-info-data.entry.js +2 -2
  843. package/esm/pn-stats-info-data.entry.js.map +1 -1
  844. package/esm/pn-stats-info.entry.js +2 -2
  845. package/esm/pn-stats-info.entry.js.map +1 -1
  846. package/esm/pn-teaser-card.entry.js +5 -9
  847. package/esm/pn-teaser-card.entry.js.map +1 -1
  848. package/esm/pn-titletag.entry.js +3 -3
  849. package/esm/pn-titletag.entry.js.map +1 -1
  850. package/esm/pn-usp-promoter.entry.js +3 -3
  851. package/esm/pn-usp-promoter.entry.js.map +1 -1
  852. package/esm/pn-usp-simple.entry.js +52 -0
  853. package/esm/pn-usp-simple.entry.js.map +1 -0
  854. package/package.json +5 -3
  855. package/pn-market-web-components/index.esm.js +1 -1
  856. package/pn-market-web-components/index.esm.js.map +1 -1
  857. package/pn-market-web-components/p-015127bf.entry.js +2 -0
  858. package/pn-market-web-components/{p-c5772021.entry.js.map → p-015127bf.entry.js.map} +1 -1
  859. package/pn-market-web-components/p-04107723.entry.js +2 -0
  860. package/pn-market-web-components/p-04107723.entry.js.map +1 -0
  861. package/pn-market-web-components/p-08b473e0.entry.js +2 -0
  862. package/pn-market-web-components/{p-a38118be.entry.js.map → p-08b473e0.entry.js.map} +1 -1
  863. package/pn-market-web-components/p-0b5a125d.entry.js +2 -0
  864. package/pn-market-web-components/p-0b5a125d.entry.js.map +1 -0
  865. package/pn-market-web-components/p-0b920554.js +2 -0
  866. package/pn-market-web-components/p-0b920554.js.map +1 -0
  867. package/pn-market-web-components/p-0fc01d3f.entry.js +2 -0
  868. package/pn-market-web-components/{p-4fa5bc85.entry.js.map → p-0fc01d3f.entry.js.map} +1 -1
  869. package/pn-market-web-components/p-10776075.entry.js +2 -0
  870. package/pn-market-web-components/p-10776075.entry.js.map +1 -0
  871. package/pn-market-web-components/p-17c43a96.entry.js +2 -0
  872. package/pn-market-web-components/p-17c43a96.entry.js.map +1 -0
  873. package/pn-market-web-components/p-19bbac6d.entry.js +2 -0
  874. package/pn-market-web-components/{p-ea3d6f7e.entry.js.map → p-19bbac6d.entry.js.map} +1 -1
  875. package/pn-market-web-components/p-230ef9aa.entry.js +2 -0
  876. package/pn-market-web-components/{p-a419cd91.entry.js.map → p-230ef9aa.entry.js.map} +1 -1
  877. package/pn-market-web-components/p-268dc1fa.entry.js +2 -0
  878. package/pn-market-web-components/p-268dc1fa.entry.js.map +1 -0
  879. package/pn-market-web-components/p-28d2f7fa.entry.js +2 -0
  880. package/pn-market-web-components/p-28d2f7fa.entry.js.map +1 -0
  881. package/pn-market-web-components/p-292db484.entry.js +2 -0
  882. package/pn-market-web-components/{p-76e6708b.entry.js.map → p-292db484.entry.js.map} +1 -1
  883. package/pn-market-web-components/p-2a58d83b.entry.js +2 -0
  884. package/pn-market-web-components/{p-55643d76.entry.js.map → p-2a58d83b.entry.js.map} +1 -1
  885. package/pn-market-web-components/p-2c19edca.entry.js +2 -0
  886. package/pn-market-web-components/{p-72dbca40.entry.js.map → p-2c19edca.entry.js.map} +1 -1
  887. package/pn-market-web-components/p-2fd60147.entry.js +2 -0
  888. package/pn-market-web-components/p-2fd60147.entry.js.map +1 -0
  889. package/pn-market-web-components/p-3478f368.js +2 -0
  890. package/pn-market-web-components/p-3478f368.js.map +1 -0
  891. package/pn-market-web-components/p-34a98554.entry.js +2 -0
  892. package/pn-market-web-components/{p-cf39491b.entry.js.map → p-34a98554.entry.js.map} +1 -1
  893. package/pn-market-web-components/p-35847eda.entry.js +2 -0
  894. package/pn-market-web-components/{p-e6e012fb.entry.js.map → p-35847eda.entry.js.map} +1 -1
  895. package/pn-market-web-components/p-366fd15a.js +2 -0
  896. package/pn-market-web-components/p-366fd15a.js.map +1 -0
  897. package/pn-market-web-components/p-389a94e7.entry.js +2 -0
  898. package/pn-market-web-components/{p-190c6938.entry.js.map → p-389a94e7.entry.js.map} +1 -1
  899. package/pn-market-web-components/p-39b75c62.entry.js +2 -0
  900. package/pn-market-web-components/{p-530274ae.entry.js.map → p-39b75c62.entry.js.map} +1 -1
  901. package/pn-market-web-components/p-3d10bc37.entry.js +2 -0
  902. package/pn-market-web-components/{p-45d1e1be.entry.js.map → p-3d10bc37.entry.js.map} +1 -1
  903. package/pn-market-web-components/p-3e197670.entry.js +2 -0
  904. package/pn-market-web-components/{p-6a5f7dee.entry.js.map → p-3e197670.entry.js.map} +1 -1
  905. package/pn-market-web-components/p-40bce1b1.entry.js +2 -0
  906. package/pn-market-web-components/p-40bce1b1.entry.js.map +1 -0
  907. package/pn-market-web-components/p-41cdac85.entry.js +2 -0
  908. package/pn-market-web-components/{p-65ab3003.entry.js.map → p-41cdac85.entry.js.map} +1 -1
  909. package/pn-market-web-components/p-4aedb76c.entry.js +2 -0
  910. package/pn-market-web-components/{p-ea7b0d21.entry.js.map → p-4aedb76c.entry.js.map} +1 -1
  911. package/pn-market-web-components/p-4e924d13.entry.js +2 -0
  912. package/pn-market-web-components/p-4e924d13.entry.js.map +1 -0
  913. package/pn-market-web-components/p-4f639380.entry.js +2 -0
  914. package/pn-market-web-components/{p-aeeabb32.entry.js.map → p-4f639380.entry.js.map} +1 -1
  915. package/pn-market-web-components/p-51f136f3.entry.js +2 -0
  916. package/pn-market-web-components/p-51f136f3.entry.js.map +1 -0
  917. package/pn-market-web-components/p-542f949d.entry.js +2 -0
  918. package/pn-market-web-components/{p-77a35f5e.entry.js.map → p-542f949d.entry.js.map} +1 -1
  919. package/pn-market-web-components/p-5a981927.entry.js +2 -0
  920. package/pn-market-web-components/{p-b35cdbac.entry.js.map → p-5a981927.entry.js.map} +1 -1
  921. package/pn-market-web-components/p-5f4ccd8a.js +2 -0
  922. package/pn-market-web-components/p-5f4ccd8a.js.map +1 -0
  923. package/pn-market-web-components/p-60b77eed.entry.js +2 -0
  924. package/pn-market-web-components/{p-e916e99d.entry.js.map → p-60b77eed.entry.js.map} +1 -1
  925. package/pn-market-web-components/p-619f2143.entry.js +2 -0
  926. package/pn-market-web-components/{p-a6866467.entry.js.map → p-619f2143.entry.js.map} +1 -1
  927. package/pn-market-web-components/p-61bd81d7.entry.js +2 -0
  928. package/pn-market-web-components/{p-8c26b98d.entry.js.map → p-61bd81d7.entry.js.map} +1 -1
  929. package/pn-market-web-components/p-64851da0.entry.js +2 -0
  930. package/pn-market-web-components/{p-776f3d51.entry.js.map → p-64851da0.entry.js.map} +1 -1
  931. package/pn-market-web-components/p-659a4db5.entry.js +2 -0
  932. package/pn-market-web-components/{p-231b97e1.entry.js.map → p-659a4db5.entry.js.map} +1 -1
  933. package/pn-market-web-components/p-65a046be.entry.js +2 -0
  934. package/pn-market-web-components/{p-0ec8d040.entry.js.map → p-65a046be.entry.js.map} +1 -1
  935. package/pn-market-web-components/p-66da6e15.entry.js +2 -0
  936. package/pn-market-web-components/{p-62cabd1e.entry.js.map → p-66da6e15.entry.js.map} +1 -1
  937. package/pn-market-web-components/{p-65f243c1.js → p-6b1d045c.js} +2 -2
  938. package/pn-market-web-components/p-6b1d045c.js.map +1 -0
  939. package/pn-market-web-components/p-71db6836.entry.js +2 -0
  940. package/pn-market-web-components/{p-3fb8e665.entry.js.map → p-71db6836.entry.js.map} +1 -1
  941. package/pn-market-web-components/p-72828265.js +2 -0
  942. package/pn-market-web-components/p-72f57a04.entry.js +2 -0
  943. package/pn-market-web-components/{p-25d53df2.entry.js.map → p-72f57a04.entry.js.map} +1 -1
  944. package/pn-market-web-components/p-763a4e13.entry.js +2 -0
  945. package/pn-market-web-components/{p-fc157a1e.entry.js.map → p-763a4e13.entry.js.map} +1 -1
  946. package/pn-market-web-components/p-76c2c01f.js +2 -0
  947. package/pn-market-web-components/p-76c2c01f.js.map +1 -0
  948. package/pn-market-web-components/{p-e09a907b.js → p-793e1339.js} +2 -2
  949. package/pn-market-web-components/p-79e4715c.entry.js +2 -0
  950. package/pn-market-web-components/{p-6647d2c4.entry.js.map → p-79e4715c.entry.js.map} +1 -1
  951. package/pn-market-web-components/p-7b4f9fdf.entry.js +2 -0
  952. package/pn-market-web-components/{p-066e9db9.entry.js.map → p-7b4f9fdf.entry.js.map} +1 -1
  953. package/pn-market-web-components/p-7b7629c5.entry.js +2 -0
  954. package/pn-market-web-components/{p-24086c59.entry.js.map → p-7b7629c5.entry.js.map} +1 -1
  955. package/pn-market-web-components/p-7db6ef34.entry.js +2 -0
  956. package/pn-market-web-components/{p-4e3059dd.entry.js.map → p-7db6ef34.entry.js.map} +1 -1
  957. package/pn-market-web-components/p-809ed802.entry.js +2 -0
  958. package/pn-market-web-components/p-809ed802.entry.js.map +1 -0
  959. package/pn-market-web-components/p-82546a44.js +3 -0
  960. package/pn-market-web-components/p-82546a44.js.map +1 -0
  961. package/pn-market-web-components/p-84fc8e05.entry.js +2 -0
  962. package/pn-market-web-components/{p-25dfc349.entry.js.map → p-84fc8e05.entry.js.map} +1 -1
  963. package/pn-market-web-components/p-85b42b44.entry.js +2 -0
  964. package/pn-market-web-components/{p-e8278e9e.entry.js.map → p-85b42b44.entry.js.map} +1 -1
  965. package/pn-market-web-components/{p-2509d18d.js → p-8836de82.js} +2 -2
  966. package/pn-market-web-components/{p-560e5291.entry.js → p-8a651698.entry.js} +2 -2
  967. package/pn-market-web-components/p-8d78b631.js +2 -0
  968. package/pn-market-web-components/p-8d78b631.js.map +1 -0
  969. package/pn-market-web-components/p-8d874454.entry.js +2 -0
  970. package/pn-market-web-components/{p-b5a0275d.entry.js.map → p-8d874454.entry.js.map} +1 -1
  971. package/pn-market-web-components/p-8d98f709.entry.js +2 -0
  972. package/pn-market-web-components/{p-74fd7435.entry.js.map → p-8d98f709.entry.js.map} +1 -1
  973. package/pn-market-web-components/p-9088d3f5.entry.js +2 -0
  974. package/pn-market-web-components/{p-a72c2729.entry.js.map → p-9088d3f5.entry.js.map} +1 -1
  975. package/pn-market-web-components/p-920ce5f2.entry.js +2 -0
  976. package/pn-market-web-components/p-920ce5f2.entry.js.map +1 -0
  977. package/pn-market-web-components/{p-959a37d9.js → p-930e2943.js} +2 -2
  978. package/pn-market-web-components/p-9454075f.entry.js +2 -0
  979. package/pn-market-web-components/{p-45b8cadb.entry.js.map → p-9454075f.entry.js.map} +1 -1
  980. package/pn-market-web-components/p-95d32ab4.entry.js +2 -0
  981. package/pn-market-web-components/{p-758f1b53.entry.js.map → p-95d32ab4.entry.js.map} +1 -1
  982. package/pn-market-web-components/p-a079c496.js +2 -0
  983. package/pn-market-web-components/p-a079c496.js.map +1 -0
  984. package/pn-market-web-components/{p-eaee1dd6.entry.js → p-a73e4811.entry.js} +2 -2
  985. package/pn-market-web-components/{p-eaee1dd6.entry.js.map → p-a73e4811.entry.js.map} +1 -1
  986. package/pn-market-web-components/p-ad282b7c.entry.js +2 -0
  987. package/pn-market-web-components/{p-4d2ca281.entry.js.map → p-ad282b7c.entry.js.map} +1 -1
  988. package/pn-market-web-components/{p-155c2049.entry.js → p-ad9a7633.entry.js} +2 -2
  989. package/pn-market-web-components/p-b9590d81.entry.js +2 -0
  990. package/pn-market-web-components/{p-59549c74.entry.js.map → p-b9590d81.entry.js.map} +1 -1
  991. package/pn-market-web-components/p-c4e353b3.entry.js +2 -0
  992. package/pn-market-web-components/{p-5a1b6e6d.entry.js.map → p-c4e353b3.entry.js.map} +1 -1
  993. package/pn-market-web-components/p-c89cb749.entry.js +2 -0
  994. package/pn-market-web-components/{p-95519556.entry.js.map → p-c89cb749.entry.js.map} +1 -1
  995. package/pn-market-web-components/p-c9038b03.entry.js +2 -0
  996. package/pn-market-web-components/{p-64d0dbba.entry.js.map → p-c9038b03.entry.js.map} +1 -1
  997. package/pn-market-web-components/p-cbb1d57d.entry.js +2 -0
  998. package/pn-market-web-components/{p-6fdd5b5a.entry.js.map → p-cbb1d57d.entry.js.map} +1 -1
  999. package/pn-market-web-components/p-cc7c596e.entry.js +2 -0
  1000. package/pn-market-web-components/p-cc7c596e.entry.js.map +1 -0
  1001. package/pn-market-web-components/p-cda742ba.entry.js +2 -0
  1002. package/pn-market-web-components/p-cda742ba.entry.js.map +1 -0
  1003. package/pn-market-web-components/p-ce87ff8a.entry.js +2 -0
  1004. package/pn-market-web-components/{p-e2e3ac2f.entry.js.map → p-ce87ff8a.entry.js.map} +1 -1
  1005. package/pn-market-web-components/p-cf8a1fb9.js +2 -0
  1006. package/pn-market-web-components/p-cf8a1fb9.js.map +1 -0
  1007. package/pn-market-web-components/p-d17af75d.entry.js +2 -0
  1008. package/pn-market-web-components/{p-b693f78a.entry.js.map → p-d17af75d.entry.js.map} +1 -1
  1009. package/pn-market-web-components/p-d5c45da2.entry.js +2 -0
  1010. package/pn-market-web-components/{p-e5ae757f.entry.js.map → p-d5c45da2.entry.js.map} +1 -1
  1011. package/pn-market-web-components/p-d7170c0e.entry.js +2 -0
  1012. package/pn-market-web-components/{p-d0a085cc.entry.js.map → p-d7170c0e.entry.js.map} +1 -1
  1013. package/pn-market-web-components/p-d75a2f7c.entry.js +2 -0
  1014. package/pn-market-web-components/p-d75a2f7c.entry.js.map +1 -0
  1015. package/pn-market-web-components/p-daa74e60.entry.js +2 -0
  1016. package/pn-market-web-components/{p-7076038b.entry.js.map → p-daa74e60.entry.js.map} +1 -1
  1017. package/pn-market-web-components/p-dc2ee6f8.entry.js +2 -0
  1018. package/pn-market-web-components/p-dc2ee6f8.entry.js.map +1 -0
  1019. package/pn-market-web-components/p-e733f44f.entry.js +2 -0
  1020. package/pn-market-web-components/p-e733f44f.entry.js.map +1 -0
  1021. package/pn-market-web-components/p-e8622338.entry.js +2 -0
  1022. package/pn-market-web-components/{p-b9505c69.entry.js.map → p-e8622338.entry.js.map} +1 -1
  1023. package/pn-market-web-components/p-eb21f772.entry.js +2 -0
  1024. package/pn-market-web-components/p-eb21f772.entry.js.map +1 -0
  1025. package/pn-market-web-components/p-efab81a9.entry.js +2 -0
  1026. package/pn-market-web-components/p-efab81a9.entry.js.map +1 -0
  1027. package/pn-market-web-components/{p-278cda98.entry.js → p-f0df7694.entry.js} +4 -4
  1028. package/pn-market-web-components/{p-278cda98.entry.js.map → p-f0df7694.entry.js.map} +1 -1
  1029. package/pn-market-web-components/p-f21311ad.entry.js +2 -0
  1030. package/pn-market-web-components/{p-545c24c0.entry.js.map → p-f21311ad.entry.js.map} +1 -1
  1031. package/pn-market-web-components/p-f28059f4.entry.js +2 -0
  1032. package/pn-market-web-components/{p-856c235c.entry.js.map → p-f28059f4.entry.js.map} +1 -1
  1033. package/pn-market-web-components/p-f28d0971.entry.js +2 -0
  1034. package/pn-market-web-components/{p-54f3a3b6.entry.js.map → p-f28d0971.entry.js.map} +1 -1
  1035. package/pn-market-web-components/p-f4b14be8.entry.js +2 -0
  1036. package/pn-market-web-components/{p-1ec21bd6.entry.js.map → p-f4b14be8.entry.js.map} +1 -1
  1037. package/pn-market-web-components/p-f5d03222.entry.js +2 -0
  1038. package/pn-market-web-components/{p-90242f18.entry.js.map → p-f5d03222.entry.js.map} +1 -1
  1039. package/pn-market-web-components/{p-8af1b914.js → p-f9083b7a.js} +2 -2
  1040. package/pn-market-web-components/{p-cafe11a9.js → p-fb4cdf98.js} +2 -2
  1041. package/pn-market-web-components/p-fe466661.js +2 -0
  1042. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  1043. package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
  1044. package/types/components/cards/pn-teaser-card/pn-teaser-card.d.ts +1 -1
  1045. package/types/components/input/pn-address-autofill/pn-address-autofill.d.ts +2 -3
  1046. package/types/components/input/pn-address-autofill/translations.d.ts +3 -0
  1047. package/types/components/input/pn-marketweb-search/pn-marketweb-search.d.ts +1 -1
  1048. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.d.ts +0 -2
  1049. package/types/components/media/pn-media-block/pn-media-block.d.ts +1 -1
  1050. package/types/components/widgets/pn-chat/pn-chat-message/pn-chat-message.d.ts +10 -0
  1051. package/types/components/widgets/pn-chat/pn-chat-message/pn-chat-message.stories.d.ts +7 -0
  1052. package/types/components/widgets/pn-chat/pn-chat-stories-constants.d.ts +164 -0
  1053. package/types/components/widgets/pn-chat/pn-chat.d.ts +72 -0
  1054. package/types/components/widgets/pn-chat/pn-chat.models.d.ts +22 -0
  1055. package/types/components/widgets/pn-chat/pn-chat.service.d.ts +26 -0
  1056. package/types/components/widgets/pn-chat/pn-chat.stories.d.ts +8 -0
  1057. package/types/components/widgets/pn-chat/translations.d.ts +77 -0
  1058. package/types/components/widgets/pn-chat/types.d.ts +68 -0
  1059. package/types/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.d.ts +23 -0
  1060. package/types/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.stories.d.ts +5 -0
  1061. package/types/components/widgets/pn-level-up/pn-level-up.d.ts +43 -0
  1062. package/types/components/widgets/pn-level-up/pn-level-up.models.d.ts +22 -0
  1063. package/types/components/widgets/pn-level-up/pn-level-up.service.d.ts +16 -0
  1064. package/types/components/widgets/pn-level-up/pn-level-up.stories.d.ts +7 -0
  1065. package/types/components/widgets/pn-level-up/types.d.ts +1 -0
  1066. package/types/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.d.ts +48 -0
  1067. package/types/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.stories.d.ts +7 -0
  1068. package/types/components/widgets/pn-marketweb-table/pn-marketweb-table.d.ts +55 -0
  1069. package/types/components/widgets/pn-marketweb-table/pn-marketweb-table.service.d.ts +11 -0
  1070. package/types/components/widgets/pn-marketweb-table/pn-marketweb-table.stories.d.ts +26 -0
  1071. package/types/components/widgets/pn-marketweb-table/translations.d.ts +72 -0
  1072. package/types/components/widgets/pn-marketweb-table/types.d.ts +38 -0
  1073. package/types/components/widgets/pn-qr-code-generator/pn-qr-code-generator.d.ts +23 -0
  1074. package/types/components/widgets/pn-qr-code-generator/pn-qr-code-generator.stories.d.ts +5 -0
  1075. package/types/components/widgets/pn-search/pn-search.d.ts +29 -0
  1076. package/types/components/widgets/pn-search/pn-search.stories.d.ts +7 -0
  1077. package/types/components/widgets/pn-usp-simple/pn-usp-simple.d.ts +19 -0
  1078. package/types/components/widgets/pn-usp-simple/pn-usp-simple.stories.d.ts +7 -0
  1079. package/types/components.d.ts +393 -8
  1080. package/types/globals/HeadingTag.d.ts +1 -1
  1081. package/types/globals/LocalStorageService.d.ts +14 -0
  1082. package/types/globals/ScreensizeDetect.d.ts +29 -0
  1083. package/types/globals/types.d.ts +18 -0
  1084. package/types/utils/utils.d.ts +1 -0
  1085. package/umd/pn-marketweb-init.js +1 -1
  1086. package/umd/pn-marketweb-salesforce.js +1 -1
  1087. package/vscode-data.json +677 -3
  1088. package/cjs/FetchHelper-e951824f.js.map +0 -1
  1089. package/cjs/index-34e1c673.js.map +0 -1
  1090. package/cjs/pn-marketweb-siteheader-login-button_5.cjs.entry.js.map +0 -1
  1091. package/components/pn-marketweb-siteheader-login-mypage-button2.js +0 -38
  1092. package/components/pn-marketweb-siteheader-login-mypage-button2.js.map +0 -1
  1093. package/esm/FetchHelper-746f2bb6.js.map +0 -1
  1094. package/esm/index-51d67461.js.map +0 -1
  1095. package/esm/pn-marketweb-siteheader-login-button_5.entry.js.map +0 -1
  1096. package/pn-market-web-components/p-066e9db9.entry.js +0 -2
  1097. package/pn-market-web-components/p-0ec8d040.entry.js +0 -2
  1098. package/pn-market-web-components/p-13190b30.js +0 -2
  1099. package/pn-market-web-components/p-190c6938.entry.js +0 -2
  1100. package/pn-market-web-components/p-1ec21bd6.entry.js +0 -2
  1101. package/pn-market-web-components/p-231b97e1.entry.js +0 -2
  1102. package/pn-market-web-components/p-23d69d70.entry.js +0 -2
  1103. package/pn-market-web-components/p-23d69d70.entry.js.map +0 -1
  1104. package/pn-market-web-components/p-24086c59.entry.js +0 -2
  1105. package/pn-market-web-components/p-25d53df2.entry.js +0 -2
  1106. package/pn-market-web-components/p-25dfc349.entry.js +0 -2
  1107. package/pn-market-web-components/p-2b03a4e1.entry.js +0 -2
  1108. package/pn-market-web-components/p-2b03a4e1.entry.js.map +0 -1
  1109. package/pn-market-web-components/p-3fb8e665.entry.js +0 -2
  1110. package/pn-market-web-components/p-45b8cadb.entry.js +0 -2
  1111. package/pn-market-web-components/p-45d1e1be.entry.js +0 -2
  1112. package/pn-market-web-components/p-4d2ca281.entry.js +0 -2
  1113. package/pn-market-web-components/p-4e3059dd.entry.js +0 -2
  1114. package/pn-market-web-components/p-4fa5bc85.entry.js +0 -2
  1115. package/pn-market-web-components/p-530274ae.entry.js +0 -2
  1116. package/pn-market-web-components/p-545c24c0.entry.js +0 -2
  1117. package/pn-market-web-components/p-54f3a3b6.entry.js +0 -2
  1118. package/pn-market-web-components/p-55643d76.entry.js +0 -2
  1119. package/pn-market-web-components/p-572c4d81.entry.js +0 -2
  1120. package/pn-market-web-components/p-572c4d81.entry.js.map +0 -1
  1121. package/pn-market-web-components/p-59549c74.entry.js +0 -2
  1122. package/pn-market-web-components/p-59cb7166.entry.js +0 -2
  1123. package/pn-market-web-components/p-59cb7166.entry.js.map +0 -1
  1124. package/pn-market-web-components/p-5a1b6e6d.entry.js +0 -2
  1125. package/pn-market-web-components/p-5d06e48f.entry.js +0 -2
  1126. package/pn-market-web-components/p-5d06e48f.entry.js.map +0 -1
  1127. package/pn-market-web-components/p-62cabd1e.entry.js +0 -2
  1128. package/pn-market-web-components/p-64d0dbba.entry.js +0 -2
  1129. package/pn-market-web-components/p-652f97b9.js +0 -2
  1130. package/pn-market-web-components/p-65ab3003.entry.js +0 -2
  1131. package/pn-market-web-components/p-65f243c1.js.map +0 -1
  1132. package/pn-market-web-components/p-6647d2c4.entry.js +0 -2
  1133. package/pn-market-web-components/p-6a5f7dee.entry.js +0 -2
  1134. package/pn-market-web-components/p-6fdd5b5a.entry.js +0 -2
  1135. package/pn-market-web-components/p-7076038b.entry.js +0 -2
  1136. package/pn-market-web-components/p-725aba56.entry.js +0 -2
  1137. package/pn-market-web-components/p-725aba56.entry.js.map +0 -1
  1138. package/pn-market-web-components/p-72dbca40.entry.js +0 -2
  1139. package/pn-market-web-components/p-74fd7435.entry.js +0 -2
  1140. package/pn-market-web-components/p-758f1b53.entry.js +0 -2
  1141. package/pn-market-web-components/p-76e6708b.entry.js +0 -2
  1142. package/pn-market-web-components/p-776f3d51.entry.js +0 -2
  1143. package/pn-market-web-components/p-77a35f5e.entry.js +0 -2
  1144. package/pn-market-web-components/p-7c3091eb.entry.js +0 -2
  1145. package/pn-market-web-components/p-7c3091eb.entry.js.map +0 -1
  1146. package/pn-market-web-components/p-856c235c.entry.js +0 -2
  1147. package/pn-market-web-components/p-8c26b98d.entry.js +0 -2
  1148. package/pn-market-web-components/p-90242f18.entry.js +0 -2
  1149. package/pn-market-web-components/p-94a69959.entry.js +0 -2
  1150. package/pn-market-web-components/p-94a69959.entry.js.map +0 -1
  1151. package/pn-market-web-components/p-95519556.entry.js +0 -2
  1152. package/pn-market-web-components/p-a38118be.entry.js +0 -2
  1153. package/pn-market-web-components/p-a419cd91.entry.js +0 -2
  1154. package/pn-market-web-components/p-a54a298b.entry.js +0 -2
  1155. package/pn-market-web-components/p-a54a298b.entry.js.map +0 -1
  1156. package/pn-market-web-components/p-a6866467.entry.js +0 -2
  1157. package/pn-market-web-components/p-a72c2729.entry.js +0 -2
  1158. package/pn-market-web-components/p-aeeabb32.entry.js +0 -2
  1159. package/pn-market-web-components/p-b35cdbac.entry.js +0 -2
  1160. package/pn-market-web-components/p-b5a0275d.entry.js +0 -2
  1161. package/pn-market-web-components/p-b693f78a.entry.js +0 -2
  1162. package/pn-market-web-components/p-b9340e9c.entry.js +0 -2
  1163. package/pn-market-web-components/p-b9340e9c.entry.js.map +0 -1
  1164. package/pn-market-web-components/p-b9505c69.entry.js +0 -2
  1165. package/pn-market-web-components/p-bb1c965e.js +0 -3
  1166. package/pn-market-web-components/p-bb1c965e.js.map +0 -1
  1167. package/pn-market-web-components/p-c5772021.entry.js +0 -2
  1168. package/pn-market-web-components/p-cf39491b.entry.js +0 -2
  1169. package/pn-market-web-components/p-d0a085cc.entry.js +0 -2
  1170. package/pn-market-web-components/p-e2e3ac2f.entry.js +0 -2
  1171. package/pn-market-web-components/p-e5ae757f.entry.js +0 -2
  1172. package/pn-market-web-components/p-e6e012fb.entry.js +0 -2
  1173. package/pn-market-web-components/p-e8278e9e.entry.js +0 -2
  1174. package/pn-market-web-components/p-e916e99d.entry.js +0 -2
  1175. package/pn-market-web-components/p-ea3d6f7e.entry.js +0 -2
  1176. package/pn-market-web-components/p-ea7b0d21.entry.js +0 -2
  1177. package/pn-market-web-components/p-fc157a1e.entry.js +0 -2
  1178. /package/pn-market-web-components/{p-652f97b9.js.map → p-72828265.js.map} +0 -0
  1179. /package/pn-market-web-components/{p-e09a907b.js.map → p-793e1339.js.map} +0 -0
  1180. /package/pn-market-web-components/{p-2509d18d.js.map → p-8836de82.js.map} +0 -0
  1181. /package/pn-market-web-components/{p-560e5291.entry.js.map → p-8a651698.entry.js.map} +0 -0
  1182. /package/pn-market-web-components/{p-959a37d9.js.map → p-930e2943.js.map} +0 -0
  1183. /package/pn-market-web-components/{p-155c2049.entry.js.map → p-ad9a7633.entry.js.map} +0 -0
  1184. /package/pn-market-web-components/{p-8af1b914.js.map → p-f9083b7a.js.map} +0 -0
  1185. /package/pn-market-web-components/{p-cafe11a9.js.map → p-fb4cdf98.js.map} +0 -0
  1186. /package/pn-market-web-components/{p-13190b30.js.map → p-fe466661.js.map} +0 -0
@@ -0,0 +1,2945 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b02670c2.js');
6
+
7
+ var browser = {};
8
+
9
+ // can-promise has a crash in some versions of react native that dont have
10
+ // standard global objects
11
+ // https://github.com/soldair/node-qrcode/issues/157
12
+
13
+ var canPromise$1 = function () {
14
+ return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
15
+ };
16
+
17
+ var qrcode = {};
18
+
19
+ var utils$1 = {};
20
+
21
+ let toSJISFunction;
22
+ const CODEWORDS_COUNT = [
23
+ 0, // Not used
24
+ 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
25
+ 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
26
+ 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
27
+ 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
28
+ ];
29
+
30
+ /**
31
+ * Returns the QR Code size for the specified version
32
+ *
33
+ * @param {Number} version QR Code version
34
+ * @return {Number} size of QR code
35
+ */
36
+ utils$1.getSymbolSize = function getSymbolSize (version) {
37
+ if (!version) throw new Error('"version" cannot be null or undefined')
38
+ if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40')
39
+ return version * 4 + 17
40
+ };
41
+
42
+ /**
43
+ * Returns the total number of codewords used to store data and EC information.
44
+ *
45
+ * @param {Number} version QR Code version
46
+ * @return {Number} Data length in bits
47
+ */
48
+ utils$1.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {
49
+ return CODEWORDS_COUNT[version]
50
+ };
51
+
52
+ /**
53
+ * Encode data with Bose-Chaudhuri-Hocquenghem
54
+ *
55
+ * @param {Number} data Value to encode
56
+ * @return {Number} Encoded value
57
+ */
58
+ utils$1.getBCHDigit = function (data) {
59
+ let digit = 0;
60
+
61
+ while (data !== 0) {
62
+ digit++;
63
+ data >>>= 1;
64
+ }
65
+
66
+ return digit
67
+ };
68
+
69
+ utils$1.setToSJISFunction = function setToSJISFunction (f) {
70
+ if (typeof f !== 'function') {
71
+ throw new Error('"toSJISFunc" is not a valid function.')
72
+ }
73
+
74
+ toSJISFunction = f;
75
+ };
76
+
77
+ utils$1.isKanjiModeEnabled = function () {
78
+ return typeof toSJISFunction !== 'undefined'
79
+ };
80
+
81
+ utils$1.toSJIS = function toSJIS (kanji) {
82
+ return toSJISFunction(kanji)
83
+ };
84
+
85
+ var errorCorrectionLevel = {};
86
+
87
+ (function (exports) {
88
+ exports.L = { bit: 1 };
89
+ exports.M = { bit: 0 };
90
+ exports.Q = { bit: 3 };
91
+ exports.H = { bit: 2 };
92
+
93
+ function fromString (string) {
94
+ if (typeof string !== 'string') {
95
+ throw new Error('Param is not a string')
96
+ }
97
+
98
+ const lcStr = string.toLowerCase();
99
+
100
+ switch (lcStr) {
101
+ case 'l':
102
+ case 'low':
103
+ return exports.L
104
+
105
+ case 'm':
106
+ case 'medium':
107
+ return exports.M
108
+
109
+ case 'q':
110
+ case 'quartile':
111
+ return exports.Q
112
+
113
+ case 'h':
114
+ case 'high':
115
+ return exports.H
116
+
117
+ default:
118
+ throw new Error('Unknown EC Level: ' + string)
119
+ }
120
+ }
121
+
122
+ exports.isValid = function isValid (level) {
123
+ return level && typeof level.bit !== 'undefined' &&
124
+ level.bit >= 0 && level.bit < 4
125
+ };
126
+
127
+ exports.from = function from (value, defaultValue) {
128
+ if (exports.isValid(value)) {
129
+ return value
130
+ }
131
+
132
+ try {
133
+ return fromString(value)
134
+ } catch (e) {
135
+ return defaultValue
136
+ }
137
+ };
138
+ }(errorCorrectionLevel));
139
+
140
+ function BitBuffer$1 () {
141
+ this.buffer = [];
142
+ this.length = 0;
143
+ }
144
+
145
+ BitBuffer$1.prototype = {
146
+
147
+ get: function (index) {
148
+ const bufIndex = Math.floor(index / 8);
149
+ return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1
150
+ },
151
+
152
+ put: function (num, length) {
153
+ for (let i = 0; i < length; i++) {
154
+ this.putBit(((num >>> (length - i - 1)) & 1) === 1);
155
+ }
156
+ },
157
+
158
+ getLengthInBits: function () {
159
+ return this.length
160
+ },
161
+
162
+ putBit: function (bit) {
163
+ const bufIndex = Math.floor(this.length / 8);
164
+ if (this.buffer.length <= bufIndex) {
165
+ this.buffer.push(0);
166
+ }
167
+
168
+ if (bit) {
169
+ this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
170
+ }
171
+
172
+ this.length++;
173
+ }
174
+ };
175
+
176
+ var bitBuffer = BitBuffer$1;
177
+
178
+ /**
179
+ * Helper class to handle QR Code symbol modules
180
+ *
181
+ * @param {Number} size Symbol size
182
+ */
183
+
184
+ function BitMatrix$1 (size) {
185
+ if (!size || size < 1) {
186
+ throw new Error('BitMatrix size must be defined and greater than 0')
187
+ }
188
+
189
+ this.size = size;
190
+ this.data = new Uint8Array(size * size);
191
+ this.reservedBit = new Uint8Array(size * size);
192
+ }
193
+
194
+ /**
195
+ * Set bit value at specified location
196
+ * If reserved flag is set, this bit will be ignored during masking process
197
+ *
198
+ * @param {Number} row
199
+ * @param {Number} col
200
+ * @param {Boolean} value
201
+ * @param {Boolean} reserved
202
+ */
203
+ BitMatrix$1.prototype.set = function (row, col, value, reserved) {
204
+ const index = row * this.size + col;
205
+ this.data[index] = value;
206
+ if (reserved) this.reservedBit[index] = true;
207
+ };
208
+
209
+ /**
210
+ * Returns bit value at specified location
211
+ *
212
+ * @param {Number} row
213
+ * @param {Number} col
214
+ * @return {Boolean}
215
+ */
216
+ BitMatrix$1.prototype.get = function (row, col) {
217
+ return this.data[row * this.size + col]
218
+ };
219
+
220
+ /**
221
+ * Applies xor operator at specified location
222
+ * (used during masking process)
223
+ *
224
+ * @param {Number} row
225
+ * @param {Number} col
226
+ * @param {Boolean} value
227
+ */
228
+ BitMatrix$1.prototype.xor = function (row, col, value) {
229
+ this.data[row * this.size + col] ^= value;
230
+ };
231
+
232
+ /**
233
+ * Check if bit at specified location is reserved
234
+ *
235
+ * @param {Number} row
236
+ * @param {Number} col
237
+ * @return {Boolean}
238
+ */
239
+ BitMatrix$1.prototype.isReserved = function (row, col) {
240
+ return this.reservedBit[row * this.size + col]
241
+ };
242
+
243
+ var bitMatrix = BitMatrix$1;
244
+
245
+ var alignmentPattern = {};
246
+
247
+ /**
248
+ * Alignment pattern are fixed reference pattern in defined positions
249
+ * in a matrix symbology, which enables the decode software to re-synchronise
250
+ * the coordinate mapping of the image modules in the event of moderate amounts
251
+ * of distortion of the image.
252
+ *
253
+ * Alignment patterns are present only in QR Code symbols of version 2 or larger
254
+ * and their number depends on the symbol version.
255
+ */
256
+
257
+ (function (exports) {
258
+ const getSymbolSize = utils$1.getSymbolSize;
259
+
260
+ /**
261
+ * Calculate the row/column coordinates of the center module of each alignment pattern
262
+ * for the specified QR Code version.
263
+ *
264
+ * The alignment patterns are positioned symmetrically on either side of the diagonal
265
+ * running from the top left corner of the symbol to the bottom right corner.
266
+ *
267
+ * Since positions are simmetrical only half of the coordinates are returned.
268
+ * Each item of the array will represent in turn the x and y coordinate.
269
+ * @see {@link getPositions}
270
+ *
271
+ * @param {Number} version QR Code version
272
+ * @return {Array} Array of coordinate
273
+ */
274
+ exports.getRowColCoords = function getRowColCoords (version) {
275
+ if (version === 1) return []
276
+
277
+ const posCount = Math.floor(version / 7) + 2;
278
+ const size = getSymbolSize(version);
279
+ const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;
280
+ const positions = [size - 7]; // Last coord is always (size - 7)
281
+
282
+ for (let i = 1; i < posCount - 1; i++) {
283
+ positions[i] = positions[i - 1] - intervals;
284
+ }
285
+
286
+ positions.push(6); // First coord is always 6
287
+
288
+ return positions.reverse()
289
+ };
290
+
291
+ /**
292
+ * Returns an array containing the positions of each alignment pattern.
293
+ * Each array's element represent the center point of the pattern as (x, y) coordinates
294
+ *
295
+ * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
296
+ * and filtering out the items that overlaps with finder pattern
297
+ *
298
+ * @example
299
+ * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
300
+ * The alignment patterns, therefore, are to be centered on (row, column)
301
+ * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
302
+ * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
303
+ * and are not therefore used for alignment patterns.
304
+ *
305
+ * let pos = getPositions(7)
306
+ * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
307
+ *
308
+ * @param {Number} version QR Code version
309
+ * @return {Array} Array of coordinates
310
+ */
311
+ exports.getPositions = function getPositions (version) {
312
+ const coords = [];
313
+ const pos = exports.getRowColCoords(version);
314
+ const posLength = pos.length;
315
+
316
+ for (let i = 0; i < posLength; i++) {
317
+ for (let j = 0; j < posLength; j++) {
318
+ // Skip if position is occupied by finder patterns
319
+ if ((i === 0 && j === 0) || // top-left
320
+ (i === 0 && j === posLength - 1) || // bottom-left
321
+ (i === posLength - 1 && j === 0)) { // top-right
322
+ continue
323
+ }
324
+
325
+ coords.push([pos[i], pos[j]]);
326
+ }
327
+ }
328
+
329
+ return coords
330
+ };
331
+ }(alignmentPattern));
332
+
333
+ var finderPattern = {};
334
+
335
+ const getSymbolSize = utils$1.getSymbolSize;
336
+ const FINDER_PATTERN_SIZE = 7;
337
+
338
+ /**
339
+ * Returns an array containing the positions of each finder pattern.
340
+ * Each array's element represent the top-left point of the pattern as (x, y) coordinates
341
+ *
342
+ * @param {Number} version QR Code version
343
+ * @return {Array} Array of coordinates
344
+ */
345
+ finderPattern.getPositions = function getPositions (version) {
346
+ const size = getSymbolSize(version);
347
+
348
+ return [
349
+ // top-left
350
+ [0, 0],
351
+ // top-right
352
+ [size - FINDER_PATTERN_SIZE, 0],
353
+ // bottom-left
354
+ [0, size - FINDER_PATTERN_SIZE]
355
+ ]
356
+ };
357
+
358
+ var maskPattern = {};
359
+
360
+ /**
361
+ * Data mask pattern reference
362
+ * @type {Object}
363
+ */
364
+
365
+ (function (exports) {
366
+ exports.Patterns = {
367
+ PATTERN000: 0,
368
+ PATTERN001: 1,
369
+ PATTERN010: 2,
370
+ PATTERN011: 3,
371
+ PATTERN100: 4,
372
+ PATTERN101: 5,
373
+ PATTERN110: 6,
374
+ PATTERN111: 7
375
+ };
376
+
377
+ /**
378
+ * Weighted penalty scores for the undesirable features
379
+ * @type {Object}
380
+ */
381
+ const PenaltyScores = {
382
+ N1: 3,
383
+ N2: 3,
384
+ N3: 40,
385
+ N4: 10
386
+ };
387
+
388
+ /**
389
+ * Check if mask pattern value is valid
390
+ *
391
+ * @param {Number} mask Mask pattern
392
+ * @return {Boolean} true if valid, false otherwise
393
+ */
394
+ exports.isValid = function isValid (mask) {
395
+ return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7
396
+ };
397
+
398
+ /**
399
+ * Returns mask pattern from a value.
400
+ * If value is not valid, returns undefined
401
+ *
402
+ * @param {Number|String} value Mask pattern value
403
+ * @return {Number} Valid mask pattern or undefined
404
+ */
405
+ exports.from = function from (value) {
406
+ return exports.isValid(value) ? parseInt(value, 10) : undefined
407
+ };
408
+
409
+ /**
410
+ * Find adjacent modules in row/column with the same color
411
+ * and assign a penalty value.
412
+ *
413
+ * Points: N1 + i
414
+ * i is the amount by which the number of adjacent modules of the same color exceeds 5
415
+ */
416
+ exports.getPenaltyN1 = function getPenaltyN1 (data) {
417
+ const size = data.size;
418
+ let points = 0;
419
+ let sameCountCol = 0;
420
+ let sameCountRow = 0;
421
+ let lastCol = null;
422
+ let lastRow = null;
423
+
424
+ for (let row = 0; row < size; row++) {
425
+ sameCountCol = sameCountRow = 0;
426
+ lastCol = lastRow = null;
427
+
428
+ for (let col = 0; col < size; col++) {
429
+ let module = data.get(row, col);
430
+ if (module === lastCol) {
431
+ sameCountCol++;
432
+ } else {
433
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
434
+ lastCol = module;
435
+ sameCountCol = 1;
436
+ }
437
+
438
+ module = data.get(col, row);
439
+ if (module === lastRow) {
440
+ sameCountRow++;
441
+ } else {
442
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
443
+ lastRow = module;
444
+ sameCountRow = 1;
445
+ }
446
+ }
447
+
448
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
449
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
450
+ }
451
+
452
+ return points
453
+ };
454
+
455
+ /**
456
+ * Find 2x2 blocks with the same color and assign a penalty value
457
+ *
458
+ * Points: N2 * (m - 1) * (n - 1)
459
+ */
460
+ exports.getPenaltyN2 = function getPenaltyN2 (data) {
461
+ const size = data.size;
462
+ let points = 0;
463
+
464
+ for (let row = 0; row < size - 1; row++) {
465
+ for (let col = 0; col < size - 1; col++) {
466
+ const last = data.get(row, col) +
467
+ data.get(row, col + 1) +
468
+ data.get(row + 1, col) +
469
+ data.get(row + 1, col + 1);
470
+
471
+ if (last === 4 || last === 0) points++;
472
+ }
473
+ }
474
+
475
+ return points * PenaltyScores.N2
476
+ };
477
+
478
+ /**
479
+ * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
480
+ * preceded or followed by light area 4 modules wide
481
+ *
482
+ * Points: N3 * number of pattern found
483
+ */
484
+ exports.getPenaltyN3 = function getPenaltyN3 (data) {
485
+ const size = data.size;
486
+ let points = 0;
487
+ let bitsCol = 0;
488
+ let bitsRow = 0;
489
+
490
+ for (let row = 0; row < size; row++) {
491
+ bitsCol = bitsRow = 0;
492
+ for (let col = 0; col < size; col++) {
493
+ bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col);
494
+ if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++;
495
+
496
+ bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row);
497
+ if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++;
498
+ }
499
+ }
500
+
501
+ return points * PenaltyScores.N3
502
+ };
503
+
504
+ /**
505
+ * Calculate proportion of dark modules in entire symbol
506
+ *
507
+ * Points: N4 * k
508
+ *
509
+ * k is the rating of the deviation of the proportion of dark modules
510
+ * in the symbol from 50% in steps of 5%
511
+ */
512
+ exports.getPenaltyN4 = function getPenaltyN4 (data) {
513
+ let darkCount = 0;
514
+ const modulesCount = data.data.length;
515
+
516
+ for (let i = 0; i < modulesCount; i++) darkCount += data.data[i];
517
+
518
+ const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10);
519
+
520
+ return k * PenaltyScores.N4
521
+ };
522
+
523
+ /**
524
+ * Return mask value at given position
525
+ *
526
+ * @param {Number} maskPattern Pattern reference value
527
+ * @param {Number} i Row
528
+ * @param {Number} j Column
529
+ * @return {Boolean} Mask value
530
+ */
531
+ function getMaskAt (maskPattern, i, j) {
532
+ switch (maskPattern) {
533
+ case exports.Patterns.PATTERN000: return (i + j) % 2 === 0
534
+ case exports.Patterns.PATTERN001: return i % 2 === 0
535
+ case exports.Patterns.PATTERN010: return j % 3 === 0
536
+ case exports.Patterns.PATTERN011: return (i + j) % 3 === 0
537
+ case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0
538
+ case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0
539
+ case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0
540
+ case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0
541
+
542
+ default: throw new Error('bad maskPattern:' + maskPattern)
543
+ }
544
+ }
545
+
546
+ /**
547
+ * Apply a mask pattern to a BitMatrix
548
+ *
549
+ * @param {Number} pattern Pattern reference number
550
+ * @param {BitMatrix} data BitMatrix data
551
+ */
552
+ exports.applyMask = function applyMask (pattern, data) {
553
+ const size = data.size;
554
+
555
+ for (let col = 0; col < size; col++) {
556
+ for (let row = 0; row < size; row++) {
557
+ if (data.isReserved(row, col)) continue
558
+ data.xor(row, col, getMaskAt(pattern, row, col));
559
+ }
560
+ }
561
+ };
562
+
563
+ /**
564
+ * Returns the best mask pattern for data
565
+ *
566
+ * @param {BitMatrix} data
567
+ * @return {Number} Mask pattern reference number
568
+ */
569
+ exports.getBestMask = function getBestMask (data, setupFormatFunc) {
570
+ const numPatterns = Object.keys(exports.Patterns).length;
571
+ let bestPattern = 0;
572
+ let lowerPenalty = Infinity;
573
+
574
+ for (let p = 0; p < numPatterns; p++) {
575
+ setupFormatFunc(p);
576
+ exports.applyMask(p, data);
577
+
578
+ // Calculate penalty
579
+ const penalty =
580
+ exports.getPenaltyN1(data) +
581
+ exports.getPenaltyN2(data) +
582
+ exports.getPenaltyN3(data) +
583
+ exports.getPenaltyN4(data);
584
+
585
+ // Undo previously applied mask
586
+ exports.applyMask(p, data);
587
+
588
+ if (penalty < lowerPenalty) {
589
+ lowerPenalty = penalty;
590
+ bestPattern = p;
591
+ }
592
+ }
593
+
594
+ return bestPattern
595
+ };
596
+ }(maskPattern));
597
+
598
+ var errorCorrectionCode = {};
599
+
600
+ const ECLevel$1 = errorCorrectionLevel;
601
+
602
+ const EC_BLOCKS_TABLE = [
603
+ // L M Q H
604
+ 1, 1, 1, 1,
605
+ 1, 1, 1, 1,
606
+ 1, 1, 2, 2,
607
+ 1, 2, 2, 4,
608
+ 1, 2, 4, 4,
609
+ 2, 4, 4, 4,
610
+ 2, 4, 6, 5,
611
+ 2, 4, 6, 6,
612
+ 2, 5, 8, 8,
613
+ 4, 5, 8, 8,
614
+ 4, 5, 8, 11,
615
+ 4, 8, 10, 11,
616
+ 4, 9, 12, 16,
617
+ 4, 9, 16, 16,
618
+ 6, 10, 12, 18,
619
+ 6, 10, 17, 16,
620
+ 6, 11, 16, 19,
621
+ 6, 13, 18, 21,
622
+ 7, 14, 21, 25,
623
+ 8, 16, 20, 25,
624
+ 8, 17, 23, 25,
625
+ 9, 17, 23, 34,
626
+ 9, 18, 25, 30,
627
+ 10, 20, 27, 32,
628
+ 12, 21, 29, 35,
629
+ 12, 23, 34, 37,
630
+ 12, 25, 34, 40,
631
+ 13, 26, 35, 42,
632
+ 14, 28, 38, 45,
633
+ 15, 29, 40, 48,
634
+ 16, 31, 43, 51,
635
+ 17, 33, 45, 54,
636
+ 18, 35, 48, 57,
637
+ 19, 37, 51, 60,
638
+ 19, 38, 53, 63,
639
+ 20, 40, 56, 66,
640
+ 21, 43, 59, 70,
641
+ 22, 45, 62, 74,
642
+ 24, 47, 65, 77,
643
+ 25, 49, 68, 81
644
+ ];
645
+
646
+ const EC_CODEWORDS_TABLE = [
647
+ // L M Q H
648
+ 7, 10, 13, 17,
649
+ 10, 16, 22, 28,
650
+ 15, 26, 36, 44,
651
+ 20, 36, 52, 64,
652
+ 26, 48, 72, 88,
653
+ 36, 64, 96, 112,
654
+ 40, 72, 108, 130,
655
+ 48, 88, 132, 156,
656
+ 60, 110, 160, 192,
657
+ 72, 130, 192, 224,
658
+ 80, 150, 224, 264,
659
+ 96, 176, 260, 308,
660
+ 104, 198, 288, 352,
661
+ 120, 216, 320, 384,
662
+ 132, 240, 360, 432,
663
+ 144, 280, 408, 480,
664
+ 168, 308, 448, 532,
665
+ 180, 338, 504, 588,
666
+ 196, 364, 546, 650,
667
+ 224, 416, 600, 700,
668
+ 224, 442, 644, 750,
669
+ 252, 476, 690, 816,
670
+ 270, 504, 750, 900,
671
+ 300, 560, 810, 960,
672
+ 312, 588, 870, 1050,
673
+ 336, 644, 952, 1110,
674
+ 360, 700, 1020, 1200,
675
+ 390, 728, 1050, 1260,
676
+ 420, 784, 1140, 1350,
677
+ 450, 812, 1200, 1440,
678
+ 480, 868, 1290, 1530,
679
+ 510, 924, 1350, 1620,
680
+ 540, 980, 1440, 1710,
681
+ 570, 1036, 1530, 1800,
682
+ 570, 1064, 1590, 1890,
683
+ 600, 1120, 1680, 1980,
684
+ 630, 1204, 1770, 2100,
685
+ 660, 1260, 1860, 2220,
686
+ 720, 1316, 1950, 2310,
687
+ 750, 1372, 2040, 2430
688
+ ];
689
+
690
+ /**
691
+ * Returns the number of error correction block that the QR Code should contain
692
+ * for the specified version and error correction level.
693
+ *
694
+ * @param {Number} version QR Code version
695
+ * @param {Number} errorCorrectionLevel Error correction level
696
+ * @return {Number} Number of error correction blocks
697
+ */
698
+ errorCorrectionCode.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {
699
+ switch (errorCorrectionLevel) {
700
+ case ECLevel$1.L:
701
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]
702
+ case ECLevel$1.M:
703
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]
704
+ case ECLevel$1.Q:
705
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]
706
+ case ECLevel$1.H:
707
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]
708
+ default:
709
+ return undefined
710
+ }
711
+ };
712
+
713
+ /**
714
+ * Returns the number of error correction codewords to use for the specified
715
+ * version and error correction level.
716
+ *
717
+ * @param {Number} version QR Code version
718
+ * @param {Number} errorCorrectionLevel Error correction level
719
+ * @return {Number} Number of error correction codewords
720
+ */
721
+ errorCorrectionCode.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {
722
+ switch (errorCorrectionLevel) {
723
+ case ECLevel$1.L:
724
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]
725
+ case ECLevel$1.M:
726
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]
727
+ case ECLevel$1.Q:
728
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]
729
+ case ECLevel$1.H:
730
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]
731
+ default:
732
+ return undefined
733
+ }
734
+ };
735
+
736
+ var polynomial = {};
737
+
738
+ var galoisField = {};
739
+
740
+ const EXP_TABLE = new Uint8Array(512);
741
+ const LOG_TABLE = new Uint8Array(256)
742
+ /**
743
+ * Precompute the log and anti-log tables for faster computation later
744
+ *
745
+ * For each possible value in the galois field 2^8, we will pre-compute
746
+ * the logarithm and anti-logarithm (exponential) of this value
747
+ *
748
+ * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
749
+ */
750
+ ;(function initTables () {
751
+ let x = 1;
752
+ for (let i = 0; i < 255; i++) {
753
+ EXP_TABLE[i] = x;
754
+ LOG_TABLE[x] = i;
755
+
756
+ x <<= 1; // multiply by 2
757
+
758
+ // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
759
+ // This means that when a number is 256 or larger, it should be XORed with 0x11D.
760
+ if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)
761
+ x ^= 0x11D;
762
+ }
763
+ }
764
+
765
+ // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
766
+ // stay inside the bounds (because we will mainly use this table for the multiplication of
767
+ // two GF numbers, no more).
768
+ // @see {@link mul}
769
+ for (let i = 255; i < 512; i++) {
770
+ EXP_TABLE[i] = EXP_TABLE[i - 255];
771
+ }
772
+ }());
773
+
774
+ /**
775
+ * Returns log value of n inside Galois Field
776
+ *
777
+ * @param {Number} n
778
+ * @return {Number}
779
+ */
780
+ galoisField.log = function log (n) {
781
+ if (n < 1) throw new Error('log(' + n + ')')
782
+ return LOG_TABLE[n]
783
+ };
784
+
785
+ /**
786
+ * Returns anti-log value of n inside Galois Field
787
+ *
788
+ * @param {Number} n
789
+ * @return {Number}
790
+ */
791
+ galoisField.exp = function exp (n) {
792
+ return EXP_TABLE[n]
793
+ };
794
+
795
+ /**
796
+ * Multiplies two number inside Galois Field
797
+ *
798
+ * @param {Number} x
799
+ * @param {Number} y
800
+ * @return {Number}
801
+ */
802
+ galoisField.mul = function mul (x, y) {
803
+ if (x === 0 || y === 0) return 0
804
+
805
+ // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
806
+ // @see {@link initTables}
807
+ return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]
808
+ };
809
+
810
+ (function (exports) {
811
+ const GF = galoisField;
812
+
813
+ /**
814
+ * Multiplies two polynomials inside Galois Field
815
+ *
816
+ * @param {Uint8Array} p1 Polynomial
817
+ * @param {Uint8Array} p2 Polynomial
818
+ * @return {Uint8Array} Product of p1 and p2
819
+ */
820
+ exports.mul = function mul (p1, p2) {
821
+ const coeff = new Uint8Array(p1.length + p2.length - 1);
822
+
823
+ for (let i = 0; i < p1.length; i++) {
824
+ for (let j = 0; j < p2.length; j++) {
825
+ coeff[i + j] ^= GF.mul(p1[i], p2[j]);
826
+ }
827
+ }
828
+
829
+ return coeff
830
+ };
831
+
832
+ /**
833
+ * Calculate the remainder of polynomials division
834
+ *
835
+ * @param {Uint8Array} divident Polynomial
836
+ * @param {Uint8Array} divisor Polynomial
837
+ * @return {Uint8Array} Remainder
838
+ */
839
+ exports.mod = function mod (divident, divisor) {
840
+ let result = new Uint8Array(divident);
841
+
842
+ while ((result.length - divisor.length) >= 0) {
843
+ const coeff = result[0];
844
+
845
+ for (let i = 0; i < divisor.length; i++) {
846
+ result[i] ^= GF.mul(divisor[i], coeff);
847
+ }
848
+
849
+ // remove all zeros from buffer head
850
+ let offset = 0;
851
+ while (offset < result.length && result[offset] === 0) offset++;
852
+ result = result.slice(offset);
853
+ }
854
+
855
+ return result
856
+ };
857
+
858
+ /**
859
+ * Generate an irreducible generator polynomial of specified degree
860
+ * (used by Reed-Solomon encoder)
861
+ *
862
+ * @param {Number} degree Degree of the generator polynomial
863
+ * @return {Uint8Array} Buffer containing polynomial coefficients
864
+ */
865
+ exports.generateECPolynomial = function generateECPolynomial (degree) {
866
+ let poly = new Uint8Array([1]);
867
+ for (let i = 0; i < degree; i++) {
868
+ poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]));
869
+ }
870
+
871
+ return poly
872
+ };
873
+ }(polynomial));
874
+
875
+ const Polynomial = polynomial;
876
+
877
+ function ReedSolomonEncoder$1 (degree) {
878
+ this.genPoly = undefined;
879
+ this.degree = degree;
880
+
881
+ if (this.degree) this.initialize(this.degree);
882
+ }
883
+
884
+ /**
885
+ * Initialize the encoder.
886
+ * The input param should correspond to the number of error correction codewords.
887
+ *
888
+ * @param {Number} degree
889
+ */
890
+ ReedSolomonEncoder$1.prototype.initialize = function initialize (degree) {
891
+ // create an irreducible generator polynomial
892
+ this.degree = degree;
893
+ this.genPoly = Polynomial.generateECPolynomial(this.degree);
894
+ };
895
+
896
+ /**
897
+ * Encodes a chunk of data
898
+ *
899
+ * @param {Uint8Array} data Buffer containing input data
900
+ * @return {Uint8Array} Buffer containing encoded data
901
+ */
902
+ ReedSolomonEncoder$1.prototype.encode = function encode (data) {
903
+ if (!this.genPoly) {
904
+ throw new Error('Encoder not initialized')
905
+ }
906
+
907
+ // Calculate EC for this data block
908
+ // extends data size to data+genPoly size
909
+ const paddedData = new Uint8Array(data.length + this.degree);
910
+ paddedData.set(data);
911
+
912
+ // The error correction codewords are the remainder after dividing the data codewords
913
+ // by a generator polynomial
914
+ const remainder = Polynomial.mod(paddedData, this.genPoly);
915
+
916
+ // return EC data blocks (last n byte, where n is the degree of genPoly)
917
+ // If coefficients number in remainder are less than genPoly degree,
918
+ // pad with 0s to the left to reach the needed number of coefficients
919
+ const start = this.degree - remainder.length;
920
+ if (start > 0) {
921
+ const buff = new Uint8Array(this.degree);
922
+ buff.set(remainder, start);
923
+
924
+ return buff
925
+ }
926
+
927
+ return remainder
928
+ };
929
+
930
+ var reedSolomonEncoder = ReedSolomonEncoder$1;
931
+
932
+ var version = {};
933
+
934
+ var mode = {};
935
+
936
+ var versionCheck = {};
937
+
938
+ /**
939
+ * Check if QR Code version is valid
940
+ *
941
+ * @param {Number} version QR Code version
942
+ * @return {Boolean} true if valid version, false otherwise
943
+ */
944
+
945
+ versionCheck.isValid = function isValid (version) {
946
+ return !isNaN(version) && version >= 1 && version <= 40
947
+ };
948
+
949
+ var regex = {};
950
+
951
+ const numeric = '[0-9]+';
952
+ const alphanumeric = '[A-Z $%*+\\-./:]+';
953
+ let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
954
+ '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
955
+ '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
956
+ '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+';
957
+ kanji = kanji.replace(/u/g, '\\u');
958
+
959
+ const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+';
960
+
961
+ regex.KANJI = new RegExp(kanji, 'g');
962
+ regex.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g');
963
+ regex.BYTE = new RegExp(byte, 'g');
964
+ regex.NUMERIC = new RegExp(numeric, 'g');
965
+ regex.ALPHANUMERIC = new RegExp(alphanumeric, 'g');
966
+
967
+ const TEST_KANJI = new RegExp('^' + kanji + '$');
968
+ const TEST_NUMERIC = new RegExp('^' + numeric + '$');
969
+ const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$');
970
+
971
+ regex.testKanji = function testKanji (str) {
972
+ return TEST_KANJI.test(str)
973
+ };
974
+
975
+ regex.testNumeric = function testNumeric (str) {
976
+ return TEST_NUMERIC.test(str)
977
+ };
978
+
979
+ regex.testAlphanumeric = function testAlphanumeric (str) {
980
+ return TEST_ALPHANUMERIC.test(str)
981
+ };
982
+
983
+ (function (exports) {
984
+ const VersionCheck = versionCheck;
985
+ const Regex = regex;
986
+
987
+ /**
988
+ * Numeric mode encodes data from the decimal digit set (0 - 9)
989
+ * (byte values 30HEX to 39HEX).
990
+ * Normally, 3 data characters are represented by 10 bits.
991
+ *
992
+ * @type {Object}
993
+ */
994
+ exports.NUMERIC = {
995
+ id: 'Numeric',
996
+ bit: 1 << 0,
997
+ ccBits: [10, 12, 14]
998
+ };
999
+
1000
+ /**
1001
+ * Alphanumeric mode encodes data from a set of 45 characters,
1002
+ * i.e. 10 numeric digits (0 - 9),
1003
+ * 26 alphabetic characters (A - Z),
1004
+ * and 9 symbols (SP, $, %, *, +, -, ., /, :).
1005
+ * Normally, two input characters are represented by 11 bits.
1006
+ *
1007
+ * @type {Object}
1008
+ */
1009
+ exports.ALPHANUMERIC = {
1010
+ id: 'Alphanumeric',
1011
+ bit: 1 << 1,
1012
+ ccBits: [9, 11, 13]
1013
+ };
1014
+
1015
+ /**
1016
+ * In byte mode, data is encoded at 8 bits per character.
1017
+ *
1018
+ * @type {Object}
1019
+ */
1020
+ exports.BYTE = {
1021
+ id: 'Byte',
1022
+ bit: 1 << 2,
1023
+ ccBits: [8, 16, 16]
1024
+ };
1025
+
1026
+ /**
1027
+ * The Kanji mode efficiently encodes Kanji characters in accordance with
1028
+ * the Shift JIS system based on JIS X 0208.
1029
+ * The Shift JIS values are shifted from the JIS X 0208 values.
1030
+ * JIS X 0208 gives details of the shift coded representation.
1031
+ * Each two-byte character value is compacted to a 13-bit binary codeword.
1032
+ *
1033
+ * @type {Object}
1034
+ */
1035
+ exports.KANJI = {
1036
+ id: 'Kanji',
1037
+ bit: 1 << 3,
1038
+ ccBits: [8, 10, 12]
1039
+ };
1040
+
1041
+ /**
1042
+ * Mixed mode will contain a sequences of data in a combination of any of
1043
+ * the modes described above
1044
+ *
1045
+ * @type {Object}
1046
+ */
1047
+ exports.MIXED = {
1048
+ bit: -1
1049
+ };
1050
+
1051
+ /**
1052
+ * Returns the number of bits needed to store the data length
1053
+ * according to QR Code specifications.
1054
+ *
1055
+ * @param {Mode} mode Data mode
1056
+ * @param {Number} version QR Code version
1057
+ * @return {Number} Number of bits
1058
+ */
1059
+ exports.getCharCountIndicator = function getCharCountIndicator (mode, version) {
1060
+ if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)
1061
+
1062
+ if (!VersionCheck.isValid(version)) {
1063
+ throw new Error('Invalid version: ' + version)
1064
+ }
1065
+
1066
+ if (version >= 1 && version < 10) return mode.ccBits[0]
1067
+ else if (version < 27) return mode.ccBits[1]
1068
+ return mode.ccBits[2]
1069
+ };
1070
+
1071
+ /**
1072
+ * Returns the most efficient mode to store the specified data
1073
+ *
1074
+ * @param {String} dataStr Input data string
1075
+ * @return {Mode} Best mode
1076
+ */
1077
+ exports.getBestModeForData = function getBestModeForData (dataStr) {
1078
+ if (Regex.testNumeric(dataStr)) return exports.NUMERIC
1079
+ else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC
1080
+ else if (Regex.testKanji(dataStr)) return exports.KANJI
1081
+ else return exports.BYTE
1082
+ };
1083
+
1084
+ /**
1085
+ * Return mode name as string
1086
+ *
1087
+ * @param {Mode} mode Mode object
1088
+ * @returns {String} Mode name
1089
+ */
1090
+ exports.toString = function toString (mode) {
1091
+ if (mode && mode.id) return mode.id
1092
+ throw new Error('Invalid mode')
1093
+ };
1094
+
1095
+ /**
1096
+ * Check if input param is a valid mode object
1097
+ *
1098
+ * @param {Mode} mode Mode object
1099
+ * @returns {Boolean} True if valid mode, false otherwise
1100
+ */
1101
+ exports.isValid = function isValid (mode) {
1102
+ return mode && mode.bit && mode.ccBits
1103
+ };
1104
+
1105
+ /**
1106
+ * Get mode object from its name
1107
+ *
1108
+ * @param {String} string Mode name
1109
+ * @returns {Mode} Mode object
1110
+ */
1111
+ function fromString (string) {
1112
+ if (typeof string !== 'string') {
1113
+ throw new Error('Param is not a string')
1114
+ }
1115
+
1116
+ const lcStr = string.toLowerCase();
1117
+
1118
+ switch (lcStr) {
1119
+ case 'numeric':
1120
+ return exports.NUMERIC
1121
+ case 'alphanumeric':
1122
+ return exports.ALPHANUMERIC
1123
+ case 'kanji':
1124
+ return exports.KANJI
1125
+ case 'byte':
1126
+ return exports.BYTE
1127
+ default:
1128
+ throw new Error('Unknown mode: ' + string)
1129
+ }
1130
+ }
1131
+
1132
+ /**
1133
+ * Returns mode from a value.
1134
+ * If value is not a valid mode, returns defaultValue
1135
+ *
1136
+ * @param {Mode|String} value Encoding mode
1137
+ * @param {Mode} defaultValue Fallback value
1138
+ * @return {Mode} Encoding mode
1139
+ */
1140
+ exports.from = function from (value, defaultValue) {
1141
+ if (exports.isValid(value)) {
1142
+ return value
1143
+ }
1144
+
1145
+ try {
1146
+ return fromString(value)
1147
+ } catch (e) {
1148
+ return defaultValue
1149
+ }
1150
+ };
1151
+ }(mode));
1152
+
1153
+ (function (exports) {
1154
+ const Utils = utils$1;
1155
+ const ECCode = errorCorrectionCode;
1156
+ const ECLevel = errorCorrectionLevel;
1157
+ const Mode = mode;
1158
+ const VersionCheck = versionCheck;
1159
+
1160
+ // Generator polynomial used to encode version information
1161
+ const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);
1162
+ const G18_BCH = Utils.getBCHDigit(G18);
1163
+
1164
+ function getBestVersionForDataLength (mode, length, errorCorrectionLevel) {
1165
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
1166
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
1167
+ return currentVersion
1168
+ }
1169
+ }
1170
+
1171
+ return undefined
1172
+ }
1173
+
1174
+ function getReservedBitsCount (mode, version) {
1175
+ // Character count indicator + mode indicator bits
1176
+ return Mode.getCharCountIndicator(mode, version) + 4
1177
+ }
1178
+
1179
+ function getTotalBitsFromDataArray (segments, version) {
1180
+ let totalBits = 0;
1181
+
1182
+ segments.forEach(function (data) {
1183
+ const reservedBits = getReservedBitsCount(data.mode, version);
1184
+ totalBits += reservedBits + data.getBitsLength();
1185
+ });
1186
+
1187
+ return totalBits
1188
+ }
1189
+
1190
+ function getBestVersionForMixedData (segments, errorCorrectionLevel) {
1191
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
1192
+ const length = getTotalBitsFromDataArray(segments, currentVersion);
1193
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {
1194
+ return currentVersion
1195
+ }
1196
+ }
1197
+
1198
+ return undefined
1199
+ }
1200
+
1201
+ /**
1202
+ * Returns version number from a value.
1203
+ * If value is not a valid version, returns defaultValue
1204
+ *
1205
+ * @param {Number|String} value QR Code version
1206
+ * @param {Number} defaultValue Fallback value
1207
+ * @return {Number} QR Code version number
1208
+ */
1209
+ exports.from = function from (value, defaultValue) {
1210
+ if (VersionCheck.isValid(value)) {
1211
+ return parseInt(value, 10)
1212
+ }
1213
+
1214
+ return defaultValue
1215
+ };
1216
+
1217
+ /**
1218
+ * Returns how much data can be stored with the specified QR code version
1219
+ * and error correction level
1220
+ *
1221
+ * @param {Number} version QR Code version (1-40)
1222
+ * @param {Number} errorCorrectionLevel Error correction level
1223
+ * @param {Mode} mode Data mode
1224
+ * @return {Number} Quantity of storable data
1225
+ */
1226
+ exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {
1227
+ if (!VersionCheck.isValid(version)) {
1228
+ throw new Error('Invalid QR Code version')
1229
+ }
1230
+
1231
+ // Use Byte mode as default
1232
+ if (typeof mode === 'undefined') mode = Mode.BYTE;
1233
+
1234
+ // Total codewords for this QR code version (Data + Error correction)
1235
+ const totalCodewords = Utils.getSymbolTotalCodewords(version);
1236
+
1237
+ // Total number of error correction codewords
1238
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
1239
+
1240
+ // Total number of data codewords
1241
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
1242
+
1243
+ if (mode === Mode.MIXED) return dataTotalCodewordsBits
1244
+
1245
+ const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version);
1246
+
1247
+ // Return max number of storable codewords
1248
+ switch (mode) {
1249
+ case Mode.NUMERIC:
1250
+ return Math.floor((usableBits / 10) * 3)
1251
+
1252
+ case Mode.ALPHANUMERIC:
1253
+ return Math.floor((usableBits / 11) * 2)
1254
+
1255
+ case Mode.KANJI:
1256
+ return Math.floor(usableBits / 13)
1257
+
1258
+ case Mode.BYTE:
1259
+ default:
1260
+ return Math.floor(usableBits / 8)
1261
+ }
1262
+ };
1263
+
1264
+ /**
1265
+ * Returns the minimum version needed to contain the amount of data
1266
+ *
1267
+ * @param {Segment} data Segment of data
1268
+ * @param {Number} [errorCorrectionLevel=H] Error correction level
1269
+ * @param {Mode} mode Data mode
1270
+ * @return {Number} QR Code version
1271
+ */
1272
+ exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {
1273
+ let seg;
1274
+
1275
+ const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M);
1276
+
1277
+ if (Array.isArray(data)) {
1278
+ if (data.length > 1) {
1279
+ return getBestVersionForMixedData(data, ecl)
1280
+ }
1281
+
1282
+ if (data.length === 0) {
1283
+ return 1
1284
+ }
1285
+
1286
+ seg = data[0];
1287
+ } else {
1288
+ seg = data;
1289
+ }
1290
+
1291
+ return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)
1292
+ };
1293
+
1294
+ /**
1295
+ * Returns version information with relative error correction bits
1296
+ *
1297
+ * The version information is included in QR Code symbols of version 7 or larger.
1298
+ * It consists of an 18-bit sequence containing 6 data bits,
1299
+ * with 12 error correction bits calculated using the (18, 6) Golay code.
1300
+ *
1301
+ * @param {Number} version QR Code version
1302
+ * @return {Number} Encoded version info bits
1303
+ */
1304
+ exports.getEncodedBits = function getEncodedBits (version) {
1305
+ if (!VersionCheck.isValid(version) || version < 7) {
1306
+ throw new Error('Invalid QR Code version')
1307
+ }
1308
+
1309
+ let d = version << 12;
1310
+
1311
+ while (Utils.getBCHDigit(d) - G18_BCH >= 0) {
1312
+ d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH));
1313
+ }
1314
+
1315
+ return (version << 12) | d
1316
+ };
1317
+ }(version));
1318
+
1319
+ var formatInfo = {};
1320
+
1321
+ const Utils$3 = utils$1;
1322
+
1323
+ const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);
1324
+ const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);
1325
+ const G15_BCH = Utils$3.getBCHDigit(G15);
1326
+
1327
+ /**
1328
+ * Returns format information with relative error correction bits
1329
+ *
1330
+ * The format information is a 15-bit sequence containing 5 data bits,
1331
+ * with 10 error correction bits calculated using the (15, 5) BCH code.
1332
+ *
1333
+ * @param {Number} errorCorrectionLevel Error correction level
1334
+ * @param {Number} mask Mask pattern
1335
+ * @return {Number} Encoded format information bits
1336
+ */
1337
+ formatInfo.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
1338
+ const data = ((errorCorrectionLevel.bit << 3) | mask);
1339
+ let d = data << 10;
1340
+
1341
+ while (Utils$3.getBCHDigit(d) - G15_BCH >= 0) {
1342
+ d ^= (G15 << (Utils$3.getBCHDigit(d) - G15_BCH));
1343
+ }
1344
+
1345
+ // xor final data with mask pattern in order to ensure that
1346
+ // no combination of Error Correction Level and data mask pattern
1347
+ // will result in an all-zero data string
1348
+ return ((data << 10) | d) ^ G15_MASK
1349
+ };
1350
+
1351
+ var segments = {};
1352
+
1353
+ const Mode$4 = mode;
1354
+
1355
+ function NumericData (data) {
1356
+ this.mode = Mode$4.NUMERIC;
1357
+ this.data = data.toString();
1358
+ }
1359
+
1360
+ NumericData.getBitsLength = function getBitsLength (length) {
1361
+ return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)
1362
+ };
1363
+
1364
+ NumericData.prototype.getLength = function getLength () {
1365
+ return this.data.length
1366
+ };
1367
+
1368
+ NumericData.prototype.getBitsLength = function getBitsLength () {
1369
+ return NumericData.getBitsLength(this.data.length)
1370
+ };
1371
+
1372
+ NumericData.prototype.write = function write (bitBuffer) {
1373
+ let i, group, value;
1374
+
1375
+ // The input data string is divided into groups of three digits,
1376
+ // and each group is converted to its 10-bit binary equivalent.
1377
+ for (i = 0; i + 3 <= this.data.length; i += 3) {
1378
+ group = this.data.substr(i, 3);
1379
+ value = parseInt(group, 10);
1380
+
1381
+ bitBuffer.put(value, 10);
1382
+ }
1383
+
1384
+ // If the number of input digits is not an exact multiple of three,
1385
+ // the final one or two digits are converted to 4 or 7 bits respectively.
1386
+ const remainingNum = this.data.length - i;
1387
+ if (remainingNum > 0) {
1388
+ group = this.data.substr(i);
1389
+ value = parseInt(group, 10);
1390
+
1391
+ bitBuffer.put(value, remainingNum * 3 + 1);
1392
+ }
1393
+ };
1394
+
1395
+ var numericData = NumericData;
1396
+
1397
+ const Mode$3 = mode;
1398
+
1399
+ /**
1400
+ * Array of characters available in alphanumeric mode
1401
+ *
1402
+ * As per QR Code specification, to each character
1403
+ * is assigned a value from 0 to 44 which in this case coincides
1404
+ * with the array index
1405
+ *
1406
+ * @type {Array}
1407
+ */
1408
+ const ALPHA_NUM_CHARS = [
1409
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
1410
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
1411
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
1412
+ ' ', '$', '%', '*', '+', '-', '.', '/', ':'
1413
+ ];
1414
+
1415
+ function AlphanumericData (data) {
1416
+ this.mode = Mode$3.ALPHANUMERIC;
1417
+ this.data = data;
1418
+ }
1419
+
1420
+ AlphanumericData.getBitsLength = function getBitsLength (length) {
1421
+ return 11 * Math.floor(length / 2) + 6 * (length % 2)
1422
+ };
1423
+
1424
+ AlphanumericData.prototype.getLength = function getLength () {
1425
+ return this.data.length
1426
+ };
1427
+
1428
+ AlphanumericData.prototype.getBitsLength = function getBitsLength () {
1429
+ return AlphanumericData.getBitsLength(this.data.length)
1430
+ };
1431
+
1432
+ AlphanumericData.prototype.write = function write (bitBuffer) {
1433
+ let i;
1434
+
1435
+ // Input data characters are divided into groups of two characters
1436
+ // and encoded as 11-bit binary codes.
1437
+ for (i = 0; i + 2 <= this.data.length; i += 2) {
1438
+ // The character value of the first character is multiplied by 45
1439
+ let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45;
1440
+
1441
+ // The character value of the second digit is added to the product
1442
+ value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]);
1443
+
1444
+ // The sum is then stored as 11-bit binary number
1445
+ bitBuffer.put(value, 11);
1446
+ }
1447
+
1448
+ // If the number of input data characters is not a multiple of two,
1449
+ // the character value of the final character is encoded as a 6-bit binary number.
1450
+ if (this.data.length % 2) {
1451
+ bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6);
1452
+ }
1453
+ };
1454
+
1455
+ var alphanumericData = AlphanumericData;
1456
+
1457
+ const Mode$2 = mode;
1458
+
1459
+ function ByteData (data) {
1460
+ this.mode = Mode$2.BYTE;
1461
+ if (typeof (data) === 'string') {
1462
+ this.data = new TextEncoder().encode(data);
1463
+ } else {
1464
+ this.data = new Uint8Array(data);
1465
+ }
1466
+ }
1467
+
1468
+ ByteData.getBitsLength = function getBitsLength (length) {
1469
+ return length * 8
1470
+ };
1471
+
1472
+ ByteData.prototype.getLength = function getLength () {
1473
+ return this.data.length
1474
+ };
1475
+
1476
+ ByteData.prototype.getBitsLength = function getBitsLength () {
1477
+ return ByteData.getBitsLength(this.data.length)
1478
+ };
1479
+
1480
+ ByteData.prototype.write = function (bitBuffer) {
1481
+ for (let i = 0, l = this.data.length; i < l; i++) {
1482
+ bitBuffer.put(this.data[i], 8);
1483
+ }
1484
+ };
1485
+
1486
+ var byteData = ByteData;
1487
+
1488
+ const Mode$1 = mode;
1489
+ const Utils$2 = utils$1;
1490
+
1491
+ function KanjiData (data) {
1492
+ this.mode = Mode$1.KANJI;
1493
+ this.data = data;
1494
+ }
1495
+
1496
+ KanjiData.getBitsLength = function getBitsLength (length) {
1497
+ return length * 13
1498
+ };
1499
+
1500
+ KanjiData.prototype.getLength = function getLength () {
1501
+ return this.data.length
1502
+ };
1503
+
1504
+ KanjiData.prototype.getBitsLength = function getBitsLength () {
1505
+ return KanjiData.getBitsLength(this.data.length)
1506
+ };
1507
+
1508
+ KanjiData.prototype.write = function (bitBuffer) {
1509
+ let i;
1510
+
1511
+ // In the Shift JIS system, Kanji characters are represented by a two byte combination.
1512
+ // These byte values are shifted from the JIS X 0208 values.
1513
+ // JIS X 0208 gives details of the shift coded representation.
1514
+ for (i = 0; i < this.data.length; i++) {
1515
+ let value = Utils$2.toSJIS(this.data[i]);
1516
+
1517
+ // For characters with Shift JIS values from 0x8140 to 0x9FFC:
1518
+ if (value >= 0x8140 && value <= 0x9FFC) {
1519
+ // Subtract 0x8140 from Shift JIS value
1520
+ value -= 0x8140;
1521
+
1522
+ // For characters with Shift JIS values from 0xE040 to 0xEBBF
1523
+ } else if (value >= 0xE040 && value <= 0xEBBF) {
1524
+ // Subtract 0xC140 from Shift JIS value
1525
+ value -= 0xC140;
1526
+ } else {
1527
+ throw new Error(
1528
+ 'Invalid SJIS character: ' + this.data[i] + '\n' +
1529
+ 'Make sure your charset is UTF-8')
1530
+ }
1531
+
1532
+ // Multiply most significant byte of result by 0xC0
1533
+ // and add least significant byte to product
1534
+ value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff);
1535
+
1536
+ // Convert result to a 13-bit binary string
1537
+ bitBuffer.put(value, 13);
1538
+ }
1539
+ };
1540
+
1541
+ var kanjiData = KanjiData;
1542
+
1543
+ var dijkstra = {exports: {}};
1544
+
1545
+ (function (module) {
1546
+
1547
+ /******************************************************************************
1548
+ * Created 2008-08-19.
1549
+ *
1550
+ * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
1551
+ *
1552
+ * Copyright (C) 2008
1553
+ * Wyatt Baldwin <self@wyattbaldwin.com>
1554
+ * All rights reserved
1555
+ *
1556
+ * Licensed under the MIT license.
1557
+ *
1558
+ * http://www.opensource.org/licenses/mit-license.php
1559
+ *
1560
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1561
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1562
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1563
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1564
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1565
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1566
+ * THE SOFTWARE.
1567
+ *****************************************************************************/
1568
+ var dijkstra = {
1569
+ single_source_shortest_paths: function(graph, s, d) {
1570
+ // Predecessor map for each node that has been encountered.
1571
+ // node ID => predecessor node ID
1572
+ var predecessors = {};
1573
+
1574
+ // Costs of shortest paths from s to all nodes encountered.
1575
+ // node ID => cost
1576
+ var costs = {};
1577
+ costs[s] = 0;
1578
+
1579
+ // Costs of shortest paths from s to all nodes encountered; differs from
1580
+ // `costs` in that it provides easy access to the node that currently has
1581
+ // the known shortest path from s.
1582
+ // XXX: Do we actually need both `costs` and `open`?
1583
+ var open = dijkstra.PriorityQueue.make();
1584
+ open.push(s, 0);
1585
+
1586
+ var closest,
1587
+ u, v,
1588
+ cost_of_s_to_u,
1589
+ adjacent_nodes,
1590
+ cost_of_e,
1591
+ cost_of_s_to_u_plus_cost_of_e,
1592
+ cost_of_s_to_v,
1593
+ first_visit;
1594
+ while (!open.empty()) {
1595
+ // In the nodes remaining in graph that have a known cost from s,
1596
+ // find the node, u, that currently has the shortest path from s.
1597
+ closest = open.pop();
1598
+ u = closest.value;
1599
+ cost_of_s_to_u = closest.cost;
1600
+
1601
+ // Get nodes adjacent to u...
1602
+ adjacent_nodes = graph[u] || {};
1603
+
1604
+ // ...and explore the edges that connect u to those nodes, updating
1605
+ // the cost of the shortest paths to any or all of those nodes as
1606
+ // necessary. v is the node across the current edge from u.
1607
+ for (v in adjacent_nodes) {
1608
+ if (adjacent_nodes.hasOwnProperty(v)) {
1609
+ // Get the cost of the edge running from u to v.
1610
+ cost_of_e = adjacent_nodes[v];
1611
+
1612
+ // Cost of s to u plus the cost of u to v across e--this is *a*
1613
+ // cost from s to v that may or may not be less than the current
1614
+ // known cost to v.
1615
+ cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
1616
+
1617
+ // If we haven't visited v yet OR if the current known cost from s to
1618
+ // v is greater than the new cost we just found (cost of s to u plus
1619
+ // cost of u to v across e), update v's cost in the cost list and
1620
+ // update v's predecessor in the predecessor list (it's now u).
1621
+ cost_of_s_to_v = costs[v];
1622
+ first_visit = (typeof costs[v] === 'undefined');
1623
+ if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
1624
+ costs[v] = cost_of_s_to_u_plus_cost_of_e;
1625
+ open.push(v, cost_of_s_to_u_plus_cost_of_e);
1626
+ predecessors[v] = u;
1627
+ }
1628
+ }
1629
+ }
1630
+ }
1631
+
1632
+ if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
1633
+ var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
1634
+ throw new Error(msg);
1635
+ }
1636
+
1637
+ return predecessors;
1638
+ },
1639
+
1640
+ extract_shortest_path_from_predecessor_list: function(predecessors, d) {
1641
+ var nodes = [];
1642
+ var u = d;
1643
+ while (u) {
1644
+ nodes.push(u);
1645
+ u = predecessors[u];
1646
+ }
1647
+ nodes.reverse();
1648
+ return nodes;
1649
+ },
1650
+
1651
+ find_path: function(graph, s, d) {
1652
+ var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
1653
+ return dijkstra.extract_shortest_path_from_predecessor_list(
1654
+ predecessors, d);
1655
+ },
1656
+
1657
+ /**
1658
+ * A very naive priority queue implementation.
1659
+ */
1660
+ PriorityQueue: {
1661
+ make: function (opts) {
1662
+ var T = dijkstra.PriorityQueue,
1663
+ t = {},
1664
+ key;
1665
+ opts = opts || {};
1666
+ for (key in T) {
1667
+ if (T.hasOwnProperty(key)) {
1668
+ t[key] = T[key];
1669
+ }
1670
+ }
1671
+ t.queue = [];
1672
+ t.sorter = opts.sorter || T.default_sorter;
1673
+ return t;
1674
+ },
1675
+
1676
+ default_sorter: function (a, b) {
1677
+ return a.cost - b.cost;
1678
+ },
1679
+
1680
+ /**
1681
+ * Add a new item to the queue and ensure the highest priority element
1682
+ * is at the front of the queue.
1683
+ */
1684
+ push: function (value, cost) {
1685
+ var item = {value: value, cost: cost};
1686
+ this.queue.push(item);
1687
+ this.queue.sort(this.sorter);
1688
+ },
1689
+
1690
+ /**
1691
+ * Return the highest priority element in the queue.
1692
+ */
1693
+ pop: function () {
1694
+ return this.queue.shift();
1695
+ },
1696
+
1697
+ empty: function () {
1698
+ return this.queue.length === 0;
1699
+ }
1700
+ }
1701
+ };
1702
+
1703
+
1704
+ // node.js module exports
1705
+ {
1706
+ module.exports = dijkstra;
1707
+ }
1708
+ }(dijkstra));
1709
+
1710
+ (function (exports) {
1711
+ const Mode = mode;
1712
+ const NumericData = numericData;
1713
+ const AlphanumericData = alphanumericData;
1714
+ const ByteData = byteData;
1715
+ const KanjiData = kanjiData;
1716
+ const Regex = regex;
1717
+ const Utils = utils$1;
1718
+ const dijkstra$1 = dijkstra.exports;
1719
+
1720
+ /**
1721
+ * Returns UTF8 byte length
1722
+ *
1723
+ * @param {String} str Input string
1724
+ * @return {Number} Number of byte
1725
+ */
1726
+ function getStringByteLength (str) {
1727
+ return unescape(encodeURIComponent(str)).length
1728
+ }
1729
+
1730
+ /**
1731
+ * Get a list of segments of the specified mode
1732
+ * from a string
1733
+ *
1734
+ * @param {Mode} mode Segment mode
1735
+ * @param {String} str String to process
1736
+ * @return {Array} Array of object with segments data
1737
+ */
1738
+ function getSegments (regex, mode, str) {
1739
+ const segments = [];
1740
+ let result;
1741
+
1742
+ while ((result = regex.exec(str)) !== null) {
1743
+ segments.push({
1744
+ data: result[0],
1745
+ index: result.index,
1746
+ mode: mode,
1747
+ length: result[0].length
1748
+ });
1749
+ }
1750
+
1751
+ return segments
1752
+ }
1753
+
1754
+ /**
1755
+ * Extracts a series of segments with the appropriate
1756
+ * modes from a string
1757
+ *
1758
+ * @param {String} dataStr Input string
1759
+ * @return {Array} Array of object with segments data
1760
+ */
1761
+ function getSegmentsFromString (dataStr) {
1762
+ const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr);
1763
+ const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr);
1764
+ let byteSegs;
1765
+ let kanjiSegs;
1766
+
1767
+ if (Utils.isKanjiModeEnabled()) {
1768
+ byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr);
1769
+ kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr);
1770
+ } else {
1771
+ byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr);
1772
+ kanjiSegs = [];
1773
+ }
1774
+
1775
+ const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs);
1776
+
1777
+ return segs
1778
+ .sort(function (s1, s2) {
1779
+ return s1.index - s2.index
1780
+ })
1781
+ .map(function (obj) {
1782
+ return {
1783
+ data: obj.data,
1784
+ mode: obj.mode,
1785
+ length: obj.length
1786
+ }
1787
+ })
1788
+ }
1789
+
1790
+ /**
1791
+ * Returns how many bits are needed to encode a string of
1792
+ * specified length with the specified mode
1793
+ *
1794
+ * @param {Number} length String length
1795
+ * @param {Mode} mode Segment mode
1796
+ * @return {Number} Bit length
1797
+ */
1798
+ function getSegmentBitsLength (length, mode) {
1799
+ switch (mode) {
1800
+ case Mode.NUMERIC:
1801
+ return NumericData.getBitsLength(length)
1802
+ case Mode.ALPHANUMERIC:
1803
+ return AlphanumericData.getBitsLength(length)
1804
+ case Mode.KANJI:
1805
+ return KanjiData.getBitsLength(length)
1806
+ case Mode.BYTE:
1807
+ return ByteData.getBitsLength(length)
1808
+ }
1809
+ }
1810
+
1811
+ /**
1812
+ * Merges adjacent segments which have the same mode
1813
+ *
1814
+ * @param {Array} segs Array of object with segments data
1815
+ * @return {Array} Array of object with segments data
1816
+ */
1817
+ function mergeSegments (segs) {
1818
+ return segs.reduce(function (acc, curr) {
1819
+ const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null;
1820
+ if (prevSeg && prevSeg.mode === curr.mode) {
1821
+ acc[acc.length - 1].data += curr.data;
1822
+ return acc
1823
+ }
1824
+
1825
+ acc.push(curr);
1826
+ return acc
1827
+ }, [])
1828
+ }
1829
+
1830
+ /**
1831
+ * Generates a list of all possible nodes combination which
1832
+ * will be used to build a segments graph.
1833
+ *
1834
+ * Nodes are divided by groups. Each group will contain a list of all the modes
1835
+ * in which is possible to encode the given text.
1836
+ *
1837
+ * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
1838
+ * The group for '12345' will contain then 3 objects, one for each
1839
+ * possible encoding mode.
1840
+ *
1841
+ * Each node represents a possible segment.
1842
+ *
1843
+ * @param {Array} segs Array of object with segments data
1844
+ * @return {Array} Array of object with segments data
1845
+ */
1846
+ function buildNodes (segs) {
1847
+ const nodes = [];
1848
+ for (let i = 0; i < segs.length; i++) {
1849
+ const seg = segs[i];
1850
+
1851
+ switch (seg.mode) {
1852
+ case Mode.NUMERIC:
1853
+ nodes.push([seg,
1854
+ { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },
1855
+ { data: seg.data, mode: Mode.BYTE, length: seg.length }
1856
+ ]);
1857
+ break
1858
+ case Mode.ALPHANUMERIC:
1859
+ nodes.push([seg,
1860
+ { data: seg.data, mode: Mode.BYTE, length: seg.length }
1861
+ ]);
1862
+ break
1863
+ case Mode.KANJI:
1864
+ nodes.push([seg,
1865
+ { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
1866
+ ]);
1867
+ break
1868
+ case Mode.BYTE:
1869
+ nodes.push([
1870
+ { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
1871
+ ]);
1872
+ }
1873
+ }
1874
+
1875
+ return nodes
1876
+ }
1877
+
1878
+ /**
1879
+ * Builds a graph from a list of nodes.
1880
+ * All segments in each node group will be connected with all the segments of
1881
+ * the next group and so on.
1882
+ *
1883
+ * At each connection will be assigned a weight depending on the
1884
+ * segment's byte length.
1885
+ *
1886
+ * @param {Array} nodes Array of object with segments data
1887
+ * @param {Number} version QR Code version
1888
+ * @return {Object} Graph of all possible segments
1889
+ */
1890
+ function buildGraph (nodes, version) {
1891
+ const table = {};
1892
+ const graph = { start: {} };
1893
+ let prevNodeIds = ['start'];
1894
+
1895
+ for (let i = 0; i < nodes.length; i++) {
1896
+ const nodeGroup = nodes[i];
1897
+ const currentNodeIds = [];
1898
+
1899
+ for (let j = 0; j < nodeGroup.length; j++) {
1900
+ const node = nodeGroup[j];
1901
+ const key = '' + i + j;
1902
+
1903
+ currentNodeIds.push(key);
1904
+ table[key] = { node: node, lastCount: 0 };
1905
+ graph[key] = {};
1906
+
1907
+ for (let n = 0; n < prevNodeIds.length; n++) {
1908
+ const prevNodeId = prevNodeIds[n];
1909
+
1910
+ if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
1911
+ graph[prevNodeId][key] =
1912
+ getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
1913
+ getSegmentBitsLength(table[prevNodeId].lastCount, node.mode);
1914
+
1915
+ table[prevNodeId].lastCount += node.length;
1916
+ } else {
1917
+ if (table[prevNodeId]) table[prevNodeId].lastCount = node.length;
1918
+
1919
+ graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
1920
+ 4 + Mode.getCharCountIndicator(node.mode, version); // switch cost
1921
+ }
1922
+ }
1923
+ }
1924
+
1925
+ prevNodeIds = currentNodeIds;
1926
+ }
1927
+
1928
+ for (let n = 0; n < prevNodeIds.length; n++) {
1929
+ graph[prevNodeIds[n]].end = 0;
1930
+ }
1931
+
1932
+ return { map: graph, table: table }
1933
+ }
1934
+
1935
+ /**
1936
+ * Builds a segment from a specified data and mode.
1937
+ * If a mode is not specified, the more suitable will be used.
1938
+ *
1939
+ * @param {String} data Input data
1940
+ * @param {Mode | String} modesHint Data mode
1941
+ * @return {Segment} Segment
1942
+ */
1943
+ function buildSingleSegment (data, modesHint) {
1944
+ let mode;
1945
+ const bestMode = Mode.getBestModeForData(data);
1946
+
1947
+ mode = Mode.from(modesHint, bestMode);
1948
+
1949
+ // Make sure data can be encoded
1950
+ if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {
1951
+ throw new Error('"' + data + '"' +
1952
+ ' cannot be encoded with mode ' + Mode.toString(mode) +
1953
+ '.\n Suggested mode is: ' + Mode.toString(bestMode))
1954
+ }
1955
+
1956
+ // Use Mode.BYTE if Kanji support is disabled
1957
+ if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {
1958
+ mode = Mode.BYTE;
1959
+ }
1960
+
1961
+ switch (mode) {
1962
+ case Mode.NUMERIC:
1963
+ return new NumericData(data)
1964
+
1965
+ case Mode.ALPHANUMERIC:
1966
+ return new AlphanumericData(data)
1967
+
1968
+ case Mode.KANJI:
1969
+ return new KanjiData(data)
1970
+
1971
+ case Mode.BYTE:
1972
+ return new ByteData(data)
1973
+ }
1974
+ }
1975
+
1976
+ /**
1977
+ * Builds a list of segments from an array.
1978
+ * Array can contain Strings or Objects with segment's info.
1979
+ *
1980
+ * For each item which is a string, will be generated a segment with the given
1981
+ * string and the more appropriate encoding mode.
1982
+ *
1983
+ * For each item which is an object, will be generated a segment with the given
1984
+ * data and mode.
1985
+ * Objects must contain at least the property "data".
1986
+ * If property "mode" is not present, the more suitable mode will be used.
1987
+ *
1988
+ * @param {Array} array Array of objects with segments data
1989
+ * @return {Array} Array of Segments
1990
+ */
1991
+ exports.fromArray = function fromArray (array) {
1992
+ return array.reduce(function (acc, seg) {
1993
+ if (typeof seg === 'string') {
1994
+ acc.push(buildSingleSegment(seg, null));
1995
+ } else if (seg.data) {
1996
+ acc.push(buildSingleSegment(seg.data, seg.mode));
1997
+ }
1998
+
1999
+ return acc
2000
+ }, [])
2001
+ };
2002
+
2003
+ /**
2004
+ * Builds an optimized sequence of segments from a string,
2005
+ * which will produce the shortest possible bitstream.
2006
+ *
2007
+ * @param {String} data Input string
2008
+ * @param {Number} version QR Code version
2009
+ * @return {Array} Array of segments
2010
+ */
2011
+ exports.fromString = function fromString (data, version) {
2012
+ const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled());
2013
+
2014
+ const nodes = buildNodes(segs);
2015
+ const graph = buildGraph(nodes, version);
2016
+ const path = dijkstra$1.find_path(graph.map, 'start', 'end');
2017
+
2018
+ const optimizedSegs = [];
2019
+ for (let i = 1; i < path.length - 1; i++) {
2020
+ optimizedSegs.push(graph.table[path[i]].node);
2021
+ }
2022
+
2023
+ return exports.fromArray(mergeSegments(optimizedSegs))
2024
+ };
2025
+
2026
+ /**
2027
+ * Splits a string in various segments with the modes which
2028
+ * best represent their content.
2029
+ * The produced segments are far from being optimized.
2030
+ * The output of this function is only used to estimate a QR Code version
2031
+ * which may contain the data.
2032
+ *
2033
+ * @param {string} data Input string
2034
+ * @return {Array} Array of segments
2035
+ */
2036
+ exports.rawSplit = function rawSplit (data) {
2037
+ return exports.fromArray(
2038
+ getSegmentsFromString(data, Utils.isKanjiModeEnabled())
2039
+ )
2040
+ };
2041
+ }(segments));
2042
+
2043
+ const Utils$1 = utils$1;
2044
+ const ECLevel = errorCorrectionLevel;
2045
+ const BitBuffer = bitBuffer;
2046
+ const BitMatrix = bitMatrix;
2047
+ const AlignmentPattern = alignmentPattern;
2048
+ const FinderPattern = finderPattern;
2049
+ const MaskPattern = maskPattern;
2050
+ const ECCode = errorCorrectionCode;
2051
+ const ReedSolomonEncoder = reedSolomonEncoder;
2052
+ const Version = version;
2053
+ const FormatInfo = formatInfo;
2054
+ const Mode = mode;
2055
+ const Segments = segments;
2056
+
2057
+ /**
2058
+ * QRCode for JavaScript
2059
+ *
2060
+ * modified by Ryan Day for nodejs support
2061
+ * Copyright (c) 2011 Ryan Day
2062
+ *
2063
+ * Licensed under the MIT license:
2064
+ * http://www.opensource.org/licenses/mit-license.php
2065
+ *
2066
+ //---------------------------------------------------------------------
2067
+ // QRCode for JavaScript
2068
+ //
2069
+ // Copyright (c) 2009 Kazuhiko Arase
2070
+ //
2071
+ // URL: http://www.d-project.com/
2072
+ //
2073
+ // Licensed under the MIT license:
2074
+ // http://www.opensource.org/licenses/mit-license.php
2075
+ //
2076
+ // The word "QR Code" is registered trademark of
2077
+ // DENSO WAVE INCORPORATED
2078
+ // http://www.denso-wave.com/qrcode/faqpatent-e.html
2079
+ //
2080
+ //---------------------------------------------------------------------
2081
+ */
2082
+
2083
+ /**
2084
+ * Add finder patterns bits to matrix
2085
+ *
2086
+ * @param {BitMatrix} matrix Modules matrix
2087
+ * @param {Number} version QR Code version
2088
+ */
2089
+ function setupFinderPattern (matrix, version) {
2090
+ const size = matrix.size;
2091
+ const pos = FinderPattern.getPositions(version);
2092
+
2093
+ for (let i = 0; i < pos.length; i++) {
2094
+ const row = pos[i][0];
2095
+ const col = pos[i][1];
2096
+
2097
+ for (let r = -1; r <= 7; r++) {
2098
+ if (row + r <= -1 || size <= row + r) continue
2099
+
2100
+ for (let c = -1; c <= 7; c++) {
2101
+ if (col + c <= -1 || size <= col + c) continue
2102
+
2103
+ if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
2104
+ (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
2105
+ (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
2106
+ matrix.set(row + r, col + c, true, true);
2107
+ } else {
2108
+ matrix.set(row + r, col + c, false, true);
2109
+ }
2110
+ }
2111
+ }
2112
+ }
2113
+ }
2114
+
2115
+ /**
2116
+ * Add timing pattern bits to matrix
2117
+ *
2118
+ * Note: this function must be called before {@link setupAlignmentPattern}
2119
+ *
2120
+ * @param {BitMatrix} matrix Modules matrix
2121
+ */
2122
+ function setupTimingPattern (matrix) {
2123
+ const size = matrix.size;
2124
+
2125
+ for (let r = 8; r < size - 8; r++) {
2126
+ const value = r % 2 === 0;
2127
+ matrix.set(r, 6, value, true);
2128
+ matrix.set(6, r, value, true);
2129
+ }
2130
+ }
2131
+
2132
+ /**
2133
+ * Add alignment patterns bits to matrix
2134
+ *
2135
+ * Note: this function must be called after {@link setupTimingPattern}
2136
+ *
2137
+ * @param {BitMatrix} matrix Modules matrix
2138
+ * @param {Number} version QR Code version
2139
+ */
2140
+ function setupAlignmentPattern (matrix, version) {
2141
+ const pos = AlignmentPattern.getPositions(version);
2142
+
2143
+ for (let i = 0; i < pos.length; i++) {
2144
+ const row = pos[i][0];
2145
+ const col = pos[i][1];
2146
+
2147
+ for (let r = -2; r <= 2; r++) {
2148
+ for (let c = -2; c <= 2; c++) {
2149
+ if (r === -2 || r === 2 || c === -2 || c === 2 ||
2150
+ (r === 0 && c === 0)) {
2151
+ matrix.set(row + r, col + c, true, true);
2152
+ } else {
2153
+ matrix.set(row + r, col + c, false, true);
2154
+ }
2155
+ }
2156
+ }
2157
+ }
2158
+ }
2159
+
2160
+ /**
2161
+ * Add version info bits to matrix
2162
+ *
2163
+ * @param {BitMatrix} matrix Modules matrix
2164
+ * @param {Number} version QR Code version
2165
+ */
2166
+ function setupVersionInfo (matrix, version) {
2167
+ const size = matrix.size;
2168
+ const bits = Version.getEncodedBits(version);
2169
+ let row, col, mod;
2170
+
2171
+ for (let i = 0; i < 18; i++) {
2172
+ row = Math.floor(i / 3);
2173
+ col = i % 3 + size - 8 - 3;
2174
+ mod = ((bits >> i) & 1) === 1;
2175
+
2176
+ matrix.set(row, col, mod, true);
2177
+ matrix.set(col, row, mod, true);
2178
+ }
2179
+ }
2180
+
2181
+ /**
2182
+ * Add format info bits to matrix
2183
+ *
2184
+ * @param {BitMatrix} matrix Modules matrix
2185
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
2186
+ * @param {Number} maskPattern Mask pattern reference value
2187
+ */
2188
+ function setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {
2189
+ const size = matrix.size;
2190
+ const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern);
2191
+ let i, mod;
2192
+
2193
+ for (i = 0; i < 15; i++) {
2194
+ mod = ((bits >> i) & 1) === 1;
2195
+
2196
+ // vertical
2197
+ if (i < 6) {
2198
+ matrix.set(i, 8, mod, true);
2199
+ } else if (i < 8) {
2200
+ matrix.set(i + 1, 8, mod, true);
2201
+ } else {
2202
+ matrix.set(size - 15 + i, 8, mod, true);
2203
+ }
2204
+
2205
+ // horizontal
2206
+ if (i < 8) {
2207
+ matrix.set(8, size - i - 1, mod, true);
2208
+ } else if (i < 9) {
2209
+ matrix.set(8, 15 - i - 1 + 1, mod, true);
2210
+ } else {
2211
+ matrix.set(8, 15 - i - 1, mod, true);
2212
+ }
2213
+ }
2214
+
2215
+ // fixed module
2216
+ matrix.set(size - 8, 8, 1, true);
2217
+ }
2218
+
2219
+ /**
2220
+ * Add encoded data bits to matrix
2221
+ *
2222
+ * @param {BitMatrix} matrix Modules matrix
2223
+ * @param {Uint8Array} data Data codewords
2224
+ */
2225
+ function setupData (matrix, data) {
2226
+ const size = matrix.size;
2227
+ let inc = -1;
2228
+ let row = size - 1;
2229
+ let bitIndex = 7;
2230
+ let byteIndex = 0;
2231
+
2232
+ for (let col = size - 1; col > 0; col -= 2) {
2233
+ if (col === 6) col--;
2234
+
2235
+ while (true) {
2236
+ for (let c = 0; c < 2; c++) {
2237
+ if (!matrix.isReserved(row, col - c)) {
2238
+ let dark = false;
2239
+
2240
+ if (byteIndex < data.length) {
2241
+ dark = (((data[byteIndex] >>> bitIndex) & 1) === 1);
2242
+ }
2243
+
2244
+ matrix.set(row, col - c, dark);
2245
+ bitIndex--;
2246
+
2247
+ if (bitIndex === -1) {
2248
+ byteIndex++;
2249
+ bitIndex = 7;
2250
+ }
2251
+ }
2252
+ }
2253
+
2254
+ row += inc;
2255
+
2256
+ if (row < 0 || size <= row) {
2257
+ row -= inc;
2258
+ inc = -inc;
2259
+ break
2260
+ }
2261
+ }
2262
+ }
2263
+ }
2264
+
2265
+ /**
2266
+ * Create encoded codewords from data input
2267
+ *
2268
+ * @param {Number} version QR Code version
2269
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
2270
+ * @param {ByteData} data Data input
2271
+ * @return {Uint8Array} Buffer containing encoded codewords
2272
+ */
2273
+ function createData (version, errorCorrectionLevel, segments) {
2274
+ // Prepare data buffer
2275
+ const buffer = new BitBuffer();
2276
+
2277
+ segments.forEach(function (data) {
2278
+ // prefix data with mode indicator (4 bits)
2279
+ buffer.put(data.mode.bit, 4);
2280
+
2281
+ // Prefix data with character count indicator.
2282
+ // The character count indicator is a string of bits that represents the
2283
+ // number of characters that are being encoded.
2284
+ // The character count indicator must be placed after the mode indicator
2285
+ // and must be a certain number of bits long, depending on the QR version
2286
+ // and data mode
2287
+ // @see {@link Mode.getCharCountIndicator}.
2288
+ buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version));
2289
+
2290
+ // add binary data sequence to buffer
2291
+ data.write(buffer);
2292
+ });
2293
+
2294
+ // Calculate required number of bits
2295
+ const totalCodewords = Utils$1.getSymbolTotalCodewords(version);
2296
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
2297
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
2298
+
2299
+ // Add a terminator.
2300
+ // If the bit string is shorter than the total number of required bits,
2301
+ // a terminator of up to four 0s must be added to the right side of the string.
2302
+ // If the bit string is more than four bits shorter than the required number of bits,
2303
+ // add four 0s to the end.
2304
+ if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
2305
+ buffer.put(0, 4);
2306
+ }
2307
+
2308
+ // If the bit string is fewer than four bits shorter, add only the number of 0s that
2309
+ // are needed to reach the required number of bits.
2310
+
2311
+ // After adding the terminator, if the number of bits in the string is not a multiple of 8,
2312
+ // pad the string on the right with 0s to make the string's length a multiple of 8.
2313
+ while (buffer.getLengthInBits() % 8 !== 0) {
2314
+ buffer.putBit(0);
2315
+ }
2316
+
2317
+ // Add pad bytes if the string is still shorter than the total number of required bits.
2318
+ // Extend the buffer to fill the data capacity of the symbol corresponding to
2319
+ // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
2320
+ // and 00010001 (0x11) alternately.
2321
+ const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8;
2322
+ for (let i = 0; i < remainingByte; i++) {
2323
+ buffer.put(i % 2 ? 0x11 : 0xEC, 8);
2324
+ }
2325
+
2326
+ return createCodewords(buffer, version, errorCorrectionLevel)
2327
+ }
2328
+
2329
+ /**
2330
+ * Encode input data with Reed-Solomon and return codewords with
2331
+ * relative error correction bits
2332
+ *
2333
+ * @param {BitBuffer} bitBuffer Data to encode
2334
+ * @param {Number} version QR Code version
2335
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
2336
+ * @return {Uint8Array} Buffer containing encoded codewords
2337
+ */
2338
+ function createCodewords (bitBuffer, version, errorCorrectionLevel) {
2339
+ // Total codewords for this QR code version (Data + Error correction)
2340
+ const totalCodewords = Utils$1.getSymbolTotalCodewords(version);
2341
+
2342
+ // Total number of error correction codewords
2343
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
2344
+
2345
+ // Total number of data codewords
2346
+ const dataTotalCodewords = totalCodewords - ecTotalCodewords;
2347
+
2348
+ // Total number of blocks
2349
+ const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel);
2350
+
2351
+ // Calculate how many blocks each group should contain
2352
+ const blocksInGroup2 = totalCodewords % ecTotalBlocks;
2353
+ const blocksInGroup1 = ecTotalBlocks - blocksInGroup2;
2354
+
2355
+ const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks);
2356
+
2357
+ const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks);
2358
+ const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1;
2359
+
2360
+ // Number of EC codewords is the same for both groups
2361
+ const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1;
2362
+
2363
+ // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
2364
+ const rs = new ReedSolomonEncoder(ecCount);
2365
+
2366
+ let offset = 0;
2367
+ const dcData = new Array(ecTotalBlocks);
2368
+ const ecData = new Array(ecTotalBlocks);
2369
+ let maxDataSize = 0;
2370
+ const buffer = new Uint8Array(bitBuffer.buffer);
2371
+
2372
+ // Divide the buffer into the required number of blocks
2373
+ for (let b = 0; b < ecTotalBlocks; b++) {
2374
+ const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2;
2375
+
2376
+ // extract a block of data from buffer
2377
+ dcData[b] = buffer.slice(offset, offset + dataSize);
2378
+
2379
+ // Calculate EC codewords for this data block
2380
+ ecData[b] = rs.encode(dcData[b]);
2381
+
2382
+ offset += dataSize;
2383
+ maxDataSize = Math.max(maxDataSize, dataSize);
2384
+ }
2385
+
2386
+ // Create final data
2387
+ // Interleave the data and error correction codewords from each block
2388
+ const data = new Uint8Array(totalCodewords);
2389
+ let index = 0;
2390
+ let i, r;
2391
+
2392
+ // Add data codewords
2393
+ for (i = 0; i < maxDataSize; i++) {
2394
+ for (r = 0; r < ecTotalBlocks; r++) {
2395
+ if (i < dcData[r].length) {
2396
+ data[index++] = dcData[r][i];
2397
+ }
2398
+ }
2399
+ }
2400
+
2401
+ // Apped EC codewords
2402
+ for (i = 0; i < ecCount; i++) {
2403
+ for (r = 0; r < ecTotalBlocks; r++) {
2404
+ data[index++] = ecData[r][i];
2405
+ }
2406
+ }
2407
+
2408
+ return data
2409
+ }
2410
+
2411
+ /**
2412
+ * Build QR Code symbol
2413
+ *
2414
+ * @param {String} data Input string
2415
+ * @param {Number} version QR Code version
2416
+ * @param {ErrorCorretionLevel} errorCorrectionLevel Error level
2417
+ * @param {MaskPattern} maskPattern Mask pattern
2418
+ * @return {Object} Object containing symbol data
2419
+ */
2420
+ function createSymbol (data, version, errorCorrectionLevel, maskPattern) {
2421
+ let segments;
2422
+
2423
+ if (Array.isArray(data)) {
2424
+ segments = Segments.fromArray(data);
2425
+ } else if (typeof data === 'string') {
2426
+ let estimatedVersion = version;
2427
+
2428
+ if (!estimatedVersion) {
2429
+ const rawSegments = Segments.rawSplit(data);
2430
+
2431
+ // Estimate best version that can contain raw splitted segments
2432
+ estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel);
2433
+ }
2434
+
2435
+ // Build optimized segments
2436
+ // If estimated version is undefined, try with the highest version
2437
+ segments = Segments.fromString(data, estimatedVersion || 40);
2438
+ } else {
2439
+ throw new Error('Invalid data')
2440
+ }
2441
+
2442
+ // Get the min version that can contain data
2443
+ const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel);
2444
+
2445
+ // If no version is found, data cannot be stored
2446
+ if (!bestVersion) {
2447
+ throw new Error('The amount of data is too big to be stored in a QR Code')
2448
+ }
2449
+
2450
+ // If not specified, use min version as default
2451
+ if (!version) {
2452
+ version = bestVersion;
2453
+
2454
+ // Check if the specified version can contain the data
2455
+ } else if (version < bestVersion) {
2456
+ throw new Error('\n' +
2457
+ 'The chosen QR Code version cannot contain this amount of data.\n' +
2458
+ 'Minimum version required to store current data is: ' + bestVersion + '.\n'
2459
+ )
2460
+ }
2461
+
2462
+ const dataBits = createData(version, errorCorrectionLevel, segments);
2463
+
2464
+ // Allocate matrix buffer
2465
+ const moduleCount = Utils$1.getSymbolSize(version);
2466
+ const modules = new BitMatrix(moduleCount);
2467
+
2468
+ // Add function modules
2469
+ setupFinderPattern(modules, version);
2470
+ setupTimingPattern(modules);
2471
+ setupAlignmentPattern(modules, version);
2472
+
2473
+ // Add temporary dummy bits for format info just to set them as reserved.
2474
+ // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
2475
+ // since the masking operation must be performed only on the encoding region.
2476
+ // These blocks will be replaced with correct values later in code.
2477
+ setupFormatInfo(modules, errorCorrectionLevel, 0);
2478
+
2479
+ if (version >= 7) {
2480
+ setupVersionInfo(modules, version);
2481
+ }
2482
+
2483
+ // Add data codewords
2484
+ setupData(modules, dataBits);
2485
+
2486
+ if (isNaN(maskPattern)) {
2487
+ // Find best mask pattern
2488
+ maskPattern = MaskPattern.getBestMask(modules,
2489
+ setupFormatInfo.bind(null, modules, errorCorrectionLevel));
2490
+ }
2491
+
2492
+ // Apply mask pattern
2493
+ MaskPattern.applyMask(maskPattern, modules);
2494
+
2495
+ // Replace format info bits with correct values
2496
+ setupFormatInfo(modules, errorCorrectionLevel, maskPattern);
2497
+
2498
+ return {
2499
+ modules: modules,
2500
+ version: version,
2501
+ errorCorrectionLevel: errorCorrectionLevel,
2502
+ maskPattern: maskPattern,
2503
+ segments: segments
2504
+ }
2505
+ }
2506
+
2507
+ /**
2508
+ * QR Code
2509
+ *
2510
+ * @param {String | Array} data Input data
2511
+ * @param {Object} options Optional configurations
2512
+ * @param {Number} options.version QR Code version
2513
+ * @param {String} options.errorCorrectionLevel Error correction level
2514
+ * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis
2515
+ */
2516
+ qrcode.create = function create (data, options) {
2517
+ if (typeof data === 'undefined' || data === '') {
2518
+ throw new Error('No input text')
2519
+ }
2520
+
2521
+ let errorCorrectionLevel = ECLevel.M;
2522
+ let version;
2523
+ let mask;
2524
+
2525
+ if (typeof options !== 'undefined') {
2526
+ // Use higher error correction level as default
2527
+ errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M);
2528
+ version = Version.from(options.version);
2529
+ mask = MaskPattern.from(options.maskPattern);
2530
+
2531
+ if (options.toSJISFunc) {
2532
+ Utils$1.setToSJISFunction(options.toSJISFunc);
2533
+ }
2534
+ }
2535
+
2536
+ return createSymbol(data, version, errorCorrectionLevel, mask)
2537
+ };
2538
+
2539
+ var canvas = {};
2540
+
2541
+ var utils = {};
2542
+
2543
+ (function (exports) {
2544
+ function hex2rgba (hex) {
2545
+ if (typeof hex === 'number') {
2546
+ hex = hex.toString();
2547
+ }
2548
+
2549
+ if (typeof hex !== 'string') {
2550
+ throw new Error('Color should be defined as hex string')
2551
+ }
2552
+
2553
+ let hexCode = hex.slice().replace('#', '').split('');
2554
+ if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
2555
+ throw new Error('Invalid hex color: ' + hex)
2556
+ }
2557
+
2558
+ // Convert from short to long form (fff -> ffffff)
2559
+ if (hexCode.length === 3 || hexCode.length === 4) {
2560
+ hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
2561
+ return [c, c]
2562
+ }));
2563
+ }
2564
+
2565
+ // Add default alpha value
2566
+ if (hexCode.length === 6) hexCode.push('F', 'F');
2567
+
2568
+ const hexValue = parseInt(hexCode.join(''), 16);
2569
+
2570
+ return {
2571
+ r: (hexValue >> 24) & 255,
2572
+ g: (hexValue >> 16) & 255,
2573
+ b: (hexValue >> 8) & 255,
2574
+ a: hexValue & 255,
2575
+ hex: '#' + hexCode.slice(0, 6).join('')
2576
+ }
2577
+ }
2578
+
2579
+ exports.getOptions = function getOptions (options) {
2580
+ if (!options) options = {};
2581
+ if (!options.color) options.color = {};
2582
+
2583
+ const margin = typeof options.margin === 'undefined' ||
2584
+ options.margin === null ||
2585
+ options.margin < 0
2586
+ ? 4
2587
+ : options.margin;
2588
+
2589
+ const width = options.width && options.width >= 21 ? options.width : undefined;
2590
+ const scale = options.scale || 4;
2591
+
2592
+ return {
2593
+ width: width,
2594
+ scale: width ? 4 : scale,
2595
+ margin: margin,
2596
+ color: {
2597
+ dark: hex2rgba(options.color.dark || '#000000ff'),
2598
+ light: hex2rgba(options.color.light || '#ffffffff')
2599
+ },
2600
+ type: options.type,
2601
+ rendererOpts: options.rendererOpts || {}
2602
+ }
2603
+ };
2604
+
2605
+ exports.getScale = function getScale (qrSize, opts) {
2606
+ return opts.width && opts.width >= qrSize + opts.margin * 2
2607
+ ? opts.width / (qrSize + opts.margin * 2)
2608
+ : opts.scale
2609
+ };
2610
+
2611
+ exports.getImageWidth = function getImageWidth (qrSize, opts) {
2612
+ const scale = exports.getScale(qrSize, opts);
2613
+ return Math.floor((qrSize + opts.margin * 2) * scale)
2614
+ };
2615
+
2616
+ exports.qrToImageData = function qrToImageData (imgData, qr, opts) {
2617
+ const size = qr.modules.size;
2618
+ const data = qr.modules.data;
2619
+ const scale = exports.getScale(size, opts);
2620
+ const symbolSize = Math.floor((size + opts.margin * 2) * scale);
2621
+ const scaledMargin = opts.margin * scale;
2622
+ const palette = [opts.color.light, opts.color.dark];
2623
+
2624
+ for (let i = 0; i < symbolSize; i++) {
2625
+ for (let j = 0; j < symbolSize; j++) {
2626
+ let posDst = (i * symbolSize + j) * 4;
2627
+ let pxColor = opts.color.light;
2628
+
2629
+ if (i >= scaledMargin && j >= scaledMargin &&
2630
+ i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
2631
+ const iSrc = Math.floor((i - scaledMargin) / scale);
2632
+ const jSrc = Math.floor((j - scaledMargin) / scale);
2633
+ pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0];
2634
+ }
2635
+
2636
+ imgData[posDst++] = pxColor.r;
2637
+ imgData[posDst++] = pxColor.g;
2638
+ imgData[posDst++] = pxColor.b;
2639
+ imgData[posDst] = pxColor.a;
2640
+ }
2641
+ }
2642
+ };
2643
+ }(utils));
2644
+
2645
+ (function (exports) {
2646
+ const Utils = utils;
2647
+
2648
+ function clearCanvas (ctx, canvas, size) {
2649
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
2650
+
2651
+ if (!canvas.style) canvas.style = {};
2652
+ canvas.height = size;
2653
+ canvas.width = size;
2654
+ canvas.style.height = size + 'px';
2655
+ canvas.style.width = size + 'px';
2656
+ }
2657
+
2658
+ function getCanvasElement () {
2659
+ try {
2660
+ return document.createElement('canvas')
2661
+ } catch (e) {
2662
+ throw new Error('You need to specify a canvas element')
2663
+ }
2664
+ }
2665
+
2666
+ exports.render = function render (qrData, canvas, options) {
2667
+ let opts = options;
2668
+ let canvasEl = canvas;
2669
+
2670
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
2671
+ opts = canvas;
2672
+ canvas = undefined;
2673
+ }
2674
+
2675
+ if (!canvas) {
2676
+ canvasEl = getCanvasElement();
2677
+ }
2678
+
2679
+ opts = Utils.getOptions(opts);
2680
+ const size = Utils.getImageWidth(qrData.modules.size, opts);
2681
+
2682
+ const ctx = canvasEl.getContext('2d');
2683
+ const image = ctx.createImageData(size, size);
2684
+ Utils.qrToImageData(image.data, qrData, opts);
2685
+
2686
+ clearCanvas(ctx, canvasEl, size);
2687
+ ctx.putImageData(image, 0, 0);
2688
+
2689
+ return canvasEl
2690
+ };
2691
+
2692
+ exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
2693
+ let opts = options;
2694
+
2695
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
2696
+ opts = canvas;
2697
+ canvas = undefined;
2698
+ }
2699
+
2700
+ if (!opts) opts = {};
2701
+
2702
+ const canvasEl = exports.render(qrData, canvas, opts);
2703
+
2704
+ const type = opts.type || 'image/png';
2705
+ const rendererOpts = opts.rendererOpts || {};
2706
+
2707
+ return canvasEl.toDataURL(type, rendererOpts.quality)
2708
+ };
2709
+ }(canvas));
2710
+
2711
+ var svgTag = {};
2712
+
2713
+ const Utils = utils;
2714
+
2715
+ function getColorAttrib (color, attrib) {
2716
+ const alpha = color.a / 255;
2717
+ const str = attrib + '="' + color.hex + '"';
2718
+
2719
+ return alpha < 1
2720
+ ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
2721
+ : str
2722
+ }
2723
+
2724
+ function svgCmd (cmd, x, y) {
2725
+ let str = cmd + x;
2726
+ if (typeof y !== 'undefined') str += ' ' + y;
2727
+
2728
+ return str
2729
+ }
2730
+
2731
+ function qrToPath (data, size, margin) {
2732
+ let path = '';
2733
+ let moveBy = 0;
2734
+ let newRow = false;
2735
+ let lineLength = 0;
2736
+
2737
+ for (let i = 0; i < data.length; i++) {
2738
+ const col = Math.floor(i % size);
2739
+ const row = Math.floor(i / size);
2740
+
2741
+ if (!col && !newRow) newRow = true;
2742
+
2743
+ if (data[i]) {
2744
+ lineLength++;
2745
+
2746
+ if (!(i > 0 && col > 0 && data[i - 1])) {
2747
+ path += newRow
2748
+ ? svgCmd('M', col + margin, 0.5 + row + margin)
2749
+ : svgCmd('m', moveBy, 0);
2750
+
2751
+ moveBy = 0;
2752
+ newRow = false;
2753
+ }
2754
+
2755
+ if (!(col + 1 < size && data[i + 1])) {
2756
+ path += svgCmd('h', lineLength);
2757
+ lineLength = 0;
2758
+ }
2759
+ } else {
2760
+ moveBy++;
2761
+ }
2762
+ }
2763
+
2764
+ return path
2765
+ }
2766
+
2767
+ svgTag.render = function render (qrData, options, cb) {
2768
+ const opts = Utils.getOptions(options);
2769
+ const size = qrData.modules.size;
2770
+ const data = qrData.modules.data;
2771
+ const qrcodesize = size + opts.margin * 2;
2772
+
2773
+ const bg = !opts.color.light.a
2774
+ ? ''
2775
+ : '<path ' + getColorAttrib(opts.color.light, 'fill') +
2776
+ ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>';
2777
+
2778
+ const path =
2779
+ '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
2780
+ ' d="' + qrToPath(data, size, opts.margin) + '"/>';
2781
+
2782
+ const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"';
2783
+
2784
+ const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" ';
2785
+
2786
+ const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n';
2787
+
2788
+ if (typeof cb === 'function') {
2789
+ cb(null, svgTag);
2790
+ }
2791
+
2792
+ return svgTag
2793
+ };
2794
+
2795
+ const canPromise = canPromise$1;
2796
+
2797
+ const QRCode = qrcode;
2798
+ const CanvasRenderer = canvas;
2799
+ const SvgRenderer = svgTag;
2800
+
2801
+ function renderCanvas (renderFunc, canvas, text, opts, cb) {
2802
+ const args = [].slice.call(arguments, 1);
2803
+ const argsNum = args.length;
2804
+ const isLastArgCb = typeof args[argsNum - 1] === 'function';
2805
+
2806
+ if (!isLastArgCb && !canPromise()) {
2807
+ throw new Error('Callback required as last argument')
2808
+ }
2809
+
2810
+ if (isLastArgCb) {
2811
+ if (argsNum < 2) {
2812
+ throw new Error('Too few arguments provided')
2813
+ }
2814
+
2815
+ if (argsNum === 2) {
2816
+ cb = text;
2817
+ text = canvas;
2818
+ canvas = opts = undefined;
2819
+ } else if (argsNum === 3) {
2820
+ if (canvas.getContext && typeof cb === 'undefined') {
2821
+ cb = opts;
2822
+ opts = undefined;
2823
+ } else {
2824
+ cb = opts;
2825
+ opts = text;
2826
+ text = canvas;
2827
+ canvas = undefined;
2828
+ }
2829
+ }
2830
+ } else {
2831
+ if (argsNum < 1) {
2832
+ throw new Error('Too few arguments provided')
2833
+ }
2834
+
2835
+ if (argsNum === 1) {
2836
+ text = canvas;
2837
+ canvas = opts = undefined;
2838
+ } else if (argsNum === 2 && !canvas.getContext) {
2839
+ opts = text;
2840
+ text = canvas;
2841
+ canvas = undefined;
2842
+ }
2843
+
2844
+ return new Promise(function (resolve, reject) {
2845
+ try {
2846
+ const data = QRCode.create(text, opts);
2847
+ resolve(renderFunc(data, canvas, opts));
2848
+ } catch (e) {
2849
+ reject(e);
2850
+ }
2851
+ })
2852
+ }
2853
+
2854
+ try {
2855
+ const data = QRCode.create(text, opts);
2856
+ cb(null, renderFunc(data, canvas, opts));
2857
+ } catch (e) {
2858
+ cb(e);
2859
+ }
2860
+ }
2861
+
2862
+ browser.create = QRCode.create;
2863
+ browser.toCanvas = renderCanvas.bind(null, CanvasRenderer.render);
2864
+ browser.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL);
2865
+
2866
+ // only svg for now.
2867
+ browser.toString = renderCanvas.bind(null, function (data, _, opts) {
2868
+ return SvgRenderer.render(data, opts)
2869
+ });
2870
+
2871
+ const pnQrCodeGeneratorCss = "pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}@media screen and (max-width: 767px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}}pn-qr-code-generator{display:block;text-align:center}pn-qr-code-generator canvas{border:1px solid #d3cecb;transition:filter 0.3s ease;width:20rem;height:20rem}pn-qr-code-generator canvas.outdated{filter:grayscale(100%)}pn-qr-code-generator .timer{margin-top:1rem;text-align:center;font-size:1.4rem;color:#2d2013}pn-qr-code-generator .outdated-message{color:#a70707}pn-qr-code-generator .qr-button__wrapper{background:transparent;border:none;padding:0;width:20rem;height:20rem}pn-qr-code-generator .qr-button__wrapper:focus,pn-qr-code-generator .qr-button__wrapper:focus-visible{outline-color:#005d92}";
2872
+ const PnQrCodeGeneratorStyle0 = pnQrCodeGeneratorCss;
2873
+
2874
+ const QrCodeGenerator = class {
2875
+ constructor(hostRef) {
2876
+ index.registerInstance(this, hostRef);
2877
+ this.url = undefined;
2878
+ this.countdownSeconds = -1;
2879
+ this.outdatedMessage = undefined;
2880
+ this.expiresInMessage = undefined;
2881
+ this.updateCodeEverySecond = true;
2882
+ this.ariaLabel = undefined;
2883
+ this.remainingSeconds = undefined;
2884
+ this.isOutdated = false;
2885
+ this.isFullscreen = false;
2886
+ }
2887
+ canvasRef;
2888
+ timer;
2889
+ urlWithSegment;
2890
+ gray900 = '#2d2013';
2891
+ blackHex = '#000';
2892
+ whiteHex = '#fff';
2893
+ componentWillLoad() {
2894
+ this.urlWithSegment = this.url + '#';
2895
+ this.remainingSeconds = this.countdownSeconds;
2896
+ }
2897
+ componentDidLoad() {
2898
+ this.generateQRCode();
2899
+ if (this.countdownSeconds !== -1) {
2900
+ this.startCountdown();
2901
+ }
2902
+ }
2903
+ generateQRCode(urlSegment = '') {
2904
+ if (this.url && this.canvasRef) {
2905
+ this.urlWithSegment += urlSegment;
2906
+ browser.toCanvas(this.canvasRef, this.urlWithSegment, {
2907
+ width: 200,
2908
+ color: {
2909
+ dark: this.isOutdated ? this.gray900 : this.blackHex,
2910
+ light: this.isOutdated ? this.gray900 : this.whiteHex,
2911
+ },
2912
+ }, error => {
2913
+ if (error)
2914
+ console.error(error);
2915
+ });
2916
+ }
2917
+ }
2918
+ startCountdown() {
2919
+ this.timer = setInterval(() => {
2920
+ if (this.remainingSeconds > 0) {
2921
+ this.remainingSeconds--;
2922
+ this.generateQRCode('p');
2923
+ }
2924
+ else {
2925
+ clearInterval(this.timer);
2926
+ this.isOutdated = true;
2927
+ this.generateQRCode();
2928
+ }
2929
+ }, 1000);
2930
+ }
2931
+ disconnectedCallback() {
2932
+ clearInterval(this.timer);
2933
+ }
2934
+ render() {
2935
+ return (index.h("div", { key: 'e0bc37a181c7787812bbd052877cf1c0ecffe4c9' }, index.h("button", { key: '6486b7b7e94493ba8cf32d6cef7e9224c119a8ea', class: "qr-button__wrapper", "aria-label": this.ariaLabel }, index.h("canvas", { key: 'e66b827b3a7b92b3cf250e73b0dade3675fad9b7', class: this.isOutdated ? 'outdated' : '', ref: el => (this.canvasRef = el) })), this.countdownSeconds !== -1 && index.h("div", { key: '122ba7328a26fb6116ffc5b6c9b3a4cdcc24b8a2', class: "timer" }, this.isOutdated && index.h("span", { key: 'da1c41fe27834b3fdfcc08f456ab0f53e13a9a12', class: "outdated-message" }, this.outdatedMessage), !this.isOutdated && this.expiresInMessage && index.h("span", { key: 'c6515a6aa7491e02267f82f55abac7388ed68d15' }, this.expiresInMessage, " ", this.remainingSeconds))));
2936
+ }
2937
+ static get watchers() { return {
2938
+ "url": ["generateQRCode"]
2939
+ }; }
2940
+ };
2941
+ QrCodeGenerator.style = PnQrCodeGeneratorStyle0;
2942
+
2943
+ exports.pn_qr_code_generator = QrCodeGenerator;
2944
+
2945
+ //# sourceMappingURL=pn-qr-code-generator.cjs.entry.js.map