@sonordev/agency-site-kit 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/README.md +302 -0
  2. package/bin/setup.mjs +79 -0
  3. package/dist/{chunk-RXBK2EOE.js → chunk-4IES23GV.js} +3 -3
  4. package/dist/{chunk-RXBK2EOE.js.map → chunk-4IES23GV.js.map} +1 -1
  5. package/dist/chunk-4N7ENJ7L.cjs +108 -0
  6. package/dist/chunk-4N7ENJ7L.cjs.map +1 -0
  7. package/dist/{chunk-WNR4KNG4.cjs → chunk-5MEZU3OG.cjs} +4 -4
  8. package/dist/{chunk-WNR4KNG4.cjs.map → chunk-5MEZU3OG.cjs.map} +1 -1
  9. package/dist/chunk-7ZHRMWJU.cjs +306 -0
  10. package/dist/chunk-7ZHRMWJU.cjs.map +1 -0
  11. package/dist/chunk-CVT7I5BQ.js +71 -0
  12. package/dist/chunk-CVT7I5BQ.js.map +1 -0
  13. package/dist/chunk-HQGAX2LI.cjs +8 -0
  14. package/dist/chunk-HQGAX2LI.cjs.map +1 -0
  15. package/dist/chunk-KXLROAO5.js +291 -0
  16. package/dist/chunk-KXLROAO5.js.map +1 -0
  17. package/dist/chunk-L4EOQVRJ.js +6 -0
  18. package/dist/chunk-L4EOQVRJ.js.map +1 -0
  19. package/dist/chunk-L7E3UHQC.cjs +535 -0
  20. package/dist/chunk-L7E3UHQC.cjs.map +1 -0
  21. package/dist/chunk-NI4FVCLS.cjs +32 -0
  22. package/dist/chunk-NI4FVCLS.cjs.map +1 -0
  23. package/dist/chunk-NIZJLONK.js +106 -0
  24. package/dist/chunk-NIZJLONK.js.map +1 -0
  25. package/dist/chunk-QDXZ27R7.js +33 -0
  26. package/dist/chunk-QDXZ27R7.js.map +1 -0
  27. package/dist/{chunk-TVFXN6W6.js → chunk-QL6KVIFR.js} +8 -4
  28. package/dist/chunk-QL6KVIFR.js.map +1 -0
  29. package/dist/chunk-UNTOEWQL.js +504 -0
  30. package/dist/chunk-UNTOEWQL.js.map +1 -0
  31. package/dist/chunk-XJ434N7I.js +30 -0
  32. package/dist/chunk-XJ434N7I.js.map +1 -0
  33. package/dist/chunk-XLK77USA.js +45 -0
  34. package/dist/chunk-XLK77USA.js.map +1 -0
  35. package/dist/{chunk-EE75WRCM.cjs → chunk-XOWSXZYW.cjs} +8 -4
  36. package/dist/chunk-XOWSXZYW.cjs.map +1 -0
  37. package/dist/chunk-ZINKVJQU.js +67 -0
  38. package/dist/chunk-ZINKVJQU.js.map +1 -0
  39. package/dist/index.cjs +29 -30
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.cts +17 -9
  42. package/dist/index.d.ts +17 -9
  43. package/dist/index.js +7 -8
  44. package/dist/index.js.map +1 -1
  45. package/dist/layout/index.cjs +3 -3
  46. package/dist/layout/index.d.cts +1 -1
  47. package/dist/layout/index.d.ts +1 -1
  48. package/dist/layout/index.js +2 -2
  49. package/dist/portfolio/client.cjs +342 -12
  50. package/dist/portfolio/client.cjs.map +1 -1
  51. package/dist/portfolio/client.d.cts +11 -88
  52. package/dist/portfolio/client.d.ts +11 -88
  53. package/dist/portfolio/client.js +150 -4
  54. package/dist/portfolio/client.js.map +1 -1
  55. package/dist/portfolio/components/PortfolioAnalytics.cjs +87 -0
  56. package/dist/portfolio/components/PortfolioAnalytics.cjs.map +1 -0
  57. package/dist/portfolio/components/PortfolioAnalytics.d.cts +5 -0
  58. package/dist/portfolio/components/PortfolioAnalytics.d.ts +5 -0
  59. package/dist/portfolio/components/PortfolioAnalytics.js +9 -0
  60. package/dist/portfolio/components/PortfolioAnalytics.js.map +1 -0
  61. package/dist/portfolio/components/PortfolioErrorFallback.cjs +65 -0
  62. package/dist/portfolio/components/PortfolioErrorFallback.cjs.map +1 -0
  63. package/dist/portfolio/components/PortfolioErrorFallback.d.cts +22 -0
  64. package/dist/portfolio/components/PortfolioErrorFallback.d.ts +22 -0
  65. package/dist/portfolio/components/PortfolioErrorFallback.js +9 -0
  66. package/dist/portfolio/components/PortfolioErrorFallback.js.map +1 -0
  67. package/dist/portfolio/components/PortfolioLeadCTA.cjs +91 -0
  68. package/dist/portfolio/components/PortfolioLeadCTA.cjs.map +1 -0
  69. package/dist/portfolio/components/PortfolioLeadCTA.d.cts +34 -0
  70. package/dist/portfolio/components/PortfolioLeadCTA.d.ts +34 -0
  71. package/dist/portfolio/components/PortfolioLeadCTA.js +9 -0
  72. package/dist/portfolio/components/PortfolioLeadCTA.js.map +1 -0
  73. package/dist/portfolio/index.cjs +19 -19
  74. package/dist/portfolio/index.d.cts +133 -7
  75. package/dist/portfolio/index.d.ts +133 -7
  76. package/dist/portfolio/index.js +6 -6
  77. package/dist/portfolio/primitives/AnimatedCounter.cjs +88 -0
  78. package/dist/portfolio/primitives/AnimatedCounter.cjs.map +1 -0
  79. package/dist/portfolio/primitives/AnimatedCounter.d.cts +22 -0
  80. package/dist/portfolio/primitives/AnimatedCounter.d.ts +22 -0
  81. package/dist/portfolio/primitives/AnimatedCounter.js +68 -0
  82. package/dist/portfolio/primitives/AnimatedCounter.js.map +1 -0
  83. package/dist/portfolio/primitives/AnnotatedImage.cjs +320 -0
  84. package/dist/portfolio/primitives/AnnotatedImage.cjs.map +1 -0
  85. package/dist/portfolio/primitives/AnnotatedImage.d.cts +18 -0
  86. package/dist/portfolio/primitives/AnnotatedImage.d.ts +18 -0
  87. package/dist/portfolio/primitives/AnnotatedImage.js +264 -0
  88. package/dist/portfolio/primitives/AnnotatedImage.js.map +1 -0
  89. package/dist/portfolio/primitives/BeforeAfterSlider.cjs +348 -0
  90. package/dist/portfolio/primitives/BeforeAfterSlider.cjs.map +1 -0
  91. package/dist/portfolio/primitives/BeforeAfterSlider.d.cts +13 -0
  92. package/dist/portfolio/primitives/BeforeAfterSlider.d.ts +13 -0
  93. package/dist/portfolio/primitives/BeforeAfterSlider.js +292 -0
  94. package/dist/portfolio/primitives/BeforeAfterSlider.js.map +1 -0
  95. package/dist/portfolio/primitives/DeviceTrifolio.cjs +298 -0
  96. package/dist/portfolio/primitives/DeviceTrifolio.cjs.map +1 -0
  97. package/dist/portfolio/primitives/DeviceTrifolio.d.cts +14 -0
  98. package/dist/portfolio/primitives/DeviceTrifolio.d.ts +14 -0
  99. package/dist/portfolio/primitives/DeviceTrifolio.js +242 -0
  100. package/dist/portfolio/primitives/DeviceTrifolio.js.map +1 -0
  101. package/dist/portfolio/primitives/FrequencyBarSkeleton.cjs +88 -0
  102. package/dist/portfolio/primitives/FrequencyBarSkeleton.cjs.map +1 -0
  103. package/dist/portfolio/primitives/FrequencyBarSkeleton.d.cts +10 -0
  104. package/dist/portfolio/primitives/FrequencyBarSkeleton.d.ts +10 -0
  105. package/dist/portfolio/primitives/FrequencyBarSkeleton.js +68 -0
  106. package/dist/portfolio/primitives/FrequencyBarSkeleton.js.map +1 -0
  107. package/dist/portfolio/primitives/GlassCard.cjs +45 -0
  108. package/dist/portfolio/primitives/GlassCard.cjs.map +1 -0
  109. package/dist/portfolio/primitives/GlassCard.d.cts +11 -0
  110. package/dist/portfolio/primitives/GlassCard.d.ts +11 -0
  111. package/dist/portfolio/primitives/GlassCard.js +43 -0
  112. package/dist/portfolio/primitives/GlassCard.js.map +1 -0
  113. package/dist/portfolio/primitives/MetricBadge.cjs +74 -0
  114. package/dist/portfolio/primitives/MetricBadge.cjs.map +1 -0
  115. package/dist/portfolio/primitives/MetricBadge.d.cts +9 -0
  116. package/dist/portfolio/primitives/MetricBadge.d.ts +9 -0
  117. package/dist/portfolio/primitives/MetricBadge.js +54 -0
  118. package/dist/portfolio/primitives/MetricBadge.js.map +1 -0
  119. package/dist/portfolio/primitives/SVGChart.cjs +316 -0
  120. package/dist/portfolio/primitives/SVGChart.cjs.map +1 -0
  121. package/dist/portfolio/primitives/SVGChart.d.cts +18 -0
  122. package/dist/portfolio/primitives/SVGChart.d.ts +18 -0
  123. package/dist/portfolio/primitives/SVGChart.js +296 -0
  124. package/dist/portfolio/primitives/SVGChart.js.map +1 -0
  125. package/dist/portfolio/primitives/ScrollReveal.cjs +97 -0
  126. package/dist/portfolio/primitives/ScrollReveal.cjs.map +1 -0
  127. package/dist/portfolio/primitives/ScrollReveal.d.cts +27 -0
  128. package/dist/portfolio/primitives/ScrollReveal.d.ts +27 -0
  129. package/dist/portfolio/primitives/ScrollReveal.js +77 -0
  130. package/dist/portfolio/primitives/ScrollReveal.js.map +1 -0
  131. package/dist/portfolio/primitives/SplitHeadline.cjs +107 -0
  132. package/dist/portfolio/primitives/SplitHeadline.cjs.map +1 -0
  133. package/dist/portfolio/primitives/SplitHeadline.d.cts +24 -0
  134. package/dist/portfolio/primitives/SplitHeadline.d.ts +24 -0
  135. package/dist/portfolio/primitives/SplitHeadline.js +87 -0
  136. package/dist/portfolio/primitives/SplitHeadline.js.map +1 -0
  137. package/dist/portfolio/sections/BeforeAfterSection.cjs +271 -0
  138. package/dist/portfolio/sections/BeforeAfterSection.cjs.map +1 -0
  139. package/dist/portfolio/sections/BeforeAfterSection.d.cts +9 -0
  140. package/dist/portfolio/sections/BeforeAfterSection.d.ts +9 -0
  141. package/dist/{BeforeAfterSection-6BHFLY4Y.js → portfolio/sections/BeforeAfterSection.js} +66 -27
  142. package/dist/portfolio/sections/BeforeAfterSection.js.map +1 -0
  143. package/dist/portfolio/sections/CTASection.cjs +123 -0
  144. package/dist/portfolio/sections/CTASection.cjs.map +1 -0
  145. package/dist/portfolio/sections/CTASection.d.cts +9 -0
  146. package/dist/portfolio/sections/CTASection.d.ts +9 -0
  147. package/dist/portfolio/sections/CTASection.js +93 -0
  148. package/dist/portfolio/sections/CTASection.js.map +1 -0
  149. package/dist/{ChallengesSection-IZ3DHECS.cjs → portfolio/sections/ChallengesSection.cjs} +12 -6
  150. package/dist/portfolio/sections/ChallengesSection.cjs.map +1 -0
  151. package/dist/portfolio/sections/ChallengesSection.d.cts +9 -0
  152. package/dist/portfolio/sections/ChallengesSection.d.ts +9 -0
  153. package/dist/{ChallengesSection-GEQGVSJN.js → portfolio/sections/ChallengesSection.js} +5 -4
  154. package/dist/portfolio/sections/ChallengesSection.js.map +1 -0
  155. package/dist/portfolio/sections/ConversionFunnelSection.cjs +263 -0
  156. package/dist/portfolio/sections/ConversionFunnelSection.cjs.map +1 -0
  157. package/dist/portfolio/sections/ConversionFunnelSection.d.cts +9 -0
  158. package/dist/portfolio/sections/ConversionFunnelSection.d.ts +9 -0
  159. package/dist/{ConversionFunnelSection-D3GE4NKE.js → portfolio/sections/ConversionFunnelSection.js} +60 -56
  160. package/dist/portfolio/sections/ConversionFunnelSection.js.map +1 -0
  161. package/dist/{DesignSystemSection-KXIQXITF.cjs → portfolio/sections/DesignSystemSection.cjs} +13 -7
  162. package/dist/portfolio/sections/DesignSystemSection.cjs.map +1 -0
  163. package/dist/portfolio/sections/DesignSystemSection.d.cts +32 -0
  164. package/dist/portfolio/sections/DesignSystemSection.d.ts +32 -0
  165. package/dist/{DesignSystemSection-2R5BRBGO.js → portfolio/sections/DesignSystemSection.js} +5 -4
  166. package/dist/portfolio/sections/DesignSystemSection.js.map +1 -0
  167. package/dist/{DetailsSection-TTUZAPZZ.cjs → portfolio/sections/DetailsSection.cjs} +12 -6
  168. package/dist/portfolio/sections/DetailsSection.cjs.map +1 -0
  169. package/dist/portfolio/sections/DetailsSection.d.cts +9 -0
  170. package/dist/portfolio/sections/DetailsSection.d.ts +9 -0
  171. package/dist/{DetailsSection-A6PZQUQL.js → portfolio/sections/DetailsSection.js} +5 -4
  172. package/dist/portfolio/sections/DetailsSection.js.map +1 -0
  173. package/dist/portfolio/sections/FeatureSpotlightSection.cjs +267 -0
  174. package/dist/portfolio/sections/FeatureSpotlightSection.cjs.map +1 -0
  175. package/dist/portfolio/sections/FeatureSpotlightSection.d.cts +9 -0
  176. package/dist/portfolio/sections/FeatureSpotlightSection.d.ts +9 -0
  177. package/dist/{FeatureSpotlightSection-B7P3JGNL.js → portfolio/sections/FeatureSpotlightSection.js} +39 -33
  178. package/dist/portfolio/sections/FeatureSpotlightSection.js.map +1 -0
  179. package/dist/portfolio/sections/GallerySection.cjs +321 -0
  180. package/dist/portfolio/sections/GallerySection.cjs.map +1 -0
  181. package/dist/portfolio/sections/GallerySection.d.cts +9 -0
  182. package/dist/portfolio/sections/GallerySection.d.ts +9 -0
  183. package/dist/{GallerySection-VMKORC47.js → portfolio/sections/GallerySection.js} +65 -18
  184. package/dist/portfolio/sections/GallerySection.js.map +1 -0
  185. package/dist/portfolio/sections/HeroSection.cjs +180 -0
  186. package/dist/portfolio/sections/HeroSection.cjs.map +1 -0
  187. package/dist/portfolio/sections/HeroSection.d.cts +15 -0
  188. package/dist/portfolio/sections/HeroSection.d.ts +15 -0
  189. package/dist/portfolio/sections/HeroSection.js +171 -0
  190. package/dist/portfolio/sections/HeroSection.js.map +1 -0
  191. package/dist/{MetricsTimelineSection-4L6DUHJ5.cjs → portfolio/sections/MetricsTimelineSection.cjs} +102 -61
  192. package/dist/portfolio/sections/MetricsTimelineSection.cjs.map +1 -0
  193. package/dist/portfolio/sections/MetricsTimelineSection.d.cts +9 -0
  194. package/dist/portfolio/sections/MetricsTimelineSection.d.ts +9 -0
  195. package/dist/{MetricsTimelineSection-6BT5GNFV.js → portfolio/sections/MetricsTimelineSection.js} +45 -29
  196. package/dist/portfolio/sections/MetricsTimelineSection.js.map +1 -0
  197. package/dist/{PerformanceSection-24TVVFZA.cjs → portfolio/sections/PerformanceSection.cjs} +136 -93
  198. package/dist/portfolio/sections/PerformanceSection.cjs.map +1 -0
  199. package/dist/portfolio/sections/PerformanceSection.d.cts +22 -0
  200. package/dist/portfolio/sections/PerformanceSection.d.ts +22 -0
  201. package/dist/{PerformanceSection-MGCEIXDX.js → portfolio/sections/PerformanceSection.js} +58 -40
  202. package/dist/portfolio/sections/PerformanceSection.js.map +1 -0
  203. package/dist/{ResultsSection-XLGMMQKY.cjs → portfolio/sections/ResultsSection.cjs} +22 -10
  204. package/dist/portfolio/sections/ResultsSection.cjs.map +1 -0
  205. package/dist/portfolio/sections/ResultsSection.d.cts +13 -0
  206. package/dist/portfolio/sections/ResultsSection.d.ts +13 -0
  207. package/dist/{ResultsSection-DFUJ5U6M.js → portfolio/sections/ResultsSection.js} +13 -7
  208. package/dist/portfolio/sections/ResultsSection.js.map +1 -0
  209. package/dist/portfolio/sections/ServicesSection.cjs +129 -0
  210. package/dist/portfolio/sections/ServicesSection.cjs.map +1 -0
  211. package/dist/portfolio/sections/ServicesSection.d.cts +9 -0
  212. package/dist/portfolio/sections/ServicesSection.d.ts +9 -0
  213. package/dist/portfolio/sections/ServicesSection.js +122 -0
  214. package/dist/portfolio/sections/ServicesSection.js.map +1 -0
  215. package/dist/{SiteArchitectureSection-J7BPBERH.cjs → portfolio/sections/SiteArchitectureSection.cjs} +116 -92
  216. package/dist/portfolio/sections/SiteArchitectureSection.cjs.map +1 -0
  217. package/dist/portfolio/sections/SiteArchitectureSection.d.cts +21 -0
  218. package/dist/portfolio/sections/SiteArchitectureSection.d.ts +21 -0
  219. package/dist/{SiteArchitectureSection-TE22OAWV.js → portfolio/sections/SiteArchitectureSection.js} +46 -47
  220. package/dist/portfolio/sections/SiteArchitectureSection.js.map +1 -0
  221. package/dist/{SpeedComparisonSection-EZKFQVGW.cjs → portfolio/sections/SpeedComparisonSection.cjs} +12 -6
  222. package/dist/portfolio/sections/SpeedComparisonSection.cjs.map +1 -0
  223. package/dist/portfolio/sections/SpeedComparisonSection.d.cts +20 -0
  224. package/dist/portfolio/sections/SpeedComparisonSection.d.ts +20 -0
  225. package/dist/{SpeedComparisonSection-Y3K7OFZQ.js → portfolio/sections/SpeedComparisonSection.js} +5 -4
  226. package/dist/portfolio/sections/SpeedComparisonSection.js.map +1 -0
  227. package/dist/portfolio/sections/StrategySection.cjs +233 -0
  228. package/dist/portfolio/sections/StrategySection.cjs.map +1 -0
  229. package/dist/portfolio/sections/StrategySection.d.cts +9 -0
  230. package/dist/portfolio/sections/StrategySection.d.ts +9 -0
  231. package/dist/{StrategySection-DI5RSCJU.js → portfolio/sections/StrategySection.js} +60 -26
  232. package/dist/portfolio/sections/StrategySection.js.map +1 -0
  233. package/dist/portfolio/sections/TeamSection.cjs +162 -0
  234. package/dist/portfolio/sections/TeamSection.cjs.map +1 -0
  235. package/dist/portfolio/sections/TeamSection.d.cts +9 -0
  236. package/dist/portfolio/sections/TeamSection.d.ts +9 -0
  237. package/dist/portfolio/sections/TeamSection.js +106 -0
  238. package/dist/portfolio/sections/TeamSection.js.map +1 -0
  239. package/dist/portfolio/sections/TechStackSection.cjs +106 -0
  240. package/dist/portfolio/sections/TechStackSection.cjs.map +1 -0
  241. package/dist/portfolio/sections/TechStackSection.d.cts +9 -0
  242. package/dist/portfolio/sections/TechStackSection.d.ts +9 -0
  243. package/dist/portfolio/sections/TechStackSection.js +99 -0
  244. package/dist/portfolio/sections/TechStackSection.js.map +1 -0
  245. package/dist/{TestimonialSection-XPTFUQIN.cjs → portfolio/sections/TestimonialSection.cjs} +47 -28
  246. package/dist/portfolio/sections/TestimonialSection.cjs.map +1 -0
  247. package/dist/portfolio/sections/TestimonialSection.d.cts +9 -0
  248. package/dist/portfolio/sections/TestimonialSection.d.ts +9 -0
  249. package/dist/{TestimonialSection-6RGSMXQB.js → portfolio/sections/TestimonialSection.js} +40 -27
  250. package/dist/portfolio/sections/TestimonialSection.js.map +1 -0
  251. package/dist/portfolio/sections/VideoSection.cjs +181 -0
  252. package/dist/portfolio/sections/VideoSection.cjs.map +1 -0
  253. package/dist/portfolio/sections/VideoSection.d.cts +9 -0
  254. package/dist/portfolio/sections/VideoSection.d.ts +9 -0
  255. package/dist/{VideoSection-4A2HC6K6.js → portfolio/sections/VideoSection.js} +21 -13
  256. package/dist/portfolio/sections/VideoSection.js.map +1 -0
  257. package/dist/portfolio/server.cjs +56 -139
  258. package/dist/portfolio/server.cjs.map +1 -1
  259. package/dist/portfolio/server.d.cts +157 -7
  260. package/dist/portfolio/server.d.ts +157 -7
  261. package/dist/portfolio/server.js +3 -137
  262. package/dist/portfolio/server.js.map +1 -1
  263. package/dist/preview.cjs +56 -0
  264. package/dist/preview.cjs.map +1 -0
  265. package/dist/preview.d.cts +31 -0
  266. package/dist/preview.d.ts +31 -0
  267. package/dist/preview.js +54 -0
  268. package/dist/preview.js.map +1 -0
  269. package/dist/{types-DL4t_Cfa.d.ts → types-0tVPy4pU.d.cts} +7 -1
  270. package/dist/{types-DL4t_Cfa.d.cts → types-0tVPy4pU.d.ts} +7 -1
  271. package/dist/types-D0nb6KAx.d.cts +299 -0
  272. package/dist/types-D0nb6KAx.d.ts +299 -0
  273. package/package.json +38 -14
  274. package/templates/api-portfolio-preview.ts +6 -0
  275. package/templates/api-revalidate.ts +5 -0
  276. package/templates/work-category-page.tsx +40 -0
  277. package/templates/work-error.tsx +3 -0
  278. package/templates/work-loading.tsx +1 -0
  279. package/templates/work-page.tsx +37 -0
  280. package/templates/work-slug-loading.tsx +1 -0
  281. package/templates/work-slug-page.tsx +41 -0
  282. package/dist/BeforeAfterSection-6BHFLY4Y.js.map +0 -1
  283. package/dist/BeforeAfterSection-JTORBR3A.cjs +0 -181
  284. package/dist/BeforeAfterSection-JTORBR3A.cjs.map +0 -1
  285. package/dist/CTASection-4JKLXEUF.cjs +0 -111
  286. package/dist/CTASection-4JKLXEUF.cjs.map +0 -1
  287. package/dist/CTASection-BJA72XIL.js +0 -106
  288. package/dist/CTASection-BJA72XIL.js.map +0 -1
  289. package/dist/ChallengesSection-GEQGVSJN.js.map +0 -1
  290. package/dist/ChallengesSection-IZ3DHECS.cjs.map +0 -1
  291. package/dist/ConversionFunnelSection-AUUSJ5HQ.cjs +0 -209
  292. package/dist/ConversionFunnelSection-AUUSJ5HQ.cjs.map +0 -1
  293. package/dist/ConversionFunnelSection-D3GE4NKE.js.map +0 -1
  294. package/dist/DesignSystemSection-2R5BRBGO.js.map +0 -1
  295. package/dist/DesignSystemSection-KXIQXITF.cjs.map +0 -1
  296. package/dist/DetailsSection-A6PZQUQL.js.map +0 -1
  297. package/dist/DetailsSection-TTUZAPZZ.cjs.map +0 -1
  298. package/dist/FeatureSpotlightSection-B7P3JGNL.js.map +0 -1
  299. package/dist/FeatureSpotlightSection-WRHXS7TU.cjs +0 -210
  300. package/dist/FeatureSpotlightSection-WRHXS7TU.cjs.map +0 -1
  301. package/dist/GallerySection-VMKORC47.js.map +0 -1
  302. package/dist/GallerySection-WJ4PQDBI.cjs +0 -219
  303. package/dist/GallerySection-WJ4PQDBI.cjs.map +0 -1
  304. package/dist/MetricsTimelineSection-4L6DUHJ5.cjs.map +0 -1
  305. package/dist/MetricsTimelineSection-6BT5GNFV.js.map +0 -1
  306. package/dist/PerformanceSection-24TVVFZA.cjs.map +0 -1
  307. package/dist/PerformanceSection-MGCEIXDX.js.map +0 -1
  308. package/dist/ResultsSection-DFUJ5U6M.js.map +0 -1
  309. package/dist/ResultsSection-XLGMMQKY.cjs.map +0 -1
  310. package/dist/ServicesSection-D5V3Q4GR.js +0 -118
  311. package/dist/ServicesSection-D5V3Q4GR.js.map +0 -1
  312. package/dist/ServicesSection-WJMGK2MF.cjs +0 -120
  313. package/dist/ServicesSection-WJMGK2MF.cjs.map +0 -1
  314. package/dist/SiteArchitectureSection-J7BPBERH.cjs.map +0 -1
  315. package/dist/SiteArchitectureSection-TE22OAWV.js.map +0 -1
  316. package/dist/SpeedComparisonSection-EZKFQVGW.cjs.map +0 -1
  317. package/dist/SpeedComparisonSection-Y3K7OFZQ.js.map +0 -1
  318. package/dist/StrategySection-CJ7Y6OFQ.cjs +0 -174
  319. package/dist/StrategySection-CJ7Y6OFQ.cjs.map +0 -1
  320. package/dist/StrategySection-DI5RSCJU.js.map +0 -1
  321. package/dist/TeamSection-DZVSNZE6.cjs +0 -112
  322. package/dist/TeamSection-DZVSNZE6.cjs.map +0 -1
  323. package/dist/TeamSection-HGKFW6PQ.js +0 -107
  324. package/dist/TeamSection-HGKFW6PQ.js.map +0 -1
  325. package/dist/TechStackSection-2AQ7RGY3.js +0 -93
  326. package/dist/TechStackSection-2AQ7RGY3.js.map +0 -1
  327. package/dist/TechStackSection-VTNNZR5V.cjs +0 -95
  328. package/dist/TechStackSection-VTNNZR5V.cjs.map +0 -1
  329. package/dist/TestimonialSection-6RGSMXQB.js.map +0 -1
  330. package/dist/TestimonialSection-XPTFUQIN.cjs.map +0 -1
  331. package/dist/VideoSection-4A2HC6K6.js.map +0 -1
  332. package/dist/VideoSection-G3DFS7UH.cjs +0 -118
  333. package/dist/VideoSection-G3DFS7UH.cjs.map +0 -1
  334. package/dist/chunk-2UNKXWQM.js +0 -630
  335. package/dist/chunk-2UNKXWQM.js.map +0 -1
  336. package/dist/chunk-2Y4O3LWM.js +0 -53
  337. package/dist/chunk-2Y4O3LWM.js.map +0 -1
  338. package/dist/chunk-7CFFAKDM.js +0 -74
  339. package/dist/chunk-7CFFAKDM.js.map +0 -1
  340. package/dist/chunk-APG2QSMB.js +0 -131
  341. package/dist/chunk-APG2QSMB.js.map +0 -1
  342. package/dist/chunk-EE75WRCM.cjs.map +0 -1
  343. package/dist/chunk-FDFVLYAM.cjs +0 -637
  344. package/dist/chunk-FDFVLYAM.cjs.map +0 -1
  345. package/dist/chunk-IKBK7HYX.cjs +0 -79
  346. package/dist/chunk-IKBK7HYX.cjs.map +0 -1
  347. package/dist/chunk-KEOHORIH.cjs +0 -79
  348. package/dist/chunk-KEOHORIH.cjs.map +0 -1
  349. package/dist/chunk-OA5ZM4OA.cjs +0 -139
  350. package/dist/chunk-OA5ZM4OA.cjs.map +0 -1
  351. package/dist/chunk-TVFXN6W6.js.map +0 -1
  352. package/dist/chunk-XCKXHK44.js +0 -15
  353. package/dist/chunk-XCKXHK44.js.map +0 -1
  354. package/dist/chunk-XONXEFJY.cjs +0 -58
  355. package/dist/chunk-XONXEFJY.cjs.map +0 -1
  356. package/dist/chunk-XQNJED46.cjs +0 -19
  357. package/dist/chunk-XQNJED46.cjs.map +0 -1
  358. package/dist/chunk-YB4B3OMC.js +0 -74
  359. package/dist/chunk-YB4B3OMC.js.map +0 -1
  360. package/dist/portfolio/sections.cjs +0 -20
  361. package/dist/portfolio/sections.cjs.map +0 -1
  362. package/dist/portfolio/sections.d.cts +0 -42
  363. package/dist/portfolio/sections.d.ts +0 -42
  364. package/dist/portfolio/sections.js +0 -4
  365. package/dist/portfolio/sections.js.map +0 -1
