diy-template-components 2.0.86 → 2.0.88

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.es.js CHANGED
@@ -226,6 +226,76 @@ const useSectionStyles$a = createUseStyles(theme => ({
226
226
  justifyContent: 'center',
227
227
  width: '10%'
228
228
  },
229
+ offerPrice: {
230
+ fontSize: theme.typography.fontSize.h4,
231
+ fontWeight: '700'
232
+ },
233
+ originalPrice: {
234
+ textDecoration: 'line-through',
235
+ color: 'rgba(51, 51, 51, 0.6)'
236
+ },
237
+ offerDiscount: {
238
+ color: '#08BD80',
239
+ fontWeight: '600'
240
+ },
241
+ rightNav: {
242
+ marginRight: '120px',
243
+ display: 'flex'
244
+ },
245
+ priceBox: {
246
+ marginRight: '16px'
247
+ },
248
+ offerBox: {
249
+ marginRight: '24px',
250
+ display: 'flex',
251
+ flexDirection: 'column',
252
+ backgroundColor: 'rgba(244, 249, 253, 1)',
253
+ justifyContent: 'space-between',
254
+ borderRadius: '8px'
255
+ },
256
+ offerBoxText: {
257
+ color: 'rgba(51, 51, 51, 0.6)',
258
+ fontWeight: '600',
259
+ fontSize: '10px',
260
+ padding: '3px 12px 3px, 12px',
261
+ padding: '4px',
262
+ textAlign: 'center',
263
+ marginTop: '4px'
264
+ },
265
+ offerBoxCountDown: {
266
+ backgroundColor: 'rgba(235, 87, 87, 0.1)',
267
+ border: '0px 1px 1px 1px',
268
+ borderRadius: '8px',
269
+ color: '#EB5757',
270
+ fontSize: '16px',
271
+ fontWeight: '700',
272
+ padding: '6px 16px'
273
+ },
274
+ BottomSheetContainer: {
275
+ display: 'flex',
276
+ flexDirection: 'column',
277
+ borderTop: '1px solid #e5e5e5',
278
+ background: '#021927',
279
+ color: '#FFFFFF'
280
+ },
281
+ BottomSheetPriceContainer: {
282
+ display: 'flex',
283
+ justifyContent: 'space-between',
284
+ padding: '16px 16px 24px'
285
+ },
286
+ BottomSheetOfferContainer: {
287
+ padding: '12px 0 ',
288
+ padding: '16px 16px 24px',
289
+ border: '1px solid rgba(0, 0, 0, 1)'
290
+ },
291
+ offerBottom: {
292
+ display: 'flex',
293
+ justifyContent: 'space-between'
294
+ },
295
+ smallText: {
296
+ fontWeight: '400',
297
+ fontSize: '8px'
298
+ },
229
299
  '@media screen and (max-width: 767px)': {
230
300
  optionsContainer: {
231
301
  flexDirection: 'column',
@@ -261,6 +331,24 @@ const useSectionStyles$a = createUseStyles(theme => ({
261
331
  borderBottom: '1px solid #F3F3F3',
262
332
  width: '100%'
263
333
  }
334
+ },
335
+ offerPrice: {
336
+ color: '#FFFFFF',
337
+ fontSize: '18px'
338
+ },
339
+ offerDiscount: {
340
+ color: 'rgba(8, 189, 128, 1)'
341
+ },
342
+ originalPrice: {
343
+ color: '#FFFFFF',
344
+ textDecoration: 'line-through'
345
+ },
346
+ BottomSheetContainer: {
347
+ position: 'fixed',
348
+ bottom: 0,
349
+ left: 0,
350
+ width: '100%',
351
+ zIndex: '9999'
264
352
  }
265
353
  },
266
354
  mobileAppNameClass: {
@@ -1305,7 +1393,8 @@ function DesktopHeader({
1305
1393
  navData,
1306
1394
  isTutorWebsite,
1307
1395
  isLandingPage = false,
1308
- onDownloadAppTriggered
1396
+ onDownloadAppTriggered,
1397
+ extraProps
1309
1398
  }) {
1310
1399
  const {
1311
1400
  isFixed = true
@@ -1342,6 +1431,110 @@ function DesktopHeader({
1342
1431
 
1343
1432
  // console.log(header, 'sakshat header desktop');
1344
1433
 
1434
+ const renderer = ({
1435
+ days,
1436
+ hours,
1437
+ minutes,
1438
+ seconds
1439
+ }) => {
1440
+ if (days === 0 && hours < 24) {
1441
+ return /*#__PURE__*/React.createElement("span", null, hours, "h : ", minutes, "m : ", seconds, "s");
1442
+ } else {
1443
+ let given = moment(header.endDate);
1444
+ let current = moment().startOf('day');
1445
+ return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " ", 'Days');
1446
+ }
1447
+ };
1448
+ const checkIfOfferIsValid = (endDate = null) => moment().diff(moment(endDate || 0)) < 0;
1449
+ const checkForShowDiscount = (endDate = null, offerPriceValidFor = null, discount = 0) => {
1450
+ let conversions = extraProps?.conversions || 0;
1451
+ if (endDate === null || checkIfOfferIsValid()) {
1452
+ if (discount > 0 && offerPriceValidFor === null) {
1453
+ return true;
1454
+ } else if (discount > 0 && offerPriceValidFor !== null && offerPriceValidFor - conversions <= 0) {
1455
+ return false;
1456
+ }
1457
+ } else if (offerPriceValidFor >= null && discount) {
1458
+ if (offerPriceValidFor <= conversions) {
1459
+ return false;
1460
+ }
1461
+ if (offerPriceValidFor - conversions < 0) {
1462
+ return false;
1463
+ } else {
1464
+ return true;
1465
+ }
1466
+ }
1467
+ if (discount > 0) {
1468
+ return true;
1469
+ }
1470
+ };
1471
+ const getDiscount = (price, discount) => {
1472
+ return (discount / price * 100).toFixed(2);
1473
+ };
1474
+ const OfferDetailsJSX = () => {
1475
+ if (!header?.effectivePrice) {
1476
+ return null;
1477
+ }
1478
+ let conversions = extraProps?.conversions || 0;
1479
+ const currentTimestamp = new Date().getTime();
1480
+ if (checkForShowDiscount(header?.endDate, header?.offerPriceValidFor, header?.discount) && header?.endDate ? checkIfOfferIsValid(header?.endDate) : true) {
1481
+ return /*#__PURE__*/React.createElement("div", {
1482
+ className: classes.rightNav
1483
+ }, header?.isOfferActive && header?.endDate && header?.endDate && header?.endDate > currentTimestamp && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true) ? /*#__PURE__*/React.createElement("div", {
1484
+ className: classes.offerBox
1485
+ }, /*#__PURE__*/React.createElement("div", {
1486
+ className: classes.offerBoxText
1487
+ }, "Offer Ends In"), /*#__PURE__*/React.createElement("div", {
1488
+ className: classes.offerBoxCountDown
1489
+ }, /*#__PURE__*/React.createElement(Countdown, {
1490
+ renderer: renderer,
1491
+ date: header?.endDate
1492
+ }))) : null, /*#__PURE__*/React.createElement("div", {
1493
+ className: classes.priceBox
1494
+ }, header?.price && header?.discount && header?.effectivePrice && header?.price !== header?.effectivePrice ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1495
+ className: classes.offerDiscount
1496
+ }, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0", /*#__PURE__*/React.createElement("span", {
1497
+ className: classes.originalPrice
1498
+ }, header?.price), ' ') : null, /*#__PURE__*/React.createElement("div", {
1499
+ style: {
1500
+ textAlign: 'end'
1501
+ }
1502
+ }, /*#__PURE__*/React.createElement("span", {
1503
+ className: classes.offerPrice
1504
+ }, header?.effectivePrice), ' ')), /*#__PURE__*/React.createElement(Button, {
1505
+ data: {
1506
+ // link: 'headerData?.loginCtaLink',
1507
+ // isLink: 1,
1508
+ value: 'BUY NOW'
1509
+ // isExternal: 1
1510
+ },
1511
+
1512
+ onClick: extraProps?.courseBuyNow,
1513
+ type: 'primary',
1514
+ size: 'small',
1515
+ target: null,
1516
+ name: "button",
1517
+ rel: null
1518
+ // styling={isMobile ? { margin: '0 40px' } : {}}
1519
+ }));
1520
+ } else return /*#__PURE__*/React.createElement(Button, {
1521
+ data: {
1522
+ // link: 'headerData?.loginCtaLink',
1523
+ // isLink: 1,
1524
+ value: 'BUY NOW'
1525
+ // isExternal: 1
1526
+ },
1527
+
1528
+ onClick: extraProps?.courseBuyNow,
1529
+ type: 'primary',
1530
+ size: 'medium',
1531
+ target: null,
1532
+ name: "button",
1533
+ rel: null
1534
+ // styling={isMobile ? { margin: '0 40px' } : {}}
1535
+ });
1536
+ };
1537
+
1345
1538
  return /*#__PURE__*/React.createElement("nav", {
1346
1539
  className: classes.section
1347
1540
  }, !(header?.websiteLogo === DEFAULT_HEADER_IMAGE_LP && isCustomWebsite) ? /*#__PURE__*/React.createElement("div", {
@@ -1376,19 +1569,22 @@ function DesktopHeader({
1376
1569
  moreContent: moreContentFn(),
1377
1570
  isTutorWebsite: isTutorWebsite,
1378
1571
  onDownloadAppTriggered: onDownloadAppTriggered
1379
- }))) : /*#__PURE__*/React.createElement("div", {
1572
+ }), OfferDetailsJSX())) : /*#__PURE__*/React.createElement("div", {
1380
1573
  style: {
1381
1574
  paddingTop: '30px'
1382
1575
  }
1383
1576
  }));
1384
1577
  }
