@salla.sa/twilight-components 2.14.416 → 2.14.418

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 (303) hide show
  1. package/dist/cjs/{filepond-CBG90JEP.js → filepond-C1_8U7ht.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-JwH-NbLr.js → filepond-plugin-file-poster-C2QZkcu0.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-B_RE-gPk.js → filepond-plugin-file-validate-size-CbVRd24w.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DdcCt3Gt.js → filepond-plugin-file-validate-type-63RP4vcL.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-jZdP7Wd2.js → filepond-plugin-image-edit-CjWMhhkZ.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-ZMSOR6_7.js → filepond-plugin-image-exif-orientation-CJxStqYG.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-ICjNuZvr.js → filepond-plugin-image-preview--RTa59Q8.js} +1 -1
  8. package/dist/cjs/{functions-4ojGKP4U.js → functions-T48FHZw8.js} +1 -1
  9. package/dist/cjs/{index-hYJfBKqA.js → index-CQ4zjhzH.js} +1 -1
  10. package/dist/cjs/{index-CCPcy3yV.js → index-DO_QXaSt.js} +2 -2
  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 +3 -2
  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-booking-field_7.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-bullet-delivery.cjs.entry.js +10 -9
  22. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-delivery-promise.cjs.entry.js +2 -2
  31. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  43. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  44. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  45. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  47. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  48. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  78. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-slider.cjs.entry.js +12 -5
  82. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  93. package/dist/cjs/{tracked-promise-DZzEOWGH.js → tracked-promise-BnNAgCN_.js} +1 -1
  94. package/dist/cjs/twilight.cjs.js +1 -1
  95. package/dist/cjs/{vanilla-picker-BxCWwAM4.js → vanilla-picker-wbE79zwn.js} +1 -1
  96. package/dist/collection/components/salla-bought-together/salla-bought-together.js +1 -0
  97. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +9 -8
  98. package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +1 -1
  99. package/dist/collection/components/salla-product-options/salla-product-options.js +1 -1
  100. package/dist/collection/components/salla-slider/salla-slider.js +12 -5
  101. package/dist/components/index.js +2 -2
  102. package/dist/components/salla-bought-together.js +1 -0
  103. package/dist/components/salla-bullet-delivery.js +9 -8
  104. package/dist/components/salla-delivery-promise.js +1 -1
  105. package/dist/components/salla-product-options2.js +1 -1
  106. package/dist/components/salla-slider2.js +11 -4
  107. package/dist/esm/{filepond-CNTsYc8S.js → filepond-BaqNYv3C.js} +1 -1
  108. package/dist/esm/{filepond-plugin-file-poster-DLCidc-Q.js → filepond-plugin-file-poster-nENZqIRv.js} +1 -1
  109. package/dist/esm/{filepond-plugin-file-validate-size-CZGLWF5m.js → filepond-plugin-file-validate-size-DGOq4RG8.js} +1 -1
  110. package/dist/esm/{filepond-plugin-file-validate-type-CKJi-jQD.js → filepond-plugin-file-validate-type-DwM-3UO7.js} +1 -1
  111. package/dist/esm/{filepond-plugin-image-edit-4Xk79kLy.js → filepond-plugin-image-edit-BCqDiFWK.js} +1 -1
  112. package/dist/esm/{filepond-plugin-image-exif-orientation-BzeDXlDj.js → filepond-plugin-image-exif-orientation-DiuxhjrQ.js} +1 -1
  113. package/dist/esm/{filepond-plugin-image-preview-D0PgvnTL.js → filepond-plugin-image-preview-DbFvPPQQ.js} +1 -1
  114. package/dist/esm/{functions-FT2ic5VF.js → functions-JPNAXx4d.js} +1 -1
  115. package/dist/esm/{index-C9LfegwO.js → index-BwsreBbG.js} +2 -2
  116. package/dist/esm/{index-hvP60PR-.js → index-DElBWCVR.js} +1 -1
  117. package/dist/esm/loader.js +2 -2
  118. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  119. package/dist/esm/salla-accordion_6.entry.js +1 -1
  120. package/dist/esm/salla-add-product-button_5.entry.js +3 -2
  121. package/dist/esm/salla-advertisement.entry.js +1 -1
  122. package/dist/esm/salla-alert_2.entry.js +1 -1
  123. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  124. package/dist/esm/salla-apps-icons.entry.js +1 -1
  125. package/dist/esm/salla-badge.entry.js +1 -1
  126. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  127. package/dist/esm/salla-bullet-delivery.entry.js +10 -9
  128. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  129. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  130. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  131. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  132. package/dist/esm/salla-contacts.entry.js +1 -1
  133. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  134. package/dist/esm/salla-count-down.entry.js +1 -1
  135. package/dist/esm/salla-custom-fields.entry.js +1 -1
  136. package/dist/esm/salla-delivery-promise.entry.js +2 -2
  137. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  138. package/dist/esm/salla-filters-widget.entry.js +1 -1
  139. package/dist/esm/salla-filters.entry.js +1 -1
  140. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  141. package/dist/esm/salla-gifting.entry.js +1 -1
  142. package/dist/esm/salla-hook.entry.js +1 -1
  143. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  144. package/dist/esm/salla-installment.entry.js +1 -1
  145. package/dist/esm/salla-list-tile.entry.js +1 -1
  146. package/dist/esm/salla-localization-modal.entry.js +1 -1
  147. package/dist/esm/salla-login-modal.entry.js +1 -1
  148. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  149. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  150. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  151. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  152. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  153. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  154. package/dist/esm/salla-loyalty.entry.js +1 -1
  155. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  156. package/dist/esm/salla-map.entry.js +1 -1
  157. package/dist/esm/salla-menu.entry.js +1 -1
  158. package/dist/esm/salla-metadata.entry.js +1 -1
  159. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  160. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  161. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  162. package/dist/esm/salla-notification-item.entry.js +1 -1
  163. package/dist/esm/salla-notifications.entry.js +1 -1
  164. package/dist/esm/salla-offer-modal.entry.js +1 -1
  165. package/dist/esm/salla-offer.entry.js +1 -1
  166. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  167. package/dist/esm/salla-order-details-options.entry.js +1 -1
  168. package/dist/esm/salla-order-details.entry.js +1 -1
  169. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  170. package/dist/esm/salla-order-edit.entry.js +1 -1
  171. package/dist/esm/salla-order-summary.entry.js +1 -1
  172. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  173. package/dist/esm/salla-orders.entry.js +1 -1
  174. package/dist/esm/salla-payments.entry.js +1 -1
  175. package/dist/esm/salla-placeholder.entry.js +1 -1
  176. package/dist/esm/salla-price-range.entry.js +1 -1
  177. package/dist/esm/salla-product-card_2.entry.js +1 -1
  178. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  179. package/dist/esm/salla-products-list.entry.js +1 -1
  180. package/dist/esm/salla-progress-bar.entry.js +1 -1
  181. package/dist/esm/salla-quick-order.entry.js +1 -1
  182. package/dist/esm/salla-rating-modal.entry.js +1 -1
  183. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  184. package/dist/esm/salla-scopes.entry.js +1 -1
  185. package/dist/esm/salla-search.entry.js +1 -1
  186. package/dist/esm/salla-skeleton.entry.js +1 -1
  187. package/dist/esm/salla-slider.entry.js +12 -5
  188. package/dist/esm/salla-social-share.entry.js +1 -1
  189. package/dist/esm/salla-social.entry.js +1 -1
  190. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  191. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  192. package/dist/esm/salla-tooltip.entry.js +1 -1
  193. package/dist/esm/salla-trust-badges.entry.js +1 -1
  194. package/dist/esm/salla-user-menu.entry.js +1 -1
  195. package/dist/esm/salla-user-profile.entry.js +1 -1
  196. package/dist/esm/salla-user-settings.entry.js +1 -1
  197. package/dist/esm/salla-verify.entry.js +1 -1
  198. package/dist/esm/salla-wallet.entry.js +1 -1
  199. package/dist/esm/{tracked-promise-1pTB63_W.js → tracked-promise-BD-FZk2P.js} +1 -1
  200. package/dist/esm/twilight.js +2 -2
  201. package/dist/esm/{vanilla-picker-BJ2CkMLp.js → vanilla-picker-CqoFxJJE.js} +1 -1
  202. package/dist/twilight/{p-b0d7b80f.entry.js → p-03c39b2d.entry.js} +1 -1
  203. package/dist/twilight/{p-15c0dccc.entry.js → p-0654ccca.entry.js} +1 -1
  204. package/dist/twilight/{p-64e02dcb.entry.js → p-069485ec.entry.js} +1 -1
  205. package/dist/twilight/{p-17e390e3.entry.js → p-0a786447.entry.js} +1 -1
  206. package/dist/twilight/{p-90dd4bf6.entry.js → p-0bf11f89.entry.js} +1 -1
  207. package/dist/twilight/{p-560960db.entry.js → p-10884e6e.entry.js} +1 -1
  208. package/dist/twilight/{p-25031ff2.entry.js → p-167f5262.entry.js} +1 -1
  209. package/dist/twilight/{p-5610e4e2.entry.js → p-19e82de2.entry.js} +1 -1
  210. package/dist/twilight/{p-118f29f4.entry.js → p-1c1ac203.entry.js} +1 -1
  211. package/dist/twilight/{p-148da2c3.entry.js → p-1c3e0dbc.entry.js} +1 -1
  212. package/dist/twilight/{p-533620ec.entry.js → p-201926a3.entry.js} +1 -1
  213. package/dist/twilight/{p-b74f020c.entry.js → p-25104b13.entry.js} +1 -1
  214. package/dist/twilight/{p-72f652ae.entry.js → p-29fc145b.entry.js} +1 -1
  215. package/dist/twilight/{p-dadaf42d.entry.js → p-2bd83486.entry.js} +1 -1
  216. package/dist/twilight/{p-4be163d5.entry.js → p-2f833767.entry.js} +1 -1
  217. package/dist/twilight/p-36048354.entry.js +4 -0
  218. package/dist/twilight/{p-b20200b3.entry.js → p-3f50a52d.entry.js} +1 -1
  219. package/dist/twilight/{p-16a47df9.entry.js → p-4110e600.entry.js} +1 -1
  220. package/dist/twilight/{p-762b495a.entry.js → p-44db7163.entry.js} +1 -1
  221. package/dist/twilight/{p-7e21eca0.entry.js → p-46088f51.entry.js} +1 -1
  222. package/dist/twilight/{p-f808105e.entry.js → p-4807586a.entry.js} +1 -1
  223. package/dist/twilight/{p-d4f9ff15.entry.js → p-4c57de7b.entry.js} +1 -1
  224. package/dist/twilight/{p-98058dd5.entry.js → p-4edf67be.entry.js} +1 -1
  225. package/dist/twilight/{p-cacc01e0.entry.js → p-57451f00.entry.js} +1 -1
  226. package/dist/twilight/{p-5dad49a3.entry.js → p-57e0b11b.entry.js} +1 -1
  227. package/dist/twilight/{p-b446cc66.entry.js → p-580441f5.entry.js} +1 -1
  228. package/dist/twilight/{p-662655e4.entry.js → p-59657a19.entry.js} +1 -1
  229. package/dist/twilight/{p-0c00ce12.entry.js → p-5ac81ffe.entry.js} +1 -1
  230. package/dist/twilight/{p-73717694.entry.js → p-5b371b1f.entry.js} +1 -1
  231. package/dist/twilight/p-60878c2e.entry.js +4 -0
  232. package/dist/twilight/p-60d875cc.entry.js +4 -0
  233. package/dist/twilight/{p-ea9375cd.entry.js → p-61215f22.entry.js} +1 -1
  234. package/dist/twilight/{p-fe32d556.entry.js → p-681953ef.entry.js} +1 -1
  235. package/dist/twilight/{p-2e278955.entry.js → p-695e3211.entry.js} +1 -1
  236. package/dist/twilight/p-7a33e83b.entry.js +4 -0
  237. package/dist/twilight/{p-a3a51648.entry.js → p-7d3722ad.entry.js} +1 -1
  238. package/dist/twilight/{p-ad1bf35d.entry.js → p-7d492d3c.entry.js} +1 -1
  239. package/dist/twilight/{p-8541ea88.entry.js → p-86cfa253.entry.js} +1 -1
  240. package/dist/twilight/{p-9b987f30.entry.js → p-9134d94d.entry.js} +1 -1
  241. package/dist/twilight/{p-c9624543.entry.js → p-91d74168.entry.js} +1 -1
  242. package/dist/twilight/{p-07c8d18a.entry.js → p-993bdcbe.entry.js} +1 -1
  243. package/dist/twilight/{p-5490ab3c.entry.js → p-9c73e42a.entry.js} +1 -1
  244. package/dist/twilight/{p-5cb3e470.entry.js → p-9d8e4e7c.entry.js} +1 -1
  245. package/dist/twilight/{p-CHhAfu1h.js → p-BuNOvMeU.js} +1 -1
  246. package/dist/twilight/{p-C9LfegwO.js → p-BwsreBbG.js} +1 -1
  247. package/dist/twilight/{p-Djj7vaV-.js → p-CEuTw3-D.js} +1 -1
  248. package/dist/twilight/{p-BsKHACid.js → p-CTyl0UJE.js} +1 -1
  249. package/dist/twilight/{p-gVQiSPdv.js → p-CbukOCNI.js} +1 -1
  250. package/dist/twilight/{p-dD0Tdyf6.js → p-Cw0Ky-u0.js} +1 -1
  251. package/dist/twilight/{p-CmyHU1sa.js → p-DPgASjJ8.js} +1 -1
  252. package/dist/twilight/{p-DdKxjqvN.js → p-DlGhggDp.js} +1 -1
  253. package/dist/twilight/{p-ByakzLkB.js → p-Dw7mGaHj.js} +1 -1
  254. package/dist/twilight/{p-l16goxRo.js → p-GgHo6Cr_.js} +1 -1
  255. package/dist/twilight/{p-Dc0Qm0uU.js → p-LWKLIOwS.js} +1 -1
  256. package/dist/twilight/{p-79fdc643.entry.js → p-a00015ec.entry.js} +1 -1
  257. package/dist/twilight/{p-822281b4.entry.js → p-a3a0bafa.entry.js} +1 -1
  258. package/dist/twilight/{p-823e1484.entry.js → p-a96ec635.entry.js} +1 -1
  259. package/dist/twilight/{p-087eee5a.entry.js → p-aaff5603.entry.js} +1 -1
  260. package/dist/twilight/{p-3c736f19.entry.js → p-ab5e0aef.entry.js} +1 -1
  261. package/dist/twilight/{p-33623d50.entry.js → p-ac008da7.entry.js} +1 -1
  262. package/dist/twilight/{p-a46d7111.entry.js → p-ad762138.entry.js} +1 -1
  263. package/dist/twilight/{p-fa9b08c3.entry.js → p-af1474dd.entry.js} +1 -1
  264. package/dist/twilight/{p-564cab70.entry.js → p-af84c7b8.entry.js} +1 -1
  265. package/dist/twilight/{p-f1090939.entry.js → p-b4fd50ef.entry.js} +1 -1
  266. package/dist/twilight/{p-b566c6d4.entry.js → p-b6ac7a22.entry.js} +1 -1
  267. package/dist/twilight/{p-a272ffbc.entry.js → p-b6dce61a.entry.js} +1 -1
  268. package/dist/twilight/{p-3e238107.entry.js → p-b737dbcb.entry.js} +1 -1
  269. package/dist/twilight/{p-7fcf1cfc.entry.js → p-b9062150.entry.js} +1 -1
  270. package/dist/twilight/{p-ed019625.entry.js → p-b9c9c487.entry.js} +1 -1
  271. package/dist/twilight/{p-af4d286b.entry.js → p-c0b690b2.entry.js} +1 -1
  272. package/dist/twilight/{p-72b20bca.entry.js → p-c1d4db6f.entry.js} +1 -1
  273. package/dist/twilight/{p-d87bdad9.entry.js → p-c5e18341.entry.js} +1 -1
  274. package/dist/twilight/{p-c38d3943.entry.js → p-c968dab0.entry.js} +1 -1
  275. package/dist/twilight/{p-089387e7.entry.js → p-cd6fc43c.entry.js} +1 -1
  276. package/dist/twilight/{p-0a076256.entry.js → p-ce588635.entry.js} +1 -1
  277. package/dist/twilight/{p-2a7d689e.entry.js → p-ceb9458e.entry.js} +1 -1
  278. package/dist/twilight/{p-f66c6dfe.entry.js → p-d0cf9b68.entry.js} +1 -1
  279. package/dist/twilight/{p-d4772204.entry.js → p-d469525b.entry.js} +1 -1
  280. package/dist/twilight/p-d739ae41.entry.js +4 -0
  281. package/dist/twilight/{p-cfdfe7bb.entry.js → p-d9c4d2ed.entry.js} +1 -1
  282. package/dist/twilight/{p-9ba16790.entry.js → p-dcc65eb2.entry.js} +1 -1
  283. package/dist/twilight/{p-48ade533.entry.js → p-e07f938a.entry.js} +1 -1
  284. package/dist/twilight/{p-31a72c7a.entry.js → p-e5325563.entry.js} +1 -1
  285. package/dist/twilight/{p-944e24bf.entry.js → p-edaba475.entry.js} +1 -1
  286. package/dist/twilight/{p-Dg-WfT5N.js → p-f-qXMnue.js} +1 -1
  287. package/dist/twilight/{p-d2bd6c7b.entry.js → p-f2815da9.entry.js} +1 -1
  288. package/dist/twilight/{p-bf38e653.entry.js → p-f653f2bb.entry.js} +1 -1
  289. package/dist/twilight/{p-4ea6a5ef.entry.js → p-f73c7b43.entry.js} +1 -1
  290. package/dist/twilight/{p-b9147a32.entry.js → p-f7b21078.entry.js} +1 -1
  291. package/dist/twilight/{p-957bf09f.entry.js → p-f88806d7.entry.js} +1 -1
  292. package/dist/twilight/{p-cc44fd26.entry.js → p-fbe07d2d.entry.js} +1 -1
  293. package/dist/twilight/{p-3308b003.entry.js → p-fec6b08b.entry.js} +1 -1
  294. package/dist/twilight/{p-f120ac27.entry.js → p-ff90dbf0.entry.js} +1 -1
  295. package/dist/twilight/twilight.esm.js +1 -1
  296. package/dist/types/components/salla-slider/salla-slider.d.ts +1 -1
  297. package/dist/types/components.d.ts +2 -2
  298. package/package.json +5 -5
  299. package/dist/twilight/p-9f5e9373.entry.js +0 -4
  300. package/dist/twilight/p-a27be3a6.entry.js +0 -4
  301. package/dist/twilight/p-b50a6baf.entry.js +0 -4
  302. package/dist/twilight/p-e1ea6d97.entry.js +0 -4
  303. package/dist/twilight/p-fafe3d2d.entry.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{d as i}from"./p-C9LfegwO.js";function t(i,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(e){if("default"!==e&&!(e in i)){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}}))})),Object.freeze(i)}var e,n,s,a={exports:{}};var r,o=s?n:(s=1,e||(e=1,r=function(i){return function(){for(var t=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua & Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia & Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","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","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros","km","269"],["Congo - Brazzaville","cg","242"],["Congo - Kinshasa","cd","243"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","id","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan","jo","962"],["Kazakhstan","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["North Macedonia","mk","389"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Réunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé & Príncipe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["St Barthélemy","bl","590",1],["St Helena","sh","290"],["St Kitts & Nevis","kn","1",18,["869"]],["St Lucia","lc","1",19,["758"]],["St Martin","mf","590",2],["St Pierre & Miquelon","pm","508"],["St Vincent & Grenadines","vc","1",20,["784"]],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard & Jan Mayen","sj","47",1,["79"]],["Sweden","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad & Tobago","tt","1",22,["868"]],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks & Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["US Virgin Islands","vi","1",24,["340"]],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis & Futuna","wf","681"],["Western Sahara","eh","212",1,["5288","5289"]],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],e=0;e<t.length;e++){var n=t[e];t[e]={name:n[0],iso2:n[1],dialCode:n[2],priority:n[3]||0,areaCodes:n[4]||null}}function s(i,t,e){return(t=a(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function a(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(e!==i){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}var r={getInstance:function(i){var t=i.getAttribute("data-intl-tel-input-id");return window.intlTelInputGlobals.instances[t]},instances:{},documentReady:function(){return"complete"===document.readyState}};"object"==typeof window&&(window.intlTelInputGlobals=r);var o=0,h={allowDropdown:!0,autoInsertDialCode:!1,autoPlaceholder:"polite",countrySearch:!1,customContainer:"",customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!1,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:"",initialCountry:"",localizedCountries:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,showFlags:!0,useFullscreenPopup:"undefined"!=typeof navigator&&"undefined"!=typeof window&&(/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500),utilsScript:""},u=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],l=function(i,t){for(var e=Object.keys(i),n=0;n<e.length;n++)t(e[n],i[e[n]])},c=function(i){l(window.intlTelInputGlobals.instances,(function(t){window.intlTelInputGlobals.instances[t][i]()}))},d=function(){function e(i,t){var n=this;!function(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=o++,this.telInput=i,this.activeItem=null,this.highlightedItem=null;var s=t||{};this.options={},l(h,(function(i,t){n.options[i]=s.hasOwnProperty(i)?s[i]:t})),this.hadInitialPlaceholder=Boolean(i.getAttribute("placeholder"))}return n=e,r=[{key:"_init",value:function(){var i=this;if(this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!1),this.options.countrySearch&&!this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!0),this.options.nationalMode&&(this.options.autoInsertDialCode=!1),this.options.separateDialCode&&(this.options.autoInsertDialCode=!1),!this.options.showFlags&&this.options.allowDropdown&&!this.options.separateDialCode&&(this.options.showFlags=!0),this.options.useFullscreenPopup&&!this.options.dropdownContainer&&(this.options.dropdownContainer=document.body),this.isRTL=!!this.telInput.closest("[dir=rtl]"),"undefined"!=typeof Promise){var t=new Promise((function(t,e){i.resolveAutoCountryPromise=t,i.rejectAutoCountryPromise=e})),e=new Promise((function(t,e){i.resolveUtilsScriptPromise=t,i.rejectUtilsScriptPromise=e}));this.promise=Promise.all([t,e])}else this.resolveAutoCountryPromise=this.rejectAutoCountryPromise=function(){},this.resolveUtilsScriptPromise=this.rejectUtilsScriptPromise=function(){};this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}},{key:"_processCountryData",value:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries(),this.options.localizedCountries&&this._translateCountriesByLocale(),(this.options.onlyCountries.length||this.options.localizedCountries)&&this.countries.sort(this._countryNameSort)}},{key:"_addCountryCode",value:function(t,e,n){e.length>this.countryCodeMaxLen&&(this.countryCodeMaxLen=e.length),this.countryCodes.hasOwnProperty(e)||(this.countryCodes[e]=[]);for(var s=0;s<this.countryCodes[e].length;s++)if(this.countryCodes[e][s]===t)return;this.countryCodes[e][n!==i?n:this.countryCodes[e].length]=t}},{key:"_processAllCountries",value:function(){if(this.options.onlyCountries.length){var i=this.options.onlyCountries.map((function(i){return i.toLowerCase()}));this.countries=t.filter((function(t){return i.indexOf(t.iso2)>-1}))}else if(this.options.excludeCountries.length){var e=this.options.excludeCountries.map((function(i){return i.toLowerCase()}));this.countries=t.filter((function(i){return-1===e.indexOf(i.iso2)}))}else this.countries=t}},{key:"_translateCountriesByLocale",value:function(){for(var i=0;i<this.countries.length;i++){var t=this.countries[i].iso2.toLowerCase();this.options.localizedCountries.hasOwnProperty(t)&&(this.countries[i].name=this.options.localizedCountries[t])}}},{key:"_countryNameSort",value:function(i,t){return i.name<t.name?-1:i.name>t.name?1:0}},{key:"_processCountryCodes",value:function(){this.countryCodeMaxLen=0,this.dialCodes={},this.countryCodes={};for(var i=0;i<this.countries.length;i++){var t=this.countries[i];this.dialCodes[t.dialCode]||(this.dialCodes[t.dialCode]=!0),this._addCountryCode(t.iso2,t.dialCode,t.priority)}for(var e=0;e<this.countries.length;e++){var n=this.countries[e];if(n.areaCodes)for(var s=this.countryCodes[n.dialCode][0],a=0;a<n.areaCodes.length;a++){for(var r=n.areaCodes[a],o=1;o<r.length;o++){var h=n.dialCode+r.substr(0,o);this._addCountryCode(s,h),this._addCountryCode(n.iso2,h)}this._addCountryCode(n.iso2,n.dialCode+r)}}}},{key:"_processPreferredCountries",value:function(){this.preferredCountries=[];for(var i=0;i<this.options.preferredCountries.length;i++){var t=this.options.preferredCountries[i].toLowerCase(),e=this._getCountryData(t,!1,!0);e&&this.preferredCountries.push(e)}}},{key:"_createEl",value:function(i,t,e){var n=document.createElement(i);return t&&l(t,(function(i,t){return n.setAttribute(i,t)})),e&&e.appendChild(n),n}},{key:"_generateMarkup",value:function(){this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.form&&this.telInput.form.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","off");var i=this.options,t=i.allowDropdown,e=i.separateDialCode,n=i.showFlags,a=i.customContainer,r=i.hiddenInput,o=i.dropdownContainer,h=i.fixDropdownWidth,u=i.useFullscreenPopup,l=i.countrySearch,c="iti";t&&(c+=" iti--allow-dropdown"),e&&(c+=" iti--separate-dial-code"),n&&(c+=" iti--show-flags"),a&&(c+=" ".concat(a));var d=this._createEl("div",{class:c});this.telInput.parentNode.insertBefore(d,this.telInput);var f=t||n||e;if(f&&(this.flagsContainer=this._createEl("div",{class:"iti__flag-container"},d)),d.appendChild(this.telInput),f&&(this.selectedFlag=this._createEl("div",function(i){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e).filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.forEach((function(t){s(i,t,e[t])}))}return i}({class:"iti__selected-flag"},t&&{role:"combobox","aria-haspopup":"listbox","aria-controls":"iti-".concat(this.id,"__country-listbox"),"aria-expanded":"false","aria-label":"Telephone country code"}),this.flagsContainer)),n&&(this.selectedFlagInner=this._createEl("div",{class:"iti__flag"},this.selectedFlag)),this.selectedFlag&&this.telInput.disabled&&this.selectedFlag.setAttribute("aria-disabled","true"),e&&(this.selectedDialCode=this._createEl("div",{class:"iti__selected-dial-code"},this.selectedFlag)),t)if(this.telInput.disabled||this.selectedFlag.setAttribute("tabindex","0"),this.dropdownArrow=this._createEl("div",{class:"iti__arrow"},this.selectedFlag),this.dropdownContent=this._createEl("div",{class:"iti__dropdown-content iti__hide ".concat(h?"":"iti--flexible-dropdown-width")}),l&&(this.searchInput=this._createEl("input",{type:"text",class:"iti__search-input",placeholder:"Search"},this.dropdownContent)),this.countryList=this._createEl("ul",{class:"iti__country-list",id:"iti-".concat(this.id,"__country-listbox"),role:"listbox","aria-label":"List of countries"},this.dropdownContent),this.preferredCountries.length&&!l&&(this._appendListItems(this.preferredCountries,"iti__preferred",!0),this._createEl("li",{class:"iti__divider","aria-hidden":"true"},this.countryList)),this._appendListItems(this.countries,"iti__standard"),o){var v="iti iti--container";u&&(v+=" iti--fullscreen-popup"),l&&(v+=" iti--country-search"),this.dropdown=this._createEl("div",{class:v}),this.dropdown.appendChild(this.dropdownContent)}else this.flagsContainer.appendChild(this.dropdownContent);if(r){var p=r,y=this.telInput.getAttribute("name");if(y){var m=y.lastIndexOf("[");-1!==m&&(p="".concat(y.substr(0,m),"[").concat(p,"]"))}this.hiddenInput=this._createEl("input",{type:"hidden",name:p}),d.appendChild(this.hiddenInput)}}},{key:"_appendListItems",value:function(i,t,e){for(var n=0;n<i.length;n++){var s=i[n],a=e?"-preferred":"",r=this._createEl("li",{id:"iti-".concat(this.id,"__item-").concat(s.iso2).concat(a),class:"iti__country ".concat(t),tabindex:"-1",role:"option","data-dial-code":s.dialCode,"data-country-code":s.iso2,"aria-selected":"false"},this.countryList);s.node=r;var o="";this.options.showFlags&&(o+="<div class='iti__flag-box'><div class='iti__flag iti__".concat(s.iso2,"'></div></div>")),o+="<span class='iti__country-name'>".concat(s.name,"</span>"),o+="<span class='iti__dial-code'>+".concat(s.dialCode,"</span>"),r.insertAdjacentHTML("beforeend",o)}}},{key:"_setInitialState",value:function(){var i=this.telInput.getAttribute("value"),t=this.telInput.value,e=!i||"+"!==i.charAt(0)||t&&"+"===t.charAt(0)?t:i,n=this._getDialCode(e),s=this._isRegionlessNanp(e),a=this.options,r=a.initialCountry,o=a.autoInsertDialCode;n&&!s?this._updateFlagFromNumber(e):"auto"!==r&&(r&&this._getCountryData(r,!1,!0)?this._setFlag(r.toLowerCase()):n&&s?this._setFlag("us"):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),!e&&o&&(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),e&&this._updateValFromNumber(e)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoInsertDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var i=this;this._handleHiddenInputSubmit=function(){i.hiddenInput.value=i.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var i=this.telInput;i&&"LABEL"!==i.tagName;)i=i.parentNode;return i}},{key:"_initDropdownListeners",value:function(){var i=this;this._handleLabelClick=function(t){i.dropdownContent.classList.contains("iti__hide")?i.telInput.focus():t.preventDefault()};var t=this._getClosestLabel();t&&t.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!i.dropdownContent.classList.contains("iti__hide")||i.telInput.disabled||i.telInput.readOnly||i._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(t){i.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),i._showDropdown()),"Tab"===t.key&&i._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var i=this;this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",(function(){window.intlTelInputGlobals.loadUtils(i.options.utilsScript)})):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((function(i){window.intlTelInputGlobals.autoCountry=i.toLowerCase(),setTimeout((function(){return c("handleAutoCountry")}))}),(function(){return c("rejectAutoCountryPromise")})))}},{key:"_initKeyListeners",value:function(){var i=this;this._handleKeyupEvent=function(){i._updateFlagFromNumber(i.telInput.value)&&i._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(i._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(i){var t=this.telInput.getAttribute("maxlength");return t&&i.length>t?i.substr(0,t):i}},{key:"_initBlurListeners",value:function(){var i=this;this._handleSubmitOrBlurEvent=function(){i._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var i=this._getNumeric(this.telInput.value);i&&this.selectedCountryData.dialCode!==i||(this.telInput.value="")}}},{key:"_getNumeric",value:function(i){return i.replace(/\D/g,"")}},{key:"_trigger",value:function(i){var t=document.createEvent("Event");t.initEvent(i,!0,!0),this.telInput.dispatchEvent(t)}},{key:"_showDropdown",value:function(){this.options.fixDropdownWidth&&(this.dropdownContent.style.width="".concat(this.telInput.offsetWidth,"px")),this.dropdownContent.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.options.countrySearch?(this._highlightListItem(this.countryList.firstElementChild,!1),this.searchInput.focus()):this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(i,t,e){e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)}},{key:"_setDropdownPosition",value:function(){var i=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){var t=this.telInput.getBoundingClientRect(),e=window.pageYOffset||document.documentElement.scrollTop,n=t.top+e,s=this.dropdownContent.offsetHeight,a=n+this.telInput.offsetHeight+s<e+window.innerHeight,r=!this.options.countrySearch&&!a&&n-s>e;this._toggleClass(this.dropdownContent,"iti__dropdown-content--dropup",r),this.options.dropdownContainer&&(this.dropdown.style.top="".concat(n+(r?0:this.telInput.offsetHeight),"px"),this.dropdown.style.left="".concat(t.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return i._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll))}}},{key:"_getClosestListItem",value:function(i){for(var t=i;t&&t!==this.countryList&&!t.classList.contains("iti__country");)t=t.parentNode;return t===this.countryList?null:t}},{key:"_bindDropdownListeners",value:function(){var i=this;this._handleMouseoverCountryList=function(t){var e=i._getClosestListItem(t.target);e&&i._highlightListItem(e,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(t){var e=i._getClosestListItem(t.target);e&&i._selectListItem(e)},this.countryList.addEventListener("click",this._handleClickCountryList);var t=!0;this._handleClickOffToClose=function(){t||i._closeDropdown(),t=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);var e="",n=null;if(this._handleKeydownOnDropdown=function(t){["ArrowUp","ArrowDown","Enter","Escape"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),"ArrowUp"===t.key||"ArrowDown"===t.key?i._handleUpDownKey(t.key):"Enter"===t.key?i._handleEnterKey():"Escape"===t.key&&i._closeDropdown()),!i.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(t.key)&&(t.stopPropagation(),n&&clearTimeout(n),e+=t.key.toLowerCase(),i._searchForCountry(e),n=setTimeout((function(){e=""}),1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch){var s=null;this._handleSearchChange=function(){s&&clearTimeout(s),s=setTimeout((function(){var t;(t=i.searchInput.value.trim())?i._filterCountries(t.toLowerCase()):i._filterCountries(null,!0),s=null}),100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",(function(i){return i.stopPropagation()}))}}},{key:"_filterCountries",value:function(t){var e=arguments.length>1&&arguments[1]!==i&&arguments[1],n=!0;this.countryList.innerHTML="";for(var s=0;s<this.countries.length;s++){var a=this.countries[s],r=a.name.toLowerCase(),o="+".concat(a.dialCode);(e||r.includes(t)||o.includes(t))&&(this.countryList.appendChild(a.node),n&&(this._highlightListItem(a.node,!1),n=!1))}}},{key:"_handleUpDownKey",value:function(i){var t="ArrowUp"===i?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;t?t.classList.contains("iti__divider")&&(t="ArrowUp"===i?t.previousElementSibling:t.nextElementSibling):this.countryList.childElementCount>1&&(t="ArrowUp"===i?this.countryList.lastElementChild:this.countryList.firstElementChild),t&&(this._highlightListItem(t,!this.options.countrySearch),this.options.countrySearch&&this._scrollTo(t,!1))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(i){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,i)){var e=this.countries[t].node;this._highlightListItem(e,!1),this._scrollTo(e,!0);break}}},{key:"_startsWith",value:function(i,t){return i.substr(0,t.length).toLowerCase()===t}},{key:"_updateValFromNumber",value:function(i){var t=i;if(this.options.formatOnDisplay&&window.intlTelInputUtils&&this.selectedCountryData){var e=this.options.nationalMode||"+"!==t.charAt(0)&&!this.options.separateDialCode,n=intlTelInputUtils.numberFormat;t=intlTelInputUtils.formatNumber(t,this.selectedCountryData.iso2,e?n.NATIONAL:n.INTERNATIONAL)}t=this._beforeSetNumber(t),this.telInput.value=t}},{key:"_updateFlagFromNumber",value:function(i){var t=i.indexOf("+"),e=t?i.substring(t):i,n=this.selectedCountryData.dialCode;e&&"1"===n&&"+"!==e.charAt(0)&&("1"!==e.charAt(0)&&(e="1".concat(e)),e="+".concat(e)),this.options.separateDialCode&&n&&"+"!==e.charAt(0)&&(e="+".concat(n).concat(e));var s=this._getDialCode(e,!0),a=this._getNumeric(e),r=null;if(s){var o=this.countryCodes[this._getNumeric(s)],h=-1!==o.indexOf(this.selectedCountryData.iso2)&&a.length<=s.length-1;if(!("1"===n&&this._isRegionlessNanp(a)||h))for(var u=0;u<o.length;u++)if(o[u]){r=o[u];break}}else"+"===e.charAt(0)&&a.length?r="":e&&"+"!==e||(r=this.defaultCountry);return null!==r&&this._setFlag(r)}},{key:"_isRegionlessNanp",value:function(i){var t=this._getNumeric(i);if("1"===t.charAt(0)){var e=t.substr(1,3);return-1!==u.indexOf(e)}return!1}},{key:"_highlightListItem",value:function(i,t){var e=this.highlightedItem;e&&e.classList.remove("iti__highlight"),this.highlightedItem=i,this.highlightedItem.classList.add("iti__highlight"),this.selectedFlag.setAttribute("aria-activedescendant",i.getAttribute("id")),t&&this.highlightedItem.focus()}},{key:"_getCountryData",value:function(i,e,n){for(var s=e?t:this.countries,a=0;a<s.length;a++)if(s[a].iso2===i)return s[a];if(n)return null;throw new Error("No country data for '".concat(i,"'"))}},{key:"_setFlag",value:function(i){var t=this.options,e=t.allowDropdown,n=t.separateDialCode,s=t.showFlags,a=this.selectedCountryData.iso2?this.selectedCountryData:{};if(this.selectedCountryData=i?this._getCountryData(i,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),s&&this.selectedFlagInner.setAttribute("class","iti__flag iti__".concat(i)),this._setSelectedCountryFlagTitleAttribute(i,n),n){var r=this.selectedCountryData.dialCode?"+".concat(this.selectedCountryData.dialCode):"";this.selectedDialCode.innerHTML=r;var o=this.selectedFlag.offsetWidth||this._getHiddenSelectedFlagWidth();this.isRTL?this.telInput.style.paddingRight="".concat(o+6,"px"):this.telInput.style.paddingLeft="".concat(o+6,"px")}if(this._updatePlaceholder(),e){var h=this.activeItem;if(h&&(h.classList.remove("iti__active"),h.setAttribute("aria-selected","false")),i){var u=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(i,"-preferred"))||this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(i));u.setAttribute("aria-selected","true"),u.classList.add("iti__active"),this.activeItem=u}}return a.iso2!==i}},{key:"_setSelectedCountryFlagTitleAttribute",value:function(i,t){var e;this.selectedFlag&&(e=i&&!t?"".concat(this.selectedCountryData.name,": +").concat(this.selectedCountryData.dialCode):i?this.selectedCountryData.name:"Unknown",this.selectedFlag.setAttribute("title",e))}},{key:"_getHiddenSelectedFlagWidth",value:function(){var i=this.telInput.parentNode.cloneNode();i.style.visibility="hidden",document.body.appendChild(i);var t=this.flagsContainer.cloneNode();i.appendChild(t);var e=this.selectedFlag.cloneNode(!0);t.appendChild(e);var n=e.offsetWidth;return i.parentNode.removeChild(i),n}},{key:"_updatePlaceholder",value:function(){if(window.intlTelInputUtils&&("aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&"polite"===this.options.autoPlaceholder)){var i=intlTelInputUtils.numberType[this.options.placeholderNumberType],t=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,i):"";t=this._beforeSetNumber(t),"function"==typeof this.options.customPlaceholder&&(t=this.options.customPlaceholder(t,this.selectedCountryData)),this.telInput.setAttribute("placeholder",t)}}},{key:"_selectListItem",value:function(i){var t=this._setFlag(i.getAttribute("data-country-code"));this._closeDropdown(),this._updateDialCode(i.getAttribute("data-dial-code")),this.telInput.focus();var e=this.telInput.value.length;this.telInput.setSelectionRange(e,e),t&&this._triggerCountryChange()}},{key:"_closeDropdown",value:function(){this.dropdownContent.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.selectedFlag.removeAttribute("aria-activedescendant"),this.dropdownArrow.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch&&this.searchInput.removeEventListener("input",this._handleSearchChange),document.documentElement.removeEventListener("click",this._handleClickOffToClose),this.countryList.removeEventListener("mouseover",this._handleMouseoverCountryList),this.countryList.removeEventListener("click",this._handleClickCountryList),this.options.dropdownContainer&&(this.options.useFullscreenPopup||window.removeEventListener("scroll",this._handleWindowScroll),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._trigger("close:countrydropdown")}},{key:"_scrollTo",value:function(i,t){var e=this.dropdownContent,n=window.pageYOffset||document.documentElement.scrollTop,s=e.offsetHeight,a=e.getBoundingClientRect().top+n,r=a+s,o=i.offsetHeight,h=i.getBoundingClientRect().top+n,u=h+o,l=h-a+e.scrollTop,c=s/2-o/2;h<a?(t&&(l-=c),e.scrollTop=l):u>r&&(t&&(l+=c),e.scrollTop=l-(s-o))}},{key:"_updateDialCode",value:function(i){var t,e=this.telInput.value,n="+".concat(i);if("+"===e.charAt(0)){var s=this._getDialCode(e);t=s?e.replace(s,n):n,this.telInput.value=t}else this.options.autoInsertDialCode&&(this.telInput.value=t=e?n+e:n)}},{key:"_getDialCode",value:function(i,t){var e="";if("+"===i.charAt(0))for(var n="",s=0;s<i.length;s++){var a=i.charAt(s);if(!isNaN(parseInt(a,10))){if(n+=a,t)this.countryCodes[n]&&(e=i.substr(0,s+1));else if(this.dialCodes[n]){e=i.substr(0,s+1);break}if(n.length===this.countryCodeMaxLen)break}}return e}},{key:"_getFullNumber",value:function(){var i=this.telInput.value.trim(),t=this.selectedCountryData.dialCode,e=this._getNumeric(i);return(this.options.separateDialCode&&"+"!==i.charAt(0)&&t&&e?"+".concat(t):"")+i}},{key:"_beforeSetNumber",value:function(i){var t=i;if(this.options.separateDialCode){var e=this._getDialCode(t);e&&(e="+".concat(this.selectedCountryData.dialCode),t=t.substr(" "===t[e.length]||"-"===t[e.length]?e.length+1:e.length))}return this._cap(t)}},{key:"_triggerCountryChange",value:function(){this._trigger("countrychange")}},{key:"handleAutoCountry",value:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=window.intlTelInputGlobals.autoCountry,this.telInput.value||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this._updatePlaceholder()),this.resolveUtilsScriptPromise()}},{key:"destroy",value:function(){var i=this.telInput.form;if(this.options.allowDropdown){this._closeDropdown(),this.selectedFlag.removeEventListener("click",this._handleClickSelectedFlag),this.flagsContainer.removeEventListener("keydown",this._handleFlagsContainerKeydown);var t=this._getClosestLabel();t&&t.removeEventListener("click",this._handleLabelClick)}this.hiddenInput&&i&&i.removeEventListener("submit",this._handleHiddenInputSubmit),this.options.autoInsertDialCode&&(i&&i.removeEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.removeEventListener("blur",this._handleSubmitOrBlurEvent)),this.telInput.removeEventListener("keyup",this._handleKeyupEvent),this.telInput.removeEventListener("cut",this._handleClipboardEvent),this.telInput.removeEventListener("paste",this._handleClipboardEvent),this.telInput.removeAttribute("data-intl-tel-input-id");var e=this.telInput.parentNode;e.parentNode.insertBefore(this.telInput,e),e.parentNode.removeChild(e),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}},{key:"getNumber",value:function(i){if(window.intlTelInputUtils){var t=this.selectedCountryData.iso2;return intlTelInputUtils.formatNumber(this._getFullNumber(),t,i)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.selectedCountryData}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var i=this.selectedCountryData.iso2;return intlTelInputUtils.getValidationError(this._getFullNumber(),i)}return-99}},{key:"isValidNumber",value:function(){var i=this._getFullNumber().trim();return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(i,this.selectedCountryData.iso2):null}},{key:"isPossibleNumber",value:function(){var i=this._getFullNumber().trim();return window.intlTelInputUtils?intlTelInputUtils.isPossibleNumber(i,this.selectedCountryData.iso2):null}},{key:"setCountry",value:function(i){var t=i.toLowerCase();this.selectedCountryData.iso2!==t&&(this._setFlag(t),this._updateDialCode(this.selectedCountryData.dialCode),this._triggerCountryChange())}},{key:"setNumber",value:function(i){var t=this._updateFlagFromNumber(i);this._updateValFromNumber(i),t&&this._triggerCountryChange()}},{key:"setPlaceholderNumberType",value:function(i){this.options.placeholderNumberType=i,this._updatePlaceholder()}}],r&&function(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,a(n.key),n)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e;var n,r}();r.getCountryData=function(){return t};var f=function(i,t,e){var n=document.createElement("script");n.onload=function(){c("handleUtils"),t&&t()},n.onerror=function(){c("rejectUtilsScriptPromise"),e&&e()},n.className="iti-load-utils",n.async=!0,n.src=i,document.body.appendChild(n)};return r.loadUtils=function(i){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise((function(t,e){return f(i,t,e)}));f(i)}return null},r.defaults=h,r.version="18.5.3",function(i,t){var e=new d(i,t);return e._init(),i.setAttribute("data-intl-tel-input-id",e.id),window.intlTelInputGlobals.instances[e.id]=e,e}}()},a.exports?a.exports=r():window.intlTelInput=r()),n=a.exports),h=t({__proto__:null,default:i(o)},[o]);export{h as i}
4
+ import{d as i}from"./p-BwsreBbG.js";function t(i,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(e){if("default"!==e&&!(e in i)){var s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:function(){return t[e]}})}}))})),Object.freeze(i)}var e,s,n,a={exports:{}};var r,o=n?s:(n=1,e||(e=1,r=function(i){return function(){for(var t=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua & Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia & Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","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","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros","km","269"],["Congo - Brazzaville","cg","242"],["Congo - Kinshasa","cd","243"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","id","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan","jo","962"],["Kazakhstan","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["North Macedonia","mk","389"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Réunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé & Príncipe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["St Barthélemy","bl","590",1],["St Helena","sh","290"],["St Kitts & Nevis","kn","1",18,["869"]],["St Lucia","lc","1",19,["758"]],["St Martin","mf","590",2],["St Pierre & Miquelon","pm","508"],["St Vincent & Grenadines","vc","1",20,["784"]],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard & Jan Mayen","sj","47",1,["79"]],["Sweden","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad & Tobago","tt","1",22,["868"]],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks & Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["US Virgin Islands","vi","1",24,["340"]],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis & Futuna","wf","681"],["Western Sahara","eh","212",1,["5288","5289"]],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],e=0;e<t.length;e++){var s=t[e];t[e]={name:s[0],iso2:s[1],dialCode:s[2],priority:s[3]||0,areaCodes:s[4]||null}}function n(i,t,e){return(t=a(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function a(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(e!==i){var s=e.call(t,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}var r={getInstance:function(i){var t=i.getAttribute("data-intl-tel-input-id");return window.intlTelInputGlobals.instances[t]},instances:{},documentReady:function(){return"complete"===document.readyState}};"object"==typeof window&&(window.intlTelInputGlobals=r);var o=0,h={allowDropdown:!0,autoInsertDialCode:!1,autoPlaceholder:"polite",countrySearch:!1,customContainer:"",customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!1,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:"",initialCountry:"",localizedCountries:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,showFlags:!0,useFullscreenPopup:"undefined"!=typeof navigator&&"undefined"!=typeof window&&(/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500),utilsScript:""},u=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],l=function(i,t){for(var e=Object.keys(i),s=0;s<e.length;s++)t(e[s],i[e[s]])},c=function(i){l(window.intlTelInputGlobals.instances,(function(t){window.intlTelInputGlobals.instances[t][i]()}))},d=function(){function e(i,t){var s=this;!function(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=o++,this.telInput=i,this.activeItem=null,this.highlightedItem=null;var n=t||{};this.options={},l(h,(function(i,t){s.options[i]=n.hasOwnProperty(i)?n[i]:t})),this.hadInitialPlaceholder=Boolean(i.getAttribute("placeholder"))}return s=e,r=[{key:"_init",value:function(){var i=this;if(this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!1),this.options.countrySearch&&!this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!0),this.options.nationalMode&&(this.options.autoInsertDialCode=!1),this.options.separateDialCode&&(this.options.autoInsertDialCode=!1),!this.options.showFlags&&this.options.allowDropdown&&!this.options.separateDialCode&&(this.options.showFlags=!0),this.options.useFullscreenPopup&&!this.options.dropdownContainer&&(this.options.dropdownContainer=document.body),this.isRTL=!!this.telInput.closest("[dir=rtl]"),"undefined"!=typeof Promise){var t=new Promise((function(t,e){i.resolveAutoCountryPromise=t,i.rejectAutoCountryPromise=e})),e=new Promise((function(t,e){i.resolveUtilsScriptPromise=t,i.rejectUtilsScriptPromise=e}));this.promise=Promise.all([t,e])}else this.resolveAutoCountryPromise=this.rejectAutoCountryPromise=function(){},this.resolveUtilsScriptPromise=this.rejectUtilsScriptPromise=function(){};this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}},{key:"_processCountryData",value:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries(),this.options.localizedCountries&&this._translateCountriesByLocale(),(this.options.onlyCountries.length||this.options.localizedCountries)&&this.countries.sort(this._countryNameSort)}},{key:"_addCountryCode",value:function(t,e,s){e.length>this.countryCodeMaxLen&&(this.countryCodeMaxLen=e.length),this.countryCodes.hasOwnProperty(e)||(this.countryCodes[e]=[]);for(var n=0;n<this.countryCodes[e].length;n++)if(this.countryCodes[e][n]===t)return;this.countryCodes[e][s!==i?s:this.countryCodes[e].length]=t}},{key:"_processAllCountries",value:function(){if(this.options.onlyCountries.length){var i=this.options.onlyCountries.map((function(i){return i.toLowerCase()}));this.countries=t.filter((function(t){return i.indexOf(t.iso2)>-1}))}else if(this.options.excludeCountries.length){var e=this.options.excludeCountries.map((function(i){return i.toLowerCase()}));this.countries=t.filter((function(i){return-1===e.indexOf(i.iso2)}))}else this.countries=t}},{key:"_translateCountriesByLocale",value:function(){for(var i=0;i<this.countries.length;i++){var t=this.countries[i].iso2.toLowerCase();this.options.localizedCountries.hasOwnProperty(t)&&(this.countries[i].name=this.options.localizedCountries[t])}}},{key:"_countryNameSort",value:function(i,t){return i.name<t.name?-1:i.name>t.name?1:0}},{key:"_processCountryCodes",value:function(){this.countryCodeMaxLen=0,this.dialCodes={},this.countryCodes={};for(var i=0;i<this.countries.length;i++){var t=this.countries[i];this.dialCodes[t.dialCode]||(this.dialCodes[t.dialCode]=!0),this._addCountryCode(t.iso2,t.dialCode,t.priority)}for(var e=0;e<this.countries.length;e++){var s=this.countries[e];if(s.areaCodes)for(var n=this.countryCodes[s.dialCode][0],a=0;a<s.areaCodes.length;a++){for(var r=s.areaCodes[a],o=1;o<r.length;o++){var h=s.dialCode+r.substr(0,o);this._addCountryCode(n,h),this._addCountryCode(s.iso2,h)}this._addCountryCode(s.iso2,s.dialCode+r)}}}},{key:"_processPreferredCountries",value:function(){this.preferredCountries=[];for(var i=0;i<this.options.preferredCountries.length;i++){var t=this.options.preferredCountries[i].toLowerCase(),e=this._getCountryData(t,!1,!0);e&&this.preferredCountries.push(e)}}},{key:"_createEl",value:function(i,t,e){var s=document.createElement(i);return t&&l(t,(function(i,t){return s.setAttribute(i,t)})),e&&e.appendChild(s),s}},{key:"_generateMarkup",value:function(){this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.form&&this.telInput.form.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","off");var i=this.options,t=i.allowDropdown,e=i.separateDialCode,s=i.showFlags,a=i.customContainer,r=i.hiddenInput,o=i.dropdownContainer,h=i.fixDropdownWidth,u=i.useFullscreenPopup,l=i.countrySearch,c="iti";t&&(c+=" iti--allow-dropdown"),e&&(c+=" iti--separate-dial-code"),s&&(c+=" iti--show-flags"),a&&(c+=" ".concat(a));var d=this._createEl("div",{class:c});this.telInput.parentNode.insertBefore(d,this.telInput);var f=t||s||e;if(f&&(this.flagsContainer=this._createEl("div",{class:"iti__flag-container"},d)),d.appendChild(this.telInput),f&&(this.selectedFlag=this._createEl("div",function(i){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?Object(arguments[t]):{},s=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&s.push.apply(s,Object.getOwnPropertySymbols(e).filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),s.forEach((function(t){n(i,t,e[t])}))}return i}({class:"iti__selected-flag"},t&&{role:"combobox","aria-haspopup":"listbox","aria-controls":"iti-".concat(this.id,"__country-listbox"),"aria-expanded":"false","aria-label":"Telephone country code"}),this.flagsContainer)),s&&(this.selectedFlagInner=this._createEl("div",{class:"iti__flag"},this.selectedFlag)),this.selectedFlag&&this.telInput.disabled&&this.selectedFlag.setAttribute("aria-disabled","true"),e&&(this.selectedDialCode=this._createEl("div",{class:"iti__selected-dial-code"},this.selectedFlag)),t)if(this.telInput.disabled||this.selectedFlag.setAttribute("tabindex","0"),this.dropdownArrow=this._createEl("div",{class:"iti__arrow"},this.selectedFlag),this.dropdownContent=this._createEl("div",{class:"iti__dropdown-content iti__hide ".concat(h?"":"iti--flexible-dropdown-width")}),l&&(this.searchInput=this._createEl("input",{type:"text",class:"iti__search-input",placeholder:"Search"},this.dropdownContent)),this.countryList=this._createEl("ul",{class:"iti__country-list",id:"iti-".concat(this.id,"__country-listbox"),role:"listbox","aria-label":"List of countries"},this.dropdownContent),this.preferredCountries.length&&!l&&(this._appendListItems(this.preferredCountries,"iti__preferred",!0),this._createEl("li",{class:"iti__divider","aria-hidden":"true"},this.countryList)),this._appendListItems(this.countries,"iti__standard"),o){var v="iti iti--container";u&&(v+=" iti--fullscreen-popup"),l&&(v+=" iti--country-search"),this.dropdown=this._createEl("div",{class:v}),this.dropdown.appendChild(this.dropdownContent)}else this.flagsContainer.appendChild(this.dropdownContent);if(r){var p=r,y=this.telInput.getAttribute("name");if(y){var m=y.lastIndexOf("[");-1!==m&&(p="".concat(y.substr(0,m),"[").concat(p,"]"))}this.hiddenInput=this._createEl("input",{type:"hidden",name:p}),d.appendChild(this.hiddenInput)}}},{key:"_appendListItems",value:function(i,t,e){for(var s=0;s<i.length;s++){var n=i[s],a=e?"-preferred":"",r=this._createEl("li",{id:"iti-".concat(this.id,"__item-").concat(n.iso2).concat(a),class:"iti__country ".concat(t),tabindex:"-1",role:"option","data-dial-code":n.dialCode,"data-country-code":n.iso2,"aria-selected":"false"},this.countryList);n.node=r;var o="";this.options.showFlags&&(o+="<div class='iti__flag-box'><div class='iti__flag iti__".concat(n.iso2,"'></div></div>")),o+="<span class='iti__country-name'>".concat(n.name,"</span>"),o+="<span class='iti__dial-code'>+".concat(n.dialCode,"</span>"),r.insertAdjacentHTML("beforeend",o)}}},{key:"_setInitialState",value:function(){var i=this.telInput.getAttribute("value"),t=this.telInput.value,e=!i||"+"!==i.charAt(0)||t&&"+"===t.charAt(0)?t:i,s=this._getDialCode(e),n=this._isRegionlessNanp(e),a=this.options,r=a.initialCountry,o=a.autoInsertDialCode;s&&!n?this._updateFlagFromNumber(e):"auto"!==r&&(r&&this._getCountryData(r,!1,!0)?this._setFlag(r.toLowerCase()):s&&n?this._setFlag("us"):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),!e&&o&&(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),e&&this._updateValFromNumber(e)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoInsertDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var i=this;this._handleHiddenInputSubmit=function(){i.hiddenInput.value=i.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var i=this.telInput;i&&"LABEL"!==i.tagName;)i=i.parentNode;return i}},{key:"_initDropdownListeners",value:function(){var i=this;this._handleLabelClick=function(t){i.dropdownContent.classList.contains("iti__hide")?i.telInput.focus():t.preventDefault()};var t=this._getClosestLabel();t&&t.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!i.dropdownContent.classList.contains("iti__hide")||i.telInput.disabled||i.telInput.readOnly||i._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(t){i.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),i._showDropdown()),"Tab"===t.key&&i._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var i=this;this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",(function(){window.intlTelInputGlobals.loadUtils(i.options.utilsScript)})):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((function(i){window.intlTelInputGlobals.autoCountry=i.toLowerCase(),setTimeout((function(){return c("handleAutoCountry")}))}),(function(){return c("rejectAutoCountryPromise")})))}},{key:"_initKeyListeners",value:function(){var i=this;this._handleKeyupEvent=function(){i._updateFlagFromNumber(i.telInput.value)&&i._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(i._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(i){var t=this.telInput.getAttribute("maxlength");return t&&i.length>t?i.substr(0,t):i}},{key:"_initBlurListeners",value:function(){var i=this;this._handleSubmitOrBlurEvent=function(){i._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var i=this._getNumeric(this.telInput.value);i&&this.selectedCountryData.dialCode!==i||(this.telInput.value="")}}},{key:"_getNumeric",value:function(i){return i.replace(/\D/g,"")}},{key:"_trigger",value:function(i){var t=document.createEvent("Event");t.initEvent(i,!0,!0),this.telInput.dispatchEvent(t)}},{key:"_showDropdown",value:function(){this.options.fixDropdownWidth&&(this.dropdownContent.style.width="".concat(this.telInput.offsetWidth,"px")),this.dropdownContent.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.options.countrySearch?(this._highlightListItem(this.countryList.firstElementChild,!1),this.searchInput.focus()):this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(i,t,e){e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)}},{key:"_setDropdownPosition",value:function(){var i=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){var t=this.telInput.getBoundingClientRect(),e=window.pageYOffset||document.documentElement.scrollTop,s=t.top+e,n=this.dropdownContent.offsetHeight,a=s+this.telInput.offsetHeight+n<e+window.innerHeight,r=!this.options.countrySearch&&!a&&s-n>e;this._toggleClass(this.dropdownContent,"iti__dropdown-content--dropup",r),this.options.dropdownContainer&&(this.dropdown.style.top="".concat(s+(r?0:this.telInput.offsetHeight),"px"),this.dropdown.style.left="".concat(t.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return i._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll))}}},{key:"_getClosestListItem",value:function(i){for(var t=i;t&&t!==this.countryList&&!t.classList.contains("iti__country");)t=t.parentNode;return t===this.countryList?null:t}},{key:"_bindDropdownListeners",value:function(){var i=this;this._handleMouseoverCountryList=function(t){var e=i._getClosestListItem(t.target);e&&i._highlightListItem(e,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(t){var e=i._getClosestListItem(t.target);e&&i._selectListItem(e)},this.countryList.addEventListener("click",this._handleClickCountryList);var t=!0;this._handleClickOffToClose=function(){t||i._closeDropdown(),t=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);var e="",s=null;if(this._handleKeydownOnDropdown=function(t){["ArrowUp","ArrowDown","Enter","Escape"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),"ArrowUp"===t.key||"ArrowDown"===t.key?i._handleUpDownKey(t.key):"Enter"===t.key?i._handleEnterKey():"Escape"===t.key&&i._closeDropdown()),!i.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(t.key)&&(t.stopPropagation(),s&&clearTimeout(s),e+=t.key.toLowerCase(),i._searchForCountry(e),s=setTimeout((function(){e=""}),1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch){var n=null;this._handleSearchChange=function(){n&&clearTimeout(n),n=setTimeout((function(){var t;(t=i.searchInput.value.trim())?i._filterCountries(t.toLowerCase()):i._filterCountries(null,!0),n=null}),100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",(function(i){return i.stopPropagation()}))}}},{key:"_filterCountries",value:function(t){var e=arguments.length>1&&arguments[1]!==i&&arguments[1],s=!0;this.countryList.innerHTML="";for(var n=0;n<this.countries.length;n++){var a=this.countries[n],r=a.name.toLowerCase(),o="+".concat(a.dialCode);(e||r.includes(t)||o.includes(t))&&(this.countryList.appendChild(a.node),s&&(this._highlightListItem(a.node,!1),s=!1))}}},{key:"_handleUpDownKey",value:function(i){var t="ArrowUp"===i?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;t?t.classList.contains("iti__divider")&&(t="ArrowUp"===i?t.previousElementSibling:t.nextElementSibling):this.countryList.childElementCount>1&&(t="ArrowUp"===i?this.countryList.lastElementChild:this.countryList.firstElementChild),t&&(this._highlightListItem(t,!this.options.countrySearch),this.options.countrySearch&&this._scrollTo(t,!1))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(i){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,i)){var e=this.countries[t].node;this._highlightListItem(e,!1),this._scrollTo(e,!0);break}}},{key:"_startsWith",value:function(i,t){return i.substr(0,t.length).toLowerCase()===t}},{key:"_updateValFromNumber",value:function(i){var t=i;if(this.options.formatOnDisplay&&window.intlTelInputUtils&&this.selectedCountryData){var e=this.options.nationalMode||"+"!==t.charAt(0)&&!this.options.separateDialCode,s=intlTelInputUtils.numberFormat;t=intlTelInputUtils.formatNumber(t,this.selectedCountryData.iso2,e?s.NATIONAL:s.INTERNATIONAL)}t=this._beforeSetNumber(t),this.telInput.value=t}},{key:"_updateFlagFromNumber",value:function(i){var t=i.indexOf("+"),e=t?i.substring(t):i,s=this.selectedCountryData.dialCode;e&&"1"===s&&"+"!==e.charAt(0)&&("1"!==e.charAt(0)&&(e="1".concat(e)),e="+".concat(e)),this.options.separateDialCode&&s&&"+"!==e.charAt(0)&&(e="+".concat(s).concat(e));var n=this._getDialCode(e,!0),a=this._getNumeric(e),r=null;if(n){var o=this.countryCodes[this._getNumeric(n)],h=-1!==o.indexOf(this.selectedCountryData.iso2)&&a.length<=n.length-1;if(!("1"===s&&this._isRegionlessNanp(a)||h))for(var u=0;u<o.length;u++)if(o[u]){r=o[u];break}}else"+"===e.charAt(0)&&a.length?r="":e&&"+"!==e||(r=this.defaultCountry);return null!==r&&this._setFlag(r)}},{key:"_isRegionlessNanp",value:function(i){var t=this._getNumeric(i);if("1"===t.charAt(0)){var e=t.substr(1,3);return-1!==u.indexOf(e)}return!1}},{key:"_highlightListItem",value:function(i,t){var e=this.highlightedItem;e&&e.classList.remove("iti__highlight"),this.highlightedItem=i,this.highlightedItem.classList.add("iti__highlight"),this.selectedFlag.setAttribute("aria-activedescendant",i.getAttribute("id")),t&&this.highlightedItem.focus()}},{key:"_getCountryData",value:function(i,e,s){for(var n=e?t:this.countries,a=0;a<n.length;a++)if(n[a].iso2===i)return n[a];if(s)return null;throw new Error("No country data for '".concat(i,"'"))}},{key:"_setFlag",value:function(i){var t=this.options,e=t.allowDropdown,s=t.separateDialCode,n=t.showFlags,a=this.selectedCountryData.iso2?this.selectedCountryData:{};if(this.selectedCountryData=i?this._getCountryData(i,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),n&&this.selectedFlagInner.setAttribute("class","iti__flag iti__".concat(i)),this._setSelectedCountryFlagTitleAttribute(i,s),s){var r=this.selectedCountryData.dialCode?"+".concat(this.selectedCountryData.dialCode):"";this.selectedDialCode.innerHTML=r;var o=this.selectedFlag.offsetWidth||this._getHiddenSelectedFlagWidth();this.isRTL?this.telInput.style.paddingRight="".concat(o+6,"px"):this.telInput.style.paddingLeft="".concat(o+6,"px")}if(this._updatePlaceholder(),e){var h=this.activeItem;if(h&&(h.classList.remove("iti__active"),h.setAttribute("aria-selected","false")),i){var u=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(i,"-preferred"))||this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(i));u.setAttribute("aria-selected","true"),u.classList.add("iti__active"),this.activeItem=u}}return a.iso2!==i}},{key:"_setSelectedCountryFlagTitleAttribute",value:function(i,t){var e;this.selectedFlag&&(e=i&&!t?"".concat(this.selectedCountryData.name,": +").concat(this.selectedCountryData.dialCode):i?this.selectedCountryData.name:"Unknown",this.selectedFlag.setAttribute("title",e))}},{key:"_getHiddenSelectedFlagWidth",value:function(){var i=this.telInput.parentNode.cloneNode();i.style.visibility="hidden",document.body.appendChild(i);var t=this.flagsContainer.cloneNode();i.appendChild(t);var e=this.selectedFlag.cloneNode(!0);t.appendChild(e);var s=e.offsetWidth;return i.parentNode.removeChild(i),s}},{key:"_updatePlaceholder",value:function(){if(window.intlTelInputUtils&&("aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&"polite"===this.options.autoPlaceholder)){var i=intlTelInputUtils.numberType[this.options.placeholderNumberType],t=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,i):"";t=this._beforeSetNumber(t),"function"==typeof this.options.customPlaceholder&&(t=this.options.customPlaceholder(t,this.selectedCountryData)),this.telInput.setAttribute("placeholder",t)}}},{key:"_selectListItem",value:function(i){var t=this._setFlag(i.getAttribute("data-country-code"));this._closeDropdown(),this._updateDialCode(i.getAttribute("data-dial-code")),this.telInput.focus();var e=this.telInput.value.length;this.telInput.setSelectionRange(e,e),t&&this._triggerCountryChange()}},{key:"_closeDropdown",value:function(){this.dropdownContent.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.selectedFlag.removeAttribute("aria-activedescendant"),this.dropdownArrow.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch&&this.searchInput.removeEventListener("input",this._handleSearchChange),document.documentElement.removeEventListener("click",this._handleClickOffToClose),this.countryList.removeEventListener("mouseover",this._handleMouseoverCountryList),this.countryList.removeEventListener("click",this._handleClickCountryList),this.options.dropdownContainer&&(this.options.useFullscreenPopup||window.removeEventListener("scroll",this._handleWindowScroll),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._trigger("close:countrydropdown")}},{key:"_scrollTo",value:function(i,t){var e=this.dropdownContent,s=window.pageYOffset||document.documentElement.scrollTop,n=e.offsetHeight,a=e.getBoundingClientRect().top+s,r=a+n,o=i.offsetHeight,h=i.getBoundingClientRect().top+s,u=h+o,l=h-a+e.scrollTop,c=n/2-o/2;h<a?(t&&(l-=c),e.scrollTop=l):u>r&&(t&&(l+=c),e.scrollTop=l-(n-o))}},{key:"_updateDialCode",value:function(i){var t,e=this.telInput.value,s="+".concat(i);if("+"===e.charAt(0)){var n=this._getDialCode(e);t=n?e.replace(n,s):s,this.telInput.value=t}else this.options.autoInsertDialCode&&(this.telInput.value=t=e?s+e:s)}},{key:"_getDialCode",value:function(i,t){var e="";if("+"===i.charAt(0))for(var s="",n=0;n<i.length;n++){var a=i.charAt(n);if(!isNaN(parseInt(a,10))){if(s+=a,t)this.countryCodes[s]&&(e=i.substr(0,n+1));else if(this.dialCodes[s]){e=i.substr(0,n+1);break}if(s.length===this.countryCodeMaxLen)break}}return e}},{key:"_getFullNumber",value:function(){var i=this.telInput.value.trim(),t=this.selectedCountryData.dialCode,e=this._getNumeric(i);return(this.options.separateDialCode&&"+"!==i.charAt(0)&&t&&e?"+".concat(t):"")+i}},{key:"_beforeSetNumber",value:function(i){var t=i;if(this.options.separateDialCode){var e=this._getDialCode(t);e&&(e="+".concat(this.selectedCountryData.dialCode),t=t.substr(" "===t[e.length]||"-"===t[e.length]?e.length+1:e.length))}return this._cap(t)}},{key:"_triggerCountryChange",value:function(){this._trigger("countrychange")}},{key:"handleAutoCountry",value:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=window.intlTelInputGlobals.autoCountry,this.telInput.value||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this._updatePlaceholder()),this.resolveUtilsScriptPromise()}},{key:"destroy",value:function(){var i=this.telInput.form;if(this.options.allowDropdown){this._closeDropdown(),this.selectedFlag.removeEventListener("click",this._handleClickSelectedFlag),this.flagsContainer.removeEventListener("keydown",this._handleFlagsContainerKeydown);var t=this._getClosestLabel();t&&t.removeEventListener("click",this._handleLabelClick)}this.hiddenInput&&i&&i.removeEventListener("submit",this._handleHiddenInputSubmit),this.options.autoInsertDialCode&&(i&&i.removeEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.removeEventListener("blur",this._handleSubmitOrBlurEvent)),this.telInput.removeEventListener("keyup",this._handleKeyupEvent),this.telInput.removeEventListener("cut",this._handleClipboardEvent),this.telInput.removeEventListener("paste",this._handleClipboardEvent),this.telInput.removeAttribute("data-intl-tel-input-id");var e=this.telInput.parentNode;e.parentNode.insertBefore(this.telInput,e),e.parentNode.removeChild(e),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}},{key:"getNumber",value:function(i){if(window.intlTelInputUtils){var t=this.selectedCountryData.iso2;return intlTelInputUtils.formatNumber(this._getFullNumber(),t,i)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.selectedCountryData}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var i=this.selectedCountryData.iso2;return intlTelInputUtils.getValidationError(this._getFullNumber(),i)}return-99}},{key:"isValidNumber",value:function(){var i=this._getFullNumber().trim();return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(i,this.selectedCountryData.iso2):null}},{key:"isPossibleNumber",value:function(){var i=this._getFullNumber().trim();return window.intlTelInputUtils?intlTelInputUtils.isPossibleNumber(i,this.selectedCountryData.iso2):null}},{key:"setCountry",value:function(i){var t=i.toLowerCase();this.selectedCountryData.iso2!==t&&(this._setFlag(t),this._updateDialCode(this.selectedCountryData.dialCode),this._triggerCountryChange())}},{key:"setNumber",value:function(i){var t=this._updateFlagFromNumber(i);this._updateValFromNumber(i),t&&this._triggerCountryChange()}},{key:"setPlaceholderNumberType",value:function(i){this.options.placeholderNumberType=i,this._updatePlaceholder()}}],r&&function(i,t){for(var e=0;e<t.length;e++){var s=t[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(i,a(s.key),s)}}(s.prototype,r),Object.defineProperty(s,"prototype",{writable:!1}),e;var s,r}();r.getCountryData=function(){return t};var f=function(i,t,e){var s=document.createElement("script");s.onload=function(){c("handleUtils"),t&&t()},s.onerror=function(){c("rejectUtilsScriptPromise"),e&&e()},s.className="iti-load-utils",s.async=!0,s.src=i,document.body.appendChild(s)};return r.loadUtils=function(i){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise((function(t,e){return f(i,t,e)}));f(i)}return null},r.defaults=h,r.version="18.5.3",function(i,t){var e=new d(i,t);return e._init(),i.setAttribute("data-intl-tel-input-id",e.id),window.intlTelInputGlobals.instances[e.id]=e,e}}()},a.exports?a.exports=r():window.intlTelInput=r()),s=a.exports),h=t({__proto__:null,default:i(o)},[o]);export{h as i}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as a,h as l,a as s}from"./p-C9LfegwO.js";const i=class{constructor(l){a(this,l),this.languageNames={ar:"العربية",en:"English",sq:"shqip",hy:"հայերէն",bg:"български",zh:"汉语",hr:"hrvatski",cs:"čeština",da:"dansk",nl:"dutch",et:"eesti keel",fi:"suomen kieli",fr:"Français",de:"Deutsch",el:"Ελληνικά",hi:"हिन्दी",hu:"magyar",ind:"bahasa Indonesia",ga:"Gaeilge",it:"Italiano",ja:"日本語",ko:"한국어",lv:"latviešu",mt:"Maltese",fa:"فارسی",pl:"Polish",pt:"português",ro:"română",ru:"русский",sl:"slovenščina",es:"Español",sv:"svenska",tl:"Tagalog (Filipino)",tr:"Türkçe",uk:"украї́нська",ur:"اُردُو",ms:"Bahasa Malaysia"},this.currenciesList={SAR:{en:"Saudi Riyal",ar:"ريال سعودي",symbol:"ر.س"},USD:{en:"US Dollar",ar:"دولار أمريكي",symbol:"$"},EUR:{en:"Euro",ar:"يورو",symbol:"€"},AED:{en:"UAE Dirham",ar:"درهم اماراتي",symbol:"د.إ"},KWD:{en:"Kuwaiti Dinar",ar:"دينار كويتي",symbol:"د.ك"},BHD:{en:"Bahraini Dinar",ar:"دينار بحريني",symbol:"د.ب"},QAR:{en:"Qatari Riyal",ar:"ريال قطري",symbol:"ر.ق"},OMR:{en:"Omani Rial",ar:"ريال عماني",symbol:"ر.ع"},AUD:{en:"Australian Dollar",ar:"دولار استرالي",symbol:"$"},CAD:{en:"Canadian Dollar",ar:"دولار كندي",symbol:"$"},CNY:{en:"Renminbi",ar:"رنمينبي",symbol:"¥"},EGP:{en:"Egyptian Pound",ar:"جنيه مصري",symbol:"ج.م"},GBP:{en:"Pound Sterling",ar:"جنيه استرليني",symbol:"£"},IDR:{en:"Indonesian Rupiah",ar:"روبية إندونيسية",symbol:"Rp"},INR:{en:"Indian Rupee",ar:"روبية هندية",symbol:"₹"},JPY:{en:"Japanese Yen",ar:"ين ياباني",symbol:"¥"},MYR:{en:"Malaysian Ringgit",ar:"رينغيت ماليزي",symbol:"RM"},PKR:{en:"Pakistani Rupee",ar:"روبية باكستانية",symbol:"Rs."},SEK:{en:"Swedish Krona",ar:"كرونة سويدية",symbol:"kr"},SGD:{en:"Singapore Dollar",ar:"دولار سنغافوري",symbol:"$"},TRY:{en:"Turkish Lira",ar:"ليرة تركية",symbol:"₺"},IQD:{en:"Iraqi Dinar",ar:"دينار عراقي",symbol:"د.ع"},LBP:{en:"Lebanese Pound",ar:"ليرة لبنانية",symbol:"ل.ل"},MRO:{en:"Mauritanian Ouguiya",ar:"أوقية موريتانية",symbol:"UM"},SDG:{en:"Sudanese Pound",ar:"جنيه سوداني",symbol:"SDG"},SYP:{en:"Syrian Pound",ar:"ليرة سورية",symbol:"ل.س"},TND:{en:"Tunisian Dinar",ar:"دينار تونسي",symbol:"د.ت"},JOD:{en:"Jordanian Dinar",ar:"دينار أردني",symbol:"JOD"},DZD:{en:"Algerian Dinar",ar:"دينار جزائري",symbol:"دج"},MAD:{en:"Moroccan Dirham",ar:"درهم مغربي",symbol:"د.م."},LYD:{en:"Libyan Dinar",ar:"دينار ليبي",symbol:"LD"},YER:{en:"Yemeni Riyal",ar:"ريال يمني",symbol:"ر.ي"}},this.arabicCurrencies=["SAR","AED","KWD","BHD","QAR","OMR","EGP","IQD","LBP","SYP","TND","DZD","MAD","YER"],this.languages=[],this.currencies=[],this.hasError=!1,this.showTrigger=!1,this.languageSlot=this.host.querySelector('[slot="language"]')?.innerHTML||'<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>',this.currencySlot=this.host.querySelector('[slot="currency"]')?.innerHTML||'<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{symbol}</small></label>'}async componentWillLoad(){await Salla.onReady(),await Salla.lang.onLoaded(),Salla.event.on("localization::open",(()=>this.open())),this.language||(this.language=Salla.config.get("user.language_code")),this.currency||(this.currency=Salla.config.get("user.currency_code"))}async open(){return this.modal.open(),await Salla.api.withoutNotifier((()=>this.getLanguages())).then((()=>this.getCurrencies())).then((()=>{this.languages.length<2&&this.currencies.length<2&&this.modal.close()})).catch((a=>{console.log(a),this.hasError=!0,this.errorMessage=a.response?.data?.error?.message||a.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}getCurrency(a){return this.currenciesList[a||this.currency]||{en:"Saudi Riyal",ar:"ريال سعودي",symbol:"ر.س"}}getLanguageName(){return this.languageNames[this.language]||this.language||""}getCurrencySymbol(a){return"SAR"===(a=a||this.currency)?'<i class="sicon-sar"></i>':"ar"!==this.language&&this.arabicCurrencies.includes(a)?a:this.getCurrency(a).symbol}getCurrencyName(a){return"ar"===this.language?this.getCurrency(a).ar:this.getCurrency(a).en}async getLanguages(){return this.languages.length>1?null:await Salla.config.languages().then((a=>this.languages=a))}async getCurrencies(){return this.currencies.length>1?null:await Salla.config.currencies().then((a=>this.currencies=Object.values(a||{})))}onChangeCurrency(a){this.currency=a.target.value}onChangeLanguage(a){this.language=a.target.value}async submit(){let a;this.btn.load().then((()=>{if(this.currency){if(this.currency!==Salla.config.get("user.currency_code","SAR"))return a=window.location.href,Salla.currency.api.change(this.currency)}else Salla.log("There is no currency!")})).then((()=>{this.language!==Salla.config.get("user.language_code","ar")&&(a=Salla.helpers.addParamToUrl("lang",this.language))})).then((()=>{Salla.cookie.set("s-lang",this.language),Salla.cookie.set("s-curr",this.currency)})).then((()=>this.btn.stop())).then((()=>this.close())).then((()=>{a&&(window.location.href=a.replace(`/${Salla.config.get("user.language_code")}/`,`/${this.language}/`))}))}render(){return[this.showTrigger?l("button",{type:"button",onClick:()=>this.open(),class:"s-localization-modal-trigger-btn"},l("span",null,this.getLanguageName()),l("span",{class:"s-localization-modal-trigger-separator"},"|")," ",l("span",{innerHTML:this.getCurrencySymbol()})):"",l("salla-modal",{key:"13b805dc33b57d433d4c35ad8217adef60b99ad5",isLoading:!0,class:"s-hidden",ref:a=>this.modal=a,width:"xs"},l("div",{key:"b30239d0a20d15baccb6a5017493d91ae96c350c",slot:"loading"},l("div",{key:"94f7df4044f94612413f4818b110abae3c251075",class:"s-localization-modal-skeleton"},l("salla-skeleton",{key:"63008e2fd90cfa4ce9ddbf313ffe718c520853ce",width:"25%",height:"15px"}),l("div",{key:"97f64f98e99c3cc2f099fa02469a2000c7eefc4c",class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>l("div",{class:"s-localization-modal-skeleton-item"},l("div",{class:"s-localization-modal-skeleton-item-flex"},l("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),l("salla-skeleton",{height:"10px",width:"100px"})),l("salla-skeleton",{height:"15px",width:"20px"}))))),l("salla-skeleton",{key:"230480a6cfaddab7fbe70a16041cf5fb8903c64a",width:"25%",height:"15px"}),l("div",{key:"caf3e79cdbd04d5374365173212792abfe3d465b",class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>l("div",{class:"s-localization-modal-skeleton-item"},l("div",{class:"s-localization-modal-skeleton-item-flex"},l("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),l("salla-skeleton",{height:"10px",width:"100px"})),l("salla-skeleton",{height:"15px",width:"20px"}))))),l("salla-skeleton",{key:"b48d02c6e7febad77dbd0d37e540d02d26265e8b",height:"40px",width:"100%"}))),this.hasError?l("salla-placeholder",{alignment:"center"},l("span",{slot:"description"},this.errorMessage)):l("div",{class:"s-localization-modal-inner"},this.languages.length>1?l("div",{class:"s-localization-modal-section"},l("label",{class:"s-localization-modal-title"},Salla.lang.get("common.titles.language")),l("div",{class:"s-localization-modal-section-inner"},this.languages.length<6?this.languages.map((a=>l("div",{class:"s-localization-modal-item"},l("input",{class:"s-localization-modal-input",type:"radio",checked:this.language==a.iso_code,onChange:()=>this.language=a.iso_code,name:"language",id:"lang-"+a.code.toLowerCase(),value:a.code}),l("div",{class:"s-localization-modal-label-slot",id:"language-slot",innerHTML:this.languageSlot.replace(/\{name\}/g,a.name).replace(/\{code\}/g,a.code).replace(/\{country_code\}/g,a.country_code)})))):l("select",{class:"s-localization-modal-select",name:"language",onChange:a=>this.onChangeLanguage(a)},this.languages.map((a=>l("option",{value:a.code,selected:this.language==a.code},a.name)))))):"",this.currencies.length>1?l("div",{class:"s-localization-modal-section"},l("label",{class:"s-localization-modal-title"},Salla.lang.get("common.titles.currency")),l("div",{class:"s-localization-modal-section-inner"},this.currencies.length<6?this.currencies.map((a=>l("div",{class:"s-localization-modal-item"},l("input",{class:"s-localization-modal-input",type:"radio",name:"currency",checked:this.currency==a.code,onChange:()=>this.currency=a.code,id:"currency-"+a.code,value:a.code}),l("div",{class:"s-localization-modal-label-slot",id:"currency-slot",innerHTML:this.currencySlot.replace(/\{name\}/g,this.getCurrencyName(a.code)).replace(/\{code\}/g,a.code).replace(/\{symbol\}/g,this.getCurrencySymbol(a.code)).replace(/\{country_code\}/g,a.country_code)})))):l("select",{class:"s-localization-modal-select",name:"currency",onChange:a=>this.onChangeCurrency(a)},this.currencies.map((a=>l("option",{value:a.code,selected:this.currency==a.code},a.name)))))):"",l("salla-button",{width:"wide",ref:a=>this.btn=a,onClick:()=>this.submit()},Salla.lang.get("common.elements.ok"))))]}componentDidRender(){this.host.querySelectorAll("#currency-slot").forEach((a=>a.replaceWith(a.firstChild))),this.host.querySelectorAll("#language-slot").forEach((a=>a.replaceWith(a.firstChild)))}get host(){return s(this)}};export{i as salla_localization_modal}
4
+ import{r as a,h as l,a as s}from"./p-BwsreBbG.js";const i=class{constructor(l){a(this,l),this.languageNames={ar:"العربية",en:"English",sq:"shqip",hy:"հայերէն",bg:"български",zh:"汉语",hr:"hrvatski",cs:"čeština",da:"dansk",nl:"dutch",et:"eesti keel",fi:"suomen kieli",fr:"Français",de:"Deutsch",el:"Ελληνικά",hi:"हिन्दी",hu:"magyar",ind:"bahasa Indonesia",ga:"Gaeilge",it:"Italiano",ja:"日本語",ko:"한국어",lv:"latviešu",mt:"Maltese",fa:"فارسی",pl:"Polish",pt:"português",ro:"română",ru:"русский",sl:"slovenščina",es:"Español",sv:"svenska",tl:"Tagalog (Filipino)",tr:"Türkçe",uk:"украї́нська",ur:"اُردُو",ms:"Bahasa Malaysia"},this.currenciesList={SAR:{en:"Saudi Riyal",ar:"ريال سعودي",symbol:"ر.س"},USD:{en:"US Dollar",ar:"دولار أمريكي",symbol:"$"},EUR:{en:"Euro",ar:"يورو",symbol:"€"},AED:{en:"UAE Dirham",ar:"درهم اماراتي",symbol:"د.إ"},KWD:{en:"Kuwaiti Dinar",ar:"دينار كويتي",symbol:"د.ك"},BHD:{en:"Bahraini Dinar",ar:"دينار بحريني",symbol:"د.ب"},QAR:{en:"Qatari Riyal",ar:"ريال قطري",symbol:"ر.ق"},OMR:{en:"Omani Rial",ar:"ريال عماني",symbol:"ر.ع"},AUD:{en:"Australian Dollar",ar:"دولار استرالي",symbol:"$"},CAD:{en:"Canadian Dollar",ar:"دولار كندي",symbol:"$"},CNY:{en:"Renminbi",ar:"رنمينبي",symbol:"¥"},EGP:{en:"Egyptian Pound",ar:"جنيه مصري",symbol:"ج.م"},GBP:{en:"Pound Sterling",ar:"جنيه استرليني",symbol:"£"},IDR:{en:"Indonesian Rupiah",ar:"روبية إندونيسية",symbol:"Rp"},INR:{en:"Indian Rupee",ar:"روبية هندية",symbol:"₹"},JPY:{en:"Japanese Yen",ar:"ين ياباني",symbol:"¥"},MYR:{en:"Malaysian Ringgit",ar:"رينغيت ماليزي",symbol:"RM"},PKR:{en:"Pakistani Rupee",ar:"روبية باكستانية",symbol:"Rs."},SEK:{en:"Swedish Krona",ar:"كرونة سويدية",symbol:"kr"},SGD:{en:"Singapore Dollar",ar:"دولار سنغافوري",symbol:"$"},TRY:{en:"Turkish Lira",ar:"ليرة تركية",symbol:"₺"},IQD:{en:"Iraqi Dinar",ar:"دينار عراقي",symbol:"د.ع"},LBP:{en:"Lebanese Pound",ar:"ليرة لبنانية",symbol:"ل.ل"},MRO:{en:"Mauritanian Ouguiya",ar:"أوقية موريتانية",symbol:"UM"},SDG:{en:"Sudanese Pound",ar:"جنيه سوداني",symbol:"SDG"},SYP:{en:"Syrian Pound",ar:"ليرة سورية",symbol:"ل.س"},TND:{en:"Tunisian Dinar",ar:"دينار تونسي",symbol:"د.ت"},JOD:{en:"Jordanian Dinar",ar:"دينار أردني",symbol:"JOD"},DZD:{en:"Algerian Dinar",ar:"دينار جزائري",symbol:"دج"},MAD:{en:"Moroccan Dirham",ar:"درهم مغربي",symbol:"د.م."},LYD:{en:"Libyan Dinar",ar:"دينار ليبي",symbol:"LD"},YER:{en:"Yemeni Riyal",ar:"ريال يمني",symbol:"ر.ي"}},this.arabicCurrencies=["SAR","AED","KWD","BHD","QAR","OMR","EGP","IQD","LBP","SYP","TND","DZD","MAD","YER"],this.languages=[],this.currencies=[],this.hasError=!1,this.showTrigger=!1,this.languageSlot=this.host.querySelector('[slot="language"]')?.innerHTML||'<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>',this.currencySlot=this.host.querySelector('[slot="currency"]')?.innerHTML||'<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{symbol}</small></label>'}async componentWillLoad(){await Salla.onReady(),await Salla.lang.onLoaded(),Salla.event.on("localization::open",(()=>this.open())),this.language||(this.language=Salla.config.get("user.language_code")),this.currency||(this.currency=Salla.config.get("user.currency_code"))}async open(){return this.modal.open(),await Salla.api.withoutNotifier((()=>this.getLanguages())).then((()=>this.getCurrencies())).then((()=>{this.languages.length<2&&this.currencies.length<2&&this.modal.close()})).catch((a=>{console.log(a),this.hasError=!0,this.errorMessage=a.response?.data?.error?.message||a.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}getCurrency(a){return this.currenciesList[a||this.currency]||{en:"Saudi Riyal",ar:"ريال سعودي",symbol:"ر.س"}}getLanguageName(){return this.languageNames[this.language]||this.language||""}getCurrencySymbol(a){return"SAR"===(a=a||this.currency)?'<i class="sicon-sar"></i>':"ar"!==this.language&&this.arabicCurrencies.includes(a)?a:this.getCurrency(a).symbol}getCurrencyName(a){return"ar"===this.language?this.getCurrency(a).ar:this.getCurrency(a).en}async getLanguages(){return this.languages.length>1?null:await Salla.config.languages().then((a=>this.languages=a))}async getCurrencies(){return this.currencies.length>1?null:await Salla.config.currencies().then((a=>this.currencies=Object.values(a||{})))}onChangeCurrency(a){this.currency=a.target.value}onChangeLanguage(a){this.language=a.target.value}async submit(){let a;this.btn.load().then((()=>{if(this.currency){if(this.currency!==Salla.config.get("user.currency_code","SAR"))return a=window.location.href,Salla.currency.api.change(this.currency)}else Salla.log("There is no currency!")})).then((()=>{this.language!==Salla.config.get("user.language_code","ar")&&(a=Salla.helpers.addParamToUrl("lang",this.language))})).then((()=>{Salla.cookie.set("s-lang",this.language),Salla.cookie.set("s-curr",this.currency)})).then((()=>this.btn.stop())).then((()=>this.close())).then((()=>{a&&(window.location.href=a.replace(`/${Salla.config.get("user.language_code")}/`,`/${this.language}/`))}))}render(){return[this.showTrigger?l("button",{type:"button",onClick:()=>this.open(),class:"s-localization-modal-trigger-btn"},l("span",null,this.getLanguageName()),l("span",{class:"s-localization-modal-trigger-separator"},"|")," ",l("span",{innerHTML:this.getCurrencySymbol()})):"",l("salla-modal",{key:"13b805dc33b57d433d4c35ad8217adef60b99ad5",isLoading:!0,class:"s-hidden",ref:a=>this.modal=a,width:"xs"},l("div",{key:"b30239d0a20d15baccb6a5017493d91ae96c350c",slot:"loading"},l("div",{key:"94f7df4044f94612413f4818b110abae3c251075",class:"s-localization-modal-skeleton"},l("salla-skeleton",{key:"63008e2fd90cfa4ce9ddbf313ffe718c520853ce",width:"25%",height:"15px"}),l("div",{key:"97f64f98e99c3cc2f099fa02469a2000c7eefc4c",class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>l("div",{class:"s-localization-modal-skeleton-item"},l("div",{class:"s-localization-modal-skeleton-item-flex"},l("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),l("salla-skeleton",{height:"10px",width:"100px"})),l("salla-skeleton",{height:"15px",width:"20px"}))))),l("salla-skeleton",{key:"230480a6cfaddab7fbe70a16041cf5fb8903c64a",width:"25%",height:"15px"}),l("div",{key:"caf3e79cdbd04d5374365173212792abfe3d465b",class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>l("div",{class:"s-localization-modal-skeleton-item"},l("div",{class:"s-localization-modal-skeleton-item-flex"},l("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),l("salla-skeleton",{height:"10px",width:"100px"})),l("salla-skeleton",{height:"15px",width:"20px"}))))),l("salla-skeleton",{key:"b48d02c6e7febad77dbd0d37e540d02d26265e8b",height:"40px",width:"100%"}))),this.hasError?l("salla-placeholder",{alignment:"center"},l("span",{slot:"description"},this.errorMessage)):l("div",{class:"s-localization-modal-inner"},this.languages.length>1?l("div",{class:"s-localization-modal-section"},l("label",{class:"s-localization-modal-title"},Salla.lang.get("common.titles.language")),l("div",{class:"s-localization-modal-section-inner"},this.languages.length<6?this.languages.map((a=>l("div",{class:"s-localization-modal-item"},l("input",{class:"s-localization-modal-input",type:"radio",checked:this.language==a.iso_code,onChange:()=>this.language=a.iso_code,name:"language",id:"lang-"+a.code.toLowerCase(),value:a.code}),l("div",{class:"s-localization-modal-label-slot",id:"language-slot",innerHTML:this.languageSlot.replace(/\{name\}/g,a.name).replace(/\{code\}/g,a.code).replace(/\{country_code\}/g,a.country_code)})))):l("select",{class:"s-localization-modal-select",name:"language",onChange:a=>this.onChangeLanguage(a)},this.languages.map((a=>l("option",{value:a.code,selected:this.language==a.code},a.name)))))):"",this.currencies.length>1?l("div",{class:"s-localization-modal-section"},l("label",{class:"s-localization-modal-title"},Salla.lang.get("common.titles.currency")),l("div",{class:"s-localization-modal-section-inner"},this.currencies.length<6?this.currencies.map((a=>l("div",{class:"s-localization-modal-item"},l("input",{class:"s-localization-modal-input",type:"radio",name:"currency",checked:this.currency==a.code,onChange:()=>this.currency=a.code,id:"currency-"+a.code,value:a.code}),l("div",{class:"s-localization-modal-label-slot",id:"currency-slot",innerHTML:this.currencySlot.replace(/\{name\}/g,this.getCurrencyName(a.code)).replace(/\{code\}/g,a.code).replace(/\{symbol\}/g,this.getCurrencySymbol(a.code)).replace(/\{country_code\}/g,a.country_code)})))):l("select",{class:"s-localization-modal-select",name:"currency",onChange:a=>this.onChangeCurrency(a)},this.currencies.map((a=>l("option",{value:a.code,selected:this.currency==a.code},a.name)))))):"",l("salla-button",{width:"wide",ref:a=>this.btn=a,onClick:()=>this.submit()},Salla.lang.get("common.elements.ok"))))]}componentDidRender(){this.host.querySelectorAll("#currency-slot").forEach((a=>a.replaceWith(a.firstChild))),this.host.querySelectorAll("#language-slot").forEach((a=>a.replaceWith(a.firstChild)))}get host(){return s(this)}};export{i as salla_localization_modal}