@salesmind-ai/design-system 0.3.3 → 0.3.4

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 (215) hide show
  1. package/dist/{SectionShell-BfBw5q0Y.d.cts → SectionShell-GlglHCzz.d.cts} +1 -0
  2. package/dist/{SectionShell-BfBw5q0Y.d.ts → SectionShell-GlglHCzz.d.ts} +1 -0
  3. package/dist/StatsSection-B8iD9L-o.d.ts +68 -0
  4. package/dist/StatsSection-wgd8Vge1.d.cts +68 -0
  5. package/dist/admin/index.cjs +2928 -68
  6. package/dist/admin/index.cjs.map +1 -1
  7. package/dist/admin/index.js +2915 -5
  8. package/dist/admin/index.js.map +1 -1
  9. package/dist/blog/index.cjs +1064 -53
  10. package/dist/blog/index.cjs.map +1 -1
  11. package/dist/blog/index.d.cts +1 -1
  12. package/dist/blog/index.d.ts +1 -1
  13. package/dist/blog/index.js +1054 -8
  14. package/dist/blog/index.js.map +1 -1
  15. package/dist/charts/index.cjs +2694 -46
  16. package/dist/charts/index.cjs.map +1 -1
  17. package/dist/charts/index.js +2680 -3
  18. package/dist/charts/index.js.map +1 -1
  19. package/dist/core/index.cjs +4333 -807
  20. package/dist/core/index.cjs.map +1 -1
  21. package/dist/core/index.js +4130 -14
  22. package/dist/core/index.js.map +1 -1
  23. package/dist/i18n/index.cjs +558 -86
  24. package/dist/i18n/index.cjs.map +1 -1
  25. package/dist/i18n/index.js +544 -1
  26. package/dist/i18n/index.js.map +1 -1
  27. package/dist/index.cjs +17140 -1432
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.css +24 -13
  30. package/dist/index.css.map +1 -1
  31. package/dist/index.d.cts +2 -2
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +16785 -31
  34. package/dist/index.js.map +1 -1
  35. package/dist/marketing/index.cjs +3072 -142
  36. package/dist/marketing/index.cjs.map +1 -1
  37. package/dist/marketing/index.d.cts +1 -1
  38. package/dist/marketing/index.d.ts +1 -1
  39. package/dist/marketing/index.js +3042 -11
  40. package/dist/marketing/index.js.map +1 -1
  41. package/dist/motion/index.cjs +1222 -26
  42. package/dist/motion/index.cjs.map +1 -1
  43. package/dist/motion/index.js +1215 -2
  44. package/dist/motion/index.js.map +1 -1
  45. package/dist/nav/index.cjs +1518 -101
  46. package/dist/nav/index.cjs.map +1 -1
  47. package/dist/nav/index.css +24 -13
  48. package/dist/nav/index.css.map +1 -1
  49. package/dist/nav/index.js +1498 -4
  50. package/dist/nav/index.js.map +1 -1
  51. package/dist/report/index.cjs +2403 -171
  52. package/dist/report/index.cjs.map +1 -1
  53. package/dist/report/index.js +2363 -3
  54. package/dist/report/index.js.map +1 -1
  55. package/dist/sections/index.cjs +382 -28
  56. package/dist/sections/index.cjs.map +1 -1
  57. package/dist/sections/index.d.cts +15 -69
  58. package/dist/sections/index.d.ts +15 -69
  59. package/dist/sections/index.js +376 -4
  60. package/dist/sections/index.js.map +1 -1
  61. package/dist/social-proof/index.cjs +1250 -53
  62. package/dist/social-proof/index.cjs.map +1 -1
  63. package/dist/social-proof/index.d.cts +1 -1
  64. package/dist/social-proof/index.d.ts +1 -1
  65. package/dist/social-proof/index.js +1235 -6
  66. package/dist/social-proof/index.js.map +1 -1
  67. package/dist/theme/index.cjs +565 -38
  68. package/dist/theme/index.cjs.map +1 -1
  69. package/dist/theme/index.js +555 -2
  70. package/dist/theme/index.js.map +1 -1
  71. package/dist/web/client/index.cjs +491 -38
  72. package/dist/web/client/index.cjs.map +1 -1
  73. package/dist/web/client/index.js +483 -4
  74. package/dist/web/client/index.js.map +1 -1
  75. package/dist/web/index.cjs +1346 -158
  76. package/dist/web/index.cjs.map +1 -1
  77. package/dist/web/index.js +1305 -9
  78. package/dist/web/index.js.map +1 -1
  79. package/dist/web/server/index.cjs +563 -26
  80. package/dist/web/server/index.cjs.map +1 -1
  81. package/dist/web/server/index.js +560 -1
  82. package/dist/web/server/index.js.map +1 -1
  83. package/package.json +1 -1
  84. package/dist/chunk-2GARWEJK.js +0 -17
  85. package/dist/chunk-2GARWEJK.js.map +0 -1
  86. package/dist/chunk-3NKRFUAR.js +0 -37
  87. package/dist/chunk-3NKRFUAR.js.map +0 -1
  88. package/dist/chunk-3TGSIILM.cjs +0 -201
  89. package/dist/chunk-3TGSIILM.cjs.map +0 -1
  90. package/dist/chunk-4GM5BGBN.cjs +0 -801
  91. package/dist/chunk-4GM5BGBN.cjs.map +0 -1
  92. package/dist/chunk-5LGDEZWY.cjs +0 -2434
  93. package/dist/chunk-5LGDEZWY.cjs.map +0 -1
  94. package/dist/chunk-6H4DSTXR.js +0 -786
  95. package/dist/chunk-6H4DSTXR.js.map +0 -1
  96. package/dist/chunk-6UNG76Y2.js +0 -153
  97. package/dist/chunk-6UNG76Y2.js.map +0 -1
  98. package/dist/chunk-7PX2AZ6Y.js +0 -39
  99. package/dist/chunk-7PX2AZ6Y.js.map +0 -1
  100. package/dist/chunk-B6AVAX4F.js +0 -1415
  101. package/dist/chunk-B6AVAX4F.js.map +0 -1
  102. package/dist/chunk-BILT5KD3.js +0 -264
  103. package/dist/chunk-BILT5KD3.js.map +0 -1
  104. package/dist/chunk-C2BCDNAV.js +0 -24
  105. package/dist/chunk-C2BCDNAV.js.map +0 -1
  106. package/dist/chunk-CH42VPWE.cjs +0 -421
  107. package/dist/chunk-CH42VPWE.cjs.map +0 -1
  108. package/dist/chunk-CJ2MKVAF.cjs +0 -46
  109. package/dist/chunk-CJ2MKVAF.cjs.map +0 -1
  110. package/dist/chunk-DP74LUXG.cjs +0 -98
  111. package/dist/chunk-DP74LUXG.cjs.map +0 -1
  112. package/dist/chunk-E7D6EKJ4.cjs +0 -44
  113. package/dist/chunk-E7D6EKJ4.cjs.map +0 -1
  114. package/dist/chunk-ECXBTUH6.cjs +0 -584
  115. package/dist/chunk-ECXBTUH6.cjs.map +0 -1
  116. package/dist/chunk-EFRAP5ES.js +0 -157
  117. package/dist/chunk-EFRAP5ES.js.map +0 -1
  118. package/dist/chunk-F6YYWMME.js +0 -485
  119. package/dist/chunk-F6YYWMME.js.map +0 -1
  120. package/dist/chunk-FAFAP4L5.js +0 -183
  121. package/dist/chunk-FAFAP4L5.js.map +0 -1
  122. package/dist/chunk-GUZIMHWS.js +0 -1608
  123. package/dist/chunk-GUZIMHWS.js.map +0 -1
  124. package/dist/chunk-H2Y6BSTL.cjs +0 -69
  125. package/dist/chunk-H2Y6BSTL.cjs.map +0 -1
  126. package/dist/chunk-HN4PHABT.js +0 -126
  127. package/dist/chunk-HN4PHABT.js.map +0 -1
  128. package/dist/chunk-HRENHNDJ.js +0 -211
  129. package/dist/chunk-HRENHNDJ.js.map +0 -1
  130. package/dist/chunk-I75BFEYT.cjs +0 -2561
  131. package/dist/chunk-I75BFEYT.cjs.map +0 -1
  132. package/dist/chunk-IFRATNLU.js +0 -562
  133. package/dist/chunk-IFRATNLU.js.map +0 -1
  134. package/dist/chunk-IYPXJ6YC.cjs +0 -69
  135. package/dist/chunk-IYPXJ6YC.cjs.map +0 -1
  136. package/dist/chunk-JPJN4YBC.js +0 -409
  137. package/dist/chunk-JPJN4YBC.js.map +0 -1
  138. package/dist/chunk-KBA2LFBG.js +0 -62
  139. package/dist/chunk-KBA2LFBG.js.map +0 -1
  140. package/dist/chunk-KCKUSU2M.cjs +0 -166
  141. package/dist/chunk-KCKUSU2M.cjs.map +0 -1
  142. package/dist/chunk-KJ2OXQF4.js +0 -287
  143. package/dist/chunk-KJ2OXQF4.js.map +0 -1
  144. package/dist/chunk-KNQEIU7O.cjs +0 -1202
  145. package/dist/chunk-KNQEIU7O.cjs.map +0 -1
  146. package/dist/chunk-KVGSVGRK.cjs +0 -569
  147. package/dist/chunk-KVGSVGRK.cjs.map +0 -1
  148. package/dist/chunk-L352JRV6.cjs +0 -105
  149. package/dist/chunk-L352JRV6.cjs.map +0 -1
  150. package/dist/chunk-LJADZITX.cjs +0 -298
  151. package/dist/chunk-LJADZITX.cjs.map +0 -1
  152. package/dist/chunk-LMJPWXTZ.cjs +0 -194
  153. package/dist/chunk-LMJPWXTZ.cjs.map +0 -1
  154. package/dist/chunk-LOWEAQST.js +0 -701
  155. package/dist/chunk-LOWEAQST.js.map +0 -1
  156. package/dist/chunk-MDB2WCRQ.cjs +0 -137
  157. package/dist/chunk-MDB2WCRQ.cjs.map +0 -1
  158. package/dist/chunk-MQDEE7HC.cjs +0 -283
  159. package/dist/chunk-MQDEE7HC.cjs.map +0 -1
  160. package/dist/chunk-MQRB634A.cjs +0 -34
  161. package/dist/chunk-MQRB634A.cjs.map +0 -1
  162. package/dist/chunk-MTI27RDV.js +0 -185
  163. package/dist/chunk-MTI27RDV.js.map +0 -1
  164. package/dist/chunk-MU6GW5ZV.js +0 -2317
  165. package/dist/chunk-MU6GW5ZV.js.map +0 -1
  166. package/dist/chunk-NN3TUHIH.js +0 -28
  167. package/dist/chunk-NN3TUHIH.js.map +0 -1
  168. package/dist/chunk-NT4LBP7D.cjs +0 -111
  169. package/dist/chunk-NT4LBP7D.cjs.map +0 -1
  170. package/dist/chunk-OLV7OD3X.cjs +0 -502
  171. package/dist/chunk-OLV7OD3X.cjs.map +0 -1
  172. package/dist/chunk-OXNXEQY7.js +0 -2538
  173. package/dist/chunk-OXNXEQY7.js.map +0 -1
  174. package/dist/chunk-P5BOFE5A.js +0 -546
  175. package/dist/chunk-P5BOFE5A.js.map +0 -1
  176. package/dist/chunk-Q2MFGYTE.cjs +0 -1449
  177. package/dist/chunk-Q2MFGYTE.cjs.map +0 -1
  178. package/dist/chunk-Q75DBVDY.cjs +0 -68
  179. package/dist/chunk-Q75DBVDY.cjs.map +0 -1
  180. package/dist/chunk-REQ5Q6ZI.js +0 -1022
  181. package/dist/chunk-REQ5Q6ZI.js.map +0 -1
  182. package/dist/chunk-SICKWUWB.js +0 -62
  183. package/dist/chunk-SICKWUWB.js.map +0 -1
  184. package/dist/chunk-T343CCH5.js +0 -1190
  185. package/dist/chunk-T343CCH5.js.map +0 -1
  186. package/dist/chunk-TEC62D4A.cjs +0 -1624
  187. package/dist/chunk-TEC62D4A.cjs.map +0 -1
  188. package/dist/chunk-TW5JB35D.js +0 -2122
  189. package/dist/chunk-TW5JB35D.js.map +0 -1
  190. package/dist/chunk-VC5LMUVQ.cjs +0 -20
  191. package/dist/chunk-VC5LMUVQ.cjs.map +0 -1
  192. package/dist/chunk-VM7WFMKI.cjs +0 -76
  193. package/dist/chunk-VM7WFMKI.cjs.map +0 -1
  194. package/dist/chunk-W2WTP6HS.cjs +0 -233
  195. package/dist/chunk-W2WTP6HS.cjs.map +0 -1
  196. package/dist/chunk-WH7PYHZY.cjs +0 -35
  197. package/dist/chunk-WH7PYHZY.cjs.map +0 -1
  198. package/dist/chunk-XQZVY7JJ.cjs +0 -717
  199. package/dist/chunk-XQZVY7JJ.cjs.map +0 -1
  200. package/dist/chunk-XU3OMQ7V.js +0 -98
  201. package/dist/chunk-XU3OMQ7V.js.map +0 -1
  202. package/dist/chunk-XWPDRMZG.js +0 -62
  203. package/dist/chunk-XWPDRMZG.js.map +0 -1
  204. package/dist/chunk-Y3CPKNB7.js +0 -67
  205. package/dist/chunk-Y3CPKNB7.js.map +0 -1
  206. package/dist/chunk-YNVRDD2P.js +0 -98
  207. package/dist/chunk-YNVRDD2P.js.map +0 -1
  208. package/dist/chunk-YSYR54XR.js +0 -92
  209. package/dist/chunk-YSYR54XR.js.map +0 -1
  210. package/dist/chunk-YTYDQBVY.cjs +0 -162
  211. package/dist/chunk-YTYDQBVY.cjs.map +0 -1
  212. package/dist/chunk-ZDLOA2UT.cjs +0 -1042
  213. package/dist/chunk-ZDLOA2UT.cjs.map +0 -1
  214. package/dist/chunk-ZWUKRCOJ.cjs +0 -2162
  215. package/dist/chunk-ZWUKRCOJ.cjs.map +0 -1