1385
1578
 
1579
+ var timer = "data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.99996%2015.1667C4.50663%2015.1667%201.66663%2012.3267%201.66663%208.83333C1.66663%205.34%204.50663%202.5%207.99996%202.5C11.4933%202.5%2014.3333%205.34%2014.3333%208.83333C14.3333%2012.3267%2011.4933%2015.1667%207.99996%2015.1667ZM7.99996%203.5C5.05996%203.5%202.66663%205.89333%202.66663%208.83333C2.66663%2011.7733%205.05996%2014.1667%207.99996%2014.1667C10.94%2014.1667%2013.3333%2011.7733%2013.3333%208.83333C13.3333%205.89333%2010.94%203.5%207.99996%203.5Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M8%209.16671C7.72667%209.16671%207.5%208.94004%207.5%208.66671V5.33337C7.5%205.06004%207.72667%204.83337%208%204.83337C8.27333%204.83337%208.5%205.06004%208.5%205.33337V8.66671C8.5%208.94004%208.27333%209.16671%208%209.16671Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M10%201.83337H6C5.72667%201.83337%205.5%201.60671%205.5%201.33337C5.5%201.06004%205.72667%200.833374%206%200.833374H10C10.2733%200.833374%2010.5%201.06004%2010.5%201.33337C10.5%201.60671%2010.2733%201.83337%2010%201.83337Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E";
1580
+
1386
1581
  function MobileHeader({
1387
1582
  header,
1388
1583
  navData,
1389
1584
  isTutorWebsite,
1390
1585
  isLandingPage = false,
1391
- onDownloadAppTriggered
1586
+ onDownloadAppTriggered,
1587
+ extraProps
1392
1588
  }) {
1393
1589
  const {
1394
1590
  isCustomWebsite,
@@ -1425,6 +1621,106 @@ function MobileHeader({
1425
1621
 
1426
1622
  // console.log(header, 'sakshat header mobile');
1427
1623
 
1624
+ const getDiscount = (price, discount) => {
1625
+ return (discount / price * 100).toFixed(2);
1626
+ };
1627
+ const renderer = ({
1628
+ days,
1629
+ hours,
1630
+ minutes,
1631
+ seconds
1632
+ }) => {
1633
+ if (days === 0 && hours < 24) {
1634
+ return /*#__PURE__*/React.createElement("div", {
1635
+ className: classes.offerBottom
1636
+ }, /*#__PURE__*/React.createElement("div", null, "Offer ends in"), /*#__PURE__*/React.createElement("div", {
1637
+ style: {
1638
+ display: 'flex',
1639
+ gap: '5px'
1640
+ }
1641
+ }, /*#__PURE__*/React.createElement("img", {
1642
+ src: timer,
1643
+ alt: ""
1644
+ }), ' ', /*#__PURE__*/React.createElement("div", null, hours, " ", /*#__PURE__*/React.createElement("span", {
1645
+ className: classes.smallText
1646
+ }, "hrs"), " : ", minutes, ' ', /*#__PURE__*/React.createElement("span", {
1647
+ className: classes.smallText
1648
+ }, "Mins"), " : ", seconds, ' ', /*#__PURE__*/React.createElement("span", {
1649
+ className: classes.smallText
1650
+ }, "Secs"))));
1651
+ } else {
1652
+ let given = moment(header.endDate);
1653
+ let current = moment().startOf('day');
1654
+ return /*#__PURE__*/React.createElement("div", {
1655
+ className: classes.offerBottom
1656
+ }, /*#__PURE__*/React.createElement("div", null, "This offer is only valid for"), /*#__PURE__*/React.createElement("div", {
1657
+ style: {
1658
+ display: 'flex',
1659
+ gap: '5px'
1660
+ }
1661
+ }, /*#__PURE__*/React.createElement("img", {
1662
+ src: timer,
1663
+ alt: ""
1664
+ }), ' ', /*#__PURE__*/React.createElement("div", null, Math.floor(moment.duration(given.diff(current)).asDays()), /*#__PURE__*/React.createElement("span", {
1665
+ className: classes.smallText
1666
+ }, "\xA0\xA0Days"))));
1667
+ }
1668
+ };
1669
+ const OfferDetailsJSX = () => {
1670
+ let conversions = extraProps?.conversions || 0;
1671
+ const currentTimestamp = new Date().getTime();
1672
+ if (header?.isOfferActive && header?.endDate && header?.endDate && header?.endDate > currentTimestamp && (header?.offerPriceValidFor ? header.offerPriceValidFor - conversions > 0 : true)) {
1673
+ return /*#__PURE__*/React.createElement("div", {
1674
+ className: classes.BottomSheetOfferContainer
1675
+ }, ' ', /*#__PURE__*/React.createElement(Countdown, {
1676
+ renderer: renderer,
1677
+ date: header?.endDate
1678
+ }));
1679
+ }
1680
+ return null;
1681
+ };
1682
+ const BottomSheetJSX = () => {
1683
+ if (!header?.effectivePrice) {
1684
+ return null;
1685
+ }
1686
+ // const body = document?.body;
1687
+ // if (body) {
1688
+ // body.style.marginBottom = '130px';
1689
+ // }
1690
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1691
+ className: classes.BottomSheetContainer
1692
+ }, OfferDetailsJSX(), /*#__PURE__*/React.createElement("div", {
1693
+ className: classes.BottomSheetPriceContainer
1694
+ }, /*#__PURE__*/React.createElement("div", {
1695
+ className: classes.BottomSheetPrice
1696
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
1697
+ style: {
1698
+ textAlign: 'start'
1699
+ }
1700
+ }, /*#__PURE__*/React.createElement("span", {
1701
+ className: classes.offerPrice
1702
+ }, header?.effectivePrice), ' '), header?.price && header?.discount && header?.effectivePrice && header?.price !== header?.effectivePrice ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
1703
+ className: classes.originalPrice
1704
+ }, header?.price), ' ', /*#__PURE__*/React.createElement("span", {
1705
+ className: classes.offerDiscount
1706
+ }, `${getDiscount(header?.price, header?.discount)}%`, "\xA0OFF"), "\xA0\xA0") : null)), /*#__PURE__*/React.createElement(Button, {
1707
+ data: {
1708
+ // link: 'headerData?.loginCtaLink',
1709
+ // isLink: 1,
1710
+ value: 'BUY NOW'
1711
+ // isExternal: 1
1712
+ },
1713
+
1714
+ onClick: extraProps?.courseBuyNow,
1715
+ type: 'primary',
1716
+ size: 'medium',
1717
+ target: null,
1718
+ name: "button",
1719
+ rel: null
1720
+ // styling={isMobile ? { margin: '0 40px' } : {}}
1721
+ }))));
1722
+ };
1723
+
1428
1724
  if (isTutorWebsite) {
1429
1725
  if (isAndroidDelisted && apkURL) {
1430
1726
  downloadLink = /*#__PURE__*/React.createElement(Button, {
@@ -1497,7 +1793,7 @@ function MobileHeader({
1497
1793
  downloadLink = null;
1498
1794
  }
1499
1795
  }
1500
- return /*#__PURE__*/React.createElement("nav", {
1796
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("nav", {
1501
1797
  ref: navEl,
1502
1798
  className: classes.section
1503
1799
  }, !(header?.websiteLogo === DEFAULT_HEADER_IMAGE_LP && isCustomWebsite) ? /*#__PURE__*/React.createElement("div", {
@@ -1530,7 +1826,7 @@ function MobileHeader({
1530
1826
  order: 1
1531
1827
  }))) : null, isTutorWebsite && header?.appName ? /*#__PURE__*/React.createElement("p", {
1532
1828
  className: classes.mobileAppNameClass
1533
- }, " ", header?.appName) : null), downloadLink), sideMenu ? /*#__PURE__*/React.createElement("div", {
1829
+ }, ' ', header?.appName) : null), downloadLink), sideMenu ? /*#__PURE__*/React.createElement("div", {
1534
1830
  className: classes.mobileMenu
1535
1831
  }, /*#__PURE__*/React.createElement("div", {
1536
1832
  className: classes.backdrop,
@@ -1550,7 +1846,7 @@ function MobileHeader({
1550
1846
  style: {
1551
1847
  paddingTop: '30px'
1552
1848
  }
1553
- }));
1849
+ })), /*#__PURE__*/React.createElement(BottomSheetJSX, null));
1554
1850
  }
