react-easy-wall 1.1.6 → 1.1.9
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.
|
@@ -6,7 +6,7 @@ var Box = require('../../node_modules/@mui/material/esm/Box/Box.js');
|
|
|
6
6
|
var Typography = require('../../node_modules/@mui/material/esm/Typography/Typography.js');
|
|
7
7
|
var Button = require('../../node_modules/@mui/material/esm/Button/Button.js');
|
|
8
8
|
|
|
9
|
-
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = '', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = 'Suscríbete', }) => {
|
|
9
|
+
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = 'Ya soy suscriptor', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = 'Suscríbete', }) => {
|
|
10
10
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
11
11
|
const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;
|
|
12
12
|
const { sx: sxTitleProps, ...titlePropRest } = titleProps;
|
|
@@ -34,8 +34,10 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
34
34
|
alignItems: 'center',
|
|
35
35
|
flexDirection: 'column',
|
|
36
36
|
background: 'white',
|
|
37
|
-
paddingTop:
|
|
38
|
-
paddingBottom:
|
|
37
|
+
paddingTop: '80px',
|
|
38
|
+
paddingBottom: '80px',
|
|
39
|
+
borderRadius: '20px',
|
|
40
|
+
boxShadow: '0px 0px 32px #00000029',
|
|
39
41
|
...sxContainerProps,
|
|
40
42
|
}, ...containerPropRest, children: jsxRuntime.jsxs(Box.default, { sx: {
|
|
41
43
|
width: {
|
|
@@ -45,17 +47,41 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
45
47
|
justifyContent: 'center',
|
|
46
48
|
alignItems: 'center',
|
|
47
49
|
flexDirection: 'column',
|
|
48
|
-
|
|
50
|
+
display: 'flex',
|
|
51
|
+
}, children: [jsxRuntime.jsx(Typography.default, { sx: {
|
|
52
|
+
fontWeight: 700,
|
|
53
|
+
lineHeight: '34px',
|
|
54
|
+
fontSize: '34px',
|
|
55
|
+
textAlign: 'center',
|
|
56
|
+
marginBottom: '1.5rem',
|
|
57
|
+
...sxTitleProps,
|
|
58
|
+
}, ...titlePropRest, children: title }), jsxRuntime.jsx(Typography.default, { sx: { textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }, ...subtitlePropRest, children: subtitle }), jsxRuntime.jsx(Button.default, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
49
59
|
background: '#f75957',
|
|
50
60
|
'&:hover': {
|
|
51
61
|
backgroundColor: '#f75957',
|
|
52
62
|
},
|
|
63
|
+
fontWeight: 700,
|
|
64
|
+
textTransform: 'uppercase',
|
|
65
|
+
marginBottom: '.5rem',
|
|
66
|
+
color: 'white',
|
|
67
|
+
fontSize: '18px',
|
|
68
|
+
paddingTop: '.5rem',
|
|
69
|
+
paddingBottom: '.5rem',
|
|
70
|
+
paddingLeft: '.75rem',
|
|
71
|
+
paddingRight: '.75rem',
|
|
72
|
+
borderRadius: '0.25rem',
|
|
53
73
|
...sxButtonProps,
|
|
54
74
|
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), jsxRuntime.jsx(Button.default, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
55
75
|
textDecoration: 'underline',
|
|
56
76
|
background: 'transparent',
|
|
57
|
-
|
|
58
|
-
|
|
77
|
+
fontWeight: 700,
|
|
78
|
+
textAlign: 'center',
|
|
79
|
+
fontSize: '16px',
|
|
80
|
+
paddingTop: '.5rem',
|
|
81
|
+
paddingBottom: '.5rem',
|
|
82
|
+
paddingLeft: '.75rem',
|
|
83
|
+
paddingRight: '.75rem',
|
|
84
|
+
color: 'black',
|
|
59
85
|
...sxSecondaryButtonProps,
|
|
60
86
|
}, onClick: () => handleSecondaryButton(), ...secondaryButtonPropsRest, children: secondaryButtonText })] }) }));
|
|
61
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = '',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop:
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = 'Ya soy suscriptor',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["PAYWALL_AUTH_ENDPOINT","_jsx","Box","_jsxs","Typography","Button"],"mappings":";;;;;;;;MAkBa,mBAAmB,GAAuC,CAAC,EACtE,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,EAClB,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,EAAE,EACf,mBAAmB,GAAG,mBAAmB,EACzC,oBAAoB,GAAG,EAAE,EACzB,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,8CAA8C,EACtD,QAAQ,GAAG,iHAAiH,EAC5H,IAAI,EACJ,UAAU,GAAG,YAAY,GAC1B,KAAI;IACH,MAAM,EAAE,EAAE,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,EAAE,GAAG,cAAc;IACrE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,gBAAgB,EAAE,GAAG,aAAa;IAClE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,aAAa,EAAE,GAAG,UAAU;IACzD,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,GAAG,eAAe,EAAE,GAAG,WAAW;IAC7D,MAAM,EAAE,EAAE,EAAE,sBAAsB,EAAE,GAAG,wBAAwB,EAAE,GAAG,oBAAoB;IAExF,MAAM,YAAY,GAAG,MAAK;QACxB,IAAI,CAACA,uCAAqB,EAAE;AAC1B,YAAA,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC;AACnD,YAAA,OAA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EAAA,IAAA,EACb,kBAAkB,EAAA,IAAA,EAClB,kBAAkB,EAAA,IAAA,EAClB,EAAE,EAAE;AACF,wBAAA,cAAc,EAAE,WAAW;AAC3B,wBAAA,UAAU,EAAE,aAAa;AACzB,wBAAA,UAAU,EAAE,GAAG;AACf,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,QAAQ,EAAE,MAAM;AAChB,wBAAA,UAAU,EAAE,OAAO;AACnB,wBAAA,aAAa,EAAE,OAAO;AACtB,wBAAA,WAAW,EAAE,QAAQ;AACrB,wBAAA,YAAY,EAAE,QAAQ;AACtB,wBAAA,KAAK,EAAE,OAAO;AACd,wBAAA,GAAG,sBAAsB;AAC1B,qBAAA,EACD,OAAO,EAAE,MAAM,qBAAqB,EAAE,EAAA,GAClC,wBAAwB,YAC3B,mBAAmB,EAAA,CACb,CAAA,EAAA,CACL,EAAA,CACF;AAEV;;;;"}
|
|
@@ -4,7 +4,7 @@ import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
|
4
4
|
import Typography from '../../node_modules/@mui/material/esm/Typography/Typography.js';
|
|
5
5
|
import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
|
|
6
6
|
|
|
7
|
-
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = '', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = 'Suscríbete', }) => {
|
|
7
|
+
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = 'Ya soy suscriptor', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = 'Suscríbete', }) => {
|
|
8
8
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
9
9
|
const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;
|
|
10
10
|
const { sx: sxTitleProps, ...titlePropRest } = titleProps;
|
|
@@ -32,8 +32,10 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
32
32
|
alignItems: 'center',
|
|
33
33
|
flexDirection: 'column',
|
|
34
34
|
background: 'white',
|
|
35
|
-
paddingTop:
|
|
36
|
-
paddingBottom:
|
|
35
|
+
paddingTop: '80px',
|
|
36
|
+
paddingBottom: '80px',
|
|
37
|
+
borderRadius: '20px',
|
|
38
|
+
boxShadow: '0px 0px 32px #00000029',
|
|
37
39
|
...sxContainerProps,
|
|
38
40
|
}, ...containerPropRest, children: jsxs(Box, { sx: {
|
|
39
41
|
width: {
|
|
@@ -43,17 +45,41 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
43
45
|
justifyContent: 'center',
|
|
44
46
|
alignItems: 'center',
|
|
45
47
|
flexDirection: 'column',
|
|
46
|
-
|
|
48
|
+
display: 'flex',
|
|
49
|
+
}, children: [jsx(Typography, { sx: {
|
|
50
|
+
fontWeight: 700,
|
|
51
|
+
lineHeight: '34px',
|
|
52
|
+
fontSize: '34px',
|
|
53
|
+
textAlign: 'center',
|
|
54
|
+
marginBottom: '1.5rem',
|
|
55
|
+
...sxTitleProps,
|
|
56
|
+
}, ...titlePropRest, children: title }), jsx(Typography, { sx: { textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }, ...subtitlePropRest, children: subtitle }), jsx(Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
47
57
|
background: '#f75957',
|
|
48
58
|
'&:hover': {
|
|
49
59
|
backgroundColor: '#f75957',
|
|
50
60
|
},
|
|
61
|
+
fontWeight: 700,
|
|
62
|
+
textTransform: 'uppercase',
|
|
63
|
+
marginBottom: '.5rem',
|
|
64
|
+
color: 'white',
|
|
65
|
+
fontSize: '18px',
|
|
66
|
+
paddingTop: '.5rem',
|
|
67
|
+
paddingBottom: '.5rem',
|
|
68
|
+
paddingLeft: '.75rem',
|
|
69
|
+
paddingRight: '.75rem',
|
|
70
|
+
borderRadius: '0.25rem',
|
|
51
71
|
...sxButtonProps,
|
|
52
72
|
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), jsx(Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
53
73
|
textDecoration: 'underline',
|
|
54
74
|
background: 'transparent',
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
fontWeight: 700,
|
|
76
|
+
textAlign: 'center',
|
|
77
|
+
fontSize: '16px',
|
|
78
|
+
paddingTop: '.5rem',
|
|
79
|
+
paddingBottom: '.5rem',
|
|
80
|
+
paddingLeft: '.75rem',
|
|
81
|
+
paddingRight: '.75rem',
|
|
82
|
+
color: 'black',
|
|
57
83
|
...sxSecondaryButtonProps,
|
|
58
84
|
}, onClick: () => handleSecondaryButton(), ...secondaryButtonPropsRest, children: secondaryButtonText })] }) }));
|
|
59
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = '',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop:
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = 'Ya soy suscriptor',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;MAkBa,mBAAmB,GAAuC,CAAC,EACtE,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,EAClB,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,EAAE,EACf,mBAAmB,GAAG,mBAAmB,EACzC,oBAAoB,GAAG,EAAE,EACzB,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,8CAA8C,EACtD,QAAQ,GAAG,iHAAiH,EAC5H,IAAI,EACJ,UAAU,GAAG,YAAY,GAC1B,KAAI;IACH,MAAM,EAAE,EAAE,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,EAAE,GAAG,cAAc;IACrE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,gBAAgB,EAAE,GAAG,aAAa;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