@@ -1,9 +1,1238 @@
1
1
  "use client";
2
- export { PlatformBadge, SocialProof, SocialProofCard, SocialProofCarousel, SocialProofFeatured, SocialProofGrid, SocialProofLogos, StarRating, VerticalVideoGrid, VideoLightbox } from '../chunk-LOWEAQST.js';
3
- import '../chunk-YNVRDD2P.js';
4
- export { MetricCounter } from '../chunk-YSYR54XR.js';
5
- import '../chunk-KBA2LFBG.js';
6
- import '../chunk-KJ2OXQF4.js';
7
- import '../chunk-HN4PHABT.js';
2
+ import React5, { forwardRef, useState, useRef, useEffect, createContext, useCallback, useContext } from 'react';
3
+ import clsx7 from 'clsx';
4
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
+ import { motion } from 'framer-motion';
6
+ import { Dialog } from '@base-ui/react/dialog';
7
+
8
+ // src/components/SocialProof/Card.tsx
9
+ var StarRating = forwardRef(
10
+ ({
11
+ value,
12
+ max = 5,
13
+ size = "md",
14
+ animate = false,
15
+ showValue = false,
16
+ valueLabel,
17
+ className,
18
+ ...props
19
+ }, ref) => {
20
+ const [visible, setVisible] = useState(!animate);
21
+ const containerRef = useRef(null);
22
+ useEffect(() => {
23
+ if (!animate) return;
24
+ if (typeof window !== "undefined") {
25
+ const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
26
+ if (mq.matches) {
27
+ setVisible(true);
28
+ return;
29
+ }
30
+ }
31
+ const target = containerRef.current;
32
+ if (!target) return;
33
+ const observer = new IntersectionObserver(
34
+ ([entry]) => {
35
+ if (entry.isIntersecting) {
36
+ setVisible(true);
37
+ observer.disconnect();
38
+ }
39
+ },
40
+ { threshold: 0.5 }
41
+ );
42
+ observer.observe(target);
43
+ return () => observer.disconnect();
44
+ }, [animate]);
45
+ const clampedValue = Math.min(Math.max(value, 0), max);
46
+ const stars = Array.from({ length: max }, (_, i) => {
47
+ const starIndex = i + 1;
48
+ const fillPercent = clampedValue >= starIndex ? 100 : clampedValue > starIndex - 1 ? (clampedValue - (starIndex - 1)) * 100 : 0;
49
+ return /* @__PURE__ */ jsxs(
50
+ "span",
51
+ {
52
+ className: clsx7(
53
+ "ds-star-rating__star",
54
+ visible && "ds-star-rating__star--visible"
55
+ ),
56
+ style: {
57
+ "--star-fill": `${fillPercent}%`,
58
+ "--star-delay": animate ? `${i * 100}ms` : "0ms"
59
+ },
60
+ children: [
61
+ /* @__PURE__ */ jsx(
62
+ "svg",
63
+ {
64
+ viewBox: "0 0 24 24",
65
+ fill: "none",
66
+ xmlns: "http://www.w3.org/2000/svg",
67
+ className: "ds-star-rating__svg",
68
+ "aria-hidden": "true",
69
+ children: /* @__PURE__ */ jsx(
70
+ "path",
71
+ {
72
+ d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
73
+ className: "ds-star-rating__empty"
74
+ }
75
+ )
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx(
79
+ "svg",
80
+ {
81
+ viewBox: "0 0 24 24",
82
+ fill: "none",
83
+ xmlns: "http://www.w3.org/2000/svg",
84
+ className: "ds-star-rating__svg ds-star-rating__svg--filled",
85
+ "aria-hidden": "true",
86
+ style: {
87
+ clipPath: `inset(0 ${100 - fillPercent}% 0 0)`
88
+ },
89
+ children: /* @__PURE__ */ jsx(
90
+ "path",
91
+ {
92
+ d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
93
+ className: "ds-star-rating__filled"
94
+ }
95
+ )
96
+ }
97
+ )
98
+ ]
99
+ },
100
+ i
101
+ );
102
+ });
103
+ return /* @__PURE__ */ jsxs(
104
+ "div",
105
+ {
106
+ ref: (node) => {
107
+ containerRef.current = node;
108
+ if (typeof ref === "function") ref(node);
109
+ else if (ref) ref.current = node;
110
+ },
111
+ className: clsx7("ds-star-rating", `ds-star-rating--${size}`, className),
112
+ role: "img",
113
+ "aria-label": `${clampedValue} out of ${max} stars`,
114
+ ...props,
115
+ children: [
116
+ /* @__PURE__ */ jsx("span", { className: "ds-star-rating__stars", children: stars }),
117
+ showValue && /* @__PURE__ */ jsxs("span", { className: "ds-star-rating__value", children: [
118
+ clampedValue.toLocaleString(void 0, {
119
+ minimumFractionDigits: clampedValue % 1 !== 0 ? 1 : 0,
120
+ maximumFractionDigits: 1
121
+ }),
122
+ valueLabel && /* @__PURE__ */ jsx("span", { className: "ds-star-rating__value-label", children: valueLabel })
123
+ ] })
124
+ ]
125
+ }
126
+ );
127
+ }
128
+ );
129
+ StarRating.displayName = "StarRating";
130
+ var TrustpilotIcon = ({ size }) => /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M12 2l2.9 8.9H24l-7.35 5.34 2.81 8.64L12 19.56l-7.46 5.32 2.81-8.64L0 10.9h9.1L12 2z", fill: "#00B67A" }) });
131
+ var G2Icon = ({ size }) => /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
132
+ /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z", fill: "#FF492C" }),
133
+ /* @__PURE__ */ jsx("text", { x: "50%", y: "54%", dominantBaseline: "middle", textAnchor: "middle", fill: "white", fontWeight: "bold", fontSize: "11", fontFamily: "Arial, sans-serif", children: "G2" })
134
+ ] });
135
+ var GoogleIcon = ({ size }) => /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
136
+ /* @__PURE__ */ jsx("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z", fill: "#4285F4" }),
137
+ /* @__PURE__ */ jsx("path", { d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z", fill: "#34A853" }),
138
+ /* @__PURE__ */ jsx("path", { d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 001 12c0 1.77.42 3.45 1.18 4.93l3.66-2.84z", fill: "#FBBC05" }),
139
+ /* @__PURE__ */ jsx("path", { d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z", fill: "#EA4335" })
140
+ ] });
141
+ var ChromeWebStoreIcon = ({ size }) => /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
142
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", fill: "#4285F4", opacity: "0.1", stroke: "#4285F4", strokeWidth: "1.5" }),
143
+ /* @__PURE__ */ jsx("path", { d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0 8.5c-1.93 0-3.5-1.57-3.5-3.5S10.07 8.5 12 8.5s3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z", fill: "#4285F4" }),
144
+ /* @__PURE__ */ jsx("path", { d: "M7.5 10.5L4 5.5", stroke: "#EA4335", strokeWidth: "1.5", strokeLinecap: "round" }),
145
+ /* @__PURE__ */ jsx("path", { d: "M16.5 10.5L20 5.5", stroke: "#FBBC05", strokeWidth: "1.5", strokeLinecap: "round" }),
146
+ /* @__PURE__ */ jsx("path", { d: "M12 17l-3.5 5", stroke: "#34A853", strokeWidth: "1.5", strokeLinecap: "round" })
147
+ ] });
148
+ var PLATFORM_ICONS = {
149
+ trustpilot: TrustpilotIcon,
150
+ g2: G2Icon,
151
+ google: GoogleIcon,
152
+ "chrome-web-store": ChromeWebStoreIcon
153
+ };
154
+ var PLATFORM_LABELS = {
155
+ trustpilot: "Trustpilot",
156
+ g2: "G2",
157
+ google: "Google",
158
+ "chrome-web-store": "Chrome Web Store"
159
+ };
160
+ var PLATFORM_COLORS = {
161
+ trustpilot: "#00B67A",
162
+ g2: "#FF492C",
163
+ google: "#4285F4",
164
+ "chrome-web-store": "#4285F4"
165
+ };
166
+ var PlatformBadge = forwardRef(
167
+ ({
168
+ platform,
169
+ variant = "icon-label",
170
+ rating,
171
+ count,
172
+ size = "sm",
173
+ className,
174
+ ...props
175
+ }, ref) => {
176
+ const Icon = PLATFORM_ICONS[platform];
177
+ const label = PLATFORM_LABELS[platform];
178
+ const accentColor = PLATFORM_COLORS[platform];
179
+ const iconSize = size === "sm" ? 18 : 22;
180
+ return /* @__PURE__ */ jsxs(
181
+ "div",
182
+ {
183
+ ref,
184
+ role: "img",
185
+ className: clsx7(
186
+ "ds-platform-badge",
187
+ `ds-platform-badge--${variant}`,
188
+ `ds-platform-badge--${size}`,
189
+ className
190
+ ),
191
+ style: { "--platform-accent": accentColor },
192
+ "aria-label": variant === "full" && rating ? `${label}: ${rating} stars${count ? ` from ${count} reviews` : ""}` : label,
193
+ ...props,
194
+ children: [
195
+ /* @__PURE__ */ jsx("span", { className: "ds-platform-badge__icon", children: /* @__PURE__ */ jsx(Icon, { size: iconSize }) }),
196
+ variant !== "icon-only" && /* @__PURE__ */ jsx("span", { className: "ds-platform-badge__label", children: label }),
197
+ variant === "full" && rating != null && /* @__PURE__ */ jsxs("span", { className: "ds-platform-badge__rating", children: [
198
+ /* @__PURE__ */ jsx(StarRating, { value: rating, size: "sm" }),
199
+ count != null && /* @__PURE__ */ jsxs("span", { className: "ds-platform-badge__count", children: [
200
+ "(",
201
+ count,
202
+ ")"
203
+ ] })
204
+ ] })
205
+ ]
206
+ }
207
+ );
208
+ }
209
+ );
210
+ PlatformBadge.displayName = "PlatformBadge";
211
+ var UtmContext = createContext(null);
212
+
213
+ // src/web/utm/useUtmDefaults.ts
214
+ function useUtmDefaults() {
215
+ return useContext(UtmContext);
216
+ }
217
+
218
+ // src/web/utm/builders.ts
219
+ var PLACEHOLDER_ORIGIN = "https://__placeholder__.internal";
220
+ function buildUtmUrl(baseUrl, params) {
221
+ const isRelative = baseUrl.startsWith("/");
222
+ let url;
223
+ try {
224
+ url = isRelative ? new URL(baseUrl, PLACEHOLDER_ORIGIN) : new URL(baseUrl);
225
+ } catch {
226
+ return baseUrl;
227
+ }
228
+ const existingParams = [];
229
+ url.searchParams.forEach((value, key) => {
230
+ existingParams.push([key, value]);
231
+ });
232
+ for (const [key] of existingParams) {
233
+ url.searchParams.delete(key);
234
+ }
235
+ for (const [key, value] of existingParams) {
236
+ if (!key.startsWith("utm_")) {
237
+ url.searchParams.set(key, value);
238
+ }
239
+ }
240
+ url.searchParams.set("utm_source", params.source);
241
+ url.searchParams.set("utm_medium", params.medium);
242
+ url.searchParams.set("utm_campaign", params.campaign);
243
+ if (params.term !== void 0) {
244
+ url.searchParams.set("utm_term", params.term);
245
+ }
246
+ if (params.content !== void 0) {
247
+ url.searchParams.set("utm_content", params.content);
248
+ }
249
+ if (isRelative) {
250
+ return url.href.replace(PLACEHOLDER_ORIGIN, "");
251
+ }
252
+ return url.href;
253
+ }
254
+
255
+ // src/web/utm/classifiers.ts
256
+ var INTERNAL_PATTERNS = [
257
+ /^\/(?!\/)/,
258
+ // Relative paths
259
+ /^https?:\/\/(www\.)?sales-mind\.ai/i,
260
+ // Marketing site
261
+ /^https?:\/\/app\.sales-mind\.ai/i,
262
+ // Web app
263
+ /^https?:\/\/apps\.sales-mind\.ai/i,
264
+ // Web app (legacy)
265
+ /^https?:\/\/meet\.sales-mind\.ai/i,
266
+ // Booking
267
+ /^https?:\/\/docs\.sales-mind\.ai/i
268
+ // Docs
269
+ ];
270
+ var SYSTEM_PATTERNS = [
271
+ /^https?:\/\/.*\/api\//i,
272
+ // API endpoints
273
+ /^https?:\/\/.*\/webhook/i,
274
+ // Webhooks
275
+ /^https?:\/\/.*\/oauth/i,
276
+ // OAuth callbacks
277
+ /^https?:\/\/.*\/callback/i,
278
+ // Callbacks
279
+ /^https?:\/\/.*\.supabase\.(co|com)/i,
280
+ // Supabase
281
+ /^https?:\/\/.*\.firebaseapp\.com/i,
282
+ // Firebase
283
+ /^https?:\/\/.*\.cloudfunctions\.net/i
284
+ // Cloud Functions
285
+ ];
286
+ var ASSET_PATTERNS = [
287
+ /\.(css|js|mjs|map|woff2?|ttf|eot|svg|png|jpe?g|gif|webp|avif|ico|pdf)(\?.*)?$/i
288
+ ];
289
+ var CONVERSION_PATTERNS = [
290
+ /^https?:\/\/(www\.)?calendly\.com/i,
291
+ /^https?:\/\/(checkout\.)?stripe\.com/i,
292
+ /^https?:\/\/buy\.stripe\.com/i,
293
+ /^https?:\/\/chromewebstore\.google\.com/i,
294
+ /^https?:\/\/meet\.sales-mind\.ai/i
295
+ ];
296
+ var PROTOCOL_EXEMPT = [
297
+ /^mailto:/i,
298
+ /^tel:/i,
299
+ /^#/,
300
+ /^javascript:/i
301
+ ];
302
+ function classifyUrl(url) {
303
+ if (PROTOCOL_EXEMPT.some((p) => p.test(url))) return "protocol";
304
+ if (ASSET_PATTERNS.some((p) => p.test(url))) return "asset";
305
+ if (SYSTEM_PATTERNS.some((p) => p.test(url))) return "system";
306
+ if (CONVERSION_PATTERNS.some((p) => p.test(url))) return "conversion";
307
+ if (INTERNAL_PATTERNS.some((p) => p.test(url))) return "internal";
308
+ return "external";
309
+ }
310
+
311
+ // src/components/OutboundLink/outbound-link-utils.ts
312
+ var LEGACY_UTM_SOURCE = "salesmind";
313
+ var EXEMPT_PATTERNS = [
314
+ /^https?:\/\/(www\.)?(stripe\.com|checkout\.stripe\.com|paypal\.com)/i,
315
+ /^https?:\/\/(www\.)?github\.com\/login\/oauth/i
316
+ ];
317
+ var isExemptUrl = (urlStr) => {
318
+ if (urlStr.startsWith("mailto:") || urlStr.startsWith("tel:")) return true;
319
+ const classification = classifyUrl(urlStr);
320
+ if (classification === "system" || classification === "protocol" || classification === "asset") {
321
+ return true;
322
+ }
323
+ return EXEMPT_PATTERNS.some((pattern) => pattern.test(urlStr));
324
+ };
325
+ var appendGovernedUTMs = (href, params, preserveExisting = true) => {
326
+ try {
327
+ const url = new URL(href);
328
+ if (preserveExisting) {
329
+ const hasAll = url.searchParams.has("utm_source") && url.searchParams.has("utm_medium") && url.searchParams.has("utm_campaign");
330
+ if (hasAll) return href;
331
+ }
332
+ return buildUtmUrl(href, params);
333
+ } catch {
334
+ return href;
335
+ }
336
+ };
337
+ var appendUTMs = (href, context, pageSlug, options) => {
338
+ try {
339
+ const url = new URL(href);
340
+ const { mediumOverride = "outbound_link", campaignOverride, preserveExisting = true } = options;
341
+ const utms = {
342
+ utm_source: LEGACY_UTM_SOURCE,
343
+ utm_medium: mediumOverride,
344
+ utm_campaign: campaignOverride || pageSlug,
345
+ utm_content: context
346
+ };
347
+ Object.entries(utms).forEach(([key, value]) => {
348
+ if (value) {
349
+ if (preserveExisting && url.searchParams.has(key)) {
350
+ return;
351
+ }
352
+ url.searchParams.set(key, value);
353
+ }
354
+ });
355
+ return url.toString();
356
+ } catch {
357
+ return href;
358
+ }
359
+ };
360
+ var OutboundLink = forwardRef(
361
+ ({
362
+ href,
363
+ context,
364
+ campaignOverride,
365
+ mediumOverride = "outbound_link",
366
+ preserveExistingUTM = true,
367
+ openInNewTab = true,
368
+ disableTracking = false,
369
+ utmParams,
370
+ onClick,
371
+ children,
372
+ ...props
373
+ }, ref) => {
374
+ const contextParams = useUtmDefaults();
375
+ const resolvedUtmParams = utmParams ?? contextParams;
376
+ let hostname = "";
377
+ try {
378
+ const url = new URL(href);
379
+ hostname = url.hostname;
380
+ } catch {
381
+ }
382
+ const [finalHref, setFinalHref] = useState(href);
383
+ useEffect(() => {
384
+ let isExternal = false;
385
+ let currentMedium = mediumOverride;
386
+ try {
387
+ const url = new URL(href);
388
+ const currentHost = window.location.hostname;
389
+ isExternal = url.hostname !== currentHost;
390
+ if (isExternal && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
391
+ if (currentMedium === "outbound_link") {
392
+ currentMedium = "cross_subdomain";
393
+ }
394
+ }
395
+ } catch {
396
+ isExternal = false;
397
+ }
398
+ const isExempt = isExemptUrl(href) || disableTracking;
399
+ if (isExternal && !isExempt) {
400
+ if (resolvedUtmParams) {
401
+ setFinalHref(appendGovernedUTMs(href, resolvedUtmParams, preserveExistingUTM));
402
+ } else {
403
+ const pageSlug = window.location.pathname.replace(/^\/|\/$/g, "") || "home";
404
+ setFinalHref(appendUTMs(href, context, pageSlug, {
405
+ mediumOverride: currentMedium,
406
+ campaignOverride,
407
+ preserveExisting: preserveExistingUTM
408
+ }));
409
+ }
410
+ } else {
411
+ setFinalHref(href);
412
+ }
413
+ }, [href, context, mediumOverride, campaignOverride, preserveExistingUTM, disableTracking, resolvedUtmParams]);
414
+ const handleClick = (e) => {
415
+ if (typeof window === "undefined" || disableTracking) {
416
+ onClick?.(e);
417
+ return;
418
+ }
419
+ let clickExternal = false;
420
+ let clickCrossSubdomain = false;
421
+ let clickMedium = mediumOverride;
422
+ try {
423
+ const url = new URL(href);
424
+ const currentHost = window.location.hostname;
425
+ clickExternal = url.hostname !== currentHost;
426
+ if (clickExternal && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
427
+ clickCrossSubdomain = true;
428
+ if (clickMedium === "outbound_link") {
429
+ clickMedium = "cross_subdomain";
430
+ }
431
+ }
432
+ } catch {
433
+ }
434
+ if (clickExternal) {
435
+ const detail = {
436
+ destination_domain: hostname,
437
+ destination_url: finalHref,
438
+ utm_medium_type: clickMedium,
439
+ page_slug: window.location.pathname,
440
+ component_location: context,
441
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
442
+ is_cross_subdomain: clickCrossSubdomain
443
+ };
444
+ const event = new CustomEvent("outbound_click", { detail });
445
+ window.dispatchEvent(event);
446
+ }
447
+ onClick?.(e);
448
+ };
449
+ const relParts = [];
450
+ let shouldOpenNewTab = openInNewTab;
451
+ try {
452
+ const url = new URL(href);
453
+ if (typeof window !== "undefined") {
454
+ const currentHost = window.location.hostname;
455
+ if (url.hostname !== currentHost && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
456
+ shouldOpenNewTab = false;
457
+ }
458
+ }
459
+ } catch {
460
+ }
461
+ if (shouldOpenNewTab) relParts.push("noopener", "noreferrer");
462
+ if (mediumOverride === "citation") relParts.push("nofollow");
463
+ const rel = relParts.length > 0 ? relParts.join(" ") : void 0;
464
+ return (
465
+ // eslint-disable-next-line no-restricted-syntax
466
+ /* @__PURE__ */ jsx(
467
+ "a",
468
+ {
469
+ ref,
470
+ href: finalHref,
471
+ target: shouldOpenNewTab ? "_blank" : void 0,
472
+ rel,
473
+ onClick: handleClick,
474
+ ...props,
475
+ children
476
+ }
477
+ )
478
+ );
479
+ }
480
+ );
481
+ OutboundLink.displayName = "OutboundLink";
482
+ var PlayIcon = () => /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M8 5v14l11-7z" }) });
483
+ var SocialProofCard = forwardRef(
484
+ ({
485
+ variant = "simple",
486
+ content,
487
+ author,
488
+ media,
489
+ sourceIcon,
490
+ platform,
491
+ starRating,
492
+ date,
493
+ badges,
494
+ ctaText,
495
+ href,
496
+ className,
497
+ children,
498
+ animationDelay,
499
+ headline,
500
+ logo,
501
+ industry,
502
+ metrics,
503
+ ...props
504
+ }, ref) => {
505
+ const cardClass = clsx7(
506
+ "ds-social-card",
507
+ `ds-social-card--${variant}`,
508
+ animationDelay != null && "ds-social-card--animated",
509
+ className
510
+ );
511
+ const cardStyle = animationDelay != null ? { "--card-delay": `${animationDelay}ms` } : void 0;
512
+ if (variant === "rating-only") {
513
+ const inner = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "ds-social-card__rating-row", children: [
514
+ starRating != null && /* @__PURE__ */ jsx(StarRating, { value: starRating, size: "lg" }),
515
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__meta", children: [
516
+ /* @__PURE__ */ jsx("span", { className: "ds-social-card__name", children: author.name }),
517
+ (author.role || author.company) && /* @__PURE__ */ jsxs("span", { className: "ds-social-card__role", children: [
518
+ author.role,
519
+ author.role && author.company && " \xB7 ",
520
+ author.company
521
+ ] })
522
+ ] }),
523
+ platform && /* @__PURE__ */ jsx(PlatformBadge, { platform, variant: "icon-label", size: "sm" })
524
+ ] }) });
525
+ if (href) {
526
+ return /* @__PURE__ */ jsx(OutboundLink, { ref, href, context: "social-proof-card", className: cardClass, style: cardStyle, openInNewTab: false, ...props, children: inner });
527
+ }
528
+ return /* @__PURE__ */ jsx("div", { ref, className: cardClass, style: cardStyle, ...props, children: inner });
529
+ }
530
+ if (variant === "case-study") {
531
+ const defaultCta2 = ctaText || "Read Case Study \u2192";
532
+ const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
533
+ media && /* @__PURE__ */ jsx("div", { className: "ds-social-card__media", children: /* @__PURE__ */ jsx("img", { src: media.src, alt: media.alt || `${author.company} case study` }) }),
534
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__content", children: [
535
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__cs-header", children: [
536
+ logo && /* @__PURE__ */ jsx("div", { className: "ds-social-card__cs-logo", children: logo }),
537
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__cs-company", children: [
538
+ /* @__PURE__ */ jsx("span", { className: "ds-social-card__name", children: author.company || author.name }),
539
+ industry && /* @__PURE__ */ jsx("span", { className: "ds-social-card__cs-industry", children: industry })
540
+ ] })
541
+ ] }),
542
+ headline && /* @__PURE__ */ jsx("h3", { className: "ds-social-card__cs-headline", children: headline }),
543
+ metrics && metrics.length > 0 && /* @__PURE__ */ jsx("div", { className: "ds-social-card__cs-metrics", children: metrics.map((m, i) => /* @__PURE__ */ jsxs("div", { className: "ds-social-card__cs-metric", children: [
544
+ /* @__PURE__ */ jsxs("span", { className: "ds-social-card__cs-metric-value", children: [
545
+ m.prefix,
546
+ m.value,
547
+ m.suffix
548
+ ] }),
549
+ /* @__PURE__ */ jsx("span", { className: "ds-social-card__cs-metric-label", children: m.label })
550
+ ] }, i)) }),
551
+ content && /* @__PURE__ */ jsxs("blockquote", { className: "ds-social-card__quote ds-social-card__quote--excerpt", children: [
552
+ "\u201C",
553
+ content,
554
+ "\u201D"
555
+ ] }),
556
+ href && /* @__PURE__ */ jsx("div", { className: "ds-social-card__cta", children: defaultCta2 })
557
+ ] })
558
+ ] });
559
+ if (href) {
560
+ return /* @__PURE__ */ jsx(OutboundLink, { ref, href, context: "social-proof-card", className: cardClass, style: cardStyle, openInNewTab: false, ...props, children: inner });
561
+ }
562
+ return /* @__PURE__ */ jsx("div", { ref, className: cardClass, style: cardStyle, ...props, children: inner });
563
+ }
564
+ if (variant === "video") {
565
+ const defaultCta2 = ctaText || "Watch Video \u2192";
566
+ const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
567
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__media", children: [
568
+ media ? /* @__PURE__ */ jsx("img", { src: media.src, alt: media.alt || `${author.name} video` }) : /* @__PURE__ */ jsx("div", { className: "ds-social-card__media-placeholder" }),
569
+ /* @__PURE__ */ jsx("div", { className: "ds-social-card__play", children: /* @__PURE__ */ jsx("div", { className: "ds-social-card__play-icon", children: /* @__PURE__ */ jsx(PlayIcon, {}) }) }),
570
+ badges && badges.length > 0 && /* @__PURE__ */ jsx("div", { className: "ds-social-card__badges", children: badges.map((badge, idx) => /* @__PURE__ */ jsx("span", { className: "ds-social-card__badge", children: badge }, idx)) })
571
+ ] }),
572
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__content", children: [
573
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__author", children: [
574
+ author.avatar && /* @__PURE__ */ jsx("div", { className: "ds-social-card__avatar", children: /* @__PURE__ */ jsx("img", { src: author.avatar, alt: author.name }) }),
575
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__meta", children: [
576
+ /* @__PURE__ */ jsx("span", { className: "ds-social-card__name", children: author.name }),
577
+ (author.role || author.company) && /* @__PURE__ */ jsxs("span", { className: "ds-social-card__role", children: [
578
+ author.role,
579
+ author.role && author.company && " \xB7 ",
580
+ author.company
581
+ ] })
582
+ ] }),
583
+ platform && /* @__PURE__ */ jsx(PlatformBadge, { platform, variant: "icon-only", size: "sm" })
584
+ ] }),
585
+ content && /* @__PURE__ */ jsx("blockquote", { className: "ds-social-card__quote", children: content }),
586
+ href && /* @__PURE__ */ jsx("div", { className: "ds-social-card__cta", children: defaultCta2 })
587
+ ] })
588
+ ] });
589
+ if (href) {
590
+ return /* @__PURE__ */ jsx(OutboundLink, { ref, href, context: "social-proof-card", className: cardClass, style: cardStyle, openInNewTab: false, ...props, children: inner });
591
+ }
592
+ return /* @__PURE__ */ jsx("div", { ref, className: cardClass, style: cardStyle, ...props, children: inner });
593
+ }
594
+ if (variant === "social") {
595
+ const inner = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "ds-social-card__content", children: [
596
+ (platform || sourceIcon) && /* @__PURE__ */ jsx("div", { className: "ds-social-card__source", children: platform ? /* @__PURE__ */ jsx(PlatformBadge, { platform, variant: "icon-only", size: "sm" }) : sourceIcon }),
597
+ content && /* @__PURE__ */ jsx("blockquote", { className: "ds-social-card__quote ds-social-card__quote--clamp", children: content }),
598
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__author", children: [
599
+ author.avatar && /* @__PURE__ */ jsx("div", { className: "ds-social-card__avatar", children: /* @__PURE__ */ jsx("img", { src: author.avatar, alt: author.name }) }),
600
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__meta", children: [
601
+ /* @__PURE__ */ jsx("span", { className: "ds-social-card__name", children: author.name }),
602
+ (author.role || author.company) && /* @__PURE__ */ jsxs("span", { className: "ds-social-card__role", children: [
603
+ author.role,
604
+ author.role && author.company && " \xB7 ",
605
+ author.company
606
+ ] }),
607
+ date && /* @__PURE__ */ jsx("span", { className: "ds-social-card__role", children: date })
608
+ ] })
609
+ ] }),
610
+ starRating != null && /* @__PURE__ */ jsx(StarRating, { value: starRating, size: "sm" }),
611
+ children
612
+ ] }) });
613
+ if (href) {
614
+ return /* @__PURE__ */ jsx(OutboundLink, { ref, href, context: "social-proof-card", className: cardClass, style: cardStyle, openInNewTab: false, ...props, children: inner });
615
+ }
616
+ return /* @__PURE__ */ jsx("div", { ref, className: cardClass, style: cardStyle, ...props, children: inner });
617
+ }
618
+ const BadgeList = badges && badges.length > 0 && /* @__PURE__ */ jsx("div", { className: "ds-social-card__badges", children: badges.map((badge, idx) => /* @__PURE__ */ jsx("span", { className: "ds-social-card__badge", children: badge }, idx)) });
619
+ const defaultCta = ctaText || "Read Story \u2192";
620
+ const simpleInner = /* @__PURE__ */ jsxs("div", { className: "ds-social-card__content", children: [
621
+ /* @__PURE__ */ jsx("div", { className: "ds-social-card__deco-quote", "aria-hidden": "true", children: "\u201C" }),
622
+ (platform || sourceIcon) && /* @__PURE__ */ jsx("div", { className: "ds-social-card__source", children: platform ? /* @__PURE__ */ jsx(PlatformBadge, { platform, variant: "icon-only", size: "sm" }) : sourceIcon }),
623
+ BadgeList,
624
+ content && /* @__PURE__ */ jsx("blockquote", { className: "ds-social-card__quote", children: content }),
625
+ starRating != null && /* @__PURE__ */ jsx(StarRating, { value: starRating, size: "sm" }),
626
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__author", children: [
627
+ author.avatar && /* @__PURE__ */ jsx("div", { className: "ds-social-card__avatar", children: /* @__PURE__ */ jsx("img", { src: author.avatar, alt: author.name }) }),
628
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__meta", children: [
629
+ /* @__PURE__ */ jsxs("span", { className: "ds-social-card__name", children: [
630
+ author.name,
631
+ author.handle && /* @__PURE__ */ jsxs("span", { className: "ds-social-card__handle", children: [
632
+ "@",
633
+ author.handle
634
+ ] })
635
+ ] }),
636
+ (author.role || author.company) && /* @__PURE__ */ jsxs("span", { className: "ds-social-card__role", children: [
637
+ author.role,
638
+ author.role && author.company && " \xB7 ",
639
+ author.company
640
+ ] }),
641
+ date && /* @__PURE__ */ jsx("span", { className: "ds-social-card__role", children: date })
642
+ ] })
643
+ ] }),
644
+ children,
645
+ href && /* @__PURE__ */ jsx("div", { className: "ds-social-card__cta", children: defaultCta })
646
+ ] });
647
+ if (href) {
648
+ return /* @__PURE__ */ jsx(OutboundLink, { ref, href, context: "social-proof-card", className: cardClass, style: cardStyle, openInNewTab: false, ...props, children: simpleInner });
649
+ }
650
+ return /* @__PURE__ */ jsx("div", { ref, className: cardClass, style: cardStyle, ...props, children: simpleInner });
651
+ }
652
+ );
653
+ SocialProofCard.displayName = "SocialProofCard";
654
+
655
+ // src/tokens/spacing.ts
656
+ var SPACING = {
657
+ 1: "var(--space-1)",
658
+ 2: "var(--space-2)",
659
+ 3: "var(--space-3)",
660
+ 4: "var(--space-4)",
661
+ 5: "var(--space-5)",
662
+ 6: "var(--space-6)",
663
+ 8: "var(--space-8)",
664
+ 10: "var(--space-10)",
665
+ 12: "var(--space-12)",
666
+ 16: "var(--space-16)",
667
+ 20: "var(--space-20)"
668
+ };
669
+
670
+ // src/components/LayoutPrimitives/utils.ts
671
+ var SPACING_ALIASES = {
672
+ xs: "var(--space-2)",
673
+ sm: "var(--space-3)",
674
+ md: "var(--space-4)",
675
+ lg: "var(--space-6)",
676
+ xl: "var(--space-8)",
677
+ "2xl": "var(--space-12)"
678
+ };
679
+ function resolveSpacing(value) {
680
+ if (value === void 0) return void 0;
681
+ if (typeof value === "number" && SPACING[value]) {
682
+ return SPACING[value];
683
+ }
684
+ if (typeof value === "string" && value in SPACING_ALIASES) {
685
+ return SPACING_ALIASES[value];
686
+ }
687
+ return String(value);
688
+ }
689
+ function extractSpacingStyles(props) {
690
+ const styles = {};
691
+ if (props.m !== void 0) styles.margin = resolveSpacing(props.m);
692
+ if (props.mt !== void 0) styles.marginTop = resolveSpacing(props.mt);
693
+ if (props.mb !== void 0) styles.marginBottom = resolveSpacing(props.mb);
694
+ if (props.ml !== void 0) styles.marginLeft = resolveSpacing(props.ml);
695
+ if (props.mr !== void 0) styles.marginRight = resolveSpacing(props.mr);
696
+ if (props.mx !== void 0) {
697
+ styles.marginLeft = resolveSpacing(props.mx);
698
+ styles.marginRight = resolveSpacing(props.mx);
699
+ }
700
+ if (props.my !== void 0) {
701
+ styles.marginTop = resolveSpacing(props.my);
702
+ styles.marginBottom = resolveSpacing(props.my);
703
+ }
704
+ if (props.p !== void 0) styles.padding = resolveSpacing(props.p);
705
+ if (props.pt !== void 0) styles.paddingTop = resolveSpacing(props.pt);
706
+ if (props.pb !== void 0) styles.paddingBottom = resolveSpacing(props.pb);
707
+ if (props.pl !== void 0) styles.paddingLeft = resolveSpacing(props.pl);
708
+ if (props.pr !== void 0) styles.paddingRight = resolveSpacing(props.pr);
709
+ if (props.px !== void 0) {
710
+ styles.paddingLeft = resolveSpacing(props.px);
711
+ styles.paddingRight = resolveSpacing(props.px);
712
+ }
713
+ if (props.py !== void 0) {
714
+ styles.paddingTop = resolveSpacing(props.py);
715
+ styles.paddingBottom = resolveSpacing(props.py);
716
+ }
717
+ if (props.gap !== void 0) styles.gap = resolveSpacing(props.gap);
718
+ return styles;
719
+ }
720
+ var Box = forwardRef(
721
+ ({ as: Component = "div", className, style, children, ...props }, ref) => {
722
+ const spacingStyles = extractSpacingStyles(props);
723
+ const { m, mt, mb, ml, mr, mx, my, p, pt, pb, pl, pr, px, py, gap, ...domProps } = props;
724
+ return /* @__PURE__ */ jsx(
725
+ Component,
726
+ {
727
+ ref,
728
+ className: clsx7("ds-box", className),
729
+ style: { ...spacingStyles, ...style },
730
+ ...domProps,
731
+ children
732
+ }
733
+ );
734
+ }
735
+ );
736
+ Box.displayName = "Box";
737
+ var CONTAINER_SIZE_MAP = {
738
+ sm: "768px",
739
+ // 48rem — max-w-3xl
740
+ md: "1024px",
741
+ // 64rem — max-w-5xl
742
+ lg: "1152px",
743
+ // 72rem — max-w-6xl
744
+ xl: "1280px",
745
+ // 80rem — max-w-7xl
746
+ full: "100%"
747
+ };
748
+ var Container = forwardRef(
749
+ ({ size, fluid, maxWidth, className, style, ...props }, ref) => {
750
+ let resolvedMaxWidth;
751
+ if (fluid) {
752
+ resolvedMaxWidth = "100%";
753
+ } else if (size) {
754
+ resolvedMaxWidth = CONTAINER_SIZE_MAP[size];
755
+ } else {
756
+ resolvedMaxWidth = maxWidth || "var(--container-default-max, 1200px)";
757
+ }
758
+ return /* @__PURE__ */ jsx(
759
+ Box,
760
+ {
761
+ ref,
762
+ className: clsx7("ds-container", className),
763
+ style: {
764
+ maxWidth: resolvedMaxWidth,
765
+ ...style
766
+ },
767
+ ...props
768
+ }
769
+ );
770
+ }
771
+ );
772
+ Container.displayName = "Container";
773
+ var SectionHeader = forwardRef(
774
+ ({ title, subtitle, eyebrow, align = "center", className, ...props }, ref) => {
775
+ if (!title && !subtitle && !eyebrow) return null;
776
+ return /* @__PURE__ */ jsxs(
777
+ "header",
778
+ {
779
+ ref,
780
+ className: clsx7("ds-section-header", `ds-section-header--${align}`, className),
781
+ ...props,
782
+ children: [
783
+ eyebrow && /* @__PURE__ */ jsx("span", { className: "ds-section-header__eyebrow", children: eyebrow }),
784
+ title && /* @__PURE__ */ jsx("h2", { className: "ds-section-header__title", children: title }),
785
+ subtitle && /* @__PURE__ */ jsx("p", { className: "ds-section-header__subtitle", children: subtitle })
786
+ ]
787
+ }
788
+ );
789
+ }
790
+ );
791
+ SectionHeader.displayName = "SectionHeader";
792
+ var SectionShell = forwardRef(
793
+ ({
794
+ className,
795
+ children,
796
+ background = "default",
797
+ padding = "md",
798
+ containerSize,
799
+ containerFluid = false,
800
+ ...props
801
+ }, ref) => {
802
+ return /* @__PURE__ */ jsx(
803
+ "section",
804
+ {
805
+ ref,
806
+ className: clsx7(
807
+ "ds-section",
808
+ `ds-section--bg-${background}`,
809
+ `ds-section--padding-${padding}`,
810
+ className
811
+ ),
812
+ ...props,
813
+ children: /* @__PURE__ */ jsx(
814
+ Container,
815
+ {
816
+ size: containerSize === "fluid" ? "full" : containerSize,
817
+ fluid: containerFluid || containerSize === "fluid",
818
+ children
819
+ }
820
+ )
821
+ }
822
+ );
823
+ }
824
+ );
825
+ SectionShell.displayName = "SectionShell";
826
+ var SocialProofGrid = forwardRef(
827
+ ({ columns = 3, masonry = false, staggered = false, className, children, ...props }, ref) => {
828
+ const enhancedChildren = staggered ? React5.Children.map(children, (child, index) => {
829
+ if (!React5.isValidElement(child)) return child;
830
+ const delay = Math.min(index * 50, 600);
831
+ const childProps = child.props;
832
+ return React5.cloneElement(child, {
833
+ style: { ...childProps.style, "--card-delay": `${delay}ms` },
834
+ className: clsx7(childProps.className, "ds-social-card--animated")
835
+ });
836
+ }) : children;
837
+ return /* @__PURE__ */ jsx(
838
+ SectionShell,
839
+ {
840
+ ref,
841
+ padding: "md",
842
+ className: clsx7("ds-social-proof", className),
843
+ ...props,
844
+ children: masonry ? /* @__PURE__ */ jsx("div", { className: "ds-social-masonry", children: enhancedChildren }) : /* @__PURE__ */ jsx("div", { className: clsx7("ds-social-grid", `ds-social-grid--${columns}-col`), children: enhancedChildren })
845
+ }
846
+ );
847
+ }
848
+ );
849
+ SocialProofGrid.displayName = "SocialProofGrid";
850
+ var LogoItemRender = ({ item, className }) => {
851
+ const content = item.logo ? item.logo : /* @__PURE__ */ jsx(
852
+ "img",
853
+ {
854
+ src: item.src,
855
+ alt: item.alt,
856
+ width: 120,
857
+ height: 48,
858
+ loading: "lazy",
859
+ decoding: "async",
860
+ style: { objectFit: "contain", width: "auto", height: "100%" }
861
+ }
862
+ );
863
+ const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
864
+ content,
865
+ item.badge && /* @__PURE__ */ jsx("span", { className: "ds-social-logos__badge", children: item.badge })
866
+ ] });
867
+ if (item.href) {
868
+ const isInternal = item.href.startsWith("/");
869
+ return /* @__PURE__ */ jsx(
870
+ OutboundLink,
871
+ {
872
+ href: item.href,
873
+ context: "social-proof-logo",
874
+ className: clsx7("ds-social-logos__item", className),
875
+ title: item.alt,
876
+ openInNewTab: !isInternal,
877
+ children: innerContent
878
+ }
879
+ );
880
+ }
881
+ return /* @__PURE__ */ jsx("div", { className: clsx7("ds-social-logos__item", className), title: item.alt, children: innerContent });
882
+ };
883
+ var SocialProofLogos = forwardRef(
884
+ ({ title, logos, variant = "grid", speed = 40, className, ...props }, ref) => {
885
+ return /* @__PURE__ */ jsxs(
886
+ SectionShell,
887
+ {
888
+ ref,
889
+ padding: "sm",
890
+ className: clsx7("ds-social-logos", className),
891
+ ...props,
892
+ children: [
893
+ title && /* @__PURE__ */ jsx(
894
+ "p",
895
+ {
896
+ className: "ds-section-header__eyebrow",
897
+ style: { textAlign: "center", marginBottom: "var(--space-8)" },
898
+ children: title
899
+ }
900
+ ),
901
+ variant === "marquee" ? /* @__PURE__ */ jsxs(
902
+ "div",
903
+ {
904
+ className: "ds-social-logos__marquee",
905
+ style: { "--marquee-duration": `${speed}s` },
906
+ children: [
907
+ /* @__PURE__ */ jsx("div", { className: "ds-social-logos__track", children: logos.map((item) => /* @__PURE__ */ jsx(LogoItemRender, { item }, `set1-${item.id}`)) }),
908
+ /* @__PURE__ */ jsx("div", { className: "ds-social-logos__track", "aria-hidden": "true", children: logos.map((item) => /* @__PURE__ */ jsx(LogoItemRender, { item }, `set2-${item.id}`)) })
909
+ ]
910
+ }
911
+ ) : /* @__PURE__ */ jsx("div", { className: "ds-social-grid ds-social-grid--4-col", style: { alignItems: "center" }, children: logos.map((item) => /* @__PURE__ */ jsx(LogoItemRender, { item }, item.id)) })
912
+ ]
913
+ }
914
+ );
915
+ }
916
+ );
917
+ SocialProofLogos.displayName = "SocialProofLogos";
918
+ var PlayIconLarge = () => /* @__PURE__ */ jsxs("svg", { width: "64", height: "64", viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
919
+ /* @__PURE__ */ jsx("circle", { cx: "32", cy: "32", r: "32", fill: "white", fillOpacity: "0.9" }),
920
+ /* @__PURE__ */ jsx("path", { d: "M42 32L26 41.2376L26 22.7624L42 32Z", fill: "black" })
921
+ ] });
922
+ var SocialProofFeatured = forwardRef(
923
+ ({
924
+ quote,
925
+ author,
926
+ media,
927
+ mediaSrc,
928
+ orientation = "horizontal",
929
+ featuredVariant = "standard",
930
+ starRating,
931
+ platform,
932
+ logo,
933
+ className,
934
+ ...props
935
+ }, ref) => {
936
+ const showMedia = media || mediaSrc;
937
+ const effectiveOrientation = featuredVariant === "spotlight" ? "vertical" : orientation;
938
+ return /* @__PURE__ */ jsx(
939
+ SectionShell,
940
+ {
941
+ ref,
942
+ padding: "md",
943
+ className: clsx7("ds-social-featured-section", className),
944
+ ...props,
945
+ children: /* @__PURE__ */ jsxs(
946
+ "div",
947
+ {
948
+ className: clsx7(
949
+ "ds-social-featured",
950
+ `ds-social-featured--${effectiveOrientation}`,
951
+ `ds-social-featured--${featuredVariant}`
952
+ ),
953
+ children: [
954
+ showMedia && featuredVariant !== "spotlight" && /* @__PURE__ */ jsx("div", { className: "ds-social-featured__media", children: media ? media : /* @__PURE__ */ jsxs(Fragment, { children: [
955
+ /* @__PURE__ */ jsx(
956
+ "img",
957
+ {
958
+ src: mediaSrc || "https://placehold.co/1920x1080/111/FFF?text=Video+Case+Study",
959
+ alt: `Case study by ${author.name}`,
960
+ style: { width: "100%", height: "100%", objectFit: "cover" }
961
+ }
962
+ ),
963
+ /* @__PURE__ */ jsx("div", { className: "ds-social-card__play", children: /* @__PURE__ */ jsx(PlayIconLarge, {}) })
964
+ ] }) }),
965
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-featured__content", children: [
966
+ logo && /* @__PURE__ */ jsx("div", { className: "ds-social-featured__logo", children: logo }),
967
+ /* @__PURE__ */ jsxs("blockquote", { className: "ds-social-featured__quote", children: [
968
+ "\u201C",
969
+ quote,
970
+ "\u201D"
971
+ ] }),
972
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-featured__author-large", children: [
973
+ author.avatar && /* @__PURE__ */ jsx("div", { className: "ds-social-card__avatar", children: /* @__PURE__ */ jsx("img", { src: author.avatar, alt: author.name }) }),
974
+ /* @__PURE__ */ jsxs("div", { className: "ds-social-card__meta", children: [
975
+ /* @__PURE__ */ jsx("span", { className: "ds-social-card__name", children: author.name }),
976
+ /* @__PURE__ */ jsxs("span", { className: "ds-social-card__role", children: [
977
+ author.role,
978
+ author.role && author.company && ", ",
979
+ author.company
980
+ ] })
981
+ ] })
982
+ ] }),
983
+ (starRating != null || platform) && /* @__PURE__ */ jsxs("div", { className: "ds-social-featured__trust", children: [
984
+ starRating != null && /* @__PURE__ */ jsx(StarRating, { value: starRating, size: "md", showValue: true }),
985
+ platform && /* @__PURE__ */ jsx(PlatformBadge, { platform, variant: "icon-label", size: "md" })
986
+ ] })
987
+ ] })
988
+ ]
989
+ }
990
+ )
991
+ }
992
+ );
993
+ }
994
+ );
995
+ SocialProofFeatured.displayName = "SocialProofFeatured";
996
+
997
+ // src/tokens/motion.ts
998
+ var DURATION = {
999
+ // 250ms
1000
+ medium: 0.5};
1001
+ var EASING = {
1002
+ standard: [0.16, 1, 0.3, 1]};
1003
+ var VARIANTS = {
1004
+ fadeIn: {
1005
+ hidden: { opacity: 0 },
1006
+ visible: { opacity: 1, transition: { duration: DURATION.medium, ease: EASING.standard } }
1007
+ }};
1008
+ var SocialProofCarousel = forwardRef(
1009
+ ({ children, className, ...props }, ref) => {
1010
+ return /* @__PURE__ */ jsx(
1011
+ SectionShell,
1012
+ {
1013
+ ref,
1014
+ padding: "none",
1015
+ containerFluid: true,
1016
+ className: clsx7("ds-social-carousel", className),
1017
+ ...props,
1018
+ children: /* @__PURE__ */ jsxs(
1019
+ motion.div,
1020
+ {
1021
+ className: "ds-social-carousel__track",
1022
+ variants: VARIANTS.fadeIn,
1023
+ initial: "hidden",
1024
+ whileInView: "visible",
1025
+ viewport: { once: true, margin: "-10%" },
1026
+ children: [
1027
+ children,
1028
+ children
1029
+ ]
1030
+ }
1031
+ )
1032
+ }
1033
+ );
1034
+ }
1035
+ );
1036
+ SocialProofCarousel.displayName = "SocialProofCarousel";
1037
+ function getShortsEmbedUrl(url) {
1038
+ const match = url.match(/(?:youtube\.com\/shorts\/|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]+)/);
1039
+ if (match) {
1040
+ return `https://www.youtube-nocookie.com/embed/${match[1]}?rel=0&modestbranding=1&playsinline=1&controls=1`;
1041
+ }
1042
+ return url.replace("youtube.com", "youtube-nocookie.com") + (url.includes("?") ? "&" : "?") + "rel=0&modestbranding=1&playsinline=1";
1043
+ }
1044
+ function VerticalVideoGrid({ urls, className }) {
1045
+ if (!urls || urls.length === 0) return null;
1046
+ return /* @__PURE__ */ jsx(SectionShell, { className: clsx7("ds-vertical-video-grid my-16", className), children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 max-w-6xl mx-auto", children: urls.map((url, i) => /* @__PURE__ */ jsx(
1047
+ "div",
1048
+ {
1049
+ className: "relative w-full overflow-hidden rounded-[20px] shadow-lg border border-white/10 bg-black",
1050
+ style: { aspectRatio: "9/16" },
1051
+ children: /* @__PURE__ */ jsx(
1052
+ "iframe",
1053
+ {
1054
+ src: getShortsEmbedUrl(url),
1055
+ title: `Short testimonial ${i + 1}`,
1056
+ className: "absolute inset-0 w-full h-full",
1057
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
1058
+ allowFullScreen: true,
1059
+ loading: "lazy"
1060
+ }
1061
+ )
1062
+ },
1063
+ i
1064
+ )) }) });
1065
+ }
1066
+
1067
+ // src/components/SocialProof/index.ts
1068
+ var SocialProof = {
1069
+ Card: SocialProofCard,
1070
+ Grid: SocialProofGrid,
1071
+ Logos: SocialProofLogos,
1072
+ Featured: SocialProofFeatured,
1073
+ Carousel: SocialProofCarousel,
1074
+ VerticalGrid: VerticalVideoGrid
1075
+ };
1076
+ function getEmbedUrl(src) {
1077
+ const ytMatch = src.match(
1078
+ /(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]+)/
1079
+ );
1080
+ if (ytMatch) return `https://www.youtube-nocookie.com/embed/${ytMatch[1]}?autoplay=1&rel=0`;
1081
+ const vimeoMatch = src.match(/(?:vimeo\.com\/)(\d+)/);
1082
+ if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}?autoplay=1`;
1083
+ const loomMatch = src.match(/(?:loom\.com\/share\/)([a-zA-Z0-9]+)/);
1084
+ if (loomMatch) return `https://www.loom.com/embed/${loomMatch[1]}?autoplay=1`;
1085
+ return src;
1086
+ }
1087
+ var PlayIcon2 = () => /* @__PURE__ */ jsxs("svg", { width: "64", height: "64", viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
1088
+ /* @__PURE__ */ jsx("circle", { cx: "32", cy: "32", r: "32", className: "ds-video-lightbox__play-bg" }),
1089
+ /* @__PURE__ */ jsx("path", { d: "M26 20v24l20-12L26 20z", fill: "white" })
1090
+ ] });
1091
+ var CloseIcon = () => /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
1092
+ /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1093
+ /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1094
+ ] });
1095
+ var VideoLightbox = forwardRef(
1096
+ ({
1097
+ videoUrl,
1098
+ thumbnailSrc,
1099
+ thumbnailAlt,
1100
+ title = "Video",
1101
+ trigger,
1102
+ className,
1103
+ onPlay
1104
+ }, ref) => {
1105
+ const [open, setOpen] = useState(false);
1106
+ const handleOpen = useCallback(() => {
1107
+ setOpen(true);
1108
+ onPlay?.();
1109
+ }, [onPlay]);
1110
+ return /* @__PURE__ */ jsx("div", { ref, className: clsx7("ds-video-lightbox", className), children: /* @__PURE__ */ jsxs(Dialog.Root, { open, onOpenChange: setOpen, children: [
1111
+ /* @__PURE__ */ jsx(
1112
+ Dialog.Trigger,
1113
+ {
1114
+ className: "ds-video-lightbox__trigger",
1115
+ onClick: handleOpen,
1116
+ children: trigger || /* @__PURE__ */ jsxs("div", { className: "ds-video-lightbox__thumbnail-wrap", children: [
1117
+ thumbnailSrc ? /* @__PURE__ */ jsx(
1118
+ "img",
1119
+ {
1120
+ src: thumbnailSrc,
1121
+ alt: thumbnailAlt || `Play: ${title}`,
1122
+ className: "ds-video-lightbox__thumbnail",
1123
+ loading: "lazy",
1124
+ decoding: "async"
1125
+ }
1126
+ ) : /* @__PURE__ */ jsx("div", { className: "ds-video-lightbox__placeholder" }),
1127
+ /* @__PURE__ */ jsx("div", { className: "ds-video-lightbox__overlay", children: /* @__PURE__ */ jsx("div", { className: "ds-video-lightbox__play-btn", children: /* @__PURE__ */ jsx(PlayIcon2, {}) }) })
1128
+ ] })
1129
+ }
1130
+ ),
1131
+ /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
1132
+ /* @__PURE__ */ jsx(Dialog.Backdrop, { className: "ds-video-lightbox__backdrop" }),
1133
+ /* @__PURE__ */ jsxs(Dialog.Popup, { className: "ds-video-lightbox__popup", children: [
1134
+ /* @__PURE__ */ jsx(Dialog.Close, { className: "ds-video-lightbox__close", "aria-label": "Close video", children: /* @__PURE__ */ jsx(CloseIcon, {}) }),
1135
+ /* @__PURE__ */ jsx(Dialog.Title, { className: "ds-sr-only", children: title }),
1136
+ /* @__PURE__ */ jsx("div", { className: "ds-video-lightbox__iframe-wrap", children: open && /* @__PURE__ */ jsx(
1137
+ "iframe",
1138
+ {
1139
+ src: getEmbedUrl(videoUrl),
1140
+ title,
1141
+ className: "ds-video-lightbox__iframe",
1142
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
1143
+ allowFullScreen: true
1144
+ }
1145
+ ) })
1146
+ ] })
1147
+ ] })
1148
+ ] }) });
1149
+ }
1150
+ );
1151
+ VideoLightbox.displayName = "VideoLightbox";
1152
+ var MetricCounter = forwardRef(
1153
+ ({
1154
+ value,
1155
+ prefix = "",
1156
+ suffix = "",
1157
+ duration = 1500,
1158
+ decimals = 0,
1159
+ label,
1160
+ className,
1161
+ ...props
1162
+ }, ref) => {
1163
+ const [displayValue, setDisplayValue] = useState(0);
1164
+ const [hasAnimated, setHasAnimated] = useState(false);
1165
+ const containerRef = useRef(null);
1166
+ const prefersReducedMotion = useRef(false);
1167
+ useEffect(() => {
1168
+ prefersReducedMotion.current = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1169
+ if (prefersReducedMotion.current) {
1170
+ setDisplayValue(value);
1171
+ setHasAnimated(true);
1172
+ return;
1173
+ }
1174
+ const observer = new IntersectionObserver(
1175
+ (entries) => {
1176
+ if (entries[0].isIntersecting && !hasAnimated) {
1177
+ startAnimation();
1178
+ observer.disconnect();
1179
+ }
1180
+ },
1181
+ { threshold: 0.5 }
1182
+ );
1183
+ if (containerRef.current) {
1184
+ observer.observe(containerRef.current);
1185
+ }
1186
+ return () => observer.disconnect();
1187
+ }, [value, hasAnimated]);
1188
+ const startAnimation = () => {
1189
+ let startTime;
1190
+ setHasAnimated(true);
1191
+ const easeOutExpo = (t) => {
1192
+ return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
1193
+ };
1194
+ const animate = (currentTime) => {
1195
+ if (!startTime) startTime = currentTime;
1196
+ const progress = Math.min((currentTime - startTime) / duration, 1);
1197
+ const currentMultiplier = easeOutExpo(progress);
1198
+ const nextValue = value * currentMultiplier;
1199
+ setDisplayValue(nextValue);
1200
+ if (progress < 1) {
1201
+ requestAnimationFrame(animate);
1202
+ } else {
1203
+ setDisplayValue(value);
1204
+ }
1205
+ };
1206
+ requestAnimationFrame(animate);
1207
+ };
1208
+ const formattedValue = displayValue.toLocaleString(void 0, {
1209
+ minimumFractionDigits: decimals,
1210
+ maximumFractionDigits: decimals
1211
+ });
1212
+ return /* @__PURE__ */ jsxs(
1213
+ "div",
1214
+ {
1215
+ ref: (node) => {
1216
+ containerRef.current = node;
1217
+ if (typeof ref === "function") ref(node);
1218
+ else if (ref) ref.current = node;
1219
+ },
1220
+ className: clsx7("ds-metric-counter", className),
1221
+ ...props,
1222
+ children: [
1223
+ /* @__PURE__ */ jsxs("div", { className: "ds-metric-counter__value-wrapper", children: [
1224
+ prefix && /* @__PURE__ */ jsx("span", { className: "ds-metric-counter__prefix", children: prefix }),
1225
+ /* @__PURE__ */ jsx("span", { className: "ds-metric-counter__value", children: formattedValue }),
1226
+ suffix && /* @__PURE__ */ jsx("span", { className: "ds-metric-counter__suffix", children: suffix })
1227
+ ] }),
1228
+ label && /* @__PURE__ */ jsx("div", { className: "ds-metric-counter__label", children: label })
1229
+ ]
1230
+ }
1231
+ );
1232
+ }
1233
+ );
1234
+ MetricCounter.displayName = "MetricCounter";
1235
+
1236
+ export { MetricCounter, PlatformBadge, SocialProof, SocialProofCard, SocialProofCarousel, SocialProofFeatured, SocialProofGrid, SocialProofLogos, StarRating, VerticalVideoGrid, VideoLightbox };
8
1237
  //# sourceMappingURL=out.js.map
9
1238
  //# sourceMappingURL=index.js.map