1555
1851
 
1556
1852
  function Header({
@@ -1570,13 +1866,15 @@ function Header({
1570
1866
  header: data,
1571
1867
  isTutorWebsite: isTutorWebsite,
1572
1868
  isLandingPage: isLandingPage,
1573
- onDownloadAppTriggered: extraProps?.DownloadAppButtonTriggered
1869
+ onDownloadAppTriggered: extraProps?.DownloadAppButtonTriggered,
1870
+ extraProps: extraProps
1574
1871
  }) : /*#__PURE__*/React.createElement(DesktopHeader, {
1575
1872
  navData: filterHiddenNavs(),
1576
1873
  header: data,
1577
1874
  isTutorWebsite: isTutorWebsite,
1578
1875
  isLandingPage: isLandingPage,
1579
- onDownloadAppTriggered: extraProps?.DownloadAppButtonTriggered
1876
+ onDownloadAppTriggered: extraProps?.DownloadAppButtonTriggered,
1877
+ extraProps: extraProps
1580
1878
  });
1581
1879
  }
1582
1880
 
@@ -1930,14 +2228,18 @@ function Footer({
1930
2228
  alt: "classplus",
1931
2229
  className: classes.poweredDivImg
1932
2230
  })))) : null, orgId === 643870 || extraProps?.org_id === 643870 ? /*#__PURE__*/React.createElement("div", {
1933
- className: classes.lowerContainer
1934
- }, /*#__PURE__*/React.createElement("div", {
1935
- className: classes.bottomLeftText
1936
- }, "\xA9 Samko Automotive Solution")) : null, orgId === 510746 || extraProps?.org_id === 510746 ? /*#__PURE__*/React.createElement("div", {
1937
- className: classes.lowerContainer
1938
- }, /*#__PURE__*/React.createElement("div", {
1939
- className: classes.bottomLeftText
1940
- }, "\xA9 Bhushan Ramchandra Gawarepatil")) : null);
2231
+ style: {
2232
+ display: 'flex',
2233
+ alignSelf: 'start',
2234
+ marginBottom: '10px'
2235
+ }
2236
+ }, "\xA9 Samko Automotive Solution") : null, orgId === 510746 || extraProps?.org_id === 510746 ? /*#__PURE__*/React.createElement("div", {
2237
+ style: {
2238
+ display: 'flex',
2239
+ alignSelf: 'start',
2240
+ marginBottom: '10px'
2241
+ }
2242
+ }, "\xA9 Bhushan Ramchandra Gawarepatil") : null);
1941
2243
  }
