@maily-to/render 0.0.16 → 0.0.18

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/dist/index.d.mts CHANGED
@@ -1,7 +1,29 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HtmlProps } from '@react-email/components';
2
3
  import { JSONContent } from '@tiptap/core';
3
4
  export { JSONContent } from '@tiptap/core';
4
5
 
6
+ type MetaDescriptor = {
7
+ charSet: 'utf-8';
8
+ } | {
9
+ title: string;
10
+ } | {
11
+ name: string;
12
+ content: string;
13
+ } | {
14
+ property: string;
15
+ content: string;
16
+ } | {
17
+ httpEquiv: string;
18
+ content: string;
19
+ } | {
20
+ tagName: 'meta' | 'link';
21
+ [attribute: string]: string;
22
+ } | {
23
+ [name: string]: string;
24
+ };
25
+ type MetaDescriptors = MetaDescriptor[];
26
+
5
27
  interface MarkType {
6
28
  [key: string]: any;
7
29
  type: string;
@@ -104,6 +126,13 @@ declare const DEFAULT_COLUMN_PADDING_TOP = 0;
104
126
  declare const DEFAULT_COLUMN_PADDING_RIGHT = 0;
105
127
  declare const DEFAULT_COLUMN_PADDING_BOTTOM = 0;
106
128
  declare const DEFAULT_COLUMN_PADDING_LEFT = 0;
129
+ declare const LINK_PROTOCOL_REGEX: RegExp;
130
+ declare const DEFAULT_META_TAGS: MetaDescriptors;
131
+ declare const DEFAULT_HTML_PROPS: HtmlProps;
132
+ declare const DEFAULT_BUTTON_PADDING_TOP = 10;
133
+ declare const DEFAULT_BUTTON_PADDING_RIGHT = 32;
134
+ declare const DEFAULT_BUTTON_PADDING_BOTTOM = 10;
135
+ declare const DEFAULT_BUTTON_PADDING_LEFT = 32;
107
136
  interface RenderOptions {
108
137
  /**
109
138
  * The options object allows you to customize the output of the rendered
@@ -136,6 +165,8 @@ declare class Maily {
136
165
  private openTrackingPixel;
137
166
  private payloadValues;
138
167
  private marksOrder;
168
+ private meta;
169
+ private htmlProps;
139
170
  constructor(content?: JSONContent);
140
171
  setPreviewText(preview?: string): void;
141
172
  setTheme(theme: Partial<ThemeOptions>): void;
@@ -181,6 +212,18 @@ declare class Maily {
181
212
  * Default: `false`
182
213
  */
183
214
  setShouldReplaceVariableValues(shouldReplace: boolean): void;
215
+ /**
216
+ * `setMetaTags` will add the meta tags.
217
+ *
218
+ * @param meta - The meta tags
219
+ */
220
+ setMetaTags(meta: MetaDescriptors): void;
221
+ /**
222
+ * `setHtmlProps` will set the HTML props.
223
+ *
224
+ * @param props - The HTML props
225
+ */
226
+ setHtmlProps(props: HtmlProps): void;
184
227
  getAllLinks(): Set<string>;
185
228
  private isValidUrl;
186
229
  render(options?: RenderOptions): Promise<string>;
@@ -201,6 +244,8 @@ declare class Maily {
201
244
  private strike;
202
245
  private textStyle;
203
246
  private link;
247
+ private removeLinkProtocol;
248
+ private variableUrlValue;
204
249
  private heading;
205
250
  private variable;
206
251
  private horizontalRule;
@@ -226,4 +271,4 @@ declare class Maily {
226
271
 
227
272
  declare function render(content: JSONContent, config?: MailyConfig & RenderOptions): Promise<string>;
228
273
 
229
- export { type AllowedSpacers, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
274
+ export { type AllowedSpacers, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_HTML_PROPS, DEFAULT_META_TAGS, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, LINK_PROTOCOL_REGEX, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,29 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HtmlProps } from '@react-email/components';
2
3
  import { JSONContent } from '@tiptap/core';
3
4
  export { JSONContent } from '@tiptap/core';
4
5
 
6
+ type MetaDescriptor = {
7
+ charSet: 'utf-8';
8
+ } | {
9
+ title: string;
10
+ } | {
11
+ name: string;
12
+ content: string;
13
+ } | {
14
+ property: string;
15
+ content: string;
16
+ } | {
17
+ httpEquiv: string;
18
+ content: string;
19
+ } | {
20
+ tagName: 'meta' | 'link';
21
+ [attribute: string]: string;
22
+ } | {
23
+ [name: string]: string;
24
+ };
25
+ type MetaDescriptors = MetaDescriptor[];
26
+
5
27
  interface MarkType {
6
28
  [key: string]: any;
7
29
  type: string;
@@ -104,6 +126,13 @@ declare const DEFAULT_COLUMN_PADDING_TOP = 0;
104
126
  declare const DEFAULT_COLUMN_PADDING_RIGHT = 0;
105
127
  declare const DEFAULT_COLUMN_PADDING_BOTTOM = 0;
106
128
  declare const DEFAULT_COLUMN_PADDING_LEFT = 0;
129
+ declare const LINK_PROTOCOL_REGEX: RegExp;
130
+ declare const DEFAULT_META_TAGS: MetaDescriptors;
131
+ declare const DEFAULT_HTML_PROPS: HtmlProps;
132
+ declare const DEFAULT_BUTTON_PADDING_TOP = 10;
133
+ declare const DEFAULT_BUTTON_PADDING_RIGHT = 32;
134
+ declare const DEFAULT_BUTTON_PADDING_BOTTOM = 10;
135
+ declare const DEFAULT_BUTTON_PADDING_LEFT = 32;
107
136
  interface RenderOptions {
108
137
  /**
109
138
  * The options object allows you to customize the output of the rendered
@@ -136,6 +165,8 @@ declare class Maily {
136
165
  private openTrackingPixel;
137
166
  private payloadValues;
138
167
  private marksOrder;
168
+ private meta;
169
+ private htmlProps;
139
170
  constructor(content?: JSONContent);
140
171
  setPreviewText(preview?: string): void;
141
172
  setTheme(theme: Partial<ThemeOptions>): void;
@@ -181,6 +212,18 @@ declare class Maily {
181
212
  * Default: `false`
182
213
  */
183
214
  setShouldReplaceVariableValues(shouldReplace: boolean): void;
215
+ /**
216
+ * `setMetaTags` will add the meta tags.
217
+ *
218
+ * @param meta - The meta tags
219
+ */
220
+ setMetaTags(meta: MetaDescriptors): void;
221
+ /**
222
+ * `setHtmlProps` will set the HTML props.
223
+ *
224
+ * @param props - The HTML props
225
+ */
226
+ setHtmlProps(props: HtmlProps): void;
184
227
  getAllLinks(): Set<string>;
185
228
  private isValidUrl;
186
229
  render(options?: RenderOptions): Promise<string>;
@@ -201,6 +244,8 @@ declare class Maily {
201
244
  private strike;
202
245
  private textStyle;
203
246
  private link;
247
+ private removeLinkProtocol;
248
+ private variableUrlValue;
204
249
  private heading;
205
250
  private variable;
206
251
  private horizontalRule;
@@ -226,4 +271,4 @@ declare class Maily {
226
271
 
227
272
  declare function render(content: JSONContent, config?: MailyConfig & RenderOptions): Promise<string>;
228
273
 
229
- export { type AllowedSpacers, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
274
+ export { type AllowedSpacers, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_HTML_PROPS, DEFAULT_META_TAGS, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, LINK_PROTOCOL_REGEX, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var k=Object.defineProperty,rt=Object.defineProperties,it=Object.getOwnPropertyDescriptor,st=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertyNames,R=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var P=(c,t,n)=>t in c?k(c,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[t]=n,f=(c,t)=>{for(var n in t||(t={}))F.call(t,n)&&P(c,n,t[n]);if(R)for(var n of R(t))I.call(t,n)&&P(c,n,t[n]);return c},x=(c,t)=>rt(c,st(t));var U=(c,t)=>{var n={};for(var e in c)F.call(c,e)&&t.indexOf(e)<0&&(n[e]=c[e]);if(c!=null&&R)for(var e of R(c))t.indexOf(e)<0&&I.call(c,e)&&(n[e]=c[e]);return n};var lt=(c,t)=>{for(var n in t)k(c,n,{get:t[n],enumerable:!0})},ct=(c,t,n,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of at(t))!F.call(c,i)&&i!==n&&k(c,i,{get:()=>t[i],enumerable:!(e=it(t,i))||e.enumerable});return c};var pt=c=>ct(k({},"__esModule",{value:!0}),c);var M=(c,t,n)=>new Promise((e,i)=>{var r=p=>{try{a(n.next(p))}catch(u){i(u)}},s=p=>{try{a(n.throw(p))}catch(u){i(u)}},a=p=>p.done?e(p.value):Promise.resolve(p.value).then(r,s);a((n=n.apply(c,t)).next())});var _t={};lt(_t,{DEFAULT_COLUMNS_GAP:()=>ot,DEFAULT_COLUMNS_WIDTH:()=>xt,DEFAULT_COLUMN_BACKGROUND_COLOR:()=>St,DEFAULT_COLUMN_BORDER_COLOR:()=>wt,DEFAULT_COLUMN_BORDER_RADIUS:()=>bt,DEFAULT_COLUMN_BORDER_WIDTH:()=>Ot,DEFAULT_COLUMN_PADDING_BOTTOM:()=>Nt,DEFAULT_COLUMN_PADDING_LEFT:()=>Et,DEFAULT_COLUMN_PADDING_RIGHT:()=>vt,DEFAULT_COLUMN_PADDING_TOP:()=>Ct,DEFAULT_SECTION_ALIGN:()=>H,DEFAULT_SECTION_BACKGROUND_COLOR:()=>j,DEFAULT_SECTION_BORDER_COLOR:()=>q,DEFAULT_SECTION_BORDER_WIDTH:()=>G,DEFAULT_SECTION_MARGIN_BOTTOM:()=>Y,DEFAULT_SECTION_MARGIN_LEFT:()=>Q,DEFAULT_SECTION_MARGIN_RIGHT:()=>K,DEFAULT_SECTION_MARGIN_TOP:()=>$,DEFAULT_SECTION_PADDING_BOTTOM:()=>et,DEFAULT_SECTION_PADDING_LEFT:()=>nt,DEFAULT_SECTION_PADDING_RIGHT:()=>tt,DEFAULT_SECTION_PADDING_TOP:()=>Z,Maily:()=>A,render:()=>Tt});module.exports=pt(_t);var B=require("react"),l=require("@react-email/components"),z=require("@react-email/render");var ut=c=>Object.prototype.toString.call(c);var dt=c=>ut(c)==="[object Object]";function ht(c){return Object.keys(c)}function J(c,...t){if(!t.length)return c;let n=t.shift();return n===void 0?c:(V(c)&&V(n)&&ht(n).forEach(e=>{e==="__proto__"||e==="constructor"||e==="prototype"||(V(n[e])?(c[e]||(c[e]={}),V(c[e])?J(c[e],n[e]):c[e]=n[e]):c[e]=n[e])}),J(c,...t))}function V(c){return dt(c)&&!Array.isArray(c)}var Jt=Symbol("p-void");function D(){return Math.random().toString(36).substr(2,6)}var o=require("react/jsx-runtime");var mt={sm:"8px",md:"16px",lg:"32px",xl:"64px"},L={WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"};var ft={h1:{fontSize:"36px",lineHeight:"40px",fontWeight:800},h2:{fontSize:"30px",lineHeight:"36px",fontWeight:700},h3:{fontSize:"24px",lineHeight:"38px",fontWeight:600}};var W={sm:"40px",md:"48px",lg:"64px"},gt={pretty:!1,plainText:!1},X={colors:{heading:"#111827",paragraph:"#374151",horizontal:"#EAEAEA",footer:"#64748B",blockquoteBorder:"#D1D5DB",codeBackground:"#EFEFEF",codeText:"#111827",linkCardTitle:"#111827",linkCardDescription:"#6B7280",linkCardBadgeText:"#111827",linkCardBadgeBackground:"#FEF08A",linkCardSubTitle:"#6B7280"},fontSize:{paragraph:"15px",footer:{size:"14px",lineHeight:"24px"}}},yt='SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',j="#ffffff",H="left",G=1,q="#000000",$=0,K=0,Y=0,Q=0,Z=5,tt=5,et=5,nt=5,xt="100%",ot=8,St="transparent",bt=0,Ot=0,wt="transparent",Ct=0,vt=0,Nt=0,Et=0,A=class{constructor(t={type:"doc",content:[]}){this.config={theme:X};this.variableFormatter=({variable:t,fallback:n})=>n?`{{${t},fallback=${n}}}`:`{{${t}}}`;this.shouldReplaceVariableValues=!1;this.variableValues=new Map;this.linkValues=new Map;this.payloadValues=new Map;this.marksOrder=["underline","bold","italic","textStyle","link"];this.content=t}setPreviewText(t){this.config.preview=t}setTheme(t){this.config.theme=J(this.config.theme||X,t)}setVariableFormatter(t){this.variableFormatter=t}setVariableValue(t,n){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.variableValues.set(t,n)}setVariableValues(t){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),Object.entries(t).forEach(([n,e])=>{this.setVariableValue(n,e)})}setLinkValue(t,n){this.linkValues.set(t,n)}setLinkValues(t){Object.entries(t).forEach(([n,e])=>{this.setLinkValue(n,e)})}setPayloadValue(t,n){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.payloadValues.set(t,n)}setPayloadValues(t){Object.entries(t).forEach(([n,e])=>{this.setPayloadValue(n,e)})}setOpenTrackingPixel(t){this.openTrackingPixel=t}setShouldReplaceVariableValues(t){this.shouldReplaceVariableValues=t}getAllLinks(){let t=this.content.content||[],n=new Set,e=r=>r&&this.isValidUrl(r)&&!r.startsWith("#")&&!r.startsWith("mailto:")&&!r.startsWith("tel:")&&typeof r=="string",i=r=>{var s;if(r.type==="button"){let a=(s=r.attrs)==null?void 0:s.url;e(a)&&a&&n.add(a)}else r.content&&r.content.forEach(a=>{a.marks&&a.marks.forEach(p=>{var d;let u=(d=p.attrs)==null?void 0:d.href;p.type==="link"&&e(u)&&n.add(u)}),a.content&&i(a)})};return t.forEach(r=>{i(r)}),n}isValidUrl(t){try{let n=new URL(t);return!0}catch(n){return!1}}render(){return M(this,arguments,function*(t=gt){let n=this.markup();return(0,z.renderAsync)(n,t)})}markup(){let t=this.content.content||[],n=t.map((r,s)=>{let a={prev:t[s-1],next:t[s+1],parent:r},p=this.renderNode(r,a);return p?(0,o.jsx)(B.Fragment,{children:p},D()):null}),{preview:e}=this.config;return(0,o.jsxs)(l.Html,{children:[(0,o.jsxs)(l.Head,{children:[(0,o.jsx)(l.Font,{fallbackFontFamily:"sans-serif",fontFamily:"Inter",fontStyle:"normal",fontWeight:400,webFont:{url:"https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.19",format:"woff2"}}),(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"blockquote,h1,h2,h3,img,li,ol,p,ul{margin-top:0;margin-bottom:0}@media only screen and (max-width:425px){.tab-row-full{width:100%!important}.tab-col-full{display:block!important;width:100%!important}.tab-pad{padding:0!important}}"}}),(0,o.jsx)("meta",{content:"width=device-width",name:"viewport"}),(0,o.jsx)("meta",{content:"IE=edge",httpEquiv:"X-UA-Compatible"}),(0,o.jsx)("meta",{name:"x-apple-disable-message-reformatting"}),(0,o.jsx)("meta",{content:"telephone=no,address=no,email=no,date=no,url=no",name:"format-detection"}),(0,o.jsx)("meta",{content:"light",name:"color-scheme"}),(0,o.jsx)("meta",{content:"light",name:"supported-color-schemes"})]}),(0,o.jsxs)(l.Body,{style:{margin:0},children:[e?(0,o.jsx)(l.Preview,{id:"__react-email-preview",children:e}):null,(0,o.jsx)(l.Container,{style:{maxWidth:"600px",minWidth:"300px",width:"100%",marginLeft:"auto",marginRight:"auto",padding:"0.5rem"},children:n}),this.openTrackingPixel?(0,o.jsx)(l.Img,{alt:"",src:this.openTrackingPixel,style:{display:"none",width:"1px",height:"1px"}}):null]})]})}getMarginOverrideConditions(t,n){let{parent:e,prev:i,next:r}=n||{},s=(r==null?void 0:r.type)==="spacer",a=(i==null?void 0:i.type)==="spacer",p=(e==null?void 0:e.type)==="listItem",u=(e==null?void 0:e.type)==="section"&&!r,d=(e==null?void 0:e.type)==="section"&&!i,g=(e==null?void 0:e.type)==="column"&&!r,h=(e==null?void 0:e.type)==="column"&&!i,m=(e==null?void 0:e.type)==="for"&&!i,y=(e==null?void 0:e.type)==="for"&&!r,S=(e==null?void 0:e.type)==="show"&&!i,b=(e==null?void 0:e.type)==="show"&&!r;return{isNextSpacer:s,isPrevSpacer:a,isLastSectionElement:u,isFirstSectionElement:d,isParentListItem:p,isLastColumnElement:g,isFirstColumnElement:h,isFirstForElement:m,isLastForElement:y,isFirstShowElement:S,isLastShowElement:b,shouldRemoveTopMargin:a||d||h||m||S,shouldRemoveBottomMargin:s||u||g||y||b}}getMappedContent(t,n){let e=t.content||[];return e.map((i,r)=>{let s=this.renderNode(i,x(f({},n),{next:e[r+1],prev:e[r-1]}));return s?(0,o.jsx)(B.Fragment,{children:s},D()):null}).filter(i=>i!==null)}renderNode(t,n={}){var i;let e=t.type||"";if(e in this)return(i=this[e])==null?void 0:i.call(this,t,n);throw new Error(`Node type "${e}" is not supported.`)}renderMark(t){let n=(t==null?void 0:t.text)||(0,o.jsx)(o.Fragment,{children:"\xA0"}),e=(t==null?void 0:t.marks)||[];return e.sort((i,r)=>this.marksOrder.indexOf(i.type)-this.marksOrder.indexOf(r.type)),e.reduce((i,r)=>{var a;let s=r.type;if(s in this)return(a=this[s])==null?void 0:a.call(this,r,i);throw new Error(`Mark type "${s}" is not supported.`)},(0,o.jsx)(o.Fragment,{children:n}))}paragraph(t,n){var a,p,u,d;let{attrs:e}=t,i=(e==null?void 0:e.textAlign)||"left",{isParentListItem:r,shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,n);return(0,o.jsx)(l.Text,{style:f({textAlign:i,marginBottom:r||s?"0px":"20px",marginTop:"0px",fontSize:(p=(a=this.config.theme)==null?void 0:a.fontSize)==null?void 0:p.paragraph,color:(d=(u=this.config.theme)==null?void 0:u.colors)==null?void 0:d.paragraph},L),children:t.content?this.getMappedContent(t,x(f({},n),{parent:t})):(0,o.jsx)(o.Fragment,{children:"\xA0"})})}text(t,n){let e=t.text||"&nbsp";return t.marks?this.renderMark(t):(0,o.jsx)(o.Fragment,{children:e})}bold(t,n){return(0,o.jsx)("strong",{children:n})}italic(t,n){return(0,o.jsx)("em",{children:n})}underline(t,n){return(0,o.jsx)("u",{children:n})}strike(t,n){return(0,o.jsx)("s",{style:{textDecoration:"line-through"},children:n})}textStyle(t,n){var r,s;let{attrs:e}=t,{color:i=(s=(r=this.config.theme)==null?void 0:r.colors)==null?void 0:s.paragraph}=e||{};return(0,o.jsx)("span",{style:{color:i},children:n})}link(t,n){var a,p;let{attrs:e}=t,i=(e==null?void 0:e.href)||"#",r=(e==null?void 0:e.target)||"_blank",s=(e==null?void 0:e.rel)||"noopener noreferrer nofollow";return(typeof this.linkValues=="object"||typeof this.variableValues=="object")&&(i=this.linkValues.get(i)||this.variableValues.get(i)||i),(0,o.jsx)(l.Link,{href:i,rel:s,style:{fontWeight:500,textDecoration:"none",color:(p=(a=this.config.theme)==null?void 0:a.colors)==null?void 0:p.heading},target:r,children:n})}heading(t,n){var d,g;let{attrs:e}=t,i=`h${Number(e==null?void 0:e.level)||1}`,r=(e==null?void 0:e.textAlign)||"left",{shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,n),{fontSize:a,lineHeight:p,fontWeight:u}=ft[i];return(0,o.jsx)(l.Heading,{as:i,style:{textAlign:r,color:(g=(d=this.config.theme)==null?void 0:d.colors)==null?void 0:g.heading,marginBottom:s?"0":"12px",marginTop:0,fontSize:a,lineHeight:p,fontWeight:u},children:this.getMappedContent(t,x(f({},n),{parent:t}))})}variable(t,n){var p,u,d;let{payloadValue:e}=n||{},{id:i,fallback:r}=t.attrs||{};if(!this.shouldShow(t,n)||!i)return(0,o.jsx)(o.Fragment,{});let a=this.variableFormatter({variable:i,fallback:r});return this.shouldReplaceVariableValues&&(a=(d=(u=(p=typeof e=="object"?e[i]:e)!=null?p:this.variableValues.get(i))!=null?u:r)!=null?d:a),t!=null&&t.marks?this.renderMark({text:a,marks:t.marks}):(0,o.jsx)(o.Fragment,{children:a})}horizontalRule(t,n){return(0,o.jsx)(l.Hr,{style:{marginTop:"32px",marginBottom:"32px"}})}orderedList(t,n){let{shouldRemoveBottomMargin:e}=this.getMarginOverrideConditions(t,n);return(0,o.jsx)(l.Container,{children:(0,o.jsx)("ol",{style:{marginTop:"0px",marginBottom:e?"0":"20px",paddingLeft:"26px",listStyleType:"decimal"},children:this.getMappedContent(t,x(f({},n),{parent:t}))})})}bulletList(t,n){let{parent:e,next:i}=n||{},{shouldRemoveBottomMargin:r}=this.getMarginOverrideConditions(t,{parent:e,next:i});return(0,o.jsx)(l.Container,{style:{maxWidth:"100%"},children:(0,o.jsx)("ul",{style:{marginTop:"0px",marginBottom:r?"0":"20px",paddingLeft:"26px",listStyleType:"disc"},children:this.getMappedContent(t,x(f({},n),{parent:t}))})})}listItem(t,n){return(0,o.jsx)("li",{style:f({marginBottom:"8px",paddingLeft:"6px"},L),children:this.getMappedContent(t,x(f({},n),{parent:t}))})}button(t,n){let{attrs:e}=t,{text:i,url:r,variant:s,buttonColor:a,textColor:p,borderRadius:u,alignment:d="left"}=e||{};if(!this.shouldShow(t,n))return(0,o.jsx)(o.Fragment,{});let h="0px";u==="round"?h="9999px":u==="smooth"&&(h="6px");let{shouldRemoveBottomMargin:m}=this.getMarginOverrideConditions(t,n),y=this.linkValues.get(r)||this.variableValues.get(r)||r;return(0,o.jsx)(l.Container,{style:{textAlign:d,maxWidth:"100%",marginBottom:m?"0px":"20px"},children:(0,o.jsx)(l.Button,{href:y,style:{color:String(p),backgroundColor:s==="filled"?String(a):"transparent",borderColor:String(a),padding:s==="filled"?"12px 34px":"10px 34px",borderWidth:"2px",borderStyle:"solid",textDecoration:"none",fontSize:"14px",fontWeight:500,borderRadius:h},children:i})})}spacer(t,n){let{attrs:e}=t,{height:i="auto"}=e||{};return this.shouldShow(t,n)?(0,o.jsx)(l.Container,{style:{height:mt[i]||i}}):(0,o.jsx)(o.Fragment,{})}hardBreak(t,n){return(0,o.jsx)("br",{})}logo(t,n){let{attrs:e}=t,{src:i,alt:r,title:s,size:a,alignment:p="left"}=e||{};if(!this.shouldShow(t,n))return(0,o.jsx)(o.Fragment,{});let{shouldRemoveBottomMargin:d}=this.getMarginOverrideConditions(t,n);return(0,o.jsx)(l.Row,{style:{marginTop:"0px",marginBottom:d?"0px":"32px"},children:(0,o.jsx)(l.Column,{align:p,children:(0,o.jsx)(l.Img,{alt:r||s||"Logo",src:i,style:{width:W[a]||a,height:W[a]||a},title:s||r||"Logo"})})})}image(t,n){let{attrs:e}=t,{src:i,alt:r,title:s,width:a="auto",alignment:p="center",externalLink:u=""}=e||{};if(!this.shouldShow(t,n))return(0,o.jsx)(o.Fragment,{});let{shouldRemoveBottomMargin:g}=this.getMarginOverrideConditions(t,n),h=a==="auto"?"auto":Number(a),m=h==="auto"?"auto":`${h}px`,y=(0,o.jsx)(l.Img,{alt:r||s||"Image",src:i,style:{width:m,maxWidth:"100%",outline:"none",border:"none",textDecoration:"none",display:"block"},title:s||r||"Image"});return(0,o.jsx)(l.Row,{style:{marginTop:"0px",marginBottom:g?"0px":"32px"},children:(0,o.jsx)(l.Column,{align:p,children:u?(0,o.jsx)("a",{href:u,rel:"noopener noreferrer",style:{display:"block",maxWidth:"100%",textDecoration:"none"},target:"_blank",children:y}):y})})}footer(t,n){var s,a,p,u,d,g,h,m;let{attrs:e}=t,{textAlign:i="left"}=e||{},{shouldRemoveBottomMargin:r}=this.getMarginOverrideConditions(t,n);return(0,o.jsx)(l.Text,{style:f({fontSize:(p=(a=(s=this.config.theme)==null?void 0:s.fontSize)==null?void 0:a.footer)==null?void 0:p.size,lineHeight:(g=(d=(u=this.config.theme)==null?void 0:u.fontSize)==null?void 0:d.footer)==null?void 0:g.lineHeight,color:(m=(h=this.config.theme)==null?void 0:h.colors)==null?void 0:m.footer,marginTop:"0px",marginBottom:r?"0px":"20px",textAlign:i},L),children:this.getMappedContent(t,x(f({},n),{parent:t}))})}blockquote(t,n){var r,s;let{isPrevSpacer:e,shouldRemoveBottomMargin:i}=this.getMarginOverrideConditions(t,n);return(0,o.jsx)("blockquote",{style:{borderLeftWidth:"4px",borderLeftStyle:"solid",borderLeftColor:(s=(r=this.config.theme)==null?void 0:r.colors)==null?void 0:s.blockquoteBorder,paddingLeft:"16px",marginLeft:"0px",marginRight:"0px",marginTop:e?"0px":"20px",marginBottom:i?"0px":"20px"},children:this.getMappedContent(t,x(f({},n),{parent:t}))})}code(t,n){var e,i,r,s;return(0,o.jsx)("code",{style:{backgroundColor:(i=(e=this.config.theme)==null?void 0:e.colors)==null?void 0:i.codeBackground,color:(s=(r=this.config.theme)==null?void 0:r.colors)==null?void 0:s.codeText,padding:"2px 4px",borderRadius:"6px",fontFamily:yt,fontWeight:400,letterSpacing:0},children:n})}linkCard(t,n){var m,y,S,b,C,O,w,N,E,T,v,_;let{attrs:e}=t,{shouldRemoveBottomMargin:i}=this.getMarginOverrideConditions(t,n),{title:r,description:s,link:a,linkTitle:p,image:u,badgeText:d,subTitle:g}=e||{},h=this.linkValues.get(a)||this.variableValues.get(a)||a||"#";return(0,o.jsxs)("a",{href:h,rel:"noopener noreferrer",style:{border:"1px solid #eaeaea",borderRadius:"10px",textDecoration:"none",color:"inherit",display:"block",marginBottom:i?"0px":"20px"},target:"_blank",children:[u?(0,o.jsx)(l.Row,{style:{marginBottom:"6px"},children:(0,o.jsx)(l.Column,{style:{width:"100%",height:"100%"},children:(0,o.jsx)(l.Img,{alt:r||"Link Card",src:u,style:{borderRadius:"10px 10px 0 0",width:"100%",height:"100%",objectFit:"cover"},title:r||"Link Card"})})}):null,(0,o.jsx)(l.Row,{style:{padding:"15px",marginTop:0,marginBottom:0},children:(0,o.jsxs)(l.Column,{style:{verticalAlign:"top"},children:[(0,o.jsxs)(l.Row,{align:void 0,style:{marginBottom:"8px",marginTop:"0px"},width:"auto",children:[(0,o.jsx)(l.Column,{children:(0,o.jsx)(l.Text,{style:f({fontSize:"18px",fontWeight:600,color:(y=(m=this.config.theme)==null?void 0:m.colors)==null?void 0:y.linkCardTitle,margin:"0px"},L),children:r})}),d||g?(0,o.jsxs)(l.Column,{style:{paddingLeft:"6px",verticalAlign:"middle"},children:[d?(0,o.jsx)("span",{style:{fontWeight:600,color:(b=(S=this.config.theme)==null?void 0:S.colors)==null?void 0:b.linkCardBadgeText,padding:"4px 8px",borderRadius:"8px",backgroundColor:(O=(C=this.config.theme)==null?void 0:C.colors)==null?void 0:O.linkCardBadgeBackground,fontSize:"12px",lineHeight:"12px"},children:d}):null," ",g&&!d?(0,o.jsx)("span",{style:{fontWeight:"normal",color:(N=(w=this.config.theme)==null?void 0:w.colors)==null?void 0:N.linkCardSubTitle,fontSize:"12px",lineHeight:"12px"},children:g}):null]}):null]}),(0,o.jsxs)(l.Text,{style:f({fontSize:"16px",color:(T=(E=this.config.theme)==null?void 0:E.colors)==null?void 0:T.linkCardDescription,marginTop:"0px",marginBottom:"0px"},L),children:[s," ",p?(0,o.jsx)("a",{href:h,rel:"noopener noreferrer",style:{color:(_=(v=this.config.theme)==null?void 0:v.colors)==null?void 0:_.linkCardTitle,fontSize:"14px",fontWeight:600,textDecoration:"underline"},children:p}):null]})]})})]})}section(t,n){let{attrs:e}=t,{borderRadius:i=0,backgroundColor:r=j,align:s=H,borderWidth:a=G,borderColor:p=q,marginTop:u=$,marginRight:d=K,marginBottom:g=Y,marginLeft:h=Q,paddingTop:m=Z,paddingRight:y=tt,paddingBottom:S=et,paddingLeft:b=nt}=e||{};return this.shouldShow(t,n)?(0,o.jsx)(l.Row,{style:{marginTop:u,marginRight:d,marginBottom:g,marginLeft:h},children:(0,o.jsx)(l.Column,{align:s,style:{borderColor:p,borderWidth:a,borderStyle:"solid",backgroundColor:r,borderRadius:i,paddingTop:m,paddingRight:y,paddingBottom:S,paddingLeft:b},children:this.getMappedContent(t,x(f({},n),{parent:t}))})}):(0,o.jsx)(o.Fragment,{})}columns(t,n){let{attrs:e}=t;if(!this.shouldShow(t,n))return(0,o.jsx)(o.Fragment,{});let[r,s]=this.adjustColumnsContent(t);return(0,o.jsx)(l.Row,{width:`${s}%`,style:{margin:0,padding:0,width:`${s}%`},className:"tab-row-full",children:this.getMappedContent(r,x(f({},n),{parent:r}))})}adjustColumnsContent(t){var g;let{content:n=[]}=t,e=100,i=n.filter(h=>{var m;return h.type==="column"&&!!Number(((m=h.attrs)==null?void 0:m.width)||0)}),r=n.filter(h=>{var m,y;return h.type==="column"&&(((m=h.attrs)==null?void 0:m.width)==="auto"||!((y=h.attrs)!=null&&y.width))}),s=i.reduce((h,m)=>{var y;return h+Number((y=m.attrs)==null?void 0:y.width)},0),a=e-s,p=Math.round(a/r.length),u=n.filter(h=>h.type==="column").length,d=((g=t.attrs)==null?void 0:g.gap)||ot;return[x(f({},t),{content:n.map((h,m)=>{var N,E,T;let y=h.type==="column"&&(((N=h.attrs)==null?void 0:N.width)==="auto"||!((E=h.attrs)!=null&&E.width)),S=m===0,b=m>0&&m<u-1,C=m===n.length-1,O=0,w=0;if(u<3)O=S?0:d/2,w=C?0:d/2;else{let v=d/2*1.5,_=v/2;O=S?0:b?_:v,w=C?0:b?_:v}return O=Math.round(O*100)/100,w=Math.round(w*100)/100,x(f({},h),{attrs:x(f({},h.attrs),{width:y?p:(T=h.attrs)==null?void 0:T.width,isFirstColumn:S,isLastColumn:C,index:m,paddingLeft:O,paddingRight:w})})})}),r.length===0?Math.min(e,s):e]}column(t,n){let{attrs:e}=t,{width:i,verticalAlign:r="top",paddingLeft:s=0,paddingRight:a=0}=e||{};return(0,o.jsx)(l.Column,{width:`${Number(i)}%`,style:{width:`${Number(i)}%`,margin:0,verticalAlign:r},className:"tab-col-full",children:(0,o.jsx)(l.Section,{style:{margin:0,paddingLeft:s,paddingRight:a},className:"tab-pad",children:this.getMappedContent(t,x(f({},n),{parent:t}))})})}for(t,n){var p,u;let{attrs:e}=t,{each:i=""}=e||{};if(!this.shouldShow(t,n))return(0,o.jsx)(o.Fragment,{});let{payloadValue:s}=n||{};s=typeof s=="object"?s:{};let a=(u=(p=this.payloadValues.get(i))!=null?p:s[i])!=null?u:[];if(!Array.isArray(a))throw new Error(`Payload value for each "${i}" is not an array`);return(0,o.jsx)(o.Fragment,{children:a.map(d=>(0,o.jsx)(B.Fragment,{children:this.getMappedContent(t,x(f({},n),{parent:t,payloadValue:d}))},D()))})}shouldShow(t,n){var r,s,a;let e=(s=(r=t==null?void 0:t.attrs)==null?void 0:r.showIfKey)!=null?s:"";if(!e)return!0;let{payloadValue:i}=n||{};return i=typeof i=="object"?i:{},!!((a=this.payloadValues.get(e))!=null?a:i[e])}};function Tt(c,t){return M(this,null,function*(){let s=t||{},{theme:n,preview:e}=s,i=U(s,["theme","preview"]),r=new A(c);return r.setPreviewText(e),r.setTheme(n||{}),r.setPayloadValue("items",[{name:"John Doe"},{name:"Novu"}]),r.setPayloadValue("shouldShow",!0),r.render(i)})}0&&(module.exports={DEFAULT_COLUMNS_GAP,DEFAULT_COLUMNS_WIDTH,DEFAULT_COLUMN_BACKGROUND_COLOR,DEFAULT_COLUMN_BORDER_COLOR,DEFAULT_COLUMN_BORDER_RADIUS,DEFAULT_COLUMN_BORDER_WIDTH,DEFAULT_COLUMN_PADDING_BOTTOM,DEFAULT_COLUMN_PADDING_LEFT,DEFAULT_COLUMN_PADDING_RIGHT,DEFAULT_COLUMN_PADDING_TOP,DEFAULT_SECTION_ALIGN,DEFAULT_SECTION_BACKGROUND_COLOR,DEFAULT_SECTION_BORDER_COLOR,DEFAULT_SECTION_BORDER_WIDTH,DEFAULT_SECTION_MARGIN_BOTTOM,DEFAULT_SECTION_MARGIN_LEFT,DEFAULT_SECTION_MARGIN_RIGHT,DEFAULT_SECTION_MARGIN_TOP,DEFAULT_SECTION_PADDING_BOTTOM,DEFAULT_SECTION_PADDING_LEFT,DEFAULT_SECTION_PADDING_RIGHT,DEFAULT_SECTION_PADDING_TOP,Maily,render});
1
+ "use strict";var k=Object.defineProperty,mt=Object.defineProperties,ft=Object.getOwnPropertyDescriptor,gt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertyNames,R=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var U=(a,t,e)=>t in a?k(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,g=(a,t)=>{for(var e in t||(t={}))I.call(t,e)&&U(a,e,t[e]);if(R)for(var e of R(t))W.call(t,e)&&U(a,e,t[e]);return a},y=(a,t)=>mt(a,gt(t));var V=(a,t)=>{var e={};for(var n in a)I.call(a,n)&&t.indexOf(n)<0&&(e[n]=a[n]);if(a!=null&&R)for(var n of R(a))t.indexOf(n)<0&&W.call(a,n)&&(e[n]=a[n]);return e};var yt=(a,t)=>{for(var e in t)k(a,e,{get:t[e],enumerable:!0})},St=(a,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of xt(t))!I.call(a,r)&&r!==e&&k(a,r,{get:()=>t[r],enumerable:!(n=ft(t,r))||n.enumerable});return a};var bt=a=>St(k({},"__esModule",{value:!0}),a);var M=(a,t,e)=>new Promise((n,r)=>{var o=p=>{try{l(e.next(p))}catch(u){r(u)}},s=p=>{try{l(e.throw(p))}catch(u){r(u)}},l=p=>p.done?n(p.value):Promise.resolve(p.value).then(o,s);l((e=e.apply(a,t)).next())});var Ft={};yt(Ft,{DEFAULT_BUTTON_PADDING_BOTTOM:()=>ht,DEFAULT_BUTTON_PADDING_LEFT:()=>dt,DEFAULT_BUTTON_PADDING_RIGHT:()=>ut,DEFAULT_BUTTON_PADDING_TOP:()=>pt,DEFAULT_COLUMNS_GAP:()=>st,DEFAULT_COLUMNS_WIDTH:()=>Mt,DEFAULT_COLUMN_BACKGROUND_COLOR:()=>Lt,DEFAULT_COLUMN_BORDER_COLOR:()=>Rt,DEFAULT_COLUMN_BORDER_RADIUS:()=>At,DEFAULT_COLUMN_BORDER_WIDTH:()=>Dt,DEFAULT_COLUMN_PADDING_BOTTOM:()=>Pt,DEFAULT_COLUMN_PADDING_LEFT:()=>Jt,DEFAULT_COLUMN_PADDING_RIGHT:()=>Vt,DEFAULT_COLUMN_PADDING_TOP:()=>kt,DEFAULT_HTML_PROPS:()=>ct,DEFAULT_META_TAGS:()=>lt,DEFAULT_SECTION_ALIGN:()=>q,DEFAULT_SECTION_BACKGROUND_COLOR:()=>$,DEFAULT_SECTION_BORDER_COLOR:()=>Y,DEFAULT_SECTION_BORDER_WIDTH:()=>K,DEFAULT_SECTION_MARGIN_BOTTOM:()=>tt,DEFAULT_SECTION_MARGIN_LEFT:()=>et,DEFAULT_SECTION_MARGIN_RIGHT:()=>Z,DEFAULT_SECTION_MARGIN_TOP:()=>Q,DEFAULT_SECTION_PADDING_BOTTOM:()=>ot,DEFAULT_SECTION_PADDING_LEFT:()=>it,DEFAULT_SECTION_PADDING_RIGHT:()=>rt,DEFAULT_SECTION_PADDING_TOP:()=>nt,LINK_PROTOCOL_REGEX:()=>at,Maily:()=>D,render:()=>Bt});module.exports=bt(Ft);var F=require("react"),c=require("@react-email/components"),G=require("@react-email/render");var Ot=a=>Object.prototype.toString.call(a);var wt=a=>Ot(a)==="[object Object]";function Ct(a){return Object.keys(a)}function J(a,...t){if(!t.length)return a;let e=t.shift();return e===void 0?a:(P(a)&&P(e)&&Ct(e).forEach(n=>{n==="__proto__"||n==="constructor"||n==="prototype"||(P(e[n])?(a[n]||(a[n]={}),P(a[n])?J(a[n],e[n]):a[n]=e[n]):a[n]=e[n])}),J(a,...t))}function P(a){return wt(a)&&!Array.isArray(a)}var jt=Symbol("p-void");function B(){return Math.random().toString(36).substr(2,6)}var L=require("react/jsx-runtime");function z(a){return a.filter((t,e,n)=>{let r=X(t);return e===n.findIndex(o=>X(o)===r)}).map(Tt).filter(Boolean)}function Tt(a){if("tagName"in a){let t=a,{tagName:e}=t,n=V(t,["tagName"]);return(0,L.jsx)(e,g({},n),JSON.stringify(n))}return"title"in a?(0,L.jsx)("title",{children:a.title}):"charSet"in a?(0,L.jsx)("meta",{charSet:a.charSet}):(0,L.jsx)("meta",g({},a),JSON.stringify(a))}function X(a){let t=Object.keys(a).sort().reduce((e,n)=>{let r=n;return e[r]=a[r],e},{});return JSON.stringify(t)}var i=require("react/jsx-runtime");var Nt={sm:"8px",md:"16px",lg:"32px",xl:"64px"},A={WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"};var vt={h1:{fontSize:"36px",lineHeight:"40px",fontWeight:800},h2:{fontSize:"30px",lineHeight:"36px",fontWeight:700},h3:{fontSize:"24px",lineHeight:"38px",fontWeight:600}};var H={sm:"40px",md:"48px",lg:"64px"},Et={pretty:!1,plainText:!1},j={colors:{heading:"#111827",paragraph:"#374151",horizontal:"#EAEAEA",footer:"#64748B",blockquoteBorder:"#D1D5DB",codeBackground:"#EFEFEF",codeText:"#111827",linkCardTitle:"#111827",linkCardDescription:"#6B7280",linkCardBadgeText:"#111827",linkCardBadgeBackground:"#FEF08A",linkCardSubTitle:"#6B7280"},fontSize:{paragraph:"15px",footer:{size:"14px",lineHeight:"24px"}}},_t='SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',$="#ffffff",q="left",K=1,Y="#000000",Q=0,Z=0,tt=0,et=0,nt=5,rt=5,ot=5,it=5,Mt="100%",st=8,Lt="transparent",At=0,Dt=0,Rt="transparent",kt=0,Vt=0,Pt=0,Jt=0,at=/https?:\/\//,lt=[{name:"viewport",content:"width=device-width"},{httpEquiv:"X-UA-Compatible",content:"IE=edge"},{name:"x-apple-disable-message-reformatting"},{name:"format-detection",content:"telephone=no,address=no,email=no,date=no,url=no"},{name:"color-scheme",content:"light"},{name:"supported-color-schemes",content:"light"}],ct={lang:"en",dir:"ltr"},pt=10,ut=32,ht=10,dt=32,D=class{constructor(t={type:"doc",content:[]}){this.config={theme:j};this.variableFormatter=({variable:t,fallback:e})=>e?`{{${t},fallback=${e}}}`:`{{${t}}}`;this.shouldReplaceVariableValues=!1;this.variableValues=new Map;this.linkValues=new Map;this.payloadValues=new Map;this.marksOrder=["underline","bold","italic","textStyle","link"];this.meta=lt;this.htmlProps=ct;this.content=t}setPreviewText(t){this.config.preview=t}setTheme(t){this.config.theme=J(this.config.theme||j,t)}setVariableFormatter(t){this.variableFormatter=t}setVariableValue(t,e){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.variableValues.set(t,e)}setVariableValues(t){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),Object.entries(t).forEach(([e,n])=>{this.setVariableValue(e,n)})}setLinkValue(t,e){this.linkValues.set(t,e)}setLinkValues(t){Object.entries(t).forEach(([e,n])=>{this.setLinkValue(e,n)})}setPayloadValue(t,e){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.payloadValues.set(t,e)}setPayloadValues(t){Object.entries(t).forEach(([e,n])=>{this.setPayloadValue(e,n)})}setOpenTrackingPixel(t){this.openTrackingPixel=t}setShouldReplaceVariableValues(t){this.shouldReplaceVariableValues=t}setMetaTags(t){this.meta.push(...t)}setHtmlProps(t){this.htmlProps=g(g({},this.htmlProps),t)}getAllLinks(){let t=this.content.content||[],e=new Set,n=o=>o&&this.isValidUrl(o)&&!o.startsWith("#")&&!o.startsWith("mailto:")&&!o.startsWith("tel:")&&typeof o=="string",r=o=>{var s;if(o.type==="button"){let l=(s=o.attrs)==null?void 0:s.url;n(l)&&l&&e.add(l)}else o.content&&o.content.forEach(l=>{l.marks&&l.marks.forEach(p=>{var h;let u=(h=p.attrs)==null?void 0:h.href;p.type==="link"&&n(u)&&e.add(u)}),l.content&&r(l)})};return t.forEach(o=>{r(o)}),e}isValidUrl(t){try{let e=new URL(t);return!0}catch(e){return!1}}render(){return M(this,arguments,function*(t=Et){let e=this.markup();return(0,G.renderAsync)(e,t)})}markup(){let t=this.content.content||[],e=t.map((l,p)=>{let u={prev:t[p-1],next:t[p+1],parent:l},h=this.renderNode(l,u);return h?(0,i.jsx)(F.Fragment,{children:h},B()):null}),{preview:n}=this.config,r=z(this.meta),o=this.htmlProps;return(0,i.jsxs)(c.Html,y(g({},o),{children:[(0,i.jsxs)(c.Head,{children:[(0,i.jsx)(c.Font,{fallbackFontFamily:"sans-serif",fontFamily:"Inter",fontStyle:"normal",fontWeight:400,webFont:{url:"https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.19",format:"woff2"}}),(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"blockquote,h1,h2,h3,img,li,ol,p,ul{margin-top:0;margin-bottom:0}@media only screen and (max-width:425px){.tab-row-full{width:100%!important}.tab-col-full{display:block!important;width:100%!important}.tab-pad{padding:0!important}}"}}),r]}),(0,i.jsxs)(c.Body,{style:{margin:0},children:[n?(0,i.jsx)(c.Preview,{id:"__react-email-preview",children:n}):null,(0,i.jsx)(c.Container,{style:{maxWidth:"600px",minWidth:"300px",width:"100%",marginLeft:"auto",marginRight:"auto",padding:"0.5rem"},children:e}),this.openTrackingPixel?(0,i.jsx)(c.Img,{alt:"",src:this.openTrackingPixel,style:{display:"none",width:"1px",height:"1px"}}):null]})]}))}getMarginOverrideConditions(t,e){let{parent:n,prev:r,next:o}=e||{},s=(o==null?void 0:o.type)==="spacer",l=(r==null?void 0:r.type)==="spacer",p=(n==null?void 0:n.type)==="listItem",u=(n==null?void 0:n.type)==="section"&&!o,h=(n==null?void 0:n.type)==="section"&&!r,m=(n==null?void 0:n.type)==="column"&&!o,d=(n==null?void 0:n.type)==="column"&&!r,f=(n==null?void 0:n.type)==="for"&&!r,x=(n==null?void 0:n.type)==="for"&&!o,S=(n==null?void 0:n.type)==="show"&&!r,b=(n==null?void 0:n.type)==="show"&&!o;return{isNextSpacer:s,isPrevSpacer:l,isLastSectionElement:u,isFirstSectionElement:h,isParentListItem:p,isLastColumnElement:m,isFirstColumnElement:d,isFirstForElement:f,isLastForElement:x,isFirstShowElement:S,isLastShowElement:b,shouldRemoveTopMargin:l||h||d||f||S,shouldRemoveBottomMargin:s||u||m||x||b}}getMappedContent(t,e){let n=t.content||[];return n.map((r,o)=>{let s=this.renderNode(r,y(g({},e),{next:n[o+1],prev:n[o-1]}));return s?(0,i.jsx)(F.Fragment,{children:s},B()):null}).filter(r=>r!==null)}renderNode(t,e={}){var r;let n=t.type||"";if(n in this)return(r=this[n])==null?void 0:r.call(this,t,e);throw new Error(`Node type "${n}" is not supported.`)}renderMark(t,e){let n=(t==null?void 0:t.text)||(0,i.jsx)(i.Fragment,{children:"\xA0"}),r=(t==null?void 0:t.marks)||[];return r.sort((o,s)=>this.marksOrder.indexOf(o.type)-this.marksOrder.indexOf(s.type)),r.reduce((o,s)=>{var p;let l=s.type;if(l in this)return(p=this[l])==null?void 0:p.call(this,s,o);throw new Error(`Mark type "${l}" is not supported.`)},(0,i.jsx)(i.Fragment,{children:n}))}paragraph(t,e){var p,u,h,m;let{attrs:n}=t,r=(n==null?void 0:n.textAlign)||"left",{isParentListItem:o,shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,e);return this.shouldShow(t,e)?(0,i.jsx)(c.Text,{style:g(y(g({},r!=="left"?{textAlign:r}:{}),{marginBottom:o||s?"0px":"20px",marginTop:"0px",fontSize:(u=(p=this.config.theme)==null?void 0:p.fontSize)==null?void 0:u.paragraph,color:(m=(h=this.config.theme)==null?void 0:h.colors)==null?void 0:m.paragraph}),A),children:t.content?this.getMappedContent(t,y(g({},e),{parent:t})):(0,i.jsx)(i.Fragment,{children:"\xA0"})}):(0,i.jsx)(i.Fragment,{})}text(t,e){let n=t.text||"&nbsp";return t.marks?this.renderMark(t,e):(0,i.jsx)(i.Fragment,{children:n})}bold(t,e){return(0,i.jsx)("strong",{children:e})}italic(t,e){return(0,i.jsx)("em",{children:e})}underline(t,e){return(0,i.jsx)("u",{children:e})}strike(t,e){return(0,i.jsx)("s",{style:{textDecoration:"line-through"},children:e})}textStyle(t,e){var o,s;let{attrs:n}=t,{color:r=(s=(o=this.config.theme)==null?void 0:o.colors)==null?void 0:s.paragraph}=n||{};return(0,i.jsx)("span",{style:{color:r},children:e})}link(t,e,n){var u,h,m;let{attrs:r}=t,o=(r==null?void 0:r.href)||"#",s=(r==null?void 0:r.target)||"_blank",l=(r==null?void 0:r.rel)||"noopener noreferrer nofollow";if((u=r==null?void 0:r.isUrlVariable)!=null?u:!1){let d=this.removeLinkProtocol(o);o=this.variableUrlValue(d,n)}else o=this.linkValues.get(o)||o;return(0,i.jsx)(c.Link,{href:o,rel:l,style:{fontWeight:500,textDecoration:"none",color:(m=(h=this.config.theme)==null?void 0:h.colors)==null?void 0:m.heading},target:s,children:e})}removeLinkProtocol(t){return t.replace(at,"")}variableUrlValue(t,e){var o,s;let{payloadValue:n}=e||{},r=this.removeLinkProtocol(t);return(s=(o=typeof n=="object"?n[r]:n)!=null?o:this.variableValues.get(r))!=null?s:t}heading(t,e){var m,d;let{attrs:n}=t,r=`h${Number(n==null?void 0:n.level)||1}`,o=(n==null?void 0:n.textAlign)||"left",{shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,e),{fontSize:l,lineHeight:p,fontWeight:u}=vt[r];return this.shouldShow(t,e)?(0,i.jsx)(c.Heading,{as:r,style:{textAlign:o,color:(d=(m=this.config.theme)==null?void 0:m.colors)==null?void 0:d.heading,marginBottom:s?"0":"12px",marginTop:0,fontSize:l,lineHeight:p,fontWeight:u},children:this.getMappedContent(t,y(g({},e),{parent:t}))}):(0,i.jsx)(i.Fragment,{})}variable(t,e){var p,u,h;let{payloadValue:n}=e||{},{id:r,fallback:o}=t.attrs||{};if(!this.shouldShow(t,e)||!r)return(0,i.jsx)(i.Fragment,{});let l=this.variableFormatter({variable:r,fallback:o});return this.shouldReplaceVariableValues&&(l=(h=(u=(p=typeof n=="object"?n[r]:n)!=null?p:this.variableValues.get(r))!=null?u:o)!=null?h:l),t!=null&&t.marks?this.renderMark({text:l,marks:t.marks},e):(0,i.jsx)(i.Fragment,{children:l})}horizontalRule(t,e){return(0,i.jsx)(c.Hr,{style:{marginTop:"32px",marginBottom:"32px"}})}orderedList(t,e){let{shouldRemoveBottomMargin:n}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)(c.Container,{children:(0,i.jsx)("ol",{style:{marginTop:"0px",marginBottom:n?"0":"20px",paddingLeft:"26px",listStyleType:"decimal"},children:this.getMappedContent(t,y(g({},e),{parent:t}))})})}bulletList(t,e){let{parent:n,next:r}=e||{},{shouldRemoveBottomMargin:o}=this.getMarginOverrideConditions(t,{parent:n,next:r});return(0,i.jsx)(c.Container,{style:{maxWidth:"100%"},children:(0,i.jsx)("ul",{style:{marginTop:"0px",marginBottom:o?"0":"20px",paddingLeft:"26px",listStyleType:"disc"},children:this.getMappedContent(t,y(g({},e),{parent:t}))})})}listItem(t,e){return(0,i.jsx)("li",{style:g({marginBottom:"8px",paddingLeft:"6px"},A),children:this.getMappedContent(t,y(g({},e),{parent:t}))})}button(t,e){let{attrs:n}=t,{text:r,isTextVariable:o,url:s,isUrlVariable:l,variant:p,buttonColor:u,textColor:h,borderRadius:m,alignment:d="left",paddingTop:f=pt,paddingRight:x=ut,paddingBottom:S=ht,paddingLeft:b=dt}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let O="0px";m==="round"?O="9999px":m==="smooth"&&(O="6px");let{shouldRemoveBottomMargin:w}=this.getMarginOverrideConditions(t,e),T=l?this.variableUrlValue(s,e):this.linkValues.get(s)||s,N=o?this.variableUrlValue(r,e):r;return f+=2,S+=2,(0,i.jsx)(c.Container,{style:{textAlign:d,maxWidth:"100%",marginBottom:w?"0px":"20px"},children:(0,i.jsx)(c.Button,{href:T,style:{color:String(h),backgroundColor:p==="filled"?String(u):"transparent",borderColor:String(u),borderWidth:"2px",borderStyle:"solid",textDecoration:"none",fontSize:"14px",fontWeight:500,borderRadius:O,padding:`${f}px ${x}px ${S}px ${b}px`},children:N})})}spacer(t,e){let{attrs:n}=t,{height:r="auto"}=n||{};return this.shouldShow(t,e)?(0,i.jsx)(c.Container,{style:{height:Nt[r]||r}}):(0,i.jsx)(i.Fragment,{})}hardBreak(t,e){return(0,i.jsx)("br",{})}logo(t,e){let{attrs:n}=t,{src:r,isSrcVariable:o,alt:s,title:l,size:p,alignment:u="left"}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});r=o?this.variableUrlValue(r,e):r;let{shouldRemoveBottomMargin:m}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)(c.Row,{style:{marginTop:"0px",marginBottom:m?"0px":"32px"},children:(0,i.jsx)(c.Column,{align:u,children:(0,i.jsx)(c.Img,{alt:s||l||"Logo",src:r,style:{width:H[p]||p,height:H[p]||p},title:l||s||"Logo"})})})}image(t,e){let{attrs:n}=t,{src:r,isSrcVariable:o,alt:s,title:l,width:p="auto",alignment:u="center",externalLink:h="",isExternalLinkVariable:m}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let{shouldRemoveBottomMargin:f}=this.getMarginOverrideConditions(t,e);r=o?this.variableUrlValue(r,e):r,h=m?this.variableUrlValue(h,e):h;let x=p==="auto"?"auto":Number(p),S=x==="auto"?"auto":`${x}px`,b=(0,i.jsx)(c.Img,{alt:s||l||"Image",src:r,style:{width:S,maxWidth:"100%",outline:"none",border:"none",textDecoration:"none",display:"block"},title:l||s||"Image"});return(0,i.jsx)(c.Row,{style:{marginTop:"0px",marginBottom:f?"0px":"32px"},children:(0,i.jsx)(c.Column,{align:u,children:h?(0,i.jsx)("a",{href:h,rel:"noopener noreferrer",style:{display:"block",maxWidth:"100%",textDecoration:"none"},target:"_blank",children:b}):b})})}footer(t,e){var s,l,p,u,h,m,d,f;let{attrs:n}=t,{textAlign:r="left"}=n||{},{shouldRemoveBottomMargin:o}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)(c.Text,{style:g({fontSize:(p=(l=(s=this.config.theme)==null?void 0:s.fontSize)==null?void 0:l.footer)==null?void 0:p.size,lineHeight:(m=(h=(u=this.config.theme)==null?void 0:u.fontSize)==null?void 0:h.footer)==null?void 0:m.lineHeight,color:(f=(d=this.config.theme)==null?void 0:d.colors)==null?void 0:f.footer,marginTop:"0px",marginBottom:o?"0px":"20px",textAlign:r},A),children:this.getMappedContent(t,y(g({},e),{parent:t}))})}blockquote(t,e){var o,s;let{isPrevSpacer:n,shouldRemoveBottomMargin:r}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)("blockquote",{style:{borderLeftWidth:"4px",borderLeftStyle:"solid",borderLeftColor:(s=(o=this.config.theme)==null?void 0:o.colors)==null?void 0:s.blockquoteBorder,paddingLeft:"16px",marginLeft:"0px",marginRight:"0px",marginTop:n?"0px":"20px",marginBottom:r?"0px":"20px"},children:this.getMappedContent(t,y(g({},e),{parent:t}))})}code(t,e){var n,r,o,s;return(0,i.jsx)("code",{style:{backgroundColor:(r=(n=this.config.theme)==null?void 0:n.colors)==null?void 0:r.codeBackground,color:(s=(o=this.config.theme)==null?void 0:o.colors)==null?void 0:s.codeText,padding:"2px 4px",borderRadius:"6px",fontFamily:_t,fontWeight:400,letterSpacing:0},children:e})}linkCard(t,e){var f,x,S,b,C,O,w,T,N,E,v,_;let{attrs:n}=t,{shouldRemoveBottomMargin:r}=this.getMarginOverrideConditions(t,e),{title:o,description:s,link:l,linkTitle:p,image:u,badgeText:h,subTitle:m}=n||{},d=this.linkValues.get(l)||this.variableValues.get(l)||l||"#";return(0,i.jsxs)("a",{href:d,rel:"noopener noreferrer",style:{border:"1px solid #eaeaea",borderRadius:"10px",textDecoration:"none",color:"inherit",display:"block",marginBottom:r?"0px":"20px"},target:"_blank",children:[u?(0,i.jsx)(c.Row,{style:{marginBottom:"6px"},children:(0,i.jsx)(c.Column,{style:{width:"100%",height:"100%"},children:(0,i.jsx)(c.Img,{alt:o||"Link Card",src:u,style:{borderRadius:"10px 10px 0 0",width:"100%",height:"100%",objectFit:"cover"},title:o||"Link Card"})})}):null,(0,i.jsx)(c.Row,{style:{padding:"15px",marginTop:0,marginBottom:0},children:(0,i.jsxs)(c.Column,{style:{verticalAlign:"top"},children:[(0,i.jsxs)(c.Row,{align:void 0,style:{marginBottom:"8px",marginTop:"0px"},width:"auto",children:[(0,i.jsx)(c.Column,{children:(0,i.jsx)(c.Text,{style:g({fontSize:"18px",fontWeight:600,color:(x=(f=this.config.theme)==null?void 0:f.colors)==null?void 0:x.linkCardTitle,margin:"0px"},A),children:o})}),h||m?(0,i.jsxs)(c.Column,{style:{paddingLeft:"6px",verticalAlign:"middle"},children:[h?(0,i.jsx)("span",{style:{fontWeight:600,color:(b=(S=this.config.theme)==null?void 0:S.colors)==null?void 0:b.linkCardBadgeText,padding:"4px 8px",borderRadius:"8px",backgroundColor:(O=(C=this.config.theme)==null?void 0:C.colors)==null?void 0:O.linkCardBadgeBackground,fontSize:"12px",lineHeight:"12px"},children:h}):null," ",m&&!h?(0,i.jsx)("span",{style:{fontWeight:"normal",color:(T=(w=this.config.theme)==null?void 0:w.colors)==null?void 0:T.linkCardSubTitle,fontSize:"12px",lineHeight:"12px"},children:m}):null]}):null]}),(0,i.jsxs)(c.Text,{style:g({fontSize:"16px",color:(E=(N=this.config.theme)==null?void 0:N.colors)==null?void 0:E.linkCardDescription,marginTop:"0px",marginBottom:"0px"},A),children:[s," ",p?(0,i.jsx)("a",{href:d,rel:"noopener noreferrer",style:{color:(_=(v=this.config.theme)==null?void 0:v.colors)==null?void 0:_.linkCardTitle,fontSize:"14px",fontWeight:600,textDecoration:"underline"},children:p}):null]})]})})]})}section(t,e){let{attrs:n}=t,{borderRadius:r=0,backgroundColor:o=$,align:s=q,borderWidth:l=K,borderColor:p=Y,marginTop:u=Q,marginRight:h=Z,marginBottom:m=tt,marginLeft:d=et,paddingTop:f=nt,paddingRight:x=rt,paddingBottom:S=ot,paddingLeft:b=it}=n||{};return this.shouldShow(t,e)?(0,i.jsx)(c.Row,{style:{marginTop:u,marginRight:h,marginBottom:m,marginLeft:d},children:(0,i.jsx)(c.Column,{align:s,style:{borderColor:p,borderWidth:l,borderStyle:"solid",backgroundColor:o,borderRadius:r,paddingTop:f,paddingRight:x,paddingBottom:S,paddingLeft:b},children:this.getMappedContent(t,y(g({},e),{parent:t}))})}):(0,i.jsx)(i.Fragment,{})}columns(t,e){let{attrs:n}=t;if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let[o,s]=this.adjustColumnsContent(t);return(0,i.jsx)(c.Row,{width:`${s}%`,style:{margin:0,padding:0,width:`${s}%`},className:"tab-row-full",children:this.getMappedContent(o,y(g({},e),{parent:o}))})}adjustColumnsContent(t){var m;let{content:e=[]}=t,n=100,r=e.filter(d=>{var f;return d.type==="column"&&!!Number(((f=d.attrs)==null?void 0:f.width)||0)}),o=e.filter(d=>{var f,x;return d.type==="column"&&(((f=d.attrs)==null?void 0:f.width)==="auto"||!((x=d.attrs)!=null&&x.width))}),s=r.reduce((d,f)=>{var x;return d+Number((x=f.attrs)==null?void 0:x.width)},0),l=n-s,p=Math.round(l/o.length),u=e.filter(d=>d.type==="column").length,h=((m=t.attrs)==null?void 0:m.gap)||st;return[y(g({},t),{content:e.map((d,f)=>{var T,N,E;let x=d.type==="column"&&(((T=d.attrs)==null?void 0:T.width)==="auto"||!((N=d.attrs)!=null&&N.width)),S=f===0,b=f>0&&f<u-1,C=f===e.length-1,O=0,w=0;if(u<3)O=S?0:h/2,w=C?0:h/2;else{let v=h/2*1.5,_=v/2;O=S?0:b?_:v,w=C?0:b?_:v}return O=Math.round(O*100)/100,w=Math.round(w*100)/100,y(g({},d),{attrs:y(g({},d.attrs),{width:x?p:(E=d.attrs)==null?void 0:E.width,isFirstColumn:S,isLastColumn:C,index:f,paddingLeft:O,paddingRight:w})})})}),o.length===0?Math.min(n,s):n]}column(t,e){let{attrs:n}=t,{width:r,verticalAlign:o="top",paddingLeft:s=0,paddingRight:l=0}=n||{};return(0,i.jsx)(c.Column,{width:`${Number(r)}%`,style:{width:`${Number(r)}%`,margin:0,verticalAlign:o},className:"tab-col-full",children:(0,i.jsx)(c.Section,{style:{margin:0,paddingLeft:s,paddingRight:l},className:"tab-pad",children:this.getMappedContent(t,y(g({},e),{parent:t}))})})}for(t,e){var p,u;let{attrs:n}=t,{each:r=""}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let{payloadValue:s}=e||{};s=typeof s=="object"?s:{};let l=(u=(p=this.payloadValues.get(r))!=null?p:s[r])!=null?u:[];if(!Array.isArray(l))throw new Error(`Payload value for each "${r}" is not an array`);return(0,i.jsx)(i.Fragment,{children:l.map(h=>(0,i.jsx)(F.Fragment,{children:this.getMappedContent(t,y(g({},e),{parent:t,payloadValue:h}))},B()))})}shouldShow(t,e){var o,s,l;let n=(s=(o=t==null?void 0:t.attrs)==null?void 0:o.showIfKey)!=null?s:"";if(!n)return!0;let{payloadValue:r}=e||{};return r=typeof r=="object"?r:{},!!((l=this.payloadValues.get(n))!=null?l:r[n])}};function Bt(a,t){return M(this,null,function*(){let s=t||{},{theme:e,preview:n}=s,r=V(s,["theme","preview"]),o=new D(a);return o.setPreviewText(n),o.setTheme(e||{}),o.render(r)})}0&&(module.exports={DEFAULT_BUTTON_PADDING_BOTTOM,DEFAULT_BUTTON_PADDING_LEFT,DEFAULT_BUTTON_PADDING_RIGHT,DEFAULT_BUTTON_PADDING_TOP,DEFAULT_COLUMNS_GAP,DEFAULT_COLUMNS_WIDTH,DEFAULT_COLUMN_BACKGROUND_COLOR,DEFAULT_COLUMN_BORDER_COLOR,DEFAULT_COLUMN_BORDER_RADIUS,DEFAULT_COLUMN_BORDER_WIDTH,DEFAULT_COLUMN_PADDING_BOTTOM,DEFAULT_COLUMN_PADDING_LEFT,DEFAULT_COLUMN_PADDING_RIGHT,DEFAULT_COLUMN_PADDING_TOP,DEFAULT_HTML_PROPS,DEFAULT_META_TAGS,DEFAULT_SECTION_ALIGN,DEFAULT_SECTION_BACKGROUND_COLOR,DEFAULT_SECTION_BORDER_COLOR,DEFAULT_SECTION_BORDER_WIDTH,DEFAULT_SECTION_MARGIN_BOTTOM,DEFAULT_SECTION_MARGIN_LEFT,DEFAULT_SECTION_MARGIN_RIGHT,DEFAULT_SECTION_MARGIN_TOP,DEFAULT_SECTION_PADDING_BOTTOM,DEFAULT_SECTION_PADDING_LEFT,DEFAULT_SECTION_PADDING_RIGHT,DEFAULT_SECTION_PADDING_TOP,LINK_PROTOCOL_REGEX,Maily,render});
2
2
  //# sourceMappingURL=index.js.map