@sonordev/site-kit 7.4.0 → 8.0.1

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 (229) hide show
  1. package/AGENTS.md +40 -12
  2. package/CHANGELOG.md +72 -0
  3. package/README.md +44 -18
  4. package/agent-manifest.json +111 -56
  5. package/dist/AnalyticsProvider-EGCZ2MVM.js +13 -0
  6. package/dist/{ArticleViewTracker-3DH53RSB.js → ArticleViewTracker-ATNVMT45.js} +6 -5
  7. package/dist/{BlocksPopup-FGWYVHCH.js → BlocksPopup-F636XNO4.js} +6 -5
  8. package/dist/{ChatWidget-CDQZCLVH.js → ChatWidget-EQTLKPJX.js} +8 -5
  9. package/dist/{FileField-IPJ7L2W6.js → FileField-BUD2YGN5.js} +5 -5
  10. package/dist/{FormSpotlight-CQI2DBWI.js → FormSpotlight-NGH56TGC.js} +3 -3
  11. package/dist/{FormStage-4WHD6ED4.js → FormStage-XZRC54SY.js} +3 -3
  12. package/dist/ManagedForm-CQDQ4CUN.js +19 -0
  13. package/dist/{ManagedNewsletterForm-3D2BK3KQ.js → ManagedNewsletterForm-KCN3BTKA.js} +9 -6
  14. package/dist/{SignalCore-HEQYITTM.js → SignalCore-RDQPM2L2.js} +7 -7
  15. package/dist/SiteChat-QBDOQ5ZZ.js +6 -0
  16. package/dist/SiteDesignReporter-426TUCUF.js +12 -0
  17. package/dist/SitePopups-KLUD6XIE.js +13 -0
  18. package/dist/SitemapSync-QOIMV5GO.js +9 -0
  19. package/dist/_client/booking-widget.js +6 -5
  20. package/dist/_client/testimonial-section.js +3 -2
  21. package/dist/affiliates/index.js +6 -6
  22. package/dist/analytics/index.js +73 -7
  23. package/dist/articles/index.js +2 -2
  24. package/dist/articles/server-ui.js +3 -3
  25. package/dist/articles/server.js +2 -2
  26. package/dist/brand.css +1 -1
  27. package/dist/chat/index.d.ts +1 -1
  28. package/dist/chat/index.js +39 -8
  29. package/dist/{chunk-CSN45MHO.js → chunk-3222QBUS.js} +13 -16
  30. package/dist/chunk-3G7YABRA.js +25 -0
  31. package/dist/{chunk-CGWUXUYZ.js → chunk-3RDJKIYO.js} +2 -2
  32. package/dist/{chunk-J4FSB4OG.js → chunk-3YKQLC7J.js} +5 -2
  33. package/dist/{chunk-3E3PPSNR.js → chunk-55JLUMAC.js} +2 -2
  34. package/dist/{chunk-EHR4NIMX.js → chunk-5GB2HHVJ.js} +3 -3
  35. package/dist/chunk-5ROTTMBL.js +19 -0
  36. package/dist/chunk-5TM3WPCI.js +7 -0
  37. package/dist/{chunk-DA5XC7Y6.js → chunk-6BXUSAOJ.js} +1 -1
  38. package/dist/{chunk-7HPZSWS4.js → chunk-6CJGZFOU.js} +1 -1
  39. package/dist/{chunk-RYVDGXC2.js → chunk-6KU7STM3.js} +3 -1
  40. package/dist/{chunk-JRCNUUNG.js → chunk-6KUCA5HG.js} +1 -1
  41. package/dist/{chunk-MDP7EB4J.js → chunk-7BSC6HF3.js} +5 -5
  42. package/dist/{chunk-YCFW2OQO.js → chunk-AGJODJ4V.js} +2 -2
  43. package/dist/{chunk-OOD6GMT4.js → chunk-B7QRRLTU.js} +6 -4
  44. package/dist/{chunk-X6F6SO4S.js → chunk-C7TLGL3R.js} +21 -1
  45. package/dist/{chunk-PQDJNIHR.js → chunk-CAF53GKN.js} +2 -2
  46. package/dist/{chunk-43OCZ3JA.js → chunk-CAH4Y4PY.js} +4 -2
  47. package/dist/{chunk-XA2BNW5M.js → chunk-DWNS6ZJM.js} +1 -1
  48. package/dist/{chunk-PXKIGZ2F.js → chunk-EATJPSTS.js} +1 -1
  49. package/dist/{chunk-XEMHGJEG.js → chunk-EE6IG5GK.js} +10 -10
  50. package/dist/{chunk-D2RGEWHS.js → chunk-FIGIJK5F.js} +2 -2
  51. package/dist/{chunk-PF64OEXC.js → chunk-GMXY2OOY.js} +2 -2
  52. package/dist/{chunk-IE5SSOCN.js → chunk-H3SDOSVU.js} +3 -11
  53. package/dist/{chunk-GK7TV7EK.js → chunk-IY6G67EF.js} +1 -1
  54. package/dist/{chunk-CG4ETW5Y.js → chunk-J6N5DCGW.js} +3 -3
  55. package/dist/{chunk-ATE6IFVK.js → chunk-JCFQGEG7.js} +1 -1
  56. package/dist/{chunk-4BHRA7TI.js → chunk-JIH32RH2.js} +3 -3
  57. package/dist/{chunk-ZTLMPUO6.js → chunk-LNSF6BJC.js} +1 -1
  58. package/dist/{chunk-5O62CER4.js → chunk-M62U7TJF.js} +1 -1
  59. package/dist/{chunk-EDYHROQ7.js → chunk-NFRJTOTB.js} +3 -3
  60. package/dist/{chunk-6LLTLLEJ.js → chunk-NKFRW2VB.js} +6 -5
  61. package/dist/{chunk-CKW4HFJG.js → chunk-OCKGB734.js} +3 -3
  62. package/dist/{chunk-4DJMJ4V5.js → chunk-OE3NXEOF.js} +1 -1
  63. package/dist/{chunk-KHQ5GD6T.js → chunk-S5G3A7OZ.js} +1 -1
  64. package/dist/{chunk-4NTBQNHA.js → chunk-TYAVHRWH.js} +80 -81
  65. package/dist/{chunk-ZTLU3BSW.js → chunk-TZ5RTANX.js} +2 -2
  66. package/dist/{chunk-4YTYGG2C.js → chunk-URJN75ZG.js} +29 -16
  67. package/dist/{chunk-FUQTV5O6.js → chunk-VQQV7FOX.js} +3 -3
  68. package/dist/{chunk-PKGN32AU.js → chunk-XPTJRVL2.js} +1 -1
  69. package/dist/{chunk-662ILEZ6.js → chunk-Y35BWW2C.js} +3 -7
  70. package/dist/{chunk-MHGAZ3LL.js → chunk-YGXWG54S.js} +3 -5
  71. package/dist/{chunk-AH4AXO4P.js → chunk-Z4MK4VOG.js} +1 -1
  72. package/dist/{chunk-AV4QAK5F.js → chunk-Z6PVFZRI.js} +5 -4
  73. package/dist/chunk-ZKADJNR2.js +52 -0
  74. package/dist/client/index.js +6 -5
  75. package/dist/contracts/entries.d.ts +1 -1
  76. package/dist/contracts/knowledge.d.ts +84 -0
  77. package/dist/contracts/sentences.d.ts +46 -0
  78. package/dist/contracts/site-cache.d.ts +2 -0
  79. package/dist/cta-bar/index.js +1 -1
  80. package/dist/fleet/index.js +6 -5
  81. package/dist/forms/field-autocomplete.d.ts +16 -8
  82. package/dist/forms/index.d.ts +5 -0
  83. package/dist/forms/index.js +17 -17
  84. package/dist/forms/server.js +7 -7
  85. package/dist/forms/static.js +2 -2
  86. package/dist/forms/submitForm.d.ts +5 -0
  87. package/dist/images/index.js +4 -4
  88. package/dist/index.d.ts +3 -7
  89. package/dist/index.js +1 -1
  90. package/dist/layout/SiteKitLayout.d.ts +2 -1
  91. package/dist/layout/client.js +11 -9
  92. package/dist/layout/index.js +13 -11
  93. package/dist/llms/index.js +7 -6
  94. package/dist/maps/index.js +6 -6
  95. package/dist/mcp/sonor.d.ts +47 -3
  96. package/dist/mcp/sonor.js +30 -20
  97. package/dist/proxy/index.d.ts +3 -3
  98. package/dist/proxy/index.js +1 -1
  99. package/dist/reputation/index.js +3 -2
  100. package/dist/reputation/server.js +2 -1
  101. package/dist/revalidate/index.js +3 -3
  102. package/dist/robots/indexnow.js +2 -2
  103. package/dist/runtime/index.d.ts +32 -0
  104. package/dist/runtime/index.js +7 -0
  105. package/dist/seo/api.d.ts +0 -4
  106. package/dist/seo/client.js +6 -5
  107. package/dist/seo/getManagedMetadata.d.ts +24 -0
  108. package/dist/seo/index.d.ts +2 -3
  109. package/dist/seo/index.js +14 -132
  110. package/dist/seo/indexnow.js +2 -2
  111. package/dist/seo/llms.js +7 -6
  112. package/dist/seo/register-sitemap-cli.js +2 -2
  113. package/dist/seo/server-api.d.ts +0 -6
  114. package/dist/seo/server.d.ts +1 -1
  115. package/dist/seo/server.js +4 -4
  116. package/dist/seo/sitemap.js +4 -3
  117. package/dist/seo/types.d.ts +9 -30
  118. package/dist/server/index.d.ts +8 -1
  119. package/dist/server/index.js +4 -3
  120. package/dist/server/mint-site-token.d.ts +0 -11
  121. package/dist/server/server-fetch.d.ts +19 -0
  122. package/dist/server-api-EGOKC7Q3.js +9 -0
  123. package/dist/shared/build-entries.d.ts +21 -9
  124. package/dist/shared/clientApiConfig.d.ts +56 -0
  125. package/dist/shared/identity-reader.d.ts +26 -0
  126. package/dist/shared/identity-storage.d.ts +30 -0
  127. package/dist/shared/identity.d.ts +13 -13
  128. package/dist/shared/import-specifiers.d.ts +74 -0
  129. package/dist/shared/sonorFetch.d.ts +4 -3
  130. package/dist/shared/source-graph.d.ts +4 -1
  131. package/dist/shared/version.d.ts +1 -1
  132. package/dist/signal/index.js +2 -2
  133. package/dist/sitemap/index.js +4 -3
  134. package/dist/slots/index.js +3 -3
  135. package/dist/sync/index.js +6 -5
  136. package/dist/types.d.ts +0 -1
  137. package/dist/website/cta-bar.js +1 -1
  138. package/dist/website/images.js +4 -4
  139. package/dist/website/index.js +7 -6
  140. package/dist/website/popups.js +10 -7
  141. package/dist/website/slots.js +3 -3
  142. package/dist/{writeLLMsTxt-OL4KQERZ.js → writeLLMsTxt-UZGN6IBU.js} +3 -2
  143. package/docs/MIGRATING-TO-7.md +5 -2
  144. package/docs/MIGRATING-TO-8.md +183 -0
  145. package/docs.json +4 -8
  146. package/package.json +18 -45
  147. package/skills/site-kit/SKILL.md +41 -11
  148. package/src/analytics/README.md +14 -14
  149. package/src/chat/README.md +7 -7
  150. package/src/forms/README.md +61 -6
  151. package/src/mcp/README.md +61 -20
  152. package/src/proxy/README.md +5 -4
  153. package/src/revalidate/README.md +2 -2
  154. package/src/runtime/README.md +51 -0
  155. package/src/seo/README.md +24 -8
  156. package/src/sync/README.md +2 -2
  157. package/src/website/README.md +3 -2
  158. package/dist/AnalyticsProvider-BQXV3ZF3.js +0 -11
  159. package/dist/ManagedForm-7FZNH4L2.js +0 -16
  160. package/dist/SiteChat-DMPDXY3W.js +0 -5
  161. package/dist/SiteDesignReporter-Y2IOJE52.js +0 -11
  162. package/dist/SitePopups-HD2LDKVU.js +0 -10
  163. package/dist/SitemapSync-OKPZHRX6.js +0 -8
  164. package/dist/chunk-24QZEO3Q.js +0 -41
  165. package/dist/chunk-BU66S5B7.js +0 -1
  166. package/dist/chunk-G3NHWMP5.js +0 -233
  167. package/dist/chunk-HODO5BX5.js +0 -28
  168. package/dist/chunk-L3AQCDCY.js +0 -386
  169. package/dist/chunk-P5GB6NEO.js +0 -66
  170. package/dist/chunk-SWKE6FWH.js +0 -47
  171. package/dist/cms/CmsPage.d.ts +0 -17
  172. package/dist/cms/CmsPreview.d.ts +0 -37
  173. package/dist/cms/CmsSection.d.ts +0 -8
  174. package/dist/cms/PortableTextRenderer.d.ts +0 -7
  175. package/dist/cms/index.d.ts +0 -37
  176. package/dist/cms/index.js +0 -5
  177. package/dist/cms/sanity-image.d.ts +0 -47
  178. package/dist/cms/sections/CtaSection.d.ts +0 -3
  179. package/dist/cms/sections/CustomSection.d.ts +0 -7
  180. package/dist/cms/sections/FaqSection.d.ts +0 -3
  181. package/dist/cms/sections/FormSection.d.ts +0 -8
  182. package/dist/cms/sections/GallerySection.d.ts +0 -3
  183. package/dist/cms/sections/HeroSection.d.ts +0 -3
  184. package/dist/cms/sections/RichTextSection.d.ts +0 -3
  185. package/dist/cms/sections/TestimonialsSection.d.ts +0 -3
  186. package/dist/cms/sections/index.d.ts +0 -8
  187. package/dist/cms/server-api.d.ts +0 -49
  188. package/dist/cms/server.d.ts +0 -1
  189. package/dist/cms/server.js +0 -5
  190. package/dist/cms/types.d.ts +0 -104
  191. package/dist/commerce/CalendarView.d.ts +0 -43
  192. package/dist/commerce/CheckoutForm.d.ts +0 -11
  193. package/dist/commerce/EventCalendar.d.ts +0 -26
  194. package/dist/commerce/EventCheckout.d.ts +0 -42
  195. package/dist/commerce/EventEmbed.d.ts +0 -11
  196. package/dist/commerce/EventModal.d.ts +0 -43
  197. package/dist/commerce/EventTile.d.ts +0 -10
  198. package/dist/commerce/EventsAgenda.d.ts +0 -38
  199. package/dist/commerce/EventsWidget.d.ts +0 -84
  200. package/dist/commerce/OfferingCard.d.ts +0 -9
  201. package/dist/commerce/OfferingList.d.ts +0 -9
  202. package/dist/commerce/ProductDetail.d.ts +0 -38
  203. package/dist/commerce/ProductEmbed.d.ts +0 -11
  204. package/dist/commerce/ProductGrid.d.ts +0 -41
  205. package/dist/commerce/ProductPage.d.ts +0 -39
  206. package/dist/commerce/RegistrationForm.d.ts +0 -9
  207. package/dist/commerce/SizeChart.d.ts +0 -8
  208. package/dist/commerce/UpcomingEvents.d.ts +0 -9
  209. package/dist/commerce/api.d.ts +0 -179
  210. package/dist/commerce/events-extras.d.ts +0 -60
  211. package/dist/commerce/index.d.ts +0 -33
  212. package/dist/commerce/index.js +0 -8022
  213. package/dist/commerce/server.d.ts +0 -161
  214. package/dist/commerce/server.js +0 -2
  215. package/dist/commerce/types.d.ts +0 -340
  216. package/dist/commerce/useEventModal.d.ts +0 -20
  217. package/dist/commerce/utils.d.ts +0 -17
  218. package/dist/engage/EngageWidget.d.ts +0 -21
  219. package/dist/engage/index.d.ts +0 -14
  220. package/dist/engage/index.js +0 -45
  221. package/dist/engage/types.d.ts +0 -33
  222. package/dist/seo/ManagedContent.d.ts +0 -14
  223. package/dist/server-api-BVCBLJKL.js +0 -9
  224. package/dist/website/cms/server.d.ts +0 -2
  225. package/dist/website/cms/server.js +0 -5
  226. package/dist/website/cms-server.d.ts +0 -2
  227. package/dist/website/cms.d.ts +0 -2
  228. package/dist/website/cms.js +0 -5
  229. package/src/commerce/README.md +0 -109