1942
2244
 
1943
2245
  const borderRadius = {
@@ -2178,29 +2480,30 @@ function NanumSquare() {
2178
2480
  }
2179
2481
 
2180
2482
  const TYPE_TO_COMPONENT_MAP$1 = {
2181
- BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$m; })),
2182
- GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$l; })),
2183
- BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$k; })),
2184
- BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
2185
- FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
2186
- TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
2187
- VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
2188
- VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
2189
- INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
2190
- TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
2191
- IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
2192
- FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
2193
- COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
2194
- TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
2195
- TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
2196
- CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
2197
- FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
2198
- WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
2199
- COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
2200
- FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
2201
- TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
2202
- EMAIL_DRIP_MARKET: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
2203
- ABOUT_INSTITUTE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
2483
+ BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$n; })),
2484
+ GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$m; })),
2485
+ BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$l; })),
2486
+ BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$k; })),
2487
+ FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
2488
+ TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
2489
+ VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
2490
+ VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
2491
+ INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
2492
+ TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
2493
+ IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
2494
+ FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
2495
+ COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
2496
+ TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
2497
+ TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
2498
+ CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
2499
+ FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
2500
+ WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
2501
+ COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
2502
+ FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
2503
+ TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
2504
+ EMAIL_DRIP_MARKET: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
2505
+ ABOUT_INSTITUTE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
2506
+ TIMER_AND_CALL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
2204
2507
  };
