@salla.sa/twilight-components 2.14.573 → 2.14.574

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 (372) hide show
  1. package/dist/cjs/{Helper-N5wrs9vm.js → Helper-8U7zlpC3.js} +171 -117
  2. package/dist/cjs/{filepond-B2iMbV1F.js → filepond-BqzmHqFG.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-rXYiM_Ob.js → filepond-plugin-file-poster-Rc_hYm4g.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-BF5dedmz.js → filepond-plugin-file-validate-size-MQOyXwCH.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-DJHYRny2.js → filepond-plugin-file-validate-type-0_gq-gig.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-BgtH5f4u.js → filepond-plugin-image-edit-DjWvYOF_.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-C9JH8EBn.js → filepond-plugin-image-exif-orientation-BGNpJuyh.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CpSCiqfj.js → filepond-plugin-image-preview-BoPR2rRr.js} +1 -1
  9. package/dist/cjs/heart-ClVn_Co8.js +13 -0
  10. package/dist/cjs/{index-DpXwHFVO.js → index-BGm5j5Zj.js} +14 -10
  11. package/dist/cjs/index-CIbBkRPw.js +4413 -0
  12. package/dist/cjs/{intlTelInput-CdZOfaWd.js → intlTelInput-CIZvknP0.js} +1 -1
  13. package/dist/cjs/loader.cjs.js +2 -2
  14. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  16. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
  17. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-applied-filters.cjs.entry.js +2 -2
  21. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  23. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +9 -4403
  26. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
  32. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-gift-card-redeem.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
  65. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  80. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-product-card.cjs.entry.js +5 -11
  85. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
  87. package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
  88. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +5 -6
  90. package/dist/cjs/salla-rating-modal.cjs.entry.js +5 -6
  91. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
  104. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  107. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  108. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  109. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +48 -0
  110. package/dist/cjs/{shipping-fast-CsqEQE78.js → star-tn5w5Um0.js} +8 -0
  111. package/dist/cjs/twilight.cjs.js +2 -2
  112. package/dist/cjs/{vanilla-picker-BT9OjZCy.js → vanilla-picker-BwaB87Xi.js} +1 -1
  113. package/dist/collection/Helpers/Helper.js +171 -117
  114. package/dist/collection/collection-manifest.json +2 -1
  115. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +8 -4
  116. package/dist/collection/components/salla-cart-summary/salla-cart-summary.css +1 -1
  117. package/dist/collection/components/salla-user-menu/salla-user-menu.js +1 -1
  118. package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.css +62 -0
  119. package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.js +65 -0
  120. package/dist/components/Helper.js +171 -117
  121. package/dist/components/heart.js +11 -0
  122. package/dist/components/index.js +2 -2
  123. package/dist/components/index2.js +4322 -2471
  124. package/dist/components/index3.js +2553 -0
  125. package/dist/components/salla-bullet-delivery.js +44 -4438
  126. package/dist/components/salla-cart-summary.js +1 -1
  127. package/dist/components/salla-datetime-picker2.js +1 -1
  128. package/dist/components/salla-product-card2.js +4 -10
  129. package/dist/components/salla-rating-modal-v2.js +1 -1
  130. package/dist/components/salla-rating-modal-v22.js +9 -3
  131. package/dist/components/salla-rating-modal2.js +2 -3
  132. package/dist/components/salla-user-menu.js +2 -2
  133. package/dist/components/salla-wishlist-summary.d.ts +11 -0
  134. package/dist/components/salla-wishlist-summary.js +67 -0
  135. package/dist/esm/{Helper-Cql-WbqR.js → Helper-ivBHT_nn.js} +171 -117
  136. package/dist/esm/{filepond-BsuscqtG.js → filepond-DcoYtlMX.js} +1 -1
  137. package/dist/esm/{filepond-plugin-file-poster-DZ4ckjsP.js → filepond-plugin-file-poster-CBcS6Ln1.js} +1 -1
  138. package/dist/esm/{filepond-plugin-file-validate-size-BV6807xx.js → filepond-plugin-file-validate-size-HuNTwpc9.js} +1 -1
  139. package/dist/esm/{filepond-plugin-file-validate-type-cWCM2RqT.js → filepond-plugin-file-validate-type-BOjEfXdn.js} +1 -1
  140. package/dist/esm/{filepond-plugin-image-edit-aQvaKLxK.js → filepond-plugin-image-edit-BL7zREI5.js} +1 -1
  141. package/dist/esm/{filepond-plugin-image-exif-orientation-FgW7hBXK.js → filepond-plugin-image-exif-orientation-BJgL9era.js} +1 -1
  142. package/dist/esm/{filepond-plugin-image-preview-DxogdDqd.js → filepond-plugin-image-preview-DPUJHFk0.js} +1 -1
  143. package/dist/esm/heart-00vBRoH3.js +11 -0
  144. package/dist/esm/{index-DSEA3vdh.js → index-BXNtVhVe.js} +14 -10
  145. package/dist/esm/index-wXSgmenB.js +4404 -0
  146. package/dist/esm/{intlTelInput-BLEGv9EO.js → intlTelInput-wU6Kly2g.js} +1 -1
  147. package/dist/esm/loader.js +3 -3
  148. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  149. package/dist/esm/salla-accordion_6.entry.js +2 -2
  150. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  151. package/dist/esm/salla-advertisement.entry.js +1 -1
  152. package/dist/esm/salla-alert_2.entry.js +1 -1
  153. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  154. package/dist/esm/salla-applied-filters.entry.js +2 -2
  155. package/dist/esm/salla-apps-icons.entry.js +1 -1
  156. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  157. package/dist/esm/salla-badge.entry.js +1 -1
  158. package/dist/esm/salla-basket-gap.entry.js +1 -1
  159. package/dist/esm/salla-bullet-delivery_3.entry.js +53 -4447
  160. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  161. package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
  162. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  163. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  164. package/dist/esm/salla-comment-factors.entry.js +1 -1
  165. package/dist/esm/salla-comment-form_9.entry.js +2 -2
  166. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  167. package/dist/esm/salla-contacts.entry.js +1 -1
  168. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  169. package/dist/esm/salla-count-down.entry.js +1 -1
  170. package/dist/esm/salla-custom-fields.entry.js +1 -1
  171. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  172. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  173. package/dist/esm/salla-filters-widget.entry.js +2 -2
  174. package/dist/esm/salla-filters.entry.js +2 -2
  175. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  176. package/dist/esm/salla-gift-card-redeem.entry.js +1 -1
  177. package/dist/esm/salla-gifting.entry.js +1 -1
  178. package/dist/esm/salla-hook.entry.js +1 -1
  179. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  180. package/dist/esm/salla-installment.entry.js +1 -1
  181. package/dist/esm/salla-list-tile.entry.js +1 -1
  182. package/dist/esm/salla-localization-modal.entry.js +1 -1
  183. package/dist/esm/salla-login-modal.entry.js +1 -1
  184. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  185. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  186. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  187. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  188. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  189. package/dist/esm/salla-loyalty.entry.js +1 -1
  190. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  191. package/dist/esm/salla-map_3.entry.js +1 -1
  192. package/dist/esm/salla-menu.entry.js +1 -1
  193. package/dist/esm/salla-metadata.entry.js +1 -1
  194. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  195. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  196. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  197. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  198. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  199. package/dist/esm/salla-offer-modal.entry.js +1 -1
  200. package/dist/esm/salla-offer.entry.js +1 -1
  201. package/dist/esm/salla-order-branch.entry.js +1 -1
  202. package/dist/esm/salla-order-cancel.entry.js +1 -1
  203. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  204. package/dist/esm/salla-order-details-options.entry.js +1 -1
  205. package/dist/esm/salla-order-details.entry.js +1 -1
  206. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  207. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  208. package/dist/esm/salla-order-edit.entry.js +1 -1
  209. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  210. package/dist/esm/salla-order-shipments.entry.js +1 -1
  211. package/dist/esm/salla-order-summary.entry.js +1 -1
  212. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  213. package/dist/esm/salla-orders.entry.js +2 -2
  214. package/dist/esm/salla-payments.entry.js +1 -1
  215. package/dist/esm/salla-placeholder.entry.js +1 -1
  216. package/dist/esm/salla-price-range.entry.js +1 -1
  217. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  218. package/dist/esm/salla-product-card.entry.js +2 -8
  219. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  220. package/dist/esm/salla-products-list.entry.js +2 -2
  221. package/dist/esm/salla-products-slider.entry.js +2 -2
  222. package/dist/esm/salla-quick-order.entry.js +1 -1
  223. package/dist/esm/salla-rating-modal-v2.entry.js +3 -4
  224. package/dist/esm/salla-rating-modal.entry.js +3 -4
  225. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  226. package/dist/esm/salla-review-order-item.entry.js +1 -1
  227. package/dist/esm/salla-scopes.entry.js +1 -1
  228. package/dist/esm/salla-search-product-card.entry.js +1 -1
  229. package/dist/esm/salla-search.entry.js +1 -1
  230. package/dist/esm/salla-skeleton.entry.js +1 -1
  231. package/dist/esm/salla-social-share.entry.js +1 -1
  232. package/dist/esm/salla-social.entry.js +1 -1
  233. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  234. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  235. package/dist/esm/salla-tooltip.entry.js +1 -1
  236. package/dist/esm/salla-trust-badges.entry.js +1 -1
  237. package/dist/esm/salla-user-menu.entry.js +5 -5
  238. package/dist/esm/salla-user-profile.entry.js +1 -1
  239. package/dist/esm/salla-user-settings.entry.js +1 -1
  240. package/dist/esm/salla-verify.entry.js +1 -1
  241. package/dist/esm/salla-wallet.entry.js +1 -1
  242. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  243. package/dist/esm/salla-wishlist-summary.entry.js +46 -0
  244. package/dist/esm/{shipping-fast-lMgMt31Q.js → star-cq6TcfoH.js} +8 -1
  245. package/dist/esm/twilight.js +3 -3
  246. package/dist/esm/{vanilla-picker-BpgJFvog.js → vanilla-picker-CFcUgW74.js} +1 -1
  247. package/dist/twilight/p-00vBRoH3.js +4 -0
  248. package/dist/twilight/{p-035b561c.entry.js → p-02eccebc.entry.js} +1 -1
  249. package/dist/twilight/p-043b2382.entry.js +4 -0
  250. package/dist/twilight/{p-2304f0a4.entry.js → p-0a135b25.entry.js} +1 -1
  251. package/dist/twilight/{p-5d41dc4e.entry.js → p-0bcaa1af.entry.js} +1 -1
  252. package/dist/twilight/{p-bbb72d38.entry.js → p-0d18b6f2.entry.js} +1 -1
  253. package/dist/twilight/p-12822eba.entry.js +4 -0
  254. package/dist/twilight/{p-82455313.entry.js → p-16b9ea73.entry.js} +1 -1
  255. package/dist/twilight/{p-5d0fd545.entry.js → p-1853b5ba.entry.js} +1 -1
  256. package/dist/twilight/p-1a4028e2.entry.js +4 -0
  257. package/dist/twilight/{p-010fa509.entry.js → p-1bcacd6b.entry.js} +1 -1
  258. package/dist/twilight/{p-f306bfe3.entry.js → p-1ea4c8e4.entry.js} +1 -1
  259. package/dist/twilight/{p-e5bb52fb.entry.js → p-22087f33.entry.js} +1 -1
  260. package/dist/twilight/{p-5d97cf2d.entry.js → p-23540811.entry.js} +1 -1
  261. package/dist/twilight/{p-3c665085.entry.js → p-2e08cf78.entry.js} +1 -1
  262. package/dist/twilight/{p-4a3701ca.entry.js → p-2ee3c58e.entry.js} +1 -1
  263. package/dist/twilight/{p-901217bc.entry.js → p-38806031.entry.js} +1 -1
  264. package/dist/twilight/{p-d654b4b0.entry.js → p-3ae64529.entry.js} +1 -1
  265. package/dist/twilight/{p-f173ada5.entry.js → p-3e7a7eb0.entry.js} +1 -1
  266. package/dist/twilight/{p-3eb55e32.entry.js → p-43124a9d.entry.js} +1 -1
  267. package/dist/twilight/{p-7afeb088.entry.js → p-44899fd8.entry.js} +1 -1
  268. package/dist/twilight/{p-c15d08ae.entry.js → p-4563fd77.entry.js} +1 -1
  269. package/dist/twilight/{p-276171ac.entry.js → p-48f47f92.entry.js} +1 -1
  270. package/dist/twilight/{p-b6ece925.entry.js → p-50a88286.entry.js} +1 -1
  271. package/dist/twilight/{p-6fb16543.entry.js → p-52c31b1a.entry.js} +1 -1
  272. package/dist/twilight/{p-77dc1637.entry.js → p-565eda17.entry.js} +1 -1
  273. package/dist/twilight/p-6142183b.entry.js +4 -0
  274. package/dist/twilight/{p-909ae4c5.entry.js → p-6210a661.entry.js} +1 -1
  275. package/dist/twilight/{p-69e8750f.entry.js → p-6665f42e.entry.js} +1 -1
  276. package/dist/twilight/{p-e0b085e4.entry.js → p-6b378bcd.entry.js} +1 -1
  277. package/dist/twilight/{p-75652fd4.entry.js → p-6d56ebac.entry.js} +1 -1
  278. package/dist/twilight/{p-6904ad04.entry.js → p-6fe398ae.entry.js} +1 -1
  279. package/dist/twilight/{p-aadeb35a.entry.js → p-70147959.entry.js} +1 -1
  280. package/dist/twilight/{p-09e126b0.entry.js → p-70eaceea.entry.js} +1 -1
  281. package/dist/twilight/{p-1f1dda08.entry.js → p-71ec3f8a.entry.js} +1 -1
  282. package/dist/twilight/p-747153bc.entry.js +4 -0
  283. package/dist/twilight/{p-4944d10a.entry.js → p-76403e24.entry.js} +1 -1
  284. package/dist/twilight/{p-77323c2a.entry.js → p-78a84f80.entry.js} +1 -1
  285. package/dist/twilight/p-79f495b7.entry.js +4 -0
  286. package/dist/twilight/{p-e5c07741.entry.js → p-7a099b00.entry.js} +1 -1
  287. package/dist/twilight/{p-51434773.entry.js → p-817cfe1a.entry.js} +1 -1
  288. package/dist/twilight/{p-6a605835.entry.js → p-853b2efe.entry.js} +1 -1
  289. package/dist/twilight/{p-4a447633.entry.js → p-8666489e.entry.js} +1 -1
  290. package/dist/twilight/{p-9fe36a97.entry.js → p-88f762de.entry.js} +1 -1
  291. package/dist/twilight/{p-1acd987a.entry.js → p-8e114c27.entry.js} +1 -1
  292. package/dist/twilight/{p-b1c21e5c.entry.js → p-8f3642d1.entry.js} +1 -1
  293. package/dist/twilight/{p-db53fade.entry.js → p-900f78b6.entry.js} +1 -1
  294. package/dist/twilight/{p-7e0698c6.entry.js → p-90aa29f3.entry.js} +1 -1
  295. package/dist/twilight/{p-5329003d.entry.js → p-91e4594d.entry.js} +1 -1
  296. package/dist/twilight/{p-84ec7be7.entry.js → p-9282b995.entry.js} +1 -1
  297. package/dist/twilight/{p-06419603.entry.js → p-98137b26.entry.js} +1 -1
  298. package/dist/twilight/{p-62a44e65.entry.js → p-987a75aa.entry.js} +1 -1
  299. package/dist/twilight/{p-3c5e2710.entry.js → p-9979ada5.entry.js} +1 -1
  300. package/dist/twilight/{p-d9be4036.entry.js → p-9cca8055.entry.js} +1 -1
  301. package/dist/twilight/{p-3040407e.entry.js → p-9d667925.entry.js} +1 -1
  302. package/dist/twilight/{p-8ae70528.entry.js → p-9dfe1ec1.entry.js} +1 -1
  303. package/dist/twilight/{p-0764c46b.entry.js → p-9f23104d.entry.js} +1 -1
  304. package/dist/twilight/{p-WgGO2Pjy.js → p-BFib9jF0.js} +1 -1
  305. package/dist/twilight/{p-DSEA3vdh.js → p-BXNtVhVe.js} +2 -2
  306. package/dist/twilight/{p-VBuS91fQ.js → p-BpnCDmiM.js} +1 -1
  307. package/dist/twilight/{p-B3sbQMcp.js → p-C3JsXKHY.js} +1 -1
  308. package/dist/twilight/{p-BZt79QeE.js → p-CDojVREu.js} +1 -1
  309. package/dist/twilight/{p-DDcSXlpO.js → p-CMcDoqmG.js} +1 -1
  310. package/dist/twilight/{p-BF2su8FM.js → p-COQlWLWv.js} +1 -1
  311. package/dist/twilight/{p-Bj6lP8RV.js → p-CPkPdW2Q.js} +1 -1
  312. package/dist/twilight/p-CbVZf-Q4.js +4 -0
  313. package/dist/twilight/{p-Bt0GXtZG.js → p-D9StCBh9.js} +2 -2
  314. package/dist/twilight/p-DI6PJLEJ.js +1024 -0
  315. package/dist/twilight/{p-6cc3e44d.entry.js → p-a0c5bc92.entry.js} +1 -1
  316. package/dist/twilight/{p-c419a909.entry.js → p-a34258d2.entry.js} +1 -1
  317. package/dist/twilight/{p-1063f3d1.entry.js → p-a57e299a.entry.js} +1 -1
  318. package/dist/twilight/{p-89ed6dbc.entry.js → p-a581c552.entry.js} +1 -1
  319. package/dist/twilight/{p-0b514a47.entry.js → p-ab97de5d.entry.js} +1 -1
  320. package/dist/twilight/{p-901a961f.entry.js → p-ac2926d9.entry.js} +1 -1
  321. package/dist/twilight/{p-dd3aacf3.entry.js → p-aec3d7ce.entry.js} +1 -1
  322. package/dist/twilight/{p-663aa63b.entry.js → p-b0671070.entry.js} +1 -1
  323. package/dist/twilight/{p-e90a201a.entry.js → p-b0ff401e.entry.js} +1 -1
  324. package/dist/twilight/{p-ad930532.entry.js → p-b11508cb.entry.js} +1 -1
  325. package/dist/twilight/{p-5c863789.entry.js → p-b5329852.entry.js} +1 -1
  326. package/dist/twilight/{p-DdScDjtA.js → p-b84FyDqk.js} +1 -1
  327. package/dist/twilight/{p-bb2170ac.entry.js → p-bb0bc7ed.entry.js} +1 -1
  328. package/dist/twilight/{p-68aecf40.entry.js → p-bc2203b6.entry.js} +1 -1
  329. package/dist/twilight/{p-bc0f3f06.entry.js → p-bd89bcf5.entry.js} +1 -1
  330. package/dist/twilight/{p-d1c973ce.entry.js → p-bdb558a2.entry.js} +1 -1
  331. package/dist/twilight/{p-b3063b70.entry.js → p-bee482ce.entry.js} +1 -1
  332. package/dist/twilight/{p-f919f0b5.entry.js → p-c0c23759.entry.js} +1 -1
  333. package/dist/twilight/{p-6be347e5.entry.js → p-c163a216.entry.js} +1 -1
  334. package/dist/twilight/{p-ec341307.entry.js → p-c5f087a3.entry.js} +1 -1
  335. package/dist/twilight/{p-5b949ccc.entry.js → p-c67dcc94.entry.js} +1 -1
  336. package/dist/twilight/{p-lMgMt31Q.js → p-cq6TcfoH.js} +1 -1
  337. package/dist/twilight/{p-78ee03f8.entry.js → p-d1520e68.entry.js} +1 -1
  338. package/dist/twilight/{p-54c36ba4.entry.js → p-d365bd72.entry.js} +1 -1
  339. package/dist/twilight/{p-2c07e8ac.entry.js → p-d702af41.entry.js} +1 -1
  340. package/dist/twilight/{p-3b3a1c87.entry.js → p-dbd9523b.entry.js} +1 -1
  341. package/dist/twilight/{p-4557e342.entry.js → p-dc9b9ef7.entry.js} +1 -1
  342. package/dist/twilight/{p-47b1aa89.entry.js → p-de3eeec4.entry.js} +1 -1
  343. package/dist/twilight/{p-e676c627.entry.js → p-dedfcc58.entry.js} +1 -1
  344. package/dist/twilight/{p-66561f9e.entry.js → p-e50b99cb.entry.js} +1 -1
  345. package/dist/twilight/{p-6cdc7f8a.entry.js → p-e6233f15.entry.js} +1 -1
  346. package/dist/twilight/{p-457a256d.entry.js → p-e63f5b80.entry.js} +1 -1
  347. package/dist/twilight/{p-8f2b2e42.entry.js → p-e77d6649.entry.js} +1 -1
  348. package/dist/twilight/{p-855a9db7.entry.js → p-e9cc9f4f.entry.js} +1 -1
  349. package/dist/twilight/{p-6e43f8a7.entry.js → p-eccd8aa9.entry.js} +1 -1
  350. package/dist/twilight/{p-a89fb313.entry.js → p-f174afea.entry.js} +1 -1
  351. package/dist/twilight/{p-360b6388.entry.js → p-f4583bb2.entry.js} +1 -1
  352. package/dist/twilight/{p-fc6adc90.entry.js → p-f48ada4a.entry.js} +1 -1
  353. package/dist/twilight/{p-b414760b.entry.js → p-f583571c.entry.js} +1 -1
  354. package/dist/twilight/{p-fac05e8f.entry.js → p-f7e38710.entry.js} +1 -1
  355. package/dist/twilight/{p-2733e78f.entry.js → p-fc0a3c91.entry.js} +1 -1
  356. package/dist/twilight/{p-61580839.entry.js → p-fd6aed5e.entry.js} +1 -1
  357. package/dist/twilight/twilight.esm.js +1 -1
  358. package/dist/types/Helpers/Helper.d.ts +14 -12
  359. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +0 -1
  360. package/dist/types/components/salla-wishlist-summary/salla-wishlist-summary.d.ts +18 -0
  361. package/dist/types/components.d.ts +45 -0
  362. package/package.json +5 -5
  363. package/dist/cjs/star-DMzrN05M.js +0 -13
  364. package/dist/components/star.js +0 -11
  365. package/dist/esm/star-CeFAfcTv.js +0 -11
  366. package/dist/twilight/p-5a86a794.entry.js +0 -4
  367. package/dist/twilight/p-8ed45c28.entry.js +0 -4
  368. package/dist/twilight/p-CUSw0W26.js +0 -4
  369. package/dist/twilight/p-CeFAfcTv.js +0 -4
  370. package/dist/twilight/p-b98ae2c1.entry.js +0 -4
  371. package/dist/twilight/p-e91bba7e.entry.js +0 -1024
  372. package/dist/twilight/p-f10fca84.entry.js +0 -4
@@ -3,4411 +3,11 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DpXwHFVO.js');
6
+ var index = require('./index-BGm5j5Zj.js');
7
7
  var helpers = require('./helpers-Dm4BirHO.js');
8
8
  var location = require('./location-DIyESLuI.js');
9
9
  var search = require('./search-c7Aa7lM9.js');
10
10
 
