@salla.sa/twilight-components 2.14.573 → 2.14.575

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