2205
2508
  const getCompToRender$1 = type => TYPE_TO_COMPONENT_MAP$1[type] || (() => null);
2206
2509
  const MemoisedSection$1 = /*#__PURE__*/memo(({
@@ -2953,7 +3256,7 @@ function BannerCarouselRight({
2953
3256
  })))));
2954
3257
  }
2955
3258
 
2956
- var index$m = /*#__PURE__*/Object.freeze({
3259
+ var index$n = /*#__PURE__*/Object.freeze({
2957
3260
  __proto__: null,
2958
3261
  'default': BannerCarouselRight
2959
3262
  });
@@ -3179,7 +3482,7 @@ function List({
3179
3482
  }))));
3180
3483
  }
3181
3484
 
3182
- var index$l = /*#__PURE__*/Object.freeze({
3485
+ var index$m = /*#__PURE__*/Object.freeze({
3183
3486
  __proto__: null,
3184
3487
  'default': List
3185
3488
  });
@@ -3382,7 +3685,8 @@ const useSectionStyles$6 = createUseStyles(theme => {
3382
3685
 
3383
3686
  const Section$3 = ({
3384
3687
  nodeData,
3385
- sectionIndex
3688
+ sectionIndex,
3689
+ extraProps
3386
3690
  }) => {
3387
3691
  const {
3388
3692
  layout: {
@@ -3403,6 +3707,10 @@ const Section$3 = ({
3403
3707
  hasContent,
3404
3708
  mobileImage: nodeData?.mobileImage?.metadata?.value
3405
3709
  });
3710
+ const handleButton = () => {
3711
+ console.log('buy now clicked');
3712
+ extraProps?.courseBuyNow();
3713
+ };
3406
3714
  return /*#__PURE__*/React.createElement("section", {
3407
3715
  className: classes.bannerCarouselCenterSection
3408
3716
  }, /*#__PURE__*/React.createElement("div", {
@@ -3433,7 +3741,13 @@ const Section$3 = ({
3433
3741
  }
3434
3742
  }) : null, nodeData?.cta?.validations?.isEmptyAllowed && nodeData?.cta?.metadata?.value === '' ? null : /*#__PURE__*/React.createElement("div", {
3435
3743
  className: classes.buttonClass
3436
- }, /*#__PURE__*/React.createElement(Button, {
3744
+ }, nodeData?.cta?.metadata?.default === true ? /*#__PURE__*/React.createElement(Button, {
3745
+ data: nodeData.cta.metadata,
3746
+ ref: nodeData?.cta?.refSetter,
3747
+ type: nodeData?.cta?.metadata?.type,
3748
+ size: isMobile ? 'small' : 'medium',
3749
+ onClick: handleButton
3750
+ }) : /*#__PURE__*/React.createElement(Button, {
3437
3751
  ref: nodeData?.cta?.refSetter,
3438
3752
  data: nodeData.cta.metadata,
3439
3753
  type: nodeData?.cta?.metadata?.type,
@@ -3451,7 +3765,8 @@ const Section$3 = ({
3451
3765
  function BannerCarouselCenter({
3452
3766
  sectionData,
3453
3767
  isCustomWebsite,
3454
- sectionIndex
3768
+ sectionIndex,
3769
+ extraProps
3455
3770
  }) {
3456
3771
  const classes = useSectionStyles$6({
3457
3772
  isCustomWebsite
@@ -3470,11 +3785,12 @@ function BannerCarouselCenter({
3470
3785
  nodeData: node,
3471
3786
  isCustomWebsite: isCustomWebsite,
3472
3787
  key: idx /* or some other unique property */,
3473
- sectionIndex: sectionIndex
3788
+ sectionIndex: sectionIndex,
3789
+ extraProps: extraProps
3474
3790
  }))));
3475
3791
  }
3476
3792
 
3477
- var index$k = /*#__PURE__*/Object.freeze({
3793
+ var index$l = /*#__PURE__*/Object.freeze({
3478
3794
  __proto__: null,
3479
3795
  'default': BannerCarouselCenter
3480
3796
  });
@@ -3706,7 +4022,7 @@ function BannerCarouselLeft({
3706
4022
  })))));
3707
4023
  }
3708
4024
 
3709
- var index$j = /*#__PURE__*/Object.freeze({
4025
+ var index$k = /*#__PURE__*/Object.freeze({
3710
4026
  __proto__: null,
3711
4027
  'default': BannerCarouselLeft
3712
4028
  });
@@ -4102,7 +4418,7 @@ function SubscribeToNewsletter({
4102
4418
  })))))));
4103
4419
  }
4104
4420
 
4105
- var index$i = /*#__PURE__*/Object.freeze({
4421
+ var index$j = /*#__PURE__*/Object.freeze({
4106
4422
  __proto__: null,
4107
4423
  'default': SubscribeToNewsletter
4108
4424
  });
@@ -4390,7 +4706,7 @@ function Testimonials({
4390
4706
  }));
4391
4707
  }
4392
4708
 
4393
- var index$h = /*#__PURE__*/Object.freeze({
4709
+ var index$i = /*#__PURE__*/Object.freeze({
4394
4710
  __proto__: null,
4395
4711
  'default': Testimonials
4396
4712
  });
@@ -4796,7 +5112,7 @@ function VideoTestimonial({
4796
5112
  }))))));
4797
5113
  }
4798
5114
 
4799
- var index$g = /*#__PURE__*/Object.freeze({
5115
+ var index$h = /*#__PURE__*/Object.freeze({
4800
5116
  __proto__: null,
4801
5117
  'default': VideoTestimonial
4802
5118
  });
@@ -5032,7 +5348,7 @@ function Video({
5032
5348
  }, carouselContent))));
5033
5349
  }