@@ -0,0 +1,25 @@
1
+ // src/shared/clientApiConfig.ts
2
+ var DEFAULT_SONOR_API_URL = "https://api.sonor.io";
3
+ function trimSlash(url) {
4
+ return url.replace(/\/+$/, "");
5
+ }
6
+ function siteKitWindow() {
7
+ return typeof window === "undefined" ? void 0 : window;
8
+ }
9
+ function readPublishedApiConfig() {
10
+ const w = siteKitWindow();
11
+ const apiUrl = w?.__SITE_KIT_API_URL__ ? trimSlash(w.__SITE_KIT_API_URL__) : void 0;
12
+ return { apiUrl, apiKey: w?.__SITE_KIT_API_KEY__ || void 0 };
13
+ }
14
+ function getClientApiConfig(options = {}) {
15
+ if (typeof window === "undefined") {
16
+ return {
17
+ apiUrl: trimSlash(process.env.SONOR_API_URL || process.env.NEXT_PUBLIC_SONOR_API_URL || DEFAULT_SONOR_API_URL),
18
+ apiKey: options.serverKey ? process.env.SONOR_API_KEY || void 0 : void 0
19
+ };
20
+ }
21
+ const published = readPublishedApiConfig();
22
+ return { apiUrl: published.apiUrl || DEFAULT_SONOR_API_URL, apiKey: published.apiKey };
23
+ }
24
+
25
+ export { DEFAULT_SONOR_API_URL, getClientApiConfig, readPublishedApiConfig };
@@ -1,7 +1,7 @@
1
1
  import { SLOTS_CONTRACT_VERSION, verifySlotContent, canonicalJson } from './chunk-VCJYLYJV.js';
