@sonordev/site-kit 5.3.1 → 5.4.0

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 (336) hide show
  1. package/README.md +17 -0
  2. package/agent-manifest.json +5 -4
  3. package/dist/AnalyticsProvider-2XIOMRCN.mjs +11 -0
  4. package/dist/{AnalyticsProvider-NA7EMJCA.mjs.map → AnalyticsProvider-2XIOMRCN.mjs.map} +1 -1
  5. package/dist/AnalyticsProvider-Y2P2BPOI.js +32 -0
  6. package/dist/{AnalyticsProvider-XE3ADUUH.js.map → AnalyticsProvider-Y2P2BPOI.js.map} +1 -1
  7. package/dist/{BlogViewTracker-DVJHZ7CM.js → BlogViewTracker-6EGEDPP3.js} +6 -6
  8. package/dist/{BlogViewTracker-DVJHZ7CM.js.map → BlogViewTracker-6EGEDPP3.js.map} +1 -1
  9. package/dist/{BlogViewTracker-MKJYTTJQ.mjs → BlogViewTracker-R4YQ76WP.mjs} +5 -5
  10. package/dist/{BlogViewTracker-MKJYTTJQ.mjs.map → BlogViewTracker-R4YQ76WP.mjs.map} +1 -1
  11. package/dist/ChatWidget-2OFWPCWF.js +20 -0
  12. package/dist/{ChatWidget-BZ3KOSXG.js.map → ChatWidget-2OFWPCWF.js.map} +1 -1
  13. package/dist/ChatWidget-4AOGHYXQ.mjs +11 -0
  14. package/dist/{ChatWidget-BD4F4XLD.mjs.map → ChatWidget-4AOGHYXQ.mjs.map} +1 -1
  15. package/dist/EngageWidget-SFO2XRNG.mjs +9 -0
  16. package/dist/{EngageWidget-L7B6PCM3.mjs.map → EngageWidget-SFO2XRNG.mjs.map} +1 -1
  17. package/dist/EngageWidget-T4KAAD3G.js +18 -0
  18. package/dist/{EngageWidget-JPP6EDCJ.js.map → EngageWidget-T4KAAD3G.js.map} +1 -1
  19. package/dist/{FileField-7WPRONDS.mjs → FileField-7DF2SLPF.mjs} +5 -5
  20. package/dist/{FileField-7WPRONDS.mjs.map → FileField-7DF2SLPF.mjs.map} +1 -1
  21. package/dist/{FileField-GHT7444Y.js → FileField-CE2XNBBG.js} +6 -6
  22. package/dist/{FileField-GHT7444Y.js.map → FileField-CE2XNBBG.js.map} +1 -1
  23. package/dist/{FormSpotlight-WZVS6HHR.mjs → FormSpotlight-IRLKSZGV.mjs} +3 -3
  24. package/dist/{FormSpotlight-WZVS6HHR.mjs.map → FormSpotlight-IRLKSZGV.mjs.map} +1 -1
  25. package/dist/{FormSpotlight-BB2IB7IX.js → FormSpotlight-ZD3WR5BC.js} +15 -15
  26. package/dist/{FormSpotlight-BB2IB7IX.js.map → FormSpotlight-ZD3WR5BC.js.map} +1 -1
  27. package/dist/{FormStage-Y3NHHMV2.mjs → FormStage-2OSRNQJL.mjs} +3 -3
  28. package/dist/{FormStage-Y3NHHMV2.mjs.map → FormStage-2OSRNQJL.mjs.map} +1 -1
  29. package/dist/{FormStage-FLBLXENZ.js → FormStage-OSPXOUQE.js} +13 -13
  30. package/dist/{FormStage-FLBLXENZ.js.map → FormStage-OSPXOUQE.js.map} +1 -1
  31. package/dist/ManagedForm-5G37EDJT.mjs +14 -0
  32. package/dist/{ManagedForm-AJM6D4SK.mjs.map → ManagedForm-5G37EDJT.mjs.map} +1 -1
  33. package/dist/ManagedForm-JCHGBBQW.js +23 -0
  34. package/dist/{ManagedForm-2OPCHDNJ.js.map → ManagedForm-JCHGBBQW.js.map} +1 -1
  35. package/dist/{ManagedNewsletterForm-L2ZHJ7F4.js → ManagedNewsletterForm-4LVJZROZ.js} +8 -8
  36. package/dist/{ManagedNewsletterForm-L2ZHJ7F4.js.map → ManagedNewsletterForm-4LVJZROZ.js.map} +1 -1
  37. package/dist/{ManagedNewsletterForm-MJI2JXIB.mjs → ManagedNewsletterForm-QJSVH23S.mjs} +7 -7
  38. package/dist/{ManagedNewsletterForm-MJI2JXIB.mjs.map → ManagedNewsletterForm-QJSVH23S.mjs.map} +1 -1
  39. package/dist/{SignalCore-23YDDSWO.mjs → SignalCore-L6Z3YTCF.mjs} +5 -5
  40. package/dist/{SignalCore-23YDDSWO.mjs.map → SignalCore-L6Z3YTCF.mjs.map} +1 -1
  41. package/dist/{SignalCore-G2VM7NUP.js → SignalCore-NQ4YEOI7.js} +11 -11
  42. package/dist/{SignalCore-G2VM7NUP.js.map → SignalCore-NQ4YEOI7.js.map} +1 -1
  43. package/dist/SitemapSync-3LUZWBTB.js +18 -0
  44. package/dist/{SitemapSync-T2N3TCWF.js.map → SitemapSync-3LUZWBTB.js.map} +1 -1
  45. package/dist/SitemapSync-MYSTLJOM.mjs +9 -0
  46. package/dist/{SitemapSync-YLWMU6J3.mjs.map → SitemapSync-MYSTLJOM.mjs.map} +1 -1
  47. package/dist/SitemapSync.d.ts.map +1 -1
  48. package/dist/analytics/AnalyticsProvider.d.ts +11 -1
  49. package/dist/analytics/AnalyticsProvider.d.ts.map +1 -1
  50. package/dist/analytics/WebVitals.d.ts +7 -1
  51. package/dist/analytics/WebVitals.d.ts.map +1 -1
  52. package/dist/analytics/index.d.ts +1 -0
  53. package/dist/analytics/index.d.ts.map +1 -1
  54. package/dist/analytics/index.js +25 -12
  55. package/dist/analytics/index.mjs +6 -5
  56. package/dist/analytics/send-gate.d.ts +119 -0
  57. package/dist/analytics/send-gate.d.ts.map +1 -0
  58. package/dist/analytics/send-gate.test.d.ts +20 -0
  59. package/dist/analytics/send-gate.test.d.ts.map +1 -0
  60. package/dist/blog/AuthorPage.d.ts +1 -1
  61. package/dist/blog/AuthorPage.d.ts.map +1 -1
  62. package/dist/blog/BlogLayout.d.ts +3 -1
  63. package/dist/blog/BlogLayout.d.ts.map +1 -1
  64. package/dist/blog/BlogList.d.ts +3 -1
  65. package/dist/blog/BlogList.d.ts.map +1 -1
  66. package/dist/blog/BlogPost.d.ts +3 -1
  67. package/dist/blog/BlogPost.d.ts.map +1 -1
  68. package/dist/blog/BlogSidebar.d.ts +3 -1
  69. package/dist/blog/BlogSidebar.d.ts.map +1 -1
  70. package/dist/blog/ClusterLandingPage.d.ts +3 -1
  71. package/dist/blog/ClusterLandingPage.d.ts.map +1 -1
  72. package/dist/blog/ClusterNavigation.d.ts +3 -1
  73. package/dist/blog/ClusterNavigation.d.ts.map +1 -1
  74. package/dist/blog/RelatedPosts.d.ts +4 -1
  75. package/dist/blog/RelatedPosts.d.ts.map +1 -1
  76. package/dist/blog/artwork-components.test.d.ts +2 -0
  77. package/dist/blog/artwork-components.test.d.ts.map +1 -0
  78. package/dist/blog/artwork.d.ts +14 -0
  79. package/dist/blog/artwork.d.ts.map +1 -0
  80. package/dist/blog/artwork.test.d.ts +2 -0
  81. package/dist/blog/artwork.test.d.ts.map +1 -0
  82. package/dist/blog/blog-styles.d.ts.map +1 -1
  83. package/dist/blog/blog-tables.d.ts +13 -0
  84. package/dist/blog/blog-tables.d.ts.map +1 -0
  85. package/dist/blog/blog-tables.test.d.ts +2 -0
  86. package/dist/blog/blog-tables.test.d.ts.map +1 -0
  87. package/dist/blog/index.d.ts +3 -0
  88. package/dist/blog/index.d.ts.map +1 -1
  89. package/dist/blog/index.js +52 -30
  90. package/dist/blog/index.js.map +1 -1
  91. package/dist/blog/index.mjs +15 -12
  92. package/dist/blog/index.mjs.map +1 -1
  93. package/dist/blog/publication-render.test.d.ts +2 -0
  94. package/dist/blog/publication-render.test.d.ts.map +1 -0
  95. package/dist/blog/publication-routes.test.d.ts +2 -0
  96. package/dist/blog/publication-routes.test.d.ts.map +1 -0
  97. package/dist/blog/routes.d.ts +40 -0
  98. package/dist/blog/routes.d.ts.map +1 -0
  99. package/dist/blog/server-core.d.ts +28 -21
  100. package/dist/blog/server-core.d.ts.map +1 -1
  101. package/dist/blog/server-ui.d.ts +4 -0
  102. package/dist/blog/server-ui.d.ts.map +1 -1
  103. package/dist/blog/server-ui.js +49 -28
  104. package/dist/blog/server-ui.js.map +1 -1
  105. package/dist/blog/server-ui.mjs +9 -15
  106. package/dist/blog/server-ui.mjs.map +1 -1
  107. package/dist/blog/server.d.ts +28 -21
  108. package/dist/blog/server.d.ts.map +1 -1
  109. package/dist/blog/server.js +71 -42
  110. package/dist/blog/server.mjs +3 -2
  111. package/dist/blog/types.d.ts +11 -1
  112. package/dist/blog/types.d.ts.map +1 -1
  113. package/dist/blog-styles-6EY3BS5Y.js +595 -0
  114. package/dist/blog-styles-6EY3BS5Y.js.map +1 -0
  115. package/dist/blog-styles-7AKRUMV7.mjs +592 -0
  116. package/dist/blog-styles-7AKRUMV7.mjs.map +1 -0
  117. package/dist/blog-tables-DWDEWA3S.js +17 -0
  118. package/dist/blog-tables-DWDEWA3S.js.map +1 -0
  119. package/dist/blog-tables-QGIHOESZ.mjs +4 -0
  120. package/dist/blog-tables-QGIHOESZ.mjs.map +1 -0
  121. package/dist/{chunk-KP56C66Z.js → chunk-2KIGFOPM.js} +126 -188
  122. package/dist/chunk-2KIGFOPM.js.map +1 -0
  123. package/dist/{chunk-EDZWNCSE.js → chunk-3EPMDPWI.js} +2 -2
  124. package/dist/{chunk-EDZWNCSE.js.map → chunk-3EPMDPWI.js.map} +1 -1
  125. package/dist/chunk-4B4S56WJ.mjs +110 -0
  126. package/dist/chunk-4B4S56WJ.mjs.map +1 -0
  127. package/dist/{chunk-47566YF4.js → chunk-4WQB2ORG.js} +14 -14
  128. package/dist/{chunk-47566YF4.js.map → chunk-4WQB2ORG.js.map} +1 -1
  129. package/dist/{chunk-5TGSM5EQ.js → chunk-5737U6DI.js} +14 -14
  130. package/dist/{chunk-5TGSM5EQ.js.map → chunk-5737U6DI.js.map} +1 -1
  131. package/dist/{chunk-DN6A6KXH.mjs → chunk-6CUBSQMD.mjs} +3 -3
  132. package/dist/{chunk-DN6A6KXH.mjs.map → chunk-6CUBSQMD.mjs.map} +1 -1
  133. package/dist/{chunk-JBGRXICL.js → chunk-746RKQHA.js} +75 -70
  134. package/dist/chunk-746RKQHA.js.map +1 -0
  135. package/dist/{chunk-GTK3CGWF.js → chunk-7IPSQ5JR.js} +6 -6
  136. package/dist/{chunk-GTK3CGWF.js.map → chunk-7IPSQ5JR.js.map} +1 -1
  137. package/dist/{chunk-4S7BHFGT.js → chunk-7PLH3H3W.js} +3 -3
  138. package/dist/{chunk-4S7BHFGT.js.map → chunk-7PLH3H3W.js.map} +1 -1
  139. package/dist/chunk-7U7C6XRI.mjs +6 -0
  140. package/dist/{chunk-HRQ4367C.mjs.map → chunk-7U7C6XRI.mjs.map} +1 -1
  141. package/dist/{chunk-X4PL7R63.mjs → chunk-7Y2UPFSY.mjs} +3 -3
  142. package/dist/{chunk-X4PL7R63.mjs.map → chunk-7Y2UPFSY.mjs.map} +1 -1
  143. package/dist/{chunk-XR47TOGW.mjs → chunk-A2VLEORI.mjs} +3 -3
  144. package/dist/{chunk-XR47TOGW.mjs.map → chunk-A2VLEORI.mjs.map} +1 -1
  145. package/dist/{chunk-PA5ZVCW2.mjs → chunk-ACTLQ2RH.mjs} +3 -3
  146. package/dist/{chunk-PA5ZVCW2.mjs.map → chunk-ACTLQ2RH.mjs.map} +1 -1
  147. package/dist/{chunk-VLR2UYO4.js → chunk-AWFZIXCT.js} +12 -11
  148. package/dist/chunk-AWFZIXCT.js.map +1 -0
  149. package/dist/{chunk-COAVBUMS.mjs → chunk-B36PTS7B.mjs} +413 -94
  150. package/dist/chunk-B36PTS7B.mjs.map +1 -0
  151. package/dist/{chunk-LFJRMY4V.js → chunk-DPDV5Z4G.js} +12 -12
  152. package/dist/{chunk-LFJRMY4V.js.map → chunk-DPDV5Z4G.js.map} +1 -1
  153. package/dist/{chunk-W47J6ZZG.mjs → chunk-DQM5GR2P.mjs} +4 -4
  154. package/dist/{chunk-W47J6ZZG.mjs.map → chunk-DQM5GR2P.mjs.map} +1 -1
  155. package/dist/{chunk-VGX6G3TA.mjs → chunk-EBMPXFOP.mjs} +3 -3
  156. package/dist/{chunk-VGX6G3TA.mjs.map → chunk-EBMPXFOP.mjs.map} +1 -1
  157. package/dist/{chunk-DHXQBTXE.mjs → chunk-EEQYKMGH.mjs} +75 -70
  158. package/dist/chunk-EEQYKMGH.mjs.map +1 -0
  159. package/dist/{chunk-77HT6TYK.mjs → chunk-G5I3XEQS.mjs} +3 -3
  160. package/dist/{chunk-77HT6TYK.mjs.map → chunk-G5I3XEQS.mjs.map} +1 -1
  161. package/dist/chunk-GHECYDSZ.mjs +134 -0
  162. package/dist/chunk-GHECYDSZ.mjs.map +1 -0
  163. package/dist/{chunk-UJOEN4X6.js → chunk-GQ6CUOLA.js} +15 -15
  164. package/dist/{chunk-UJOEN4X6.js.map → chunk-GQ6CUOLA.js.map} +1 -1
  165. package/dist/{chunk-DTX4R45S.js → chunk-HBMF3M5F.js} +4 -4
  166. package/dist/{chunk-DTX4R45S.js.map → chunk-HBMF3M5F.js.map} +1 -1
  167. package/dist/{chunk-NW5CBNRU.mjs → chunk-HDDV63XJ.mjs} +3 -3
  168. package/dist/{chunk-NW5CBNRU.mjs.map → chunk-HDDV63XJ.mjs.map} +1 -1
  169. package/dist/{chunk-DBJRJ2Q2.mjs → chunk-HH5KGXTK.mjs} +4 -4
  170. package/dist/{chunk-DBJRJ2Q2.mjs.map → chunk-HH5KGXTK.mjs.map} +1 -1
  171. package/dist/{chunk-AKQA5ZYZ.mjs → chunk-I4PDSDVE.mjs} +3 -3
  172. package/dist/{chunk-AKQA5ZYZ.mjs.map → chunk-I4PDSDVE.mjs.map} +1 -1
  173. package/dist/{chunk-2MPOO6QJ.js → chunk-ITFZZ6YT.js} +3 -3
  174. package/dist/{chunk-2MPOO6QJ.js.map → chunk-ITFZZ6YT.js.map} +1 -1
  175. package/dist/{chunk-WZZYTFDV.mjs → chunk-JJ26JKBJ.mjs} +8 -3
  176. package/dist/chunk-JJ26JKBJ.mjs.map +1 -0
  177. package/dist/{chunk-Z33JXJTJ.js → chunk-KMGGAL2X.js} +2 -2
  178. package/dist/{chunk-Z33JXJTJ.js.map → chunk-KMGGAL2X.js.map} +1 -1
  179. package/dist/{chunk-4IMZ45YA.mjs → chunk-KQ3VAOAF.mjs} +4 -4
  180. package/dist/{chunk-4IMZ45YA.mjs.map → chunk-KQ3VAOAF.mjs.map} +1 -1
  181. package/dist/{chunk-GPH3VVLP.js → chunk-LBS4PRC7.js} +3 -3
  182. package/dist/{chunk-GPH3VVLP.js.map → chunk-LBS4PRC7.js.map} +1 -1
  183. package/dist/chunk-LC7AM4J5.js +118 -0
  184. package/dist/chunk-LC7AM4J5.js.map +1 -0
  185. package/dist/{chunk-5HMN3FXL.js → chunk-LF4L3ZP5.js} +8 -8
  186. package/dist/{chunk-5HMN3FXL.js.map → chunk-LF4L3ZP5.js.map} +1 -1
  187. package/dist/{chunk-LHD45PGP.js → chunk-LHYVFWHL.js} +8 -8
  188. package/dist/{chunk-LHD45PGP.js.map → chunk-LHYVFWHL.js.map} +1 -1
  189. package/dist/{chunk-I72AUITZ.mjs → chunk-LIYSLNEK.mjs} +96 -644
  190. package/dist/chunk-LIYSLNEK.mjs.map +1 -0
  191. package/dist/{chunk-HIV5YK5G.js → chunk-LUYUFILE.js} +4 -4
  192. package/dist/{chunk-HIV5YK5G.js.map → chunk-LUYUFILE.js.map} +1 -1
  193. package/dist/{chunk-4HL6CAZ7.mjs → chunk-MIFP6QEQ.mjs} +4 -4
  194. package/dist/{chunk-4HL6CAZ7.mjs.map → chunk-MIFP6QEQ.mjs.map} +1 -1
  195. package/dist/{chunk-SI7R3IJX.mjs → chunk-MTANHZKJ.mjs} +7 -7
  196. package/dist/{chunk-SI7R3IJX.mjs.map → chunk-MTANHZKJ.mjs.map} +1 -1
  197. package/dist/{chunk-R4PFWVGZ.mjs → chunk-N6AVWMIB.mjs} +4 -4
  198. package/dist/{chunk-R4PFWVGZ.mjs.map → chunk-N6AVWMIB.mjs.map} +1 -1
  199. package/dist/{chunk-WD57YWY5.mjs → chunk-N6X76QUF.mjs} +3 -3
  200. package/dist/{chunk-WD57YWY5.mjs.map → chunk-N6X76QUF.mjs.map} +1 -1
  201. package/dist/{chunk-7UPPYERC.mjs → chunk-NUH245XK.mjs} +4 -4
  202. package/dist/{chunk-7UPPYERC.mjs.map → chunk-NUH245XK.mjs.map} +1 -1
  203. package/dist/chunk-NVSWTDWU.mjs +25 -0
  204. package/dist/chunk-NVSWTDWU.mjs.map +1 -0
  205. package/dist/chunk-OL2QBWAU.js +29 -0
  206. package/dist/chunk-OL2QBWAU.js.map +1 -0
  207. package/dist/{chunk-UYR22S67.js → chunk-OXZYP32B.js} +7 -7
  208. package/dist/{chunk-UYR22S67.js.map → chunk-OXZYP32B.js.map} +1 -1
  209. package/dist/{chunk-QG7WHAGD.js → chunk-QWLL3B6U.js} +15 -15
  210. package/dist/{chunk-QG7WHAGD.js.map → chunk-QWLL3B6U.js.map} +1 -1
  211. package/dist/{chunk-26JXNW7B.mjs → chunk-RO55G3OA.mjs} +2 -2
  212. package/dist/{chunk-26JXNW7B.mjs.map → chunk-RO55G3OA.mjs.map} +1 -1
  213. package/dist/{chunk-FH4LLJFL.mjs → chunk-SJXGIUHP.mjs} +9 -8
  214. package/dist/chunk-SJXGIUHP.mjs.map +1 -0
  215. package/dist/{chunk-4TU246Q4.mjs → chunk-SZHKNGNR.mjs} +2 -2
  216. package/dist/{chunk-4TU246Q4.mjs.map → chunk-SZHKNGNR.mjs.map} +1 -1
  217. package/dist/{chunk-GQTSQR63.js → chunk-U53KN4SA.js} +10 -5
  218. package/dist/chunk-U53KN4SA.js.map +1 -0
  219. package/dist/{chunk-AJBJH3BA.mjs → chunk-UOLY4NXK.mjs} +127 -189
  220. package/dist/chunk-UOLY4NXK.mjs.map +1 -0
  221. package/dist/{chunk-AVPMSJCQ.js → chunk-URVGBWCP.js} +4 -4
  222. package/dist/{chunk-AVPMSJCQ.js.map → chunk-URVGBWCP.js.map} +1 -1
  223. package/dist/chunk-UTOHMK52.js +8 -0
  224. package/dist/{chunk-TMQKZ4DO.js.map → chunk-UTOHMK52.js.map} +1 -1
  225. package/dist/{chunk-SHZXSIRH.js → chunk-VA36CJRV.js} +4 -4
  226. package/dist/{chunk-SHZXSIRH.js.map → chunk-VA36CJRV.js.map} +1 -1
  227. package/dist/{chunk-ZMFJXFUY.js → chunk-VWDT7H6L.js} +96 -644
  228. package/dist/chunk-VWDT7H6L.js.map +1 -0
  229. package/dist/{chunk-2VQ5YXOD.js → chunk-WSUQ76LN.js} +18 -18
  230. package/dist/{chunk-2VQ5YXOD.js.map → chunk-WSUQ76LN.js.map} +1 -1
  231. package/dist/{chunk-GM5E6R5W.mjs → chunk-XWF7QPIP.mjs} +3 -3
  232. package/dist/{chunk-GM5E6R5W.mjs.map → chunk-XWF7QPIP.mjs.map} +1 -1
  233. package/dist/chunk-YQTE32QK.js +137 -0
  234. package/dist/chunk-YQTE32QK.js.map +1 -0
  235. package/dist/{chunk-ISKJLXB4.mjs → chunk-ZDFVYSKK.mjs} +4 -4
  236. package/dist/{chunk-ISKJLXB4.mjs.map → chunk-ZDFVYSKK.mjs.map} +1 -1
  237. package/dist/{chunk-APL44ZVK.js → chunk-ZLPXFV5Y.js} +5 -5
  238. package/dist/{chunk-APL44ZVK.js.map → chunk-ZLPXFV5Y.js.map} +1 -1
  239. package/dist/{chunk-TAIGHH5J.js → chunk-ZY5AVC4P.js} +418 -98
  240. package/dist/chunk-ZY5AVC4P.js.map +1 -0
  241. package/dist/cli/index.js +3 -3
  242. package/dist/cli/index.mjs +1 -1
  243. package/dist/client/index.js +4 -4
  244. package/dist/client/index.mjs +3 -3
  245. package/dist/commerce/index.js +58 -57
  246. package/dist/commerce/index.mjs +7 -6
  247. package/dist/engage/index.js +10 -10
  248. package/dist/engage/index.mjs +7 -7
  249. package/dist/fleet/index.js +8 -8
  250. package/dist/fleet/index.mjs +4 -4
  251. package/dist/forms/index.js +16 -16
  252. package/dist/forms/index.mjs +9 -9
  253. package/dist/forms/server.js +10 -10
  254. package/dist/forms/server.mjs +8 -8
  255. package/dist/forms/static.js +7 -7
  256. package/dist/forms/static.mjs +6 -6
  257. package/dist/images/index.js +11 -11
  258. package/dist/images/index.mjs +4 -4
  259. package/dist/index.js +65 -64
  260. package/dist/index.js.map +1 -1
  261. package/dist/index.mjs +11 -10
  262. package/dist/index.mjs.map +1 -1
  263. package/dist/layout/SiteKitClientProviders.d.ts.map +1 -1
  264. package/dist/layout/client.d.ts.map +1 -1
  265. package/dist/layout/client.js +8 -8
  266. package/dist/layout/client.mjs +7 -7
  267. package/dist/layout/index.js +10 -10
  268. package/dist/layout/index.mjs +8 -8
  269. package/dist/layout/types.d.ts +16 -0
  270. package/dist/layout/types.d.ts.map +1 -1
  271. package/dist/llms/index.js +12 -12
  272. package/dist/llms/index.mjs +2 -2
  273. package/dist/maps/index.js +5 -5
  274. package/dist/maps/index.mjs +3 -3
  275. package/dist/search/index.js +4 -4
  276. package/dist/search/index.mjs +3 -3
  277. package/dist/seo/client.js +6 -5
  278. package/dist/seo/client.mjs +5 -4
  279. package/dist/seo/index.js +6 -5
  280. package/dist/seo/index.js.map +1 -1
  281. package/dist/seo/index.mjs +5 -4
  282. package/dist/seo/index.mjs.map +1 -1
  283. package/dist/server/index.js +3 -3
  284. package/dist/server/index.mjs +2 -2
  285. package/dist/shared/frame.d.ts +71 -0
  286. package/dist/shared/frame.d.ts.map +1 -0
  287. package/dist/shared/version.d.ts +1 -1
  288. package/dist/signal/index.js +11 -11
  289. package/dist/signal/index.mjs +2 -2
  290. package/dist/sitemap/index.js +2 -2
  291. package/dist/sitemap/index.mjs +1 -1
  292. package/dist/sync/BookingWidget.d.ts +0 -23
  293. package/dist/sync/BookingWidget.d.ts.map +1 -1
  294. package/dist/sync/MeetingFormatStep.d.ts +13 -0
  295. package/dist/sync/MeetingFormatStep.d.ts.map +1 -0
  296. package/dist/sync/api.d.ts +9 -10
  297. package/dist/sync/api.d.ts.map +1 -1
  298. package/dist/sync/booking-flow.d.ts +7 -0
  299. package/dist/sync/booking-flow.d.ts.map +1 -0
  300. package/dist/sync/booking-flow.test.d.ts +2 -0
  301. package/dist/sync/booking-flow.test.d.ts.map +1 -0
  302. package/dist/sync/index.d.ts +2 -2
  303. package/dist/sync/index.d.ts.map +1 -1
  304. package/dist/sync/index.js +20 -16
  305. package/dist/sync/index.mjs +4 -4
  306. package/dist/sync/types.d.ts +34 -0
  307. package/dist/sync/types.d.ts.map +1 -1
  308. package/package.json +1 -1
  309. package/dist/AnalyticsProvider-NA7EMJCA.mjs +0 -10
  310. package/dist/AnalyticsProvider-XE3ADUUH.js +0 -31
  311. package/dist/ChatWidget-BD4F4XLD.mjs +0 -11
  312. package/dist/ChatWidget-BZ3KOSXG.js +0 -20
  313. package/dist/EngageWidget-JPP6EDCJ.js +0 -18
  314. package/dist/EngageWidget-L7B6PCM3.mjs +0 -9
  315. package/dist/ManagedForm-2OPCHDNJ.js +0 -23
  316. package/dist/ManagedForm-AJM6D4SK.mjs +0 -14
  317. package/dist/SitemapSync-T2N3TCWF.js +0 -17
  318. package/dist/SitemapSync-YLWMU6J3.mjs +0 -8
  319. package/dist/chunk-AJBJH3BA.mjs.map +0 -1
  320. package/dist/chunk-CGCYZJYX.mjs +0 -41
  321. package/dist/chunk-CGCYZJYX.mjs.map +0 -1
  322. package/dist/chunk-COAVBUMS.mjs.map +0 -1
  323. package/dist/chunk-DHXQBTXE.mjs.map +0 -1
  324. package/dist/chunk-FH4LLJFL.mjs.map +0 -1
  325. package/dist/chunk-GQTSQR63.js.map +0 -1
  326. package/dist/chunk-HRQ4367C.mjs +0 -6
  327. package/dist/chunk-I72AUITZ.mjs.map +0 -1
  328. package/dist/chunk-JBGRXICL.js.map +0 -1
  329. package/dist/chunk-KP56C66Z.js.map +0 -1
  330. package/dist/chunk-TAIGHH5J.js.map +0 -1
  331. package/dist/chunk-TMQKZ4DO.js +0 -8
  332. package/dist/chunk-TPL2IHFI.js +0 -43
  333. package/dist/chunk-TPL2IHFI.js.map +0 -1
  334. package/dist/chunk-VLR2UYO4.js.map +0 -1
  335. package/dist/chunk-WZZYTFDV.mjs.map +0 -1
  336. package/dist/chunk-ZMFJXFUY.js.map +0 -1