5034
5350
 
5035
- var index$f = /*#__PURE__*/Object.freeze({
5351
+ var index$g = /*#__PURE__*/Object.freeze({
5036
5352
  __proto__: null,
5037
5353
  'default': Video
5038
5354
  });
@@ -5269,7 +5585,7 @@ function Info({
5269
5585
  }, carouselContent))));
5270
5586
  }
5271
5587
 
5272
- var index$e = /*#__PURE__*/Object.freeze({
5588
+ var index$f = /*#__PURE__*/Object.freeze({
5273
5589
  __proto__: null,
5274
5590
  'default': Info
5275
5591
  });
@@ -5388,7 +5704,7 @@ const TextSection = ({
5388
5704
  })))));
5389
5705
  };
5390
5706
 
5391
- var index$d = /*#__PURE__*/Object.freeze({
5707
+ var index$e = /*#__PURE__*/Object.freeze({
5392
5708
  __proto__: null,
5393
5709
  'default': TextSection
5394
5710
  });
@@ -5613,7 +5929,7 @@ function PhotoGallery({
5613
5929
  }, carouselContent))));
5614
5930
  }
5615
5931
 
5616
- var index$c = /*#__PURE__*/Object.freeze({
5932
+ var index$d = /*#__PURE__*/Object.freeze({
5617
5933
  __proto__: null,
5618
5934
  'default': PhotoGallery
5619
5935
  });
@@ -5796,7 +6112,7 @@ const Accordion = ({
5796
6112
  })));
5797
6113
  };
5798
6114
 
5799
- var index$b = /*#__PURE__*/Object.freeze({
6115
+ var index$c = /*#__PURE__*/Object.freeze({
5800
6116
  __proto__: null,
5801
6117
  'default': FAQListing
5802
6118
  });
@@ -5967,7 +6283,7 @@ const TextGrid = ({
5967
6283
  }, carouselContent))));
5968
6284
  };
5969
6285
 
5970
- var index$a = /*#__PURE__*/Object.freeze({
6286
+ var index$b = /*#__PURE__*/Object.freeze({
5971
6287
  __proto__: null,
5972
6288
  'default': TextGrid
5973
6289
  });
@@ -6499,7 +6815,7 @@ function SimpleCardsContainer({
6499
6815
  }, children);
6500
6816
  }
6501
6817
 
6502
- var index$9 = /*#__PURE__*/Object.freeze({
6818
+ var index$a = /*#__PURE__*/Object.freeze({
6503
6819
  __proto__: null,
6504
6820
  'default': courses
6505
6821
  });
@@ -6818,7 +7134,7 @@ function TeamCard({
6818
7134
  }, " ", getCarouselContent())));
6819
7135
  }
6820
7136
 
6821
- var index$8 = /*#__PURE__*/Object.freeze({
7137
+ var index$9 = /*#__PURE__*/Object.freeze({
6822
7138
  __proto__: null,
6823
7139
  'default': TeamCard
6824
7140
  });
@@ -7243,7 +7559,7 @@ function FormEnquiry({
7243
7559
  })))))));
7244
7560
  }
7245
7561
 
7246
- var index$7 = /*#__PURE__*/Object.freeze({
7562
+ var index$8 = /*#__PURE__*/Object.freeze({
7247
7563
  __proto__: null,
7248
7564
  'default': FormEnquiry
7249
7565
  });
@@ -7667,7 +7983,7 @@ function Contact({
7667
7983
  })))))));
7668
7984
  }
7669
7985
 
7670
- var index$6 = /*#__PURE__*/Object.freeze({
7986
+ var index$7 = /*#__PURE__*/Object.freeze({
7671
7987
  __proto__: null,
7672
7988
  'default': Contact
7673
7989
  });
@@ -8146,7 +8462,7 @@ function CoursePromotionPage$1({
8146
8462
  }))));