@@ -0,0 +1,296 @@
1
+ 'use client';
2
+ "use client";
3
+
4
+ // src/portfolio/components/primitives/SVGChart.tsx
5
+ import { useRef, useEffect, useState, useMemo, useCallback } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var EASE_IN_OUT = "cubic-bezier(0.455, 0.03, 0.515, 0.955)";
8
+ var EASE_BACK = "cubic-bezier(0.34, 1.56, 0.64, 1)";
9
+ function buildPath(points, close, plotHeight, plotBottom) {
10
+ if (points.length < 2) return "";
11
+ let d = `M ${points[0].x} ${points[0].y}`;
12
+ for (let i = 0; i < points.length - 1; i++) {
13
+ const p0 = points[Math.max(i - 1, 0)];
14
+ const p1 = points[i];
15
+ const p2 = points[i + 1];
16
+ const p3 = points[Math.min(i + 2, points.length - 1)];
17
+ const cp1x = p1.x + (p2.x - p0.x) / 6;
18
+ const cp1y = p1.y + (p2.y - p0.y) / 6;
19
+ const cp2x = p2.x - (p3.x - p1.x) / 6;
20
+ const cp2y = p2.y - (p3.y - p1.y) / 6;
21
+ d += ` C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${p2.x} ${p2.y}`;
22
+ }
23
+ if (close) {
24
+ const lastX = points[points.length - 1].x;
25
+ const firstX = points[0].x;
26
+ d += ` L ${lastX} ${plotBottom} L ${firstX} ${plotBottom} Z`;
27
+ }
28
+ return d;
29
+ }
30
+ function SVGChart({
31
+ dataPoints,
32
+ width: propWidth,
33
+ height: propHeight,
34
+ className = "",
35
+ color = "var(--sk-primary, #6366f1)",
36
+ showArea = true,
37
+ animateOnScroll = true
38
+ }) {
39
+ const containerRef = useRef(null);
40
+ const pathRef = useRef(null);
41
+ const areaRef = useRef(null);
42
+ const dotsRef = useRef(null);
43
+ const [dimensions, setDimensions] = useState({ width: propWidth || 600, height: propHeight || 300 });
44
+ const [tooltip, setTooltip] = useState(null);
45
+ useEffect(() => {
46
+ if (propWidth && propHeight) return;
47
+ const container = containerRef.current;
48
+ if (!container) return;
49
+ const update = () => {
50
+ const rect = container.getBoundingClientRect();
51
+ setDimensions({
52
+ width: propWidth || Math.round(rect.width),
53
+ height: propHeight || Math.round(rect.width * 0.5)
54
+ });
55
+ };
56
+ update();
57
+ const ro = new ResizeObserver(update);
58
+ ro.observe(container);
59
+ return () => ro.disconnect();
60
+ }, [propWidth, propHeight]);
61
+ const { width, height } = dimensions;
62
+ const padding = { top: 20, right: 20, bottom: 40, left: 50 };
63
+ const plotWidth = width - padding.left - padding.right;
64
+ const plotHeight = height - padding.top - padding.bottom;
65
+ const { points, yMin, yMax, yGridLines } = useMemo(() => {
66
+ if (dataPoints.length === 0) return { points: [], yMin: 0, yMax: 100, yGridLines: [] };
67
+ const values = dataPoints.map((d) => d.value);
68
+ const rawMin = Math.min(...values);
69
+ const rawMax = Math.max(...values);
70
+ const range = rawMax - rawMin || 1;
71
+ const yMin2 = rawMin - range * 0.1;
72
+ const yMax2 = rawMax + range * 0.1;
73
+ const pts = dataPoints.map((d, i) => ({
74
+ x: padding.left + i / (dataPoints.length - 1) * plotWidth,
75
+ y: padding.top + plotHeight - (d.value - yMin2) / (yMax2 - yMin2) * plotHeight
76
+ }));
77
+ const gridCount = 5;
78
+ const yGridLines2 = Array.from({ length: gridCount }, (_, i) => {
79
+ const val = yMin2 + (yMax2 - yMin2) / (gridCount - 1) * i;
80
+ const y = padding.top + plotHeight - (val - yMin2) / (yMax2 - yMin2) * plotHeight;
81
+ return { val, y };
82
+ });
83
+ return { points: pts, yMin: yMin2, yMax: yMax2, yGridLines: yGridLines2 };
84
+ }, [dataPoints, plotWidth, plotHeight, padding.left, padding.top]);
85
+ const linePath = useMemo(
86
+ () => buildPath(points, false, plotHeight, padding.top + plotHeight),
87
+ [points, plotHeight, padding.top]
88
+ );
89
+ const areaPath = useMemo(
90
+ () => buildPath(points, true, plotHeight, padding.top + plotHeight),
91
+ [points, plotHeight, padding.top]
92
+ );
93
+ useEffect(() => {
94
+ const container = containerRef.current;
95
+ const path = pathRef.current;
96
+ const area = areaRef.current;
97
+ const dotsGroup = dotsRef.current;
98
+ if (!container || !path) return;
99
+ const dots = dotsGroup ? Array.from(dotsGroup.children) : [];
100
+ const showFinal = () => {
101
+ path.style.strokeDashoffset = "0";
102
+ if (area) area.style.opacity = "1";
103
+ for (const dot of dots) {
104
+ dot.style.transform = "scale(1)";
105
+ dot.style.opacity = "1";
106
+ }
107
+ };
108
+ const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
109
+ if (prefersReducedMotion || !animateOnScroll) {
110
+ showFinal();
111
+ return;
112
+ }
113
+ const rect = container.getBoundingClientRect();
114
+ if (rect.top < window.innerHeight && rect.bottom > 0) {
115
+ showFinal();
116
+ return;
117
+ }
118
+ const pathLength = path.getTotalLength();
119
+ path.style.strokeDasharray = `${pathLength}`;
120
+ path.style.strokeDashoffset = `${pathLength}`;
121
+ if (area) area.style.opacity = "0";
122
+ for (const dot of dots) {
123
+ dot.style.transformBox = "fill-box";
124
+ dot.style.transformOrigin = "center";
125
+ dot.style.transform = "scale(0)";
126
+ dot.style.opacity = "0";
127
+ }
128
+ const io = new IntersectionObserver(
129
+ ([entry]) => {
130
+ if (!entry.isIntersecting) return;
131
+ path.style.transition = `stroke-dashoffset 1.2s ${EASE_IN_OUT}`;
132
+ path.style.strokeDashoffset = "0";
133
+ if (area) {
134
+ area.style.transition = "opacity 0.6s ease-in 0.6s";
135
+ area.style.opacity = "1";
136
+ }
137
+ dots.forEach((dot, i) => {
138
+ const dotDelay = 0.8 + i * 0.06;
139
+ dot.style.transition = `transform 0.3s ${EASE_BACK} ${dotDelay}s, opacity 0.3s ${EASE_BACK} ${dotDelay}s`;
140
+ dot.style.transform = "scale(1)";
141
+ dot.style.opacity = "1";
142
+ });
143
+ io.disconnect();
144
+ },
145
+ { rootMargin: "0px 0px -20% 0px" }
146
+ // ≈ 'top 80%' trigger start
147
+ );
148
+ io.observe(container);
149
+ return () => {
150
+ io.disconnect();
151
+ path.style.strokeDasharray = "";
152
+ path.style.strokeDashoffset = "";
153
+ path.style.transition = "";
154
+ if (area) {
155
+ area.style.transition = "";
156
+ area.style.opacity = "";
157
+ }
158
+ for (const dot of dots) {
159
+ dot.style.transformBox = "";
160
+ dot.style.transformOrigin = "";
161
+ dot.style.transition = "";
162
+ dot.style.transform = "";
163
+ dot.style.opacity = "";
164
+ }
165
+ };
166
+ }, [linePath, animateOnScroll]);
167
+ const handleDotEnter = useCallback(
168
+ (i) => {
169
+ setTooltip({
170
+ x: points[i].x,
171
+ y: points[i].y,
172
+ value: dataPoints[i].value,
173
+ label: dataPoints[i].label
174
+ });
175
+ },
176
+ [points, dataPoints]
177
+ );
178
+ const handleDotLeave = useCallback(() => setTooltip(null), []);
179
+ const gradientId = `area-gradient-${Math.random().toString(36).slice(2, 8)}`;
180
+ return /* @__PURE__ */ jsx("div", { ref: containerRef, className, style: { width: propWidth || "100%" }, children: /* @__PURE__ */ jsxs("svg", { width, height, viewBox: `0 0 ${width} ${height}`, children: [
181
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
182
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color, stopOpacity: 0.15 }),
183
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: color, stopOpacity: 0 })
184
+ ] }) }),
185
+ yGridLines.map((line, i) => /* @__PURE__ */ jsxs("g", { children: [
186
+ /* @__PURE__ */ jsx(
187
+ "line",
188
+ {
189
+ x1: padding.left,
190
+ y1: line.y,
191
+ x2: width - padding.right,
192
+ y2: line.y,
193
+ stroke: "rgba(255,255,255,0.08)",
194
+ strokeWidth: 1
195
+ }
196
+ ),
197
+ /* @__PURE__ */ jsx(
198
+ "text",
199
+ {
200
+ x: padding.left - 8,
201
+ y: line.y + 4,
202
+ textAnchor: "end",
203
+ fill: "rgba(255,255,255,0.4)",
204
+ fontSize: 11,
205
+ children: Math.round(line.val)
206
+ }
207
+ )
208
+ ] }, i)),
209
+ dataPoints.map((d, i) => {
210
+ const x = padding.left + i / (dataPoints.length - 1) * plotWidth;
211
+ return /* @__PURE__ */ jsx(
212
+ "text",
213
+ {
214
+ x,
215
+ y: height - 8,
216
+ textAnchor: "middle",
217
+ fill: "rgba(255,255,255,0.4)",
218
+ fontSize: 11,
219
+ children: d.label
220
+ },
221
+ i
222
+ );
223
+ }),
224
+ showArea && areaPath && /* @__PURE__ */ jsx(
225
+ "path",
226
+ {
227
+ ref: areaRef,
228
+ d: areaPath,
229
+ fill: `url(#${gradientId})`,
230
+ opacity: 0
231
+ }
232
+ ),
233
+ linePath && /* @__PURE__ */ jsx(
234
+ "path",
235
+ {
236
+ ref: pathRef,
237
+ d: linePath,
238
+ fill: "none",
239
+ stroke: color,
240
+ strokeWidth: 2.5,
241
+ strokeLinecap: "round",
242
+ strokeLinejoin: "round"
243
+ }
244
+ ),
245
+ /* @__PURE__ */ jsx("g", { ref: dotsRef, children: points.map((pt, i) => /* @__PURE__ */ jsx(
246
+ "circle",
247
+ {
248
+ cx: pt.x,
249
+ cy: pt.y,
250
+ r: 5,
251
+ fill: color,
252
+ stroke: "white",
253
+ strokeWidth: 2,
254
+ style: { cursor: "pointer", opacity: 0 },
255
+ onMouseEnter: () => handleDotEnter(i),
256
+ onMouseLeave: handleDotLeave
257
+ },
258
+ i
259
+ )) }),
260
+ tooltip && /* @__PURE__ */ jsxs("g", { children: [
261
+ /* @__PURE__ */ jsx(
262
+ "rect",
263
+ {
264
+ x: tooltip.x - 40,
265
+ y: tooltip.y - 42,
266
+ width: 80,
267
+ height: 28,
268
+ rx: 6,
269
+ fill: "rgba(0,0,0,0.85)",
270
+ stroke: "rgba(255,255,255,0.15)",
271
+ strokeWidth: 1
272
+ }
273
+ ),
274
+ /* @__PURE__ */ jsxs(
275
+ "text",
276
+ {
277
+ x: tooltip.x,
278
+ y: tooltip.y - 24,
279
+ textAnchor: "middle",
280
+ fill: "white",
281
+ fontSize: 12,
282
+ fontWeight: 600,
283
+ children: [
284
+ tooltip.label,
285
+ ": ",
286
+ tooltip.value
287
+ ]
288
+ }
289
+ )
290
+ ] })
291
+ ] }) });
292
+ }
293
+ export {
294
+ SVGChart as default
295
+ };
296
+ //# sourceMappingURL=SVGChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/portfolio/components/primitives/SVGChart.tsx"],"sourcesContent":["'use client';\n\nimport React, { useRef, useEffect, useState, useMemo, useCallback } from 'react';\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface SVGChartProps {\n dataPoints: DataPoint[];\n width?: number;\n height?: number;\n className?: string;\n color?: string;\n showArea?: boolean;\n animateOnScroll?: boolean;\n}\n\nconst EASE_IN_OUT = 'cubic-bezier(0.455, 0.03, 0.515, 0.955)'; // ≈ power2.inOut\nconst EASE_BACK = 'cubic-bezier(0.34, 1.56, 0.64, 1)'; // ≈ back.out(2) — overshoot pop\n\n// Build a smooth bezier path through data points\nfunction buildPath(\n points: Array<{ x: number; y: number }>,\n close: boolean,\n plotHeight: number,\n plotBottom: number,\n): string {\n if (points.length < 2) return '';\n\n let d = `M ${points[0].x} ${points[0].y}`;\n\n for (let i = 0; i < points.length - 1; i++) {\n const p0 = points[Math.max(i - 1, 0)];\n const p1 = points[i];\n const p2 = points[i + 1];\n const p3 = points[Math.min(i + 2, points.length - 1)];\n\n const cp1x = p1.x + (p2.x - p0.x) / 6;\n const cp1y = p1.y + (p2.y - p0.y) / 6;\n const cp2x = p2.x - (p3.x - p1.x) / 6;\n const cp2y = p2.y - (p3.y - p1.y) / 6;\n\n d += ` C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${p2.x} ${p2.y}`;\n }\n\n if (close) {\n const lastX = points[points.length - 1].x;\n const firstX = points[0].x;\n d += ` L ${lastX} ${plotBottom} L ${firstX} ${plotBottom} Z`;\n }\n\n return d;\n}\n\nexport default function SVGChart({\n dataPoints,\n width: propWidth,\n height: propHeight,\n className = '',\n color = 'var(--sk-primary, #6366f1)',\n showArea = true,\n animateOnScroll = true,\n}: SVGChartProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const pathRef = useRef<SVGPathElement>(null);\n const areaRef = useRef<SVGPathElement>(null);\n const dotsRef = useRef<SVGGElement>(null);\n const [dimensions, setDimensions] = useState({ width: propWidth || 600, height: propHeight || 300 });\n const [tooltip, setTooltip] = useState<{ x: number; y: number; value: number; label: string } | null>(null);\n\n // Responsive resize\n useEffect(() => {\n if (propWidth && propHeight) return; // Fixed dimensions\n\n const container = containerRef.current;\n if (!container) return;\n\n const update = () => {\n const rect = container.getBoundingClientRect();\n setDimensions({\n width: propWidth || Math.round(rect.width),\n height: propHeight || Math.round(rect.width * 0.5),\n });\n };\n\n update();\n const ro = new ResizeObserver(update);\n ro.observe(container);\n return () => ro.disconnect();\n }, [propWidth, propHeight]);\n\n const { width, height } = dimensions;\n const padding = { top: 20, right: 20, bottom: 40, left: 50 };\n const plotWidth = width - padding.left - padding.right;\n const plotHeight = height - padding.top - padding.bottom;\n\n // Compute plotted points and grid\n const { points, yMin, yMax, yGridLines } = useMemo(() => {\n if (dataPoints.length === 0) return { points: [], yMin: 0, yMax: 100, yGridLines: [] };\n\n const values = dataPoints.map((d) => d.value);\n const rawMin = Math.min(...values);\n const rawMax = Math.max(...values);\n const range = rawMax - rawMin || 1;\n const yMin = rawMin - range * 0.1;\n const yMax = rawMax + range * 0.1;\n\n const pts = dataPoints.map((d, i) => ({\n x: padding.left + (i / (dataPoints.length - 1)) * plotWidth,\n y: padding.top + plotHeight - ((d.value - yMin) / (yMax - yMin)) * plotHeight,\n }));\n\n // Y-axis grid lines (5 lines)\n const gridCount = 5;\n const yGridLines = Array.from({ length: gridCount }, (_, i) => {\n const val = yMin + ((yMax - yMin) / (gridCount - 1)) * i;\n const y = padding.top + plotHeight - ((val - yMin) / (yMax - yMin)) * plotHeight;\n return { val, y };\n });\n\n return { points: pts, yMin, yMax, yGridLines };\n }, [dataPoints, plotWidth, plotHeight, padding.left, padding.top]);\n\n const linePath = useMemo(\n () => buildPath(points, false, plotHeight, padding.top + plotHeight),\n [points, plotHeight, padding.top],\n );\n const areaPath = useMemo(\n () => buildPath(points, true, plotHeight, padding.top + plotHeight),\n [points, plotHeight, padding.top],\n );\n\n // Scroll-triggered draw — IntersectionObserver + CSS transitions. The line\n // retracts via stroke-dashoffset, the area fades in behind it, then the\n // dots pop with a staggered overshoot (same 1.2s / 0.6s / 0.3s timeline).\n useEffect(() => {\n const container = containerRef.current;\n const path = pathRef.current;\n const area = areaRef.current;\n const dotsGroup = dotsRef.current;\n if (!container || !path) return;\n\n const dots = dotsGroup ? (Array.from(dotsGroup.children) as SVGElement[]) : [];\n\n // Final drawn state — the markup ships the area and dots transparent, so\n // this is what reduced motion, animateOnScroll={false}, and charts already\n // in the viewport at hydration get immediately (never re-hide, house LCP rule).\n const showFinal = () => {\n path.style.strokeDashoffset = '0';\n if (area) area.style.opacity = '1';\n for (const dot of dots) {\n dot.style.transform = 'scale(1)';\n dot.style.opacity = '1';\n }\n };\n\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (prefersReducedMotion || !animateOnScroll) {\n showFinal();\n return;\n }\n\n const rect = container.getBoundingClientRect();\n if (rect.top < window.innerHeight && rect.bottom > 0) {\n showFinal();\n return;\n }\n\n // Hidden state: line fully retracted, dots collapsed onto their points.\n const pathLength = path.getTotalLength();\n path.style.strokeDasharray = `${pathLength}`;\n path.style.strokeDashoffset = `${pathLength}`;\n if (area) area.style.opacity = '0';\n for (const dot of dots) {\n // fill-box makes scale() pop each dot from its own center.\n dot.style.transformBox = 'fill-box';\n dot.style.transformOrigin = 'center';\n dot.style.transform = 'scale(0)';\n dot.style.opacity = '0';\n }\n\n const io = new IntersectionObserver(\n ([entry]) => {\n if (!entry.isIntersecting) return;\n path.style.transition = `stroke-dashoffset 1.2s ${EASE_IN_OUT}`;\n path.style.strokeDashoffset = '0';\n if (area) {\n area.style.transition = 'opacity 0.6s ease-in 0.6s'; // ≈ power1.in\n area.style.opacity = '1';\n }\n dots.forEach((dot, i) => {\n const dotDelay = 0.8 + i * 0.06;\n dot.style.transition = `transform 0.3s ${EASE_BACK} ${dotDelay}s, opacity 0.3s ${EASE_BACK} ${dotDelay}s`;\n dot.style.transform = 'scale(1)';\n dot.style.opacity = '1';\n });\n io.disconnect();\n },\n { rootMargin: '0px 0px -20% 0px' }, // ≈ 'top 80%' trigger start\n );\n io.observe(container);\n\n return () => {\n io.disconnect();\n path.style.strokeDasharray = '';\n path.style.strokeDashoffset = '';\n path.style.transition = '';\n if (area) {\n area.style.transition = '';\n area.style.opacity = '';\n }\n for (const dot of dots) {\n dot.style.transformBox = '';\n dot.style.transformOrigin = '';\n dot.style.transition = '';\n dot.style.transform = '';\n dot.style.opacity = '';\n }\n };\n }, [linePath, animateOnScroll]);\n\n const handleDotEnter = useCallback(\n (i: number) => {\n setTooltip({\n x: points[i].x,\n y: points[i].y,\n value: dataPoints[i].value,\n label: dataPoints[i].label,\n });\n },\n [points, dataPoints],\n );\n\n const handleDotLeave = useCallback(() => setTooltip(null), []);\n\n const gradientId = `area-gradient-${Math.random().toString(36).slice(2, 8)}`;\n\n return (\n <div ref={containerRef} className={className} style={{ width: propWidth || '100%' }}>\n <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`}>\n <defs>\n <linearGradient id={gradientId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={color} stopOpacity={0.15} />\n <stop offset=\"100%\" stopColor={color} stopOpacity={0} />\n </linearGradient>\n </defs>\n\n {/* Y-axis grid lines */}\n {yGridLines.map((line, i) => (\n <g key={i}>\n <line\n x1={padding.left}\n y1={line.y}\n x2={width - padding.right}\n y2={line.y}\n stroke=\"rgba(255,255,255,0.08)\"\n strokeWidth={1}\n />\n <text\n x={padding.left - 8}\n y={line.y + 4}\n textAnchor=\"end\"\n fill=\"rgba(255,255,255,0.4)\"\n fontSize={11}\n >\n {Math.round(line.val)}\n </text>\n </g>\n ))}\n\n {/* X-axis labels */}\n {dataPoints.map((d, i) => {\n const x = padding.left + (i / (dataPoints.length - 1)) * plotWidth;\n return (\n <text\n key={i}\n x={x}\n y={height - 8}\n textAnchor=\"middle\"\n fill=\"rgba(255,255,255,0.4)\"\n fontSize={11}\n >\n {d.label}\n </text>\n );\n })}\n\n {/* Area fill */}\n {showArea && areaPath && (\n <path\n ref={areaRef}\n d={areaPath}\n fill={`url(#${gradientId})`}\n opacity={0}\n />\n )}\n\n {/* Line path */}\n {linePath && (\n <path\n ref={pathRef}\n d={linePath}\n fill=\"none\"\n stroke={color}\n strokeWidth={2.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n )}\n\n {/* Data point dots */}\n <g ref={dotsRef}>\n {points.map((pt, i) => (\n <circle\n key={i}\n cx={pt.x}\n cy={pt.y}\n r={5}\n fill={color}\n stroke=\"white\"\n strokeWidth={2}\n style={{ cursor: 'pointer', opacity: 0 }}\n onMouseEnter={() => handleDotEnter(i)}\n onMouseLeave={handleDotLeave}\n />\n ))}\n </g>\n\n {/* Tooltip */}\n {tooltip && (\n <g>\n <rect\n x={tooltip.x - 40}\n y={tooltip.y - 42}\n width={80}\n height={28}\n rx={6}\n fill=\"rgba(0,0,0,0.85)\"\n stroke=\"rgba(255,255,255,0.15)\"\n strokeWidth={1}\n />\n <text\n x={tooltip.x}\n y={tooltip.y - 24}\n textAnchor=\"middle\"\n fill=\"white\"\n fontSize={12}\n fontWeight={600}\n >\n {tooltip.label}: {tooltip.value}\n </text>\n </g>\n )}\n </svg>\n </div>\n );\n}\n"],"mappings":";;;;AAEA,SAAgB,QAAQ,WAAW,UAAU,SAAS,mBAAmB;AAiP/D,SACE,KADF;AAhOV,IAAM,cAAc;AACpB,IAA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AQ,IAAI;AAAA,UACf,GAAG,QAAQ,IAAI;AAAA,UACf,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,IAAI;AAAA,UACJ,MAAK;AAAA,UACL,QAAO;AAAA,UACP,aAAa;AAAA;AAAA,MACf;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAG,QAAQ;AAAA,UACX,GAAG,QAAQ,IAAI;AAAA,UACf,YAAW;AAAA,UACX,MAAK;AAAA,UACL,UAAU;AAAA,UACV,YAAY;AAAA,UAEX;AAAA,oBAAQ;AAAA,YAAM;AAAA,YAAG,QAAQ;AAAA;AAAA;AAAA,MAC5B;AAAA,OACF;AAAA,KAEJ,GACF;AAEJ;","names":["yMin","yMax","yGridLines"]}
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+ "use strict";
3
+ "use client";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // src/portfolio/components/primitives/ScrollReveal.tsx
23
+ var ScrollReveal_exports = {};
24
+ __export(ScrollReveal_exports, {
25
+ default: () => ScrollReveal
26
+ });
27
+ module.exports = __toCommonJS(ScrollReveal_exports);
28
+ var import_react = require("react");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ var EASE = "cubic-bezier(0.25, 0.46, 0.45, 0.94)";
31
+ function ScrollReveal({
32
+ children,
33
+ className,
34
+ delay = 0,
35
+ duration = 0.8,
36
+ y = 40,
37
+ x = 0,
38
+ opacity = 0,
39
+ scale,
40
+ stagger,
41
+ once = true,
42
+ threshold = 0.15
43
+ }) {
44
+ const ref = (0, import_react.useRef)(null);
45
+ (0, import_react.useEffect)(() => {
46
+ const el = ref.current;
47
+ if (!el) return;
48
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
49
+ const rect = el.getBoundingClientRect();
50
+ if (rect.top < window.innerHeight && rect.bottom > 0) return;
51
+ const targets = stagger && el.children.length > 0 ? Array.from(el.children) : [el];
52
+ const hiddenTransform = `translate(${x}px, ${y}px)` + (scale !== void 0 ? ` scale(${scale})` : "");
53
+ const shownTransform = "translate(0px, 0px)" + (scale !== void 0 ? " scale(1)" : "");
54
+ const hide = () => {
55
+ for (const t of targets) {
56
+ t.style.opacity = String(opacity);
57
+ t.style.transform = hiddenTransform;
58
+ }
59
+ };
60
+ const show = () => {
61
+ targets.forEach((t, i) => {
62
+ const totalDelay = delay + (stagger ? i * stagger : 0);
63
+ t.style.transition = `opacity ${duration}s ${EASE} ${totalDelay}s, transform ${duration}s ${EASE} ${totalDelay}s`;
64
+ t.style.opacity = "1";
65
+ t.style.transform = shownTransform;
66
+ });
67
+ };
68
+ for (const t of targets) t.style.willChange = "opacity, transform";
69
+ hide();
70
+ let revealed = false;
71
+ const io = new IntersectionObserver(
72
+ ([entry]) => {
73
+ if (entry.isIntersecting) {
74
+ revealed = true;
75
+ show();
76
+ if (once) io.disconnect();
77
+ } else if (!once && revealed) {
78
+ hide();
79
+ }
80
+ },
81
+ // gsap start `top ${(1-threshold)*100}%` ≈ shrink the viewport bottom
82
+ { rootMargin: `0px 0px -${Math.round(threshold * 100)}% 0px` }
83
+ );
84
+ io.observe(el);
85
+ return () => {
86
+ io.disconnect();
87
+ for (const t of targets) {
88
+ t.style.willChange = "";
89
+ t.style.transition = "";
90
+ t.style.opacity = "";
91
+ t.style.transform = "";
92
+ }
93
+ };
94
+ }, [delay, duration, y, x, opacity, scale, stagger, once, threshold]);
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className, children });
96
+ }
97
+ //# sourceMappingURL=ScrollReveal.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/portfolio/components/primitives/ScrollReveal.tsx"],"sourcesContent":["'use client';\n\nimport React, { useRef, useEffect } from 'react';\n\ninterface ScrollRevealProps {\n children: React.ReactNode;\n className?: string;\n delay?: number;\n duration?: number;\n y?: number;\n x?: number;\n opacity?: number;\n scale?: number;\n stagger?: number;\n once?: boolean;\n threshold?: number;\n}\n\nconst EASE = 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'; // ≈ gsap power2.out\n\n/**\n * Scroll-reveal wrapper — IntersectionObserver + CSS transitions, no gsap.\n *\n * SSR renders children fully visible (crawlers and no-JS users always see\n * content). The hidden state is applied at hydration ONLY for elements still\n * below the viewport, so above-the-fold content is never re-hidden (house\n * LCP rule) and there is no flash. `stagger` animates direct children with\n * incremental delays, matching the old gsap behavior.\n */\nexport default function ScrollReveal({\n children,\n className,\n delay = 0,\n duration = 0.8,\n y = 40,\n x = 0,\n opacity = 0,\n scale,\n stagger,\n once = true,\n threshold = 0.15,\n}: ScrollRevealProps) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;\n\n // Never re-hide content already in the viewport at hydration.\n const rect = el.getBoundingClientRect();\n if (rect.top < window.innerHeight && rect.bottom > 0) return;\n\n const targets: HTMLElement[] =\n stagger && el.children.length > 0\n ? (Array.from(el.children) as HTMLElement[])\n : [el];\n\n const hiddenTransform =\n `translate(${x}px, ${y}px)` + (scale !== undefined ? ` scale(${scale})` : '');\n const shownTransform =\n 'translate(0px, 0px)' + (scale !== undefined ? ' scale(1)' : '');\n\n const hide = () => {\n for (const t of targets) {\n t.style.opacity = String(opacity);\n t.style.transform = hiddenTransform;\n }\n };\n\n const show = () => {\n targets.forEach((t, i) => {\n const totalDelay = delay + (stagger ? i * stagger : 0);\n t.style.transition = `opacity ${duration}s ${EASE} ${totalDelay}s, transform ${duration}s ${EASE} ${totalDelay}s`;\n t.style.opacity = '1';\n t.style.transform = shownTransform;\n });\n };\n\n for (const t of targets) t.style.willChange = 'opacity, transform';\n hide();\n\n let revealed = false;\n const io = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n revealed = true;\n show();\n if (once) io.disconnect();\n } else if (!once && revealed) {\n hide();\n }\n },\n // gsap start `top ${(1-threshold)*100}%` ≈ shrink the viewport bottom\n { rootMargin: `0px 0px -${Math.round(threshold * 100)}% 0px` },\n );\n io.observe(el);\n\n return () => {\n io.disconnect();\n for (const t of targets) {\n t.style.willChange = '';\n t.style.transition = '';\n t.style.opacity = '';\n t.style.transform = '';\n }\n };\n }, [delay, duration, y, x, opacity, scale, stagger, once, threshold]);\n\n return (\n <div ref={ref} className={className}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAyC;AA4GrC;AA5FJ,IAAM,OAAO;AAWE,SAAR,aAA8B;AAAA,EACnC;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,YAAY;AACd,GAAsB;AACpB,QAAM,UAAM,qBAAuB,IAAI;AAEvC,8BAAU,MAAM;AACd,UAAM,KAAK,IAAI;AACf,QAAI,CAAC,GAAI;AACT,QAAI,OAAO,WAAW,kCAAkC,EAAE,QAAS;AAGnE,UAAM,OAAO,GAAG,sBAAsB;AACtC,QAAI,KAAK,MAAM,OAAO,eAAe,KAAK,SAAS,EAAG;AAEtD,UAAM,UACJ,WAAW,G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S,OAAO,SAAS,MAAM,SAAS,CAAC;AAEpE,SACE,4CAAC,SAAI,KAAU,WACZ,UACH;AAEJ;","names":[]}
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+
3
+ interface ScrollRevealProps {
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ delay?: number;
7
+ duration?: number;
8
+ y?: number;
9
+ x?: number;
10
+ opacity?: number;
11
+ scale?: number;
12
+ stagger?: number;
13
+ once?: boolean;
14
+ threshold?: number;
15
+ }
16
+ /**
17
+ * Scroll-reveal wrapper — IntersectionObserver + CSS transitions, no gsap.
18
+ *
19
+ * SSR renders children fully visible (crawlers and no-JS users always see
20
+ * content). The hidden state is applied at hydration ONLY for elements still
21
+ * below the viewport, so above-the-fold content is never re-hidden (house
22
+ * LCP rule) and there is no flash. `stagger` animates direct children with
23
+ * incremental delays, matching the old gsap behavior.
24
+ */
25
+ declare function ScrollReveal({ children, className, delay, duration, y, x, opacity, scale, stagger, once, threshold, }: ScrollRevealProps): React.JSX.Element;
26
+
27
+ export { ScrollReveal as default };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+
3
+ interface ScrollRevealProps {
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ delay?: number;
7
+ duration?: number;
8
+ y?: number;
9
+ x?: number;
10
+ opacity?: number;
11
+ scale?: number;
12
+ stagger?: number;
13
+ once?: boolean;
14
+ threshold?: number;
15
+ }
16
+ /**
17
+ * Scroll-reveal wrapper — IntersectionObserver + CSS transitions, no gsap.
18
+ *
19
+ * SSR renders children fully visible (crawlers and no-JS users always see
20
+ * content). The hidden state is applied at hydration ONLY for elements still
21
+ * below the viewport, so above-the-fold content is never re-hidden (house
22
+ * LCP rule) and there is no flash. `stagger` animates direct children with
23
+ * incremental delays, matching the old gsap behavior.
24
+ */
25
+ declare function ScrollReveal({ children, className, delay, duration, y, x, opacity, scale, stagger, once, threshold, }: ScrollRevealProps): React.JSX.Element;
26
+
27
+ export { ScrollReveal as default };
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+ "use client";
3
+
4
+ // src/portfolio/components/primitives/ScrollReveal.tsx
5
+ import { useRef, useEffect } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var EASE = "cubic-bezier(0.25, 0.46, 0.45, 0.94)";
8
+ function ScrollReveal({
9
+ children,
10
+ className,
11
+ delay = 0,
12
+ duration = 0.8,
13
+ y = 40,
14
+ x = 0,
15
+ opacity = 0,
16
+ scale,
17
+ stagger,
18
+ once = true,
19
+ threshold = 0.15
20
+ }) {
21
+ const ref = useRef(null);
22
+ useEffect(() => {
23
+ const el = ref.current;
24
+ if (!el) return;
25
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
26
+ const rect = el.getBoundingClientRect();
27
+ if (rect.top < window.innerHeight && rect.bottom > 0) return;
28
+ const targets = stagger && el.children.length > 0 ? Array.from(el.children) : [el];
29
+ const hiddenTransform = `translate(${x}px, ${y}px)` + (scale !== void 0 ? ` scale(${scale})` : "");
30
+ const shownTransform = "translate(0px, 0px)" + (scale !== void 0 ? " scale(1)" : "");
31
+ const hide = () => {
32
+ for (const t of targets) {
33
+ t.style.opacity = String(opacity);
34
+ t.style.transform = hiddenTransform;
35
+ }
36
+ };
37
+ const show = () => {
38
+ targets.forEach((t, i) => {
39
+ const totalDelay = delay + (stagger ? i * stagger : 0);
40
+ t.style.transition = `opacity ${duration}s ${EASE} ${totalDelay}s, transform ${duration}s ${EASE} ${totalDelay}s`;
41
+ t.style.opacity = "1";
42
+ t.style.transform = shownTransform;
43
+ });
44
+ };
45
+ for (const t of targets) t.style.willChange = "opacity, transform";
46
+ hide();
47
+ let revealed = false;
48
+ const io = new IntersectionObserver(
49
+ ([entry]) => {
50
+ if (entry.isIntersecting) {
51
+ revealed = true;
52
+ show();
53
+ if (once) io.disconnect();
54
+ } else if (!once && revealed) {
55
+ hide();
56
+ }
57
+ },
58
+ // gsap start `top ${(1-threshold)*100}%` ≈ shrink the viewport bottom
59
+ { rootMargin: `0px 0px -${Math.round(threshold * 100)}% 0px` }
60
+ );
61
+ io.observe(el);
62
+ return () => {
63
+ io.disconnect();
64
+ for (const t of targets) {
65
+ t.style.willChange = "";
66
+ t.style.transition = "";
67
+ t.style.opacity = "";
68
+ t.style.transform = "";
69
+ }
70
+ };
71
+ }, [delay, duration, y, x, opacity, scale, stagger, once, threshold]);
72
+ return /* @__PURE__ */ jsx("div", { ref, className, children });
73
+ }
74
+ export {
75
+ ScrollReveal as default
76
+ };
77
+ //# sourceMappingURL=ScrollReveal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/portfolio/components/primitives/ScrollReveal.tsx"],"sourcesContent":["'use client';\n\nimport React, { useRef, useEffect } from 'react';\n\ninterface ScrollRevealProps {\n children: React.ReactNode;\n className?: string;\n delay?: number;\n duration?: number;\n y?: number;\n x?: number;\n opacity?: number;\n scale?: number;\n stagger?: number;\n once?: boolean;\n threshold?: number;\n}\n\nconst EASE = 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'; // ≈ gsap power2.out\n\n/**\n * Scroll-reveal wrapper — IntersectionObserver + CSS transitions, no gsap.\n *\n * SSR renders children fully visible (crawlers and no-JS users always see\n * content). The hidden state is applied at hydration ONLY for elements still\n * below the viewport, so above-the-fold content is never re-hidden (house\n * LCP rule) and there is no flash. `stagger` animates direct children with\n * incremental delays, matching the old gsap behavior.\n */\nexport default function ScrollReveal({\n children,\n className,\n delay = 0,\n duration = 0.8,\n y = 40,\n x = 0,\n opacity = 0,\n scale,\n stagger,\n once = true,\n threshold = 0.15,\n}: ScrollRevealProps) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;\n\n // Never re-hide content already in the viewport at hydration.\n const rect = el.getBoundingClientRect();\n if (rect.top < window.innerHeight && rect.bottom > 0) return;\n\n const targets: HTMLElement[] =\n stagger && el.children.length > 0\n ? (Array.from(el.children) as HTMLElement[])\n : [el];\n\n const hiddenTransform =\n `translate(${x}px, ${y}px)` + (scale !== undefined ? ` scale(${scale})` : '');\n const shownTransform =\n 'translate(0px, 0px)' + (scale !== undefined ? ' scale(1)' : '');\n\n const hide = () => {\n for (const t of targets) {\n t.style.opacity = String(opacity);\n t.style.transform = hiddenTransform;\n }\n };\n\n const show = () => {\n targets.forEach((t, i) => {\n const totalDelay = delay + (stagger ? i * stagger : 0);\n t.style.transition = `opacity ${duration}s ${EASE} ${totalDelay}s, transform ${duration}s ${EASE} ${totalDelay}s`;\n t.style.opacity = '1';\n t.style.transform = shownTransform;\n });\n };\n\n for (const t of targets) t.style.willChange = 'opacity, transform';\n hide();\n\n let revealed = false;\n const io = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n revealed = true;\n show();\n if (once) io.disconnect();\n } else if (!once && revealed) {\n hide();\n }\n },\n // gsap start `top ${(1-threshold)*100}%` ≈ shrink the viewport bottom\n { rootMargin: `0px 0px -${Math.round(threshold * 100)}% 0px` },\n );\n io.observe(el);\n\n return () => {\n io.disconnect();\n for (const t of targets) {\n t.style.willChange = '';\n t.style.transition = '';\n t.style.opacity = '';\n t.style.transform = '';\n }\n };\n }, [delay, duration, y, x, opacity, scale, stagger, once, threshold]);\n\n return (\n <div ref={ref} className={className}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;AAEA,SAAgB,QAAQ,iBAAiB;AA4GrC;AA5FJ,IAAM,OAAO;AAWE,SAAR,aAA8B;AAAA,EACnC;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,YAAY;AACd,GAAsB;AACpB,QAAM,MAAM,OAAuB,IAAI;AAEvC,YAAU,MAAM;AACd,UAAM,KAAK,IAAI;AACf,QAAI,CAAC,GAAI;AACT,QAAI,OAAO,WAAW,kCAAkC,EAAE,QAAS;AA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