diy-template-components 4.0.1 → 4.0.5

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.
package/build/index.js CHANGED
@@ -21,6 +21,19 @@ var Countdown__default = /*#__PURE__*/_interopDefaultLegacy(Countdown);
21
21
  var koreanLocale__default = /*#__PURE__*/_interopDefaultLegacy(koreanLocale);
22
22
  var ReactDOMServer__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOMServer);
23
23
 
24
+ function insertStyle(css) {
25
+ if (!css || typeof window === 'undefined') {
26
+ return;
27
+ }
28
+ const style = document.createElement('style');
29
+ style.setAttribute('type', 'text/css');
30
+ style.innerHTML = css;
31
+ document.head.appendChild(style);
32
+ return css;
33
+ }
34
+
35
+ insertStyle("/* Brush stroke underline - for rich text content (color via --brush-color inline style) */\n.brush-stroke {\n position: relative;\n display: inline-block;\n white-space: pre-wrap;\n}\n\n.brush-stroke::after {\n content: \"\";\n position: absolute;\n top: 90%;\n left: 0;\n height: 0.5em;\n width: 100%;\n z-index: -1;\n border: solid var(--brush-width, 0.15em) var(--brush-color, #FFFFFF);\n border-color: var(--brush-color, #FFFFFF) transparent transparent transparent;\n border-radius: 100%;\n}\n\n/* Font size classes for rich text editor - Desktop (default) */\n.font-size-extra-small {\n font-size: 12px;\n line-height: 16px;\n}\n\n.font-size-small {\n font-size: 16px;\n line-height: 20px;\n}\n\n.font-size-medium {\n font-size: 20px;\n line-height: 24px;\n}\n\n.font-size-large {\n font-size: 24px;\n line-height: 28px;\n}\n\n.font-size-very-large {\n font-size: 32px;\n line-height: 36px;\n}\n\n.font-size-extra-large {\n font-size: 56px;\n line-height: 64px;\n}\n\n.font-size-huge {\n font-size: 72px;\n line-height: 80px;\n}\n\n/* Font size classes - Mobile */\n@media (max-width: 768px) {\n .font-size-extra-small {\n font-size: 10px;\n line-height: 14px;\n }\n .font-size-small {\n font-size: 14px;\n line-height: 18px;\n }\n .font-size-medium {\n font-size: 16px;\n line-height: 20px;\n }\n .font-size-large {\n font-size: 18px;\n line-height: 20px;\n }\n .font-size-very-large {\n font-size: 24px;\n line-height: 36px;\n }\n .font-size-extra-large {\n font-size: 40px;\n line-height: 48px;\n }\n .font-size-huge {\n font-size: 56px;\n line-height: 64px;\n }\n}");
36
+
24
37
  function _extends() {
25
38
  return _extends = Object.assign ? Object.assign.bind() : function (n) {
26
39
  for (var e = 1; e < arguments.length; e++) {
@@ -560,7 +573,7 @@ function useLinkBuilder(data) {
560
573
  basePath,
561
574
  isMasterTemplate
562
575
  } = React.useContext(PageContext);
563
- if (isEdit || !data.isLink) {
576
+ if (!data || isEdit || !data.isLink) {
564
577
  return null;
565
578
  }
566
579
  if (data?.isExistingLink === false) {
@@ -580,7 +593,7 @@ function useLinkBuilder(data) {
580
593
  }
581
594
  const {
582
595
  pageId
583
- } = navList.find(el => el.slug === data?.link) || {};
596
+ } = navList?.find(el => el.slug === data?.link) || {};
584
597
  return `//${basePath}?templateId=${templateId}&pageId=${pageId}${isMasterTemplate ? '&mld=true' : ''}`;
585
598
  }
586
599
 
@@ -2297,11 +2310,6 @@ function Footer({
2297
2310
  }, "\xA9\uFE0F Leaverage Consultants Private Limited") : null);
2298
2311
  }
2299
2312
 
2300
- const borderRadius = {
2301
- small: 4,
2302
- regular: 8,
2303
- large: 12
2304
- };
2305
2313
  const generateShadows = palette => ({
2306
2314
  primary: `0 2px 8px ${palette.shadow.primary}`,
2307
2315
  secondary: `0 4px 10px ${palette.shadow.secondary}`
@@ -2458,7 +2466,41 @@ const fontWeight = {
2458
2466
  superBold: 900
2459
2467
  };
2460
2468
 
2461
- function getTheme(colorTheme = 'blue', fontFamily = 'Arial', isMobile) {
2469
+ const getBorderRadius = roundness => {
2470
+ const mapping = {
2471
+ sharp: {
2472
+ small: 0,
2473
+ regular: 0,
2474
+ large: 0
2475
+ },
2476
+ soft: {
2477
+ small: 8,
2478
+ regular: 8,
2479
+ large: 8
2480
+ },
2481
+ rounded: {
2482
+ small: 16,
2483
+ regular: 16,
2484
+ large: 16
2485
+ },
2486
+ 'extra-round': {
2487
+ small: 24,
2488
+ regular: 24,
2489
+ large: 24
2490
+ },
2491
+ pill: {
2492
+ small: 9999,
2493
+ regular: 9999,
2494
+ large: 9999
2495
+ }
2496
+ };
2497
+ return mapping[roundness] || {
2498
+ small: 16,
2499
+ regular: 16,
2500
+ large: 16
2501
+ };
2502
+ };
2503
+ function getTheme(colorTheme = 'blue', fontFamily = 'Arial', isMobile, roundness = 'rounded') {
2462
2504
  const palette = palettes[colorTheme] || palettes['blue'];
2463
2505
  const typography = {
2464
2506
  fontFamily: `"${fontFamily}", "Roboto", "Helvetica", "Arial", "sans-serif"`,
@@ -2466,7 +2508,7 @@ function getTheme(colorTheme = 'blue', fontFamily = 'Arial', isMobile) {
2466
2508
  fontWeight
2467
2509
  };
2468
2510
  const shape = {
2469
- borderRadius
2511
+ borderRadius: getBorderRadius(roundness)
2470
2512
  };
2471
2513
  return {
2472
2514
  palette,
@@ -2533,17 +2575,6 @@ function NanumSquare() {
2533
2575
  return null;
2534
2576
  }
2535
2577
 
2536
- function insertStyle(css) {
2537
- if (!css || typeof window === 'undefined') {
2538
- return;
2539
- }
2540
- const style = document.createElement('style');
2541
- style.setAttribute('type', 'text/css');
2542
- style.innerHTML = css;
2543
- document.head.appendChild(style);
2544
- return css;
2545
- }
2546
-
2547
2578
  insertStyle("@charset \"UTF-8\";\n/* Wrapper: no height/min-height – height comes only from section content, not from HOC */\n.sectionBackgroundWrapper {\n position: relative;\n width: 100%;\n overflow: hidden;\n}\n\n/* Section root transparent so background (image/color/gradient/video) shows through */\n.sectionBackgroundWrapper > .sectionBackgroundContent > * {\n background: transparent !important;\n}\n\n/* Video: absolute so it does not affect wrapper height; height follows section */\n.sectionBackgroundVideo {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 0;\n pointer-events: none;\n}\n\n/* YouTube embed: cover background, no UI interaction, minimal branding via URL params */\n.sectionBackgroundYoutube {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100vw;\n min-width: 100%;\n min-height: 100%;\n height: 56.25vw; /* 16:9 */\n min-height: 100vh;\n transform: translate(-50%, -50%);\n border: none;\n z-index: 0;\n pointer-events: none;\n}\n\n@media (min-aspect-ratio: 16/9) {\n .sectionBackgroundYoutube {\n width: 177.78vh;\n height: 100vh;\n min-width: 100%;\n min-height: 100%;\n }\n}\n/* Blur overlay: frosted glass so content stays readable over video/image/gradient */\n.sectionBackgroundBlur {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n pointer-events: none;\n backdrop-filter: blur(2px);\n -webkit-backdrop-filter: blur(2px);\n /* background: rgba(255, 255, 255, 0.08); */\n}\n\n/* Content wrapper: above blur so component items are clear */\n.sectionBackgroundContent {\n position: relative;\n z-index: 2;\n}\n\n/* Background layer: fills wrapper only (absolute), does not affect wrapper height */\n.sectionBackgroundLayer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 0;\n pointer-events: none;\n}\n\n.sectionBackgroundLayer.sectionBackgroundImage {\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n}");
2548
2579
 
2549
2580
  /**
@@ -2757,33 +2788,36 @@ function withSectionBackground(WrappedSectionRenderer) {
2757
2788
  }
2758
2789
 
2759
2790
  const TYPE_TO_COMPONENT_MAP$1 = {
2760
- BANNER_CAROUSEL_RIGHT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$q; })),
2761
- GRID_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$p; })),
2762
- BANNER_CAROUSEL_CENTER: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$o; })),
2763
- BANNER_CAROUSEL_CENTER_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$n; })),
2764
- BANNER_CAROUSEL_LEFT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$m; })),
2765
- FORM_SUBSCRIBE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$l; })),
2766
- TEXT_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$k; })),
2767
- VIDEO_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$j; })),
2768
- VIDEO_WORKSHOP_PROMOTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$2; })),
2769
- VIDEO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$i; })),
2770
- INFO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$h; })),
2771
- TEXT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$g; })),
2772
- IMAGE_GALLERY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$f; })),
2773
- FAQ_LISTING: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$e; })),
2774
- COURSE_CAROUSEL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$c; })),
2775
- TEAM_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$b; })),
2776
- TEXT_GRID: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$d; })),
2777
- CONTACT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$a; })),
2778
- FORM_ENQUIRY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$9; })),
2779
- WEBINAR_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$8; })),
2780
- COURSE_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$7; })),
2781
- COURSE_LANDING_PAGE_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$1; })),
2782
- FORM_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$6; })),
2783
- TILES_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$5; })),
2784
- EMAIL_DRIP_MARKET: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$4; })),
2785
- ABOUT_INSTITUTE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$3; })),
2786
- COUNTER_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index; }))
2791
+ BANNER_CAROUSEL_RIGHT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$t; })),
2792
+ GRID_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$s; })),
2793
+ BANNER_CAROUSEL_CENTER: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$r; })),
2794
+ BANNER_CAROUSEL_CENTER_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$q; })),
2795
+ BANNER_CAROUSEL_LEFT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$p; })),
2796
+ FORM_SUBSCRIBE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$o; })),
2797
+ TEXT_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$n; })),
2798
+ VIDEO_TESTIMONIAL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$m; })),
2799
+ VIDEO_WORKSHOP_PROMOTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$1; })),
2800
+ VIDEO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$l; })),
2801
+ INFO: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$k; })),
2802
+ TEXT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$j; })),
2803
+ IMAGE_GALLERY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$i; })),
2804
+ FAQ_LISTING: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$h; })),
2805
+ COURSE_CAROUSEL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$f; })),
2806
+ TEAM_CARD: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$e; })),
2807
+ TEXT_GRID: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$g; })),
2808
+ CONTACT: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$d; })),
2809
+ FORM_ENQUIRY: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$c; })),
2810
+ WEBINAR_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$b; })),
2811
+ COURSE_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$a; })),
2812
+ COURSE_LANDING_PAGE_V2: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index; })),
2813
+ FORM_LANDING_PAGE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$9; })),
2814
+ TILES_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$8; })),
2815
+ EMAIL_DRIP_MARKET: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$7; })),
2816
+ ABOUT_INSTITUTE: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$6; })),
2817
+ COUNTER_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$5; })),
2818
+ TIMER_AND_CALL: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$2; })),
2819
+ STICKY_CTA: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$4; })),
2820
+ CUSTOM_HTML_SECTION: /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return index$3; }))
2787
2821
  };
2788
2822
  const getCompToRender$1 = type => {
2789
2823
  const Comp = TYPE_TO_COMPONENT_MAP$1[type];
@@ -2817,35 +2851,21 @@ function SectionRenderer$1({
2817
2851
 
2818
2852
  console.log('nishu222', sectionData);
2819
2853
  let sectionBg = {};
2820
- debugger;
2821
2854
  if (sectionData?.isV2Section) {
2822
- let currentObj = sectionData?.components?.find(component => component.hasOwnProperty('sectionsBgname')?.sectionBgData || {});
2823
- sectionBg = currentObj?.sectionsBgname?.sectionBgData || {};
2855
+ sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
2856
+ }
2857
+ if (sectionData?.type === 'STICKY_CTA') {
2858
+ sectionData = {
2859
+ ...sectionData,
2860
+ isDefaultEditor: true
2861
+ };
2824
2862
  }
2825
-
2826
- // sectionBg ={
2827
- // id:"625fb1a879d4c9001261cewqsazxs21",
2828
- // value: "imagev",
2829
- // label: "",
2830
- // type: "image",
2831
- // bgType: "video",
2832
- // name: "Image",
2833
- // isYoutubeVideo: true,
2834
- // elementType: "div",
2835
- // isV2: true,
2836
- // metadata: {
2837
- // value: "https://www.youtube.com/watch?v=bjxTIcuzB6k&list=PLe6YKWr4VVM1x2LIpiqmVvG4QgIvoDEdO",
2838
- // }
2839
- // }
2840
- console.log('nishu222333', sectionData);
2841
2863
  return /*#__PURE__*/React__default["default"].createElement(React.Suspense, {
2842
2864
  fallback: null /*GIF maybe*/
2843
2865
  }, /*#__PURE__*/React__default["default"].createElement(SectionWithBackground$1, {
2844
2866
  sectionData: sectionData,
2845
2867
  extraProps: extraProps,
2846
- sectionIndex: sectionIndex
2847
- // isSkipV2Section={sectionData?.isV2Section}
2848
- ,
2868
+ sectionIndex: sectionIndex,
2849
2869
  isSkipV2Section: sectionData?.isV2Section
2850
2870
  // componentBg={sectionData?.componentBg || { type: "image", value: "https://fastly.picsum.photos/id/4/5000/3333.jpg?hmac=ghf06FdmgiD0-G4c9DdNM8RnBIN7BO0-ZGEw47khHP4" }}
2851
2871
  ,
@@ -2855,7 +2875,8 @@ function SectionRenderer$1({
2855
2875
 
2856
2876
  const defaultTheme = {
2857
2877
  color: 'blue',
2858
- font: 'rubik'
2878
+ font: 'rubik',
2879
+ roundness: 'rounded'
2859
2880
  };
2860
2881
  const defaultLayout = {
2861
2882
  containerWidth: 1440
@@ -2929,7 +2950,7 @@ const allColors = {
2929
2950
  tertiaryskyblue: '#F2FCFF'
2930
2951
  };
2931
2952
 
2932
- const generateTheme = (theme = 'blue', fontFamily = 'Arial', isMobile) => {
2953
+ const generateTheme = (theme = 'blue', fontFamily = 'Arial', isMobile, roundness = 'rounded') => {
2933
2954
  let themeColor = theme.split('-');
2934
2955
  let color, gradient, darkMode;
2935
2956
  if (themeColor.length === 1) {
@@ -3030,7 +3051,7 @@ const generateTheme = (theme = 'blue', fontFamily = 'Arial', isMobile) => {
3030
3051
  margin: isMobile ? mobileMargin : margin
3031
3052
  };
3032
3053
  return {
3033
- ...getTheme(theme),
3054
+ ...getTheme(theme, fontFamily, isMobile, roundness),
3034
3055
  typography,
3035
3056
  spacing,
3036
3057
  colors
@@ -3042,7 +3063,8 @@ function PageRenderer$1({
3042
3063
  metadata: {
3043
3064
  theme: {
3044
3065
  color = defaultTheme.color,
3045
- font = defaultTheme.font
3066
+ font = defaultTheme.font,
3067
+ roundness = defaultTheme.roundness
3046
3068
  } = defaultTheme,
3047
3069
  layout = defaultLayout
3048
3070
  } = defaultMetadata,
@@ -3094,7 +3116,7 @@ function PageRenderer$1({
3094
3116
  countryCode,
3095
3117
  currencySymbol
3096
3118
  }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
3097
- const theme = React.useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
3119
+ const theme = React.useMemo(() => generateTheme(color, font, context.isMobile, roundness), [color, font, context.isMobile, roundness]);
3098
3120
  const Wrapper = SectionWrapper || React.Fragment;
3099
3121
  return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
3100
3122
  theme: theme
@@ -3571,9 +3593,9 @@ function BannerCarouselRight({
3571
3593
  });
3572
3594
  const [{
3573
3595
  bannerCarousel
3574
- }] = sectionData.components;
3575
- const Wrapper = bannerCarousel.components.length > 1 ? Carousel : React.Fragment;
3576
- const wrapperProps = bannerCarousel.components.length > 1 ? {
3596
+ }] = sectionData?.components;
3597
+ const Wrapper = bannerCarousel?.components?.length > 1 ? Carousel : React.Fragment;
3598
+ const wrapperProps = bannerCarousel?.components?.length > 1 ? {
3577
3599
  buttonContainerClass: classes.absoluteButtonsBannerRight,
3578
3600
  inverted: false
3579
3601
  } : {};
@@ -3581,7 +3603,7 @@ function BannerCarouselRight({
3581
3603
  className: classes.bannerCarouselRightSection
3582
3604
  }, /*#__PURE__*/React__default["default"].createElement("div", {
3583
3605
  className: classes.sectionContainer
3584
- }, /*#__PURE__*/React__default["default"].createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$5, {
3606
+ }, /*#__PURE__*/React__default["default"].createElement(Wrapper, wrapperProps, bannerCarousel?.components?.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$5, {
3585
3607
  nodeData: node,
3586
3608
  key: idx /* or some other unique property */,
3587
3609
  sectionIndex: sectionIndex,
@@ -3589,9 +3611,9 @@ function BannerCarouselRight({
3589
3611
  })))));
3590
3612
  }
3591
3613
 
3592
- var index$q = /*#__PURE__*/Object.freeze({
3593
- __proto__: null,
3594
- 'default': BannerCarouselRight
3614
+ var index$t = /*#__PURE__*/Object.freeze({
3615
+ __proto__: null,
3616
+ 'default': BannerCarouselRight
3595
3617
  });
3596
3618
 
3597
3619
  const useSectionStyles$8 = createUseStyles(theme => ({
@@ -3765,7 +3787,7 @@ function List({
3765
3787
  containerWidth,
3766
3788
  isMobile
3767
3789
  });
3768
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
3790
+ const [nodeData] = sectionData.components;
3769
3791
  const getNumber = val => {
3770
3792
  return val.toString().length == 1 ? '0' + val : val;
3771
3793
  };
@@ -3813,9 +3835,9 @@ function List({
3813
3835
  }))));
3814
3836
  }
3815
3837
 
3816
- var index$p = /*#__PURE__*/Object.freeze({
3817
- __proto__: null,
3818
- 'default': List
3838
+ var index$s = /*#__PURE__*/Object.freeze({
3839
+ __proto__: null,
3840
+ 'default': List
3819
3841
  });
3820
3842
 
3821
3843
  const useSectionStyles$7 = createUseStyles(theme => {
@@ -4104,15 +4126,15 @@ function BannerCarouselCenter({
4104
4126
  });
4105
4127
  const [{
4106
4128
  bannerCarousel
4107
- }] = sectionData.components;
4108
- const Wrapper = bannerCarousel.components.length > 1 ? Carousel : React.Fragment;
4109
- const wrapperProps = bannerCarousel.components.length > 1 ? {
4129
+ }] = sectionData?.components;
4130
+ const Wrapper = bannerCarousel?.components?.length > 1 ? Carousel : React.Fragment;
4131
+ const wrapperProps = bannerCarousel?.components?.length > 1 ? {
4110
4132
  buttonContainerClass: classes.absoluteButtons,
4111
4133
  inverted: true
4112
4134
  } : {};
4113
4135
  return /*#__PURE__*/React__default["default"].createElement("section", {
4114
4136
  className: classes.bannerCarouselCenterSection
4115
- }, /*#__PURE__*/React__default["default"].createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$4, {
4137
+ }, /*#__PURE__*/React__default["default"].createElement(Wrapper, wrapperProps, bannerCarousel?.components?.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$4, {
4116
4138
  nodeData: node,
4117
4139
  isCustomWebsite: isCustomWebsite,
4118
4140
  key: idx /* or some other unique property */,
@@ -4121,9 +4143,9 @@ function BannerCarouselCenter({
4121
4143
  }))));
4122
4144
  }
4123
4145
 
4124
- var index$o = /*#__PURE__*/Object.freeze({
4125
- __proto__: null,
4126
- 'default': BannerCarouselCenter
4146
+ var index$r = /*#__PURE__*/Object.freeze({
4147
+ __proto__: null,
4148
+ 'default': BannerCarouselCenter
4127
4149
  });
4128
4150
 
4129
4151
  const useSectionStyles$6 = createUseStyles(theme => {
@@ -4416,9 +4438,9 @@ function BannerCarouselCenterv2({
4416
4438
  }))));
4417
4439
  }
4418
4440
 
4419
- var index$n = /*#__PURE__*/Object.freeze({
4420
- __proto__: null,
4421
- 'default': BannerCarouselCenterv2
4441
+ var index$q = /*#__PURE__*/Object.freeze({
4442
+ __proto__: null,
4443
+ 'default': BannerCarouselCenterv2
4422
4444
  });
4423
4445
 
4424
4446
  const useSectionStyles$5 = createUseStyles(theme => {
@@ -4643,13 +4665,13 @@ function BannerCarouselLeft({
4643
4665
  });
4644
4666
  const [{
4645
4667
  bannerCarousel
4646
- }] = sectionData.components;
4647
- const Wrapper = bannerCarousel.components.length > 1 ? Carousel : React.Fragment;
4668
+ }] = sectionData?.components;
4669
+ const Wrapper = bannerCarousel?.components?.length > 1 ? Carousel : React.Fragment;
4648
4670
  return /*#__PURE__*/React__default["default"].createElement("section", {
4649
4671
  className: classes.section
4650
4672
  }, /*#__PURE__*/React__default["default"].createElement("div", {
4651
4673
  className: classes.sectionContainer
4652
- }, /*#__PURE__*/React__default["default"].createElement(Wrapper, null, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$2, {
4674
+ }, /*#__PURE__*/React__default["default"].createElement(Wrapper, null, bannerCarousel?.components?.map((node, idx) => /*#__PURE__*/React__default["default"].createElement(Section$2, {
4653
4675
  nodeData: node,
4654
4676
  key: idx /* or some other unique property */,
4655
4677
  sectionIndex: sectionIndex,
@@ -4657,9 +4679,9 @@ function BannerCarouselLeft({
4657
4679
  })))));
4658
4680
  }
4659
4681
 
4660
- var index$m = /*#__PURE__*/Object.freeze({
4661
- __proto__: null,
4662
- 'default': BannerCarouselLeft
4682
+ var index$p = /*#__PURE__*/Object.freeze({
4683
+ __proto__: null,
4684
+ 'default': BannerCarouselLeft
4663
4685
  });
4664
4686
 
4665
4687
  const useSectionStyles$4 = createUseStyles(theme => ({
@@ -4938,7 +4960,7 @@ function SubscribeToNewsletter({
4938
4960
  isLandingPages,
4939
4961
  extraProps
4940
4962
  } = React.useContext(PageContext);
4941
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
4963
+ const [nodeData] = sectionData.components;
4942
4964
  const classes = useSectionStyles$4({
4943
4965
  containerWidth,
4944
4966
  isMobile
@@ -5053,9 +5075,9 @@ function SubscribeToNewsletter({
5053
5075
  })))))));
5054
5076
  }
5055
5077
 
5056
- var index$l = /*#__PURE__*/Object.freeze({
5057
- __proto__: null,
5058
- 'default': SubscribeToNewsletter
5078
+ var index$o = /*#__PURE__*/Object.freeze({
5079
+ __proto__: null,
5080
+ 'default': SubscribeToNewsletter
5059
5081
  });
5060
5082
 
5061
5083
  const useTestimonialStyles = createUseStyles(theme => ({
@@ -5341,9 +5363,9 @@ function Testimonials({
5341
5363
  }));
5342
5364
  }
5343
5365
 
5344
- var index$k = /*#__PURE__*/Object.freeze({
5345
- __proto__: null,
5346
- 'default': Testimonials
5366
+ var index$n = /*#__PURE__*/Object.freeze({
5367
+ __proto__: null,
5368
+ 'default': Testimonials
5347
5369
  });
5348
5370
 
5349
5371
  const loaderStyle = theme => ({
@@ -5714,7 +5736,7 @@ function VideoTestimonial({
5714
5736
  containerWidth,
5715
5737
  isMobile
5716
5738
  });
5717
- const [videoData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
5739
+ const [videoData] = sectionData.components;
5718
5740
  const Wrapper = videoData.videoCarousel.components.length > 1 ? Carousel : React.Fragment;
5719
5741
  return /*#__PURE__*/React__default["default"].createElement("div", {
5720
5742
  className: classes.videoTestimonialSuperContainer
@@ -5745,9 +5767,9 @@ function VideoTestimonial({
5745
5767
  }))))));
5746
5768
  }
5747
5769
 
5748
- var index$j = /*#__PURE__*/Object.freeze({
5749
- __proto__: null,
5750
- 'default': VideoTestimonial
5770
+ var index$m = /*#__PURE__*/Object.freeze({
5771
+ __proto__: null,
5772
+ 'default': VideoTestimonial
5751
5773
  });
5752
5774
 
5753
5775
  const useVideoStyles = createUseStyles(theme => {
@@ -5934,7 +5956,7 @@ function Video({
5934
5956
  containerWidth
5935
5957
  }
5936
5958
  } = React.useContext(PageContext);
5937
- const [videoData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
5959
+ const [videoData] = sectionData.components;
5938
5960
  const cardsCount = videoData?.videoCarousel?.components?.length;
5939
5961
  const slidesToShow = isMobile ? 1 : 2;
5940
5962
  const classes = useVideoStyles({
@@ -5981,9 +6003,9 @@ function Video({
5981
6003
  }, carouselContent))));
5982
6004
  }
5983
6005
 
5984
- var index$i = /*#__PURE__*/Object.freeze({
5985
- __proto__: null,
5986
- 'default': Video
6006
+ var index$l = /*#__PURE__*/Object.freeze({
6007
+ __proto__: null,
6008
+ 'default': Video
5987
6009
  });
5988
6010
 
5989
6011
  const useSectionStyles$3 = createUseStyles(theme => ({
@@ -6141,7 +6163,7 @@ function Info({
6141
6163
  } = React.useContext(PageContext);
6142
6164
  const theme = useTheme();
6143
6165
  const slidesToShow = isMobile ? 1 : 4;
6144
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6166
+ const [nodeData] = sectionData.components;
6145
6167
  const carouselList = nodeData?.contentList?.components;
6146
6168
  const cardsCount = carouselList?.length;
6147
6169
  const classes = useSectionStyles$3({
@@ -6217,9 +6239,9 @@ function Info({
6217
6239
  }, carouselContent))));
6218
6240
  }
6219
6241
 
6220
- var index$h = /*#__PURE__*/Object.freeze({
6221
- __proto__: null,
6222
- 'default': Info
6242
+ var index$k = /*#__PURE__*/Object.freeze({
6243
+ __proto__: null,
6244
+ 'default': Info
6223
6245
  });
6224
6246
 
6225
6247
  const useSectionStyles$2 = createUseStyles(theme => ({
@@ -6300,7 +6322,7 @@ const TextSection = ({
6300
6322
  containerWidth,
6301
6323
  isMobile
6302
6324
  });
6303
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6325
+ const [nodeData] = sectionData.components;
6304
6326
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("section", {
6305
6327
  className: classes.section
6306
6328
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6336,9 +6358,9 @@ const TextSection = ({
6336
6358
  })))));
6337
6359
  };
6338
6360
 
6339
- var index$g = /*#__PURE__*/Object.freeze({
6340
- __proto__: null,
6341
- 'default': TextSection
6361
+ var index$j = /*#__PURE__*/Object.freeze({
6362
+ __proto__: null,
6363
+ 'default': TextSection
6342
6364
  });
6343
6365
 
6344
6366
  const usePhotoGalleryStyles = createUseStyles(theme => {
@@ -6477,7 +6499,7 @@ function PhotoGallery({
6477
6499
  containerWidth
6478
6500
  }
6479
6501
  } = React.useContext(PageContext);
6480
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6502
+ const [nodeData] = sectionData.components;
6481
6503
  const carouselList = nodeData?.cardCarousel?.components;
6482
6504
  const cardsCount = carouselList?.length;
6483
6505
  const slidesToShow = isMobile ? 1 : 2;
@@ -6559,9 +6581,9 @@ function PhotoGallery({
6559
6581
  }, carouselContent))));
6560
6582
  }
6561
6583
 
6562
- var index$f = /*#__PURE__*/Object.freeze({
6563
- __proto__: null,
6564
- 'default': PhotoGallery
6584
+ var index$i = /*#__PURE__*/Object.freeze({
6585
+ __proto__: null,
6586
+ 'default': PhotoGallery
6565
6587
  });
6566
6588
 
6567
6589
  const useFaqListStyles = createUseStyles(theme => ({
@@ -6676,7 +6698,7 @@ const FAQListing = ({
6676
6698
  containerWidth,
6677
6699
  isMobile
6678
6700
  });
6679
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6701
+ const [nodeData] = sectionData.components;
6680
6702
  return /*#__PURE__*/React__default["default"].createElement("section", {
6681
6703
  className: classes.section
6682
6704
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6742,9 +6764,9 @@ const Accordion = ({
6742
6764
  })));
6743
6765
  };
6744
6766
 
6745
- var index$e = /*#__PURE__*/Object.freeze({
6746
- __proto__: null,
6747
- 'default': FAQListing
6767
+ var index$h = /*#__PURE__*/Object.freeze({
6768
+ __proto__: null,
6769
+ 'default': FAQListing
6748
6770
  });
6749
6771
 
6750
6772
  const useTextGridStyles = createUseStyles(theme => ({
@@ -6854,7 +6876,7 @@ const TextGrid = ({
6854
6876
  containerWidth
6855
6877
  }
6856
6878
  } = React.useContext(PageContext);
6857
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
6879
+ const [nodeData] = sectionData.components;
6858
6880
  const cardsCount = nodeData?.contentList?.components?.length;
6859
6881
  const slidesToShow = isMobile ? 1 : 2;
6860
6882
  const classes = useTextGridStyles({
@@ -6913,9 +6935,9 @@ const TextGrid = ({
6913
6935
  }, carouselContent))));
6914
6936
  };
6915
6937
 
6916
- var index$d = /*#__PURE__*/Object.freeze({
6917
- __proto__: null,
6918
- 'default': TextGrid
6938
+ var index$g = /*#__PURE__*/Object.freeze({
6939
+ __proto__: null,
6940
+ 'default': TextGrid
6919
6941
  });
6920
6942
 
6921
6943
  const useCourseStyles = createUseStyles(theme => {
@@ -8197,9 +8219,9 @@ function SimpleCardsContainer({
8197
8219
  }, children);
8198
8220
  }
8199
8221
 
8200
- var index$c = /*#__PURE__*/Object.freeze({
8201
- __proto__: null,
8202
- 'default': courses
8222
+ var index$f = /*#__PURE__*/Object.freeze({
8223
+ __proto__: null,
8224
+ 'default': courses
8203
8225
  });
8204
8226
 
8205
8227
  const useTeamStyles = createUseStyles(theme => {
@@ -8463,7 +8485,7 @@ function TeamCard({
8463
8485
  containerWidth
8464
8486
  }
8465
8487
  } = React.useContext(PageContext);
8466
- const [teamData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
8488
+ const [teamData] = sectionData.components;
8467
8489
  const cardsCount = teamData?.teamCarousel?.components?.length;
8468
8490
  const slidesToShow = isMobile ? 1 : 4;
8469
8491
  const classes = useTeamStyles({
@@ -8515,9 +8537,9 @@ function TeamCard({
8515
8537
  }, " ", getCarouselContent())));
8516
8538
  }
8517
8539
 
8518
- var index$b = /*#__PURE__*/Object.freeze({
8519
- __proto__: null,
8520
- 'default': TeamCard
8540
+ var index$e = /*#__PURE__*/Object.freeze({
8541
+ __proto__: null,
8542
+ 'default': TeamCard
8521
8543
  });
8522
8544
 
8523
8545
  const useSectionStyles$1 = createUseStyles(theme => ({
@@ -8702,7 +8724,7 @@ function FormEnquiry({
8702
8724
  containerWidth,
8703
8725
  isMobile
8704
8726
  });
8705
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
8727
+ const [nodeData] = sectionData.components;
8706
8728
  const [isSubmitted, setIsSubmitted] = React.useState(false);
8707
8729
  const theme = useTheme();
8708
8730
  let [btnDisabled, setBtnDisabled] = React.useState(false);
@@ -8936,9 +8958,9 @@ function FormEnquiry({
8936
8958
  })))))));
8937
8959
  }
8938
8960
 
8939
- var index$a = /*#__PURE__*/Object.freeze({
8940
- __proto__: null,
8941
- 'default': FormEnquiry
8961
+ var index$d = /*#__PURE__*/Object.freeze({
8962
+ __proto__: null,
8963
+ 'default': FormEnquiry
8942
8964
  });
8943
8965
 
8944
8966
  const useSectionStyles = createUseStyles(theme => ({
@@ -9159,7 +9181,7 @@ function Contact({
9159
9181
  } = React.useContext(PageContext);
9160
9182
  let [btnDisabled, setBtnDisabled] = React.useState(false);
9161
9183
  const [isSubmitted, setIsSubmitted] = React.useState(false);
9162
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
9184
+ const [nodeData] = sectionData.components;
9163
9185
  const classes = useSectionStyles({
9164
9186
  containerWidth,
9165
9187
  isMobile
@@ -9358,9 +9380,9 @@ function Contact({
9358
9380
  })))))));
9359
9381
  }
9360
9382
 
9361
- var index$9 = /*#__PURE__*/Object.freeze({
9362
- __proto__: null,
9363
- 'default': Contact
9383
+ var index$c = /*#__PURE__*/Object.freeze({
9384
+ __proto__: null,
9385
+ 'default': Contact
9364
9386
  });
9365
9387
 
9366
9388
  const useWebinarPromotionPage = createUseStyles(theme => {
@@ -9835,13 +9857,12 @@ function CoursePromotionPage$1({
9835
9857
  }))));
9836
9858
  }
9837
9859
 
9838
- var index$8 = /*#__PURE__*/Object.freeze({
9839
- __proto__: null,
9840
- 'default': CoursePromotionPage$1
9860
+ var index$b = /*#__PURE__*/Object.freeze({
9861
+ __proto__: null,
9862
+ 'default': CoursePromotionPage$1
9841
9863
  });
9842
9864
 
9843
9865
  const useCoursePromotionPage$1 = createUseStyles(theme => {
9844
- console.log(theme, 'themere');
9845
9866
  return {
9846
9867
  courseSuperContainer: {
9847
9868
  display: 'flex',
@@ -10422,9 +10443,9 @@ function CoursePromotionPage({
10422
10443
  }))));
10423
10444
  }
10424
10445
 
10425
- var index$7 = /*#__PURE__*/Object.freeze({
10426
- __proto__: null,
10427
- 'default': CoursePromotionPage
10446
+ var index$a = /*#__PURE__*/Object.freeze({
10447
+ __proto__: null,
10448
+ 'default': CoursePromotionPage
10428
10449
  });
10429
10450
 
10430
10451
  const useFormPageStyles = createUseStyles(theme => ({
@@ -10785,9 +10806,9 @@ const FormPage = ({
10785
10806
  })))));
10786
10807
  };
10787
10808
 
10788
- var index$6 = /*#__PURE__*/Object.freeze({
10789
- __proto__: null,
10790
- 'default': FormPage
10809
+ var index$9 = /*#__PURE__*/Object.freeze({
10810
+ __proto__: null,
10811
+ 'default': FormPage
10791
10812
  });
10792
10813
 
10793
10814
  const useTilesStyles = createUseStyles(theme => {
@@ -10885,7 +10906,7 @@ function Tiles({
10885
10906
  const classes = useTilesStyles({
10886
10907
  isMobile
10887
10908
  });
10888
- const nodeData = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
10909
+ const nodeData = sectionData.components;
10889
10910
  const tilesList = nodeData[0]?.tilesList.components;
10890
10911
  const handleClick = value => {
10891
10912
  if (!isEdit && value) {
@@ -10933,9 +10954,9 @@ function Tiles({
10933
10954
  }, TileDiv)));
10934
10955
  }
10935
10956
 
10936
- var index$5 = /*#__PURE__*/Object.freeze({
10937
- __proto__: null,
10938
- 'default': Tiles
10957
+ var index$8 = /*#__PURE__*/Object.freeze({
10958
+ __proto__: null,
10959
+ 'default': Tiles
10939
10960
  });
10940
10961
 
10941
10962
  const useEmailStyles = createUseStyles(theme => ({
@@ -11406,9 +11427,9 @@ function EmailDripMarket({
11406
11427
  })));
11407
11428
  }
11408
11429
 
11409
- var index$4 = /*#__PURE__*/Object.freeze({
11410
- __proto__: null,
11411
- 'default': EmailDripMarket
11430
+ var index$7 = /*#__PURE__*/Object.freeze({
11431
+ __proto__: null,
11432
+ 'default': EmailDripMarket
11412
11433
  });
11413
11434
 
11414
11435
  const useAboutInstituteStyles = createUseStyles(theme => ({
@@ -11632,7 +11653,7 @@ function ABOUT_INSTITUTE({
11632
11653
  containerWidth,
11633
11654
  isMobile
11634
11655
  });
11635
- const [nodeData] = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
11656
+ const [nodeData] = sectionData.components;
11636
11657
  const [highlightNodeData] = nodeData?.highlight?.components;
11637
11658
  const theme = useTheme();
11638
11659
  const ImageJSX = () => {
@@ -11774,85 +11795,936 @@ function ABOUT_INSTITUTE({
11774
11795
  }, /*#__PURE__*/React__default["default"].createElement(ImageJSX, null), /*#__PURE__*/React__default["default"].createElement(ContentJSX, null)), /*#__PURE__*/React__default["default"].createElement(HighlightJSX, null)));
11775
11796
  }
11776
11797
 
11777
- var index$3 = /*#__PURE__*/Object.freeze({
11778
- __proto__: null,
11779
- 'default': ABOUT_INSTITUTE
11798
+ var index$6 = /*#__PURE__*/Object.freeze({
11799
+ __proto__: null,
11800
+ 'default': ABOUT_INSTITUTE
11780
11801
  });
11781
11802
 
11782
- // import TIMER_AND_CALL from '../../sections/timerAndCall';
11783
- const TYPE_TO_COMPONENT_MAP = {
11784
- BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
11785
- GRID_CARD: List,
11786
- BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
11787
- BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
11788
- BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
11789
- FORM_SUBSCRIBE: SubscribeToNewsletter,
11790
- TEXT_TESTIMONIAL: Testimonials,
11791
- VIDEO_TESTIMONIAL: VideoTestimonial,
11792
- VIDEO: Video,
11793
- INFO: Info,
11794
- TEXT: TextSection,
11795
- IMAGE_GALLERY: PhotoGallery,
11796
- FAQ_LISTING: FAQListing,
11797
- TEXT_GRID: TextGrid,
11798
- COURSE_CAROUSEL: courses,
11799
- TEAM_CARD: TeamCard,
11800
- CONTACT: FormEnquiry,
11801
- FORM_ENQUIRY: Contact,
11802
- WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
11803
- COURSE_LANDING_PAGE: CoursePromotionPage,
11804
- FORM_LANDING_PAGE: FormPage,
11805
- TILES_SECTION: Tiles,
11806
- EMAIL_DRIP_MARKET: EmailDripMarket,
11807
- ABOUT_INSTITUTE
11808
- };
11809
- const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
11810
- const MemoisedSection = /*#__PURE__*/React.memo(({
11811
- sectionData,
11812
- extraProps,
11813
- isCustomWebsite,
11814
- sectionIndex
11815
- }) => {
11816
- console.log('extraProps in section data', extraProps);
11817
- const SectionComp = getCompToRender(sectionData.type);
11818
- return /*#__PURE__*/React__default["default"].createElement(SectionComp, {
11819
- sectionData: sectionData,
11820
- extraProps: extraProps,
11821
- isCustomWebsite: isCustomWebsite,
11822
- sectionIndex: sectionIndex
11823
- });
11803
+ const useCounterSectionStyles = createUseStyles(theme => {
11804
+ return {
11805
+ section: {
11806
+ width: '100%',
11807
+ borderRadius: theme.shape?.borderRadius?.regular || '12px',
11808
+ overflow: 'hidden',
11809
+ backgroundImage: ({
11810
+ backgroundImage
11811
+ } = {}) => backgroundImage ? `url("${backgroundImage}")` : 'none',
11812
+ backgroundColor: ({
11813
+ backgroundColor
11814
+ } = {}) => backgroundColor || '#f8f8fa',
11815
+ backgroundSize: 'cover',
11816
+ backgroundPosition: 'center',
11817
+ backgroundRepeat: 'no-repeat',
11818
+ '&, & *, & *:before, & *:after': {
11819
+ fontFamily: theme?.typography?.fontFamily,
11820
+ boxSizing: 'border-box'
11821
+ }
11822
+ },
11823
+ container: {
11824
+ width: '100%',
11825
+ maxWidth: ({
11826
+ containerWidth
11827
+ } = {}) => containerWidth || '1440px',
11828
+ margin: '0 auto',
11829
+ padding: ({
11830
+ isMobile
11831
+ } = {}) => isMobile ? `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px` : `${theme.spacing.padding.small}px ${theme.spacing.padding.medium}px`
11832
+ },
11833
+ grid: {
11834
+ display: 'grid',
11835
+ gridTemplateColumns: 'repeat(4, 1fr)',
11836
+ gap: ({
11837
+ isMobile
11838
+ } = {}) => isMobile ? '24px' : '32px',
11839
+ alignItems: 'stretch'
11840
+ },
11841
+ counterItem: {
11842
+ display: 'flex',
11843
+ flexDirection: 'column',
11844
+ alignItems: 'center',
11845
+ justifyContent: 'center',
11846
+ textAlign: 'center'
11847
+ },
11848
+ value: {
11849
+ margin: 0,
11850
+ marginBottom: '8px',
11851
+ fontSize: '64px',
11852
+ fontWeight: theme.typography?.fontWeight?.bold,
11853
+ lineHeight: 1.1,
11854
+ color: 'rgba(247, 37, 133, 1)' ,
11855
+ wordBreak: 'break-word'
11856
+ },
11857
+ description: {
11858
+ margin: 0,
11859
+ fontSize: '20px',
11860
+ lineHeight: 1.4,
11861
+ fontWeight: '700',
11862
+ color: 'rgba(51, 51, 51, 1)' ,
11863
+ wordBreak: 'break-word'
11864
+ },
11865
+ '@media (max-width: 1024px)': {
11866
+ grid: {
11867
+ gridTemplateColumns: 'repeat(2, 1fr)',
11868
+ gap: '28px'
11869
+ }
11870
+ },
11871
+ '@media (max-width: 767px)': {
11872
+ section: {
11873
+ borderRadius: theme.shape?.borderRadius?.small || '8px'
11874
+ },
11875
+ container: {
11876
+ padding: `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px`
11877
+ },
11878
+ grid: {
11879
+ gridTemplateColumns: '1fr',
11880
+ gap: '24px'
11881
+ },
11882
+ value: {
11883
+ fontSize: theme.typography.fontSize.h3,
11884
+ marginBottom: '4px',
11885
+ lineHeight: 1.1
11886
+ },
11887
+ description: {
11888
+ fontSize: theme.typography.fontSize.body,
11889
+ lineHeight: 1.4
11890
+ }
11891
+ }
11892
+ };
11824
11893
  });
11825
- const SectionWithBackground = withSectionBackground(MemoisedSection);
11826
- function SectionRenderer({
11894
+
11895
+ function CounterSection({
11827
11896
  sectionData,
11828
- extraProps,
11829
- isCustomWebsite,
11830
11897
  sectionIndex
11831
11898
  }) {
11832
- let sectionBg = {};
11833
- if (sectionData?.isV2Section) {
11834
- let currentObj = sectionData?.components?.find(component => component.hasOwnProperty('sectionsBgname')?.sectionBgData || {});
11835
- sectionBg = currentObj?.sectionsBgname?.sectionBgData || {};
11836
- }
11837
- return /*#__PURE__*/React__default["default"].createElement(SectionWithBackground, {
11838
- sectionData: sectionData,
11839
- extraProps: extraProps,
11840
- isCustomWebsite: isCustomWebsite,
11841
- sectionIndex: sectionIndex,
11842
- isSkipV2Section: sectionData?.isV2Section,
11843
- componentBg: sectionBg || {}
11899
+ const {
11900
+ layout: {
11901
+ containerWidth
11902
+ },
11903
+ isMobile
11904
+ } = React.useContext(PageContext);
11905
+ console.log('llll', sectionData);
11906
+ sectionData.components = sectionData.components;
11907
+ const metadata = sectionData.metadata || {};
11908
+ const backgroundImage = metadata.backgroundImage || '';
11909
+ const backgroundColor = metadata.backgroundColor || '#f8f8fa';
11910
+ const classes = useCounterSectionStyles({
11911
+ containerWidth,
11912
+ isMobile,
11913
+ backgroundImage: backgroundImage || null,
11914
+ backgroundColor
11844
11915
  });
11845
- }
11846
-
11847
- function PageRenderer({
11848
- pageData: {
11849
- metadata: {
11850
- theme: {
11851
- color = defaultTheme.color,
11852
- font = defaultTheme.font
11853
- } = defaultTheme,
11854
- layout = defaultLayout
11855
- } = defaultMetadata,
11916
+ const cardData = sectionData?.components[0];
11917
+ const [sectionComponent] = sectionData.components || [];
11918
+ const counterSection = sectionComponent?.counterSection;
11919
+ counterSection?.components || [];
11920
+ if (!cardData) return null;
11921
+ return /*#__PURE__*/React__default["default"].createElement("section", {
11922
+ className: classes.section
11923
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
11924
+ className: classes.container
11925
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
11926
+ className: classes.grid
11927
+ }, cardData?.contentList?.components?.map((item, index) => /*#__PURE__*/React__default["default"].createElement("div", {
11928
+ key: item._id || index,
11929
+ className: classes.counterItem
11930
+ }, item.contentHeading?.metadata?.value != null && item.contentHeading?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("h2", {
11931
+ ref: item.contentHeading?.refSetter,
11932
+ className: classes.value,
11933
+ dangerouslySetInnerHTML: {
11934
+ __html: item.contentHeading.metadata.value
11935
+ }
11936
+ }), item.contentPara?.metadata?.value != null && item.contentPara?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("p", {
11937
+ ref: item.contentPara?.refSetter,
11938
+ className: classes.description,
11939
+ dangerouslySetInnerHTML: {
11940
+ __html: item.contentPara.metadata.value
11941
+ }
11942
+ }))))));
11943
+ }
11944
+
11945
+ var index$5 = /*#__PURE__*/Object.freeze({
11946
+ __proto__: null,
11947
+ 'default': CounterSection
11948
+ });
11949
+
11950
+ const BREAKPOINTS = {
11951
+ mobile: 0,
11952
+ tablet: 768,
11953
+ desktop: 1024
11954
+ };
11955
+
11956
+ /**
11957
+ * Get current breakpoint from window width
11958
+ */
11959
+ const getBreakpoint = width => {
11960
+ if (width >= BREAKPOINTS.desktop) return 'desktop';
11961
+ if (width >= BREAKPOINTS.tablet) return 'tablet';
11962
+ return 'mobile';
11963
+ };
11964
+ const stickyBarBase = {
11965
+ position: 'fixed',
11966
+ left: 0,
11967
+ right: 0,
11968
+ bottom: 0,
11969
+ zIndex: 9998,
11970
+ display: 'flex',
11971
+ alignItems: 'center',
11972
+ justifyContent: 'center',
11973
+ backgroundColor: '#F8F9FB',
11974
+ boxShadow: '0 -2px 8px rgba(0, 0, 0, 0.06)',
11975
+ borderTop: '1px solid #E5E7EB'
11976
+ };
11977
+ const stickyBarResponsive = {
11978
+ mobile: {
11979
+ ...stickyBarBase,
11980
+ padding: '12px 16px',
11981
+ gap: '12px',
11982
+ flexDirection: 'column',
11983
+ alignItems: 'stretch'
11984
+ },
11985
+ tablet: {
11986
+ ...stickyBarBase,
11987
+ padding: '14px 24px',
11988
+ gap: '16px',
11989
+ flexDirection: 'row',
11990
+ alignItems: 'center'
11991
+ },
11992
+ desktop: {
11993
+ ...stickyBarBase,
11994
+ padding: '16px 32px',
11995
+ gap: '24px',
11996
+ flexDirection: 'row',
11997
+ alignItems: 'center'
11998
+ }
11999
+ };
12000
+ const getStickyBarStyle = breakpoint => stickyBarResponsive[breakpoint] || stickyBarResponsive.mobile;
12001
+ const stickyTextBase = {
12002
+ color: '#343A40',
12003
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12004
+ margin: 0
12005
+ };
12006
+ const stickyTextResponsive = {
12007
+ mobile: {
12008
+ ...stickyTextBase,
12009
+ fontSize: '13px',
12010
+ lineHeight: 1.4,
12011
+ textAlign: 'center'
12012
+ },
12013
+ tablet: {
12014
+ ...stickyTextBase,
12015
+ fontSize: '14px',
12016
+ lineHeight: 1.45,
12017
+ textAlign: 'left'
12018
+ },
12019
+ desktop: {
12020
+ ...stickyTextBase,
12021
+ fontSize: '15px',
12022
+ lineHeight: 1.5,
12023
+ textAlign: 'left'
12024
+ }
12025
+ };
12026
+ const getStickyTextStyle = breakpoint => stickyTextResponsive[breakpoint] || stickyTextResponsive.mobile;
12027
+ const stickyButtonBase = {
12028
+ backgroundColor: '#3366FF',
12029
+ color: '#FFFFFF',
12030
+ border: 'none',
12031
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12032
+ fontWeight: 600,
12033
+ textTransform: 'uppercase',
12034
+ letterSpacing: '0.02em',
12035
+ cursor: 'pointer',
12036
+ whiteSpace: 'nowrap',
12037
+ flexShrink: 0
12038
+ };
12039
+ const stickyButtonResponsive = {
12040
+ mobile: {
12041
+ ...stickyButtonBase,
12042
+ padding: '10px 20px',
12043
+ fontSize: '12px',
12044
+ borderRadius: '6px'
12045
+ },
12046
+ tablet: {
12047
+ ...stickyButtonBase,
12048
+ padding: '12px 24px',
12049
+ fontSize: '13px',
12050
+ borderRadius: '8px'
12051
+ },
12052
+ desktop: {
12053
+ ...stickyButtonBase,
12054
+ padding: '14px 28px',
12055
+ fontSize: '14px',
12056
+ borderRadius: '8px'
12057
+ }
12058
+ };
12059
+ const getStickyButtonStyle = breakpoint => stickyButtonResponsive[breakpoint] || stickyButtonResponsive.mobile;
12060
+
12061
+ // --- Floating (WhatsApp) type ---
12062
+
12063
+ const floatingButtonBase = {
12064
+ position: 'fixed',
12065
+ bottom: 24,
12066
+ right: 24,
12067
+ width: 'fit-content',
12068
+ marginLeft: 'auto',
12069
+ zIndex: 9999,
12070
+ display: 'inline-flex',
12071
+ alignItems: 'center',
12072
+ gap: '10px',
12073
+ padding: '12px 20px',
12074
+ backgroundColor: '#FFFFFF',
12075
+ border: '1px solid #E5E7EB',
12076
+ borderRadius: '9999px',
12077
+ boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
12078
+ cursor: 'pointer',
12079
+ textDecoration: 'none',
12080
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12081
+ fontWeight: 700,
12082
+ fontSize: '14px',
12083
+ textTransform: 'uppercase',
12084
+ letterSpacing: '0.02em',
12085
+ color: '#000000',
12086
+ transition: 'box-shadow 0.2s ease, transform 0.2s ease'
12087
+ };
12088
+ const floatingButtonResponsive = {
12089
+ mobile: {
12090
+ ...floatingButtonBase,
12091
+ bottom: 16,
12092
+ left: 16,
12093
+ padding: '10px 16px',
12094
+ gap: '8px',
12095
+ fontSize: '12px'
12096
+ },
12097
+ tablet: {
12098
+ ...floatingButtonBase,
12099
+ bottom: 20,
12100
+ left: 20,
12101
+ padding: '12px 18px',
12102
+ gap: '10px',
12103
+ fontSize: '13px'
12104
+ },
12105
+ desktop: {
12106
+ ...floatingButtonBase,
12107
+ bottom: 24,
12108
+ left: 24,
12109
+ padding: '12px 20px',
12110
+ gap: '10px',
12111
+ fontSize: '14px'
12112
+ }
12113
+ };
12114
+ const getFloatingButtonStyle = breakpoint => floatingButtonResponsive[breakpoint] || floatingButtonResponsive.mobile;
12115
+ const whatsAppIconSvgSize = {
12116
+ mobile: 24,
12117
+ tablet: 26,
12118
+ desktop: 28
12119
+ };
12120
+ const getWhatsAppIconSize = breakpoint => whatsAppIconSvgSize[breakpoint] ?? whatsAppIconSvgSize.mobile;
12121
+
12122
+ const DEFAULT_WHATSAPP_ICON_COLOR = '#25D366';
12123
+
12124
+ /** Build WhatsApp wa.me URL from phone number (digits only, optional + prefix). */
12125
+ function buildWhatsAppUrl(phoneNumber) {
12126
+ if (!phoneNumber || typeof phoneNumber !== 'string') return null;
12127
+ const digits = phoneNumber.replace(/\D/g, '');
12128
+ return digits.length > 0 ? `https://wa.me/${digits}` : null;
12129
+ }
12130
+
12131
+ /**
12132
+ * WhatsApp icon SVG – bubble color is dynamic via props (default #25D366)
12133
+ */
12134
+ const WhatsAppIcon = ({
12135
+ size = 28,
12136
+ color = DEFAULT_WHATSAPP_ICON_COLOR
12137
+ }) => /*#__PURE__*/React__default["default"].createElement("svg", {
12138
+ width: size,
12139
+ height: size,
12140
+ viewBox: "0 0 24 24",
12141
+ fill: "none",
12142
+ xmlns: "http://www.w3.org/2000/svg",
12143
+ "aria-hidden": true
12144
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
12145
+ d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z",
12146
+ fill: color
12147
+ }));
12148
+
12149
+ /** Icon: image when iconImageUrl is provided, otherwise WhatsApp SVG */
12150
+ const CtaIcon = ({
12151
+ size = 28,
12152
+ color,
12153
+ iconImageUrl
12154
+ }) => {
12155
+ if (iconImageUrl && typeof iconImageUrl === 'string') {
12156
+ return /*#__PURE__*/React__default["default"].createElement("img", {
12157
+ src: iconImageUrl,
12158
+ alt: "",
12159
+ width: size,
12160
+ height: size,
12161
+ style: {
12162
+ display: 'block',
12163
+ objectFit: 'contain'
12164
+ },
12165
+ "aria-hidden": true
12166
+ });
12167
+ }
12168
+ return /*#__PURE__*/React__default["default"].createElement(WhatsAppIcon, {
12169
+ size: size,
12170
+ color: color ?? DEFAULT_WHATSAPP_ICON_COLOR
12171
+ });
12172
+ };
12173
+
12174
+ /**
12175
+ * Sticky CTA component.
12176
+ * Renders relative to viewport (app root), not parent section.
12177
+ * Accepts either sectionData (from pageRenderer/sectionRenderer) or flat props.
12178
+ *
12179
+ * @param {object} [sectionData] - Section payload when rendered via SectionRenderer: { type, label, components: [{ type, stickyMessage, ... }] }
12180
+ * @param {string} type - "sticky" | "floating"
12181
+ * @param {string} [stickyMessage] - Message text for sticky bar
12182
+ * @param {string} [stickyButtonText] - CTA button label (default "ENQUIRE NOW")
12183
+ * @param {string} [whatsAppPhoneNumber] - Mobile number for WhatsApp
12184
+ * @param {string} [whatsAppHref] - Optional fallback full URL when whatsAppPhoneNumber is not provided
12185
+ * @param {string} [whatsAppLabel] - Label next to icon (default "SUPPORT")
12186
+ * @param {string} [whatsAppIconColor] - WhatsApp icon color (used when iconImageUrl is not set)
12187
+ * @param {string} [whatsAppButtonBackgroundColor] - Floating button background color
12188
+ * @param {string} [iconImageUrl] - Optional image URL for the icon; when set, shows <img> instead of WhatsApp SVG
12189
+ * @param {object} [extraProps] - From SectionRenderer; extraProps.isEdit true shows in-flow edit hint
12190
+ * @param {boolean} [showEditHint] - When true, shows "Click on edit button to edit this section" in normal flow
12191
+ */
12192
+ function StickyCta({
12193
+ sectionData,
12194
+ type = 'sticky',
12195
+ stickyMessage = 'Live Masterclass will be on 26 January (Monday) from 05:00 PM',
12196
+ stickyButtonText = 'ENQUIRE NOW',
12197
+ whatsAppPhoneNumber,
12198
+ whatsAppHref,
12199
+ whatsAppLabel = 'SUPPORT',
12200
+ whatsAppIconColor,
12201
+ whatsAppButtonBackgroundColor,
12202
+ iconImageUrl
12203
+ }) {
12204
+ console.log('nishu03333', sectionData);
12205
+ const node = sectionData?.components?.[0];
12206
+ const contentList = node?.contentList?.components || [];
12207
+ const showEditHint = sectionData?.isDefaultEditor ?? false;
12208
+ const propsFromSection = node ? {
12209
+ type: node?.title?.metadata?.value ?? type,
12210
+ stickyMessage: contentList[1]?.contentPara?.metadata?.value ?? stickyMessage,
12211
+ stickyButtonText: contentList[1]?.contentHeading?.metadata?.value ?? stickyButtonText,
12212
+ whatsAppPhoneNumber: node.subheading?.metadata?.value ?? whatsAppPhoneNumber,
12213
+ whatsAppHref: node.whatsAppHref ?? whatsAppHref,
12214
+ whatsAppLabel: contentList[0]?.contentHeading?.metadata?.value ?? whatsAppLabel,
12215
+ whatsAppIconColor: node.whatsAppIconColor ?? whatsAppIconColor,
12216
+ whatsAppButtonBackgroundColor: node.whatsAppButtonBackgroundColor ?? whatsAppButtonBackgroundColor,
12217
+ iconImageUrl: contentList[0]?.contentPara?.metadata?.value ?? iconImageUrl
12218
+ } : null;
12219
+ const p = propsFromSection ?? {
12220
+ type,
12221
+ stickyMessage,
12222
+ stickyButtonText,
12223
+ whatsAppPhoneNumber,
12224
+ whatsAppHref,
12225
+ whatsAppLabel,
12226
+ whatsAppIconColor,
12227
+ whatsAppButtonBackgroundColor,
12228
+ iconImageUrl
12229
+ };
12230
+ const whatsAppUrl = p?.whatsAppPhoneNumber ? p?.whatsAppPhoneNumber : buildWhatsAppUrl(p?.whatsAppPhoneNumber);
12231
+ const [breakpoint, setBreakpoint] = React.useState(() => typeof window !== 'undefined' ? getBreakpoint(window.innerWidth) : 'mobile');
12232
+ React.useEffect(() => {
12233
+ if (typeof window === 'undefined') return;
12234
+ const onResize = () => setBreakpoint(getBreakpoint(window.innerWidth));
12235
+ window.addEventListener('resize', onResize);
12236
+ return () => window.removeEventListener('resize', onResize);
12237
+ }, []);
12238
+ const editHintBlock = showEditHint ? /*#__PURE__*/React__default["default"].createElement("div", {
12239
+ "data-section": "sticky-cta-edit-hint",
12240
+ style: {
12241
+ position: 'relative',
12242
+ width: '100%',
12243
+ padding: '12px 16px',
12244
+ textAlign: 'center',
12245
+ backgroundColor: '#f5f5f5',
12246
+ border: '1px dashed #ccc',
12247
+ borderRadius: 8,
12248
+ marginBottom: 8
12249
+ }
12250
+ }, /*#__PURE__*/React__default["default"].createElement("h2", {
12251
+ style: {
12252
+ margin: 0,
12253
+ fontSize: 16,
12254
+ fontWeight: 600,
12255
+ color: '#555'
12256
+ }
12257
+ }, "Click on edit button to edit this section")) : null;
12258
+ if (p.type === 'floating') {
12259
+ const buttonStyle = {
12260
+ ...getFloatingButtonStyle(breakpoint),
12261
+ ...(p.whatsAppButtonBackgroundColor != null && {
12262
+ backgroundColor: p.whatsAppButtonBackgroundColor
12263
+ })
12264
+ };
12265
+ const iconSize = getWhatsAppIconSize(breakpoint);
12266
+ const iconColor = p.whatsAppIconColor ?? DEFAULT_WHATSAPP_ICON_COLOR;
12267
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, editHintBlock, /*#__PURE__*/React__default["default"].createElement("a", {
12268
+ href: whatsAppUrl,
12269
+ target: "_blank",
12270
+ rel: "noopener noreferrer",
12271
+ "access-cta": "DIY",
12272
+ style: buttonStyle,
12273
+ onMouseEnter: e => {
12274
+ e.currentTarget.style.boxShadow = '0 6px 16px rgba(0, 0, 0, 0.12)';
12275
+ e.currentTarget.style.transform = 'scale(1.02)';
12276
+ },
12277
+ onMouseLeave: e => {
12278
+ e.currentTarget.style.boxShadow = '0 4px 12px rgba(0, 0, 0, 0.1)';
12279
+ e.currentTarget.style.transform = 'scale(1)';
12280
+ },
12281
+ "aria-label": `${p.whatsAppLabel} via WhatsApp`
12282
+ }, /*#__PURE__*/React__default["default"].createElement(CtaIcon, {
12283
+ size: iconSize,
12284
+ color: iconColor,
12285
+ iconImageUrl: p.iconImageUrl
12286
+ }), /*#__PURE__*/React__default["default"].createElement("span", null, p.whatsAppLabel)));
12287
+ }
12288
+
12289
+ // type === 'sticky' – button uses mobile number from props to build URL; click redirects to WhatsApp
12290
+ const barStyle = getStickyBarStyle(breakpoint);
12291
+ const textStyle = getStickyTextStyle(breakpoint);
12292
+ const buttonStyle = getStickyButtonStyle(breakpoint);
12293
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, editHintBlock, /*#__PURE__*/React__default["default"].createElement("div", {
12294
+ style: barStyle,
12295
+ role: "banner"
12296
+ }, /*#__PURE__*/React__default["default"].createElement("p", {
12297
+ style: textStyle
12298
+ }, p.stickyMessage), /*#__PURE__*/React__default["default"].createElement("a", {
12299
+ href: whatsAppUrl,
12300
+ target: "_blank",
12301
+ rel: "noopener noreferrer",
12302
+ "access-cta-container": "DIY",
12303
+ style: {
12304
+ ...buttonStyle,
12305
+ textDecoration: 'none',
12306
+ display: 'inline-flex',
12307
+ alignItems: 'center',
12308
+ justifyContent: 'center'
12309
+ }
12310
+ }, p.stickyButtonText)));
12311
+ }
12312
+
12313
+ var index$4 = /*#__PURE__*/Object.freeze({
12314
+ __proto__: null,
12315
+ 'default': StickyCta,
12316
+ WhatsAppIcon: WhatsAppIcon
12317
+ });
12318
+
12319
+ /**
12320
+ * Styles for CustomHtmlRender section.
12321
+ * Wrapper for user-provided HTML content.
12322
+ */
12323
+
12324
+ const sectionStyle = {
12325
+ width: '100%',
12326
+ maxWidth: '100%',
12327
+ height: 'auto',
12328
+ minHeight: 'auto',
12329
+ margin: 0,
12330
+ padding: 0,
12331
+ overflow: 'visible'
12332
+ };
12333
+
12334
+ const SHADOW_WRAPPER_CLASS = 'custom-html-body-wrap';
12335
+ const SHADOW_INNER_CLASS = 'custom-html-render__shadow-inner';
12336
+
12337
+ /**
12338
+ * Parses full HTML string and extracts styles + body/content for Shadow DOM.
12339
+ * - Strips <!DOCTYPE>, <html>, <head>, <body> and uses inner content + all <style>.
12340
+ * - Scopes "body" and "html" selectors to a wrapper class so styles don't leak to the main app.
12341
+ */
12342
+ function parseHtmlForShadow(html) {
12343
+ if (typeof html !== 'string' || !html.trim()) return {
12344
+ styles: '',
12345
+ content: ''
12346
+ };
12347
+ const styleRegex = /<style[^>]*>([\s\S]*?)<\/style>/gi;
12348
+ const bodyRegex = /<body[^>]*>([\s\S]*?)<\/body>/i;
12349
+ let styles = '';
12350
+ let match;
12351
+ while ((match = styleRegex.exec(html)) !== null) {
12352
+ styles += match[1];
12353
+ }
12354
+ const bodyMatch = html.match(bodyRegex);
12355
+ const rawContent = bodyMatch ? bodyMatch[1].trim() : html;
12356
+
12357
+ // Scope "body" and "html" in CSS to the wrapper so they don't affect the main page.
12358
+ // Only replace as standalone selectors (word boundary) to avoid breaking values like content: "body"
12359
+ let scopedStyles = styles.replace(/\bbody\b(?=\s*[{,])/g, `.${SHADOW_WRAPPER_CLASS}`).replace(/\bhtml\b(?=\s*[{,])/g, `.${SHADOW_WRAPPER_CLASS}`);
12360
+ const content = bodyMatch ? `<div class="${SHADOW_WRAPPER_CLASS}">${rawContent}</div>` : rawContent;
12361
+ return {
12362
+ styles: scopedStyles,
12363
+ content
12364
+ };
12365
+ }
12366
+
12367
+ /**
12368
+ * Base styles inside shadow so the body wrapper has layout and can show background/padding.
12369
+ */
12370
+ const SHADOW_BASE_STYLES = `
12371
+ .${SHADOW_INNER_CLASS}, .${SHADOW_WRAPPER_CLASS} {
12372
+ display: block;
12373
+ width: 100%;
12374
+ box-sizing: border-box;
12375
+ }
12376
+ .${SHADOW_INNER_CLASS} {
12377
+ min-height: 0;
12378
+ }
12379
+ `;
12380
+
12381
+ /**
12382
+ * Resolves HTML string from section data.
12383
+ * Supports: sectionData.components[0].CustomHtml.metadata.value (API shape)
12384
+ * and sectionData.components[0].html or props.html (legacy/flat).
12385
+ */
12386
+ function getHtmlFromSectionData(sectionData, fallbackHtml = '') {
12387
+ const node = sectionData?.components?.[0];
12388
+ if (!node) return fallbackHtml;
12389
+ const fromCustomHtml = node.CustomHtml?.metadata?.value;
12390
+ if (typeof fromCustomHtml === 'string') return fromCustomHtml;
12391
+ if (typeof node.html === 'string') return node.html;
12392
+ return fallbackHtml;
12393
+ }
12394
+
12395
+ /**
12396
+ * CustomHtmlRender – renders any full HTML document or fragment in an encapsulated Shadow DOM.
12397
+ * Receives html via sectionData.components[0].CustomHtml.metadata.value (or .html) or props.html.
12398
+ * Body/html background, padding, and all other CSS apply only inside this section.
12399
+ */
12400
+ function CustomHtmlRender({
12401
+ sectionData,
12402
+ html = '',
12403
+ className,
12404
+ style = {}
12405
+ }) {
12406
+ const containerRef = React.useRef(null);
12407
+ const node = sectionData?.components?.[0];
12408
+ const resolvedHtml = getHtmlFromSectionData(sectionData, html);
12409
+ const p = node ? {
12410
+ html: resolvedHtml,
12411
+ className: node.className ?? className,
12412
+ style: node.style ?? style
12413
+ } : {
12414
+ html: resolvedHtml,
12415
+ className,
12416
+ style
12417
+ };
12418
+ const safeHtml = typeof p.html === 'string' ? p.html : '';
12419
+ const setSectionRef = el => {
12420
+ containerRef.current = el;
12421
+ const refSetter = node?.CustomHtml?.refSetter;
12422
+ if (refSetter) {
12423
+ if (typeof refSetter === 'function') refSetter(el);else if (refSetter && typeof refSetter === 'object') refSetter.current = el;
12424
+ }
12425
+ };
12426
+ React.useEffect(() => {
12427
+ if (!safeHtml.trim() || !containerRef.current) return;
12428
+ const {
12429
+ styles,
12430
+ content
12431
+ } = parseHtmlForShadow(safeHtml);
12432
+ const host = containerRef.current;
12433
+ if (!host.shadowRoot) {
12434
+ host.attachShadow({
12435
+ mode: 'open'
12436
+ });
12437
+ }
12438
+ const shadowRoot = host.shadowRoot;
12439
+ shadowRoot.innerHTML = '';
12440
+ const inner = document.createElement('div');
12441
+ inner.className = SHADOW_INNER_CLASS;
12442
+ if (SHADOW_BASE_STYLES) {
12443
+ const baseStyle = document.createElement('style');
12444
+ baseStyle.textContent = SHADOW_BASE_STYLES;
12445
+ shadowRoot.appendChild(baseStyle);
12446
+ }
12447
+ if (styles) {
12448
+ const styleEl = document.createElement('style');
12449
+ styleEl.textContent = styles;
12450
+ shadowRoot.appendChild(styleEl);
12451
+ }
12452
+ const contentWrap = document.createElement('div');
12453
+ contentWrap.innerHTML = content;
12454
+ while (contentWrap.firstChild) {
12455
+ inner.appendChild(contentWrap.firstChild);
12456
+ }
12457
+ shadowRoot.appendChild(inner);
12458
+ return () => {
12459
+ shadowRoot.innerHTML = '';
12460
+ };
12461
+ }, [safeHtml]);
12462
+ if (!safeHtml.trim()) {
12463
+ return null;
12464
+ }
12465
+ return /*#__PURE__*/React__default["default"].createElement("section", {
12466
+ ref: setSectionRef,
12467
+ className: p.className,
12468
+ style: {
12469
+ ...sectionStyle,
12470
+ ...p.style
12471
+ },
12472
+ "data-section": "custom-html-render"
12473
+ });
12474
+ }
12475
+
12476
+ var index$3 = /*#__PURE__*/Object.freeze({
12477
+ __proto__: null,
12478
+ 'default': CustomHtmlRender
12479
+ });
12480
+
12481
+ const useTimerCallPageStyles = createUseStyles(theme => ({
12482
+ timerAndCallSection: {
12483
+ padding: ({
12484
+ isMobile
12485
+ } = {}) => isMobile ? '24px' : '80px 120px',
12486
+ background: theme?.colors?.white,
12487
+ '&, & *, & *:before, & *:after': {
12488
+ fontFamily: theme?.typography?.fontFamily,
12489
+ boxSizing: 'border-box'
12490
+ }
12491
+ },
12492
+ timerAndCallContainer: {
12493
+ padding: '72px',
12494
+ background: '#F4F9FF',
12495
+ borderRadius: '8px',
12496
+ boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
12497
+ },
12498
+ timerAndCallBox: {
12499
+ display: 'flex',
12500
+ flexDirection: 'column',
12501
+ gap: '42px',
12502
+ justifyContent: 'center',
12503
+ alignItems: 'center'
12504
+ },
12505
+ title: {
12506
+ fontWeight: '700',
12507
+ fontSize: '40px',
12508
+ textAlign: 'center',
12509
+ lineHeight: '45px'
12510
+ },
12511
+ offerWrapper: {
12512
+ display: 'flex',
12513
+ flexDirection: 'column',
12514
+ gap: '24px',
12515
+ justifyContent: 'center',
12516
+ alignItems: 'center'
12517
+ },
12518
+ offerEndsTitle: {
12519
+ fontWeight: '700',
12520
+ fontSize: '16px'
12521
+ },
12522
+ countdown: {
12523
+ display: 'flex',
12524
+ gap: '10px'
12525
+ },
12526
+ counterBox: {
12527
+ display: 'flex',
12528
+ flexDirection: 'column',
12529
+ justifyContent: 'center',
12530
+ alignItems: 'center',
12531
+ border: '0.56px solid #2C88FF',
12532
+ borderRadius: '8px',
12533
+ background: '#FFFFFF',
12534
+ color: '#2C88FF',
12535
+ padding: '12px 16px 12px 16px',
12536
+ fontWeight: '600',
12537
+ fontSize: '14px'
12538
+ },
12539
+ // SMALL SCREEN
12540
+ '@media screen and (max-width: 767px)': {
12541
+ timerAndCallSection: {
12542
+ padding: '24px'
12543
+ },
12544
+ timerAndCallContainer: {
12545
+ padding: '16px'
12546
+ },
12547
+ timerAndCallBox: {
12548
+ gap: '32px'
12549
+ },
12550
+ title: {
12551
+ fontSize: '24px'
12552
+ },
12553
+ offerWrapper: {
12554
+ gap: '16px'
12555
+ }
12556
+ }
12557
+ }));
12558
+
12559
+ const TimerAndCall = ({
12560
+ sectionData,
12561
+ extraProps = {}
12562
+ }) => {
12563
+ const {
12564
+ isMobile,
12565
+ fullPageData
12566
+ } = React.useContext(PageContext);
12567
+ const [nodeData] = sectionData?.components;
12568
+ const classes = useTimerCallPageStyles({
12569
+ isMobile
12570
+ });
12571
+ const CounterBox = ({
12572
+ value,
12573
+ text
12574
+ }) => {
12575
+ return /*#__PURE__*/React__default["default"].createElement("div", {
12576
+ className: classes.counterBox
12577
+ }, /*#__PURE__*/React__default["default"].createElement("div", null, value), /*#__PURE__*/React__default["default"].createElement("div", null, text));
12578
+ };
12579
+ const renderer = ({
12580
+ formatted,
12581
+ completed
12582
+ }) => {
12583
+ return /*#__PURE__*/React__default["default"].createElement("div", {
12584
+ className: classes.countdown
12585
+ }, /*#__PURE__*/React__default["default"].createElement(CounterBox, {
12586
+ value: formatted?.hours,
12587
+ text: "Hours"
12588
+ }), /*#__PURE__*/React__default["default"].createElement(CounterBox, {
12589
+ value: formatted?.minutes,
12590
+ text: "Mins"
12591
+ }), /*#__PURE__*/React__default["default"].createElement(CounterBox, {
12592
+ value: formatted?.seconds,
12593
+ text: "Secs"
12594
+ }));
12595
+ };
12596
+ const CountDownJSX = offerPriceValidFor => {
12597
+ let conversions = extraProps?.conversions || 0;
12598
+ if (offerPriceValidFor && offerPriceValidFor - conversions <= 0) {
12599
+ return null;
12600
+ }
12601
+ return /*#__PURE__*/React__default["default"].createElement("div", {
12602
+ className: classes.offerWrapper
12603
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
12604
+ className: classes.offerEndsTitle
12605
+ }, "Offer ends in"), /*#__PURE__*/React__default["default"].createElement(Countdown__default["default"], {
12606
+ renderer: renderer,
12607
+ date: nodeData.offerCounter?.metadata?.endDate,
12608
+ daysInHours: true
12609
+ }));
12610
+ };
12611
+ return /*#__PURE__*/React__default["default"].createElement("section", {
12612
+ className: classes.timerAndCallSection
12613
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
12614
+ className: classes.timerAndCallContainer
12615
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
12616
+ className: classes.timerAndCallBox
12617
+ }, nodeData?.showOffer?.metadata?.value && nodeData.offerCounter?.metadata?.isOfferActive ? CountDownJSX(nodeData.offerCounter?.metadata?.offerPriceValidFor) : null, nodeData?.title?.metadata?.value ? /*#__PURE__*/React__default["default"].createElement("div", {
12618
+ className: classes.title
12619
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
12620
+ ref: nodeData?.heading?.refSetter,
12621
+ dangerouslySetInnerHTML: {
12622
+ __html: nodeData?.title?.metadata?.value
12623
+ }
12624
+ })) : null, nodeData?.timerButton?.metadata?.value ? /*#__PURE__*/React__default["default"].createElement(Button, {
12625
+ style: {
12626
+ width: '100%',
12627
+ fontWeight: '700',
12628
+ fontSize: '14px'
12629
+ },
12630
+ data: {
12631
+ // link: 'headerData?.loginCtaLink',
12632
+ // isLink: 1,
12633
+ value: nodeData.timerButton.metadata.value
12634
+ // isExternal: 1
12635
+ },
12636
+ onClick: extraProps?.courseBuyNow,
12637
+ type: 'primary',
12638
+ size: 'medium',
12639
+ target: null,
12640
+ name: "button",
12641
+ rel: null
12642
+ // styling={isMobile ? { margin: '0 40px' } : {}}
12643
+ }) : null)));
12644
+ };
12645
+
12646
+ var index$2 = /*#__PURE__*/Object.freeze({
12647
+ __proto__: null,
12648
+ 'default': TimerAndCall
12649
+ });
12650
+
12651
+ const TYPE_TO_COMPONENT_MAP = {
12652
+ BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
12653
+ GRID_CARD: List,
12654
+ BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
12655
+ BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
12656
+ BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
12657
+ FORM_SUBSCRIBE: SubscribeToNewsletter,
12658
+ TEXT_TESTIMONIAL: Testimonials,
12659
+ VIDEO_TESTIMONIAL: VideoTestimonial,
12660
+ VIDEO: Video,
12661
+ INFO: Info,
12662
+ TEXT: TextSection,
12663
+ IMAGE_GALLERY: PhotoGallery,
12664
+ FAQ_LISTING: FAQListing,
12665
+ TEXT_GRID: TextGrid,
12666
+ COURSE_CAROUSEL: courses,
12667
+ TEAM_CARD: TeamCard,
12668
+ CONTACT: FormEnquiry,
12669
+ FORM_ENQUIRY: Contact,
12670
+ WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
12671
+ COURSE_LANDING_PAGE: CoursePromotionPage,
12672
+ FORM_LANDING_PAGE: FormPage,
12673
+ TILES_SECTION: Tiles,
12674
+ EMAIL_DRIP_MARKET: EmailDripMarket,
12675
+ ABOUT_INSTITUTE,
12676
+ COUNTER_SECTION: CounterSection,
12677
+ STICKY_CTA: StickyCta,
12678
+ CUSTOM_HTML_SECTION: CustomHtmlRender,
12679
+ TIMER_AND_CALL: TimerAndCall
12680
+ };
12681
+ const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
12682
+ const MemoisedSection = /*#__PURE__*/React.memo(({
12683
+ sectionData,
12684
+ extraProps,
12685
+ isCustomWebsite,
12686
+ sectionIndex
12687
+ }) => {
12688
+ console.log('extraProps in section data', extraProps);
12689
+ const SectionComp = getCompToRender(sectionData.type);
12690
+ return /*#__PURE__*/React__default["default"].createElement(SectionComp, {
12691
+ sectionData: sectionData,
12692
+ extraProps: extraProps,
12693
+ isCustomWebsite: isCustomWebsite,
12694
+ sectionIndex: sectionIndex
12695
+ });
12696
+ });
12697
+ const SectionWithBackground = withSectionBackground(MemoisedSection);
12698
+ function SectionRenderer({
12699
+ sectionData,
12700
+ extraProps,
12701
+ isCustomWebsite,
12702
+ sectionIndex
12703
+ }) {
12704
+ let sectionBg = {};
12705
+ if (sectionData?.isV2Section) {
12706
+ sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
12707
+ }
12708
+ return /*#__PURE__*/React__default["default"].createElement(SectionWithBackground, {
12709
+ sectionData: sectionData,
12710
+ extraProps: extraProps,
12711
+ isCustomWebsite: isCustomWebsite,
12712
+ sectionIndex: sectionIndex,
12713
+ isSkipV2Section: sectionData?.isV2Section,
12714
+ componentBg: sectionBg || {}
12715
+ });
12716
+ }
12717
+
12718
+ function PageRenderer({
12719
+ pageData: {
12720
+ metadata: {
12721
+ theme: {
12722
+ color = defaultTheme.color,
12723
+ font = defaultTheme.font,
12724
+ roundness = defaultTheme.roundness
12725
+ } = defaultTheme,
12726
+ layout = defaultLayout
12727
+ } = defaultMetadata,
11856
12728
  sections,
11857
12729
  header,
11858
12730
  footer,
@@ -11900,7 +12772,7 @@ function PageRenderer({
11900
12772
  countryCode,
11901
12773
  currencySymbol
11902
12774
  }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
11903
- const theme = React.useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
12775
+ const theme = React.useMemo(() => generateTheme(color, font, context.isMobile, roundness), [color, font, context.isMobile, roundness]);
11904
12776
  const Wrapper = SectionWrapper || React.Fragment;
11905
12777
  return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
11906
12778
  theme: theme
@@ -12162,30 +13034,12 @@ function VideoWorkshopPromotion({
12162
13034
  },
12163
13035
  isMobile
12164
13036
  } = React.useContext(PageContext);
12165
- console.log('nnnn', sectionData);
12166
13037
  const classes = useVideoWorkshopPromotionStyles({
12167
13038
  containerWidth,
12168
13039
  isMobile
12169
13040
  });
12170
- const [sectionComponent] = sectionData?.components?.slice(1) || [];
12171
- const videoWorkshopPromotion = sectionComponent?.videoWorkshopPromotion;
12172
- const [contentNode] = videoWorkshopPromotion?.components || [];
12173
- if (!contentNode) return null;
12174
- const {
12175
- testimonialCategory,
12176
- mainHeading,
12177
- subHeading,
12178
- cta,
12179
- videoThumbnail,
12180
- videoEmbed,
12181
- videoTitleOverlay,
12182
- videoCaption,
12183
- watchOnYouTube
12184
- } = contentNode;
12185
- const videoUrl = videoEmbed?.metadata?.value;
12186
- const thumbnailUrl = videoEmbed?.metadata?.thumbnail || videoThumbnail?.metadata?.value;
12187
- const showCta = cta?.metadata?.value && (cta?.validations?.isEmptyAllowed ? true : cta?.metadata?.value !== '');
12188
- const showWatchOnYouTube = watchOnYouTube?.metadata?.value && (watchOnYouTube?.validations?.isEmptyAllowed ? true : watchOnYouTube?.metadata?.value !== '');
13041
+ const wokShopData = sectionData?.components[0];
13042
+ const videoData = wokShopData?.videoCarousel?.components?.[0];
12189
13043
  return /*#__PURE__*/React__default["default"].createElement("section", {
12190
13044
  className: classes.section
12191
13045
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -12194,72 +13048,42 @@ function VideoWorkshopPromotion({
12194
13048
  className: classes.sectionInner
12195
13049
  }, /*#__PURE__*/React__default["default"].createElement("div", {
12196
13050
  className: classes.textBlock
12197
- }, testimonialCategory?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h5", {
12198
- ref: testimonialCategory?.refSetter,
13051
+ }, wokShopData?.videoHeading?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h5", {
13052
+ ref: wokShopData?.videoHeading?.refSetter,
12199
13053
  className: classes.category,
12200
13054
  dangerouslySetInnerHTML: {
12201
- __html: testimonialCategory.metadata.value
13055
+ __html: wokShopData?.videoHeading?.metadata?.value
12202
13056
  }
12203
- }), mainHeading?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h1", {
12204
- ref: mainHeading?.refSetter,
13057
+ }), wokShopData?.title?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("h1", {
13058
+ ref: wokShopData?.title?.refSetter,
12205
13059
  className: classes.mainHeading,
12206
13060
  dangerouslySetInnerHTML: {
12207
- __html: mainHeading.metadata.value
12208
- }
12209
- }), subHeading?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("p", {
12210
- ref: subHeading?.refSetter,
12211
- className: classes.subHeading,
12212
- dangerouslySetInnerHTML: {
12213
- __html: subHeading.metadata.value
13061
+ __html: wokShopData?.title?.metadata?.value
12214
13062
  }
12215
- }), showCta && /*#__PURE__*/React__default["default"].createElement("div", {
13063
+ }), videoData?.videoTextContent?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("div", {
12216
13064
  className: classes.ctaWrap
12217
13065
  }, /*#__PURE__*/React__default["default"].createElement(Button, {
12218
- ref: cta?.refSetter,
12219
- data: cta.metadata,
12220
- type: cta.metadata?.type || 'primary',
13066
+ ref: videoData?.videoTextContent?.metadata?.refSetter,
13067
+ data: videoData?.videoTextContent?.metadata,
13068
+ type: 'primary',
12221
13069
  size: isMobile ? 'small' : 'medium'
12222
13070
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
12223
13071
  className: classes.videoBlock
12224
13072
  }, /*#__PURE__*/React__default["default"].createElement("div", {
12225
13073
  className: classes.videoWrapper
12226
13074
  }, /*#__PURE__*/React__default["default"].createElement("div", {
12227
- ref: videoEmbed?.refSetter,
13075
+ ref: videoData?.videoFrame?.refSetter,
12228
13076
  className: classes.videoAspectWrap
12229
13077
  }, /*#__PURE__*/React__default["default"].createElement(VideoPlayer, {
12230
- imageUrl: thumbnailUrl,
12231
- videoUrl: videoUrl,
13078
+ imageUrl: videoData?.videoFrame?.metadata?.thumbnail,
13079
+ videoUrl: videoData?.videoFrame?.metadata?.value,
12232
13080
  sectionIndex: sectionIndex
12233
- })), videoTitleOverlay?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("div", {
12234
- className: classes.videoTitleOverlay
12235
- }, /*#__PURE__*/React__default["default"].createElement("span", {
12236
- ref: videoTitleOverlay?.refSetter,
12237
- dangerouslySetInnerHTML: {
12238
- __html: videoTitleOverlay.metadata.value
12239
- }
12240
- })), videoCaption?.metadata?.value && /*#__PURE__*/React__default["default"].createElement("div", {
12241
- className: classes.videoCaption
12242
- }, /*#__PURE__*/React__default["default"].createElement("p", {
12243
- ref: videoCaption?.refSetter,
12244
- dangerouslySetInnerHTML: {
12245
- __html: videoCaption.metadata.value
12246
- }
12247
- })), showWatchOnYouTube && /*#__PURE__*/React__default["default"].createElement("div", {
12248
- className: classes.watchOnYouTubeWrap
12249
- }, /*#__PURE__*/React__default["default"].createElement(Button, {
12250
- ref: watchOnYouTube?.refSetter,
12251
- data: {
12252
- ...watchOnYouTube.metadata,
12253
- isExternal: true
12254
- },
12255
- type: watchOnYouTube.metadata?.type || 'secondary',
12256
- size: "small"
12257
13081
  })))))));
12258
13082
  }
12259
13083
 
12260
- var index$2 = /*#__PURE__*/Object.freeze({
12261
- __proto__: null,
12262
- 'default': VideoWorkshopPromotion
13084
+ var index$1 = /*#__PURE__*/Object.freeze({
13085
+ __proto__: null,
13086
+ 'default': VideoWorkshopPromotion
12263
13087
  });
12264
13088
 
12265
13089
  const useCoursePromotionPage = createUseStyles(theme => {
@@ -12890,157 +13714,9 @@ function CoursePromotionPagev2({
12890
13714
  }))));
12891
13715
  }
12892
13716
 
12893
- var index$1 = /*#__PURE__*/Object.freeze({
12894
- __proto__: null,
12895
- 'default': CoursePromotionPagev2
12896
- });
12897
-
12898
- const useCounterSectionStyles = createUseStyles(theme => {
12899
- return {
12900
- section: {
12901
- width: '100%',
12902
- borderRadius: theme.shape?.borderRadius?.regular || '12px',
12903
- overflow: 'hidden',
12904
- backgroundImage: ({
12905
- backgroundImage
12906
- } = {}) => backgroundImage ? `url("${backgroundImage}")` : 'none',
12907
- backgroundColor: ({
12908
- backgroundColor
12909
- } = {}) => backgroundColor || '#f8f8fa',
12910
- backgroundSize: 'cover',
12911
- backgroundPosition: 'center',
12912
- backgroundRepeat: 'no-repeat',
12913
- '&, & *, & *:before, & *:after': {
12914
- fontFamily: theme?.typography?.fontFamily,
12915
- boxSizing: 'border-box'
12916
- }
12917
- },
12918
- container: {
12919
- width: '100%',
12920
- maxWidth: ({
12921
- containerWidth
12922
- } = {}) => containerWidth || '1440px',
12923
- margin: '0 auto',
12924
- padding: ({
12925
- isMobile
12926
- } = {}) => isMobile ? `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px` : `${theme.spacing.padding.small}px ${theme.spacing.padding.medium}px`
12927
- },
12928
- grid: {
12929
- display: 'grid',
12930
- gridTemplateColumns: 'repeat(4, 1fr)',
12931
- gap: ({
12932
- isMobile
12933
- } = {}) => isMobile ? '24px' : '32px',
12934
- alignItems: 'stretch'
12935
- },
12936
- counterItem: {
12937
- display: 'flex',
12938
- flexDirection: 'column',
12939
- alignItems: 'center',
12940
- justifyContent: 'center',
12941
- textAlign: 'center'
12942
- },
12943
- value: {
12944
- margin: 0,
12945
- marginBottom: '8px',
12946
- fontSize: theme.typography.fontSize.h2,
12947
- fontWeight: theme.typography?.fontWeight?.bold,
12948
- lineHeight: 1.1,
12949
- color: theme.palette?.primary?.main || '#1976d2',
12950
- wordBreak: 'break-word'
12951
- },
12952
- description: {
12953
- margin: 0,
12954
- fontSize: theme.typography.fontSize.body,
12955
- lineHeight: 1.4,
12956
- color: theme.palette?.font?.primary || '#4a4a4a',
12957
- wordBreak: 'break-word'
12958
- },
12959
- '@media (max-width: 1024px)': {
12960
- grid: {
12961
- gridTemplateColumns: 'repeat(2, 1fr)',
12962
- gap: '28px'
12963
- }
12964
- },
12965
- '@media (max-width: 767px)': {
12966
- section: {
12967
- borderRadius: theme.shape?.borderRadius?.small || '8px'
12968
- },
12969
- container: {
12970
- padding: `${theme.spacing.padding.regular}px ${theme.spacing.padding.tiny}px`
12971
- },
12972
- grid: {
12973
- gridTemplateColumns: '1fr',
12974
- gap: '24px'
12975
- },
12976
- value: {
12977
- fontSize: theme.typography.fontSize.h3,
12978
- marginBottom: '4px',
12979
- lineHeight: 1.1
12980
- },
12981
- description: {
12982
- fontSize: theme.typography.fontSize.body,
12983
- lineHeight: 1.4
12984
- }
12985
- }
12986
- };
12987
- });
12988
-
12989
- function CounterSection({
12990
- sectionData,
12991
- sectionIndex
12992
- }) {
12993
- const {
12994
- layout: {
12995
- containerWidth
12996
- },
12997
- isMobile
12998
- } = React.useContext(PageContext);
12999
- console.log('llll', sectionData);
13000
- sectionData.components = sectionData?.isV2Section ? sectionData.components.slice(1) : sectionData.components;
13001
-
13002
- // console.log("llll",sectionData);
13003
-
13004
- const metadata = sectionData.metadata || {};
13005
- const backgroundImage = metadata.backgroundImage || '';
13006
- const backgroundColor = metadata.backgroundColor || '#f8f8fa';
13007
- const classes = useCounterSectionStyles({
13008
- containerWidth,
13009
- isMobile,
13010
- backgroundImage: backgroundImage || null,
13011
- backgroundColor
13012
- });
13013
- const [sectionComponent] = sectionData.components || [];
13014
- const counterSection = sectionComponent?.counterSection;
13015
- const counters = counterSection?.components || [];
13016
- if (!counters.length) return null;
13017
- return /*#__PURE__*/React__default["default"].createElement("section", {
13018
- className: classes.section
13019
- }, /*#__PURE__*/React__default["default"].createElement("div", {
13020
- className: classes.container
13021
- }, /*#__PURE__*/React__default["default"].createElement("div", {
13022
- className: classes.grid
13023
- }, counters.map((item, index) => /*#__PURE__*/React__default["default"].createElement("div", {
13024
- key: item._id || index,
13025
- className: classes.counterItem
13026
- }, item.value?.metadata?.value != null && item.value?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("h2", {
13027
- ref: item.value?.refSetter,
13028
- className: classes.value,
13029
- dangerouslySetInnerHTML: {
13030
- __html: item.value.metadata.value
13031
- }
13032
- }), item.description?.metadata?.value != null && item.description?.metadata?.value !== '' && /*#__PURE__*/React__default["default"].createElement("p", {
13033
- ref: item.description?.refSetter,
13034
- className: classes.description,
13035
- dangerouslySetInnerHTML: {
13036
- __html: item.description.metadata.value
13037
- }
13038
- }))))));
13039
- }
13040
-
13041
13717
  var index = /*#__PURE__*/Object.freeze({
13042
- __proto__: null,
13043
- 'default': CounterSection
13718
+ __proto__: null,
13719
+ 'default': CoursePromotionPagev2
13044
13720
  });
13045
13721
 
13046
13722
  exports.Icon = Icon;