8147
8463
  }
8148
8464
 
8149
- var index$5 = /*#__PURE__*/Object.freeze({
8465
+ var index$6 = /*#__PURE__*/Object.freeze({
8150
8466
  __proto__: null,
8151
8467
  'default': CoursePromotionPage$1
8152
8468
  });
@@ -8738,7 +9054,7 @@ function CoursePromotionPage({
8738
9054
  }))));
8739
9055
  }
8740
9056
 
8741
- var index$4 = /*#__PURE__*/Object.freeze({
9057
+ var index$5 = /*#__PURE__*/Object.freeze({
8742
9058
  __proto__: null,
8743
9059
  'default': CoursePromotionPage
8744
9060
  });
@@ -9103,7 +9419,7 @@ const FormPage = ({
9103
9419
  })))));
9104
9420
  };
9105
9421
 
9106
- var index$3 = /*#__PURE__*/Object.freeze({
9422
+ var index$4 = /*#__PURE__*/Object.freeze({
9107
9423
  __proto__: null,
9108
9424
  'default': FormPage
9109
9425
  });
@@ -9251,7 +9567,7 @@ function Tiles({
9251
9567
  }, TileDiv)));
9252
9568
  }
9253
9569
 
9254
- var index$2 = /*#__PURE__*/Object.freeze({
9570
+ var index$3 = /*#__PURE__*/Object.freeze({
9255
9571
  __proto__: null,
9256
9572
  'default': Tiles
9257
9573
  });
@@ -9726,7 +10042,7 @@ function EmailDripMarket({
9726
10042
  })));
9727
10043
  }
9728
10044
 
9729
- var index$1 = /*#__PURE__*/Object.freeze({
10045
+ var index$2 = /*#__PURE__*/Object.freeze({
9730
10046
  __proto__: null,
9731
10047
  'default': EmailDripMarket
9732
10048
  });
@@ -10095,11 +10411,182 @@ function ABOUT_INSTITUTE({
10095
10411
  }, /*#__PURE__*/React.createElement(ImageJSX, null), /*#__PURE__*/React.createElement(ContentJSX, null)), /*#__PURE__*/React.createElement(HighlightJSX, null)));
10096
10412
  }
10097
10413
 
