@salla.sa/twilight-theme-engine 1.0.169 → 1.0.171

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 (283) hide show
  1. package/dist/{AddToCartForm-P5HKFKLU.js → AddToCartForm-PETEJAYF.js} +3 -3
  2. package/dist/{AddToCartForm-P5HKFKLU.js.map → AddToCartForm-PETEJAYF.js.map} +1 -1
  3. package/dist/{BlogAuthorPage-YE6KOAGY.js → BlogAuthorPage-NR6WFTJN.js} +28 -28
  4. package/dist/{BlogAuthorPage-YE6KOAGY.js.map → BlogAuthorPage-NR6WFTJN.js.map} +1 -1
  5. package/dist/{BlogCategoryPage-GHAEQXPU.js → BlogCategoryPage-26LL6UCQ.js} +28 -28
  6. package/dist/{BlogCategoryPage-GHAEQXPU.js.map → BlogCategoryPage-26LL6UCQ.js.map} +1 -1
  7. package/dist/{BlogPage-HYANZM4A.js → BlogPage-EUR36YGA.js} +26 -26
  8. package/dist/{BlogPage-HYANZM4A.js.map → BlogPage-EUR36YGA.js.map} +1 -1
  9. package/dist/{BlogSinglePage-HXI4V2NV.js → BlogSinglePage-VDYX5UEI.js} +26 -26
  10. package/dist/{BlogSinglePage-HXI4V2NV.js.map → BlogSinglePage-VDYX5UEI.js.map} +1 -1
  11. package/dist/{BlogTagPage-U7XH4GUH.js → BlogTagPage-XYG6L57H.js} +28 -28
  12. package/dist/{BlogTagPage-U7XH4GUH.js.map → BlogTagPage-XYG6L57H.js.map} +1 -1
  13. package/dist/{BrandsPage-JDFD6YDF.js → BrandsPage-7U3H5FTY.js} +27 -27
  14. package/dist/{BrandsPage-JDFD6YDF.js.map → BrandsPage-7U3H5FTY.js.map} +1 -1
  15. package/dist/{Breadcrumb-EL2EKGPE.js → Breadcrumb-B4MCXUPV.js} +26 -26
  16. package/dist/{Breadcrumb-EL2EKGPE.js.map → Breadcrumb-B4MCXUPV.js.map} +1 -1
  17. package/dist/{CartItem-LX3LQHS4.js → CartItem-OMALYDHX.js} +26 -26
  18. package/dist/{CartItem-LX3LQHS4.js.map → CartItem-OMALYDHX.js.map} +1 -1
  19. package/dist/{CartSummary-BDKFDPK5.js → CartSummary-H4UOGIV4.js} +26 -26
  20. package/dist/{CartSummary-BDKFDPK5.js.map → CartSummary-H4UOGIV4.js.map} +1 -1
  21. package/dist/{Copyright-RWI3V3SW.js → Copyright-KREJU4IH.js} +3 -3
  22. package/dist/{Copyright-RWI3V3SW.js.map → Copyright-KREJU4IH.js.map} +1 -1
  23. package/dist/{CustomerLayout-MAKMC3AL.js → CustomerLayout-Q7XCXKFQ.js} +26 -26
  24. package/dist/{CustomerLayout-MAKMC3AL.js.map → CustomerLayout-Q7XCXKFQ.js.map} +1 -1
  25. package/dist/{Footer-NSRN55HH.js → Footer-FCL3CXYR.js} +4 -4
  26. package/dist/{Footer-NSRN55HH.js.map → Footer-FCL3CXYR.js.map} +1 -1
  27. package/dist/GoogleTag-WPDIRBEA.js +15 -0
  28. package/dist/{GoogleTag-OAJVDSHT.js.map → GoogleTag-WPDIRBEA.js.map} +1 -1
  29. package/dist/{Header-XW7YB6BO.js → Header-FC46PPV3.js} +11 -11
  30. package/dist/{Header-XW7YB6BO.js.map → Header-FC46PPV3.js.map} +1 -1
  31. package/dist/{LatestProducts-ANS2UXVF.js → LatestProducts-MY2R7KLG.js} +28 -28
  32. package/dist/{LatestProducts-ANS2UXVF.js.map → LatestProducts-MY2R7KLG.js.map} +1 -1
  33. package/dist/{LoyaltyPage-YZRY4U2R.js → LoyaltyPage-KNHXLI2H.js} +26 -26
  34. package/dist/{LoyaltyPage-YZRY4U2R.js.map → LoyaltyPage-KNHXLI2H.js.map} +1 -1
  35. package/dist/{LoyaltyPointsPage-3YH4QCLI.js → LoyaltyPointsPage-KFFVWV3X.js} +8 -8
  36. package/dist/{LoyaltyPointsPage-3YH4QCLI.js.map → LoyaltyPointsPage-KFFVWV3X.js.map} +1 -1
  37. package/dist/{MainMenu-EO2OOAXP.js → MainMenu-BCFJTGHV.js} +7 -7
  38. package/dist/{MainMenu-EO2OOAXP.js.map → MainMenu-BCFJTGHV.js.map} +1 -1
  39. package/dist/{MasterLayout-OUJXITQJ.js → MasterLayout-C7EQFCEL.js} +26 -26
  40. package/dist/{MasterLayout-OUJXITQJ.js.map → MasterLayout-C7EQFCEL.js.map} +1 -1
  41. package/dist/{MobileMenu-W5PZAJ3Q.js → MobileMenu-2H3JR4CV.js} +27 -27
  42. package/dist/{MobileMenu-W5PZAJ3Q.js.map → MobileMenu-2H3JR4CV.js.map} +1 -1
  43. package/dist/{NotificationsPage-2UXU3V7Y.js → NotificationsPage-MMPYLBWF.js} +26 -26
  44. package/dist/{NotificationsPage-2UXU3V7Y.js.map → NotificationsPage-MMPYLBWF.js.map} +1 -1
  45. package/dist/{OrderSinglePage-UDMEG32W.js → OrderSinglePage-W2NSO2WY.js} +27 -27
  46. package/dist/{OrderSinglePage-UDMEG32W.js.map → OrderSinglePage-W2NSO2WY.js.map} +1 -1
  47. package/dist/{OrdersPage-AYV2BQCK.js → OrdersPage-JPE2QR43.js} +26 -26
  48. package/dist/{OrdersPage-AYV2BQCK.js.map → OrdersPage-JPE2QR43.js.map} +1 -1
  49. package/dist/{PageSingle-WN65XA5A.js → PageSingle-SANFW4M5.js} +6 -6
  50. package/dist/{PageSingle-WN65XA5A.js.map → PageSingle-SANFW4M5.js.map} +1 -1
  51. package/dist/{ProductDetails-SUKRIT6A.js → ProductDetails-NQPSWMP6.js} +7 -7
  52. package/dist/{ProductDetails-SUKRIT6A.js.map → ProductDetails-NQPSWMP6.js.map} +1 -1
  53. package/dist/{ProfilePage-G6XOFM3G.js → ProfilePage-GS2B2L6I.js} +26 -26
  54. package/dist/{ProfilePage-G6XOFM3G.js.map → ProfilePage-GS2B2L6I.js.map} +1 -1
  55. package/dist/{ReviewsPage-O275F6X4.js → ReviewsPage-S2I5RFIF.js} +3 -3
  56. package/dist/{ReviewsPage-O275F6X4.js.map → ReviewsPage-S2I5RFIF.js.map} +1 -1
  57. package/dist/{SeoCartWidget-MJ4Q5UYP.js → SeoCartWidget-GW2TAGXD.js} +26 -26
  58. package/dist/{SeoCartWidget-MJ4Q5UYP.js.map → SeoCartWidget-GW2TAGXD.js.map} +1 -1
  59. package/dist/{SettingsPage-WC774PON.js → SettingsPage-3BVO7ZUK.js} +26 -26
  60. package/dist/{SettingsPage-WC774PON.js.map → SettingsPage-3BVO7ZUK.js.map} +1 -1
  61. package/dist/{StoreClosedNotification-LOXAPYH2.js → StoreClosedNotification-IQ5DNN6D.js} +27 -27
  62. package/dist/{StoreClosedNotification-LOXAPYH2.js.map → StoreClosedNotification-IQ5DNN6D.js.map} +1 -1
  63. package/dist/{TestimonialsPage-NUYPLEUA.js → TestimonialsPage-CJJ7EHJ2.js} +6 -6
  64. package/dist/{TestimonialsPage-NUYPLEUA.js.map → TestimonialsPage-CJJ7EHJ2.js.map} +1 -1
  65. package/dist/{ThankYouPage-BQ22N2ME.js → ThankYouPage-ASQROE5J.js} +26 -26
  66. package/dist/{ThankYouPage-BQ22N2ME.js.map → ThankYouPage-ASQROE5J.js.map} +1 -1
  67. package/dist/{WalletPage-EJ24EB7I.js → WalletPage-22CVWSRV.js} +27 -27
  68. package/dist/{WalletPage-EJ24EB7I.js.map → WalletPage-22CVWSRV.js.map} +1 -1
  69. package/dist/{WebMcpTools-4ALCUSCX.js → WebMcpTools-3YNG5IF6.js} +9 -9
  70. package/dist/{WebMcpTools-4ALCUSCX.js.map → WebMcpTools-3YNG5IF6.js.map} +1 -1
  71. package/dist/{WishlistPage-FTM2SBZ6.js → WishlistPage-NTHBN65W.js} +28 -28
  72. package/dist/{WishlistPage-FTM2SBZ6.js.map → WishlistPage-NTHBN65W.js.map} +1 -1
  73. package/dist/api/advertisement.js +4 -4
  74. package/dist/api/apps.js +4 -4
  75. package/dist/api/blog.js +6 -6
  76. package/dist/api/brands.js +6 -6
  77. package/dist/api/cart.js +6 -6
  78. package/dist/api/category.js +6 -6
  79. package/dist/api/client.js +3 -3
  80. package/dist/api/custom-url.js +4 -4
  81. package/dist/api/home.js +4 -4
  82. package/dist/api/loyalty.js +6 -6
  83. package/dist/api/menu.js +4 -4
  84. package/dist/api/notification.js +4 -4
  85. package/dist/api/order.js +6 -6
  86. package/dist/api/page.js +6 -6
  87. package/dist/api/product.js +6 -6
  88. package/dist/api/profile.js +3 -3
  89. package/dist/api/store.js +5 -5
  90. package/dist/api/translations.js +4 -4
  91. package/dist/api/user.js +4 -4
  92. package/dist/api/wallet.js +4 -4
  93. package/dist/api/wishlist.js +7 -7
  94. package/dist/{chunk-KD253OZG.js → chunk-2C4FCBWZ.js} +3 -3
  95. package/dist/{chunk-KD253OZG.js.map → chunk-2C4FCBWZ.js.map} +1 -1
  96. package/dist/{chunk-OS2KFODO.js → chunk-2WZEBALV.js} +3 -3
  97. package/dist/{chunk-OS2KFODO.js.map → chunk-2WZEBALV.js.map} +1 -1
  98. package/dist/{chunk-CNMFHHJS.js → chunk-3T5KKY6Z.js} +5 -5
  99. package/dist/{chunk-CNMFHHJS.js.map → chunk-3T5KKY6Z.js.map} +1 -1
  100. package/dist/{chunk-QQ2HOV3A.js → chunk-3XMBFMP2.js} +4 -4
  101. package/dist/{chunk-QQ2HOV3A.js.map → chunk-3XMBFMP2.js.map} +1 -1
  102. package/dist/{chunk-EMGYITFO.js → chunk-42LVDS2S.js} +6 -6
  103. package/dist/{chunk-EMGYITFO.js.map → chunk-42LVDS2S.js.map} +1 -1
  104. package/dist/{chunk-WZL2NYUO.js → chunk-4ALVJNVW.js} +4 -4
  105. package/dist/{chunk-WZL2NYUO.js.map → chunk-4ALVJNVW.js.map} +1 -1
  106. package/dist/{chunk-DH565UJN.js → chunk-4EFED5UW.js} +5 -5
  107. package/dist/{chunk-DH565UJN.js.map → chunk-4EFED5UW.js.map} +1 -1
  108. package/dist/{chunk-4NKBOFT3.js → chunk-4G3EWEDW.js} +5 -5
  109. package/dist/{chunk-4NKBOFT3.js.map → chunk-4G3EWEDW.js.map} +1 -1
  110. package/dist/{chunk-M3KTV4DI.js → chunk-67TWW55N.js} +8 -8
  111. package/dist/{chunk-M3KTV4DI.js.map → chunk-67TWW55N.js.map} +1 -1
  112. package/dist/{chunk-ATFMDVGV.js → chunk-6ESD4JC7.js} +7 -7
  113. package/dist/{chunk-ATFMDVGV.js.map → chunk-6ESD4JC7.js.map} +1 -1
  114. package/dist/{chunk-NRIOPZ6G.js → chunk-6XVH5SDL.js} +3 -3
  115. package/dist/{chunk-NRIOPZ6G.js.map → chunk-6XVH5SDL.js.map} +1 -1
  116. package/dist/{chunk-QTE34HN3.js → chunk-6YNBBQM5.js} +5 -5
  117. package/dist/{chunk-QTE34HN3.js.map → chunk-6YNBBQM5.js.map} +1 -1
  118. package/dist/{chunk-DOBQXGCU.js → chunk-7GKF7ID7.js} +3 -3
  119. package/dist/{chunk-DOBQXGCU.js.map → chunk-7GKF7ID7.js.map} +1 -1
  120. package/dist/{chunk-25PKWUYU.js → chunk-7JPLL464.js} +3 -3
  121. package/dist/{chunk-25PKWUYU.js.map → chunk-7JPLL464.js.map} +1 -1
  122. package/dist/{chunk-HE3N46XK.js → chunk-7WLTRGGX.js} +4 -4
  123. package/dist/{chunk-HE3N46XK.js.map → chunk-7WLTRGGX.js.map} +1 -1
  124. package/dist/{chunk-7BQQXGWB.js → chunk-7WYU4NWU.js} +6 -6
  125. package/dist/{chunk-7BQQXGWB.js.map → chunk-7WYU4NWU.js.map} +1 -1
  126. package/dist/{chunk-JNTBW4IC.js → chunk-A7J4RNOU.js} +4 -4
  127. package/dist/{chunk-JNTBW4IC.js.map → chunk-A7J4RNOU.js.map} +1 -1
  128. package/dist/{chunk-PRK5CUKL.js → chunk-AB7KTJYY.js} +3 -3
  129. package/dist/{chunk-PRK5CUKL.js.map → chunk-AB7KTJYY.js.map} +1 -1
  130. package/dist/{chunk-Z3X4A44M.js → chunk-BWEYNJCK.js} +3 -3
  131. package/dist/{chunk-Z3X4A44M.js.map → chunk-BWEYNJCK.js.map} +1 -1
  132. package/dist/{chunk-JBCAUTEB.js → chunk-CYDUDCPL.js} +7 -7
  133. package/dist/{chunk-JBCAUTEB.js.map → chunk-CYDUDCPL.js.map} +1 -1
  134. package/dist/{chunk-KOQXZXR3.js → chunk-DY7RGAJK.js} +22 -18
  135. package/dist/chunk-DY7RGAJK.js.map +1 -0
  136. package/dist/{chunk-5F7FMV4X.js → chunk-EGZYS5RY.js} +5 -5
  137. package/dist/{chunk-5F7FMV4X.js.map → chunk-EGZYS5RY.js.map} +1 -1
  138. package/dist/{chunk-CO4V4ZSH.js → chunk-EVI27KXN.js} +4 -4
  139. package/dist/{chunk-CO4V4ZSH.js.map → chunk-EVI27KXN.js.map} +1 -1
  140. package/dist/{chunk-EAUXG5XG.js → chunk-GDHS4DZP.js} +3 -3
  141. package/dist/{chunk-EAUXG5XG.js.map → chunk-GDHS4DZP.js.map} +1 -1
  142. package/dist/{chunk-HQABEEIY.js → chunk-HCGFF7EK.js} +8 -8
  143. package/dist/{chunk-HQABEEIY.js.map → chunk-HCGFF7EK.js.map} +1 -1
  144. package/dist/{chunk-IXK5Y34E.js → chunk-I53FQCLP.js} +3 -3
  145. package/dist/{chunk-IXK5Y34E.js.map → chunk-I53FQCLP.js.map} +1 -1
  146. package/dist/{chunk-YFKQZUKH.js → chunk-IG47QC5P.js} +6 -6
  147. package/dist/{chunk-YFKQZUKH.js.map → chunk-IG47QC5P.js.map} +1 -1
  148. package/dist/{chunk-QVZOFJA3.js → chunk-IK5JWEHS.js} +3 -3
  149. package/dist/{chunk-QVZOFJA3.js.map → chunk-IK5JWEHS.js.map} +1 -1
  150. package/dist/{chunk-T45VSG3A.js → chunk-IOI2O5S3.js} +6 -6
  151. package/dist/{chunk-T45VSG3A.js.map → chunk-IOI2O5S3.js.map} +1 -1
  152. package/dist/{chunk-UM2XV5RF.js → chunk-J3V5EAHP.js} +3 -3
  153. package/dist/{chunk-UM2XV5RF.js.map → chunk-J3V5EAHP.js.map} +1 -1
  154. package/dist/{chunk-UGHL2XTL.js → chunk-JDTETNQF.js} +3 -3
  155. package/dist/{chunk-UGHL2XTL.js.map → chunk-JDTETNQF.js.map} +1 -1
  156. package/dist/{chunk-PA2L3YV7.js → chunk-K2PXOXWW.js} +5 -5
  157. package/dist/{chunk-PA2L3YV7.js.map → chunk-K2PXOXWW.js.map} +1 -1
  158. package/dist/{chunk-NT5QT2GX.js → chunk-LAXSKYAW.js} +4 -4
  159. package/dist/{chunk-NT5QT2GX.js.map → chunk-LAXSKYAW.js.map} +1 -1
  160. package/dist/{chunk-BBCCVNXA.js → chunk-LX2IWLNL.js} +3 -3
  161. package/dist/{chunk-BBCCVNXA.js.map → chunk-LX2IWLNL.js.map} +1 -1
  162. package/dist/{chunk-XQA5UBUE.js → chunk-LZRC4FX5.js} +4 -4
  163. package/dist/{chunk-XQA5UBUE.js.map → chunk-LZRC4FX5.js.map} +1 -1
  164. package/dist/{chunk-6QFGFXBV.js → chunk-MDFCCC26.js} +3 -3
  165. package/dist/{chunk-6QFGFXBV.js.map → chunk-MDFCCC26.js.map} +1 -1
  166. package/dist/{chunk-CEY3S2LF.js → chunk-MWAJ77KY.js} +3 -3
  167. package/dist/{chunk-CEY3S2LF.js.map → chunk-MWAJ77KY.js.map} +1 -1
  168. package/dist/{chunk-JFVK3GTL.js → chunk-N2VUTPHF.js} +23 -23
  169. package/dist/{chunk-JFVK3GTL.js.map → chunk-N2VUTPHF.js.map} +1 -1
  170. package/dist/{chunk-Z3TCCJA4.js → chunk-NCB6RRC7.js} +6 -6
  171. package/dist/{chunk-Z3TCCJA4.js.map → chunk-NCB6RRC7.js.map} +1 -1
  172. package/dist/{chunk-RYRNNGJQ.js → chunk-OBURHVLL.js} +3 -3
  173. package/dist/{chunk-RYRNNGJQ.js.map → chunk-OBURHVLL.js.map} +1 -1
  174. package/dist/{chunk-7MXNMWHA.js → chunk-OS2BPZSU.js} +3 -3
  175. package/dist/{chunk-7MXNMWHA.js.map → chunk-OS2BPZSU.js.map} +1 -1
  176. package/dist/{chunk-F76WYUQS.js → chunk-P2RT7RII.js} +37 -3
  177. package/dist/chunk-P2RT7RII.js.map +1 -0
  178. package/dist/{chunk-HWLXFHAI.js → chunk-PA43DJCF.js} +4 -4
  179. package/dist/{chunk-HWLXFHAI.js.map → chunk-PA43DJCF.js.map} +1 -1
  180. package/dist/{chunk-VCRHAEQB.js → chunk-QA7QOYRI.js} +5 -5
  181. package/dist/{chunk-VCRHAEQB.js.map → chunk-QA7QOYRI.js.map} +1 -1
  182. package/dist/{chunk-5N2DX6TR.js → chunk-R3NACW4I.js} +3 -3
  183. package/dist/{chunk-5N2DX6TR.js.map → chunk-R3NACW4I.js.map} +1 -1
  184. package/dist/{chunk-RJQGL3NV.js → chunk-RJWJLHVI.js} +4 -4
  185. package/dist/{chunk-RJQGL3NV.js.map → chunk-RJWJLHVI.js.map} +1 -1
  186. package/dist/{chunk-PRRNGSGA.js → chunk-RMXQMMZR.js} +4 -4
  187. package/dist/{chunk-PRRNGSGA.js.map → chunk-RMXQMMZR.js.map} +1 -1
  188. package/dist/{chunk-AZDG7LQQ.js → chunk-T4QPJAKY.js} +4 -4
  189. package/dist/{chunk-AZDG7LQQ.js.map → chunk-T4QPJAKY.js.map} +1 -1
  190. package/dist/{chunk-RTZMIZ3R.js → chunk-T6DHTOH6.js} +3 -3
  191. package/dist/{chunk-RTZMIZ3R.js.map → chunk-T6DHTOH6.js.map} +1 -1
  192. package/dist/{chunk-RNU7Z7E6.js → chunk-TLY2QNEB.js} +3 -3
  193. package/dist/{chunk-RNU7Z7E6.js.map → chunk-TLY2QNEB.js.map} +1 -1
  194. package/dist/{chunk-AVQVC4MX.js → chunk-UODKURVP.js} +4 -4
  195. package/dist/{chunk-AVQVC4MX.js.map → chunk-UODKURVP.js.map} +1 -1
  196. package/dist/{chunk-ARCZMOUQ.js → chunk-WLMBEK27.js} +5 -5
  197. package/dist/{chunk-ARCZMOUQ.js.map → chunk-WLMBEK27.js.map} +1 -1
  198. package/dist/{chunk-YIKGVBOK.js → chunk-WXXGBZJH.js} +3 -3
  199. package/dist/{chunk-YIKGVBOK.js.map → chunk-WXXGBZJH.js.map} +1 -1
  200. package/dist/{chunk-DKGQ3V2F.js → chunk-X3R5BZ4A.js} +6 -6
  201. package/dist/{chunk-DKGQ3V2F.js.map → chunk-X3R5BZ4A.js.map} +1 -1
  202. package/dist/{chunk-LRA3T3GV.js → chunk-X5RYXRGW.js} +3 -3
  203. package/dist/{chunk-LRA3T3GV.js.map → chunk-X5RYXRGW.js.map} +1 -1
  204. package/dist/{chunk-CTNSPX4E.js → chunk-XS2YRI53.js} +5 -5
  205. package/dist/{chunk-CTNSPX4E.js.map → chunk-XS2YRI53.js.map} +1 -1
  206. package/dist/{chunk-QBCH7FO7.js → chunk-YHNR22Z6.js} +4 -4
  207. package/dist/{chunk-QBCH7FO7.js.map → chunk-YHNR22Z6.js.map} +1 -1
  208. package/dist/{chunk-PAI55SCJ.js → chunk-YTL7DNHA.js} +3 -3
  209. package/dist/{chunk-PAI55SCJ.js.map → chunk-YTL7DNHA.js.map} +1 -1
  210. package/dist/{chunk-IUZGNTYZ.js → chunk-ZNIDTHQR.js} +4 -4
  211. package/dist/{chunk-IUZGNTYZ.js.map → chunk-ZNIDTHQR.js.map} +1 -1
  212. package/dist/components/cart/index.js +1 -1
  213. package/dist/components/common/index.js +1 -1
  214. package/dist/components/drawer/index.js +24 -24
  215. package/dist/components/home/index.js +29 -29
  216. package/dist/components/layout/index.js +6 -6
  217. package/dist/components/product/index.js +26 -26
  218. package/dist/components/store/index.js +25 -25
  219. package/dist/components/toast/index.js +4 -4
  220. package/dist/components/tracking/index.js +9 -9
  221. package/dist/custom-urls-POOMPFX5.js +17 -0
  222. package/dist/{custom-urls-SZRH7IR7.js.map → custom-urls-POOMPFX5.js.map} +1 -1
  223. package/dist/dev/editor/index.js +2 -2
  224. package/dist/dev/index.js +2 -2
  225. package/dist/document-class-FHIN3OV7.js +38 -0
  226. package/dist/{document-class-O3NRRZFQ.js.map → document-class-FHIN3OV7.js.map} +1 -1
  227. package/dist/hooks/index.js +24 -24
  228. package/dist/hooks/useComments.js +3 -3
  229. package/dist/hooks/useGtm.js +24 -24
  230. package/dist/hooks/useMoney.js +24 -24
  231. package/dist/hooks/useProduct.js +3 -3
  232. package/dist/hooks/useStore.js +24 -24
  233. package/dist/hooks/useUser.js +5 -5
  234. package/dist/hooks/useWishlist.js +3 -3
  235. package/dist/index.js +24 -24
  236. package/dist/native-app/index.js +3 -3
  237. package/dist/navigation-ACX35Z2D.js +15 -0
  238. package/dist/{navigation-A4N4YKVE.js.map → navigation-ACX35Z2D.js.map} +1 -1
  239. package/dist/{navigation-XTD2KQMY.js → navigation-ZI4V7VVT.js} +7 -7
  240. package/dist/{navigation-XTD2KQMY.js.map → navigation-ZI4V7VVT.js.map} +1 -1
  241. package/dist/{not-found-MQSA2QBK.js → not-found-BU3HNWPG.js} +27 -27
  242. package/dist/{not-found-MQSA2QBK.js.map → not-found-BU3HNWPG.js.map} +1 -1
  243. package/dist/providers/index.js +24 -24
  244. package/dist/routes/account/orders.js +8 -8
  245. package/dist/routes/account.js +17 -17
  246. package/dist/routes/blog.js +12 -12
  247. package/dist/routes/brands.js +8 -8
  248. package/dist/routes/cart.js +33 -33
  249. package/dist/routes/home.js +30 -30
  250. package/dist/routes/index.js +12 -12
  251. package/dist/routes/loyalty.js +9 -9
  252. package/dist/routes/page.js +8 -8
  253. package/dist/routes/product-listing.js +34 -34
  254. package/dist/routes/product.js +33 -33
  255. package/dist/routes/root/beforeLoad.d.ts.map +1 -1
  256. package/dist/routes/seo-redirects.js +12 -12
  257. package/dist/routes/testimonials.js +4 -4
  258. package/dist/routes/thank-you.js +8 -8
  259. package/dist/skeleton.js +30 -30
  260. package/dist/{store-lookup-VH3YPGP2.js → store-lookup-2OPAQNAM.js} +11 -11
  261. package/dist/{store-lookup-VH3YPGP2.js.map → store-lookup-2OPAQNAM.js.map} +1 -1
  262. package/dist/tanstack/middleware/favicon.d.ts +14 -0
  263. package/dist/tanstack/middleware/favicon.d.ts.map +1 -0
  264. package/dist/tanstack/middleware/twilight.d.ts.map +1 -1
  265. package/dist/tanstack.js +79 -42
  266. package/dist/tanstack.js.map +1 -1
  267. package/dist/types/index.d.ts +6 -0
  268. package/dist/types/index.d.ts.map +1 -1
  269. package/dist/utils/baseHead.js +2 -2
  270. package/dist/utils/index.js +6 -6
  271. package/dist/utils/store-base.d.ts +39 -0
  272. package/dist/utils/store-base.d.ts.map +1 -1
  273. package/dist/utils/store-identity.d.ts +9 -0
  274. package/dist/utils/store-identity.d.ts.map +1 -1
  275. package/dist/vite/index.js +3 -3
  276. package/package.json +1 -1
  277. package/tailwind/routes/root/beforeLoad.ts.txt +14 -2
  278. package/dist/GoogleTag-OAJVDSHT.js +0 -15
  279. package/dist/chunk-F76WYUQS.js.map +0 -1
  280. package/dist/chunk-KOQXZXR3.js.map +0 -1
  281. package/dist/custom-urls-SZRH7IR7.js +0 -17
  282. package/dist/document-class-O3NRRZFQ.js +0 -38
  283. package/dist/navigation-A4N4YKVE.js +0 -15
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/app-scope.ts","../src/utils/theme-hook-slots.ts"],"names":[],"mappings":";;;AAGA,IAAM,SAAA,GAAY,OAAO,MAAA,KAAW,WAAA;AA2B7B,IAAM,qBAAA,GAAgD,CAAC,CAAA,EAAG,MAAA,KAAW;AAC1E,EAAA,MAAM,QAAA,GAAW,CAAC,GAAA,KAChB,OAAO,QAAQ,QAAA,IAAY,GAAA,CAAI,OAAA,CAAQ,MAAM,CAAA,KAAM,CAAA;AACrD,EAAA,MAAM,SAAA,GAAY,CAAC,GAAA,KAAwB,GAAA,CAAI,MAAM,CAAC,CAAA;AACtD,EAAA,MAAM,YAAY,MAA+B,CAAA,CAAE,KAAA,IAAS,CAAA,CAAE,SAAS,EAAC;AACxE,EAAA,MAAM,UAAA,GAAa,MAChB,SAAA,EAAU,CAAE,UAAsC,EAAC;AACtD,EAAA,MAAM,WAAA,GAAc,CAAC,GAAA,EAA8B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,WAAA;AACnC,EAAA,IAAI,CAAC,KAAA,CAAM,OAAA,CAAQ,KAAK,GAAG,OAAO,KAAA;AAClC,EAAA,KAAA,MAAW,IAAA,IAAQ,UAAA,EAAY,IAAI,CAAC,KAAA,CAAM,SAAS,IAAI,CAAA,EAAG,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA;AACzE,EAAA,OAAO,IAAA;AACT;AAYO,SAAS,mBAAA,GAA4B;AAC1C,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,IAAe,UAAA,CAAW,SAAS,CAAA,EAAG;AAC5D,EAAA,IAAI,SAAA,MAAe,UAAA,EAAY;AAE/B,EAAA,UAAA,GAAa,IAAA;AACb,EAAA,MAAA,CAAO,gBAAA,CAAiB,uBAAuB,MAAM,KAAK,WAAU,EAAG,EAAE,IAAA,EAAM,IAAA,EAAM,CAAA;AACvF;AAGO,SAAS,2BAAA,GAAwC;AACtD,EAAA,OAAO,CAAC,GAAG,UAAU,CAAA;AACvB;AAeO,SAAS,0BAAA,CAA2B,KAAA,GAAkB,2BAAA,EAA4B,EAAG;AAC1F,EAAA,IAAI,CAAC,KAAA,CAAM,MAAA,EAAQ,OAAO,IAAA;AAC1B,EAAA,MAAM,IAAA,GAAO,qBAAA,CAAsB,IAAA,CAAK,SAAA,CAAU,KAAK,CAAC,CAAA;AACxD,EAAA,OACE,wUASM,IAAI,CAAA,EAAA,CAAA;AAEd","file":"chunk-CEY3S2LF.js","sourcesContent":["import type { SallaSDK } from '../types/salla-sdk';\nimport { escapeForInlineScript } from './inline-script';\n\nconst isBrowser = typeof window !== 'undefined';\n\n/** One app's private `app.*` bag, keyed without the `app.` prefix (`app.color` → `color`). */\nexport type AppConfigBag = Record<string, unknown>;\n\n/** One public `app.*` bucket per app, keyed by appScopeId. Everything else is read from the\n * real `salla.config` at runtime. */\nexport interface AppScopeContexts {\n apps: Record<string, AppConfigBag>;\n}\n\n/** Builds the `scopeId → sandboxed SDK` factory over a live bucket bag. */\nexport type AppScopeFactoryBuilder = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n w: any,\n appCtx: Record<string, AppConfigBag>\n) => (scopeId: string) => SallaSDK;\n\n/**\n * The sandbox itself: proxies that resolve `app.*` against the app's own bucket and pass\n * everything else through to the real SDK.\n *\n * MUST stay self-contained (only `Object`/`Proxy` and its two arguments): it is serialized via\n * `.toString()` next to {@link appScopeBootstrap} and handed in as an argument, so anything it\n * closed over at module scope would be undefined in the inline head copy. Split out from the\n * bootstrap purely to keep both halves reviewable.\n */\nexport const createAppScopeFactory: AppScopeFactoryBuilder = (w, appCtx) => {\n const isAppKey = (key: unknown): key is string =>\n typeof key === 'string' && key.indexOf('app.') === 0;\n const bucketKey = (key: string): string => key.slice(4);\n const realSalla = (): Record<string, unknown> => w.salla || w.Salla || {};\n const realConfig = (): Record<string, unknown> =>\n (realSalla().config as Record<string, unknown>) || {};\n const passthrough = (obj: Record<string, unknown>, prop: string | symbol): unknown => {\n const member = obj[prop as string];\n return typeof member === 'function' ? member.bind(obj) : member;\n };\n\n const createAppScope = (scopeId: string): SallaSDK => {\n const bucket = (): AppConfigBag => (appCtx[scopeId] = appCtx[scopeId] || {});\n\n const getConfig = (key: string, fallback?: unknown): unknown => {\n if (isAppKey(key)) {\n const sub = bucketKey(key);\n const b = bucket();\n // `app.*` miss returns the caller default, never the real config — a missing app\n // setting must not resolve to a same-named global.\n return sub in b ? b[sub] : fallback;\n }\n const cfg = realConfig();\n return typeof cfg.get === 'function'\n ? (cfg.get as (k: string, d?: unknown) => unknown)(key, fallback)\n : fallback;\n };\n\n const setConfig = (key: string, value: unknown): unknown => {\n if (isAppKey(key)) {\n bucket()[bucketKey(key)] = value;\n return value;\n }\n const cfg = realConfig();\n return typeof cfg.set === 'function'\n ? (cfg.set as (k: string, v: unknown) => unknown)(key, value)\n : value;\n };\n\n const hasConfig = (key: string): boolean =>\n isAppKey(key) ? bucketKey(key) in bucket() : key in realConfig();\n\n const configProxy = new Proxy({} as Record<string, unknown>, {\n get(_t, prop) {\n if (prop === 'get') return getConfig;\n if (prop === 'set') return setConfig;\n if (prop === 'has') return hasConfig;\n if (isAppKey(prop)) return getConfig(prop);\n return passthrough(realConfig(), prop);\n },\n set(_t, prop, value) {\n setConfig(prop as string, value);\n return true;\n },\n has(_t, prop) {\n return hasConfig(prop as string);\n },\n });\n\n return new Proxy({} as Record<string, unknown>, {\n get(_t, prop) {\n return prop === 'config' ? configProxy : passthrough(realSalla(), prop);\n },\n set(_t, prop, value) {\n // Reassigning `salla.config` wholesale would escape the sandbox; swallow it.\n if (prop === 'config') return true;\n realSalla()[prop as string] = value;\n return true;\n },\n }) as unknown as SallaSDK;\n };\n\n return createAppScope;\n};\n\n/**\n * Installs `window.Salla.appScope`, seeded with `contexts` and sandboxed by `makeFactory`.\n *\n * MUST stay self-contained (only `window`/`Object` and its arguments): it's serialized via\n * `.toString()` and inlined into the SSR head so the factory exists at parse time — before the\n * SDK init/hydration a CDN snippet's `onReady` races, else it throws `Salla.appScope is not a\n * function`. `makeFactory` is passed in rather than imported for exactly that reason. Also\n * called directly by `installAppScope` (tests/fallback).\n *\n * Idempotent: the factory is first-write-wins, while buckets are merged per scope (also\n * first-write-wins) so a later call can seed scopes the first one had no data for. `appCtx` is\n * closure-private (namespacing, not security: buckets are public-only and the boundary is\n * server-side).\n */\nexport function appScopeBootstrap(\n contexts: AppScopeContexts,\n makeFactory: AppScopeFactoryBuilder\n): void {\n if (typeof window === 'undefined') return;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const w = window as any;\n const Salla = (w.Salla = w.Salla || {});\n if (Salla.appScope) {\n // Already installed (normally by the inline head copy). The factory is first-write-wins,\n // but buckets are not: the head may have installed with none of them — the settings\n // endpoint can fail or lag behind the snippets one — so hand them to the existing install.\n if (Salla.__appScopeSeed) Salla.__appScopeSeed(contexts);\n return;\n }\n\n // Live bag + pristine snapshot (for mock overlays). Copy, don't alias: a snippet may\n // `config.set('app.x')` and the payload can be a cached response.\n const appCtx: Record<string, AppConfigBag> = {};\n const base: Record<string, AppConfigBag> = {};\n // Which scopes already got their real bucket, so a later seed can't overwrite one.\n const seeded: Record<string, boolean> = {};\n const seed = (next: AppScopeContexts): void => {\n const bags = (next && next.apps) || {};\n Object.keys(bags).forEach((scopeId) => {\n if (seeded[scopeId]) return;\n seeded[scopeId] = true;\n appCtx[scopeId] = Object.assign({}, appCtx[scopeId] || {}, bags[scopeId] || {});\n base[scopeId] = Object.assign({}, appCtx[scopeId]);\n });\n };\n seed(contexts);\n\n const createAppScope = makeFactory(w, appCtx);\n Salla.appScope = (scopeId: string): SallaSDK => createAppScope(scopeId);\n\n // Fill in buckets for scopes not seeded yet (first-write-wins per scope). Lets the head\n // install the factory unconditionally — at parse time, before any snippet's onReady — and\n // still pick up buckets that only the client managed to fetch.\n Salla.__appScopeSeed = (next: AppScopeContexts): void => seed(next);\n\n // Overlay preview mocks onto an app's pristine baseline, so fields the partner did not mock\n // keep their real values. Returns false for an unknown scope or before install.\n Salla.__appScopeMock = (scopeId: string, mocks: AppConfigBag): boolean => {\n if (!(scopeId in base)) return false;\n appCtx[scopeId] = Object.assign({}, base[scopeId], mocks);\n return true;\n };\n}\n\n/** Overlay preview mocks onto one app's bucket (over its pristine values). Delegates to the\n * bootstrap's `__appScopeMock`, so it works for both install paths. False if unknown/uninstalled. */\nexport function applyAppScopeMocks(appScopeId: string, mocks: AppConfigBag): boolean {\n if (!isBrowser) return false;\n const mock = (window.Salla as unknown as { __appScopeMock?: MockApplier } | undefined)\n ?.__appScopeMock;\n return mock?.(appScopeId, mocks) ?? false;\n}\n\ntype MockApplier = (appScopeId: string, mocks: AppConfigBag) => boolean;\n\n/** Serialize the installer into an inline `<script>` body seeded with `contexts` — both halves\n * via `.toString()`, hence their self-contained requirement. See `rootHead`. */\nexport function renderAppScopeInstallScript(contexts: AppScopeContexts): string {\n // Bucket values are partner-set, so escape the JSON seed against a `</script>` breakout.\n // The function sources have no `<`, so they need no escaping.\n const json = escapeForInlineScript(JSON.stringify(contexts));\n return `(${appScopeBootstrap.toString()})(${json},${createAppScopeFactory.toString()});`;\n}\n\n/** Install `Salla.appScope` on the client, or seed buckets into the inline SSR head copy that\n * already installed it. No-op on the server. Fallback for unseeded loads + the unit-test entry\n * point. */\nexport function installAppScope(contexts: AppScopeContexts): void {\n if (!isBrowser) return;\n appScopeBootstrap(contexts, createAppScopeFactory);\n}\n","import { escapeForInlineScript } from './inline-script';\n\nconst registered = new Set<string>();\n\nlet retryArmed = false;\n\n/**\n * Declare hook slots the theme renders itself so apps may mount into them.\n *\n * The SDK rejects `mount()` for any name absent from its `_themeSlots` whitelist, so a theme\n * rendering its own `<salla-hook>` must register the name. Call at module scope; the engine\n * applies the names via {@link applyThemeHookSlots}.\n */\nexport function registerThemeHookSlots(...names: string[]): void {\n for (const name of names) registered.add(name);\n}\n\n/** Push the registered names in. Returns false if the SDK hasn't exposed the list yet. */\nfunction pushSlots(): boolean {\n const slots = window.salla?.hooks?._themeSlots;\n if (!Array.isArray(slots)) return false;\n for (const name of registered) if (!slots.includes(name)) slots.push(name);\n return true;\n}\n\n/**\n * Push every registered slot name into the SDK whitelist. Idempotent. Engine-only.\n *\n * The SDK's hooks module may attach after this runs, so a first no-op falls back to a\n * one-shot retry on `twilight::initiated` — still before apps mount from their own onReady.\n *\n * This is only the late backstop: the whitelist is primarily seeded at parse time by the\n * inline head script from {@link renderThemeHookSlotsScript}, because an app's snippet\n * registers its `onReady` callback before React ever hydrates.\n */\nexport function applyThemeHookSlots(): void {\n if (typeof window === 'undefined' || registered.size === 0) return;\n if (pushSlots() || retryArmed) return;\n\n retryArmed = true;\n window.addEventListener('twilight::initiated', () => void pushSlots(), { once: true });\n}\n\n/** The slot names registered so far. Read by `rootHead` when rendering the inline script. */\nexport function getRegisteredThemeHookSlots(): string[] {\n return [...registered];\n}\n\n/**\n * Serialize the whitelist push into an inline head `<script>` body, so the slots are\n * registered at parse time.\n *\n * Ordering is the whole point: CDN snippets are parser-inserted `<script defer>` tags in the\n * body, so an app's `Salla.onReady` callback is registered long before React hydrates and runs\n * {@link applyThemeHookSlots}. Whichever `twilight::initiated` listener was added first runs\n * first, so the push must be armed from the head — otherwise the SDK rejects the app's\n * `hooks.mount()` with \"Hook <name> is not allowed\" and the app never renders.\n *\n * Returns null when the theme registered no slots. Kept self-contained (only `window`) since\n * it ships as raw source, not as a bundled module.\n */\nexport function renderThemeHookSlotsScript(names: string[] = getRegisteredThemeHookSlots()) {\n if (!names.length) return null;\n const json = escapeForInlineScript(JSON.stringify(names));\n return (\n `(function(names){` +\n `var w=window;` +\n `function push(){` +\n `var h=w.salla&&w.salla.hooks;var slots=h&&h._themeSlots;` +\n `if(!Array.isArray(slots))return false;` +\n `for(var i=0;i<names.length;i++)if(slots.indexOf(names[i])<0)slots.push(names[i]);` +\n `return true}` +\n `if(push())return;` +\n `w.addEventListener('twilight::initiated',function(){push()},{once:true})` +\n `})(${json});`\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/utils/app-scope.ts","../src/utils/theme-hook-slots.ts"],"names":[],"mappings":";;;AAGA,IAAM,SAAA,GAAY,OAAO,MAAA,KAAW,WAAA;AA2B7B,IAAM,qBAAA,GAAgD,CAAC,CAAA,EAAG,MAAA,KAAW;AAC1E,EAAA,MAAM,QAAA,GAAW,CAAC,GAAA,KAChB,OAAO,QAAQ,QAAA,IAAY,GAAA,CAAI,OAAA,CAAQ,MAAM,CAAA,KAAM,CAAA;AACrD,EAAA,MAAM,SAAA,GAAY,CAAC,GAAA,KAAwB,GAAA,CAAI,MAAM,CAAC,CAAA;AACtD,EAAA,MAAM,YAAY,MAA+B,CAAA,CAAE,KAAA,IAAS,CAAA,CAAE,SAAS,EAAC;AACxE,EAAA,MAAM,UAAA,GAAa,MAChB,SAAA,EAAU,CAAE,UAAsC,EAAC;AACtD,EAAA,MAAM,WAAA,GAAc,CAAC,GAAA,EAA8B,IAAA,KAAmC;AACpF,IAAA,MAAM,MAAA,GAAS,IAAI,IAAc,CAAA;AACjC,IAAA,OA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AA;AAClC,EAAA,KAAA,MAAW,IAAA,IAAQ,UAAA,EAAY,IAAI,CAAC,KAAA,CAAM,SAAS,IAAI,CAAA,EAAG,KAAA,CAAM,IAAA,CAAK,IAAI,CAAA;AACzE,EAAA,OAAO,IAAA;AACT;AAYO,SAAS,mBAAA,GAA4B;AAC1C,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,IAAe,UAAA,CAAW,SAAS,CAAA,EAAG;AAC5D,EAAA,IAAI,SAAA,MAAe,UAAA,EAAY;AAE/B,EAAA,UAAA,GAAa,IAAA;AACb,EAAA,MAAA,CAAO,gBAAA,CAAiB,uBAAuB,MAAM,KAAK,WAAU,EAAG,EAAE,IAAA,EAAM,IAAA,EAAM,CAAA;AACvF;AAGO,SAAS,2BAAA,GAAwC;AACtD,EAAA,OAAO,CAAC,GAAG,UAAU,CAAA;AACvB;AAeO,SAAS,0BAAA,CAA2B,KAAA,GAAkB,2BAAA,EAA4B,EAAG;AAC1F,EAAA,IAAI,CAAC,KAAA,CAAM,MAAA,EAAQ,OAAO,IAAA;AAC1B,EAAA,MAAM,IAAA,GAAO,qBAAA,CAAsB,IAAA,CAAK,SAAA,CAAU,KAAK,CAAC,CAAA;AACxD,EAAA,OACE,wUASM,IAAI,CAAA,EAAA,CAAA;AAEd","file":"chunk-MWAJ77KY.js","sourcesContent":["import type { SallaSDK } from '../types/salla-sdk';\nimport { escapeForInlineScript } from './inline-script';\n\nconst isBrowser = typeof window !== 'undefined';\n\n/** One app's private `app.*` bag, keyed without the `app.` prefix (`app.color` → `color`). */\nexport type AppConfigBag = Record<string, unknown>;\n\n/** One public `app.*` bucket per app, keyed by appScopeId. Everything else is read from the\n * real `salla.config` at runtime. */\nexport interface AppScopeContexts {\n apps: Record<string, AppConfigBag>;\n}\n\n/** Builds the `scopeId → sandboxed SDK` factory over a live bucket bag. */\nexport type AppScopeFactoryBuilder = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n w: any,\n appCtx: Record<string, AppConfigBag>\n) => (scopeId: string) => SallaSDK;\n\n/**\n * The sandbox itself: proxies that resolve `app.*` against the app's own bucket and pass\n * everything else through to the real SDK.\n *\n * MUST stay self-contained (only `Object`/`Proxy` and its two arguments): it is serialized via\n * `.toString()` next to {@link appScopeBootstrap} and handed in as an argument, so anything it\n * closed over at module scope would be undefined in the inline head copy. Split out from the\n * bootstrap purely to keep both halves reviewable.\n */\nexport const createAppScopeFactory: AppScopeFactoryBuilder = (w, appCtx) => {\n const isAppKey = (key: unknown): key is string =>\n typeof key === 'string' && key.indexOf('app.') === 0;\n const bucketKey = (key: string): string => key.slice(4);\n const realSalla = (): Record<string, unknown> => w.salla || w.Salla || {};\n const realConfig = (): Record<string, unknown> =>\n (realSalla().config as Record<string, unknown>) || {};\n const passthrough = (obj: Record<string, unknown>, prop: string | symbol): unknown => {\n const member = obj[prop as string];\n return typeof member === 'function' ? member.bind(obj) : member;\n };\n\n const createAppScope = (scopeId: string): SallaSDK => {\n const bucket = (): AppConfigBag => (appCtx[scopeId] = appCtx[scopeId] || {});\n\n const getConfig = (key: string, fallback?: unknown): unknown => {\n if (isAppKey(key)) {\n const sub = bucketKey(key);\n const b = bucket();\n // `app.*` miss returns the caller default, never the real config — a missing app\n // setting must not resolve to a same-named global.\n return sub in b ? b[sub] : fallback;\n }\n const cfg = realConfig();\n return typeof cfg.get === 'function'\n ? (cfg.get as (k: string, d?: unknown) => unknown)(key, fallback)\n : fallback;\n };\n\n const setConfig = (key: string, value: unknown): unknown => {\n if (isAppKey(key)) {\n bucket()[bucketKey(key)] = value;\n return value;\n }\n const cfg = realConfig();\n return typeof cfg.set === 'function'\n ? (cfg.set as (k: string, v: unknown) => unknown)(key, value)\n : value;\n };\n\n const hasConfig = (key: string): boolean =>\n isAppKey(key) ? bucketKey(key) in bucket() : key in realConfig();\n\n const configProxy = new Proxy({} as Record<string, unknown>, {\n get(_t, prop) {\n if (prop === 'get') return getConfig;\n if (prop === 'set') return setConfig;\n if (prop === 'has') return hasConfig;\n if (isAppKey(prop)) return getConfig(prop);\n return passthrough(realConfig(), prop);\n },\n set(_t, prop, value) {\n setConfig(prop as string, value);\n return true;\n },\n has(_t, prop) {\n return hasConfig(prop as string);\n },\n });\n\n return new Proxy({} as Record<string, unknown>, {\n get(_t, prop) {\n return prop === 'config' ? configProxy : passthrough(realSalla(), prop);\n },\n set(_t, prop, value) {\n // Reassigning `salla.config` wholesale would escape the sandbox; swallow it.\n if (prop === 'config') return true;\n realSalla()[prop as string] = value;\n return true;\n },\n }) as unknown as SallaSDK;\n };\n\n return createAppScope;\n};\n\n/**\n * Installs `window.Salla.appScope`, seeded with `contexts` and sandboxed by `makeFactory`.\n *\n * MUST stay self-contained (only `window`/`Object` and its arguments): it's serialized via\n * `.toString()` and inlined into the SSR head so the factory exists at parse time — before the\n * SDK init/hydration a CDN snippet's `onReady` races, else it throws `Salla.appScope is not a\n * function`. `makeFactory` is passed in rather than imported for exactly that reason. Also\n * called directly by `installAppScope` (tests/fallback).\n *\n * Idempotent: the factory is first-write-wins, while buckets are merged per scope (also\n * first-write-wins) so a later call can seed scopes the first one had no data for. `appCtx` is\n * closure-private (namespacing, not security: buckets are public-only and the boundary is\n * server-side).\n */\nexport function appScopeBootstrap(\n contexts: AppScopeContexts,\n makeFactory: AppScopeFactoryBuilder\n): void {\n if (typeof window === 'undefined') return;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const w = window as any;\n const Salla = (w.Salla = w.Salla || {});\n if (Salla.appScope) {\n // Already installed (normally by the inline head copy). The factory is first-write-wins,\n // but buckets are not: the head may have installed with none of them — the settings\n // endpoint can fail or lag behind the snippets one — so hand them to the existing install.\n if (Salla.__appScopeSeed) Salla.__appScopeSeed(contexts);\n return;\n }\n\n // Live bag + pristine snapshot (for mock overlays). Copy, don't alias: a snippet may\n // `config.set('app.x')` and the payload can be a cached response.\n const appCtx: Record<string, AppConfigBag> = {};\n const base: Record<string, AppConfigBag> = {};\n // Which scopes already got their real bucket, so a later seed can't overwrite one.\n const seeded: Record<string, boolean> = {};\n const seed = (next: AppScopeContexts): void => {\n const bags = (next && next.apps) || {};\n Object.keys(bags).forEach((scopeId) => {\n if (seeded[scopeId]) return;\n seeded[scopeId] = true;\n appCtx[scopeId] = Object.assign({}, appCtx[scopeId] || {}, bags[scopeId] || {});\n base[scopeId] = Object.assign({}, appCtx[scopeId]);\n });\n };\n seed(contexts);\n\n const createAppScope = makeFactory(w, appCtx);\n Salla.appScope = (scopeId: string): SallaSDK => createAppScope(scopeId);\n\n // Fill in buckets for scopes not seeded yet (first-write-wins per scope). Lets the head\n // install the factory unconditionally — at parse time, before any snippet's onReady — and\n // still pick up buckets that only the client managed to fetch.\n Salla.__appScopeSeed = (next: AppScopeContexts): void => seed(next);\n\n // Overlay preview mocks onto an app's pristine baseline, so fields the partner did not mock\n // keep their real values. Returns false for an unknown scope or before install.\n Salla.__appScopeMock = (scopeId: string, mocks: AppConfigBag): boolean => {\n if (!(scopeId in base)) return false;\n appCtx[scopeId] = Object.assign({}, base[scopeId], mocks);\n return true;\n };\n}\n\n/** Overlay preview mocks onto one app's bucket (over its pristine values). Delegates to the\n * bootstrap's `__appScopeMock`, so it works for both install paths. False if unknown/uninstalled. */\nexport function applyAppScopeMocks(appScopeId: string, mocks: AppConfigBag): boolean {\n if (!isBrowser) return false;\n const mock = (window.Salla as unknown as { __appScopeMock?: MockApplier } | undefined)\n ?.__appScopeMock;\n return mock?.(appScopeId, mocks) ?? false;\n}\n\ntype MockApplier = (appScopeId: string, mocks: AppConfigBag) => boolean;\n\n/** Serialize the installer into an inline `<script>` body seeded with `contexts` — both halves\n * via `.toString()`, hence their self-contained requirement. See `rootHead`. */\nexport function renderAppScopeInstallScript(contexts: AppScopeContexts): string {\n // Bucket values are partner-set, so escape the JSON seed against a `</script>` breakout.\n // The function sources have no `<`, so they need no escaping.\n const json = escapeForInlineScript(JSON.stringify(contexts));\n return `(${appScopeBootstrap.toString()})(${json},${createAppScopeFactory.toString()});`;\n}\n\n/** Install `Salla.appScope` on the client, or seed buckets into the inline SSR head copy that\n * already installed it. No-op on the server. Fallback for unseeded loads + the unit-test entry\n * point. */\nexport function installAppScope(contexts: AppScopeContexts): void {\n if (!isBrowser) return;\n appScopeBootstrap(contexts, createAppScopeFactory);\n}\n","import { escapeForInlineScript } from './inline-script';\n\nconst registered = new Set<string>();\n\nlet retryArmed = false;\n\n/**\n * Declare hook slots the theme renders itself so apps may mount into them.\n *\n * The SDK rejects `mount()` for any name absent from its `_themeSlots` whitelist, so a theme\n * rendering its own `<salla-hook>` must register the name. Call at module scope; the engine\n * applies the names via {@link applyThemeHookSlots}.\n */\nexport function registerThemeHookSlots(...names: string[]): void {\n for (const name of names) registered.add(name);\n}\n\n/** Push the registered names in. Returns false if the SDK hasn't exposed the list yet. */\nfunction pushSlots(): boolean {\n const slots = window.salla?.hooks?._themeSlots;\n if (!Array.isArray(slots)) return false;\n for (const name of registered) if (!slots.includes(name)) slots.push(name);\n return true;\n}\n\n/**\n * Push every registered slot name into the SDK whitelist. Idempotent. Engine-only.\n *\n * The SDK's hooks module may attach after this runs, so a first no-op falls back to a\n * one-shot retry on `twilight::initiated` — still before apps mount from their own onReady.\n *\n * This is only the late backstop: the whitelist is primarily seeded at parse time by the\n * inline head script from {@link renderThemeHookSlotsScript}, because an app's snippet\n * registers its `onReady` callback before React ever hydrates.\n */\nexport function applyThemeHookSlots(): void {\n if (typeof window === 'undefined' || registered.size === 0) return;\n if (pushSlots() || retryArmed) return;\n\n retryArmed = true;\n window.addEventListener('twilight::initiated', () => void pushSlots(), { once: true });\n}\n\n/** The slot names registered so far. Read by `rootHead` when rendering the inline script. */\nexport function getRegisteredThemeHookSlots(): string[] {\n return [...registered];\n}\n\n/**\n * Serialize the whitelist push into an inline head `<script>` body, so the slots are\n * registered at parse time.\n *\n * Ordering is the whole point: CDN snippets are parser-inserted `<script defer>` tags in the\n * body, so an app's `Salla.onReady` callback is registered long before React hydrates and runs\n * {@link applyThemeHookSlots}. Whichever `twilight::initiated` listener was added first runs\n * first, so the push must be armed from the head — otherwise the SDK rejects the app's\n * `hooks.mount()` with \"Hook <name> is not allowed\" and the app never renders.\n *\n * Returns null when the theme registered no slots. Kept self-contained (only `window`) since\n * it ships as raw source, not as a bundled module.\n */\nexport function renderThemeHookSlotsScript(names: string[] = getRegisteredThemeHookSlots()) {\n if (!names.length) return null;\n const json = escapeForInlineScript(JSON.stringify(names));\n return (\n `(function(names){` +\n `var w=window;` +\n `function push(){` +\n `var h=w.salla&&w.salla.hooks;var slots=h&&h._themeSlots;` +\n `if(!Array.isArray(slots))return false;` +\n `for(var i=0;i<names.length;i++)if(slots.indexOf(names[i])<0)slots.push(names[i]);` +\n `return true}` +\n `if(push())return;` +\n `w.addEventListener('twilight::initiated',function(){push()},{once:true})` +\n `})(${json});`\n );\n}\n"]}
@@ -1,25 +1,25 @@
1
- import { Footer } from './chunk-UM2XV5RF.js';
1
+ import { Footer } from './chunk-J3V5EAHP.js';
2
2
  import { getModelContext } from './chunk-Q77J3D2W.js';
3
- import { Header } from './chunk-JBCAUTEB.js';
3
+ import { Header } from './chunk-CYDUDCPL.js';
4
4
  import { editorFrame, previewTheme, postToEditor, FRAME_LOADED_ACTION } from './chunk-YL6X3ZMG.js';
5
- import { resolveTwilightSdkUrl, TICKETING_SCRIPT_URL } from './chunk-YFKQZUKH.js';
5
+ import { resolveTwilightSdkUrl, TICKETING_SCRIPT_URL } from './chunk-IG47QC5P.js';
6
6
  import { color } from './chunk-VVZNW5CB.js';
7
- import { applyThemeHookSlots, installAppScope } from './chunk-CEY3S2LF.js';
8
- import { useDevSettingsOverrides, useDevReportSettingsFetchedAt } from './chunk-PRRNGSGA.js';
9
- import { apps } from './chunk-UGHL2XTL.js';
10
- import { withOwnerMaintenanceButton, withoutMaintenanceOnPreviewHost } from './chunk-RTZMIZ3R.js';
11
- import { useLocation, useIsHome, NavigationInterceptor } from './chunk-PA2L3YV7.js';
12
- import { useUser } from './chunk-DOBQXGCU.js';
7
+ import { applyThemeHookSlots, installAppScope } from './chunk-MWAJ77KY.js';
8
+ import { useDevSettingsOverrides, useDevReportSettingsFetchedAt } from './chunk-RMXQMMZR.js';
9
+ import { apps } from './chunk-JDTETNQF.js';
10
+ import { withOwnerMaintenanceButton, withoutMaintenanceOnPreviewHost } from './chunk-T6DHTOH6.js';
11
+ import { useLocation, useIsHome, NavigationInterceptor } from './chunk-K2PXOXWW.js';
12
+ import { useUser } from './chunk-7GKF7ID7.js';
13
13
  import { DocumentClassProvider, useDocumentClass } from './chunk-JWXJPJBO.js';
14
14
  import { WidgetHead } from './chunk-V2ZDTY6H.js';
15
15
  import { HookSlot } from './chunk-5XDPAKF5.js';
16
16
  import { hookRegistry } from './chunk-GCPEMNSU.js';
17
- import { getActiveCurrency, ENGINE_VERSION } from './chunk-DH565UJN.js';
17
+ import { getActiveCurrency, ENGINE_VERSION } from './chunk-4EFED5UW.js';
18
18
  import { useTranslation, I18nProvider } from './chunk-TYNZ5B2B.js';
19
- import { Toaster } from './chunk-YIKGVBOK.js';
20
- import { isNativeApp } from './chunk-PRK5CUKL.js';
21
- import { whenSallaLoaded, whenSallaReady, onSallaEvent, getSallaSDK, syncSdkLocale, withSdkThemeVersion } from './chunk-NRIOPZ6G.js';
22
- import { AUTH_TOKEN_COOKIE_NAME, rememberDevStoreId, clearAuthTokenCookie, currentHost, syncScopeCookie, escapeForInlineScript } from './chunk-F76WYUQS.js';
19
+ import { Toaster } from './chunk-WXXGBZJH.js';
20
+ import { isNativeApp } from './chunk-AB7KTJYY.js';
21
+ import { whenSallaLoaded, whenSallaReady, onSallaEvent, getSallaSDK, syncSdkLocale, withSdkThemeVersion } from './chunk-6XVH5SDL.js';
22
+ import { AUTH_TOKEN_COOKIE_NAME, rememberDevStoreId, clearAuthTokenCookie, currentHost, syncScopeCookie, escapeForInlineScript } from './chunk-P2RT7RII.js';
23
23
  import { getTwilightContext, subscribeTwilight, updateTwilightContext, hasTwilightSettings } from './chunk-AWV3WEKH.js';
24
24
  import { FALLBACK_LOCALE, getLanguageInfo } from './chunk-T72DAX7R.js';
25
25
  import { useTwilight, TwilightContext } from './chunk-DF6FBKDN.js';
@@ -352,16 +352,16 @@ function useWebMcpSupported() {
352
352
  }
353
353
  var navigationSetups = {
354
354
  tanstack: lazyComponent(
355
- () => import('./navigation-A4N4YKVE.js').then((m) => ({ default: m.NavigationSetup }))
355
+ () => import('./navigation-ACX35Z2D.js').then((m) => ({ default: m.NavigationSetup }))
356
356
  ),
357
357
  // Not preloaded with the rest: a TanStack worker would load Next.js code it never runs.
358
- nextjs: lazy(() => import('./navigation-XTD2KQMY.js').then((m) => ({ default: m.NavigationSetup })))
358
+ nextjs: lazy(() => import('./navigation-ZI4V7VVT.js').then((m) => ({ default: m.NavigationSetup })))
359
359
  };
360
360
 
361
361
  // src/providers/DocumentSyncRegistry.ts
362
362
  var routeDocumentSyncs = {
363
363
  tanstack: lazyComponent(
364
- () => import('./document-class-O3NRRZFQ.js').then((m) => ({
364
+ () => import('./document-class-FHIN3OV7.js').then((m) => ({
365
365
  default: m.TanStackDocumentSync
366
366
  }))
367
367
  )
@@ -874,7 +874,7 @@ function injectFastCheckoutScript() {
874
874
  document.head.appendChild(s);
875
875
  }
876
876
  var GoogleTagBody = lazyComponent(
877
- () => import('./GoogleTag-OAJVDSHT.js').then((m) => ({ default: m.GoogleTagBody }))
877
+ () => import('./GoogleTag-WPDIRBEA.js').then((m) => ({ default: m.GoogleTagBody }))
878
878
  );
879
879
  var TwilightBundles = lazyComponent(
880
880
  () => import('./TwilightBundles-G6GHWBID.js').then((m) => ({ default: m.TwilightBundles }))
@@ -883,7 +883,7 @@ var LazySiftSnippet = lazyComponent(
883
883
  () => import('./SiftSnippet-5FCU6TR6.js').then((m) => ({ default: m.SiftSnippet }))
884
884
  );
885
885
  var LazyStoreClosedNotification = lazyComponent(
886
- () => import('./StoreClosedNotification-LOXAPYH2.js').then((m) => ({
886
+ () => import('./StoreClosedNotification-IQ5DNN6D.js').then((m) => ({
887
887
  default: m.StoreClosedNotification
888
888
  }))
889
889
  );
@@ -1129,7 +1129,7 @@ function SallaSdkScripts({ settings }) {
1129
1129
 
1130
1130
  // src/components/store/lazy.ts
1131
1131
  var LazyStoreClosedNotification2 = lazyComponent(
1132
- () => import('./StoreClosedNotification-LOXAPYH2.js').then((m) => ({
1132
+ () => import('./StoreClosedNotification-IQ5DNN6D.js').then((m) => ({
1133
1133
  default: m.StoreClosedNotification
1134
1134
  }))
1135
1135
  );
@@ -1199,7 +1199,7 @@ function LiveEditor() {
1199
1199
  if (!frame) return null;
1200
1200
  return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyLiveEditorBar, { origin: frame.origin, dev: frame.dev }) });
1201
1201
  }
1202
- var LazyWebMcpTools = React2.lazy(() => import('./WebMcpTools-4ALCUSCX.js'));
1202
+ var LazyWebMcpTools = React2.lazy(() => import('./WebMcpTools-3YNG5IF6.js'));
1203
1203
  var getSalla2 = () => typeof window !== "undefined" ? window.salla : void 0;
1204
1204
  var TWILIGHT_LOG_STYLES = {
1205
1205
  header: "background: linear-gradient(90deg, #7c3aed, #6366f1); color: white; padding: 4px 8px; border-radius: 4px; font-weight: bold;",
@@ -1488,5 +1488,5 @@ function useStore() {
1488
1488
  }
1489
1489
 
1490
1490
  export { LazyMaintenancePage, LazyStoreClosedNotification2 as LazyStoreClosedNotification, MasterLayout, TwilightProvider, fastCheckoutScript, registerDefaultHooks, registerDocumentSync, routeDocumentSyncs, useBreadcrumbs, useDate, useGtm, useMoney, useNumber, useOpeningHours, usePageConfig, useStore };
1491
- //# sourceMappingURL=chunk-JFVK3GTL.js.map
1492
- //# sourceMappingURL=chunk-JFVK3GTL.js.map
1491
+ //# sourceMappingURL=chunk-N2VUTPHF.js.map
1492
+ //# sourceMappingURL=chunk-N2VUTPHF.js.map