11
- /**
12
- * @license
13
- * Copyright 2019 Google LLC
14
- * SPDX-License-Identifier: BSD-3-Clause
15
- */
16
- const t$1=globalThis,e$2=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$3=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$2&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$3.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$3.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$2),i$3=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n$3(o,t,s$2)},S$3=(s,o)=>{if(e$2)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t$1.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$3=e$2?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
17
-
18
- /**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:h$3,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$2}=Object,a$1=globalThis,c$2=a$1.trustedTypes,l$2=c$2?c$2.emptyScript:"",p$2=a$1.reactiveElementPolyfillSupport,d$3=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$3=(t,s)=>!i$2(t,s),b$3={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$3};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b$3){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$1(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$3(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b$3}static _$Ei(){if(this.hasOwnProperty(d$3("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$3("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$3("properties"))){const t=this.properties,s=[...r$1(t),...o$2(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$3(s));}else void 0!==s&&i.push(c$3(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$3(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i,e=false,h){if(void 0!==t){const r=this.constructor;if(false===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f$3)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$3("elementProperties")]=new Map,y$1[d$3("finalized")]=new Map,p$2?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.2");
23
-
24
- /**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */
29
- const t=globalThis,i$1=t=>t,s$1=t.trustedTypes,e=s$1?s$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,h$2="$lit$",o$1=`lit$${Math.random().toFixed(9).slice(2)}$`,n$1="?"+o$1,r=`<${n$1}>`,l$1=document,c$1=()=>l$1.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u$1=Array.isArray,d$2=t=>u$1(t)||"function"==typeof t?.[Symbol.iterator],f$2="[ \t\n\f\r]",v$2=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$2=/-->/g,m=/>/g,p$1=RegExp(`>|${f$2}(?:([^\\s"'>=/]+)(${f$2}*=${f$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g$1=/'/g,$$1=/"/g,y=/^(?:script|style|textarea|title)$/i,x$2=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$2=x$2(1),E$1=Symbol.for("lit-noChange"),A$2=Symbol.for("lit-nothing"),C$2=new WeakMap,P$2=l$1.createTreeWalker(l$1,129);function V$2(t,i){if(!u$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e?e.createHTML(i):i}const N$1=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v$2;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v$2?"!--"===u[1]?c=_$2:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p$1):void 0!==u[3]&&(c=p$1):c===p$1?">"===u[0]?(c=n??v$2,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p$1:'"'===u[3]?$$1:g$1):c===$$1||c===g$1?c=p$1:c===_$2||c===m?c=v$2:(c=p$1,n=void 0);const x=c===p$1&&t[i+1].startsWith("/>")?" ":"";l+=c===v$2?s+r:d>=0?(e.push(a),s.slice(0,d)+h$2+s.slice(d)+o$1+x):s+o$1+(-2===d?i:x);}return [V$2(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};let S$2 = class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N$1(t,i);if(this.el=S.createElement(f,e),P$2.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P$2.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h$2)){const i=v[a++],s=r.getAttribute(t).split(o$1),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I$2:"?"===e[1]?L$2:"@"===e[1]?z$2:H$1}),r.removeAttribute(t);}else t.startsWith(o$1)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o$1),i=t.length-1;if(i>0){r.textContent=s$1?s$1.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c$1()),P$2.nextNode(),d.push({type:2,index:++l});r.append(t[i],c$1());}}}else if(8===r.nodeType)if(r.data===n$1)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$1,t+1));)d.push({type:7,index:l}),t+=o$1.length-1;}l++;}}static createElement(t,i){const s=l$1.createElement("template");return s.innerHTML=t,s}};function M$2(t,i,s=t,e){if(i===E$1)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M$2(t,h._$AS(t,i.values),h,e)),i}let R$2 = class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l$1).importNode(i,true);P$2.currentNode=e;let h=P$2.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k$2(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z$2(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P$2.nextNode(),o++);}return P$2.currentNode=l$1,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let k$2 = class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A$2,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M$2(this,t,i),a(t)?t===A$2||null==t||""===t?(this._$AH!==A$2&&this._$AR(),this._$AH=A$2):t!==this._$AH&&t!==E$1&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d$2(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==A$2&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l$1.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S$2.createElement(V$2(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R$2(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C$2.get(t.strings);return void 0===i&&C$2.set(t.strings,i=new S$2(t)),i}k(t){u$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c$1()),this.O(c$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$1(t).nextSibling;i$1(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let H$1 = class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A$2,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A$2;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M$2(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M$2(this,e[s+n],i,n),r===E$1&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A$2?t=A$2:t!==A$2&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A$2?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let I$2 = class I extends H$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A$2?void 0:t;}};let L$2 = class L extends H$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A$2);}};let z$2 = class z extends H$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M$2(this,t,i,0)??A$2)===E$1)return;const s=this._$AH,e=t===A$2&&s!==A$2||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A$2&&(s===A$2||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};let Z$2 = class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M$2(this,t);}};const B$2=t.litHtmlPolyfillSupport;B$2?.(S$2,k$2),(t.litHtmlVersions??=[]).push("3.3.2");const D$2=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k$2(i.insertBefore(c$1(),t),t,void 0,s??{});}return h._$AI(t),h};
30
-
31
- /**
32
- * @license
33
- * Copyright 2017 Google LLC
34
- * SPDX-License-Identifier: BSD-3-Clause
35
- */const s=globalThis;class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D$2(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E$1}}i._$litElement$=true,i["finalized"]=true,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});(s.litElementVersions??=[]).push("4.2.2");
36
-
37
- const O$1 = globalThis, H = O$1.ShadowRoot && (O$1.ShadyCSS === void 0 || O$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, j$1 = /* @__PURE__ */ Symbol(), Z$1 = /* @__PURE__ */ new WeakMap();
38
- let de = class {
39
- constructor(e, i, r) {
40
- if (this._$cssResult$ = true, r !== j$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
41
- this.cssText = e, this.t = i;
42
- }
43
- get styleSheet() {
44
- let e = this.o;
45
- const i = this.t;
46
- if (H && e === void 0) {
47
- const r = i !== void 0 && i.length === 1;
48
- r && (e = Z$1.get(i)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && Z$1.set(i, e));
49
- }
50
- return e;
51
- }
52
- toString() {
53
- return this.cssText;
54
- }
55
- };
56
- const ge = (t) => new de(typeof t == "string" ? t : t + "", void 0, j$1), ve = (t, ...e) => {
57
- const i = t.length === 1 ? t[0] : e.reduce((r, s, o) => r + ((a) => {
58
- if (a._$cssResult$ === true) return a.cssText;
59
- if (typeof a == "number") return a;
60
- throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
61
- })(s) + t[o + 1], t[0]);
62
- return new de(i, t, j$1);
63
- }, be = (t, e) => {
64
- if (H) t.adoptedStyleSheets = e.map((i) => i instanceof CSSStyleSheet ? i : i.styleSheet);
65
- else for (const i of e) {
66
- const r = document.createElement("style"), s = O$1.litNonce;
67
- s !== void 0 && r.setAttribute("nonce", s), r.textContent = i.cssText, t.appendChild(r);
68
- }
69
- }, J$1 = H ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
70
- let i = "";
71
- for (const r of e.cssRules) i += r.cssText;
72
- return ge(i);
73
- })(t) : t;
74
- const { is: ye, defineProperty: $e, getOwnPropertyDescriptor: Ae, getOwnPropertyNames: we, getOwnPropertySymbols: _e, getPrototypeOf: xe } = Object, M$1 = globalThis, X$1 = M$1.trustedTypes, Se = X$1 ? X$1.emptyScript : "", Ee = M$1.reactiveElementPolyfillSupport, T$1 = (t, e) => t, V$1 = { toAttribute(t, e) {
75
- switch (e) {
76
- case Boolean:
77
- t = t ? Se : null;
78
- break;
79
- case Object:
80
- case Array:
81
- t = t == null ? t : JSON.stringify(t);
82
- }
83
- return t;
84
- }, fromAttribute(t, e) {
85
- let i = t;
86
- switch (e) {
87
- case Boolean:
88
- i = t !== null;
89
- break;
90
- case Number:
91
- i = t === null ? null : Number(t);
92
- break;
93
- case Object:
94
- case Array:
95
- try {
96
- i = JSON.parse(t);
97
- } catch {
98
- i = null;
99
- }
100
- }
101
- return i;
102
- } }, W$1 = (t, e) => !ye(t, e), Q$1 = { attribute: true, type: String, converter: V$1, reflect: false, useDefault: false, hasChanged: W$1 };
103
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), M$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
104
- let E = class extends HTMLElement {
105
- static addInitializer(e) {
106
- this._$Ei(), (this.l ??= []).push(e);
107
- }
108
- static get observedAttributes() {
109
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
110
- }
111
- static createProperty(e, i = Q$1) {
112
- if (i.state && (i.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(e) && ((i = Object.create(i)).wrapped = true), this.elementProperties.set(e, i), !i.noAccessor) {
113
- const r = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(e, r, i);
114
- s !== void 0 && $e(this.prototype, e, s);
115
- }
116
- }
117
- static getPropertyDescriptor(e, i, r) {
118
- const { get: s, set: o } = Ae(this.prototype, e) ?? { get() {
119
- return this[i];
120
- }, set(a) {
121
- this[i] = a;
122
- } };
123
- return { get: s, set(a) {
124
- const n = s?.call(this);
125
- o?.call(this, a), this.requestUpdate(e, n, r);
126
- }, configurable: true, enumerable: true };
127
- }
128
- static getPropertyOptions(e) {
129
- return this.elementProperties.get(e) ?? Q$1;
130
- }
131
- static _$Ei() {
132
- if (this.hasOwnProperty(T$1("elementProperties"))) return;
133
- const e = xe(this);
134
- e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
135
- }
136
- static finalize() {
137
- if (this.hasOwnProperty(T$1("finalized"))) return;
138
- if (this.finalized = true, this._$Ei(), this.hasOwnProperty(T$1("properties"))) {
139
- const i = this.properties, r = [...we(i), ..._e(i)];
140
- for (const s of r) this.createProperty(s, i[s]);
141
- }
142
- const e = this[Symbol.metadata];
143
- if (e !== null) {
144
- const i = litPropertyMetadata.get(e);
145
- if (i !== void 0) for (const [r, s] of i) this.elementProperties.set(r, s);
146
- }
147
- this._$Eh = /* @__PURE__ */ new Map();
148
- for (const [i, r] of this.elementProperties) {
149
- const s = this._$Eu(i, r);
150
- s !== void 0 && this._$Eh.set(s, i);
151
- }
152
- this.elementStyles = this.finalizeStyles(this.styles);
153
- }
154
- static finalizeStyles(e) {
155
- const i = [];
156
- if (Array.isArray(e)) {
157
- const r = new Set(e.flat(1 / 0).reverse());
158
- for (const s of r) i.unshift(J$1(s));
159
- } else e !== void 0 && i.push(J$1(e));
160
- return i;
161
- }
162
- static _$Eu(e, i) {
163
- const r = i.attribute;
164
- return r === false ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0;
165
- }
166
- constructor() {
167
- super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
168
- }
169
- _$Ev() {
170
- this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
171
- }
172
- addController(e) {
173
- (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
174
- }
175
- removeController(e) {
176
- this._$EO?.delete(e);
177
- }
178
- _$E_() {
179
- const e = /* @__PURE__ */ new Map(), i = this.constructor.elementProperties;
180
- for (const r of i.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]);
181
- e.size > 0 && (this._$Ep = e);
182
- }
183
- createRenderRoot() {
184
- const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
185
- return be(e, this.constructor.elementStyles), e;
186
- }
187
- connectedCallback() {
188
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((e) => e.hostConnected?.());
189
- }
190
- enableUpdating(e) {
191
- }
192
- disconnectedCallback() {
193
- this._$EO?.forEach((e) => e.hostDisconnected?.());
194
- }
195
- attributeChangedCallback(e, i, r) {
196
- this._$AK(e, r);
197
- }
198
- _$ET(e, i) {
199
- const r = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, r);
200
- if (s !== void 0 && r.reflect === true) {
201
- const o = (r.converter?.toAttribute !== void 0 ? r.converter : V$1).toAttribute(i, r.type);
202
- this._$Em = e, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
203
- }
204
- }
205
- _$AK(e, i) {
206
- const r = this.constructor, s = r._$Eh.get(e);
207
- if (s !== void 0 && this._$Em !== s) {
208
- const o = r.getPropertyOptions(s), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : V$1;
209
- this._$Em = s;
210
- const n = a.fromAttribute(i, o.type);
211
- this[s] = n ?? this._$Ej?.get(s) ?? n, this._$Em = null;
212
- }
213
- }
214
- requestUpdate(e, i, r, s = false, o) {
215
- if (e !== void 0) {
216
- const a = this.constructor;
217
- if (s === false && (o = this[e]), r ??= a.getPropertyOptions(e), !((r.hasChanged ?? W$1)(o, i) || r.useDefault && r.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, r)))) return;
218
- this.C(e, i, r);
219
- }
220
- this.isUpdatePending === false && (this._$ES = this._$EP());
221
- }
222
- C(e, i, { useDefault: r, reflect: s, wrapped: o }, a) {
223
- r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? i ?? this[e]), o !== true || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (i = void 0), this._$AL.set(e, i)), s === true && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
224
- }
225
- async _$EP() {
226
- this.isUpdatePending = true;
227
- try {
228
- await this._$ES;
229
- } catch (i) {
230
- Promise.reject(i);
231
- }
232
- const e = this.scheduleUpdate();
233
- return e != null && await e, !this.isUpdatePending;
234
- }
235
- scheduleUpdate() {
236
- return this.performUpdate();
237
- }
238
- performUpdate() {
239
- if (!this.isUpdatePending) return;
240
- if (!this.hasUpdated) {
241
- if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
242
- for (const [s, o] of this._$Ep) this[s] = o;
243
- this._$Ep = void 0;
244
- }
245
- const r = this.constructor.elementProperties;
246
- if (r.size > 0) for (const [s, o] of r) {
247
- const { wrapped: a } = o, n = this[s];
248
- a !== true || this._$AL.has(s) || n === void 0 || this.C(s, void 0, o, n);
249
- }
250
- }
251
- let e = false;
252
- const i = this._$AL;
253
- try {
254
- e = this.shouldUpdate(i), e ? (this.willUpdate(i), this._$EO?.forEach((r) => r.hostUpdate?.()), this.update(i)) : this._$EM();
255
- } catch (r) {
256
- throw e = false, this._$EM(), r;
257
- }
258
- e && this._$AE(i);
259
- }
260
- willUpdate(e) {
261
- }
262
- _$AE(e) {
263
- this._$EO?.forEach((i) => i.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(e)), this.updated(e);
264
- }
265
- _$EM() {
266
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
267
- }
268
- get updateComplete() {
269
- return this.getUpdateComplete();
270
- }
271
- getUpdateComplete() {
272
- return this._$ES;
273
- }
274
- shouldUpdate(e) {
275
- return true;
276
- }
277
- update(e) {
278
- this._$Eq &&= this._$Eq.forEach((i) => this._$ET(i, this[i])), this._$EM();
279
- }
280
- updated(e) {
281
- }
282
- firstUpdated(e) {
283
- }
284
- };
285
- E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[T$1("elementProperties")] = /* @__PURE__ */ new Map(), E[T$1("finalized")] = /* @__PURE__ */ new Map(), Ee?.({ ReactiveElement: E }), (M$1.reactiveElementVersions ??= []).push("2.1.2");
286
- const K$1 = globalThis, ee$1 = (t) => t, D$1 = K$1.trustedTypes, te = D$1 ? D$1.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, he = "$lit$", A$1 = `lit$${Math.random().toFixed(9).slice(2)}$`, ce = "?" + A$1, ke = `<${ce}>`, S$1 = document, R$1 = () => S$1.createComment(""), I$1 = (t) => t === null || typeof t != "object" && typeof t != "function", Y$1 = Array.isArray, Pe = (t) => Y$1(t) || typeof t?.[Symbol.iterator] == "function", L$1 = `[
287
- \f\r]`, P$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ie = /-->/g, re = />/g, w$1 = RegExp(`>|${L$1}(?:([^\\s"'>=/]+)(${L$1}*=${L$1}*(?:[^
288
- \f\r"'\`<>=]|("|')|))|$)`, "g"), se = /'/g, oe = /"/g, pe = /^(?:script|style|textarea|title)$/i, Te = (t) => (e, ...i) => ({ _$litType$: t, strings: e, values: i }), g = Te(1), v$1 = /* @__PURE__ */ Symbol.for("lit-noChange"), f$1 = /* @__PURE__ */ Symbol.for("lit-nothing"), ae = /* @__PURE__ */ new WeakMap(), x$1 = S$1.createTreeWalker(S$1, 129);
289
- function ue(t, e) {
290
- if (!Y$1(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
291
- return te !== void 0 ? te.createHTML(e) : e;
292
- }
293
- const Ce = (t, e) => {
294
- const i = t.length - 1, r = [];
295
- let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = P$1;
296
- for (let n = 0; n < i; n++) {
297
- const l = t[n];
298
- let m, c, u = -1, y = 0;
299
- for (; y < l.length && (a.lastIndex = y, c = a.exec(l), c !== null); ) y = a.lastIndex, a === P$1 ? c[1] === "!--" ? a = ie : c[1] !== void 0 ? a = re : c[2] !== void 0 ? (pe.test(c[2]) && (s = RegExp("</" + c[2], "g")), a = w$1) : c[3] !== void 0 && (a = w$1) : a === w$1 ? c[0] === ">" ? (a = s ?? P$1, u = -1) : c[1] === void 0 ? u = -2 : (u = a.lastIndex - c[2].length, m = c[1], a = c[3] === void 0 ? w$1 : c[3] === '"' ? oe : se) : a === oe || a === se ? a = w$1 : a === ie || a === re ? a = P$1 : (a = w$1, s = void 0);
300
- const $ = a === w$1 && t[n + 1].startsWith("/>") ? " " : "";
301
- o += a === P$1 ? l + ke : u >= 0 ? (r.push(m), l.slice(0, u) + he + l.slice(u) + A$1 + $) : l + A$1 + (u === -2 ? n : $);
302
- }
303
- return [ue(t, o + (t[i] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
304
- };
305
- class N {
306
- constructor({ strings: e, _$litType$: i }, r) {
307
- let s;
308
- this.parts = [];
309
- let o = 0, a = 0;
310
- const n = e.length - 1, l = this.parts, [m, c] = Ce(e, i);
311
- if (this.el = N.createElement(m, r), x$1.currentNode = this.el.content, i === 2 || i === 3) {
312
- const u = this.el.content.firstChild;
313
- u.replaceWith(...u.childNodes);
314
- }
315
- for (; (s = x$1.nextNode()) !== null && l.length < n; ) {
316
- if (s.nodeType === 1) {
317
- if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(he)) {
318
- const y = c[a++], $ = s.getAttribute(u).split(A$1), F = /([.?@])?(.*)/.exec(y);
319
- l.push({ type: 1, index: o, name: F[2], strings: $, ctor: F[1] === "." ? Ie : F[1] === "?" ? Ne : F[1] === "@" ? ze : B$1 }), s.removeAttribute(u);
320
- } else u.startsWith(A$1) && (l.push({ type: 6, index: o }), s.removeAttribute(u));
321
- if (pe.test(s.tagName)) {
322
- const u = s.textContent.split(A$1), y = u.length - 1;
323
- if (y > 0) {
324
- s.textContent = D$1 ? D$1.emptyScript : "";
325
- for (let $ = 0; $ < y; $++) s.append(u[$], R$1()), x$1.nextNode(), l.push({ type: 2, index: ++o });
326
- s.append(u[y], R$1());
327
- }
328
- }
329
- } else if (s.nodeType === 8) if (s.data === ce) l.push({ type: 2, index: o });
330
- else {
331
- let u = -1;
332
- for (; (u = s.data.indexOf(A$1, u + 1)) !== -1; ) l.push({ type: 7, index: o }), u += A$1.length - 1;
333
- }
334
- o++;
335
- }
336
- }
337
- static createElement(e, i) {
338
- const r = S$1.createElement("template");
339
- return r.innerHTML = e, r;
340
- }
341
- }
342
- function k$1(t, e, i = t, r) {
343
- if (e === v$1) return e;
344
- let s = r !== void 0 ? i._$Co?.[r] : i._$Cl;
345
- const o = I$1(e) ? void 0 : e._$litDirective$;
346
- return s?.constructor !== o && (s?._$AO?.(false), o === void 0 ? s = void 0 : (s = new o(t), s._$AT(t, i, r)), r !== void 0 ? (i._$Co ??= [])[r] = s : i._$Cl = s), s !== void 0 && (e = k$1(t, s._$AS(t, e.values), s, r)), e;
347
- }
348
- class Re {
349
- constructor(e, i) {
350
- this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = i;
351
- }
352
- get parentNode() {
353
- return this._$AM.parentNode;
354
- }
355
- get _$AU() {
356
- return this._$AM._$AU;
357
- }
358
- u(e) {
359
- const { el: { content: i }, parts: r } = this._$AD, s = (e?.creationScope ?? S$1).importNode(i, true);
360
- x$1.currentNode = s;
361
- let o = x$1.nextNode(), a = 0, n = 0, l = r[0];
362
- for (; l !== void 0; ) {
363
- if (a === l.index) {
364
- let m;
365
- l.type === 2 ? m = new z$1(o, o.nextSibling, this, e) : l.type === 1 ? m = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (m = new Fe(o, this, e)), this._$AV.push(m), l = r[++n];
366
- }
367
- a !== l?.index && (o = x$1.nextNode(), a++);
368
- }
369
- return x$1.currentNode = S$1, s;
370
- }
371
- p(e) {
372
- let i = 0;
373
- for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, i), i += r.strings.length - 2) : r._$AI(e[i])), i++;
374
- }
375
- }
376
- let z$1 = class z {
377
- get _$AU() {
378
- return this._$AM?._$AU ?? this._$Cv;
379
- }
380
- constructor(e, i, r, s) {
381
- this.type = 2, this._$AH = f$1, this._$AN = void 0, this._$AA = e, this._$AB = i, this._$AM = r, this.options = s, this._$Cv = s?.isConnected ?? true;
382
- }
383
- get parentNode() {
384
- let e = this._$AA.parentNode;
385
- const i = this._$AM;
386
- return i !== void 0 && e?.nodeType === 11 && (e = i.parentNode), e;
387
- }
388
- get startNode() {
389
- return this._$AA;
390
- }
391
- get endNode() {
392
- return this._$AB;
393
- }
394
- _$AI(e, i = this) {
395
- e = k$1(this, e, i), I$1(e) ? e === f$1 || e == null || e === "" ? (this._$AH !== f$1 && this._$AR(), this._$AH = f$1) : e !== this._$AH && e !== v$1 && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Pe(e) ? this.k(e) : this._(e);
396
- }
397
- O(e) {
398
- return this._$AA.parentNode.insertBefore(e, this._$AB);
399
- }
400
- T(e) {
401
- this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
402
- }
403
- _(e) {
404
- this._$AH !== f$1 && I$1(this._$AH) ? this._$AA.nextSibling.data = e : this.T(S$1.createTextNode(e)), this._$AH = e;
405
- }
406
- $(e) {
407
- const { values: i, _$litType$: r } = e, s = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = N.createElement(ue(r.h, r.h[0]), this.options)), r);
408
- if (this._$AH?._$AD === s) this._$AH.p(i);
409
- else {
410
- const o = new Re(s, this), a = o.u(this.options);
411
- o.p(i), this.T(a), this._$AH = o;
412
- }
413
- }
414
- _$AC(e) {
415
- let i = ae.get(e.strings);
416
- return i === void 0 && ae.set(e.strings, i = new N(e)), i;
417
- }
418
- k(e) {
419
- Y$1(this._$AH) || (this._$AH = [], this._$AR());
420
- const i = this._$AH;
421
- let r, s = 0;
422
- for (const o of e) s === i.length ? i.push(r = new z(this.O(R$1()), this.O(R$1()), this, this.options)) : r = i[s], r._$AI(o), s++;
423
- s < i.length && (this._$AR(r && r._$AB.nextSibling, s), i.length = s);
424
- }
425
- _$AR(e = this._$AA.nextSibling, i) {
426
- for (this._$AP?.(false, true, i); e !== this._$AB; ) {
427
- const r = ee$1(e).nextSibling;
428
- ee$1(e).remove(), e = r;
429
- }
430
- }
431
- setConnected(e) {
432
- this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
433
- }
434
- };
435
- let B$1 = class B {
436
- get tagName() {
437
- return this.element.tagName;
438
- }
439
- get _$AU() {
440
- return this._$AM._$AU;
441
- }
442
- constructor(e, i, r, s, o) {
443
- this.type = 1, this._$AH = f$1, this._$AN = void 0, this.element = e, this.name = i, this._$AM = s, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = f$1;
444
- }
445
- _$AI(e, i = this, r, s) {
446
- const o = this.strings;
447
- let a = false;
448
- if (o === void 0) e = k$1(this, e, i, 0), a = !I$1(e) || e !== this._$AH && e !== v$1, a && (this._$AH = e);
449
- else {
450
- const n = e;
451
- let l, m;
452
- for (e = o[0], l = 0; l < o.length - 1; l++) m = k$1(this, n[r + l], i, l), m === v$1 && (m = this._$AH[l]), a ||= !I$1(m) || m !== this._$AH[l], m === f$1 ? e = f$1 : e !== f$1 && (e += (m ?? "") + o[l + 1]), this._$AH[l] = m;
453
- }
454
- a && !s && this.j(e);
455
- }
456
- j(e) {
457
- e === f$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
458
- }
459
- };
460
- class Ie extends B$1 {
461
- constructor() {
462
- super(...arguments), this.type = 3;
463
- }
464
- j(e) {
465
- this.element[this.name] = e === f$1 ? void 0 : e;
466
- }
467
- }
468
- class Ne extends B$1 {
469
- constructor() {
470
- super(...arguments), this.type = 4;
471
- }
472
- j(e) {
473
- this.element.toggleAttribute(this.name, !!e && e !== f$1);
474
- }
475
- }
476
- class ze extends B$1 {
477
- constructor(e, i, r, s, o) {
478
- super(e, i, r, s, o), this.type = 5;
479
- }
480
- _$AI(e, i = this) {
481
- if ((e = k$1(this, e, i, 0) ?? f$1) === v$1) return;
482
- const r = this._$AH, s = e === f$1 && r !== f$1 || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== f$1 && (r === f$1 || s);
483
- s && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
484
- }
485
- handleEvent(e) {
486
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
487
- }
488
- }
489
- class Fe {
490
- constructor(e, i, r) {
491
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = r;
492
- }
493
- get _$AU() {
494
- return this._$AM._$AU;
495
- }
496
- _$AI(e) {
497
- k$1(this, e);
498
- }
499
- }
500
- const Ue = K$1.litHtmlPolyfillSupport;
501
- Ue?.(N, z$1), (K$1.litHtmlVersions ??= []).push("3.3.2");
502
- const Oe = (t, e, i) => {
503
- const r = i?.renderBefore ?? e;
504
- let s = r._$litPart$;
505
- if (s === void 0) {
506
- const o = i?.renderBefore ?? null;
507
- r._$litPart$ = s = new z$1(e.insertBefore(R$1(), o), o, void 0, i ?? {});
508
- }
509
- return s._$AI(t), s;
510
- };
511
- const G$1 = globalThis;
512
- let C$1 = class C extends E {
513
- constructor() {
514
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
515
- }
516
- createRenderRoot() {
517
- const e = super.createRenderRoot();
518
- return this.renderOptions.renderBefore ??= e.firstChild, e;
519
- }
520
- update(e) {
521
- const i = this.render();
522
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Oe(i, this.renderRoot, this.renderOptions);
523
- }
524
- connectedCallback() {
525
- super.connectedCallback(), this._$Do?.setConnected(true);
526
- }
527
- disconnectedCallback() {
528
- super.disconnectedCallback(), this._$Do?.setConnected(false);
529
- }
530
- render() {
531
- return v$1;
532
- }
533
- };
534
- C$1._$litElement$ = true, C$1.finalized = true, G$1.litElementHydrateSupport?.({ LitElement: C$1 });
535
- const Ve = G$1.litElementPolyfillSupport;
536
- Ve?.({ LitElement: C$1 });
537
- (G$1.litElementVersions ??= []).push("4.2.2");
538
- const De = (t) => (e, i) => {
539
- i !== void 0 ? i.addInitializer(() => {
540
- customElements.define(t, e);
541
- }) : customElements.define(t, e);
542
- };
543
- const Me = { attribute: true, type: String, converter: V$1, reflect: false, hasChanged: W$1 }, Be = (t = Me, e, i) => {
544
- const { kind: r, metadata: s } = i;
545
- let o = globalThis.litPropertyMetadata.get(s);
546
- if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), r === "setter" && ((t = Object.create(t)).wrapped = true), o.set(i.name, t), r === "accessor") {
547
- const { name: a } = i;
548
- return { set(n) {
549
- const l = e.get.call(this);
550
- e.set.call(this, n), this.requestUpdate(a, l, t, true, n);
551
- }, init(n) {
552
- return n !== void 0 && this.C(a, void 0, t, n), n;
553
- } };
554
- }
555
- if (r === "setter") {
556
- const { name: a } = i;
557
- return function(n) {
558
- const l = this[a];
559
- e.call(this, n), this.requestUpdate(a, l, t, true, n);
560
- };
561
- }
562
- throw Error("Unsupported decorator location: " + r);
563
- };
564
- function p(t) {
565
- return (e, i) => typeof i == "object" ? Be(t, e, i) : ((r, s, o) => {
566
- const a = s.hasOwnProperty(o);
567
- return s.constructor.createProperty(o, r), a ? Object.getOwnPropertyDescriptor(s, o) : void 0;
568
- })(t, e, i);
569
- }
570
- function b$1(t) {
571
- return p({ ...t, state: true, attribute: false });
572
- }
573
- const Le = (t, e, i) => (i.configurable = true, i.enumerable = true, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, i), i);
574
- function qe(t, e) {
575
- return (i, r, s) => {
576
- const o = (a) => a.renderRoot?.querySelector(t) ?? null;
577
- return Le(i, r, { get() {
578
- return o(this);
579
- } });
580
- };
581
- }
582
- const _$1 = { ATTRIBUTE: 1, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4 }, me = (t) => (...e) => ({ _$litDirective$: t, values: e });
583
- class fe {
584
- constructor(e) {
585
- }
586
- get _$AU() {
587
- return this._$AM._$AU;
588
- }
589
- _$AT(e, i, r) {
590
- this._$Ct = e, this._$AM = i, this._$Ci = r;
591
- }
592
- _$AS(e, i) {
593
- return this.update(e, i);
594
- }
595
- update(e, i) {
596
- return this.render(...i);
597
- }
598
- }
599
- const U$1 = me(class extends fe {
600
- constructor(t) {
601
- if (super(t), t.type !== _$1.ATTRIBUTE || t.name !== "class" || t.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
602
- }
603
- render(t) {
604
- return " " + Object.keys(t).filter((e) => t[e]).join(" ") + " ";
605
- }
606
- update(t, [e]) {
607
- if (this.st === void 0) {
608
- this.st = /* @__PURE__ */ new Set(), t.strings !== void 0 && (this.nt = new Set(t.strings.join(" ").split(/\s/).filter((r) => r !== "")));
609
- for (const r in e) e[r] && !this.nt?.has(r) && this.st.add(r);
610
- return this.render(e);
611
- }
612
- const i = t.element.classList;
613
- for (const r of this.st) r in e || (i.remove(r), this.st.delete(r));
614
- for (const r in e) {
615
- const s = !!e[r];
616
- s === this.st.has(r) || this.nt?.has(r) || (s ? (i.add(r), this.st.add(r)) : (i.remove(r), this.st.delete(r)));
617
- }
618
- return v$1;
619
- }
620
- });
621
- const He = (t) => t.strings === void 0, je = {}, We = (t, e = je) => t._$AH = e;
622
- const Ke = me(class extends fe {
623
- constructor(t) {
624
- if (super(t), t.type !== _$1.PROPERTY && t.type !== _$1.ATTRIBUTE && t.type !== _$1.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
625
- if (!He(t)) throw Error("`live` bindings can only contain a single expression");
626
- }
627
- render(t) {
628
- return t;
629
- }
630
- update(t, [e]) {
631
- if (e === v$1 || e === f$1) return e;
632
- const i = t.element, r = t.name;
633
- if (t.type === _$1.PROPERTY) {
634
- if (e === i[r]) return v$1;
635
- } else if (t.type === _$1.BOOLEAN_ATTRIBUTE) {
636
- if (!!e === i.hasAttribute(r)) return v$1;
637
- } else if (t.type === _$1.ATTRIBUTE && i.getAttribute(r) === e + "") return v$1;
638
- return We(t), e;
639
- }
640
- }), Ye = [
641
- "AE",
642
- "AR",
643
- "AT",
644
- "AU",
645
- "BE",
646
- "BG",
647
- "BR",
648
- "CA",
649
- "CH",
650
- "CL",
651
- "CO",
652
- "CZ",
653
- "DE",
654
- "DK",
655
- "EE",
656
- "ES",
657
- "FI",
658
- "FR",
659
- "GB",
660
- "GR",
661
- "HK",
662
- "HR",
663
- "HU",
664
- "ID",
665
- "IE",
666
- "IL",
667
- "IN",
668
- "IT",
669
- "JP",
670
- "KR",
671
- "LT",
672
- "LU",
673
- "LV",
674
- "MX",
675
- "MY",
676
- "NL",
677
- "NO",
678
- "NZ",
679
- "PE",
680
- "PH",
681
- "PL",
682
- "PT",
683
- "RO",
684
- "SE",
685
- "SG",
686
- "SI",
687
- "SK",
688
- "TH",
689
- "TR",
690
- "TW",
691
- "US",
692
- "VN",
693
- "ZA"
694
- ];
695
- function Ge(t, e) {
696
- let i = null;
697
- return function(...r) {
698
- i && clearTimeout(i), i = setTimeout(() => {
699
- t.apply(this, r);
700
- }, e);
701
- };
702
- }
703
- function Ze() {
704
- return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
705
- const e = Math.random() * 16 | 0;
706
- return (t === "x" ? e : e & 3 | 8).toString(16);
707
- });
708
- }
709
- function Je(t) {
710
- if (!t) return null;
711
- const e = t.find(
712
- (i) => i.types?.includes("country")
713
- );
714
- return e ? e.short_name : null;
715
- }
716
- function ne(t, e) {
717
- let i = null;
718
- return t.address_components ? i = Je(t.address_components) : e && e.length === 1 && (i = e[0].toUpperCase()), i ? {
719
- isSupported: Ye.includes(i),
720
- countryCode: i
721
- } : {
722
- isSupported: null,
723
- countryCode: null
724
- };
725
- }
726
- const le = {
727
- en: {
728
- placeholder: "Search for an address...",
729
- noResults: "No address found for this search. Try different keywords.",
730
- errorFetchPredictions: "Unable to search for addresses. Please try again.",
731
- errorFetchDetails: "Unable to load address details. Please try again.",
732
- errorNetwork: "Network error. Please check your connection and try again.",
733
- validationRequired: "This field is required",
734
- validationPattern: "Invalid format",
735
- validationSaudiFormat: "Please enter a valid Saudi national address (format: AAAA1234)"
736
- },
737
- ar: {
738
- placeholder: "ابحث عن عنوان...",
739
- noResults: "لم يتم العثور على عنوان لهذا البحث. جرب كلمات مختلفة.",
740
- errorFetchPredictions: "تعذر البحث عن العناوين. يرجى المحاولة مرة أخرى.",
741
- errorFetchDetails: "تعذر تحميل تفاصيل العنوان. يرجى المحاولة مرة أخرى.",
742
- errorNetwork: "خطأ في الشبكة. يرجى التحقق من اتصالك والمحاولة مرة أخرى.",
743
- validationRequired: "هذا الحقل مطلوب",
744
- validationPattern: "صيغة غير صحيحة",
745
- validationSaudiFormat: "الرجاء إدخال عنوان وطني صحيح (الصيغة: AAAA1234)"
746
- },
747
- es: {
748
- placeholder: "Buscar una dirección...",
749
- noResults: "No se encontró ninguna dirección para esta búsqueda. Intenta con diferentes palabras.",
750
- errorFetchPredictions: "No se pueden buscar direcciones. Por favor, inténtelo de nuevo.",
751
- errorFetchDetails: "No se pueden cargar los detalles de la dirección. Por favor, inténtelo de nuevo.",
752
- errorNetwork: "Error de red. Verifique su conexión e inténtelo de nuevo.",
753
- validationRequired: "Este campo es obligatorio",
754
- validationPattern: "Formato inválido",
755
- validationSaudiFormat: "Por favor ingrese una dirección nacional saudí válida (formato: AAAA1234)"
756
- },
757
- fr: {
758
- placeholder: "Rechercher une adresse...",
759
- noResults: "Aucune adresse trouvée pour cette recherche. Essayez différents mots-clés.",
760
- errorFetchPredictions: "Impossible de rechercher des adresses. Veuillez réessayer.",
761
- errorFetchDetails: "Impossible de charger les détails de l'adresse. Veuillez réessayer.",
762
- errorNetwork: "Erreur réseau. Vérifiez votre connexion et réessayez.",
763
- validationRequired: "Ce champ est obligatoire",
764
- validationPattern: "Format invalide",
765
- validationSaudiFormat: "Veuillez saisir une adresse nationale saoudienne valide (format: AAAA1234)"
766
- },
767
- de: {
768
- placeholder: "Nach einer Adresse suchen...",
769
- noResults: "Keine Adresse für diese Suche gefunden. Versuchen Sie es mit anderen Stichwörtern.",
770
- errorFetchPredictions: "Adressen können nicht gesucht werden. Bitte versuchen Sie es erneut.",
771
- errorFetchDetails: "Adressdetails können nicht geladen werden. Bitte versuchen Sie es erneut.",
772
- errorNetwork: "Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
773
- validationRequired: "Dieses Feld ist erforderlich",
774
- validationPattern: "Ungültiges Format",
775
- validationSaudiFormat: "Bitte geben Sie eine gültige saudi-arabische nationale Adresse ein (Format: AAAA1234)"
776
- },
777
- it: {
778
- placeholder: "Cerca un indirizzo...",
779
- noResults: "Nessun indirizzo trovato per questa ricerca. Prova con parole chiave diverse.",
780
- errorFetchPredictions: "Impossibile cercare indirizzi. Riprova.",
781
- errorFetchDetails: "Impossibile caricare i dettagli dell'indirizzo. Riprova.",
782
- errorNetwork: "Errore di rete. Controlla la connessione e riprova.",
783
- validationRequired: "Questo campo è obbligatorio",
784
- validationPattern: "Formato non valido",
785
- validationSaudiFormat: "Inserisci un indirizzo nazionale saudita valido (formato: AAAA1234)"
786
- },
787
- pt: {
788
- placeholder: "Pesquisar um endereço...",
789
- noResults: "Nenhum endereço encontrado para esta pesquisa. Tente palavras-chave diferentes.",
790
- errorFetchPredictions: "Não é possível pesquisar endereços. Por favor, tente novamente.",
791
- errorFetchDetails: "Não é possível carregar os detalhes do endereço. Por favor, tente novamente.",
792
- errorNetwork: "Erro de rede. Verifique sua conexão e tente novamente.",
793
- validationRequired: "Este campo é obrigatório",
794
- validationPattern: "Formato inválido",
795
- validationSaudiFormat: "Por favor, insira um endereço nacional saudita válido (formato: AAAA1234)"
796
- },
797
- ru: {
798
- placeholder: "Поиск адреса...",
799
- noResults: "Адрес для этого поиска не найден. Попробуйте другие ключевые слова.",
800
- errorFetchPredictions: "Невозможно выполнить поиск адресов. Пожалуйста, попробуйте еще раз.",
801
- errorFetchDetails: "Невозможно загрузить детали адреса. Пожалуйста, попробуйте еще раз.",
802
- errorNetwork: "Ошибка сети. Проверьте соединение и попробуйте еще раз.",
803
- validationRequired: "Это поле обязательно",
804
- validationPattern: "Неверный формат",
805
- validationSaudiFormat: "Пожалуйста, введите действительный национальный адрес Саудовской Аравии (формат: AAAA1234)"
806
- },
807
- ja: {
808
- placeholder: "住所を検索...",
809
- noResults: "この検索では住所が見つかりませんでした。別のキーワードをお試しください。",
810
- errorFetchPredictions: "住所を検索できません。もう一度お試しください。",
811
- errorFetchDetails: "住所の詳細を読み込めません。もう一度お試しください。",
812
- errorNetwork: "ネットワークエラー。接続を確認してもう一度お試しください。",
813
- validationRequired: "この項目は必須です",
814
- validationPattern: "無効な形式",
815
- validationSaudiFormat: "有効なサウジアラビアの国内住所を入力してください(形式:AAAA1234)"
816
- },
817
- zh: {
818
- placeholder: "搜索地址...",
819
- noResults: "未找到此搜索的地址。请尝试不同的关键词。",
820
- errorFetchPredictions: "无法搜索地址。请重试。",
821
- errorFetchDetails: "无法加载地址详情。请重试。",
822
- errorNetwork: "网络错误。请检查您的连接并重试。",
823
- validationRequired: "此字段为必填项",
824
- validationPattern: "格式无效",
825
- validationSaudiFormat: "请输入有效的沙特国家地址(格式:AAAA1234)"
826
- },
827
- ko: {
828
- placeholder: "주소 검색...",
829
- noResults: "이 검색에 대한 주소를 찾을 수 없습니다. 다른 키워드를 시도해보세요.",
830
- errorFetchPredictions: "주소를 검색할 수 없습니다. 다시 시도해주세요.",
831
- errorFetchDetails: "주소 세부정보를 불러올 수 없습니다. 다시 시도해주세요.",
832
- errorNetwork: "네트워크 오류입니다. 연결을 확인하고 다시 시도해주세요.",
833
- validationRequired: "이 필드는 필수입니다",
834
- validationPattern: "유효하지 않은 형식",
835
- validationSaudiFormat: "유효한 사우디 국가 주소를 입력하세요 (형식: AAAA1234)"
836
- },
837
- hi: {
838
- placeholder: "पता खोजें...",
839
- noResults: "इस खोज के लिए कोई पता नहीं मिला। विभिन्न कीवर्ड आज़माएं।",
840
- errorFetchPredictions: "पते खोजने में असमर्थ। कृपया पुनः प्रयास करें।",
841
- errorFetchDetails: "पते का विवरण लोड करने में असमर्थ। कृपया पुनः प्रयास करें।",
842
- errorNetwork: "नेटवर्क त्रुटि। कृपया अपना कनेक्शन जांचें और पुनः प्रयास करें।",
843
- validationRequired: "यह फ़ील्ड आवश्यक है",
844
- validationPattern: "अमान्य प्रारूप",
845
- validationSaudiFormat: "कृपया एक मान्य सऊदी राष्ट्रीय पता दर्ज करें (प्रारूप: AAAA1234)"
846
- },
847
- tr: {
848
- placeholder: "Adres ara...",
849
- noResults: "Bu arama için adres bulunamadı. Farklı anahtar kelimeler deneyin.",
850
- errorFetchPredictions: "Adresler aranamıyor. Lütfen tekrar deneyin.",
851
- errorFetchDetails: "Adres detayları yüklenemiyor. Lütfen tekrar deneyin.",
852
- errorNetwork: "Ağ hatası. Lütfen bağlantınızı kontrol edin ve tekrar deneyin.",
853
- validationRequired: "Bu alan zorunludur",
854
- validationPattern: "Geçersiz format",
855
- validationSaudiFormat: "Lütfen geçerli bir Suudi ulusal adresi girin (format: AAAA1234)"
856
- }
857
- };
858
- function q$1(t = "en") {
859
- return le[t] || le.en;
860
- }
861
- function Xe(t) {
862
- return ["ar"].includes(t);
863
- }
864
- var Qe = Object.defineProperty, et$1 = Object.getOwnPropertyDescriptor, h$1 = (t, e, i, r) => {
865
- for (var s = r > 1 ? void 0 : r ? et$1(e, i) : e, o = t.length - 1, a; o >= 0; o--)
866
- (a = t[o]) && (s = (r ? a(e, i, s) : a(s)) || s);
867
- return r && s && Qe(e, i, s), s;
868
- };
869
- let d$1 = class d extends C$1 {
870
- constructor() {
871
- super(), this.proxyUrl = "https://api.salla.dev", this.authToken = null, this.placeholder = "", this.defaultPlace = "", this.label = null, this.className = "", this.language = "en", this.dir = "auto", this.mode = "search", this.name = "", this.required = false, this.pattern = null, this.tooltip = null, this.selectedId = null, this.errors = [], this.disabled = false, this._value = "", this._country = null, this.locationBias = null, this.locationRestriction = null, this.types = null, this._fields = ["formatted_address", "geometry"], this.strictBounds = false, this.useSessionToken = true, this.resolve = false, this.onValidateAddress = null, this.debounceDelay = 300, this.minChars = 3, this.predictions = [], this.isOpen = false, this.isLoading = false, this.error = null, this.activeIndex = -1, this.inputValue = "", this.sessionToken = null, this.validationError = null, this.touched = false, this.showNationalAddressIcon = false, this.abortController = null, this._internals = this.attachInternals();
872
- }
873
- set value(t) {
874
- const e = this._value;
875
- this._value = t || "", this.requestUpdate("value", e);
876
- }
877
- get value() {
878
- return this._value;
879
- }
880
- set country(t) {
881
- t == null ? this._country = null : Array.isArray(t) ? this._country = t.filter((e) => e && e.trim()).map((e) => e.trim()) : this._country = t.split(",").map((e) => e.trim()).filter((e) => e);
882
- }
883
- get country() {
884
- return this._country;
885
- }
886
- set fieldsStr(t) {
887
- this._fields = t ? t.split(",").map((e) => e.trim()).filter((e) => e) : ["formatted_address", "geometry"];
888
- }
889
- get fieldsStr() {
890
- return this._fields.join(",");
891
- }
892
- set fields(t) {
893
- this._fields = t && t.length > 0 ? t : ["formatted_address", "geometry"];
894
- }
895
- get fields() {
896
- return this._fields;
897
- }
898
- connectedCallback() {
899
- super.connectedCallback(), this.createNewSession(), this.initializeDebounce();
900
- }
901
- disconnectedCallback() {
902
- super.disconnectedCallback(), this.terminateSession(), this.cancelPendingRequest();
903
- }
904
- initializeDebounce() {
905
- this.debouncedFetch = Ge(this.fetchPredictions.bind(this), this.debounceDelay);
906
- }
907
- firstUpdated() {
908
- const t = this.value || this.defaultPlace || "";
909
- t && (this.inputValue = t, this.isSaudiFormMode() && this.isShortAddressFormat(t) && (this.showNationalAddressIcon = true));
910
- }
911
- $nextTick(t) {
912
- Promise.resolve().then(t);
913
- }
914
- isShortAddressFormat(t) {
915
- return /^[a-zA-Z]{4}\d{4}$/.test(t?.trim());
916
- }
917
- updated(t) {
918
- if (t.has("value")) {
919
- const e = this.value || "";
920
- e !== this.inputValue && (this.inputValue = e, this.isSaudiFormMode() && e && this.isShortAddressFormat(e) ? this.showNationalAddressIcon = true : this.showNationalAddressIcon = false);
921
- }
922
- t.has("defaultPlace") && !this.value && this.defaultPlace !== this.inputValue && (this.inputValue = this.defaultPlace || "", this.isSaudiFormMode() && this.defaultPlace && this.isShortAddressFormat(this.defaultPlace) ? this.showNationalAddressIcon = true : this.showNationalAddressIcon = false), t.has("selectedId") && this.selectedId && this.selectedId !== this.inputValue && this.isSaudiFormMode() && this.isShortAddressFormat(this.selectedId) && (this.inputValue = this.selectedId || "", this.showNationalAddressIcon = true, this._internals.setFormValue(this.selectedId || "")), t.has("debounceDelay") && this.initializeDebounce();
923
- }
924
- createNewSession() {
925
- this.useSessionToken && (this.sessionToken = Ze());
926
- }
927
- terminateSession() {
928
- this.sessionToken = null;
929
- }
930
- cancelPendingRequest() {
931
- this.abortController && (this.abortController.abort(), this.abortController = null);
932
- }
933
- isSaudiFormMode() {
934
- return this.mode === "form" && this.country !== null && this.country.length === 1 && this.country[0].toLowerCase() === "sa";
935
- }
936
- getWhatsAppLink() {
937
- const t = "966112898888", e = encodeURIComponent("العنوان الوطني");
938
- return `https://wa.me/${t}?text=${e}`;
939
- }
940
- renderWhatsAppIcon() {
941
- return g`
942
- <svg class="whatsapp-icon" viewBox="0 0 24 24" fill="currentColor" part="whatsapp-icon">
943
- <path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
944
- </svg>
945
- `;
946
- }
947
- getSaudiHelpTextContent() {
948
- return {
949
- helpText: this.language === "ar" ? "لا تعرف العنوان الوطني؟" : "Don't know your national address?",
950
- linkText: this.language === "ar" ? "احصل على العنوان الوطني عبر الواتساب" : "Get your national address via WhatsApp"
951
- };
952
- }
953
- renderSaudiFriendlyError() {
954
- const t = this.inputValue && this.inputValue.trim().length > 0;
955
- let e, i;
956
- t ? (e = "العنوان الوطني المختصر غير صحيح (الصيغة: AAAA1234). يمكنك الحصول عليه بسهولة", i = "The short national address format is incorrect (format: AAAA1234). You can easily get it") : (e = "العنوان الوطني المختصر مطلوب. يمكنك الحصول عليه بسهولة", i = "The short national address is required. You can easily get it");
957
- const r = "عبر الواتساب (اضغط هنا)", s = "via WhatsApp (click here)", o = "أو ابحث أعلاه", a = "or search above", n = this.language === "ar" ? e : i, l = this.language === "ar" ? r : s, m = this.language === "ar" ? o : a;
958
- return g`
959
- <span>
960
- ${n}
961
- <a
962
- href="${this.getWhatsAppLink()}"
963
- target="_blank"
964
- rel="noopener noreferrer"
965
- class="whatsapp-link-inline"
966
- part="whatsapp-link"
967
- >
968
- ${this.renderWhatsAppIcon()}
969
- ${l}
970
- </a>
971
- ${m}
972
- </span>
973
- `;
974
- }
975
- renderSaudiHelpText() {
976
- if (!this.isSaudiFormMode() || this.validationError || this.errors && this.errors.length > 0)
977
- return "";
978
- const t = "لا تعرف العنوان الوطني؟ احصل عليه بسهولة", e = "Don't know your national address? Get it easily", i = "عبر الواتساب (اضغط هنا)", r = "via WhatsApp (click here)", s = "أو ابحث أعلاه", o = "or search above", a = this.language === "ar" ? t : e, n = this.language === "ar" ? i : r, l = this.language === "ar" ? s : o;
979
- return g`
980
- <div class="help-text" part="help-text">
981
- <span>
982
- ${a}
983
- <a
984
- href="${this.getWhatsAppLink()}"
985
- target="_blank"
986
- rel="noopener noreferrer"
987
- class="whatsapp-link-inline"
988
- part="whatsapp-link"
989
- >
990
- ${this.renderWhatsAppIcon()}
991
- ${n}
992
- </a>
993
- ${l}
994
- </span>
995
- </div>
996
- `;
997
- }
998
- async fetchPredictions(t) {
999
- if (!t.trim()) {
1000
- this.predictions = [], this.isOpen = false, this.isLoading = false;
1001
- return;
1002
- }
1003
- if (t.trim().length < this.minChars) {
1004
- this.predictions = [], this.isOpen = false, this.isLoading = false;
1005
- return;
1006
- }
1007
- this.cancelPendingRequest(), this.abortController = new AbortController();
1008
- const e = this.abortController.signal;
1009
- this.isLoading = true, this.error = null;
1010
- try {
1011
- const i = { input: t, language: this.language };
1012
- this.sessionToken && (i.sessiontoken = this.sessionToken), this.country && this.country.length > 0 && (i.country = this.country.join(",")), this.types && this.types.length > 0 && (i.types = this.types.join("|")), this.locationBias && this.locationBias.radius && this.locationBias.center && (i.location = `${this.locationBias.center.lat},${this.locationBias.center.lng}`, i.radius = this.locationBias.radius.toString()), this.strictBounds && (i.strictbounds = "true");
1013
- const r = new URLSearchParams(i), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/query?${r.toString()}`, a = {};
1014
- this.authToken && (a.Authorization = `Bearer ${this.authToken}`);
1015
- const n = await fetch(o, { signal: e, headers: a });
1016
- if (!n.ok)
1017
- throw new Error(`HTTP ${n.status}: ${n.statusText}`);
1018
- const l = await n.json();
1019
- l.success && Array.isArray(l.data) ? (this.error = null, l.data.length > 0 ? (this.predictions = l.data.map((c) => ({
1020
- place_id: c.id,
1021
- description: c.description || c.formatted_address,
1022
- formatted_address: c.formatted_address,
1023
- short_address: c.short_address,
1024
- structured_formatting: {
1025
- main_text: c.formatted_address || c.description,
1026
- main_text_matched_substrings: [],
1027
- secondary_text: c.description || ""
1028
- },
1029
- types: c.types || [],
1030
- geometry: c.geometry,
1031
- address_components: c.address_components
1032
- })), this.isOpen = true, this.activeIndex = -1) : (this.predictions = [], this.isOpen = true)) : (this.predictions = [], this.isOpen = true);
1033
- } catch (i) {
1034
- if (i instanceof Error && i.name === "AbortError")
1035
- return;
1036
- this.predictions = [], this.isOpen = true;
1037
- } finally {
1038
- this.isLoading = false, this.abortController = null;
1039
- }
1040
- }
1041
- async fetchPlaceDetails(t) {
1042
- this.isLoading = true, this.error = null;
1043
- try {
1044
- const e = { place_id: t, language: this.language };
1045
- this.fields && this.fields.length > 0 && (e.fields = this.fields.join(",")), this.sessionToken && (e.sessiontoken = this.sessionToken), this.country && this.country.length > 0 && (e.country = this.country.join(",")), this.resolve && (e.resolve = "true");
1046
- const i = new URLSearchParams(e), s = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/details?${i.toString()}`, o = {};
1047
- this.authToken && (o.Authorization = `Bearer ${this.authToken}`);
1048
- const a = await fetch(s, { headers: o });
1049
- if (!a.ok)
1050
- throw new Error(`HTTP ${a.status}: ${a.statusText}`);
1051
- const n = await a.json();
1052
- return !n.success || n.message ? (this.error = n.message || "Failed to fetch place details", null) : n.success && n.data && n.data.id ? {
1053
- place_id: n.data.id,
1054
- ...n.data,
1055
- components: n.data.address_components?.reduce((m, c) => (c.types?.forEach((u) => {
1056
- m[u] || (m[u] = []), m[u].push({
1057
- long_name: c.long_name,
1058
- short_name: c.short_name
1059
- });
1060
- }), m), {})
1061
- } : null;
1062
- } catch (e) {
1063
- console.error("Error fetching place details:", e);
1064
- const i = q$1(this.language);
1065
- return this.error = e instanceof Error ? e.message : i.errorFetchDetails, null;
1066
- } finally {
1067
- this.isLoading = false;
1068
- }
1069
- }
1070
- /**
1071
- * Validates the selected address using the provided callback
1072
- * @param place - The place details to validate
1073
- * @returns Promise resolving to validation result
1074
- */
1075
- async validateAddress(t) {
1076
- try {
1077
- if (!t || !t.formatted_address)
1078
- return console.error("Cannot validate address - place or formatted_address is missing"), null;
1079
- if (!this.onValidateAddress || typeof this.onValidateAddress != "function")
1080
- return console.error("onValidateAddress callback is required for address validation"), null;
1081
- const e = ne(t, this.country), i = await this.onValidateAddress({
1082
- place: t,
1083
- sessionToken: this.sessionToken,
1084
- validationSupport: e
1085
- });
1086
- return this.terminateSession(), i;
1087
- } catch (e) {
1088
- return console.error("Error validating address:", e), this.terminateSession(), null;
1089
- }
1090
- }
1091
- /**
1092
- * Gets validation support information for a place
1093
- * @param place - The place details to check
1094
- * @returns ValidationSupport object indicating what validation is supported
1095
- */
1096
- getValidationSupport(t) {
1097
- return ne(t, this.country);
1098
- }
1099
- checkValidity() {
1100
- return this.validate();
1101
- }
1102
- reportValidity() {
1103
- this.touched = true;
1104
- const t = this.validate();
1105
- return t || this.dispatchEvent(new CustomEvent("invalid", {
1106
- detail: { error: this.validationError },
1107
- bubbles: true,
1108
- composed: true
1109
- })), t;
1110
- }
1111
- /**
1112
- * Resets the component to its initial state
1113
- */
1114
- reset() {
1115
- this.inputValue = "", this.selectedId = null, this.validationError = null, this.errors = [], this.touched = false, this.predictions = [], this.isOpen = false, this.error = null, this.showNationalAddressIcon = false, this.mode === "form" && (this._internals.setFormValue(null), this._internals.setValidity({}));
1116
- }
1117
- // Form lifecycle callbacks
1118
- formResetCallback() {
1119
- this.reset();
1120
- }
1121
- formStateRestoreCallback(t) {
1122
- t && this.mode === "form" && (this.selectedId = t);
1123
- }
1124
- validate() {
1125
- if (this.mode !== "form")
1126
- return true;
1127
- const t = q$1(this.language), e = this.inputValue || "";
1128
- return this.required && !e.trim() ? (this.validationError = t.validationRequired, this._internals.setValidity(
1129
- { valueMissing: true },
1130
- this.validationError,
1131
- this.inputElement
1132
- ), false) : this.isSaudiFormMode() && e.trim() && !this.isShortAddressFormat(e) ? (this.validationError = t.validationSaudiFormat, this._internals.setValidity(
1133
- { patternMismatch: true },
1134
- this.validationError,
1135
- this.inputElement
1136
- ), false) : this.pattern && e.trim() && !new RegExp(this.pattern).test(e) ? (this.validationError = t.validationPattern, this._internals.setValidity(
1137
- { patternMismatch: true },
1138
- this.validationError,
1139
- this.inputElement
1140
- ), false) : (this.validationError = null, this._internals.setValidity({}), true);
1141
- }
1142
- /**
1143
- * Normalize numerals from various scripts to Arabic numerals (0-9).
1144
- * Handles Arabic-Indic, Devanagari (Hindi), Persian, and Bengali numerals.
1145
- * Works consistently across all browsers and operating systems.
1146
- */
1147
- normalizeNumerals(t) {
1148
- if (!t) return t;
1149
- const e = {
1150
- // Arabic-Indic numerals (used in Arab countries): ٠١٢٣٤٥٦٧٨٩
1151
- "٠": "0",
1152
- "١": "1",
1153
- "٢": "2",
1154
- "٣": "3",
1155
- "٤": "4",
1156
- "٥": "5",
1157
- "٦": "6",
1158
- "٧": "7",
1159
- "٨": "8",
1160
- "٩": "9",
1161
- // Devanagari (Hindi) numerals (used in India, Nepal): ०१२३४५६७८९
1162
- "०": "0",
1163
- "१": "1",
1164
- "२": "2",
1165
- "३": "3",
1166
- "४": "4",
1167
- "५": "5",
1168
- "६": "6",
1169
- "७": "7",
1170
- "८": "8",
1171
- "९": "9",
1172
- // Persian/Dari numerals (used in Iran, Afghanistan): ۰۱۲۳۴۵۶۷۸۹
1173
- "۰": "0",
1174
- "۱": "1",
1175
- "۲": "2",
1176
- "۳": "3",
1177
- "۴": "4",
1178
- "۵": "5",
1179
- "۶": "6",
1180
- "۷": "7",
1181
- "۸": "8",
1182
- "۹": "9",
1183
- // Bengali numerals (used in Bangladesh, India): ০১২৩৪৫৬৭৮৯
1184
- "০": "0",
1185
- "১": "1",
1186
- "২": "2",
1187
- "৩": "3",
1188
- "৪": "4",
1189
- "৫": "5",
1190
- "৬": "6",
1191
- "৭": "7",
1192
- "৮": "8",
1193
- "৯": "9"
1194
- };
1195
- return t.split("").map((i) => e[i] ?? i).join("");
1196
- }
1197
- handleInput(t) {
1198
- if (this.disabled) return;
1199
- const e = t.target, i = e.selectionStart ?? 0, r = this.inputValue, s = e.value, o = this.normalizeNumerals(s);
1200
- o !== s && (e.value = o, requestAnimationFrame(() => {
1201
- e.setSelectionRange(i, i);
1202
- })), this.inputValue = o, this.touched = true, this.showNationalAddressIcon && (this.showNationalAddressIcon = false), this.mode === "form" && (this.validationError && (this.validationError = null), this.selectedId = null, this._internals.setFormValue(this.inputValue || null), this.validate()), this.errors && this.errors.length > 0 && (this.errors = []), this.inputValue.trim().length >= this.minChars && (this.isLoading = true), this.debouncedFetch(this.inputValue), this._value = this.inputValue, this.requestUpdate("value", r), this.dispatchEvent(new CustomEvent("input", {
1203
- detail: { value: this.inputValue },
1204
- bubbles: true,
1205
- composed: true
1206
- })), this.dispatchEvent(new Event("change", {
1207
- bubbles: true,
1208
- composed: true
1209
- })), this.dispatchEvent(new InputEvent("input", {
1210
- data: this.inputValue,
1211
- bubbles: true,
1212
- composed: true
1213
- }));
1214
- }
1215
- async handleSelect(t) {
1216
- if (this.disabled) return;
1217
- this.isSaudiFormMode() && t.place_id && this.isShortAddressFormat(t.place_id) ? (this.inputValue = t.place_id, this.showNationalAddressIcon = true) : (this.inputValue = t.formatted_address, this.showNationalAddressIcon = false), this.isOpen = false, this.predictions = [], this.touched = true;
1218
- let e = null;
1219
- if (this.mode === "form" ? e = await this.fetchPlaceDetails(t.place_id) : t.geometry?.location ? e = {
1220
- place_id: t.place_id,
1221
- formatted_address: t.formatted_address || t.description,
1222
- geometry: t.geometry,
1223
- types: t.types,
1224
- address_components: t.address_components
1225
- } : e = await this.fetchPlaceDetails(t.place_id), e) {
1226
- this.isSaudiFormMode() && e.place_id && this.isShortAddressFormat(e.place_id) ? (this.inputValue = e.place_id, this.showNationalAddressIcon = true) : (e.formatted_address && (this.inputValue = e.formatted_address), this.showNationalAddressIcon = false), this.mode === "form" && (this.selectedId = e.place_id, this._internals.setFormValue(this.inputValue), this.validate()), this._value = this.inputValue, this.dispatchEvent(new CustomEvent("input", {
1227
- detail: { value: this.inputValue },
1228
- bubbles: true,
1229
- composed: true
1230
- })), this.dispatchEvent(new Event("change", {
1231
- bubbles: true,
1232
- composed: true
1233
- }));
1234
- const i = this.getValidationSupport(e);
1235
- this.dispatchEvent(new CustomEvent("place-select", {
1236
- detail: { place: e, validationSupport: i },
1237
- bubbles: true,
1238
- composed: true
1239
- })), this.dispatchEvent(new CustomEvent("place-changed", {
1240
- detail: { place: e, validationSupport: i },
1241
- bubbles: true,
1242
- composed: true
1243
- }));
1244
- }
1245
- }
1246
- handleKeyDown(t) {
1247
- if (!this.disabled && !(!this.isOpen || this.predictions.length === 0))
1248
- switch (t.key) {
1249
- case "ArrowDown":
1250
- t.preventDefault(), this.activeIndex = Math.min(this.activeIndex + 1, this.predictions.length - 1);
1251
- break;
1252
- case "ArrowUp":
1253
- t.preventDefault(), this.activeIndex = Math.max(this.activeIndex - 1, -1);
1254
- break;
1255
- case "Enter":
1256
- t.preventDefault(), this.activeIndex >= 0 && this.activeIndex < this.predictions.length && this.handleSelect(this.predictions[this.activeIndex]);
1257
- break;
1258
- case "Escape":
1259
- t.preventDefault(), this.isOpen = false, this.activeIndex = -1;
1260
- break;
1261
- }
1262
- }
1263
- handleBlur() {
1264
- setTimeout(() => {
1265
- this.isOpen = false, this.activeIndex = -1, this.mode === "form" && this.touched && this.validate(), this.dispatchEvent(new Event("blur", {
1266
- bubbles: true,
1267
- composed: true
1268
- }));
1269
- }, 200);
1270
- }
1271
- handleFocus() {
1272
- this.disabled || this.predictions.length > 0 && (this.isOpen = true);
1273
- }
1274
- renderLocationIcon() {
1275
- return g`
1276
- <svg class="location-icon" fill="currentColor" viewBox="0 0 20 20">
1277
- <path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd" />
1278
- </svg>
1279
- `;
1280
- }
1281
- renderTooltip() {
1282
- return this.tooltip ? g`
1283
- <span class="tooltip-toggle" part="tooltip-toggle">
1284
- <svg class="tooltip-icon" part="tooltip-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
1285
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
1286
- </svg>
1287
- <span class="tooltip-content" part="tooltip-content">${this.tooltip}</span>
1288
- </span>
1289
- ` : "";
1290
- }
1291
- renderPrediction(t, e) {
1292
- const i = {
1293
- "dropdown-item": true,
1294
- active: e === this.activeIndex
1295
- };
1296
- let r = t.structured_formatting.main_text;
1297
- return t.short_address && r.includes(t.short_address) && (r = r.replace(t.short_address, "").trim(), r = r.replace(/\s*,\s*,\s*/g, ", ").replace(/^\s*,\s*|\s*,\s*$/g, "").trim()), g`
1298
- <div
1299
- class=${U$1(i)}
1300
- part="dropdown-item ${e === this.activeIndex ? "dropdown-item-active" : ""}"
1301
- @click=${() => this.handleSelect(t)}
1302
- role="option"
1303
- aria-selected=${e === this.activeIndex}
1304
- >
1305
- ${this.renderLocationIcon()}
1306
- <div class="place-info" part="place-info">
1307
- <div class="main-text" part="main-text">
1308
- ${t.short_address ? g`
1309
- <span class="national-address-badge" part="national-address-badge">
1310
- <img
1311
- src="https://cdn.salla.network/images/shipping/png/national-address-icon-small-min.png"
1312
- alt="national address icon"
1313
- class="national-address-icon"
1314
- />
1315
- <span class="national-address-text">${t.short_address}</span>
1316
- <span class="national-address-separator">-</span>
1317
- </span>
1318
- ` : ""}
1319
- ${r}
1320
- </div>
1321
- ${t.structured_formatting.secondary_text ? g`
1322
- <div class="secondary-text" part="secondary-text">
1323
- ${t.structured_formatting.secondary_text}
1324
- </div>
1325
- ` : ""}
1326
- </div>
1327
- </div>
1328
- `;
1329
- }
1330
- render() {
1331
- const t = {
1332
- dropdown: true,
1333
- open: this.isOpen
1334
- }, e = {
1335
- "is-invalid": !!(this.mode === "form" && this.validationError) || this.errors && this.errors.length > 0,
1336
- "with-national-icon": this.showNationalAddressIcon
1337
- }, i = {
1338
- required: this.mode === "form" && this.required
1339
- }, r = q$1(this.language), s = this.dir === "auto" ? Xe(this.language) ? "rtl" : "ltr" : this.dir, o = this.placeholder || r.placeholder, a = this.name || "salla-address-search";
1340
- return g`
1341
- <div class="wrapper ${this.className}" part="wrapper" dir="${s}">
1342
- <div class="input-container" part="input-container">
1343
- ${this.label ? g`
1344
- <label part="label" class=${U$1(i)}>
1345
- <span class="label-content">
1346
- <span>${this.label}</span>
1347
- ${this.renderTooltip()}
1348
- </span>
1349
- </label>
1350
- ` : ""}
1351
- <div class="input-wrapper">
1352
- <input
1353
- part="input"
1354
- class=${U$1(e)}
1355
- type="text"
1356
- name="${a}"
1357
- .value=${Ke(this.inputValue)}
1358
- placeholder=${o}
1359
- ?disabled=${this.disabled}
1360
- @input=${this.handleInput}
1361
- @keydown=${this.handleKeyDown}
1362
- @blur=${this.handleBlur}
1363
- @focus=${this.handleFocus}
1364
- role="combobox"
1365
- aria-expanded=${this.isOpen}
1366
- aria-autocomplete="list"
1367
- aria-controls="predictions-list"
1368
- aria-invalid=${this.mode === "form" && this.validationError || this.errors && this.errors.length > 0 ? "true" : "false"}
1369
- aria-required=${this.mode === "form" && this.required ? "true" : "false"}
1370
- autocomplete="off"
1371
- autocorrect="off"
1372
- autocapitalize="off"
1373
- spellcheck="false"
1374
- />
1375
- ${this.isLoading ? g`<div class="loading-spinner" part="spinner"></div>` : ""}
1376
-
1377
- <div
1378
- id="predictions-list"
1379
- class=${U$1(t)}
1380
- part="dropdown"
1381
- role="listbox"
1382
- >
1383
- ${this.predictions.length > 0 ? this.predictions.map((n, l) => this.renderPrediction(n, l)) : this.inputValue && !this.isLoading ? g`<div class="no-results" part="no-results">${r.noResults}</div>` : ""}
1384
- </div>
1385
- </div>
1386
- ${this.mode === "form" && this.validationError ? g`
1387
- <div class="validation-error" part="validation-error">
1388
- ${this.isSaudiFormMode() ? this.renderSaudiFriendlyError() : g`<span>${this.validationError}</span>`}
1389
- </div>
1390
- ` : ""}
1391
- ${this.errors && this.errors.length > 0 ? g`
1392
- <div class="validation-error" part="validation-error">${this.errors[0]}</div>
1393
- ` : ""}
1394
- ${this.error ? g`<div class="error-message" part="error">${this.error}</div>` : ""}
1395
- ${this.renderSaudiHelpText()}
1396
- </div>
1397
- </div>
1398
- `;
1399
- }
1400
- };
1401
- d$1.formAssociated = true;
1402
- d$1.styles = ve`
1403
- :host {
1404
- display: block;
1405
- position: relative;
1406
- font-family: var(--salla-autocomplete-font-family, system-ui, -apple-system, sans-serif);
1407
- }
1408
-
1409
- .wrapper {
1410
- position: relative;
1411
- }
1412
-
1413
- .input-container {
1414
- display: flex;
1415
- flex-direction: column;
1416
- }
1417
-
1418
- .input-wrapper {
1419
- position: relative;
1420
- }
1421
-
1422
- label {
1423
- display: block;
1424
- margin-bottom: var(--salla-autocomplete-label-margin, 0.5rem);
1425
- font-size: var(--salla-autocomplete-label-font-size, 0.875rem);
1426
- font-weight: var(--salla-autocomplete-label-font-weight, 500);
1427
- color: var(--salla-autocomplete-label-color, #374151);
1428
- }
1429
-
1430
- label.required::after {
1431
- content: ' *';
1432
- color: var(--salla-autocomplete-required-color, #dc2626);
1433
- }
1434
-
1435
- .label-content {
1436
- display: inline-flex;
1437
- align-items: center;
1438
- gap: 0.5rem;
1439
- }
1440
-
1441
- .tooltip-toggle {
1442
- position: relative;
1443
- display: inline-flex;
1444
- align-items: center;
1445
- cursor: help;
1446
- }
1447
-
1448
- .tooltip-icon {
1449
- width: 1rem;
1450
- height: 1rem;
1451
- color: var(--salla-autocomplete-tooltip-icon-color, #6b7280);
1452
- }
1453
-
1454
- .tooltip-content {
1455
- display: none;
1456
- position: absolute;
1457
- bottom: 125%;
1458
- left: 50%;
1459
- transform: translateX(-50%);
1460
- background: var(--salla-autocomplete-tooltip-bg, #1f2937);
1461
- color: var(--salla-autocomplete-tooltip-color, white);
1462
- padding: 0.5rem 0.75rem;
1463
- border-radius: 0.375rem;
1464
- font-size: 0.75rem;
1465
- line-height: 1.4;
1466
- white-space: nowrap;
1467
- z-index: 1000;
1468
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
1469
- }
1470
-
1471
- .tooltip-content::after {
1472
- content: '';
1473
- position: absolute;
1474
- top: 100%;
1475
- left: 50%;
1476
- transform: translateX(-50%);
1477
- border: 5px solid transparent;
1478
- border-top-color: var(--salla-autocomplete-tooltip-bg, #1f2937);
1479
- }
1480
-
1481
- .tooltip-toggle:hover .tooltip-content,
1482
- .tooltip-toggle:focus .tooltip-content {
1483
- display: block;
1484
- }
1485
-
1486
- input {
1487
- width: 100%;
1488
- padding-block: 0.75rem;
1489
- padding-inline-start: var(--salla-autocomplete-input-padding-start, 0.875rem);
1490
- padding-inline-end: var(--salla-autocomplete-input-padding-end, 2.75rem);
1491
- font-family: var(--salla-autocomplete-font-family, system-ui, -apple-system, sans-serif);
1492
- font-size: var(--salla-autocomplete-input-font-size, 1rem);
1493
- line-height: var(--salla-autocomplete-input-line-height, 1.5);
1494
- border: var(--salla-autocomplete-input-border, 1px solid #d1d5db);
1495
- border-radius: var(--salla-autocomplete-input-border-radius, 0.5rem);
1496
- background: var(--salla-autocomplete-input-background, white);
1497
- color: var(--salla-autocomplete-input-color, #111827);
1498
- outline: none;
1499
- transition: all 0.2s;
1500
- box-sizing: border-box;
1501
- height: var(--salla-autocomplete-input-height, auto);
1502
- min-height: var(--salla-autocomplete-input-height, 44px);
1503
- -webkit-appearance: none;
1504
- appearance: none;
1505
- }
1506
-
1507
- input.with-national-icon {
1508
- padding-inline-start: var(--salla-autocomplete-input-padding-start-icon, 2rem);
1509
- background-image: url('https://cdn.salla.network/images/shipping/png/national-address-icon-small-min.png');
1510
- background-repeat: no-repeat;
1511
- background-position: 0.75rem center;
1512
- background-size: 16px;
1513
- }
1514
-
1515
- input.with-national-icon[dir="rtl"],
1516
- :host([dir="rtl"]) input.with-national-icon {
1517
- padding-inline-start: var(--salla-autocomplete-input-padding-start, 0.875rem);
1518
- padding-inline-end: var(--salla-autocomplete-input-padding-end-icon, 2.75rem);
1519
- background-position: calc(100% - 0.75rem) center;
1520
- }
1521
-
1522
- @media (max-width: 640px) {
1523
- input {
1524
- font-size: var(--salla-autocomplete-input-font-size-mobile, 16px);
1525
- padding-block: 0.75rem;
1526
- padding-inline-start: var(--salla-autocomplete-input-padding-start-mobile, 0.875rem);
1527
- padding-inline-end: var(--salla-autocomplete-input-padding-end-mobile, 2.75rem);
1528
- min-height: 44px;
1529
- touch-action: manipulation;
1530
- }
1531
-
1532
- input.with-national-icon {
1533
- padding-inline-start: var(--salla-autocomplete-input-padding-start-icon-mobile, 2rem);
1534
- background-position: 0.875rem center;
1535
- }
1536
-
1537
- input.with-national-icon[dir="rtl"],
1538
- :host([dir="rtl"]) input.with-national-icon {
1539
- padding-inline-start: var(--salla-autocomplete-input-padding-start-mobile, 0.875rem);
1540
- padding-inline-end: var(--salla-autocomplete-input-padding-end-icon-mobile, 2.75rem);
1541
- background-position: calc(100% - 0.875rem) center;
1542
- }
1543
- }
1544
-
1545
- input:focus {
1546
- border-color: var(--salla-autocomplete-input-focus-border-color, #3b82f6);
1547
- box-shadow: var(--salla-autocomplete-input-focus-shadow, 0 0 0 3px rgba(59, 130, 246, 0.1));
1548
- }
1549
-
1550
- input:disabled {
1551
- background-color: var(--salla-autocomplete-input-disabled-bg, #f3f4f6);
1552
- cursor: not-allowed;
1553
- }
1554
-
1555
- input.is-invalid {
1556
- border-color: var(--salla-autocomplete-input-error-border-color, #dc2626);
1557
- }
1558
-
1559
- input.is-invalid:focus {
1560
- border-color: var(--salla-autocomplete-input-error-border-color, #dc2626);
1561
- box-shadow: var(--salla-autocomplete-input-error-shadow, 0 0 0 3px rgba(220, 38, 38, 0.1));
1562
- }
1563
-
1564
- input::placeholder {
1565
- color: var(--salla-autocomplete-input-placeholder-color, #9ca3af);
1566
- }
1567
-
1568
- .validation-error {
1569
- display: flex;
1570
- flex-wrap: wrap;
1571
- align-items: center;
1572
- gap: 0.5rem;
1573
- margin-top: 0.375rem;
1574
- font-size: var(--salla-autocomplete-error-font-size, 0.875rem);
1575
- color: var(--salla-autocomplete-error-color, #dc2626);
1576
- line-height: 1.5;
1577
- }
1578
-
1579
- .validation-error > span {
1580
- line-height: 1.5;
1581
- }
1582
-
1583
- .whatsapp-link-inline {
1584
- color: var(--salla-autocomplete-whatsapp-brand-color, #25D366);
1585
- white-space: nowrap;
1586
- line-height: inherit;
1587
- display: inline-flex;
1588
- align-items: center;
1589
- vertical-align: middle;
1590
- text-decoration: underline;
1591
- cursor: pointer;
1592
- transition: all 0.2s ease;
1593
- gap: 0.25rem;
1594
- margin-inline: 0.25rem;
1595
- font-weight: 500;
1596
- }
1597
-
1598
- .whatsapp-link-inline:hover {
1599
- color: var(--salla-autocomplete-whatsapp-brand-hover, #1da851);
1600
- opacity: 0.9;
1601
- }
1602
-
1603
- .whatsapp-link-inline:active {
1604
- transform: scale(0.98);
1605
- }
1606
-
1607
- .whatsapp-link-inline .whatsapp-icon {
1608
- color: var(--salla-autocomplete-whatsapp-brand-color, #25D366);
1609
- }
1610
-
1611
- .help-text {
1612
- display: block;
1613
- margin-top: 0.5rem;
1614
- font-size: var(--salla-autocomplete-help-font-size, 0.875rem);
1615
- color: var(--salla-autocomplete-help-color, #6b7280);
1616
- line-height: 1.5;
1617
- }
1618
-
1619
- .help-text span {
1620
- line-height: 1.5;
1621
- }
1622
-
1623
- .whatsapp-icon {
1624
- width: 1rem;
1625
- height: 1rem;
1626
- }
1627
-
1628
- .loading-spinner {
1629
- position: absolute;
1630
- inset-inline-end: 0.875rem;
1631
- top: 50%;
1632
- transform: translateY(-50%);
1633
- width: var(--salla-autocomplete-spinner-size, 1.25rem);
1634
- height: var(--salla-autocomplete-spinner-size, 1.25rem);
1635
- border: 2px solid var(--salla-autocomplete-spinner-border-color, #e5e7eb);
1636
- border-top-color: var(--salla-autocomplete-spinner-color, #3b82f6);
1637
- border-radius: 50%;
1638
- animation: spin 0.6s linear infinite;
1639
- }
1640
-
1641
- @media (max-width: 640px) {
1642
- .loading-spinner {
1643
- width: var(--salla-autocomplete-spinner-size-mobile, 1.375rem);
1644
- height: var(--salla-autocomplete-spinner-size-mobile, 1.375rem);
1645
- inset-inline-end: 1rem;
1646
- }
1647
- }
1648
-
1649
- @keyframes spin {
1650
- to { transform: translateY(-50%) rotate(360deg); }
1651
- }
1652
-
1653
- /* Custom scrollbar styling */
1654
- .dropdown::-webkit-scrollbar {
1655
- width: 6px;
1656
- }
1657
-
1658
- .dropdown::-webkit-scrollbar-track {
1659
- background: #f1f1f1;
1660
- border-radius: 3px;
1661
- }
1662
-
1663
- .dropdown::-webkit-scrollbar-thumb {
1664
- background: #c1c1c1;
1665
- border-radius: 3px;
1666
- }
1667
-
1668
- .dropdown::-webkit-scrollbar-thumb:hover {
1669
- background: #a8a8a8;
1670
- }
1671
-
1672
- .dropdown {
1673
- position: absolute;
1674
- top: 100%;
1675
- left: 0;
1676
- right: 0;
1677
- margin-top: var(--salla-autocomplete-dropdown-margin-top, 0.375rem);
1678
- background: var(--salla-autocomplete-dropdown-background, white);
1679
- border: var(--salla-autocomplete-dropdown-border, 1px solid #e5e7eb);
1680
- border-radius: var(--salla-autocomplete-dropdown-border-radius, 0.5rem);
1681
- box-shadow: var(--salla-autocomplete-dropdown-shadow, 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1));
1682
- max-height: var(--salla-autocomplete-dropdown-max-height, 240px);
1683
- overflow-y: auto;
1684
- overflow-x: hidden;
1685
- z-index: var(--salla-autocomplete-dropdown-z-index, 100);
1686
- display: none;
1687
- -webkit-overflow-scrolling: touch;
1688
- overscroll-behavior: contain;
1689
- scroll-behavior: smooth;
1690
- }
1691
-
1692
- @media (max-width: 640px) {
1693
- .dropdown {
1694
- max-height: var(--salla-autocomplete-dropdown-max-height-mobile, 25vh);
1695
- border-radius: var(--salla-autocomplete-dropdown-border-radius-mobile, 0.5rem);
1696
- margin-top: var(--salla-autocomplete-dropdown-margin-top-mobile, 0.25rem);
1697
- }
1698
- }
1699
-
1700
- @media (max-width: 640px) and (max-height: 667px) {
1701
- /* Smaller phones (iPhone SE, iPhone 8, etc.) */
1702
- .dropdown {
1703
- max-height: var(--salla-autocomplete-dropdown-max-height-small, 22vh);
1704
- }
1705
- }
1706
-
1707
- @media (max-width: 640px) and (min-height: 668px) and (max-height: 896px) {
1708
- /* Standard phones (iPhone 12, iPhone 13, etc.) */
1709
- .dropdown {
1710
- max-height: var(--salla-autocomplete-dropdown-max-height-standard, 28vh);
1711
- }
1712
- }
1713
-
1714
- @media (max-width: 640px) and (min-height: 897px) {
1715
- /* Larger phones (iPhone 14 Pro Max, etc.) */
1716
- .dropdown {
1717
- max-height: var(--salla-autocomplete-dropdown-max-height-large, 30vh);
1718
- }
1719
- }
1720
-
1721
- .dropdown.open {
1722
- display: block;
1723
- }
1724
-
1725
- .dropdown-item {
1726
- display: flex;
1727
- align-items: flex-start;
1728
- padding: var(--salla-autocomplete-item-padding, 0.625rem 0.75rem);
1729
- cursor: pointer;
1730
- transition: background-color 0.15s;
1731
- border-bottom: 1px solid var(--salla-autocomplete-item-border-color, #e5e7eb);
1732
- min-height: 35px;
1733
- -webkit-tap-highlight-color: transparent;
1734
- }
1735
-
1736
- @media (max-width: 640px) {
1737
- .dropdown-item {
1738
- padding: var(--salla-autocomplete-item-padding-mobile, 0.75rem 0.875rem);
1739
- min-height: 35px;
1740
- }
1741
- }
1742
-
1743
- .dropdown-item:last-child {
1744
- border-bottom: none;
1745
- }
1746
-
1747
- .dropdown-item:hover,
1748
- .dropdown-item.selected {
1749
- background-color: var(--salla-autocomplete-item-hover-bg, #f9fafb);
1750
- }
1751
-
1752
- .dropdown-item.active {
1753
- background-color: var(--salla-autocomplete-item-active-bg, #eff6ff);
1754
- }
1755
-
1756
- @media (hover: none) and (pointer: coarse) {
1757
- .dropdown-item:hover {
1758
- background-color: transparent;
1759
- }
1760
-
1761
- .dropdown-item:active {
1762
- background-color: var(--salla-autocomplete-item-active-bg, #eff6ff);
1763
- }
1764
- }
1765
-
1766
- .location-icon {
1767
- display: none;
1768
- }
1769
-
1770
- .place-info {
1771
- flex: 1;
1772
- min-width: 0;
1773
- display: flex;
1774
- flex-direction: column;
1775
- gap: 0.25rem;
1776
- }
1777
-
1778
- .main-text {
1779
- font-size: var(--salla-autocomplete-main-text-font-size, 0.875rem);
1780
- font-weight: var(--salla-autocomplete-main-text-font-weight, 600);
1781
- color: var(--salla-autocomplete-main-text-color, #111827);
1782
- line-height: 1.4;
1783
- word-wrap: break-word;
1784
- overflow-wrap: break-word;
1785
- hyphens: auto;
1786
- }
1787
-
1788
- @media (max-width: 640px) {
1789
- .main-text {
1790
- font-size: var(--salla-autocomplete-main-text-font-size-mobile, 0.9375rem);
1791
- line-height: 1.3;
1792
- }
1793
- }
1794
-
1795
- .main-text .highlight {
1796
- font-weight: var(--salla-autocomplete-highlight-font-weight, 700);
1797
- color: var(--salla-autocomplete-highlight-color, inherit);
1798
- }
1799
-
1800
- .national-address-badge {
1801
- display: inline-flex;
1802
- align-items: center;
1803
- font-size: 0.8125rem;
1804
- line-height: 1;
1805
- vertical-align: middle;
1806
- }
1807
-
1808
- .national-address-icon {
1809
- width: 11px;
1810
- height: auto;
1811
- flex-shrink: 0;
1812
- display: inline-block;
1813
- }
1814
-
1815
- .national-address-text {
1816
- padding-inline-start: 3px;
1817
- -webkit-text-fill-color: transparent;
1818
- background-clip: text;
1819
- -webkit-background-clip: text;
1820
- background-image: linear-gradient(135deg, #0052cc, #00b8d9 50%, #36b37e);
1821
- font-weight: 600;
1822
- display: inline-block;
1823
- }
1824
-
1825
- .national-address-separator {
1826
- padding-inline: 4px;
1827
- color: #6b7280;
1828
- display: inline-block;
1829
- }
1830
-
1831
- .secondary-text {
1832
- font-size: var(--salla-autocomplete-secondary-text-font-size, 0.75rem);
1833
- color: var(--salla-autocomplete-secondary-text-color, #6b7280);
1834
- line-height: 1.4;
1835
- word-wrap: break-word;
1836
- overflow-wrap: break-word;
1837
- hyphens: auto;
1838
- }
1839
-
1840
- @media (max-width: 640px) {
1841
- .secondary-text {
1842
- font-size: var(--salla-autocomplete-secondary-text-font-size-mobile, 0.8125rem);
1843
- line-height: 1.3;
1844
- }
1845
- }
1846
-
1847
- .error-message {
1848
- margin-top: 0.5rem;
1849
- font-size: var(--salla-autocomplete-error-font-size, 0.875rem);
1850
- color: var(--salla-autocomplete-error-color, #dc2626);
1851
- }
1852
-
1853
- .no-results {
1854
- padding: 1rem;
1855
- text-align: start;
1856
- color: var(--salla-autocomplete-no-results-color, #6b7280);
1857
- font-size: var(--salla-autocomplete-no-results-font-size, 0.875rem);
1858
- }
1859
-
1860
- .no-results.error-state {
1861
- color: var(--salla-autocomplete-error-color, #dc2626);
1862
- background-color: var(--salla-autocomplete-error-bg, #fef2f2);
1863
- border-radius: 0.375rem;
1864
- margin: 0.5rem;
1865
- padding: 0.875rem;
1866
- }
1867
-
1868
- @media (max-width: 640px) {
1869
- .no-results {
1870
- padding: 0.875rem;
1871
- font-size: var(--salla-autocomplete-no-results-font-size-mobile, 0.8125rem);
1872
- }
1873
-
1874
- .no-results.error-state {
1875
- margin: 0.375rem;
1876
- padding: 0.75rem;
1877
- }
1878
- }
1879
- `;
1880
- h$1([
1881
- p({ type: String })
1882
- ], d$1.prototype, "proxyUrl", 2);
1883
- h$1([
1884
- p({ type: String })
1885
- ], d$1.prototype, "authToken", 2);
1886
- h$1([
1887
- p({ type: String })
1888
- ], d$1.prototype, "placeholder", 2);
1889
- h$1([
1890
- p({ type: String })
1891
- ], d$1.prototype, "defaultPlace", 2);
1892
- h$1([
1893
- p({ type: String })
1894
- ], d$1.prototype, "label", 2);
1895
- h$1([
1896
- p({ type: String })
1897
- ], d$1.prototype, "className", 2);
1898
- h$1([
1899
- p({ type: String })
1900
- ], d$1.prototype, "language", 2);
1901
- h$1([
1902
- p({ type: String })
1903
- ], d$1.prototype, "dir", 2);
1904
- h$1([
1905
- p({ type: String })
1906
- ], d$1.prototype, "mode", 2);
1907
- h$1([
1908
- p({ type: String })
1909
- ], d$1.prototype, "name", 2);
1910
- h$1([
1911
- p({ type: Boolean })
1912
- ], d$1.prototype, "required", 2);
1913
- h$1([
1914
- p({ type: String })
1915
- ], d$1.prototype, "pattern", 2);
1916
- h$1([
1917
- p({ type: String })
1918
- ], d$1.prototype, "tooltip", 2);
1919
- h$1([
1920
- p({ type: String })
1921
- ], d$1.prototype, "selectedId", 2);
1922
- h$1([
1923
- p({ type: Array })
1924
- ], d$1.prototype, "errors", 2);
1925
- h$1([
1926
- p({ type: Boolean })
1927
- ], d$1.prototype, "disabled", 2);
1928
- h$1([
1929
- p({ type: String })
1930
- ], d$1.prototype, "value", 1);
1931
- h$1([
1932
- p({ type: String })
1933
- ], d$1.prototype, "country", 1);
1934
- h$1([
1935
- p({ type: Object })
1936
- ], d$1.prototype, "locationBias", 2);
1937
- h$1([
1938
- p({ type: Object })
1939
- ], d$1.prototype, "locationRestriction", 2);
1940
- h$1([
1941
- p({ type: Array })
1942
- ], d$1.prototype, "types", 2);
1943
- h$1([
1944
- p({ type: String })
1945
- ], d$1.prototype, "fieldsStr", 1);
1946
- h$1([
1947
- p({ type: Array })
1948
- ], d$1.prototype, "fields", 1);
1949
- h$1([
1950
- p({ type: Boolean })
1951
- ], d$1.prototype, "strictBounds", 2);
1952
- h$1([
1953
- p({ type: Boolean })
1954
- ], d$1.prototype, "useSessionToken", 2);
1955
- h$1([
1956
- p({ type: Boolean })
1957
- ], d$1.prototype, "resolve", 2);
1958
- h$1([
1959
- p({ type: Function })
1960
- ], d$1.prototype, "onValidateAddress", 2);
1961
- h$1([
1962
- p({ type: Number })
1963
- ], d$1.prototype, "debounceDelay", 2);
1964
- h$1([
1965
- p({ type: Number })
1966
- ], d$1.prototype, "minChars", 2);
1967
- h$1([
1968
- b$1()
1969
- ], d$1.prototype, "predictions", 2);
1970
- h$1([
1971
- b$1()
1972
- ], d$1.prototype, "isOpen", 2);
1973
- h$1([
1974
- b$1()
1975
- ], d$1.prototype, "isLoading", 2);
1976
- h$1([
1977
- b$1()
1978
- ], d$1.prototype, "error", 2);
1979
- h$1([
1980
- b$1()
1981
- ], d$1.prototype, "activeIndex", 2);
1982
- h$1([
1983
- b$1()
1984
- ], d$1.prototype, "inputValue", 2);
1985
- h$1([
1986
- b$1()
1987
- ], d$1.prototype, "sessionToken", 2);
1988
- h$1([
1989
- b$1()
1990
- ], d$1.prototype, "validationError", 2);
1991
- h$1([
1992
- b$1()
1993
- ], d$1.prototype, "touched", 2);
1994
- h$1([
1995
- b$1()
1996
- ], d$1.prototype, "showNationalAddressIcon", 2);
1997
- h$1([
1998
- qe("input")
1999
- ], d$1.prototype, "inputElement", 2);
2000
- d$1 = h$1([
2001
- De("salla-address-autocomplete")
2002
- ], d$1);
2003
-
2004
- let K = false;
2005
- const W = /* @__PURE__ */ new Map();
2006
- const D = new Promise((t, e) => {
2007
- if (typeof window > "u") {
2008
- t();
2009
- return;
2010
- }
2011
- window.googleMapsInitCallback = t, window.gm_authFailure = () => {
2012
- e(new Error("Google Maps authentication failed"));
2013
- };
2014
- });
2015
- async function st(t) {
2016
- if (W.has(t))
2017
- return W.get(t);
2018
- if (await D, typeof google < "u" && google.maps && google.maps.importLibrary) {
2019
- const e = await google.maps.importLibrary(t);
2020
- return W.set(t, e), e;
2021
- }
2022
- return google.maps[t] || google.maps;
2023
- }
2024
- function ee(t, e, o) {
2025
- if (typeof document > "u")
2026
- return Promise.resolve();
2027
- if (K)
2028
- return D;
2029
- K = true;
2030
- let i;
2031
- if (typeof t == "string")
2032
- i = { key: t };
2033
- else if (typeof t == "object")
2034
- i = { ...t };
2035
- else
2036
- throw new Error("API key should be a string or an object");
2037
- Array.isArray(i.libraries) && (i.libraries = i.libraries), !e && !i.v && (e = "quarterly"), i.loading || (i.loading = "async"), i.callback = "googleMapsInitCallback";
2038
- let a = `https://maps.googleapis.com/maps/api/js?${Object.keys(i).map((p) => `${encodeURIComponent(p)}=${encodeURIComponent(i[p])}`).join("&")}`;
2039
- e && (a += `&v=${e}`);
2040
- const r = document.createElement("script");
2041
- return r.src = a, r.async = true, r.defer = true, r.onerror = (p) => {
2042
- console.error("Failed to load Google Maps script:", p);
2043
- }, document.body.appendChild(r), D;
2044
- }
2045
- const L = (t) => (e, o) => {
2046
- o !== void 0 ? o.addInitializer(() => {
2047
- customElements.define(t, e);
2048
- }) : customElements.define(t, e);
2049
- };
2050
- const j = globalThis, q = j.ShadowRoot && (j.ShadyCSS === void 0 || j.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, it = /* @__PURE__ */ Symbol(), J = /* @__PURE__ */ new WeakMap();
2051
- let at = class {
2052
- constructor(e, o, i) {
2053
- if (this._$cssResult$ = true, i !== it) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
2054
- this.cssText = e, this.t = o;
2055
- }
2056
- get styleSheet() {
2057
- let e = this.o;
2058
- const o = this.t;
2059
- if (q && e === void 0) {
2060
- const i = o !== void 0 && o.length === 1;
2061
- i && (e = J.get(o)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && J.set(o, e));
2062
- }
2063
- return e;
2064
- }
2065
- toString() {
2066
- return this.cssText;
2067
- }
2068
- };
2069
- const nt = (t) => new at(typeof t == "string" ? t : t + "", void 0, it), rt = (t, e) => {
2070
- if (q) t.adoptedStyleSheets = e.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
2071
- else for (const o of e) {
2072
- const i = document.createElement("style"), s = j.litNonce;
2073
- s !== void 0 && i.setAttribute("nonce", s), i.textContent = o.cssText, t.appendChild(i);
2074
- }
2075
- }, Y = q ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
2076
- let o = "";
2077
- for (const i of e.cssRules) o += i.cssText;
2078
- return nt(o);
2079
- })(t) : t;
2080
- const { is: lt, defineProperty: ct, getOwnPropertyDescriptor: pt, getOwnPropertyNames: ht, getOwnPropertySymbols: ut, getPrototypeOf: dt } = Object, G = globalThis, X = G.trustedTypes, mt = X ? X.emptyScript : "", gt = G.reactiveElementPolyfillSupport, U = (t, e) => t, R = { toAttribute(t, e) {
2081
- switch (e) {
2082
- case Boolean:
2083
- t = t ? mt : null;
2084
- break;
2085
- case Object:
2086
- case Array:
2087
- t = t == null ? t : JSON.stringify(t);
2088
- }
2089
- return t;
2090
- }, fromAttribute(t, e) {
2091
- let o = t;
2092
- switch (e) {
2093
- case Boolean:
2094
- o = t !== null;
2095
- break;
2096
- case Number:
2097
- o = t === null ? null : Number(t);
2098
- break;
2099
- case Object:
2100
- case Array:
2101
- try {
2102
- o = JSON.parse(t);
2103
- } catch {
2104
- o = null;
2105
- }
2106
- }
2107
- return o;
2108
- } }, V = (t, e) => !lt(t, e), Q = { attribute: true, type: String, converter: R, reflect: false, useDefault: false, hasChanged: V };
2109
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), G.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
2110
- class A extends HTMLElement {
2111
- static addInitializer(e) {
2112
- this._$Ei(), (this.l ??= []).push(e);
2113
- }
2114
- static get observedAttributes() {
2115
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
2116
- }
2117
- static createProperty(e, o = Q) {
2118
- if (o.state && (o.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(e) && ((o = Object.create(o)).wrapped = true), this.elementProperties.set(e, o), !o.noAccessor) {
2119
- const i = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(e, i, o);
2120
- s !== void 0 && ct(this.prototype, e, s);
2121
- }
2122
- }
2123
- static getPropertyDescriptor(e, o, i) {
2124
- const { get: s, set: a } = pt(this.prototype, e) ?? { get() {
2125
- return this[o];
2126
- }, set(r) {
2127
- this[o] = r;
2128
- } };
2129
- return { get: s, set(r) {
2130
- const p = s?.call(this);
2131
- a?.call(this, r), this.requestUpdate(e, p, i);
2132
- }, configurable: true, enumerable: true };
2133
- }
2134
- static getPropertyOptions(e) {
2135
- return this.elementProperties.get(e) ?? Q;
2136
- }
2137
- static _$Ei() {
2138
- if (this.hasOwnProperty(U("elementProperties"))) return;
2139
- const e = dt(this);
2140
- e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
2141
- }
2142
- static finalize() {
2143
- if (this.hasOwnProperty(U("finalized"))) return;
2144
- if (this.finalized = true, this._$Ei(), this.hasOwnProperty(U("properties"))) {
2145
- const o = this.properties, i = [...ht(o), ...ut(o)];
2146
- for (const s of i) this.createProperty(s, o[s]);
2147
- }
2148
- const e = this[Symbol.metadata];
2149
- if (e !== null) {
2150
- const o = litPropertyMetadata.get(e);
2151
- if (o !== void 0) for (const [i, s] of o) this.elementProperties.set(i, s);
2152
- }
2153
- this._$Eh = /* @__PURE__ */ new Map();
2154
- for (const [o, i] of this.elementProperties) {
2155
- const s = this._$Eu(o, i);
2156
- s !== void 0 && this._$Eh.set(s, o);
2157
- }
2158
- this.elementStyles = this.finalizeStyles(this.styles);
2159
- }
2160
- static finalizeStyles(e) {
2161
- const o = [];
2162
- if (Array.isArray(e)) {
2163
- const i = new Set(e.flat(1 / 0).reverse());
2164
- for (const s of i) o.unshift(Y(s));
2165
- } else e !== void 0 && o.push(Y(e));
2166
- return o;
2167
- }
2168
- static _$Eu(e, o) {
2169
- const i = o.attribute;
2170
- return i === false ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
2171
- }
2172
- constructor() {
2173
- super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
2174
- }
2175
- _$Ev() {
2176
- this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
2177
- }
2178
- addController(e) {
2179
- (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
2180
- }
2181
- removeController(e) {
2182
- this._$EO?.delete(e);
2183
- }
2184
- _$E_() {
2185
- const e = /* @__PURE__ */ new Map(), o = this.constructor.elementProperties;
2186
- for (const i of o.keys()) this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]);
2187
- e.size > 0 && (this._$Ep = e);
2188
- }
2189
- createRenderRoot() {
2190
- const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
2191
- return rt(e, this.constructor.elementStyles), e;
2192
- }
2193
- connectedCallback() {
2194
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((e) => e.hostConnected?.());
2195
- }
2196
- enableUpdating(e) {
2197
- }
2198
- disconnectedCallback() {
2199
- this._$EO?.forEach((e) => e.hostDisconnected?.());
2200
- }
2201
- attributeChangedCallback(e, o, i) {
2202
- this._$AK(e, i);
2203
- }
2204
- _$ET(e, o) {
2205
- const i = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, i);
2206
- if (s !== void 0 && i.reflect === true) {
2207
- const a = (i.converter?.toAttribute !== void 0 ? i.converter : R).toAttribute(o, i.type);
2208
- this._$Em = e, a == null ? this.removeAttribute(s) : this.setAttribute(s, a), this._$Em = null;
2209
- }
2210
- }
2211
- _$AK(e, o) {
2212
- const i = this.constructor, s = i._$Eh.get(e);
2213
- if (s !== void 0 && this._$Em !== s) {
2214
- const a = i.getPropertyOptions(s), r = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter : R;
2215
- this._$Em = s;
2216
- const p = r.fromAttribute(o, a.type);
2217
- this[s] = p ?? this._$Ej?.get(s) ?? p, this._$Em = null;
2218
- }
2219
- }
2220
- requestUpdate(e, o, i, s = false, a) {
2221
- if (e !== void 0) {
2222
- const r = this.constructor;
2223
- if (s === false && (a = this[e]), i ??= r.getPropertyOptions(e), !((i.hasChanged ?? V)(a, o) || i.useDefault && i.reflect && a === this._$Ej?.get(e) && !this.hasAttribute(r._$Eu(e, i)))) return;
2224
- this.C(e, o, i);
2225
- }
2226
- this.isUpdatePending === false && (this._$ES = this._$EP());
2227
- }
2228
- C(e, o, { useDefault: i, reflect: s, wrapped: a }, r) {
2229
- i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, r ?? o ?? this[e]), a !== true || r !== void 0) || (this._$AL.has(e) || (this.hasUpdated || i || (o = void 0), this._$AL.set(e, o)), s === true && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
2230
- }
2231
- async _$EP() {
2232
- this.isUpdatePending = true;
2233
- try {
2234
- await this._$ES;
2235
- } catch (o) {
2236
- Promise.reject(o);
2237
- }
2238
- const e = this.scheduleUpdate();
2239
- return e != null && await e, !this.isUpdatePending;
2240
- }
2241
- scheduleUpdate() {
2242
- return this.performUpdate();
2243
- }
2244
- performUpdate() {
2245
- if (!this.isUpdatePending) return;
2246
- if (!this.hasUpdated) {
2247
- if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
2248
- for (const [s, a] of this._$Ep) this[s] = a;
2249
- this._$Ep = void 0;
2250
- }
2251
- const i = this.constructor.elementProperties;
2252
- if (i.size > 0) for (const [s, a] of i) {
2253
- const { wrapped: r } = a, p = this[s];
2254
- r !== true || this._$AL.has(s) || p === void 0 || this.C(s, void 0, a, p);
2255
- }
2256
- }
2257
- let e = false;
2258
- const o = this._$AL;
2259
- try {
2260
- e = this.shouldUpdate(o), e ? (this.willUpdate(o), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(o)) : this._$EM();
2261
- } catch (i) {
2262
- throw e = false, this._$EM(), i;
2263
- }
2264
- e && this._$AE(o);
2265
- }
2266
- willUpdate(e) {
2267
- }
2268
- _$AE(e) {
2269
- this._$EO?.forEach((o) => o.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(e)), this.updated(e);
2270
- }
2271
- _$EM() {
2272
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
2273
- }
2274
- get updateComplete() {
2275
- return this.getUpdateComplete();
2276
- }
2277
- getUpdateComplete() {
2278
- return this._$ES;
2279
- }
2280
- shouldUpdate(e) {
2281
- return true;
2282
- }
2283
- update(e) {
2284
- this._$Eq &&= this._$Eq.forEach((o) => this._$ET(o, this[o])), this._$EM();
2285
- }
2286
- updated(e) {
2287
- }
2288
- firstUpdated(e) {
2289
- }
2290
- }
2291
- A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[U("elementProperties")] = /* @__PURE__ */ new Map(), A[U("finalized")] = /* @__PURE__ */ new Map(), gt?.({ ReactiveElement: A }), (G.reactiveElementVersions ??= []).push("2.1.2");
2292
- const bt = { attribute: true, type: String, converter: R, reflect: false, hasChanged: V }, yt = (t = bt, e, o) => {
2293
- const { kind: i, metadata: s } = o;
2294
- let a = globalThis.litPropertyMetadata.get(s);
2295
- if (a === void 0 && globalThis.litPropertyMetadata.set(s, a = /* @__PURE__ */ new Map()), i === "setter" && ((t = Object.create(t)).wrapped = true), a.set(o.name, t), i === "accessor") {
2296
- const { name: r } = o;
2297
- return { set(p) {
2298
- const m = e.get.call(this);
2299
- e.set.call(this, p), this.requestUpdate(r, m, t, true, p);
2300
- }, init(p) {
2301
- return p !== void 0 && this.C(r, void 0, t, p), p;
2302
- } };
2303
- }
2304
- if (i === "setter") {
2305
- const { name: r } = o;
2306
- return function(p) {
2307
- const m = this[r];
2308
- e.call(this, p), this.requestUpdate(r, m, t, true, p);
2309
- };
2310
- }
2311
- throw Error("Unsupported decorator location: " + i);
2312
- };
2313
- function n(t) {
2314
- return (e, o) => typeof o == "object" ? yt(t, e, o) : ((i, s, a) => {
2315
- const r = s.hasOwnProperty(a);
2316
- return s.constructor.createProperty(a, i), r ? Object.getOwnPropertyDescriptor(s, a) : void 0;
2317
- })(t, e, o);
2318
- }
2319
- function h(t) {
2320
- return n({ ...t, state: true, attribute: false });
2321
- }
2322
- const ft = (t, e, o) => (o.configurable = true, o.enumerable = true, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, o), o);
2323
- function F(t, e) {
2324
- return (o, i, s) => {
2325
- const a = (r) => r.renderRoot?.querySelector(t) ?? null;
2326
- return ft(o, i, { get() {
2327
- return a(this);
2328
- } });
2329
- };
2330
- }
2331
- function _(t, e, o) {
2332
- const i = [];
2333
- return e.forEach((s) => {
2334
- if (!t || !google || !google.maps || !google.maps.event) return;
2335
- const a = google.maps.event.addListener(t, s, (r) => {
2336
- o(s, r);
2337
- });
2338
- i.push(() => {
2339
- a && google.maps.event.removeListener(a);
2340
- });
2341
- }), i;
2342
- }
2343
- function x(t) {
2344
- t.forEach((e) => e()), t.length = 0;
2345
- }
2346
- function B(t, e, o) {
2347
- if (!t) return;
2348
- const i = `set${e.charAt(0).toUpperCase()}${e.slice(1)}`;
2349
- typeof t[i] == "function" ? t[i](o) : e in t && (t[e] = o);
2350
- }
2351
- const vt = {
2352
- buttonLabel: "Use my current location",
2353
- errorTitle: "Unable to Access Location",
2354
- closeButton: "Continue",
2355
- loading: "Getting your location...",
2356
- loadingInstructions: "Please allow location access in your browser to continue",
2357
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2358
- permissionDenied: "Location access was denied. Please enable location services in your browser settings.",
2359
- positionUnavailable: "Your location is currently unavailable. Please check your device settings.",
2360
- timeout: "Location request timed out. Please try again.",
2361
- generalError: "Unable to get your location. Please try entering your address manually.",
2362
- clickToSelectLocation: "You can also choose your location by clicking on the map"
2363
- }, wt = {
2364
- buttonLabel: "استخدم موقعي الحالي",
2365
- errorTitle: "تعذر الوصول إلى الموقع",
2366
- closeButton: "متابعة",
2367
- loading: "جار الحصول على موقعك...",
2368
- loadingInstructions: "يرجى السماح بالوصول إلى الموقع في المتصفح للمتابعة",
2369
- timerMessage: "ستختفي هذه الرسالة تلقائياً بعد 7 ثوانٍ أو انقر متابعة",
2370
- permissionDenied: "تم رفض الوصول إلى الموقع. يرجى تفعيل خدمات الموقع في إعدادات المتصفح.",
2371
- positionUnavailable: "موقعك غير متاح حالياً. يرجى التحقق من إعدادات جهازك.",
2372
- timeout: "انتهت مهلة طلب الموقع. يرجى المحاولة مرة أخرى.",
2373
- generalError: "تعذر الحصول على موقعك. يرجى إدخال عنوانك يدوياً.",
2374
- clickToSelectLocation: "يمكنك أيضاً اختيار موقعك بالنقر على الخريطة"
2375
- }, kt = {
2376
- buttonLabel: "Usar mi ubicación actual",
2377
- errorTitle: "Error de ubicación",
2378
- closeButton: "Cerrar",
2379
- loading: "Obteniendo tu ubicación...",
2380
- loadingInstructions: "Permite el acceso a la ubicación en tu navegador para continuar",
2381
- timerMessage: "Este mensaje se ocultará automáticamente en 7 segundos o haz clic en Cerrar",
2382
- permissionDenied: "Se denegó el acceso a la ubicación. Habilita los servicios de ubicación en la configuración de tu navegador.",
2383
- positionUnavailable: "Tu ubicación no está disponible actualmente. Verifica la configuración de tu dispositivo.",
2384
- timeout: "La solicitud de ubicación expiró. Inténtalo de nuevo.",
2385
- generalError: "No se pudo obtener tu ubicación. Intenta ingresar tu dirección manualmente.",
2386
- clickToSelectLocation: "Haz clic en el mapa para seleccionar una ubicación"
2387
- }, Ct = {
2388
- buttonLabel: "Utiliser ma position actuelle",
2389
- errorTitle: "Erreur de localisation",
2390
- closeButton: "Continuer",
2391
- loading: "Obtention de votre position...",
2392
- loadingInstructions: "Veuillez autoriser l'accès à la localisation dans votre navigateur pour continuer",
2393
- timerMessage: "Ce message se masquera automatiquement dans 7 secondes ou cliquez sur Continuer",
2394
- permissionDenied: "L'accès à la localisation a été refusé. Veuillez activer les services de localisation dans les paramètres de votre navigateur.",
2395
- positionUnavailable: "Votre position n'est pas disponible actuellement. Veuillez vérifier les paramètres de votre appareil.",
2396
- timeout: "La demande de localisation a expiré. Veuillez réessayer.",
2397
- generalError: "Impossible d'obtenir votre position. Veuillez entrer votre adresse manuellement.",
2398
- clickToSelectLocation: "Vous pouvez également choisir votre position en cliquant sur la carte"
2399
- }, Et = {
2400
- buttonLabel: "Meinen aktuellen Standort verwenden",
2401
- errorTitle: "Standortfehler",
2402
- closeButton: "Schließen",
2403
- loading: "Getting your location...",
2404
- loadingInstructions: "Please allow location access in your browser to continue",
2405
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2406
- permissionDenied: "Der Zugriff auf den Standort wurde verweigert. Bitte aktivieren Sie die Standortdienste in Ihren Browsereinstellungen.",
2407
- positionUnavailable: "Ihr Standort ist derzeit nicht verfügbar. Bitte überprüfen Sie Ihre Geräteeinstellungen.",
2408
- timeout: "Standortanfrage ist abgelaufen. Bitte versuchen Sie es erneut.",
2409
- generalError: "Ihr Standort konnte nicht abgerufen werden. Bitte geben Sie Ihre Adresse manuell ein.",
2410
- clickToSelectLocation: "Klicken Sie auf die Karte, um einen Standort auszuwählen"
2411
- }, Lt = {
2412
- buttonLabel: "使用我的当前位置",
2413
- errorTitle: "位置错误",
2414
- closeButton: "关闭",
2415
- loading: "Getting your location...",
2416
- loadingInstructions: "Please allow location access in your browser to continue",
2417
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2418
- permissionDenied: "位置访问被拒绝。请在浏览器设置中启用位置服务。",
2419
- positionUnavailable: "您的位置当前不可用。请检查您的设备设置。",
2420
- timeout: "位置请求超时。请重试。",
2421
- generalError: "无法获取您的位置。请尝试手动输入地址。",
2422
- clickToSelectLocation: "点击地图选择位置"
2423
- }, Mt = {
2424
- buttonLabel: "現在地を使用",
2425
- errorTitle: "位置情報エラー",
2426
- closeButton: "閉じる",
2427
- loading: "Getting your location...",
2428
- loadingInstructions: "Please allow location access in your browser to continue",
2429
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2430
- permissionDenied: "位置情報へのアクセスが拒否されました。ブラウザの設定で位置情報サービスを有効にしてください。",
2431
- positionUnavailable: "現在位置が利用できません。デバイスの設定を確認してください。",
2432
- timeout: "位置情報リクエストがタイムアウトしました。もう一度お試しください。",
2433
- generalError: "位置情報を取得できませんでした。住所を手動で入力してください。",
2434
- clickToSelectLocation: "地図をクリックして場所を選択"
2435
- }, St = {
2436
- buttonLabel: "Usar minha localização atual",
2437
- errorTitle: "Erro de localização",
2438
- closeButton: "Fechar",
2439
- loading: "Getting your location...",
2440
- loadingInstructions: "Please allow location access in your browser to continue",
2441
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2442
- permissionDenied: "O acesso à localização foi negado. Ative os serviços de localização nas configurações do navegador.",
2443
- positionUnavailable: "Sua localização não está disponível no momento. Verifique as configurações do dispositivo.",
2444
- timeout: "A solicitação de localização expirou. Tente novamente.",
2445
- generalError: "Não foi possível obter sua localização. Tente inserir seu endereço manualmente.",
2446
- clickToSelectLocation: "Clique no mapa para selecionar um local"
2447
- }, _t = {
2448
- buttonLabel: "Использовать мое текущее местоположение",
2449
- errorTitle: "Ошибка местоположения",
2450
- closeButton: "Закрыть",
2451
- loading: "Getting your location...",
2452
- loadingInstructions: "Please allow location access in your browser to continue",
2453
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2454
- permissionDenied: "Доступ к местоположению был запрещен. Включите службы определения местоположения в настройках браузера.",
2455
- positionUnavailable: "Ваше местоположение в настоящее время недоступно. Проверьте настройки устройства.",
2456
- timeout: "Время ожидания запроса местоположения истекло. Попробуйте еще раз.",
2457
- generalError: "Не удалось получить ваше местоположение. Попробуйте ввести адрес вручную.",
2458
- clickToSelectLocation: "Нажмите на карту, чтобы выбрать местоположение"
2459
- }, xt = {
2460
- buttonLabel: "Usa la mia posizione attuale",
2461
- errorTitle: "Errore di posizione",
2462
- closeButton: "Chiudi",
2463
- loading: "Getting your location...",
2464
- loadingInstructions: "Please allow location access in your browser to continue",
2465
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2466
- permissionDenied: "L'accesso alla posizione è stato negato. Abilita i servizi di localizzazione nelle impostazioni del browser.",
2467
- positionUnavailable: "La tua posizione non è attualmente disponibile. Controlla le impostazioni del dispositivo.",
2468
- timeout: "La richiesta di posizione è scaduta. Riprova.",
2469
- generalError: "Impossibile ottenere la tua posizione. Prova a inserire manualmente il tuo indirizzo.",
2470
- clickToSelectLocation: "Fai clic sulla mappa per selezionare una posizione"
2471
- }, Pt = {
2472
- buttonLabel: "Gebruik mijn huidige locatie",
2473
- errorTitle: "Locatiefout",
2474
- closeButton: "Sluiten",
2475
- loading: "Getting your location...",
2476
- loadingInstructions: "Please allow location access in your browser to continue",
2477
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2478
- permissionDenied: "Toegang tot locatie is geweigerd. Schakel locatieservices in in uw browserinstellingen.",
2479
- positionUnavailable: "Uw locatie is momenteel niet beschikbaar. Controleer uw apparaatinstellingen.",
2480
- timeout: "Locatieverzoek is verlopen. Probeer het opnieuw.",
2481
- generalError: "Kan uw locatie niet ophalen. Probeer uw adres handmatig in te voeren.",
2482
- clickToSelectLocation: "Klik op de kaart om een locatie te selecteren"
2483
- }, Ot = {
2484
- buttonLabel: "Mevcut konumumu kullan",
2485
- errorTitle: "Konum Hatası",
2486
- closeButton: "Kapat",
2487
- loading: "Getting your location...",
2488
- loadingInstructions: "Please allow location access in your browser to continue",
2489
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2490
- permissionDenied: "Konum erişimi reddedildi. Lütfen tarayıcı ayarlarınızda konum hizmetlerini etkinleştirin.",
2491
- positionUnavailable: "Konumunuz şu anda kullanılamıyor. Lütfen cihaz ayarlarınızı kontrol edin.",
2492
- timeout: "Konum isteği zaman aşımına uğradı. Lütfen tekrar deneyin.",
2493
- generalError: "Konumunuz alınamadı. Lütfen adresinizi manuel olarak girmeyi deneyin.",
2494
- clickToSelectLocation: "Bir konum seçmek için haritaya tıklayın"
2495
- }, $t = {
2496
- buttonLabel: "현재 위치 사용",
2497
- errorTitle: "위치 오류",
2498
- closeButton: "닫기",
2499
- loading: "Getting your location...",
2500
- loadingInstructions: "Please allow location access in your browser to continue",
2501
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2502
- permissionDenied: "위치 액세스가 거부되었습니다. 브라우저 설정에서 위치 서비스를 활성화하십시오.",
2503
- positionUnavailable: "현재 위치를 사용할 수 없습니다. 기기 설정을 확인하십시오.",
2504
- timeout: "위치 요청 시간이 초과되었습니다. 다시 시도하십시오.",
2505
- generalError: "위치를 가져올 수 없습니다. 수동으로 주소를 입력해 보십시오.",
2506
- clickToSelectLocation: "지도를 클릭하여 위치를 선택하십시오"
2507
- }, Tt = {
2508
- buttonLabel: "मेरा वर्तमान स्थान उपयोग करें",
2509
- errorTitle: "स्थान त्रुटि",
2510
- closeButton: "बंद करें",
2511
- loading: "Getting your location...",
2512
- loadingInstructions: "Please allow location access in your browser to continue",
2513
- timerMessage: "This message will auto-hide in 7 seconds or click Continue",
2514
- permissionDenied: "स्थान पहुंच अस्वीकार कर दी गई थी। कृपया अपनी ब्राउज़र सेटिंग में स्थान सेवाएं सक्षम करें।",
2515
- positionUnavailable: "आपका स्थान वर्तमान में उपलब्ध नहीं है। कृपया अपनी डिवाइस सेटिंग्स जांचें।",
2516
- timeout: "स्थान अनुरोध समय समाप्त हो गया। कृपया पुनः प्रयास करें।",
2517
- generalError: "आपका स्थान प्राप्त करने में असमर्थ। कृपया अपना पता मैन्युअल रूप से दर्ज करने का प्रयास करें।",
2518
- clickToSelectLocation: "स्थान चुनने के लिए मानचित्र पर क्लिक करें"
2519
- }, Z = {
2520
- en: vt,
2521
- ar: wt,
2522
- es: kt,
2523
- fr: Ct,
2524
- de: Et,
2525
- zh: Lt,
2526
- ja: Mt,
2527
- pt: St,
2528
- ru: _t,
2529
- it: xt,
2530
- nl: Pt,
2531
- tr: Ot,
2532
- ko: $t,
2533
- hi: Tt
2534
- }, zt = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
2535
- function tt(t = "en") {
2536
- return Z[t] || Z.en;
2537
- }
2538
- function et(t) {
2539
- return zt.has(t);
2540
- }
2541
- var It = Object.defineProperty, At = Object.getOwnPropertyDescriptor, c = (t, e, o, i) => {
2542
- for (var s = i > 1 ? void 0 : i ? At(e, o) : e, a = t.length - 1, r; a >= 0; a--)
2543
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
2544
- return i && s && It(e, o, s), s;
2545
- };
2546
- let l = class extends i {
2547
- constructor() {
2548
- super(...arguments), this.zoom = 15, this.mapTypeId = "roadmap", this.heading = 0, this.tilt = 0, this.gestureHandling = "cooperative", this.minZoom = 2, this.maxZoom = 19, this.disableDefaultUI = false, this.mapTypeControl = false, this.streetViewControl = false, this.rotateControl = false, this.fullscreenControl = false, this.enableGeolocation = false, this.showLocationMarker = true, this.geolocationOptions = {
2549
- maximumAge: 6e4,
2550
- timeout: 1e4,
2551
- enableHighAccuracy: true
2552
- }, this.locationMarkerBackground = "#4285F4", this.locationMarkerBorderColor = "#1967D2", this.locationMarkerGlyphColor = "#FFFFFF", this.locationMarkerScale = 1.3, this.locationCircleOptions = {}, this.language = "en", this.options = {}, this.enableAutocomplete = false, this.autocompleteProxyUrl = "https://api.salla.dev", this.autocompleteStrictBounds = false, this.autocompleteResolve = false, this.autocompleteDebounceDelay = 300, this.autocompleteMinChars = 3, this.geolocationLoading = false, this.geolocationError = null, this.showLoadingOverlay = false, this.buttonState = "normal", this.eventListeners = [], this.autocompleteListenerAttached = false;
2553
- }
2554
- async connectedCallback() {
2555
- super.connectedCallback(), et(this.language) && (document.dir = "rtl");
2556
- }
2557
- async firstUpdated() {
2558
- await D, this.createMap();
2559
- }
2560
- clearAutocompleteInput() {
2561
- if (!this.autocompleteElement) return;
2562
- const t = this.autocompleteElement.shadowRoot?.querySelector("input");
2563
- t && (t.value = "", this.autocompleteElement.inputValue = "", this.autocompleteElement.value = "");
2564
- }
2565
- setupAutocompleteListener() {
2566
- !this.enableAutocomplete || !this.autocompleteElement || this.autocompleteListenerAttached || (this.autocompleteElement.addEventListener("place-select", ((t) => {
2567
- const { place: e } = t.detail;
2568
- if (e?.geometry?.location) {
2569
- const { lat: o, lng: i } = e.geometry.location;
2570
- this.setLocation(o, i, 50, true), this.dispatchMapEvent("location_changed", {
2571
- position: { lat: o, lng: i },
2572
- accuracy: 50,
2573
- source: "autocomplete",
2574
- place: {
2575
- placeId: e.place_id,
2576
- formattedAddress: e.formatted_address,
2577
- addressComponents: e.address_components,
2578
- name: e.name,
2579
- types: e.types
2580
- }
2581
- }), this.dispatchMapEvent("autocomplete_place_selected", {
2582
- place: e
2583
- });
2584
- }
2585
- })), this.autocompleteListenerAttached = true);
2586
- }
2587
- disconnectedCallback() {
2588
- super.disconnectedCallback(), this.cleanup();
2589
- }
2590
- updated(t) {
2591
- super.updated(t), this.enableAutocomplete && !this.autocompleteListenerAttached && setTimeout(() => this.setupAutocompleteListener(), 0), this.map && (t.has("center") && this.center && B(this.map, "center", this.center), t.has("zoom") && this.zoom !== void 0 && B(this.map, "zoom", this.zoom), t.has("minZoom") && this.minZoom !== void 0 && this.map && this.map.setOptions({ minZoom: this.minZoom }), t.has("maxZoom") && this.maxZoom !== void 0 && this.map && this.map.setOptions({ maxZoom: this.maxZoom }), t.has("mapTypeId") && this.mapTypeId && B(this.map, "mapTypeId", this.mapTypeId), t.has("heading") && this.heading !== void 0 && B(this.map, "heading", this.heading), t.has("tilt") && this.tilt !== void 0 && B(this.map, "tilt", this.tilt), t.has("locationMarkerPosition") && this.locationMarkerPosition && this.showLocationMarker && this.setLocation(
2592
- this.locationMarkerPosition.lat,
2593
- this.locationMarkerPosition.lng,
2594
- this.locationMarkerPosition.accuracy
2595
- ));
2596
- }
2597
- createMap() {
2598
- if (!this.mapElement) return;
2599
- const t = {
2600
- center: this.center,
2601
- zoom: this.zoom,
2602
- mapId: this.mapId,
2603
- mapTypeId: this.mapTypeId,
2604
- heading: this.heading,
2605
- tilt: this.tilt,
2606
- gestureHandling: this.gestureHandling,
2607
- minZoom: this.minZoom,
2608
- maxZoom: this.maxZoom,
2609
- disableDefaultUI: this.disableDefaultUI,
2610
- zoomControl: this.zoomControl,
2611
- mapTypeControl: this.mapTypeControl,
2612
- scaleControl: this.scaleControl,
2613
- streetViewControl: this.streetViewControl,
2614
- rotateControl: this.rotateControl,
2615
- fullscreenControl: this.fullscreenControl,
2616
- disableDoubleClickZoom: true,
2617
- keyboardShortcuts: false,
2618
- zoomControlOptions: {
2619
- position: google.maps.ControlPosition.RIGHT_BOTTOM
2620
- },
2621
- ...this.options
2622
- };
2623
- this.map = new google.maps.Map(this.mapElement, t);
2624
- const e = google.maps.event.addListener(this.map, "click", (s) => {
2625
- if (s.latLng && this.showLocationMarker) {
2626
- const a = s.latLng.lat(), r = s.latLng.lng();
2627
- this.setLocation(a, r, 50, false), this.clearAutocompleteInput(), this.dispatchMapEvent("location_changed", {
2628
- position: { lat: a, lng: r },
2629
- accuracy: 50,
2630
- source: "map-click"
2631
- });
2632
- }
2633
- }), o = [
2634
- "click",
2635
- "dblclick",
2636
- "drag",
2637
- "dragend",
2638
- "dragstart",
2639
- "idle",
2640
- "mousemove",
2641
- "mouseout",
2642
- "mouseover",
2643
- "resize",
2644
- "rightclick",
2645
- "tilesloaded"
2646
- ];
2647
- this.eventListeners = _(this.map, o, (s, a) => {
2648
- this.dispatchMapEvent(s, a);
2649
- }), this.eventListeners.push(() => {
2650
- e && google.maps.event.removeListener(e);
2651
- }), ["center", "zoom", "bounds", "mapTypeId"].forEach((s) => {
2652
- const a = `${s}_changed`, r = google.maps.event.addListener(this.map, a, () => {
2653
- const p = `get${s.charAt(0).toUpperCase()}${s.slice(1)}`;
2654
- if (typeof this.map[p] == "function") {
2655
- const m = this.map[p]();
2656
- this.dispatchMapEvent(a, m);
2657
- }
2658
- });
2659
- this.eventListeners.push(() => {
2660
- r && google.maps.event.removeListener(r);
2661
- });
2662
- }), this.dispatchEvent(
2663
- new CustomEvent("gmap-ready", {
2664
- detail: { map: this.map },
2665
- bubbles: true,
2666
- composed: true
2667
- })
2668
- ), this.locationMarkerPosition && this.showLocationMarker && this.setLocation(
2669
- this.locationMarkerPosition.lat,
2670
- this.locationMarkerPosition.lng,
2671
- this.locationMarkerPosition.accuracy
2672
- );
2673
- }
2674
- dispatchMapEvent(t, e) {
2675
- let o = t;
2676
- t.includes("_changed") ? o = `gmap-${t.replace(/_/g, "-")}` : (t.startsWith("geolocation_") || t.startsWith("location_")) && (o = `gmap-${t.replace(/_/g, "-")}`), this.dispatchEvent(
2677
- new CustomEvent(o, {
2678
- detail: e,
2679
- bubbles: true,
2680
- composed: true
2681
- })
2682
- );
2683
- }
2684
- cleanup() {
2685
- x(this.eventListeners), this.locationMarker && (this.locationMarker.map = null, this.locationMarker = void 0), this.locationCircle && (this.locationCircle.setMap(null), this.locationCircle = void 0), this.map = void 0;
2686
- }
2687
- // Public API methods
2688
- panBy(t, e) {
2689
- this.map?.panBy(t, e);
2690
- }
2691
- panTo(t) {
2692
- this.map?.panTo(t);
2693
- }
2694
- panToBounds(t) {
2695
- this.map?.panToBounds(t);
2696
- }
2697
- fitBounds(t) {
2698
- this.map?.fitBounds(t);
2699
- }
2700
- resize() {
2701
- this.map && google.maps.event.trigger(this.map, "resize");
2702
- }
2703
- resizePreserveCenter() {
2704
- if (!this.map) return;
2705
- const t = this.map.getCenter();
2706
- google.maps.event.trigger(this.map, "resize"), t && this.map.setCenter(t);
2707
- }
2708
- /**
2709
- * Programmatically set the location marker position
2710
- * @param lat Latitude
2711
- * @param lng Longitude
2712
- * @param accuracy Optional accuracy in meters (default: 50)
2713
- * @param panTo Optional, pan map to location (default: true)
2714
- */
2715
- setLocation(t, e, o = 50, i = true) {
2716
- if (!this.map) {
2717
- console.warn("GMapMap: Cannot set location before map is initialized");
2718
- return;
2719
- }
2720
- const s = { lat: t, lng: e };
2721
- i && this.map.panTo(s), this.showLocationMarker && this.addLocationMarker(s, o), this.dispatchMapEvent("location_changed", {
2722
- position: s,
2723
- accuracy: o,
2724
- source: "programmatic"
2725
- });
2726
- }
2727
- async getCurrentLocation(t = false) {
2728
- if (!navigator.geolocation) {
2729
- const i = {
2730
- code: "NOT_SUPPORTED",
2731
- message: "Geolocation is not supported by this browser"
2732
- };
2733
- throw this.dispatchMapEvent("geolocation_error", i), t || this.showGeolocationError(this.getTranslation("generalError")), new Error("NOT_SUPPORTED");
2734
- }
2735
- this.geolocationLoading = true, this.buttonState = "loading", this.dispatchMapEvent("geolocation_loading", { message: "Getting your location..." });
2736
- const o = t ? null : setTimeout(() => {
2737
- this.geolocationLoading && (this.showLoadingOverlay = true);
2738
- }, 150);
2739
- return new Promise((i, s) => {
2740
- navigator.geolocation.getCurrentPosition(
2741
- (a) => {
2742
- const r = {
2743
- lat: a.coords.latitude,
2744
- lng: a.coords.longitude
2745
- };
2746
- if (o && clearTimeout(o), this.geolocationLoading = false, this.showLoadingOverlay = false, this.buttonState = "success", setTimeout(() => {
2747
- this.buttonState = "normal";
2748
- }, 2e3), this.map) {
2749
- this.map.panTo(r);
2750
- const m = a.coords.accuracy;
2751
- let y = 15;
2752
- m > 1e3 ? y = 12 : m > 500 ? y = 13 : m > 100 ? y = 14 : y = 16, this.map.setZoom(y), this.showLocationMarker && this.addLocationMarker(r, m), this.clearAutocompleteInput();
2753
- }
2754
- const p = {
2755
- position: r,
2756
- accuracy: a.coords.accuracy,
2757
- altitude: a.coords.altitude,
2758
- altitudeAccuracy: a.coords.altitudeAccuracy,
2759
- heading: a.coords.heading,
2760
- speed: a.coords.speed,
2761
- timestamp: a.timestamp
2762
- };
2763
- this.dispatchMapEvent("geolocation_success", p), this.dispatchMapEvent("location_changed", {
2764
- position: r,
2765
- accuracy: a.coords.accuracy,
2766
- source: "geolocation"
2767
- }), i(r);
2768
- },
2769
- (a) => {
2770
- o && clearTimeout(o), this.geolocationLoading = false, this.showLoadingOverlay = false, this.buttonState = "error", setTimeout(() => {
2771
- this.buttonState = "normal";
2772
- }, 2e3);
2773
- let r = "GENERAL_ERROR", p = this.getTranslation("generalError");
2774
- a.code === a.PERMISSION_DENIED ? (r = "PERMISSION_DENIED", p = this.getTranslation("permissionDenied")) : a.code === a.POSITION_UNAVAILABLE ? (r = "POSITION_UNAVAILABLE", p = this.getTranslation("positionUnavailable")) : a.code === a.TIMEOUT && (r = "TIMEOUT", p = this.getTranslation("timeout"));
2775
- const m = {
2776
- code: r,
2777
- message: p,
2778
- error: a
2779
- };
2780
- this.dispatchMapEvent("geolocation_error", m), t || this.showGeolocationError(p), s(a);
2781
- },
2782
- this.geolocationOptions
2783
- );
2784
- });
2785
- }
2786
- handleGeolocationClick() {
2787
- this.geolocationError = null, this.getCurrentLocation();
2788
- }
2789
- async addLocationMarker(t, e) {
2790
- if (this.map) {
2791
- if (this.locationMarker && (this.locationMarker.map = null, this.locationMarker = void 0), this.locationCircle && (this.locationCircle.setMap(null), this.locationCircle = void 0), !this.mapId) {
2792
- console.warn(
2793
- "GMapMap: mapId is required for location marker. Please set the mapId property on <gmap-map>. Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps"
2794
- );
2795
- return;
2796
- }
2797
- try {
2798
- const { AdvancedMarkerElement: o, PinElement: i } = await google.maps.importLibrary("marker"), s = new i({
2799
- background: this.locationMarkerBackground,
2800
- borderColor: this.locationMarkerBorderColor,
2801
- glyphColor: this.locationMarkerGlyphColor,
2802
- scale: this.locationMarkerScale
2803
- });
2804
- this.locationMarker = new o({
2805
- map: this.map,
2806
- position: t,
2807
- title: "Your Location (Drag to adjust)",
2808
- content: s.element,
2809
- gmpDraggable: true
2810
- }), this.locationMarker.addListener("dragend", () => {
2811
- if (this.locationMarker && this.locationCircle) {
2812
- const a = this.locationMarker.position, r = a.toJSON ? a.toJSON() : { lat: a.lat(), lng: a.lng() };
2813
- this.locationCircle.setCenter(r);
2814
- const p = this.locationCircle.getRadius();
2815
- this.clearAutocompleteInput(), this.dispatchMapEvent("location_marker_dragend", {
2816
- position: r,
2817
- accuracy: p
2818
- }), this.dispatchMapEvent("location_changed", {
2819
- position: r,
2820
- accuracy: p,
2821
- source: "marker-drag"
2822
- });
2823
- }
2824
- });
2825
- } catch (o) {
2826
- console.error("Error creating AdvancedMarkerElement:", o);
2827
- }
2828
- this.locationCircle = new google.maps.Circle({
2829
- map: this.map,
2830
- center: t,
2831
- radius: e,
2832
- fillColor: "#4285F4",
2833
- fillOpacity: 0.15,
2834
- strokeColor: "#4285F4",
2835
- strokeOpacity: 0.4,
2836
- strokeWeight: 1,
2837
- clickable: false,
2838
- ...this.locationCircleOptions
2839
- // Allow customization
2840
- });
2841
- }
2842
- }
2843
- showGeolocationError(t) {
2844
- this.geolocationError = t, setTimeout(() => {
2845
- this.geolocationError = null;
2846
- }, 7e3);
2847
- }
2848
- getTranslation(t) {
2849
- const o = {
2850
- loading: this.geolocationLoadingTitle,
2851
- loadingInstructions: this.geolocationLoadingInstructions,
2852
- errorTitle: this.geolocationErrorTitle,
2853
- closeButton: this.geolocationErrorButtonText,
2854
- timerMessage: this.geolocationErrorTimerMessage,
2855
- clickToSelectLocation: this.geolocationClickToSelectMessage,
2856
- generalError: this.geolocationGeneralErrorMessage,
2857
- permissionDenied: this.geolocationPermissionDeniedMessage,
2858
- positionUnavailable: this.geolocationPositionUnavailableMessage,
2859
- timeout: this.geolocationTimeoutMessage
2860
- }[t];
2861
- if (o != null && o !== "")
2862
- return o;
2863
- const i = tt(this.language);
2864
- return i[t] || i.generalError;
2865
- }
2866
- get buttonLabel() {
2867
- return this.geolocationButtonLabel !== void 0 ? this.geolocationButtonLabel : tt(this.language).buttonLabel || "";
2868
- }
2869
- getButtonIconColor() {
2870
- switch (this.buttonState) {
2871
- case "loading":
2872
- return "#999";
2873
- // Gray while loading
2874
- case "success":
2875
- return "#4285F4";
2876
- // Blue on success
2877
- case "error":
2878
- return "#EA4335";
2879
- default:
2880
- return "#666";
2881
- }
2882
- }
2883
- getMap() {
2884
- return this.map;
2885
- }
2886
- render() {
2887
- const t = et(this.language) ? "rtl" : "ltr";
2888
- return b$2`
2889
- <div class="map-page-wrapper">
2890
- ${this.enableAutocomplete ? b$2`
2891
- <div class="auto-complete-map-wrapper">
2892
- <div class="auto-complete-map-box" dir="${t}">
2893
- <salla-address-autocomplete
2894
- .proxyUrl=${this.autocompleteProxyUrl}
2895
- .authToken=${this.autocompleteAuthToken || null}
2896
- .placeholder=${this.autocompletePlaceholder || ""}
2897
- .label=${this.autocompleteLabel || null}
2898
- .language=${this.language}
2899
- .country=${this.autocompleteCountry || null}
2900
- .locationBias=${this.autocompleteLocationBias || null}
2901
- .locationRestriction=${this.autocompleteLocationRestriction || null}
2902
- .types=${this.autocompleteTypes ? this.autocompleteTypes.split(",").map((e) => e.trim()) : null}
2903
- .fieldsStr=${this.autocompleteFields || null}
2904
- .strictBounds=${this.autocompleteStrictBounds}
2905
- .resolve=${this.autocompleteResolve}
2906
- .debounceDelay=${this.autocompleteDebounceDelay}
2907
- .minChars=${this.autocompleteMinChars}
2908
- ></salla-address-autocomplete>
2909
- ${this.autocompleteHint ? b$2`<span class="hint-wrapper">${this.autocompleteHint}</span>` : ""}
2910
- </div>
2911
- </div>
2912
- ` : ""}
2913
-
2914
- <div class="map-container">
2915
- <div class="map"></div>
2916
- <slot></slot>
2917
-
2918
- ${this.enableGeolocation ? b$2`
2919
- <div class="controls-overlay">
2920
- <button
2921
- class="geolocation-button ${this.buttonLabel && this.buttonLabel.trim() ? "has-label" : ""}"
2922
- @click=${this.handleGeolocationClick}
2923
- title="Show your location"
2924
- ?disabled=${this.geolocationLoading}
2925
- >
2926
- <svg width="18" height="18" viewBox="0 0 24 24" fill="${this.getButtonIconColor()}">
2927
- <path
2928
- d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"
2929
- />
2930
- </svg>
2931
- ${this.buttonLabel && this.buttonLabel.trim() ? b$2`<span class="label">${this.buttonLabel}</span>` : ""}
2932
- </button>
2933
- </div>
2934
- ` : ""}
2935
-
2936
- ${this.showLoadingOverlay && !this.geolocationError ? b$2`
2937
- <div class="loading-overlay">
2938
- <div class="spinner"></div>
2939
- <div class="title">
2940
- ${this.getTranslation("loading")}
2941
- </div>
2942
- <div class="instructions">
2943
- ${this.getTranslation("loadingInstructions")}
2944
- </div>
2945
- </div>
2946
- ` : ""}
2947
-
2948
- ${this.geolocationError && !this.showLoadingOverlay ? b$2`
2949
- <div class="error-overlay">
2950
- <div class="error-icon">
2951
- <svg width="40" height="40" viewBox="0 0 24 24" fill="none">
2952
- <circle cx="12" cy="12" r="10" stroke="#ef4444" stroke-width="2" fill="none"/>
2953
- <path d="M12 8v4M12 16h.01" stroke="#ef4444" stroke-width="2" stroke-linecap="round"/>
2954
- </svg>
2955
- </div>
2956
- <div class="error-title">
2957
- ${this.getTranslation("errorTitle")}
2958
- </div>
2959
- <div class="error-message">${this.geolocationError}</div>
2960
- <div class="map-hint">
2961
- ${this.getTranslation("clickToSelectLocation")}
2962
- </div>
2963
- <div class="timer-message">
2964
- ${this.getTranslation("timerMessage")}
2965
- </div>
2966
- <button @click=${() => this.geolocationError = null}>
2967
- ${this.getTranslation("closeButton")}
2968
- </button>
2969
- </div>
2970
- ` : ""}
2971
- </div>
2972
- </div>
2973
- `;
2974
- }
2975
- };
2976
- l.styles = i$3`
2977
- :host {
2978
- display: block;
2979
- position: relative;
2980
- width: 100%;
2981
- height: 400px;
2982
- }
2983
-
2984
- @media (max-width: 640px) {
2985
- :host {
2986
- height: 65vh;
2987
- min-height: 300px;
2988
- }
2989
- }
2990
-
2991
- @media (max-width: 640px) and (min-height: 700px) {
2992
- :host {
2993
- height: 65vh;
2994
- }
2995
- }
2996
-
2997
- .map-container {
2998
- width: 100%;
2999
- height: 100%;
3000
- position: relative;
3001
- }
3002
-
3003
- .map {
3004
- width: 100%;
3005
- height: 100%;
3006
- }
3007
-
3008
- .controls-overlay {
3009
- position: absolute;
3010
- top: 0;
3011
- left: 0;
3012
- right: 0;
3013
- bottom: 0;
3014
- pointer-events: none;
3015
- z-index: 40;
3016
- }
3017
-
3018
- .controls-overlay > * {
3019
- pointer-events: auto;
3020
- }
3021
-
3022
- .geolocation-button {
3023
- position: absolute;
3024
- bottom: 23px;
3025
- left: 10px;
3026
- right: auto;
3027
- background: #fff;
3028
- border: none;
3029
- border-radius: 2px;
3030
- box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;
3031
- cursor: pointer;
3032
- padding: 10px;
3033
- height: 40px;
3034
- display: flex;
3035
- align-items: center;
3036
- justify-content: center;
3037
- gap: 8px;
3038
- outline: none;
3039
- color: rgb(86, 86, 86);
3040
- font-family: var(--gmap-font-family, Roboto, Arial, sans-serif);
3041
- font-size: 14px;
3042
- white-space: nowrap;
3043
- }
3044
-
3045
- @media (max-width: 640px) {
3046
- .geolocation-button {
3047
- bottom: 23px;
3048
- left: 10px;
3049
- right: auto;
3050
- }
3051
-
3052
- .geolocation-button .label {
3053
- display: none;
3054
- }
3055
-
3056
- .geolocation-button {
3057
- width: 40px !important;
3058
- padding: 10px !important;
3059
- }
3060
- }
3061
-
3062
- .geolocation-button.has-label {
3063
- width: auto;
3064
- padding: 8px 12px;
3065
- }
3066
-
3067
- .geolocation-button:not(.has-label) {
3068
- width: 40px;
3069
- }
3070
-
3071
- .geolocation-button:hover:not(:disabled) {
3072
- background: #ebebeb;
3073
- }
3074
-
3075
- .geolocation-button:disabled {
3076
- cursor: wait;
3077
- opacity: 0.6;
3078
- }
3079
-
3080
- .geolocation-button svg {
3081
- flex-shrink: 0;
3082
- }
3083
-
3084
- .geolocation-button .label {
3085
- font-weight: 500;
3086
- }
3087
-
3088
- .loading-overlay {
3089
- position: absolute;
3090
- top: 0;
3091
- left: 0;
3092
- right: 0;
3093
- bottom: 0;
3094
- background: rgba(0, 0, 0, 0.7);
3095
- z-index: 200;
3096
- display: flex;
3097
- flex-direction: column;
3098
- align-items: center;
3099
- justify-content: center;
3100
- gap: 16px;
3101
- padding: 16px;
3102
- font-family: var(--gmap-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
3103
- }
3104
-
3105
- .loading-overlay .spinner {
3106
- width: 48px;
3107
- height: 48px;
3108
- border: 4px solid rgba(255, 255, 255, 0.3);
3109
- border-top-color: #ffffff;
3110
- border-radius: 50%;
3111
- animation: spin 1s linear infinite;
3112
- }
3113
-
3114
- @keyframes spin {
3115
- to { transform: rotate(360deg); }
3116
- }
3117
-
3118
- .loading-overlay .title {
3119
- font-size: 18px;
3120
- font-weight: 600;
3121
- color: #ffffff;
3122
- margin: 0;
3123
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
3124
- }
3125
-
3126
- .loading-overlay .instructions {
3127
- font-size: 14px;
3128
- color: #ffffff;
3129
- line-height: 1.5;
3130
- margin: 0;
3131
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
3132
- text-align: center;
3133
- max-width: 90%;
3134
- }
3135
-
3136
- .error-overlay {
3137
- position: absolute;
3138
- top: 0;
3139
- left: 0;
3140
- right: 0;
3141
- bottom: 0;
3142
- background: rgba(0, 0, 0, 0.7);
3143
- z-index: 200;
3144
- display: flex;
3145
- flex-direction: column;
3146
- align-items: center;
3147
- justify-content: center;
3148
- gap: 12px;
3149
- padding: 16px;
3150
- font-family: var(--gmap-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
3151
- }
3152
-
3153
- .error-overlay .error-icon svg {
3154
- display: block;
3155
- }
3156
-
3157
- .error-overlay .error-title {
3158
- font-size: 17px;
3159
- font-weight: 600;
3160
- color: #ef4444;
3161
- margin: 0;
3162
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
3163
- }
3164
-
3165
- .error-overlay .error-message {
3166
- font-size: 14px;
3167
- color: #ffffff;
3168
- line-height: 1.4;
3169
- margin: 0;
3170
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
3171
- text-align: center;
3172
- max-width: 90%;
3173
- }
3174
-
3175
- .error-overlay .map-hint {
3176
- font-size: 12px;
3177
- color: #d4d4d4;
3178
- line-height: 1.4;
3179
- margin: 0;
3180
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
3181
- text-align: center;
3182
- font-style: italic;
3183
- }
3184
-
3185
- .error-overlay .timer-message {
3186
- font-size: 12px;
3187
- color: #d4d4d4;
3188
- margin: 0;
3189
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
3190
- }
3191
-
3192
- .error-overlay button {
3193
- margin-top: 4px;
3194
- padding: 8px 24px;
3195
- background: #ffffff;
3196
- color: #18181b;
3197
- border: none;
3198
- border-radius: 8px;
3199
- font-size: 14px;
3200
- font-weight: 600;
3201
- cursor: pointer;
3202
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
3203
- }
3204
-
3205
- .error-overlay button:hover {
3206
- background: #f4f4f5;
3207
- }
3208
-
3209
- .map-page-wrapper {
3210
- position: relative;
3211
- width: 100%;
3212
- height: 100%;
3213
- }
3214
-
3215
- .auto-complete-map-wrapper {
3216
- position: absolute;
3217
- z-index: 50;
3218
- padding: 1rem;
3219
- width: 100%;
3220
- top: 0;
3221
- left: 0;
3222
- right: 0;
3223
- pointer-events: none;
3224
- box-sizing: border-box;
3225
- }
3226
-
3227
- @media (max-width: 640px) {
3228
- .auto-complete-map-wrapper {
3229
- padding: 0.75rem 0.5rem;
3230
- }
3231
- }
3232
-
3233
- .auto-complete-map-wrapper > * {
3234
- pointer-events: auto;
3235
- }
3236
-
3237
- .auto-complete-map-box {
3238
- width: 100%;
3239
- display: flex;
3240
- flex-direction: column;
3241
- padding: 1rem;
3242
- background-color: #ffffffb2;
3243
- border-radius: 8px;
3244
- backdrop-filter: blur(4px);
3245
- box-sizing: border-box;
3246
- }
3247
-
3248
- @media (max-width: 640px) {
3249
- .auto-complete-map-box {
3250
- padding: 0.75rem;
3251
- }
3252
- }
3253
-
3254
- .auto-complete-map-box .hint-wrapper {
3255
- font-size: 12px;
3256
- color: #666666;
3257
- margin-top: 0.5rem;
3258
- text-align: start;
3259
- direction: inherit;
3260
- }
3261
- `;
3262
- c([
3263
- n({ type: Object })
3264
- ], l.prototype, "center", 2);
3265
- c([
3266
- n({ type: Number })
3267
- ], l.prototype, "zoom", 2);
3268
- c([
3269
- n({ type: String, attribute: "map-id" })
3270
- ], l.prototype, "mapId", 2);
3271
- c([
3272
- n({ type: String, attribute: "map-type-id" })
3273
- ], l.prototype, "mapTypeId", 2);
3274
- c([
3275
- n({ type: Number })
3276
- ], l.prototype, "heading", 2);
3277
- c([
3278
- n({ type: Number })
3279
- ], l.prototype, "tilt", 2);
3280
- c([
3281
- n({ type: Object })
3282
- ], l.prototype, "bounds", 2);
3283
- c([
3284
- n({ type: String })
3285
- ], l.prototype, "gestureHandling", 2);
3286
- c([
3287
- n({ type: Number })
3288
- ], l.prototype, "minZoom", 2);
3289
- c([
3290
- n({ type: Number })
3291
- ], l.prototype, "maxZoom", 2);
3292
- c([
3293
- n({ type: Boolean })
3294
- ], l.prototype, "disableDefaultUI", 2);
3295
- c([
3296
- n({ type: Boolean })
3297
- ], l.prototype, "zoomControl", 2);
3298
- c([
3299
- n({ type: Boolean })
3300
- ], l.prototype, "mapTypeControl", 2);
3301
- c([
3302
- n({ type: Boolean })
3303
- ], l.prototype, "scaleControl", 2);
3304
- c([
3305
- n({ type: Boolean })
3306
- ], l.prototype, "streetViewControl", 2);
3307
- c([
3308
- n({ type: Boolean })
3309
- ], l.prototype, "rotateControl", 2);
3310
- c([
3311
- n({ type: Boolean })
3312
- ], l.prototype, "fullscreenControl", 2);
3313
- c([
3314
- n({ type: Boolean, attribute: "enable-geolocation" })
3315
- ], l.prototype, "enableGeolocation", 2);
3316
- c([
3317
- n({ type: Boolean, attribute: "show-location-marker" })
3318
- ], l.prototype, "showLocationMarker", 2);
3319
- c([
3320
- n({ type: Object })
3321
- ], l.prototype, "geolocationOptions", 2);
3322
- c([
3323
- n({ type: Object, attribute: "location-marker-position" })
3324
- ], l.prototype, "locationMarkerPosition", 2);
3325
- c([
3326
- n({ type: String, attribute: "location-marker-background" })
3327
- ], l.prototype, "locationMarkerBackground", 2);
3328
- c([
3329
- n({ type: String, attribute: "location-marker-border-color" })
3330
- ], l.prototype, "locationMarkerBorderColor", 2);
3331
- c([
3332
- n({ type: String, attribute: "location-marker-glyph-color" })
3333
- ], l.prototype, "locationMarkerGlyphColor", 2);
3334
- c([
3335
- n({ type: Number, attribute: "location-marker-scale" })
3336
- ], l.prototype, "locationMarkerScale", 2);
3337
- c([
3338
- n({ type: Object, attribute: "location-circle-options" })
3339
- ], l.prototype, "locationCircleOptions", 2);
3340
- c([
3341
- n({ type: String })
3342
- ], l.prototype, "language", 2);
3343
- c([
3344
- n({ type: Object })
3345
- ], l.prototype, "options", 2);
3346
- c([
3347
- n({ type: String, attribute: "geolocation-button-label" })
3348
- ], l.prototype, "geolocationButtonLabel", 2);
3349
- c([
3350
- n({ type: String, attribute: "geolocation-loading-title" })
3351
- ], l.prototype, "geolocationLoadingTitle", 2);
3352
- c([
3353
- n({ type: String, attribute: "geolocation-loading-instructions" })
3354
- ], l.prototype, "geolocationLoadingInstructions", 2);
3355
- c([
3356
- n({ type: String, attribute: "geolocation-error-title" })
3357
- ], l.prototype, "geolocationErrorTitle", 2);
3358
- c([
3359
- n({ type: String, attribute: "geolocation-error-button-text" })
3360
- ], l.prototype, "geolocationErrorButtonText", 2);
3361
- c([
3362
- n({ type: String, attribute: "geolocation-error-timer-message" })
3363
- ], l.prototype, "geolocationErrorTimerMessage", 2);
3364
- c([
3365
- n({ type: String, attribute: "geolocation-click-to-select-message" })
3366
- ], l.prototype, "geolocationClickToSelectMessage", 2);
3367
- c([
3368
- n({ type: String, attribute: "geolocation-permission-denied-message" })
3369
- ], l.prototype, "geolocationPermissionDeniedMessage", 2);
3370
- c([
3371
- n({ type: String, attribute: "geolocation-position-unavailable-message" })
3372
- ], l.prototype, "geolocationPositionUnavailableMessage", 2);
3373
- c([
3374
- n({ type: String, attribute: "geolocation-timeout-message" })
3375
- ], l.prototype, "geolocationTimeoutMessage", 2);
3376
- c([
3377
- n({ type: String, attribute: "geolocation-general-error-message" })
3378
- ], l.prototype, "geolocationGeneralErrorMessage", 2);
3379
- c([
3380
- n({ type: Boolean, attribute: "enable-autocomplete" })
3381
- ], l.prototype, "enableAutocomplete", 2);
3382
- c([
3383
- n({ type: String, attribute: "autocomplete-hint" })
3384
- ], l.prototype, "autocompleteHint", 2);
3385
- c([
3386
- n({ type: String, attribute: "autocomplete-proxy-url" })
3387
- ], l.prototype, "autocompleteProxyUrl", 2);
3388
- c([
3389
- n({ type: String, attribute: "autocomplete-auth-token" })
3390
- ], l.prototype, "autocompleteAuthToken", 2);
3391
- c([
3392
- n({ type: String, attribute: "autocomplete-placeholder" })
3393
- ], l.prototype, "autocompletePlaceholder", 2);
3394
- c([
3395
- n({ type: String, attribute: "autocomplete-label" })
3396
- ], l.prototype, "autocompleteLabel", 2);
3397
- c([
3398
- n({ type: String, attribute: "autocomplete-country" })
3399
- ], l.prototype, "autocompleteCountry", 2);
3400
- c([
3401
- n({ type: Object, attribute: "autocomplete-location-bias" })
3402
- ], l.prototype, "autocompleteLocationBias", 2);
3403
- c([
3404
- n({ type: Object, attribute: "autocomplete-location-restriction" })
3405
- ], l.prototype, "autocompleteLocationRestriction", 2);
3406
- c([
3407
- n({ type: String, attribute: "autocomplete-types" })
3408
- ], l.prototype, "autocompleteTypes", 2);
3409
- c([
3410
- n({ type: String, attribute: "autocomplete-fields" })
3411
- ], l.prototype, "autocompleteFields", 2);
3412
- c([
3413
- n({ type: Boolean, attribute: "autocomplete-strict-bounds" })
3414
- ], l.prototype, "autocompleteStrictBounds", 2);
3415
- c([
3416
- n({ type: Boolean, attribute: "autocomplete-resolve" })
3417
- ], l.prototype, "autocompleteResolve", 2);
3418
- c([
3419
- n({ type: Number, attribute: "autocomplete-debounce-delay" })
3420
- ], l.prototype, "autocompleteDebounceDelay", 2);
3421
- c([
3422
- n({ type: Number, attribute: "autocomplete-min-chars" })
3423
- ], l.prototype, "autocompleteMinChars", 2);
3424
- c([
3425
- F(".map")
3426
- ], l.prototype, "mapElement", 2);
3427
- c([
3428
- F("salla-address-autocomplete")
3429
- ], l.prototype, "autocompleteElement", 2);
3430
- c([
3431
- h()
3432
- ], l.prototype, "geolocationLoading", 2);
3433
- c([
3434
- h()
3435
- ], l.prototype, "geolocationError", 2);
3436
- c([
3437
- h()
3438
- ], l.prototype, "showLoadingOverlay", 2);
3439
- c([
3440
- h()
3441
- ], l.prototype, "buttonState", 2);
3442
- l = c([
3443
- L("gmap-map")
3444
- ], l);
3445
- var Bt = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, d = (t, e, o, i) => {
3446
- for (var s = i > 1 ? void 0 : i ? Ut(e, o) : e, a = t.length - 1, r; a >= 0; a--)
3447
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
3448
- return i && s && Bt(e, o, s), s;
3449
- };
3450
- let u = class extends i {
3451
- constructor() {
3452
- super(...arguments), this.title = "", this.gmpDraggable = false, this.gmpClickable = true, this.scale = 1, this.draggable = false, this.clickable = true, this.eventListeners = [];
3453
- }
3454
- async connectedCallback() {
3455
- super.connectedCallback(), await this.initMarker();
3456
- }
3457
- disconnectedCallback() {
3458
- super.disconnectedCallback(), this.cleanup();
3459
- }
3460
- async updated(t) {
3461
- super.updated(t), this.marker && (t.has("position") && this.position && (this.marker.position = this.normalizePosition(this.position)), t.has("title") && this.title && (this.marker.title = this.title), t.has("gmpDraggable") && (this.marker.gmpDraggable = this.gmpDraggable || this.draggable), t.has("gmpClickable") && (this.marker.gmpClickable = this.gmpClickable !== false && this.clickable !== false), t.has("zIndex") && this.zIndex !== void 0 && (this.marker.zIndex = this.zIndex), (t.has("content") || t.has("background") || t.has("borderColor") || t.has("glyphColor") || t.has("scale") || t.has("icon") || t.has("label")) && this.updateMarkerContent());
3462
- }
3463
- async initMarker() {
3464
- this.addEventListener("gmap-ready", ((e) => {
3465
- this.map = e.detail.map, this.createMarker();
3466
- }));
3467
- const t = this.closest("gmap-map");
3468
- t?.getMap && (this.map = t.getMap(), this.map && await this.createMarker());
3469
- }
3470
- async createMarker() {
3471
- if (!this.map) {
3472
- console.error("GMapMarker: No map found. Make sure the marker is inside a <gmap-map> element.");
3473
- return;
3474
- }
3475
- if (!this.map.get?.("mapId")) {
3476
- console.error(
3477
- 'GMapMarker: AdvancedMarkerElement requires a mapId to be set on the map. Add mapId to your map. Example: mapId="YOUR_MAP_ID". Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps'
3478
- );
3479
- return;
3480
- }
3481
- this.markerLibrary = await st("marker");
3482
- const { AdvancedMarkerElement: e, PinElement: o } = this.markerLibrary, i = this.gmpDraggable || this.draggable, s = this.gmpClickable !== false && this.clickable !== false, a = {
3483
- map: this.map,
3484
- position: this.normalizePosition(this.position),
3485
- title: this.title,
3486
- gmpDraggable: i,
3487
- gmpClickable: s
3488
- };
3489
- if (this.zIndex !== void 0 && (a.zIndex = this.zIndex), this.content)
3490
- if (typeof this.content == "string") {
3491
- const p = document.createElement("div");
3492
- p.innerHTML = this.content, a.content = p;
3493
- } else
3494
- a.content = this.content;
3495
- else if (this.icon) {
3496
- const p = document.createElement("img");
3497
- p.src = this.icon, p.style.width = "32px", p.style.height = "32px", a.content = p;
3498
- } else {
3499
- const p = {
3500
- scale: this.scale || 1
3501
- };
3502
- this.background && (p.background = this.background), this.borderColor && (p.borderColor = this.borderColor), this.glyphColor && (p.glyphColor = this.glyphColor), this.label && typeof this.label == "string" && (p.glyph = this.label), this.pinElement = new o(p), this.pinElement?.element && (a.content = this.pinElement.element);
3503
- }
3504
- this.marker = new e(a);
3505
- const r = ["click", "drag", "dragstart", "dragend", "gmp-click"];
3506
- this.eventListeners = _(this.marker, r, (p, m) => {
3507
- if (p === "dragend" && this.marker && this.marker.position) {
3508
- const y = this.marker.position, H = y.toJSON ? y.toJSON() : { lat: y.lat(), lng: y.lng() };
3509
- this.dispatchEvent(
3510
- new CustomEvent("dragend", {
3511
- detail: { latLng: H },
3512
- bubbles: true,
3513
- composed: true
3514
- })
3515
- ), this.dispatchEvent(
3516
- new CustomEvent("gmap-position-changed", {
3517
- detail: H,
3518
- bubbles: true,
3519
- composed: true
3520
- })
3521
- );
3522
- } else
3523
- this.dispatchEvent(
3524
- new CustomEvent(p, {
3525
- detail: m,
3526
- bubbles: true,
3527
- composed: true
3528
- })
3529
- );
3530
- }), this.dispatchEvent(
3531
- new CustomEvent("gmap-marker-ready", {
3532
- detail: { marker: this.marker },
3533
- bubbles: true,
3534
- composed: true
3535
- })
3536
- );
3537
- }
3538
- updateMarkerContent() {
3539
- if (!this.marker || !this.markerLibrary) return;
3540
- const { PinElement: t } = this.markerLibrary;
3541
- if (this.content)
3542
- if (typeof this.content == "string") {
3543
- const e = document.createElement("div");
3544
- e.innerHTML = this.content, this.marker.content = e;
3545
- } else
3546
- this.marker.content = this.content;
3547
- else if (this.icon) {
3548
- const e = document.createElement("img");
3549
- e.src = this.icon, e.style.width = "32px", e.style.height = "32px", this.marker.content = e;
3550
- } else {
3551
- const e = {
3552
- scale: this.scale || 1
3553
- };
3554
- this.background && (e.background = this.background), this.borderColor && (e.borderColor = this.borderColor), this.glyphColor && (e.glyphColor = this.glyphColor), this.label && typeof this.label == "string" && (e.glyph = this.label), this.pinElement = new t(e), this.pinElement?.element && (this.marker.content = this.pinElement.element);
3555
- }
3556
- }
3557
- normalizePosition(t) {
3558
- return t ? {
3559
- lat: typeof t.lat == "number" ? t.lat : parseFloat(t.lat),
3560
- lng: typeof t.lng == "number" ? t.lng : parseFloat(t.lng)
3561
- } : { lat: 0, lng: 0 };
3562
- }
3563
- cleanup() {
3564
- x(this.eventListeners), this.marker && (this.marker.map = null, this.marker = void 0);
3565
- }
3566
- getMarker() {
3567
- return this.marker;
3568
- }
3569
- render() {
3570
- return b$2`<slot></slot>`;
3571
- }
3572
- };
3573
- d([
3574
- n({ type: Object })
3575
- ], u.prototype, "position", 2);
3576
- d([
3577
- n({ type: String })
3578
- ], u.prototype, "title", 2);
3579
- d([
3580
- n({ type: Boolean })
3581
- ], u.prototype, "gmpDraggable", 2);
3582
- d([
3583
- n({ type: Boolean })
3584
- ], u.prototype, "gmpClickable", 2);
3585
- d([
3586
- n({ type: Number })
3587
- ], u.prototype, "zIndex", 2);
3588
- d([
3589
- n({ type: Object })
3590
- ], u.prototype, "content", 2);
3591
- d([
3592
- n({ type: String })
3593
- ], u.prototype, "background", 2);
3594
- d([
3595
- n({ type: String })
3596
- ], u.prototype, "borderColor", 2);
3597
- d([
3598
- n({ type: String })
3599
- ], u.prototype, "glyphColor", 2);
3600
- d([
3601
- n({ type: Number })
3602
- ], u.prototype, "scale", 2);
3603
- d([
3604
- n({ type: Boolean })
3605
- ], u.prototype, "draggable", 2);
3606
- d([
3607
- n({ type: Boolean })
3608
- ], u.prototype, "clickable", 2);
3609
- d([
3610
- n({ type: String })
3611
- ], u.prototype, "icon", 2);
3612
- d([
3613
- n({ type: String })
3614
- ], u.prototype, "label", 2);
3615
- d([
3616
- h()
3617
- ], u.prototype, "marker", 2);
3618
- d([
3619
- h()
3620
- ], u.prototype, "map", 2);
3621
- u = d([
3622
- L("gmap-marker")
3623
- ], u);
3624
- var Dt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, P = (t, e, o, i) => {
3625
- for (var s = i > 1 ? void 0 : i ? jt(e, o) : e, a = t.length - 1, r; a >= 0; a--)
3626
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
3627
- return i && s && Dt(e, o, s), s;
3628
- };
3629
- let f = class extends i {
3630
- constructor() {
3631
- super(...arguments), this.opened = true, this.options = {}, this.eventListeners = [];
3632
- }
3633
- async connectedCallback() {
3634
- super.connectedCallback(), await this.initInfoWindow();
3635
- }
3636
- disconnectedCallback() {
3637
- super.disconnectedCallback(), this.cleanup();
3638
- }
3639
- updated(t) {
3640
- super.updated(t), this.infoWindow && (t.has("opened") && (this.opened ? this.open() : this.close()), t.has("position") && this.position && !this.marker && this.infoWindow.setPosition(this.position), t.has("zIndex") && this.zIndex !== void 0 && this.infoWindow.setZIndex(this.zIndex));
3641
- }
3642
- async initInfoWindow() {
3643
- const t = this.closest("gmap-marker");
3644
- if (t)
3645
- this.addEventListener("gmap-marker-ready", ((e) => {
3646
- this.marker = e.detail.marker, this.createInfoWindow();
3647
- })), t.getMarker && (this.marker = t.getMarker(), this.marker && await this.createInfoWindow());
3648
- else {
3649
- const e = this.closest("gmap-map");
3650
- e && (this.addEventListener("gmap-ready", ((o) => {
3651
- this.map = o.detail.map, this.createInfoWindow();
3652
- })), e.getMap && (this.map = e.getMap(), this.map && await this.createInfoWindow()));
3653
- }
3654
- }
3655
- async createInfoWindow() {
3656
- const t = document.createElement("div");
3657
- t.style.cssText = "min-width: 200px;";
3658
- const e = {
3659
- content: t,
3660
- ...this.options
3661
- };
3662
- this.zIndex !== void 0 && (e.zIndex = this.zIndex), this.position && !this.marker && (e.position = this.position), this.infoWindow = new google.maps.InfoWindow(e), this.observeSlotContent(t);
3663
- const o = ["closeclick", "domready", "content_changed"];
3664
- this.eventListeners = _(this.infoWindow, o, (i) => {
3665
- i === "closeclick" && (this.opened = false), this.dispatchEvent(
3666
- new CustomEvent(i, {
3667
- bubbles: true,
3668
- composed: true
3669
- })
3670
- );
3671
- }), this.opened && this.open();
3672
- }
3673
- observeSlotContent(t) {
3674
- this.renderSlotContent(t);
3675
- const e = this.shadowRoot?.querySelector("slot");
3676
- e && e.addEventListener("slotchange", () => {
3677
- this.renderSlotContent(t);
3678
- }), this.contentObserver = new MutationObserver(() => {
3679
- this.renderSlotContent(t);
3680
- }), this.contentObserver.observe(this, {
3681
- childList: true,
3682
- subtree: true,
3683
- characterData: true
3684
- });
3685
- }
3686
- renderSlotContent(t) {
3687
- const e = this.shadowRoot?.querySelector("slot");
3688
- if (e) {
3689
- const o = e.assignedNodes({ flatten: true });
3690
- t.innerHTML = "", o.forEach((i) => {
3691
- (i.nodeType === Node.ELEMENT_NODE || i.nodeType === Node.TEXT_NODE && i.textContent?.trim()) && t.appendChild(i.cloneNode(true));
3692
- });
3693
- }
3694
- }
3695
- open() {
3696
- this.infoWindow && (this.marker ? this.infoWindow.open({
3697
- anchor: this.marker,
3698
- map: this.map
3699
- }) : this.map && this.infoWindow.open(this.map));
3700
- }
3701
- close() {
3702
- this.infoWindow?.close();
3703
- }
3704
- cleanup() {
3705
- x(this.eventListeners), this.contentObserver && (this.contentObserver.disconnect(), this.contentObserver = void 0), this.infoWindow && (this.infoWindow.close(), this.infoWindow = void 0);
3706
- }
3707
- getInfoWindow() {
3708
- return this.infoWindow;
3709
- }
3710
- render() {
3711
- return b$2`<slot></slot>`;
3712
- }
3713
- };
3714
- f.styles = i$3`
3715
- :host {
3716
- display: contents;
3717
- }
3718
- `;
3719
- P([
3720
- n({ type: Boolean })
3721
- ], f.prototype, "opened", 2);
3722
- P([
3723
- n({ type: Object })
3724
- ], f.prototype, "position", 2);
3725
- P([
3726
- n({ type: Number })
3727
- ], f.prototype, "zIndex", 2);
3728
- P([
3729
- n({ type: Object })
3730
- ], f.prototype, "options", 2);
3731
- P([
3732
- h()
3733
- ], f.prototype, "infoWindow", 2);
3734
- P([
3735
- h()
3736
- ], f.prototype, "map", 2);
3737
- P([
3738
- h()
3739
- ], f.prototype, "marker", 2);
3740
- f = P([
3741
- L("gmap-info-window")
3742
- ], f);
3743
- var Rt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, z = (t, e, o, i) => {
3744
- for (var s = i > 1 ? void 0 : i ? Gt(e, o) : e, a = t.length - 1, r; a >= 0; a--)
3745
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
3746
- return i && s && Rt(e, o, s), s;
3747
- };
3748
- let M = class extends i {
3749
- constructor() {
3750
- super(...arguments), this.path = [], this.editable = false, this.draggable = false, this.options = {}, this.eventListeners = [];
3751
- }
3752
- async connectedCallback() {
3753
- super.connectedCallback(), await this.initPolyline();
3754
- }
3755
- disconnectedCallback() {
3756
- super.disconnectedCallback(), this.cleanup();
3757
- }
3758
- updated(t) {
3759
- super.updated(t), this.polyline && (t.has("path") && this.path && this.polyline.setPath(this.path), t.has("editable") && this.polyline.setEditable(this.editable), t.has("draggable") && this.polyline.setDraggable(this.draggable), t.has("options") && this.polyline.setOptions(this.options));
3760
- }
3761
- async initPolyline() {
3762
- const t = this.closest("gmap-map");
3763
- t && (this.addEventListener("gmap-ready", ((e) => {
3764
- this.map = e.detail.map, this.createPolyline();
3765
- })), t.getMap && (this.map = t.getMap(), this.map && await this.createPolyline()));
3766
- }
3767
- async createPolyline() {
3768
- if (!this.map) return;
3769
- const t = {
3770
- map: this.map,
3771
- path: this.path,
3772
- editable: this.editable,
3773
- draggable: this.draggable,
3774
- ...this.options
3775
- };
3776
- this.polyline = new google.maps.Polyline(t);
3777
- const e = [
3778
- "click",
3779
- "dblclick",
3780
- "drag",
3781
- "dragend",
3782
- "dragstart",
3783
- "mousedown",
3784
- "mousemove",
3785
- "mouseout",
3786
- "mouseover",
3787
- "mouseup",
3788
- "rightclick"
3789
- ];
3790
- this.eventListeners = _(this.polyline, e, (a, r) => {
3791
- this.dispatchEvent(
3792
- new CustomEvent(a, {
3793
- detail: r,
3794
- bubbles: true,
3795
- composed: true
3796
- })
3797
- );
3798
- });
3799
- const o = google.maps.event.addListener(this.polyline.getPath(), "set_at", () => {
3800
- this.emitPathChanged();
3801
- }), i = google.maps.event.addListener(this.polyline.getPath(), "insert_at", () => {
3802
- this.emitPathChanged();
3803
- }), s = google.maps.event.addListener(this.polyline.getPath(), "remove_at", () => {
3804
- this.emitPathChanged();
3805
- });
3806
- this.eventListeners.push(
3807
- () => google.maps.event.removeListener(o),
3808
- () => google.maps.event.removeListener(i),
3809
- () => google.maps.event.removeListener(s)
3810
- );
3811
- }
3812
- emitPathChanged() {
3813
- if (!this.polyline) return;
3814
- const t = this.polyline.getPath().getArray().map((e) => ({
3815
- lat: e.lat(),
3816
- lng: e.lng()
3817
- }));
3818
- this.dispatchEvent(
3819
- new CustomEvent("gmap-path-changed", {
3820
- detail: t,
3821
- bubbles: true,
3822
- composed: true
3823
- })
3824
- );
3825
- }
3826
- cleanup() {
3827
- x(this.eventListeners), this.polyline && (this.polyline.setMap(null), this.polyline = void 0);
3828
- }
3829
- getPolyline() {
3830
- return this.polyline;
3831
- }
3832
- render() {
3833
- return b$2``;
3834
- }
3835
- };
3836
- z([
3837
- n({ type: Array })
3838
- ], M.prototype, "path", 2);
3839
- z([
3840
- n({ type: Boolean })
3841
- ], M.prototype, "editable", 2);
3842
- z([
3843
- n({ type: Boolean })
3844
- ], M.prototype, "draggable", 2);
3845
- z([
3846
- n({ type: Object })
3847
- ], M.prototype, "options", 2);
3848
- z([
3849
- h()
3850
- ], M.prototype, "polyline", 2);
3851
- z([
3852
- h()
3853
- ], M.prototype, "map", 2);
3854
- M = z([
3855
- L("gmap-polyline")
3856
- ], M);
3857
- var Wt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, O = (t, e, o, i) => {
3858
- for (var s = i > 1 ? void 0 : i ? Zt(e, o) : e, a = t.length - 1, r; a >= 0; a--)
3859
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
3860
- return i && s && Wt(e, o, s), s;
3861
- };
3862
- let w = class extends i {
3863
- constructor() {
3864
- super(...arguments), this.editable = false, this.draggable = false, this.options = {}, this.eventListeners = [];
3865
- }
3866
- async connectedCallback() {
3867
- super.connectedCallback(), await this.initPolygon();
3868
- }
3869
- disconnectedCallback() {
3870
- super.disconnectedCallback(), this.cleanup();
3871
- }
3872
- updated(t) {
3873
- super.updated(t), this.polygon && (t.has("path") && this.path && this.polygon.setPath(this.path), t.has("paths") && this.paths && this.polygon.setPaths(this.paths), t.has("editable") && this.polygon.setEditable(this.editable), t.has("draggable") && this.polygon.setDraggable(this.draggable), t.has("options") && this.polygon.setOptions(this.options));
3874
- }
3875
- async initPolygon() {
3876
- const t = this.closest("gmap-map");
3877
- t && (this.addEventListener("gmap-ready", ((e) => {
3878
- this.map = e.detail.map, this.createPolygon();
3879
- })), t.getMap && (this.map = t.getMap(), this.map && await this.createPolygon()));
3880
- }
3881
- async createPolygon() {
3882
- if (!this.map) return;
3883
- const t = {
3884
- map: this.map,
3885
- editable: this.editable,
3886
- draggable: this.draggable,
3887
- ...this.options
3888
- };
3889
- this.paths ? t.paths = this.paths : this.path && (t.paths = this.path), this.polygon = new google.maps.Polygon(t);
3890
- const e = [
3891
- "click",
3892
- "dblclick",
3893
- "drag",
3894
- "dragend",
3895
- "dragstart",
3896
- "mousedown",
3897
- "mousemove",
3898
- "mouseout",
3899
- "mouseover",
3900
- "mouseup",
3901
- "rightclick"
3902
- ];
3903
- this.eventListeners = _(this.polygon, e, (o, i) => {
3904
- this.dispatchEvent(
3905
- new CustomEvent(o, {
3906
- detail: i,
3907
- bubbles: true,
3908
- composed: true
3909
- })
3910
- );
3911
- }), this.paths ? this.bindPathsChanges() : this.bindPathChanges();
3912
- }
3913
- bindPathChanges() {
3914
- if (!this.polygon) return;
3915
- const t = this.polygon.getPath(), e = google.maps.event.addListener(t, "set_at", () => {
3916
- this.emitPathChanged();
3917
- }), o = google.maps.event.addListener(t, "insert_at", () => {
3918
- this.emitPathChanged();
3919
- }), i = google.maps.event.addListener(t, "remove_at", () => {
3920
- this.emitPathChanged();
3921
- });
3922
- this.eventListeners.push(
3923
- () => google.maps.event.removeListener(e),
3924
- () => google.maps.event.removeListener(o),
3925
- () => google.maps.event.removeListener(i)
3926
- );
3927
- }
3928
- bindPathsChanges() {
3929
- if (!this.polygon) return;
3930
- this.polygon.getPaths().forEach((e, o) => {
3931
- const i = google.maps.event.addListener(e, "set_at", () => {
3932
- this.emitPathsChanged();
3933
- }), s = google.maps.event.addListener(e, "insert_at", () => {
3934
- this.emitPathsChanged();
3935
- }), a = google.maps.event.addListener(e, "remove_at", () => {
3936
- this.emitPathsChanged();
3937
- });
3938
- this.eventListeners.push(
3939
- () => google.maps.event.removeListener(i),
3940
- () => google.maps.event.removeListener(s),
3941
- () => google.maps.event.removeListener(a)
3942
- );
3943
- });
3944
- }
3945
- emitPathChanged() {
3946
- if (!this.polygon) return;
3947
- const t = this.polygon.getPath().getArray().map((e) => ({
3948
- lat: e.lat(),
3949
- lng: e.lng()
3950
- }));
3951
- this.dispatchEvent(
3952
- new CustomEvent("gmap-path-changed", {
3953
- detail: t,
3954
- bubbles: true,
3955
- composed: true
3956
- })
3957
- );
3958
- }
3959
- emitPathsChanged() {
3960
- if (!this.polygon) return;
3961
- const t = this.polygon.getPaths().getArray().map(
3962
- (e) => e.getArray().map((o) => ({
3963
- lat: o.lat(),
3964
- lng: o.lng()
3965
- }))
3966
- );
3967
- this.dispatchEvent(
3968
- new CustomEvent("gmap-paths-changed", {
3969
- detail: t,
3970
- bubbles: true,
3971
- composed: true
3972
- })
3973
- );
3974
- }
3975
- cleanup() {
3976
- x(this.eventListeners), this.polygon && (this.polygon.setMap(null), this.polygon = void 0);
3977
- }
3978
- getPolygon() {
3979
- return this.polygon;
3980
- }
3981
- render() {
3982
- return b$2``;
3983
- }
3984
- };
3985
- O([
3986
- n({ type: Array })
3987
- ], w.prototype, "path", 2);
3988
- O([
3989
- n({ type: Array })
3990
- ], w.prototype, "paths", 2);
3991
- O([
3992
- n({ type: Boolean })
3993
- ], w.prototype, "editable", 2);
3994
- O([
3995
- n({ type: Boolean })
3996
- ], w.prototype, "draggable", 2);
3997
- O([
3998
- n({ type: Object })
3999
- ], w.prototype, "options", 2);
4000
- O([
4001
- h()
4002
- ], w.prototype, "polygon", 2);
4003
- O([
4004
- h()
4005
- ], w.prototype, "map", 2);
4006
- w = O([
4007
- L("gmap-polygon")
4008
- ], w);
4009
- var Nt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, $ = (t, e, o, i) => {
4010
- for (var s = i > 1 ? void 0 : i ? qt(e, o) : e, a = t.length - 1, r; a >= 0; a--)
4011
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
4012
- return i && s && Nt(e, o, s), s;
4013
- };
4014
- let k = class extends i {
4015
- constructor() {
4016
- super(...arguments), this.radius = 1e3, this.editable = false, this.draggable = false, this.options = {}, this.eventListeners = [];
4017
- }
4018
- async connectedCallback() {
4019
- super.connectedCallback(), await this.initCircle();
4020
- }
4021
- disconnectedCallback() {
4022
- super.disconnectedCallback(), this.cleanup();
4023
- }
4024
- updated(t) {
4025
- super.updated(t), this.circle && (t.has("center") && this.center && this.circle.setCenter(this.center), t.has("radius") && this.radius !== void 0 && this.circle.setRadius(this.radius), t.has("editable") && this.circle.setEditable(this.editable), t.has("draggable") && this.circle.setDraggable(this.draggable), t.has("options") && this.circle.setOptions(this.options));
4026
- }
4027
- async initCircle() {
4028
- const t = this.closest("gmap-map");
4029
- t && (this.addEventListener("gmap-ready", ((e) => {
4030
- this.map = e.detail.map, this.createCircle();
4031
- })), t.getMap && (this.map = t.getMap(), this.map && await this.createCircle()));
4032
- }
4033
- async createCircle() {
4034
- if (!this.map) return;
4035
- const t = {
4036
- map: this.map,
4037
- center: this.center,
4038
- radius: this.radius,
4039
- editable: this.editable,
4040
- draggable: this.draggable,
4041
- ...this.options
4042
- };
4043
- this.circle = new google.maps.Circle(t);
4044
- const e = [
4045
- "click",
4046
- "dblclick",
4047
- "drag",
4048
- "dragend",
4049
- "dragstart",
4050
- "mousedown",
4051
- "mousemove",
4052
- "mouseout",
4053
- "mouseover",
4054
- "mouseup",
4055
- "rightclick",
4056
- "center_changed",
4057
- "radius_changed",
4058
- "bounds_changed"
4059
- ];
4060
- this.eventListeners = _(this.circle, e, (o, i) => {
4061
- if (o === "center_changed") {
4062
- const s = this.circle.getCenter(), a = s ? { lat: s.lat(), lng: s.lng() } : null;
4063
- this.dispatchEvent(
4064
- new CustomEvent(o, {
4065
- detail: a,
4066
- bubbles: true,
4067
- composed: true
4068
- })
4069
- );
4070
- } else if (o === "radius_changed") {
4071
- const s = this.circle.getRadius();
4072
- this.dispatchEvent(
4073
- new CustomEvent(o, {
4074
- detail: s,
4075
- bubbles: true,
4076
- composed: true
4077
- })
4078
- );
4079
- } else
4080
- this.dispatchEvent(
4081
- new CustomEvent(o, {
4082
- detail: i,
4083
- bubbles: true,
4084
- composed: true
4085
- })
4086
- );
4087
- });
4088
- }
4089
- cleanup() {
4090
- x(this.eventListeners), this.circle && (this.circle.setMap(null), this.circle = void 0);
4091
- }
4092
- getCircle() {
4093
- return this.circle;
4094
- }
4095
- render() {
4096
- return b$2``;
4097
- }
4098
- };
4099
- $([
4100
- n({ type: Object })
4101
- ], k.prototype, "center", 2);
4102
- $([
4103
- n({ type: Number })
4104
- ], k.prototype, "radius", 2);
4105
- $([
4106
- n({ type: Boolean })
4107
- ], k.prototype, "editable", 2);
4108
- $([
4109
- n({ type: Boolean })
4110
- ], k.prototype, "draggable", 2);
4111
- $([
4112
- n({ type: Object })
4113
- ], k.prototype, "options", 2);
4114
- $([
4115
- h()
4116
- ], k.prototype, "circle", 2);
4117
- $([
4118
- h()
4119
- ], k.prototype, "map", 2);
4120
- k = $([
4121
- L("gmap-circle")
4122
- ], k);
4123
- var Vt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, I = (t, e, o, i) => {
4124
- for (var s = i > 1 ? void 0 : i ? Ft(e, o) : e, a = t.length - 1, r; a >= 0; a--)
4125
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
4126
- return i && s && Vt(e, o, s), s;
4127
- };
4128
- let S = class extends i {
4129
- constructor() {
4130
- super(...arguments), this.editable = false, this.draggable = false, this.options = {}, this.eventListeners = [];
4131
- }
4132
- async connectedCallback() {
4133
- super.connectedCallback(), await this.initRectangle();
4134
- }
4135
- disconnectedCallback() {
4136
- super.disconnectedCallback(), this.cleanup();
4137
- }
4138
- updated(t) {
4139
- super.updated(t), this.rectangle && (t.has("bounds") && this.bounds && this.rectangle.setBounds(this.bounds), t.has("editable") && this.rectangle.setEditable(this.editable), t.has("draggable") && this.rectangle.setDraggable(this.draggable), t.has("options") && this.rectangle.setOptions(this.options));
4140
- }
4141
- async initRectangle() {
4142
- const t = this.closest("gmap-map");
4143
- t && (this.addEventListener("gmap-ready", ((e) => {
4144
- this.map = e.detail.map, this.createRectangle();
4145
- })), t.getMap && (this.map = t.getMap(), this.map && await this.createRectangle()));
4146
- }
4147
- async createRectangle() {
4148
- if (!this.map) return;
4149
- const t = {
4150
- map: this.map,
4151
- bounds: this.bounds,
4152
- editable: this.editable,
4153
- draggable: this.draggable,
4154
- ...this.options
4155
- };
4156
- this.rectangle = new google.maps.Rectangle(t);
4157
- const e = [
4158
- "click",
4159
- "dblclick",
4160
- "drag",
4161
- "dragend",
4162
- "dragstart",
4163
- "mousedown",
4164
- "mousemove",
4165
- "mouseout",
4166
- "mouseover",
4167
- "mouseup",
4168
- "rightclick",
4169
- "bounds_changed"
4170
- ];
4171
- this.eventListeners = _(this.rectangle, e, (o, i) => {
4172
- if (o === "bounds_changed") {
4173
- const s = this.rectangle.getBounds();
4174
- if (s) {
4175
- const a = {
4176
- north: s.getNorthEast().lat(),
4177
- south: s.getSouthWest().lat(),
4178
- east: s.getNorthEast().lng(),
4179
- west: s.getSouthWest().lng()
4180
- };
4181
- this.dispatchEvent(
4182
- new CustomEvent(o, {
4183
- detail: a,
4184
- bubbles: true,
4185
- composed: true
4186
- })
4187
- );
4188
- }
4189
- } else
4190
- this.dispatchEvent(
4191
- new CustomEvent(o, {
4192
- detail: i,
4193
- bubbles: true,
4194
- composed: true
4195
- })
4196
- );
4197
- });
4198
- }
4199
- cleanup() {
4200
- x(this.eventListeners), this.rectangle && (this.rectangle.setMap(null), this.rectangle = void 0);
4201
- }
4202
- getRectangle() {
4203
- return this.rectangle;
4204
- }
4205
- render() {
4206
- return b$2``;
4207
- }
4208
- };
4209
- I([
4210
- n({ type: Object })
4211
- ], S.prototype, "bounds", 2);
4212
- I([
4213
- n({ type: Boolean })
4214
- ], S.prototype, "editable", 2);
4215
- I([
4216
- n({ type: Boolean })
4217
- ], S.prototype, "draggable", 2);
4218
- I([
4219
- n({ type: Object })
4220
- ], S.prototype, "options", 2);
4221
- I([
4222
- h()
4223
- ], S.prototype, "rectangle", 2);
4224
- I([
4225
- h()
4226
- ], S.prototype, "map", 2);
4227
- S = I([
4228
- L("gmap-rectangle")
4229
- ], S);
4230
- var Ht = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, T = (t, e, o, i) => {
4231
- for (var s = i > 1 ? void 0 : i ? Kt(e, o) : e, a = t.length - 1, r; a >= 0; a--)
4232
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
4233
- return i && s && Ht(e, o, s), s;
4234
- };
4235
- let C = class extends i {
4236
- constructor() {
4237
- super(...arguments), this.gridSize = 60, this.markers = [];
4238
- }
4239
- async connectedCallback() {
4240
- super.connectedCallback(), await this.initCluster();
4241
- }
4242
- disconnectedCallback() {
4243
- super.disconnectedCallback(), this.cleanup();
4244
- }
4245
- async initCluster() {
4246
- const t = this.closest("gmap-map");
4247
- t && (this.addEventListener("gmap-ready", ((e) => {
4248
- this.map = e.detail.map, this.createCluster();
4249
- })), t.getMap && (this.map = t.getMap(), this.map && await this.createCluster())), this.addEventListener("gmap-marker-ready", ((e) => {
4250
- const o = e.detail.marker;
4251
- this.addMarker(o);
4252
- }));
4253
- }
4254
- async createCluster() {
4255
- if (this.map)
4256
- try {
4257
- const t = await Promise.resolve().then(function () { return require('./index.esm-DOwgk2YK.js'); }).catch(() => null);
4258
- if (!t) {
4259
- console.error(
4260
- "GMapCluster: @googlemaps/markerclusterer not found. Install with: npm install @googlemaps/markerclusterer"
4261
- );
4262
- return;
4263
- }
4264
- const { MarkerClusterer: e } = t, o = {
4265
- map: this.map,
4266
- markers: this.markers
4267
- };
4268
- this.gridSize && (o.gridSize = this.gridSize), this.maxZoom !== void 0 && (o.maxZoom = this.maxZoom), this.styles && (o.styles = this.styles), this.calculator && (o.calculator = this.calculator), this.markerClusterer = new e(o);
4269
- } catch (t) {
4270
- console.error("GMapCluster: Error creating cluster:", t);
4271
- }
4272
- }
4273
- addMarker(t) {
4274
- this.markers.includes(t) || (this.markers.push(t), this.markerClusterer && this.markerClusterer.addMarker(t));
4275
- }
4276
- cleanup() {
4277
- this.markerClusterer && (this.markerClusterer.clearMarkers(), this.markerClusterer = void 0), this.markers = [];
4278
- }
4279
- getClusterer() {
4280
- return this.markerClusterer;
4281
- }
4282
- render() {
4283
- return b$2`<slot></slot>`;
4284
- }
4285
- };
4286
- T([
4287
- n({ type: Number })
4288
- ], C.prototype, "gridSize", 2);
4289
- T([
4290
- n({ type: Number })
4291
- ], C.prototype, "maxZoom", 2);
4292
- T([
4293
- n({ type: Array })
4294
- ], C.prototype, "styles", 2);
4295
- T([
4296
- n({ type: Function })
4297
- ], C.prototype, "calculator", 2);
4298
- T([
4299
- h()
4300
- ], C.prototype, "map", 2);
4301
- T([
4302
- h()
4303
- ], C.prototype, "markerClusterer", 2);
4304
- T([
4305
- h()
4306
- ], C.prototype, "markers", 2);
4307
- C = T([
4308
- L("gmap-cluster")
4309
- ], C);
4310
- var Jt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, v = (t, e, o, i) => {
4311
- for (var s = i > 1 ? void 0 : i ? Yt(e, o) : e, a = t.length - 1, r; a >= 0; a--)
4312
- (r = t[a]) && (s = (i ? r(e, o, s) : r(s)) || s);
4313
- return i && s && Jt(e, o, s), s;
4314
- };
4315
- let b = class extends i {
4316
- constructor() {
4317
- super(...arguments), this.zoom = 0, this.visible = true, this.motionTracking = true, this.options = {}, this.eventListeners = [];
4318
- }
4319
- async connectedCallback() {
4320
- super.connectedCallback();
4321
- }
4322
- async firstUpdated() {
4323
- await D, this.createPanorama();
4324
- }
4325
- disconnectedCallback() {
4326
- super.disconnectedCallback(), this.cleanup();
4327
- }
4328
- updated(t) {
4329
- super.updated(t), this.panorama && (t.has("position") && this.position && this.panorama.setPosition(this.position), t.has("pano") && this.pano && this.panorama.setPano(this.pano), t.has("zoom") && this.zoom !== void 0 && this.panorama.setZoom(this.zoom), t.has("pov") && this.pov && this.panorama.setPov(this.pov), t.has("visible") && this.panorama.setVisible(this.visible), t.has("motionTracking") && this.panorama.setMotionTracking(this.motionTracking));
4330
- }
4331
- createPanorama() {
4332
- if (!this.panoramaElement) return;
4333
- const t = {
4334
- position: this.position,
4335
- pano: this.pano,
4336
- zoom: this.zoom,
4337
- pov: this.pov,
4338
- visible: this.visible,
4339
- motionTracking: this.motionTracking,
4340
- ...this.options
4341
- };
4342
- this.panorama = new google.maps.StreetViewPanorama(this.panoramaElement, t);
4343
- const e = ["closeclick", "status_changed"];
4344
- this.eventListeners = _(this.panorama, e, (o, i) => {
4345
- this.dispatchEvent(
4346
- new CustomEvent(o, {
4347
- detail: i,
4348
- bubbles: true,
4349
- composed: true
4350
- })
4351
- );
4352
- });
4353
- }
4354
- cleanup() {
4355
- x(this.eventListeners), this.panorama = void 0;
4356
- }
4357
- resize() {
4358
- this.panorama && google.maps.event.trigger(this.panorama, "resize");
4359
- }
4360
- getPanorama() {
4361
- return this.panorama;
4362
- }
4363
- render() {
4364
- return b$2`<div class="panorama"></div>`;
4365
- }
4366
- };
4367
- b.styles = i$3`
4368
- :host {
4369
- display: block;
4370
- position: relative;
4371
- width: 100%;
4372
- height: 400px;
4373
- }
4374
-
4375
- .panorama {
4376
- width: 100%;
4377
- height: 100%;
4378
- }
4379
- `;
4380
- v([
4381
- n({ type: Object })
4382
- ], b.prototype, "position", 2);
4383
- v([
4384
- n({ type: String })
4385
- ], b.prototype, "pano", 2);
4386
- v([
4387
- n({ type: Number })
4388
- ], b.prototype, "zoom", 2);
4389
- v([
4390
- n({ type: Object })
4391
- ], b.prototype, "pov", 2);
4392
- v([
4393
- n({ type: Boolean })
4394
- ], b.prototype, "visible", 2);
4395
- v([
4396
- n({ type: Boolean })
4397
- ], b.prototype, "motionTracking", 2);
4398
- v([
4399
- n({ type: Object })
4400
- ], b.prototype, "options", 2);
4401
- v([
4402
- F(".panorama")
4403
- ], b.prototype, "panoramaElement", 2);
4404
- v([
4405
- h()
4406
- ], b.prototype, "panorama", 2);
4407
- b = v([
4408
- L("gmap-street-view-panorama")
4409
- ], b);
4410
-
4411
11
  var GetDirections = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4412