10098
- var index = /*#__PURE__*/Object.freeze({
10414
+ var index$1 = /*#__PURE__*/Object.freeze({
10099
10415
  __proto__: null,
10100
10416
  'default': ABOUT_INSTITUTE
10101
10417
  });
10102
10418
 
10419
+ const useTimerCallPageStyles = createUseStyles(theme => ({
10420
+ timerAndCallSection: {
10421
+ padding: ({
10422
+ isMobile
10423
+ } = {}) => isMobile ? '24px' : '80px 120px',
10424
+ background: theme?.colors?.white,
10425
+ '&, & *, & *:before, & *:after': {
10426
+ fontFamily: theme?.typography?.fontFamily,
10427
+ boxSizing: 'border-box'
10428
+ }
10429
+ },
10430
+ timerAndCallContainer: {
10431
+ padding: '72px',
10432
+ background: '#F4F9FF',
10433
+ borderRadius: '8px',
10434
+ boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
10435
+ },
10436
+ timerAndCallBox: {
10437
+ display: 'flex',
10438
+ flexDirection: 'column',
10439
+ gap: '42px',
10440
+ justifyContent: 'center',
10441
+ alignItems: 'center'
10442
+ },
10443
+ title: {
10444
+ fontWeight: '700',
10445
+ fontSize: '40px',
10446
+ textAlign: 'center',
10447
+ lineHeight: '45px'
10448
+ },
10449
+ offerWrapper: {
10450
+ display: 'flex',
10451
+ flexDirection: 'column',
10452
+ gap: '24px',
10453
+ justifyContent: 'center',
10454
+ alignItems: 'center'
10455
+ },
10456
+ offerEndsTitle: {
10457
+ fontWeight: '700',
10458
+ fontSize: '16px'
10459
+ },
10460
+ countdown: {
10461
+ display: 'flex',
10462
+ gap: '10px'
10463
+ },
10464
+ counterBox: {
10465
+ display: 'flex',
10466
+ flexDirection: 'column',
10467
+ justifyContent: 'center',
10468
+ alignItems: 'center',
10469
+ border: '0.56px solid #2C88FF',
10470
+ borderRadius: '8px',
10471
+ background: '#FFFFFF',
10472
+ color: '#2C88FF',
10473
+ padding: '12px 16px 12px 16px',
10474
+ fontWeight: '600',
10475
+ fontSize: '14px'
10476
+ },
10477
+ // SMALL SCREEN
10478
+ '@media screen and (max-width: 767px)': {
10479
+ timerAndCallSection: {
10480
+ padding: '24px'
10481
+ },
10482
+ timerAndCallContainer: {
10483
+ padding: '16px'
10484
+ },
10485
+ timerAndCallBox: {
10486
+ gap: '32px'
10487
+ },
10488
+ title: {
10489
+ fontSize: '24px'
10490
+ },
10491
+ offerWrapper: {
10492
+ gap: '16px'
10493
+ }
10494
+ }
10495
+ }));
10496
+
10497
+ const TimerAndCall = ({
10498
+ sectionData,
10499
+ extraProps = {}
10500
+ }) => {
10501
+ const {
10502
+ isMobile,
10503
+ fullPageData
10504
+ } = useContext(PageContext);
10505
+ const [nodeData] = sectionData?.components;
10506
+ const classes = useTimerCallPageStyles({
10507
+ isMobile
10508
+ });
10509
+ const CounterBox = ({
10510
+ value,
10511
+ text
10512
+ }) => {
10513
+ return /*#__PURE__*/React.createElement("div", {
10514
+ className: classes.counterBox
10515
+ }, /*#__PURE__*/React.createElement("div", null, value), /*#__PURE__*/React.createElement("div", null, text));
10516
+ };
10517
+ const renderer = ({
10518
+ formatted,
10519
+ completed
10520
+ }) => {
10521
+ return /*#__PURE__*/React.createElement("div", {
10522
+ className: classes.countdown
10523
+ }, /*#__PURE__*/React.createElement(CounterBox, {
10524
+ value: formatted?.hours,
10525
+ text: "Hours"
10526
+ }), /*#__PURE__*/React.createElement(CounterBox, {
10527
+ value: formatted?.minutes,
10528
+ text: "Mins"
10529
+ }), /*#__PURE__*/React.createElement(CounterBox, {
10530
+ value: formatted?.seconds,
10531
+ text: "Secs"
10532
+ }));
10533
+ };
10534
+ const CountDownJSX = offerPriceValidFor => {
10535
+ let conversions = extraProps?.conversions || 0;
10536
+ if (offerPriceValidFor && offerPriceValidFor - conversions <= 0) {
10537
+ return null;
10538
+ }
10539
+ return /*#__PURE__*/React.createElement("div", {
10540
+ className: classes.offerWrapper
10541
+ }, /*#__PURE__*/React.createElement("div", {
10542
+ className: classes.offerEndsTitle
10543
+ }, "Offer ends in"), /*#__PURE__*/React.createElement(Countdown, {
10544
+ renderer: renderer,
10545
+ date: nodeData.offerCounter?.metadata?.endDate,
10546
+ daysInHours: true
10547
+ }));
10548
+ };
10549
+ return /*#__PURE__*/React.createElement("section", {
10550
+ className: classes.timerAndCallSection
10551
+ }, /*#__PURE__*/React.createElement("div", {
10552
+ className: classes.timerAndCallContainer
10553
+ }, /*#__PURE__*/React.createElement("div", {
10554
+ className: classes.timerAndCallBox
10555
+ }, nodeData?.showOffer?.metadata?.value && nodeData.offerCounter?.metadata?.isOfferActive ? CountDownJSX(nodeData.offerCounter?.metadata?.offerPriceValidFor) : null, nodeData?.title?.metadata?.value ? /*#__PURE__*/React.createElement("div", {
10556
+ className: classes.title
10557
+ }, /*#__PURE__*/React.createElement("span", {
10558
+ ref: nodeData?.heading?.refSetter,
10559
+ dangerouslySetInnerHTML: {
10560
+ __html: nodeData?.title?.metadata?.value
10561
+ }
10562
+ })) : null, nodeData?.timerButton?.metadata?.value ? /*#__PURE__*/React.createElement(Button, {
10563
+ style: {
10564
+ width: '100%',
10565
+ fontWeight: '700',
10566
+ fontSize: '14px'
10567
+ },
10568
+ data: {
10569
+ // link: 'headerData?.loginCtaLink',
10570
+ // isLink: 1,
10571
+ value: nodeData.timerButton.metadata.value
10572
+ // isExternal: 1
10573
+ },
10574
+
10575
+ onClick: extraProps?.courseBuyNow,
10576
+ type: 'primary',
10577
+ size: 'medium',
10578
+ target: null,
10579
+ name: "button",
10580
+ rel: null
10581
+ // styling={isMobile ? { margin: '0 40px' } : {}}
10582
+ }) : null)));
10583
+ };
10584
+
10585
+ var index = /*#__PURE__*/Object.freeze({
10586
+ __proto__: null,
10587
+ 'default': TimerAndCall
10588
+ });
10589
+
10103
10590
  const TYPE_TO_COMPONENT_MAP = {
10104
10591
  BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
10105
10592
  GRID_CARD: List,
@@ -10123,7 +10610,8 @@ const TYPE_TO_COMPONENT_MAP = {
10123
10610
  FORM_LANDING_PAGE: FormPage,
10124
10611
  TILES_SECTION: Tiles,
10125
10612
  EMAIL_DRIP_MARKET: EmailDripMarket,
10126
- ABOUT_INSTITUTE
10613
+ ABOUT_INSTITUTE,
10614
+ TIMER_AND_CALL: TimerAndCall
10127
10615
  };
10128
10616
  const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
10129
10617
  const MemoisedSection = /*#__PURE__*/memo(({
@@ -10132,6 +10620,7 @@ const MemoisedSection = /*#__PURE__*/memo(({
10132
10620
  isCustomWebsite,
10133
10621
  sectionIndex
10134
10622
  }) => {
10623
+ console.log('extraProps in section data', extraProps);
10135
10624
  const SectionComp = getCompToRender(sectionData.type);
10136
10625
  return /*#__PURE__*/React.createElement(SectionComp, {
10137
10626
  sectionData: sectionData,