@sonordev/site-kit 6.1.0 → 6.1.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 (204) hide show
  1. package/agent-manifest.json +2 -2
  2. package/dist/{AnalyticsProvider-PO6SSJG2.mjs → AnalyticsProvider-33L4E6LO.mjs} +6 -6
  3. package/dist/{AnalyticsProvider-PO6SSJG2.mjs.map → AnalyticsProvider-33L4E6LO.mjs.map} +1 -1
  4. package/dist/{AnalyticsProvider-V6G45QG7.js → AnalyticsProvider-5G5AFHZN.js} +10 -10
  5. package/dist/{AnalyticsProvider-V6G45QG7.js.map → AnalyticsProvider-5G5AFHZN.js.map} +1 -1
  6. package/dist/{ArticleViewTracker-FE2YWHX4.js → ArticleViewTracker-U2KFUSZF.js} +6 -6
  7. package/dist/{ArticleViewTracker-FE2YWHX4.js.map → ArticleViewTracker-U2KFUSZF.js.map} +1 -1
  8. package/dist/{ArticleViewTracker-CML36HJZ.mjs → ArticleViewTracker-VZRMPK4S.mjs} +5 -5
  9. package/dist/{ArticleViewTracker-CML36HJZ.mjs.map → ArticleViewTracker-VZRMPK4S.mjs.map} +1 -1
  10. package/dist/ChatWidget-LH3QZYKR.mjs +16 -0
  11. package/dist/{ChatWidget-GVNDKGUU.mjs.map → ChatWidget-LH3QZYKR.mjs.map} +1 -1
  12. package/dist/ChatWidget-RUCQMCMN.js +25 -0
  13. package/dist/{ChatWidget-YL34KOZM.js.map → ChatWidget-RUCQMCMN.js.map} +1 -1
  14. package/dist/EngageWidget-34BQXU7K.mjs +12 -0
  15. package/dist/{EngageWidget-465O5XUV.mjs.map → EngageWidget-34BQXU7K.mjs.map} +1 -1
  16. package/dist/EngageWidget-X2CBW7DV.js +21 -0
  17. package/dist/{EngageWidget-IQRKRYPG.js.map → EngageWidget-X2CBW7DV.js.map} +1 -1
  18. package/dist/{FileField-F3PFKMIF.js → FileField-2MMV53BG.js} +6 -6
  19. package/dist/{FileField-F3PFKMIF.js.map → FileField-2MMV53BG.js.map} +1 -1
  20. package/dist/{FileField-FWKSBFRX.mjs → FileField-REUU36RJ.mjs} +5 -5
  21. package/dist/{FileField-FWKSBFRX.mjs.map → FileField-REUU36RJ.mjs.map} +1 -1
  22. package/dist/{FormSpotlight-DJQ3P3EX.js → FormSpotlight-Y27TPQ4G.js} +9 -9
  23. package/dist/{FormSpotlight-DJQ3P3EX.js.map → FormSpotlight-Y27TPQ4G.js.map} +1 -1
  24. package/dist/{FormSpotlight-K4LP2DMP.mjs → FormSpotlight-ZV3IS66K.mjs} +3 -3
  25. package/dist/{FormSpotlight-K4LP2DMP.mjs.map → FormSpotlight-ZV3IS66K.mjs.map} +1 -1
  26. package/dist/{FormStage-YKVTHPKV.mjs → FormStage-6NUGCDJR.mjs} +3 -3
  27. package/dist/{FormStage-YKVTHPKV.mjs.map → FormStage-6NUGCDJR.mjs.map} +1 -1
  28. package/dist/{FormStage-QMGZ3MOT.js → FormStage-K7Z6IEPM.js} +9 -9
  29. package/dist/{FormStage-QMGZ3MOT.js.map → FormStage-K7Z6IEPM.js.map} +1 -1
  30. package/dist/ManagedForm-EUDKMS5G.mjs +16 -0
  31. package/dist/{ManagedForm-P3L34ALG.mjs.map → ManagedForm-EUDKMS5G.mjs.map} +1 -1
  32. package/dist/ManagedForm-O67ILXN7.js +25 -0
  33. package/dist/{ManagedForm-MLPETHSQ.js.map → ManagedForm-O67ILXN7.js.map} +1 -1
  34. package/dist/{ManagedNewsletterForm-C5YQH7MP.mjs → ManagedNewsletterForm-IGWTZW7X.mjs} +7 -7
  35. package/dist/{ManagedNewsletterForm-C5YQH7MP.mjs.map → ManagedNewsletterForm-IGWTZW7X.mjs.map} +1 -1
  36. package/dist/{ManagedNewsletterForm-R4LLZBRQ.js → ManagedNewsletterForm-QBJODAIA.js} +8 -8
  37. package/dist/{ManagedNewsletterForm-R4LLZBRQ.js.map → ManagedNewsletterForm-QBJODAIA.js.map} +1 -1
  38. package/dist/{SignalCore-CLELIKFI.js → SignalCore-KQDRH44V.js} +11 -11
  39. package/dist/{SignalCore-CLELIKFI.js.map → SignalCore-KQDRH44V.js.map} +1 -1
  40. package/dist/{SignalCore-BNYNS6P7.mjs → SignalCore-UR4KVU5X.mjs} +5 -5
  41. package/dist/{SignalCore-BNYNS6P7.mjs.map → SignalCore-UR4KVU5X.mjs.map} +1 -1
  42. package/dist/SitemapSync-DQALPBTR.js +18 -0
  43. package/dist/{SitemapSync-P7XWL6VV.js.map → SitemapSync-DQALPBTR.js.map} +1 -1
  44. package/dist/SitemapSync-QYV3X5LH.mjs +9 -0
  45. package/dist/{SitemapSync-SIKJCK7N.mjs.map → SitemapSync-QYV3X5LH.mjs.map} +1 -1
  46. package/dist/analytics/index.js +9 -9
  47. package/dist/analytics/index.mjs +4 -4
  48. package/dist/articles/index.js +1 -1
  49. package/dist/articles/index.mjs +1 -1
  50. package/dist/articles/server-ui.js +1 -1
  51. package/dist/articles/server-ui.mjs +1 -1
  52. package/dist/{chunk-ESAPT5JT.mjs → chunk-22KPMJIQ.mjs} +3 -3
  53. package/dist/{chunk-ESAPT5JT.mjs.map → chunk-22KPMJIQ.mjs.map} +1 -1
  54. package/dist/{chunk-BDSNEB3O.mjs → chunk-3E7ZXPOB.mjs} +3 -3
  55. package/dist/{chunk-BDSNEB3O.mjs.map → chunk-3E7ZXPOB.mjs.map} +1 -1
  56. package/dist/{chunk-I4RU3RCS.js → chunk-3H3DTYFQ.js} +8 -8
  57. package/dist/{chunk-I4RU3RCS.js.map → chunk-3H3DTYFQ.js.map} +1 -1
  58. package/dist/{chunk-4EJI4IOX.mjs → chunk-3SHAY7PK.mjs} +14 -7
  59. package/dist/chunk-3SHAY7PK.mjs.map +1 -0
  60. package/dist/{chunk-DQXEYUTD.js → chunk-46GMNQWN.js} +3 -3
  61. package/dist/{chunk-DQXEYUTD.js.map → chunk-46GMNQWN.js.map} +1 -1
  62. package/dist/{chunk-ITVQV7DK.js → chunk-6K3YRSYN.js} +10 -10
  63. package/dist/{chunk-ITVQV7DK.js.map → chunk-6K3YRSYN.js.map} +1 -1
  64. package/dist/{chunk-RGCUND5Q.mjs → chunk-6ZMEJSNX.mjs} +4 -4
  65. package/dist/{chunk-RGCUND5Q.mjs.map → chunk-6ZMEJSNX.mjs.map} +1 -1
  66. package/dist/{chunk-OF4V7CSP.mjs → chunk-7DMAVD7W.mjs} +3 -3
  67. package/dist/{chunk-OF4V7CSP.mjs.map → chunk-7DMAVD7W.mjs.map} +1 -1
  68. package/dist/{chunk-RVFOUPK4.js → chunk-7IM7VG4E.js} +6 -6
  69. package/dist/{chunk-RVFOUPK4.js.map → chunk-7IM7VG4E.js.map} +1 -1
  70. package/dist/{chunk-QC6VQ2IW.mjs → chunk-7PCXI25T.mjs} +3 -3
  71. package/dist/{chunk-QC6VQ2IW.mjs.map → chunk-7PCXI25T.mjs.map} +1 -1
  72. package/dist/{chunk-6OSHL7H5.mjs → chunk-AG7MWWGP.mjs} +4 -4
  73. package/dist/{chunk-6OSHL7H5.mjs.map → chunk-AG7MWWGP.mjs.map} +1 -1
  74. package/dist/{chunk-KDNB6BYH.js → chunk-BRED7YSL.js} +11 -11
  75. package/dist/{chunk-KDNB6BYH.js.map → chunk-BRED7YSL.js.map} +1 -1
  76. package/dist/{chunk-KKTSAT7I.mjs → chunk-CJ5YPYAE.mjs} +4 -4
  77. package/dist/{chunk-KKTSAT7I.mjs.map → chunk-CJ5YPYAE.mjs.map} +1 -1
  78. package/dist/{chunk-YS7Y2PQG.js → chunk-D6VMDDQR.js} +8 -8
  79. package/dist/{chunk-YS7Y2PQG.js.map → chunk-D6VMDDQR.js.map} +1 -1
  80. package/dist/{chunk-YKNXBWPZ.mjs → chunk-DGWFHL35.mjs} +3 -3
  81. package/dist/{chunk-YKNXBWPZ.mjs.map → chunk-DGWFHL35.mjs.map} +1 -1
  82. package/dist/{chunk-AQUWWATH.js → chunk-EF7QCYLF.js} +4 -4
  83. package/dist/{chunk-AQUWWATH.js.map → chunk-EF7QCYLF.js.map} +1 -1
  84. package/dist/{chunk-L3GAEBJU.mjs → chunk-GZLMMX76.mjs} +3 -3
  85. package/dist/{chunk-L3GAEBJU.mjs.map → chunk-GZLMMX76.mjs.map} +1 -1
  86. package/dist/{chunk-Y53BIB7A.js → chunk-HH5EMIXK.js} +14 -14
  87. package/dist/{chunk-Y53BIB7A.js.map → chunk-HH5EMIXK.js.map} +1 -1
  88. package/dist/chunk-HQWPCX3N.mjs +6 -0
  89. package/dist/{chunk-ACKFL6WA.mjs.map → chunk-HQWPCX3N.mjs.map} +1 -1
  90. package/dist/{chunk-LF44SJPP.js → chunk-IPGIFBRN.js} +4 -4
  91. package/dist/{chunk-LF44SJPP.js.map → chunk-IPGIFBRN.js.map} +1 -1
  92. package/dist/{chunk-K4LLYQFZ.js → chunk-JZCG25XK.js} +14 -14
  93. package/dist/{chunk-K4LLYQFZ.js.map → chunk-JZCG25XK.js.map} +1 -1
  94. package/dist/{chunk-BGOPF6J2.js → chunk-ME5636V6.js} +3 -3
  95. package/dist/{chunk-BGOPF6J2.js.map → chunk-ME5636V6.js.map} +1 -1
  96. package/dist/{chunk-QF3XTEXV.js → chunk-MJTHYT3D.js} +4 -4
  97. package/dist/{chunk-QF3XTEXV.js.map → chunk-MJTHYT3D.js.map} +1 -1
  98. package/dist/{chunk-NMKUYGKK.mjs → chunk-MSSFRRXJ.mjs} +4 -4
  99. package/dist/{chunk-NMKUYGKK.mjs.map → chunk-MSSFRRXJ.mjs.map} +1 -1
  100. package/dist/{chunk-F6BYWNHU.mjs → chunk-MWX6QO7A.mjs} +3 -3
  101. package/dist/{chunk-F6BYWNHU.mjs.map → chunk-MWX6QO7A.mjs.map} +1 -1
  102. package/dist/{chunk-TMNFPVK5.js → chunk-NJSD5QY6.js} +7 -7
  103. package/dist/{chunk-TMNFPVK5.js.map → chunk-NJSD5QY6.js.map} +1 -1
  104. package/dist/{chunk-MZK5APTV.js → chunk-NK7ZWPAO.js} +18 -18
  105. package/dist/{chunk-MZK5APTV.js.map → chunk-NK7ZWPAO.js.map} +1 -1
  106. package/dist/{chunk-VK74LC4H.js → chunk-OB7K6EFK.js} +5 -5
  107. package/dist/{chunk-VK74LC4H.js.map → chunk-OB7K6EFK.js.map} +1 -1
  108. package/dist/{chunk-FQAZBJJO.mjs → chunk-OP42HO3Z.mjs} +3 -3
  109. package/dist/{chunk-FQAZBJJO.mjs.map → chunk-OP42HO3Z.mjs.map} +1 -1
  110. package/dist/{chunk-36NE4PSS.js → chunk-OTCJRVFJ.js} +3 -3
  111. package/dist/{chunk-36NE4PSS.js.map → chunk-OTCJRVFJ.js.map} +1 -1
  112. package/dist/{chunk-NDVKIDMN.js → chunk-OUZQL5PV.js} +4 -4
  113. package/dist/{chunk-NDVKIDMN.js.map → chunk-OUZQL5PV.js.map} +1 -1
  114. package/dist/chunk-QWUDHOUE.js +8 -0
  115. package/dist/{chunk-OXA4ZSX2.js.map → chunk-QWUDHOUE.js.map} +1 -1
  116. package/dist/{chunk-XKJLJLQ4.js → chunk-QYRJ4IQD.js} +25 -18
  117. package/dist/chunk-QYRJ4IQD.js.map +1 -0
  118. package/dist/{chunk-CJX2MC62.mjs → chunk-R2BHRDPZ.mjs} +3 -3
  119. package/dist/{chunk-CJX2MC62.mjs.map → chunk-R2BHRDPZ.mjs.map} +1 -1
  120. package/dist/{chunk-DXBSBWSS.js → chunk-S24WZNFP.js} +5 -5
  121. package/dist/{chunk-DXBSBWSS.js.map → chunk-S24WZNFP.js.map} +1 -1
  122. package/dist/{chunk-H5FCJBAN.mjs → chunk-U2DWXE2A.mjs} +3 -3
  123. package/dist/{chunk-H5FCJBAN.mjs.map → chunk-U2DWXE2A.mjs.map} +1 -1
  124. package/dist/{chunk-TA3TQTDA.mjs → chunk-U3SQBAUQ.mjs} +8 -8
  125. package/dist/{chunk-TA3TQTDA.mjs.map → chunk-U3SQBAUQ.mjs.map} +1 -1
  126. package/dist/{chunk-XGELGOF6.mjs → chunk-U577PJLH.mjs} +7 -7
  127. package/dist/{chunk-XGELGOF6.mjs.map → chunk-U577PJLH.mjs.map} +1 -1
  128. package/dist/{chunk-ZQJGCQHC.js → chunk-VNJTU6LG.js} +15 -15
  129. package/dist/{chunk-ZQJGCQHC.js.map → chunk-VNJTU6LG.js.map} +1 -1
  130. package/dist/{chunk-OQWAJBYA.mjs → chunk-VNSV5SY7.mjs} +3 -3
  131. package/dist/{chunk-OQWAJBYA.mjs.map → chunk-VNSV5SY7.mjs.map} +1 -1
  132. package/dist/{chunk-XOYQKFKI.mjs → chunk-VPZUQXZV.mjs} +4 -4
  133. package/dist/{chunk-XOYQKFKI.mjs.map → chunk-VPZUQXZV.mjs.map} +1 -1
  134. package/dist/{chunk-ZQSJK65K.mjs → chunk-WVNUOUQI.mjs} +3 -3
  135. package/dist/{chunk-ZQSJK65K.mjs.map → chunk-WVNUOUQI.mjs.map} +1 -1
  136. package/dist/{chunk-SDGS2R5O.js → chunk-WWJQGMMN.js} +12 -12
  137. package/dist/{chunk-SDGS2R5O.js.map → chunk-WWJQGMMN.js.map} +1 -1
  138. package/dist/{chunk-IDJY2JWU.js → chunk-Y4A4G5XJ.js} +5 -5
  139. package/dist/{chunk-IDJY2JWU.js.map → chunk-Y4A4G5XJ.js.map} +1 -1
  140. package/dist/{chunk-3DXJHMQM.mjs → chunk-YCA4KCRF.mjs} +3 -3
  141. package/dist/{chunk-3DXJHMQM.mjs.map → chunk-YCA4KCRF.mjs.map} +1 -1
  142. package/dist/{chunk-YP5WAFTI.mjs → chunk-YZMI7QQ2.mjs} +4 -4
  143. package/dist/{chunk-YP5WAFTI.mjs.map → chunk-YZMI7QQ2.mjs.map} +1 -1
  144. package/dist/cli/index.js +3 -3
  145. package/dist/cli/index.mjs +1 -1
  146. package/dist/client/index.js +4 -4
  147. package/dist/client/index.mjs +3 -3
  148. package/dist/commerce/index.js +57 -57
  149. package/dist/commerce/index.mjs +5 -5
  150. package/dist/cta-bar/CtaBar.d.ts +6 -3
  151. package/dist/cta-bar/CtaBar.d.ts.map +1 -1
  152. package/dist/cta-bar/index.js +3 -0
  153. package/dist/cta-bar/index.js.map +1 -1
  154. package/dist/cta-bar/index.mjs +3 -0
  155. package/dist/cta-bar/index.mjs.map +1 -1
  156. package/dist/cta-bar/styles.d.ts.map +1 -1
  157. package/dist/engage/ChatWidget.d.ts.map +1 -1
  158. package/dist/engage/index.js +10 -10
  159. package/dist/engage/index.mjs +7 -7
  160. package/dist/fleet/index.js +8 -8
  161. package/dist/fleet/index.mjs +4 -4
  162. package/dist/forms/index.js +16 -16
  163. package/dist/forms/index.mjs +9 -9
  164. package/dist/forms/server.js +10 -10
  165. package/dist/forms/server.mjs +8 -8
  166. package/dist/forms/static.js +7 -7
  167. package/dist/forms/static.mjs +6 -6
  168. package/dist/images/index.js +11 -11
  169. package/dist/images/index.mjs +4 -4
  170. package/dist/index.js +63 -63
  171. package/dist/index.mjs +9 -9
  172. package/dist/layout/client.js +8 -8
  173. package/dist/layout/client.mjs +7 -7
  174. package/dist/layout/index.js +10 -10
  175. package/dist/layout/index.mjs +8 -8
  176. package/dist/maps/index.js +5 -5
  177. package/dist/maps/index.mjs +3 -3
  178. package/dist/search/index.js +4 -4
  179. package/dist/search/index.mjs +3 -3
  180. package/dist/seo/client.js +5 -5
  181. package/dist/seo/client.mjs +4 -4
  182. package/dist/seo/index.js +5 -5
  183. package/dist/seo/index.mjs +4 -4
  184. package/dist/server/index.js +3 -3
  185. package/dist/server/index.mjs +2 -2
  186. package/dist/shared/version.d.ts +1 -1
  187. package/dist/signal/index.js +11 -11
  188. package/dist/signal/index.mjs +2 -2
  189. package/dist/sync/index.js +17 -17
  190. package/dist/sync/index.mjs +4 -4
  191. package/package.json +1 -1
  192. package/skills/site-kit/SKILL.md +3 -2
  193. package/dist/ChatWidget-GVNDKGUU.mjs +0 -16
  194. package/dist/ChatWidget-YL34KOZM.js +0 -25
  195. package/dist/EngageWidget-465O5XUV.mjs +0 -12
  196. package/dist/EngageWidget-IQRKRYPG.js +0 -21
  197. package/dist/ManagedForm-MLPETHSQ.js +0 -25
  198. package/dist/ManagedForm-P3L34ALG.mjs +0 -16
  199. package/dist/SitemapSync-P7XWL6VV.js +0 -18
  200. package/dist/SitemapSync-SIKJCK7N.mjs +0 -9
  201. package/dist/chunk-4EJI4IOX.mjs.map +0 -1
  202. package/dist/chunk-ACKFL6WA.mjs +0 -6
  203. package/dist/chunk-OXA4ZSX2.js +0 -8
  204. package/dist/chunk-XKJLJLQ4.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/forms/field-controls.ts","../src/forms/experience-plan.ts"],"names":["useMemo","useState","useRef","useEffect","isDisplayOnly","isEmptyValue"],"mappings":";;;;;AAqCA,IAAM,cAA6B,EAAC;AAE7B,SAAS,iBAAiB,MAAA,EAAoD;AACnF,EAAA,MAAM,SAAA,GAAYA,aAAA;AAAA,IAChB,MAAA,CAAO,MAAA,IAAU,EAAC,EAAG,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,UAAA,KAAe,MAAA,IAAU,CAAA,CAAE,UAAA,KAAe,UAAU,CAAA;AAAA,IACvF,CAAC,MAAM;AAAA,GACT;AACA,EAAA,MAAM,SAAA,GAAYA,aAAA;AAAA,IAChB,MAAA,CAAO,UAAU,EAAC,EAAG,KAAK,CAAC,CAAA,KAAM,CAAA,CAAE,UAAA,KAAe,MAAM,CAAA;AAAA,IACxD,CAAC,MAAM;AAAA,GACT;AAEA,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAIC,eAAwB,WAAW,CAAA;AAEnE,EAAA,MAAM,YAAYC,YAAA,CAAO,EAAE,MAAM,KAAA,EAAO,IAAA,EAAM,OAAO,CAAA;AAErD,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,IAAI,SAAA,GAAY,KAAA;AAEhB,IAAA,IAAI,SAAA,IAAa,CAAC,SAAA,CAAU,OAAA,CAAQ,IAAA,EAAM;AACxC,MAAA,SAAA,CAAU,QAAQ,IAAA,GAAO,IAAA;AACzB,MAAA,OAAO,0BA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CAAE,MAAA;AAChC;AAMO,SAAS,cAAc,aAAA,EAA+B;AAC3D,EAAA,MAAM,UAAU,aAAA,GAAgB,CAAA;AAChC,EAAA,IAAI,OAAA,GAAU,EAAA,EAAI,OAAO,CAAA,MAAA,EAAS,IAAA,CAAK,GAAA,CAAI,EAAA,EAAI,IAAA,CAAK,IAAA,CAAK,OAAA,GAAU,CAAC,CAAA,GAAI,CAAC,CAAC,CAAA,QAAA,CAAA;AAC1E,EAAA,IAAI,OAAA,IAAW,IAAI,OAAO,gBAAA;AAC1B,EAAA,OAAO,CAAA,MAAA,EAAS,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAC,CAAA,QAAA,CAAA;AAC1C;AAGO,SAAS,eAAe,KAAA,EAA+B;AAC5D,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,EAAU,OAAO,IAAA;AACtC,EAAA,MAAM,QAAQ,KAAA,CAAM,IAAA,GAAO,KAAA,CAAM,KAAK,EAAE,CAAC,CAAA;AACzC,EAAA,IAAI,CAAC,KAAA,IAAS,KAAA,CAAM,MAAA,GAAS,IAAI,OAAO,IAAA;AACxC,EAAA,OAAO,KAAA;AACT;AAEO,SAAS,aAAa,KAAA,EAA+B;AAC1D,EAAA,IAAIC,6BAAA,CAAa,KAAK,CAAA,EAAG,OAAO,IAAA;AAChC,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EAAG,OAAO,MAAM,GAAA,CAAI,MAAM,CAAA,CAAE,IAAA,CAAK,IAAI,CAAA;AAC5D,EAAA,IAAI,OAAO,KAAA,KAAU,SAAA,EAAW,OAAO,QAAQ,KAAA,GAAQ,IAAA;AACvD,EAAA,OAAO,OAAO,KAAK,CAAA;AACrB;AAGO,IAAM,kBAAA,GAAqB,CAAC,OAAA,EAAS,QAAA,EAAU,QAAQ","file":"chunk-36NE4PSS.js","sourcesContent":["'use client'\n\n/**\n * The field controls that need React hooks, loaded only when a form actually\n * has a field that uses them.\n *\n * FormField deliberately does NOT import these. DatePicker carries 17 hooks\n * and FileField holds upload state; importing them there put both in\n * FormField's chunk, which the build stamps `'use client'` — so a Server\n * Component rendering a single text input shipped 38 KB of date picker to the\n * browser. Injecting them from the client side keeps FormField hook-free and\n * therefore server-renderable, which is the whole basis of StaticForm.\n *\n * Injection alone still put both controls in the forms entry's eager graph,\n * because a module-level constant referencing them is a static import: every\n * form paid for the date picker, and most forms have no date field. They are\n * now fetched on demand, per control, from the field list.\n *\n * The wait costs nothing visually. FormField already renders the native\n * control when a control is absent (static mode does exactly this), so a date\n * field paints as `<input type=\"date\">` and upgrades in place when the chunk\n * lands — the same enhancement path a no-JS visitor never leaves.\n *\n * Every client renderer of <FormField> (FormClient, FormSpotlight, FormStage)\n * calls this hook, so the experiences and the classic form always offer\n * identical controls.\n */\n\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport type { FormField as FormFieldType } from './types'\n\nexport interface FieldControls {\n Date?: React.ComponentType<any>\n File?: React.ComponentType<any>\n}\n\n/** Stable identity for the common case (no date, no file) — no render churn. */\nconst NO_CONTROLS: FieldControls = {}\n\nexport function useFieldControls(fields: FormFieldType[] | undefined): FieldControls {\n const needsDate = useMemo(\n () => (fields ?? []).some((f) => f.field_type === 'date' || f.field_type === 'datetime'),\n [fields],\n )\n const needsFile = useMemo(\n () => (fields ?? []).some((f) => f.field_type === 'file'),\n [fields],\n )\n\n const [controls, setControls] = useState<FieldControls>(NO_CONTROLS)\n // Guards re-import when a conditional field toggles visibility mid-fill.\n const requested = useRef({ date: false, file: false })\n\n useEffect(() => {\n let cancelled = false\n\n if (needsDate && !requested.current.date) {\n requested.current.date = true\n import('./DatePicker')\n .then((m) => {\n if (!cancelled) setControls((prev) => ({ ...prev, Date: m.DatePicker }))\n })\n .catch(() => {\n // Chunk never arrived — the native date input stays, which submits\n // the same value. A failed fetch must not cost the lead.\n requested.current.date = false\n })\n }\n\n if (needsFile && !requested.current.file) {\n requested.current.file = true\n import('./FileField')\n .then((m) => {\n if (!cancelled) setControls((prev) => ({ ...prev, File: m.FileField }))\n })\n .catch(() => {\n requested.current.file = false\n })\n }\n\n return () => {\n cancelled = true\n }\n }, [needsDate, needsFile])\n\n return controls\n}\n","/**\n * Shared planning helpers for the alternate form experiences (stage,\n * spotlight). Pure data — no React, no CSS — so FormClient can import the\n * counts it needs for tracking WITHOUT pulling an experience component (and\n * its stylesheet) into every site's forms bundle. The components themselves\n * are lazy-loaded; this module is the only part that ships eagerly.\n */\n\nimport type {\n FormField as FormFieldType,\n FormStep,\n ManagedFormConfig,\n} from './types'\n// Display-only types are never staged; what counts as empty is shared with\n// validation. Both live in field-rules.ts.\nimport { isDisplayOnly, isEmptyValue } from './field-rules'\n\nexport interface StageQuestion {\n field: FormFieldType\n /** The step (chapter) this question belongs to, when the form is multi-step. */\n step?: FormStep\n}\n\nexport interface StageView {\n fields: FormFieldType[]\n step?: FormStep\n}\n\n/**\n * Flatten a form into its ordered question list. Steps become chapters:\n * multi-step forms iterate steps in step_number order (fields are already\n * sorted by sort_order via normalizeFormConfig); stepless fields trail.\n */\nexport function stageQuestions(config: ManagedFormConfig): StageQuestion[] {\n const input = (config.fields || []).filter(\n (f) => !isDisplayOnly(f),\n )\n if (!config.is_multi_step || !config.steps?.length) {\n return input.map((field) => ({ field }))\n }\n const ordered = [...config.steps].sort((a, b) => a.step_number - b.step_number)\n const out: StageQuestion[] = []\n const claimed = new Set<string>()\n for (const step of ordered) {\n for (const field of input) {\n if (field.step_id === step.id) {\n out.push({ field, step })\n claimed.add(field.id)\n }\n }\n }\n for (const field of input) {\n if (!claimed.has(field.id)) out.push({ field })\n }\n return out\n}\n\nconst WIDTH_FRACTION: Record<string, number> = {\n full: 1,\n half: 1 / 2,\n third: 1 / 3,\n quarter: 1 / 4,\n}\n\n/**\n * Group questions into beats using the classic grid's own row math:\n * consecutive sub-full-width fields fill a row (2 halves, 3 thirds...) and\n * that row is one beat; a full-width field closes any open row and stands\n * alone; a chapter change always starts a fresh beat.\n */\nexport function stageViews(config: ManagedFormConfig): StageView[] {\n const questions = stageQuestions(config)\n const views: StageView[] = []\n let open: StageView | null = null\n let openWidth = 0\n\n const close = () => {\n if (open) views.push(open)\n open = null\n openWidth = 0\n }\n\n for (const q of questions) {\n const fraction = WIDTH_FRACTION[q.field.width] ?? 1\n const chapterChanged = open && open.step?.id !== q.step?.id\n if (fraction >= 1 || chapterChanged) close()\n if (!open) {\n open = { fields: [q.field], step: q.step }\n openWidth = fraction\n if (fraction >= 1) close()\n continue\n }\n if (openWidth + fraction > 1.0001) close()\n if (!open) {\n open = { fields: [q.field], step: q.step }\n openWidth = fraction\n continue\n }\n open.fields.push(q.field)\n openWidth += fraction\n }\n close()\n return views\n}\n\nexport function countStageViews(config: ManagedFormConfig): number {\n return stageViews(config).length\n}\n\nexport function countStageQuestions(config: ManagedFormConfig): number {\n return stageQuestions(config).length\n}\n\n/**\n * Honest, friendly time estimate: \"about 40 seconds\".\n * ~8s per question, rounded to something a human would actually say.\n */\nexport function stageEstimate(questionCount: number): string {\n const seconds = questionCount * 8\n if (seconds < 50) return `about ${Math.max(15, Math.ceil(seconds / 5) * 5)} seconds`\n if (seconds <= 90) return 'about a minute'\n return `about ${Math.round(seconds / 60)} minutes`\n}\n\n/** First name for the greeting — conservative: short, single token, else null. */\nexport function stageFirstName(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const token = value.trim().split(/\\s+/)[0]\n if (!token || token.length > 24) return null\n return token\n}\n\nexport function formatAnswer(value: unknown): string | null {\n if (isEmptyValue(value)) return null\n if (Array.isArray(value)) return value.map(String).join(', ')\n if (typeof value === 'boolean') return value ? 'Yes' : 'No'\n return String(value)\n}\n\n/** Single-select types where picking an answer advances after a lock-in beat. */\nexport const AUTO_ADVANCE_TYPES = ['radio', 'select', 'rating']\n"]}
1
+ {"version":3,"sources":["../src/forms/field-controls.ts","../src/forms/experience-plan.ts"],"names":["useMemo","useState","useRef","useEffect","isDisplayOnly","isEmptyValue"],"mappings":";;;;;AAqCA,IAAM,c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CAAA,QAAA,CAAA;AAC1C;AAGO,SAAS,eAAe,KAAA,EAA+B;AAC5D,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,EAAU,OAAO,IAAA;AACtC,EAAA,MAAM,QAAQ,KAAA,CAAM,IAAA,GAAO,KAAA,CAAM,KAAK,EAAE,CAAC,CAAA;AACzC,EAAA,IAAI,CAAC,KAAA,IAAS,KAAA,CAAM,MAAA,GAAS,IAAI,OAAO,IAAA;AACxC,EAAA,OAAO,KAAA;AACT;AAEO,SAAS,aAAa,KAAA,EAA+B;AAC1D,EAAA,IAAIC,6BAAA,CAAa,KAAK,CAAA,EAAG,OAAO,IAAA;AAChC,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EAAG,OAAO,MAAM,GAAA,CAAI,MAAM,CAAA,CAAE,IAAA,CAAK,IAAI,CAAA;AAC5D,EAAA,IAAI,OAAO,KAAA,KAAU,SAAA,EAAW,OAAO,QAAQ,KAAA,GAAQ,IAAA;AACvD,EAAA,OAAO,OAAO,KAAK,CAAA;AACrB;AAGO,IAAM,kBAAA,GAAqB,CAAC,OAAA,EAAS,QAAA,EAAU,QAAQ","file":"chunk-OTCJRVFJ.js","sourcesContent":["'use client'\n\n/**\n * The field controls that need React hooks, loaded only when a form actually\n * has a field that uses them.\n *\n * FormField deliberately does NOT import these. DatePicker carries 17 hooks\n * and FileField holds upload state; importing them there put both in\n * FormField's chunk, which the build stamps `'use client'` — so a Server\n * Component rendering a single text input shipped 38 KB of date picker to the\n * browser. Injecting them from the client side keeps FormField hook-free and\n * therefore server-renderable, which is the whole basis of StaticForm.\n *\n * Injection alone still put both controls in the forms entry's eager graph,\n * because a module-level constant referencing them is a static import: every\n * form paid for the date picker, and most forms have no date field. They are\n * now fetched on demand, per control, from the field list.\n *\n * The wait costs nothing visually. FormField already renders the native\n * control when a control is absent (static mode does exactly this), so a date\n * field paints as `<input type=\"date\">` and upgrades in place when the chunk\n * lands — the same enhancement path a no-JS visitor never leaves.\n *\n * Every client renderer of <FormField> (FormClient, FormSpotlight, FormStage)\n * calls this hook, so the experiences and the classic form always offer\n * identical controls.\n */\n\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport type { FormField as FormFieldType } from './types'\n\nexport interface FieldControls {\n Date?: React.ComponentType<any>\n File?: React.ComponentType<any>\n}\n\n/** Stable identity for the common case (no date, no file) — no render churn. */\nconst NO_CONTROLS: FieldControls = {}\n\nexport function useFieldControls(fields: FormFieldType[] | undefined): FieldControls {\n const needsDate = useMemo(\n () => (fields ?? []).some((f) => f.field_type === 'date' || f.field_type === 'datetime'),\n [fields],\n )\n const needsFile = useMemo(\n () => (fields ?? []).some((f) => f.field_type === 'file'),\n [fields],\n )\n\n const [controls, setControls] = useState<FieldControls>(NO_CONTROLS)\n // Guards re-import when a conditional field toggles visibility mid-fill.\n const requested = useRef({ date: false, file: false })\n\n useEffect(() => {\n let cancelled = false\n\n if (needsDate && !requested.current.date) {\n requested.current.date = true\n import('./DatePicker')\n .then((m) => {\n if (!cancelled) setControls((prev) => ({ ...prev, Date: m.DatePicker }))\n })\n .catch(() => {\n // Chunk never arrived — the native date input stays, which submits\n // the same value. A failed fetch must not cost the lead.\n requested.current.date = false\n })\n }\n\n if (needsFile && !requested.current.file) {\n requested.current.file = true\n import('./FileField')\n .then((m) => {\n if (!cancelled) setControls((prev) => ({ ...prev, File: m.FileField }))\n })\n .catch(() => {\n requested.current.file = false\n })\n }\n\n return () => {\n cancelled = true\n }\n }, [needsDate, needsFile])\n\n return controls\n}\n","/**\n * Shared planning helpers for the alternate form experiences (stage,\n * spotlight). Pure data — no React, no CSS — so FormClient can import the\n * counts it needs for tracking WITHOUT pulling an experience component (and\n * its stylesheet) into every site's forms bundle. The components themselves\n * are lazy-loaded; this module is the only part that ships eagerly.\n */\n\nimport type {\n FormField as FormFieldType,\n FormStep,\n ManagedFormConfig,\n} from './types'\n// Display-only types are never staged; what counts as empty is shared with\n// validation. Both live in field-rules.ts.\nimport { isDisplayOnly, isEmptyValue } from './field-rules'\n\nexport interface StageQuestion {\n field: FormFieldType\n /** The step (chapter) this question belongs to, when the form is multi-step. */\n step?: FormStep\n}\n\nexport interface StageView {\n fields: FormFieldType[]\n step?: FormStep\n}\n\n/**\n * Flatten a form into its ordered question list. Steps become chapters:\n * multi-step forms iterate steps in step_number order (fields are already\n * sorted by sort_order via normalizeFormConfig); stepless fields trail.\n */\nexport function stageQuestions(config: ManagedFormConfig): StageQuestion[] {\n const input = (config.fields || []).filter(\n (f) => !isDisplayOnly(f),\n )\n if (!config.is_multi_step || !config.steps?.length) {\n return input.map((field) => ({ field }))\n }\n const ordered = [...config.steps].sort((a, b) => a.step_number - b.step_number)\n const out: StageQuestion[] = []\n const claimed = new Set<string>()\n for (const step of ordered) {\n for (const field of input) {\n if (field.step_id === step.id) {\n out.push({ field, step })\n claimed.add(field.id)\n }\n }\n }\n for (const field of input) {\n if (!claimed.has(field.id)) out.push({ field })\n }\n return out\n}\n\nconst WIDTH_FRACTION: Record<string, number> = {\n full: 1,\n half: 1 / 2,\n third: 1 / 3,\n quarter: 1 / 4,\n}\n\n/**\n * Group questions into beats using the classic grid's own row math:\n * consecutive sub-full-width fields fill a row (2 halves, 3 thirds...) and\n * that row is one beat; a full-width field closes any open row and stands\n * alone; a chapter change always starts a fresh beat.\n */\nexport function stageViews(config: ManagedFormConfig): StageView[] {\n const questions = stageQuestions(config)\n const views: StageView[] = []\n let open: StageView | null = null\n let openWidth = 0\n\n const close = () => {\n if (open) views.push(open)\n open = null\n openWidth = 0\n }\n\n for (const q of questions) {\n const fraction = WIDTH_FRACTION[q.field.width] ?? 1\n const chapterChanged = open && open.step?.id !== q.step?.id\n if (fraction >= 1 || chapterChanged) close()\n if (!open) {\n open = { fields: [q.field], step: q.step }\n openWidth = fraction\n if (fraction >= 1) close()\n continue\n }\n if (openWidth + fraction > 1.0001) close()\n if (!open) {\n open = { fields: [q.field], step: q.step }\n openWidth = fraction\n continue\n }\n open.fields.push(q.field)\n openWidth += fraction\n }\n close()\n return views\n}\n\nexport function countStageViews(config: ManagedFormConfig): number {\n return stageViews(config).length\n}\n\nexport function countStageQuestions(config: ManagedFormConfig): number {\n return stageQuestions(config).length\n}\n\n/**\n * Honest, friendly time estimate: \"about 40 seconds\".\n * ~8s per question, rounded to something a human would actually say.\n */\nexport function stageEstimate(questionCount: number): string {\n const seconds = questionCount * 8\n if (seconds < 50) return `about ${Math.max(15, Math.ceil(seconds / 5) * 5)} seconds`\n if (seconds <= 90) return 'about a minute'\n return `about ${Math.round(seconds / 60)} minutes`\n}\n\n/** First name for the greeting — conservative: short, single token, else null. */\nexport function stageFirstName(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const token = value.trim().split(/\\s+/)[0]\n if (!token || token.length > 24) return null\n return token\n}\n\nexport function formatAnswer(value: unknown): string | null {\n if (isEmptyValue(value)) return null\n if (Array.isArray(value)) return value.map(String).join(', ')\n if (typeof value === 'boolean') return value ? 'Yes' : 'No'\n return String(value)\n}\n\n/** Single-select types where picking an answer advances after a lock-in beat. */\nexport const AUTO_ADVANCE_TYPES = ['radio', 'select', 'rating']\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkAQUWWATH_js = require('./chunk-AQUWWATH.js');
3
+ var chunkEF7QCYLF_js = require('./chunk-EF7QCYLF.js');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
 
6
6
  function HoneypotField({ name, value, onChange }) {
@@ -46,7 +46,7 @@ function nativeEligible(config) {
46
46
  }
47
47
  function nativeFormProps(config) {
48
48
  if (!nativeEligible(config)) return {};
49
- const { apiUrl } = chunkAQUWWATH_js.getApiConfig();
49
+ const { apiUrl } = chunkEF7QCYLF_js.getApiConfig();
50
50
  return { action: `${apiUrl}/api/public/forms/submit-native`, method: "post" };
51
51
  }
52
52
  function NativeFallbackFields({ config, returnTo }) {
@@ -60,5 +60,5 @@ function NativeFallbackFields({ config, returnTo }) {
60
60
  exports.HoneypotField = HoneypotField;
61
61
  exports.NativeFallbackFields = NativeFallbackFields;
62
62
  exports.nativeFormProps = nativeFormProps;
63
- //# sourceMappingURL=chunk-NDVKIDMN.js.map
64
- //# sourceMappingURL=chunk-NDVKIDMN.js.map
63
+ //# sourceMappingURL=chunk-OUZQL5PV.js.map
64
+ //# sourceMappingURL=chunk-OUZQL5PV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/forms/HoneypotField.tsx","../src/forms/native-fallback.tsx"],"names":["jsx","getApiConfig","jsxs","Fragment"],"mappings":";;;;;AAqCO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAM,KAAA,EAAO,UAAS,EAAuB;AAC3E,EAAA,MAAM,WAAA,GAAc,OAAO,QAAA,KAAa,UAAA;AACxC,EAAA,uBACEA,cAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,MAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA,EAAU,EAAA;AAAA,MACV,YAAA,EAAa,cAAA;AAAA,MACb,aAAA,EAAY,MAAA;AAAA,MACZ,KAAA,EAAK,IAAA;AAAA,MACL,kBAAA,EAAiB,EAAA;AAAA,MAGjB,gBAAA,EAAe,EAAA;AAAA,MACf,eAAA,EAAc,MAAA;AAAA,MACd,gBAAA,EAAe,OAAA;AAAA,MACf,eAAA,EAAc,EAAA;AAAA,MACd,KAAA,EAAO;AAAA,QACL,QAAA,EAAU,UAAA;AAAA,QACV,IAAA,EAAM,KAAA;AAAA,QACN,KAAA,EAAO,CAAA;AAAA,QACP,MAAA,EAAQ,CAAA;AAAA,QACR,QAAA,EAAU,QAAA;AAAA,QACV,OAAA,EAAS,CAAA;AAAA,QACT,UAAA,EAAY,QAAA;AAAA,QACZ,aAAA,EAAe;AAAA,OACjB;AAAA,MACC,GAAI,WAAA,GACD;AAAA,QACE,OAAO,KAAA,IAAS,EAAA;AAAA,QAChB,QAAA,EAAU,CAAC,CAAA,KAA2C;AACpD,UAAA,QAAA,CAAU,CAAA,CAAE,OAAO,KAAK,CAAA;AACxB,UAAA,IAAI,CAAA,CAAE,OAAO,KAAA,EAAO;AAElB,YAAA,OAAA,CAAQ,KAAK,4BAA4B,CAAA;AAAA,UAC3C;AAAA,QACF;AAAA,OACF,GACA,EAAE,YAAA,EAAc,EAAA;AAAG;AAAA,GACzB;AAEJ;ACjDA,SAAS,eAAe,MAAA,EAAuD;AAC7E,EAAA,OAAO,CAAC,CAAC,MAAA,EAAQ,YAAA,IAAgB,CAAC,MAAA,CAAO,aAAA;AAC3C;AAGO,SAAS,gBACd,MAAA,EACsC;AACtC,EAAA,IAAI,CAAC,cAAA,CAAe,MAAM,CAAA,SAAU,EAAC;AACrC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAIC,6BAAA,EAAa;AAChC,EAAA,OAAO,EAAE,MAAA,EAAQ,CAAA,EAAG,MAAM,CAAA,+BAAA,CAAA,EAAmC,QAAQ,MAAA,EAAO;AAC9E;AAaO,SAAS,oBAAA,CAAqB,EAAE,MAAA,EAAQ,QAAA,EAAS,EAA8B;AACpF,EAAA,IAAI,CAAC,cAAA,CAAe,MAAM,CAAA,EAAG,OAAO,IAAA;AACpC,EAAA,uBACEC,eAAA,CAAAC,mBAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAAH,cAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,aAAY,KAAA,EAAO,MAAA,CAAQ,YAAA,EAAc,QAAA,EAAQ,IAAA,EAAC,CAAA;AAAA,IAC3E,QAAA,mBAAWA,cAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,YAAA,EAAa,KAAA,EAAO,QAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,CAAA,GAAK;AAAA,GAAA,EACpF,CAAA;AAEJ","file":"chunk-NDVKIDMN.js","sourcesContent":["/**\n * Single source of truth for the honeypot input — rendered by BOTH form\n * experiences (classic and stage) inside their <form>. The customRender path\n * deliberately gets none (documented limitation: custom renders lose the\n * honeypot, which is why alternate experiences must be render branches).\n *\n * Invariants (do not weaken any of these):\n * - `inert` blocks focus/interaction at the browser level, surviving hostile\n * site CSS that could defeat the inline styles.\n * - data-sk-honeypot gives site CSS a stable opt-OUT hook.\n * - Controlled input: bots filling via JS still fire React onChange, so the\n * value reaches submitForm's data payload.\n * - Name comes from config (`honeypot_field || DEFAULT_HONEYPOT_FIELD` from\n * the shared contract) — resolved by the caller, never forked here.\n * - The trap must be invisible to AUTOFILL as well as to people. A browser or\n * password manager filling a hidden input flags a real visitor as a bot, and\n * because the value is stripped server-side the mistake is undiagnosable\n * after the fact. `autocomplete=\"off\"` does not achieve this — it is the one\n * value Chrome deliberately ignores for contact/address autofill — so the\n * trap declares `new-password` (never offered saved contact data) plus the\n * documented per-manager opt-outs.\n */\n\nimport React from 'react'\n\nexport interface HoneypotFieldProps {\n name: string\n value?: string\n /**\n * Omit for STATIC mode — an uncontrolled trap a Server Component can render.\n * The trap's whole job is server-side (the value is read off the submission\n * and stripped), so it needs no client state to work; the controlled form is\n * only so the hydrated JSON path can read it back out of React state.\n */\n onChange?: (value: string) => void\n}\n\nexport function HoneypotField({ name, value, onChange }: HoneypotFieldProps) {\n const interactive = typeof onChange === 'function'\n return (\n <input\n type=\"text\"\n name={name}\n tabIndex={-1}\n autoComplete=\"new-password\"\n aria-hidden=\"true\"\n inert\n data-sk-honeypot=\"\"\n // Password-manager opt-outs: 1Password, LastPass, Dashlane, Bitwarden.\n // Each ignores its own attribute; none respects autocomplete alone.\n data-1p-ignore=\"\"\n data-lpignore=\"true\"\n data-form-type=\"other\"\n data-bwignore=\"\"\n style={{\n position: 'absolute',\n left: -9999,\n width: 1,\n height: 1,\n overflow: 'hidden',\n opacity: 0,\n visibility: 'hidden',\n pointerEvents: 'none',\n }}\n {...(interactive\n ? {\n value: value ?? '',\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange!(e.target.value)\n if (e.target.value) {\n // Bot detected\n console.warn('[Forms] Honeypot triggered')\n }\n },\n }\n : { defaultValue: '' })}\n />\n )\n}\n","'use client'\n\n/**\n * No-JS native submission fallback — the floor under every managed form.\n *\n * The classic form is the SSR/no-JS surface (experiences are post-hydration\n * chunks), so it alone carries a real `action`/`method` pointing at\n * sonor-api's POST /api/public/forms/submit-native. With JS running, the\n * form's onSubmit preventDefault()s and the JSON path wins; without JS the\n * browser performs an ordinary form-encoded POST and the lead still lands.\n *\n * Auth rides in the hidden `_sk_token` field: a signed, single-purpose\n * credential minted by the api-key-authenticated forms/config endpoint\n * (`native_token` in the response). No token in the config (older API, or no\n * signing secret) means no fallback — the form keeps its historical behavior\n * rather than pointing at an endpoint that will reject it.\n *\n * Multi-step forms are excluded: step navigation is JS, and a native POST of\n * step-1 fields alone fails whole-form validation server-side. Single-step\n * forms are the overwhelming lead-capture case.\n *\n * Single source of truth for the gating — the form attrs and the hidden\n * fields must always agree, so both read the same predicate.\n */\n\nimport React from 'react'\nimport type { ManagedFormConfig } from './types'\nimport { getApiConfig } from './submitForm'\n\nfunction nativeEligible(config: ManagedFormConfig | null | undefined): boolean {\n return !!config?.native_token && !config.is_multi_step\n}\n\n/** `action`/`method` for the classic <form> — empty when ineligible. */\nexport function nativeFormProps(\n config: ManagedFormConfig | null | undefined,\n): { action?: string; method?: 'post' } {\n if (!nativeEligible(config)) return {}\n const { apiUrl } = getApiConfig()\n return { action: `${apiUrl}/api/public/forms/submit-native`, method: 'post' }\n}\n\nexport interface NativeFallbackFieldsProps {\n config: ManagedFormConfig | null | undefined\n /**\n * Absolute URL the native 303 should land on (usually the page hosting the\n * form). Optional — without it the server falls back to the Referer origin,\n * which loses the path but still returns the visitor to the right site.\n */\n returnTo?: string\n}\n\n/** Hidden control fields the native endpoint reads (`_sk_*` namespace). */\nexport function NativeFallbackFields({ config, returnTo }: NativeFallbackFieldsProps) {\n if (!nativeEligible(config)) return null\n return (\n <>\n <input type=\"hidden\" name=\"_sk_token\" value={config!.native_token} readOnly />\n {returnTo ? <input type=\"hidden\" name=\"_sk_return\" value={returnTo} readOnly /> : null}\n </>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/forms/HoneypotField.tsx","../src/forms/native-fallback.tsx"],"names":["jsx","getApiConfig","jsxs","Fragment"],"mappings":";;;;;AAqCO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAM,KAAA,EAAO,UAAS,EAAuB;AAC3E,EAAA,MAAM,WAAA,GAAc,OAAO,QAAA,KAAa,UAAA;AACxC,EAAA,uBACEA,cAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,MAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA,EAAU,EAAA;AAAA,MACV,YAAA,EAAa,cAAA;AAAA,MACb,aAAA,EAAY,MAAA;AAAA,MACZ,KAAA,EAAK,IAAA;AAAA,MACL,kBAAA,EAAiB,EAAA;AAAA,MAGjB,gBAAA,EAAe,EAAA;AAAA,MACf,eAAA,EAAc,MAAA;AAAA,MACd,gBAAA,EAAe,OAAA;AAAA,MACf,eAAA,EAAc,EAAA;AAAA,MACd,KAAA,EAAO;AAAA,QACL,QAAA,EAAU,UAAA;AAAA,QACV,IAAA,EAAM,KAAA;AAAA,QACN,KAAA,EAAO,CAAA;AAAA,QACP,MAAA,EAAQ,CAAA;AAAA,QACR,QAAA,EAAU,QAAA;AAAA,QACV,OAAA,EAAS,CAAA;AAAA,QACT,UAAA,EAAY,QAAA;AAAA,QACZ,aAAA,EAAe;AAAA,OACjB;AAAA,MACC,GAAI,WAAA,GACD;AAAA,QACE,OAAO,KAAA,IAAS,EAAA;AAAA,QAChB,QAAA,EAAU,CAAC,CAAA,KAA2C;AACpD,UAAA,QAAA,CAAU,CAAA,CAAE,OAAO,KAAK,CAAA;AACxB,UAAA,IAAI,CAAA,CAAE,OAAO,KAAA,EAAO;AAElB,YAAA,OAAA,CAAQ,KAAK,4BAA4B,CAAA;AAAA,UAC3C;AAAA,QACF;AAAA,OACF,GACA,EAAE,YAAA,EAAc,EAAA;AAAG;AAAA,GACzB;AAEJ;ACjDA,SAAS,eAAe,MAAA,EAAuD;AAC7E,EAAA,OAAO,CAAC,CAAC,MAAA,EAAQ,YAAA,IAAgB,CAAC,MAAA,CAAO,aAAA;AAC3C;AAGO,SAAS,gBACd,MAAA,EACsC;AACtC,EAAA,IAAI,CAAC,cAAA,CAAe,MAAM,CAAA,SAAU,EAAC;AACrC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAIC,6BAAA,EAAa;AAChC,EAAA,OAAO,EAAE,MAAA,EAAQ,CAAA,EAAG,MAAM,CAAA,+BAAA,CAAA,EAAmC,QAAQ,MAAA,EAAO;AAC9E;AAaO,SAAS,oBAAA,CAAqB,EAAE,MAAA,EAAQ,QAAA,EAAS,EAA8B;AACpF,EAAA,IAAI,CAAC,cAAA,CAAe,MAAM,CAAA,EAAG,OAAO,IAAA;AACpC,EAAA,uBACEC,eAAA,CAAAC,mBAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAAH,cAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,aAAY,KAAA,EAAO,MAAA,CAAQ,YAAA,EAAc,QAAA,EAAQ,IAAA,EAAC,CAAA;AAAA,IAC3E,QAAA,mBAAWA,cAAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,YAAA,EAAa,KAAA,EAAO,QAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,CAAA,GAAK;AAAA,GAAA,EACpF,CAAA;AAEJ","file":"chunk-OUZQL5PV.js","sourcesContent":["/**\n * Single source of truth for the honeypot input — rendered by BOTH form\n * experiences (classic and stage) inside their <form>. The customRender path\n * deliberately gets none (documented limitation: custom renders lose the\n * honeypot, which is why alternate experiences must be render branches).\n *\n * Invariants (do not weaken any of these):\n * - `inert` blocks focus/interaction at the browser level, surviving hostile\n * site CSS that could defeat the inline styles.\n * - data-sk-honeypot gives site CSS a stable opt-OUT hook.\n * - Controlled input: bots filling via JS still fire React onChange, so the\n * value reaches submitForm's data payload.\n * - Name comes from config (`honeypot_field || DEFAULT_HONEYPOT_FIELD` from\n * the shared contract) — resolved by the caller, never forked here.\n * - The trap must be invisible to AUTOFILL as well as to people. A browser or\n * password manager filling a hidden input flags a real visitor as a bot, and\n * because the value is stripped server-side the mistake is undiagnosable\n * after the fact. `autocomplete=\"off\"` does not achieve this — it is the one\n * value Chrome deliberately ignores for contact/address autofill — so the\n * trap declares `new-password` (never offered saved contact data) plus the\n * documented per-manager opt-outs.\n */\n\nimport React from 'react'\n\nexport interface HoneypotFieldProps {\n name: string\n value?: string\n /**\n * Omit for STATIC mode — an uncontrolled trap a Server Component can render.\n * The trap's whole job is server-side (the value is read off the submission\n * and stripped), so it needs no client state to work; the controlled form is\n * only so the hydrated JSON path can read it back out of React state.\n */\n onChange?: (value: string) => void\n}\n\nexport function HoneypotField({ name, value, onChange }: HoneypotFieldProps) {\n const interactive = typeof onChange === 'function'\n return (\n <input\n type=\"text\"\n name={name}\n tabIndex={-1}\n autoComplete=\"new-password\"\n aria-hidden=\"true\"\n inert\n data-sk-honeypot=\"\"\n // Password-manager opt-outs: 1Password, LastPass, Dashlane, Bitwarden.\n // Each ignores its own attribute; none respects autocomplete alone.\n data-1p-ignore=\"\"\n data-lpignore=\"true\"\n data-form-type=\"other\"\n data-bwignore=\"\"\n style={{\n position: 'absolute',\n left: -9999,\n width: 1,\n height: 1,\n overflow: 'hidden',\n opacity: 0,\n visibility: 'hidden',\n pointerEvents: 'none',\n }}\n {...(interactive\n ? {\n value: value ?? '',\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange!(e.target.value)\n if (e.target.value) {\n // Bot detected\n console.warn('[Forms] Honeypot triggered')\n }\n },\n }\n : { defaultValue: '' })}\n />\n )\n}\n","'use client'\n\n/**\n * No-JS native submission fallback — the floor under every managed form.\n *\n * The classic form is the SSR/no-JS surface (experiences are post-hydration\n * chunks), so it alone carries a real `action`/`method` pointing at\n * sonor-api's POST /api/public/forms/submit-native. With JS running, the\n * form's onSubmit preventDefault()s and the JSON path wins; without JS the\n * browser performs an ordinary form-encoded POST and the lead still lands.\n *\n * Auth rides in the hidden `_sk_token` field: a signed, single-purpose\n * credential minted by the api-key-authenticated forms/config endpoint\n * (`native_token` in the response). No token in the config (older API, or no\n * signing secret) means no fallback — the form keeps its historical behavior\n * rather than pointing at an endpoint that will reject it.\n *\n * Multi-step forms are excluded: step navigation is JS, and a native POST of\n * step-1 fields alone fails whole-form validation server-side. Single-step\n * forms are the overwhelming lead-capture case.\n *\n * Single source of truth for the gating — the form attrs and the hidden\n * fields must always agree, so both read the same predicate.\n */\n\nimport React from 'react'\nimport type { ManagedFormConfig } from './types'\nimport { getApiConfig } from './submitForm'\n\nfunction nativeEligible(config: ManagedFormConfig | null | undefined): boolean {\n return !!config?.native_token && !config.is_multi_step\n}\n\n/** `action`/`method` for the classic <form> — empty when ineligible. */\nexport function nativeFormProps(\n config: ManagedFormConfig | null | undefined,\n): { action?: string; method?: 'post' } {\n if (!nativeEligible(config)) return {}\n const { apiUrl } = getApiConfig()\n return { action: `${apiUrl}/api/public/forms/submit-native`, method: 'post' }\n}\n\nexport interface NativeFallbackFieldsProps {\n config: ManagedFormConfig | null | undefined\n /**\n * Absolute URL the native 303 should land on (usually the page hosting the\n * form). Optional — without it the server falls back to the Referer origin,\n * which loses the path but still returns the visitor to the right site.\n */\n returnTo?: string\n}\n\n/** Hidden control fields the native endpoint reads (`_sk_*` namespace). */\nexport function NativeFallbackFields({ config, returnTo }: NativeFallbackFieldsProps) {\n if (!nativeEligible(config)) return null\n return (\n <>\n <input type=\"hidden\" name=\"_sk_token\" value={config!.native_token} readOnly />\n {returnTo ? <input type=\"hidden\" name=\"_sk_return\" value={returnTo} readOnly /> : null}\n </>\n )\n}\n"]}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ // src/shared/version.ts
4
+ var SITE_KIT_VERSION = "6.1.1";
5
+
6
+ exports.SITE_KIT_VERSION = SITE_KIT_VERSION;
7
+ //# sourceMappingURL=chunk-QWUDHOUE.js.map
8
+ //# sourceMappingURL=chunk-QWUDHOUE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shared/version.ts"],"names":[],"mappings":";;;AASO,IAAM,gBAAA,GAAmB","file":"chunk-OXA4ZSX2.js","sourcesContent":["/**\n * @sonordev/site-kit shared - Package version constant\n *\n * Single source of truth for the version the kit reports at runtime (the\n * x-sitekit-version request header set by sonorFetch). Kept as a plain const\n * so client bundles don't need JSON imports; scripts/verify-dts.cjs asserts\n * it matches package.json at publish time, and version.test.ts asserts it in\n * dev, so it can't silently drift.\n */\nexport const SITE_KIT_VERSION = '6.1.0'\n"]}
1
+ {"version":3,"sources":["../src/shared/version.ts"],"names":[],"mappings":";;;AASO,IAAM,gBAAA,GAAmB","file":"chunk-QWUDHOUE.js","sourcesContent":["/**\n * @sonordev/site-kit shared - Package version constant\n *\n * Single source of truth for the version the kit reports at runtime (the\n * x-sitekit-version request header set by sonorFetch). Kept as a plain const\n * so client bundles don't need JSON imports; scripts/verify-dts.cjs asserts\n * it matches package.json at publish time, and version.test.ts asserts it in\n * dev, so it can't silently drift.\n */\nexport const SITE_KIT_VERSION = '6.1.1'\n"]}
@@ -3,8 +3,8 @@
3
3
 
4
4
  var chunkESP5RMB7_js = require('./chunk-ESP5RMB7.js');
5
5
  var chunkNBOBOYMT_js = require('./chunk-NBOBOYMT.js');
6
- var chunkSDGS2R5O_js = require('./chunk-SDGS2R5O.js');
7
- var chunkZQJGCQHC_js = require('./chunk-ZQJGCQHC.js');
6
+ var chunkWWJQGMMN_js = require('./chunk-WWJQGMMN.js');
7
+ var chunkVNJTU6LG_js = require('./chunk-VNJTU6LG.js');
8
8
  var react = require('react');
9
9
  var ReactMarkdown = require('react-markdown');
10
10
  var jsxRuntime = require('react/jsx-runtime');
@@ -39,7 +39,7 @@ function InlineManagedForm({ slug, prefill, primaryColor, primaryRgb }) {
39
39
  submit,
40
40
  isSubmitting,
41
41
  isComplete
42
- } = chunkSDGS2R5O_js.useForm(slug, { initialValues: prefill || {} });
42
+ } = chunkWWJQGMMN_js.useForm(slug, { initialValues: prefill || {} });
43
43
  const cardStyle = {
44
44
  marginTop: 8,
45
45
  padding: 12,
@@ -306,6 +306,15 @@ function userRequestedHandoff(text) {
306
306
  }
307
307
  var BUBBLE_BG = "color-mix(in srgb, var(--sk-bg, #ffffff) 94%, transparent)";
308
308
  var HAIRLINE = "1px solid color-mix(in srgb, var(--sk-text-primary, #111827) 9%, transparent)";
309
+ var ECHO_STYLE_HREF = "sk-echo";
310
+ var ECHO_CSS = `
311
+ @media print {
312
+ [data-sk-echo-launcher], [data-sk-echo-panel] { display: none !important; }
313
+ }
314
+ @media (prefers-reduced-motion: reduce) {
315
+ [data-sk-echo-panel] { animation: none !important; }
316
+ }
317
+ `;
309
318
  function isLightColor(hex) {
310
319
  const num = parseInt(hex.replace("#", ""), 16);
311
320
  const r = num >> 16;
@@ -393,7 +402,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
393
402
  const { apiKey } = getApiConfig();
394
403
  if (!apiKey) return;
395
404
  let cancelled = false;
396
- chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/api/public/seo/project-info`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((data) => {
405
+ chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/api/public/seo/project-info`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((data) => {
397
406
  if (cancelled || !data?.valid || !data?.project_id) return;
398
407
  setResolvedProjectId(data.project_id);
399
408
  }).catch(() => {
@@ -407,7 +416,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
407
416
  const apiKey = ensureApiKey();
408
417
  if (!apiKey) return;
409
418
  try {
410
- const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/config?projectId=${projectId}`, {}, { apiKey, retries: 0 });
419
+ const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/config?projectId=${projectId}`, {}, { apiKey, retries: 0 });
411
420
  if (response.ok) {
412
421
  const { data } = await response.json();
413
422
  setWidgetConfig(data ?? null);
@@ -423,7 +432,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
423
432
  const apiKey = ensureApiKey();
424
433
  if (!apiKey) return null;
425
434
  try {
426
- const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/availability?projectId=${projectId}`, {}, { apiKey, retries: 0 });
435
+ const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/availability?projectId=${projectId}`, {}, { apiKey, retries: 0 });
427
436
  if (response.ok) {
428
437
  const { data } = await response.json();
429
438
  setAvailability(data);
@@ -440,7 +449,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
440
449
  const apiKey = ensureApiKey();
441
450
  if (!apiKey) return null;
442
451
  try {
443
- const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/session`, {
452
+ const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/session`, {
444
453
  method: "POST",
445
454
  headers: { "Content-Type": "application/json" },
446
455
  body: JSON.stringify({
@@ -501,7 +510,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
501
510
  pageUrl: typeof window !== "undefined" ? window.location.href : void 0,
502
511
  ...siteContext ? { siteContext } : {}
503
512
  };
504
- const res = await chunkZQJGCQHC_js.sonorFetch(url, {
513
+ const res = await chunkVNJTU6LG_js.sonorFetch(url, {
505
514
  method: "POST",
506
515
  headers: {
507
516
  "Content-Type": "application/json"
@@ -612,7 +621,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
612
621
  if (currentSessionId) {
613
622
  const apiKey = ensureApiKey();
614
623
  if (apiKey) {
615
- chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((json) => {
624
+ chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((json) => {
616
625
  const data = json?.data ?? json;
617
626
  if (Array.isArray(data) && data.length) {
618
627
  setMessages((prev) => {
@@ -675,7 +684,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
675
684
  try {
676
685
  const apiKey = ensureApiKey();
677
686
  if (!apiKey) return;
678
- const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 });
687
+ const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 });
679
688
  if (response.ok) {
680
689
  const { data } = await response.json();
681
690
  setMessages((prev) => {
@@ -828,7 +837,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
828
837
  form.append("file", file);
829
838
  form.append("sessionId", sessionId);
830
839
  form.append("visitorId", visitorId);
831
- const res = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/upload`, {
840
+ const res = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/upload`, {
832
841
  method: "POST",
833
842
  body: form
834
843
  }, { apiKey, retries: 0 });
@@ -975,7 +984,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
975
984
  if (!apiKey) return;
976
985
  setCheckingHandoff(true);
977
986
  try {
978
- const res = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/handoff`, {
987
+ const res = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/handoff`, {
979
988
  method: "POST",
980
989
  headers: { "Content-Type": "application/json" },
981
990
  body: JSON.stringify({ sessionId })
@@ -1014,7 +1023,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
1014
1023
  setIsLoading(true);
1015
1024
  setOfflineError(null);
1016
1025
  try {
1017
- const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/offline-form`, {
1026
+ const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/offline-form`, {
1018
1027
  method: "POST",
1019
1028
  headers: { "Content-Type": "application/json" },
1020
1029
  body: JSON.stringify({
@@ -1592,9 +1601,6 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
1592
1601
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
1593
1602
  to { opacity: 1; transform: translateY(0) scale(1); }
1594
1603
  }
1595
- @media (prefers-reduced-motion: reduce) {
1596
- [data-sk-echo-panel] { animation: none !important; }
1597
- }
1598
1604
  @keyframes chatDot {
1599
1605
  0%, 80%, 100% { opacity: 0.3; }
1600
1606
  40% { opacity: 1; }
@@ -1621,11 +1627,12 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
1621
1627
  );
1622
1628
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1623
1629
  /* @__PURE__ */ jsxRuntime.jsx(chunkNBOBOYMT_js.GlassStyles, {}),
1630
+ /* @__PURE__ */ jsxRuntime.jsx("style", { href: ECHO_STYLE_HREF, precedence: "default", children: ECHO_CSS }),
1624
1631
  ChatPopup,
1625
1632
  ChatButton
1626
1633
  ] });
1627
1634
  }
1628
1635
 
1629
1636
  exports.ChatWidget = ChatWidget;
1630
- //# sourceMappingURL=chunk-XKJLJLQ4.js.map
1631
- //# sourceMappingURL=chunk-XKJLJLQ4.js.map
1637
+ //# sourceMappingURL=chunk-QYRJ4IQD.js.map
1638
+ //# sourceMappingURL=chunk-QYRJ4IQD.js.map