email-builder-online 2.2.2 → 2.2.3
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/LICENSE +21 -21
- package/README.md +206 -206
- package/dist/editor-sample/src/documents/editor/EditorContext.d.ts.map +1 -1
- package/dist/editor-sample/src/documents/editor/core.d.ts.map +1 -1
- package/dist/editor-sample/src/index.d.ts.map +1 -1
- package/dist/editor-sample/src/locales/en-US/common.json.d.ts +7 -7
- package/dist/editor-sample/src/locales/en-US/inspector.json.d.ts +206 -206
- package/dist/editor-sample/src/locales/es-419/common.json.d.ts +7 -7
- package/dist/editor-sample/src/locales/es-419/inspector.json.d.ts +211 -211
- package/dist/editor-sample/src/locales/it-IT/common.json.d.ts +7 -7
- package/dist/editor-sample/src/locales/it-IT/inspector.json.d.ts +211 -211
- package/dist/email-builder.cjs.js +1 -1
- package/dist/email-builder.cjs.js.map +1 -1
- package/dist/email-builder.es.js +2 -0
- package/dist/email-builder.es.js.map +1 -1
- package/package.json +115 -115
|
@@ -558,5 +558,5 @@ Error generating stack: `+S.message+`
|
|
|
558
558
|
.ql-snow a{
|
|
559
559
|
color: inherit;
|
|
560
560
|
}
|
|
561
|
-
`;function pw(t,{rootBlockId:e}){var i,a;const{cleanedDocument:n,css:r}=UU(t);return E.jsx($p,{children:"<!DOCTYPE html>"+GAe(E.jsxs("html",{lang:"en",children:[E.jsxs("head",{children:[E.jsx("link",{href:"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Oswald:wght@200..700&family=Pacifico&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap",rel:"stylesheet"}),E.jsx("style",{dangerouslySetInnerHTML:{__html:`${r}`}}),E.jsx("style",{dangerouslySetInnerHTML:{__html:`${qAe}`}}),E.jsx("title",{children:"emailbuilder.online"})]}),E.jsx("body",{style:{width:"100%",margin:"0",padding:"0",backgroundColor:((a=(i=t==null?void 0:t.root)==null?void 0:i.data)==null?void 0:a.backdropColor)??"#f4f4f4"},children:E.jsx("table",{role:"presentation",style:{width:"100%",height:"100%",border:"0"},children:E.jsx("tbody",{children:E.jsx("tr",{children:E.jsx("td",{align:"center",valign:"middle",style:{padding:"0"},children:E.jsx("table",{role:"presentation",style:{maxWidth:"600px",width:"100%",border:"0"},children:E.jsx("tr",{children:E.jsx("td",{children:E.jsx(Y6,{isNotClient:!0,document:n,rootBlockId:e})})})})})})})})})]})).replace(/<div style="position:relative">\s*<button\s+class="MuiButtonBase-root\b.*?>.*?<\/button>.*?<\/div>/gs,"")})}function zAe(){const{document:t}=St.getState(),e=X.useMemo(()=>pw(t,{rootBlockId:"root"}),[t]);return E.jsx("div",{style:{width:"100%",margin:"0 auto"},children:E.jsx(pG,{type:"html",value:e==null?void 0:e.props.children})})}function jAe(){const t=Qo(),e=X.useMemo(()=>JSON.stringify(t,null," "),[t]);return E.jsx("div",{style:{width:"100%",margin:"0 auto"},children:E.jsx(pG,{type:"json",value:e})})}function HAe({enableEditorTab:t=!0,enablePreviewTab:e=!0,enableHtmlTab:n=!0,enableJsonTab:r=!0}){const i=hw(),a=$q(),s=Ei(),{t:l}=jn("inspector"),c=X.useMemo(()=>{const f=[];return t&&f.push("editor"),e&&f.push("preview"),n&&f.push("html"),r&&a&&f.push("json"),f},[t,e,n,r,a]);X.useEffect(()=>{c.includes(i)||Y_(c[0]??"editor")},[c.join(","),i]);const u=(f,h)=>{const g=sessionStorage.getItem("lastSelectedScreenSize")||"desktop";switch(h){case"html":Y_("html"),sessionStorage.setItem("lastSelectedScreenSize",s||"desktop"),iy("desktop");break;case"preview":case"json":case"editor":iy(g),Y_(h);return;default:Y_("editor")}};return E.jsxs(te.Tabs,{value:i,onChange:u,children:[t&&E.jsx(te.Tab,{id:"tab-editor",value:"editor",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.edit"),children:E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M12.6935 4.36019L15.6398 7.30647M13.9435 3.11019C14.7571 2.2966 16.0762 2.2966 16.8898 3.11019C17.7034 3.92379 17.7034 5.24288 16.8898 6.05647L5.41667 17.5296H2.5V14.5537L13.9435 3.11019Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),e&&E.jsx(te.Tab,{id:"tab-preview",value:"preview",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.preview"),children:E.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M12.5003 9.99984C12.5003 11.3805 11.381 12.4998 10.0003 12.4998C8.61957 12.4998 7.50029 11.3805 7.50029 9.99984C7.50029 8.61913 8.61957 7.49984 10.0003 7.49984C11.381 7.49984 12.5003 8.61913 12.5003 9.99984Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),E.jsx("path",{d:"M2.04883 9.99981C3.11072 6.6189 6.26929 4.1665 10.0007 4.1665C13.732 4.1665 16.8906 6.61893 17.9525 9.99987C16.8906 13.3808 13.732 15.8332 10.0007 15.8332C6.26929 15.8332 3.11071 13.3807 2.04883 9.99981Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),n&&E.jsx(te.Tab,{id:"tab-html",value:"html",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.htmlOutput"),children:E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M8.33268 16.6668L11.666 3.3335M14.9993 6.66683L18.3327 10.0002L14.9993 13.3335M4.99935 13.3335L1.66602 10.0002L4.99935 6.66683",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})},"html"),r&&a&&E.jsx(te.Tab,{id:"tab-json",value:"json",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.jsonOutput"),children:E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M7.49935 10L12.4993 10M7.49935 13.3333L12.4993 13.3333M14.166 17.5H5.83268C4.91221 17.5 4.16602 16.7538 4.16602 15.8333L4.16602 4.16667C4.16602 3.24619 4.91221 2.5 5.83268 2.5L10.4875 2.5C10.7085 2.5 10.9205 2.5878 11.0768 2.74408L15.5886 7.25592C15.7449 7.4122 15.8327 7.62416 15.8327 7.84518L15.8327 15.8333C15.8327 16.7538 15.0865 17.5 14.166 17.5Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})},"json")]})}const G3=16350;function VAe({sticky:t,heightContent:e,enableEditorTab:n=!0,enablePreviewTab:r=!0,enableHtmlTab:i=!1,enableJsonTab:a=!0}){const[,s]=X.useState(!1),l=Qo(),c=hw(),u=zq(),f=Vq(),h=Yq(),g=jq(),y=X.useRef(null),[v,x]=X.useState(0),w=Be.useTheme(),[A,C]=X.useState(!1),P=nz(),[F,G]=X.useState(null),{t:U}=jn("inspector"),[H,z]=X.useState(!1),Y=X.useRef(null),ie=4e3,[ee,ue]=X.useState(!1),de=X.useRef(null),Ce=({onRendered:Me,children:$e})=>(X.useEffect(()=>{if(typeof Me=="function"){const tt=requestAnimationFrame(()=>Me());return()=>cancelAnimationFrame(tt)}}),E.jsx(E.Fragment,{children:$e})),Re=()=>E.jsx(te.SvgIcon,{viewBox:"0 0 18 18",fontSize:"small",children:E.jsx("path",{d:"M9.00015 6.75V8.25M9.00015 11.25H9.00765M3.804 14.25H14.1963C15.351 14.25 16.0727 13 15.4953 12L10.2992 3C9.72184 2 8.27846 2 7.70111 3L2.50496 12C1.92761 13 2.6493 14.25 3.804 14.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),le=X.useCallback(()=>{switch(c){case"html":return i?E.jsx(zAe,{}):null;case"json":return a?E.jsx(jAe,{}):null}},[u,c,l,i,a]);X.useEffect(()=>{const Me=$e=>{const{detail:tt}=$e;as(tt,!1),z(!0),Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>{z(!1)},ie),ue(!0),de.current&&clearTimeout(de.current),de.current=setTimeout(()=>{ue(!1)},ie)};return window.addEventListener("email-builder-update-template",Me),()=>{window.removeEventListener("email-builder-update-template",Me)}},[c]),X.useEffect(()=>{const Me=()=>{var tt;(tt=y.current)!=null&&tt.offsetWidth&&x(y.current.offsetWidth)};Me();const $e=new ResizeObserver(Me);return y.current&&$e.observe(y.current),()=>{y.current&&$e.disconnect()}},[y]),X.useEffect(()=>{try{const{css:Me}=UU(l);G({length:Me.length,threshold:G3,exceeded:Me.length>G3})}catch{}},[l]),X.useEffect(()=>{const Me=$e=>{($e.ctrlKey||$e.metaKey)&&($e.key==="z"&&!$e.shiftKey&&f?($e.preventDefault(),m2()):($e.key==="y"||$e.key==="z"&&$e.shiftKey)&&h&&($e.preventDefault(),h2()))};return document.addEventListener("keydown",Me),()=>{document.removeEventListener("keydown",Me)}},[f,h]);const ve=()=>{const Me=St.getState().document,$e=pw(Me,{rootBlockId:"root"}),tt=new CustomEvent("save-template",{detail:{json:Me,html:$e.props.children}});window.dispatchEvent(tt)};X.useEffect(()=>{g.length&&s(!0)},[g]);const He=()=>{m2()},Oe=()=>{h2()},Se=()=>{const Me=pw(l,{rootBlockId:"root"}),$e=JSON.stringify(l);switch(c){case"preview":return E.jsx(E.Fragment,{children:E.jsx(ON,{})});case"html":return E.jsx(te.Tooltip,{title:U("header.copy_html"),placement:"left-start",sx:{color:"text.primary"},children:E.jsx(te.IconButton,{onClick:()=>Fe(Me.props.children),children:E.jsx(Tt.ContentCopyOutlined,{fontSize:"small"})})});case"json":return E.jsxs(E.Fragment,{children:[E.jsx(cne,{}),E.jsx(te.Tooltip,{title:U("header.copy_json"),placement:"left-start",sx:{color:"text.primary"},children:E.jsx(te.IconButton,{onClick:()=>Fe($e),children:E.jsx(Tt.ContentCopyOutlined,{fontSize:"small"})})})]});case"editor":default:return E.jsxs(E.Fragment,{children:[E.jsx(te.Tooltip,{title:U("header.undo"),children:E.jsx("div",{onClick:He,style:{transform:"rotateY(180deg)"},className:`buttonsUndoRedo ${f?"":"disabledButton"} `,children:E.jsx("svg",{width:"24px",height:"24px",viewBox:"0 0 25 25",children:E.jsx("path",{fill:"currentColor",d:"M9.9 19q-2.425 0-4.163-1.575T4 13.5t1.738-3.925T9.9 8h6.3l-2.6-2.6L15 4l5 5l-5 5l-1.4-1.4l2.6-2.6H9.9q-1.575 0-2.738 1T6 13.5T7.163 16T9.9 17H17v2z"})})})}),E.jsx(te.Tooltip,{title:U("header.redo"),children:E.jsx("div",{onClick:Oe,className:`buttonsUndoRedo ${h?"":"disabledButton"} `,children:E.jsx("svg",{width:"24px",height:"24px",viewBox:"0 0 25 25",children:E.jsx("path",{fill:"currentColor",d:"M9.9 19q-2.425 0-4.163-1.575T4 13.5t1.738-3.925T9.9 8h6.3l-2.6-2.6L15 4l5 5l-5 5l-1.4-1.4l2.6-2.6H9.9q-1.575 0-2.738 1T6 13.5T7.163 16T9.9 17H17v2z"})})})}),E.jsx(ON,{})]})}},Fe=async Me=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(Me);else{const $e=document.createElement("textarea");$e.value=Me,$e.setAttribute("readonly",""),$e.style.position="absolute",$e.style.left="-9999px",document.body.appendChild($e),$e.select(),document.execCommand("copy"),document.body.removeChild($e)}C(!0)}catch($e){console.error("Error copying text:",$e)}};return E.jsxs(te.Container,{maxWidth:"100%",sx:{flex:"1 1 auto",minWidth:"410px",padding:"0!important"},children:[E.jsx("button",{id:"saveData",style:{display:"none"},onClick:ve,children:"Save"}),E.jsxs(_6,{threshold:".preview-container-end",disabled:!t,topOffset:0,children:[E.jsx("div",{style:{height:50,width:v||"100%",borderBottom:1,borderColor:"divider",backgroundColor:w.palette.background.paper,zIndex:1,display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:0},children:E.jsxs(te.Stack,{px:2,direction:"row",gap:2,width:"100%",justifyContent:"space-between",alignItems:"center",children:[E.jsx(te.Stack,{direction:"row",spacing:2,children:E.jsx(HAe,{enableEditorTab:n,enablePreviewTab:r,enableHtmlTab:i,enableJsonTab:a})}),E.jsx(te.Stack,{direction:"row",spacing:2,alignItems:"center",children:Se()})]})}),F&&(F.length/F.threshold>=.9||F.exceeded)&&E.jsxs(te.Alert,{severity:F!=null&&F.exceeded?"error":"warning",icon:E.jsx(Re,{fontSize:"small"}),sx:{borderRadius:0,m:0,"& .MuiAlert-message":{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:2}},children:[E.jsxs("span",{children:[E.jsx("span",{style:{fontWeight:700},children:"Attention!"})," ",F!=null&&F.exceeded?"You have exceeded the style limit (≈16,000 characters). Some clients will ignore responsive design.":"The email is close to the style limit (≈16,000 characters). If you exceed it, some clients may ignore responsive design."]}),E.jsx(te.Tooltip,{title:`CSS in header: ${F==null?void 0:F.length.toLocaleString()} / ${F==null?void 0:F.threshold.toLocaleString()} characters`,placement:"bottom",children:E.jsx(te.Chip,{size:"small",label:`CSS: ${F==null?void 0:F.length.toLocaleString()} / ${F==null?void 0:F.threshold.toLocaleString()}`,color:F!=null&&F.exceeded?"error":"warning",variant:"filled"})})]})]}),E.jsxs(te.Box,{className:"preview-container",ref:y,onClick:()=>{c==="editor"&&ws(null)},sx:{minWidth:370,width:"100%",zIndex:0,marginTop:"0px!important",borderLeft:"1px solid primary",borderBottom:"1px solid primary",padding:"0 ",paddingBottom:"47px",minHeight:e?void 0:"100dvh",maxHeight:e?t?`calc(${e} - ${vl})`:e:void 0,overflowY:c==="editor"&&P?"visible":"auto",overflowX:"hidden",position:"relative",height:"100%",pt:c==="editor"?"24px":0},children:[E.jsx(te.Box,{sx:{display:c==="editor"?"block":"none",height:"100%"},children:E.jsx(te.Box,{sx:{opacity:ee?0:1,transition:"opacity 120ms ease-out"},children:E.jsx(Ce,{onRendered:()=>{ue(!1),de.current&&(clearTimeout(de.current),de.current=null)},children:E.jsx(te.Box,{sx:{ml:"-24px",width:"calc(100% + 24px)"},children:E.jsx(Oy,{id:"root"})})})})}),E.jsx(te.Box,{sx:{display:c==="preview"?"block":"none",height:"100%"},children:E.jsx(te.Box,{sx:{opacity:H?0:1,transition:"opacity 120ms ease-out"},children:E.jsx(Y6,{document:l,disabledInteraction:!0,isNotClient:!0,onRendered:()=>{z(!1),Y.current&&(clearTimeout(Y.current),Y.current=null)}})})}),le(),(c==="preview"&&H||c==="editor"&&ee)&&E.jsxs(te.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:w.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:1e3,gap:2},children:[E.jsx(te.CircularProgress,{size:48}),E.jsx(te.Typography,{variant:"body1",color:"text.secondary",children:"Loading..."})]})]}),E.jsx("div",{className:"preview-container-end",style:{width:"100%"}}),E.jsx(te.Snackbar,{open:A,autoHideDuration:3e3,onClose:()=>C(!1),anchorOrigin:{vertical:"top",horizontal:"center"},message:"Your text has been copied"})]})}function YAe({galleryImages:t=!0,freeMode:e=!0,darkMode:n=!1,heightContent:r=null,containerGrow:i=!0,sticky:a=!1,htmlTab:s=!1,jsonTab:l=!1,imagePlaceholder:c=zh}){const u=qq(),f=te.useTheme();return X.useEffect(()=>{var y;const g=((y=window.emailBuilder)==null?void 0:y.emailBuilderDevMode)??!0;Gq(g),Kq(t),Xq(e),Jq(n),ez(r),tz(i),Qq(c),Wq({primary:f.palette.primary.main,secondary:f.palette.secondary.main})},[t,e,n,r,i,c,f.palette.primary.main,f.palette.secondary.main]),E.jsxs(te.Container,{className:`${n?"dark-email-builder":"light-email-builder"}`,maxWidth:"none",sx:h=>({margin:"0",position:"relative",width:"100%",display:"flex",overflow:"hidden",padding:"0!important",border:`1px solid ${h.palette.divider}`,borderRadius:2}),children:[E.jsx(te.Box,{sx:h=>({flex:1,minWidth:0,borderRight:`1px solid ${h.palette.divider}`}),children:E.jsx(VAe,{enableHtmlTab:s,enableJsonTab:l,sticky:a,heightContent:r})}),E.jsx(te.Box,{sx:h=>({backgroundColor:h.palette.background.paper}),children:E.jsx(_6,{disabled:!a,threshold:".preview-container-end",topOffset:0,style:{width:u?`${ry}px`:0,flexBasis:u?`${ry}px`:0,minWidth:0,transition:"width 220ms cubic-bezier(0.4, 0, 0.2, 1), flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden",padding:0,flexShrink:0},children:E.jsx(te.Box,{children:E.jsx(lee,{sticky:a,heightContent:r})})})})]})}const{slice:WAe,forEach:KAe}=[];function QAe(t){return KAe.call(WAe.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function ZAe(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const q3=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,XAe=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let a=`${t}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!q3.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!q3.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(a+="; Partitioned"),a},z3={create(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=XAe(t,e,i)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var JAe={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return z3.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=e;n&&typeof document<"u"&&z3.create(n,t,r,i,a)}},eDe={name:"querystring",lookup(t){var r;let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let l=0;l<s.length;l++){const c=s[l].indexOf("=");c>0&&s[l].substring(0,c)===e&&(n=s[l].substring(c+1))}}return n}},tDe={name:"hash",lookup(t){var i;let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:a}=window.location;if(a&&a.length>2){const s=a.substring(1);if(e){const l=s.split("&");for(let c=0;c<l.length;c++){const u=l[c].indexOf("=");u>0&&l[c].substring(0,u)===e&&(r=l[c].substring(u+1))}}if(r)return r;if(!r&&n>-1){const l=a.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let Rf=null;const j3=()=>{if(Rf!==null)return Rf;try{if(Rf=typeof window<"u"&&window.localStorage!==null,!Rf)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Rf=!1}return Rf};var nDe={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&j3())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&j3()&&window.localStorage.setItem(n,t)}};let Nf=null;const H3=()=>{if(Nf!==null)return Nf;try{if(Nf=typeof window<"u"&&window.sessionStorage!==null,!Nf)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Nf=!1}return Nf};var rDe={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&H3())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&H3()&&window.sessionStorage.setItem(n,t)}},iDe={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let a=0;a<n.length;a++)e.push(n[a]);r&&e.push(r),i&&e.push(i)}return e.length>0?e:void 0}},aDe={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},sDe={name:"path",lookup(t){var i;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},oDe={name:"subdomain",lookup(t){var i,a;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&((a=(i=window.location)==null?void 0:i.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let mG=!1;try{document.cookie,mG=!0}catch{}const hG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];mG||hG.splice(1,1);const lDe=()=>({order:hG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class gG{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=QAe(n,this.options||{},lDe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(JAe),this.addDetector(eDe),this.addDetector(nDe),this.addDetector(rDe),this.addDetector(iDe),this.addDetector(aDe),this.addDetector(sDe),this.addDetector(oDe),this.addDetector(tDe)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!ZAe(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}gG.type="languageDetector";const cDe="English (US)",uDe={confirm:"Confirm",cancel:"Cancel"},dDe={language:cDe,generic:uDe},fDe={undo:"Undo (CTRL + Z)",redo:"Redo (CTRL + SHIFT + Z)",copy_html:"Copia HTML",copy_json:"Copia JSON",edit:"Modifica",preview:"Anteprima",htmlOutput:"HTML",jsonOutput:"JSON",desktop:"Desktop",mobile:"Mobile",content:"Content",styles:"Styles"},pDe={copyFormat:"Copy format",pasteFormatting:"Paste formatting",noFormatSupported:"No format supported",duplicate:"Duplicate",delete:"Delete"},mDe={unlockBorders:"Unlock borders",lockBordersTogether:"Lock borders together"},hDe={label:"Style",square:"Square",pill:"Pill",custom:"Custom",borderRadius:"Border Radius",lockTooltip:"Lock corners together",unlockTooltip:"Unlock corners"},gDe={backgroundColor:"Background Color",border:"Border",padding:"Padding",fontWeight:"Font Weight",fontSize:"Font Size",fontFamily:"Font family",width:"Width",shape:"Shape",borderRadius:"Border radius",alignment:"Alignment",height:"Height",lineHeight:"Line Height",color:"Color"},_De={width:{full:"Full",auto:"Auto"},common:{size:"Size",width:"Width",height:"Height",uploadFile:"Upload a file",dragAndDrop:"or drag and drop",fileInfo:"PNG, JPG, GIF up to 5MB",add:"Add",close:"Close",invalidFiles:"Some files were invalid (wrong type or too large). Only valid files will be uploaded.",svgWarning:"SVG images may not display correctly in Outlook email clients. Consider using PNG or JPG format for better compatibility."},columnWidths:{label:"Columns width",tooltip:"Images in these columns cannot exceed the column's width",left:"Left",right:"Right",center:"Center"},alignment:{label:"Alignment"},responsiveSize:{customPadding:"Custom Padding",lockTooltip:"Lock padding sides together",unlockTooltip:"Unlock padding sides",allSides:"All",options:{xSmall:"XS",small:"SM",medium:"MD",custom:"Custom"}},sizeSelector:{label:"Size",contain:"Contain",cover:"Cover",scale:"Scale"},screenSelector:{desktop:"Desktop view",mobile:"Mobile view"},links:{color:"Link color",underline:"Link underline",underlineOn:"Underline on",underlineOff:"Underline off"},backgroundImage:{label:"Background image",fillType:"Background fill type",repeat:"Background repeat",position:"Background position",fillOptions:{cover:"Cover",contain:"Contain",auto:"Auto"},repeatOptions:{none:"No repeat",repeat:"Repeat",repeatX:"Repeat X",repeatY:"Repeat Y"},positions:{topLeft:"Top Left",topCenter:"Top Center",topRight:"Top Right",centerLeft:"Center Left",center:"Center",centerRight:"Center Right",bottomLeft:"Bottom Left",bottomCenter:"Bottom Center",bottomRight:"Bottom Right"}},image:{urlLabel:"Image URL",urlPlaceholder:"Enter image URL...",invalidUrl:"Invalid URL format",timeout:"Request timeout - URL took too long to respond",notImage:"URL does not point to an image"},social:{icon:"Icon",url:"URL",theme:"Theme",size:"Size"},layout:{label:"Layout"},panels:{avatar:{title:"Avatar block",sizeLabel:"Size",altLabel:"Alt text"},button:{title:"Button block",textLabel:"Text",targetLabel:"Target",targetPlaceholder:"https://your-site.com",textColor:"Text color",buttonColor:"Button color"},columns:{title:"Columns block",countLabel:"Number of columns"},container:{title:"Container block"},divider:{title:"Divider block"},emailLayout:{title:"Global styles",backgroundColor:"Background color",canvasColor:"Canvas color",fontFamily:"Font family",textColor:"Text color",linksLabel:"Links"},heading:{title:"Heading block",contentLabel:"Content",levelLabel:"Level"},html:{title:"HTML block",contentLabel:"Content"},image:{title:"Image block",altLabel:"Alt text",altPlaceholder:"Two white watches",urlLabel:"URL",urlPlaceholder:"https://your-website.com"},social:{title:"Social media icons",gap:"Gap"},spacer:{title:"Spacer block"},text:{title:"Text block",contentLabel:"Content",markdownLabel:"Markdown"}}},bDe={header:fDe,actions:pDe,border:mDe,shape:hDe,properties:gDe,inputs:_De},yDe="Español (Latinoamérica)",vDe={confirm:"Confirmar",cancel:"Cancelar"},EDe={language:yDe,generic:vDe},SDe={undo:"Deshacer (CTRL + Z)",redo:"Rehacer (CTRL + SHIFT + Z)",copy_html:"Copiar HTML",copy_json:"Copiar JSON",edit:"Editar",preview:"Vista previa",htmlOutput:"HTML",jsonOutput:"JSON",desktop:"Escritorio",mobile:"Móvil",content:"Contenido",styles:"Estilos"},TDe={copyFormat:"Copiar formato",pasteFormatting:"Pegar formato",noFormatSupported:"Formato no compatible",duplicate:"Duplicar",delete:"Eliminar"},CDe={unlockBorders:"Desbloquear bordes",lockBordersTogether:"Bloquear bordes juntos"},xDe={label:"Estilo",square:"Cuadrado",pill:"Píldora",custom:"Personalizado",borderRadius:"Radio del borde",lockTooltip:"Bloquear esquinas juntas",unlockTooltip:"Desbloquear esquinas"},kDe={backgroundColor:"Color de fondo",border:"Borde",padding:"Relleno",fontWeight:"Grosor de fuente",fontSize:"Tamaño de fuente",fontFamily:"Familia tipográfica",width:"Ancho",shape:"Forma",borderRadius:"Radio del borde",alignment:"Alineación",height:"Altura",lineHeight:"Altura de línea",color:"Color"},wDe={width:{full:"Completo",auto:"Automático"},common:{size:"Tamaño",width:"Ancho",height:"Altura",uploadFile:"Subir un archivo",dragAndDrop:"o arrastra y suelta",fileInfo:"PNG, JPG, GIF hasta 5MB",add:"Agregar",close:"Cerrar",invalidFiles:"Algunos archivos no son válidos (tipo incorrecto o demasiado grandes). Solo se subirán los archivos válidos.",svgWarning:"Las imágenes SVG pueden no mostrarse correctamente en clientes de correo como Outlook. Considera usar PNG o JPG para una mejor compatibilidad."},columnWidths:{label:"Ancho de columnas",tooltip:"Las imágenes en estas columnas no pueden exceder el ancho de la columna",left:"Izquierda",right:"Derecha",center:"Centro"},alignment:{label:"Alineación"},responsiveSize:{customPadding:"Relleno personalizado",lockTooltip:"Bloquear lados del relleno juntos",unlockTooltip:"Desbloquear lados del relleno",allSides:"Todos",options:{xSmall:"XS",small:"SM",medium:"MD",custom:"Personalizado"}},sizeSelector:{label:"Tamaño",contain:"Contener",cover:"Cubrir",scale:"Escalar"},screenSelector:{desktop:"Vista de escritorio",mobile:"Vista móvil"},links:{color:"Color del enlace",underline:"Subrayado del enlace",underlineOn:"Subrayado activado",underlineOff:"Subrayado desactivado"},backgroundImage:{label:"Imagen de fondo",fillType:"Tipo de relleno de fondo",repeat:"Repetición de fondo",position:"Posición de fondo",fillOptions:{cover:"Cubrir",contain:"Contener",auto:"Automático"},repeatOptions:{none:"Sin repetición",repeat:"Repetir",repeatX:"Repetir X",repeatY:"Repetir Y"},positions:{topLeft:"Arriba izquierda",topCenter:"Arriba centro",topRight:"Arriba derecha",centerLeft:"Centro izquierda",center:"Centro",centerRight:"Centro derecha",bottomLeft:"Abajo izquierda",bottomCenter:"Abajo centro",bottomRight:"Abajo derecha"}},image:{urlLabel:"URL de la imagen",urlPlaceholder:"Ingresa la URL de la imagen...",invalidUrl:"Formato de URL inválido",timeout:"Tiempo de espera agotado - La URL tardó demasiado en responder",notImage:"La URL no apunta a una imagen"},social:{icon:"Ícono",url:"URL",theme:"Tema",size:"Tamaño"},layout:{label:"Diseño"},panels:{avatar:{title:"Bloque de avatar",sizeLabel:"Tamaño",altLabel:"Texto alternativo"},button:{title:"Bloque de botón",textLabel:"Texto",targetLabel:"Destino",targetPlaceholder:"https://tu-sitio.com",textColor:"Color del texto",buttonColor:"Color del botón"},columns:{title:"Bloque de columnas",countLabel:"Número de columnas"},container:{title:"Bloque contenedor"},divider:{title:"Bloque divisor"},emailLayout:{title:"Estilos globales",backgroundColor:"Color de fondo",canvasColor:"Color del lienzo",fontFamily:"Familia tipográfica",textColor:"Color del texto",linksLabel:"Enlaces"},heading:{title:"Bloque de encabezado",contentLabel:"Contenido",levelLabel:"Nivel"},html:{title:"Bloque HTML",contentLabel:"Contenido"},image:{title:"Bloque de imagen",altLabel:"Texto alternativo",altPlaceholder:"Dos relojes blancos",urlLabel:"URL",urlPlaceholder:"https://tu-sitio-web.com"},social:{title:"Íconos de redes sociales",gap:"Espaciado"},spacer:{title:"Bloque espaciador"},text:{title:"Bloque de texto",contentLabel:"Contenido",markdownLabel:"Markdown"}}},ADe={header:SDe,actions:TDe,border:CDe,shape:xDe,properties:kDe,inputs:wDe},DDe="Italiano",RDe={confirm:"Conferma",cancel:"Annulla"},NDe={language:DDe,generic:RDe},IDe={undo:"Annulla (CTRL + Z)",redo:"Ripeti (CTRL + SHIFT + Z)",copy_html:"Copia HTML",copy_json:"Copia JSON",edit:"Modifica",preview:"Anteprima",htmlOutput:"HTML",jsonOutput:"JSON",desktop:"Desktop",mobile:"Mobile",content:"Contenuto",styles:"Stili"},ODe={copyFormat:"Copia formato",pasteFormatting:"Incolla formato",noFormatSupported:"Formato non supportato",duplicate:"Duplica",delete:"Elimina"},PDe={unlockBorders:"Sblocca bordi",lockBordersTogether:"Blocca bordi insieme"},LDe={label:"Stile",square:"Quadrato",pill:"Pillola",custom:"Personalizzato",borderRadius:"Raggio del bordo",lockTooltip:"Blocca angoli insieme",unlockTooltip:"Sblocca angoli"},MDe={backgroundColor:"Colore di sfondo",border:"Bordo",padding:"Riempimento",fontWeight:"Spessore del carattere",fontSize:"Dimensione del carattere",fontFamily:"Famiglia di caratteri",width:"Larghezza",shape:"Forma",borderRadius:"Raggio del bordo",alignment:"Allineamento",height:"Altezza",lineHeight:"Altezza della linea",color:"Colore"},FDe={width:{full:"Completo",auto:"Automatico"},common:{size:"Dimensione",width:"Larghezza",height:"Altezza",uploadFile:"Carica un file",dragAndDrop:"o trascina e rilascia",fileInfo:"PNG, JPG, GIF fino a 5MB",add:"Aggiungi",close:"Chiudi",invalidFiles:"Alcuni file non sono validi (tipo errato o troppo grandi). Solo i file validi verranno caricati.",svgWarning:"Le immagini SVG potrebbero non essere visualizzate correttamente nei client di posta Outlook. Considera l'uso di PNG o JPG per una migliore compatibilità."},columnWidths:{label:"Larghezza delle colonne",tooltip:"Le immagini in queste colonne non possono superare la larghezza della colonna",left:"Sinistra",right:"Destra",center:"Centro"},alignment:{label:"Allineamento"},responsiveSize:{customPadding:"Riempimento personalizzato",lockTooltip:"Blocca i lati del riempimento insieme",unlockTooltip:"Sblocca i lati del riempimento",allSides:"Tutti",options:{xSmall:"XS",small:"SM",medium:"MD",custom:"Personalizzato"}},sizeSelector:{label:"Dimensione",contain:"Contieni",cover:"Copri",scale:"Scala"},screenSelector:{desktop:"Vista desktop",mobile:"Vista mobile"},links:{color:"Colore del collegamento",underline:"Sottolineatura del collegamento",underlineOn:"Sottolineatura attiva",underlineOff:"Sottolineatura disattiva"},backgroundImage:{label:"Immagine di sfondo",fillType:"Tipo di riempimento dello sfondo",repeat:"Ripetizione dello sfondo",position:"Posizione dello sfondo",fillOptions:{cover:"Copri",contain:"Contieni",auto:"Automatico"},repeatOptions:{none:"Nessuna ripetizione",repeat:"Ripeti",repeatX:"Ripeti X",repeatY:"Ripeti Y"},positions:{topLeft:"In alto a sinistra",topCenter:"In alto al centro",topRight:"In alto a destra",centerLeft:"Centro sinistra",center:"Centro",centerRight:"Centro destra",bottomLeft:"In basso a sinistra",bottomCenter:"In basso al centro",bottomRight:"In basso a destra"}},image:{urlLabel:"URL dell'immagine",urlPlaceholder:"Inserisci l'URL dell'immagine...",invalidUrl:"Formato URL non valido",timeout:"Timeout della richiesta - L'URL ha impiegato troppo tempo per rispondere",notImage:"L'URL non punta a un'immagine"},social:{icon:"Icona",url:"URL",theme:"Tema",size:"Dimensione"},layout:{label:"Layout"},panels:{avatar:{title:"Blocco avatar",sizeLabel:"Dimensione",altLabel:"Testo alternativo"},button:{title:"Blocco pulsante",textLabel:"Testo",targetLabel:"Destinazione",targetPlaceholder:"https://tuo-sito.com",textColor:"Colore del testo",buttonColor:"Colore del pulsante"},columns:{title:"Blocco colonne",countLabel:"Numero di colonne"},container:{title:"Blocco contenitore"},divider:{title:"Blocco divisore"},emailLayout:{title:"Stili globali",backgroundColor:"Colore di sfondo",canvasColor:"Colore della tela",fontFamily:"Famiglia di caratteri",textColor:"Colore del testo",linksLabel:"Collegamenti"},heading:{title:"Blocco intestazione",contentLabel:"Contenuto",levelLabel:"Livello"},html:{title:"Blocco HTML",contentLabel:"Contenuto"},image:{title:"Blocco immagine",altLabel:"Testo alternativo",altPlaceholder:"Due orologi bianchi",urlLabel:"URL",urlPlaceholder:"https://tuo-sito-web.com"},social:{title:"Icone dei social media",gap:"Spaziatura"},spacer:{title:"Blocco spaziatore"},text:{title:"Blocco testo",contentLabel:"Contenuto",markdownLabel:"Markdown"}}},BDe={header:IDe,actions:ODe,border:PDe,shape:LDe,properties:MDe,inputs:FDe},UDe=["en-US","es-419","it-IT"],$De={"en-US":{common:dDe,inspector:bDe},"es-419":{common:EDe,inspector:ADe},"it-IT":{common:NDe,inspector:BDe}};Ri.isInitialized||Ri.use(gG).use(iq).init({resources:$De,fallbackLng:"en-US",supportedLngs:[...UDe],ns:["common","inspector"],defaultNS:"common",detection:{order:["localStorage","navigator","htmlTag"],caches:["localStorage"]},interpolation:{escapeValue:!1},returnNull:!1}).catch(t=>{process.env.NODE_ENV!=="production"&&console.error("[i18n] Failed to initialize",t)});const _G="#212443",_h="#4F46E5",To="#1F8466",yl="#E81212",Ca="#F6DC9F",bG="#6C0E7C",GDe="#CC996C",qDe='inherit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',Xt=(t,e)=>{if(!e)try{let n;return t.startsWith("#")?n=Be.hexToRgb(t):n=t,n}catch{return"rgb(0, 123, 255)"}try{return t===_G?Be.lighten(t,.3):t===bG?Be.lighten(t,.4):t===Ca?Be.darken(t,.2):Be.lighten(t,.1)}catch{return _h}},xt=Be.createTheme({palette:{background:{default:"#FFFFFF"},text:{primary:"#1F1F21",secondary:"#4F4F4F"}},typography:{fontFamily:qDe}}),zDe=(t=_h,e=_h,n=!1)=>{const r=y=>typeof y=="string"&&y.startsWith("#"),i=r(t)?t:_h,a=r(e)?e:_h,s=Xt(i,n),l=Xt(a,n),c=y=>{try{const v=Be.getContrastRatio(y,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111";return{main:y,light:Be.lighten(y,.2),dark:Be.darken(y,.2),contrastText:v}}catch{return xt.palette.primary}},u={default:n?"#121212":"#FFFFFF",paper:n?"#1e1e1e":"#FFFFFF"},f={primary:n?"#FFFFFF":"#1F1F21",secondary:n?"#CCCCCC":"#4F4F4F",disabled:n?"#FFFFFF":"#BDBDBD"},h={100:n?"#2c2c2c":"#F9FAFB",200:n?"#3c3c3c":"#F2F5F7",300:n?"#4c4c4c":"#DCE4EA",400:n?"#666666":"#A8BBCA",500:n?"#999999":"#6A8BA4"};return Be.createTheme(xt,{shape:{borderRadius:8},palette:{mode:n?"dark":"light",background:u,text:f,primary:c(s),secondary:c(l),mainColor:{main:s,light:Be.alpha(s,n?.7:.5),dark:Be.alpha(s,n?1:.9),contrastText:Be.getContrastRatio(s,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},secondaryColor:{main:l,light:Be.alpha(l,n?.7:.5),dark:Be.alpha(l,n?1:.9),contrastText:Be.getContrastRatio(l,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},brand:{navy:Xt(_G,n),blue:s,red:Xt(yl,n),green:Xt(To,n),yellow:Xt(Ca,n),purple:Xt(bG,n),brown:Xt(GDe,n)},success:{main:Xt(To,n),light:Be.lighten(Xt(To,n),.15),dark:Be.darken(Xt(To,n),.15),contrastText:Be.getContrastRatio(Xt(To,n),n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},error:{main:Xt(yl,n),light:Be.lighten(Xt(yl,n),.15),dark:Be.darken(Xt(yl,n),.15),contrastText:Be.getContrastRatio(Xt(yl,n),n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},warning:{main:Xt(Ca,n),light:Be.lighten(Xt(Ca,n),.15),dark:Be.darken(Xt(Ca,n),.15),contrastText:Be.getContrastRatio(Xt(Ca,n),n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},info:{main:s,light:Be.lighten(s,.15),dark:Be.darken(s,.15),contrastText:Be.getContrastRatio(s,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},cadet:{100:h[100],200:h[200],300:h[300],400:h[400],500:h[500]},highlight:{100:Be.lighten(Xt(Ca,n),n?.6:.8),200:Be.lighten(Xt(Ca,n),n?.4:.6),300:Be.lighten(Xt(Ca,n),n?.2:.4),400:Be.lighten(Xt(Ca,n),n?.1:.2),500:Xt(Ca,n)},divider:n?"#3c3c3c":"#e2e2e2",grey:{50:n?"#1a1a1a":"#fafafa",100:h[100],200:h[200],300:h[300],400:h[400],500:h[500],600:n?"#cccccc":"#757575",700:n?"#e0e0e0":"#616161",800:n?"#f0f0f0":"#424242",900:n?"#ffffff":"#212121"}},components:{MuiAlert:{styleOverrides:{root:{fontSize:xt.typography.pxToRem(14),"&.MuiAlert-colorWarning":{borderColor:n?"#332f29":"#FFFBEB",backgroundColor:`${n?"#f1be50":"#FEF3C7"} !important`,color:n?"#2f2f2f":"#78350f",borderRadius:"8px","& .MuiAlert-icon":{color:"#78350f"}},"&.MuiAlert-colorError":{borderColor:n?"#4a1f1f":"#FEE2E2",backgroundColor:`${n?"#5b2323":"#FEE2E2"} !important`,color:n?"#ffffff":"#7F1D1D",borderRadius:"8px","& .MuiAlert-icon":{color:n?"#ffffff":"#7F1D1D"},"& .MuiAlert-message":{color:n?"#ffffff":"#7F1D1D"}}},action:{paddingTop:0,marginRight:0},filledSuccess:{backgroundColor:Xt(To,n)}}},MuiStepLabel:{styleOverrides:{label:{fontWeight:xt.typography.fontWeightMedium}}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogContent:{styleOverrides:{root:{paddingTop:xt.spacing(1),paddingBottom:xt.spacing(2)}}},MuiDialogTitle:{defaultProps:{variant:"h4"},styleOverrides:{root:{paddingTop:xt.spacing(3),paddingBottom:xt.spacing(1)}}},MuiDialogActions:{styleOverrides:{root:{borderTop:"1px solid",borderTopColor:n?"#3c3c3c":xt.palette.divider,marginTop:xt.spacing(1),padding:`${xt.spacing(1.5)} ${xt.spacing(3)}`}}},MuiSnackbar:{styleOverrides:{root:{position:"absolute",zIndex:9999}}},MuiSnackbarContent:{styleOverrides:{root:{borderRadius:"8px",boxShadow:n?"0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3)":"0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08)",fontWeight:xt.typography.fontWeightMedium,fontSize:xt.typography.pxToRem(14),minWidth:"288px",maxWidth:"568px",backgroundColor:u.default,color:f.primary,border:`1px solid ${Be.alpha(s,n?.3:.2)}`,"&.MuiSnackbarContent-success":{backgroundColor:n?Be.alpha(Xt(To,n),.15):Be.alpha(Xt(To,n),.1),color:n?f.primary:Xt(To,n),border:`1px solid ${Be.alpha(Xt(To,n),n?.3:.2)}`},"&.MuiSnackbarContent-error":{backgroundColor:n?Be.alpha(Xt(yl,n),.15):Be.alpha(Xt(yl,n),.1),color:n?f.primary:Xt(yl,n),border:`1px solid ${Be.alpha(Xt(yl,n),n?.3:.2)}`},"&.MuiSnackbarContent-warning":{backgroundColor:n?Be.alpha(Xt(Ca,n),.15):Be.alpha(Xt(Ca,n),.1),color:n?f.primary:Be.darken(Xt(Ca,n),.6),border:`1px solid ${Be.alpha(Xt(Ca,n),n?.3:.2)}`},"&.MuiSnackbarContent-info":{backgroundColor:n?Be.alpha(s,.15):Be.alpha(s,.1),color:n?f.primary:s,border:`1px solid ${Be.alpha(s,n?.3:.2)}`}},message:{padding:"6px 0",display:"flex",alignItems:"center",gap:xt.spacing(1)},action:{paddingLeft:xt.spacing(2),marginRight:xt.spacing(-1),"& .MuiButton-root":{color:"inherit",fontWeight:xt.typography.fontWeightMedium,textTransform:"none",minWidth:"auto",padding:`${xt.spacing(.5)} ${xt.spacing(1)}`,"&:hover":{backgroundColor:Be.alpha(f.primary,n?.08:.04)}},"& .MuiIconButton-root":{color:"inherit",padding:xt.spacing(.5),"&:hover":{backgroundColor:Be.alpha(f.primary,n?.08:.04)}}}}},MuiTableCell:{styleOverrides:{root:{...xt.typography.body2,borderColor:h[200],color:f.primary},head:{...xt.typography.overline,fontWeight:xt.typography.fontWeightMedium,letterSpacing:"0.075em",color:f.secondary}}},MuiTableRow:{styleOverrides:{root:{"&:last-child td":{borderBottom:0}}}},MuiAvatar:{styleOverrides:{root:{textTransform:"uppercase",fontSize:xt.typography.pxToRem(14)}}},MuiChip:{styleOverrides:{root:{"&.MuiChip-filledWarning":{backgroundColor:Xt(n?"#d18829":"#bead4a",n),color:"#ffffff","& .MuiChip-icon":{color:"#ffffff"}},"&.MuiChip-filledError":{color:"#ffffff","& .MuiChip-label":{color:"#ffffff"},"& .MuiChip-icon":{color:"#ffffff"}}},"&.MuiChip-colorError .MuiChip-label":{color:"#ffffff"},sizeSmall:{borderRadius:xt.spacing(.5),fontSize:12},iconSmall:{fontSize:14,marginLeft:xt.spacing(1)},colorSecondary:{borderColor:h[400],color:f.primary},label:{fontWeight:xt.typography.fontWeightMedium}}},MuiDrawer:{defaultProps:{PaperProps:{elevation:0}}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:xt.typography.pxToRem(12),backgroundColor:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9),color:"#ffffff",border:n?`1px solid ${Be.alpha(h[400],.2)}`:`1px solid ${Be.alpha("#000000",.1)}`,boxShadow:n?`0px 4px 12px ${Be.alpha("#000000",.6)}`:`0px 4px 12px ${Be.alpha("#000000",.25)}`,borderRadius:"6px"},arrow:{color:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9),"&::before":{border:n?`1px solid ${Be.alpha(h[400],.2)}`:`1px solid ${Be.alpha("#000000",.1)}`}}}},MuiPaper:{defaultProps:{elevation:0,square:!0},styleOverrides:{root:{backgroundColor:u.paper}}},MuiToggleButton:{styleOverrides:{root:{paddingLeft:xt.spacing(1.5),paddingRight:xt.spacing(1.5),color:f.primary,borderColor:h[300],backgroundColor:"transparent","&:hover":{backgroundColor:h[100],borderColor:h[400],"& .MuiSvgIcon-root":{color:s}},"&.Mui-selected":{color:s,backgroundColor:Be.alpha(s,.1),borderColor:s,"&:hover":{backgroundColor:n?Be.darken(s,.9):Be.lighten(s,.8),borderColor:s,"& .MuiSvgIcon-root":{color:s}}},"&.Mui-disabled":{color:f.disabled,borderColor:h[200]}}}},MuiButtonBase:{defaultProps:{},styleOverrides:{root:{"&:focus":{outline:"none",boxShadow:"none"},"&:focus-visible":{outline:"none",boxShadow:"none"},"&.MuiButton-outlinedIndigo":{border:`2px solid ${s}`,borderRadius:"8px",fontWeight:"bold",padding:"5px 0",color:s,backgroundColor:"transparent","&:hover":{borderWidth:"2px",backgroundColor:Be.alpha(s,.05),borderColor:Xt(s,n)},"&:active":{backgroundColor:Be.alpha(s,.1)},"&.Mui-disabled":{border:`2px solid ${h[300]}`,color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&:focus":{outline:"none",boxShadow:"none"}},"&.MuiButton-contained":{borderRadius:"8px",fontWeight:"bold",border:"2px solid transparent",backgroundColor:s,color:f.primary==="#FFFFFF"?"#000000":"#FFFFFF","&:hover":{backgroundColor:Xt(s,n),boxShadow:`0 4px 12px ${Be.alpha(s,.3)}`},"&:active":{backgroundColor:n?Be.darken(s,.1):Be.darken(s,.2)},"&.Mui-disabled":{backgroundColor:h[200],color:f.disabled,border:"2px solid transparent",boxShadow:"none",cursor:"not-allowed"},"&:focus":{outline:"none",boxShadow:"none"}},"&.MuiButton-text.primary":{color:s,fontWeight:"bold","&:hover":{backgroundColor:Be.alpha(s,.08),color:Xt(s,n)},"&.Mui-disabled":{color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&:focus":{outline:"none",boxShadow:"none"}},"&.MuiButton-containedSecondary.Mui-disabled":{backgroundColor:h[200],color:f.disabled,border:"2px solid transparent",boxShadow:"none",cursor:"not-allowed"},"&.MuiButton-outlined.Mui-disabled":{border:`1px solid ${h[300]}`,color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&.MuiButton-text.Mui-disabled":{color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&.Mui-disabled":{opacity:n?.5:.6,cursor:"not-allowed","&:hover":{backgroundColor:"inherit",boxShadow:"none",transform:"none",borderColor:"inherit"},"&:active":{backgroundColor:"inherit",transform:"none"},"&:focus":{outline:"none",boxShadow:"none"}}}}},MuiSlider:{styleOverrides:{root:{color:s,height:6,padding:"15px 0","& .MuiSlider-rail":{backgroundColor:h[300],opacity:1,height:2},"& .MuiSlider-track":{backgroundColor:s,height:2,border:"none"},"& .MuiSlider-thumb":{backgroundColor:s,border:`2px solid ${u.paper}`,width:16,height:16,boxShadow:`0 2px 6px ${Be.alpha("#000000",.2)}`,"&:hover":{boxShadow:`0 0 0 8px ${Be.alpha(s,.16)}`},"&:focus":{boxShadow:`0 0 0 8px ${Be.alpha(s,.16)}`},"&.Mui-active":{boxShadow:`0 0 0 14px ${Be.alpha(s,.16)}`},"&.Mui-disabled":{backgroundColor:f.disabled,border:`2px solid ${h[200]}`}},"& .MuiSlider-valueLabel":{backgroundColor:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9),color:"#ffffff",fontSize:xt.typography.pxToRem(12),borderRadius:"6px",padding:"6px 8px","&::before":{borderTopColor:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9)}},"& .MuiSlider-mark":{backgroundColor:Be.alpha(s,n?.6:.4),height:6,width:1,"&.MuiSlider-markActive":{backgroundColor:Be.alpha(s,n?.9:.7)}},"& .MuiSlider-markLabel":{color:f.secondary,fontSize:xt.typography.pxToRem(12),"&.MuiSlider-markLabelActive":{color:s}}},colorSecondary:{color:l,"& .MuiSlider-track":{backgroundColor:l},"& .MuiSlider-thumb":{backgroundColor:l,"&:hover":{boxShadow:`0 0 0 8px ${Be.alpha(l,.16)}`},"&:focus":{boxShadow:`0 0 0 8px ${Be.alpha(l,.16)}`},"&.Mui-active":{boxShadow:`0 0 0 14px ${Be.alpha(l,.16)}`}}}}},MuiIconButton:{styleOverrides:{root:{borderRadius:"8px",padding:"8px",transition:xt.transitions.create(["background-color","box-shadow","color"],{duration:xt.transitions.duration.short}),"&:hover":{backgroundColor:Be.alpha(f.primary,.04)},"&:focus":{outline:"none",boxShadow:"none"},"&.Mui-disabled":{color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"}},sizeSmall:{padding:"6px",fontSize:xt.typography.pxToRem(18)},sizeMedium:{padding:"8px",fontSize:xt.typography.pxToRem(20)},sizeLarge:{padding:"12px",fontSize:xt.typography.pxToRem(24)},colorPrimary:{color:Xt(s,n),"&:hover":{backgroundColor:Be.alpha(s,.08),color:Xt(s,n)},"&:active":{backgroundColor:Be.alpha(s,.12)},"&.Mui-disabled":{color:f.disabled},"&:focus":{outline:"none",boxShadow:"none"}},colorSecondary:{color:Xt(l,n),"&:hover":{backgroundColor:Be.alpha(l,.08),color:Xt(l,n)},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(l,.12)},"&.Mui-disabled":{color:f.disabled}},colorError:{color:n?"#f87171":"#dc2626","&:hover":{backgroundColor:Be.alpha(n?"#f87171":"#dc2626",.08),color:n?"#fca5a5":"#b91c1c"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#f87171":"#dc2626",.12)},"&.Mui-disabled":{color:f.disabled}},colorWarning:{color:n?"#fbbf24":"#d97706","&:hover":{backgroundColor:Be.alpha(n?"#fbbf24":"#d97706",.08),color:n?"#fcd34d":"#b45309"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#fbbf24":"#d97706",.12)},"&.Mui-disabled":{color:f.disabled}},colorInfo:{color:n?"#60a5fa":"#2563eb","&:hover":{backgroundColor:Be.alpha(n?"#60a5fa":"#2563eb",.08),color:n?"#93c5fd":"#1d4ed8"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#60a5fa":"#2563eb",.12)},"&.Mui-disabled":{color:f.disabled}},colorSuccess:{color:n?"#4ade80":"#16a34a","&:hover":{backgroundColor:Be.alpha(n?"#4ade80":"#16a34a",.08),color:n?"#86efac":"#15803d"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#4ade80":"#16a34a",.12)},"&.Mui-disabled":{color:f.disabled}},colorInherit:{color:f.primary,"&:hover":{backgroundColor:Be.alpha(f.primary,.04)},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(f.primary,.08)},"&.Mui-disabled":{color:f.disabled}},contained:{backgroundColor:u.paper,boxShadow:`0 1px 3px ${Be.alpha("#000000",.12)}`,"&:hover":{backgroundColor:h[100],boxShadow:`0 2px 6px ${Be.alpha("#000000",.15)}`},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{boxShadow:`0 1px 2px ${Be.alpha("#000000",.2)}`},"&.Mui-disabled":{backgroundColor:h[100],boxShadow:"none",color:f.disabled}},edge:{"&.MuiIconButton-edgeStart":{marginLeft:"-12px"},"&.MuiIconButton-edgeEnd":{marginRight:"-12px"}}},variants:[{props:{variant:"soft"},style:{backgroundColor:Be.alpha(s,.08),color:Xt(s,n),"&:hover":{backgroundColor:Be.alpha(s,.12)},"&:focus":{backgroundColor:Be.alpha(s,.12),boxShadow:`0 0 0 2px ${Be.alpha(s,.3)}`},"&:active":{backgroundColor:Be.alpha(s,.16)}}},{props:{variant:"outlined"},style:{border:`1px solid ${Be.alpha(s,.3)}`,color:Xt(s,n),"&:hover":{backgroundColor:Be.alpha(s,.04),borderColor:Xt(s,n)},"&:focus":{backgroundColor:Be.alpha(s,.04),borderColor:Xt(s,n),boxShadow:`0 0 0 2px ${Be.alpha(s,.2)}`},"&:active":{backgroundColor:Be.alpha(s,.08)}}}]},MuiButtonGroup:{defaultProps:{disableElevation:!0}},MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{contained:{"&:hover":{backgroundColor:Be.alpha(s,.8)}},textPrimary:{color:f.primary},textSecondary:{color:f.secondary},outlinedPrimary:{borderColor:h[300],color:f.primary,"&:hover, &:active, &:focus":{borderColor:h[500],color:f.primary}},containedSecondary:{backgroundColor:u.paper,border:`1px solid ${h[300]}`,color:f.primary,"&:hover, &:active, &:focus":{backgroundColor:u.paper,borderColor:h[500],color:f.primary}}}},MuiInputBase:{styleOverrides:{root:{"&:not(.Mui-disabled, .Mui-error):before":{borderBottom:`1px solid ${h[400]}`},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:`1px solid ${h[500]} !important`},"&:after":{borderBottom:`1px solid ${f.primary} !important`},"&.MuiOutlinedInput-root:not(.Mui-error)":{"& fieldset":{borderColor:h[300],transition:"border-color 0.2s"}},"&.MuiOutlinedInput-root:not(.Mui-disabled, .Mui-error)":{"&:hover fieldset":{borderColor:h[400]},"&.Mui-focused fieldset":{borderColor:f.secondary,borderWidth:1}},".MuiSelect-icon":{fill:f.primary}},input:{fontSize:xt.typography.pxToRem(14),color:f.primary,"&.Mui-disabled":{WebkitTextFillColor:"inherit",color:f.secondary}},inputSizeSmall:{padding:"4px 12px !important"}}},MuiOutlinedInput:{styleOverrides:{root:{input:{padding:"8px 12px"}},notchedOutline:{"& legend":{fontSize:"0.85em",maxWidth:"100%"}}}},MuiInputAdornment:{styleOverrides:{root:{"& .MuiTypography-root":{fontSize:xt.typography.pxToRem(14),color:f.secondary}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{shrink:{transform:"scale(0.85)",fontWeight:xt.typography.fontWeightMedium,color:f.secondary,"&.Mui-focused":{color:f.primary},"&.MuiInputLabel-standard":{transform:"translate(0, -4px) scale(0.85)",color:f.secondary},"&.MuiInputLabel-outlined":{transform:"translate(15px, -8px) scale(0.85)"}}}},MuiSelect:{styleOverrides:{root:{"&.MuiSelect-nativeInput":{padding:0}}},defaultProps:{MenuProps:{PaperProps:{sx:{borderRadius:"4px",boxShadow:n?"0 4px 10px rgba(0, 0, 0, 0.6)":"0 4px 10px rgba(0, 0, 0, 0.3)",backgroundColor:u.paper}}}}},MuiTabs:{defaultProps:{variant:"scrollable"},styleOverrides:{indicator:{height:1,backgroundColor:s}}},MuiTab:{styleOverrides:{root:{textTransform:"none",minWidth:xt.spacing(2),paddingLeft:xt.spacing(1.5),paddingRight:xt.spacing(1.5),fontSize:xt.typography.pxToRem(14),fontFamily:xt.typography.fontFamily,lineHeight:1.5,fontWeight:xt.typography.fontWeightMedium,transition:"color 0.2s",stroke:f.secondary,color:f.secondary,"&.Mui-selected":{color:s,stroke:s},"&:hover":{color:s}}}},MuiCard:{styleOverrides:{root:{borderRadius:0,backgroundColor:u.paper}}},MuiCardHeader:{styleOverrides:{title:{fontSize:xt.typography.pxToRem(18),fontWeight:xt.typography.fontWeightMedium,color:f.primary}}},MuiStack:{defaultProps:{spacing:2},styleOverrides:{root:{"& > :not(style) ~ :not(style)":{marginTop:"0px !important"}}}}},typography:{fontFamily:xt.typography.fontFamily,h1:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(40),lineHeight:1.2,letterSpacing:"-0.02em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h2:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(32),lineHeight:1.2,letterSpacing:"-0.02em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h3:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(24),lineHeight:1.5,letterSpacing:"-0.01em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h4:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(20),lineHeight:1.5,letterSpacing:"-0.01em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h5:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(18),lineHeight:1.5,letterSpacing:"-0.01em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h6:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(16),lineHeight:1.5,letterSpacing:"-0.005em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},body1:{fontSize:xt.typography.pxToRem(14),color:f.primary},body2:{fontSize:xt.typography.pxToRem(12),color:f.primary},overline:{fontWeight:xt.typography.fontWeightMedium,letterSpacing:"0.05em"},button:{textTransform:"none",fontWeight:xt.typography.fontWeightMedium,lineHeight:1.5},caption:{letterSpacing:0,lineHeight:1.5}},shadows:n?["none","0px 4px 15px rgba(0, 0, 0, 0.12), 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 0px 1px rgba(0, 0, 0, 0.12)","0px 10px 20px rgba(0, 0, 0, 0.15), 0px 2px 6px rgba(0, 0, 0, 0.15), 0px 0px 1px rgba(0, 0, 0, 0.15)","0px 16px 24px rgba(0, 0, 0, 0.18), 0px 2px 6px rgba(0, 0, 0, 0.18), 0px 0px 1px rgba(0, 0, 0, 0.18)","0px 24px 32px rgba(0, 0, 0, 0.21), 0px 16px 24px rgba(0, 0, 0, 0.21), 0px 4px 8px rgba(0, 0, 0, 0.21)",...Array(20).fill("none")]:["none","0px 4px 15px rgba(33, 36, 67, 0.04), 0px 0px 2px rgba(33, 36, 67, 0.04), 0px 0px 1px rgba(33, 36, 67, 0.04)","0px 10px 20px rgba(33, 36, 67, 0.04), 0px 2px 6px rgba(33, 36, 67, 0.04), 0px 0px 1px rgba(33, 36, 67, 0.04)","0px 16px 24px rgba(33, 36, 67, 0.05), 0px 2px 6px rgba(33, 36, 67, 0.05), 0px 0px 1px rgba(33, 36, 67, 0.05)","0px 24px 32px rgba(33, 36, 67, 0.06), 0px 16px 24px rgba(33, 36, 67, 0.06), 0px 4px 8px rgba(33, 36, 67, 0.06)",...Array(20).fill("none")]})},UD=({primaryColor:t,secondaryColor:e,galleryImages:n,darkMode:r,height:i,stickyHeader:a,sticky:s,htmlTab:l,jsonTab:c,locale:u,dataLocale:f,imagePlaceholder:h})=>{const[g,y]=X.useState(t||"#058705"),[v,x]=X.useState(e||"#079707"),[w,A]=X.useState(n||!1),[C,P]=X.useState(zh),F=(()=>{var le;if(typeof window<"u"){const ve=window;return(le=ve==null?void 0:ve.emailBuilder)==null?void 0:le.emailBuilderFreeMode}})(),[G,U]=X.useState(F??!0),[H,z]=X.useState(r??!1),[Y,ie]=X.useState(a??!0),[ee,ue]=X.useState(s??!1),[de,Ce]=X.useState(i);X.useEffect(()=>{const le=u??f;le&&le!==Ri.language&&Ri.changeLanguage(le).catch(ve=>{process.env.NODE_ENV!=="production"&&console.error("[i18n] Unable to change language",ve)})},[u,f]),X.useEffect(()=>{t!==g&&y(t),e!==v&&x(e),n!==w&&A(n),r!==H&&z(r),a!==Y&&ie(a),s!==ee&&ue(s),i!==de&&Ce(i);const le=h||zh;le!==C&&P(le)},[g,v,w,G,H,Y,ee,de,C,t,e,n,r,a,s,i,h]);const Re=zDe(g,v,H);return E.jsx("div",{style:{position:"relative",width:"100%",height:"100%"},children:E.jsx(sp.DndProvider,{backend:CG.HTML5Backend,children:E.jsx(te.ThemeProvider,{theme:Re,children:E.jsxs(dq,{i18n:Ri,children:[E.jsx(te.GlobalStyles,{styles:le=>({".ce-inline-toolbar, .codex-editor--narrow .ce-toolbox, .ce-conversion-toolbar, .ce-settings, .ce-settings__button, .ce-toolbar__settings-btn:hover, .cdx-button, .ce-popover, .ce-toolbar__plus:hover":{background:le.palette.primary.main,color:"#fff"},"::selection, .ce-block--selected .ce-block__content":{background:`${le.palette.secondary.main} !important`},".ce-popover-item:hover":{backgroundColor:`${le.palette.primary.main} !important`,color:"#fff"},".cdx-settings-button:hover, .ce-settings__button:hover, .ce-toolbox__button--active, .ce-toolbox__button:hover, .cdx-button:hover, .ce-inline-toolbar__dropdown:hover, .ce-inline-tool:hover, .ce-popover__item:hover, .ce-toolbar__settings-btn:hover":{backgroundColor:le.palette.primary.main,color:"#fff !important"},".tag__title":{color:`${le.palette.primary.main} !important`},".editor-js-loader":{borderBottomColor:le.palette.primary.main},".ql-tooltip .ql-action":{background:le.palette.secondary.main,color:"#fff !important"},".email-builder-body::-webkit-scrollbar-thumb":{background:le.palette.primary.main},".buttonsUndoRedo":{color:le.palette.primary.main},".buttonsUndoRedo:hover":{color:le.palette.secondary.main},".ql-snow .ql-toolbar button.ql-active":{color:le.palette.primary.main},".lucide-loader-circle":{color:le.palette.primary.main},".eb-editor-esc-tip":{backgroundColor:le.palette.secondary.main}})}),E.jsx(te.CssBaseline,{}),E.jsx(YAe,{sticky:ee,heightContent:de,freeMode:G,darkMode:H,galleryImages:w,stickyHeader:Y,htmlTab:l,jsonTab:c,imagePlaceholder:C})]})})})})};let Ob=null;function jDe(){return Ob||(Ob=Cq(UD,{props:{primaryColor:"string",secondaryColor:"string",galleryImages:"boolean",darkMode:"boolean",height:"string",stickyHeader:"boolean",sticky:"boolean",locale:"string",dataLocale:"string",imagePlaceholder:"string"}}),Ob)}function yG(t="email-builder"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,jDe())}if(typeof window<"u")try{yG("email-builder")}catch{}exports.CustomEditorInputStandalone=n6;exports.EmailBuilder=UD;exports.default=UD;exports.registerCustomEditorInput=r6;exports.registerEmailBuilder=yG;
|
|
561
|
+
`;function pw(t,{rootBlockId:e}){var i,a;const{cleanedDocument:n,css:r}=UU(t);return E.jsx($p,{children:"<!DOCTYPE html>"+GAe(E.jsxs("html",{lang:"en",children:[E.jsxs("head",{children:[E.jsx("link",{href:"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Oswald:wght@200..700&family=Pacifico&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap",rel:"stylesheet"}),E.jsx("style",{dangerouslySetInnerHTML:{__html:`${r}`}}),E.jsx("style",{dangerouslySetInnerHTML:{__html:`${qAe}`}}),E.jsx("title",{children:"emailbuilder.online"})]}),E.jsx("body",{style:{width:"100%",margin:"0",padding:"0",backgroundColor:((a=(i=t==null?void 0:t.root)==null?void 0:i.data)==null?void 0:a.backdropColor)??"#f4f4f4"},children:E.jsx("table",{role:"presentation",style:{width:"100%",height:"100%",border:"0"},children:E.jsx("tbody",{children:E.jsx("tr",{children:E.jsx("td",{align:"center",valign:"middle",style:{padding:"0"},children:E.jsx("table",{role:"presentation",style:{maxWidth:"600px",width:"100%",border:"0"},children:E.jsx("tr",{children:E.jsx("td",{children:E.jsx(Y6,{isNotClient:!0,document:n,rootBlockId:e})})})})})})})})})]})).replace(/<div style="position:relative">\s*<button\s+class="MuiButtonBase-root\b.*?>.*?<\/button>.*?<\/div>/gs,"")})}function zAe(){const{document:t}=St.getState(),e=X.useMemo(()=>pw(t,{rootBlockId:"root"}),[t]);return E.jsx("div",{style:{width:"100%",margin:"0 auto"},children:E.jsx(pG,{type:"html",value:e==null?void 0:e.props.children})})}function jAe(){const t=Qo(),e=X.useMemo(()=>JSON.stringify(t,null," "),[t]);return E.jsx("div",{style:{width:"100%",margin:"0 auto"},children:E.jsx(pG,{type:"json",value:e})})}function HAe({enableEditorTab:t=!0,enablePreviewTab:e=!0,enableHtmlTab:n=!0,enableJsonTab:r=!0}){const i=hw(),a=$q(),s=Ei(),{t:l}=jn("inspector"),c=X.useMemo(()=>{const f=[];return t&&f.push("editor"),e&&f.push("preview"),n&&f.push("html"),r&&a&&f.push("json"),f},[t,e,n,r,a]);X.useEffect(()=>{c.includes(i)||Y_(c[0]??"editor")},[c.join(","),i]);const u=(f,h)=>{const g=sessionStorage.getItem("lastSelectedScreenSize")||"desktop";switch(h){case"html":Y_("html"),sessionStorage.setItem("lastSelectedScreenSize",s||"desktop"),iy("desktop");break;case"preview":case"json":case"editor":iy(g),Y_(h);return;default:Y_("editor")}};return E.jsxs(te.Tabs,{value:i,onChange:u,children:[t&&E.jsx(te.Tab,{id:"tab-editor",value:"editor",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.edit"),children:E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M12.6935 4.36019L15.6398 7.30647M13.9435 3.11019C14.7571 2.2966 16.0762 2.2966 16.8898 3.11019C17.7034 3.92379 17.7034 5.24288 16.8898 6.05647L5.41667 17.5296H2.5V14.5537L13.9435 3.11019Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),e&&E.jsx(te.Tab,{id:"tab-preview",value:"preview",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.preview"),children:E.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M12.5003 9.99984C12.5003 11.3805 11.381 12.4998 10.0003 12.4998C8.61957 12.4998 7.50029 11.3805 7.50029 9.99984C7.50029 8.61913 8.61957 7.49984 10.0003 7.49984C11.381 7.49984 12.5003 8.61913 12.5003 9.99984Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),E.jsx("path",{d:"M2.04883 9.99981C3.11072 6.6189 6.26929 4.1665 10.0007 4.1665C13.732 4.1665 16.8906 6.61893 17.9525 9.99987C16.8906 13.3808 13.732 15.8332 10.0007 15.8332C6.26929 15.8332 3.11071 13.3807 2.04883 9.99981Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),n&&E.jsx(te.Tab,{id:"tab-html",value:"html",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.htmlOutput"),children:E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M8.33268 16.6668L11.666 3.3335M14.9993 6.66683L18.3327 10.0002L14.9993 13.3335M4.99935 13.3335L1.66602 10.0002L4.99935 6.66683",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})},"html"),r&&a&&E.jsx(te.Tab,{id:"tab-json",value:"json",label:E.jsx(te.Tooltip,{disableInteractive:!0,arrow:!0,title:l("header.jsonOutput"),children:E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M7.49935 10L12.4993 10M7.49935 13.3333L12.4993 13.3333M14.166 17.5H5.83268C4.91221 17.5 4.16602 16.7538 4.16602 15.8333L4.16602 4.16667C4.16602 3.24619 4.91221 2.5 5.83268 2.5L10.4875 2.5C10.7085 2.5 10.9205 2.5878 11.0768 2.74408L15.5886 7.25592C15.7449 7.4122 15.8327 7.62416 15.8327 7.84518L15.8327 15.8333C15.8327 16.7538 15.0865 17.5 14.166 17.5Z",stroke:"inherit",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})},"json")]})}const G3=16350;function VAe({sticky:t,heightContent:e,enableEditorTab:n=!0,enablePreviewTab:r=!0,enableHtmlTab:i=!1,enableJsonTab:a=!0}){const[,s]=X.useState(!1),l=Qo(),c=hw(),u=zq(),f=Vq(),h=Yq(),g=jq(),y=X.useRef(null),[v,x]=X.useState(0),w=Be.useTheme(),[A,C]=X.useState(!1),P=nz(),[F,G]=X.useState(null),{t:U}=jn("inspector"),[H,z]=X.useState(!1),Y=X.useRef(null),ie=4e3,[ee,ue]=X.useState(!1),de=X.useRef(null),Ce=({onRendered:Me,children:$e})=>(X.useEffect(()=>{if(typeof Me=="function"){const tt=requestAnimationFrame(()=>Me());return()=>cancelAnimationFrame(tt)}}),E.jsx(E.Fragment,{children:$e})),Re=()=>E.jsx(te.SvgIcon,{viewBox:"0 0 18 18",fontSize:"small",children:E.jsx("path",{d:"M9.00015 6.75V8.25M9.00015 11.25H9.00765M3.804 14.25H14.1963C15.351 14.25 16.0727 13 15.4953 12L10.2992 3C9.72184 2 8.27846 2 7.70111 3L2.50496 12C1.92761 13 2.6493 14.25 3.804 14.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),le=X.useCallback(()=>{switch(c){case"html":return i?E.jsx(zAe,{}):null;case"json":return a?E.jsx(jAe,{}):null}},[u,c,l,i,a]);X.useEffect(()=>{const Me=$e=>{const{detail:tt}=$e;as(tt,!1),z(!0),Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>{z(!1)},ie),ue(!0),de.current&&clearTimeout(de.current),de.current=setTimeout(()=>{ue(!1)},ie)};return window.addEventListener("email-builder-update-template",Me),()=>{window.removeEventListener("email-builder-update-template",Me)}},[c]),X.useEffect(()=>{const Me=()=>{var tt;(tt=y.current)!=null&&tt.offsetWidth&&x(y.current.offsetWidth)};Me();const $e=new ResizeObserver(Me);return y.current&&$e.observe(y.current),()=>{y.current&&$e.disconnect()}},[y]),X.useEffect(()=>{try{const{css:Me}=UU(l);G({length:Me.length,threshold:G3,exceeded:Me.length>G3})}catch{}},[l]),X.useEffect(()=>{const Me=$e=>{($e.ctrlKey||$e.metaKey)&&($e.key==="z"&&!$e.shiftKey&&f?($e.preventDefault(),m2()):($e.key==="y"||$e.key==="z"&&$e.shiftKey)&&h&&($e.preventDefault(),h2()))};return document.addEventListener("keydown",Me),()=>{document.removeEventListener("keydown",Me)}},[f,h]);const ve=()=>{const Me=St.getState().document,$e=pw(Me,{rootBlockId:"root"}),tt=new CustomEvent("save-template",{detail:{json:Me,html:$e.props.children}});window.dispatchEvent(tt)};X.useEffect(()=>{g.length&&s(!0)},[g]);const He=()=>{m2()},Oe=()=>{h2()},Se=()=>{const Me=pw(l,{rootBlockId:"root"}),$e=JSON.stringify(l);switch(c){case"preview":return E.jsx(E.Fragment,{children:E.jsx(ON,{})});case"html":return E.jsx(te.Tooltip,{title:U("header.copy_html"),placement:"left-start",sx:{color:"text.primary"},children:E.jsx(te.IconButton,{onClick:()=>Fe(Me.props.children),children:E.jsx(Tt.ContentCopyOutlined,{fontSize:"small"})})});case"json":return E.jsxs(E.Fragment,{children:[E.jsx(cne,{}),E.jsx(te.Tooltip,{title:U("header.copy_json"),placement:"left-start",sx:{color:"text.primary"},children:E.jsx(te.IconButton,{onClick:()=>Fe($e),children:E.jsx(Tt.ContentCopyOutlined,{fontSize:"small"})})})]});case"editor":default:return E.jsxs(E.Fragment,{children:[E.jsx(te.Tooltip,{title:U("header.undo"),children:E.jsx("div",{onClick:He,style:{transform:"rotateY(180deg)"},className:`buttonsUndoRedo ${f?"":"disabledButton"} `,children:E.jsx("svg",{width:"24px",height:"24px",viewBox:"0 0 25 25",children:E.jsx("path",{fill:"currentColor",d:"M9.9 19q-2.425 0-4.163-1.575T4 13.5t1.738-3.925T9.9 8h6.3l-2.6-2.6L15 4l5 5l-5 5l-1.4-1.4l2.6-2.6H9.9q-1.575 0-2.738 1T6 13.5T7.163 16T9.9 17H17v2z"})})})}),E.jsx(te.Tooltip,{title:U("header.redo"),children:E.jsx("div",{onClick:Oe,className:`buttonsUndoRedo ${h?"":"disabledButton"} `,children:E.jsx("svg",{width:"24px",height:"24px",viewBox:"0 0 25 25",children:E.jsx("path",{fill:"currentColor",d:"M9.9 19q-2.425 0-4.163-1.575T4 13.5t1.738-3.925T9.9 8h6.3l-2.6-2.6L15 4l5 5l-5 5l-1.4-1.4l2.6-2.6H9.9q-1.575 0-2.738 1T6 13.5T7.163 16T9.9 17H17v2z"})})})}),E.jsx(ON,{})]})}},Fe=async Me=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(Me);else{const $e=document.createElement("textarea");$e.value=Me,$e.setAttribute("readonly",""),$e.style.position="absolute",$e.style.left="-9999px",document.body.appendChild($e),$e.select(),document.execCommand("copy"),document.body.removeChild($e)}C(!0)}catch($e){console.error("Error copying text:",$e)}};return E.jsxs(te.Container,{maxWidth:"100%",sx:{flex:"1 1 auto",minWidth:"410px",padding:"0!important"},children:[E.jsx("button",{id:"saveData",style:{display:"none"},onClick:ve,children:"Save"}),E.jsxs(_6,{threshold:".preview-container-end",disabled:!t,topOffset:0,children:[E.jsx("div",{style:{height:50,width:v||"100%",borderBottom:1,borderColor:"divider",backgroundColor:w.palette.background.paper,zIndex:1,display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:0},children:E.jsxs(te.Stack,{px:2,direction:"row",gap:2,width:"100%",justifyContent:"space-between",alignItems:"center",children:[E.jsx(te.Stack,{direction:"row",spacing:2,children:E.jsx(HAe,{enableEditorTab:n,enablePreviewTab:r,enableHtmlTab:i,enableJsonTab:a})}),E.jsx(te.Stack,{direction:"row",spacing:2,alignItems:"center",children:Se()})]})}),F&&(F.length/F.threshold>=.9||F.exceeded)&&E.jsxs(te.Alert,{severity:F!=null&&F.exceeded?"error":"warning",icon:E.jsx(Re,{fontSize:"small"}),sx:{borderRadius:0,m:0,"& .MuiAlert-message":{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:2}},children:[E.jsxs("span",{children:[E.jsx("span",{style:{fontWeight:700},children:"Attention!"})," ",F!=null&&F.exceeded?"You have exceeded the style limit (≈16,000 characters). Some clients will ignore responsive design.":"The email is close to the style limit (≈16,000 characters). If you exceed it, some clients may ignore responsive design."]}),E.jsx(te.Tooltip,{title:`CSS in header: ${F==null?void 0:F.length.toLocaleString()} / ${F==null?void 0:F.threshold.toLocaleString()} characters`,placement:"bottom",children:E.jsx(te.Chip,{size:"small",label:`CSS: ${F==null?void 0:F.length.toLocaleString()} / ${F==null?void 0:F.threshold.toLocaleString()}`,color:F!=null&&F.exceeded?"error":"warning",variant:"filled"})})]})]}),E.jsxs(te.Box,{className:"preview-container",ref:y,onClick:()=>{c==="editor"&&ws(null)},sx:{minWidth:370,width:"100%",zIndex:0,marginTop:"0px!important",borderLeft:"1px solid primary",borderBottom:"1px solid primary",padding:"0 ",paddingBottom:"47px",minHeight:e?void 0:"100dvh",maxHeight:e?t?`calc(${e} - ${vl})`:e:void 0,overflowY:c==="editor"&&P?"visible":"auto",overflowX:"hidden",position:"relative",height:"100%",pt:c==="editor"?"24px":0},children:[E.jsx(te.Box,{sx:{display:c==="editor"?"block":"none",height:"100%"},children:E.jsx(te.Box,{sx:{opacity:ee?0:1,transition:"opacity 120ms ease-out"},children:E.jsx(Ce,{onRendered:()=>{ue(!1),de.current&&(clearTimeout(de.current),de.current=null)},children:E.jsx(te.Box,{sx:{ml:"-24px",width:"calc(100% + 24px)"},children:E.jsx(Oy,{id:"root"})})})})}),E.jsx(te.Box,{sx:{display:c==="preview"?"block":"none",height:"100%"},children:E.jsx(te.Box,{sx:{opacity:H?0:1,transition:"opacity 120ms ease-out"},children:E.jsx(Y6,{document:l,disabledInteraction:!0,isNotClient:!0,onRendered:()=>{z(!1),Y.current&&(clearTimeout(Y.current),Y.current=null)}})})}),le(),(c==="preview"&&H||c==="editor"&&ee)&&E.jsxs(te.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:w.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:1e3,gap:2},children:[E.jsx(te.CircularProgress,{size:48}),E.jsx(te.Typography,{variant:"body1",color:"text.secondary",children:"Loading..."})]})]}),E.jsx("div",{className:"preview-container-end",style:{width:"100%"}}),E.jsx(te.Snackbar,{open:A,autoHideDuration:3e3,onClose:()=>C(!1),anchorOrigin:{vertical:"top",horizontal:"center"},message:"Your text has been copied"})]})}function YAe({galleryImages:t=!0,freeMode:e=!0,darkMode:n=!1,heightContent:r=null,containerGrow:i=!0,sticky:a=!1,htmlTab:s=!1,jsonTab:l=!1,imagePlaceholder:c=zh}){const u=qq(),f=te.useTheme();return X.useEffect(()=>{var y;const g=((y=window.emailBuilder)==null?void 0:y.emailBuilderDevMode)??!0;Gq(g),Kq(t),Xq(e),Jq(n),ez(r),tz(i),Qq(c),Wq({primary:f.palette.primary.main,secondary:f.palette.secondary.main})},[t,e,n,r,i,c,f.palette.primary.main,f.palette.secondary.main]),E.jsxs(te.Container,{className:`${n?"dark-email-builder":"light-email-builder"}`,maxWidth:"none",sx:h=>({margin:"0",position:"relative",width:"100%",display:"flex",overflow:"hidden",padding:"0!important",border:`1px solid ${h.palette.divider}`,borderRadius:2}),children:[E.jsx(te.Box,{sx:h=>({flex:1,minWidth:0,borderRight:`1px solid ${h.palette.divider}`}),children:E.jsx(VAe,{enableHtmlTab:s,enableJsonTab:l,sticky:a,heightContent:r})}),E.jsx(te.Box,{sx:h=>({backgroundColor:h.palette.background.paper}),children:E.jsx(_6,{disabled:!a,threshold:".preview-container-end",topOffset:0,style:{width:u?`${ry}px`:0,flexBasis:u?`${ry}px`:0,minWidth:0,transition:"width 220ms cubic-bezier(0.4, 0, 0.2, 1), flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden",padding:0,flexShrink:0},children:E.jsx(te.Box,{children:E.jsx(lee,{sticky:a,heightContent:r})})})})]})}const{slice:WAe,forEach:KAe}=[];function QAe(t){return KAe.call(WAe.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function ZAe(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const q3=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,XAe=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let a=`${t}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!q3.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!q3.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(a+="; Partitioned"),a},z3={create(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=XAe(t,e,i)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var JAe={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return z3.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=e;n&&typeof document<"u"&&z3.create(n,t,r,i,a)}},eDe={name:"querystring",lookup(t){var r;let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let l=0;l<s.length;l++){const c=s[l].indexOf("=");c>0&&s[l].substring(0,c)===e&&(n=s[l].substring(c+1))}}return n}},tDe={name:"hash",lookup(t){var i;let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:a}=window.location;if(a&&a.length>2){const s=a.substring(1);if(e){const l=s.split("&");for(let c=0;c<l.length;c++){const u=l[c].indexOf("=");u>0&&l[c].substring(0,u)===e&&(r=l[c].substring(u+1))}}if(r)return r;if(!r&&n>-1){const l=a.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let Rf=null;const j3=()=>{if(Rf!==null)return Rf;try{if(Rf=typeof window<"u"&&window.localStorage!==null,!Rf)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Rf=!1}return Rf};var nDe={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&j3())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&j3()&&window.localStorage.setItem(n,t)}};let Nf=null;const H3=()=>{if(Nf!==null)return Nf;try{if(Nf=typeof window<"u"&&window.sessionStorage!==null,!Nf)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Nf=!1}return Nf};var rDe={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&H3())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&H3()&&window.sessionStorage.setItem(n,t)}},iDe={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let a=0;a<n.length;a++)e.push(n[a]);r&&e.push(r),i&&e.push(i)}return e.length>0?e:void 0}},aDe={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},sDe={name:"path",lookup(t){var i;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},oDe={name:"subdomain",lookup(t){var i,a;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&((a=(i=window.location)==null?void 0:i.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let mG=!1;try{document.cookie,mG=!0}catch{}const hG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];mG||hG.splice(1,1);const lDe=()=>({order:hG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class gG{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=QAe(n,this.options||{},lDe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(JAe),this.addDetector(eDe),this.addDetector(nDe),this.addDetector(rDe),this.addDetector(iDe),this.addDetector(aDe),this.addDetector(sDe),this.addDetector(oDe),this.addDetector(tDe)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!ZAe(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}gG.type="languageDetector";const cDe="English (US)",uDe={confirm:"Confirm",cancel:"Cancel"},dDe={language:cDe,generic:uDe},fDe={undo:"Undo (CTRL + Z)",redo:"Redo (CTRL + SHIFT + Z)",copy_html:"Copia HTML",copy_json:"Copia JSON",edit:"Modifica",preview:"Anteprima",htmlOutput:"HTML",jsonOutput:"JSON",desktop:"Desktop",mobile:"Mobile",content:"Content",styles:"Styles"},pDe={copyFormat:"Copy format",pasteFormatting:"Paste formatting",noFormatSupported:"No format supported",duplicate:"Duplicate",delete:"Delete"},mDe={unlockBorders:"Unlock borders",lockBordersTogether:"Lock borders together"},hDe={label:"Style",square:"Square",pill:"Pill",custom:"Custom",borderRadius:"Border Radius",lockTooltip:"Lock corners together",unlockTooltip:"Unlock corners"},gDe={backgroundColor:"Background Color",border:"Border",padding:"Padding",fontWeight:"Font Weight",fontSize:"Font Size",fontFamily:"Font family",width:"Width",shape:"Shape",borderRadius:"Border radius",alignment:"Alignment",height:"Height",lineHeight:"Line Height",color:"Color"},_De={width:{full:"Full",auto:"Auto"},common:{size:"Size",width:"Width",height:"Height",uploadFile:"Upload a file",dragAndDrop:"or drag and drop",fileInfo:"PNG, JPG, GIF up to 5MB",add:"Add",close:"Close",invalidFiles:"Some files were invalid (wrong type or too large). Only valid files will be uploaded.",svgWarning:"SVG images may not display correctly in Outlook email clients. Consider using PNG or JPG format for better compatibility."},columnWidths:{label:"Columns width",tooltip:"Images in these columns cannot exceed the column's width",left:"Left",right:"Right",center:"Center"},alignment:{label:"Alignment"},responsiveSize:{customPadding:"Custom Padding",lockTooltip:"Lock padding sides together",unlockTooltip:"Unlock padding sides",allSides:"All",options:{xSmall:"XS",small:"SM",medium:"MD",custom:"Custom"}},sizeSelector:{label:"Size",contain:"Contain",cover:"Cover",scale:"Scale"},screenSelector:{desktop:"Desktop view",mobile:"Mobile view"},links:{color:"Link color",underline:"Link underline",underlineOn:"Underline on",underlineOff:"Underline off"},backgroundImage:{label:"Background image",fillType:"Background fill type",repeat:"Background repeat",position:"Background position",fillOptions:{cover:"Cover",contain:"Contain",auto:"Auto"},repeatOptions:{none:"No repeat",repeat:"Repeat",repeatX:"Repeat X",repeatY:"Repeat Y"},positions:{topLeft:"Top Left",topCenter:"Top Center",topRight:"Top Right",centerLeft:"Center Left",center:"Center",centerRight:"Center Right",bottomLeft:"Bottom Left",bottomCenter:"Bottom Center",bottomRight:"Bottom Right"}},image:{urlLabel:"Image URL",urlPlaceholder:"Enter image URL...",invalidUrl:"Invalid URL format",timeout:"Request timeout - URL took too long to respond",notImage:"URL does not point to an image"},social:{icon:"Icon",url:"URL",theme:"Theme",size:"Size"},layout:{label:"Layout"},panels:{avatar:{title:"Avatar block",sizeLabel:"Size",altLabel:"Alt text"},button:{title:"Button block",textLabel:"Text",targetLabel:"Target",targetPlaceholder:"https://your-site.com",textColor:"Text color",buttonColor:"Button color"},columns:{title:"Columns block",countLabel:"Number of columns"},container:{title:"Container block"},divider:{title:"Divider block"},emailLayout:{title:"Global styles",backgroundColor:"Background color",canvasColor:"Canvas color",fontFamily:"Font family",textColor:"Text color",linksLabel:"Links"},heading:{title:"Heading block",contentLabel:"Content",levelLabel:"Level"},html:{title:"HTML block",contentLabel:"Content"},image:{title:"Image block",altLabel:"Alt text",altPlaceholder:"Two white watches",urlLabel:"URL",urlPlaceholder:"https://your-website.com"},social:{title:"Social media icons",gap:"Gap"},spacer:{title:"Spacer block"},text:{title:"Text block",contentLabel:"Content",markdownLabel:"Markdown"}}},bDe={header:fDe,actions:pDe,border:mDe,shape:hDe,properties:gDe,inputs:_De},yDe="Español (Latinoamérica)",vDe={confirm:"Confirmar",cancel:"Cancelar"},EDe={language:yDe,generic:vDe},SDe={undo:"Deshacer (CTRL + Z)",redo:"Rehacer (CTRL + SHIFT + Z)",copy_html:"Copiar HTML",copy_json:"Copiar JSON",edit:"Editar",preview:"Vista previa",htmlOutput:"HTML",jsonOutput:"JSON",desktop:"Escritorio",mobile:"Móvil",content:"Contenido",styles:"Estilos"},TDe={copyFormat:"Copiar formato",pasteFormatting:"Pegar formato",noFormatSupported:"Formato no compatible",duplicate:"Duplicar",delete:"Eliminar"},CDe={unlockBorders:"Desbloquear bordes",lockBordersTogether:"Bloquear bordes juntos"},xDe={label:"Estilo",square:"Cuadrado",pill:"Píldora",custom:"Personalizado",borderRadius:"Radio del borde",lockTooltip:"Bloquear esquinas juntas",unlockTooltip:"Desbloquear esquinas"},kDe={backgroundColor:"Color de fondo",border:"Borde",padding:"Relleno",fontWeight:"Grosor de fuente",fontSize:"Tamaño de fuente",fontFamily:"Familia tipográfica",width:"Ancho",shape:"Forma",borderRadius:"Radio del borde",alignment:"Alineación",height:"Altura",lineHeight:"Altura de línea",color:"Color"},wDe={width:{full:"Completo",auto:"Automático"},common:{size:"Tamaño",width:"Ancho",height:"Altura",uploadFile:"Subir un archivo",dragAndDrop:"o arrastra y suelta",fileInfo:"PNG, JPG, GIF hasta 5MB",add:"Agregar",close:"Cerrar",invalidFiles:"Algunos archivos no son válidos (tipo incorrecto o demasiado grandes). Solo se subirán los archivos válidos.",svgWarning:"Las imágenes SVG pueden no mostrarse correctamente en clientes de correo como Outlook. Considera usar PNG o JPG para una mejor compatibilidad."},columnWidths:{label:"Ancho de columnas",tooltip:"Las imágenes en estas columnas no pueden exceder el ancho de la columna",left:"Izquierda",right:"Derecha",center:"Centro"},alignment:{label:"Alineación"},responsiveSize:{customPadding:"Relleno personalizado",lockTooltip:"Bloquear lados del relleno juntos",unlockTooltip:"Desbloquear lados del relleno",allSides:"Todos",options:{xSmall:"XS",small:"SM",medium:"MD",custom:"Personalizado"}},sizeSelector:{label:"Tamaño",contain:"Contener",cover:"Cubrir",scale:"Escalar"},screenSelector:{desktop:"Vista de escritorio",mobile:"Vista móvil"},links:{color:"Color del enlace",underline:"Subrayado del enlace",underlineOn:"Subrayado activado",underlineOff:"Subrayado desactivado"},backgroundImage:{label:"Imagen de fondo",fillType:"Tipo de relleno de fondo",repeat:"Repetición de fondo",position:"Posición de fondo",fillOptions:{cover:"Cubrir",contain:"Contener",auto:"Automático"},repeatOptions:{none:"Sin repetición",repeat:"Repetir",repeatX:"Repetir X",repeatY:"Repetir Y"},positions:{topLeft:"Arriba izquierda",topCenter:"Arriba centro",topRight:"Arriba derecha",centerLeft:"Centro izquierda",center:"Centro",centerRight:"Centro derecha",bottomLeft:"Abajo izquierda",bottomCenter:"Abajo centro",bottomRight:"Abajo derecha"}},image:{urlLabel:"URL de la imagen",urlPlaceholder:"Ingresa la URL de la imagen...",invalidUrl:"Formato de URL inválido",timeout:"Tiempo de espera agotado - La URL tardó demasiado en responder",notImage:"La URL no apunta a una imagen"},social:{icon:"Ícono",url:"URL",theme:"Tema",size:"Tamaño"},layout:{label:"Diseño"},panels:{avatar:{title:"Bloque de avatar",sizeLabel:"Tamaño",altLabel:"Texto alternativo"},button:{title:"Bloque de botón",textLabel:"Texto",targetLabel:"Destino",targetPlaceholder:"https://tu-sitio.com",textColor:"Color del texto",buttonColor:"Color del botón"},columns:{title:"Bloque de columnas",countLabel:"Número de columnas"},container:{title:"Bloque contenedor"},divider:{title:"Bloque divisor"},emailLayout:{title:"Estilos globales",backgroundColor:"Color de fondo",canvasColor:"Color del lienzo",fontFamily:"Familia tipográfica",textColor:"Color del texto",linksLabel:"Enlaces"},heading:{title:"Bloque de encabezado",contentLabel:"Contenido",levelLabel:"Nivel"},html:{title:"Bloque HTML",contentLabel:"Contenido"},image:{title:"Bloque de imagen",altLabel:"Texto alternativo",altPlaceholder:"Dos relojes blancos",urlLabel:"URL",urlPlaceholder:"https://tu-sitio-web.com"},social:{title:"Íconos de redes sociales",gap:"Espaciado"},spacer:{title:"Bloque espaciador"},text:{title:"Bloque de texto",contentLabel:"Contenido",markdownLabel:"Markdown"}}},ADe={header:SDe,actions:TDe,border:CDe,shape:xDe,properties:kDe,inputs:wDe},DDe="Italiano",RDe={confirm:"Conferma",cancel:"Annulla"},NDe={language:DDe,generic:RDe},IDe={undo:"Annulla (CTRL + Z)",redo:"Ripeti (CTRL + SHIFT + Z)",copy_html:"Copia HTML",copy_json:"Copia JSON",edit:"Modifica",preview:"Anteprima",htmlOutput:"HTML",jsonOutput:"JSON",desktop:"Desktop",mobile:"Mobile",content:"Contenuto",styles:"Stili"},ODe={copyFormat:"Copia formato",pasteFormatting:"Incolla formato",noFormatSupported:"Formato non supportato",duplicate:"Duplica",delete:"Elimina"},PDe={unlockBorders:"Sblocca bordi",lockBordersTogether:"Blocca bordi insieme"},LDe={label:"Stile",square:"Quadrato",pill:"Pillola",custom:"Personalizzato",borderRadius:"Raggio del bordo",lockTooltip:"Blocca angoli insieme",unlockTooltip:"Sblocca angoli"},MDe={backgroundColor:"Colore di sfondo",border:"Bordo",padding:"Riempimento",fontWeight:"Spessore del carattere",fontSize:"Dimensione del carattere",fontFamily:"Famiglia di caratteri",width:"Larghezza",shape:"Forma",borderRadius:"Raggio del bordo",alignment:"Allineamento",height:"Altezza",lineHeight:"Altezza della linea",color:"Colore"},FDe={width:{full:"Completo",auto:"Automatico"},common:{size:"Dimensione",width:"Larghezza",height:"Altezza",uploadFile:"Carica un file",dragAndDrop:"o trascina e rilascia",fileInfo:"PNG, JPG, GIF fino a 5MB",add:"Aggiungi",close:"Chiudi",invalidFiles:"Alcuni file non sono validi (tipo errato o troppo grandi). Solo i file validi verranno caricati.",svgWarning:"Le immagini SVG potrebbero non essere visualizzate correttamente nei client di posta Outlook. Considera l'uso di PNG o JPG per una migliore compatibilità."},columnWidths:{label:"Larghezza delle colonne",tooltip:"Le immagini in queste colonne non possono superare la larghezza della colonna",left:"Sinistra",right:"Destra",center:"Centro"},alignment:{label:"Allineamento"},responsiveSize:{customPadding:"Riempimento personalizzato",lockTooltip:"Blocca i lati del riempimento insieme",unlockTooltip:"Sblocca i lati del riempimento",allSides:"Tutti",options:{xSmall:"XS",small:"SM",medium:"MD",custom:"Personalizzato"}},sizeSelector:{label:"Dimensione",contain:"Contieni",cover:"Copri",scale:"Scala"},screenSelector:{desktop:"Vista desktop",mobile:"Vista mobile"},links:{color:"Colore del collegamento",underline:"Sottolineatura del collegamento",underlineOn:"Sottolineatura attiva",underlineOff:"Sottolineatura disattiva"},backgroundImage:{label:"Immagine di sfondo",fillType:"Tipo di riempimento dello sfondo",repeat:"Ripetizione dello sfondo",position:"Posizione dello sfondo",fillOptions:{cover:"Copri",contain:"Contieni",auto:"Automatico"},repeatOptions:{none:"Nessuna ripetizione",repeat:"Ripeti",repeatX:"Ripeti X",repeatY:"Ripeti Y"},positions:{topLeft:"In alto a sinistra",topCenter:"In alto al centro",topRight:"In alto a destra",centerLeft:"Centro sinistra",center:"Centro",centerRight:"Centro destra",bottomLeft:"In basso a sinistra",bottomCenter:"In basso al centro",bottomRight:"In basso a destra"}},image:{urlLabel:"URL dell'immagine",urlPlaceholder:"Inserisci l'URL dell'immagine...",invalidUrl:"Formato URL non valido",timeout:"Timeout della richiesta - L'URL ha impiegato troppo tempo per rispondere",notImage:"L'URL non punta a un'immagine"},social:{icon:"Icona",url:"URL",theme:"Tema",size:"Dimensione"},layout:{label:"Layout"},panels:{avatar:{title:"Blocco avatar",sizeLabel:"Dimensione",altLabel:"Testo alternativo"},button:{title:"Blocco pulsante",textLabel:"Testo",targetLabel:"Destinazione",targetPlaceholder:"https://tuo-sito.com",textColor:"Colore del testo",buttonColor:"Colore del pulsante"},columns:{title:"Blocco colonne",countLabel:"Numero di colonne"},container:{title:"Blocco contenitore"},divider:{title:"Blocco divisore"},emailLayout:{title:"Stili globali",backgroundColor:"Colore di sfondo",canvasColor:"Colore della tela",fontFamily:"Famiglia di caratteri",textColor:"Colore del testo",linksLabel:"Collegamenti"},heading:{title:"Blocco intestazione",contentLabel:"Contenuto",levelLabel:"Livello"},html:{title:"Blocco HTML",contentLabel:"Contenuto"},image:{title:"Blocco immagine",altLabel:"Testo alternativo",altPlaceholder:"Due orologi bianchi",urlLabel:"URL",urlPlaceholder:"https://tuo-sito-web.com"},social:{title:"Icone dei social media",gap:"Spaziatura"},spacer:{title:"Blocco spaziatore"},text:{title:"Blocco testo",contentLabel:"Contenuto",markdownLabel:"Markdown"}}},BDe={header:IDe,actions:ODe,border:PDe,shape:LDe,properties:MDe,inputs:FDe},UDe=["en-US","es-419","it-IT"],$De={"en-US":{common:dDe,inspector:bDe},"es-419":{common:EDe,inspector:ADe},"it-IT":{common:NDe,inspector:BDe}};Ri.isInitialized||Ri.use(gG).use(iq).init({resources:$De,fallbackLng:"en-US",supportedLngs:[...UDe],ns:["common","inspector"],defaultNS:"common",detection:{order:["localStorage","navigator","htmlTag"],caches:["localStorage"]},interpolation:{escapeValue:!1},returnNull:!1}).catch(t=>{process.env.NODE_ENV!=="production"&&console.error("[i18n] Failed to initialize",t)});const _G="#212443",_h="#4F46E5",To="#1F8466",yl="#E81212",Ca="#F6DC9F",bG="#6C0E7C",GDe="#CC996C",qDe='inherit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',Xt=(t,e)=>{if(!e)try{let n;return t.startsWith("#")?n=Be.hexToRgb(t):n=t,n}catch{return"rgb(0, 123, 255)"}try{return t===_G?Be.lighten(t,.3):t===bG?Be.lighten(t,.4):t===Ca?Be.darken(t,.2):Be.lighten(t,.1)}catch{return _h}},xt=Be.createTheme({palette:{background:{default:"#FFFFFF"},text:{primary:"#1F1F21",secondary:"#4F4F4F"}},typography:{fontFamily:qDe}}),zDe=(t=_h,e=_h,n=!1)=>{const r=y=>typeof y=="string"&&y.startsWith("#"),i=r(t)?t:_h,a=r(e)?e:_h,s=Xt(i,n),l=Xt(a,n),c=y=>{try{const v=Be.getContrastRatio(y,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111";return{main:y,light:Be.lighten(y,.2),dark:Be.darken(y,.2),contrastText:v}}catch{return xt.palette.primary}},u={default:n?"#121212":"#FFFFFF",paper:n?"#1e1e1e":"#FFFFFF"},f={primary:n?"#FFFFFF":"#1F1F21",secondary:n?"#CCCCCC":"#4F4F4F",disabled:n?"#FFFFFF":"#BDBDBD"},h={100:n?"#2c2c2c":"#F9FAFB",200:n?"#3c3c3c":"#F2F5F7",300:n?"#4c4c4c":"#DCE4EA",400:n?"#666666":"#A8BBCA",500:n?"#999999":"#6A8BA4"};return Be.createTheme(xt,{shape:{borderRadius:8},palette:{mode:n?"dark":"light",background:u,text:f,primary:c(s),secondary:c(l),mainColor:{main:s,light:Be.alpha(s,n?.7:.5),dark:Be.alpha(s,n?1:.9),contrastText:Be.getContrastRatio(s,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},secondaryColor:{main:l,light:Be.alpha(l,n?.7:.5),dark:Be.alpha(l,n?1:.9),contrastText:Be.getContrastRatio(l,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},brand:{navy:Xt(_G,n),blue:s,red:Xt(yl,n),green:Xt(To,n),yellow:Xt(Ca,n),purple:Xt(bG,n),brown:Xt(GDe,n)},success:{main:Xt(To,n),light:Be.lighten(Xt(To,n),.15),dark:Be.darken(Xt(To,n),.15),contrastText:Be.getContrastRatio(Xt(To,n),n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},error:{main:Xt(yl,n),light:Be.lighten(Xt(yl,n),.15),dark:Be.darken(Xt(yl,n),.15),contrastText:Be.getContrastRatio(Xt(yl,n),n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},warning:{main:Xt(Ca,n),light:Be.lighten(Xt(Ca,n),.15),dark:Be.darken(Xt(Ca,n),.15),contrastText:Be.getContrastRatio(Xt(Ca,n),n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},info:{main:s,light:Be.lighten(s,.15),dark:Be.darken(s,.15),contrastText:Be.getContrastRatio(s,n?"#000":"#fff")>4.5?n?"#000":"#fff":n?"#fff":"#111"},cadet:{100:h[100],200:h[200],300:h[300],400:h[400],500:h[500]},highlight:{100:Be.lighten(Xt(Ca,n),n?.6:.8),200:Be.lighten(Xt(Ca,n),n?.4:.6),300:Be.lighten(Xt(Ca,n),n?.2:.4),400:Be.lighten(Xt(Ca,n),n?.1:.2),500:Xt(Ca,n)},divider:n?"#3c3c3c":"#e2e2e2",grey:{50:n?"#1a1a1a":"#fafafa",100:h[100],200:h[200],300:h[300],400:h[400],500:h[500],600:n?"#cccccc":"#757575",700:n?"#e0e0e0":"#616161",800:n?"#f0f0f0":"#424242",900:n?"#ffffff":"#212121"}},components:{MuiAlert:{styleOverrides:{root:{fontSize:xt.typography.pxToRem(14),"&.MuiAlert-colorWarning":{borderColor:n?"#332f29":"#FFFBEB",backgroundColor:`${n?"#f1be50":"#FEF3C7"} !important`,color:n?"#2f2f2f":"#78350f",borderRadius:"8px","& .MuiAlert-icon":{color:"#78350f"}},"&.MuiAlert-colorError":{borderColor:n?"#4a1f1f":"#FEE2E2",backgroundColor:`${n?"#5b2323":"#FEE2E2"} !important`,color:n?"#ffffff":"#7F1D1D",borderRadius:"8px","& .MuiAlert-icon":{color:n?"#ffffff":"#7F1D1D"},"& .MuiAlert-message":{color:n?"#ffffff":"#7F1D1D"}}},action:{paddingTop:0,marginRight:0},filledSuccess:{backgroundColor:Xt(To,n)}}},MuiStepLabel:{styleOverrides:{label:{fontWeight:xt.typography.fontWeightMedium}}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogContent:{styleOverrides:{root:{paddingTop:xt.spacing(1),paddingBottom:xt.spacing(2)}}},MuiDialogTitle:{defaultProps:{variant:"h4"},styleOverrides:{root:{paddingTop:xt.spacing(3),paddingBottom:xt.spacing(1)}}},MuiDialogActions:{styleOverrides:{root:{borderTop:"1px solid",borderTopColor:n?"#3c3c3c":xt.palette.divider,marginTop:xt.spacing(1),padding:`${xt.spacing(1.5)} ${xt.spacing(3)}`}}},MuiSnackbar:{styleOverrides:{root:{position:"absolute",zIndex:9999}}},MuiSnackbarContent:{styleOverrides:{root:{borderRadius:"8px",boxShadow:n?"0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3)":"0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08)",fontWeight:xt.typography.fontWeightMedium,fontSize:xt.typography.pxToRem(14),minWidth:"288px",maxWidth:"568px",backgroundColor:u.default,color:f.primary,border:`1px solid ${Be.alpha(s,n?.3:.2)}`,"&.MuiSnackbarContent-success":{backgroundColor:n?Be.alpha(Xt(To,n),.15):Be.alpha(Xt(To,n),.1),color:n?f.primary:Xt(To,n),border:`1px solid ${Be.alpha(Xt(To,n),n?.3:.2)}`},"&.MuiSnackbarContent-error":{backgroundColor:n?Be.alpha(Xt(yl,n),.15):Be.alpha(Xt(yl,n),.1),color:n?f.primary:Xt(yl,n),border:`1px solid ${Be.alpha(Xt(yl,n),n?.3:.2)}`},"&.MuiSnackbarContent-warning":{backgroundColor:n?Be.alpha(Xt(Ca,n),.15):Be.alpha(Xt(Ca,n),.1),color:n?f.primary:Be.darken(Xt(Ca,n),.6),border:`1px solid ${Be.alpha(Xt(Ca,n),n?.3:.2)}`},"&.MuiSnackbarContent-info":{backgroundColor:n?Be.alpha(s,.15):Be.alpha(s,.1),color:n?f.primary:s,border:`1px solid ${Be.alpha(s,n?.3:.2)}`}},message:{padding:"6px 0",display:"flex",alignItems:"center",gap:xt.spacing(1)},action:{paddingLeft:xt.spacing(2),marginRight:xt.spacing(-1),"& .MuiButton-root":{color:"inherit",fontWeight:xt.typography.fontWeightMedium,textTransform:"none",minWidth:"auto",padding:`${xt.spacing(.5)} ${xt.spacing(1)}`,"&:hover":{backgroundColor:Be.alpha(f.primary,n?.08:.04)}},"& .MuiIconButton-root":{color:"inherit",padding:xt.spacing(.5),"&:hover":{backgroundColor:Be.alpha(f.primary,n?.08:.04)}}}}},MuiTableCell:{styleOverrides:{root:{...xt.typography.body2,borderColor:h[200],color:f.primary},head:{...xt.typography.overline,fontWeight:xt.typography.fontWeightMedium,letterSpacing:"0.075em",color:f.secondary}}},MuiTableRow:{styleOverrides:{root:{"&:last-child td":{borderBottom:0}}}},MuiAvatar:{styleOverrides:{root:{textTransform:"uppercase",fontSize:xt.typography.pxToRem(14)}}},MuiChip:{styleOverrides:{root:{"&.MuiChip-filledWarning":{backgroundColor:Xt(n?"#d18829":"#bead4a",n),color:"#ffffff","& .MuiChip-icon":{color:"#ffffff"}},"&.MuiChip-filledError":{color:"#ffffff","& .MuiChip-label":{color:"#ffffff"},"& .MuiChip-icon":{color:"#ffffff"}}},"&.MuiChip-colorError .MuiChip-label":{color:"#ffffff"},sizeSmall:{borderRadius:xt.spacing(.5),fontSize:12},iconSmall:{fontSize:14,marginLeft:xt.spacing(1)},colorSecondary:{borderColor:h[400],color:f.primary},label:{fontWeight:xt.typography.fontWeightMedium}}},MuiDrawer:{defaultProps:{PaperProps:{elevation:0}}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:xt.typography.pxToRem(12),backgroundColor:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9),color:"#ffffff",border:n?`1px solid ${Be.alpha(h[400],.2)}`:`1px solid ${Be.alpha("#000000",.1)}`,boxShadow:n?`0px 4px 12px ${Be.alpha("#000000",.6)}`:`0px 4px 12px ${Be.alpha("#000000",.25)}`,borderRadius:"6px"},arrow:{color:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9),"&::before":{border:n?`1px solid ${Be.alpha(h[400],.2)}`:`1px solid ${Be.alpha("#000000",.1)}`}}}},MuiPaper:{defaultProps:{elevation:0,square:!0},styleOverrides:{root:{backgroundColor:u.paper}}},MuiToggleButton:{styleOverrides:{root:{paddingLeft:xt.spacing(1.5),paddingRight:xt.spacing(1.5),color:f.primary,borderColor:h[300],backgroundColor:"transparent","&:hover":{backgroundColor:h[100],borderColor:h[400],"& .MuiSvgIcon-root":{color:s}},"&.Mui-selected":{color:s,backgroundColor:Be.alpha(s,.1),borderColor:s,"&:hover":{backgroundColor:n?Be.darken(s,.9):Be.lighten(s,.8),borderColor:s,"& .MuiSvgIcon-root":{color:s}}},"&.Mui-disabled":{color:f.disabled,borderColor:h[200]}}}},MuiButtonBase:{defaultProps:{},styleOverrides:{root:{"&:focus":{outline:"none",boxShadow:"none"},"&:focus-visible":{outline:"none",boxShadow:"none"},"&.MuiButton-outlinedIndigo":{border:`2px solid ${s}`,borderRadius:"8px",fontWeight:"bold",padding:"5px 0",color:s,backgroundColor:"transparent","&:hover":{borderWidth:"2px",backgroundColor:Be.alpha(s,.05),borderColor:Xt(s,n)},"&:active":{backgroundColor:Be.alpha(s,.1)},"&.Mui-disabled":{border:`2px solid ${h[300]}`,color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&:focus":{outline:"none",boxShadow:"none"}},"&.MuiButton-contained":{borderRadius:"8px",fontWeight:"bold",border:"2px solid transparent",backgroundColor:s,color:f.primary==="#FFFFFF"?"#000000":"#FFFFFF","&:hover":{backgroundColor:Xt(s,n),boxShadow:`0 4px 12px ${Be.alpha(s,.3)}`},"&:active":{backgroundColor:n?Be.darken(s,.1):Be.darken(s,.2)},"&.Mui-disabled":{backgroundColor:h[200],color:f.disabled,border:"2px solid transparent",boxShadow:"none",cursor:"not-allowed"},"&:focus":{outline:"none",boxShadow:"none"}},"&.MuiButton-text.primary":{color:s,fontWeight:"bold","&:hover":{backgroundColor:Be.alpha(s,.08),color:Xt(s,n)},"&.Mui-disabled":{color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&:focus":{outline:"none",boxShadow:"none"}},"&.MuiButton-containedSecondary.Mui-disabled":{backgroundColor:h[200],color:f.disabled,border:"2px solid transparent",boxShadow:"none",cursor:"not-allowed"},"&.MuiButton-outlined.Mui-disabled":{border:`1px solid ${h[300]}`,color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&.MuiButton-text.Mui-disabled":{color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"},"&.Mui-disabled":{opacity:n?.5:.6,cursor:"not-allowed","&:hover":{backgroundColor:"inherit",boxShadow:"none",transform:"none",borderColor:"inherit"},"&:active":{backgroundColor:"inherit",transform:"none"},"&:focus":{outline:"none",boxShadow:"none"}}}}},MuiSlider:{styleOverrides:{root:{color:s,height:6,padding:"15px 0","& .MuiSlider-rail":{backgroundColor:h[300],opacity:1,height:2},"& .MuiSlider-track":{backgroundColor:s,height:2,border:"none"},"& .MuiSlider-thumb":{backgroundColor:s,border:`2px solid ${u.paper}`,width:16,height:16,boxShadow:`0 2px 6px ${Be.alpha("#000000",.2)}`,"&:hover":{boxShadow:`0 0 0 8px ${Be.alpha(s,.16)}`},"&:focus":{boxShadow:`0 0 0 8px ${Be.alpha(s,.16)}`},"&.Mui-active":{boxShadow:`0 0 0 14px ${Be.alpha(s,.16)}`},"&.Mui-disabled":{backgroundColor:f.disabled,border:`2px solid ${h[200]}`}},"& .MuiSlider-valueLabel":{backgroundColor:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9),color:"#ffffff",fontSize:xt.typography.pxToRem(12),borderRadius:"6px",padding:"6px 8px","&::before":{borderTopColor:n?Be.alpha(h[500],.95):Be.alpha("#2c2c2c",.9)}},"& .MuiSlider-mark":{backgroundColor:Be.alpha(s,n?.6:.4),height:6,width:1,"&.MuiSlider-markActive":{backgroundColor:Be.alpha(s,n?.9:.7)}},"& .MuiSlider-markLabel":{color:f.secondary,fontSize:xt.typography.pxToRem(12),"&.MuiSlider-markLabelActive":{color:s}}},colorSecondary:{color:l,"& .MuiSlider-track":{backgroundColor:l},"& .MuiSlider-thumb":{backgroundColor:l,"&:hover":{boxShadow:`0 0 0 8px ${Be.alpha(l,.16)}`},"&:focus":{boxShadow:`0 0 0 8px ${Be.alpha(l,.16)}`},"&.Mui-active":{boxShadow:`0 0 0 14px ${Be.alpha(l,.16)}`}}}}},MuiIconButton:{styleOverrides:{root:{borderRadius:"8px",padding:"8px",transition:xt.transitions.create(["background-color","box-shadow","color"],{duration:xt.transitions.duration.short}),"&:hover":{backgroundColor:Be.alpha(f.primary,.04)},"&:focus":{outline:"none",boxShadow:"none"},"&.Mui-disabled":{color:f.disabled,backgroundColor:"transparent",cursor:"not-allowed"}},sizeSmall:{padding:"6px",fontSize:xt.typography.pxToRem(18)},sizeMedium:{padding:"8px",fontSize:xt.typography.pxToRem(20)},sizeLarge:{padding:"12px",fontSize:xt.typography.pxToRem(24)},colorPrimary:{color:Xt(s,n),"&:hover":{backgroundColor:Be.alpha(s,.08),color:Xt(s,n)},"&:active":{backgroundColor:Be.alpha(s,.12)},"&.Mui-disabled":{color:f.disabled},"&:focus":{outline:"none",boxShadow:"none"}},colorSecondary:{color:Xt(l,n),"&:hover":{backgroundColor:Be.alpha(l,.08),color:Xt(l,n)},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(l,.12)},"&.Mui-disabled":{color:f.disabled}},colorError:{color:n?"#f87171":"#dc2626","&:hover":{backgroundColor:Be.alpha(n?"#f87171":"#dc2626",.08),color:n?"#fca5a5":"#b91c1c"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#f87171":"#dc2626",.12)},"&.Mui-disabled":{color:f.disabled}},colorWarning:{color:n?"#fbbf24":"#d97706","&:hover":{backgroundColor:Be.alpha(n?"#fbbf24":"#d97706",.08),color:n?"#fcd34d":"#b45309"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#fbbf24":"#d97706",.12)},"&.Mui-disabled":{color:f.disabled}},colorInfo:{color:n?"#60a5fa":"#2563eb","&:hover":{backgroundColor:Be.alpha(n?"#60a5fa":"#2563eb",.08),color:n?"#93c5fd":"#1d4ed8"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#60a5fa":"#2563eb",.12)},"&.Mui-disabled":{color:f.disabled}},colorSuccess:{color:n?"#4ade80":"#16a34a","&:hover":{backgroundColor:Be.alpha(n?"#4ade80":"#16a34a",.08),color:n?"#86efac":"#15803d"},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(n?"#4ade80":"#16a34a",.12)},"&.Mui-disabled":{color:f.disabled}},colorInherit:{color:f.primary,"&:hover":{backgroundColor:Be.alpha(f.primary,.04)},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{backgroundColor:Be.alpha(f.primary,.08)},"&.Mui-disabled":{color:f.disabled}},contained:{backgroundColor:u.paper,boxShadow:`0 1px 3px ${Be.alpha("#000000",.12)}`,"&:hover":{backgroundColor:h[100],boxShadow:`0 2px 6px ${Be.alpha("#000000",.15)}`},"&:focus":{outline:"none",boxShadow:"none"},"&:active":{boxShadow:`0 1px 2px ${Be.alpha("#000000",.2)}`},"&.Mui-disabled":{backgroundColor:h[100],boxShadow:"none",color:f.disabled}},edge:{"&.MuiIconButton-edgeStart":{marginLeft:"-12px"},"&.MuiIconButton-edgeEnd":{marginRight:"-12px"}}},variants:[{props:{variant:"soft"},style:{backgroundColor:Be.alpha(s,.08),color:Xt(s,n),"&:hover":{backgroundColor:Be.alpha(s,.12)},"&:focus":{backgroundColor:Be.alpha(s,.12),boxShadow:`0 0 0 2px ${Be.alpha(s,.3)}`},"&:active":{backgroundColor:Be.alpha(s,.16)}}},{props:{variant:"outlined"},style:{border:`1px solid ${Be.alpha(s,.3)}`,color:Xt(s,n),"&:hover":{backgroundColor:Be.alpha(s,.04),borderColor:Xt(s,n)},"&:focus":{backgroundColor:Be.alpha(s,.04),borderColor:Xt(s,n),boxShadow:`0 0 0 2px ${Be.alpha(s,.2)}`},"&:active":{backgroundColor:Be.alpha(s,.08)}}}]},MuiButtonGroup:{defaultProps:{disableElevation:!0}},MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{contained:{"&:hover":{backgroundColor:Be.alpha(s,.8)}},textPrimary:{color:f.primary},textSecondary:{color:f.secondary},outlinedPrimary:{borderColor:h[300],color:f.primary,"&:hover, &:active, &:focus":{borderColor:h[500],color:f.primary}},containedSecondary:{backgroundColor:u.paper,border:`1px solid ${h[300]}`,color:f.primary,"&:hover, &:active, &:focus":{backgroundColor:u.paper,borderColor:h[500],color:f.primary}}}},MuiInputBase:{styleOverrides:{root:{"&:not(.Mui-disabled, .Mui-error):before":{borderBottom:`1px solid ${h[400]}`},"&:hover:not(.Mui-disabled, .Mui-error):before":{borderBottom:`1px solid ${h[500]} !important`},"&:after":{borderBottom:`1px solid ${f.primary} !important`},"&.MuiOutlinedInput-root:not(.Mui-error)":{"& fieldset":{borderColor:h[300],transition:"border-color 0.2s"}},"&.MuiOutlinedInput-root:not(.Mui-disabled, .Mui-error)":{"&:hover fieldset":{borderColor:h[400]},"&.Mui-focused fieldset":{borderColor:f.secondary,borderWidth:1}},".MuiSelect-icon":{fill:f.primary}},input:{fontSize:xt.typography.pxToRem(14),color:f.primary,"&.Mui-disabled":{WebkitTextFillColor:"inherit",color:f.secondary}},inputSizeSmall:{padding:"4px 12px !important"}}},MuiOutlinedInput:{styleOverrides:{root:{input:{padding:"8px 12px"}},notchedOutline:{"& legend":{fontSize:"0.85em",maxWidth:"100%"}}}},MuiInputAdornment:{styleOverrides:{root:{"& .MuiTypography-root":{fontSize:xt.typography.pxToRem(14),color:f.secondary}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{shrink:{transform:"scale(0.85)",fontWeight:xt.typography.fontWeightMedium,color:f.secondary,"&.Mui-focused":{color:f.primary},"&.MuiInputLabel-standard":{transform:"translate(0, -4px) scale(0.85)",color:f.secondary},"&.MuiInputLabel-outlined":{transform:"translate(15px, -8px) scale(0.85)"}}}},MuiSelect:{styleOverrides:{root:{"&.MuiSelect-nativeInput":{padding:0}}},defaultProps:{MenuProps:{PaperProps:{sx:{borderRadius:"4px",boxShadow:n?"0 4px 10px rgba(0, 0, 0, 0.6)":"0 4px 10px rgba(0, 0, 0, 0.3)",backgroundColor:u.paper}}}}},MuiTabs:{defaultProps:{variant:"scrollable"},styleOverrides:{indicator:{height:1,backgroundColor:s}}},MuiTab:{styleOverrides:{root:{textTransform:"none",minWidth:xt.spacing(2),paddingLeft:xt.spacing(1.5),paddingRight:xt.spacing(1.5),fontSize:xt.typography.pxToRem(14),fontFamily:xt.typography.fontFamily,lineHeight:1.5,fontWeight:xt.typography.fontWeightMedium,transition:"color 0.2s",stroke:f.secondary,color:f.secondary,"&.Mui-selected":{color:s,stroke:s},"&:hover":{color:s}}}},MuiCard:{styleOverrides:{root:{borderRadius:0,backgroundColor:u.paper}}},MuiCardHeader:{styleOverrides:{title:{fontSize:xt.typography.pxToRem(18),fontWeight:xt.typography.fontWeightMedium,color:f.primary}}},MuiStack:{defaultProps:{spacing:2},styleOverrides:{root:{"& > :not(style) ~ :not(style)":{marginTop:"0px !important"}}}}},typography:{fontFamily:xt.typography.fontFamily,h1:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(40),lineHeight:1.2,letterSpacing:"-0.02em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h2:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(32),lineHeight:1.2,letterSpacing:"-0.02em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h3:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(24),lineHeight:1.5,letterSpacing:"-0.01em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h4:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(20),lineHeight:1.5,letterSpacing:"-0.01em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h5:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(18),lineHeight:1.5,letterSpacing:"-0.01em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},h6:{fontFamily:xt.typography.fontFamily,fontSize:xt.typography.pxToRem(16),lineHeight:1.5,letterSpacing:"-0.005em",fontWeight:xt.typography.fontWeightMedium,color:f.primary},body1:{fontSize:xt.typography.pxToRem(14),color:f.primary},body2:{fontSize:xt.typography.pxToRem(12),color:f.primary},overline:{fontWeight:xt.typography.fontWeightMedium,letterSpacing:"0.05em"},button:{textTransform:"none",fontWeight:xt.typography.fontWeightMedium,lineHeight:1.5},caption:{letterSpacing:0,lineHeight:1.5}},shadows:n?["none","0px 4px 15px rgba(0, 0, 0, 0.12), 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 0px 1px rgba(0, 0, 0, 0.12)","0px 10px 20px rgba(0, 0, 0, 0.15), 0px 2px 6px rgba(0, 0, 0, 0.15), 0px 0px 1px rgba(0, 0, 0, 0.15)","0px 16px 24px rgba(0, 0, 0, 0.18), 0px 2px 6px rgba(0, 0, 0, 0.18), 0px 0px 1px rgba(0, 0, 0, 0.18)","0px 24px 32px rgba(0, 0, 0, 0.21), 0px 16px 24px rgba(0, 0, 0, 0.21), 0px 4px 8px rgba(0, 0, 0, 0.21)",...Array(20).fill("none")]:["none","0px 4px 15px rgba(33, 36, 67, 0.04), 0px 0px 2px rgba(33, 36, 67, 0.04), 0px 0px 1px rgba(33, 36, 67, 0.04)","0px 10px 20px rgba(33, 36, 67, 0.04), 0px 2px 6px rgba(33, 36, 67, 0.04), 0px 0px 1px rgba(33, 36, 67, 0.04)","0px 16px 24px rgba(33, 36, 67, 0.05), 0px 2px 6px rgba(33, 36, 67, 0.05), 0px 0px 1px rgba(33, 36, 67, 0.05)","0px 24px 32px rgba(33, 36, 67, 0.06), 0px 16px 24px rgba(33, 36, 67, 0.06), 0px 4px 8px rgba(33, 36, 67, 0.06)",...Array(20).fill("none")]})},UD=({primaryColor:t,secondaryColor:e,galleryImages:n,darkMode:r,height:i,stickyHeader:a,sticky:s,htmlTab:l,jsonTab:c,locale:u,dataLocale:f,imagePlaceholder:h})=>{const[g,y]=X.useState(t||"#058705"),[v,x]=X.useState(e||"#079707"),[w,A]=X.useState(n||!1),[C,P]=X.useState(zh),F=(()=>{var le;if(typeof window<"u"){const ve=window;return(le=ve==null?void 0:ve.emailBuilder)==null?void 0:le.emailBuilderFreeMode}})(),[G,U]=X.useState(F??!0),[H,z]=X.useState(r??!1),[Y,ie]=X.useState(a??!0),[ee,ue]=X.useState(s??!1),[de,Ce]=X.useState(i);X.useEffect(()=>{const le=u??f;le&&le!==Ri.language&&Ri.changeLanguage(le).catch(ve=>{process.env.NODE_ENV!=="production"&&console.error("[i18n] Unable to change language",ve)})},[u,f]),X.useEffect(()=>{t!==g&&y(t),e!==v&&x(e),n!==w&&A(n),r!==H&&z(r),a!==Y&&ie(a),s!==ee&&ue(s),i!==de&&Ce(i);const le=h||zh;le!==C&&P(le)},[g,v,w,G,H,Y,ee,de,C,t,e,n,r,a,s,i,h]);const Re=zDe(g,v,H);return E.jsx("div",{style:{position:"relative",width:"100%",height:"100%"},children:E.jsx(sp.DndProvider,{backend:CG.HTML5Backend,children:E.jsx(te.ThemeProvider,{theme:Re,children:E.jsxs(dq,{i18n:Ri,children:[E.jsx(te.GlobalStyles,{styles:le=>({".ce-inline-toolbar, .codex-editor--narrow .ce-toolbox, .ce-conversion-toolbar, .ce-settings, .ce-settings__button, .ce-toolbar__settings-btn:hover, .cdx-button, .ce-popover, .ce-toolbar__plus:hover":{background:le.palette.primary.main,color:"#fff"},"::selection, .ce-block--selected .ce-block__content":{background:`${le.palette.secondary.main} !important`},".ce-popover-item:hover":{backgroundColor:`${le.palette.primary.main} !important`,color:"#fff"},".cdx-settings-button:hover, .ce-settings__button:hover, .ce-toolbox__button--active, .ce-toolbox__button:hover, .cdx-button:hover, .ce-inline-toolbar__dropdown:hover, .ce-inline-tool:hover, .ce-popover__item:hover, .ce-toolbar__settings-btn:hover":{backgroundColor:le.palette.primary.main,color:"#fff !important"},".tag__title":{color:`${le.palette.primary.main} !important`},".editor-js-loader":{borderBottomColor:le.palette.primary.main},".ql-tooltip .ql-action":{background:le.palette.secondary.main,color:"#fff !important"},".email-builder-body::-webkit-scrollbar-thumb":{background:le.palette.primary.main},".buttonsUndoRedo":{color:le.palette.primary.main},".buttonsUndoRedo:hover":{color:le.palette.secondary.main},".ql-snow .ql-toolbar button.ql-active":{color:le.palette.primary.main},".lucide-loader-circle":{color:le.palette.primary.main},".eb-editor-esc-tip":{backgroundColor:le.palette.secondary.main}})}),E.jsx(te.CssBaseline,{}),E.jsx(YAe,{sticky:ee,heightContent:de,freeMode:G,darkMode:H,galleryImages:w,stickyHeader:Y,htmlTab:l,jsonTab:c,imagePlaceholder:C})]})})})})};let Ob=null;function jDe(){return Ob||(Ob=Cq(UD,{props:{primaryColor:"string",secondaryColor:"string",galleryImages:"boolean",darkMode:"boolean",height:"string",stickyHeader:"boolean",sticky:"boolean",htmlTab:"boolean",jsonTab:"boolean",locale:"string",dataLocale:"string",imagePlaceholder:"string"}}),Ob)}function yG(t="email-builder"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,jDe())}if(typeof window<"u")try{yG("email-builder")}catch{}exports.CustomEditorInputStandalone=n6;exports.EmailBuilder=UD;exports.default=UD;exports.registerCustomEditorInput=r6;exports.registerEmailBuilder=yG;
|
|
562
562
|
//# sourceMappingURL=email-builder.cjs.js.map
|