@@ -1,16 +1,60 @@
1
1
  'use client';
2
2
  import { registerAnalyticsDispatcher } from './chunk-3DPXOZAU.mjs';
3
+ import { isCrossOriginFrame } from './chunk-NVSWTDWU.mjs';
3
4
  import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-ZZQAGCSI.mjs';
4
- import { sonorFetch, sonorBeacon } from './chunk-4HL6CAZ7.mjs';
5
- import { createContext, useRef, useEffect, useState, useCallback, useMemo, useContext } from 'react';
5
+ import { sonorFetch, sonorBeacon } from './chunk-MIFP6QEQ.mjs';
6
+ import { createContext, useRef, useEffect, useState, useMemo, useCallback, useContext } from 'react';
6
7
  import { usePathname } from 'next/navigation';
7
8
  import { jsxs, jsx } from 'react/jsx-runtime';
8
9
 
9
- function getApiConfig() {
10
- const apiUrl = typeof window !== "undefined" ? window.__SITE_KIT_API_URL__ || "https://api.sonor.io" : "https://api.sonor.io";
10
+ // src/analytics/send-gate.ts
11
+ function windowConfig() {
12
+ const apiUrl = typeof window !== "undefined" && window.__SITE_KIT_API_URL__ || "https://api.sonor.io";
11
13
  const apiKey = typeof window !== "undefined" ? window.__SITE_KIT_API_KEY__ : void 0;
12
14
  return { apiUrl, apiKey };
13
15
  }
16
+ var announcedSuppression = false;
17
+ function resolveAnalyticsTarget(options = {}) {
18
+ const { apiUrl: globalApiUrl, apiKey: globalApiKey } = windowConfig();
19
+ const apiUrl = options.apiUrl || globalApiUrl;
20
+ const apiKey = options.apiKey || globalApiKey;
21
+ if (!apiKey) return null;
22
+ if (!options.allowInFrame && isCrossOriginFrame()) {
23
+ if (options.debug && !announcedSuppression) {
24
+ announcedSuppression = true;
25
+ console.info(
26
+ "[Analytics] This page is embedded in a cross-origin frame, so nothing is being reported. Set analytics.allowInFrame if this site is meant to be tracked as an embed."
27
+ );
28
+ }
29
+ return null;
30
+ }
31
+ return { apiUrl, apiKey };
32
+ }
33
+ async function analyticsSend(path, body, options = {}) {
34
+ const target = resolveAnalyticsTarget(options);
35
+ if (!target) return null;
36
+ try {
37
+ return await sonorFetch(
38
+ `${target.apiUrl}${path}`,
39
+ {
40
+ method: options.method || "POST",
41
+ headers: { "Content-Type": "application/json" },
42
+ ...options.keepalive ? { keepalive: true } : {},
43
+ ...body === void 0 ? {} : { body: JSON.stringify(body) }
44
+ },
45
+ { apiKey: target.apiKey, retries: options.retries ?? 0 }
46
+ );
47
+ } catch {
48
+ return null;
49
+ }
50
+ }
51
+ function analyticsBeacon(path, body, options = {}) {
52
+ const target = resolveAnalyticsTarget(options);
53
+ if (!target) return;
54
+ sonorBeacon(`${target.apiUrl}${path}`, body, target.apiKey);
55
+ }
56
+
57
+ // src/analytics/WebVitals.tsx
14
58
  function pathForMetric(metric, fallback) {
15
59
  const url = metric.navigationURL;
16
60
  if (url) {
@@ -61,29 +105,28 @@ function summarizeAttribution(metric) {
61
105
  return void 0;
62
106
  }
63
107
  }
64
- function WebVitals({ apiUrl: propApiUrl, apiKey: propApiKey, site: propSite, debug = false }) {
108
+ function WebVitals({
109
+ apiUrl: propApiUrl,
110
+ apiKey: propApiKey,
111
+ site: propSite,
112
+ allowInFrame = false,
113
+ debug = false
114
+ }) {
65
115
  const pathname = usePathname();
66
116
  const landingPathRef = useRef(pathname || "/");
67
- const propsRef = useRef({ propApiUrl, propApiKey, propSite, debug });
68
- propsRef.current = { propApiUrl, propApiKey, propSite, debug };
117
+ const propsRef = useRef({ propApiUrl, propApiKey, propSite, allowInFrame, debug });
118
+ propsRef.current = { propApiUrl, propApiKey, propSite, allowInFrame, debug };
69
119
  useEffect(() => {
70
120
  let cancelled = false;
71
121
  let teardown;
72
122
  import('./web-vitals.attribution-7LKLZ5GR.mjs').then(({ onCLS, onLCP, onTTFB, onINP, onFCP }) => {
73
123
  if (cancelled) return;
74
- const { propApiUrl: propApiUrl2, propApiKey: propApiKey2, propSite: propSite2, debug: debug2 } = propsRef.current;
124
+ const { propApiUrl: propApiUrl2, propApiKey: propApiKey2, propSite: propSite2, allowInFrame: allowInFrame2, debug: debug2 } = propsRef.current;
75
125
  const sent = /* @__PURE__ */ new Map();
76
126
  const report = (metric, viaBeacon = false) => {
77
127
  if (sent.get(metric.id) === metric.value) return;
78
128
  sent.set(metric.id, metric.value);
79
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig();
80
- const apiUrl = propApiUrl2 || globalApiUrl;
81
- const apiKey = propApiKey2 || globalApiKey;
82
129
  const site = propSite2 || (typeof window !== "undefined" ? window.__SITE_KIT_SITE__ || window.location.host : "");
83
- if (!apiKey) {
84
- if (debug2) console.warn("[Analytics] No API key configured for Web Vitals");
85
- return;
86
- }
87
130
  const data = {
88
131
  site,
89
132
  pagePath: pathForMetric(metric, landingPathRef.current),
@@ -97,22 +140,13 @@ function WebVitals({ apiUrl: propApiUrl, apiKey: propApiKey, site: propSite, deb
97
140
  attribution: summarizeAttribution(metric)
98
141
  };
99
142
  if (debug2) console.log("[Analytics] Web Vital:", data);
100
- const endpoint = `${apiUrl}/api/public/analytics/web-vitals`;
143
+ const endpoint = "/api/public/analytics/web-vitals";
144
+ const gate = { apiUrl: propApiUrl2, apiKey: propApiKey2, allowInFrame: allowInFrame2, debug: debug2 };
101
145
  if (viaBeacon) {
102
- sonorBeacon(endpoint, data, apiKey);
146
+ analyticsBeacon(endpoint, data, gate);
103
147
  return;
104
148
  }
105
- void sonorFetch(
106
- endpoint,
107
- {
108
- method: "POST",
109
- headers: { "Content-Type": "application/json" },
110
- body: JSON.stringify(data)
111
- },
112
- { apiKey, retries: 0 }
113
- ).catch((error) => {
114
- if (debug2) console.error("[Analytics] Error reporting Web Vital:", error);
115
- });
149
+ void analyticsSend(endpoint, data, gate);
116
150
  };
117
151
  const opts = { reportSoftNavs: true };
118
152
  const pending = [];
@@ -547,11 +581,6 @@ async function collectPageMetadata(isStale) {
547
581
  const content = getContentPageMetadata();
548
582
  return { ...light, ...media, ...content };
549
583
  }
550
- function getApiConfig2() {
551
- const apiUrl = typeof window !== "undefined" ? window.__SITE_KIT_API_URL__ || "https://api.sonor.io" : "https://api.sonor.io";
552
- const apiKey = typeof window !== "undefined" ? window.__SITE_KIT_API_KEY__ : void 0;
553
- return { apiUrl, apiKey };
554
- }
555
584
  function AnalyticsProvider({
556
585
  children,
557
586
  apiUrl: propApiUrl,
@@ -569,11 +598,16 @@ function AnalyticsProvider({
569
598
  externalVisitorId,
570
599
  externalSessionId,
571
600
  onPageMetadata,
572
- site: propSite
601
+ site: propSite,
602
+ allowInFrame = false
573
603
  }) {
574
604
  const pathname = usePathname();
575
605
  const [queryString, setQueryString] = useState("");
576
606
  const site = propSite || (typeof window !== "undefined" ? window.__SITE_KIT_SITE__ || window.location.host : "");
607
+ const gate = useMemo(
608
+ () => ({ apiUrl: propApiUrl, apiKey: propApiKey, allowInFrame, debug }),
609
+ [propApiUrl, propApiKey, allowInFrame, debug]
610
+ );
577
611
  useEffect(() => {
578
612
  if (typeof window === "undefined") return;
579
613
  setQueryString(window.location.search);
@@ -601,19 +635,17 @@ function AnalyticsProvider({
601
635
  return;
602
636
  }
603
637
  const fetchValidPages = async () => {
604
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig2();
605
- const apiUrl = propApiUrl || globalApiUrl;
606
- const apiKey = propApiKey || globalApiKey;
607
- if (!apiKey) {
608
- if (debug) console.warn("[Analytics] No API key for page validation");
609
- return;
610
- }
611
638
  try {
612
- const response = await sonorFetch(
613
- `${apiUrl}/api/public/seo/pages`,
614
- { method: "GET", headers: { "Content-Type": "application/json" } },
615
- { apiKey }
639
+ const response = await analyticsSend(
640
+ "/api/public/seo/pages",
641
+ void 0,
642
+ { ...gate, method: "GET", retries: 2 }
616
643
  );
644
+ if (!response) {
645
+ if (debug) console.warn("[Analytics] Page validation skipped (no key, or embedded)");
646
+ sitemapLoadedRef.current = true;
647
+ return;
648
+ }
617
649
  if (response.ok) {
618
650
  const data = await response.json();
619
651
  const pages = data?.pages || [];
@@ -636,7 +668,7 @@ function AnalyticsProvider({
636
668
  }
637
669
  };
638
670
  fetchValidPages();
639
- }, [propApiUrl, propApiKey, validateAgainstSitemap, debug]);
671
+ }, [gate, validateAgainstSitemap, debug]);
640
672
  useEffect(() => {
641
673
  if (!trackPageViews) return;
642
674
  if (!pathname) return;
@@ -645,11 +677,8 @@ function AnalyticsProvider({
645
677
  if (normalizedPath === lastPathRef.current) return;
646
678
  lastPathRef.current = normalizedPath;
647
679
  const trackPageView = async () => {
648
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig2();
649
- const apiUrl = propApiUrl || globalApiUrl;
650
- const apiKey = propApiKey || globalApiKey;
651
- if (!apiKey) {
652
- if (debug) console.warn("[Analytics] No API key configured");
680
+ if (!resolveAnalyticsTarget(gate)) {
681
+ if (debug) console.warn("[Analytics] Page view skipped (no key, or embedded)");
653
682
  return;
654
683
  }
655
684
  const utmParams = getUTMParams();
@@ -692,25 +721,13 @@ function AnalyticsProvider({
692
721
  if (debug) {
693
722
  console.log("[Analytics] Page view:", pageView);
694
723
  }
695
- try {
696
- const response = await sonorFetch(
697
- `${apiUrl}/api/public/analytics/page-view`,
698
- {
699
- method: "POST",
700
- headers: { "Content-Type": "application/json" },
701
- body: JSON.stringify(pageView)
702
- },
703
- { apiKey, retries: 0 }
704
- );
705
- if (debug) {
706
- console.log("[Analytics] Page view response:", response.status, response.statusText, "url:", `${apiUrl}/api/public/analytics/page-view`);
707
- }
708
- if (!response.ok && debug) {
724
+ const response = await analyticsSend("/api/public/analytics/page-view", pageView, gate);
725
+ if (debug && response) {
726
+ console.log("[Analytics] Page view response:", response.status, response.statusText);
727
+ if (!response.ok) {
709
728
  const text = await response.text().catch(() => "");
710
729
  console.error("[Analytics] Error tracking page view:", response.status, response.statusText, text);
711
730
  }
712
- } catch (error) {
713
- if (debug) console.error("[Analytics] Error tracking page view (fetch failed):", error);
714
731
  }
715
732
  if (validateAgainstSitemap && debug) {
716
733
  if (sitemapLoadedRef.current && validPathsRef.current && validPathsRef.current.size > 0) {
@@ -723,15 +740,12 @@ function AnalyticsProvider({
723
740
  }
724
741
  };
725
742
  scheduleIdleTask(() => trackPageView());
726
- }, [pathname, queryString, propApiUrl, propApiKey, trackPageViews, excludePaths, debug, validateAgainstSitemap]);
743
+ }, [pathname, queryString, gate, trackPageViews, excludePaths, debug, validateAgainstSitemap]);
727
744
  useEffect(() => {
728
745
  if (!trackJourneys) return;
729
746
  if (!pathname) return;
730
747
  if (typeof window === "undefined") return;
731
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig2();
732
- const apiUrl = propApiUrl || globalApiUrl;
733
- const apiKey = propApiKey || globalApiKey;
734
- if (!apiKey) return;
748
+ if (!resolveAnalyticsTarget(gate)) return;
735
749
  const now = Date.now();
736
750
  const previousPath = lastPathRef.current;
737
751
  const previousDuration = pageEnterTimeRef.current > 0 ? Math.round((now - pageEnterTimeRef.current) / 1e3) : 0;
@@ -782,48 +796,36 @@ function AnalyticsProvider({
782
796
  if (debug) {
783
797
  console.log("[Analytics] Journey step:", sessionData);
784
798
  }
785
- try {
786
- await sonorFetch(
787
- `${apiUrl}/api/public/analytics/session`,
788
- {
789
- method: "POST",
790
- headers: { "Content-Type": "application/json" },
791
- body: JSON.stringify(sessionData)
792
- },
793
- { apiKey, retries: 0 }
794
- );
795
- } catch (error) {
796
- if (debug) console.error("[Analytics] Error tracking journey:", error);
797
- }
799
+ await analyticsSend("/api/public/analytics/session", sessionData, gate);
798
800
  };
799
801
  scheduleIdleTask(() => trackJourneyStep());
800
802
  const handleUnload = () => {
801
803
  const duration = Math.round((Date.now() - journeyStartTimeRef.current) / 1e3);
802
- const payload = JSON.stringify({
803
- sessionId: sessionIdRef.current,
804
- site,
805
- action: "end",
806
- duration,
807
- lastPage: pathname,
808
- previousPageDuration: Math.round((Date.now() - pageEnterTimeRef.current) / 1e3),
809
- previousPageScrollDepth: currentScrollDepthRef.current
810
- });
811
- sonorBeacon(`${apiUrl}/api/public/analytics/session`, payload, apiKey);
804
+ analyticsBeacon(
805
+ "/api/public/analytics/session",
806
+ {
807
+ sessionId: sessionIdRef.current,
808
+ site,
809
+ action: "end",
810
+ duration,
811
+ lastPage: pathname,
812
+ previousPageDuration: Math.round((Date.now() - pageEnterTimeRef.current) / 1e3),
813
+ previousPageScrollDepth: currentScrollDepthRef.current
814
+ },
815
+ gate
816
+ );
812
817
  };
813
818
  window.addEventListener("pagehide", handleUnload);
814
819
  return () => {
815
820
  window.removeEventListener("pagehide", handleUnload);
816
821
  };
817
- }, [pathname, propApiUrl, propApiKey, trackJourneys, debug]);
822
+ }, [pathname, gate, trackJourneys, debug]);
818
823
  useEffect(() => {
819
824
  if (typeof window === "undefined") return;
820
825
  if (debug) console.log("[Analytics] Scroll tracking setup:", { trackScrollDepth, hasApiKey: !!propApiKey });
821
826
  if (!trackScrollDepth) return;
822
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig2();
823
- const apiUrl = propApiUrl || globalApiUrl;
824
- const apiKey = propApiKey || globalApiKey;
825
- if (!apiKey) {
826
- if (debug) console.warn("[Analytics] Scroll tracking disabled - no API key");
827
+ if (!resolveAnalyticsTarget(gate)) {
828
+ if (debug) console.warn("[Analytics] Scroll tracking disabled (no key, or embedded)");
827
829
  return;
828
830
  }
829
831
  if (debug) console.log("[Analytics] Scroll tracking enabled for:", pathname);
@@ -859,7 +861,7 @@ function AnalyticsProvider({
859
861
  if (hasTracked || maxDepth === 0) return;
860
862
  hasTracked = true;
861
863
  const totalTime = (Date.now() - startTime) / 1e3;
862
- const payload = JSON.stringify({
864
+ const payload = {
863
865
  sessionId: sessionIdRef.current,
864
866
  visitorId: visitorIdRef.current,
865
867
  site,
@@ -871,28 +873,16 @@ function AnalyticsProvider({
871
873
  timeTo100: milestone100,
872
874
  totalTimeSeconds: totalTime,
873
875
  deviceType: getDeviceType()
874
- });
876
+ };
875
877
  if (useBeacon) {
876
- sonorBeacon(`${apiUrl}/api/public/analytics/scroll-depth`, payload, apiKey);
877
- if (debug) console.log("[Analytics] Scroll depth (beacon):", { maxDepth, totalTime });
878
+ analyticsBeacon("/api/public/analytics/scroll-depth", payload, gate);
878
879
  } else {
879
- try {
880
- await sonorFetch(
881
- `${apiUrl}/api/public/analytics/scroll-depth`,
882
- {
883
- method: "POST",
884
- headers: { "Content-Type": "application/json" },
885
- body: payload,
886
- keepalive: true
887
- // Allows request to outlive the page
888
- },
889
- { apiKey, retries: 0 }
890
- );
891
- if (debug) console.log("[Analytics] Scroll depth:", { maxDepth, totalTime });
892
- } catch (error) {
893
- if (debug) console.error("[Analytics] Error tracking scroll depth:", error);
894
- }
880
+ await analyticsSend("/api/public/analytics/scroll-depth", payload, {
881
+ ...gate,
882
+ keepalive: true
883
+ });
895
884
  }
885
+ if (debug) console.log("[Analytics] Scroll depth:", { maxDepth, totalTime, useBeacon });
896
886
  };
897
887
  maxDepth = 0;
898
888
  startTime = Date.now();
@@ -915,14 +905,11 @@ function AnalyticsProvider({
915
905
  document.removeEventListener("visibilitychange", handleVisibilityChange);
916
906
  sendScrollData(false);
917
907
  };
918
- }, [pathname, propApiUrl, propApiKey, trackScrollDepth, debug]);
908
+ }, [pathname, gate, trackScrollDepth, debug]);
919
909
  useEffect(() => {
920
910
  if (!trackClicks) return;
921
911
  if (typeof window === "undefined") return;
922
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig2();
923
- const apiUrl = propApiUrl || globalApiUrl;
924
- const apiKey = propApiKey || globalApiKey;
925
- if (!apiKey) return;
912
+ if (!resolveAnalyticsTarget(gate)) return;
926
913
  const handleClick = async (e) => {
927
914
  const target = e.target;
928
915
  if (!target) return;
@@ -953,36 +940,17 @@ function AnalyticsProvider({
953
940
  elementText
954
941
  };
955
942
  if (debug) console.log("[Analytics] Click:", clickData);
956
- scheduleIdleTask(async () => {
957
- try {
958
- await sonorFetch(
959
- `${apiUrl}/api/public/analytics/heatmap-click`,
960
- {
961
- method: "POST",
962
- headers: { "Content-Type": "application/json" },
963
- body: JSON.stringify(clickData)
964
- },
965
- { apiKey, retries: 0 }
966
- );
967
- } catch (error) {
968
- if (debug) console.error("[Analytics] Error tracking click:", error);
969
- }
943
+ scheduleIdleTask(() => {
944
+ void analyticsSend("/api/public/analytics/heatmap-click", clickData, gate);
970
945
  }, 500);
971
946
  };
972
947
  document.addEventListener("click", handleClick, { passive: true });
973
948
  return () => {
974
949
  document.removeEventListener("click", handleClick);
975
950
  };
976
- }, [pathname, propApiUrl, propApiKey, trackClicks, debug]);
951
+ }, [pathname, gate, trackClicks, debug]);
977
952
  const trackEvent = useCallback((options) => {
978
953
  const doTrack = async () => {
979
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig2();
980
- const apiUrl = propApiUrl || globalApiUrl;
981
- const apiKey = propApiKey || globalApiKey;
982
- if (!apiKey) {
983
- if (debug) console.warn("[Analytics] No API key configured");
984
- return;
985
- }
986
954
  const event = {
987
955
  sessionId: sessionIdRef.current,
988
956
  visitorId: visitorIdRef.current,
@@ -997,34 +965,15 @@ function AnalyticsProvider({
997
965
  if (debug) {
998
966
  console.log("[Analytics] Event:", event);
999
967
  }
1000
- try {
1001
- const response = await sonorFetch(
1002
- `${apiUrl}/api/public/analytics/event`,
1003
- {
1004
- method: "POST",
1005
- headers: { "Content-Type": "application/json" },
1006
- body: JSON.stringify(event)
1007
- },
1008
- { apiKey, retries: 0 }
1009
- );
1010
- if (!response.ok && debug) {
1011
- console.error("[Analytics] Error tracking event:", response.statusText);
1012
- }
1013
- } catch (error) {
1014
- if (debug) console.error("[Analytics] Error tracking event:", error);
968
+ const response = await analyticsSend("/api/public/analytics/event", event, gate);
969
+ if (response && !response.ok && debug) {
970
+ console.error("[Analytics] Error tracking event:", response.statusText);
1015
971
  }
1016
972
  };
1017
973
  scheduleIdleTask(doTrack, 1e3);
1018
- }, [propApiUrl, propApiKey, pathname, debug]);
974
+ }, [gate, site, pathname, debug]);
1019
975
  const trackConversion = useCallback((options) => {
1020
976
  const doTrack = async () => {
1021
- const { apiUrl: globalApiUrl, apiKey: globalApiKey } = getApiConfig2();
1022
- const apiUrl = propApiUrl || globalApiUrl;
1023
- const apiKey = propApiKey || globalApiKey;
1024
- if (!apiKey) {
1025
- if (debug) console.warn("[Analytics] No API key configured");
1026
- return;
1027
- }
1028
977
  const conversion = {
1029
978
  sessionId: sessionIdRef.current,
1030
979
  visitorId: visitorIdRef.current,
@@ -1040,25 +989,13 @@ function AnalyticsProvider({
1040
989
  if (debug) {
1041
990
  console.log("[Analytics] Conversion:", conversion);
1042
991
  }
1043
- try {
1044
- const response = await sonorFetch(
1045
- `${apiUrl}/api/public/analytics/conversion`,
1046
- {
1047
- method: "POST",
1048
- headers: { "Content-Type": "application/json" },
1049
- body: JSON.stringify(conversion)
1050
- },
1051
- { apiKey, retries: 0 }
1052
- );
1053
- if (!response.ok && debug) {
1054
- console.error("[Analytics] Error tracking conversion:", response.statusText);
1055
- }
1056
- } catch (error) {
1057
- if (debug) console.error("[Analytics] Error tracking conversion:", error);
992
+ const response = await analyticsSend("/api/public/analytics/conversion", conversion, gate);
993
+ if (response && !response.ok && debug) {
994
+ console.error("[Analytics] Error tracking conversion:", response.statusText);
1058
995
  }
1059
996
  };
1060
997
  doTrack();
1061
- }, [propApiUrl, propApiKey, pathname, debug]);
998
+ }, [gate, site, pathname, debug]);
1062
999
  useEffect(() => {
1063
1000
  registerAnalyticsDispatcher({ trackEvent, trackConversion });
1064
1001
  return () => registerAnalyticsDispatcher(null);
@@ -1076,6 +1013,7 @@ function AnalyticsProvider({
1076
1013
  apiUrl: propApiUrl,
1077
1014
  apiKey: propApiKey,
1078
1015
  site,
1016
+ allowInFrame,
1079
1017
  debug
1080
1018
  }
1081
1019
  ),
@@ -1098,5 +1036,5 @@ function useTrackEvent() {
1098
1036
  }
1099
1037
 
1100
1038
  export { AnalyticsProvider, WebVitals, useAnalytics, useAnalyticsOptional, useTrackEvent };
1101
- //# sourceMappingURL=chunk-AJBJH3BA.mjs.map
1102
- //# sourceMappingURL=chunk-AJBJH3BA.mjs.map
1039
+ //# sourceMappingURL=chunk-UOLY4NXK.mjs.map
1040
+ //# sourceMappingURL=chunk-UOLY4NXK.mjs.map