@ozdao/prometheus-framework 0.2.112 → 0.2.114

Sign up to get free protection for your applications and to get access to all the features.
Files changed (529) hide show
  1. package/dist/common.schema-BFhpUXUt.js +12 -0
  2. package/dist/common.schema-ChBVARrs.mjs +13 -0
  3. package/dist/community.server.js +6 -4
  4. package/dist/community.server.mjs +4 -2
  5. package/dist/engagement.schema-CI2ifjXN.mjs +28 -0
  6. package/dist/engagement.schema-fdLNO2_6.js +27 -0
  7. package/dist/events.server.js +6 -4
  8. package/dist/events.server.mjs +4 -2
  9. package/dist/files.server.js +81 -29
  10. package/dist/files.server.mjs +81 -29
  11. package/dist/gallery.server.js +66 -39
  12. package/dist/gallery.server.mjs +66 -39
  13. package/dist/main-8APITHuW.mjs +14201 -0
  14. package/dist/main-8N2Jmsuk.js +2 -2
  15. package/dist/main-BJvlNekm.mjs +5 -5
  16. package/dist/main-BQisDfLk.js +2 -2
  17. package/dist/main-BV1Yv9Hy.js +2 -2
  18. package/dist/main-Bw0PvTs-.mjs +5 -5
  19. package/dist/main-ByCtZbHD.mjs +5 -5
  20. package/dist/main-CX2ISR43.mjs +5 -5
  21. package/dist/main-CXObXjv-.js +2 -2
  22. package/dist/main-CkeuHuCY.mjs +5 -5
  23. package/dist/main-CnfcBov2.mjs +5 -5
  24. package/dist/main-D50VqYhy.js +2 -2
  25. package/dist/main-D8gNZLSa.js +2 -2
  26. package/dist/main-DPsHxX0l.mjs +5 -5
  27. package/dist/main-DTlUA63C.mjs +5 -5
  28. package/dist/main-DfD5hLQo.mjs +5 -5
  29. package/dist/main-Dh6Zfei9.js +2 -2
  30. package/dist/main-DmNP-t33.mjs +5 -5
  31. package/dist/main-DwyUYWFX.js +2 -2
  32. package/dist/main-VcxO-jAt.js +92 -0
  33. package/dist/main-cffh4bbv.js +2 -2
  34. package/dist/main-pGo7JpSP.js +2 -2
  35. package/dist/main.css +1 -1
  36. package/dist/metadata.schema-6slGhpQS.js +40 -0
  37. package/dist/metadata.schema-CK5e2O3f.mjs +41 -0
  38. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
  39. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +410 -407
  40. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +3 -3
  41. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +469 -456
  42. package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -1
  43. package/dist/node_modules/web3/lib/esm/accounts.js +5 -2
  44. package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
  45. package/dist/node_modules/web3/lib/esm/index.js +45 -42
  46. package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
  47. package/dist/node_modules/web3/lib/esm/version.js +1 -1
  48. package/dist/node_modules/web3/lib/esm/web3.cjs +1 -1
  49. package/dist/node_modules/web3/lib/esm/web3.js +40 -37
  50. package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -1
  51. package/dist/node_modules/web3-core/lib/esm/web3_config.js +28 -18
  52. package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -1
  53. package/dist/node_modules/web3-core/lib/esm/web3_context.js +56 -53
  54. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -1
  55. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +100 -87
  56. package/dist/node_modules/web3-errors/lib/esm/error_codes.cjs +1 -1
  57. package/dist/node_modules/web3-errors/lib/esm/error_codes.js +97 -95
  58. package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.cjs +1 -1
  59. package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.js +8 -8
  60. package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.cjs +1 -1
  61. package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.js +20 -20
  62. package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.cjs +4 -4
  63. package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.js +2 -2
  64. package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.cjs +1 -1
  65. package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.js +33 -27
  66. package/dist/node_modules/web3-errors/lib/esm/web3_error_base.cjs +1 -1
  67. package/dist/node_modules/web3-errors/lib/esm/web3_error_base.js +33 -12
  68. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -1
  69. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +183 -179
  70. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -1
  71. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +10 -10
  72. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -1
  73. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +45 -44
  74. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -1
  75. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +59 -57
  76. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -1
  77. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +43 -43
  78. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -1
  79. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +31 -31
  80. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.cjs +1 -1
  81. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js +26 -26
  82. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -1
  83. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +53 -51
  84. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -1
  85. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +25 -23
  86. package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -1
  87. package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +103 -101
  88. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +2 -2
  89. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +159 -156
  90. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
  91. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +11 -8
  92. package/dist/node_modules/web3-eth-contract/lib/esm/index.cjs +1 -1
  93. package/dist/node_modules/web3-eth-contract/lib/esm/index.js +3 -0
  94. package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.cjs +1 -1
  95. package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.js +5 -2
  96. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  97. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +19 -16
  98. package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -1
  99. package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +5 -2
  100. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -1
  101. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +50 -47
  102. package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -1
  103. package/dist/node_modules/web3-net/lib/esm/net.js +27 -27
  104. package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
  105. package/dist/node_modules/web3-utils/lib/esm/converters.js +100 -83
  106. package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -1
  107. package/dist/node_modules/web3-utils/lib/esm/formatter.js +123 -104
  108. package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
  109. package/dist/node_modules/web3-validator/lib/esm/utils.js +21 -21
  110. package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -1
  111. package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +10 -10
  112. package/dist/node_modules/web3-validator/lib/esm/validation/numbers.cjs +1 -1
  113. package/dist/node_modules/web3-validator/lib/esm/validation/numbers.js +30 -28
  114. package/dist/orders.server.js +1 -1
  115. package/dist/orders.server.mjs +1 -1
  116. package/dist/organizations.server.js +56 -59
  117. package/dist/organizations.server.mjs +56 -59
  118. package/dist/products.server.js +1 -1
  119. package/dist/products.server.mjs +1 -1
  120. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  121. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +17 -17
  122. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/components/Block/Block.vue.js +5 -5
  124. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +33 -30
  126. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +9 -9
  128. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue.cjs +1 -0
  129. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue.js +1 -0
  130. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -0
  131. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +165 -0
  132. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +22 -19
  134. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +132 -64
  136. package/dist/prometheus-framework/src/components/Feed/Feed.vue2.cjs +1 -0
  137. package/dist/prometheus-framework/src/components/Feed/Feed.vue2.js +1 -0
  138. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +9 -9
  140. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +12 -12
  142. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  143. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +16 -16
  144. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/components/Map/Map.vue.js +14 -13
  146. package/dist/prometheus-framework/src/components/Marquee/Marquee.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/components/Marquee/Marquee.vue.js +8 -8
  148. package/dist/prometheus-framework/src/components/Radio/Radio.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/components/Radio/Radio.vue.js +29 -36
  150. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  152. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  153. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  154. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  156. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +6 -6
  158. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +17 -17
  160. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +6 -6
  162. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  164. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +24 -24
  166. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +24 -24
  168. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +11 -11
  170. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +26 -26
  172. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +14 -14
  174. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +6 -6
  176. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +46 -46
  178. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +13 -13
  180. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +5 -5
  182. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +19 -16
  184. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +3 -3
  186. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  187. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  188. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  189. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  190. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +13 -13
  192. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  196. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +214 -214
  198. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +8 -8
  200. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  201. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +23 -23
  202. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +9 -9
  204. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +3 -3
  206. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +9 -9
  208. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +8 -8
  209. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +167 -202
  211. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +73 -165
  213. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  214. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +3 -47
  215. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  216. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  217. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSorting.vue.cjs +1 -0
  218. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSorting.vue.js +75 -0
  219. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  220. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +96 -77
  221. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -0
  222. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +1 -0
  223. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.cjs +1 -0
  224. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.js +27 -0
  225. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonSort.vue.cjs +1 -0
  226. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonSort.vue.js +31 -0
  227. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
  228. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -19
  229. package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
  230. package/dist/prometheus-framework/src/modules/globals/store/globals.js +10 -4
  231. package/dist/prometheus-framework/src/modules/icons/navigation/IconCalendar.vue.cjs +1 -0
  232. package/dist/prometheus-framework/src/modules/icons/navigation/IconCalendar.vue.js +31 -0
  233. package/dist/prometheus-framework/src/modules/icons/navigation/IconFilter.vue.cjs +1 -0
  234. package/dist/prometheus-framework/src/modules/icons/navigation/IconFilter.vue.js +31 -0
  235. package/dist/prometheus-framework/src/modules/icons/navigation/IconSort.vue.cjs +1 -0
  236. package/dist/prometheus-framework/src/modules/icons/navigation/IconSort.vue.js +59 -0
  237. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -0
  238. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +80 -0
  239. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue2.cjs +1 -0
  240. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue2.js +1 -0
  241. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  242. package/dist/prometheus-framework/src/modules/landing/landing.client.js +8 -6
  243. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  244. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +5 -5
  245. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Cookies.vue.cjs +1 -1
  246. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Cookies.vue.js +1 -1
  247. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/EULA.vue.cjs +1 -1
  248. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/EULA.vue.js +1 -1
  249. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Privacy.vue.cjs +1 -1
  250. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Privacy.vue.js +1 -1
  251. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Terms.vue.cjs +1 -1
  252. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Terms.vue.js +30 -30
  253. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  254. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +21 -45
  255. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  256. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  257. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  258. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  259. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +1 -1
  260. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js +36 -36
  261. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +1 -1
  262. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +1 -1
  263. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  264. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +53 -53
  265. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  266. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +33 -33
  267. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  268. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  269. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  270. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +10 -10
  271. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  272. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +5 -5
  273. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +1 -1
  274. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +1 -1
  275. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  276. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +24 -24
  277. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  278. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +5 -5
  279. package/dist/prometheus-framework/src/modules/orders/store/applications.cjs +1 -0
  280. package/dist/prometheus-framework/src/modules/orders/store/applications.js +37 -0
  281. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  282. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +5 -5
  283. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
  284. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +11 -11
  285. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  286. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  287. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  288. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +16 -16
  289. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  290. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +41 -41
  291. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  292. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +11 -11
  293. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  294. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +17 -17
  295. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  296. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +36 -36
  297. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  298. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +8 -8
  299. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  300. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  301. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  302. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +20 -20
  303. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  304. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +12 -12
  305. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  306. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +13 -13
  307. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  308. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +33 -34
  309. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  310. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +16 -16
  311. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  312. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +15 -15
  313. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  314. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +8 -8
  315. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  316. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +8 -8
  317. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  318. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +9 -9
  319. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  320. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
  321. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  322. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +22 -22
  323. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  324. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +6 -6
  325. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  326. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +8 -8
  327. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +14 -14
  328. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  329. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +51 -56
  330. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  331. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +4 -4
  332. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  333. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +32 -32
  334. package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.cjs +1 -1
  335. package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.js +1 -1
  336. package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
  337. package/dist/prometheus-framework/src/modules/products/products.client.js +28 -30
  338. package/dist/prometheus-framework/src/modules/reports/components/pages/BackofficeReports.vue.cjs +1 -1
  339. package/dist/prometheus-framework/src/modules/reports/components/pages/BackofficeReports.vue.js +12 -12
  340. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  341. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +30 -26
  342. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  343. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +35 -35
  344. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  345. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +11 -11
  346. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  347. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +41 -41
  348. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  349. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +13 -13
  350. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.cjs +1 -1
  351. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.js +19 -19
  352. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  353. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +8 -8
  354. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  355. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +14 -11
  356. package/dist/prometheus-framework.cjs.js +1 -1
  357. package/dist/prometheus-framework.es.js +1 -1
  358. package/dist/queryProcessor-BJoJAetd.mjs +162 -0
  359. package/dist/queryProcessor-DWf9tsis.js +161 -0
  360. package/dist/style.css +1 -1
  361. package/dist/wallet.server.js +1 -1
  362. package/dist/wallet.server.mjs +1 -1
  363. package/dist/web-TGdVOTnw.js +1 -0
  364. package/dist/web-_W9a_nWD.mjs +54 -0
  365. package/package.json +1 -1
  366. package/src/components/Address/Address.vue +1 -1
  367. package/src/components/AskToLogin/AskToLogin.vue +1 -1
  368. package/src/components/Block/Block.vue +1 -1
  369. package/src/components/Checkbox/Checkbox.vue +40 -43
  370. package/src/components/Chips/Chips.vue +2 -2
  371. package/src/components/DatePicker/Calendar.vue +29 -31
  372. package/src/components/Dropdown/Dropdown.vue +5 -11
  373. package/src/components/Feed/Feed.vue +98 -15
  374. package/src/components/FieldTags/BlockTags.vue +3 -3
  375. package/src/components/FieldTags/FieldTags.vue +1 -1
  376. package/src/components/FieldTags/vue-tags-input.scss +1 -1
  377. package/src/components/LocationMarker/LocationMarker.vue +1 -1
  378. package/src/components/LocationSelection/LocationSelection.vue +5 -30
  379. package/src/components/Map/LoaderGMaps.js +66 -0
  380. package/src/components/Map/Map.vue +2 -1
  381. package/src/components/Marquee/Marquee.vue +1 -1
  382. package/src/components/Radio/Radio.vue +36 -13
  383. package/src/configurator/components/pages/Styles.vue +1 -1
  384. package/src/modules/auth/components/layouts/Auth.vue +1 -1
  385. package/src/modules/auth/components/pages/EnterCode.vue +4 -4
  386. package/src/modules/auth/components/pages/EnterPassword.vue +2 -2
  387. package/src/modules/auth/components/pages/Invite.vue +2 -2
  388. package/src/modules/auth/components/pages/ResetPassword.vue +3 -3
  389. package/src/modules/auth/components/pages/SignIn.vue +4 -4
  390. package/src/modules/auth/components/pages/SignUp.vue +3 -3
  391. package/src/modules/backoffice/components/admin/Backcalls.vue +1 -1
  392. package/src/modules/backoffice/components/admin/FastOrders.vue +1 -1
  393. package/src/modules/backoffice/components/admin/Pages.vue +1 -1
  394. package/src/modules/backoffice/components/admin/ProductEdit.vue +1 -1
  395. package/src/modules/backoffice/components/admin/UserEdit.vue +1 -1
  396. package/src/modules/backoffice/components/admin/Users.vue +1 -1
  397. package/src/modules/backoffice/components/pages/Dashboard.vue +3 -3
  398. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  399. package/src/modules/community/components/layouts/Community.vue +2 -2
  400. package/src/modules/community/components/pages/BlogPost.vue +2 -2
  401. package/src/modules/community/components/pages/CreateBlogPost.vue +4 -4
  402. package/src/modules/community/components/sections/Comments.vue +2 -2
  403. package/src/modules/community/components/sections/Feed.vue +1 -1
  404. package/src/modules/community/components/sections/HotPosts.vue +1 -1
  405. package/src/modules/constructor/components/elements/Image.vue +1 -1
  406. package/src/modules/constructor/components/elements/Video.vue +2 -2
  407. package/src/modules/events/components/blocks/CardEvent.vue +1 -1
  408. package/src/modules/events/components/pages/EditEvent.vue +32 -32
  409. package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
  410. package/src/modules/events/components/pages/Event.vue +3 -3
  411. package/src/modules/events/components/pages/Events.vue +4 -3
  412. package/src/modules/events/components/sections/Feed.vue +3 -3
  413. package/src/modules/events/components/sections/List.vue +2 -2
  414. package/src/modules/files/controllers/files.controller.js +8 -6
  415. package/src/modules/files/middlewares/server/middlewareBusboy.js +79 -14
  416. package/src/modules/files/routes/files.routes.js +11 -9
  417. package/src/modules/gallery/components/sections/BackofficeGallery.vue +158 -355
  418. package/src/modules/gallery/components/sections/GalleryWithCategories.vue +26 -244
  419. package/src/modules/gallery/controllers/gallery.controller.js +57 -38
  420. package/src/modules/gallery/models/photo.model.js +20 -11
  421. package/src/modules/gallery/routes/gallery.routes.js +3 -3
  422. package/src/modules/gallery/store/gallery.js +3 -78
  423. package/src/modules/globals/components/blocks/BlockSearch.vue +1 -1
  424. package/src/modules/globals/components/blocks/BlockSorting.vue +77 -0
  425. package/src/modules/globals/components/blocks/CardHeader.vue +27 -25
  426. package/src/modules/globals/components/elements/ButtonDate.vue +66 -0
  427. package/src/modules/globals/components/elements/ButtonSort.vue +41 -0
  428. package/src/modules/globals/components/layouts/Client.vue +273 -0
  429. package/src/{components/Footer → modules/globals/components/partials}/Footer.vue +1 -1
  430. package/src/{components/Header → modules/globals/components/partials}/Header.vue +98 -84
  431. package/src/modules/globals/controllers/utils/queryProcessor.js +3 -3
  432. package/src/modules/globals/models/common.schema.js +1 -1
  433. package/src/modules/globals/services/globals.store.js +11 -6
  434. package/src/modules/globals/store/globals.js +12 -10
  435. package/src/modules/icons/logos/Logotype.vue +23 -19
  436. package/src/modules/icons/navigation/IconCalendar.vue +18 -0
  437. package/src/modules/icons/navigation/IconFilter.vue +18 -0
  438. package/src/modules/icons/navigation/IconSearch.vue +1 -3
  439. package/src/modules/icons/navigation/IconSort.vue +21 -0
  440. package/src/modules/landing/components/pages/Home.vue +4 -4
  441. package/src/modules/landing/components/sections/FeatureSection.vue +5 -5
  442. package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -2
  443. package/src/modules/landing/components/sections/SectionFeature.vue +2 -2
  444. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +2 -2
  445. package/src/modules/landing/components/sections/SectionsSection.vue +4 -4
  446. package/src/modules/{orders → landing}/components/sections/SubscribeNewsletter.vue +0 -2
  447. package/src/modules/landing/components/sections/WhatIsWDRSection.vue +6 -6
  448. package/src/modules/landing/landing.client.js +2 -0
  449. package/src/modules/landing/router/landing.js +1 -1
  450. package/src/modules/legal/components/pages/Legal.vue +2 -2
  451. package/src/modules/legal/components/pages/legal/Cookies.vue +1 -1
  452. package/src/modules/legal/components/pages/legal/EULA.vue +1 -1
  453. package/src/modules/legal/components/pages/legal/Privacy.vue +1 -1
  454. package/src/modules/legal/components/pages/legal/Terms.vue +1 -1
  455. package/src/modules/marketplace/components/layouts/Marketplace.vue +37 -49
  456. package/src/modules/marketplace/components/pages/Catalog.vue +43 -131
  457. package/src/modules/marketplace/components/sections/Filters.vue +63 -115
  458. package/src/modules/marketplace/store/marketplace.js +22 -167
  459. package/src/modules/mobile/components/Walkthrough/Walkthrough.vue +1 -1
  460. package/src/modules/orders/components/blocks/CardOrderItem.vue +6 -6
  461. package/src/modules/orders/components/blocks/CardOrderVar1.vue +1 -1
  462. package/src/modules/orders/components/blocks/StatusHistory.vue +1 -1
  463. package/src/modules/orders/components/pages/Order.vue +8 -8
  464. package/src/modules/orders/components/pages/OrderBackoffice.vue +7 -7
  465. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  466. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +3 -3
  467. package/src/modules/orders/components/pages/Orders.vue +3 -5
  468. package/src/modules/orders/components/partials/ShopCart.vue +5 -1
  469. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  470. package/src/modules/orders/components/sections/FormDelivery.vue +1 -1
  471. package/src/modules/orders/store/applications.js +1 -1
  472. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  473. package/src/modules/organizations/components/blocks/Contacts.vue +4 -4
  474. package/src/modules/organizations/components/pages/Department.vue +3 -3
  475. package/src/modules/organizations/components/pages/DepartmentEdit.vue +6 -6
  476. package/src/modules/organizations/components/pages/Members.vue +4 -4
  477. package/src/modules/organizations/components/pages/Organization.vue +3 -3
  478. package/src/modules/organizations/components/pages/OrganizationCreate.vue +2 -2
  479. package/src/modules/organizations/components/pages/OrganizationDetails.vue +1 -1
  480. package/src/modules/organizations/components/pages/OrganizationDocuments.vue +1 -1
  481. package/src/modules/organizations/components/pages/OrganizationEdit.vue +9 -9
  482. package/src/modules/organizations/components/pages/OrganizationPeople.vue +1 -1
  483. package/src/modules/organizations/components/pages/Organizations.vue +1 -1
  484. package/src/modules/organizations/components/sections/DetailsTab.vue +4 -4
  485. package/src/modules/organizations/components/sections/Feed.vue +2 -2
  486. package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
  487. package/src/modules/organizations/components/sections/Publics.vue +1 -1
  488. package/src/modules/organizations/controllers/organizations.controller.js +103 -93
  489. package/src/modules/organizations/models/organization.model.js +10 -7
  490. package/src/modules/organizations/store/organizations.js +3 -34
  491. package/src/modules/products/components/blocks/CardPosition.vue +2 -2
  492. package/src/modules/products/components/blocks/LeftoverPositions.vue +2 -2
  493. package/src/modules/products/components/pages/Categories.vue +1 -1
  494. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  495. package/src/modules/products/components/pages/Leftovers.vue +4 -4
  496. package/src/modules/products/components/pages/Product.vue +1 -5
  497. package/src/modules/products/components/pages/ProductEdit.vue +1 -1
  498. package/src/modules/products/components/pages/Products.vue +2 -2
  499. package/src/modules/products/components/sections/EditProductInfo.vue +1 -1
  500. package/src/modules/products/components/sections/FilterProducts.vue +1 -1
  501. package/src/modules/products/components/sections/HeroRecommendation.vue +67 -74
  502. package/src/modules/products/components/sections/MenuSection.vue +2 -2
  503. package/src/modules/products/components/sections/PopularProducts.vue +2 -2
  504. package/src/modules/products/components/sections/SectionProduct.vue +3 -3
  505. package/src/modules/products/products.client.js +0 -2
  506. package/src/modules/reports/components/pages/BackofficeReports.vue +4 -4
  507. package/src/modules/spots/components/blocks/CardSpot.vue +9 -1
  508. package/src/modules/spots/components/blocks/SpotMemberModify.vue +2 -2
  509. package/src/modules/spots/components/layouts/Spots.vue +0 -2
  510. package/src/modules/spots/components/pages/Spot.vue +4 -4
  511. package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
  512. package/src/modules/spots/components/sections/PlaceModify.vue +1 -1
  513. package/src/modules/spots/components/sections/Places.vue +1 -1
  514. package/src/modules/users/components/pages/Profile.vue +5 -5
  515. package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
  516. package/src/modules/users/components/pages/ProfileComments.vue +1 -1
  517. package/src/modules/users/components/pages/ProfileEdit.vue +11 -11
  518. package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
  519. package/src/modules/users/components/pages/ProfileLikes.vue +1 -1
  520. package/src/modules/users/components/sections/FeaturedUsers.vue +3 -3
  521. package/src/modules/wallet/views/components/pages/Payments.vue +2 -2
  522. package/src/modules/wallet/views/components/pages/Wallet.vue +3 -3
  523. package/src/styles/base/borders.scss +4 -0
  524. package/src/styles/base/shadow_transitions_hover_refactor.scss +4 -0
  525. package/src/styles/config.scss +15 -9
  526. package/src/styles/layout.scss +37 -8
  527. package/src/styles/typography.scss +24 -24
  528. package/src/modules/products/components/sections/SortProducts.vue +0 -74
  529. /package/src/{components/Navigation → modules/globals/components/partials}/Navigation.vue +0 -0
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("vue");var br=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},dr=(r,i,a)=>(br(r,i,"read from private field"),a?a.call(r):i.get(r)),ao=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},oo=(r,i,a,c)=>(br(r,i,"write to private field"),i.set(r,a),a);const Cr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],io=[...Cr,["unknown"]].map(r=>r[0]),nt=new Map(Cr);function so(r){for(const[i,a]of nt)if(r===a)return i;return"unknown"}function co(r){if(Tr(r))return{width:r.naturalWidth,height:r.naturalHeight};if($r(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Sr(r))return{width:r.videoWidth,height:r.videoHeight};if(_r(r))return{width:r.width,height:r.height};if(Or(r))return{width:r.displayWidth,height:r.displayHeight};if(Pr(r))return{width:r.width,height:r.height};if(Er(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Tr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function $r(r){try{return r instanceof SVGImageElement}catch{return!1}}function Sr(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function Pr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function _r(r){try{return r instanceof ImageBitmap}catch{return!1}}function Er(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Or(r){try{return r instanceof VideoFrame}catch{return!1}}function Mr(r){try{return r instanceof Blob}catch{return!1}}function uo(r){try{return r instanceof ImageData}catch{return!1}}function lo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Ar(r){if(Tr(r)&&!await vo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if($r(r)&&!await mo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Or(r)&&yo(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Sr(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(_r(r)&&wo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=co(r);if(i===0||a===0)return null;const c=lo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fo(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Ar(i)}function ho(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function po(r){if(Mr(r))return await fo(r);if(uo(r)){if(go(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return Pr(r)||Er(r)?ho(r):await Ar(r)}async function vo(r){try{return await r.decode(),!0}catch{return!1}}async function mo(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function yo(r){return r.format===null}function go(r){return r.data.buffer.byteLength===0}function wo(r){return r.width===0&&r.height===0}function fr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const hr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function bo(r){return r.join("|")}function Co(r){const i=pr(r);let a=0,c=hr.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),v=hr[f],y=pr(v);if(y===i)return v;y<i?a=f+1:c=f-1}return"None"}function pr(r){return r.toLowerCase().replace(/_-\[\]/g,"")}function To(r,i){return r.Binarizer[i]}function $o(r,i){return r.CharacterSet[i]}const So=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Po(r){return So[r.value]}function _o(r,i){return r.EanAddOnSymbol[i]}function Eo(r,i){return r.TextMode[i]}const Ee={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function xr(r,i){return{...i,formats:bo(i.formats),binarizer:To(r,i.binarizer),eanAddOnSymbol:_o(r,i.eanAddOnSymbol),textMode:Eo(r,i.textMode),characterSet:$o(r,i.characterSet)}}function jr(r){return{...r,format:Co(r.format),eccLevel:r.eccLevel,contentType:Po(r.contentType)}}const Oo={locateFile:(r,i)=>{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let vr=new WeakMap;function Dt(r,i){var a;const c=vr.get(r);if(c!=null&&c.modulePromise&&i===void 0)return c.modulePromise;const f=(a=c==null?void 0:c.moduleOverrides)!=null?a:Oo,v=r({...f});return vr.set(r,{moduleOverrides:f,modulePromise:v}),v}async function Mo(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{size:v}=i,y=new Uint8Array(await i.arrayBuffer()),S=f._malloc(v);f.HEAPU8.set(y,S);const h=f.readBarcodesFromImage(S,v,xr(f,c));f._free(S);const w=[];for(let T=0;T<h.size();++T)w.push(jr(h.get(T)));return w}async function Ao(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{data:v,width:y,height:S,data:{byteLength:h}}=i,w=f._malloc(h);f.HEAPU8.set(v,w);const T=f.readBarcodesFromPixmap(w,y,S,xr(f,c));f._free(w);const b=[];for(let j=0;j<T.size();++j)b.push(jr(T.get(j)));return b}({...Ee,formats:[...Ee.formats]});var Rt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var v=Object.assign({},a),y="./this.program",S=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function T(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(S||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var j=a.printErr||console.error.bind(console);Object.assign(a,v),v=null,a.arguments&&a.arguments,a.thisProgram&&(y=a.thisProgram),a.quit&&a.quit;var D;a.wasmBinary&&(D=a.wasmBinary),typeof WebAssembly!="object"&&K("no native wasm support detected");var x,I=!1,W,G,le,k,O,M,de,oe;function be(){var e=x.buffer;a.HEAP8=W=new Int8Array(e),a.HEAP16=le=new Int16Array(e),a.HEAPU8=G=new Uint8Array(e),a.HEAPU16=k=new Uint16Array(e),a.HEAP32=O=new Int32Array(e),a.HEAPU32=M=new Uint32Array(e),a.HEAPF32=de=new Float32Array(e),a.HEAPF64=oe=new Float64Array(e)}var Ce=[],Oe=[],Me=[];function Ue(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)ct(a.preRun.shift());ht(Ce)}function it(){ht(Oe)}function st(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Ae(a.postRun.shift());ht(Me)}function ct(e){Ce.unshift(e)}function ut(e){Oe.unshift(e)}function Ae(e){Me.unshift(e)}var te=0,ye=null;function lt(e){var t;te++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te)}function fe(e){var t;if(te--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te),te==0&&ye){var n=ye;ye=null,n()}}function K(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",j(e),I=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var dt="data:application/octet-stream;base64,",Le=e=>e.startsWith(dt),he;he="zxing_reader.wasm",Le(he)||(he=T(he));function He(e){if(e==he&&D)return new Uint8Array(D);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function ft(e){return!D&&(S||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>He(e)):Promise.resolve().then(()=>He(e))}function Ne(e,t,n){return ft(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{j(`failed to asynchronously prepare wasm: ${o}`),K(o)})}function Jr(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Le(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return j(`wasm streaming compile failed: ${l}`),j("falling back to ArrayBuffer instantiation"),Ne(t,n,o)})}):Ne(t,n,o)}function Yr(){var e={a:Fa};function t(o,s){return J=o.exports,x=J.ia,be(),Bt=J.ma,ut(J.ja),fe(),J}lt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){j(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return Jr(D,he,e,n).catch(f),{}}var ht=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Ve=[],Be=0,qr=e=>{var t=new pt(e);return t.get_caught()||(t.set_caught(!0),Be--),t.set_rethrown(!1),Ve.push(t),ar(t.excPtr),t.get_exception_ptr()},ie=0,Qr=()=>{U(0,0);var e=Ve.pop();nr(e.excPtr),ie=0};function pt(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){M[this.ptr+4>>2]=t},this.get_type=function(){return M[this.ptr+4>>2]},this.set_destructor=function(t){M[this.ptr+8>>2]=t},this.get_destructor=function(){return M[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,W[this.ptr+12>>0]=t},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,W[this.ptr+13>>0]=t},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){M[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return M[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=ir(this.get_type());if(t)return M[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var Xr=e=>{throw ie||(ie=e),ie},vt=e=>{var t=ie;if(!t)return Ie(0),0;var n=new pt(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Ie(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(or(u,o,l))return Ie(u),t}return Ie(o),t},Kr=()=>vt([]),Zr=e=>vt([e]),en=(e,t)=>vt([e,t]),tn=()=>{var e=Ve.pop();e||K("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ve.push(e),e.set_rethrown(!0),e.set_caught(!1),Be++),ie=t,ie},rn=(e,t,n)=>{var o=new pt(e);throw o.init(t,n),ie=e,Be++,ie},nn=()=>Be,ze={},mt=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function yt(e){return this.fromWireType(O[e>>2])}var Te={},ge={},Ge={},kt,Je=e=>{throw new kt(e)},we=(e,t,n)=>{e.forEach(function(d){Ge[d]=t});function o(d){var p=n(d);p.length!==e.length&&Je("Mismatched type converter count");for(var g=0;g<e.length;++g)re(e[g],p[g])}var s=new Array(t.length),u=[],l=0;t.forEach((d,p)=>{ge.hasOwnProperty(d)?s[p]=ge[d]:(u.push(d),Te.hasOwnProperty(d)||(Te[d]=[]),Te[d].push(()=>{s[p]=ge[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},an=e=>{var t=ze[e];delete ze[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));we([e],u,l=>{var d={};return s.forEach((p,g)=>{var C=p.fieldName,P=l[g],_=p.getter,E=p.getterContext,L=l[g+s.length],B=p.setter,F=p.setterContext;d[C]={read:Q=>P.fromWireType(_(E,Q)),write:(Q,m)=>{var $=[];B(F,Q,L.toWireType($,m)),mt($)}}}),[{name:t.name,fromWireType:p=>{var g={};for(var C in d)g[C]=d[C].read(p);return o(p),g},toWireType:(p,g)=>{for(var C in d)if(!(C in g))throw new TypeError(`Missing field: "${C}"`);var P=n();for(C in d)d[C].write(P,g[C]);return p!==null&&p.push(o,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:o}]})},on=(e,t,n,o,s)=>{},sn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ft=e},Ft,q=e=>{for(var t="",n=e;G[n];)t+=Ft[G[n++]];return t},$e,A=e=>{throw new $e(e)};function cn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||A(`type "${o}" must have a positive integer typeid pointer`),ge.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;A(`Cannot register type '${o}' twice`)}if(ge[e]=t,delete Ge[e],Te.hasOwnProperty(e)){var s=Te[e];delete Te[e],s.forEach(u=>u())}}function re(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return cn(e,t,n)}var ne=8,un=(e,t,n,o)=>{t=q(t),re(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:ne,readValueFromPointer:function(s){return this.fromWireType(G[s])},destructorFunction:null})},ln=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),gt=e=>{function t(n){return n.$$.ptrType.registeredClass.name}A(t(e)+" instance already deleted")},wt=!1,It=e=>{},dn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Wt=e=>{e.count.value-=1;var t=e.count.value===0;t&&dn(e)},Ut=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Ut(e,t,n.baseClass);return o===null?null:n.downcast(o)},Lt={},fn=()=>Object.keys(De).length,hn=()=>{var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e},xe=[],bt=()=>{for(;xe.length;){var e=xe.pop();e.$$.deleteScheduled=!1,e.delete()}},je,pn=e=>{je=e,xe.length&&je&&je(bt)},vn=()=>{a.getInheritedInstanceCount=fn,a.getLiveInheritedInstances=hn,a.flushPendingDeletes=bt,a.setDelayFunction=pn},De={},mn=(e,t)=>{for(t===void 0&&A("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},yn=(e,t)=>(t=mn(e,t),De[t]),Ye=(e,t)=>{(!t.ptrType||!t.ptr)&&Je("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&Je("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Re(Object.create(e,{$$:{value:t,writable:!0}}))};function gn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=yn(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?Ye(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ye(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Lt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var p=Ut(t,this.registeredClass,d.registeredClass);return p===null?s.call(this):this.isSmartPointer?Ye(d.registeredClass.instancePrototype,{ptrType:d,ptr:p,smartPtrType:this,smartPtr:e}):Ye(d.registeredClass.instancePrototype,{ptrType:d,ptr:p})}var Re=e=>typeof FinalizationRegistry>"u"?(Re=t=>t,e):(wt=new FinalizationRegistry(t=>{Wt(t.$$)}),Re=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};wt.register(t,s,t)}return t},It=t=>wt.unregister(t),Re(e)),wn=()=>{Object.assign(qe.prototype,{isAliasOf(e){if(!(this instanceof qe)||!(e instanceof qe))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Re(Object.create(Object.getPrototypeOf(this),{$$:{value:ln(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),It(this),Wt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),xe.push(this),xe.length===1&&je&&je(bt),this.$$.deleteScheduled=!0,this}})};function qe(){}var ke=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ht=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||A(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},Ct=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&A(`Cannot register public name '${e}' twice`),Ht(a,e,e),a.hasOwnProperty(n)&&A(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},bn=48,Cn=57,Tn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=bn&&t<=Cn?`_${e}`:e};function $n(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var Tt=(e,t,n)=>{for(;t!==n;)t.upcast||A(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Sn(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function Pn(e,t){var n;if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=Tt(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&A("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,se.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:A("Unsupporting sharing policy")}return n}function _n(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function Nt(e){return this.fromWireType(M[e>>2])}var En=()=>{Object.assign(Qe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ne,readValueFromPointer:Nt,deleteObject(e){e!==null&&e.delete()},fromWireType:gn})};function Qe(e,t,n,o,s,u,l,d,p,g,C){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=p,this.rawShare=g,this.rawDestructor=C,!s&&t.baseClass===void 0?o?(this.toWireType=Sn,this.destructorFunction=null):(this.toWireType=_n,this.destructorFunction=null):this.toWireType=Pn}var Vt=(e,t,n)=>{a.hasOwnProperty(e)||Je("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},On=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},Xe=[],Bt,H=e=>{var t=Xe[e];return t||(e>=Xe.length&&(Xe.length=e+1),Xe[e]=t=Bt.get(e)),t},Mn=(e,t,n)=>{if(e.includes("j"))return On(e,t,n);var o=H(t).apply(null,n);return o},An=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),Mn(e,t,n)}},ee=(e,t)=>{e=q(e);function n(){return e.includes("j")?An(e,t):H(t)}var o=n();return typeof o!="function"&&A(`unknown function pointer with signature ${e}: ${t}`),o},xn=(e,t)=>{var n=ke(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+`
2
- `+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},zt,Gt=e=>{var t=rr(e),n=q(t);return ce(t),n},Ke=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!ge[u]){if(Ge[u]){Ge[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new zt(`${e}: `+n.map(Gt).join([", "]))},jn=(e,t,n,o,s,u,l,d,p,g,C,P,_)=>{C=q(C),u=ee(s,u),d&&(d=ee(l,d)),g&&(g=ee(p,g)),_=ee(P,_);var E=Tn(C);Ct(E,function(){Ke(`Cannot construct ${C} due to unbound types`,[o])}),we([e,t,n],o?[o]:[],function(L){L=L[0];var B,F;o?(B=L.registeredClass,F=B.instancePrototype):F=qe.prototype;var Q=ke(C,function(){if(Object.getPrototypeOf(this)!==m)throw new $e("Use 'new' to construct "+C);if($.constructor_body===void 0)throw new $e(C+" has no accessible constructor");var lr=$.constructor_body[arguments.length];if(lr===void 0)throw new $e(`Tried to invoke ctor of ${C} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return lr.apply(this,arguments)}),m=Object.create(F,{constructor:{value:Q}});Q.prototype=m;var $=new $n(C,Q,m,_,B,u,d,g);if($.baseClass){var z,Y;(Y=(z=$.baseClass).__derivedClasses)!==null&&Y!==void 0||(z.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var Se=new Qe(C,$,!0,!1,!1),tt=new Qe(C+"*",$,!1,!1,!1),ur=new Qe(C+" const*",$,!1,!0,!1);return Lt[e]={pointerType:tt,constPointerType:ur},Vt(E,Q),[Se,tt,ur]})},$t=(e,t)=>{for(var n=[],o=0;o<e;o++)n.push(M[t+o*4>>2]);return n};function Dn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function St(e,t,n,o,s,u){var l=t.length;l<2&&A("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&n!==null,p=Dn(t),g=t[0].name!=="void",C=l-2,P=new Array(C),_=[],E=[],L=function(){arguments.length!==C&&A(`function ${e} called with ${arguments.length} arguments, expected ${C}`),E.length=0;var B;_.length=d?2:1,_[0]=s,d&&(B=t[1].toWireType(E,this),_[1]=B);for(var F=0;F<C;++F)P[F]=t[F+2].toWireType(E,arguments[F]),_.push(P[F]);var Q=o.apply(null,_);function m($){if(p)mt(E);else for(var z=d?1:2;z<t.length;z++){var Y=z===1?B:P[z-2];t[z].destructorFunction!==null&&t[z].destructorFunction(Y)}if(g)return t[0].fromWireType($)}return m(Q)};return ke(e,L)}var Rn=(e,t,n,o,s,u)=>{var l=$t(t,n);s=ee(o,s),we([],[e],function(d){d=d[0];var p=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new $e(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{Ke(`Cannot construct ${d.name} due to unbound types`,l)},we([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=St(p,g,null,s,u),[])),[]})},Jt=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},kn=(e,t,n,o,s,u,l,d,p)=>{var g=$t(n,o);t=q(t),t=Jt(t),u=ee(s,u),we([],[e],function(C){C=C[0];var P=`${C.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&C.registeredClass.pureVirtualFunctions.push(t);function _(){Ke(`Cannot call ${P} due to unbound types`,g)}var E=C.registeredClass.instancePrototype,L=E[t];return L===void 0||L.overloadTable===void 0&&L.className!==C.name&&L.argCount===n-2?(_.argCount=n-2,_.className=C.name,E[t]=_):(Ht(E,t,P),E[t].overloadTable[n-2]=_),we([],g,function(B){var F=St(P,B,C,u,l);return E[t].overloadTable===void 0?(F.argCount=n-2,E[t]=F):E[t].overloadTable[n-2]=F,[]}),[]})};function Fn(){Object.assign(Yt.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Yt(){this.allocated=[void 0],this.freelist=[]}var Z=new Yt,Pt=e=>{e>=Z.reserved&&--Z.get(e).refcount===0&&Z.free(e)},In=()=>{for(var e=0,t=Z.reserved;t<Z.allocated.length;++t)Z.allocated[t]!==void 0&&++e;return e},Wn=()=>{Z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Z.reserved=Z.allocated.length,a.count_emval_handles=In},se={toValue:e=>(e||A("Cannot use deleted val. handle = "+e),Z.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Z.allocate({refcount:1,value:e})}}},Un=(e,t)=>{t=q(t),re(e,{name:t,fromWireType:n=>{var o=se.toValue(n);return Pt(n),o},toWireType:(n,o)=>se.toHandle(o),argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:null})},Ln=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(W[o>>0])}:function(o){return this.fromWireType(G[o>>0])};case 2:return n?function(o){return this.fromWireType(le[o>>1])}:function(o){return this.fromWireType(k[o>>1])};case 4:return n?function(o){return this.fromWireType(O[o>>2])}:function(o){return this.fromWireType(M[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Hn=(e,t,n,o)=>{t=q(t);function s(){}s.values={},re(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:ne,readValueFromPointer:Ln(t,n,o),destructorFunction:null}),Ct(t,s)},_t=(e,t)=>{var n=ge[e];return n===void 0&&A(t+" has unknown type "+Gt(e)),n},Nn=(e,t,n)=>{var o=_t(e,"enum");t=q(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:ke(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},Et=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},Vn=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(de[n>>2])};case 8:return function(n){return this.fromWireType(oe[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Bn=(e,t,n)=>{t=q(t),re(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:ne,readValueFromPointer:Vn(t,n),destructorFunction:null})},zn=(e,t,n,o,s,u,l)=>{var d=$t(t,n);e=q(e),e=Jt(e),s=ee(o,s),Ct(e,function(){Ke(`Cannot call ${e} due to unbound types`,d)},t-1),we([],d,function(p){var g=[p[0],null].concat(p.slice(1));return Vt(e,St(e,g,null,s,u),t-1),[]})},Gn=(e,t,n)=>{switch(t){case 1:return n?o=>W[o>>0]:o=>G[o>>0];case 2:return n?o=>le[o>>1]:o=>k[o>>1];case 4:return n?o=>O[o>>2]:o=>M[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Jn=(e,t,n,o,s)=>{t=q(t);var u=C=>C;if(o===0){var l=32-8*n;u=C=>C<<l>>>l}var d=t.includes("unsigned"),p=(C,P)=>{},g;d?g=function(C,P){return p(P,this.name),P>>>0}:g=function(C,P){return p(P,this.name),P},re(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:ne,readValueFromPointer:Gn(t,n,o!==0),destructorFunction:null})},Yn=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=M[l>>2],p=M[l+4>>2];return new s(W.buffer,p,d)}n=q(n),re(e,{name:n,fromWireType:u,argPackAdvance:ne,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},qt=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},qn=(e,t,n)=>qt(e,G,t,n),Qt=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o<=127?t++:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,++n):t+=3}return t},Xt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Qn=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&Xt)return Xt.decode(e.subarray(t,s));for(var u="";t<s;){var l=e[t++];if(!(l&128)){u+=String.fromCharCode(l);continue}var d=e[t++]&63;if((l&224)==192){u+=String.fromCharCode((l&31)<<6|d);continue}var p=e[t++]&63;if((l&240)==224?l=(l&15)<<12|d<<6|p:l=(l&7)<<18|d<<12|p<<6|e[t++]&63,l<65536)u+=String.fromCharCode(l);else{var g=l-65536;u+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return u},Ot=(e,t)=>e?Qn(G,e,t):"",Xn=(e,t)=>{t=q(t);var n=t==="std::string";re(e,{name:t,fromWireType(o){var s=M[o>>2],u=o+4,l;if(n)for(var d=u,p=0;p<=s;++p){var g=u+p;if(p==s||G[g]==0){var C=g-d,P=Ot(d,C);l===void 0?l=P:(l+="\0",l+=P),d=g+1}}else{for(var _=new Array(s),p=0;p<s;++p)_[p]=String.fromCharCode(G[u+p]);l=_.join("")}return ce(o),l},toWireType(o,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var u,l=typeof s=="string";l||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||A("Cannot pass non-string to std::string"),n&&l?u=Qt(s):u=s.length;var d=xt(4+u+1),p=d+4;if(M[d>>2]=u,n&&l)qn(s,p,u+1);else if(l)for(var g=0;g<u;++g){var C=s.charCodeAt(g);C>255&&(ce(p),A("String has UTF-16 code units that do not fit in 8 bits")),G[p+g]=C}else for(var g=0;g<u;++g)G[p+g]=s[g];return o!==null&&o.push(ce,d),d},argPackAdvance:ne,readValueFromPointer:Nt,destructorFunction(o){ce(o)}})},Kt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Kn=(e,t)=>{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&k[o];)++o;if(n=o<<1,n-e>32&&Kt)return Kt.decode(G.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=le[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},Zn=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n<e.length*2?n/2:e.length,l=0;l<u;++l){var d=e.charCodeAt(l);le[t>>1]=d,t+=2}return le[t>>1]=0,t-s},ea=e=>e.length*2,ta=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=O[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},ra=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(O[t>>2]=d,t+=4,t+4>u)break}return O[t>>2]=0,t-s},na=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o>=55296&&o<=57343&&++n,t+=4}return t},aa=(e,t,n)=>{n=q(n);var o,s,u,l,d;t===2?(o=Kn,s=Zn,l=ea,u=()=>k,d=1):t===4&&(o=ta,s=ra,l=na,u=()=>M,d=2),re(e,{name:n,fromWireType:p=>{for(var g=M[p>>2],C=u(),P,_=p+4,E=0;E<=g;++E){var L=p+4+E*t;if(E==g||C[L>>d]==0){var B=L-_,F=o(_,B);P===void 0?P=F:(P+="\0",P+=F),_=L+t}}return ce(p),P},toWireType:(p,g)=>{typeof g!="string"&&A(`Cannot pass non-string to C++ string type ${n}`);var C=l(g),P=xt(4+C+t);return M[P>>2]=C>>d,s(g,P+4,C+t),p!==null&&p.push(ce,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction(p){ce(p)}})},oa=(e,t,n,o,s,u)=>{ze[e]={name:q(t),rawConstructor:ee(n,o),rawDestructor:ee(s,u),fields:[]}},ia=(e,t,n,o,s,u,l,d,p,g)=>{ze[e].fields.push({fieldName:q(t),getterReturnType:n,getter:ee(o,s),getterContext:u,setterArgumentType:l,setter:ee(d,p),setterContext:g})},sa=(e,t)=>{t=q(t),re(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Mt=[],ca=(e,t,n,o)=>(e=Mt[e],t=se.toValue(t),e(null,t,n,o)),ua={},la=e=>{var t=ua[e];return t===void 0?q(e):t},Zt=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},da=e=>e===0?se.toHandle(Zt()):(e=la(e),se.toHandle(Zt()[e])),fa=e=>{var t=Mt.length;return Mt.push(e),t},ha=(e,t)=>{for(var n=new Array(e),o=0;o<e;++o)n[o]=_t(M[t+o*4>>2],"parameter "+o);return n},pa=Reflect.construct,va=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(M[t>>2]=se.toHandle(o)),s},ma=(e,t,n)=>{var o=ha(e,t),s=o.shift();e--;var u=new Array(e),l=(p,g,C,P)=>{for(var _=0,E=0;E<e;++E)u[E]=o[E].readValueFromPointer(P+_),_+=o[E].argPackAdvance;for(var L=n===1?pa(g,u):g.apply(p,u),E=0;E<e;++E){var B,F;(B=(F=o[E]).deleteObject)===null||B===void 0||B.call(F,u[E])}return va(s,C,L)},d=`methodCaller<(${o.map(p=>p.name).join(", ")}) => ${s.name}>`;return fa(ke(d,l))},ya=e=>{e>4&&(Z.get(e).refcount+=1)},ga=e=>{var t=se.toValue(e);mt(t),Pt(e)},wa=(e,t)=>{e=_t(e,"_emval_take_value");var n=e.readValueFromPointer(t);return se.toHandle(n)},ba=()=>{K("")},Ca=(e,t,n)=>G.copyWithin(e,t,t+n),Ta=()=>2147483648,$a=e=>{var t=x.buffer,n=(e-t.byteLength+65535)/65536;try{return x.grow(n),be(),1}catch{}},Sa=e=>{var t=G.length;e>>>=0;var n=Ta();if(e>n)return!1;for(var o=(p,g)=>p+(g-p%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=$a(l);if(d)return!0}return!1},At={},Pa=()=>y||"./this.program",Fe=()=>{if(!Fe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Pa()};for(var n in At)At[n]===void 0?delete t[n]:t[n]=At[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);Fe.strings=o}return Fe.strings},_a=(e,t)=>{for(var n=0;n<e.length;++n)W[t++>>0]=e.charCodeAt(n);W[t>>0]=0},Ea=(e,t)=>{var n=0;return Fe().forEach((o,s)=>{var u=t+n;M[e+s*4>>2]=u,_a(o,u),n+=o.length+1}),0},Oa=(e,t)=>{var n=Fe();M[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),M[t>>2]=o,0},Ma=e=>e,Ze=e=>e%4===0&&(e%100!==0||e%400===0),Aa=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},er=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],xa=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=Ze(n.getFullYear()),s=n.getMonth(),u=(o?er:tr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function ja(e,t,n){var o=Qt(e)+1,s=new Array(o);return qt(e,s,0,s.length),s}var Da=(e,t)=>{W.set(e,t)},Ra=(e,t,n,o)=>{var s=M[o+40>>2],u={tm_sec:O[o>>2],tm_min:O[o+4>>2],tm_hour:O[o+8>>2],tm_mday:O[o+12>>2],tm_mon:O[o+16>>2],tm_year:O[o+20>>2],tm_wday:O[o+24>>2],tm_yday:O[o+28>>2],tm_isdst:O[o+32>>2],tm_gmtoff:O[o+36>>2],tm_zone:s?Ot(s):""},l=Ot(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in d)l=l.replace(new RegExp(p,"g"),d[p]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],C=["January","February","March","April","May","June","July","August","September","October","November","December"];function P(m,$,z){for(var Y=typeof m=="number"?m.toString():m||"";Y.length<$;)Y=z[0]+Y;return Y}function _(m,$){return P(m,$,"0")}function E(m,$){function z(Se){return Se<0?-1:Se>0?1:0}var Y;return(Y=z(m.getFullYear()-$.getFullYear()))===0&&(Y=z(m.getMonth()-$.getMonth()))===0&&(Y=z(m.getDate()-$.getDate())),Y}function L(m){switch(m.getDay()){case 0:return new Date(m.getFullYear()-1,11,29);case 1:return m;case 2:return new Date(m.getFullYear(),0,3);case 3:return new Date(m.getFullYear(),0,2);case 4:return new Date(m.getFullYear(),0,1);case 5:return new Date(m.getFullYear()-1,11,31);case 6:return new Date(m.getFullYear()-1,11,30)}}function B(m){var $=xa(new Date(m.tm_year+1900,0,1),m.tm_yday),z=new Date($.getFullYear(),0,4),Y=new Date($.getFullYear()+1,0,4),Se=L(z),tt=L(Y);return E(Se,$)<=0?E(tt,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var F={"%a":m=>g[m.tm_wday].substring(0,3),"%A":m=>g[m.tm_wday],"%b":m=>C[m.tm_mon].substring(0,3),"%B":m=>C[m.tm_mon],"%C":m=>{var $=m.tm_year+1900;return _($/100|0,2)},"%d":m=>_(m.tm_mday,2),"%e":m=>P(m.tm_mday,2," "),"%g":m=>B(m).toString().substring(2),"%G":m=>B(m),"%H":m=>_(m.tm_hour,2),"%I":m=>{var $=m.tm_hour;return $==0?$=12:$>12&&($-=12),_($,2)},"%j":m=>_(m.tm_mday+Aa(Ze(m.tm_year+1900)?er:tr,m.tm_mon-1),3),"%m":m=>_(m.tm_mon+1,2),"%M":m=>_(m.tm_min,2),"%n":()=>`
3
- `,"%p":m=>m.tm_hour>=0&&m.tm_hour<12?"AM":"PM","%S":m=>_(m.tm_sec,2),"%t":()=>" ","%u":m=>m.tm_wday||7,"%U":m=>{var $=m.tm_yday+7-m.tm_wday;return _(Math.floor($/7),2)},"%V":m=>{var $=Math.floor((m.tm_yday+7-(m.tm_wday+6)%7)/7);if((m.tm_wday+371-m.tm_yday-2)%7<=2&&$++,$){if($==53){var z=(m.tm_wday+371-m.tm_yday)%7;z!=4&&(z!=3||!Ze(m.tm_year))&&($=1)}}else{$=52;var Y=(m.tm_wday+7-m.tm_yday-1)%7;(Y==4||Y==5&&Ze(m.tm_year%400-1))&&$++}return _($,2)},"%w":m=>m.tm_wday,"%W":m=>{var $=m.tm_yday+7-(m.tm_wday+6)%7;return _(Math.floor($/7),2)},"%y":m=>(m.tm_year+1900).toString().substring(2),"%Y":m=>m.tm_year+1900,"%z":m=>{var $=m.tm_gmtoff,z=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(z?"+":"-")+("0000"+$).slice(-4)},"%Z":m=>m.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var p in F)l.includes(p)&&(l=l.replace(new RegExp(p,"g"),F[p](u)));l=l.replace(/\0\0/g,"%");var Q=ja(l);return Q.length>t?0:(Da(Q,e),Q.length-1)},ka=(e,t,n,o,s)=>Ra(e,t,n,o);kt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},sn(),$e=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},wn(),vn(),En(),zt=a.UnboundTypeError=xn(Error,"UnboundTypeError"),Fn(),Wn();var Fa={s:qr,u:Qr,b:Kr,g:Zr,q:en,J:tn,f:rn,V:nn,d:Xr,da:an,Q:on,_:un,ca:jn,ba:Rn,w:kn,Y:Un,x:Hn,h:Nn,L:Bn,M:zn,t:Jn,o:Yn,K:Xn,C:aa,A:oa,ea:ia,$:sa,R:ca,ha:Pt,fa:da,Z:ma,N:ya,O:ga,aa:wa,B:ba,X:Ca,W:Sa,T:Ea,U:Oa,E:Ka,D:Ha,F:Xa,n:Za,a:Ia,e:Va,m:La,k:za,H:qa,v:Ja,G:Qa,z:to,P:no,l:Ba,j:Na,c:Ua,p:Wa,I:Ya,r:eo,i:Ga,y:ro,ga:Ma,S:ka},J=Yr(),ce=a._free=e=>(ce=a._free=J.ka)(e),xt=a._malloc=e=>(xt=a._malloc=J.la)(e),rr=e=>(rr=J.na)(e),U=(e,t)=>(U=J.oa)(e,t),Ie=e=>(Ie=J.pa)(e),N=()=>(N=J.qa)(),V=e=>(V=J.ra)(e),nr=e=>(nr=J.sa)(e),ar=e=>(ar=J.ta)(e),or=(e,t,n)=>(or=J.ua)(e,t,n),ir=e=>(ir=J.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=J.wa)(e,t,n,o,s,u,l);var sr=a.dynCall_jiiii=(e,t,n,o,s)=>(sr=a.dynCall_jiiii=J.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=J.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,p)=>(a.dynCall_iiiiijj=J.za)(e,t,n,o,s,u,l,d,p),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,p,g)=>(a.dynCall_iiiiiijj=J.Aa)(e,t,n,o,s,u,l,d,p,g);function Ia(e,t){var n=N();try{return H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Wa(e,t,n,o){var s=N();try{H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ua(e,t,n){var o=N();try{H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function La(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ha(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Na(e,t){var n=N();try{H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Va(e,t,n){var o=N();try{return H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function Ba(e){var t=N();try{H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function za(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Ga(e,t,n,o,s,u,l,d,p,g,C){var P=N();try{H(e)(t,n,o,s,u,l,d,p,g,C)}catch(_){if(V(P),_!==_+0)throw _;U(1,0)}}function Ja(e,t,n,o,s,u,l){var d=N();try{return H(e)(t,n,o,s,u,l)}catch(p){if(V(d),p!==p+0)throw p;U(1,0)}}function Ya(e,t,n,o,s){var u=N();try{H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function qa(e,t,n,o,s,u){var l=N();try{return H(e)(t,n,o,s,u)}catch(d){if(V(l),d!==d+0)throw d;U(1,0)}}function Qa(e,t,n,o,s,u,l,d){var p=N();try{return H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function Xa(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ka(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Za(e){var t=N();try{return H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function eo(e,t,n,o,s,u,l,d){var p=N();try{H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function to(e,t,n,o,s,u,l,d,p,g,C,P){var _=N();try{return H(e)(t,n,o,s,u,l,d,p,g,C,P)}catch(E){if(V(_),E!==E+0)throw E;U(1,0)}}function ro(e,t,n,o,s,u,l,d,p,g,C,P,_,E,L,B){var F=N();try{H(e)(t,n,o,s,u,l,d,p,g,C,P,_,E,L,B)}catch(Q){if(V(F),Q!==Q+0)throw Q;U(1,0)}}function no(e,t,n,o,s){var u=N();try{return sr(e,t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}var et;ye=function e(){et||cr(),et||(ye=e)};function cr(){if(te>0||(Ue(),te>0))return;function e(){et||(et=!0,a.calledRun=!0,!I&&(it(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),st()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return cr(),i.ready}})();function xo(r){return Dt(Rt,r)}async function jo(r,i){return Mo(Rt,r,i)}async function Do(r,i){return Ao(Rt,r,i)}var We;class Dr extends EventTarget{constructor(i={}){var a;super(),ao(this,We,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!nt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),oo(this,We,c??[]),xo().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw fr(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return io.filter(i=>i!=="unknown")}async detect(i){try{const a=await po(i);if(a===null)return[];let c;try{Mr(a)?c=await jo(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))}):c=await Do(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:v,y},topRight:{x:S,y:h},bottomLeft:{x:w,y:T},bottomRight:{x:b,y:j}}=f.position,D=Math.min(v,S,w,b),x=Math.min(y,h,T,j),I=Math.max(v,S,w,b),W=Math.max(y,h,T,j);return{boundingBox:new DOMRectReadOnly(D,x,I-D,W-x),rawValue:f.text,format:so(f.format),cornerPoints:[{x:v,y},{x:S,y:h},{x:b,y:j},{x:w,y:T}]}})}catch(a){throw fr(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}We=new WeakMap;const Rr=(r,i,a="error")=>{let c,f;const v=new Promise((y,S)=>{c=y,f=S,r.addEventListener(i,c),r.addEventListener(a,f)});return v.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),v},mr=r=>new Promise(i=>setTimeout(i,r));class kr extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Ro extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class ko extends Error{constructor(){super("Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let jt;const Fo=r=>{jt=new Dr({formats:r})},Io=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{jt=new Dr({formats:f});const v=y=>async S=>{if(r.readyState>1){const{lastScanned:h,contentBefore:w,lastScanHadContent:T}=y;if(S-h<c)window.requestAnimationFrame(v(y));else{const b=await jt.detect(r),j=b.some(I=>!w.includes(I.rawValue));j&&i(b);const D=b.length>0;D&&a(b),!D&&T&&a(b);const x={lastScanned:S,lastScanHadContent:D,contentBefore:j?b.map(I=>I.rawValue):w};window.requestAnimationFrame(v(x))}}};v({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var Fr={},X={};Object.defineProperty(X,"__esModule",{value:!0});X.compactObject=Ur;X.deprecated=Go;var Wo=X.detectBrowser=Jo;X.disableLog=Vo;X.disableWarnings=Bo;X.extractVersion=at;X.filterStats=Yo;X.log=zo;X.walkStats=ot;X.wrapPeerConnectionEvent=No;function Uo(r,i,a){return i=Lo(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function Lo(r){var i=Ho(r,"string");return ve(i)==="symbol"?i:String(i)}function Ho(r,i){if(ve(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(ve(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function ve(r){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ve(r)}var Ir=!0,Wr=!0;function at(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function No(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(y,S){if(y!==i)return f.apply(this,arguments);var h=function(w){var T=a(w);T&&(S.handleEvent?S.handleEvent(T):S(T))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(S,h),f.apply(this,[y,h])};var v=c.removeEventListener;c.removeEventListener=function(y,S){if(y!==i||!this._eventMap||!this._eventMap[i])return v.apply(this,arguments);if(!this._eventMap[i].has(S))return v.apply(this,arguments);var h=this._eventMap[i].get(S);return this._eventMap[i].delete(S),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,v.apply(this,[y,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(y){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),y&&this.addEventListener(i,this["_on"+i]=y)},enumerable:!0,configurable:!0})}}function Vo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Ir=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Bo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Wr=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function zo(){if((typeof window>"u"?"undefined":ve(window))==="object"){if(Ir)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Go(r,i){Wr&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Jo(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=at(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=at(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=at(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function yr(r){return Object.prototype.toString.call(r)==="[object Object]"}function Ur(r){return yr(r)?Object.keys(r).reduce(function(i,a){var c=yr(r[a]),f=c?Ur(r[a]):r[a],v=c&&!Object.keys(f).length;return f===void 0||v?i:Object.assign(i,Uo({},a,f))},{}):r}function ot(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ot(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ot(r,r.get(f),a)})}))}function Yo(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var v=[];return r.forEach(function(y){y.type==="track"&&y.trackIdentifier===i.id&&v.push(y)}),v.forEach(function(y){r.forEach(function(S){S.type===c&&S.trackId===y.id&&ot(r,S,f)})}),f}Object.defineProperty(Fr,"__esModule",{value:!0});var qo=Fr.shimGetUserMedia=Ko,Qo=Xo(X);function Lr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Lr=function(c){return c?a:i})(r)}function Xo(r,i){if(r&&r.__esModule)return r;if(r===null||pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Lr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function pe(r){"@babel/helpers - typeof";return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},pe(r)}var gr=Qo.log;function Ko(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(pe(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(T){if(!(T==="require"||T==="advanced"||T==="mediaSource")){var b=pe(h[T])==="object"?h[T]:{ideal:h[T]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var j=function(x,I){return x?x+I.charAt(0).toUpperCase()+I.slice(1):I==="deviceId"?"sourceId":I};if(b.ideal!==void 0){w.optional=w.optional||[];var D={};typeof b.ideal=="number"?(D[j("min",T)]=b.ideal,w.optional.push(D),D={},D[j("max",T)]=b.ideal,w.optional.push(D)):(D[j("",T)]=b.ideal,w.optional.push(D))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[j("",T)]=b.exact):["min","max"].forEach(function(x){b[x]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[j(x,T)]=b[x])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&pe(h.audio)==="object"){var T=function(x,I,W){I in x&&!(W in x)&&(x[W]=x[I],delete x[I])};h=JSON.parse(JSON.stringify(h)),T(h.audio,"autoGainControl","googAutoGainControl"),T(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&pe(h.video)==="object"){var b=h.video.facingMode;b=b&&(pe(b)==="object"?b:{ideal:b});var j=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!j)){delete h.video.facingMode;var D;if(b.exact==="environment"||b.ideal==="environment"?D=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(D=["front"]),D)return a.mediaDevices.enumerateDevices().then(function(x){x=x.filter(function(W){return W.kind==="videoinput"});var I=x.find(function(W){return D.some(function(G){return W.label.toLowerCase().includes(G)})});return!I&&x.length&&D.includes("back")&&(I=x[x.length-1]),I&&(h.video.deviceId=b.exact?{exact:I.deviceId}:{ideal:I.deviceId}),h.video=c(h.video),gr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return gr("chrome: "+JSON.stringify(h)),w(h)},v=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},y=function(h,w,T){f(h,function(b){a.webkitGetUserMedia(b,w,function(j){T&&T(v(j))})})};if(a.getUserMedia=y.bind(a),a.mediaDevices.getUserMedia){var S=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return S(w).then(function(T){if(w.audio&&!T.getAudioTracks().length||w.video&&!T.getVideoTracks().length)throw T.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return T},function(T){return Promise.reject(v(T))})})}}}}var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});var Zo=Hr.shimGetUserMedia=ri,ei=ti(X);function Nr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Nr=function(c){return c?a:i})(r)}function ti(r,i){if(r&&r.__esModule)return r;if(r===null||Pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Nr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function Pe(r){"@babel/helpers - typeof";return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Pe(r)}function ri(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,T){ei.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,T)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,T){w in h&&!(T in h)&&(h[T]=h[w],delete h[w])},v=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return Pe(h)==="object"&&Pe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),v(h)},c&&c.prototype.getSettings){var y=c.prototype.getSettings;c.prototype.getSettings=function(){var h=y.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var S=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&Pe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),S.apply(this,[h])}}}}var ae={};Object.defineProperty(ae,"__esModule",{value:!0});ae.shimAudioContext=fi;ae.shimCallbacksAPI=si;ae.shimConstraints=zr;ae.shimCreateOfferLegacy=di;var ni=ae.shimGetUserMedia=ci;ae.shimLocalStreamsAPI=oi;ae.shimRTCIceServerUrls=ui;ae.shimRemoteStreamsAPI=ii;ae.shimTrackEventTransceiver=li;var Vr=ai(X);function Br(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Br=function(c){return c?a:i})(r)}function ai(r,i){if(r&&r.__esModule)return r;if(r===null||me(r)!=="object"&&typeof r!="function")return{default:r};var a=Br(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function me(r){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},me(r)}function oi(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,v=new Array(f>1?f-1:0),y=1;y<f;y++)v[y-1]=arguments[y];return v&&v.forEach(function(S){c._localStreams?c._localStreams.includes(S)||c._localStreams.push(S):c._localStreams=[S]}),i.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(a){var c=this;this._localStreams||(this._localStreams=[]);var f=this._localStreams.indexOf(a);if(f!==-1){this._localStreams.splice(f,1);var v=a.getTracks();this.getSenders().forEach(function(y){v.includes(y.track)&&c.removeTrack(y)})}})}}function ii(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(a){var c=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=a),this.addEventListener("track",this._onaddstreampoly=function(f){f.streams.forEach(function(v){if(c._remoteStreams||(c._remoteStreams=[]),!c._remoteStreams.includes(v)){c._remoteStreams.push(v);var y=new Event("addstream");y.stream=v,c.dispatchEvent(y)}})})}});var i=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){var a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(c){c.streams.forEach(function(f){if(a._remoteStreams||(a._remoteStreams=[]),!(a._remoteStreams.indexOf(f)>=0)){a._remoteStreams.push(f);var v=new Event("addstream");v.stream=f,a.dispatchEvent(v)}})}),i.apply(a,arguments)}}}function si(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,v=i.setRemoteDescription,y=i.addIceCandidate;i.createOffer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b};var S=function(h,w,T){var b=f.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b};i.setLocalDescription=S,S=function(h,w,T){var b=v.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.setRemoteDescription=S,S=function(h,w,T){var b=y.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.addIceCandidate=S}}function ci(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(zr(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,v,y){i.mediaDevices.getUserMedia(f).then(v,y)}).bind(i))}function zr(r){return r&&r.video!==void 0?Object.assign({},r,{video:Vr.compactObject(r.video)}):r}function ui(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],v=0;v<a.iceServers.length;v++){var y=a.iceServers[v];y.urls===void 0&&y.url?(Vr.deprecated("RTCIceServer.url","RTCIceServer.urls"),y=JSON.parse(JSON.stringify(y)),y.urls=y.url,delete y.url,f.push(y)):f.push(a.iceServers[v])}a.iceServers=f}return new i(a,c)},r.RTCPeerConnection.prototype=i.prototype,"generateCertificate"in i&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:function(){return i.generateCertificate}})}}function li(r){me(r)==="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function di(r){var i=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(a){if(a){typeof a.offerToReceiveAudio<"u"&&(a.offerToReceiveAudio=!!a.offerToReceiveAudio);var c=this.getTransceivers().find(function(v){return v.receiver.track.kind==="audio"});a.offerToReceiveAudio===!1&&c?c.direction==="sendrecv"?c.setDirection?c.setDirection("sendonly"):c.direction="sendonly":c.direction==="recvonly"&&(c.setDirection?c.setDirection("inactive"):c.direction="inactive"):a.offerToReceiveAudio===!0&&!c&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);var f=this.getTransceivers().find(function(v){return v.receiver.track.kind==="video"});a.offerToReceiveVideo===!1&&f?f.direction==="sendrecv"?f.setDirection?f.setDirection("sendonly"):f.direction="sendonly":f.direction==="recvonly"&&(f.setDirection?f.setDirection("inactive"):f.direction="inactive"):a.offerToReceiveVideo===!0&&!f&&this.addTransceiver("video",{direction:"recvonly"})}return i.apply(this,arguments)}}function fi(r){me(r)!=="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}const hi=r=>{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function ue(r,i){if(r===!1)throw new Error(i??"assertion failure")}const pi=hi(()=>{const r=Wo(window);switch(r.browser){case"chrome":qo(window,r);break;case"firefox":Zo(window,r);break;case"safari":ni(window,r);break;default:throw new kr}});let _e=Promise.resolve({type:"stop",data:{}});async function wr(r,i,a){var c,f,v;if(window.isSecureContext!==!0)throw new Ro;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new kr;pi();const y=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=y:r.mozSrcObject!==void 0?r.mozSrcObject=y:window.URL.createObjectURL?r.src=window.URL.createObjectURL(y):window.webkitURL?r.src=window.webkitURL.createObjectURL(y):r.src=y.id,r.play(),await Promise.race([Rr(r,"loadeddata"),mr(3e3).then(()=>{throw new ko})]),await mr(500);const[S]=y.getVideoTracks(),h=(v=(f=S==null?void 0:S.getCapabilities)==null?void 0:f.call(S))!=null?v:{};let w=!1;return a&&h.torch&&(await S.applyConstraints({advanced:[{torch:!0}]}),w=!0),{type:"start",data:{videoEl:r,stream:y,capabilities:h,constraints:i,isTorchOn:w}}}async function vi(r,{constraints:i,torch:a,restart:c=!1}){_e=_e.then(v=>{if(v.type==="start"){const{data:{videoEl:y,stream:S,constraints:h,isTorchOn:w}}=v;return!c&&r===y&&i===h&&a===w?v:Gr(y,S,w).then(()=>wr(r,i,a))}return wr(r,i,a)});const f=await _e;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");return f.data.capabilities}async function Gr(r,i,a){r.src="",r.srcObject=null,r.load(),await Rr(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function rt(){if(_e=_e.then(r=>{if(r.type==="stop")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return Gr(i,a,c)}),(await _e).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const mi=R.defineComponent({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=R.ref(a.constraints),v=R.ref(a.formats);R.watch(()=>a.constraints,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(f.value=k)},{deep:!0}),R.watch(()=>a.formats,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(v.value=k)},{deep:!0});const y=R.ref(),S=R.ref(),h=R.ref(),w=R.ref(!1),T=R.ref(!1);R.onMounted(()=>{T.value=!0}),R.onUnmounted(()=>{rt()});const b=R.computed(()=>({torch:a.torch,constraints:f.value,shouldStream:T.value&&!a.paused}));R.watch(b,async k=>{const O=h.value;ue(O!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const M=y.value;ue(M!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const de=M.getContext("2d");if(ue(de!==null,"if cavnas is defined, canvas 2d context should also be non-null"),k.shouldStream){rt(),w.value=!1;try{const oe=await vi(O,k);T.value?(w.value=!0,c("camera-on",oe)):await rt()}catch(oe){c("error",oe)}}else M.width=O.videoWidth,M.height=O.videoHeight,de.drawImage(O,0,0,O.videoWidth,O.videoHeight),rt(),w.value=!1,c("camera-off")},{deep:!0}),R.watch(v,k=>{T.value&&Fo(k)});const j=R.computed(()=>b.value.shouldStream&&w.value);R.watch(j,k=>{if(k){ue(y.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),D(y.value),ue(S.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),D(S.value);const O=()=>a.track===void 0?500:40;ue(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),Io(h.value,{detectHandler:M=>c("detect",M),formats:v.value,locateHandler:x,minDelay:O()})}});const D=k=>{const O=k.getContext("2d");ue(O!==null,"canvas 2d context should always be non-null"),O.clearRect(0,0,k.width,k.height)},x=k=>{const O=S.value;ue(O!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const M=h.value;if(ue(M!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),k.length===0||a.track===void 0)D(O);else{const de=M.offsetWidth,oe=M.offsetHeight,be=M.videoWidth,Ce=M.videoHeight,Oe=Math.max(de/be,oe/Ce),Me=be*Oe,Ue=Ce*Oe,it=Me/be,st=Ue/Ce,ct=(de-Me)/2,ut=(oe-Ue)/2,Ae=({x:fe,y:K})=>({x:Math.floor(fe*it),y:Math.floor(K*st)}),te=({x:fe,y:K})=>({x:Math.floor(fe+ct),y:Math.floor(K+ut)}),ye=k.map(fe=>{const{boundingBox:K,cornerPoints:dt}=fe,{x:Le,y:he}=te(Ae({x:K.x,y:K.y})),{x:He,y:ft}=Ae({x:K.width,y:K.height});return{...fe,cornerPoints:dt.map(Ne=>te(Ae(Ne))),boundingBox:DOMRectReadOnly.fromRect({x:Le,y:he,width:He,height:ft})}});O.width=M.offsetWidth,O.height=M.offsetHeight;const lt=O.getContext("2d");a.track(ye,lt)}},I={width:"100%",height:"100%",position:"relative","z-index":"0"},W={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},G={width:"100%",height:"100%","object-fit":"cover"},le=R.computed(()=>j.value?G:{...G,visibility:"hidden",position:"absolute"});return(k,O)=>(R.openBlock(),R.createElementBlock("div",{style:I},[R.createElementVNode("video",{ref_key:"videoRef",ref:h,style:R.normalizeStyle(le.value),autoplay:"",muted:"",playsinline:""},null,4),R.withDirectives(R.createElementVNode("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:y,style:G},null,512),[[R.vShow,!j.value]]),R.createElementVNode("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:S,style:W},null,512),R.createElementVNode("div",{style:W},[R.renderSlot(k.$slots,"default")])]))}});exports.QrcodeStream=mi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("vue");var Cr=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},dr=(r,i,a)=>(Cr(r,i,"read from private field"),a?a.call(r):i.get(r)),oo=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},io=(r,i,a,c)=>(Cr(r,i,"write to private field"),i.set(r,a),a);const Tr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],so=[...Tr,["unknown"]].map(r=>r[0]),nt=new Map(Tr);function co(r){for(const[i,a]of nt)if(r===a)return i;return"unknown"}function uo(r){if($r(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Sr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Pr(r))return{width:r.videoWidth,height:r.videoHeight};if(Er(r))return{width:r.width,height:r.height};if(Mr(r))return{width:r.displayWidth,height:r.displayHeight};if(_r(r))return{width:r.width,height:r.height};if(Or(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function $r(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Sr(r){try{return r instanceof SVGImageElement}catch{return!1}}function Pr(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function _r(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function Er(r){try{return r instanceof ImageBitmap}catch{return!1}}function Or(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Mr(r){try{return r instanceof VideoFrame}catch{return!1}}function Ar(r){try{return r instanceof Blob}catch{return!1}}function lo(r){try{return r instanceof ImageData}catch{return!1}}function fo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function xr(r){if($r(r)&&!await mo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Sr(r)&&!await yo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Mr(r)&&go(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Pr(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Er(r)&&bo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=uo(r);if(i===0||a===0)return null;const c=fo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ho(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await xr(i)}function po(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function vo(r){if(Ar(r))return await ho(r);if(lo(r)){if(wo(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return _r(r)||Or(r)?po(r):await xr(r)}async function mo(r){try{return await r.decode(),!0}catch{return!1}}async function yo(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function go(r){return r.format===null}function wo(r){return r.data.buffer.byteLength===0}function bo(r){return r.width===0&&r.height===0}function fr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const hr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Co(r){return r.join("|")}function To(r){const i=pr(r);let a=0,c=hr.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),v=hr[f],y=pr(v);if(y===i)return v;y<i?a=f+1:c=f-1}return"None"}function pr(r){return r.toLowerCase().replace(/_-\[\]/g,"")}function $o(r,i){return r.Binarizer[i]}function So(r,i){return r.CharacterSet[i]}const Po=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function _o(r){return Po[r.value]}function Eo(r,i){return r.EanAddOnSymbol[i]}function Oo(r,i){return r.TextMode[i]}const Ee={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function jr(r,i){return{...i,formats:Co(i.formats),binarizer:$o(r,i.binarizer),eanAddOnSymbol:Eo(r,i.eanAddOnSymbol),textMode:Oo(r,i.textMode),characterSet:So(r,i.characterSet)}}function Dr(r){return{...r,format:To(r.format),eccLevel:r.eccLevel,contentType:_o(r.contentType)}}const Mo={locateFile:(r,i)=>{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let vr=new WeakMap;function Dt(r,i){var a;const c=vr.get(r);if(c!=null&&c.modulePromise&&i===void 0)return c.modulePromise;const f=(a=c==null?void 0:c.moduleOverrides)!=null?a:Mo,v=r({...f});return vr.set(r,{moduleOverrides:f,modulePromise:v}),v}async function Ao(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{size:v}=i,y=new Uint8Array(await i.arrayBuffer()),S=f._malloc(v);f.HEAPU8.set(y,S);const h=f.readBarcodesFromImage(S,v,jr(f,c));f._free(S);const w=[];for(let T=0;T<h.size();++T)w.push(Dr(h.get(T)));return w}async function xo(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{data:v,width:y,height:S,data:{byteLength:h}}=i,w=f._malloc(h);f.HEAPU8.set(v,w);const T=f.readBarcodesFromPixmap(w,y,S,jr(f,c));f._free(w);const b=[];for(let j=0;j<T.size();++j)b.push(Dr(T.get(j)));return b}({...Ee,formats:[...Ee.formats]});var Rt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var v=Object.assign({},a),y="./this.program",S=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function T(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(S||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var j=a.printErr||console.error.bind(console);Object.assign(a,v),v=null,a.arguments&&a.arguments,a.thisProgram&&(y=a.thisProgram),a.quit&&a.quit;var D;a.wasmBinary&&(D=a.wasmBinary),typeof WebAssembly!="object"&&K("no native wasm support detected");var x,I=!1,W,q,le,k,O,M,de,oe;function be(){var e=x.buffer;a.HEAP8=W=new Int8Array(e),a.HEAP16=le=new Int16Array(e),a.HEAPU8=q=new Uint8Array(e),a.HEAPU16=k=new Uint16Array(e),a.HEAP32=O=new Int32Array(e),a.HEAPU32=M=new Uint32Array(e),a.HEAPF32=de=new Float32Array(e),a.HEAPF64=oe=new Float64Array(e)}var Ce=[],Oe=[],Me=[];function Ue(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)ct(a.preRun.shift());ht(Ce)}function it(){ht(Oe)}function st(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Ae(a.postRun.shift());ht(Me)}function ct(e){Ce.unshift(e)}function ut(e){Oe.unshift(e)}function Ae(e){Me.unshift(e)}var te=0,ye=null;function lt(e){var t;te++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te)}function fe(e){var t;if(te--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te),te==0&&ye){var n=ye;ye=null,n()}}function K(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",j(e),I=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var dt="data:application/octet-stream;base64,",Le=e=>e.startsWith(dt),he;he="zxing_reader.wasm",Le(he)||(he=T(he));function He(e){if(e==he&&D)return new Uint8Array(D);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function ft(e){return!D&&(S||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>He(e)):Promise.resolve().then(()=>He(e))}function Ne(e,t,n){return ft(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{j(`failed to asynchronously prepare wasm: ${o}`),K(o)})}function Gr(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Le(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return j(`wasm streaming compile failed: ${l}`),j("falling back to ArrayBuffer instantiation"),Ne(t,n,o)})}):Ne(t,n,o)}function Yr(){var e={a:Ia};function t(o,s){return J=o.exports,x=J.ia,be(),Bt=J.ma,ut(J.ja),fe(),J}lt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){j(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return Gr(D,he,e,n).catch(f),{}}var ht=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Ve=[],Be=0,Qr=e=>{var t=new pt(e);return t.get_caught()||(t.set_caught(!0),Be--),t.set_rethrown(!1),Ve.push(t),ar(t.excPtr),t.get_exception_ptr()},ie=0,Xr=()=>{U(0,0);var e=Ve.pop();nr(e.excPtr),ie=0};function pt(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){M[this.ptr+4>>2]=t},this.get_type=function(){return M[this.ptr+4>>2]},this.set_destructor=function(t){M[this.ptr+8>>2]=t},this.get_destructor=function(){return M[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,W[this.ptr+12>>0]=t},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,W[this.ptr+13>>0]=t},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){M[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return M[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=ir(this.get_type());if(t)return M[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var Kr=e=>{throw ie||(ie=e),ie},vt=e=>{var t=ie;if(!t)return Ie(0),0;var n=new pt(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Ie(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(or(u,o,l))return Ie(u),t}return Ie(o),t},Zr=()=>vt([]),en=e=>vt([e]),tn=(e,t)=>vt([e,t]),rn=()=>{var e=Ve.pop();e||K("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ve.push(e),e.set_rethrown(!0),e.set_caught(!1),Be++),ie=t,ie},nn=(e,t,n)=>{var o=new pt(e);throw o.init(t,n),ie=e,Be++,ie},an=()=>Be,ze={},mt=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function yt(e){return this.fromWireType(O[e>>2])}var Te={},ge={},qe={},kt,Je=e=>{throw new kt(e)},we=(e,t,n)=>{e.forEach(function(d){qe[d]=t});function o(d){var p=n(d);p.length!==e.length&&Je("Mismatched type converter count");for(var g=0;g<e.length;++g)re(e[g],p[g])}var s=new Array(t.length),u=[],l=0;t.forEach((d,p)=>{ge.hasOwnProperty(d)?s[p]=ge[d]:(u.push(d),Te.hasOwnProperty(d)||(Te[d]=[]),Te[d].push(()=>{s[p]=ge[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},on=e=>{var t=ze[e];delete ze[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));we([e],u,l=>{var d={};return s.forEach((p,g)=>{var C=p.fieldName,P=l[g],_=p.getter,E=p.getterContext,L=l[g+s.length],B=p.setter,F=p.setterContext;d[C]={read:Q=>P.fromWireType(_(E,Q)),write:(Q,m)=>{var $=[];B(F,Q,L.toWireType($,m)),mt($)}}}),[{name:t.name,fromWireType:p=>{var g={};for(var C in d)g[C]=d[C].read(p);return o(p),g},toWireType:(p,g)=>{for(var C in d)if(!(C in g))throw new TypeError(`Missing field: "${C}"`);var P=n();for(C in d)d[C].write(P,g[C]);return p!==null&&p.push(o,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:o}]})},sn=(e,t,n,o,s)=>{},cn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ft=e},Ft,Y=e=>{for(var t="",n=e;q[n];)t+=Ft[q[n++]];return t},$e,A=e=>{throw new $e(e)};function un(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||A(`type "${o}" must have a positive integer typeid pointer`),ge.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;A(`Cannot register type '${o}' twice`)}if(ge[e]=t,delete qe[e],Te.hasOwnProperty(e)){var s=Te[e];delete Te[e],s.forEach(u=>u())}}function re(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return un(e,t,n)}var ne=8,ln=(e,t,n,o)=>{t=Y(t),re(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:ne,readValueFromPointer:function(s){return this.fromWireType(q[s])},destructorFunction:null})},dn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),gt=e=>{function t(n){return n.$$.ptrType.registeredClass.name}A(t(e)+" instance already deleted")},wt=!1,It=e=>{},fn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Wt=e=>{e.count.value-=1;var t=e.count.value===0;t&&fn(e)},Ut=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Ut(e,t,n.baseClass);return o===null?null:n.downcast(o)},Lt={},hn=()=>Object.keys(De).length,pn=()=>{var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e},xe=[],bt=()=>{for(;xe.length;){var e=xe.pop();e.$$.deleteScheduled=!1,e.delete()}},je,vn=e=>{je=e,xe.length&&je&&je(bt)},mn=()=>{a.getInheritedInstanceCount=hn,a.getLiveInheritedInstances=pn,a.flushPendingDeletes=bt,a.setDelayFunction=vn},De={},yn=(e,t)=>{for(t===void 0&&A("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},gn=(e,t)=>(t=yn(e,t),De[t]),Ge=(e,t)=>{(!t.ptrType||!t.ptr)&&Je("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&Je("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Re(Object.create(e,{$$:{value:t,writable:!0}}))};function wn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=gn(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?Ge(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ge(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Lt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var p=Ut(t,this.registeredClass,d.registeredClass);return p===null?s.call(this):this.isSmartPointer?Ge(d.registeredClass.instancePrototype,{ptrType:d,ptr:p,smartPtrType:this,smartPtr:e}):Ge(d.registeredClass.instancePrototype,{ptrType:d,ptr:p})}var Re=e=>typeof FinalizationRegistry>"u"?(Re=t=>t,e):(wt=new FinalizationRegistry(t=>{Wt(t.$$)}),Re=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};wt.register(t,s,t)}return t},It=t=>wt.unregister(t),Re(e)),bn=()=>{Object.assign(Ye.prototype,{isAliasOf(e){if(!(this instanceof Ye)||!(e instanceof Ye))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Re(Object.create(Object.getPrototypeOf(this),{$$:{value:dn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),It(this),Wt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),xe.push(this),xe.length===1&&je&&je(bt),this.$$.deleteScheduled=!0,this}})};function Ye(){}var ke=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ht=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||A(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},Ct=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&A(`Cannot register public name '${e}' twice`),Ht(a,e,e),a.hasOwnProperty(n)&&A(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},Cn=48,Tn=57,$n=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Cn&&t<=Tn?`_${e}`:e};function Sn(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var Tt=(e,t,n)=>{for(;t!==n;)t.upcast||A(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Pn(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function _n(e,t){var n;if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=Tt(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&A("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,se.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:A("Unsupporting sharing policy")}return n}function En(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function Nt(e){return this.fromWireType(M[e>>2])}var On=()=>{Object.assign(Qe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ne,readValueFromPointer:Nt,deleteObject(e){e!==null&&e.delete()},fromWireType:wn})};function Qe(e,t,n,o,s,u,l,d,p,g,C){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=p,this.rawShare=g,this.rawDestructor=C,!s&&t.baseClass===void 0?o?(this.toWireType=Pn,this.destructorFunction=null):(this.toWireType=En,this.destructorFunction=null):this.toWireType=_n}var Vt=(e,t,n)=>{a.hasOwnProperty(e)||Je("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},Mn=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},Xe=[],Bt,H=e=>{var t=Xe[e];return t||(e>=Xe.length&&(Xe.length=e+1),Xe[e]=t=Bt.get(e)),t},An=(e,t,n)=>{if(e.includes("j"))return Mn(e,t,n);var o=H(t).apply(null,n);return o},xn=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),An(e,t,n)}},ee=(e,t)=>{e=Y(e);function n(){return e.includes("j")?xn(e,t):H(t)}var o=n();return typeof o!="function"&&A(`unknown function pointer with signature ${e}: ${t}`),o},jn=(e,t)=>{var n=ke(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+`
2
+ `+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},zt,qt=e=>{var t=rr(e),n=Y(t);return ce(t),n},Ke=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!ge[u]){if(qe[u]){qe[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new zt(`${e}: `+n.map(qt).join([", "]))},Dn=(e,t,n,o,s,u,l,d,p,g,C,P,_)=>{C=Y(C),u=ee(s,u),d&&(d=ee(l,d)),g&&(g=ee(p,g)),_=ee(P,_);var E=$n(C);Ct(E,function(){Ke(`Cannot construct ${C} due to unbound types`,[o])}),we([e,t,n],o?[o]:[],function(L){L=L[0];var B,F;o?(B=L.registeredClass,F=B.instancePrototype):F=Ye.prototype;var Q=ke(C,function(){if(Object.getPrototypeOf(this)!==m)throw new $e("Use 'new' to construct "+C);if($.constructor_body===void 0)throw new $e(C+" has no accessible constructor");var lr=$.constructor_body[arguments.length];if(lr===void 0)throw new $e(`Tried to invoke ctor of ${C} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return lr.apply(this,arguments)}),m=Object.create(F,{constructor:{value:Q}});Q.prototype=m;var $=new Sn(C,Q,m,_,B,u,d,g);if($.baseClass){var z,G;(G=(z=$.baseClass).__derivedClasses)!==null&&G!==void 0||(z.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var Se=new Qe(C,$,!0,!1,!1),tt=new Qe(C+"*",$,!1,!1,!1),ur=new Qe(C+" const*",$,!1,!0,!1);return Lt[e]={pointerType:tt,constPointerType:ur},Vt(E,Q),[Se,tt,ur]})},$t=(e,t)=>{for(var n=[],o=0;o<e;o++)n.push(M[t+o*4>>2]);return n};function Rn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function St(e,t,n,o,s,u){var l=t.length;l<2&&A("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&n!==null,p=Rn(t),g=t[0].name!=="void",C=l-2,P=new Array(C),_=[],E=[],L=function(){arguments.length!==C&&A(`function ${e} called with ${arguments.length} arguments, expected ${C}`),E.length=0;var B;_.length=d?2:1,_[0]=s,d&&(B=t[1].toWireType(E,this),_[1]=B);for(var F=0;F<C;++F)P[F]=t[F+2].toWireType(E,arguments[F]),_.push(P[F]);var Q=o.apply(null,_);function m($){if(p)mt(E);else for(var z=d?1:2;z<t.length;z++){var G=z===1?B:P[z-2];t[z].destructorFunction!==null&&t[z].destructorFunction(G)}if(g)return t[0].fromWireType($)}return m(Q)};return ke(e,L)}var kn=(e,t,n,o,s,u)=>{var l=$t(t,n);s=ee(o,s),we([],[e],function(d){d=d[0];var p=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new $e(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{Ke(`Cannot construct ${d.name} due to unbound types`,l)},we([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=St(p,g,null,s,u),[])),[]})},Jt=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},Fn=(e,t,n,o,s,u,l,d,p)=>{var g=$t(n,o);t=Y(t),t=Jt(t),u=ee(s,u),we([],[e],function(C){C=C[0];var P=`${C.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&C.registeredClass.pureVirtualFunctions.push(t);function _(){Ke(`Cannot call ${P} due to unbound types`,g)}var E=C.registeredClass.instancePrototype,L=E[t];return L===void 0||L.overloadTable===void 0&&L.className!==C.name&&L.argCount===n-2?(_.argCount=n-2,_.className=C.name,E[t]=_):(Ht(E,t,P),E[t].overloadTable[n-2]=_),we([],g,function(B){var F=St(P,B,C,u,l);return E[t].overloadTable===void 0?(F.argCount=n-2,E[t]=F):E[t].overloadTable[n-2]=F,[]}),[]})};function In(){Object.assign(Gt.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Gt(){this.allocated=[void 0],this.freelist=[]}var Z=new Gt,Pt=e=>{e>=Z.reserved&&--Z.get(e).refcount===0&&Z.free(e)},Wn=()=>{for(var e=0,t=Z.reserved;t<Z.allocated.length;++t)Z.allocated[t]!==void 0&&++e;return e},Un=()=>{Z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Z.reserved=Z.allocated.length,a.count_emval_handles=Wn},se={toValue:e=>(e||A("Cannot use deleted val. handle = "+e),Z.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Z.allocate({refcount:1,value:e})}}},Ln=(e,t)=>{t=Y(t),re(e,{name:t,fromWireType:n=>{var o=se.toValue(n);return Pt(n),o},toWireType:(n,o)=>se.toHandle(o),argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:null})},Hn=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(W[o>>0])}:function(o){return this.fromWireType(q[o>>0])};case 2:return n?function(o){return this.fromWireType(le[o>>1])}:function(o){return this.fromWireType(k[o>>1])};case 4:return n?function(o){return this.fromWireType(O[o>>2])}:function(o){return this.fromWireType(M[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Nn=(e,t,n,o)=>{t=Y(t);function s(){}s.values={},re(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:ne,readValueFromPointer:Hn(t,n,o),destructorFunction:null}),Ct(t,s)},_t=(e,t)=>{var n=ge[e];return n===void 0&&A(t+" has unknown type "+qt(e)),n},Vn=(e,t,n)=>{var o=_t(e,"enum");t=Y(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:ke(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},Et=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},Bn=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(de[n>>2])};case 8:return function(n){return this.fromWireType(oe[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},zn=(e,t,n)=>{t=Y(t),re(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:ne,readValueFromPointer:Bn(t,n),destructorFunction:null})},qn=(e,t,n,o,s,u,l)=>{var d=$t(t,n);e=Y(e),e=Jt(e),s=ee(o,s),Ct(e,function(){Ke(`Cannot call ${e} due to unbound types`,d)},t-1),we([],d,function(p){var g=[p[0],null].concat(p.slice(1));return Vt(e,St(e,g,null,s,u),t-1),[]})},Jn=(e,t,n)=>{switch(t){case 1:return n?o=>W[o>>0]:o=>q[o>>0];case 2:return n?o=>le[o>>1]:o=>k[o>>1];case 4:return n?o=>O[o>>2]:o=>M[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Gn=(e,t,n,o,s)=>{t=Y(t);var u=C=>C;if(o===0){var l=32-8*n;u=C=>C<<l>>>l}var d=t.includes("unsigned"),p=(C,P)=>{},g;d?g=function(C,P){return p(P,this.name),P>>>0}:g=function(C,P){return p(P,this.name),P},re(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:ne,readValueFromPointer:Jn(t,n,o!==0),destructorFunction:null})},Yn=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=M[l>>2],p=M[l+4>>2];return new s(W.buffer,p,d)}n=Y(n),re(e,{name:n,fromWireType:u,argPackAdvance:ne,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},Yt=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},Qn=(e,t,n)=>Yt(e,q,t,n),Qt=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o<=127?t++:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,++n):t+=3}return t},Xt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Xn=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&Xt)return Xt.decode(e.subarray(t,s));for(var u="";t<s;){var l=e[t++];if(!(l&128)){u+=String.fromCharCode(l);continue}var d=e[t++]&63;if((l&224)==192){u+=String.fromCharCode((l&31)<<6|d);continue}var p=e[t++]&63;if((l&240)==224?l=(l&15)<<12|d<<6|p:l=(l&7)<<18|d<<12|p<<6|e[t++]&63,l<65536)u+=String.fromCharCode(l);else{var g=l-65536;u+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return u},Ot=(e,t)=>e?Xn(q,e,t):"",Kn=(e,t)=>{t=Y(t);var n=t==="std::string";re(e,{name:t,fromWireType(o){var s=M[o>>2],u=o+4,l;if(n)for(var d=u,p=0;p<=s;++p){var g=u+p;if(p==s||q[g]==0){var C=g-d,P=Ot(d,C);l===void 0?l=P:(l+="\0",l+=P),d=g+1}}else{for(var _=new Array(s),p=0;p<s;++p)_[p]=String.fromCharCode(q[u+p]);l=_.join("")}return ce(o),l},toWireType(o,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var u,l=typeof s=="string";l||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||A("Cannot pass non-string to std::string"),n&&l?u=Qt(s):u=s.length;var d=xt(4+u+1),p=d+4;if(M[d>>2]=u,n&&l)Qn(s,p,u+1);else if(l)for(var g=0;g<u;++g){var C=s.charCodeAt(g);C>255&&(ce(p),A("String has UTF-16 code units that do not fit in 8 bits")),q[p+g]=C}else for(var g=0;g<u;++g)q[p+g]=s[g];return o!==null&&o.push(ce,d),d},argPackAdvance:ne,readValueFromPointer:Nt,destructorFunction(o){ce(o)}})},Kt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Zn=(e,t)=>{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&k[o];)++o;if(n=o<<1,n-e>32&&Kt)return Kt.decode(q.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=le[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},ea=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n<e.length*2?n/2:e.length,l=0;l<u;++l){var d=e.charCodeAt(l);le[t>>1]=d,t+=2}return le[t>>1]=0,t-s},ta=e=>e.length*2,ra=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=O[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},na=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(O[t>>2]=d,t+=4,t+4>u)break}return O[t>>2]=0,t-s},aa=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o>=55296&&o<=57343&&++n,t+=4}return t},oa=(e,t,n)=>{n=Y(n);var o,s,u,l,d;t===2?(o=Zn,s=ea,l=ta,u=()=>k,d=1):t===4&&(o=ra,s=na,l=aa,u=()=>M,d=2),re(e,{name:n,fromWireType:p=>{for(var g=M[p>>2],C=u(),P,_=p+4,E=0;E<=g;++E){var L=p+4+E*t;if(E==g||C[L>>d]==0){var B=L-_,F=o(_,B);P===void 0?P=F:(P+="\0",P+=F),_=L+t}}return ce(p),P},toWireType:(p,g)=>{typeof g!="string"&&A(`Cannot pass non-string to C++ string type ${n}`);var C=l(g),P=xt(4+C+t);return M[P>>2]=C>>d,s(g,P+4,C+t),p!==null&&p.push(ce,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction(p){ce(p)}})},ia=(e,t,n,o,s,u)=>{ze[e]={name:Y(t),rawConstructor:ee(n,o),rawDestructor:ee(s,u),fields:[]}},sa=(e,t,n,o,s,u,l,d,p,g)=>{ze[e].fields.push({fieldName:Y(t),getterReturnType:n,getter:ee(o,s),getterContext:u,setterArgumentType:l,setter:ee(d,p),setterContext:g})},ca=(e,t)=>{t=Y(t),re(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Mt=[],ua=(e,t,n,o)=>(e=Mt[e],t=se.toValue(t),e(null,t,n,o)),la={},da=e=>{var t=la[e];return t===void 0?Y(e):t},Zt=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},fa=e=>e===0?se.toHandle(Zt()):(e=da(e),se.toHandle(Zt()[e])),ha=e=>{var t=Mt.length;return Mt.push(e),t},pa=(e,t)=>{for(var n=new Array(e),o=0;o<e;++o)n[o]=_t(M[t+o*4>>2],"parameter "+o);return n},va=Reflect.construct,ma=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(M[t>>2]=se.toHandle(o)),s},ya=(e,t,n)=>{var o=pa(e,t),s=o.shift();e--;var u=new Array(e),l=(p,g,C,P)=>{for(var _=0,E=0;E<e;++E)u[E]=o[E].readValueFromPointer(P+_),_+=o[E].argPackAdvance;for(var L=n===1?va(g,u):g.apply(p,u),E=0;E<e;++E){var B,F;(B=(F=o[E]).deleteObject)===null||B===void 0||B.call(F,u[E])}return ma(s,C,L)},d=`methodCaller<(${o.map(p=>p.name).join(", ")}) => ${s.name}>`;return ha(ke(d,l))},ga=e=>{e>4&&(Z.get(e).refcount+=1)},wa=e=>{var t=se.toValue(e);mt(t),Pt(e)},ba=(e,t)=>{e=_t(e,"_emval_take_value");var n=e.readValueFromPointer(t);return se.toHandle(n)},Ca=()=>{K("")},Ta=(e,t,n)=>q.copyWithin(e,t,t+n),$a=()=>2147483648,Sa=e=>{var t=x.buffer,n=(e-t.byteLength+65535)/65536;try{return x.grow(n),be(),1}catch{}},Pa=e=>{var t=q.length;e>>>=0;var n=$a();if(e>n)return!1;for(var o=(p,g)=>p+(g-p%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=Sa(l);if(d)return!0}return!1},At={},_a=()=>y||"./this.program",Fe=()=>{if(!Fe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:_a()};for(var n in At)At[n]===void 0?delete t[n]:t[n]=At[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);Fe.strings=o}return Fe.strings},Ea=(e,t)=>{for(var n=0;n<e.length;++n)W[t++>>0]=e.charCodeAt(n);W[t>>0]=0},Oa=(e,t)=>{var n=0;return Fe().forEach((o,s)=>{var u=t+n;M[e+s*4>>2]=u,Ea(o,u),n+=o.length+1}),0},Ma=(e,t)=>{var n=Fe();M[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),M[t>>2]=o,0},Aa=e=>e,Ze=e=>e%4===0&&(e%100!==0||e%400===0),xa=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},er=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],ja=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=Ze(n.getFullYear()),s=n.getMonth(),u=(o?er:tr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function Da(e,t,n){var o=Qt(e)+1,s=new Array(o);return Yt(e,s,0,s.length),s}var Ra=(e,t)=>{W.set(e,t)},ka=(e,t,n,o)=>{var s=M[o+40>>2],u={tm_sec:O[o>>2],tm_min:O[o+4>>2],tm_hour:O[o+8>>2],tm_mday:O[o+12>>2],tm_mon:O[o+16>>2],tm_year:O[o+20>>2],tm_wday:O[o+24>>2],tm_yday:O[o+28>>2],tm_isdst:O[o+32>>2],tm_gmtoff:O[o+36>>2],tm_zone:s?Ot(s):""},l=Ot(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in d)l=l.replace(new RegExp(p,"g"),d[p]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],C=["January","February","March","April","May","June","July","August","September","October","November","December"];function P(m,$,z){for(var G=typeof m=="number"?m.toString():m||"";G.length<$;)G=z[0]+G;return G}function _(m,$){return P(m,$,"0")}function E(m,$){function z(Se){return Se<0?-1:Se>0?1:0}var G;return(G=z(m.getFullYear()-$.getFullYear()))===0&&(G=z(m.getMonth()-$.getMonth()))===0&&(G=z(m.getDate()-$.getDate())),G}function L(m){switch(m.getDay()){case 0:return new Date(m.getFullYear()-1,11,29);case 1:return m;case 2:return new Date(m.getFullYear(),0,3);case 3:return new Date(m.getFullYear(),0,2);case 4:return new Date(m.getFullYear(),0,1);case 5:return new Date(m.getFullYear()-1,11,31);case 6:return new Date(m.getFullYear()-1,11,30)}}function B(m){var $=ja(new Date(m.tm_year+1900,0,1),m.tm_yday),z=new Date($.getFullYear(),0,4),G=new Date($.getFullYear()+1,0,4),Se=L(z),tt=L(G);return E(Se,$)<=0?E(tt,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var F={"%a":m=>g[m.tm_wday].substring(0,3),"%A":m=>g[m.tm_wday],"%b":m=>C[m.tm_mon].substring(0,3),"%B":m=>C[m.tm_mon],"%C":m=>{var $=m.tm_year+1900;return _($/100|0,2)},"%d":m=>_(m.tm_mday,2),"%e":m=>P(m.tm_mday,2," "),"%g":m=>B(m).toString().substring(2),"%G":m=>B(m),"%H":m=>_(m.tm_hour,2),"%I":m=>{var $=m.tm_hour;return $==0?$=12:$>12&&($-=12),_($,2)},"%j":m=>_(m.tm_mday+xa(Ze(m.tm_year+1900)?er:tr,m.tm_mon-1),3),"%m":m=>_(m.tm_mon+1,2),"%M":m=>_(m.tm_min,2),"%n":()=>`
3
+ `,"%p":m=>m.tm_hour>=0&&m.tm_hour<12?"AM":"PM","%S":m=>_(m.tm_sec,2),"%t":()=>" ","%u":m=>m.tm_wday||7,"%U":m=>{var $=m.tm_yday+7-m.tm_wday;return _(Math.floor($/7),2)},"%V":m=>{var $=Math.floor((m.tm_yday+7-(m.tm_wday+6)%7)/7);if((m.tm_wday+371-m.tm_yday-2)%7<=2&&$++,$){if($==53){var z=(m.tm_wday+371-m.tm_yday)%7;z!=4&&(z!=3||!Ze(m.tm_year))&&($=1)}}else{$=52;var G=(m.tm_wday+7-m.tm_yday-1)%7;(G==4||G==5&&Ze(m.tm_year%400-1))&&$++}return _($,2)},"%w":m=>m.tm_wday,"%W":m=>{var $=m.tm_yday+7-(m.tm_wday+6)%7;return _(Math.floor($/7),2)},"%y":m=>(m.tm_year+1900).toString().substring(2),"%Y":m=>m.tm_year+1900,"%z":m=>{var $=m.tm_gmtoff,z=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(z?"+":"-")+("0000"+$).slice(-4)},"%Z":m=>m.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var p in F)l.includes(p)&&(l=l.replace(new RegExp(p,"g"),F[p](u)));l=l.replace(/\0\0/g,"%");var Q=Da(l);return Q.length>t?0:(Ra(Q,e),Q.length-1)},Fa=(e,t,n,o,s)=>ka(e,t,n,o);kt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},cn(),$e=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},bn(),mn(),On(),zt=a.UnboundTypeError=jn(Error,"UnboundTypeError"),In(),Un();var Ia={s:Qr,u:Xr,b:Zr,g:en,q:tn,J:rn,f:nn,V:an,d:Kr,da:on,Q:sn,_:ln,ca:Dn,ba:kn,w:Fn,Y:Ln,x:Nn,h:Vn,L:zn,M:qn,t:Gn,o:Yn,K:Kn,C:oa,A:ia,ea:sa,$:ca,R:ua,ha:Pt,fa,Z:ya,N:ga,O:wa,aa:ba,B:Ca,X:Ta,W:Pa,T:Oa,U:Ma,E:Za,D:Na,F:Ka,n:eo,a:Wa,e:Ba,m:Ha,k:qa,H:Qa,v:Ga,G:Xa,z:ro,P:ao,l:za,j:Va,c:La,p:Ua,I:Ya,r:to,i:Ja,y:no,ga:Aa,S:Fa},J=Yr(),ce=a._free=e=>(ce=a._free=J.ka)(e),xt=a._malloc=e=>(xt=a._malloc=J.la)(e),rr=e=>(rr=J.na)(e),U=(e,t)=>(U=J.oa)(e,t),Ie=e=>(Ie=J.pa)(e),N=()=>(N=J.qa)(),V=e=>(V=J.ra)(e),nr=e=>(nr=J.sa)(e),ar=e=>(ar=J.ta)(e),or=(e,t,n)=>(or=J.ua)(e,t,n),ir=e=>(ir=J.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=J.wa)(e,t,n,o,s,u,l);var sr=a.dynCall_jiiii=(e,t,n,o,s)=>(sr=a.dynCall_jiiii=J.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=J.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,p)=>(a.dynCall_iiiiijj=J.za)(e,t,n,o,s,u,l,d,p),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,p,g)=>(a.dynCall_iiiiiijj=J.Aa)(e,t,n,o,s,u,l,d,p,g);function Wa(e,t){var n=N();try{return H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Ua(e,t,n,o){var s=N();try{H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function La(e,t,n){var o=N();try{H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function Ha(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Na(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Va(e,t){var n=N();try{H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Ba(e,t,n){var o=N();try{return H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function za(e){var t=N();try{H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function qa(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Ja(e,t,n,o,s,u,l,d,p,g,C){var P=N();try{H(e)(t,n,o,s,u,l,d,p,g,C)}catch(_){if(V(P),_!==_+0)throw _;U(1,0)}}function Ga(e,t,n,o,s,u,l){var d=N();try{return H(e)(t,n,o,s,u,l)}catch(p){if(V(d),p!==p+0)throw p;U(1,0)}}function Ya(e,t,n,o,s){var u=N();try{H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Qa(e,t,n,o,s,u){var l=N();try{return H(e)(t,n,o,s,u)}catch(d){if(V(l),d!==d+0)throw d;U(1,0)}}function Xa(e,t,n,o,s,u,l,d){var p=N();try{return H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function Ka(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Za(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function eo(e){var t=N();try{return H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function to(e,t,n,o,s,u,l,d){var p=N();try{H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function ro(e,t,n,o,s,u,l,d,p,g,C,P){var _=N();try{return H(e)(t,n,o,s,u,l,d,p,g,C,P)}catch(E){if(V(_),E!==E+0)throw E;U(1,0)}}function no(e,t,n,o,s,u,l,d,p,g,C,P,_,E,L,B){var F=N();try{H(e)(t,n,o,s,u,l,d,p,g,C,P,_,E,L,B)}catch(Q){if(V(F),Q!==Q+0)throw Q;U(1,0)}}function ao(e,t,n,o,s){var u=N();try{return sr(e,t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}var et;ye=function e(){et||cr(),et||(ye=e)};function cr(){if(te>0||(Ue(),te>0))return;function e(){et||(et=!0,a.calledRun=!0,!I&&(it(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),st()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return cr(),i.ready}})();function jo(r){return Dt(Rt,r)}async function Do(r,i){return Ao(Rt,r,i)}async function Ro(r,i){return xo(Rt,r,i)}var We;class Rr extends EventTarget{constructor(i={}){var a;super(),oo(this,We,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!nt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),io(this,We,c??[]),jo().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw fr(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return so.filter(i=>i!=="unknown")}async detect(i){try{const a=await vo(i);if(a===null)return[];let c;try{Ar(a)?c=await Do(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))}):c=await Ro(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:v,y},topRight:{x:S,y:h},bottomLeft:{x:w,y:T},bottomRight:{x:b,y:j}}=f.position,D=Math.min(v,S,w,b),x=Math.min(y,h,T,j),I=Math.max(v,S,w,b),W=Math.max(y,h,T,j);return{boundingBox:new DOMRectReadOnly(D,x,I-D,W-x),rawValue:f.text,format:co(f.format),cornerPoints:[{x:v,y},{x:S,y:h},{x:b,y:j},{x:w,y:T}]}})}catch(a){throw fr(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}We=new WeakMap;const kr=(r,i,a="error")=>{let c,f;const v=new Promise((y,S)=>{c=y,f=S,r.addEventListener(i,c),r.addEventListener(a,f)});return v.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),v},mr=r=>new Promise(i=>setTimeout(i,r));class Fr extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class ko extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class Fo extends Error{constructor(){super("Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let jt;const Io=r=>{jt=new Rr({formats:r})},Wo=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{console.debug("[vue-qrcode-reader] start scanning"),jt=new Rr({formats:f});const v=y=>async S=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:h,contentBefore:w,lastScanHadContent:T}=y;if(S-h<c)window.requestAnimationFrame(v(y));else{const b=await jt.detect(r),j=b.some(I=>!w.includes(I.rawValue));j&&i(b);const D=b.length>0;D&&a(b),!D&&T&&a(b);const x={lastScanned:S,lastScanHadContent:D,contentBefore:j?b.map(I=>I.rawValue):w};window.requestAnimationFrame(v(x))}}};v({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var Ir={},X={};Object.defineProperty(X,"__esModule",{value:!0});X.compactObject=Lr;X.deprecated=Jo;var Uo=X.detectBrowser=Go;X.disableLog=Bo;X.disableWarnings=zo;X.extractVersion=at;X.filterStats=Yo;X.log=qo;X.walkStats=ot;X.wrapPeerConnectionEvent=Vo;function Lo(r,i,a){return i=Ho(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function Ho(r){var i=No(r,"string");return ve(i)==="symbol"?i:String(i)}function No(r,i){if(ve(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(ve(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function ve(r){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ve(r)}var Wr=!0,Ur=!0;function at(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function Vo(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(y,S){if(y!==i)return f.apply(this,arguments);var h=function(w){var T=a(w);T&&(S.handleEvent?S.handleEvent(T):S(T))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(S,h),f.apply(this,[y,h])};var v=c.removeEventListener;c.removeEventListener=function(y,S){if(y!==i||!this._eventMap||!this._eventMap[i])return v.apply(this,arguments);if(!this._eventMap[i].has(S))return v.apply(this,arguments);var h=this._eventMap[i].get(S);return this._eventMap[i].delete(S),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,v.apply(this,[y,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(y){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),y&&this.addEventListener(i,this["_on"+i]=y)},enumerable:!0,configurable:!0})}}function Bo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Wr=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function zo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Ur=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function qo(){if((typeof window>"u"?"undefined":ve(window))==="object"){if(Wr)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Jo(r,i){Ur&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Go(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=at(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=at(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=at(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function yr(r){return Object.prototype.toString.call(r)==="[object Object]"}function Lr(r){return yr(r)?Object.keys(r).reduce(function(i,a){var c=yr(r[a]),f=c?Lr(r[a]):r[a],v=c&&!Object.keys(f).length;return f===void 0||v?i:Object.assign(i,Lo({},a,f))},{}):r}function ot(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ot(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ot(r,r.get(f),a)})}))}function Yo(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var v=[];return r.forEach(function(y){y.type==="track"&&y.trackIdentifier===i.id&&v.push(y)}),v.forEach(function(y){r.forEach(function(S){S.type===c&&S.trackId===y.id&&ot(r,S,f)})}),f}Object.defineProperty(Ir,"__esModule",{value:!0});var Qo=Ir.shimGetUserMedia=Zo,Xo=Ko(X);function Hr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Hr=function(c){return c?a:i})(r)}function Ko(r,i){if(r&&r.__esModule)return r;if(r===null||pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Hr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function pe(r){"@babel/helpers - typeof";return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},pe(r)}var gr=Xo.log;function Zo(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(pe(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(T){if(!(T==="require"||T==="advanced"||T==="mediaSource")){var b=pe(h[T])==="object"?h[T]:{ideal:h[T]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var j=function(x,I){return x?x+I.charAt(0).toUpperCase()+I.slice(1):I==="deviceId"?"sourceId":I};if(b.ideal!==void 0){w.optional=w.optional||[];var D={};typeof b.ideal=="number"?(D[j("min",T)]=b.ideal,w.optional.push(D),D={},D[j("max",T)]=b.ideal,w.optional.push(D)):(D[j("",T)]=b.ideal,w.optional.push(D))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[j("",T)]=b.exact):["min","max"].forEach(function(x){b[x]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[j(x,T)]=b[x])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&pe(h.audio)==="object"){var T=function(x,I,W){I in x&&!(W in x)&&(x[W]=x[I],delete x[I])};h=JSON.parse(JSON.stringify(h)),T(h.audio,"autoGainControl","googAutoGainControl"),T(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&pe(h.video)==="object"){var b=h.video.facingMode;b=b&&(pe(b)==="object"?b:{ideal:b});var j=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!j)){delete h.video.facingMode;var D;if(b.exact==="environment"||b.ideal==="environment"?D=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(D=["front"]),D)return a.mediaDevices.enumerateDevices().then(function(x){x=x.filter(function(W){return W.kind==="videoinput"});var I=x.find(function(W){return D.some(function(q){return W.label.toLowerCase().includes(q)})});return!I&&x.length&&D.includes("back")&&(I=x[x.length-1]),I&&(h.video.deviceId=b.exact?{exact:I.deviceId}:{ideal:I.deviceId}),h.video=c(h.video),gr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return gr("chrome: "+JSON.stringify(h)),w(h)},v=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},y=function(h,w,T){f(h,function(b){a.webkitGetUserMedia(b,w,function(j){T&&T(v(j))})})};if(a.getUserMedia=y.bind(a),a.mediaDevices.getUserMedia){var S=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return S(w).then(function(T){if(w.audio&&!T.getAudioTracks().length||w.video&&!T.getVideoTracks().length)throw T.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return T},function(T){return Promise.reject(v(T))})})}}}}var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});var ei=Nr.shimGetUserMedia=ni,ti=ri(X);function Vr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Vr=function(c){return c?a:i})(r)}function ri(r,i){if(r&&r.__esModule)return r;if(r===null||Pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Vr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function Pe(r){"@babel/helpers - typeof";return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Pe(r)}function ni(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,T){ti.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,T)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,T){w in h&&!(T in h)&&(h[T]=h[w],delete h[w])},v=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return Pe(h)==="object"&&Pe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),v(h)},c&&c.prototype.getSettings){var y=c.prototype.getSettings;c.prototype.getSettings=function(){var h=y.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var S=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&Pe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),S.apply(this,[h])}}}}var ae={};Object.defineProperty(ae,"__esModule",{value:!0});ae.shimAudioContext=hi;ae.shimCallbacksAPI=ci;ae.shimConstraints=qr;ae.shimCreateOfferLegacy=fi;var ai=ae.shimGetUserMedia=ui;ae.shimLocalStreamsAPI=ii;ae.shimRTCIceServerUrls=li;ae.shimRemoteStreamsAPI=si;ae.shimTrackEventTransceiver=di;var Br=oi(X);function zr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(zr=function(c){return c?a:i})(r)}function oi(r,i){if(r&&r.__esModule)return r;if(r===null||me(r)!=="object"&&typeof r!="function")return{default:r};var a=zr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function me(r){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},me(r)}function ii(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,v=new Array(f>1?f-1:0),y=1;y<f;y++)v[y-1]=arguments[y];return v&&v.forEach(function(S){c._localStreams?c._localStreams.includes(S)||c._localStreams.push(S):c._localStreams=[S]}),i.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(a){var c=this;this._localStreams||(this._localStreams=[]);var f=this._localStreams.indexOf(a);if(f!==-1){this._localStreams.splice(f,1);var v=a.getTracks();this.getSenders().forEach(function(y){v.includes(y.track)&&c.removeTrack(y)})}})}}function si(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(a){var c=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=a),this.addEventListener("track",this._onaddstreampoly=function(f){f.streams.forEach(function(v){if(c._remoteStreams||(c._remoteStreams=[]),!c._remoteStreams.includes(v)){c._remoteStreams.push(v);var y=new Event("addstream");y.stream=v,c.dispatchEvent(y)}})})}});var i=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){var a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(c){c.streams.forEach(function(f){if(a._remoteStreams||(a._remoteStreams=[]),!(a._remoteStreams.indexOf(f)>=0)){a._remoteStreams.push(f);var v=new Event("addstream");v.stream=f,a.dispatchEvent(v)}})}),i.apply(a,arguments)}}}function ci(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,v=i.setRemoteDescription,y=i.addIceCandidate;i.createOffer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b};var S=function(h,w,T){var b=f.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b};i.setLocalDescription=S,S=function(h,w,T){var b=v.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.setRemoteDescription=S,S=function(h,w,T){var b=y.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.addIceCandidate=S}}function ui(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(qr(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,v,y){i.mediaDevices.getUserMedia(f).then(v,y)}).bind(i))}function qr(r){return r&&r.video!==void 0?Object.assign({},r,{video:Br.compactObject(r.video)}):r}function li(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],v=0;v<a.iceServers.length;v++){var y=a.iceServers[v];y.urls===void 0&&y.url?(Br.deprecated("RTCIceServer.url","RTCIceServer.urls"),y=JSON.parse(JSON.stringify(y)),y.urls=y.url,delete y.url,f.push(y)):f.push(a.iceServers[v])}a.iceServers=f}return new i(a,c)},r.RTCPeerConnection.prototype=i.prototype,"generateCertificate"in i&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:function(){return i.generateCertificate}})}}function di(r){me(r)==="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function fi(r){var i=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(a){if(a){typeof a.offerToReceiveAudio<"u"&&(a.offerToReceiveAudio=!!a.offerToReceiveAudio);var c=this.getTransceivers().find(function(v){return v.receiver.track.kind==="audio"});a.offerToReceiveAudio===!1&&c?c.direction==="sendrecv"?c.setDirection?c.setDirection("sendonly"):c.direction="sendonly":c.direction==="recvonly"&&(c.setDirection?c.setDirection("inactive"):c.direction="inactive"):a.offerToReceiveAudio===!0&&!c&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);var f=this.getTransceivers().find(function(v){return v.receiver.track.kind==="video"});a.offerToReceiveVideo===!1&&f?f.direction==="sendrecv"?f.setDirection?f.setDirection("sendonly"):f.direction="sendonly":f.direction==="recvonly"&&(f.setDirection?f.setDirection("inactive"):f.direction="inactive"):a.offerToReceiveVideo===!0&&!f&&this.addTransceiver("video",{direction:"recvonly"})}return i.apply(this,arguments)}}function hi(r){me(r)!=="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}const pi=r=>{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function ue(r,i){if(r===!1)throw new Error(i??"assertion failure")}function wr(r){throw new Error("this code should be unreachable")}const vi=pi(()=>{const r=Uo(window);switch(r.browser){case"chrome":Qo(window,r);break;case"firefox":ei(window,r);break;case"safari":ai(window,r);break;default:throw new Fr}});let _e=Promise.resolve({type:"stop",data:{}});async function br(r,i,a){var c,f,v;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(i)),window.isSecureContext!==!0)throw new ko;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new Fr;vi(),console.debug("[vue-qrcode-reader] calling getUserMedia");const y=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=y:r.mozSrcObject!==void 0?r.mozSrcObject=y:window.URL.createObjectURL?r.src=window.URL.createObjectURL(y):window.webkitURL?r.src=window.webkitURL.createObjectURL(y):r.src=y.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([kr(r,"loadeddata"),mr(3e3).then(()=>{throw new Fo})]),console.debug("[vue-qrcode-reader] video element loaded"),await mr(500);const[S]=y.getVideoTracks(),h=(v=(f=S==null?void 0:S.getCapabilities)==null?void 0:f.call(S))!=null?v:{};let w=!1;return a&&h.torch&&(await S.applyConstraints({advanced:[{torch:!0}]}),w=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:y,capabilities:h,constraints:i,isTorchOn:w}}}async function mi(r,{constraints:i,torch:a,restart:c=!1}){_e=_e.then(v=>{if(v.type==="start"){const{data:{videoEl:y,stream:S,constraints:h,isTorchOn:w}}=v;return!c&&r===y&&i===h&&a===w?v:Jr(y,S,w).then(()=>br(r,i,a))}else if(v.type==="stop"||v.type==="failed")return br(r,i,a);wr()}).catch(v=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${v}"`),{type:"failed",error:v}));const f=await _e;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(f.type==="failed")throw f.error;if(f.type==="start")return f.data.capabilities;wr()}async function Jr(r,i,a){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await kr(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function rt(){if(_e=_e.then(r=>{if(r.type==="stop"||r.type==="failed")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return Jr(i,a,c)}),(await _e).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const yi=R.defineComponent({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=R.ref(a.constraints),v=R.ref(a.formats);R.watch(()=>a.constraints,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(f.value=k)},{deep:!0}),R.watch(()=>a.formats,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(v.value=k)},{deep:!0});const y=R.ref(),S=R.ref(),h=R.ref(),w=R.ref(!1),T=R.ref(!1);R.onMounted(()=>{T.value=!0}),R.onUnmounted(()=>{rt()});const b=R.computed(()=>({torch:a.torch,constraints:f.value,shouldStream:T.value&&!a.paused}));R.watch(b,async k=>{const O=h.value;ue(O!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const M=y.value;ue(M!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const de=M.getContext("2d");if(ue(de!==null,"if cavnas is defined, canvas 2d context should also be non-null"),k.shouldStream){rt(),w.value=!1;try{const oe=await mi(O,k);T.value?(w.value=!0,c("camera-on",oe)):await rt()}catch(oe){c("error",oe)}}else M.width=O.videoWidth,M.height=O.videoHeight,de.drawImage(O,0,0,O.videoWidth,O.videoHeight),rt(),w.value=!1,c("camera-off")},{deep:!0}),R.watch(v,k=>{T.value&&Io(k)});const j=R.computed(()=>b.value.shouldStream&&w.value);R.watch(j,k=>{if(k){ue(y.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),D(y.value),ue(S.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),D(S.value);const O=()=>a.track===void 0?500:40;ue(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),Wo(h.value,{detectHandler:M=>c("detect",M),formats:v.value,locateHandler:x,minDelay:O()})}});const D=k=>{const O=k.getContext("2d");ue(O!==null,"canvas 2d context should always be non-null"),O.clearRect(0,0,k.width,k.height)},x=k=>{const O=S.value;ue(O!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const M=h.value;if(ue(M!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),k.length===0||a.track===void 0)D(O);else{const de=M.offsetWidth,oe=M.offsetHeight,be=M.videoWidth,Ce=M.videoHeight,Oe=Math.max(de/be,oe/Ce),Me=be*Oe,Ue=Ce*Oe,it=Me/be,st=Ue/Ce,ct=(de-Me)/2,ut=(oe-Ue)/2,Ae=({x:fe,y:K})=>({x:Math.floor(fe*it),y:Math.floor(K*st)}),te=({x:fe,y:K})=>({x:Math.floor(fe+ct),y:Math.floor(K+ut)}),ye=k.map(fe=>{const{boundingBox:K,cornerPoints:dt}=fe,{x:Le,y:he}=te(Ae({x:K.x,y:K.y})),{x:He,y:ft}=Ae({x:K.width,y:K.height});return{...fe,cornerPoints:dt.map(Ne=>te(Ae(Ne))),boundingBox:DOMRectReadOnly.fromRect({x:Le,y:he,width:He,height:ft})}});O.width=M.offsetWidth,O.height=M.offsetHeight;const lt=O.getContext("2d");a.track(ye,lt)}},I={width:"100%",height:"100%",position:"relative","z-index":"0"},W={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},q={width:"100%",height:"100%","object-fit":"cover"},le=R.computed(()=>j.value?q:{...q,visibility:"hidden",position:"absolute"});return(k,O)=>(R.openBlock(),R.createElementBlock("div",{style:I},[R.createElementVNode("video",{ref_key:"videoRef",ref:h,style:R.normalizeStyle(le.value),autoplay:"",muted:"",playsinline:""},null,4),R.withDirectives(R.createElementVNode("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:y,style:q},null,512),[[R.vShow,!j.value]]),R.createElementVNode("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:S,style:W},null,512),R.createElementVNode("div",{style:W},[R.renderSlot(k.$slots,"default")])]))}});exports.QrcodeStream=yi;