12
  <path
4413
13
  d="M7.94798 3.19336C11.1309 2.1083 12.7223 1.56578 13.5783 2.42174C14.4342 3.27771 13.8917 4.86914 12.8066 8.05201L12.0678 10.2195C11.2344 12.6639 10.8178 13.8861 10.131 13.9872C9.94631 14.0144 9.75517 13.9981 9.57248 13.9394C8.89297 13.7212 8.53377 12.4326 7.81538 9.8553C7.65604 9.28364 7.57637 8.99781 7.39494 8.7795C7.34228 8.71614 7.28386 8.65772 7.2205 8.60506C7.00219 8.42363 6.71636 8.34396 6.1447 8.18462C3.56741 7.46623 2.27876 7.10703 2.0606 6.42752C2.00195 6.24483 1.98558 6.05369 2.01277 5.86903C2.11392 5.18221 3.33613 4.76556 5.78054 3.93225L7.94798 3.19336Z"
@@ -5712,11 +1312,17 @@ const SallaBulletDelivery = class {
5712
1312
  try {
5713
1313
  const mapsKey = salla.config.get('store.settings.keys.maps');
5714
1314
  if (mapsKey) {
5715
- ee({
1315
+ const bootMaps = () => Promise.resolve().then(function () { return require('./index-CIbBkRPw.js'); })
1316
+ .then(({ load }) => load({
5716
1317
  key: mapsKey,
5717
1318
  libraries: ['marker', 'places'],
5718
1319
  language: salla.config.get('user.language_code') || 'ar',
5719
- }).catch(err => log('Failed to load Google Maps SDK', err));
1320
+ }))
1321
+ .catch(err => log('Failed to load Google Maps SDK', err));
1322
+ if (document.readyState === 'complete')
1323
+ bootMaps();
1324
+ else
1325
+ window.addEventListener('load', bootMaps, { once: true });
5720
1326
  }
5721
1327
  this.addressToken = await helpers.bulletDeliveryAPI.getAddressToken();
5722
1328
  }