@salla.sa/twilight-theme-engine 1.0.68 → 1.0.70

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 (264) hide show
  1. package/dist/{AddToCartForm-TX36PDIE.js → AddToCartForm-RVJDH34Q.js} +3 -3
  2. package/dist/{AddToCartForm-TX36PDIE.js.map → AddToCartForm-RVJDH34Q.js.map} +1 -1
  3. package/dist/{BlogAuthorPage-AT6YYDG4.js → BlogAuthorPage-HRUKRVXC.js} +21 -21
  4. package/dist/{BlogAuthorPage-AT6YYDG4.js.map → BlogAuthorPage-HRUKRVXC.js.map} +1 -1
  5. package/dist/{BlogCategoryPage-ELPLV67S.js → BlogCategoryPage-X2BB6FPW.js} +21 -21
  6. package/dist/{BlogCategoryPage-ELPLV67S.js.map → BlogCategoryPage-X2BB6FPW.js.map} +1 -1
  7. package/dist/{BlogPage-RO3U4OTI.js → BlogPage-LMN2BBLX.js} +19 -19
  8. package/dist/{BlogPage-RO3U4OTI.js.map → BlogPage-LMN2BBLX.js.map} +1 -1
  9. package/dist/{BlogSinglePage-HSRVLJYE.js → BlogSinglePage-D46SPQTX.js} +19 -19
  10. package/dist/{BlogSinglePage-HSRVLJYE.js.map → BlogSinglePage-D46SPQTX.js.map} +1 -1
  11. package/dist/{BlogTagPage-KLCLNP2Q.js → BlogTagPage-WEJAPD5G.js} +21 -21
  12. package/dist/{BlogTagPage-KLCLNP2Q.js.map → BlogTagPage-WEJAPD5G.js.map} +1 -1
  13. package/dist/{BrandsPage-C2TTKTMV.js → BrandsPage-4M2DWNN3.js} +20 -20
  14. package/dist/{BrandsPage-C2TTKTMV.js.map → BrandsPage-4M2DWNN3.js.map} +1 -1
  15. package/dist/{Breadcrumb-MLWGLXJZ.js → Breadcrumb-74NZ4CAI.js} +19 -19
  16. package/dist/{Breadcrumb-MLWGLXJZ.js.map → Breadcrumb-74NZ4CAI.js.map} +1 -1
  17. package/dist/{CartItem-5JKJ3AD6.js → CartItem-AIGCVTNA.js} +19 -19
  18. package/dist/{CartItem-5JKJ3AD6.js.map → CartItem-AIGCVTNA.js.map} +1 -1
  19. package/dist/{CartSummary-ZNBVWC2P.js → CartSummary-ONAQNID6.js} +19 -19
  20. package/dist/{CartSummary-ZNBVWC2P.js.map → CartSummary-ONAQNID6.js.map} +1 -1
  21. package/dist/{Copyright-LBUY2AJJ.js → Copyright-M3Y6AW2X.js} +4 -4
  22. package/dist/{Copyright-LBUY2AJJ.js.map → Copyright-M3Y6AW2X.js.map} +1 -1
  23. package/dist/{CustomerLayout-YDJQYMQI.js → CustomerLayout-HXVLROR7.js} +19 -19
  24. package/dist/{CustomerLayout-YDJQYMQI.js.map → CustomerLayout-HXVLROR7.js.map} +1 -1
  25. package/dist/{Footer-X46MKKA5.js → Footer-VJXKRENW.js} +19 -19
  26. package/dist/{Footer-X46MKKA5.js.map → Footer-VJXKRENW.js.map} +1 -1
  27. package/dist/{Header-YK5QFAO7.js → Header-2BEJOO3R.js} +8 -8
  28. package/dist/{Header-YK5QFAO7.js.map → Header-2BEJOO3R.js.map} +1 -1
  29. package/dist/{LoyaltyPage-RM3WQLVC.js → LoyaltyPage-IGSNMPPU.js} +19 -19
  30. package/dist/{LoyaltyPage-RM3WQLVC.js.map → LoyaltyPage-IGSNMPPU.js.map} +1 -1
  31. package/dist/{LoyaltyPointsPage-AN7VC3AF.js → LoyaltyPointsPage-Z3GWZVHU.js} +3 -3
  32. package/dist/{LoyaltyPointsPage-AN7VC3AF.js.map → LoyaltyPointsPage-Z3GWZVHU.js.map} +1 -1
  33. package/dist/{MainMenu-ETIJZLKV.js → MainMenu-BUG3VS7Y.js} +9 -10
  34. package/dist/MainMenu-BUG3VS7Y.js.map +1 -0
  35. package/dist/{MasterLayout-QSYGLVJD.js → MasterLayout-XOMOFH26.js} +19 -19
  36. package/dist/{MasterLayout-QSYGLVJD.js.map → MasterLayout-XOMOFH26.js.map} +1 -1
  37. package/dist/{MobileMenu-V624P4XH.js → MobileMenu-U5Y43SK2.js} +20 -20
  38. package/dist/{MobileMenu-V624P4XH.js.map → MobileMenu-U5Y43SK2.js.map} +1 -1
  39. package/dist/{NotificationsPage-MAN7PINP.js → NotificationsPage-WOW7R5EL.js} +19 -19
  40. package/dist/{NotificationsPage-MAN7PINP.js.map → NotificationsPage-WOW7R5EL.js.map} +1 -1
  41. package/dist/{OrderSinglePage-43FJCEPN.js → OrderSinglePage-SFZEAMAG.js} +20 -20
  42. package/dist/{OrderSinglePage-43FJCEPN.js.map → OrderSinglePage-SFZEAMAG.js.map} +1 -1
  43. package/dist/{OrdersPage-TW3VH6EN.js → OrdersPage-2KWKJZAM.js} +19 -19
  44. package/dist/{OrdersPage-TW3VH6EN.js.map → OrdersPage-2KWKJZAM.js.map} +1 -1
  45. package/dist/{PageSingle-AX7M6XH3.js → PageSingle-D4UTD6XX.js} +8 -9
  46. package/dist/PageSingle-D4UTD6XX.js.map +1 -0
  47. package/dist/{ProductDetails-4ABLVN5Z.js → ProductDetails-53UVIHR3.js} +4 -4
  48. package/dist/{ProductDetails-4ABLVN5Z.js.map → ProductDetails-53UVIHR3.js.map} +1 -1
  49. package/dist/{ProfilePage-ACF2CGYH.js → ProfilePage-WZQJBMP3.js} +19 -19
  50. package/dist/{ProfilePage-ACF2CGYH.js.map → ProfilePage-WZQJBMP3.js.map} +1 -1
  51. package/dist/{SeoCartWidget-AFJRAXWF.js → SeoCartWidget-EZD6YRUG.js} +19 -19
  52. package/dist/{SeoCartWidget-AFJRAXWF.js.map → SeoCartWidget-EZD6YRUG.js.map} +1 -1
  53. package/dist/{SettingsPage-FYFH4QLC.js → SettingsPage-4GTH7FJS.js} +19 -19
  54. package/dist/{SettingsPage-FYFH4QLC.js.map → SettingsPage-4GTH7FJS.js.map} +1 -1
  55. package/dist/{StoreClosedNotification-PPQFOIW3.js → StoreClosedNotification-SUKGXBTP.js} +20 -20
  56. package/dist/{StoreClosedNotification-PPQFOIW3.js.map → StoreClosedNotification-SUKGXBTP.js.map} +1 -1
  57. package/dist/{TestimonialsPage-Q5UIOYG6.js → TestimonialsPage-YKXSTNWR.js} +8 -9
  58. package/dist/TestimonialsPage-YKXSTNWR.js.map +1 -0
  59. package/dist/{ThankYouPage-FKM3DCWO.js → ThankYouPage-CMMQ3JFO.js} +19 -19
  60. package/dist/{ThankYouPage-FKM3DCWO.js.map → ThankYouPage-CMMQ3JFO.js.map} +1 -1
  61. package/dist/{WalletPage-WI7DXCGJ.js → WalletPage-LK6XXNHY.js} +20 -20
  62. package/dist/{WalletPage-WI7DXCGJ.js.map → WalletPage-LK6XXNHY.js.map} +1 -1
  63. package/dist/{WishlistPage-G5Z2W5QD.js → WishlistPage-FAEXGOAH.js} +21 -21
  64. package/dist/{WishlistPage-G5Z2W5QD.js.map → WishlistPage-FAEXGOAH.js.map} +1 -1
  65. package/dist/api/apps.js +4 -5
  66. package/dist/api/brands.js +5 -6
  67. package/dist/api/cart.js +5 -6
  68. package/dist/api/category.js +5 -6
  69. package/dist/api/client.d.ts.map +1 -1
  70. package/dist/api/client.js +3 -4
  71. package/dist/api/home.d.ts +9 -3
  72. package/dist/api/home.d.ts.map +1 -1
  73. package/dist/api/home.js +4 -5
  74. package/dist/api/loyalty.js +5 -6
  75. package/dist/api/menu.js +4 -5
  76. package/dist/api/notification.js +4 -5
  77. package/dist/api/order.js +5 -6
  78. package/dist/api/page.js +5 -6
  79. package/dist/api/product.js +5 -6
  80. package/dist/api/profile.js +3 -4
  81. package/dist/api/profile.js.map +1 -1
  82. package/dist/api/store.d.ts +6 -0
  83. package/dist/api/store.d.ts.map +1 -1
  84. package/dist/api/store.js +4 -5
  85. package/dist/api/translations.js +4 -5
  86. package/dist/api/user.js +4 -5
  87. package/dist/api/wishlist.js +6 -7
  88. package/dist/chunk-3IHFA2X5.js +33 -0
  89. package/dist/chunk-3IHFA2X5.js.map +1 -0
  90. package/dist/{chunk-NTIGQYSN.js → chunk-4YHSQSM6.js} +8 -7
  91. package/dist/chunk-4YHSQSM6.js.map +1 -0
  92. package/dist/{chunk-B2OHRXRD.js → chunk-5H4NIOTY.js} +4 -4
  93. package/dist/{chunk-B2OHRXRD.js.map → chunk-5H4NIOTY.js.map} +1 -1
  94. package/dist/{chunk-TY3XJOIQ.js → chunk-5HOD4BKK.js} +5 -4
  95. package/dist/chunk-5HOD4BKK.js.map +1 -0
  96. package/dist/{chunk-OFRV3WKR.js → chunk-5ZTYXQ7T.js} +5 -5
  97. package/dist/{chunk-OFRV3WKR.js.map → chunk-5ZTYXQ7T.js.map} +1 -1
  98. package/dist/{chunk-ITHU2R5C.js → chunk-6YIAULAP.js} +9 -8
  99. package/dist/chunk-6YIAULAP.js.map +1 -0
  100. package/dist/{chunk-L2DRHH4E.js → chunk-7BGEGHAI.js} +3 -3
  101. package/dist/{chunk-L2DRHH4E.js.map → chunk-7BGEGHAI.js.map} +1 -1
  102. package/dist/{chunk-DISOIXUL.js → chunk-7N52RMEY.js} +43 -18
  103. package/dist/chunk-7N52RMEY.js.map +1 -0
  104. package/dist/{chunk-Y7NC2NDA.js → chunk-7PYHB3PP.js} +4 -4
  105. package/dist/{chunk-Y7NC2NDA.js.map → chunk-7PYHB3PP.js.map} +1 -1
  106. package/dist/{chunk-I4XPOEQY.js → chunk-7W7SLN5M.js} +4 -4
  107. package/dist/{chunk-I4XPOEQY.js.map → chunk-7W7SLN5M.js.map} +1 -1
  108. package/dist/{chunk-ETPOZJHG.js → chunk-A32NANNC.js} +3 -3
  109. package/dist/{chunk-ETPOZJHG.js.map → chunk-A32NANNC.js.map} +1 -1
  110. package/dist/chunk-AMEU3DNR.js +14 -0
  111. package/dist/{chunk-EI52BZFN.js.map → chunk-AMEU3DNR.js.map} +1 -1
  112. package/dist/{chunk-CTLTXDHH.js → chunk-BAOBHXU5.js} +6 -6
  113. package/dist/{chunk-CTLTXDHH.js.map → chunk-BAOBHXU5.js.map} +1 -1
  114. package/dist/{chunk-ELS6I3O2.js → chunk-BMVQEOBM.js} +4 -4
  115. package/dist/{chunk-ELS6I3O2.js.map → chunk-BMVQEOBM.js.map} +1 -1
  116. package/dist/{chunk-E43ALK3R.js → chunk-DIVEHHMD.js} +3 -3
  117. package/dist/{chunk-E43ALK3R.js.map → chunk-DIVEHHMD.js.map} +1 -1
  118. package/dist/{chunk-G2VNDZID.js → chunk-DY5WGKDX.js} +4 -4
  119. package/dist/{chunk-G2VNDZID.js.map → chunk-DY5WGKDX.js.map} +1 -1
  120. package/dist/{chunk-XCYIGCUN.js → chunk-E7PYHBCX.js} +4 -4
  121. package/dist/{chunk-XCYIGCUN.js.map → chunk-E7PYHBCX.js.map} +1 -1
  122. package/dist/{chunk-KCCU3S5F.js → chunk-EJK33TNK.js} +13 -13
  123. package/dist/chunk-EJK33TNK.js.map +1 -0
  124. package/dist/{chunk-DZT26OCM.js → chunk-FGROIU3Y.js} +3 -3
  125. package/dist/{chunk-DZT26OCM.js.map → chunk-FGROIU3Y.js.map} +1 -1
  126. package/dist/{chunk-XBW7EHBA.js → chunk-GTG22RZG.js} +3 -3
  127. package/dist/{chunk-XBW7EHBA.js.map → chunk-GTG22RZG.js.map} +1 -1
  128. package/dist/{chunk-K6SNUM3L.js → chunk-H2DXJCJP.js} +4 -4
  129. package/dist/{chunk-K6SNUM3L.js.map → chunk-H2DXJCJP.js.map} +1 -1
  130. package/dist/{chunk-2XGQSJKH.js → chunk-HBTIZWT2.js} +3 -3
  131. package/dist/{chunk-2XGQSJKH.js.map → chunk-HBTIZWT2.js.map} +1 -1
  132. package/dist/{chunk-J2YKHDMH.js → chunk-I26VPNDP.js} +3 -3
  133. package/dist/{chunk-J2YKHDMH.js.map → chunk-I26VPNDP.js.map} +1 -1
  134. package/dist/chunk-J427UFSZ.js +186 -0
  135. package/dist/chunk-J427UFSZ.js.map +1 -0
  136. package/dist/{chunk-SR4OTLTJ.js → chunk-LPQFTXBB.js} +9 -3
  137. package/dist/chunk-LPQFTXBB.js.map +1 -0
  138. package/dist/{chunk-SVPXQCOA.js → chunk-MISI3T6V.js} +4 -3
  139. package/dist/chunk-MISI3T6V.js.map +1 -0
  140. package/dist/{chunk-TRZAQSHU.js → chunk-MSUGP566.js} +4 -4
  141. package/dist/{chunk-TRZAQSHU.js.map → chunk-MSUGP566.js.map} +1 -1
  142. package/dist/{chunk-VAMIJGCU.js → chunk-N3BSUMD7.js} +3 -3
  143. package/dist/{chunk-VAMIJGCU.js.map → chunk-N3BSUMD7.js.map} +1 -1
  144. package/dist/{chunk-4YQQVUXS.js → chunk-NFE2H5JE.js} +5 -5
  145. package/dist/{chunk-4YQQVUXS.js.map → chunk-NFE2H5JE.js.map} +1 -1
  146. package/dist/{chunk-H7BCB2HO.js → chunk-OGVUFMLX.js} +3 -3
  147. package/dist/{chunk-H7BCB2HO.js.map → chunk-OGVUFMLX.js.map} +1 -1
  148. package/dist/{chunk-2IYOHSQN.js → chunk-P6EOXGUE.js} +4 -4
  149. package/dist/{chunk-2IYOHSQN.js.map → chunk-P6EOXGUE.js.map} +1 -1
  150. package/dist/{chunk-EBFYRFMI.js → chunk-PPU6MI3G.js} +7 -7
  151. package/dist/{chunk-EBFYRFMI.js.map → chunk-PPU6MI3G.js.map} +1 -1
  152. package/dist/{chunk-TYLKNVQA.js → chunk-QVJDYSCT.js} +89 -4
  153. package/dist/chunk-QVJDYSCT.js.map +1 -0
  154. package/dist/{chunk-4YWBXQV5.js → chunk-R5MZV6KW.js} +4 -4
  155. package/dist/{chunk-4YWBXQV5.js.map → chunk-R5MZV6KW.js.map} +1 -1
  156. package/dist/{chunk-SSPAMQRV.js → chunk-SDIQHTDG.js} +4 -4
  157. package/dist/{chunk-SSPAMQRV.js.map → chunk-SDIQHTDG.js.map} +1 -1
  158. package/dist/{chunk-E2XHLK5O.js → chunk-USN5NHJ5.js} +3 -3
  159. package/dist/{chunk-E2XHLK5O.js.map → chunk-USN5NHJ5.js.map} +1 -1
  160. package/dist/{chunk-FBOSUTNC.js → chunk-UZUHDKKD.js} +4 -4
  161. package/dist/{chunk-FBOSUTNC.js.map → chunk-UZUHDKKD.js.map} +1 -1
  162. package/dist/{chunk-J5DXKBVJ.js → chunk-VLONFUZM.js} +7 -7
  163. package/dist/{chunk-J5DXKBVJ.js.map → chunk-VLONFUZM.js.map} +1 -1
  164. package/dist/{chunk-AH6KEBKX.js → chunk-VVAV3DJL.js} +6 -6
  165. package/dist/{chunk-AH6KEBKX.js.map → chunk-VVAV3DJL.js.map} +1 -1
  166. package/dist/{chunk-IKUDCH7Q.js → chunk-VX2T7JCB.js} +10 -9
  167. package/dist/chunk-VX2T7JCB.js.map +1 -0
  168. package/dist/{chunk-NCTG4ZTU.js → chunk-VYJDRAWX.js} +3 -3
  169. package/dist/{chunk-NCTG4ZTU.js.map → chunk-VYJDRAWX.js.map} +1 -1
  170. package/dist/components/cart/index.js +1 -1
  171. package/dist/components/common/index.js +1 -1
  172. package/dist/components/drawer/index.js +17 -17
  173. package/dist/components/home/index.js +21 -21
  174. package/dist/components/layout/index.js +1 -1
  175. package/dist/components/product/ProductGallery.d.ts.map +1 -1
  176. package/dist/components/product/index.js +18 -18
  177. package/dist/components/store/index.js +19 -19
  178. package/dist/components/toast/Toaster.d.ts.map +1 -1
  179. package/dist/components/toast/index.js +6 -1
  180. package/dist/components/toast/index.js.map +1 -1
  181. package/dist/components/tracking/index.js +1 -1
  182. package/dist/document-class-APAX4M7D.js +25 -0
  183. package/dist/{document-class-P33S4CA7.js.map → document-class-APAX4M7D.js.map} +1 -1
  184. package/dist/hooks/index.js +17 -17
  185. package/dist/hooks/useBlogLike.js +1 -1
  186. package/dist/hooks/useComments.js +3 -4
  187. package/dist/hooks/useGtm.js +17 -17
  188. package/dist/hooks/useMoney.js +17 -17
  189. package/dist/hooks/useProduct.js +3 -4
  190. package/dist/hooks/useStore.js +17 -17
  191. package/dist/hooks/useUser.js +5 -6
  192. package/dist/index.js +17 -17
  193. package/dist/native-app/index.d.ts +27 -0
  194. package/dist/native-app/index.d.ts.map +1 -0
  195. package/dist/native-app/index.js +8 -0
  196. package/dist/native-app/index.js.map +1 -0
  197. package/dist/{navigation-F2TD5X2P.js → navigation-P3GZOWUU.js} +8 -7
  198. package/dist/{navigation-F2TD5X2P.js.map → navigation-P3GZOWUU.js.map} +1 -1
  199. package/dist/{navigation-CJHPA74M.js → navigation-TA3I3XEC.js} +5 -5
  200. package/dist/{navigation-CJHPA74M.js.map → navigation-TA3I3XEC.js.map} +1 -1
  201. package/dist/{not-found-4R764WCJ.js → not-found-G4N25RWR.js} +20 -20
  202. package/dist/{not-found-4R764WCJ.js.map → not-found-G4N25RWR.js.map} +1 -1
  203. package/dist/providers/TwilightProvider.d.ts.map +1 -1
  204. package/dist/providers/index.js +17 -17
  205. package/dist/providers/native-safe-area.d.ts +13 -0
  206. package/dist/providers/native-safe-area.d.ts.map +1 -0
  207. package/dist/routes/account/orders.js +6 -7
  208. package/dist/routes/account.js +15 -16
  209. package/dist/routes/account.js.map +1 -1
  210. package/dist/routes/blog.js +10 -11
  211. package/dist/routes/blog.js.map +1 -1
  212. package/dist/routes/brands.js +6 -7
  213. package/dist/routes/brands.js.map +1 -1
  214. package/dist/routes/cart.js +25 -25
  215. package/dist/routes/home.js +22 -22
  216. package/dist/routes/index.js +4 -4
  217. package/dist/routes/loyalty.js +7 -8
  218. package/dist/routes/loyalty.js.map +1 -1
  219. package/dist/routes/page.js +6 -7
  220. package/dist/routes/page.js.map +1 -1
  221. package/dist/routes/product-listing.js +23 -23
  222. package/dist/routes/product.js +21 -21
  223. package/dist/routes/root/beforeLoad.d.ts.map +1 -1
  224. package/dist/routes/seo-redirects.js +3 -3
  225. package/dist/routes/testimonials.js +1 -1
  226. package/dist/routes/thank-you.js +6 -7
  227. package/dist/routes/thank-you.js.map +1 -1
  228. package/dist/skeleton.js +22 -22
  229. package/dist/tanstack/native-app-events.d.ts +18 -0
  230. package/dist/tanstack/native-app-events.d.ts.map +1 -0
  231. package/dist/tanstack/navigation.d.ts.map +1 -1
  232. package/dist/tanstack.js +17 -17
  233. package/dist/types/salla-sdk.d.ts +8 -0
  234. package/dist/types/salla-sdk.d.ts.map +1 -1
  235. package/dist/utils/index.js +4 -5
  236. package/dist/utils/index.js.map +1 -1
  237. package/dist/utils/sdk-helpers.d.ts +13 -0
  238. package/dist/utils/sdk-helpers.d.ts.map +1 -1
  239. package/dist/utils/store-base.d.ts +9 -0
  240. package/dist/utils/store-base.d.ts.map +1 -1
  241. package/dist/utils/theme-version.d.ts +14 -1
  242. package/dist/utils/theme-version.d.ts.map +1 -1
  243. package/dist/vite/index.js +1 -0
  244. package/dist/vite/index.js.map +1 -1
  245. package/dist/vite/plugins/package-aliases.plugin.d.ts.map +1 -1
  246. package/package.json +5 -1
  247. package/dist/MainMenu-ETIJZLKV.js.map +0 -1
  248. package/dist/PageSingle-AX7M6XH3.js.map +0 -1
  249. package/dist/TestimonialsPage-Q5UIOYG6.js.map +0 -1
  250. package/dist/chunk-5Y64476S.js +0 -80
  251. package/dist/chunk-5Y64476S.js.map +0 -1
  252. package/dist/chunk-DISOIXUL.js.map +0 -1
  253. package/dist/chunk-EI52BZFN.js +0 -14
  254. package/dist/chunk-GNH3W6T4.js +0 -114
  255. package/dist/chunk-GNH3W6T4.js.map +0 -1
  256. package/dist/chunk-IKUDCH7Q.js.map +0 -1
  257. package/dist/chunk-ITHU2R5C.js.map +0 -1
  258. package/dist/chunk-KCCU3S5F.js.map +0 -1
  259. package/dist/chunk-NTIGQYSN.js.map +0 -1
  260. package/dist/chunk-SR4OTLTJ.js.map +0 -1
  261. package/dist/chunk-SVPXQCOA.js.map +0 -1
  262. package/dist/chunk-TY3XJOIQ.js.map +0 -1
  263. package/dist/chunk-TYLKNVQA.js.map +0 -1
  264. package/dist/document-class-P33S4CA7.js +0 -26
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/product/lazy.ts","../src/components/product/ProductCard.tsx","../src/components/product/ProductGallery.tsx"],"names":["ProductCardContent","ProductCard","jsxs","jsx","useMemo"],"mappings":";;;;;;;;;;;;;;;;AAEO,IAAM,kBAAA,GAAqB,IAAA;A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["import { lazy } from 'react';\n\nexport const LazyProductDetails = lazy(() =>\n import('./ProductDetails').then((m) => ({ default: m.ProductDetails }))\n);\n\nexport const LazyAddToCartForm = lazy(() =>\n import('./AddToCartForm').then((m) => ({ default: m.AddToCartForm }))\n);\n","import { memo, useCallback, useMemo } from 'react';\nimport { SallaAddProductButton } from '@salla.sa/twilight-components-react/add-product-button';\nimport { SallaButton } from '@salla.sa/twilight-components-react/button';\nimport { useHostAttributes } from '@salla.sa/twilight-theme-engine/hooks/useHostAttributes';\nimport { useMoney } from '../../hooks/useMoney';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport { useTwilight } from '../../providers/TwilightProvider';\nimport { useWishlist } from '../../hooks/useWishlist';\nimport { useAsset } from '../../hooks/useAsset';\nimport { useNumber } from '../../hooks/useNumber';\nimport { registry } from '../ComponentRegistry';\nimport { Image } from '../common';\nimport type { Product } from '../../types';\n\nconst PRODUCT_CARD_KEY = 'product:card';\n\nconst PRODUCT_IMAGE_SRCSET_WIDTHS = [150, 300, 450, 600] as const;\n/** Matches `.s-products-list-vertical-cards`: 2-col below 768px, 4-col above. */\nconst PRODUCT_IMAGE_SIZES = '(min-width: 768px) 25vw, 50vw';\n/** fullImage / minimal slots in FeaturedProductsStyle3 (`lg:grid-cols-2`). */\nconst PRODUCT_WIDE_IMAGE_SIZES = '(min-width: 1024px) 50vw, 100vw';\n\n/** Product card layout variants - mutually exclusive */\nexport type ProductCardLayout = 'vertical' | 'horizontal' | 'fullImage' | 'minimal' | 'special';\n\nexport interface ProductCardProps {\n product: Product;\n layout?: ProductCardLayout;\n className?: string;\n withShadow?: boolean;\n withQuantity?: boolean;\n withoutAddButton?: boolean;\n index?: number;\n imagePriority?: boolean;\n /** Overrides the layout-based image `sizes` hint. */\n sizes?: string;\n}\n\n/**\n * ProductCard - Displays a product in various layouts\n *\n * Layouts:\n * - vertical: Default card with image top, content bottom\n * - horizontal: Side-by-side image and content\n * - fullImage: Full bleed image with overlay content\n * - minimal: Compact version with reduced info\n * - special: Featured card with quantity pie chart\n *\n * Features:\n * - Native lazy loading for images\n * - Product badges (promotion, preorder, quantity, out of stock)\n * - Wishlist toggle button\n * - Price display (sale, starting, regular)\n * - Rating display\n * - Add to cart button via SallaAddProductButton (handles labels internally)\n */\nconst ProductCardContent = memo(function ProductCardContent({\n product,\n layout = 'vertical',\n className = '',\n withShadow = false,\n withQuantity = false,\n withoutAddButton = false,\n index = 0,\n imagePriority = false,\n sizes,\n}: ProductCardProps) {\n const { format } = useMoney();\n const { t } = useTranslation();\n const { store, theme } = useTwilight();\n const wishlist = useWishlist();\n const { isPlaceholder } = useAsset();\n const { format: formatNumber } = useNumber();\n\n // Out-of-stock cards offer \"notify me when available\" instead of a dead button, unless\n // the merchant switched `notify_when_available_in_card` off (Twig theme-raed parity).\n const notifyInCard = theme?.settings?.notify_when_available_in_card !== false;\n const addButtonStatus =\n notifyInCard &&\n product.is_out_of_stock &&\n product.type !== 'donating' &&\n product.type !== 'financial_support'\n ? 'out-and-notify'\n : product.status;\n\n const addButtonRef = useHostAttributes({ fill: 'outline', width: 'wide' });\n\n // Layout flags\n const isVertical = layout === 'vertical';\n const isHorizontal = layout === 'horizontal';\n const isFullImage = layout === 'fullImage';\n const isMinimal = layout === 'minimal';\n const isSpecial = layout === 'special';\n\n // Wishlist status\n const productInWishlist = wishlist.has(product.id);\n const handleWishlistToggle = useCallback(() => {\n wishlist.toggle(product.id);\n }, [wishlist, product.id]);\n\n // Get image fit type from store settings\n const fitImageHeight = store?.settings?.product?.fit_type;\n\n // Product badge component\n const getProductBadge = () => {\n if (product?.preorder?.label && typeof product.preorder.label === 'string') {\n return <div className=\"s-product-card-promotion-title\">{product.preorder.label}</div>;\n }\n if (product.promotion_title) {\n return <div className=\"s-product-card-promotion-title\">{product.promotion_title}</div>;\n }\n if (withQuantity && product?.quantity) {\n const formattedQty = formatNumber(product.quantity);\n return (\n <div className=\"s-product-card-quantity\">\n {t('pages.products.remained', 'Remained')} {formattedQty}\n </div>\n );\n }\n if (withQuantity && product?.is_out_of_stock) {\n return (\n <div className=\"s-product-card-out-badge\">\n {t('pages.products.out_of_stock', 'Out of Stock')}\n </div>\n );\n }\n return null;\n };\n\n // Price display component\n const getProductPrice = () => {\n if (product.is_on_sale && product.sale_price) {\n return (\n <div className=\"s-product-card-sale-price\">\n <h4>{format(product.sale_price)}</h4>\n {product.regular_price && <span>{format(product.regular_price)}</span>}\n </div>\n );\n }\n if (product.starting_price) {\n return (\n <div className=\"s-product-card-starting-price\">\n <p>{t('pages.products.starting_price', 'Starting from')}</p>\n <h4>{format(product.starting_price)}</h4>\n </div>\n );\n }\n return <h4 className=\"s-product-card-price\">{format(product.price)}</h4>;\n };\n\n // Build card class names\n const cardClassName = [\n 's-product-card',\n 's-product-card-entry',\n isVertical ? 's-product-card-vertical' : '',\n isHorizontal ? 's-product-card-horizontal' : '',\n fitImageHeight && isVertical ? `s-product-card-fit-height` : '',\n isSpecial ? 's-product-card-special' : '',\n isFullImage ? 's-product-card-full-image' : '',\n isMinimal ? 's-product-card-minimal' : '',\n product?.donation ? 's-product-card-donation' : '',\n withShadow ? 's-product-card-shadow' : '',\n product?.is_out_of_stock ? 's-product-card-out-of-stock' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n // Image fit class\n const isProductPlaceholder = isPlaceholder(product.image?.url);\n const imageFitClass = isProductPlaceholder ? 'contain' : fitImageHeight || 'cover';\n\n return (\n <div\n id={`product-card-${product.id}`}\n className={cardClassName}\n data-product-id={product.id}\n style={{\n animationDelay: `${index * 100}ms`,\n }}\n >\n <div className={isFullImage ? 's-product-card-image-full' : 's-product-card-image'}>\n <a href={product.url} aria-label={product.image?.alt || product.name}>\n <Image\n className={`s-product-card-image-${imageFitClass}`}\n src={product.image?.url}\n alt={product.image?.alt ?? product.name}\n width={300}\n height={300}\n sizes={\n sizes ?? (isFullImage || isMinimal ? PRODUCT_WIDE_IMAGE_SIZES : PRODUCT_IMAGE_SIZES)\n }\n srcSetWidths={PRODUCT_IMAGE_SRCSET_WIDTHS}\n aspectRatio=\"1/1\"\n priority={imagePriority}\n />\n {!isFullImage && !isMinimal && getProductBadge()}\n </a>\n {isFullImage && (\n <a href={product.url} aria-label={product.name} className=\"s-product-card-overlay\" />\n )}\n {!isHorizontal && !isFullImage && (\n <SallaButton\n shape=\"icon\"\n fill=\"outline\"\n color=\"light\"\n ariaLabel={t('pages.wishlist.toggle', 'Add or remove to wishlist')}\n className={`s-product-card-wishlist-btn animated ${productInWishlist ? 's-product-card-wishlist-added pulse-anime' : 'not-added un-favorited'}`}\n onClick={handleWishlistToggle}\n data-id={product.id}\n >\n <i className=\"sicon-heart\" />\n </SallaButton>\n )}\n </div>\n <div className=\"s-product-card-content\">\n {/* Special card: quantity pie */}\n {isSpecial && product?.quantity && (\n <div className=\"s-product-card-content-pie\">\n <span>\n <b>{formatNumber(product.quantity)}</b>\n {t('pages.products.remained', 'Remained')}\n </span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"-2 -1 36 34\"\n className=\"s-product-card-content-pie-svg\"\n >\n <circle cx=\"16\" cy=\"16\" r=\"15.9155\" className=\"s-product-card-content-pie-svg-base\" />\n <circle cx=\"16\" cy=\"16\" r=\"15.9155\" className=\"s-product-card-content-pie-svg-bar\" />\n </svg>\n </div>\n )}\n\n <div\n className={`s-product-card-content-main ${isSpecial ? 's-product-card-content-extra-padding' : ''}`}\n >\n <h3 className=\"s-product-card-content-title\">\n <a href={product.url}>{product.name}</a>\n </h3>\n {product.subtitle && !isMinimal && (\n <p className=\"s-product-card-content-subtitle opacity-80\">{product.subtitle}</p>\n )}\n </div>\n\n <div\n className={`s-product-card-content-sub ${isSpecial ? 's-product-card-content-extra-padding' : ''}`}\n >\n {!product?.donation?.can_donate && getProductPrice()}\n {product.rating?.stars && (\n <div className=\"s-product-card-rating\">\n <i className=\"sicon-star2 text-orange-300\" />\n <span>{product.rating.stars}</span>\n </div>\n )}\n </div>\n\n {!withoutAddButton && (\n <div className=\"s-product-card-content-footer gap-2\">\n <SallaAddProductButton\n ref={addButtonRef}\n fill=\"outline\"\n width=\"wide\"\n productId={product.id}\n productStatus={addButtonStatus}\n productType={product.type}\n hasPreOrder={product.has_preorder_campaign}\n />\n {(isHorizontal || isFullImage) && (\n <SallaButton\n shape=\"icon\"\n fill=\"outline\"\n color=\"light\"\n ariaLabel={t('pages.wishlist.toggle', 'Add or remove to wishlist')}\n className={`s-product-card-wishlist-btn animated ${productInWishlist ? 's-product-card-wishlist-added pulse-anime' : 'not-added un-favorited'}`}\n onClick={handleWishlistToggle}\n data-id={product.id}\n >\n <i className=\"sicon-heart\" />\n </SallaButton>\n )}\n </div>\n )}\n </div>\n </div>\n );\n});\n\nexport const ProductCard = memo(function ProductCard(props: ProductCardProps) {\n const Component = useMemo(() => {\n const hasOverride = registry.getOriginal<ProductCardProps>(PRODUCT_CARD_KEY) !== null;\n if (hasOverride) {\n return registry.resolve<ProductCardProps>(PRODUCT_CARD_KEY);\n }\n return null;\n }, []);\n\n if (Component) {\n return <Component {...props} />;\n }\n\n return <ProductCardContent {...props} />;\n});\n\nexport default ProductCard;\n","import { SallaSlider } from '@salla.sa/twilight-components-react/slider';\nimport { Suspense, useEffect, useMemo, useState } from 'react';\nimport { registry } from '../ComponentRegistry';\nimport { useTwilight } from '../../providers/TwilightProvider';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport type { Product, ProductImage } from '../../types';\nimport { Image } from '../common/Image';\nimport { ImageModal } from '../modal';\nimport { isNativeApp } from '../../native-app';\n\nconst PRODUCT_GALLERY_KEY = 'product:gallery';\n\nexport interface ProductGalleryProps {\n product: Product;\n}\n\ntype ImagePreview = { src: string; alt: string };\ntype GalleryMedia = { url: string; type: 'image' | 'video' | '3d-image' };\n\nfunction ProductGalleryContent({ product }: ProductGalleryProps) {\n const { t } = useTranslation();\n const { theme } = useTwilight();\n const sliderId = `details-slider-${product.id}`;\n const objectFit = theme.settings.slider_background_size ?? 'cover';\n\n // Clicking an image opens an in-app lightbox instead of navigating to the CDN URL.\n const [preview, setPreview] = useState<ImagePreview | null>(null);\n\n useEffect(() => {\n const raf = requestAnimationFrame(() => {\n const el = document.getElementById(sliderId);\n if (!el?.parentElement) return;\n const { parentElement, nextSibling } = el;\n parentElement.removeChild(el);\n parentElement.insertBefore(el, nextSibling);\n });\n return () => cancelAnimationFrame(raf);\n }, [sliderId]);\n\n // The product-details API only returns `image` (singular).\n // Fall back so the main image always renders even without the full gallery array.\n const images: ProductImage[] =\n product.images && product.images.length > 0\n ? product.images\n : product.image?.url\n ? [product.image]\n : [];\n\n const hasManyImages = images.length > 1;\n const nativeGallery = images.flatMap<GalleryMedia>((image) => {\n if (image.three_d_image_url) return [{ url: image.three_d_image_url, type: '3d-image' }];\n if (image.video_url) return [{ url: image.video_url, type: 'video' }];\n return image.url ? [{ url: image.url, type: 'image' }] : [];\n });\n const openNativeGallery = () => {\n if (!isNativeApp()) return false;\n window.salla?.event.dispatch('mobile::gallery.open', { images: nativeGallery });\n return true;\n };\n\n return (\n <div className=\"sidebar md:sticky top-24 w-full md:!w-2/4 rtl:ml-8 ltr:mr-8 pb-8 md:pb-16 overflow-hidden shrink-0\">\n <SallaSlider\n id={sliderId}\n className=\"details-slider rounded-md image-slider\"\n type=\"thumbs\"\n loop={false}\n autoHeight\n listenToThumbnailsOption\n showThumbsControls={false}\n sliderConfig={{ watchOverflow: true, autoHeight: true }}\n >\n {product.promotion_title && (\n <div className=\"promotion-title\">{product.promotion_title}</div>\n )}\n\n {product.calories && (\n <div className=\"absolute z-[2] top-4 rtl:left-4 ltr:right-4 bg-white shadow-sm flex flex-col justify-center items-center rounded-full w-20 h-20 md:w-24 md:h-24\">\n <span className=\"text-red-500 text-xl leading-none font-bold\">{product.calories}</span>\n <span className=\"text-xs text-gray-500\">\n {t('pages.products.calories', 'Calories')}\n </span>\n </div>\n )}\n\n <div slot=\"items\">\n {images.map((image, index) => (\n <ImageSlide\n key={image.id ?? image.three_d_image_url ?? image.video_url ?? image.url}\n image={image}\n product={product}\n index={index}\n objectFit={objectFit}\n onPreview={setPreview}\n onNativeOpen={openNativeGallery}\n />\n ))}\n </div>\n\n {hasManyImages && (\n <div slot=\"thumbs\">\n {images.map((image, index) => (\n <ThumbSlide\n key={image.id ?? image.three_d_image_url ?? image.video_url ?? image.url}\n image={image}\n index={index}\n />\n ))}\n </div>\n )}\n </SallaSlider>\n\n <Suspense fallback={null}>\n <ImageModal\n isOpen={!!preview}\n onClose={() => setPreview(null)}\n src={preview?.src ?? ''}\n alt={preview?.alt}\n />\n </Suspense>\n </div>\n );\n}\n\nexport function ProductGallery(props: ProductGalleryProps) {\n const Component = useMemo(() => {\n const resolved = registry.resolve<ProductGalleryProps>(PRODUCT_GALLERY_KEY);\n // A theme that seeds the key with this component (register + override) would\n // otherwise recurse into itself when it has not actually overridden anything.\n return resolved === ProductGallery ? null : resolved;\n }, []);\n\n if (Component) {\n return <Component {...props} />;\n }\n\n return <ProductGalleryContent {...props} />;\n}\n\nfunction ImageSlide({\n image,\n product,\n index,\n objectFit,\n onPreview,\n onNativeOpen,\n}: {\n image: ProductImage;\n product: Product;\n index: number;\n objectFit: 'cover' | 'contain';\n onPreview: (preview: ImagePreview) => void;\n onNativeOpen: () => boolean;\n}) {\n const [loaded, setLoaded] = useState(false);\n const isVideo = Boolean(image.video_url);\n\n if (image.three_d_image_url) {\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: model-viewer is an interactive web component.\n <model-viewer\n style={{ minHeight: '500px' }}\n className=\"swiper-slide model-entry w-full h-full\"\n loading=\"lazy\"\n camera-controls\n touch-action=\"pan-y\"\n auto-rotate\n poster={image.url || undefined}\n src={image.three_d_image_url}\n shadow-intensity=\"1\"\n alt={image.alt}\n onClick={onNativeOpen}\n ></model-viewer>\n );\n }\n\n return (\n <a\n data-fslightbox={`product_${product.id}`}\n data-img-id={image.id}\n data-slid-index={index}\n {...(image.video_url ? { 'data-video-src': image.video_url } : {})}\n data-caption={image.alt}\n data-infinite=\"false\"\n data-type={image.video_url ? 'youtube' : 'image'}\n href={image.video_url || image.url}\n // FsLightbox isn't loaded in this React theme, so the bare href would leave the SPA.\n // Open images in an in-app lightbox; let videos open in a new tab.\n {...(isVideo ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n onClick={(event) => {\n if (onNativeOpen()) {\n event.preventDefault();\n return;\n }\n if (isVideo || !image.url) return;\n event.preventDefault();\n onPreview({ src: image.url, alt: image.alt || product.name });\n }}\n aria-label={product.name}\n className={`swiper-slide magnify-wrapper homeslider__slide ${image.video_url ? 'video-entry' : ''}`}\n >\n <div className={`w-full ${loaded ? '' : 'aspect-square bg-gray-100 animate-pulse'}`}>\n <Image\n id={String(image.id)}\n src={image.url}\n alt={image.alt || product.name}\n className={`h-full w-full object-${objectFit}`}\n aspectRatio=\"1/1\"\n priority={index === 0}\n noWrapper\n onLoad={() => setLoaded(true)}\n />\n </div>\n </a>\n );\n}\n\nfunction ThumbSlide({ image, index }: { image: ProductImage; index: number }) {\n return (\n <div\n className={`slide--one-fourth ${image.video_url ? 'video-entry' : ''} ${image.three_d_image_url ? 'model-entry' : ''}`}\n data-caption={image.alt}\n >\n <Image\n src={image.url}\n alt={image.alt || ''}\n className=\"object-cover w-full h-full bg-gray-100 rounded-md overflow-hidden\"\n title={image.alt}\n priority={index < 5}\n noWrapper\n />\n </div>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { filesCdn, cdn } from './chunk-IKUDCH7Q.js';
1
+ import { filesCdn, cdn } from './chunk-VX2T7JCB.js';
2
2
  import { storeTranslationsQueryKey, translationsQueryKey, composeMessages, isPlainObject } from './chunk-N2S25NXP.js';
3
3
  import { queryOptions } from '@tanstack/react-query';
4
4
 
@@ -126,5 +126,5 @@ var translations = {
126
126
  };
127
127
 
128
128
  export { commonTranslationsPath, storeTranslationsPath, translations };
129
- //# sourceMappingURL=chunk-L2DRHH4E.js.map
130
- //# sourceMappingURL=chunk-L2DRHH4E.js.map
129
+ //# sourceMappingURL=chunk-7BGEGH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AAAA;AAAA,EAcA,QAAA,EAAU,OAAO,OAAA,EAA0B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQzC,cAAA,CAAe,sBAAsB,OAAA,EAAS,MAAM,GAAG,EAAE,UAAA,EAAY,MAAM;AAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAc7E,KAAA,EAAO,CACL,MAAA,EACA,SAAA,EACA,WAC+B,eAAA,CAAgB,MAAA,EAAQ,SAAA,EAAW,MAAM,CAAA,IAAK,IAAA;AAAA,EAE/E,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBP,QAAA,EAAU,CAAC,MAAA,KACT,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,qBAAqB,MAAM,CAAA;AAAA,MACrC,OAAA,EAAS,MAAM,YAAA,CAAa,GAAA,CAAI,MAAM;AAAA,KACvC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWH,OAAA,EAAS,CAAC,OAAA,EAA0B,MAAA,KAClC,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,yBAAA,CAA0B,OAAA,EAAS,MAAM,CAAA;AAAA,MACnD,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,CAAS,SAAS,MAAM;AAAA,KACrD;AAAA;AAEP","file":"chunk-L2DRHH4E.js","sourcesContent":["/**\n * @fileoverview Where a storefront's words come from.\n *\n * Two files, merged: the platform's copy for this language, and the merchant's\n * own edits for this language and this store. Both are plain JSON objects on\n * the uploader's CDN, one per language.\n *\n * ```\n * https://cdn.files.salla.network/translations/common/<locale>.json the platform's\n * https://cdn.files.salla.network/translations/<storeId>/<locale>.json the merchant's\n * ```\n *\n * **What this replaces, and why.** Until now the engine read a single global\n * file, `cdn.salla.network/js/translations.json`, holding every language keyed\n * `\"<locale>.trans\"`. Nothing publishes that file: it is an object last written\n * on 2026-03-26, carrying only `ar` and `en` where the platform has 39 locales,\n * 405 keys behind `Languages-Module` and 959 English strings textually\n * different from it. So every React storefront has been serving copy from\n * March, and a key added since has never reached one. It also carried no\n * merchant overrides at all — a merchant editing their theme's wording in the\n * Dashboard changed nothing on a React theme.\n *\n * **Merchant overrides are read, and only when there are any.** Getting here\n * took two corrections worth keeping.\n *\n * The first is the address. A merchant's own wording lives at\n * `translations/<storeId>/<locale>.json`, keyed by `store()->getRouteKey()` —\n * the Optimus-encoded numeric id. An early version addressed it with\n * `resolveStoreIdentifier()`, on the claim that the two are the same string.\n * That is true of the `store-identifier` *header*, which accepts a host, a\n * username or an id, and false of the R2 key: on a custom domain the resolver\n * returns `reefperfumes.com` and on a shared host a username like\n * `mtgr-alaatr-2`. Both 404, both then read as \"this store has no overrides\",\n * and the merchant's wording silently never appears — so the feature would have\n * worked under `?storeId=` alone, which is preview and localhost. It is\n * `settings.store.id` now, which is known only after the settings query.\n *\n * The second is when to ask at all. Most stores have never customised a word,\n * and a miss is an uncached round trip (`cf-cache-status: DYNAMIC` on the 404)\n * on the critical path of every SSR render. So the request is made only when\n * `settings.languages[<ISO>].has_custom_translations` says there is something\n * to get — a flag `Languages-Module` writes when a merchant saves a\n * translation. A store without overrides pays nothing, which is what made this\n * shippable at all.\n *\n * ⚠️ The flag is written on save, so a store whose wording predates it reads as\n * `false` until someone edits a translation or the backfill runs. That is a\n * store keeping today's behaviour, not a regression — React themes have never\n * read merchant overrides — but it does mean the feature is only as complete as\n * the backfill.\n *\n * **Rollout is by fallback, not by flag.** `translations/common/` is written by\n * a sync in the theme build service that may not have run yet, and a hard switch\n * would leave every storefront with no platform strings at all. A missing common\n * file therefore falls back to the old global one, which is exactly today's\n * behaviour — so this is safe to ship before the bucket is populated, and stops\n * using the fallback on its own once it is.\n */\nimport { queryOptions } from '@tanstack/react-query';\nimport { cdn, filesCdn } from './client';\nimport { storeTranslationsQueryKey, translationsQueryKey } from './translations-key';\nimport { composeMessages, isPlainObject, type Messages } from './messages';\nimport type { TranslationMessages } from '../providers/I18nProvider';\n\n/** The global file this used to be the only reader of. See the file comment. */\nconst LEGACY_GLOBAL_FILE = 'js/translations.json';\n\n/** One language of platform copy, shared by every store. */\nexport function commonTranslationsPath(locale: string): string {\n return `translations/common/${locale}.json`;\n}\n\n/**\n * One language of a single merchant's own wording.\n *\n * `storeId` is `settings.store.id`, which is the value `Languages-Module` names\n * the object with (`store()->getRouteKey()`, the Optimus-encoded numeric id).\n * It is **not** `resolveStoreIdentifier()`: that returns a hostname on a custom\n * domain and a username on a shared host, both of which 404 here and would read\n * as \"this merchant has no overrides\" — silently, on every store but a preview.\n */\nexport function storeTranslationsPath(storeId: string | number, locale: string): string {\n return `translations/${storeId}/${locale}.json`;\n}\n\n/**\n * Reads one language file, or `null` when there is nothing to read.\n *\n * A 404 is the ordinary answer, not a failure: most stores have never had a\n * word customised, so their file does not exist. Distinguishing it from a real\n * error matters only for the log — both end in `null` — but a warning on every\n * page load of every uncustomised store is a warning nobody will read.\n */\nasync function readLocaleFile(\n path: string,\n { failLoudly = false }: { failLoudly?: boolean } = {}\n): Promise<Messages | null> {\n /** A 404 always means \"absent\"; everything else is a failure to read. */\n const unreadable = (reason: string, cause?: unknown): null => {\n if (failLoudly) throw new Error(`[translations] ${path}: ${reason}`, { cause });\n console.warn('[translations]', reason, path, cause ?? '');\n return null;\n };\n\n try {\n const response = await filesCdn.get(path, { throwHttpErrors: false, timeout: 5000 });\n if (response.status === 404) return null;\n\n if (!response.ok) {\n return unreadable(`answered ${response.status}`);\n }\n\n const data: unknown = await response.json();\n if (!isPlainObject(data)) {\n return unreadable('is not a JSON object');\n }\n\n return data;\n } catch (error) {\n if (error instanceof Error && error.message.startsWith('[translations]')) throw error;\n return unreadable('could not be read', error);\n }\n}\n\n/**\n * The pre-CDN global file, sliced to one language.\n *\n * Only reached when `translations/common/<locale>.json` is missing, which is\n * the state of the bucket until the sync has run once.\n */\nasync function readLegacyGlobal(locale: string): Promise<Messages | null> {\n try {\n const data = await cdn.get(LEGACY_GLOBAL_FILE, { timeout: 5000 }).json<TranslationMessages>();\n const forLocale = data?.[`${locale}.trans`];\n return isPlainObject(forLocale) ? forLocale : null;\n } catch {\n console.warn('[translations] the legacy global file could not be read either');\n return null;\n }\n}\n\nexport const translations = {\n /**\n * The platform's copy for `locale`.\n *\n * One file, so one request. See the file comment for why the merchant's own\n * wording is not merged in here yet and what it is waiting on.\n */\n get: async (locale: string): Promise<TranslationMessages | null> => {\n const common = await readLocaleFile(commonTranslationsPath(locale));\n const base = common ?? (await readLegacyGlobal(locale));\n if (!base) return null;\n\n // Still wrapped in the `<locale>.trans` shape the rest of the engine reads.\n // `createI18nInstance` slices by that key and so does the SDK bridge in\n // `I18nProvider`; changing the envelope here would be a second change for\n // no gain, since one language is all any of them ever take out of it.\n return { [`${locale}.trans`]: base as Record<string, string> };\n },\n\n /**\n * This merchant's own wording for `locale`, or `null` if they have none.\n *\n * Only worth calling when `settings.languages[<ISO>].has_custom_translations`\n * says there is something to get. Most stores have never customised a word,\n * and a miss here is an uncached round trip — `cf-cache-status: DYNAMIC` on a\n * 404 — on the critical path of an SSR render. The flag is what makes this\n * free for everyone who does not use it.\n *\n * Returned unwrapped, unlike {@link translations.get}: this is merged into\n * that one's messages rather than handed to i18next on its own.\n */\n forStore: async (storeId: string | number, locale: string): Promise<Messages | null> =>\n // `failLoudly`, unlike the platform file: this is only ever called because\n // the settings said overrides exist, so a 500, a timeout or a body that is\n // not JSON is a failure to read them — not a store that has none. Returning\n // `null` there would cache \"no overrides\" as a success, skip the query's\n // retry, and serve Salla's wording in place of the merchant's until the\n // entry expired. A 404 still means absent, and `rootBeforeLoad` catches the\n // throw and keeps the platform copy, so the worst case is unchanged.\n readLocaleFile(storeTranslationsPath(storeId, locale), { failLoudly: true }),\n\n /**\n * The platform's copy for `locale` with this merchant's wording laid over it.\n *\n * Takes the two as values rather than fetching them, so the caller decides\n * whether the second request happens at all and both stay separately cached.\n */\n /**\n * The platform's copy for `locale` with this merchant's wording over it.\n *\n * Delegates to `composeMessages`, which every other reader of these two\n * entries also uses — see `api/messages.ts` for why there is exactly one.\n */\n merge: (\n common: TranslationMessages | null,\n overrides: Messages | null,\n locale: string\n ): TranslationMessages | null => composeMessages(common, overrides, locale) ?? null,\n\n queries: {\n /**\n * @param locale taken as an argument rather than read from the twilight\n * context, and that is load-bearing. This key is built on the server, on\n * hydration, and again lazily from the context accessor; if any of the\n * three read a locale the others had not been given yet, the hydrated page\n * would miss the dehydrated entry and refetch both files it was just\n * handed. Every caller already has the locale in hand.\n *\n * The store is deliberately **not** in the key. One document serves one\n * store — a request that names a different one is redirected with\n * `reloadDocument`, so the client never changes store under a live cache —\n * and adding a value that resolves from the request on the server and from\n * the injected env on the client is how a key stops matching across\n * hydration.\n */\n byLocale: (locale: string) =>\n queryOptions({\n queryKey: translationsQueryKey(locale),\n queryFn: () => translations.get(locale),\n }),\n\n /**\n * This merchant's overrides, cached apart from the platform's copy.\n *\n * Its own entry rather than a wider `byLocale` key, so the common file is\n * fetched and dehydrated once per language whatever the store does, and a\n * store with no overrides never has an entry at all. Both sides compute the\n * key from the settings payload, so the hydrated page finds what the server\n * dehydrated instead of refetching it.\n */\n byStore: (storeId: string | number, locale: string) =>\n queryOptions({\n queryKey: storeTranslationsQueryKey(storeId, locale),\n queryFn: () => translations.forStore(storeId, locale),\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["../src/api/translations.ts"],"names":[],"mappings":";;;;AAiEA,IAAM,kBAAA,GAAqB,sBAAA;AAGpB,SAAS,uBAAuB,MAAA,EAAwB;AAC7D,EAAA,OAAO,uBAAuB,MAAM,CAAA,KAAA,CAAA;AACtC;AAWO,SAAS,qBAAA,CAAsB,SAA0B,MAAA,EAAwB;AACtF,EAAA,OAAO,CAAA,aAAA,EAAgB,OAAO,CAAA,CAAA,EAAI,MAAM,CAAA,KAA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MAAM,CAAA,IAAK,IAAA;AAAA,EAE/E,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBP,QAAA,EAAU,CAAC,MAAA,KACT,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,qBAAqB,MAAM,CAAA;AAAA,MACrC,OAAA,EAAS,MAAM,YAAA,CAAa,GAAA,CAAI,MAAM;AAAA,KACvC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWH,OAAA,EAAS,CAAC,OAAA,EAA0B,MAAA,KAClC,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,yBAAA,CAA0B,OAAA,EAAS,MAAM,CAAA;AAAA,MACnD,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,CAAS,SAAS,MAAM;AAAA,KACrD;AAAA;AAEP","file":"chunk-7BGEGHAI.js","sourcesContent":["/**\n * @fileoverview Where a storefront's words come from.\n *\n * Two files, merged: the platform's copy for this language, and the merchant's\n * own edits for this language and this store. Both are plain JSON objects on\n * the uploader's CDN, one per language.\n *\n * ```\n * https://cdn.files.salla.network/translations/common/<locale>.json the platform's\n * https://cdn.files.salla.network/translations/<storeId>/<locale>.json the merchant's\n * ```\n *\n * **What this replaces, and why.** Until now the engine read a single global\n * file, `cdn.salla.network/js/translations.json`, holding every language keyed\n * `\"<locale>.trans\"`. Nothing publishes that file: it is an object last written\n * on 2026-03-26, carrying only `ar` and `en` where the platform has 39 locales,\n * 405 keys behind `Languages-Module` and 959 English strings textually\n * different from it. So every React storefront has been serving copy from\n * March, and a key added since has never reached one. It also carried no\n * merchant overrides at all — a merchant editing their theme's wording in the\n * Dashboard changed nothing on a React theme.\n *\n * **Merchant overrides are read, and only when there are any.** Getting here\n * took two corrections worth keeping.\n *\n * The first is the address. A merchant's own wording lives at\n * `translations/<storeId>/<locale>.json`, keyed by `store()->getRouteKey()` —\n * the Optimus-encoded numeric id. An early version addressed it with\n * `resolveStoreIdentifier()`, on the claim that the two are the same string.\n * That is true of the `store-identifier` *header*, which accepts a host, a\n * username or an id, and false of the R2 key: on a custom domain the resolver\n * returns `reefperfumes.com` and on a shared host a username like\n * `mtgr-alaatr-2`. Both 404, both then read as \"this store has no overrides\",\n * and the merchant's wording silently never appears — so the feature would have\n * worked under `?storeId=` alone, which is preview and localhost. It is\n * `settings.store.id` now, which is known only after the settings query.\n *\n * The second is when to ask at all. Most stores have never customised a word,\n * and a miss is an uncached round trip (`cf-cache-status: DYNAMIC` on the 404)\n * on the critical path of every SSR render. So the request is made only when\n * `settings.languages[<ISO>].has_custom_translations` says there is something\n * to get — a flag `Languages-Module` writes when a merchant saves a\n * translation. A store without overrides pays nothing, which is what made this\n * shippable at all.\n *\n * ⚠️ The flag is written on save, so a store whose wording predates it reads as\n * `false` until someone edits a translation or the backfill runs. That is a\n * store keeping today's behaviour, not a regression — React themes have never\n * read merchant overrides — but it does mean the feature is only as complete as\n * the backfill.\n *\n * **Rollout is by fallback, not by flag.** `translations/common/` is written by\n * a sync in the theme build service that may not have run yet, and a hard switch\n * would leave every storefront with no platform strings at all. A missing common\n * file therefore falls back to the old global one, which is exactly today's\n * behaviour — so this is safe to ship before the bucket is populated, and stops\n * using the fallback on its own once it is.\n */\nimport { queryOptions } from '@tanstack/react-query';\nimport { cdn, filesCdn } from './client';\nimport { storeTranslationsQueryKey, translationsQueryKey } from './translations-key';\nimport { composeMessages, isPlainObject, type Messages } from './messages';\nimport type { TranslationMessages } from '../providers/I18nProvider';\n\n/** The global file this used to be the only reader of. See the file comment. */\nconst LEGACY_GLOBAL_FILE = 'js/translations.json';\n\n/** One language of platform copy, shared by every store. */\nexport function commonTranslationsPath(locale: string): string {\n return `translations/common/${locale}.json`;\n}\n\n/**\n * One language of a single merchant's own wording.\n *\n * `storeId` is `settings.store.id`, which is the value `Languages-Module` names\n * the object with (`store()->getRouteKey()`, the Optimus-encoded numeric id).\n * It is **not** `resolveStoreIdentifier()`: that returns a hostname on a custom\n * domain and a username on a shared host, both of which 404 here and would read\n * as \"this merchant has no overrides\" — silently, on every store but a preview.\n */\nexport function storeTranslationsPath(storeId: string | number, locale: string): string {\n return `translations/${storeId}/${locale}.json`;\n}\n\n/**\n * Reads one language file, or `null` when there is nothing to read.\n *\n * A 404 is the ordinary answer, not a failure: most stores have never had a\n * word customised, so their file does not exist. Distinguishing it from a real\n * error matters only for the log — both end in `null` — but a warning on every\n * page load of every uncustomised store is a warning nobody will read.\n */\nasync function readLocaleFile(\n path: string,\n { failLoudly = false }: { failLoudly?: boolean } = {}\n): Promise<Messages | null> {\n /** A 404 always means \"absent\"; everything else is a failure to read. */\n const unreadable = (reason: string, cause?: unknown): null => {\n if (failLoudly) throw new Error(`[translations] ${path}: ${reason}`, { cause });\n console.warn('[translations]', reason, path, cause ?? '');\n return null;\n };\n\n try {\n const response = await filesCdn.get(path, { throwHttpErrors: false, timeout: 5000 });\n if (response.status === 404) return null;\n\n if (!response.ok) {\n return unreadable(`answered ${response.status}`);\n }\n\n const data: unknown = await response.json();\n if (!isPlainObject(data)) {\n return unreadable('is not a JSON object');\n }\n\n return data;\n } catch (error) {\n if (error instanceof Error && error.message.startsWith('[translations]')) throw error;\n return unreadable('could not be read', error);\n }\n}\n\n/**\n * The pre-CDN global file, sliced to one language.\n *\n * Only reached when `translations/common/<locale>.json` is missing, which is\n * the state of the bucket until the sync has run once.\n */\nasync function readLegacyGlobal(locale: string): Promise<Messages | null> {\n try {\n const data = await cdn.get(LEGACY_GLOBAL_FILE, { timeout: 5000 }).json<TranslationMessages>();\n const forLocale = data?.[`${locale}.trans`];\n return isPlainObject(forLocale) ? forLocale : null;\n } catch {\n console.warn('[translations] the legacy global file could not be read either');\n return null;\n }\n}\n\nexport const translations = {\n /**\n * The platform's copy for `locale`.\n *\n * One file, so one request. See the file comment for why the merchant's own\n * wording is not merged in here yet and what it is waiting on.\n */\n get: async (locale: string): Promise<TranslationMessages | null> => {\n const common = await readLocaleFile(commonTranslationsPath(locale));\n const base = common ?? (await readLegacyGlobal(locale));\n if (!base) return null;\n\n // Still wrapped in the `<locale>.trans` shape the rest of the engine reads.\n // `createI18nInstance` slices by that key and so does the SDK bridge in\n // `I18nProvider`; changing the envelope here would be a second change for\n // no gain, since one language is all any of them ever take out of it.\n return { [`${locale}.trans`]: base as Record<string, string> };\n },\n\n /**\n * This merchant's own wording for `locale`, or `null` if they have none.\n *\n * Only worth calling when `settings.languages[<ISO>].has_custom_translations`\n * says there is something to get. Most stores have never customised a word,\n * and a miss here is an uncached round trip — `cf-cache-status: DYNAMIC` on a\n * 404 — on the critical path of an SSR render. The flag is what makes this\n * free for everyone who does not use it.\n *\n * Returned unwrapped, unlike {@link translations.get}: this is merged into\n * that one's messages rather than handed to i18next on its own.\n */\n forStore: async (storeId: string | number, locale: string): Promise<Messages | null> =>\n // `failLoudly`, unlike the platform file: this is only ever called because\n // the settings said overrides exist, so a 500, a timeout or a body that is\n // not JSON is a failure to read them — not a store that has none. Returning\n // `null` there would cache \"no overrides\" as a success, skip the query's\n // retry, and serve Salla's wording in place of the merchant's until the\n // entry expired. A 404 still means absent, and `rootBeforeLoad` catches the\n // throw and keeps the platform copy, so the worst case is unchanged.\n readLocaleFile(storeTranslationsPath(storeId, locale), { failLoudly: true }),\n\n /**\n * The platform's copy for `locale` with this merchant's wording laid over it.\n *\n * Takes the two as values rather than fetching them, so the caller decides\n * whether the second request happens at all and both stay separately cached.\n */\n /**\n * The platform's copy for `locale` with this merchant's wording over it.\n *\n * Delegates to `composeMessages`, which every other reader of these two\n * entries also uses — see `api/messages.ts` for why there is exactly one.\n */\n merge: (\n common: TranslationMessages | null,\n overrides: Messages | null,\n locale: string\n ): TranslationMessages | null => composeMessages(common, overrides, locale) ?? null,\n\n queries: {\n /**\n * @param locale taken as an argument rather than read from the twilight\n * context, and that is load-bearing. This key is built on the server, on\n * hydration, and again lazily from the context accessor; if any of the\n * three read a locale the others had not been given yet, the hydrated page\n * would miss the dehydrated entry and refetch both files it was just\n * handed. Every caller already has the locale in hand.\n *\n * The store is deliberately **not** in the key. One document serves one\n * store — a request that names a different one is redirected with\n * `reloadDocument`, so the client never changes store under a live cache —\n * and adding a value that resolves from the request on the server and from\n * the injected env on the client is how a key stops matching across\n * hydration.\n */\n byLocale: (locale: string) =>\n queryOptions({\n queryKey: translationsQueryKey(locale),\n queryFn: () => translations.get(locale),\n }),\n\n /**\n * This merchant's overrides, cached apart from the platform's copy.\n *\n * Its own entry rather than a wider `byLocale` key, so the common file is\n * fetched and dehydrated once per language whatever the store does, and a\n * store with no overrides never has an entry at all. Both sides compute the\n * key from the settings payload, so the hydrated page finds what the server\n * dehydrated instead of refetching it.\n */\n byStore: (storeId: string | number, locale: string) =>\n queryOptions({\n queryKey: storeTranslationsQueryKey(storeId, locale),\n queryFn: () => translations.forStore(storeId, locale),\n }),\n },\n};\n"]}
@@ -1,25 +1,26 @@
1
- import { Header } from './chunk-CTLTXDHH.js';
1
+ import { Header } from './chunk-BAOBHXU5.js';
2
2
  import { Copyright } from './chunk-JKIRRMBU.js';
3
3
  import { useDevSettingsOverrides } from './chunk-2JV6WZ6O.js';
4
- import { apps } from './chunk-ETPOZJHG.js';
4
+ import { apps } from './chunk-A32NANNC.js';
5
5
  import { color } from './chunk-VVZNW5CB.js';
6
- import { applyThemeHookSlots, installAppScope } from './chunk-2XGQSJKH.js';
7
- import { useLocation, useIsHome, NavigationInterceptor } from './chunk-SSPAMQRV.js';
8
- import { useUser } from './chunk-NCTG4ZTU.js';
6
+ import { applyThemeHookSlots, installAppScope } from './chunk-HBTIZWT2.js';
7
+ import { useLocation, useIsHome, NavigationInterceptor } from './chunk-SDIQHTDG.js';
8
+ import { useUser } from './chunk-VYJDRAWX.js';
9
9
  import { useAsset } from './chunk-Z653O7MX.js';
10
- import { whenSallaLoaded, syncSdkLocale } from './chunk-5Y64476S.js';
11
- import { AUTH_TOKEN_COOKIE_NAME, rememberDevStoreId, clearAuthTokenCookie, syncScopeCookie } from './chunk-SR4OTLTJ.js';
12
- import { getTwilightContext, updateTwilightContext } from './chunk-N2S25NXP.js';
13
10
  import { DocumentClassProvider, useDocumentClass } from './chunk-JWXJPJBO.js';
14
11
  import { useTranslation, I18nProvider } from './chunk-TYNZ5B2B.js';
15
- import { FALLBACK_LOCALE, getLanguageInfo } from './chunk-T72DAX7R.js';
16
12
  import { WidgetHead } from './chunk-RJPPO3ET.js';
17
13
  import { HookSlot } from './chunk-Q7VWURUR.js';
18
14
  import { hookRegistry } from './chunk-GU2KUQVD.js';
19
- import { Image } from './chunk-J2YKHDMH.js';
15
+ import { Image } from './chunk-I26VPNDP.js';
20
16
  import { Link } from './chunk-AXW67SY7.js';
21
17
  import { LazyImageModal } from './chunk-CUG6VOLM.js';
22
- import { Toaster } from './chunk-SVPXQCOA.js';
18
+ import { Toaster } from './chunk-MISI3T6V.js';
19
+ import { isNativeApp } from './chunk-3IHFA2X5.js';
20
+ import { whenSallaLoaded, whenSallaReady, onSallaEvent, syncSdkLocale } from './chunk-QVJDYSCT.js';
21
+ import { AUTH_TOKEN_COOKIE_NAME, rememberDevStoreId, clearAuthTokenCookie, syncScopeCookie } from './chunk-LPQFTXBB.js';
22
+ import { getTwilightContext, updateTwilightContext } from './chunk-N2S25NXP.js';
23
+ import { FALLBACK_LOCALE, getLanguageInfo } from './chunk-T72DAX7R.js';
23
24
  import { useTwilight, TwilightContext } from './chunk-DF6FBKDN.js';
24
25
  import React2, { lazy, Suspense, useEffect, useCallback, useMemo, useRef, useState } from 'react';
25
26
  import { SallaAppsIcons } from '@salla.sa/twilight-components-react/apps-icons';
@@ -109,7 +110,7 @@ function ThemeDocumentSync({
109
110
  }
110
111
 
111
112
  // src/utils/engine-version.ts
112
- var ENGINE_VERSION = "1.0.68" ;
113
+ var ENGINE_VERSION = "1.0.70" ;
113
114
 
114
115
  // src/providers/twilight-init.ts
115
116
  function getSalla() {
@@ -236,15 +237,38 @@ function useTwilightInit({
236
237
  isMobileWebview
237
238
  };
238
239
  }
240
+ var SAFE_AREA_EVENT = "mobile::ui.safearea";
241
+ var CSS_VARS = { top: "--app-safe-area-top", bottom: "--app-safe-area-bottom" };
242
+ function useNativeSafeArea() {
243
+ useEffect(() => {
244
+ let off;
245
+ const cancel = whenSallaReady(() => {
246
+ if (isNativeApp()) off = onSallaEvent(SAFE_AREA_EVENT, applySafeArea);
247
+ });
248
+ return () => {
249
+ cancel();
250
+ off?.();
251
+ };
252
+ }, []);
253
+ }
254
+ function applySafeArea(data) {
255
+ const payload = data;
256
+ for (const side of ["top", "bottom"]) {
257
+ const px = Number(side === "top" ? payload?.top ?? payload?.value : payload?.bottom);
258
+ if (Number.isFinite(px)) {
259
+ document.documentElement.style.setProperty(CSS_VARS[side], `${px}px`);
260
+ }
261
+ }
262
+ }
239
263
  var navigationSetups = {
240
264
  tanstack: lazy(
241
- () => import('./navigation-F2TD5X2P.js').then((m) => ({ default: m.NavigationSetup }))
265
+ () => import('./navigation-P3GZOWUU.js').then((m) => ({ default: m.NavigationSetup }))
242
266
  ),
243
- nextjs: lazy(() => import('./navigation-CJHPA74M.js').then((m) => ({ default: m.NavigationSetup })))
267
+ nextjs: lazy(() => import('./navigation-TA3I3XEC.js').then((m) => ({ default: m.NavigationSetup })))
244
268
  };
245
269
  var routeDocumentSyncs = {
246
270
  tanstack: lazy(
247
- () => import('./document-class-P33S4CA7.js').then((m) => ({
271
+ () => import('./document-class-APAX4M7D.js').then((m) => ({
248
272
  default: m.TanStackDocumentSync
249
273
  }))
250
274
  )
@@ -766,7 +790,7 @@ var LazySiftSnippet = lazy(
766
790
  () => import('./SiftSnippet-5FCU6TR6.js').then((m) => ({ default: m.SiftSnippet }))
767
791
  );
768
792
  var LazyStoreClosedNotification = lazy(
769
- () => import('./StoreClosedNotification-PPQFOIW3.js').then((m) => ({
793
+ () => import('./StoreClosedNotification-SUKGXBTP.js').then((m) => ({
770
794
  default: m.StoreClosedNotification
771
795
  }))
772
796
  );
@@ -1132,6 +1156,7 @@ function TwilightProvider({
1132
1156
  }
1133
1157
  return null;
1134
1158
  });
1159
+ useNativeSafeArea();
1135
1160
  useEffect(() => {
1136
1161
  if (typeof window === "undefined") return;
1137
1162
  let unbind;
@@ -1352,5 +1377,5 @@ function useStore() {
1352
1377
  }
1353
1378
 
1354
1379
  export { Footer, MasterLayout, TwilightProvider, fastCheckoutScript, registerDefaultHooks, registerDocumentSync, routeDocumentSyncs, useBreadcrumbs, useDate, useGtm, useMoney, useNumber, useOpeningHours, usePageConfig, useStore };
1355
- //# sourceMappingURL=chunk-DISOIXUL.js.map
1356
- //# sourceMappingURL=chunk-DISOIXUL.js.map
1380
+ //# sourceMappingURL=chunk-7N52RMEY.js.map
1381
+ //# sourceMappingURL=chunk-7N52RMEY.js.map