2
2
  import { isValidSlotId, SLOT_CONTENT_MAX_LENGTH, parseSlotRichText, normalizeSlotValue } from './chunk-LPH5FANE.js';
3
- import { SITE_CACHE_TAGS } from './chunk-RYVDGXC2.js';
4
- import { resolveServerApiConfig } from './chunk-X6F6SO4S.js';
3
+ import { SITE_CACHE_TAGS } from './chunk-6KU7STM3.js';
4
+ import { resolveServerApiConfig } from './chunk-C7TLGL3R.js';
5
5
  import 'server-only';
6
6
  import * as React from 'react';
7
7
  import { cache } from 'react';
@@ -96,9 +96,12 @@ var CSS = `
96
96
  }
97
97
  .sk-stage__summary:hover,
98
98
  .sk-stage__summary:focus-visible { background: color-mix(in srgb, currentColor 7%, transparent); }
99
+ /* The step number and a settled label stay dimmer than the label (.72) but
100
+ no lower than .62: at .5, near-black text on white measured 3.43:1 live,
101
+ under WCAG AA's 4.5:1. .62 gives ~5:1 on the same text. */
99
102
  .sk-stage__summary-idx {
100
103
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
101
- font-variant-numeric: tabular-nums; opacity: .5; flex-shrink: 0;
104
+ font-variant-numeric: tabular-nums; opacity: .62; flex-shrink: 0;
102
105
  }
103
106
  .sk-stage__summary-label {
104
107
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
@@ -118,7 +121,7 @@ var CSS = `
118
121
  }
