@salla.sa/twilight-components 2.14.527 → 2.14.529

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/dist/cjs/{filepond-b0w4ucsY.js → filepond-BjuMtq1w.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DcK1l1GY.js → filepond-plugin-file-poster-BxL0d9LG.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-CkPhV0MZ.js → filepond-plugin-file-validate-size-CJXkH4-8.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-FezmfZnb.js → filepond-plugin-file-validate-type-D3j_FXx-.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-SjJnSovO.js → filepond-plugin-image-edit-BQGmzGi6.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BadaWudo.js → filepond-plugin-image-exif-orientation-C_HK3PYP.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-OycIHnPl.js → filepond-plugin-image-preview-CQd7cIFx.js} +1 -1
  8. package/dist/cjs/{functions-B5JSRkNf.js → functions-DCXn0G_W.js} +1 -1
  9. package/dist/cjs/{index-C8azAHop.js → index-5-vSfB0w.js} +2 -2
  10. package/dist/cjs/{intlTelInput-DCVpeeHH.js → intlTelInput-CPTS8go9.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  47. package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
  48. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  49. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  54. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  55. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  107. package/dist/cjs/{tracked-promise-C_iMjRSx.js → tracked-promise-Bbru6mxz.js} +1 -1
  108. package/dist/cjs/twilight.cjs.js +1 -1
  109. package/dist/cjs/{vanilla-picker-BlVuhlOr.js → vanilla-picker-D_5twiy9.js} +1 -1
  110. package/dist/collection/components/salla-login-modal/salla-login-modal.js +1 -1
  111. package/dist/components/index.js +2 -2
  112. package/dist/components/salla-login-modal2.js +1 -1
  113. package/dist/esm/{filepond-BRxfxd7t.js → filepond-BG9J9fCn.js} +1 -1
  114. package/dist/esm/{filepond-plugin-file-poster-5YXrzIG7.js → filepond-plugin-file-poster-BOpdUQw6.js} +1 -1
  115. package/dist/esm/{filepond-plugin-file-validate-size-Cf8HW8zg.js → filepond-plugin-file-validate-size-Clsy6NUR.js} +1 -1
  116. package/dist/esm/{filepond-plugin-file-validate-type-CYKPeh3k.js → filepond-plugin-file-validate-type-BEcbBqqu.js} +1 -1
  117. package/dist/esm/{filepond-plugin-image-edit-B3vxnYdF.js → filepond-plugin-image-edit-CTfhZciS.js} +1 -1
  118. package/dist/esm/{filepond-plugin-image-exif-orientation-BbzOlsEM.js → filepond-plugin-image-exif-orientation-CXKcwp8C.js} +1 -1
  119. package/dist/esm/{filepond-plugin-image-preview-BWeaWqAq.js → filepond-plugin-image-preview-C2dkBPlL.js} +1 -1
  120. package/dist/esm/{functions-Bni-nvUA.js → functions-D665V8_v.js} +1 -1
  121. package/dist/esm/{index-MrxrxOqi.js → index-vzCji15v.js} +2 -2
  122. package/dist/esm/{intlTelInput-DpfK9QTH.js → intlTelInput-D6ZYcNin.js} +1 -1
  123. package/dist/esm/loader.js +2 -2
  124. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  125. package/dist/esm/salla-accordion_6.entry.js +1 -1
  126. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  127. package/dist/esm/salla-advertisement.entry.js +1 -1
  128. package/dist/esm/salla-alert_2.entry.js +1 -1
  129. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  130. package/dist/esm/salla-apps-icons.entry.js +1 -1
  131. package/dist/esm/salla-badge.entry.js +1 -1
  132. package/dist/esm/salla-basket-gap.entry.js +1 -1
  133. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  134. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  135. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  136. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  137. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  138. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  139. package/dist/esm/salla-comment-factors.entry.js +1 -1
  140. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  141. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  142. package/dist/esm/salla-contacts.entry.js +1 -1
  143. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  144. package/dist/esm/salla-count-down_2.entry.js +1 -1
  145. package/dist/esm/salla-custom-fields.entry.js +1 -1
  146. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  147. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  148. package/dist/esm/salla-filters-widget.entry.js +1 -1
  149. package/dist/esm/salla-filters.entry.js +1 -1
  150. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  151. package/dist/esm/salla-gifting.entry.js +1 -1
  152. package/dist/esm/salla-hook.entry.js +1 -1
  153. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  154. package/dist/esm/salla-installment.entry.js +1 -1
  155. package/dist/esm/salla-list-tile.entry.js +1 -1
  156. package/dist/esm/salla-localization-modal.entry.js +1 -1
  157. package/dist/esm/salla-login-modal.entry.js +2 -2
  158. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  159. package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
  160. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  161. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  162. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  163. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  164. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  165. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  166. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  167. package/dist/esm/salla-loyalty.entry.js +1 -1
  168. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  169. package/dist/esm/salla-map_2.entry.js +1 -1
  170. package/dist/esm/salla-menu.entry.js +1 -1
  171. package/dist/esm/salla-metadata.entry.js +1 -1
  172. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  173. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  174. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  175. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  176. package/dist/esm/salla-notification-item.entry.js +1 -1
  177. package/dist/esm/salla-notifications.entry.js +1 -1
  178. package/dist/esm/salla-offer-modal.entry.js +1 -1
  179. package/dist/esm/salla-offer.entry.js +1 -1
  180. package/dist/esm/salla-order-branch.entry.js +1 -1
  181. package/dist/esm/salla-order-cancel.entry.js +1 -1
  182. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  183. package/dist/esm/salla-order-details-options.entry.js +1 -1
  184. package/dist/esm/salla-order-details.entry.js +1 -1
  185. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  186. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  187. package/dist/esm/salla-order-edit.entry.js +1 -1
  188. package/dist/esm/salla-order-shipments.entry.js +1 -1
  189. package/dist/esm/salla-order-summary.entry.js +1 -1
  190. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  191. package/dist/esm/salla-orders.entry.js +1 -1
  192. package/dist/esm/salla-payments.entry.js +1 -1
  193. package/dist/esm/salla-placeholder.entry.js +1 -1
  194. package/dist/esm/salla-price-range.entry.js +1 -1
  195. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  196. package/dist/esm/salla-product-card_2.entry.js +1 -1
  197. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  198. package/dist/esm/salla-products-list.entry.js +1 -1
  199. package/dist/esm/salla-quick-order.entry.js +1 -1
  200. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  201. package/dist/esm/salla-rating-modal.entry.js +1 -1
  202. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  203. package/dist/esm/salla-scopes.entry.js +1 -1
  204. package/dist/esm/salla-search.entry.js +1 -1
  205. package/dist/esm/salla-skeleton.entry.js +1 -1
  206. package/dist/esm/salla-slider.entry.js +1 -1
  207. package/dist/esm/salla-social-share.entry.js +1 -1
  208. package/dist/esm/salla-social.entry.js +1 -1
  209. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  210. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  211. package/dist/esm/salla-tooltip.entry.js +1 -1
  212. package/dist/esm/salla-trust-badges.entry.js +1 -1
  213. package/dist/esm/salla-user-menu.entry.js +1 -1
  214. package/dist/esm/salla-user-profile.entry.js +1 -1
  215. package/dist/esm/salla-user-settings.entry.js +1 -1
  216. package/dist/esm/salla-verify.entry.js +1 -1
  217. package/dist/esm/salla-wallet.entry.js +1 -1
  218. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  219. package/dist/esm/{tracked-promise-r8GfVNie.js → tracked-promise-foXmUWGO.js} +1 -1
  220. package/dist/esm/twilight.js +2 -2
  221. package/dist/esm/{vanilla-picker-odqYYCwx.js → vanilla-picker-DsPfgrOx.js} +1 -1
  222. package/dist/twilight/{p-7524a81a.entry.js → p-09bc713a.entry.js} +1 -1
  223. package/dist/twilight/{p-b22b92fb.entry.js → p-09f91284.entry.js} +1 -1
  224. package/dist/twilight/{p-112dfb27.entry.js → p-0a390354.entry.js} +1 -1
  225. package/dist/twilight/{p-fee87019.entry.js → p-0a98054a.entry.js} +1 -1
  226. package/dist/twilight/{p-4a71bc5b.entry.js → p-0cc78c0c.entry.js} +1 -1
  227. package/dist/twilight/{p-82c51ac3.entry.js → p-0e202b48.entry.js} +1 -1
  228. package/dist/twilight/{p-1b999b89.entry.js → p-0f7cb6ac.entry.js} +1 -1
  229. package/dist/twilight/{p-7206a775.entry.js → p-111907cf.entry.js} +1 -1
  230. package/dist/twilight/{p-a8fe909f.entry.js → p-1273b75f.entry.js} +1 -1
  231. package/dist/twilight/{p-d76ad30b.entry.js → p-15bbf579.entry.js} +1 -1
  232. package/dist/twilight/{p-1f2d4f6d.entry.js → p-1978cff0.entry.js} +1 -1
  233. package/dist/twilight/{p-88013de3.entry.js → p-1a3c5eda.entry.js} +1 -1
  234. package/dist/twilight/{p-d7957d69.entry.js → p-1bd280eb.entry.js} +1 -1
  235. package/dist/twilight/{p-a9b36fde.entry.js → p-1d59fad3.entry.js} +1 -1
  236. package/dist/twilight/{p-7a32a312.entry.js → p-1de8fc8d.entry.js} +1 -1
  237. package/dist/twilight/{p-012f1725.entry.js → p-1e6c7d96.entry.js} +1 -1
  238. package/dist/twilight/{p-01f19c8e.entry.js → p-23a09f71.entry.js} +1 -1
  239. package/dist/twilight/{p-48143622.entry.js → p-27157c9a.entry.js} +1 -1
  240. package/dist/twilight/{p-9b2515ab.entry.js → p-2a377e2a.entry.js} +1 -1
  241. package/dist/twilight/{p-0d1cc718.entry.js → p-2c1be1d8.entry.js} +1 -1
  242. package/dist/twilight/{p-3b68796d.entry.js → p-2cb5bde2.entry.js} +1 -1
  243. package/dist/twilight/{p-31eab38b.entry.js → p-304ab54a.entry.js} +1 -1
  244. package/dist/twilight/{p-ade37269.entry.js → p-33b9c1e2.entry.js} +1 -1
  245. package/dist/twilight/{p-d5b9d505.entry.js → p-346db51a.entry.js} +1 -1
  246. package/dist/twilight/{p-3983347e.entry.js → p-35dbbd52.entry.js} +1 -1
  247. package/dist/twilight/{p-08514188.entry.js → p-3bbafbee.entry.js} +1 -1
  248. package/dist/twilight/{p-9573a650.entry.js → p-3fa4828c.entry.js} +1 -1
  249. package/dist/twilight/{p-a433dd94.entry.js → p-4026d757.entry.js} +1 -1
  250. package/dist/twilight/{p-0ab0dcc6.entry.js → p-403fdbd4.entry.js} +1 -1
  251. package/dist/twilight/{p-27437b3c.entry.js → p-45de9af7.entry.js} +1 -1
  252. package/dist/twilight/{p-ac8da0ee.entry.js → p-471e9730.entry.js} +1 -1
  253. package/dist/twilight/{p-ea3264f8.entry.js → p-4852d70b.entry.js} +1 -1
  254. package/dist/twilight/{p-faf1ca68.entry.js → p-4ad61c10.entry.js} +1 -1
  255. package/dist/twilight/{p-9be5a903.entry.js → p-4af5ae92.entry.js} +1 -1
  256. package/dist/twilight/{p-14fe0051.entry.js → p-4b6a811a.entry.js} +1 -1
  257. package/dist/twilight/{p-93af5955.entry.js → p-4c191bde.entry.js} +1 -1
  258. package/dist/twilight/{p-ab844de4.entry.js → p-4d644d10.entry.js} +1 -1
  259. package/dist/twilight/{p-714be207.entry.js → p-4e3e0ff2.entry.js} +1 -1
  260. package/dist/twilight/{p-d0696872.entry.js → p-511ec472.entry.js} +1 -1
  261. package/dist/twilight/{p-ac0ec991.entry.js → p-560e9b79.entry.js} +1 -1
  262. package/dist/twilight/{p-f67ed203.entry.js → p-5697e63d.entry.js} +1 -1
  263. package/dist/twilight/{p-fa2ff605.entry.js → p-5946b648.entry.js} +1 -1
  264. package/dist/twilight/p-5a6d16c5.entry.js +4 -0
  265. package/dist/twilight/{p-90836db4.entry.js → p-5c322a2e.entry.js} +1 -1
  266. package/dist/twilight/{p-ef7b606e.entry.js → p-5dedde56.entry.js} +1 -1
  267. package/dist/twilight/{p-39e0472d.entry.js → p-612366aa.entry.js} +1 -1
  268. package/dist/twilight/{p-8cd7ff9e.entry.js → p-652f7a4e.entry.js} +1 -1
  269. package/dist/twilight/{p-8105ed54.entry.js → p-6bd24e12.entry.js} +1 -1
  270. package/dist/twilight/{p-b6f4b3ec.entry.js → p-7615fd03.entry.js} +1 -1
  271. package/dist/twilight/{p-c41cb3fa.entry.js → p-78842a7e.entry.js} +1 -1
  272. package/dist/twilight/{p-644d9658.entry.js → p-78fc7b12.entry.js} +1 -1
  273. package/dist/twilight/{p-d4d595c1.entry.js → p-79d7ec1d.entry.js} +1 -1
  274. package/dist/twilight/{p-045bbe40.entry.js → p-7a13c26d.entry.js} +1 -1
  275. package/dist/twilight/{p-b33582fd.entry.js → p-7af9f123.entry.js} +1 -1
  276. package/dist/twilight/{p-ea7e2466.entry.js → p-8586955b.entry.js} +1 -1
  277. package/dist/twilight/{p-9df6fb80.entry.js → p-886caaef.entry.js} +1 -1
  278. package/dist/twilight/{p-491a8688.entry.js → p-8c653cb1.entry.js} +1 -1
  279. package/dist/twilight/{p-1f0fab6c.entry.js → p-8ca3f231.entry.js} +1 -1
  280. package/dist/twilight/{p-7f923cb2.entry.js → p-8cf487c4.entry.js} +1 -1
  281. package/dist/twilight/{p-f81029b5.entry.js → p-8dd60442.entry.js} +1 -1
  282. package/dist/twilight/{p-ab18ee85.entry.js → p-8e456714.entry.js} +1 -1
  283. package/dist/twilight/{p-e43f07fc.entry.js → p-92199590.entry.js} +1 -1
  284. package/dist/twilight/{p-d9f1cd81.entry.js → p-94ec26c8.entry.js} +1 -1
  285. package/dist/twilight/{p-08bbb599.entry.js → p-95512e23.entry.js} +1 -1
  286. package/dist/twilight/{p-b28588ba.entry.js → p-9a582aa6.entry.js} +1 -1
  287. package/dist/twilight/{p-29c02546.entry.js → p-9a918aa9.entry.js} +1 -1
  288. package/dist/twilight/{p-20ae6a3d.entry.js → p-9f2cb4ca.entry.js} +1 -1
  289. package/dist/twilight/{p-C_BV2ex7.js → p-BEnGduUm.js} +1 -1
  290. package/dist/twilight/{p-CcPplbOM.js → p-BLantrYY.js} +1 -1
  291. package/dist/twilight/{p-BZYlNbpW.js → p-CZVEdnVZ.js} +1 -1
  292. package/dist/twilight/{p-Cr5HDKQ9.js → p-C_x20F0m.js} +1 -1
  293. package/dist/twilight/{p-BGtF1_Bf.js → p-CiSp_1aa.js} +1 -1
  294. package/dist/twilight/{p-DffCiPZo.js → p-D3EOndqi.js} +1 -1
  295. package/dist/twilight/{p-J94Exn76.js → p-DPrMsh8G.js} +1 -1
  296. package/dist/twilight/{p-C34Ycrkk.js → p-DbNkDe5Q.js} +1 -1
  297. package/dist/twilight/{p-ChCYUlik.js → p-DfptsKS6.js} +1 -1
  298. package/dist/twilight/{p-C_lEyosA.js → p-DhLVhq1d.js} +1 -1
  299. package/dist/twilight/{p-DBIOj_I_.js → p-DuAXOs35.js} +1 -1
  300. package/dist/twilight/{p-5b20bc08.entry.js → p-a2e2dac9.entry.js} +1 -1
  301. package/dist/twilight/{p-67d0ce1c.entry.js → p-a7f75ae4.entry.js} +1 -1
  302. package/dist/twilight/{p-bb7bd408.entry.js → p-aa5917bb.entry.js} +1 -1
  303. package/dist/twilight/{p-ab087e8d.entry.js → p-aac19822.entry.js} +1 -1
  304. package/dist/twilight/{p-52d2c526.entry.js → p-ba7407d8.entry.js} +1 -1
  305. package/dist/twilight/{p-72094246.entry.js → p-badf4658.entry.js} +1 -1
  306. package/dist/twilight/{p-61b090d1.entry.js → p-bb32f871.entry.js} +1 -1
  307. package/dist/twilight/{p-cac22061.entry.js → p-bde0b407.entry.js} +1 -1
  308. package/dist/twilight/{p-ecf01eb1.entry.js → p-bf49be98.entry.js} +1 -1
  309. package/dist/twilight/{p-70da8cf5.entry.js → p-c1817765.entry.js} +1 -1
  310. package/dist/twilight/{p-8bc4dc7e.entry.js → p-c4c8a72d.entry.js} +1 -1
  311. package/dist/twilight/{p-f3aba096.entry.js → p-cdbbab0d.entry.js} +1 -1
  312. package/dist/twilight/{p-cadadc88.entry.js → p-cfc338d4.entry.js} +1 -1
  313. package/dist/twilight/{p-402227e5.entry.js → p-d37d235c.entry.js} +1 -1
  314. package/dist/twilight/{p-06089393.entry.js → p-d96d35e2.entry.js} +1 -1
  315. package/dist/twilight/{p-58641d12.entry.js → p-dac7940b.entry.js} +1 -1
  316. package/dist/twilight/{p-8e0ddbe8.entry.js → p-dc1fcdd8.entry.js} +1 -1
  317. package/dist/twilight/{p-258f5ec9.entry.js → p-dd08b673.entry.js} +1 -1
  318. package/dist/twilight/{p-30d348b3.entry.js → p-de6c66aa.entry.js} +1 -1
  319. package/dist/twilight/{p-9b768009.entry.js → p-df22478c.entry.js} +1 -1
  320. package/dist/twilight/{p-c45528db.entry.js → p-e70e110a.entry.js} +1 -1
  321. package/dist/twilight/{p-1acb62f7.entry.js → p-ed1cd1c2.entry.js} +1 -1
  322. package/dist/twilight/{p-6d0825be.entry.js → p-ed8df05b.entry.js} +1 -1
  323. package/dist/twilight/{p-1f049143.entry.js → p-f32116da.entry.js} +1 -1
  324. package/dist/twilight/{p-dd41634a.entry.js → p-f46f718b.entry.js} +1 -1
  325. package/dist/twilight/{p-67269624.entry.js → p-f5b32192.entry.js} +1 -1
  326. package/dist/twilight/{p-968e2822.entry.js → p-f8583e70.entry.js} +1 -1
  327. package/dist/twilight/{p-30d8f802.entry.js → p-ffc5bf76.entry.js} +1 -1
  328. package/dist/twilight/p-vzCji15v.js +5 -0
  329. package/dist/twilight/twilight.esm.js +1 -1
  330. package/package.json +5 -5
  331. package/dist/twilight/p-MrxrxOqi.js +0 -5
  332. package/dist/twilight/p-ec08c0b1.entry.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as t,H as s}from"./p-MrxrxOqi.js";const i=class{constructor(t){e(this,t),this.otpInputs=[],this.deletePendingDays=null,this.currentStep="confirm",this.isDeletePending=!1,this.otpType="email",this.otpHasError=!1,this.otpErrorMessage="",this.isSubmitting=!1,this.isVerifyingOtp=!1,this.isSwitchingChannel=!1,this.resendAfter=30,this.showResendLink=!1,this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.translationDefaults={"pages.profile.delete_account":{ar:"حذف الحساب",en:"Delete account"},"pages.profile.delete_account_description":{ar:"سيُحذف حسابك وبياناتك من المتجر نهائيًا، بما في ذلك سجل طلباتك.",en:"Your account and data will be permanently deleted from the store, including your order history."},"pages.profile.delete_account_confirm_title":{ar:"هل تريد حذف حسابك؟",en:"Do you want to delete your account?"},"pages.profile.delete_account_warning":{ar:"بعد الحذف، ستفقد الوصول إلى بياناتك، بما في ذلك سجل الطلبات، وقائمة الأمنيات، وأي نقاط ولاء أو رصيد متاح في المحفظة.",en:"After deletion, you will lose access to your data, including order history, wishlist, and any loyalty points or wallet balance."},"pages.profile.cancel":{ar:"إلغاء",en:"Cancel"},"pages.profile.delete_account_otp_title":{ar:"تأكيد حذف الحساب",en:"Confirm account deletion"},"pages.profile.delete_account_otp_instruction":{ar:"للمتابعة، أدخل رمز التحقٌّق المرسل إلى:",en:"To continue, enter the verification code sent to:"},"pages.profile.delete_account_confirm_otp":{ar:"تأكيد الحذف",en:"Confirm deletion"},"pages.profile.delete_account_otp_required":{ar:"يرجى إدخال رمز التحقٌّق",en:"Please enter the verification code"},"pages.profile.delete_account_send_via_phone":{ar:"إرسال عبر الهاتف",en:"Send via phone"},"pages.profile.delete_account_send_via_email":{ar:"إرسال عبر البريد الإلكتروني",en:"Send via email"},"pages.profile.delete_account_success_title":{ar:"أُرسل طلب حذف الحساب",en:"Account deletion request submitted"},"pages.profile.delete_account_success_message":{ar:"سيُحذف حسابك خلال 30 يومًا. يمكنك إلغاء الطلب بتسجيل الدخول مرة أخرى قبل اكتمال الحذف.",en:"Your account will be deleted within 30 days. You can cancel the request by signing in again before deletion is complete."},"pages.profile.ok":{ar:"موافق",en:"OK"},"pages.profile.cancel_deletion_request":{ar:"تراجع عن الحذف",en:"Withdraw deletion"},"pages.profile.delete_account_pending":{ar:"حسابك مجدول للحذف نهائيًا من المتجر خلال :days يومًا. يمكنك التراجع عن الحذف قبل انقضاء المدة.",en:"Your account will be deleted permanently from the store within :days days. You can withdraw the deletion before the deadline."},"pages.profile.delete_request_cancelled":{ar:"تم إلغاء طلب الحذف",en:"Deletion request cancelled"}},this.registerTranslationDefaults(),this.loadTranslations(),salla.onReady((()=>{this.isHiddenName=salla.config.get("user.is_hidden_name"),this.isNotifiable=salla.config.get("user.is_notifiable"),this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.fetchDeleteRequestStatus(),this.isNotifiable&&this.isHiddenName||salla.event.on("profile::info.fetched",(e=>{this.isHiddenName=e.data.is_hidden_name,this.isNotifiable=e.data.is_notifiable}))})),salla.lang.onLoaded((()=>{this.registerTranslationDefaults(),this.loadTranslations()}))}getDaysUntilExecution(e){return Math.max(0,Math.ceil(((e>1e12?e:1e3*e)-Date.now())/864e5))}applyPendingMessage(){const e=salla.lang.get("pages.profile.delete_account_pending");this.deleteAccountPending=null!=this.deletePendingDays?e.replace(/:days/g,String(salla.helpers.number(this.deletePendingDays))):e}async fetchDeleteRequestStatus(){try{const e=await salla.profile.getDeleteRequest(),t=e?.data??null,s=t?.data_request||t,i=s?.status;this.isDeletePending="pending"===i;const a=s?.execution_at;this.deletePendingDays=null==a||Number.isNaN(Number(a))?null:this.getDaysUntilExecution(Number(a)),this.applyPendingMessage()}catch{}}registerTranslationDefaults(){if(!salla?.lang?.addBulk)return;const e=Object.entries(this.translationDefaults).reduce(((e,[t,s])=>(salla.lang.get(t)===t&&(e[t]=s),e)),{});Object.keys(e).length&&salla.lang.addBulk(e)}loadTranslations(){this.deleteAccount=salla.lang.get("pages.profile.delete_account"),this.deleteAccountDesc=salla.lang.get("pages.profile.delete_account_description"),this.deleteConfirmTitle=salla.lang.get("pages.profile.delete_account_confirm_title"),this.deleteAccountWarning=salla.lang.get("pages.profile.delete_account_warning"),this.cancelLabel=salla.lang.get("pages.profile.cancel"),this.deleteOtpTitle=salla.lang.get("pages.profile.delete_account_otp_title"),this.deleteOtpInstruction=salla.lang.get("pages.profile.delete_account_otp_instruction"),this.deleteConfirmOtp=salla.lang.get("pages.profile.delete_account_confirm_otp"),this.sendViaPhone=salla.lang.get("pages.profile.delete_account_send_via_phone"),this.sendViaEmail=salla.lang.get("pages.profile.delete_account_send_via_email"),this.deleteSuccessTitle=salla.lang.get("pages.profile.delete_account_success_title"),this.deleteSuccessMessage=salla.lang.get("pages.profile.delete_account_success_message"),this.okLabel=salla.lang.get("pages.profile.ok"),this.cancelDeletionRequest=salla.lang.get("pages.profile.cancel_deletion_request"),this.applyPendingMessage(),this.resendAfterLabel=salla.lang.get("blocks.header.resend_after"),this.resendLabel=salla.lang.get("blocks.comments.submit"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.hideMyName=salla.lang.get("pages.profile.hide_my_name"),this.hideMyNameDesc=salla.lang.get("pages.profile.hide_my_name_desc"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description")}toggleSetting(e,t){salla.profile.updateSettings({name:e,value:t.target.checked})}capitalizeText(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}getOtpTarget(){return"email"===this.otpType?salla.config.get("user.email")||"":salla.config.get("user.mobile")||""}updateModalForStep(){if(this.confirmationModal)switch(this.currentStep){case"confirm":this.confirmationModal.setTitle(this.capitalizeText(this.deleteConfirmTitle));break;case"otp":this.confirmationModal.setTitle(this.capitalizeText(this.deleteOtpTitle));break;case"success":this.confirmationModal.setTitle(this.capitalizeText(this.deleteSuccessTitle))}}openDeleteModal(){this.currentStep="confirm",this.otpType="email",this.resetOtpInputs(),this.clearResendTimer(),this.updateModalForStep(),this.confirmationModal.open()}closeDeleteModal(){this.clearResendTimer(),this.confirmationModal?.close()}goBackFromOtp(){this.clearResendTimer(),this.resetOtpInputs(),this.resetOtpError(),this.currentStep="confirm",this.updateModalForStep()}async handleModalVisibilityChanged(e){if(e.detail)return;this.clearResendTimer();const t="success"===this.currentStep;t&&(this.isDeletePending=!0),this.currentStep="confirm",this.resetOtpInputs(),t&&await this.fetchDeleteRequestStatus()}formatResendTimer(e){return"00 : "+(e>=10?`${e}`:`0${e}`)}updateResendTimerDisplay(){this.timerEl&&(this.timerEl.innerHTML=this.formatResendTimer(this.resendAfter))}isDeleteRequestInFlight(){return this.isSubmitting||this.isSwitchingChannel||this.isVerifyingOtp}async initiateDeleteRequest(e="confirm"){if(!this.isDeleteRequestInFlight()){"switch"===e||"resend"===e?this.isSwitchingChannel=!0:this.isSubmitting=!0;try{await salla.profile.initiateDeleteRequest(this.otpType),this.currentStep="otp",this.updateModalForStep(),this.resetOtpInputs(),this.startResendTimer(),setTimeout((()=>this.otpInputs[0]?.focus()),100)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{"switch"===e||"resend"===e?this.isSwitchingChannel=!1:this.isSubmitting=!1}}}async switchOtpChannel(){this.isDeleteRequestInFlight()||(this.otpType="email"===this.otpType?"mobile":"email",await this.initiateDeleteRequest("switch"))}async resendOtp(){this.showResendLink&&!this.isDeleteRequestInFlight()&&await this.initiateDeleteRequest("resend")}collectOtpCode(){const e=salla.helpers.number(this.otpInputs.map((e=>e?.value||"")).join(""),!0).replace(/[^0-9]/g,"");return this.hiddenCodeInput&&(this.hiddenCodeInput.value=e),e}resetOtpError(){this.otpHasError=!1,this.otpErrorMessage=""}setOtpError(e){this.otpHasError=!0,this.otpErrorMessage=e}async verifyDeleteOtp(){if(this.isVerifyingOtp||this.isSwitchingChannel)return;const e=this.collectOtpCode();if(e.length<4)return this.setOtpError(salla.lang.get("pages.profile.delete_account_otp_required")),void this.otpInputs[e.length]?.focus();this.resetOtpError(),this.isVerifyingOtp=!0;try{const t=await salla.profile.verifyDeleteRequest({type:this.otpType,code:e});this.deleteSuccessMessage=t?.data?.message||salla.lang.get("pages.profile.delete_account_success_message"),this.clearResendTimer(),this.resetOtpInputs(),this.otpInputs=[],this.currentStep="success",this.updateModalForStep()}catch(e){this.setOtpError(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred")),this.resetOtpInputs()}finally{this.isVerifyingOtp=!1}}async confirmSuccess(){this.isDeletePending=!0,this.closeDeleteModal(),this.currentStep="confirm",await this.fetchDeleteRequestStatus()}async cancelDeleteRequest(){if(!this.isSubmitting){this.isSubmitting=!0;try{const e=(await salla.profile.cancelDeleteRequest()).message||salla.lang.get("pages.profile.delete_request_cancelled");this.isDeletePending=!1,salla.notify?.success?.(e)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{this.isSubmitting=!1}}}resetOtpInputs(){this.otpInputs.forEach((e=>{e&&(e.value="")})),this.hiddenCodeInput&&(this.hiddenCodeInput.value="")}modifyNextOtpInput(e,t){e.value=t[0],t=t.substring(1),e.nextElementSibling&&t.length?this.modifyNextOtpInput(e.nextElementSibling,t):e.nextElementSibling||0!==t.length?e.nextElementSibling&&0===t.length&&e.nextElementSibling.focus():e.focus()}splitOtpNumber(e){const t=salla.helpers.number(e.data||e.target.value||"",!0).replace(/[^0-9]/g,"");t&&1!==t.length&&this.modifyNextOtpInput(e.target,t)}allOtpInputsFilled(){return this.otpInputs.every((e=>e?.value))}handleOtpInput(e){this.resetOtpError(),e.target.value=salla.helpers.number(e.target.value||"",!0),salla.helpers.inputDigitsOnly(e.target),this.allOtpInputsFilled()&&setTimeout((()=>this.verifyDeleteOtp()),100)}handleOtpKeyUp(e){if(this.resetOtpError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(e.key))return;const t=e.keyCode||e.charCode;e.target.value?(e.target.nextElementSibling?.focus(),e.target.nextElementSibling?.select()):[8,46].includes(t)&&(e.target.previousElementSibling?.focus(),e.target.previousElementSibling?.select()),e.target.value.length>1&&this.splitOtpNumber(e)}handleOtpPaste(e){this.resetOtpError();const t=salla.helpers.number(e.clipboardData.getData("text")||"",!0).replace(/[^0-9]/g,"").substring(0,this.otpInputs.length);this.otpInputs.forEach((e=>e.value="")),this.otpInputs[0]&&this.modifyNextOtpInput(this.otpInputs[0],t)}handleOtpFocus(e){e.target!==this.otpInputs[0]&&(""===this.otpInputs[0]?.value&&this.otpInputs[0].focus(),""===e.target.previousElementSibling?.value&&e.target.previousElementSibling.focus())}startResendTimer(){this.clearResendTimer(),this.resendAfter=30,this.showResendLink=!1,this.updateResendTimerDisplay(),this.resendTimerId=setInterval((()=>{if(this.resendAfter--,this.resendAfter<=0)return this.clearResendTimer(),void(this.showResendLink=!0);this.updateResendTimerDisplay()}),1e3)}clearResendTimer(){this.resendTimerId&&(clearInterval(this.resendTimerId),this.resendTimerId=null),this.showResendLink=!1}renderUserDeleteIcon(){return t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",color:"currentColor",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},t("path",{d:"M14.5 8C14.5 5.23858 12.2614 3 9.5 3C6.73858 3 4.5 5.23858 4.5 8C4.5 10.7614 6.73858 13 9.5 13C12.2614 13 14.5 10.7614 14.5 8Z"}),t("path",{d:"M15.5 21L18.5 18M18.5 18L21.5 15M18.5 18L15.5 15M18.5 18L21.5 21"}),t("path",{d:"M2.5 20C2.5 16.134 5.63401 13 9.5 13C10.775 13 11.9704 13.3409 13 13.9365"}))}renderConfirmStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-warning"},this.deleteAccountWarning),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--row"},t("salla-button",{width:"wide",fill:"outline",color:"danger",onClick:()=>this.closeDeleteModal()},this.capitalizeText(this.cancelLabel)),t("salla-button",{width:"wide",color:"primary",loading:this.isSubmitting,onClick:()=>this.initiateDeleteRequest()},this.capitalizeText(this.deleteAccount))))}renderOtpStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-otp-instruction"},this.deleteOtpInstruction),t("p",{class:"s-user-settings-delete-otp-target"},this.getOtpTarget()),t("input",{type:"hidden",name:"code",maxlength:"4",ref:e=>this.hiddenCodeInput=e}),t("div",{class:{"s-user-settings-delete-otp-codes":!0,"has-error":this.otpHasError},dir:"ltr"},[1,2,3,4].map((e=>t("input",{type:"text",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",id:`delete-otp-${e}`,class:{"s-user-settings-delete-otp-input":!0,"s-has-error":this.otpHasError},onInput:e=>this.handleOtpInput(e),onPaste:e=>this.handleOtpPaste(e),onKeyUp:e=>this.handleOtpKeyUp(e),onFocus:e=>this.handleOtpFocus(e),ref:t=>this.otpInputs[e-1]=t,required:!0})))),this.otpHasError&&this.otpErrorMessage?t("span",{class:"s-user-settings-delete-otp-error"},this.otpErrorMessage):"",t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{width:"wide",color:"primary",disabled:this.isSwitchingChannel,onClick:()=>this.verifyDeleteOtp()},this.capitalizeText(this.deleteConfirmOtp)),t("salla-button",{width:"wide",fill:"outline",color:"primary",disabled:this.isVerifyingOtp,onClick:()=>this.switchOtpChannel()},this.capitalizeText("email"===this.otpType?this.sendViaPhone:this.sendViaEmail))),t("p",{class:"s-user-settings-delete-otp-resend",style:{display:this.showResendLink?"none":"block"}},this.resendAfterLabel,t("b",{class:"s-user-settings-delete-otp-timer mx-1 font-bold",ref:e=>this.timerEl=e})),t("a",{href:"#",class:"s-user-settings-delete-otp-resend-link",style:{display:this.showResendLink?"block":"none"},onClick:e=>{e.preventDefault(),this.resendOtp()}},this.resendLabel))}renderSuccessStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-success-body"},this.deleteSuccessMessage),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{class:"s-user-settings-delete-success-btn",width:"wide",color:"primary",onClick:()=>this.confirmSuccess()},this.capitalizeText(this.okLabel))))}renderDeleteStep(){switch(this.currentStep){case"otp":return this.renderOtpStep();case"success":return this.renderSuccessStep();default:return this.renderConfirmStep()}}renderDeleteSectionAction(){return this.isDeletePending?t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",loading:this.isSubmitting,onClick:()=>this.cancelDeleteRequest()},this.capitalizeText(this.cancelDeletionRequest)):t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",onClick:()=>this.openDeleteModal()},this.capitalizeText(this.deleteAccount))}render(){return t(s,{key:"64356c5b57d826fce8c29cc319a9762464c7fe51",class:"s-user-settings-wrapper"},this.canHideName&&t("div",{key:"4f7b3eb703f89e4a758fca54ba1b214f6724aaea",class:"s-user-settings-section"},t("salla-list-tile",{key:"7ad109e36b278fe81a314d51e1ab68030dd96cdc"},t("div",{key:"c789b7e2c541e25aaaf336e052d1986f6429da71",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"5d7b377aefb80139527d8814ee2c636fa9c73e0f",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>user-cancel</title>\n<path d="M29.885 16l1.724-1.724c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-1.724 1.724-1.724-1.724c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l1.724 1.724-1.724 1.724c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l1.724-1.724 1.724 1.724c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885zM10.667 16c4.043 0 7.333-3.289 7.333-7.333s-3.291-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.291 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>\n</svg>\n'})),t("div",{key:"fdb9d6130ef27cffbe4e2ef06e7b9155d0d04c2b",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.hideMyName)),t("div",{key:"bd8592a487c79926355eeea25a5e1429bca0fd80",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.hideMyNameDesc)),t("div",{key:"cf21ed12bb38dc3a613efac6d017a72aab38780b",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"160140e25cf8e6c4556e52c0b36ba5769618b419",class:"s-toggle"},t("input",{key:"369a694fabbd42e6c239b23c26d68f858775ffe2",class:"s-toggle-input",checked:this.isHiddenName,onChange:e=>this.toggleSetting("is_hidden_name",e),type:"checkbox"}),t("div",{key:"5952ec01913ef95d888eeb3aace14123ffd3ef6f",class:"s-toggle-switcher"}))))),t("div",{key:"885355f8435759c9359a3d9eb95d5637b1c74751",class:"s-user-settings-section"},t("salla-list-tile",{key:"93b607850b20add5384a3b28e4e58fbfcb181d53"},t("div",{key:"c795aabfdc6df0beb9c0bfcf73ad87625eb7f51b",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"a59ede027c4466a1e84e8e8b4c649c7b418dd0a3",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>bullhorn</title>\n<path d="M30.129 0.264c-0.339-0.252-0.776-0.328-1.179-0.208l-24.951 7.485v-0.216c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v14.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-0.112l3.448 1.207-0.595 1.704c-0.321 1.019-0.227 2.103 0.267 3.051s1.327 1.647 2.345 1.968l6.359 2.004c0.399 0.127 0.804 0.187 1.201 0.187 1.699 0 3.277-1.091 3.812-2.785l0.423-1.295 7.633 2.672c0.143 0.049 0.292 0.075 0.44 0.075 0.273 0 0.543-0.084 0.772-0.247 0.352-0.249 0.561-0.655 0.561-1.087v-28c0-0.421-0.199-0.819-0.537-1.069zM18.297 28.4c-0.221 0.701-0.973 1.089-1.673 0.871l-6.357-2.004c-0.34-0.108-0.617-0.34-0.781-0.656s-0.196-0.676-0.101-0.977l0.581-1.665 8.777 3.072zM28 27.453l-24-8.4v-8.728l24-7.2z"></path>\n</svg>\n'})),t("div",{key:"e7af96b6f919a8be8bb126237cb3977e72a7c089",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.promotionalMsgs)),t("div",{key:"dab7b270443b6eddccd7df739c2bee82eb7706af",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.promotionalMsgsDesc)),t("div",{key:"56a6f18c788891fe9215a57d0fcaa5cf98bd3aa5",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"1fc28780fe779099eaed7916f31cbbb681c10fe9",class:"s-toggle"},t("input",{key:"832edd6e5b806171bb913163b7d5c19dbb0833f5",class:"s-toggle-input",checked:this.isNotifiable,onChange:e=>this.toggleSetting("is_notifiable",e),type:"checkbox"}),t("div",{key:"54260d8cca19ca6914cdd3bf15093b9669fef44a",class:"s-toggle-switcher"}))))),t("div",{key:"549bae1159a55b035952a12c8dc9d2b9d660f5bf",class:"s-user-settings-section s-user-settings-section-delete-user"},t("salla-list-tile",{key:"7969327e863cd998a120f27d61621d83ef8e57d5"},t("div",{key:"acf14b5e6ce76657fe0016aa63e26851e7688cd5",slot:"icon",class:"s-user-settings-section-icon"},this.renderUserDeleteIcon()),t("div",{key:"4a38cf9d0510e784317b0eb4db2fd4589a9f71d4",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.deleteAccount)),t("div",{key:"054f6a6c30f2eb9794f83a0998f20e208c7ed85a",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.isDeletePending?this.deleteAccountPending:this.deleteAccountDesc)),t("div",{key:"00d392a300b986d5d3e6f6711e6996df9731962d",slot:"action",class:"s-user-settings-section-action"},this.renderDeleteSectionAction()))),t("salla-modal",{key:"d4e8006e57d9c35267177f07b60e510ea3e53400",id:"salla-user-settings-delete-modal",width:"xs",centered:!0,showBack:"otp"===this.currentStep,isClosable:"success"!==this.currentStep,iconStyle:"success"===this.currentStep?"success":void 0,onModalVisibilityChanged:e=>this.handleModalVisibilityChanged(e),onModalBack:()=>this.goBackFromOtp(),ref:e=>this.confirmationModal=e},"success"!==this.currentStep?t("span",{slot:"icon",class:"s-user-settings-delete-icon"},this.renderUserDeleteIcon()):null,t("div",{key:this.currentStep,class:"s-user-settings-delete-step"},this.renderDeleteStep())))}};i.style=".s-modal-header-inner{display:flex;flex-direction:column !important;align-items:center !important;justify-content:center !important}.s-modal-header-content{text-align:center !important}.s-user-settings-delete-body{text-align:center}.s-user-settings-delete-icon{display:inline-flex;align-items:center;justify-content:center;width:4rem;height:4rem;border-radius:9999px;border:1px solid var(--infinte-color);color:var(--infinte-color);margin:0 auto 1rem}.s-user-settings-delete-icon svg{width:1.5rem;height:1.5rem}.s-user-settings-delete-warning{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-actions--row{display:flex;gap:0.75rem;justify-content:center}.s-user-settings-delete-actions--row salla-button{flex:1}.s-user-settings-delete-actions--stack{display:flex;flex-direction:column;gap:0.75rem;margin-top:1.25rem}.s-user-settings-delete-otp-instruction{color:#6b7280;font-size:0.875rem}.s-user-settings-delete-otp-target{color:#6b7280;direction:ltr;margin-bottom:1.25rem}.s-user-settings-delete-otp-codes{display:flex;justify-content:stretch;gap:0.75rem;direction:ltr;margin-bottom:0.75rem;width:100%}.s-user-settings-delete-otp-codes.has-error{margin-bottom:0}.s-user-settings-delete-otp-input{flex:1 1 0;min-width:0;width:100%;height:3.5rem;text-align:center;border:1px solid #d1d5db;border-radius:0.5rem;font-size:1.25rem;font-weight:600;color:#111827;outline:none}.s-user-settings-delete-otp-input:focus{border-color:#004956;box-shadow:0 0 0 1px #004956}.s-user-settings-delete-otp-input.s-has-error{border-color:#ef4444 !important}.s-user-settings-delete-otp-input.s-has-error:focus{border-color:#ef4444 !important;box-shadow:0 0 0 1px #ef4444}.s-user-settings-delete-otp-input::-webkit-outer-spin-button,.s-user-settings-delete-otp-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-user-settings-delete-otp-input[type=text]{-moz-appearance:textfield}.s-user-settings-delete-otp-error{display:block;color:#ef4444;font-size:0.75rem;text-align:center;padding-top:0.75rem;margin-bottom:1.25rem}.s-user-settings-delete-otp-resend{color:#6b7280;font-size:0.75rem;margin-top:1rem;text-align:center}.s-user-settings-delete-otp-timer{font-weight:600;direction:ltr;display:inline-block}.s-user-settings-delete-otp-resend-link{display:block;color:#004956;font-size:0.875rem;margin-top:1rem;text-align:center;text-decoration:underline;cursor:pointer}.s-user-settings-delete-success-body{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-success-btn{--s-button-color:#004956}";export{i as salla_user_settings}
4
+ import{r as e,h as t,H as s}from"./p-vzCji15v.js";const i=class{constructor(t){e(this,t),this.otpInputs=[],this.deletePendingDays=null,this.currentStep="confirm",this.isDeletePending=!1,this.otpType="email",this.otpHasError=!1,this.otpErrorMessage="",this.isSubmitting=!1,this.isVerifyingOtp=!1,this.isSwitchingChannel=!1,this.resendAfter=30,this.showResendLink=!1,this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.translationDefaults={"pages.profile.delete_account":{ar:"حذف الحساب",en:"Delete account"},"pages.profile.delete_account_description":{ar:"سيُحذف حسابك وبياناتك من المتجر نهائيًا، بما في ذلك سجل طلباتك.",en:"Your account and data will be permanently deleted from the store, including your order history."},"pages.profile.delete_account_confirm_title":{ar:"هل تريد حذف حسابك؟",en:"Do you want to delete your account?"},"pages.profile.delete_account_warning":{ar:"بعد الحذف، ستفقد الوصول إلى بياناتك، بما في ذلك سجل الطلبات، وقائمة الأمنيات، وأي نقاط ولاء أو رصيد متاح في المحفظة.",en:"After deletion, you will lose access to your data, including order history, wishlist, and any loyalty points or wallet balance."},"pages.profile.cancel":{ar:"إلغاء",en:"Cancel"},"pages.profile.delete_account_otp_title":{ar:"تأكيد حذف الحساب",en:"Confirm account deletion"},"pages.profile.delete_account_otp_instruction":{ar:"للمتابعة، أدخل رمز التحقٌّق المرسل إلى:",en:"To continue, enter the verification code sent to:"},"pages.profile.delete_account_confirm_otp":{ar:"تأكيد الحذف",en:"Confirm deletion"},"pages.profile.delete_account_otp_required":{ar:"يرجى إدخال رمز التحقٌّق",en:"Please enter the verification code"},"pages.profile.delete_account_send_via_phone":{ar:"إرسال عبر الهاتف",en:"Send via phone"},"pages.profile.delete_account_send_via_email":{ar:"إرسال عبر البريد الإلكتروني",en:"Send via email"},"pages.profile.delete_account_success_title":{ar:"أُرسل طلب حذف الحساب",en:"Account deletion request submitted"},"pages.profile.delete_account_success_message":{ar:"سيُحذف حسابك خلال 30 يومًا. يمكنك إلغاء الطلب بتسجيل الدخول مرة أخرى قبل اكتمال الحذف.",en:"Your account will be deleted within 30 days. You can cancel the request by signing in again before deletion is complete."},"pages.profile.ok":{ar:"موافق",en:"OK"},"pages.profile.cancel_deletion_request":{ar:"تراجع عن الحذف",en:"Withdraw deletion"},"pages.profile.delete_account_pending":{ar:"حسابك مجدول للحذف نهائيًا من المتجر خلال :days يومًا. يمكنك التراجع عن الحذف قبل انقضاء المدة.",en:"Your account will be deleted permanently from the store within :days days. You can withdraw the deletion before the deadline."},"pages.profile.delete_request_cancelled":{ar:"تم إلغاء طلب الحذف",en:"Deletion request cancelled"}},this.registerTranslationDefaults(),this.loadTranslations(),salla.onReady((()=>{this.isHiddenName=salla.config.get("user.is_hidden_name"),this.isNotifiable=salla.config.get("user.is_notifiable"),this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.fetchDeleteRequestStatus(),this.isNotifiable&&this.isHiddenName||salla.event.on("profile::info.fetched",(e=>{this.isHiddenName=e.data.is_hidden_name,this.isNotifiable=e.data.is_notifiable}))})),salla.lang.onLoaded((()=>{this.registerTranslationDefaults(),this.loadTranslations()}))}getDaysUntilExecution(e){return Math.max(0,Math.ceil(((e>1e12?e:1e3*e)-Date.now())/864e5))}applyPendingMessage(){const e=salla.lang.get("pages.profile.delete_account_pending");this.deleteAccountPending=null!=this.deletePendingDays?e.replace(/:days/g,String(salla.helpers.number(this.deletePendingDays))):e}async fetchDeleteRequestStatus(){try{const e=await salla.profile.getDeleteRequest(),t=e?.data??null,s=t?.data_request||t,i=s?.status;this.isDeletePending="pending"===i;const a=s?.execution_at;this.deletePendingDays=null==a||Number.isNaN(Number(a))?null:this.getDaysUntilExecution(Number(a)),this.applyPendingMessage()}catch{}}registerTranslationDefaults(){if(!salla?.lang?.addBulk)return;const e=Object.entries(this.translationDefaults).reduce(((e,[t,s])=>(salla.lang.get(t)===t&&(e[t]=s),e)),{});Object.keys(e).length&&salla.lang.addBulk(e)}loadTranslations(){this.deleteAccount=salla.lang.get("pages.profile.delete_account"),this.deleteAccountDesc=salla.lang.get("pages.profile.delete_account_description"),this.deleteConfirmTitle=salla.lang.get("pages.profile.delete_account_confirm_title"),this.deleteAccountWarning=salla.lang.get("pages.profile.delete_account_warning"),this.cancelLabel=salla.lang.get("pages.profile.cancel"),this.deleteOtpTitle=salla.lang.get("pages.profile.delete_account_otp_title"),this.deleteOtpInstruction=salla.lang.get("pages.profile.delete_account_otp_instruction"),this.deleteConfirmOtp=salla.lang.get("pages.profile.delete_account_confirm_otp"),this.sendViaPhone=salla.lang.get("pages.profile.delete_account_send_via_phone"),this.sendViaEmail=salla.lang.get("pages.profile.delete_account_send_via_email"),this.deleteSuccessTitle=salla.lang.get("pages.profile.delete_account_success_title"),this.deleteSuccessMessage=salla.lang.get("pages.profile.delete_account_success_message"),this.okLabel=salla.lang.get("pages.profile.ok"),this.cancelDeletionRequest=salla.lang.get("pages.profile.cancel_deletion_request"),this.applyPendingMessage(),this.resendAfterLabel=salla.lang.get("blocks.header.resend_after"),this.resendLabel=salla.lang.get("blocks.comments.submit"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.hideMyName=salla.lang.get("pages.profile.hide_my_name"),this.hideMyNameDesc=salla.lang.get("pages.profile.hide_my_name_desc"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description")}toggleSetting(e,t){salla.profile.updateSettings({name:e,value:t.target.checked})}capitalizeText(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}getOtpTarget(){return"email"===this.otpType?salla.config.get("user.email")||"":salla.config.get("user.mobile")||""}updateModalForStep(){if(this.confirmationModal)switch(this.currentStep){case"confirm":this.confirmationModal.setTitle(this.capitalizeText(this.deleteConfirmTitle));break;case"otp":this.confirmationModal.setTitle(this.capitalizeText(this.deleteOtpTitle));break;case"success":this.confirmationModal.setTitle(this.capitalizeText(this.deleteSuccessTitle))}}openDeleteModal(){this.currentStep="confirm",this.otpType="email",this.resetOtpInputs(),this.clearResendTimer(),this.updateModalForStep(),this.confirmationModal.open()}closeDeleteModal(){this.clearResendTimer(),this.confirmationModal?.close()}goBackFromOtp(){this.clearResendTimer(),this.resetOtpInputs(),this.resetOtpError(),this.currentStep="confirm",this.updateModalForStep()}async handleModalVisibilityChanged(e){if(e.detail)return;this.clearResendTimer();const t="success"===this.currentStep;t&&(this.isDeletePending=!0),this.currentStep="confirm",this.resetOtpInputs(),t&&await this.fetchDeleteRequestStatus()}formatResendTimer(e){return"00 : "+(e>=10?`${e}`:`0${e}`)}updateResendTimerDisplay(){this.timerEl&&(this.timerEl.innerHTML=this.formatResendTimer(this.resendAfter))}isDeleteRequestInFlight(){return this.isSubmitting||this.isSwitchingChannel||this.isVerifyingOtp}async initiateDeleteRequest(e="confirm"){if(!this.isDeleteRequestInFlight()){"switch"===e||"resend"===e?this.isSwitchingChannel=!0:this.isSubmitting=!0;try{await salla.profile.initiateDeleteRequest(this.otpType),this.currentStep="otp",this.updateModalForStep(),this.resetOtpInputs(),this.startResendTimer(),setTimeout((()=>this.otpInputs[0]?.focus()),100)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{"switch"===e||"resend"===e?this.isSwitchingChannel=!1:this.isSubmitting=!1}}}async switchOtpChannel(){this.isDeleteRequestInFlight()||(this.otpType="email"===this.otpType?"mobile":"email",await this.initiateDeleteRequest("switch"))}async resendOtp(){this.showResendLink&&!this.isDeleteRequestInFlight()&&await this.initiateDeleteRequest("resend")}collectOtpCode(){const e=salla.helpers.number(this.otpInputs.map((e=>e?.value||"")).join(""),!0).replace(/[^0-9]/g,"");return this.hiddenCodeInput&&(this.hiddenCodeInput.value=e),e}resetOtpError(){this.otpHasError=!1,this.otpErrorMessage=""}setOtpError(e){this.otpHasError=!0,this.otpErrorMessage=e}async verifyDeleteOtp(){if(this.isVerifyingOtp||this.isSwitchingChannel)return;const e=this.collectOtpCode();if(e.length<4)return this.setOtpError(salla.lang.get("pages.profile.delete_account_otp_required")),void this.otpInputs[e.length]?.focus();this.resetOtpError(),this.isVerifyingOtp=!0;try{const t=await salla.profile.verifyDeleteRequest({type:this.otpType,code:e});this.deleteSuccessMessage=t?.data?.message||salla.lang.get("pages.profile.delete_account_success_message"),this.clearResendTimer(),this.resetOtpInputs(),this.otpInputs=[],this.currentStep="success",this.updateModalForStep()}catch(e){this.setOtpError(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred")),this.resetOtpInputs()}finally{this.isVerifyingOtp=!1}}async confirmSuccess(){this.isDeletePending=!0,this.closeDeleteModal(),this.currentStep="confirm",await this.fetchDeleteRequestStatus()}async cancelDeleteRequest(){if(!this.isSubmitting){this.isSubmitting=!0;try{const e=(await salla.profile.cancelDeleteRequest()).message||salla.lang.get("pages.profile.delete_request_cancelled");this.isDeletePending=!1,salla.notify?.success?.(e)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{this.isSubmitting=!1}}}resetOtpInputs(){this.otpInputs.forEach((e=>{e&&(e.value="")})),this.hiddenCodeInput&&(this.hiddenCodeInput.value="")}modifyNextOtpInput(e,t){e.value=t[0],t=t.substring(1),e.nextElementSibling&&t.length?this.modifyNextOtpInput(e.nextElementSibling,t):e.nextElementSibling||0!==t.length?e.nextElementSibling&&0===t.length&&e.nextElementSibling.focus():e.focus()}splitOtpNumber(e){const t=salla.helpers.number(e.data||e.target.value||"",!0).replace(/[^0-9]/g,"");t&&1!==t.length&&this.modifyNextOtpInput(e.target,t)}allOtpInputsFilled(){return this.otpInputs.every((e=>e?.value))}handleOtpInput(e){this.resetOtpError(),e.target.value=salla.helpers.number(e.target.value||"",!0),salla.helpers.inputDigitsOnly(e.target),this.allOtpInputsFilled()&&setTimeout((()=>this.verifyDeleteOtp()),100)}handleOtpKeyUp(e){if(this.resetOtpError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(e.key))return;const t=e.keyCode||e.charCode;e.target.value?(e.target.nextElementSibling?.focus(),e.target.nextElementSibling?.select()):[8,46].includes(t)&&(e.target.previousElementSibling?.focus(),e.target.previousElementSibling?.select()),e.target.value.length>1&&this.splitOtpNumber(e)}handleOtpPaste(e){this.resetOtpError();const t=salla.helpers.number(e.clipboardData.getData("text")||"",!0).replace(/[^0-9]/g,"").substring(0,this.otpInputs.length);this.otpInputs.forEach((e=>e.value="")),this.otpInputs[0]&&this.modifyNextOtpInput(this.otpInputs[0],t)}handleOtpFocus(e){e.target!==this.otpInputs[0]&&(""===this.otpInputs[0]?.value&&this.otpInputs[0].focus(),""===e.target.previousElementSibling?.value&&e.target.previousElementSibling.focus())}startResendTimer(){this.clearResendTimer(),this.resendAfter=30,this.showResendLink=!1,this.updateResendTimerDisplay(),this.resendTimerId=setInterval((()=>{if(this.resendAfter--,this.resendAfter<=0)return this.clearResendTimer(),void(this.showResendLink=!0);this.updateResendTimerDisplay()}),1e3)}clearResendTimer(){this.resendTimerId&&(clearInterval(this.resendTimerId),this.resendTimerId=null),this.showResendLink=!1}renderUserDeleteIcon(){return t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",color:"currentColor",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},t("path",{d:"M14.5 8C14.5 5.23858 12.2614 3 9.5 3C6.73858 3 4.5 5.23858 4.5 8C4.5 10.7614 6.73858 13 9.5 13C12.2614 13 14.5 10.7614 14.5 8Z"}),t("path",{d:"M15.5 21L18.5 18M18.5 18L21.5 15M18.5 18L15.5 15M18.5 18L21.5 21"}),t("path",{d:"M2.5 20C2.5 16.134 5.63401 13 9.5 13C10.775 13 11.9704 13.3409 13 13.9365"}))}renderConfirmStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-warning"},this.deleteAccountWarning),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--row"},t("salla-button",{width:"wide",fill:"outline",color:"danger",onClick:()=>this.closeDeleteModal()},this.capitalizeText(this.cancelLabel)),t("salla-button",{width:"wide",color:"primary",loading:this.isSubmitting,onClick:()=>this.initiateDeleteRequest()},this.capitalizeText(this.deleteAccount))))}renderOtpStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-otp-instruction"},this.deleteOtpInstruction),t("p",{class:"s-user-settings-delete-otp-target"},this.getOtpTarget()),t("input",{type:"hidden",name:"code",maxlength:"4",ref:e=>this.hiddenCodeInput=e}),t("div",{class:{"s-user-settings-delete-otp-codes":!0,"has-error":this.otpHasError},dir:"ltr"},[1,2,3,4].map((e=>t("input",{type:"text",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",id:`delete-otp-${e}`,class:{"s-user-settings-delete-otp-input":!0,"s-has-error":this.otpHasError},onInput:e=>this.handleOtpInput(e),onPaste:e=>this.handleOtpPaste(e),onKeyUp:e=>this.handleOtpKeyUp(e),onFocus:e=>this.handleOtpFocus(e),ref:t=>this.otpInputs[e-1]=t,required:!0})))),this.otpHasError&&this.otpErrorMessage?t("span",{class:"s-user-settings-delete-otp-error"},this.otpErrorMessage):"",t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{width:"wide",color:"primary",disabled:this.isSwitchingChannel,onClick:()=>this.verifyDeleteOtp()},this.capitalizeText(this.deleteConfirmOtp)),t("salla-button",{width:"wide",fill:"outline",color:"primary",disabled:this.isVerifyingOtp,onClick:()=>this.switchOtpChannel()},this.capitalizeText("email"===this.otpType?this.sendViaPhone:this.sendViaEmail))),t("p",{class:"s-user-settings-delete-otp-resend",style:{display:this.showResendLink?"none":"block"}},this.resendAfterLabel,t("b",{class:"s-user-settings-delete-otp-timer mx-1 font-bold",ref:e=>this.timerEl=e})),t("a",{href:"#",class:"s-user-settings-delete-otp-resend-link",style:{display:this.showResendLink?"block":"none"},onClick:e=>{e.preventDefault(),this.resendOtp()}},this.resendLabel))}renderSuccessStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-success-body"},this.deleteSuccessMessage),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{class:"s-user-settings-delete-success-btn",width:"wide",color:"primary",onClick:()=>this.confirmSuccess()},this.capitalizeText(this.okLabel))))}renderDeleteStep(){switch(this.currentStep){case"otp":return this.renderOtpStep();case"success":return this.renderSuccessStep();default:return this.renderConfirmStep()}}renderDeleteSectionAction(){return this.isDeletePending?t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",loading:this.isSubmitting,onClick:()=>this.cancelDeleteRequest()},this.capitalizeText(this.cancelDeletionRequest)):t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",onClick:()=>this.openDeleteModal()},this.capitalizeText(this.deleteAccount))}render(){return t(s,{key:"64356c5b57d826fce8c29cc319a9762464c7fe51",class:"s-user-settings-wrapper"},this.canHideName&&t("div",{key:"4f7b3eb703f89e4a758fca54ba1b214f6724aaea",class:"s-user-settings-section"},t("salla-list-tile",{key:"7ad109e36b278fe81a314d51e1ab68030dd96cdc"},t("div",{key:"c789b7e2c541e25aaaf336e052d1986f6429da71",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"5d7b377aefb80139527d8814ee2c636fa9c73e0f",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>user-cancel</title>\n<path d="M29.885 16l1.724-1.724c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-1.724 1.724-1.724-1.724c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l1.724 1.724-1.724 1.724c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l1.724-1.724 1.724 1.724c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885zM10.667 16c4.043 0 7.333-3.289 7.333-7.333s-3.291-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.291 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>\n</svg>\n'})),t("div",{key:"fdb9d6130ef27cffbe4e2ef06e7b9155d0d04c2b",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.hideMyName)),t("div",{key:"bd8592a487c79926355eeea25a5e1429bca0fd80",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.hideMyNameDesc)),t("div",{key:"cf21ed12bb38dc3a613efac6d017a72aab38780b",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"160140e25cf8e6c4556e52c0b36ba5769618b419",class:"s-toggle"},t("input",{key:"369a694fabbd42e6c239b23c26d68f858775ffe2",class:"s-toggle-input",checked:this.isHiddenName,onChange:e=>this.toggleSetting("is_hidden_name",e),type:"checkbox"}),t("div",{key:"5952ec01913ef95d888eeb3aace14123ffd3ef6f",class:"s-toggle-switcher"}))))),t("div",{key:"885355f8435759c9359a3d9eb95d5637b1c74751",class:"s-user-settings-section"},t("salla-list-tile",{key:"93b607850b20add5384a3b28e4e58fbfcb181d53"},t("div",{key:"c795aabfdc6df0beb9c0bfcf73ad87625eb7f51b",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"a59ede027c4466a1e84e8e8b4c649c7b418dd0a3",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>bullhorn</title>\n<path d="M30.129 0.264c-0.339-0.252-0.776-0.328-1.179-0.208l-24.951 7.485v-0.216c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v14.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-0.112l3.448 1.207-0.595 1.704c-0.321 1.019-0.227 2.103 0.267 3.051s1.327 1.647 2.345 1.968l6.359 2.004c0.399 0.127 0.804 0.187 1.201 0.187 1.699 0 3.277-1.091 3.812-2.785l0.423-1.295 7.633 2.672c0.143 0.049 0.292 0.075 0.44 0.075 0.273 0 0.543-0.084 0.772-0.247 0.352-0.249 0.561-0.655 0.561-1.087v-28c0-0.421-0.199-0.819-0.537-1.069zM18.297 28.4c-0.221 0.701-0.973 1.089-1.673 0.871l-6.357-2.004c-0.34-0.108-0.617-0.34-0.781-0.656s-0.196-0.676-0.101-0.977l0.581-1.665 8.777 3.072zM28 27.453l-24-8.4v-8.728l24-7.2z"></path>\n</svg>\n'})),t("div",{key:"e7af96b6f919a8be8bb126237cb3977e72a7c089",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.promotionalMsgs)),t("div",{key:"dab7b270443b6eddccd7df739c2bee82eb7706af",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.promotionalMsgsDesc)),t("div",{key:"56a6f18c788891fe9215a57d0fcaa5cf98bd3aa5",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"1fc28780fe779099eaed7916f31cbbb681c10fe9",class:"s-toggle"},t("input",{key:"832edd6e5b806171bb913163b7d5c19dbb0833f5",class:"s-toggle-input",checked:this.isNotifiable,onChange:e=>this.toggleSetting("is_notifiable",e),type:"checkbox"}),t("div",{key:"54260d8cca19ca6914cdd3bf15093b9669fef44a",class:"s-toggle-switcher"}))))),t("div",{key:"549bae1159a55b035952a12c8dc9d2b9d660f5bf",class:"s-user-settings-section s-user-settings-section-delete-user"},t("salla-list-tile",{key:"7969327e863cd998a120f27d61621d83ef8e57d5"},t("div",{key:"acf14b5e6ce76657fe0016aa63e26851e7688cd5",slot:"icon",class:"s-user-settings-section-icon"},this.renderUserDeleteIcon()),t("div",{key:"4a38cf9d0510e784317b0eb4db2fd4589a9f71d4",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.deleteAccount)),t("div",{key:"054f6a6c30f2eb9794f83a0998f20e208c7ed85a",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.isDeletePending?this.deleteAccountPending:this.deleteAccountDesc)),t("div",{key:"00d392a300b986d5d3e6f6711e6996df9731962d",slot:"action",class:"s-user-settings-section-action"},this.renderDeleteSectionAction()))),t("salla-modal",{key:"d4e8006e57d9c35267177f07b60e510ea3e53400",id:"salla-user-settings-delete-modal",width:"xs",centered:!0,showBack:"otp"===this.currentStep,isClosable:"success"!==this.currentStep,iconStyle:"success"===this.currentStep?"success":void 0,onModalVisibilityChanged:e=>this.handleModalVisibilityChanged(e),onModalBack:()=>this.goBackFromOtp(),ref:e=>this.confirmationModal=e},"success"!==this.currentStep?t("span",{slot:"icon",class:"s-user-settings-delete-icon"},this.renderUserDeleteIcon()):null,t("div",{key:this.currentStep,class:"s-user-settings-delete-step"},this.renderDeleteStep())))}};i.style=".s-modal-header-inner{display:flex;flex-direction:column !important;align-items:center !important;justify-content:center !important}.s-modal-header-content{text-align:center !important}.s-user-settings-delete-body{text-align:center}.s-user-settings-delete-icon{display:inline-flex;align-items:center;justify-content:center;width:4rem;height:4rem;border-radius:9999px;border:1px solid var(--infinte-color);color:var(--infinte-color);margin:0 auto 1rem}.s-user-settings-delete-icon svg{width:1.5rem;height:1.5rem}.s-user-settings-delete-warning{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-actions--row{display:flex;gap:0.75rem;justify-content:center}.s-user-settings-delete-actions--row salla-button{flex:1}.s-user-settings-delete-actions--stack{display:flex;flex-direction:column;gap:0.75rem;margin-top:1.25rem}.s-user-settings-delete-otp-instruction{color:#6b7280;font-size:0.875rem}.s-user-settings-delete-otp-target{color:#6b7280;direction:ltr;margin-bottom:1.25rem}.s-user-settings-delete-otp-codes{display:flex;justify-content:stretch;gap:0.75rem;direction:ltr;margin-bottom:0.75rem;width:100%}.s-user-settings-delete-otp-codes.has-error{margin-bottom:0}.s-user-settings-delete-otp-input{flex:1 1 0;min-width:0;width:100%;height:3.5rem;text-align:center;border:1px solid #d1d5db;border-radius:0.5rem;font-size:1.25rem;font-weight:600;color:#111827;outline:none}.s-user-settings-delete-otp-input:focus{border-color:#004956;box-shadow:0 0 0 1px #004956}.s-user-settings-delete-otp-input.s-has-error{border-color:#ef4444 !important}.s-user-settings-delete-otp-input.s-has-error:focus{border-color:#ef4444 !important;box-shadow:0 0 0 1px #ef4444}.s-user-settings-delete-otp-input::-webkit-outer-spin-button,.s-user-settings-delete-otp-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-user-settings-delete-otp-input[type=text]{-moz-appearance:textfield}.s-user-settings-delete-otp-error{display:block;color:#ef4444;font-size:0.75rem;text-align:center;padding-top:0.75rem;margin-bottom:1.25rem}.s-user-settings-delete-otp-resend{color:#6b7280;font-size:0.75rem;margin-top:1rem;text-align:center}.s-user-settings-delete-otp-timer{font-weight:600;direction:ltr;display:inline-block}.s-user-settings-delete-otp-resend-link{display:block;color:#004956;font-size:0.875rem;margin-top:1rem;text-align:center;text-decoration:underline;cursor:pointer}.s-user-settings-delete-success-body{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-success-btn{--s-button-color:#004956}";export{i as salla_user_settings}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as a,h as r,a as t}from"./p-MrxrxOqi.js";import{S as l}from"./p-CXRKXFgT.js";import{T as e}from"./p-DBIOj_I_.js";const o=class{constructor(r){a(this,r)}get productId(){return this.host.dataset.productId||salla.config.get("page.id")}componentWillLoad(){return salla.onReady().then((()=>salla.lang.onLoaded())).then((()=>this.prize())).catch((a=>salla.logger.error(a)))}handleClick(){salla.config.isGuest()?salla.event.dispatch("login::open"):this.exchangeModal.open()}render(){return"success"===this.prize.status&&this.productId?r("div",{class:"s-loyalty-program-banner-container"},r("div",null,r("p",{class:"s-loyalty-program-banner-container-banner-title"},salla.lang.get("pages.loyalty_program.want_to_redeem_free_product")),r("p",{class:"s-loyalty-program-banner-container-banner-subtitle"},salla.lang.get("pages.loyalty_program.exchange_points_for_free_product",{points:this.prize.data.cost_points}))),r("button",{onClick:()=>this.handleClick()},r("span",{innerHTML:l}),r("span",null,salla.lang.get("pages.loyalty_program.exchange_points"))),r("salla-modal",{ref:a=>this.exchangeModal=a,width:"sm"},this.prize.data?r("salla-reward-exchange",{productId:Number(this.productId),prize:this.prize.data}):"")):null}get host(){return t(this)}};(function(a,r,t,l){var e,o=arguments.length,s=o<3?r:null===l?l=Object.getOwnPropertyDescriptor(r,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(a,r,t,l);else for(var i=a.length-1;i>=0;i--)(e=a[i])&&(s=(o<3?e(s):o>3?e(r,t,s):e(r,t))||s);o>3&&s&&Object.defineProperty(r,t,s)})([e((async function(){if(!(salla.config.get("store.features")||[]).includes("loyalty-system"))return Promise.reject("Loyalty system is not enabled for merchant");const{loyalty_prize:a}=await salla.product.api.getDetails(this.productId);return a||Promise.reject("no loyalty prize for this product")}))],o.prototype,"prize",void 0),o.style="@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";export{o as salla_loyalty_banner}
4
+ import{r as a,h as r,a as t}from"./p-vzCji15v.js";import{S as l}from"./p-CXRKXFgT.js";import{T as e}from"./p-DuAXOs35.js";const o=class{constructor(r){a(this,r)}get productId(){return this.host.dataset.productId||salla.config.get("page.id")}componentWillLoad(){return salla.onReady().then((()=>salla.lang.onLoaded())).then((()=>this.prize())).catch((a=>salla.logger.error(a)))}handleClick(){salla.config.isGuest()?salla.event.dispatch("login::open"):this.exchangeModal.open()}render(){return"success"===this.prize.status&&this.productId?r("div",{class:"s-loyalty-program-banner-container"},r("div",null,r("p",{class:"s-loyalty-program-banner-container-banner-title"},salla.lang.get("pages.loyalty_program.want_to_redeem_free_product")),r("p",{class:"s-loyalty-program-banner-container-banner-subtitle"},salla.lang.get("pages.loyalty_program.exchange_points_for_free_product",{points:this.prize.data.cost_points}))),r("button",{onClick:()=>this.handleClick()},r("span",{innerHTML:l}),r("span",null,salla.lang.get("pages.loyalty_program.exchange_points"))),r("salla-modal",{ref:a=>this.exchangeModal=a,width:"sm"},this.prize.data?r("salla-reward-exchange",{productId:Number(this.productId),prize:this.prize.data}):"")):null}get host(){return t(this)}};(function(a,r,t,l){var e,o=arguments.length,s=o<3?r:null===l?l=Object.getOwnPropertyDescriptor(r,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(a,r,t,l);else for(var i=a.length-1;i>=0;i--)(e=a[i])&&(s=(o<3?e(s):o>3?e(r,t,s):e(r,t))||s);o>3&&s&&Object.defineProperty(r,t,s)})([e((async function(){if(!(salla.config.get("store.features")||[]).includes("loyalty-system"))return Promise.reject("Loyalty system is not enabled for merchant");const{loyalty_prize:a}=await salla.product.api.getDetails(this.productId);return a||Promise.reject("no loyalty prize for this product")}))],o.prototype,"prize",void 0),o.style="@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";export{o as salla_loyalty_banner}
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{d as t}from"./p-MrxrxOqi.js";function n(t,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in t)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(t)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var t={type:"spring",stiffness:.5,damping:.45,mass:10},n=function(t){return-.5*(Math.cos(Math.PI*t)-1)},e=function(t){var n=Math.min(10/t.width,10/t.height),e=document.createElement("canvas"),i=e.getContext("2d"),o=e.width=Math.ceil(t.width*n),a=e.height=Math.ceil(t.height*n);i.drawImage(t,0,0,o,a);var _=null;try{_=i.getImageData(0,0,o,a).data}catch(t){return null}for(var E=_.length,u=0,I=0,c=0,T=0;T<E;T+=4)u+=_[T]*_[T],I+=_[T+1]*_[T+1],c+=_[T+2]*_[T+2];return{r:u=r(u,E),g:I=r(I,E),b:c=r(c,E)}},r=function(t,n){return Math.floor(Math.sqrt(t/(n/4)))},i=function(t,e,r,i,o){t.width=e,t.height=r;var a=t.getContext("2d"),_=.5*e,E=a.createRadialGradient(_,r+110,r-100,_,r+110,r+100);(function(t,e){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,_=1-a,E=e.join(","),u=0;u<=o;u++){var I=u/o;t.addColorStop(a+_*I,"rgba(".concat(E,", ").concat(i(I)*r,")"))}})(E,i,o,void 0,8,.4),a.save(),a.translate(-250,0),a.scale(2,1),a.fillStyle=E,a.fillRect(0,0,e,r),a.restore()},o="undefined"!=typeof navigator,a="undefined"!=typeof document,_=500,E=200,u=o&&a&&document.createElement("canvas"),I=o&&a&&document.createElement("canvas"),c=o&&a&&document.createElement("canvas"),T=[40,40,40],f=[196,78,71],l=[54,151,99];o&&a&&(i(u,_,E,T,.85),i(I,_,E,f,1),i(c,_,E,l,1));var s=function(n){var r=n.utils.createView({name:"file-poster-overlay",tag:"canvas",ignoreRect:!0,create:function(t){var n,e;(e=t.root.element).width=(n=t.props.template).width,e.height=n.height,e.getContext("2d").drawImage(n,0,0)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),o=function(t){var n=t.root;n.ref.overlayShadow.opacity=1,n.ref.overlayError.opacity=0,n.ref.overlaySuccess.opacity=0},a=function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlayError.opacity=1};return n.utils.createView({name:"file-poster-wrapper",create:function(e){var o=e.root,a=e.props,s=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SHADOW_COLOR"),O=o.query("GET_FILE_POSTER_ITEM_OVERLAY_ERROR_COLOR"),R=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SUCCESS_COLOR");s&&s!==T&&i(u,_,E,T=s,.85),O&&O!==f&&i(I,_,E,f=O,1),R&&R!==l&&i(c,_,E,l=R,1);var v=function(n){return n.utils.createView({name:"file-poster",tag:"div",ignoreRect:!0,create:function(t){var n=t.root;n.ref.image=document.createElement("img"),n.element.appendChild(n.ref.image)},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){var n=t.root,e=t.props,r=e.id,i=n.query("GET_ITEM",{id:e.id});if(i){var o=i.getMetadata("poster");n.ref.image.src=o,n.dispatch("DID_FILE_POSTER_DRAW",{id:r})}}}),mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:t,scaleY:t,opacity:{type:"tween",duration:750}}}})}(n);o.ref.image=o.appendChildView(o.createChildView(v,{id:a.id,scaleX:1.25,scaleY:1.25,opacity:0})),o.ref.overlayShadow=o.appendChildView(o.createChildView(r,{template:u,opacity:0})),o.ref.overlaySuccess=o.appendChildView(o.createChildView(r,{template:c,opacity:0})),o.ref.overlayError=o.appendChildView(o.createChildView(r,{template:I,opacity:0}))},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){t.root.ref.overlayShadow.opacity=1},DID_FILE_POSTER_DRAW:function(t){var n=t.root.ref.image;n.scaleX=1,n.scaleY=1,n.opacity=1},DID_FILE_POSTER_CONTAINER_CREATE:function(t){var n,r,i,o=t.root,a=t.props.id,_=o.query("GET_ITEM",a);if(_){var E=_.getMetadata("poster"),u=function(t){var n=o.query("GET_FILE_POSTER_CALCULATE_AVERAGE_IMAGE_COLOR")?e(t):null;_.setMetadata("color",n,!0),o.dispatch("DID_FILE_POSTER_LOAD",{id:a,data:t})};n=E,r=function(t,n){var e,r;o.dispatch("DID_FILE_POSTER_CALCULATE_SIZE",{id:a,width:t,height:n}),(e=E,r=o.query("GET_FILE_POSTER_CROSS_ORIGIN_ATTRIBUTE_VALUE"),new Promise((function(t,n){var i=new Image;"string"==typeof crossOrigin&&(i.crossOrigin=r),i.onload=function(){t(i)},i.onerror=function(t){n(t)},i.src=e}))).then(u)},(i=new Image).onload=function(){var t=i.naturalWidth,n=i.naturalHeight;i=null,r(t,n)},i.src=n}},DID_THROW_ITEM_LOAD_ERROR:a,DID_THROW_ITEM_PROCESSING_ERROR:a,DID_THROW_ITEM_INVALID:a,DID_COMPLETE_ITEM_PROCESSING:function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlaySuccess.opacity=1},DID_START_ITEM_PROCESSING:o,DID_REVERT_ITEM_PROCESSING:o})})},O=function(t){var n=t.addFilter,e=t.utils,r=e.Type,i=e.createRoute,o=s(t);return n("CREATE_VIEW",(function(t){var n=t.view,e=t.query;if((0,t.is)("file")&&e("GET_ALLOW_FILE_POSTER")){var r=function(t,r){var i=r.id,a=e("GET_ITEM",i);a&&a.getMetadata("poster")&&!a.archived&&t.ref.previousPoster!==a.getMetadata("poster")&&(t.ref.previousPoster=a.getMetadata("poster"),e("GET_FILE_POSTER_FILTER_ITEM")(a)&&(t.ref.filePoster&&n.removeChildView(t.ref.filePoster),t.ref.filePoster=n.appendChildView(n.createChildView(o,{id:i})),t.dispatch("DID_FILE_POSTER_CONTAINER_CREATE",{id:i})))},a=function(t){var n=t.root,e=n.query("GET_FILE_POSTER_HEIGHT");if(e)return e;var r=n.query("GET_FILE_POSTER_MIN_HEIGHT"),i=n.query("GET_FILE_POSTER_MAX_HEIGHT");if(r&&n.ref.imageHeight<r)return r;var o=n.rect.element.width*(n.ref.imageHeight/n.ref.imageWidth);return r&&o<r?r:i&&o>i?i:o};n.registerWriter(i({DID_LOAD_ITEM:function(t){r(t.root,t.props)},DID_FILE_POSTER_CALCULATE_SIZE:function(t){var n=t.root,e=t.action;n.ref.filePoster&&(n.ref.imageWidth=e.width,n.ref.imageHeight=e.height,n.ref.shouldUpdatePanelHeight=!0,n.dispatch("KICK"))},DID_UPDATE_ITEM_METADATA:function(t){var n=t.root,e=t.props;/poster/.test(t.action.change.key)&&r(n,e)}},(function(t){var n=t.root;n.ref.filePoster&&(n.rect.element.hidden||n.ref.shouldUpdatePanelHeight&&(n.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:t.props.id,height:a({root:n})}),n.ref.shouldUpdatePanelHeight=!1))})))}})),{options:{allowFilePoster:[!0,r.BOOLEAN],filePosterHeight:[null,r.INT],filePosterMinHeight:[null,r.INT],filePosterMaxHeight:[null,r.INT],filePosterFilterItem:[function(){return!0},r.FUNCTION],filePosterCalculateAverageImageColor:[!1,r.BOOLEAN],filePosterCrossOriginAttributeValue:["Anonymous",r.STRING],filePosterItemOverlayShadowColor:[null,r.ARRAY],filePosterItemOverlayErrorColor:[null,r.ARRAY],filePosterItemOverlaySuccessColor:[null,r.ARRAY]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:O})),O}()),r.exports),o=n({__proto__:null,default:t(i)},[i]);
4
+ import{d as t}from"./p-vzCji15v.js";function n(t,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in t)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(t)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var t={type:"spring",stiffness:.5,damping:.45,mass:10},n=function(t){return-.5*(Math.cos(Math.PI*t)-1)},e=function(t){var n=Math.min(10/t.width,10/t.height),e=document.createElement("canvas"),i=e.getContext("2d"),o=e.width=Math.ceil(t.width*n),a=e.height=Math.ceil(t.height*n);i.drawImage(t,0,0,o,a);var _=null;try{_=i.getImageData(0,0,o,a).data}catch(t){return null}for(var E=_.length,u=0,I=0,c=0,T=0;T<E;T+=4)u+=_[T]*_[T],I+=_[T+1]*_[T+1],c+=_[T+2]*_[T+2];return{r:u=r(u,E),g:I=r(I,E),b:c=r(c,E)}},r=function(t,n){return Math.floor(Math.sqrt(t/(n/4)))},i=function(t,e,r,i,o){t.width=e,t.height=r;var a=t.getContext("2d"),_=.5*e,E=a.createRadialGradient(_,r+110,r-100,_,r+110,r+100);(function(t,e){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,_=1-a,E=e.join(","),u=0;u<=o;u++){var I=u/o;t.addColorStop(a+_*I,"rgba(".concat(E,", ").concat(i(I)*r,")"))}})(E,i,o,void 0,8,.4),a.save(),a.translate(-250,0),a.scale(2,1),a.fillStyle=E,a.fillRect(0,0,e,r),a.restore()},o="undefined"!=typeof navigator,a="undefined"!=typeof document,_=500,E=200,u=o&&a&&document.createElement("canvas"),I=o&&a&&document.createElement("canvas"),c=o&&a&&document.createElement("canvas"),T=[40,40,40],f=[196,78,71],l=[54,151,99];o&&a&&(i(u,_,E,T,.85),i(I,_,E,f,1),i(c,_,E,l,1));var s=function(n){var r=n.utils.createView({name:"file-poster-overlay",tag:"canvas",ignoreRect:!0,create:function(t){var n,e;(e=t.root.element).width=(n=t.props.template).width,e.height=n.height,e.getContext("2d").drawImage(n,0,0)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),o=function(t){var n=t.root;n.ref.overlayShadow.opacity=1,n.ref.overlayError.opacity=0,n.ref.overlaySuccess.opacity=0},a=function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlayError.opacity=1};return n.utils.createView({name:"file-poster-wrapper",create:function(e){var o=e.root,a=e.props,s=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SHADOW_COLOR"),O=o.query("GET_FILE_POSTER_ITEM_OVERLAY_ERROR_COLOR"),R=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SUCCESS_COLOR");s&&s!==T&&i(u,_,E,T=s,.85),O&&O!==f&&i(I,_,E,f=O,1),R&&R!==l&&i(c,_,E,l=R,1);var v=function(n){return n.utils.createView({name:"file-poster",tag:"div",ignoreRect:!0,create:function(t){var n=t.root;n.ref.image=document.createElement("img"),n.element.appendChild(n.ref.image)},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){var n=t.root,e=t.props,r=e.id,i=n.query("GET_ITEM",{id:e.id});if(i){var o=i.getMetadata("poster");n.ref.image.src=o,n.dispatch("DID_FILE_POSTER_DRAW",{id:r})}}}),mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:t,scaleY:t,opacity:{type:"tween",duration:750}}}})}(n);o.ref.image=o.appendChildView(o.createChildView(v,{id:a.id,scaleX:1.25,scaleY:1.25,opacity:0})),o.ref.overlayShadow=o.appendChildView(o.createChildView(r,{template:u,opacity:0})),o.ref.overlaySuccess=o.appendChildView(o.createChildView(r,{template:c,opacity:0})),o.ref.overlayError=o.appendChildView(o.createChildView(r,{template:I,opacity:0}))},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){t.root.ref.overlayShadow.opacity=1},DID_FILE_POSTER_DRAW:function(t){var n=t.root.ref.image;n.scaleX=1,n.scaleY=1,n.opacity=1},DID_FILE_POSTER_CONTAINER_CREATE:function(t){var n,r,i,o=t.root,a=t.props.id,_=o.query("GET_ITEM",a);if(_){var E=_.getMetadata("poster"),u=function(t){var n=o.query("GET_FILE_POSTER_CALCULATE_AVERAGE_IMAGE_COLOR")?e(t):null;_.setMetadata("color",n,!0),o.dispatch("DID_FILE_POSTER_LOAD",{id:a,data:t})};n=E,r=function(t,n){var e,r;o.dispatch("DID_FILE_POSTER_CALCULATE_SIZE",{id:a,width:t,height:n}),(e=E,r=o.query("GET_FILE_POSTER_CROSS_ORIGIN_ATTRIBUTE_VALUE"),new Promise((function(t,n){var i=new Image;"string"==typeof crossOrigin&&(i.crossOrigin=r),i.onload=function(){t(i)},i.onerror=function(t){n(t)},i.src=e}))).then(u)},(i=new Image).onload=function(){var t=i.naturalWidth,n=i.naturalHeight;i=null,r(t,n)},i.src=n}},DID_THROW_ITEM_LOAD_ERROR:a,DID_THROW_ITEM_PROCESSING_ERROR:a,DID_THROW_ITEM_INVALID:a,DID_COMPLETE_ITEM_PROCESSING:function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlaySuccess.opacity=1},DID_START_ITEM_PROCESSING:o,DID_REVERT_ITEM_PROCESSING:o})})},O=function(t){var n=t.addFilter,e=t.utils,r=e.Type,i=e.createRoute,o=s(t);return n("CREATE_VIEW",(function(t){var n=t.view,e=t.query;if((0,t.is)("file")&&e("GET_ALLOW_FILE_POSTER")){var r=function(t,r){var i=r.id,a=e("GET_ITEM",i);a&&a.getMetadata("poster")&&!a.archived&&t.ref.previousPoster!==a.getMetadata("poster")&&(t.ref.previousPoster=a.getMetadata("poster"),e("GET_FILE_POSTER_FILTER_ITEM")(a)&&(t.ref.filePoster&&n.removeChildView(t.ref.filePoster),t.ref.filePoster=n.appendChildView(n.createChildView(o,{id:i})),t.dispatch("DID_FILE_POSTER_CONTAINER_CREATE",{id:i})))},a=function(t){var n=t.root,e=n.query("GET_FILE_POSTER_HEIGHT");if(e)return e;var r=n.query("GET_FILE_POSTER_MIN_HEIGHT"),i=n.query("GET_FILE_POSTER_MAX_HEIGHT");if(r&&n.ref.imageHeight<r)return r;var o=n.rect.element.width*(n.ref.imageHeight/n.ref.imageWidth);return r&&o<r?r:i&&o>i?i:o};n.registerWriter(i({DID_LOAD_ITEM:function(t){r(t.root,t.props)},DID_FILE_POSTER_CALCULATE_SIZE:function(t){var n=t.root,e=t.action;n.ref.filePoster&&(n.ref.imageWidth=e.width,n.ref.imageHeight=e.height,n.ref.shouldUpdatePanelHeight=!0,n.dispatch("KICK"))},DID_UPDATE_ITEM_METADATA:function(t){var n=t.root,e=t.props;/poster/.test(t.action.change.key)&&r(n,e)}},(function(t){var n=t.root;n.ref.filePoster&&(n.rect.element.hidden||n.ref.shouldUpdatePanelHeight&&(n.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:t.props.id,height:a({root:n})}),n.ref.shouldUpdatePanelHeight=!1))})))}})),{options:{allowFilePoster:[!0,r.BOOLEAN],filePosterHeight:[null,r.INT],filePosterMinHeight:[null,r.INT],filePosterMaxHeight:[null,r.INT],filePosterFilterItem:[function(){return!0},r.FUNCTION],filePosterCalculateAverageImageColor:[!1,r.BOOLEAN],filePosterCrossOriginAttributeValue:["Anonymous",r.STRING],filePosterItemOverlayShadowColor:[null,r.ARRAY],filePosterItemOverlayErrorColor:[null,r.ARRAY],filePosterItemOverlaySuccessColor:[null,r.ARRAY]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:O})),O}()),r.exports),o=n({__proto__:null,default:t(i)},[i]);
5
5
  /*!
6
6
  * FilePondPluginFilePoster 2.5.2
7
7
  * Licensed under MIT, https://opensource.org/licenses/MIT/
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{h as a}from"./p-MrxrxOqi.js";function l(a,l=(window.matchMedia("(min-width: 768px)").matches?3:2)){return a<l?a:a-a%l}function t(a=null){for(const a of document.querySelectorAll("salla-modal"))a.close();a&&requestAnimationFrame(a)}function o(a){const l=(a.prizes||[]).map((a=>({...a,items:(a.items||[]).map((l=>({...l,group_title:a.title,group_type:a.type})))}))),t={type:"all",title:salla.lang.get("pages.loyalty_program.all"),items:l.reduce(((a,l)=>a.concat(l.items)),[])};return l.unshift(t),{...a,prizes:l,prizes_count:t.items.length,points:a.points??[]}}function r(a){return[a.name.replace(/\s/g,"-"),`brand-${a.id}`].join("/")}function n(a){for(const l of a.conditions)if(l.key.endsWith("_FOR_UNIT")||l.key.endsWith("_FOR_UNIT_BY_CATEGORIES"))return!0}function s(a){for(const l of a.conditions)if(l.key.endsWith("_BY_CATEGORIES")&&a.conditions.length>1)return!0}function p(a){return s(a)?a.conditions.sort(((a,l)=>a.points-l.points))[0].points:a.points}function e(l,t=!1,o=!1){return"number"==typeof l?t?a("span",null,o?salla.lang.get("pages.loyalty_program.start_from"):""," 1 ",salla.config.currency().symbol," = ",l," ",salla.lang.get("pages.loyalty_program.point")):a("span",null,o?salla.lang.get("pages.loyalty_program.start_from"):""," ",l," ",salla.lang.get("pages.loyalty_program.point")):n(l)?a("span",null,s(l)?salla.lang.get("pages.loyalty_program.start_from"):""," 1 ",salla.config.currency().symbol," = ",p(l)," ",salla.lang.get("pages.loyalty_program.point")):a("span",null,s(l)?salla.lang.get("pages.loyalty_program.start_from"):""," ",p(l)," ",salla.lang.get("pages.loyalty_program.point"))}export{l as a,r as b,t as c,e as f,n as i,o as n}
4
+ import{h as a}from"./p-vzCji15v.js";function l(a,l=(window.matchMedia("(min-width: 768px)").matches?3:2)){return a<l?a:a-a%l}function t(a=null){for(const a of document.querySelectorAll("salla-modal"))a.close();a&&requestAnimationFrame(a)}function o(a){const l=(a.prizes||[]).map((a=>({...a,items:(a.items||[]).map((l=>({...l,group_title:a.title,group_type:a.type})))}))),t={type:"all",title:salla.lang.get("pages.loyalty_program.all"),items:l.reduce(((a,l)=>a.concat(l.items)),[])};return l.unshift(t),{...a,prizes:l,prizes_count:t.items.length,points:a.points??[]}}function r(a){return[a.name.replace(/\s/g,"-"),`brand-${a.id}`].join("/")}function n(a){for(const l of a.conditions)if(l.key.endsWith("_FOR_UNIT")||l.key.endsWith("_FOR_UNIT_BY_CATEGORIES"))return!0}function s(a){for(const l of a.conditions)if(l.key.endsWith("_BY_CATEGORIES")&&a.conditions.length>1)return!0}function p(a){return s(a)?a.conditions.sort(((a,l)=>a.points-l.points))[0].points:a.points}function e(l,t=!1,o=!1){return"number"==typeof l?t?a("span",null,o?salla.lang.get("pages.loyalty_program.start_from"):""," 1 ",salla.config.currency().symbol," = ",l," ",salla.lang.get("pages.loyalty_program.point")):a("span",null,o?salla.lang.get("pages.loyalty_program.start_from"):""," ",l," ",salla.lang.get("pages.loyalty_program.point")):n(l)?a("span",null,s(l)?salla.lang.get("pages.loyalty_program.start_from"):""," 1 ",salla.config.currency().symbol," = ",p(l)," ",salla.lang.get("pages.loyalty_program.point")):a("span",null,s(l)?salla.lang.get("pages.loyalty_program.start_from"):""," ",p(l)," ",salla.lang.get("pages.loyalty_program.point"))}export{l as a,r as b,t as c,e as f,n as i,o as n}
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{d as A}from"./p-MrxrxOqi.js";function n(A,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(A)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var A=65496,n=65505,e=1165519206,r=18761,i=274,t=65280,o=function(A,n){return A.getUint16(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},a=function(A,n){return A.getUint32(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},u="undefined"!=typeof window&&void 0!==window.document,f=void 0,d=u?new Image:{};d.onload=function(){return f=d.naturalWidth>d.naturalHeight},d.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";var c=function(u){var d=u.utils,c=d.Type,v=d.isFile;return(0,u.addFilter)("DID_LOAD_ITEM",(function(u,d){var c=d.query;return new Promise((function(d){var w=u.file;if(!(v(w)&&function(A){return/^image\/jpeg/.test(A.type)}(w)&&c("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&f))return d(u);(function(u){return new Promise((function(f){var d=new FileReader;d.onload=function(u){var d=new DataView(u.target.result);if(o(d,0)===A){for(var c=d.byteLength,v=2;v<c;){var w=o(d,v);if(v+=2,w===n){if(a(d,v+=2)!==e)break;var g=o(d,v+=6)===r;v+=a(d,v+4,g);var l=o(d,v,g);v+=2;for(var p=0;p<l;p++)if(o(d,v+12*p,g)===i)return void f(o(d,v+12*p+8,g))}else{if((w&t)!==t)break;v+=o(d,v)}}f(-1)}else f(-1)},d.readAsArrayBuffer(u.slice(0,65536))}))})(w).then((function(A){u.setMetadata("exif",{orientation:A}),d(u)}))}))})),{options:{allowImageExifOrientation:[!0,c.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:c})),c}()),r.exports),t=n({__proto__:null,default:A(i)},[i]);
4
+ import{d as A}from"./p-vzCji15v.js";function n(A,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(A)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var A=65496,n=65505,e=1165519206,r=18761,i=274,t=65280,o=function(A,n){return A.getUint16(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},a=function(A,n){return A.getUint32(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},u="undefined"!=typeof window&&void 0!==window.document,f=void 0,d=u?new Image:{};d.onload=function(){return f=d.naturalWidth>d.naturalHeight},d.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";var v=function(u){var d=u.utils,v=d.Type,c=d.isFile;return(0,u.addFilter)("DID_LOAD_ITEM",(function(u,d){var v=d.query;return new Promise((function(d){var w=u.file;if(!(c(w)&&function(A){return/^image\/jpeg/.test(A.type)}(w)&&v("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&f))return d(u);(function(u){return new Promise((function(f){var d=new FileReader;d.onload=function(u){var d=new DataView(u.target.result);if(o(d,0)===A){for(var v=d.byteLength,c=2;c<v;){var w=o(d,c);if(c+=2,w===n){if(a(d,c+=2)!==e)break;var g=o(d,c+=6)===r;c+=a(d,c+4,g);var l=o(d,c,g);c+=2;for(var p=0;p<l;p++)if(o(d,c+12*p,g)===i)return void f(o(d,c+12*p+8,g))}else{if((w&t)!==t)break;c+=o(d,c)}}f(-1)}else f(-1)},d.readAsArrayBuffer(u.slice(0,65536))}))})(w).then((function(A){u.setMetadata("exif",{orientation:A}),d(u)}))}))})),{options:{allowImageExifOrientation:[!0,v.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:v})),v}()),r.exports),t=n({__proto__:null,default:A(i)},[i]);
5
5
  /*!
6
6
  * FilePondPluginImageExifOrientation 1.0.11
7
7
  * Licensed under MIT, https://opensource.org/licenses/MIT/
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{d as i}from"./p-MrxrxOqi.js";function n(i,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(t){if("default"!==t&&!(t in i)){var e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:function(){return n[t]}})}}))})),Object.freeze(i)}var t,e,o,E={exports:{}},r=t?E.exports:(t=1,E.exports=(e=function(i){return/^image/.test(i.type)},o=function(i){var n=i.addFilter,t=i.utils,o=t.Type,E=t.createRoute,r=t.createItemAPI,l=void 0===r?function(i){return i}:r,_=i.views.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(i,n){var t=n.item,o=n.query;return new Promise((function(i){var n=t.file;i(!(o("GET_ALLOW_IMAGE_EDIT")&&o("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(i,n){var t=n.query,o=n.dispatch;return new Promise((function(n,E){if(i.origin>1)n(i);else{var r=i.file;if(t("GET_ALLOW_IMAGE_EDIT")&&t("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(r)){var l=function(i,n,t){return function(e){a.shift(),e?n(i):t(i),o("KICK"),_()}},_=function(){if(a.length){var i=a[0],n=i.item;o("EDIT_ITEM",{id:n.id,handleEditorResponse:l(n,i.resolve,i.reject)})}};u({item:i,resolve:n,reject:E}),1===a.length&&_()}else n(i);else n(i)}}))})),n("DID_CREATE_ITEM",(function(i,n){var t=n.dispatch;i.extend("edit",(function(){t("EDIT_ITEM",{id:i.id})}))}));var a=[],u=function(i){return a.push(i),i};return n("CREATE_VIEW",(function(i){var n=i.is,t=i.view,o=i.query;if(o("GET_ALLOW_IMAGE_EDIT")){var r=o("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!r||n("file")&&r){var a=o("GET_IMAGE_EDIT_EDITOR");if(a){a.filepondCallbackBridge||(a.outputData=!0,a.outputFile=!1,a.filepondCallbackBridge={onconfirm:a.onconfirm||function(){},oncancel:a.oncancel||function(){}});t.registerDestroyer((function(i){var n=i.root;n.ref.buttonEditItem&&n.ref.buttonEditItem.off("click",n.ref.handleEdit),n.ref.editButton&&n.ref.editButton.removeEventListener("click",n.ref.handleEdit)}));var u={EDIT_ITEM:function(i){var n=i.root,t=i.props.id,e=i.action.handleEditorResponse;a.cropAspectRatio=n.query("GET_IMAGE_CROP_ASPECT_RATIO")||a.cropAspectRatio,a.outputCanvasBackgroundColor=n.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||a.outputCanvasBackgroundColor;var o=n.query("GET_ITEM",t);if(o){var E=o.file,r=o.getMetadata("crop"),_=o.getMetadata("resize"),u=o.getMetadata("filter")||null,f=o.getMetadata("filters")||null,I=o.getMetadata("colors")||null,c=o.getMetadata("markup")||null,T={crop:r||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},size:_?{upscale:_.upscale,mode:_.mode,width:_.size.width,height:_.size.height}:null,filter:f?f.id||f.matrix:n.query("GET_ALLOW_IMAGE_FILTER")&&n.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!I?u:null,color:I,markup:c};a.onconfirm=function(i){var n=i.data,t=n.crop,E=n.size,r=n.filter,_=n.color,u=n.colorMatrix,f=n.markup,I={};if(t&&(I.crop=t),E){var c=(o.getMetadata("resize")||{}).size,T={width:E.width,height:E.height};T.width&&T.height||!c||(T.width=c.width,T.height=c.height),(T.width||T.height)&&(I.resize={upscale:E.upscale,mode:E.mode,size:T})}f&&(I.markup=f),I.colors=_,I.filters=r,I.filter=u,o.setMetadata(I),a.filepondCallbackBridge.onconfirm(n,l(o)),e&&(a.onclose=function(){e(!0),a.onclose=null})},a.oncancel=function(){a.filepondCallbackBridge.oncancel(l(o)),e&&(a.onclose=function(){e(!1),a.onclose=null})},a.open(E,T)}},DID_LOAD_ITEM:function(i){var n=i.root,E=i.props;if(o("GET_IMAGE_EDIT_ALLOW_EDIT")){var l=E.id,a=o("GET_ITEM",l);if(a&&e(a.file))if(n.ref.handleEdit=function(i){i.stopPropagation(),n.dispatch("EDIT_ITEM",{id:l})},r){var u=t.createChildView(_,{label:"edit",icon:o("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});u.element.classList.add("filepond--action-edit-item"),u.element.dataset.align=o("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),u.on("click",n.ref.handleEdit),n.ref.buttonEditItem=t.appendChildView(u)}else{var f=t.element.querySelector(".filepond--file-info-main"),I=document.createElement("button");I.className="filepond--action-edit-item-alt",I.innerHTML=o("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",I.addEventListener("click",n.ref.handleEdit),f.appendChild(I),n.ref.editButton=I}}}};r&&(u.DID_IMAGE_PREVIEW_SHOW=function(i){var n=i.root;n.ref.buttonEditItem&&(n.ref.buttonEditItem.opacity=1)}),t.registerWriter(E(u))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:o})),o)),l=n({__proto__:null,default:i(r)},[r]);
4
+ import{d as i}from"./p-vzCji15v.js";function n(i,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(t){if("default"!==t&&!(t in i)){var e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:function(){return n[t]}})}}))})),Object.freeze(i)}var t,e,o,E={exports:{}},r=t?E.exports:(t=1,E.exports=(e=function(i){return/^image/.test(i.type)},o=function(i){var n=i.addFilter,t=i.utils,o=t.Type,E=t.createRoute,r=t.createItemAPI,l=void 0===r?function(i){return i}:r,_=i.views.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(i,n){var t=n.item,o=n.query;return new Promise((function(i){var n=t.file;i(!(o("GET_ALLOW_IMAGE_EDIT")&&o("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(i,n){var t=n.query,o=n.dispatch;return new Promise((function(n,E){if(i.origin>1)n(i);else{var r=i.file;if(t("GET_ALLOW_IMAGE_EDIT")&&t("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(r)){var l=function(i,n,t){return function(e){a.shift(),e?n(i):t(i),o("KICK"),_()}},_=function(){if(a.length){var i=a[0],n=i.item;o("EDIT_ITEM",{id:n.id,handleEditorResponse:l(n,i.resolve,i.reject)})}};u({item:i,resolve:n,reject:E}),1===a.length&&_()}else n(i);else n(i)}}))})),n("DID_CREATE_ITEM",(function(i,n){var t=n.dispatch;i.extend("edit",(function(){t("EDIT_ITEM",{id:i.id})}))}));var a=[],u=function(i){return a.push(i),i};return n("CREATE_VIEW",(function(i){var n=i.is,t=i.view,o=i.query;if(o("GET_ALLOW_IMAGE_EDIT")){var r=o("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!r||n("file")&&r){var a=o("GET_IMAGE_EDIT_EDITOR");if(a){a.filepondCallbackBridge||(a.outputData=!0,a.outputFile=!1,a.filepondCallbackBridge={onconfirm:a.onconfirm||function(){},oncancel:a.oncancel||function(){}});t.registerDestroyer((function(i){var n=i.root;n.ref.buttonEditItem&&n.ref.buttonEditItem.off("click",n.ref.handleEdit),n.ref.editButton&&n.ref.editButton.removeEventListener("click",n.ref.handleEdit)}));var u={EDIT_ITEM:function(i){var n=i.root,t=i.props.id,e=i.action.handleEditorResponse;a.cropAspectRatio=n.query("GET_IMAGE_CROP_ASPECT_RATIO")||a.cropAspectRatio,a.outputCanvasBackgroundColor=n.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||a.outputCanvasBackgroundColor;var o=n.query("GET_ITEM",t);if(o){var E=o.file,r=o.getMetadata("crop"),_=o.getMetadata("resize"),u=o.getMetadata("filter")||null,f=o.getMetadata("filters")||null,I=o.getMetadata("colors")||null,c=o.getMetadata("markup")||null,T={crop:r||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},size:_?{upscale:_.upscale,mode:_.mode,width:_.size.width,height:_.size.height}:null,filter:f?f.id||f.matrix:n.query("GET_ALLOW_IMAGE_FILTER")&&n.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!I?u:null,color:I,markup:c};a.onconfirm=function(i){var n=i.data,t=n.crop,E=n.size,r=n.filter,_=n.color,u=n.colorMatrix,f=n.markup,I={};if(t&&(I.crop=t),E){var c=(o.getMetadata("resize")||{}).size,T={width:E.width,height:E.height};T.width&&T.height||!c||(T.width=c.width,T.height=c.height),(T.width||T.height)&&(I.resize={upscale:E.upscale,mode:E.mode,size:T})}f&&(I.markup=f),I.colors=_,I.filters=r,I.filter=u,o.setMetadata(I),a.filepondCallbackBridge.onconfirm(n,l(o)),e&&(a.onclose=function(){e(!0),a.onclose=null})},a.oncancel=function(){a.filepondCallbackBridge.oncancel(l(o)),e&&(a.onclose=function(){e(!1),a.onclose=null})},a.open(E,T)}},DID_LOAD_ITEM:function(i){var n=i.root,E=i.props;if(o("GET_IMAGE_EDIT_ALLOW_EDIT")){var l=E.id,a=o("GET_ITEM",l);if(a&&e(a.file))if(n.ref.handleEdit=function(i){i.stopPropagation(),n.dispatch("EDIT_ITEM",{id:l})},r){var u=t.createChildView(_,{label:"edit",icon:o("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});u.element.classList.add("filepond--action-edit-item"),u.element.dataset.align=o("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),u.on("click",n.ref.handleEdit),n.ref.buttonEditItem=t.appendChildView(u)}else{var f=t.element.querySelector(".filepond--file-info-main"),I=document.createElement("button");I.className="filepond--action-edit-item-alt",I.innerHTML=o("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",I.addEventListener("click",n.ref.handleEdit),f.appendChild(I),n.ref.editButton=I}}}};r&&(u.DID_IMAGE_PREVIEW_SHOW=function(i){var n=i.root;n.ref.buttonEditItem&&(n.ref.buttonEditItem.opacity=1)}),t.registerWriter(E(u))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:o})),o)),l=n({__proto__:null,default:i(r)},[r]);
5
5
  /*!
6
6
  * FilePondPluginImageEdit 1.6.3
7
7
  * Licensed under MIT, https://opensource.org/licenses/MIT/
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{d as e}from"./p-MrxrxOqi.js";function E(e,E){return E.forEach((function(E){E&&"string"!=typeof E&&!Array.isArray(E)&&Object.keys(E).forEach((function(i){if("default"!==i&&!(i in e)){var _=Object.getOwnPropertyDescriptor(E,i);Object.defineProperty(e,i,_.get?_:{enumerable:!0,get:function(){return E[i]}})}}))})),Object.freeze(e)}var i,_,l={exports:{}},n=i?l.exports:(i=1,l.exports=(_=function(e){var E=e.addFilter,i=e.utils,_=i.Type,l=i.replaceInString,n=i.toNaturalFileSize;return E("ALLOW_HOPPER_ITEM",(function(e,E){var i=E.query;if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var _=i("GET_MAX_FILE_SIZE");if(null!==_&&e.size>_)return!1;var l=i("GET_MIN_FILE_SIZE");return!(null!==l&&e.size<l)})),E("LOAD_FILE",(function(e,E){var i=E.query;return new Promise((function(E,_){if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return E(e);var t=i("GET_FILE_VALIDATE_SIZE_FILTER");if(t&&!t(e))return E(e);var I=i("GET_MAX_FILE_SIZE");if(null!==I&&e.size>I)_({status:{main:i("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MAX_FILE_SIZE"),{filesize:n(I,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});else{var L=i("GET_MIN_FILE_SIZE");if(null!==L&&e.size<L)_({status:{main:i("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MIN_FILE_SIZE"),{filesize:n(L,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});else{var a=i("GET_MAX_TOTAL_FILE_SIZE");if(null!==a&&i("GET_ACTIVE_ITEMS").reduce((function(e,E){return e+E.fileSize}),0)>a)return void _({status:{main:i("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:n(a,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});E(e)}}}))})),{options:{allowFileSizeValidation:[!0,_.BOOLEAN],maxFileSize:[null,_.INT],minFileSize:[null,_.INT],maxTotalFileSize:[null,_.INT],fileValidateSizeFilter:[null,_.FUNCTION],labelMinFileSizeExceeded:["File is too small",_.STRING],labelMinFileSize:["Minimum file size is {filesize}",_.STRING],labelMaxFileSizeExceeded:["File is too large",_.STRING],labelMaxFileSize:["Maximum file size is {filesize}",_.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",_.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",_.STRING]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:_})),_)),t=E({__proto__:null,default:e(n)},[n]);
4
+ import{d as e}from"./p-vzCji15v.js";function E(e,E){return E.forEach((function(E){E&&"string"!=typeof E&&!Array.isArray(E)&&Object.keys(E).forEach((function(i){if("default"!==i&&!(i in e)){var _=Object.getOwnPropertyDescriptor(E,i);Object.defineProperty(e,i,_.get?_:{enumerable:!0,get:function(){return E[i]}})}}))})),Object.freeze(e)}var i,_,l={exports:{}},n=i?l.exports:(i=1,l.exports=(_=function(e){var E=e.addFilter,i=e.utils,_=i.Type,l=i.replaceInString,n=i.toNaturalFileSize;return E("ALLOW_HOPPER_ITEM",(function(e,E){var i=E.query;if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var _=i("GET_MAX_FILE_SIZE");if(null!==_&&e.size>_)return!1;var l=i("GET_MIN_FILE_SIZE");return!(null!==l&&e.size<l)})),E("LOAD_FILE",(function(e,E){var i=E.query;return new Promise((function(E,_){if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return E(e);var t=i("GET_FILE_VALIDATE_SIZE_FILTER");if(t&&!t(e))return E(e);var I=i("GET_MAX_FILE_SIZE");if(null!==I&&e.size>I)_({status:{main:i("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MAX_FILE_SIZE"),{filesize:n(I,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});else{var L=i("GET_MIN_FILE_SIZE");if(null!==L&&e.size<L)_({status:{main:i("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MIN_FILE_SIZE"),{filesize:n(L,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});else{var a=i("GET_MAX_TOTAL_FILE_SIZE");if(null!==a&&i("GET_ACTIVE_ITEMS").reduce((function(e,E){return e+E.fileSize}),0)>a)return void _({status:{main:i("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:n(a,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});E(e)}}}))})),{options:{allowFileSizeValidation:[!0,_.BOOLEAN],maxFileSize:[null,_.INT],minFileSize:[null,_.INT],maxTotalFileSize:[null,_.INT],fileValidateSizeFilter:[null,_.FUNCTION],labelMinFileSizeExceeded:["File is too small",_.STRING],labelMinFileSize:["Minimum file size is {filesize}",_.STRING],labelMaxFileSizeExceeded:["File is too large",_.STRING],labelMaxFileSize:["Maximum file size is {filesize}",_.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",_.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",_.STRING]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:_})),_)),t=E({__proto__:null,default:e(n)},[n]);
5
5
  /*!
6
6
  * FilePondPluginFileValidateSize 2.2.8
7
7
  * Licensed under MIT, https://opensource.org/licenses/MIT/
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{d as t}from"./p-MrxrxOqi.js";function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(s){if("default"!==s&&!(s in t)){var e=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,e.get?e:{enumerable:!0,get:function(){return i[s]}})}}))})),Object.freeze(t)}var s,e,n={exports:{}},o=(s||(s=1,e=()=>(()=>{var t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,n={};((i,s)=>{for(var e in s)t(i,e,{get:s[e],enumerable:!0})})(n,{Iti:()=>nt,default:()=>lt});var o=[];for(const t of[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]])o.push({name:"",iso2:t[0],dialCode:t[1],priority:t[2]||0,areaCodes:t[3]||null,nodeById:{},nationalPrefix:t[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var l,r=new Set(o.map((t=>t.iso2))),h=t=>r.has(t),a=o,u="iti__hide",c="iti__v-hide",d="iti__arrow--up",p="iti__globe",f="iti__flag",m="iti__loading",y="iti__country",b="iti__highlight",w="ArrowUp",g="ArrowDown",C="Enter",_="Escape",v={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},I={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},k="auto",$=new Set(["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"]),N="aria-expanded",L="aria-label",x="aria-selected",D="aria-activedescendant",A="aria-haspopup",P="aria-controls",O="aria-hidden",S="aria-autocomplete",T="aria-modal",E={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",searchEmptyState:"No results found",searchSummaryAria:t=>0===t?"No results found":1===t?"1 result found":`${t} results found`},M=t=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia(t).matches,F=()=>M("(max-width: 500px)"),j={allowDropdown:!0,allowedNumberTypes:["MOBILE","FIXED_LINE"],allowNumberExtensions:!1,allowPhonewords:!1,autoPlaceholder:I.POLITE,containerClass:"",countryNameLocale:"en",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",searchInputClass:"",separateDialCode:!1,showFlags:!0,strictMode:!1,useFullscreenPopup:(()=>{if("undefined"!=typeof navigator&&"undefined"!=typeof window){const t=M("(max-height: 600px)"),i=M("(pointer: coarse)");return F()||i&&t}return!1})()},U=t=>JSON.stringify(t),B=t=>Boolean(t)&&"object"==typeof t&&!Array.isArray(t),z=new Set(Object.values(I)),R=t=>{console.warn(`[intl-tel-input] ${t}`)},H=(t,i,s)=>{R(`Option '${t}' must be ${i}; got ${U(s)}. Ignoring.`)},V=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),W=(t,i)=>{const s="an array of ISO2 country code strings";if(!Array.isArray(i))return H(t,s,i),!1;const e=[];for(const n of i){if("string"!=typeof n)return H(t,s,i),!1;const o=n.toLowerCase();h(o)?e.push(n):R(`Invalid country code in '${t}': '${n}'. Skipping.`)}return e},q=t=>t.replace(/\D/g,""),K=(t="")=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),G=t=>Object.keys(t).filter((i=>Boolean(t[i]))).join(" "),X=(t,i,s)=>{const e=document.createElement(t);return i&&Object.entries(i).forEach((([t,i])=>e.setAttribute(t,i))),s&&s.appendChild(e),e},Y=class t{constructor(t,i,s){this.#t=null,this.#i=null,this.#s=null,this.#e=null,this.highlightedItem=null,t.dataset.intlTelInputId=s.toString(),this.telInput=t,this.#n=i,this.#o=s,this.hadInitialPlaceholder=Boolean(t.getAttribute("placeholder")),this.#l=!!this.telInput.closest("[dir=rtl]"),this.#n.separateDialCode&&(this.#r=this.telInput.style.paddingLeft)}#n;#o;#l;#r;#h;#t;#i;#a;#u;#c;#d;#p;#f;#s;#e;static validateInput(t){const i=t?.tagName;if(!Boolean(t)||"object"!=typeof t||"INPUT"!==i||"function"!=typeof t.setAttribute){const i=Object.prototype.toString.call(t);throw new TypeError(`The first argument must be an HTMLInputElement, not ${i}`)}}generateMarkup(t){this.#h=t,this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","tel"),this.telInput.hasAttribute("inputmode")||this.telInput.setAttribute("inputmode","tel");const i=this.#m();this.#y(i),i.appendChild(this.telInput),this.#b(),this.#w(i)}#m(){const{allowDropdown:t,showFlags:i,containerClass:s,useFullscreenPopup:e}=this.#n,n=G({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":i,"iti--inline-dropdown":!e,[s]:Boolean(s)}),o=X("div",{class:n});return this.#l&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}#y(t){const{allowDropdown:i,separateDialCode:s,showFlags:e}=this.#n;if(i||e||s){this.countryContainer=X("div",{class:`iti__country-container ${c}`},t),i?(this.selectedCountry=X("button",{type:"button",class:"iti__selected-country",[N]:"false",[L]:this.#n.i18n.noCountrySelected,[A]:"dialog",[P]:`iti-${this.#o}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=X("div",{class:"iti__selected-country"},this.countryContainer);const e=X("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=X("div",{class:f},e),i&&(this.#u=X("div",{class:"iti__arrow",[O]:"true"},e)),s&&(this.#a=X("div",{class:"iti__selected-dial-code"},this.selectedCountry)),i&&this.#g()}}#C(){const{fixDropdownWidth:t}=this.#n;if(t&&!this.#c.style.width){const t=this.telInput.offsetWidth;t>0&&(this.#c.style.width=`${t}px`)}}#g(){const{fixDropdownWidth:t,useFullscreenPopup:i,countrySearch:s,i18n:e,dropdownContainer:n,containerClass:o}=this.#n;if(this.#c=X("div",{id:`iti-${this.#o}__dropdown-content`,class:`iti__dropdown-content ${u} ${t?"":"iti--flexible-dropdown-width"}`,role:"dialog",[T]:"true"}),this.#l&&this.#c.setAttribute("dir","rtl"),s&&this.#_(),this.countryList=X("ul",{class:"iti__country-list",id:`iti-${this.#o}__country-listbox`,role:"listbox",[L]:e.countryListAriaLabel},this.#c),this.#v(),s&&this.#I(),i||(this.#C(),this.#i=this.#k(),s&&(this.#c.style.height=`${this.#i}px`)),n){const t=G({iti:!0,"iti--container":!0,"iti--fullscreen-popup":i,"iti--inline-dropdown":!i,[o]:Boolean(o)});this.#s=X("div",{class:t}),this.#s.appendChild(this.#c)}else this.countryContainer.appendChild(this.#c)}#_(){const{i18n:t,searchInputClass:i}=this.#n,s=X("div",{class:"iti__search-input-wrapper"},this.#c);this.#d=X("span",{class:"iti__search-icon",[O]:"true"},s),this.#d.innerHTML=`\n <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${O}="true">\n <circle cx="11" cy="11" r="7" />\n <line x1="21" y1="21" x2="16.65" y2="16.65" />\n </svg>`,this.searchInput=X("input",{id:`iti-${this.#o}__search-input`,type:"search",class:`iti__search-input ${i}`,placeholder:t.searchPlaceholder,role:"combobox",[N]:"true",[L]:t.searchPlaceholder,[P]:`iti-${this.#o}__country-listbox`,[S]:"list",autocomplete:"off"},s),this.searchClearButton=X("button",{type:"button",class:`iti__search-clear ${u}`,[L]:t.clearSearchAriaLabel,tabindex:"-1"},s),this.searchClearButton.innerHTML=(()=>{const t=`iti-${this.#o}-clear-mask`;return`\n <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${O}="true" focusable="false">\n <mask id="${t}" maskUnits="userSpaceOnUse">\n <rect width="16" height="16" fill="white" />\n <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />\n </mask>\n <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />\n </svg>`})(),this.#f=X("span",{class:"iti__a11y-text"},this.#c),this.#p=X("div",{class:`iti__no-results ${u}`,[O]:"true"},this.#c),this.#p.textContent=t.searchEmptyState}#b(){this.countryContainer&&(this.#$(),this.countryContainer.classList.remove(c))}#w(t){const{hiddenInput:i}=this.#n;if(i){const s=i(this.telInput.getAttribute("name")||"");if(s.phone){const i=this.telInput.form?.querySelector(`input[name="${s.phone}"]`);i?this.hiddenInput=i:(this.hiddenInput=X("input",{type:"hidden",name:s.phone}),t.appendChild(this.hiddenInput))}if(s.country){const i=this.telInput.form?.querySelector(`input[name="${s.country}"]`);i?this.hiddenInputCountry=i:(this.hiddenInputCountry=X("input",{type:"hidden",name:s.country}),t.appendChild(this.hiddenInputCountry))}}}#v(){const t=document.createDocumentFragment();for(let i=0;i<this.#h.length;i++){const s=this.#h[i],e=G({[y]:!0}),n=X("li",{id:`iti-${this.#o}__item-${s.iso2}`,class:e,tabindex:"-1",role:"option",[x]:"false"});n.dataset.dialCode=s.dialCode,n.dataset.countryCode=s.iso2,s.nodeById[this.#o]=n,this.#n.showFlags&&X("div",{class:`${f} iti__${s.iso2}`},n);const o=X("span",{class:"iti__country-name"},n);o.textContent=`${s.name} `;const l=X("span",{class:"iti__dial-code"},o);this.#l&&l.setAttribute("dir","ltr"),l.textContent=`(+${s.dialCode})`,t.appendChild(n)}this.countryList.appendChild(t)}#$(){if(this.selectedCountry){const t=this.#n.separateDialCode?78:42,i=this.selectedCountry.offsetWidth||this.#N()||t;this.telInput.style.paddingLeft=`${i+6}px`}}static#L(){let t;try{t=window.top.document.body}catch(i){t=document.body}return t}#N(){if(this.telInput.parentNode){const i=t.#L(),s=this.telInput.parentNode.cloneNode(!1);s.style.visibility="hidden",i.appendChild(s);const e=this.countryContainer.cloneNode();s.appendChild(e);const n=this.selectedCountry.cloneNode(!0);e.appendChild(n);const o=n.offsetWidth;return i.removeChild(s),o}return 0}#k(){const i=t.#L();this.#c.classList.remove(u);const s=X("div",{class:"iti iti--inline-dropdown"});s.appendChild(this.#c),s.style.visibility="hidden",i.appendChild(s);const e=this.#c.offsetHeight;return i.removeChild(s),s.style.visibility="",this.#c.classList.add(u),e>0?e:200}#I(){const{i18n:t}=this.#n;this.#f.textContent=t.searchSummaryAria(this.countryList.childElementCount)}filterCountriesByQuery(t){let i;i=""===t?this.#h:((t,i)=>{const s=K(i),e=[],n=[],o=[],l=[],r=[],h=[];for(const i of t)i.iso2===s?e.push(i):i.normalisedName.startsWith(s)?n.push(i):i.normalisedName.includes(s)?o.push(i):s===i.dialCode||s===i.dialCodePlus?l.push(i):i.dialCodePlus.includes(s)?r.push(i):i.initials.includes(s)&&h.push(i);const a=(t,i)=>t.priority-i.priority;return[...e,...n,...o,...l.sort(a),...r.sort(a),...h]})(this.#h,t),this.#x(i)}#D(){const t=this.searchInput.value.trim();this.filterCountriesByQuery(t),this.searchInput.value?this.searchClearButton.classList.remove(u):this.searchClearButton.classList.add(u)}handleSearchChange(){this.#t&&clearTimeout(this.#t),this.#t=setTimeout((()=>{this.#D(),this.#t=null}),100)}handleSearchClear(){this.searchInput.value="",this.searchInput.focus(),this.#D()}scrollCountryListToItem(t){const i=this.countryList,s=i.getBoundingClientRect(),e=t.getBoundingClientRect(),n=e.top-s.top+i.scrollTop;e.top<s.top?i.scrollTop=n:e.bottom>s.bottom&&(i.scrollTop=n-s.height+e.height)}highlightListItem(t,i){const s=this.highlightedItem;if(s&&s.classList.remove(b),this.highlightedItem=t,this.highlightedItem){if(this.highlightedItem.classList.add(b),this.#n.countrySearch){const t=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(D,t)}i&&this.highlightedItem.focus()}}handleUpDownKey(t){let i=t===w?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;!i&&this.countryList.childElementCount>1&&(i=t===w?this.countryList.lastElementChild:this.countryList.firstElementChild),i&&(this.scrollCountryListToItem(i),this.highlightListItem(i,!1))}#A(t){if(this.#e&&this.#e.dataset.countryCode!==t&&(this.#e.setAttribute(x,"false"),this.#e.querySelector(".iti__country-check")?.remove(),this.#e=null),t&&!this.#e){const i=this.countryList.querySelector(`[data-country-code="${t}"]`);i&&(i.setAttribute(x,"true"),X("span",{class:"iti__country-check",[O]:"true"},i).innerHTML=`\n <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${O}="true">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>\n </svg>`,this.#e=i)}}#x(t){this.countryList.replaceChildren();let i=!0;for(const s of t){const t=s.nodeById[this.#o];t&&(this.countryList.appendChild(t),i&&(this.highlightListItem(t,!1),i=!1))}i?(this.highlightListItem(null,!1),this.#p&&this.#p.classList.remove(u)):this.#p&&this.#p.classList.add(u),this.countryList.scrollTop=0,this.#I()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.#n.separateDialCode&&(this.telInput.style.paddingLeft=this.#r);const t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.searchInput=null,this.searchClearButton=null,this.countryList=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null,this.#a=null,this.#u=null,this.#c=null,this.#d=null,this.#p=null,this.#f=null,this.#s=null,this.#e=null;for(const t of this.#h)delete t.nodeById[this.#o];this.#h=null}openDropdown(){const{countrySearch:t,dropdownAlwaysOpen:i,dropdownContainer:s}=this.#n;if(this.#C(),s)this.#P();else{const t=this.#O(),i=this.telInput.offsetHeight+3;t?this.#c.style.top=`${i}px`:this.#c.style.bottom=`${i}px`}if(this.#c.classList.remove(u),this.selectedCountry.setAttribute(N,"true"),t){const t=this.countryList.firstElementChild;t&&(this.highlightListItem(t,!1),this.countryList.scrollTop=0),i||this.searchInput.focus()}this.#u.classList.add(d)}closeDropdown(){const{countrySearch:t,dropdownContainer:i}=this.#n;this.#c.classList.add(u),this.selectedCountry.setAttribute(N,"false"),t&&(this.searchInput.removeAttribute(D),this.highlightedItem&&(this.highlightedItem.classList.remove(b),this.highlightedItem=null)),this.#u.classList.remove(d),i?(this.#s.remove(),this.#s.style.top="",this.#s.style.bottom="",this.#s.style.paddingLeft="",this.#s.style.paddingRight=""):(this.#c.style.top="",this.#c.style.bottom="")}#O(){if(this.#n.dropdownAlwaysOpen)return!0;const t=this.telInput.getBoundingClientRect(),i=window.innerHeight-t.bottom;return i>=this.#i||i>=t.top}#P(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;if(i){if(window.innerWidth>=500){const t=this.telInput.getBoundingClientRect();this.#s.style.paddingLeft=`${t.left}px`,this.#s.style.paddingRight=window.innerWidth-t.right+"px"}}else{const t=this.telInput.getBoundingClientRect();this.#s.style.left=`${t.left}px`,this.#O()?this.#s.style.top=`${t.bottom+3}px`:(this.#s.style.top="unset",this.#s.style.bottom=window.innerHeight-t.top+3+"px")}t.appendChild(this.#s)}isDropdownClosed(){return this.#c.classList.contains(u)}setCountry(t){const{allowDropdown:i,showFlags:s,separateDialCode:e,i18n:n}=this.#n,{name:o,dialCode:l,iso2:r=""}=t;if(i&&this.#A(r),this.selectedCountry){const t=r&&s?`${f} iti__${r}`:`${f} ${p}`;let i,e,h;r?(e=o,i=n.selectedCountryAriaLabel.replace("${countryName}",o).replace("${dialCode}",`+${l}`),h=s?"":'\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'):(e=n.noCountrySelected,i=n.noCountrySelected,h='\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'),this.selectedCountryInner.className=t,this.selectedCountry.setAttribute("title",e),this.selectedCountry.setAttribute(L,i),this.selectedCountryInner.innerHTML=h}e&&(this.#a.textContent=l?`+${l}`:"",this.#$())}},J=new Set(["800","808","870","881","882","883","888","979"]),Q=t=>{const i=q(t).slice(0,3);return t.startsWith("+")&&J.has(i)},Z=(t,i,s,e)=>{let n=t;if(s&&i){const t=`+${e.dialCode}`;n=n.substring(" "===n[t.length]||"-"===n[t.length]?t.length+1:t.length)}return n},tt=new Set(["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"]),it=t=>{const i=q(t);if(i.startsWith("1")&&i.length>=4){const t=i.substring(1,4);return tt.has(t)}return!1},st=class{#S;constructor(t){t&&this.#T(t)}#T(t){/[\u0660-\u0669]/.test(t)?this.#S="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.#S="persian":this.#S="ascii"}denormalise(t){if(!this.#S||"ascii"===this.#S)return t;const i="arabic-indic"===this.#S?1632:1776;return t.replace(/[0-9]/g,(t=>String.fromCharCode(i+Number(t))))}normalise(t){if(!t)return"";if(this.#T(t),"ascii"===this.#S)return t;const i="arabic-indic"===this.#S?1632:1776,s="arabic-indic"===this.#S?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(s,(t=>String.fromCharCode(t.charCodeAt(0)-i+48)))}isAscii(){return!this.#S||"ascii"===this.#S}},et=0,nt=class t{#E;#n;#M;#h;#F;#j;#U;#B;#z;#R;#H;#V;#W;#q;#K;#G;#X;#Y;constructor(t,i={}){this.id=et++,Y.validateInput(t);const s=(t=>{if(void 0===t)return{};if(!B(t)){const i=`The second argument must be an options object; got ${U(t)}. Using defaults.`;return R(i),{}}const i={};for(const[e,n]of Object.entries(t))if(V(j,e))switch(e){case"allowDropdown":case"allowNumberExtensions":case"allowPhonewords":case"countrySearch":case"dropdownAlwaysOpen":case"fixDropdownWidth":case"formatAsYouType":case"formatOnDisplay":case"nationalMode":case"showFlags":case"separateDialCode":case"strictMode":case"useFullscreenPopup":if("boolean"!=typeof n){H(e,"a boolean",n);break}i[e]=n;break;case"autoPlaceholder":if("string"!=typeof n||!z.has(n)){const t=Array.from(z).join(", ");H("autoPlaceholder",`one of ${t}`,n);break}i[e]=n;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if("string"!=typeof n){H(e,"a string",n);break}i[e]=n;break;case"countryOrder":if(null===n)i[e]=n;else{const t=W(e,n);!1!==t&&(i[e]=t)}break;case"customPlaceholder":case"geoIpLookup":case"hiddenInput":case"loadUtils":if(null!==n&&"function"!=typeof n){H(e,"a function or null",n);break}i[e]=n;break;case"dropdownContainer":if(null!==n&&(!(s=n)||"object"!=typeof s||1!==s.nodeType||"string"!=typeof s.tagName||"function"!=typeof s.appendChild)){H("dropdownContainer","an HTMLElement or null",n);break}i[e]=n;break;case"excludeCountries":case"onlyCountries":{const t=W(e,n);!1!==t&&(i[e]=t);break}case"i18n":if(n&&!B(n)){H("i18n","an object",n);break}i[e]=n;break;case"initialCountry":{if("string"!=typeof n){H("initialCountry","a string",n);break}const t=n.toLowerCase();if(t&&t!==k&&!h(t)){H("initialCountry","a valid ISO2 country code or 'auto'",n);break}i[e]=n;break}case"placeholderNumberType":if("string"!=typeof n||!$.has(n)){const t=Array.from($).join(", ");H("placeholderNumberType",`one of ${t}`,n);break}i[e]=n;break;case"allowedNumberTypes":if(null!==n){if(!Array.isArray(n)){H("allowedNumberTypes","an array of number types or null",n);break}let t=!0;for(const i of n)if("string"!=typeof i||!$.has(i)){const s=Array.from($).join(", ");H("allowedNumberTypes",`an array of valid number types (${s})`,i),t=!1;break}t&&(i[e]=n)}else i[e]=null}else R(`Unknown option '${e}'. Ignoring.`);var s;return i})(i);var e;this.#n={...j,...s},(e=this.#n).initialCountry&&(e.initialCountry=e.initialCountry.toLowerCase()),e.onlyCountries?.length&&(e.onlyCountries=e.onlyCountries.map((t=>t.toLowerCase()))),e.excludeCountries?.length&&(e.excludeCountries=e.excludeCountries.map((t=>t.toLowerCase()))),e.countryOrder&&(e.countryOrder=e.countryOrder.map((t=>t.toLowerCase()))),(t=>{t.dropdownAlwaysOpen&&(t.useFullscreenPopup=!1,t.allowDropdown=!0),t.useFullscreenPopup?t.fixDropdownWidth=!1:F()&&(t.fixDropdownWidth=!0),1===t.onlyCountries.length&&(t.initialCountry=t.onlyCountries[0]),t.separateDialCode&&(t.nationalMode=!1),!t.allowDropdown||t.showFlags||t.separateDialCode||(t.nationalMode=!1),t.useFullscreenPopup&&!t.dropdownContainer&&(t.dropdownContainer=document.body),t.i18n={...E,...t.i18n}})(this.#n),this.#E=new Y(t,this.#n,this.id),this.#M="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),this.#q=new st(t.value),this.promise=this.#J(this.#n),this.#h=(t=>{const{onlyCountries:i,excludeCountries:s}=t;return i?.length?a.filter((t=>i.includes(t.iso2))):s?.length?a.filter((t=>!s.includes(t.iso2))):a})(this.#n);const{dialCodes:n,dialCodeMaxLen:o,dialCodeToIso2Map:l}=(t=>{const i=new Set;let s=0;const e={},n=(t,i)=>{if(!t||!i)return;i.length>s&&(s=i.length),e.hasOwnProperty(i)||(e[i]=[]);const n=e[i];n.includes(t)||n.push(t)},o=[...t].sort(((t,i)=>t.priority-i.priority));for(const t of o){i.has(t.dialCode)||i.add(t.dialCode);for(let i=1;i<t.dialCode.length;i++){const s=t.dialCode.substring(0,i);n(t.iso2,s)}if(n(t.iso2,t.dialCode),t.areaCodes){const i=e[t.dialCode][0];for(const s of t.areaCodes){for(let e=1;e<s.length;e++){const o=s.substring(0,e),l=t.dialCode+o;n(i,l),n(t.iso2,l)}n(t.iso2,t.dialCode+s)}}}return{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:e}})(this.#h);this.#U=n,this.#F=o,this.#j=l,this.#B=new Map(this.#h.map((t=>[t.iso2,t]))),this.#Q()}#Z(){const t=this.#E.telInput.value.trim();return this.#q.normalise(t)}#tt(t){this.#E.telInput.value=this.#q.denormalise(t)}#J(t){const{initialCountry:i,geoIpLookup:s,loadUtils:e}=t,n=i===k&&Boolean(s),o=Boolean(e)&&!ot.utils;let l,r;return n?l=new Promise(((t,i)=>{this.#K=t,this.#G=i})):(l=Promise.resolve(void 0),this.#K=()=>{},this.#G=()=>{}),o?r=new Promise(((t,i)=>{this.#X=t,this.#Y=i})):(r=Promise.resolve(void 0),this.#X=()=>{},this.#Y=()=>{}),Promise.all([l,r]).then((()=>{}))}#Q(){this.#z=null,this.#V=new AbortController,this.#it(),this.#E.generateMarkup(this.#h),this.#st(),this.#et(),this.#nt(),this.#n.dropdownAlwaysOpen&&this.#ot()}#it(){((t,i)=>{const{countryNameLocale:s,i18n:e}=i;let n;try{n="undefined"!=typeof Intl&&"function"==typeof Intl.DisplayNames?new Intl.DisplayNames(s,{type:"region"}):null}catch(t){console.error(t),n=null}for(const i of t)i.name=e[i.iso2]||n?.of(i.iso2.toUpperCase())||""})(this.#h,this.#n),((t,i)=>{const{countryOrder:s}=i;t.sort(((t,i)=>{if(s){const e=s.indexOf(t.iso2),n=s.indexOf(i.iso2),o=e>-1,l=n>-1;if(o||l)return o&&l?e-n:o?-1:1}return t.name.localeCompare(i.name)}))})(this.#h,this.#n),(t=>{for(const i of t)i.normalisedName=K(i.name),i.initials=i.normalisedName.split(/[^a-z]/).map((t=>t[0])).join(""),i.dialCodePlus=`+${i.dialCode}`})(this.#h)}#st(t=!1){const i=this.#E.telInput.getAttribute("value"),s=this.#q.normalise(i),e=this.#Z(),n=!s||!s.startsWith("+")||e&&e.startsWith("+")?e:s,o=this.#lt(n),l=it(n),{initialCountry:r,geoIpLookup:a}=this.#n,u=r===k&&a&&!t,c=h(r);o?l?c?this.#rt(r):u||this.#rt("us"):this.#ht(n):c?this.#rt(r):u||this.#rt(""),n&&this.#at(n)}#et(){this.#ut(),this.#n.allowDropdown&&this.#ct(),(this.#E.hiddenInput||this.#E.hiddenInputCountry)&&this.#E.telInput.form&&this.#dt()}#dt(){this.#E.telInput.form?.addEventListener("submit",(()=>{this.#E.hiddenInput&&(this.#E.hiddenInput.value=this.getNumber()),this.#E.hiddenInputCountry&&(this.#E.hiddenInputCountry.value=this.#z?.iso2||"")}),{signal:this.#V.signal})}#ct(){const t=this.#V.signal,i=this.#E.telInput.closest("label");i&&i.addEventListener("click",(t=>{this.#E.isDropdownClosed()?this.#E.telInput.focus():t.preventDefault()}),{signal:t}),this.#E.selectedCountry.addEventListener("click",(()=>{!this.#E.isDropdownClosed()||this.#E.telInput.disabled||this.#E.telInput.readOnly||this.#ot()}),{signal:t}),this.#E.countryContainer.addEventListener("keydown",(t=>{const i=[w,g," ",C];this.#E.isDropdownClosed()&&i.includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.#ot()),"Tab"===t.key&&this.#pt()}),{signal:t})}#nt(){const{loadUtils:t,initialCountry:i,geoIpLookup:s}=this.#n;if(t&&!ot.utils){const i=()=>{ot.attachUtils(t)?.catch((()=>{}))};ot.documentReady()?i():window.addEventListener("load",i,{signal:this.#V.signal})}else this.#X();i===k&&s&&(this.#z?.iso2?this.#K():this.#ft())}#ft(){ot.autoCountry?this.#mt():(this.#E.selectedCountryInner.classList.add(m),ot.startedLoadingAutoCountry||(ot.startedLoadingAutoCountry=!0,"function"!=typeof this.#n.geoIpLookup)||this.#n.geoIpLookup(((i="")=>{this.#E.selectedCountryInner.classList.remove(m);const s=i.toLowerCase();h(s)?(ot.autoCountry=s,setTimeout((()=>t.forEachInstance("handleAutoCountry")))):t.forEachInstance("handleAutoCountryFailure")}),(()=>{this.#E.selectedCountryInner.classList.remove(m),t.forEachInstance("handleAutoCountryFailure")})))}#yt(){this.#ot(),this.#E.searchInput.value="+",this.#E.filterCountriesByQuery("")}#ut(){this.#bt(),this.#wt(),this.#gt()}#bt(){const{strictMode:t,formatAsYouType:i,separateDialCode:s,allowDropdown:e,countrySearch:n}=this.#n;let o=!1;v.ALPHA_UNICODE.test(this.#Z())&&(o=!0),this.#E.telInput.addEventListener("input",(l=>{const r=this.#Z();if(this.#M&&"+"===l?.data&&s&&e&&n){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t-1),s=r.substring(t);return this.#tt(i+s),void this.#yt()}this.#ht(r)&&this.#Ct(),l?.data&&v.NON_PLUS_NUMERIC.test(l.data)||"insertFromPaste"===l?.inputType&&r&&!t?o=!0:v.NON_PLUS_NUMERIC.test(r)||(o=!1);const h=l?.detail&&l.detail.isSetNumber,a=this.#q.isAscii();if(i&&!o&&!h&&a){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t).replace(v.NON_PLUS_NUMERIC_GLOBAL,"").length,e="deleteContentForward"===l?.inputType,n=((t,i,s,e,n)=>{const o=s?s.formatNumberAsYouType(t,e.iso2):t,{dialCode:l}=e;return n&&"+"!==i.charAt(0)&&o.includes(`+${l}`)?(o.split(`+${l}`)[1]||"").trim():o})(this.#_t(),r,ot.utils,this.#z??{},s),o=((t,i,s,e)=>{if(0===s&&!e)return 0;let n=0;for(let s=0;s<i.length;s++){if(/[+0-9]/.test(i[s])&&n++,n===t&&!e)return s+1;if(e&&n===t+1)return s}return i.length})(i,n,t,e);this.#tt(n),this.#E.telInput.setSelectionRange(o,o)}if(s&&r.startsWith("+")&&this.#z?.dialCode){const t=Z(r,!0,s,this.#z??{});this.#tt(t)}}),{signal:this.#V.signal})}#wt(){const{strictMode:t,separateDialCode:i,allowDropdown:s,countrySearch:e}=this.#n;(t||i)&&this.#E.telInput.addEventListener("keydown",(n=>{if(n.key&&1===n.key.length&&!n.altKey&&!n.ctrlKey&&!n.metaKey){if(i&&s&&e&&"+"===n.key)return n.preventDefault(),void this.#yt();if(t){const t=this.#Z(),s=!t.startsWith("+")&&0===this.#E.telInput.selectionStart&&"+"===n.key,e=this.#q.normalise(n.key),o=/^[0-9]$/.test(e),l=i?o:s||o,r=this.#E.telInput,h=r.selectionEnd,a=t.slice(0,r.selectionStart),u=t.slice(h),c=this.#_t(a+n.key+u);let d=!1;ot.utils&&this.#R&&(d=ot.utils.getCoreNumber(c,this.#z?.iso2).length>this.#R);const p=this.#vt(c);l&&(!d||null!==p||s)||n.preventDefault()}}}),{signal:this.#V.signal})}#gt(){this.#n.strictMode&&this.#E.telInput.addEventListener("paste",(t=>{t.preventDefault();const i=this.#E.telInput,s=i.selectionStart,e=i.selectionEnd,n=this.#Z(),o=n.slice(0,s),l=n.slice(e),r=this.#z?.iso2,h=t.clipboardData.getData("text"),a=this.#q.normalise(h),u=0===s&&e>0,c=!n.startsWith("+")||u,d=a.replace(v.NON_PLUS_NUMERIC_GLOBAL,""),p=d.startsWith("+"),f=d.replace(/\+/g,""),m=p&&c?`+${f}`:f;let y=o+m+l;if(y.length>5){let t=ot.utils.getCoreNumber(y,r);for(;0===t.length&&y.length>0;)y=y.slice(0,-1),t=ot.utils.getCoreNumber(y,r);if(!t)return;if(this.#R&&t.length>this.#R){if(i.selectionEnd!==n.length)return;{const i=t.length-this.#R;y=y.slice(0,y.length-i)}}}this.#tt(y);const b=s+m.length;i.setSelectionRange(b,b),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))}),{signal:this.#V.signal})}#It(t){const i=Number(this.#E.telInput.getAttribute("maxlength"));return i&&t.length>i?t.substring(0,i):t}#kt(t,i={}){const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});this.#E.telInput.dispatchEvent(s)}#ot(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;this.#W=new AbortController,this.#E.openDropdown(),!i&&t&&window.addEventListener("scroll",(()=>this.#pt()),{signal:this.#W.signal}),this.#$t(),this.#kt("open:countrydropdown")}#$t(){const t=this.#W.signal;this.#Nt(t),this.#Lt(t),this.#n.dropdownAlwaysOpen||this.#xt(t),this.#Dt(t),this.#n.countrySearch&&this.#At(t)}#Nt(t){this.#E.countryList.addEventListener("mouseover",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#E.highlightListItem(i,!1)}),{signal:t})}#Lt(t){this.#E.countryList.addEventListener("click",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#Pt(i)}),{signal:t})}#xt(t){const i=t=>{t.target.closest(`#iti-${this.id}__dropdown-content`)||this.#pt()};setTimeout((()=>{document.documentElement.addEventListener("click",i,{signal:t})}),0)}#Dt(t){let i="",s=null;document.addEventListener("keydown",(t=>{[w,g,C,_].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key===w||t.key===g?this.#E.handleUpDownKey(t.key):t.key!==C||t.isComposing?t.key===_&&(this.#pt(),this.#E.selectedCountry.focus()):this.#Ot()),!this.#n.countrySearch&&v.HIDDEN_SEARCH_CHAR.test(t.key)&&(t.stopPropagation(),s&&clearTimeout(s),i+=t.key.toLowerCase(),this.#St(i),s=setTimeout((()=>{i=""}),1e3))}),{signal:t})}#At(t){this.#E.searchInput.addEventListener("input",(()=>this.#E.handleSearchChange()),{signal:t}),this.#E.searchClearButton.addEventListener("click",(()=>this.#E.handleSearchClear()),{signal:t})}#St(t){const i=((t,i)=>{const s=K(i);for(const i of t)if(i.normalisedName.startsWith(s))return i;return null})(this.#h,t);if(i){const t=i.nodeById[this.id];this.#E.highlightListItem(t,!1),this.#E.scrollCountryListToItem(t)}}#Ot(){this.#E.highlightedItem&&this.#Pt(this.#E.highlightedItem)}#at(t){const{formatOnDisplay:i,nationalMode:s,separateDialCode:e}=this.#n;let n=t;if(i&&ot.utils&&this.#z){const i=Q(t),o=s&&!i||!n.startsWith("+")&&!e,{NATIONAL:l,INTERNATIONAL:r}=ot.utils.numberFormat,h=o?l:r;n=ot.utils.formatNumber(n,this.#z?.iso2,h)}n=this.#Tt(n),this.#tt(n)}#ht(t){const i=this.#vt(t);return null!==i&&this.#rt(i)}#Et(t){const i=this.#z?.dialCode,s=this.#z?.nationalPrefix;return t.startsWith("+")||!i?t:`+${i}${s&&t.startsWith(s)&&!this.#n.separateDialCode?t.substring(1):t}`}#vt(t){const i=t.indexOf("+");let s=i?t.substring(i):t;const e=this.#z?.iso2,n=this.#z?.dialCode;s=this.#Et(s);const o=this.#lt(s,!0),l=q(s);if(o){const t=q(o),i=this.#j[t];if(1===i.length)return i[0]===e?null:i[0];if(!e&&this.#H&&i.includes(this.#H))return this.#H;if("1"===n&&it(l))return null;const s=this.#z?.areaCodes,r=this.#z?.priority;if(s){const t=s.map((t=>`${n}${t}`));for(const i of t)if(l.startsWith(i))return null}const h=s&&!(0===r)&&l.length>t.length;if((!e||!i.includes(e)||h)&&e!==i[0])return i[0]}else{if(s.startsWith("+")&&l.length){const t=this.#z?.dialCode||"";return t&&t.startsWith(l)?null:""}if((!s||"+"===s)&&!e&&this.#H)return this.#H}return null}#rt(t){const i=this.#z?.iso2||"";return this.#z=t?this.#B.get(t):null,this.#z?.iso2&&(this.#H=this.#z.iso2),this.#E.setCountry(this.#z??{}),this.#Mt(),this.#Ft(),i!==t}#Ft(){const{strictMode:t,placeholderNumberType:i,allowedNumberTypes:s}=this.#n,e=this.#z?.iso2;if(t&&ot.utils)if(e){let t=ot.utils.getExampleNumber(e,!1,ot.utils.numberType[i],!0),n=t;for(;ot.utils.isPossibleNumber(t,e,s);)n=t,t+="0";const o=ot.utils.getCoreNumber(n,e);this.#R=o.length,"by"===e&&(this.#R=o.length+1)}else this.#R=null}#Mt(){const{autoPlaceholder:t,placeholderNumberType:i,nationalMode:s,customPlaceholder:e}=this.#n,n=t===I.AGGRESSIVE||!this.#E.hadInitialPlaceholder&&t===I.POLITE;if(ot.utils&&n){const t=ot.utils.numberType[i];let n=this.#z?.iso2?ot.utils.getExampleNumber(this.#z.iso2,s,t):"";n=this.#Tt(n),"function"==typeof e&&(n=e(n,this.#z??{})),this.#E.telInput.setAttribute("placeholder",n)}}#Pt(t){const i=this.#rt(t.dataset.countryCode);if(this.#pt(),this.#jt(t.dataset.dialCode),this.#n.formatOnDisplay){const t=this.#Z();this.#at(t)}this.#E.telInput.focus(),i&&this.#Ct()}#pt(t){this.#E.isDropdownClosed()||this.#n.dropdownAlwaysOpen&&!t||(this.#E.closeDropdown(),this.#W.abort(),this.#W=null,this.#kt("close:countrydropdown"))}#jt(t){const i=this.#Z(),s=`+${t}`;let e;if(i.startsWith("+")){const t=this.#lt(i);e=t?i.replace(t,s):s,this.#tt(e)}}#lt(t,i){let s="";if(t.startsWith("+")){let e="",n=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(/[0-9]/.test(l)){if(e+=l,!Boolean(this.#j[e]))break;if(this.#U.has(e)){if(s=t.substring(0,o+1),n=!0,!i)break}else i&&n&&(s=t.substring(0,o+1));if(e.length===this.#F)break}}}return s}#_t(t){const i=t?this.#q.normalise(t):this.#Z(),s=this.#z?.dialCode;let e;const n=q(i);return e=this.#n.separateDialCode&&!i.startsWith("+")&&s&&n?`+${s}`:"",e+i}#Tt(t){const i=Boolean(this.#lt(t)),s=Z(t,i,this.#n.separateDialCode,this.#z??{});return this.#It(s)}#Ut(){const t=this.#z;if(!t)return{};const{iso2:i,dialCode:s,name:e}=t;return{iso2:i,dialCode:s,name:e}}#Ct(){const t=this.#Ut();this.#kt("countrychange",t)}#mt(){this.#E.telInput?this.#n.initialCountry===k&&ot.autoCountry&&(this.#H=ot.autoCountry,this.#z?.iso2||this.#E.selectedCountryInner.classList.contains(p)||this.setCountry(this.#H),this.#K()):this.#K?.()}#Bt(){this.#E.telInput?(this.#st(!0),this.#G()):this.#G?.()}#zt(){if(this.#E.telInput){if(ot.utils){const t=this.#Z();t&&this.#at(t),this.#z?.iso2&&(this.#Mt(),this.#Ft())}this.#X()}else this.#X?.()}#Rt(t){this.#E,this.#Y(t)}destroy(){this.#E.telInput&&(this.#n.allowDropdown&&this.#pt(!0),this.#V.abort(),this.#V=null,this.#E.destroy(),delete ot.instances[this.id])}isActive(){return!!this.#E?.telInput}getExtension(){return ot.utils&&this.#E.telInput?ot.utils.getExtension(this.#_t(),this.#z?.iso2):""}getNumber(t){if(ot.utils&&this.#E.telInput){const i=this.#z?.iso2,s=this.#_t(),e=ot.utils.formatNumber(s,i,t);return this.#q.denormalise(e)}return""}getNumberType(){return ot.utils&&this.#E.telInput?ot.utils.getNumberType(this.#_t(),this.#z?.iso2):-99}getSelectedCountryData(){return this.#Ut()}getValidationError(){if(ot.utils&&this.#E.telInput){const t=this.#z?.iso2;return ot.utils.getValidationError(this.#_t(),t)}return-99}isValidNumber(){const t=this.#z?.dialCode,i=this.#z?.iso2;if(ot.utils&&this.#E.telInput){const s=this.#_t(),e=ot.utils.getCoreNumber(s,i);if(e){if("44"===t&&"7"===e[0]&&10!==e.length)return!1;if(!v.ALPHA_UNICODE.test(s)&&t){const i=s.startsWith("+")?s.slice(1+t.length):s,n=q(i).length;if(e.length>n)return!1}}}return this.#Ht(!1)}isValidNumberPrecise(){return this.#Ht(!0)}#Vt(t){return ot.utils?ot.utils.isPossibleNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}#Ht(t){if(!ot.utils||!this.#E.telInput)return null;const{allowNumberExtensions:i,allowPhonewords:s}=this.#n,e=this.#_t();if(!this.#z?.iso2&&!Q(e))return!1;if(!(i=>t?this.#Wt(i):this.#Vt(i))(e))return!1;if(e.search(v.ALPHA_UNICODE)>-1){const t=this.#z?.iso2;return Boolean(ot.utils.getExtension(e,t))?i:s}return!0}#Wt(t){return ot.utils?ot.utils.isValidNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}setCountry(t){if(!this.#E.telInput)return;const i=t?.toLowerCase();if(!h(i))throw new Error(`Invalid country code: '${i}'`);const s=this.#z?.iso2;if(t&&i!==s||!t&&s){if(this.#rt(i),this.#jt(this.#z?.dialCode||""),this.#n.formatOnDisplay){const t=this.#Z();this.#at(t)}this.#Ct()}}setNumber(t){if(!this.#E.telInput)return;const i=this.#q.normalise(t),s=this.#ht(i);this.#at(i),s&&this.#Ct(),this.#kt("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.#E.telInput&&(this.#n.placeholderNumberType=t,this.#Mt())}setDisabled(t){this.#E.telInput&&(this.#E.telInput.disabled=t,this.#E.selectedCountry&&(t?this.#E.selectedCountry.setAttribute("disabled","true"):this.#E.selectedCountry.removeAttribute("disabled")))}static forEachInstance(i,...s){const e=Object.values(ot.instances),n=s[0];e.forEach((s=>{if(s instanceof t)switch(i){case"handleUtils":s.#zt();break;case"handleUtilsFailure":s.#Rt(n);break;case"handleAutoCountry":s.#mt();break;case"handleAutoCountryFailure":s.#Bt()}}))}},ot=Object.assign(((t,i)=>{const s=new nt(t,i);return ot.instances[s.id]=s,t.iti=s,s}),{defaults:j,documentReady:()=>"complete"===document.readyState,getCountryData:()=>a,getInstance:t=>{const i=t.dataset.intlTelInputId;return i?ot.instances[i]:null},instances:{},attachUtils:t=>{if(!ot.utils&&!ot.startedLoadingUtilsScript){let i;if("function"!=typeof t)return Promise.reject(new TypeError("The argument passed to attachUtils must be a function that returns a promise for the utilities module, not "+typeof t));try{i=Promise.resolve(t())}catch(t){return Promise.reject(t)}return ot.startedLoadingUtilsScript=!0,i.then((t=>{const i=t?.default;if(!i||"object"!=typeof i)throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return ot.utils=i,nt.forEachInstance("handleUtils"),!0})).catch((t=>{throw nt.forEachInstance("handleUtilsFailure",t),t}))}return null},startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"26.9.2"}),lt=ot;return l=n,((n,o,l,r)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let l of s(o))e.call(n,l)||undefined===l||t(n,l,{get:()=>o[l],enumerable:!(r=i(o,l))||r.enumerable});return n})(t({},"__esModule",{value:!0}),l)})().default,n.exports?n.exports=e():window.intlTelInput=e()),n.exports),l=i({__proto__:null,default:t(o)},[o]);export{l as i}
4
+ import{d as t}from"./p-vzCji15v.js";function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(s){if("default"!==s&&!(s in t)){var e=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,e.get?e:{enumerable:!0,get:function(){return i[s]}})}}))})),Object.freeze(t)}var s,e,n={exports:{}},o=(s||(s=1,e=()=>(()=>{var t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,n={};((i,s)=>{for(var e in s)t(i,e,{get:s[e],enumerable:!0})})(n,{Iti:()=>nt,default:()=>lt});var o=[];for(const t of[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]])o.push({name:"",iso2:t[0],dialCode:t[1],priority:t[2]||0,areaCodes:t[3]||null,nodeById:{},nationalPrefix:t[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var l,r=new Set(o.map((t=>t.iso2))),h=t=>r.has(t),a=o,u="iti__hide",c="iti__v-hide",d="iti__arrow--up",p="iti__globe",f="iti__flag",m="iti__loading",y="iti__country",b="iti__highlight",w="ArrowUp",g="ArrowDown",C="Enter",_="Escape",v={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},I={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},k="auto",$=new Set(["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"]),N="aria-expanded",L="aria-label",x="aria-selected",D="aria-activedescendant",A="aria-haspopup",P="aria-controls",S="aria-hidden",O="aria-autocomplete",T="aria-modal",E={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",searchEmptyState:"No results found",searchSummaryAria:t=>0===t?"No results found":1===t?"1 result found":`${t} results found`},M=t=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia(t).matches,F=()=>M("(max-width: 500px)"),j={allowDropdown:!0,allowedNumberTypes:["MOBILE","FIXED_LINE"],allowNumberExtensions:!1,allowPhonewords:!1,autoPlaceholder:I.POLITE,containerClass:"",countryNameLocale:"en",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",searchInputClass:"",separateDialCode:!1,showFlags:!0,strictMode:!1,useFullscreenPopup:(()=>{if("undefined"!=typeof navigator&&"undefined"!=typeof window){const t=M("(max-height: 600px)"),i=M("(pointer: coarse)");return F()||i&&t}return!1})()},U=t=>JSON.stringify(t),B=t=>Boolean(t)&&"object"==typeof t&&!Array.isArray(t),z=new Set(Object.values(I)),R=t=>{console.warn(`[intl-tel-input] ${t}`)},H=(t,i,s)=>{R(`Option '${t}' must be ${i}; got ${U(s)}. Ignoring.`)},V=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),W=(t,i)=>{const s="an array of ISO2 country code strings";if(!Array.isArray(i))return H(t,s,i),!1;const e=[];for(const n of i){if("string"!=typeof n)return H(t,s,i),!1;const o=n.toLowerCase();h(o)?e.push(n):R(`Invalid country code in '${t}': '${n}'. Skipping.`)}return e},q=t=>t.replace(/\D/g,""),K=(t="")=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),G=t=>Object.keys(t).filter((i=>Boolean(t[i]))).join(" "),X=(t,i,s)=>{const e=document.createElement(t);return i&&Object.entries(i).forEach((([t,i])=>e.setAttribute(t,i))),s&&s.appendChild(e),e},Y=class t{constructor(t,i,s){this.#t=null,this.#i=null,this.#s=null,this.#e=null,this.highlightedItem=null,t.dataset.intlTelInputId=s.toString(),this.telInput=t,this.#n=i,this.#o=s,this.hadInitialPlaceholder=Boolean(t.getAttribute("placeholder")),this.#l=!!this.telInput.closest("[dir=rtl]"),this.#n.separateDialCode&&(this.#r=this.telInput.style.paddingLeft)}#n;#o;#l;#r;#h;#t;#i;#a;#u;#c;#d;#p;#f;#s;#e;static validateInput(t){const i=t?.tagName;if(!Boolean(t)||"object"!=typeof t||"INPUT"!==i||"function"!=typeof t.setAttribute){const i=Object.prototype.toString.call(t);throw new TypeError(`The first argument must be an HTMLInputElement, not ${i}`)}}generateMarkup(t){this.#h=t,this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","tel"),this.telInput.hasAttribute("inputmode")||this.telInput.setAttribute("inputmode","tel");const i=this.#m();this.#y(i),i.appendChild(this.telInput),this.#b(),this.#w(i)}#m(){const{allowDropdown:t,showFlags:i,containerClass:s,useFullscreenPopup:e}=this.#n,n=G({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":i,"iti--inline-dropdown":!e,[s]:Boolean(s)}),o=X("div",{class:n});return this.#l&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}#y(t){const{allowDropdown:i,separateDialCode:s,showFlags:e}=this.#n;if(i||e||s){this.countryContainer=X("div",{class:`iti__country-container ${c}`},t),i?(this.selectedCountry=X("button",{type:"button",class:"iti__selected-country",[N]:"false",[L]:this.#n.i18n.noCountrySelected,[A]:"dialog",[P]:`iti-${this.#o}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=X("div",{class:"iti__selected-country"},this.countryContainer);const e=X("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=X("div",{class:f},e),i&&(this.#u=X("div",{class:"iti__arrow",[S]:"true"},e)),s&&(this.#a=X("div",{class:"iti__selected-dial-code"},this.selectedCountry)),i&&this.#g()}}#C(){const{fixDropdownWidth:t}=this.#n;if(t&&!this.#c.style.width){const t=this.telInput.offsetWidth;t>0&&(this.#c.style.width=`${t}px`)}}#g(){const{fixDropdownWidth:t,useFullscreenPopup:i,countrySearch:s,i18n:e,dropdownContainer:n,containerClass:o}=this.#n;if(this.#c=X("div",{id:`iti-${this.#o}__dropdown-content`,class:`iti__dropdown-content ${u} ${t?"":"iti--flexible-dropdown-width"}`,role:"dialog",[T]:"true"}),this.#l&&this.#c.setAttribute("dir","rtl"),s&&this.#_(),this.countryList=X("ul",{class:"iti__country-list",id:`iti-${this.#o}__country-listbox`,role:"listbox",[L]:e.countryListAriaLabel},this.#c),this.#v(),s&&this.#I(),i||(this.#C(),this.#i=this.#k(),s&&(this.#c.style.height=`${this.#i}px`)),n){const t=G({iti:!0,"iti--container":!0,"iti--fullscreen-popup":i,"iti--inline-dropdown":!i,[o]:Boolean(o)});this.#s=X("div",{class:t}),this.#s.appendChild(this.#c)}else this.countryContainer.appendChild(this.#c)}#_(){const{i18n:t,searchInputClass:i}=this.#n,s=X("div",{class:"iti__search-input-wrapper"},this.#c);this.#d=X("span",{class:"iti__search-icon",[S]:"true"},s),this.#d.innerHTML=`\n <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${S}="true">\n <circle cx="11" cy="11" r="7" />\n <line x1="21" y1="21" x2="16.65" y2="16.65" />\n </svg>`,this.searchInput=X("input",{id:`iti-${this.#o}__search-input`,type:"search",class:`iti__search-input ${i}`,placeholder:t.searchPlaceholder,role:"combobox",[N]:"true",[L]:t.searchPlaceholder,[P]:`iti-${this.#o}__country-listbox`,[O]:"list",autocomplete:"off"},s),this.searchClearButton=X("button",{type:"button",class:`iti__search-clear ${u}`,[L]:t.clearSearchAriaLabel,tabindex:"-1"},s),this.searchClearButton.innerHTML=(()=>{const t=`iti-${this.#o}-clear-mask`;return`\n <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${S}="true" focusable="false">\n <mask id="${t}" maskUnits="userSpaceOnUse">\n <rect width="16" height="16" fill="white" />\n <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />\n </mask>\n <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />\n </svg>`})(),this.#f=X("span",{class:"iti__a11y-text"},this.#c),this.#p=X("div",{class:`iti__no-results ${u}`,[S]:"true"},this.#c),this.#p.textContent=t.searchEmptyState}#b(){this.countryContainer&&(this.#$(),this.countryContainer.classList.remove(c))}#w(t){const{hiddenInput:i}=this.#n;if(i){const s=i(this.telInput.getAttribute("name")||"");if(s.phone){const i=this.telInput.form?.querySelector(`input[name="${s.phone}"]`);i?this.hiddenInput=i:(this.hiddenInput=X("input",{type:"hidden",name:s.phone}),t.appendChild(this.hiddenInput))}if(s.country){const i=this.telInput.form?.querySelector(`input[name="${s.country}"]`);i?this.hiddenInputCountry=i:(this.hiddenInputCountry=X("input",{type:"hidden",name:s.country}),t.appendChild(this.hiddenInputCountry))}}}#v(){const t=document.createDocumentFragment();for(let i=0;i<this.#h.length;i++){const s=this.#h[i],e=G({[y]:!0}),n=X("li",{id:`iti-${this.#o}__item-${s.iso2}`,class:e,tabindex:"-1",role:"option",[x]:"false"});n.dataset.dialCode=s.dialCode,n.dataset.countryCode=s.iso2,s.nodeById[this.#o]=n,this.#n.showFlags&&X("div",{class:`${f} iti__${s.iso2}`},n);const o=X("span",{class:"iti__country-name"},n);o.textContent=`${s.name} `;const l=X("span",{class:"iti__dial-code"},o);this.#l&&l.setAttribute("dir","ltr"),l.textContent=`(+${s.dialCode})`,t.appendChild(n)}this.countryList.appendChild(t)}#$(){if(this.selectedCountry){const t=this.#n.separateDialCode?78:42,i=this.selectedCountry.offsetWidth||this.#N()||t;this.telInput.style.paddingLeft=`${i+6}px`}}static#L(){let t;try{t=window.top.document.body}catch(i){t=document.body}return t}#N(){if(this.telInput.parentNode){const i=t.#L(),s=this.telInput.parentNode.cloneNode(!1);s.style.visibility="hidden",i.appendChild(s);const e=this.countryContainer.cloneNode();s.appendChild(e);const n=this.selectedCountry.cloneNode(!0);e.appendChild(n);const o=n.offsetWidth;return i.removeChild(s),o}return 0}#k(){const i=t.#L();this.#c.classList.remove(u);const s=X("div",{class:"iti iti--inline-dropdown"});s.appendChild(this.#c),s.style.visibility="hidden",i.appendChild(s);const e=this.#c.offsetHeight;return i.removeChild(s),s.style.visibility="",this.#c.classList.add(u),e>0?e:200}#I(){const{i18n:t}=this.#n;this.#f.textContent=t.searchSummaryAria(this.countryList.childElementCount)}filterCountriesByQuery(t){let i;i=""===t?this.#h:((t,i)=>{const s=K(i),e=[],n=[],o=[],l=[],r=[],h=[];for(const i of t)i.iso2===s?e.push(i):i.normalisedName.startsWith(s)?n.push(i):i.normalisedName.includes(s)?o.push(i):s===i.dialCode||s===i.dialCodePlus?l.push(i):i.dialCodePlus.includes(s)?r.push(i):i.initials.includes(s)&&h.push(i);const a=(t,i)=>t.priority-i.priority;return[...e,...n,...o,...l.sort(a),...r.sort(a),...h]})(this.#h,t),this.#x(i)}#D(){const t=this.searchInput.value.trim();this.filterCountriesByQuery(t),this.searchInput.value?this.searchClearButton.classList.remove(u):this.searchClearButton.classList.add(u)}handleSearchChange(){this.#t&&clearTimeout(this.#t),this.#t=setTimeout((()=>{this.#D(),this.#t=null}),100)}handleSearchClear(){this.searchInput.value="",this.searchInput.focus(),this.#D()}scrollCountryListToItem(t){const i=this.countryList,s=i.getBoundingClientRect(),e=t.getBoundingClientRect(),n=e.top-s.top+i.scrollTop;e.top<s.top?i.scrollTop=n:e.bottom>s.bottom&&(i.scrollTop=n-s.height+e.height)}highlightListItem(t,i){const s=this.highlightedItem;if(s&&s.classList.remove(b),this.highlightedItem=t,this.highlightedItem){if(this.highlightedItem.classList.add(b),this.#n.countrySearch){const t=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(D,t)}i&&this.highlightedItem.focus()}}handleUpDownKey(t){let i=t===w?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;!i&&this.countryList.childElementCount>1&&(i=t===w?this.countryList.lastElementChild:this.countryList.firstElementChild),i&&(this.scrollCountryListToItem(i),this.highlightListItem(i,!1))}#A(t){if(this.#e&&this.#e.dataset.countryCode!==t&&(this.#e.setAttribute(x,"false"),this.#e.querySelector(".iti__country-check")?.remove(),this.#e=null),t&&!this.#e){const i=this.countryList.querySelector(`[data-country-code="${t}"]`);i&&(i.setAttribute(x,"true"),X("span",{class:"iti__country-check",[S]:"true"},i).innerHTML=`\n <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${S}="true">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>\n </svg>`,this.#e=i)}}#x(t){this.countryList.replaceChildren();let i=!0;for(const s of t){const t=s.nodeById[this.#o];t&&(this.countryList.appendChild(t),i&&(this.highlightListItem(t,!1),i=!1))}i?(this.highlightListItem(null,!1),this.#p&&this.#p.classList.remove(u)):this.#p&&this.#p.classList.add(u),this.countryList.scrollTop=0,this.#I()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.#n.separateDialCode&&(this.telInput.style.paddingLeft=this.#r);const t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.searchInput=null,this.searchClearButton=null,this.countryList=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null,this.#a=null,this.#u=null,this.#c=null,this.#d=null,this.#p=null,this.#f=null,this.#s=null,this.#e=null;for(const t of this.#h)delete t.nodeById[this.#o];this.#h=null}openDropdown(){const{countrySearch:t,dropdownAlwaysOpen:i,dropdownContainer:s}=this.#n;if(this.#C(),s)this.#P();else{const t=this.#S(),i=this.telInput.offsetHeight+3;t?this.#c.style.top=`${i}px`:this.#c.style.bottom=`${i}px`}if(this.#c.classList.remove(u),this.selectedCountry.setAttribute(N,"true"),t){const t=this.countryList.firstElementChild;t&&(this.highlightListItem(t,!1),this.countryList.scrollTop=0),i||this.searchInput.focus()}this.#u.classList.add(d)}closeDropdown(){const{countrySearch:t,dropdownContainer:i}=this.#n;this.#c.classList.add(u),this.selectedCountry.setAttribute(N,"false"),t&&(this.searchInput.removeAttribute(D),this.highlightedItem&&(this.highlightedItem.classList.remove(b),this.highlightedItem=null)),this.#u.classList.remove(d),i?(this.#s.remove(),this.#s.style.top="",this.#s.style.bottom="",this.#s.style.paddingLeft="",this.#s.style.paddingRight=""):(this.#c.style.top="",this.#c.style.bottom="")}#S(){if(this.#n.dropdownAlwaysOpen)return!0;const t=this.telInput.getBoundingClientRect(),i=window.innerHeight-t.bottom;return i>=this.#i||i>=t.top}#P(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;if(i){if(window.innerWidth>=500){const t=this.telInput.getBoundingClientRect();this.#s.style.paddingLeft=`${t.left}px`,this.#s.style.paddingRight=window.innerWidth-t.right+"px"}}else{const t=this.telInput.getBoundingClientRect();this.#s.style.left=`${t.left}px`,this.#S()?this.#s.style.top=`${t.bottom+3}px`:(this.#s.style.top="unset",this.#s.style.bottom=window.innerHeight-t.top+3+"px")}t.appendChild(this.#s)}isDropdownClosed(){return this.#c.classList.contains(u)}setCountry(t){const{allowDropdown:i,showFlags:s,separateDialCode:e,i18n:n}=this.#n,{name:o,dialCode:l,iso2:r=""}=t;if(i&&this.#A(r),this.selectedCountry){const t=r&&s?`${f} iti__${r}`:`${f} ${p}`;let i,e,h;r?(e=o,i=n.selectedCountryAriaLabel.replace("${countryName}",o).replace("${dialCode}",`+${l}`),h=s?"":'\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'):(e=n.noCountrySelected,i=n.noCountrySelected,h='\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'),this.selectedCountryInner.className=t,this.selectedCountry.setAttribute("title",e),this.selectedCountry.setAttribute(L,i),this.selectedCountryInner.innerHTML=h}e&&(this.#a.textContent=l?`+${l}`:"",this.#$())}},J=new Set(["800","808","870","881","882","883","888","979"]),Q=t=>{const i=q(t).slice(0,3);return t.startsWith("+")&&J.has(i)},Z=(t,i,s,e)=>{let n=t;if(s&&i){const t=`+${e.dialCode}`;n=n.substring(" "===n[t.length]||"-"===n[t.length]?t.length+1:t.length)}return n},tt=new Set(["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"]),it=t=>{const i=q(t);if(i.startsWith("1")&&i.length>=4){const t=i.substring(1,4);return tt.has(t)}return!1},st=class{#O;constructor(t){t&&this.#T(t)}#T(t){/[\u0660-\u0669]/.test(t)?this.#O="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.#O="persian":this.#O="ascii"}denormalise(t){if(!this.#O||"ascii"===this.#O)return t;const i="arabic-indic"===this.#O?1632:1776;return t.replace(/[0-9]/g,(t=>String.fromCharCode(i+Number(t))))}normalise(t){if(!t)return"";if(this.#T(t),"ascii"===this.#O)return t;const i="arabic-indic"===this.#O?1632:1776,s="arabic-indic"===this.#O?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(s,(t=>String.fromCharCode(t.charCodeAt(0)-i+48)))}isAscii(){return!this.#O||"ascii"===this.#O}},et=0,nt=class t{#E;#n;#M;#h;#F;#j;#U;#B;#z;#R;#H;#V;#W;#q;#K;#G;#X;#Y;constructor(t,i={}){this.id=et++,Y.validateInput(t);const s=(t=>{if(void 0===t)return{};if(!B(t)){const i=`The second argument must be an options object; got ${U(t)}. Using defaults.`;return R(i),{}}const i={};for(const[e,n]of Object.entries(t))if(V(j,e))switch(e){case"allowDropdown":case"allowNumberExtensions":case"allowPhonewords":case"countrySearch":case"dropdownAlwaysOpen":case"fixDropdownWidth":case"formatAsYouType":case"formatOnDisplay":case"nationalMode":case"showFlags":case"separateDialCode":case"strictMode":case"useFullscreenPopup":if("boolean"!=typeof n){H(e,"a boolean",n);break}i[e]=n;break;case"autoPlaceholder":if("string"!=typeof n||!z.has(n)){const t=Array.from(z).join(", ");H("autoPlaceholder",`one of ${t}`,n);break}i[e]=n;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if("string"!=typeof n){H(e,"a string",n);break}i[e]=n;break;case"countryOrder":if(null===n)i[e]=n;else{const t=W(e,n);!1!==t&&(i[e]=t)}break;case"customPlaceholder":case"geoIpLookup":case"hiddenInput":case"loadUtils":if(null!==n&&"function"!=typeof n){H(e,"a function or null",n);break}i[e]=n;break;case"dropdownContainer":if(null!==n&&(!(s=n)||"object"!=typeof s||1!==s.nodeType||"string"!=typeof s.tagName||"function"!=typeof s.appendChild)){H("dropdownContainer","an HTMLElement or null",n);break}i[e]=n;break;case"excludeCountries":case"onlyCountries":{const t=W(e,n);!1!==t&&(i[e]=t);break}case"i18n":if(n&&!B(n)){H("i18n","an object",n);break}i[e]=n;break;case"initialCountry":{if("string"!=typeof n){H("initialCountry","a string",n);break}const t=n.toLowerCase();if(t&&t!==k&&!h(t)){H("initialCountry","a valid ISO2 country code or 'auto'",n);break}i[e]=n;break}case"placeholderNumberType":if("string"!=typeof n||!$.has(n)){const t=Array.from($).join(", ");H("placeholderNumberType",`one of ${t}`,n);break}i[e]=n;break;case"allowedNumberTypes":if(null!==n){if(!Array.isArray(n)){H("allowedNumberTypes","an array of number types or null",n);break}let t=!0;for(const i of n)if("string"!=typeof i||!$.has(i)){const s=Array.from($).join(", ");H("allowedNumberTypes",`an array of valid number types (${s})`,i),t=!1;break}t&&(i[e]=n)}else i[e]=null}else R(`Unknown option '${e}'. Ignoring.`);var s;return i})(i);var e;this.#n={...j,...s},(e=this.#n).initialCountry&&(e.initialCountry=e.initialCountry.toLowerCase()),e.onlyCountries?.length&&(e.onlyCountries=e.onlyCountries.map((t=>t.toLowerCase()))),e.excludeCountries?.length&&(e.excludeCountries=e.excludeCountries.map((t=>t.toLowerCase()))),e.countryOrder&&(e.countryOrder=e.countryOrder.map((t=>t.toLowerCase()))),(t=>{t.dropdownAlwaysOpen&&(t.useFullscreenPopup=!1,t.allowDropdown=!0),t.useFullscreenPopup?t.fixDropdownWidth=!1:F()&&(t.fixDropdownWidth=!0),1===t.onlyCountries.length&&(t.initialCountry=t.onlyCountries[0]),t.separateDialCode&&(t.nationalMode=!1),!t.allowDropdown||t.showFlags||t.separateDialCode||(t.nationalMode=!1),t.useFullscreenPopup&&!t.dropdownContainer&&(t.dropdownContainer=document.body),t.i18n={...E,...t.i18n}})(this.#n),this.#E=new Y(t,this.#n,this.id),this.#M="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),this.#q=new st(t.value),this.promise=this.#J(this.#n),this.#h=(t=>{const{onlyCountries:i,excludeCountries:s}=t;return i?.length?a.filter((t=>i.includes(t.iso2))):s?.length?a.filter((t=>!s.includes(t.iso2))):a})(this.#n);const{dialCodes:n,dialCodeMaxLen:o,dialCodeToIso2Map:l}=(t=>{const i=new Set;let s=0;const e={},n=(t,i)=>{if(!t||!i)return;i.length>s&&(s=i.length),e.hasOwnProperty(i)||(e[i]=[]);const n=e[i];n.includes(t)||n.push(t)},o=[...t].sort(((t,i)=>t.priority-i.priority));for(const t of o){i.has(t.dialCode)||i.add(t.dialCode);for(let i=1;i<t.dialCode.length;i++){const s=t.dialCode.substring(0,i);n(t.iso2,s)}if(n(t.iso2,t.dialCode),t.areaCodes){const i=e[t.dialCode][0];for(const s of t.areaCodes){for(let e=1;e<s.length;e++){const o=s.substring(0,e),l=t.dialCode+o;n(i,l),n(t.iso2,l)}n(t.iso2,t.dialCode+s)}}}return{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:e}})(this.#h);this.#U=n,this.#F=o,this.#j=l,this.#B=new Map(this.#h.map((t=>[t.iso2,t]))),this.#Q()}#Z(){const t=this.#E.telInput.value.trim();return this.#q.normalise(t)}#tt(t){this.#E.telInput.value=this.#q.denormalise(t)}#J(t){const{initialCountry:i,geoIpLookup:s,loadUtils:e}=t,n=i===k&&Boolean(s),o=Boolean(e)&&!ot.utils;let l,r;return n?l=new Promise(((t,i)=>{this.#K=t,this.#G=i})):(l=Promise.resolve(void 0),this.#K=()=>{},this.#G=()=>{}),o?r=new Promise(((t,i)=>{this.#X=t,this.#Y=i})):(r=Promise.resolve(void 0),this.#X=()=>{},this.#Y=()=>{}),Promise.all([l,r]).then((()=>{}))}#Q(){this.#z=null,this.#V=new AbortController,this.#it(),this.#E.generateMarkup(this.#h),this.#st(),this.#et(),this.#nt(),this.#n.dropdownAlwaysOpen&&this.#ot()}#it(){((t,i)=>{const{countryNameLocale:s,i18n:e}=i;let n;try{n="undefined"!=typeof Intl&&"function"==typeof Intl.DisplayNames?new Intl.DisplayNames(s,{type:"region"}):null}catch(t){console.error(t),n=null}for(const i of t)i.name=e[i.iso2]||n?.of(i.iso2.toUpperCase())||""})(this.#h,this.#n),((t,i)=>{const{countryOrder:s}=i;t.sort(((t,i)=>{if(s){const e=s.indexOf(t.iso2),n=s.indexOf(i.iso2),o=e>-1,l=n>-1;if(o||l)return o&&l?e-n:o?-1:1}return t.name.localeCompare(i.name)}))})(this.#h,this.#n),(t=>{for(const i of t)i.normalisedName=K(i.name),i.initials=i.normalisedName.split(/[^a-z]/).map((t=>t[0])).join(""),i.dialCodePlus=`+${i.dialCode}`})(this.#h)}#st(t=!1){const i=this.#E.telInput.getAttribute("value"),s=this.#q.normalise(i),e=this.#Z(),n=!s||!s.startsWith("+")||e&&e.startsWith("+")?e:s,o=this.#lt(n),l=it(n),{initialCountry:r,geoIpLookup:a}=this.#n,u=r===k&&a&&!t,c=h(r);o?l?c?this.#rt(r):u||this.#rt("us"):this.#ht(n):c?this.#rt(r):u||this.#rt(""),n&&this.#at(n)}#et(){this.#ut(),this.#n.allowDropdown&&this.#ct(),(this.#E.hiddenInput||this.#E.hiddenInputCountry)&&this.#E.telInput.form&&this.#dt()}#dt(){this.#E.telInput.form?.addEventListener("submit",(()=>{this.#E.hiddenInput&&(this.#E.hiddenInput.value=this.getNumber()),this.#E.hiddenInputCountry&&(this.#E.hiddenInputCountry.value=this.#z?.iso2||"")}),{signal:this.#V.signal})}#ct(){const t=this.#V.signal,i=this.#E.telInput.closest("label");i&&i.addEventListener("click",(t=>{this.#E.isDropdownClosed()?this.#E.telInput.focus():t.preventDefault()}),{signal:t}),this.#E.selectedCountry.addEventListener("click",(()=>{!this.#E.isDropdownClosed()||this.#E.telInput.disabled||this.#E.telInput.readOnly||this.#ot()}),{signal:t}),this.#E.countryContainer.addEventListener("keydown",(t=>{const i=[w,g," ",C];this.#E.isDropdownClosed()&&i.includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.#ot()),"Tab"===t.key&&this.#pt()}),{signal:t})}#nt(){const{loadUtils:t,initialCountry:i,geoIpLookup:s}=this.#n;if(t&&!ot.utils){const i=()=>{ot.attachUtils(t)?.catch((()=>{}))};ot.documentReady()?i():window.addEventListener("load",i,{signal:this.#V.signal})}else this.#X();i===k&&s&&(this.#z?.iso2?this.#K():this.#ft())}#ft(){ot.autoCountry?this.#mt():(this.#E.selectedCountryInner.classList.add(m),ot.startedLoadingAutoCountry||(ot.startedLoadingAutoCountry=!0,"function"!=typeof this.#n.geoIpLookup)||this.#n.geoIpLookup(((i="")=>{this.#E.selectedCountryInner.classList.remove(m);const s=i.toLowerCase();h(s)?(ot.autoCountry=s,setTimeout((()=>t.forEachInstance("handleAutoCountry")))):t.forEachInstance("handleAutoCountryFailure")}),(()=>{this.#E.selectedCountryInner.classList.remove(m),t.forEachInstance("handleAutoCountryFailure")})))}#yt(){this.#ot(),this.#E.searchInput.value="+",this.#E.filterCountriesByQuery("")}#ut(){this.#bt(),this.#wt(),this.#gt()}#bt(){const{strictMode:t,formatAsYouType:i,separateDialCode:s,allowDropdown:e,countrySearch:n}=this.#n;let o=!1;v.ALPHA_UNICODE.test(this.#Z())&&(o=!0),this.#E.telInput.addEventListener("input",(l=>{const r=this.#Z();if(this.#M&&"+"===l?.data&&s&&e&&n){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t-1),s=r.substring(t);return this.#tt(i+s),void this.#yt()}this.#ht(r)&&this.#Ct(),l?.data&&v.NON_PLUS_NUMERIC.test(l.data)||"insertFromPaste"===l?.inputType&&r&&!t?o=!0:v.NON_PLUS_NUMERIC.test(r)||(o=!1);const h=l?.detail&&l.detail.isSetNumber,a=this.#q.isAscii();if(i&&!o&&!h&&a){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t).replace(v.NON_PLUS_NUMERIC_GLOBAL,"").length,e="deleteContentForward"===l?.inputType,n=((t,i,s,e,n)=>{const o=s?s.formatNumberAsYouType(t,e.iso2):t,{dialCode:l}=e;return n&&"+"!==i.charAt(0)&&o.includes(`+${l}`)?(o.split(`+${l}`)[1]||"").trim():o})(this.#_t(),r,ot.utils,this.#z??{},s),o=((t,i,s,e)=>{if(0===s&&!e)return 0;let n=0;for(let s=0;s<i.length;s++){if(/[+0-9]/.test(i[s])&&n++,n===t&&!e)return s+1;if(e&&n===t+1)return s}return i.length})(i,n,t,e);this.#tt(n),this.#E.telInput.setSelectionRange(o,o)}if(s&&r.startsWith("+")&&this.#z?.dialCode){const t=Z(r,!0,s,this.#z??{});this.#tt(t)}}),{signal:this.#V.signal})}#wt(){const{strictMode:t,separateDialCode:i,allowDropdown:s,countrySearch:e}=this.#n;(t||i)&&this.#E.telInput.addEventListener("keydown",(n=>{if(n.key&&1===n.key.length&&!n.altKey&&!n.ctrlKey&&!n.metaKey){if(i&&s&&e&&"+"===n.key)return n.preventDefault(),void this.#yt();if(t){const t=this.#Z(),s=!t.startsWith("+")&&0===this.#E.telInput.selectionStart&&"+"===n.key,e=this.#q.normalise(n.key),o=/^[0-9]$/.test(e),l=i?o:s||o,r=this.#E.telInput,h=r.selectionEnd,a=t.slice(0,r.selectionStart),u=t.slice(h),c=this.#_t(a+n.key+u);let d=!1;ot.utils&&this.#R&&(d=ot.utils.getCoreNumber(c,this.#z?.iso2).length>this.#R);const p=this.#vt(c);l&&(!d||null!==p||s)||n.preventDefault()}}}),{signal:this.#V.signal})}#gt(){this.#n.strictMode&&this.#E.telInput.addEventListener("paste",(t=>{t.preventDefault();const i=this.#E.telInput,s=i.selectionStart,e=i.selectionEnd,n=this.#Z(),o=n.slice(0,s),l=n.slice(e),r=this.#z?.iso2,h=t.clipboardData.getData("text"),a=this.#q.normalise(h),u=0===s&&e>0,c=!n.startsWith("+")||u,d=a.replace(v.NON_PLUS_NUMERIC_GLOBAL,""),p=d.startsWith("+"),f=d.replace(/\+/g,""),m=p&&c?`+${f}`:f;let y=o+m+l;if(y.length>5){let t=ot.utils.getCoreNumber(y,r);for(;0===t.length&&y.length>0;)y=y.slice(0,-1),t=ot.utils.getCoreNumber(y,r);if(!t)return;if(this.#R&&t.length>this.#R){if(i.selectionEnd!==n.length)return;{const i=t.length-this.#R;y=y.slice(0,y.length-i)}}}this.#tt(y);const b=s+m.length;i.setSelectionRange(b,b),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))}),{signal:this.#V.signal})}#It(t){const i=Number(this.#E.telInput.getAttribute("maxlength"));return i&&t.length>i?t.substring(0,i):t}#kt(t,i={}){const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});this.#E.telInput.dispatchEvent(s)}#ot(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;this.#W=new AbortController,this.#E.openDropdown(),!i&&t&&window.addEventListener("scroll",(()=>this.#pt()),{signal:this.#W.signal}),this.#$t(),this.#kt("open:countrydropdown")}#$t(){const t=this.#W.signal;this.#Nt(t),this.#Lt(t),this.#n.dropdownAlwaysOpen||this.#xt(t),this.#Dt(t),this.#n.countrySearch&&this.#At(t)}#Nt(t){this.#E.countryList.addEventListener("mouseover",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#E.highlightListItem(i,!1)}),{signal:t})}#Lt(t){this.#E.countryList.addEventListener("click",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#Pt(i)}),{signal:t})}#xt(t){const i=t=>{t.target.closest(`#iti-${this.id}__dropdown-content`)||this.#pt()};setTimeout((()=>{document.documentElement.addEventListener("click",i,{signal:t})}),0)}#Dt(t){let i="",s=null;document.addEventListener("keydown",(t=>{[w,g,C,_].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key===w||t.key===g?this.#E.handleUpDownKey(t.key):t.key!==C||t.isComposing?t.key===_&&(this.#pt(),this.#E.selectedCountry.focus()):this.#St()),!this.#n.countrySearch&&v.HIDDEN_SEARCH_CHAR.test(t.key)&&(t.stopPropagation(),s&&clearTimeout(s),i+=t.key.toLowerCase(),this.#Ot(i),s=setTimeout((()=>{i=""}),1e3))}),{signal:t})}#At(t){this.#E.searchInput.addEventListener("input",(()=>this.#E.handleSearchChange()),{signal:t}),this.#E.searchClearButton.addEventListener("click",(()=>this.#E.handleSearchClear()),{signal:t})}#Ot(t){const i=((t,i)=>{const s=K(i);for(const i of t)if(i.normalisedName.startsWith(s))return i;return null})(this.#h,t);if(i){const t=i.nodeById[this.id];this.#E.highlightListItem(t,!1),this.#E.scrollCountryListToItem(t)}}#St(){this.#E.highlightedItem&&this.#Pt(this.#E.highlightedItem)}#at(t){const{formatOnDisplay:i,nationalMode:s,separateDialCode:e}=this.#n;let n=t;if(i&&ot.utils&&this.#z){const i=Q(t),o=s&&!i||!n.startsWith("+")&&!e,{NATIONAL:l,INTERNATIONAL:r}=ot.utils.numberFormat,h=o?l:r;n=ot.utils.formatNumber(n,this.#z?.iso2,h)}n=this.#Tt(n),this.#tt(n)}#ht(t){const i=this.#vt(t);return null!==i&&this.#rt(i)}#Et(t){const i=this.#z?.dialCode,s=this.#z?.nationalPrefix;return t.startsWith("+")||!i?t:`+${i}${s&&t.startsWith(s)&&!this.#n.separateDialCode?t.substring(1):t}`}#vt(t){const i=t.indexOf("+");let s=i?t.substring(i):t;const e=this.#z?.iso2,n=this.#z?.dialCode;s=this.#Et(s);const o=this.#lt(s,!0),l=q(s);if(o){const t=q(o),i=this.#j[t];if(1===i.length)return i[0]===e?null:i[0];if(!e&&this.#H&&i.includes(this.#H))return this.#H;if("1"===n&&it(l))return null;const s=this.#z?.areaCodes,r=this.#z?.priority;if(s){const t=s.map((t=>`${n}${t}`));for(const i of t)if(l.startsWith(i))return null}const h=s&&!(0===r)&&l.length>t.length;if((!e||!i.includes(e)||h)&&e!==i[0])return i[0]}else{if(s.startsWith("+")&&l.length){const t=this.#z?.dialCode||"";return t&&t.startsWith(l)?null:""}if((!s||"+"===s)&&!e&&this.#H)return this.#H}return null}#rt(t){const i=this.#z?.iso2||"";return this.#z=t?this.#B.get(t):null,this.#z?.iso2&&(this.#H=this.#z.iso2),this.#E.setCountry(this.#z??{}),this.#Mt(),this.#Ft(),i!==t}#Ft(){const{strictMode:t,placeholderNumberType:i,allowedNumberTypes:s}=this.#n,e=this.#z?.iso2;if(t&&ot.utils)if(e){let t=ot.utils.getExampleNumber(e,!1,ot.utils.numberType[i],!0),n=t;for(;ot.utils.isPossibleNumber(t,e,s);)n=t,t+="0";const o=ot.utils.getCoreNumber(n,e);this.#R=o.length,"by"===e&&(this.#R=o.length+1)}else this.#R=null}#Mt(){const{autoPlaceholder:t,placeholderNumberType:i,nationalMode:s,customPlaceholder:e}=this.#n,n=t===I.AGGRESSIVE||!this.#E.hadInitialPlaceholder&&t===I.POLITE;if(ot.utils&&n){const t=ot.utils.numberType[i];let n=this.#z?.iso2?ot.utils.getExampleNumber(this.#z.iso2,s,t):"";n=this.#Tt(n),"function"==typeof e&&(n=e(n,this.#z??{})),this.#E.telInput.setAttribute("placeholder",n)}}#Pt(t){const i=this.#rt(t.dataset.countryCode);if(this.#pt(),this.#jt(t.dataset.dialCode),this.#n.formatOnDisplay){const t=this.#Z();this.#at(t)}this.#E.telInput.focus(),i&&this.#Ct()}#pt(t){this.#E.isDropdownClosed()||this.#n.dropdownAlwaysOpen&&!t||(this.#E.closeDropdown(),this.#W.abort(),this.#W=null,this.#kt("close:countrydropdown"))}#jt(t){const i=this.#Z(),s=`+${t}`;let e;if(i.startsWith("+")){const t=this.#lt(i);e=t?i.replace(t,s):s,this.#tt(e)}}#lt(t,i){let s="";if(t.startsWith("+")){let e="",n=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(/[0-9]/.test(l)){if(e+=l,!Boolean(this.#j[e]))break;if(this.#U.has(e)){if(s=t.substring(0,o+1),n=!0,!i)break}else i&&n&&(s=t.substring(0,o+1));if(e.length===this.#F)break}}}return s}#_t(t){const i=t?this.#q.normalise(t):this.#Z(),s=this.#z?.dialCode;let e;const n=q(i);return e=this.#n.separateDialCode&&!i.startsWith("+")&&s&&n?`+${s}`:"",e+i}#Tt(t){const i=Boolean(this.#lt(t)),s=Z(t,i,this.#n.separateDialCode,this.#z??{});return this.#It(s)}#Ut(){const t=this.#z;if(!t)return{};const{iso2:i,dialCode:s,name:e}=t;return{iso2:i,dialCode:s,name:e}}#Ct(){const t=this.#Ut();this.#kt("countrychange",t)}#mt(){this.#E.telInput?this.#n.initialCountry===k&&ot.autoCountry&&(this.#H=ot.autoCountry,this.#z?.iso2||this.#E.selectedCountryInner.classList.contains(p)||this.setCountry(this.#H),this.#K()):this.#K?.()}#Bt(){this.#E.telInput?(this.#st(!0),this.#G()):this.#G?.()}#zt(){if(this.#E.telInput){if(ot.utils){const t=this.#Z();t&&this.#at(t),this.#z?.iso2&&(this.#Mt(),this.#Ft())}this.#X()}else this.#X?.()}#Rt(t){this.#E,this.#Y(t)}destroy(){this.#E.telInput&&(this.#n.allowDropdown&&this.#pt(!0),this.#V.abort(),this.#V=null,this.#E.destroy(),delete ot.instances[this.id])}isActive(){return!!this.#E?.telInput}getExtension(){return ot.utils&&this.#E.telInput?ot.utils.getExtension(this.#_t(),this.#z?.iso2):""}getNumber(t){if(ot.utils&&this.#E.telInput){const i=this.#z?.iso2,s=this.#_t(),e=ot.utils.formatNumber(s,i,t);return this.#q.denormalise(e)}return""}getNumberType(){return ot.utils&&this.#E.telInput?ot.utils.getNumberType(this.#_t(),this.#z?.iso2):-99}getSelectedCountryData(){return this.#Ut()}getValidationError(){if(ot.utils&&this.#E.telInput){const t=this.#z?.iso2;return ot.utils.getValidationError(this.#_t(),t)}return-99}isValidNumber(){const t=this.#z?.dialCode,i=this.#z?.iso2;if(ot.utils&&this.#E.telInput){const s=this.#_t(),e=ot.utils.getCoreNumber(s,i);if(e){if("44"===t&&"7"===e[0]&&10!==e.length)return!1;if(!v.ALPHA_UNICODE.test(s)&&t){const i=s.startsWith("+")?s.slice(1+t.length):s,n=q(i).length;if(e.length>n)return!1}}}return this.#Ht(!1)}isValidNumberPrecise(){return this.#Ht(!0)}#Vt(t){return ot.utils?ot.utils.isPossibleNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}#Ht(t){if(!ot.utils||!this.#E.telInput)return null;const{allowNumberExtensions:i,allowPhonewords:s}=this.#n,e=this.#_t();if(!this.#z?.iso2&&!Q(e))return!1;if(!(i=>t?this.#Wt(i):this.#Vt(i))(e))return!1;if(e.search(v.ALPHA_UNICODE)>-1){const t=this.#z?.iso2;return Boolean(ot.utils.getExtension(e,t))?i:s}return!0}#Wt(t){return ot.utils?ot.utils.isValidNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}setCountry(t){if(!this.#E.telInput)return;const i=t?.toLowerCase();if(!h(i))throw new Error(`Invalid country code: '${i}'`);const s=this.#z?.iso2;if(t&&i!==s||!t&&s){if(this.#rt(i),this.#jt(this.#z?.dialCode||""),this.#n.formatOnDisplay){const t=this.#Z();this.#at(t)}this.#Ct()}}setNumber(t){if(!this.#E.telInput)return;const i=this.#q.normalise(t),s=this.#ht(i);this.#at(i),s&&this.#Ct(),this.#kt("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.#E.telInput&&(this.#n.placeholderNumberType=t,this.#Mt())}setDisabled(t){this.#E.telInput&&(this.#E.telInput.disabled=t,this.#E.selectedCountry&&(t?this.#E.selectedCountry.setAttribute("disabled","true"):this.#E.selectedCountry.removeAttribute("disabled")))}static forEachInstance(i,...s){const e=Object.values(ot.instances),n=s[0];e.forEach((s=>{if(s instanceof t)switch(i){case"handleUtils":s.#zt();break;case"handleUtilsFailure":s.#Rt(n);break;case"handleAutoCountry":s.#mt();break;case"handleAutoCountryFailure":s.#Bt()}}))}},ot=Object.assign(((t,i)=>{const s=new nt(t,i);return ot.instances[s.id]=s,t.iti=s,s}),{defaults:j,documentReady:()=>"complete"===document.readyState,getCountryData:()=>a,getInstance:t=>{const i=t.dataset.intlTelInputId;return i?ot.instances[i]:null},instances:{},attachUtils:t=>{if(!ot.utils&&!ot.startedLoadingUtilsScript){let i;if("function"!=typeof t)return Promise.reject(new TypeError("The argument passed to attachUtils must be a function that returns a promise for the utilities module, not "+typeof t));try{i=Promise.resolve(t())}catch(t){return Promise.reject(t)}return ot.startedLoadingUtilsScript=!0,i.then((t=>{const i=t?.default;if(!i||"object"!=typeof i)throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return ot.utils=i,nt.forEachInstance("handleUtils"),!0})).catch((t=>{throw nt.forEachInstance("handleUtilsFailure",t),t}))}return null},startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"26.9.2"}),lt=ot;return l=n,((n,o,l,r)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let l of s(o))e.call(n,l)||undefined===l||t(n,l,{get:()=>o[l],enumerable:!(r=i(o,l))||r.enumerable});return n})(t({},"__esModule",{value:!0}),l)})().default,n.exports?n.exports=e():window.intlTelInput=e()),n.exports),l=i({__proto__:null,default:t(o)},[o]);export{l as i}