119
122
  }
120
123
  .sk-stage__summary-value--skipped { font-weight: 400; font-style: italic; opacity: .6; }
121
- .sk-stage__beat[data-sk-beat-filled="true"] .sk-stage__summary-label { opacity: .55; }
124
+ .sk-stage__beat[data-sk-beat-filled="true"] .sk-stage__summary-label { opacity: .62; }
122
125
  .sk-stage__summary-tick {
123
126
  width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0; align-self: center;
124
127
  background: color-mix(in srgb, var(--sk-primary, #2563eb) 72%, currentColor);
@@ -1,5 +1,5 @@
1
- import { isTokenMode, getFreshCredential, isSiteToken, refreshSiteToken, currentCredential, credentialBreakerId } from './chunk-GK7TV7EK.js';
2
- import { SITE_KIT_VERSION } from './chunk-KHQ5GD6T.js';
1
+ import { isTokenMode, getFreshCredential, isSiteToken, refreshSiteToken, currentCredential, credentialBreakerId } from './chunk-IY6G67EF.js';
2
+ import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
3
3
 
4
4
  // src/shared/fetchWithRetry.ts
5
5
  function backoffDelay(attempt, response) {
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { sanitizeFleetVersion, buildFleetHeartbeatPayload } from './chunk-ZTZQPYP6.js';
3
3
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
4
- import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
5
- import { sonorFetch } from './chunk-3E3PPSNR.js';
6
- import { SITE_KIT_VERSION } from './chunk-KHQ5GD6T.js';
4
+ import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
5
+ import { sonorFetch } from './chunk-55JLUMAC.js';
6
+ import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
7
7
  import { useRef, useEffect } from 'react';
8
8
 
9
9
  // src/fleet/heartbeat.ts
@@ -0,0 +1,19 @@
1
+ import { memoryIdentity, VISITOR_ID_KEY, SESSION_ID_KEY } from './chunk-5TM3WPCI.js';
2
+
3
+ // src/shared/identity-reader.ts
4
+ function readKey(kind, key) {
5
+ try {
6
+ return window[kind].getItem(key) || null;
7
+ } catch {
8
+ return null;
9
+ }
10
+ }
11
+ function readAnalyticsIdentity() {
12
+ if (typeof window === "undefined") return { sessionId: null, visitorId: null };
13
+ return {
14
+ sessionId: readKey("sessionStorage", SESSION_ID_KEY) || memoryIdentity.sessionId || null,
15
+ visitorId: readKey("localStorage", VISITOR_ID_KEY) || memoryIdentity.visitorId || null
16
+ };
17
+ }
18
+
19
+ export { readAnalyticsIdentity };
@@ -0,0 +1,7 @@
1
+ // src/shared/identity-storage.ts
2
+ var VISITOR_ID_KEY = "_sk_vid";
3
+ var SESSION_ID_KEY = "_sk_sid";
4
+ var SESSION_TIME_KEY = "_sk_stime";
5
+ var memoryIdentity = { visitorId: "", sessionId: "" };
6
+
7
+ export { SESSION_ID_KEY, SESSION_TIME_KEY, VISITOR_ID_KEY, memoryIdentity };
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { sonorFetch } from './chunk-3E3PPSNR.js';
2
+ import { sonorFetch } from './chunk-55JLUMAC.js';
3
3
  import { useState, useCallback, useEffect } from 'react';
4
4
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
5
 
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { reviewPhotoUrl } from './chunk-CAT235HY.js';
3
- import { fetchReviews } from './chunk-EDYHROQ7.js';
3
+ import { fetchReviews } from './chunk-NFRJTOTB.js';
4
4
  import { useState, useEffect, useCallback } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
@@ -10,7 +10,9 @@ var SITE_CACHE_TAGS = {
10
10
  /** Article categories and tags. */
11
11
  taxonomy: "editorial-taxonomy",
12
12
  /** Portfolio items (agency-site-kit). */
13
- portfolio: "portfolio"
13
+ portfolio: "portfolio",
14
+ /** Products, services, events and membership plans (commerce-kit). */
15
+ commerce: "commerce"
14
16
  };
15
17
  function isSiteRevalidatePong(body) {
16
18
  return typeof body === "object" && body !== null && body.ok === true && body.ping === true;
@@ -1,5 +1,5 @@
1
1
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
2
- import { configureSiteCredential, currentCredential } from './chunk-GK7TV7EK.js';
2
+ import { configureSiteCredential, currentCredential } from './chunk-IY6G67EF.js';
3
3
 
4
4
  // src/shared/publishCredential.ts
5
5
  function publishSiteCredential({
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- import { countStageViews, countStageQuestions, useFieldControls } from './chunk-ATE6IFVK.js';
3
- import { HoneypotField } from './chunk-DXO6SBMD.js';
4
- import { DelightStyles, FormMomentum, FormField } from './chunk-4NTBQNHA.js';
5
- import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-CSN45MHO.js';
2
+ import { countStageViews, countStageQuestions, useFieldControls } from './chunk-JCFQGEG7.js';
3
+ import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-3222QBUS.js';
6
4
  import { readAgentSubmit, formToolAttributes } from './chunk-Q6E4OPGG.js';
7
5
  import { isFieldVisible, validateField, isFieldComplete, isDisplayOnly, unseenControlValues } from './chunk-C2FZBUSS.js';
6
+ import { HoneypotField } from './chunk-DXO6SBMD.js';
7
+ import { DelightStyles, FormMomentum, FormField } from './chunk-TYAVHRWH.js';
8
8
  import { DEFAULT_FORM_SUCCESS_MESSAGE } from './chunk-5SQK3D53.js';
9
9
  import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
10
10
  import { useState, useRef, useMemo, useEffect, useCallback } from 'react';
@@ -63,7 +63,7 @@ function FormClient({
63
63
  return;
64
64
  }
65
65
  let cancelled = false;
66
- const load = resolvedExperience === "stage" ? import('./FormStage-4WHD6ED4.js').then((m) => m.FormStage) : import('./FormSpotlight-CQI2DBWI.js').then((m) => m.FormSpotlight);
66
+ const load = resolvedExperience === "stage" ? import('./FormStage-XZRC54SY.js').then((m) => m.FormStage) : import('./FormSpotlight-NGH56TGC.js').then((m) => m.FormSpotlight);
67
67
  load.then((Component) => {
68
68
  if (!cancelled) setExperience(() => Component);
69
69
  }).catch((err) => {
@@ -1,13 +1,13 @@
1
1
  'use client';
2
2
  import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
3
- import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
3
+ import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
4
4
  import { useState, useEffect } from 'react';
5
5
  import ReactDOM from 'react-dom';
6
6
  import dynamic from 'next/dynamic';
7
7
  import { jsx } from 'react/jsx-runtime';
8
8
 
9
9
  var LazyChatWidget = dynamic(
10
- () => import('./ChatWidget-CDQZCLVH.js').then((m) => ({ default: m.ChatWidget })),
10
+ () => import('./ChatWidget-EQTLKPJX.js').then((m) => ({ default: m.ChatWidget })),
11
11
  { ssr: false }
12
12
  );
13
13
  function SiteChat(props) {
@@ -2,9 +2,10 @@
2
2
  import { VISUAL_VIEWPORT_GAP_PROPERTY } from './chunk-6T6CQVNL.js';
3
3
  import { GlassStyles } from './chunk-JE4A5S4F.js';
4
4
  import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
5
- import { useForm } from './chunk-CSN45MHO.js';
5
+ import { useForm } from './chunk-3222QBUS.js';
6
6
  import { parseColor, relativeLuminance, DARK_LUMINANCE, contrastRatio } from './chunk-S22FSH7C.js';
7
- import { sonorFetch } from './chunk-3E3PPSNR.js';
7
+ import { readPublishedApiConfig } from './chunk-3G7YABRA.js';
8
+ import { sonorFetch } from './chunk-55JLUMAC.js';
8
9
  import { useState, useEffect, useRef, useLayoutEffect, useCallback, Fragment as Fragment$1 } from 'react';
9
10
  import { lexer } from 'marked';
10
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -556,8 +557,9 @@ function getApiConfig() {
556
557
  const isDev = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
557
558
  const defaultApiUrl = isDev && process.env?.SONOR_API_URL ? process.env.SONOR_API_URL : "https://api.sonor.io";
558
559
  const defaultSignalUrl = isDev && (process.env?.SONOR_SIGNAL_URL || process.env?.NEXT_PUBLIC_SIGNAL_API_URL) ? process.env.SONOR_SIGNAL_URL || process.env.NEXT_PUBLIC_SIGNAL_API_URL : "https://signal.sonor.io";
559
- const apiUrl = typeof window !== "undefined" ? window.__SITE_KIT_API_URL__ || defaultApiUrl : defaultApiUrl;
560
- const apiKey = typeof window !== "undefined" ? window.__SITE_KIT_API_KEY__ : void 0;
560
+ const published = readPublishedApiConfig();
561
+ const apiUrl = published.apiUrl || defaultApiUrl;
562
+ const apiKey = published.apiKey;
561
563
  const signalUrl = typeof window !== "undefined" ? window.__SITE_KIT_SIGNAL_URL__ || defaultSignalUrl : defaultSignalUrl;
562
564
  return { apiUrl, apiKey, signalUrl };
563
565
  }
@@ -37,6 +37,25 @@ function attemptSignal(budgetMs, callerSignal) {
37
37
  function sleep(ms) {
38
38
  return new Promise((resolve) => setTimeout(resolve, ms));
39
39
  }
40
+ var NEXT_CONTROL_DIGESTS = /* @__PURE__ */ new Set([
41
+ "DYNAMIC_SERVER_USAGE",
42
+ "BAILOUT_TO_CLIENT_SIDE_RENDERING",
43
+ "HANGING_PROMISE_REJECTION"
44
+ ]);
45
+ var REACT_POSTPONE = /* @__PURE__ */ Symbol.for("react.postpone");
46
+ function isNextControlFlow(error) {
47
+ for (let current = error, depth = 0; current && typeof current === "object" && depth < 5; depth++) {
48
+ const { digest, code, message } = current;
49
+ if (typeof digest === "string" && (NEXT_CONTROL_DIGESTS.has(digest) || digest.startsWith("NEXT_"))) return true;
50
+ if (code === "NEXT_STATIC_GEN_BAILOUT") return true;
51
+ if (current.$$typeof === REACT_POSTPONE) return true;
52
+ if (typeof message === "string" && message.includes("needs to bail out of prerendering at this point because it used") && message.includes("ppr-caught-error")) {
53
+ return true;
54
+ }
55
+ current = current.cause;
56
+ }
57
+ return false;
58
+ }
40
59
  async function serverApiFetch(path, options = {}) {
41
60
  const {
42
61
  method = "GET",
@@ -116,6 +135,7 @@ async function serverApiFetch(path, options = {}) {
116
135
  }
117
136
  return await response.json();
118
137
  } catch (error) {
138
+ if (isNextControlFlow(error)) throw error;
119
139
  if (retry && attempt < attempts && monotonicMs() < deadline) {
120
140
  await sleep(
121
141
  Math.min(200 * attempt * attempt + retryJitter() * 150, Math.max(0, deadline - monotonicMs()))
@@ -132,4 +152,4 @@ async function serverApiFetch(path, options = {}) {
132
152
  return null;
133
153
  }
134
154
 
135
- export { requireServerApiConfig, resolveApiOrigin, resolveServerApiConfig, serverApiFetch };
155
+ export { isNextControlFlow, requireServerApiConfig, resolveApiOrigin, resolveServerApiConfig, serverApiFetch };
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- import { getSiteDesignTokens, tokensForReport, shouldReportDesign, sendSiteDesign } from './chunk-CG4ETW5Y.js';
2
+ import { getSiteDesignTokens, tokensForReport, shouldReportDesign, sendSiteDesign } from './chunk-J6N5DCGW.js';
3
3
  import { designTokensHash } from './chunk-IHG36STL.js';
4
4
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
5
- import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
5
+ import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
6
6
  import { useRef, useEffect } from 'react';
7
7
 
8
8
  var STAMP_KEY = (site) => `_sk_design_sent:${site}`;
@@ -1,4 +1,5 @@
1
1
  import { FRAME_READY_MESSAGE } from './chunk-EKBEOXTH.js';
2
+ import { readPublishedApiConfig, DEFAULT_SONOR_API_URL } from './chunk-3G7YABRA.js';
2
3
 
3
4
  // src/shared/frame.ts
4
5
  function isFramed() {
@@ -48,8 +49,9 @@ function announceFrameReady() {
48
49
  var announcedSuppression = false;
49
50
  function resolveAnalyticsTarget(options = {}) {
50
51
  const config = typeof window === "undefined" ? void 0 : window;
51
- const apiUrl = options.apiUrl || config?.__SITE_KIT_API_URL__ || "https://api.sonor.io";
52
- const apiKey = options.apiKey || config?.__SITE_KIT_API_KEY__;
52
+ const published = readPublishedApiConfig();
53
+ const apiUrl = options.apiUrl || published.apiUrl || DEFAULT_SONOR_API_URL;
54
+ const apiKey = options.apiKey || published.apiKey;
53
55
  if (!apiKey) return null;
54
56
  const hostname = (config?.location?.hostname || "").toLowerCase().replace(/\.+$/, "");
55
57
  const local = hostname === "localhost" || hostname.endsWith(".localhost") || hostname === "127.0.0.1" || hostname === "[::1]" || hostname === "::1" || hostname === "0.0.0.0";
@@ -1,5 +1,5 @@
1
1
  import { secretsMatch, readCappedBody } from './chunk-XTRZGXB2.js';
2
- import { SITE_KIT_VERSION } from './chunk-KHQ5GD6T.js';
2
+ import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
3
3
 
4
4
  // src/llms/revalidate.ts
5
5
  function createLlmsRevalidateHandler(secret, options) {
@@ -1,4 +1,4 @@
1
- import { serverApiFetch } from './chunk-X6F6SO4S.js';
1
+ import { serverApiFetch } from './chunk-C7TLGL3R.js';
2
2
 
3
3
  // src/robots/indexnow.ts
4
4
  var INDEXNOW_KEY_PATH = "/indexnow.txt";
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import { SITE_EDIT_PARAM } from './chunk-6G43IRWR.js';
3
- import { publishSiteCredential } from './chunk-JRCNUUNG.js';
4
- import { FleetHeartbeat } from './chunk-EHR4NIMX.js';
5
- import { SignalBridge } from './chunk-AH4AXO4P.js';
3
+ import { publishSiteCredential } from './chunk-6KUCA5HG.js';
4
+ import { FleetHeartbeat } from './chunk-5GB2HHVJ.js';
6
5
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
7
6
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
8
- import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-24QZEO3Q.js';
9
- import { announceFrameReady, isCrossOriginFrame } from './chunk-43OCZ3JA.js';
7
+ import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-ZKADJNR2.js';
8
+ import { announceFrameReady, isCrossOriginFrame } from './chunk-CAH4Y4PY.js';
9
+ import { SignalBridge } from './chunk-Z4MK4VOG.js';
10
10
  import React, { useState, useRef, useCallback, useEffect, Suspense } from 'react';
11
11
  import dynamic from 'next/dynamic';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -33,23 +33,23 @@ function startEditBridge() {
33
33
  };
34
34
  }
35
35
  var LazyAnalyticsProvider = dynamic(
36
- () => import('./AnalyticsProvider-BQXV3ZF3.js').then((m) => ({ default: m.AnalyticsProvider })),
36
+ () => import('./AnalyticsProvider-EGCZ2MVM.js').then((m) => ({ default: m.AnalyticsProvider })),
37
37
  { ssr: false }
38
38
  );
39
39
  var LazySiteChat = dynamic(
40
- () => import('./SiteChat-DMPDXY3W.js').then((m) => ({ default: m.SiteChat })),
40
+ () => import('./SiteChat-QBDOQ5ZZ.js').then((m) => ({ default: m.SiteChat })),
41
41
  { ssr: false }
42
42
  );
43
43
  var LazySitePopups = dynamic(
44
- () => import('./SitePopups-HD2LDKVU.js').then((m) => ({ default: m.SitePopups })),
44
+ () => import('./SitePopups-KLUD6XIE.js').then((m) => ({ default: m.SitePopups })),
45
45
  { ssr: false }
46
46
  );
47
47
  var LazySiteDesignReporter = dynamic(
48
- () => import('./SiteDesignReporter-Y2IOJE52.js').then((m) => ({ default: m.SiteDesignReporter })),
48
+ () => import('./SiteDesignReporter-426TUCUF.js').then((m) => ({ default: m.SiteDesignReporter })),
49
49
  { ssr: false }
50
50
  );
51
51
  var LazySitemapSync = dynamic(
52
- () => import('./SitemapSync-OKPZHRX6.js').then((m) => ({ default: m.SitemapSync })),
52
+ () => import('./SitemapSync-QOIMV5GO.js').then((m) => ({ default: m.SitemapSync })),
53
53
  { ssr: false }
54
54
  );
55
55
  function SiteKitClientProviders({
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { locToPath, isMalformedSitemapPath, inferPageType } from './chunk-YVKRYQRG.js';
3
- import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
4
- import { sonorFetch } from './chunk-3E3PPSNR.js';
3
+ import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
4
+ import { sonorFetch } from './chunk-55JLUMAC.js';
5
5
  import { useRef, useEffect } from 'react';
6
6
 
7
7
  var SYNC_STAMP_KEY = "_sk_sitemap_synced_at";
@@ -1,12 +1,12 @@
1
1
  'use client';
2
- import { useDeferredActivation } from './chunk-YC7ELZS3.js';
3
2
  import { shellValuesToCarry } from './chunk-C2FZBUSS.js';
3
+ import { useDeferredActivation } from './chunk-YC7ELZS3.js';
4
4
  import { normalizeFormConfig } from './chunk-5SQK3D53.js';
5
5
  import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
6
6
  import React, { useRef, useEffect, useState, useMemo, useCallback } from 'react';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
8
 
9
- var loadInteractiveForm = () => import('./ManagedForm-7FZNH4L2.js').then((m) => m.ManagedForm);
9
+ var loadInteractiveForm = () => import('./ManagedForm-CQDQ4CUN.js').then((m) => m.ManagedForm);
10
10
  var REPLAY_WAIT_MS = 8e3;
11
11
  function FormEnhancer({
12
12
  formId,
@@ -1,6 +1,7 @@
1
1
  import { trackedFreshFetch } from './chunk-UAYAJPEP.js';
2
+ import { isNextControlFlow } from './chunk-C7TLGL3R.js';
2
3
  import { monotonicMs } from './chunk-MH2DSGC6.js';
3
- import { SITE_KIT_VERSION } from './chunk-KHQ5GD6T.js';
4
+ import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
4
5
  import 'server-only';
5
6
 
6
7
  var MINT_PATH = "/api/public/site-token";
@@ -37,15 +38,6 @@ function failClosed(reason, rawKey, now) {
37
38
  `site-kit: could not mint a site token (${reason}). Refusing to publish the raw SONOR_API_KEY in page HTML, so this build fails instead. Check that the mint endpoint is reachable and the key is valid, then rebuild. To ship anyway \u2014 which publishes the project secret in public HTML \u2014 set SONOR_SITE_TOKEN_FALLBACK=raw.`
38
39
  );
39
40
  }
40
- function isFrameworkSignal(err) {
41
- if (!err || typeof err !== "object") return false;
42
- const e = err;
43
- if (e.digest === "DYNAMIC_SERVER_USAGE") return true;
44
- if (e.code === "NEXT_STATIC_GEN_BAILOUT") return true;
45
- if (typeof e.digest === "string" && e.digest.startsWith("NEXT_")) return true;
46
- if (e.$$typeof === /* @__PURE__ */ Symbol.for("react.postpone")) return true;
47
- return false;
48
- }
49
41
  async function resolveClientCredential(rawKey, apiUrl) {
50
42
  if (!rawKey) return "";
51
43
  if (rawKey.startsWith(SITE_TOKEN_PREFIX)) return rawKey;
@@ -77,7 +69,7 @@ async function mintWithRetry(rawKey, apiUrl) {
77
69
  signal: typeof AbortSignal !== "undefined" && AbortSignal.timeout ? AbortSignal.timeout(MINT_TIMEOUT_MS) : void 0
78
70
  });
79
71
  } catch (err) {
80
- if (isFrameworkSignal(err)) throw err;
72
+ if (isNextControlFlow(err)) throw err;
81
73
  lastReason = err instanceof Error ? err.message : "network error";
82
74
  if (attempt < MINT_MAX_ATTEMPTS - 1) {
83
75
  await sleep(retryDelayMs(null, attempt));
@@ -1,4 +1,4 @@
1
- import { SITE_KIT_VERSION } from './chunk-KHQ5GD6T.js';
1
+ import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
2
2
 
3
3
  // src/shared/siteToken.ts
4
4
  var SITE_TOKEN_PREFIX = "st1.";
@@ -1,8 +1,8 @@
1
1
  import { toHexColor, normalizeDesignTokens, designTokensHash } from './chunk-IHG36STL.js';
2
2
  import { contrastRatio, parseColor, relativeLuminance } from './chunk-S22FSH7C.js';
3
- import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
4
- import { sonorFetch } from './chunk-3E3PPSNR.js';
5
- import { SITE_KIT_VERSION } from './chunk-KHQ5GD6T.js';
3
+ import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
4
+ import { sonorFetch } from './chunk-55JLUMAC.js';
5
+ import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
6
6
 
7
7
  // src/website/design.ts
8
8
  var SITE_DESIGN_PATH = "/api/public/site/design";
@@ -26,7 +26,7 @@ function useFieldControls(fields) {
26
26
  }
27
27
  if (needsFile && !requested.current.file) {
28
28
  requested.current.file = true;
29
- import('./FileField-IPJ7L2W6.js').then((m) => {
29
+ import('./FileField-BUD2YGN5.js').then((m) => {
30
30
  if (!cancelled) setControls((prev) => ({ ...prev, File: m.FileField }));
31
31
  }).catch(() => {
32
32
  requested.current.file = false;
@@ -1,12 +1,12 @@
1
1
  import { freshFetch } from './chunk-UAYAJPEP.js';
2
2
  import { LLM_GEO_CONTRACT_VERSION } from './chunk-NZ4RXN3G.js';
3
3
  import { withSiteParam } from './chunk-MJP63SSS.js';
4
+ import { getClientApiConfig } from './chunk-3G7YABRA.js';
4
5
  import { cache } from 'react';
5
6
 
6
7
  function getApiConfig() {
7
- const apiUrl = typeof window !== "undefined" && window.__SITE_KIT_API_URL__ || process.env.SONOR_API_URL || "https://api.sonor.io";
8
- const apiKey = typeof window !== "undefined" && window.__SITE_KIT_API_KEY__ || process.env.SONOR_API_KEY || "";
9
- return { apiUrl, apiKey };
8
+ const { apiUrl, apiKey } = getClientApiConfig({ serverKey: true });
9
+ return { apiUrl, apiKey: apiKey ?? "" };
10
10
  }
11
11
  async function apiGet(endpoint, options) {
12
12
  const { apiUrl, apiKey } = getApiConfig();
@@ -1,5 +1,5 @@
1
1
  import { HoneypotField } from './chunk-DXO6SBMD.js';
2
- import { FormField } from './chunk-4NTBQNHA.js';
2
+ import { FormField } from './chunk-TYAVHRWH.js';
3
3
  import { normalizeFormConfig } from './chunk-5SQK3D53.js';
4
4
  import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { generateLLMsTxt, generateLLMsFullTxt, appendAgentAccessSection } from './chunk-ZTLU3BSW.js';
1
+ import { generateLLMsTxt, generateLLMsFullTxt, appendAgentAccessSection } from './chunk-TZ5RTANX.js';
2
2
  import { createHash } from 'crypto';
3
3
  import { existsSync, readFileSync } from 'fs';
4
4
  import { join } from 'path';
@@ -1,12 +1,12 @@
1
1
  import { monotonicMs } from './chunk-MH2DSGC6.js';
2
+ import { getClientApiConfig } from './chunk-3G7YABRA.js';
2
3
 
3
4
  // src/reputation/api.ts
4
5
  var reviewsCache = /* @__PURE__ */ new Map();
5
6
  var CACHE_TTL = 6e4;
6
7
  function getApiConfig() {
7
- const apiUrl = typeof window !== "undefined" ? window.__SITE_KIT_API_URL__ || "https://api.sonor.io" : process.env.SONOR_API_URL || "https://api.sonor.io";
8
- const apiKey = typeof window !== "undefined" ? window.__SITE_KIT_API_KEY__ || "" : process.env.SONOR_API_KEY || "";
9
- return { apiUrl, apiKey };
8
+ const { apiUrl, apiKey } = getClientApiConfig({ serverKey: true });
9
+ return { apiUrl, apiKey: apiKey ?? "" };
10
10
  }
11
11
  async function fetchWithRetry(url, headers, retries = 2) {
12
12
  for (let attempt = 0; attempt <= retries; attempt++) {
@@ -1,8 +1,9 @@
1
1
  'use client';
2
2
  import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
3
- import { getOrCreateVisitorId } from './chunk-24QZEO3Q.js';
4
- import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
5
- import { sonorFetch } from './chunk-3E3PPSNR.js';
3
+ import { readAnalyticsIdentity } from './chunk-5ROTTMBL.js';
4
+ import { getOrCreateVisitorId } from './chunk-ZKADJNR2.js';
5
+ import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
6
+ import { sonorFetch } from './chunk-55JLUMAC.js';
6
7
  import { useState, useEffect, useCallback, useRef } from 'react';
7
8
  import ReactDOM from 'react-dom';
8
9
  import dynamic from 'next/dynamic';
@@ -160,7 +161,7 @@ function activatePopup(active, id, popups) {
160
161
  return [...active, id];
161
162
  }
162
163
  var LazyBlocksPopup = dynamic(
163
- () => import('./BlocksPopup-FGWYVHCH.js').then((m) => ({ default: m.BlocksPopup })),
164
+ () => import('./BlocksPopup-F636XNO4.js').then((m) => ({ default: m.BlocksPopup })),
164
165
  { ssr: false }
165
166
  );
166
167
  function SitePopups(props) {
@@ -346,7 +347,7 @@ function PopupView({
346
347
  );
347
348
  }
348
349
  function trackPopupEvent(apiUrl, apiKey, endpoint, data) {
349
- const visitorId = typeof localStorage !== "undefined" ? localStorage.getItem("_sk_vid") : null;
350
+ const { visitorId } = readAnalyticsIdentity();
350
351
  sonorFetch(`${apiUrl.replace(/\/$/, "")}/engage/widget/${endpoint}`, {
351
352
  method: "POST",
352
353
  headers: { "Content-Type": "application/json" },
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { registerAnalyticsDispatcher } from './chunk-LCDVPAMR.js';
3
- import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-24QZEO3Q.js';
3
+ import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-ZKADJNR2.js';
4
4
  import { onPageLeave } from './chunk-L2V5PUFN.js';
5
- import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
6
- import { sonorFetch, sonorBeacon } from './chunk-3E3PPSNR.js';
5
+ import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
6
+ import { sonorFetch, sonorBeacon } from './chunk-55JLUMAC.js';
7
7
  import { createContext, useRef, useEffect, useState, useMemo, useCallback, useContext } from 'react';
8
8
  import { usePathname } from 'next/navigation';
9
9
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
+ import { writeLLMsTxtToPublic } from './chunk-TZ5RTANX.js';
1
2
  import { getSiteConfig } from './chunk-Z22QVHT4.js';
2
- import { writeLLMsTxtToPublic } from './chunk-ZTLU3BSW.js';
3
3
  import { buildFetch } from './chunk-UAYAJPEP.js';
4
4
  import { findAppDirForDiscovery } from './chunk-ZEGVKVD5.js';
5
5
  import { stripEmbeddedDomain, locToPath, inferPageType, isMalformedSitemapPath, resolveTrailingSlash, stripTrailingSlash, llmsWriteTimeoutMs, applyTrailingSlash } from './chunk-YVKRYQRG.js';
@@ -1,4 +1,4 @@
1
1
  // src/shared/version.ts
2
- var SITE_KIT_VERSION = "7.4.0";
2
+ var SITE_KIT_VERSION = "8.0.1";
3
3
 
4
4
  export { SITE_KIT_VERSION };