(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.easy-mail-input-number-select{width:100%}.easy-mail-input-number-select .ant-select-selector{padding:0!important}.easy-mail-input-number-select .ant-select-selection-item{padding:0!important;text-align:center!important}.easy-mail-input-number-select-option{text-align:center!important;padding:0!important;line-height:32px!important}.easy-mail-input-number-input{text-align:left}.easy-mail-input-number-input .ant-input-number-input{width:calc(100% - 34px)!important}.easy-mail-input-number-input .ant-input-number-handler-wrap{width:22px!important;opacity:1!important}.easy-marl-src-container label{width:100%}.easy-marl-src-container label:after{content:""!important;margin:0!important}html,body{margin:0;overflow:hidden}*{box-sizing:border-box}.easy-mail-container.dark{scrollbar-color:rgba(255,255,255,.25) rgba(253,253,253,.12)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); (function(f,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("react"),require("antd"),require("mjml-browser"),require("@ant-design/icons")):typeof define=="function"&&define.amd?define(["react","antd","mjml-browser","@ant-design/icons"],d):(f=typeof globalThis<"u"?globalThis:f||self,f.Easymail=d(f.React,f.antd,f.mjmlBrowser,f["@ant-design/icons"]))})(this,function(f,d,jt,O){"use strict";var We={exports:{}},_e={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vt;function jr(){if(vt)return _e;vt=1;var t=f,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(m,u,y){var x,b={},c=null,p=null;y!==void 0&&(c=""+y),u.key!==void 0&&(c=""+u.key),u.ref!==void 0&&(p=u.ref);for(x in u)i.call(u,x)&&!a.hasOwnProperty(x)&&(b[x]=u[x]);if(m&&m.defaultProps)for(x in u=m.defaultProps,u)b[x]===void 0&&(b[x]=u[x]);return{$$typeof:r,type:m,key:c,ref:p,props:b,_owner:o.current}}return _e.Fragment=n,_e.jsx=l,_e.jsxs=l,_e}var Me={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ct;function vr(){return Ct||(Ct=1,process.env.NODE_ENV!=="production"&&function(){var t=f,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),m=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function C(s){if(s===null||typeof s!="object")return null;var h=g&&s[g]||s[v];return typeof h=="function"?h:null}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I(s){{for(var h=arguments.length,j=new Array(h>1?h-1:0),w=1;w=1&&G>=0&&k[P]!==Z[G];)G--;for(;P>=1&&G>=0;P--,G--)if(k[P]!==Z[G]){if(P!==1||G!==1)do if(P--,G--,G<0||k[P]!==Z[G]){var K=` `+k[P].replace(" at new "," at ");return s.displayName&&K.includes("")&&(K=K.replace("",s.displayName)),typeof s=="function"&&Ve.set(s,K),K}while(P>=1&&G>=0);break}}}finally{mt=!1,ut.current=F,gn(),Error.prepareStackTrace=E}var we=s?s.displayName||s.name:"",de=we?Ge(we):"";return typeof s=="function"&&Ve.set(s,de),de}function bn(s,h,j){return sr(s,!1)}function yn(s){var h=s.prototype;return!!(h&&h.isReactComponent)}function Je(s,h,j){if(s==null)return"";if(typeof s=="function")return sr(s,yn(s));if(typeof s=="string")return Ge(s);switch(s){case y:return Ge("Suspense");case x:return Ge("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case u:return bn(s.render);case b:return Je(s.type,h,j);case c:{var w=s,E=w._payload,F=w._init;try{return Je(F(E),h,j)}catch{}}}return""}var De=Object.prototype.hasOwnProperty,lr={},ar=M.ReactDebugCurrentFrame;function Ze(s){if(s){var h=s._owner,j=Je(s.type,s._source,h?h.type:null);ar.setExtraStackFrame(j)}else ar.setExtraStackFrame(null)}function fn(s,h,j,w,E){{var F=Function.call.bind(De);for(var L in s)if(F(s,L)){var k=void 0;try{if(typeof s[L]!="function"){var Z=Error((w||"React class")+": "+j+" type `"+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[L]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Z.name="Invariant Violation",Z}k=s[L](h,L,w,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(P){k=P}k&&!(k instanceof Error)&&(Ze(E),I("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",j,L,typeof k),Ze(null)),k instanceof Error&&!(k.message in lr)&&(lr[k.message]=!0,Ze(E),I("Failed %s type: %s",j,k.message),Ze(null))}}}var xn=Array.isArray;function gt(s){return xn(s)}function jn(s){{var h=typeof Symbol=="function"&&Symbol.toStringTag,j=h&&s[Symbol.toStringTag]||s.constructor.name||"Object";return j}}function vn(s){try{return cr(s),!1}catch{return!0}}function cr(s){return""+s}function dr(s){if(vn(s))return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",jn(s)),cr(s)}var Ne=M.ReactCurrentOwner,Cn={key:!0,ref:!0,__self:!0,__source:!0},ur,pr,ht;ht={};function wn(s){if(De.call(s,"ref")){var h=Object.getOwnPropertyDescriptor(s,"ref").get;if(h&&h.isReactWarning)return!1}return s.ref!==void 0}function _n(s){if(De.call(s,"key")){var h=Object.getOwnPropertyDescriptor(s,"key").get;if(h&&h.isReactWarning)return!1}return s.key!==void 0}function Mn(s,h){if(typeof s.ref=="string"&&Ne.current&&h&&Ne.current.stateNode!==h){var j=Y(Ne.current.type);ht[j]||(I('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y(Ne.current.type),s.ref),ht[j]=!0)}}function kn(s,h){{var j=function(){ur||(ur=!0,I("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};j.isReactWarning=!0,Object.defineProperty(s,"key",{get:j,configurable:!0})}}function Sn(s,h){{var j=function(){pr||(pr=!0,I("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};j.isReactWarning=!0,Object.defineProperty(s,"ref",{get:j,configurable:!0})}}var Ln=function(s,h,j,w,E,F,L){var k={$$typeof:r,type:s,key:h,ref:j,props:L,_owner:F};return k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(k,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(k,"_source",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k};function Tn(s,h,j,w,E){{var F,L={},k=null,Z=null;j!==void 0&&(dr(j),k=""+j),_n(h)&&(dr(h.key),k=""+h.key),wn(h)&&(Z=h.ref,Mn(h,E));for(F in h)De.call(h,F)&&!Cn.hasOwnProperty(F)&&(L[F]=h[F]);if(s&&s.defaultProps){var P=s.defaultProps;for(F in P)L[F]===void 0&&(L[F]=P[F])}if(k||Z){var G=typeof s=="function"?s.displayName||s.name||"Unknown":s;k&&kn(L,G),Z&&Sn(L,G)}return Ln(s,k,Z,E,w,Ne.current,L)}}var bt=M.ReactCurrentOwner,mr=M.ReactDebugCurrentFrame;function Ce(s){if(s){var h=s._owner,j=Je(s.type,s._source,h?h.type:null);mr.setExtraStackFrame(j)}else mr.setExtraStackFrame(null)}var yt;yt=!1;function ft(s){return typeof s=="object"&&s!==null&&s.$$typeof===r}function gr(){{if(bt.current){var s=Y(bt.current.type);if(s)return` Check the render method of \``+s+"`."}return""}}function In(s){return""}var hr={};function An(s){{var h=gr();if(!h){var j=typeof s=="string"?s:s.displayName||s.name;j&&(h=` Check the top-level render call using <`+j+">.")}return h}}function br(s,h){{if(!s._store||s._store.validated||s.key!=null)return;s._store.validated=!0;var j=An(h);if(hr[j])return;hr[j]=!0;var w="";s&&s._owner&&s._owner!==bt.current&&(w=" It was passed a child from "+Y(s._owner.type)+"."),Ce(s),I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,w),Ce(null)}}function yr(s,h){{if(typeof s!="object")return;if(gt(s))for(var j=0;j",k=" Did you accidentally export a JSX literal instead of a component?"):P=typeof s,I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",P,k)}var G=Tn(s,h,j,E,F);if(G==null)return G;if(L){var K=h.children;if(K!==void 0)if(w)if(gt(K)){for(var we=0;we0?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}";if(!fr[de+xt]){var Rn=W.length>0?"{"+W.join(": ..., ")+": ...}":"{}";I(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,xt,de,Rn,de),fr[de+xt]=!0}}return s===i?Dn(G):En(G),G}}function Nn(s,h,j){return xr(s,h,j,!0)}function Fn(s,h,j){return xr(s,h,j,!1)}var On=Fn,zn=Nn;Me.Fragment=i,Me.jsx=On,Me.jsxs=zn}()),Me}process.env.NODE_ENV==="production"?We.exports=jr():We.exports=vr();var e=We.exports;const ue=f.createContext({appData:null,setAppData:()=>{},tab:"add",setTab:()=>{},hoverNode:null,setHoverNode:()=>{},focusNode:null,setFocusNode:()=>{},dataTransfer:null,setDataTransfer:()=>{}}),wt=f.createContext(null),Qe={skin:"light",colorPrimary:"#1677ff",lang:void 0,value:'',width:"100%",height:"100%",ref:void 0,tinymceLink:void 0,onUpload:void 0,onUploadFocusChange:()=>{}},_t=f.createContext(Qe),pe="mj-column-empty",Mt="drop-block",$e="focus",Cr="focus-child",ke="hover",kt="focus-tool",St="focus-tool-drag",Lt="focus-tool-copy",Tt="focus-tool-delete",It="editor-tool-box",wr="editor-body";var Xe=(t=>(t.MJ_COLUMN_1="mj-column-1",t.MJ_COLUMN_2="mj-column-2",t.MJ_COLUMN_3="mj-column-3",t.MJ_COLUMN_4="mj-column-4",t.MJ_COLUMN_LEFT="mj-column-left",t.MJ_COLUMN_RIGHT="mj-column-right",t))(Xe||{}),S=(t=>(t.MJML="mjml",t.MJ_BODY="mj-body",t.MJ_SECTION="mj-section",t.MJ_COLUMN="mj-column",t.MJ_TEXT="mj-text",t.MJ_IMAGE="mj-image",t.MJ_BUTTON="mj-button",t.MJ_DIVEDER="mj-divider",t.MJ_SPACER="mj-spacer",t.MJ_SOCIAL="mj-social",t.MJ_SOCIAL_ELEMENT="mj-social-element",t))(S||{});const Se={"mj-button":{tagName:"mj-button",attributes:{"css-class":"mj-button",href:"",target:"_blank","border-radius":"3px","font-size":"13px","line-height":"120%",align:"center",padding:"10px 25px"},content:""},"mj-divider":{tagName:"mj-divider",attributes:{width:"100%","css-class":"mj-divider","border-width":"4px","border-style":"solid","border-color":"#000000",padding:"10px 25px",align:"center"}},"mj-image":{tagName:"mj-image",attributes:{"css-class":"mj-image",src:"data:image/svg+xml;charset=utf-8;base64,PHN2ZyBzdHlsZT0id2lkdGg6IDFlbTtoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIwNzgwIj48cGF0aCBkPSJNMjA3Ljc2IDI5NS4zMTJBMzIgMzIgMCAwIDEgMjM1LjUyIDI2MC44bDEzNy45Mi0xNy43OTItOTIuOTc2IDk0LjMyIDE0OC4yNzIgMTYyLjE3NnYxMTEuMmwtMjQuNzA0IDEyMy41ODQgOTIuNDQ4LTI4NC4yMDgtMTA4LjI3Mi0xMjYuNTkyTDQ5Ni40OCAyNDBoMy45NTJsMjg0LjE2IDIyLjE5MmEzMiAzMiAwIDAgMSAyOS4zOTIgMzQuNjg4bC0zNy42MzIgNDMwLjkxMmEzMiAzMiAwIDAgMS0zMy45NjggMjkuMTUybC0zNDIuMDE2LTIyLjQzMmEzMS45NjggMzEuOTY4IDAgMCAwLTcuMzYgMC4zNjhsLTExMC41MTIgMTguNDE2YTMyIDMyIDAgMCAxLTM3LjEyLTI4Ljc2OGwtMzcuNjMyLTQyOS4yMTZ6IG00ODIuNDMyIDE0OC45MTJhNDcuMDQgNDcuMDQgMCAxIDAgMC05NC4wOCA0Ny4wNCA0Ny4wNCAwIDAgMCAwIDk0LjA4ek00OTQuMDggNjQ2LjcyYTEzLjg0IDEzLjg0IDAgMCAwIDEyLjc1MiAxNC44NjRsMjI0Ljk3NiAxNy4xMmExMy44NCAxMy44NCAwIDAgMCAyLjExMi0yNy42bC0yMjQuOTkyLTE3LjEyYTEzLjg0IDEzLjg0IDAgMCAwLTE0Ljg0OCAxMi43MzZ6IG0tMTQyLjQ2NCAxLjgyNGExMy44NCAxMy44NCAwIDAgMC04Ljc1Mi0yNi4yNTZsLTc0LjE0NCAyNC43MDRhMTMuODQgMTMuODQgMCAwIDAgOC43NTIgMjYuMjcybDc0LjE0NC0yNC43MnoiIGZpbGw9IiMwMDAwMDAiIGZpbGwtb3BhY2l0eT0iLjEiIHAtaWQ9IjIwNzgxIj48L3BhdGg+PC9zdmc+",href:"",target:"_blank",alt:"",width:"","border-radius":"0px",align:"center",padding:"10px 25px"}},"mj-social":{tagName:"mj-social",attributes:{"css-class":"mj-social","icon-size":"20px","icon-padding":"0px","border-radius":"3px","inner-padding":"4px","font-size":"13px",mode:"horizontal",align:"center",padding:"10px 25px"},children:[{tagName:"mj-social-element",attributes:{name:"facebook","css-class":"mj-social-element",href:"https://www.facebook.com"},content:""},{tagName:"mj-social-element",attributes:{name:"twitter","css-class":"mj-social-element",href:"https://www.twitter.com"},content:""},{tagName:"mj-social-element",attributes:{name:"google","css-class":"mj-social-element",href:"https://www.google.com"},content:""}]},"mj-spacer":{tagName:"mj-spacer",attributes:{"css-class":"mj-spacer",height:"50px"}},"mj-text":{tagName:"mj-text",attributes:{"css-class":"mj-text","font-size":"13px","line-height":1,align:"left",padding:"10px 25px"},content:""},"mj-section":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"}},"mj-column-1":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-2":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-3":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-4":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-left":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"60%"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"40%"},children:[]}]},"mj-column-right":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"40%"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"60%"},children:[]}]}},At=["mj-button","mj-divider","mj-image","mj-social","mj-spacer","mj-text"],_r=["mjml","mj-body","mj-column","mj-section",...At],ae=()=>{const{appData:t,setAppData:r}=f.useContext(ue);return{appData:t,setAppData:r}},Fe=()=>({...f.useContext(_t)}),me=t=>JSON.parse(JSON.stringify(t)),Et=t=>{let n=new DOMParser().parseFromString(jt(t).html,"text/html");return Or(n.documentElement)},Mr=(t,r,n)=>{const i=t[r];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((o,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+r+(r.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},Dt=f.createContext(void 0),kr=({children:t})=>{const[r,n]=f.useState("en"),[i,o]=f.useState({});f.useEffect(()=>{(async()=>{try{const u=await Mr(Object.assign({"./locales/ar.json":()=>Promise.resolve().then(()=>dn),"./locales/de.json":()=>Promise.resolve().then(()=>un),"./locales/en.json":()=>Promise.resolve().then(()=>pn),"./locales/fa.json":()=>Promise.resolve().then(()=>mn)}),`./locales/${r}.json`,3);o(u.default)}catch(u){console.error(`Failed to load translations for language: ${r}`,u)}})()},[r]);const a=m=>{n(m),window.language=m},l=m=>i[m]||m;return window.language=r,e.jsx(Dt.Provider,{value:{t:l,changeLanguage:a,language:r},children:t})},R=()=>{const t=f.useContext(Dt);if(!t)throw new Error("useTranslation must be used within a TranslationProvider");return t},Ke=()=>window.language,Sr=(t,r)=>{const n=` @media only screen and (min-width:480px) { .mj-column-per-100 { width:100% !important; max-width: 100%; } .mj-column-per-50 { width:50% !important; max-width: 50%; } .mj-column-per-60 { width:60% !important; max-width: 60%; } .mj-column-per-40 { width:40% !important; max-width: 40%; } .mj-column-per-33-333333333333336 { width:33.333333333333336% !important; max-width: 33.333333333333336%; } .mj-column-per-25 { width:25% !important; max-width: 25%; } } `,i=` .moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; } .moz-text-html .mj-column-per-50 { width:50% !important; max-width: 50%; } .moz-text-html .mj-column-per-60 { width:60% !important; max-width: 60%; } .moz-text-html .mj-column-per-40 { width:40% !important; max-width: 40%; } .moz-text-html .mj-column-per-33-333333333333336 { width:33.333333333333336% !important; max-width: 33.333333333333336%; } .moz-text-html .mj-column-per-25 { width:25% !important; max-width: 25%; } `;if(r.length>1)r[1].innerHTML=n,r[2].innerHTML=i;else{const o=document.createElement("style"),a=document.createElement("style");o.innerHTML=n,a.innerHTML=i,t==null||t.appendChild(o),t==null||t.appendChild(a)}},Lr=(t,r)=>{const n=document.createElement("script");n.setAttribute("src",r??"https://cdnjs.cloudflare.com/ajax/libs/tinymce/7.2.1/tinymce.min.js"),t.appendChild(n),n.onload=()=>{ge().tinymce.addI18n("zh_CN",Xr()),ge().tinymce.addI18n("en_US","")}},qe="easy-mail-iframe",Tr=({refMain:t})=>{const{skin:r,tinymceLink:n}=Fe(),{token:i}=d.theme.useToken(),{appData:o}=ae(),{setRef:a}=so(),l=Ke(),{t:m}=R(),u=f.useMemo(()=>{const b=Et(o);return b==null?void 0:b.outerHTML},[]),y=f.useCallback((b,c)=>{if(!b||!m)return;let p=b.querySelector("#easy-mail-style");const g=Kr({token:i,lang:c??"en"});p?p.innerHTML=g:(p=document.createElement("style"),p.setAttribute("id","easy-mail-style"),p.innerHTML=g??"Empty Canvas - Drop content here",b==null||b.appendChild(p))},[l,r]),x=b=>{const c=b.target;if(c&&c instanceof HTMLIFrameElement&&c.contentWindow){const p=c.contentWindow.document.documentElement;a(p);const g=p.querySelector("head"),v=p.querySelector("body"),C=p.querySelectorAll("style");v==null||v.classList.add(wr),Sr(g,C),Lr(g,n),y(g)}};return f.useEffect(()=>{y(ge().document.querySelector("head"),l)},[l,r]),e.jsx("div",{ref:t,style:{width:"calc(100% - 406px)",backgroundColor:i.colorBgContainer},children:e.jsx("iframe",{srcDoc:u,onLoad:x,style:{width:"100%",height:"100%",border:"none",outline:"none",display:"block",margin:"auto"},id:qe})})},ge=()=>document.getElementById(qe).contentWindow,se=({node:t,transferAction:r})=>{let n="1";if(!t)return n;if(he(t.parentElement)){let i=0,o=t;for(;o.previousElementSibling;)o=o.previousElementSibling,!(be(o)||r==="move"&&tt(o))&&i++;n=`${n}-${i}`}else{let i=0,o=be(t)?t:t.parentElement;for(;o!=null&&o.previousElementSibling;)o=o.previousElementSibling,!(be(o)||r==="move"&&tt(o.children[0]))&&i++;const a=i;for(;!Ir(o);)o=o==null?void 0:o.parentElement;for(i=0;o!=null&&o.previousElementSibling;)o=o.previousElementSibling,!be(o)&&i++;const l=i;for(;!Q(o);)o=o==null?void 0:o.parentElement;for(i=0;o!=null&&o.previousElementSibling;)o=o.previousElementSibling,!be(o)&&i++;n=`${n}-${i}-${l}-${a}`}return n},Nt=({appData:t,idx:r})=>r.split("-").reduce((o,a)=>{var l;return(l=o==null?void 0:o.children)==null?void 0:l[Number(a)]},t),re=(t,r)=>{let n=t;if(he(t))return null;let i=r?Array.isArray(r)?r:[r]:_r.filter(o=>o!==S.MJ_COLUMN);for(;n&&i.every(o=>{var a;return!((a=n.classList)!=null&&a.contains(o))})&&!he(n);)n=n.parentNode;return n},Ft=({doc:t,idx:r})=>{var a,l,m;if(!r)return null;const n=r.split("-");n.splice(0,1,"0");let i=0,o=t.querySelector("body");for(;n.length>0;){const u=Number(n.shift());i===0||i===1?o=(a=o==null?void 0:o.children)==null?void 0:a[u]:i===2?o=(l=o==null?void 0:o.querySelectorAll(`.${S.MJ_COLUMN}`))==null?void 0:l[u]:i===3&&(o=(m=o==null?void 0:o.querySelectorAll(".mj-column > table > tbody > tr"))==null?void 0:m[u]),i++}return o??null},et=(t,r)=>{var i,o;const n=t.nextElementSibling;n?(i=t.parentElement)==null||i.insertBefore(r,n):(o=t.parentElement)==null||o.appendChild(r)},he=t=>(t==null?void 0:t.tagName)==="HTML"||(t==null?void 0:t.classList.contains(S.MJ_BODY))||(t==null?void 0:t.tagName)==="BODY",Q=t=>t==null?void 0:t.classList.contains(S.MJ_SECTION),Ir=t=>t==null?void 0:t.classList.contains(S.MJ_COLUMN),Oe=t=>t==null?void 0:t.classList.contains(S.MJ_BUTTON),ze=t=>t==null?void 0:t.classList.contains(S.MJ_TEXT),be=t=>t==null?void 0:t.classList.contains(Mt),tt=t=>t==null?void 0:t.classList.contains($e),Ar=t=>t==null?void 0:t.classList.contains(ke),Er=t=>t==null?void 0:t.classList.contains(Lt),Dr=t=>t==null?void 0:t.classList.contains(Tt),Nr=t=>t==null?void 0:t.classList.contains(pe),ye=t=>t==null||t==="",Ot=t=>{if(!t)return{};const r={};return t.split(";").filter(i=>!!i).forEach(i=>{const o=i.split(":"),a=o[0],l=o.slice(1).join(":");r[a]=l}),r},Fr=t=>Object.entries(t).map(([n,i])=>`${n}:${i}`).join(";"),rt=t=>{const r=At.map(n=>`.${n}`).join(",");return t.querySelectorAll(r).length>0},Or=t=>{const r=t.cloneNode(!0),n=r.querySelector(`div.${S.MJ_BODY}`);return n&&n.childElementCount===0?n.innerHTML="":r.querySelectorAll(`div.${S.MJ_COLUMN}`).forEach(o=>{rt(o)||o.classList.add(pe)}),r},ot=t=>{if(!t)return;const r=Q(t),n=t.querySelectorAll(`.${S.MJ_TEXT}`),i=t.querySelectorAll(`.${S.MJ_BUTTON}`);if(r&&[...n,...i].length===0&&t.tagName!=="TR")return;let o=[t];r&&(o=[...n,...i]),t.tagName==="TR"&&(o=[t.children[0]]),o.forEach(a=>{var m;let l=null;ze(a)&&(l=a.children[0]),Oe(a)&&(l=(a==null?void 0:a.querySelector("p"))||(a==null?void 0:a.querySelector("a"))),((m=l==null?void 0:l.textContent)==null?void 0:m.trim())===""&&l.replaceChildren()})},zr=(t,r)=>{var l,m;let n=t,i=r;const o=he(n);!Q(n)&&!o&&(i=i.children[0]),o&&((m=n.parentElement)==null||m.setAttribute("style",Fr({...Ot((l=n.parentElement)==null?void 0:l.getAttribute("style")),...Ot(i==null?void 0:i.getAttribute("style"))}))),n.getAttributeNames().filter(u=>!["id","class","contenteditable","spellcheck"].includes(u)).forEach(u=>{n.setAttribute(u,i==null?void 0:i.getAttribute(u))}),n.replaceChildren(...i.childNodes,o?"":n.lastElementChild)};function Rr(t,r){let n,i;return function(...o){const a=Date.now();if(!n||a-i>=r){i=a,n=!0;const l=t.apply(this,o);return setTimeout(()=>{n=!1},r),l}}}const X=(t,r,n)=>{let i=r.split("-").map(l=>Number(l));ye(n)||(i=i.slice(0,n));const o=me(t),a=i.reduce((l,m)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u[m]},o);return a.children=a.children?a.children:[],{result:o,tree:a}},zt=t=>{var i;if(!t)return{};const{tree:r}=X(t,"0-0");let n={};return(i=r.children)==null||i.forEach(o=>{const a={};Object.keys(o.attributes).forEach(l=>{a[`${o.tagName.split("-")[1]}_${l}`]=o.attributes[l]}),n={...n,...a}}),n},Br=(t,r)=>{var o;const{tree:n}=X(t,"0-0");return(o=n.children)==null?void 0:o.map(a=>{const l=a.tagName.split("-")[1],m={};return Object.keys(r).forEach(u=>{if(u.includes(l)){const y=u.split("_")[1];m[y]=r[u]}}),{...a,attributes:{...a.attributes,...m}}})},Pr=t=>{const r={};return Object.keys(t).forEach(n=>{const i=`mj-${n.split("_")[0]}`;r[i]={...r[i]??{},[n.split("_")[1]]:t[n]}}),r},Rt=({appData:t,idx:r,property:n,index:i})=>{var l,m,u,y;let{result:o,tree:a}=X(t,r);if(r==="1"){const{width:x,"background-color":b}=n,c=(u=(m=(l=o.children)==null?void 0:l[0])==null?void 0:m.children)==null?void 0:u[0];return c.children=Br(t,n),a.attributes={...a.attributes,width:x,"background-color":b},o}return ye(i)?(a.attributes={...a.attributes,...n},o):(a=(y=a.children)==null?void 0:y[i??0],a.attributes={...n},o)},Bt=({appData:t,idx:r,content:n,index:i})=>{var l;let{result:o,tree:a}=X(t,r);return ye(i)||(a=(l=a.children)==null?void 0:l[i??0]),a.content=n.replace(/"/g,"'"),o},Hr=({appData:t,idx:r,dataTransfer:n})=>{var m,u,y,x,b,c;const i=r.split("-").map(p=>Number(p));let{result:o,tree:a}=X(t,r,-1);const l=me(Se)[(m=n.data)==null?void 0:m.value];if(((u=n.data)==null?void 0:u.type)==="basic"&&i.length===2){const p=me(Se)[Xe.MJ_COLUMN_1];(x=(y=p.children)==null?void 0:y[0].children)==null||x.push(l),(b=a.children)==null||b.splice(i[i.length-1],0,p)}else(c=a.children)==null||c.splice(i[i.length-1],0,l);return o},Ur=({appData:t,idx:r})=>{var a;const n=r.split("-").map(l=>Number(l)),{result:i,tree:o}=X(t,r,-1);return(a=o.children)==null||a.splice(n[n.length-1],1),i},Yr=({appData:t,idx:r})=>{var a,l;const n=r.split("-").map(m=>Number(m)),{result:i,tree:o}=X(t,r,-1);return(l=o.children)==null||l.splice(n[n.length-1],0,(a=o.children)==null?void 0:a[n[n.length-1]]),i},Gr=({appData:t,idx:r,originIdx:n})=>{var y,x,b,c,p;const i=r.split("-").map(g=>Number(g)),o=n.split("-").map(g=>Number(g)),{result:a,tree:l}=X(t,n,-1),m=(y=l.children)==null?void 0:y.splice(o[o.length-1],1)[0],u=i.slice(0,-1).reduce((g,v)=>{var C;return(C=g.children)==null?void 0:C[v]},a);if(i.length===2&&(m==null?void 0:m.tagName)!==S.MJ_SECTION){const g=me(Se)[Xe.MJ_COLUMN_1];(b=(x=g.children)==null?void 0:x[0].children)==null||b.push(m),(c=u.children)==null||c.splice(i[i.length-1],0,g)}else(p=u.children)==null||p.splice(i[i.length-1],0,m);return a},Vr=({appData:t,idx:r,column:n})=>{var y,x;const i=r.split("-").map(b=>Number(b)),{result:o,tree:a}=X(t,r,-1),l=(y=a.children)==null?void 0:y[i[i.length-1]].children,m=["left","right"].includes(n)?2:Number(n);return(x=me(Se)[`${S.MJ_COLUMN}-${n}`].children)==null||x.forEach((b,c)=>{let p=l==null?void 0:l[c];const g=p==null?void 0:p.attributes;g&&g.width&&delete g.width,p?p.attributes={...p.attributes,...b.attributes}:l==null||l.push(b)}),m<((l==null?void 0:l.length)??0)&&(l==null||l.splice(m)),o},Jr=({appData:t,idx:r,value:n})=>{var a;const{result:i,tree:o}=X(t,r);return(a=o.children)==null||a.splice(o.children.length,0,n),i},Zr=({appData:t,idx:r,index:n})=>{var a;const{result:i,tree:o}=X(t,r);return(a=o.children)==null||a.splice(n,1),i},Pt=({appData:t,idx:r,originIndex:n,targetIndex:i})=>{var m,u;const{result:o,tree:a}=X(t,r),l=(m=a.children)==null?void 0:m.splice(n,1)[0];return(u=a.children)==null||u.splice(i,0,l),o},Wr=t=>new Promise((r,n)=>{const i=new FileReader;i.onload=o=>{var a;r((a=o.target)==null?void 0:a.result)},i.onerror=o=>n(o),i.readAsDataURL(t)});function Qr(t){var r=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return r.test(t)}function $r(t){var r=/^data:image\/(png|jpeg|jpg|gif|bmp|webp);base64,/;return r.test(t)}const Xr=()=>({"#":"#",Accessibility:"辅助功能",Accordion:"","Accordion body...":"","Accordion summary...":"",Action:"动作",Activity:"活动",Address:"地址",Advanced:"高级",Align:"对齐","Align center":"居中对齐","Align left":"左对齐","Align right":"右对齐",Alignment:"对齐","Alignment {0}":"",All:"全部","Alternative description":"替代描述","Alternative source":"镜像","Alternative source URL":"替代来源网址",Anchor:"锚点","Anchor...":"锚点...",Anchors:"锚点","Animals and Nature":"动物和自然",Arrows:"箭头",B:"B","Background color":"背景颜色","Background color {0}":"",Black:"黑色",Block:"块","Block {0}":"",Blockquote:"引文区块",Blocks:"样式",Blue:"蓝色","Blue component":"白色部分",Body:"表体",Bold:"粗体",Border:"框线","Border color":"框线颜色","Border style":"边框样式","Border width":"边框宽度",Bottom:"下方对齐","Browse files":"","Browse for an image":"浏览图像","Browse links":"","Bullet list":"无序列表",Cancel:"取消",Caption:"标题",Cell:"单元格","Cell padding":"单元格内边距","Cell properties":"单元格属性","Cell spacing":"单元格外间距","Cell styles":"单元格样式","Cell type":"储存格别",Center:"居中",Characters:"字符","Characters (no spaces)":"字符(无空格)",Circle:"空心圆",Class:"类型","Clear formatting":"清除格式",Close:"关闭",Code:"代码","Code sample...":"示例代码...","Code view":"代码视图","Color Picker":"选色器","Color swatch":"颜色样本",Cols:"列",Column:"列","Column clipboard actions":"列剪贴板操作","Column group":"列组","Column header":"列标题","Constrain proportions":"保持比例",Copy:"复制","Copy column":"复制列","Copy row":"复制行","Could not find the specified string.":"未找到搜索内容。","Could not load emojis":"无法加载Emojis",Count:"计数",Currency:"货币","Current window":"当前窗口","Custom color":"自定义颜色","Custom...":"自定义......",Cut:"剪切","Cut column":"剪切列","Cut row":"剪切行","Dark Blue":"深蓝色","Dark Gray":"深灰色","Dark Green":"深绿色","Dark Orange":"深橙色","Dark Purple":"深紫色","Dark Red":"深红色","Dark Turquoise":"深蓝绿色","Dark Yellow":"暗黄色",Dashed:"虚线","Date/time":"日期/时间","Decrease indent":"减少缩进",Default:"预设","Delete accordion":"","Delete column":"删除列","Delete row":"删除行","Delete table":"删除表格",Dimensions:"尺寸",Disc:"实心圆",Div:"Div",Document:"文档",Dotted:"虚线",Double:"双精度","Drop an image here":"拖放一张图像至此","Dropped file type is not supported":"此文件类型不支持拖放",Edit:"编辑",Embed:"内嵌",Emojis:"Emojis","Emojis...":"Emojis...",Error:"错误","Error: Form submit field collision.":"错误: 表单提交字段冲突。","Error: No form element found.":"错误: 没有表单控件。","Extended Latin":"拉丁语扩充","Failed to initialize plugin: {0}":"插件初始化失败: {0}","Failed to load plugin url: {0}":"插件加载失败 链接: {0}","Failed to load plugin: {0} from url {1}":"插件加载失败: {0} 来自链接 {1}","Failed to upload image: {0}":"图片上传失败: {0}",File:"文件",Find:"寻找","Find (if searchreplace plugin activated)":"查找(如果查找替换插件已激活)","Find and Replace":"查找和替换","Find and replace...":"查找并替换...","Find in selection":"在选区中查找","Find whole words only":"全字匹配",Flags:"旗帜","Focus to contextual toolbar":"移动焦点到上下文菜单","Focus to element path":"移动焦点到元素路径","Focus to menubar":"移动焦点到菜单栏","Focus to toolbar":"移动焦点到工具栏",Font:"字体","Font size {0}":"","Font sizes":"字体大小","Font {0}":"",Fonts:"字体","Food and Drink":"食物和饮品",Footer:"表尾",Format:"格式","Format {0}":"",Formats:"格式",Fullscreen:"全屏",G:"G",General:"一般",Gray:"灰色",Green:"绿色","Green component":"绿色部分",Groove:"凹槽","Handy Shortcuts":"快捷键",Header:"表头","Header cell":"表头单元格","Heading 1":"一级标题","Heading 2":"二级标题","Heading 3":"三级标题","Heading 4":"四级标题","Heading 5":"五级标题","Heading 6":"六级标题",Headings:"标题",Height:"高度",Help:"帮助","Hex color code":"十六进制颜色代码",Hidden:"隐藏","Horizontal align":"水平对齐","Horizontal line":"水平分割线","Horizontal space":"水平间距",ID:"ID","ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"ID应该以英文字母开头,后面只能有英文字母、数字、破折号、点、冒号或下划线。","Image is decorative":"图像是装饰性的","Image list":"图片清单","Image title":"图片标题","Image...":"图片...","ImageProxy HTTP error: Could not find Image Proxy":"图片代理请求错误:无法找到图片代理","ImageProxy HTTP error: Incorrect Image Proxy URL":"图片代理请求错误:图片代理地址错误","ImageProxy HTTP error: Rejected request":"图片代理请求错误:请求被拒绝","ImageProxy HTTP error: Unknown ImageProxy error":"图片代理请求错误:未知的图片代理错误","Increase indent":"增加缩进",Inline:"文本",Insert:"插入","Insert Template":"插入模板","Insert accordion":"","Insert column after":"在右侧插入列","Insert column before":"在左侧插入列","Insert date/time":"插入日期/时间","Insert image":"插入图片","Insert link (if link plugin activated)":"插入链接 (如果链接插件已激活)","Insert row after":"在下方插入行","Insert row before":"在上方插入行","Insert table":"插入表格","Insert template...":"插入模板...","Insert video":"插入视频","Insert/Edit code sample":"插入/编辑代码示例","Insert/edit image":"插入/编辑图片","Insert/edit link":"插入/编辑链接","Insert/edit media":"插入/编辑媒体","Insert/edit video":"插入/编辑视频",Inset:"嵌入","Invalid hex color code: {0}":"十六进制颜色代码无效: {0}","Invalid input":"无效输入",Italic:"斜体",Justify:"两端对齐","Keyboard Navigation":"键盘指引",Language:"语言","Learn more...":"了解更多...",Left:"左","Left to right":"由左到右","Light Blue":"浅蓝色","Light Gray":"浅灰色","Light Green":"浅绿色","Light Purple":"浅紫色","Light Red":"浅红色","Light Yellow":"浅黄色","Line height":"行高","Link list":"链接清单","Link...":"链接...","List Properties":"列表属性","List properties...":"标题字体属性","Loading emojis...":"正在加载Emojis...","Loading...":"加载中...","Lower Alpha":"小写英文字母","Lower Greek":"小写希腊字母","Lower Roman":"小写罗马数字","Match case":"大小写匹配",Mathematical:"数学","Media poster (Image URL)":"封面(图片地址)","Media...":"多媒体...","Medium Blue":"中蓝色","Medium Gray":"中灰色","Medium Purple":"中紫色","Merge cells":"合并单元格",Middle:"居中对齐","Midnight Blue":"深蓝色","More...":"更多...",Name:"名称","Navy Blue":"海军蓝","New document":"新建文档","New window":"新窗口",Next:"下一个",No:"否","No alignment":"未对齐","No color":"无","Nonbreaking space":"不间断空格",None:"无","Numbered list":"有序列表",OR:"或",Objects:"物件",Ok:"确定","Open help dialog":"打开帮助对话框","Open link":"打开链接","Open link in...":"链接打开位置...","Open popup menu for split buttons":"打开弹出式菜单,用于拆分按钮",Orange:"橙色",Outset:"外置","Page break":"分页符",Paragraph:"段落",Paste:"粘贴","Paste as text":"粘贴为文本","Paste column after":"粘贴后面的列","Paste column before":"粘贴此列前","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。","Paste or type a link":"粘贴或输入链接","Paste row after":"粘贴行到下方","Paste row before":"粘贴行到上方","Paste your embed code below:":"将内嵌代码粘贴在下面:",People:"人类",Plugins:"插件","Plugins installed ({0}):":"已安装插件 ({0}):","Powered by {0}":"由{0}驱动",Pre:"前言",Preferences:"首选项",Preformatted:"预先格式化的","Premium plugins:":"优秀插件:","Press the Up and Down arrow keys to resize the editor.":"","Press the arrow keys to resize the editor.":"","Press {0} for help":"",Preview:"预览",Previous:"上一个",Print:"打印","Print...":"打印...",Purple:"紫色",Quotations:"引用",R:"R","Range 0 to 255":"范围0至255",Red:"红色","Red component":"红色部分",Redo:"重做",Remove:"移除","Remove color":"移除颜色","Remove link":"移除链接",Replace:"替换","Replace all":"替换全部","Replace with":"替换为",Resize:"调整大小","Restore last draft":"恢复上次的草稿","Reveal or hide additional toolbar items":"","Rich Text Area":"富文本区域","Rich Text Area. Press ALT-0 for help.":"编辑区。按Alt+0键打开帮助。","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"编辑区。按ALT-F9打开菜单,按ALT-F10打开工具栏,按ALT-0查看帮助",Ridge:"海脊座",Right:"右","Right to left":"由右到左",Row:"行","Row clipboard actions":"行剪贴板操作","Row group":"行组","Row header":"行头","Row properties":"行属性","Row type":"行类型",Rows:"行数",Save:"保存","Save (if save plugin activated)":"保存(如果保存插件已激活)",Scope:"范围",Search:"搜索","Select all":"全选","Select...":"选择...",Selection:"选择",Shortcut:"快捷方式","Show blocks":"显示区块边框","Show caption":"显示标题","Show invisible characters":"显示不可见字符",Size:"字号",Solid:"实线",Source:"源","Source code":"源代码","Special Character":"特殊字符","Special character...":"特殊字符...","Split cell":"拆分单元格",Square:"实心方块","Start list at number":"以数字开始列表",Strikethrough:"删除线",Style:"样式",Subscript:"下标",Superscript:"上标","Switch to or from fullscreen mode":"切换全屏模式",Symbols:"符号","System Font":"系统字体",Table:"表格","Table caption":"表格标题","Table properties":"表格属性","Table styles":"表格样式",Template:"模板",Templates:"模板",Text:"文字","Text color":"文本颜色","Text color {0}":"","Text to display":"要显示的文本","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址,需要加上mailto: 前缀吗?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接,需要加上http:// 前缀吗?","The URL you entered seems to be an external link. Do you want to add the required https:// prefix?":"您输入的 URL 似乎是一个外部链接。您想添加所需的 https:// 前缀吗?",Title:"标题","To open the popup, press Shift+Enter":"按Shitf+Enter键打开对话框","Toggle accordion":"",Tools:"工具",Top:"上方对齐","Travel and Places":"旅游和地点",Turquoise:"青绿色",Underline:"下划线",Undo:"撤销",Upload:"上传","Uploading image":"上传图片","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马数字",Url:"地址","User Defined":"自定义",Valid:"有效",Version:"版本","Vertical align":"垂直对齐","Vertical space":"垂直间距",View:"查看","Visual aids":"网格线",Warn:"警告",White:"白色",Width:"宽度","Word count":"字数",Words:"单词","Words: {0}":"字数:{0}",Yellow:"黄色",Yes:"是","You are using {0}":"你正在使用 {0}","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存,确定要离开?","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持打开剪贴板,请使用Ctrl+X/C/V等快捷键。",alignment:"对齐","austral sign":"澳元符号","cedi sign":"塞地符号","colon sign":"冒号","cruzeiro sign":"克鲁赛罗币符号","currency sign":"货币符号","dollar sign":"美元符号","dong sign":"越南盾符号","drachma sign":"德拉克马符号","euro-currency sign":"欧元符号",example:"示例",formatting:"格式化","french franc sign":"法郎符号","german penny symbol":"德国便士符号","guarani sign":"瓜拉尼符号",history:"历史","hryvnia sign":"格里夫尼亚符号",indentation:"缩进","indian rupee sign":"印度卢比","kip sign":"老挝基普符号","lira sign":"里拉符号","livre tournois sign":"里弗弗尔符号","manat sign":"马纳特符号","mill sign":"密尔符号","naira sign":"奈拉符号","new sheqel sign":"新谢克尔符号","nordic mark sign":"北欧马克","peseta sign":"比塞塔符号","peso sign":"比索符号","ruble sign":"卢布符号","rupee sign":"卢比符号","spesmilo sign":"spesmilo符号",styles:"样式","tenge sign":"坚戈符号","tugrik sign":"图格里克符号","turkish lira sign":"土耳其里拉","won sign":"韩元符号","yen character":"日元字样","yen/yuan character variant one":"元字样(大写)","yuan character":"人民币元字样","yuan character, in hong kong and taiwan":"元字样(港台地区)","{0} characters":"{0} 个字符","{0} columns, {1} rows":"","{0} words":"{0} 字"}),Kr=({token:t,lang:r})=>{const n=Ke();console.log("funclanguage",n),console.log("func",r);const i=t.colorPrimaryHover,o=t.colorPrimaryBorder,a=t.colorWhite,l=t.colorPrimaryTextHover;return` html { height: 100%; scrollbar-color: ${t.colorBgBase==="#fff"?"":"rgba(255, 255, 255, 0.25) rgba(253, 253, 253, 0.12)"}; } *:focus-visible { outline: none; } * img, * a { -webkit-user-drag: none; } .focus-tool { position: absolute; right: -30px; top: -10px; display: flex; flex-direction: column; z-index: 9; } .focus-tool-drag, .focus-tool-copy, .focus-tool-delete { width: 25px; height: 25px; margin-bottom: 3px; border-radius: 25px; background-repeat: no-repeat; background-size: 18px 18px; background-position: center center; border: none; background-color: ${i}; cursor: pointer; } .focus-tool-drag { cursor: grab; background-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20width%3D%2219px%22%20height%3D%2219px%22%20viewBox%3D%220%200%2019%2019%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22drag%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20id%3D%22arrow-down-copy%22%20fill%3D%22%23ffffff%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.49936886%2C1%20C9.75529117%2C1%2010.0112135%2C1.09763107%2010.2064756%2C1.29289322%20L12.6164551%2C3.62132034%20C13.0069794%2C4.01184464%2013.0069794%2C4.64500961%2012.6164551%2C5.03553391%20C12.2259308%2C5.4260582%2011.5927658%2C5.4260582%2011.2022415%2C5.03553391%20L10.4991165%2C4.41396122%20L10.4998532%2C7.98269085%20L10.4997913%2C8.517%20L14.6028593%2C8.51732521%20L14.003857%2C7.8150837%20C13.6133327%2C7.4245594%2013.6133327%2C6.79139442%2014.003857%2C6.40087013%20C14.3943813%2C6.01034584%2015.0275463%2C6.01034584%2015.4180706%2C6.40087013%20L17.724432%2C8.81047077%20C17.9196941%2C9.00573292%2018.0173252%2C9.26165523%2018.0173252%2C9.51757755%20C18.0173252%2C9.77349987%2017.9196941%2C10.0294222%2017.724432%2C10.2246843%20L15.3960049%2C12.6346638%20C15.0054806%2C13.0251881%2014.3723156%2C13.0251881%2013.9817913%2C12.6346638%20C13.591267%2C12.2441395%2013.591267%2C11.6109745%2013.9817913%2C11.2204502%20L14.603364%2C10.5173252%20L11.0346344%2C10.5180619%20L10.4997913%2C10.518%20L10.5%2C14.621068%20L11.2022415%2C14.0220657%20C11.5927658%2C13.6315414%2012.2259308%2C13.6315414%2012.6164551%2C14.0220657%20C13.0069794%2C14.41259%2013.0069794%2C15.045755%2012.6164551%2C15.4362793%20L10.2068544%2C17.7426407%20C10.0115923%2C17.9379028%209.75566998%2C18.0355339%209.49974766%2C18.0355339%20C9.24382534%2C18.0355339%208.98790302%2C17.9379028%208.79264088%2C17.7426407%20L6.38266144%2C15.4142136%20C5.99213715%2C15.0236893%205.99213715%2C14.3905243%206.38266144%2C14%20C6.77318573%2C13.6094757%207.40635071%2C13.6094757%207.796875%2C14%20L8.5%2C14.6215727%20L8.49926081%2C11.0526954%20L8.4987913%2C10.518%20L4.39625721%2C10.5182087%20L4.99525948%2C11.2204502%20C5.38578377%2C11.6109745%205.38578377%2C12.2441395%204.99525948%2C12.6346638%20C4.60473518%2C13.0251881%203.97157021%2C13.0251881%203.58104591%2C12.6346638%20L1.27468452%2C10.2250631%20C1.07942238%2C10.029801%200.981791305%2C9.77387867%200.981791305%2C9.51795635%20C0.981791305%2C9.26203404%201.07942238%2C9.00611172%201.27468452%2C8.81084957%20L3.60311165%2C6.40087013%20C3.99363594%2C6.01034584%204.62680092%2C6.01034584%205.01732521%2C6.40087013%20C5.4078495%2C6.79139442%205.4078495%2C7.4245594%205.01732521%2C7.8150837%20L4.39575253%2C8.5182087%20L7.9646298%2C8.5174695%20L8.4987913%2C8.517%20L8.49911652%2C4.4144659%20L7.796875%2C5.01346817%20C7.40635071%2C5.40399246%206.77318573%2C5.40399246%206.38266144%2C5.01346817%20C5.99213715%2C4.62294388%205.99213715%2C3.9897789%206.38266144%2C3.59925461%20L8.79226208%2C1.29289322%20C8.98752422%2C1.09763107%209.24344654%2C1%209.49936886%2C1%20Z%22%20id%3D%22Combined-Shape%22%3E%3C%2Fpath%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E); } .focus-tool-copy { background-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20width%3D%2219px%22%20height%3D%2219px%22%20viewBox%3D%220%200%2019%2019%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22duplicate%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20id%3D%22arrow-down-copy-2%22%20fill%3D%22%23ffffff%22%20fill-rule%3D%22nonzero%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.007983%2C2%20C12.1081436%2C2%2013%2C2.90017617%2013%2C3.99201702%20L13%2C6%20L15.007983%2C6%20C16.1081436%2C6%2017%2C6.90017617%2017%2C7.99201702%20L17%2C15.007983%20C17%2C16.1081436%2016.0998238%2C17%2015.007983%2C17%20L7.99201702%2C17%20C6.8918564%2C17%206%2C16.0998238%206%2C15.007983%20L6%2C13%20L3.99201702%2C13%20C2.8918564%2C13%202%2C12.0998238%202%2C11.007983%20L2%2C3.99201702%20C2%2C2.8918564%202.90017617%2C2%203.99201702%2C2%20L11.007983%2C2%20Z%20M11%2C4%20L4%2C4%20L4%2C11%20L6%2C11%20L6%2C7.99201702%20C6%2C6.8918564%206.90017617%2C6%207.99201702%2C6%20L11%2C6%20L11%2C4%20Z%22%20id%3D%22Combined-Shape%22%3E%3C%2Fpath%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E); } .focus-tool-delete { background-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20width%3D%2219px%22%20height%3D%2219px%22%20viewBox%3D%220%200%2019%2019%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22trash%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20fill%3D%22%23ffffff%22%20id%3D%22Combined-Shape%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11%2C2%20C11.5522847%2C2%2012%2C2.44771525%2012%2C3%20L15.0014977%2C3%20C15.5529553%2C3%2016%2C3.44266033%2016%2C3.99895656%20L16%2C5.00104344%20C16%2C5.55275191%2015.5525106%2C6%2015.0014977%2C6%20L15%2C6%20L15%2C15%20C15%2C16.1045695%2014.1045695%2C17%2013%2C17%20L6%2C17%20C4.8954305%2C17%204%2C16.1045695%204%2C15%20L4%2C6%20L3.99850233%2C6%20C3.44704472%2C6%203%2C5.55733967%203%2C5.00104344%20L3%2C3.99895656%20C3%2C3.44724809%203.44748943%2C3%203.99850233%2C3%20L7%2C3%20C7%2C2.44771525%207.44771525%2C2%208%2C2%20L11%2C2%20Z%20M7%2C7%20L6%2C7%20L6%2C15%20L7%2C15%20L7%2C7%20Z%20M10%2C7%20L9%2C7%20L9%2C15%20L10%2C15%20L10%2C7%20Z%20M13%2C7%20L12%2C7%20L12%2C15%20L13%2C15%20L13%2C7%20Z%22%3E%3C%2Fpath%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E); } .editor-body .mj-body:empty:before, .mj-column-empty > table:before { content: "${n==="en"?"Empty Section - Drop content here":n==="fa"?"بخش خالی - محتوا را اینجا رها کنید":n==="de"?"Leere Sektion - Inhalt hier ablegen":n==="ar"?"قسم فارغ - أسقط المحتوى هنا":"Empty Section - Drop content here"}"; display: block; padding-top: 20px; padding-bottom: 20px; color: ${l}; font-size: 14px; line-height: 14px; font-weight: 500; font-family: sans-serif; text-align: center; background: transparent; outline: ${o} 1px dashed; border-radius: 0px; vertical-align: middle; } .mj-body a { text-decoration: none; } .mj-column-empty > table:before { content: "${n==="en"?"Empty Column":n==="fa"?"ستون خالی":n==="de"?"Leere Spalte":n==="ar"?"عمود فارغ":"Empty Column"}"; } .mj-column-empty.mj-column-per-100 > table:before { content: "${n==="en"?"Empty Section - Drop content here":n==="fa"?"بخش خالی - محتوا را اینجا رها کنید":n==="de"?"Leere Sektion - Inhalt hier ablegen":n==="ar"?"قسم فارغ - أسقط المحتوى هنا":"Empty Section - Drop content here"}"; } .editor-body { user-select: none; border: 22px solid ${t.colorBgContainer}; border-left-width: 30px; border-right-width: 30px; min-width: 275px; min-height: calc(100% - 44px); overflow-x: hidden; } .editor-body .mj-section { position: relative; outline: 2px solid transparent; } .editor-body .mj-section.hover, .editor-body .mj-section.focus, .editor-body .mj-section.focus-child { outline-color: ${o}; z-index: 1; } .editor-body .mj-section.hover:before, .editor-body .mj-section.focus:before, .editor-body .mj-section.focus-child:before { content: "${n==="en"?"Section":n==="fa"?"بخش":n==="de"?"Sektion":n==="ar"?"القسم":"Section"}"; display: block; position: absolute; left: -2px; top: -22px; text-align: left; padding: 1px 6px; line-height: 20px; font-size: 15px; color: ${a}; background-color: ${o}; border-top-left-radius: 4px; border-top-right-radius: 4px; } .editor-body .mj-section.focus { outline-color: ${i}; } .editor-body .mj-section.focus:before { background-color: ${i}; } .editor-body .mj-section.hover .mj-column { outline: 1px dashed ${i}; } .editor-body .mj-text { position: relative; outline: 2px solid transparent; } .editor-body .mj-text > div { outline: none; } .editor-body .mj-text.hover, .editor-body .mj-text.focus { outline-color: ${o}; z-index: 1; } .editor-body .mj-text.hover:before, .editor-body .mj-text.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${a}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjFlbSIgaGVpZ2h0PSIxZW0iIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNyA2LjczM2gtLjkzYzAtMS44NjYtMS44Ny0yLjMzMy00LjIwMy0yLjMzM3Y5LjQ3YzAgLjc2My40NjQgMS40NSAxLjE3MyAxLjczM2wxLjE2LjQ2NFYxN0g1Ljh2LS45MzNsMS4xNi0uNDY0YTEuODY3IDEuODY3IDAgMCAwIDEuMTczLTEuNzMzVjQuNGMtMi4zMzMgMC00LjIuNDY3LTQuMiAyLjMzM0gzVjNoMTR2My43MzN6Ij48L3BhdGg+PC9zdmc+) ${o} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-text.focus { outline-color: ${i}; z-index: 2; } .editor-body .mj-text.focus:before { background-color: ${i}; } .editor-body .mj-text > div:empty:before { content: "${n==="en"?"Please enter text":n==="fa"?"لطفاً متن را وارد کنید":n==="de"?"Bitte Text eingeben":n==="ar"?"الرجاء إدخال نص":"Please enter text"}"; display: block; width: 100%; height: 14px; font-size: 14px; color: ${t.colorTextPlaceholder}; } .editor-body .mj-text > div.mce-edit-focus:empty:before { content: ""; } .editor-body .mj-image { position: relative; outline: 2px solid transparent; } .editor-body .mj-image img { min-height: 10px; } .editor-body .mj-image.hover, .editor-body .mj-image.focus { outline-color: ${o}; z-index: 1; } .editor-body .mj-image.hover:before, .editor-body .mj-image.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${a}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOCA0LjVBMi41IDIuNSAwIDAgMCAxNS41IDJoLTExQTIuNSAyLjUgMCAwIDAgMiA0LjV2MTFBMi41IDIuNSAwIDAgMCA0LjUgMThoMTFhMi41IDIuNSAwIDAgMCAyLjUtMi41di0xMXptLTEzLjUtMWExIDEgMCAwIDAtMSAxdjkuNzMybDIuNjYtMi44NWExIDEgMCAwIDEgMS4zLS4xNGwxLjgxIDEuMjUyYTEgMSAwIDAgMCAxLjMxOC0uMTZsMi40ODUtMi44MTdhMSAxIDAgMCAxIDEuNDI4LS4wNzNsMS45OTkgMS44NDVWNC41YTEgMSAwIDAgMC0xLTFoLTExem0xIDMuNWExLjUgMS41IDAgMSAxIDMgMCAxLjUgMS41IDAgMCAxLTMgMHoiPjwvcGF0aD48L3N2Zz4=) ${o} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-image.focus { outline-color: ${i}; z-index: 2; } .editor-body .mj-image.focus:before { background-color: ${i}; } .editor-body .mj-button { position: relative; outline: 2px solid transparent; } .editor-body .mj-button.hover, .editor-body .mj-button.focus { outline-color: ${o}; z-index: 1; } .editor-body .mj-button.hover:before, .editor-body .mj-button.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${a}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE4IDVhMi41IDIuNSAwIDAgMC0yLjUtMi41aC0xMUEyLjUgMi41IDAgMCAwIDIgNXY1YTIuNSAyLjUgMCAwIDAgMi41IDIuNWgzLjY1NEw4LjAzOCAxMUg0LjVhMSAxIDAgMCAxLTEtMVY1YTEgMSAwIDAgMSAxLTFoMTFhMSAxIDAgMCAxIDEgMXY1YzAgLjI2MS0uMS40OTktLjI2NC42NzdsMS4yMDMuOTAyYy4zNS0uNDMuNTYxLS45OC41NjEtMS41NzlWNXoiPjwvcGF0aD48cGF0aCBmaWxsPSIjZmZmIiBkPSJNOS43MDYgOC4xMTZsLjkyOSA4LjQ4Yy4wMTIuMTA5LjE0OC4xNS4yMi4wNjhMMTIuNjIgMTQuNmwxLjY2NyAyLjg4N2EuODMzLjgzMyAwIDEgMCAxLjQ0My0uODMzbC0xLjY2Ny0yLjg4NyAyLjY3LS40OThhLjEyNS4xMjUgMCAwIDAgLjA1MS0uMjIzTDkuOTA0IDhhLjEyNS4xMjUgMCAwIDAtLjE5OC4xMTV6Ij48L3BhdGg+PC9zdmc+) ${o} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-button.focus { outline-color: ${i}; z-index: 2; } .editor-body .mj-button.focus:before { background-color: ${i}; } .editor-body .mj-button a:empty:before, .editor-body .mj-button p:empty:before, .editor-body .mj-button a > div:empty:before, .editor-body .mj-button p > div:empty:before { content: "${n==="en"?"Please enter text":n==="fa"?"لطفاً متن را وارد کنید":n==="de"?"Bitte Text eingeben":n==="ar"?"الرجاء إدخال نص":"Please enter text"}"; display: block; width: 100%; height: 14px; font-size: 14px; color: ${a}; } .editor-body .mj-button a.mce-edit-focus:empty:before, .editor-body .mj-button p.mce-edit-focus:empty:before, .editor-body .mj-button a > div.mce-edit-focus:empty:before, .editor-body .mj-button p > div.mce-edit-focus:empty:before { content: ""; } .editor-body .mj-divider { position: relative; outline: 2px solid transparent; } .editor-body .mj-divider.hover, .editor-body .mj-divider.focus { outline-color: ${o}; z-index: 1; } .editor-body .mj-divider.hover:before, .editor-body .mj-divider.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${a}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTkuODM2IDQuNTYxYS4yNS4yNSAwIDAgMSAuMzI4IDBsMS45MjcgMS42N2EuMjUuMjUgMCAwIDEtLjE2My40MzhIOC4wNzJhLjI1LjI1IDAgMCAxLS4xNjMtLjQzOWwxLjkyNy0xLjY2OXpNMiA4LjQyaDE2djNIMnYtM3pNOS44MzYgMTUuMjc3YS4yNS4yNSAwIDAgMCAuMzI4IDBsMS45MjctMS42NjlhLjI1LjI1IDAgMCAwLS4xNjMtLjQzOUg4LjA3MmEuMjUuMjUgMCAwIDAtLjE2My40NGwxLjkyNyAxLjY2OHoiPjwvcGF0aD48L3N2Zz4=) ${o} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-divider.focus { outline-color: ${i}; z-index: 2; } .editor-body .mj-divider.focus:before { background-color: ${i}; } .editor-body .mj-spacer { position: relative; outline: 2px solid transparent; } .editor-body .mj-spacer.hover, .editor-body .mj-spacer.focus { outline-color: ${o}; z-index: 1; } .editor-body .mj-spacer.hover:before, .editor-body .mj-spacer.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${a}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTkuODM2IDIuMTYxYS4yNS4yNSAwIDAgMSAuMzI4IDBsMS45MjcgMS42N2EuMjUuMjUgMCAwIDEtLjE2My40MzhIOC4wNzJhLjI1LjI1IDAgMCAxLS4xNjMtLjQzOWwxLjkyNy0xLjY2OXoiPjwvcGF0aD48cGF0aCBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE4IDguMDJhMi41IDIuNSAwIDAgMC0yLjUtMi41aC0xMUEyLjUgMi41IDAgMCAwIDIgOC4wMnY0YTIuNSAyLjUgMCAwIDAgMi41IDIuNWgxMWEyLjUgMi41IDAgMCAwIDIuNS0yLjV2LTR6bS0xMy41LTFhMSAxIDAgMCAwLTEgMXY0YTEgMSAwIDAgMCAxIDFoMTFhMSAxIDAgMCAwIDEtMXYtNGExIDEgMCAwIDAtMS0xaC0xMXoiPjwvcGF0aD48cGF0aCBmaWxsPSIjZmZmIiBkPSJNOS44MzYgMTcuODc4YS4yNS4yNSAwIDAgMCAuMzI4IDBsMS45MjctMS42N2EuMjUuMjUgMCAwIDAtLjE2My0uNDM5SDguMDcyYS4yNS4yNSAwIDAgMC0uMTYzLjQ0bDEuOTI3IDEuNjY5eiI+PC9wYXRoPjwvc3ZnPg==) ${o} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-spacer.focus { outline-color: ${i}; z-index: 2; } .editor-body .mj-spacer.focus:before { background-color: ${i}; } .editor-body .mj-social { position: relative; outline: 2px solid transparent; } .editor-body .mj-social.hover, .editor-body .mj-social.focus { outline-color: ${o}; z-index: 1; } .editor-body .mj-social.hover:before, .editor-body .mj-social.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${a}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE1LjUgNy41YTIuNSAyLjUgMCAxIDAgMC01IDIuNSAyLjUgMCAwIDAgMCA1ek0xMi4yMiA2LjIyNGMuMTc5LjQ4LjQ2LjkwOS44MTYgMS4yNjJMOS45MTYgOS4yM2EzLjQ4NSAzLjQ4NSAwIDAgMC0uNjQtMS4zNjFsMi45NDQtMS42NDV6TTkgMTBhMy41IDMuNSAwIDEgMS03IDAgMy41IDMuNSAwIDAgMSA3IDB6TTE4IDE1YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwek05Ljg1NCAxMS4wMDVjLS4xNDcuNDkxLS40LjkzNy0uNzMgMS4zMWwzLjAyMiAxLjY4Yy4xNDctLjQ5MS40LS45MzcuNzMtMS4zMWwtMy4wMjItMS42OHoiPjwvcGF0aD48L3N2Zz4=) ${o} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-social.focus { outline-color: ${i}; z-index: 2; } .editor-body .mj-social.focus:before { background-color: ${i}; }`},qr={tagName:"mj-head",attributes:{},children:[{tagName:"mj-attributes",attributes:{},children:[{tagName:"mj-all",attributes:{"font-family":"arial",color:"#000000"}},{tagName:"mj-button",attributes:{color:"#FFFFFF","background-color":"#414141"}},{tagName:"mj-section",attributes:{"background-color":void 0}}]}]},eo=t=>{var n;let r=t;if(((n=r.children)==null?void 0:n.findIndex(i=>i.tagName===S.MJ_BODY))===0){const i=r.children.shift();r.children.length===0&&r.children.push(qr),r.children.push(i)}return r},Ht=t=>{if(!t)return"";let r="";return Object.keys(t).forEach(n=>{const i=t[n];i&&(r+=` ${n}="${i}"`)}),r},Re=(t,r)=>`<${t.tagName}${Ht(t.attributes)}>${r??""}`,nt=t=>{if(!t)return"";let r="";return t.children&&t.children.forEach(n=>{var o;let i="";if(["mj-social","mj-attributes"].includes(n.tagName)&&(i=(o=n.children)==null?void 0:o.reduce((a,l)=>a+=Re(l),"")),i)return r+=Re(n,i),r;if(["mj-section","mj-column"].includes(n.tagName))return r+=Re(n,nt(n)),r;r+=Re(n,n.content)}),r},to=t=>{var n,i,o;return`${nt((n=t.children)==null?void 0:n[0])}${nt((o=t.children)==null?void 0:o[1])}`},Ut=t=>{var r,n;for(let i=0;i<(((r=t.children)==null?void 0:r.length)??0);i++){const o=(n=t.children)==null?void 0:n[i];if(o.tagName==="mj-head")continue;const a=o.attributes;o.attributes.hasOwnProperty("css-class")?a["css-class"].includes(o.tagName)||(a["css-class"]=o.tagName+" "+a["css-class"]):a["css-class"]=o.tagName,o.children&&Ut(o)}return me(t)},it=()=>{const{currentEmptyNode:t,currentFocusNode:r,currentHoverNode:n}=f.useContext(wt);return{currentEmptyNode:t,currentFocusNode:r,currentHoverNode:n,resetEmptyNode:()=>{t.current&&(t.current.classList.add(pe),t.current=null)},setHoverNodeCls:l=>{if(n.current){if(!Q(n.current)){const m=re(n.current,S.MJ_SECTION);m==null||m.classList[l](ke)}n.current.classList[l](ke)}l==="remove"&&(n.current=null)},setFocusNodeCls:l=>{if(r.current){if(!Q(r.current)){const m=re(r.current,S.MJ_SECTION);m==null||m.classList[l](Cr,ke)}r.current.classList[l]($e)}l==="remove"&&(r.current=null)}}},Be=()=>{const{dataTransfer:t,setDataTransfer:r}=f.useContext(ue);return{dataTransfer:t,setDataTransfer:r}},ro=()=>{const[t,r]=f.useState(null),{focusNode:n}=oe();return f.useEffect(()=>{const i=document.createElement("div");i.setAttribute("id",It),i.setAttribute("style","position: absolute; left: 0; top: 0; width: 279px"),i.onclick=o=>{o.stopPropagation()},r(i)},[]),f.useEffect(()=>{var i;if(!(!n||!t)&&(t.replaceChildren(),ze(n)||Oe(n))){const o=n.getRootNode().documentElement;(i=o.querySelector("body"))==null||i.appendChild(t);const{left:a,top:l,width:m,height:u}=n.getBoundingClientRect();t.style.left=`${a+m/2-279/2}px`,t.style.top=l>88?`${l+(o==null?void 0:o.scrollTop)-78-10}px`:`${l+(o==null?void 0:o.scrollTop)+u+10}px`}},[n,t]),f.useEffect(()=>{if(!t)return;const i=o=>{o.stopPropagation()};return t.addEventListener("click",i,!1),t.addEventListener("mouseover",i,!1),()=>{t.removeEventListener("click",i,!1),t.removeEventListener("mouseover",i,!1)}},[t]),{editorTool:t}},oe=()=>{const{focusNode:t,setFocusNode:r}=f.useContext(ue);return{focusNode:t,setFocusNode:r}},oo=()=>{const{appData:t,setAppData:r}=ae(),{focusNode:n,setFocusNode:i}=oe(),{setDataTransfer:o}=Be(),{setFocusNodeCls:a}=it(),[l,m]=f.useState(null);return f.useEffect(()=>{const u=document.createElement("div");u.className=kt,u.innerHTML=`
`,m(u)},[]),f.useEffect(()=>{if(!l||!n||he(n)){l==null||l.remove();return}const u=l.querySelector(`.${St}`);n.appendChild(l);const y=Q(n),x=c=>{var v,C,M,I;c.stopPropagation();const p=c.target,g=se({node:n});if(Er(p)){r(Yr({appData:t,idx:g}));const D=n.cloneNode(!0);if(D.classList.remove($e,ke),(v=D.querySelector(`.${kt}`))==null||v.remove(),y)et(n,D);else{const N=document.createElement("tr");N.appendChild(D),et(n.parentElement,N)}o({type:"copy"})}if(Dr(p)){if(r(Ur({appData:t,idx:g})),a("remove"),y)((C=n.parentNode)==null?void 0:C.children.length)===1?(M=n==null?void 0:n.parentElement)==null||M.replaceChildren():n==null||n.remove();else{const D=re(n,S.MJ_COLUMN);(I=n==null?void 0:n.parentElement)==null||I.remove(),rt(D)||D==null||D.classList.add(pe)}i(null),o({type:"delete"})}},b=()=>{o({type:"move",data:{type:y?"column":"basic",value:n.classList[0]}})};return l.addEventListener("click",x,!1),u==null||u.addEventListener("dragstart",b),()=>{l.removeEventListener("click",x,!1),u==null||u.removeEventListener("dragstart",b)}},[n,l,t]),{focusTool:l}},no=()=>{const{hoverNode:t,setHoverNode:r}=f.useContext(ue);return{hoverNode:t,setHoverNode:r}},ce=()=>{const[t,r]=f.useState(void 0),{appData:n,setAppData:i}=ae(),{focusNode:o}=oe(),{idx:a,defaultNodeAttr:l}=f.useMemo(()=>o?{idx:se({node:o}),defaultNodeAttr:Se[o.classList[0]].attributes}:{idx:"1",defaultNodeAttr:{width:"600px","background-color":""}},[o]),m=u=>{n&&i(Rt({appData:n,idx:a,property:u}))};return f.useEffect(()=>{if(!n||!a)return;const u=a==="1"?zt(n):{},y=Nt({appData:n,idx:a});r({...l,...y==null?void 0:y.attributes,...u})},[a,n]),{property:t,setProperty:m}},Yt=()=>{const{tab:t,setTab:r}=f.useContext(ue);return{tab:t,setTab:r}},io=()=>{const{token:t}=d.theme.useToken(),{dataTransfer:r}=Be(),{appData:n,setAppData:i}=ae(),[o,a]=f.useState(null),{focusNode:l}=oe(),{lang:m}=Fe(),u=Ke(),{style:y,hoverStyle:x}=f.useMemo(()=>{const b=`border: 1px dashed ${t.colorPrimaryBorder}; background-color: ${t.colorPrimaryBg}; padding: 20px; text-align: center; font-size: 14px; line-height: 14px; color: ${t.colorPrimaryTextHover};`;return{style:b,hoverStyle:`${b} background-color: ${t.colorPrimaryBgHover}`}},[t]);return f.useEffect(()=>{const b=document.createElement("div");b.setAttribute("class",Mt),b.setAttribute("style",y),b.innerText=u==="en"?"Drop here":u==="fa"?"اینجا رها کنید":u==="de"?"Hier ablegen":u==="ar"?"أسقط هنا":"Drop here",a(b)},[u]),f.useEffect(()=>{if(!o||!r)return;const b=()=>{o.setAttribute("style",x)},c=()=>{o.setAttribute("style",y)},p=()=>{const v=se({node:o,transferAction:r.type});if(r.type=="add")i(Hr({appData:n,idx:v,dataTransfer:r}));else if(r.type==="move"){const C=se({node:l,transferAction:r.type});i(Gr({appData:n,idx:v,originIdx:C}))}},g=v=>{v.stopPropagation(),v.preventDefault()};return o.addEventListener("dragenter",b),o.addEventListener("dragleave",c),o.addEventListener("dragover",g),o.addEventListener("drop",p),()=>{o.removeEventListener("dragenter",b),o.removeEventListener("dragleave",c),o.removeEventListener("drop",p),o.removeEventListener("dragover",g)}},[o,r,n]),f.useEffect(()=>{o&&(o.innerText=u==="en"?"Drop here":u==="fa"?"اینجا رها کنید":u==="de"?"Hier ablegen":u==="ar"?"أسقط هنا":"Drop here")},[m,u]),{block:o}},so=()=>{const{setHoverNode:t}=no(),{focusNode:r,setFocusNode:n}=oe(),{setTab:i}=Yt(),{appData:o,setAppData:a}=ae(),{dataTransfer:l,setDataTransfer:m}=Be(),{block:u}=io(),{editorTool:y}=ro(),{skin:x,lang:b}=Fe();oo();const[c,p]=f.useState(null),{currentHoverNode:g,currentFocusNode:v,currentEmptyNode:C,resetEmptyNode:M,setHoverNodeCls:I,setFocusNodeCls:D}=it();return f.useEffect(()=>{if(!c)return;const N=z=>{const A=z.target;if(!A||l)return;I("remove");const _=re(A);!_||Ar(_)||(g.current!==_&&(g.current=_),I("add"),t(_))},$=()=>{I("remove")},H=z=>{z.preventDefault();const A=z.target;if(!A)return;i("edit"),D("remove");const _=re(A);if(!_){n(null);return}tt(_)||(v.current!==_&&(v.current=_),D("add"),n(_))},U=z=>{z.preventDefault(),be(z.target)?C.current=null:M()},J=z=>{z.preventDefault(),z.stopPropagation(),T(z)},T=Rr(z=>{var Te,Ie,Ae,Ee,Ye;let A=re(z.target,S.MJ_COLUMN);const _=ge().document.body;if(he(z.target)&&_.children[0].children.length===0){_.children[0].appendChild(u);return}if(((Te=l==null?void 0:l.data)==null?void 0:Te.type)=="basic"&&Nr(A)){M(),C.current=A,A==null||A.classList.remove(pe),A==null||A.children[0].children[0].appendChild(u);return}const Y=(l==null?void 0:l.type)==="move"?((Ie=l==null?void 0:l.data)==null?void 0:Ie.type)=="column"||Q(r):((Ae=l==null?void 0:l.data)==null?void 0:Ae.type)=="column";if(A=re(z.target,Y?S.MJ_SECTION:void 0),!A||!u)return;const{height:ee,top:le}=A.getBoundingClientRect(),{clientY:ve}=z,ne=ve-le>ee/2?"down":"up";let ie=A.parentElement,te=A;if(Q(A)||(ie=(ie==null?void 0:ie.parentElement)??null,te=te.parentElement),(l==null?void 0:l.type)=="move"){if(A===r)return;if(Q(r)){if(ne=="down"&&(r==null?void 0:r.previousElementSibling)===te||ne=="up"&&(r==null?void 0:r.nextElementSibling)===te)return}else if(ne=="down"&&((Ee=r==null?void 0:r.parentElement)==null?void 0:Ee.previousElementSibling)===te||ne=="up"&&((Ye=r==null?void 0:r.parentElement)==null?void 0:Ye.nextElementSibling)===te)return}ne=="down"?et(te,u):ie==null||ie.insertBefore(u,te),M()},400);return c.addEventListener("mouseover",N),c.addEventListener("mouseout",$),c.addEventListener("click",H),c.addEventListener("drop",U),c.addEventListener("dragover",J),()=>{c.removeEventListener("mouseover",N),c.removeEventListener("click",H),c.removeEventListener("drop",U),c.removeEventListener("dragover",J),c.removeEventListener("mouseout",$)}},[c,u,r,l]),f.useEffect(()=>{if(!c)return;const N=()=>{u&&u.remove(),M(),m(null)};return window.addEventListener("dragend",N),c.addEventListener("dragend",N),()=>{window.removeEventListener("dragend",N),c.removeEventListener("dragend",N)}},[c,u]),f.useEffect(()=>{if(!c||!y)return;let N=null;const $=ge(),H=J=>{var T;(T=$.tinymce)==null||T.remove(),J==null||J.removeAttribute("id"),J==null||J.removeAttribute("class"),J==null||J.removeAttribute("contenteditable"),N=null},U=J=>{var z,A;const T=re(J.target);if(ze(T)||Oe(T)){let _=ze(T)?T==null?void 0:T.children[0]:(T==null?void 0:T.querySelector("p"))||(T==null?void 0:T.querySelector("a"));if(Oe(T))if(_!=null&&_.children[0])_=_.children[0];else{const Y=document.createElement("div");Y.innerText=((z=_==null?void 0:_.textContent)==null?void 0:z.trim())??"",_==null||_.replaceChildren(Y),_=Y}if((_==null?void 0:_.getAttribute("id"))==="editor")return;N&&!N.removed&&H(N.bodyElement),_==null||_.setAttribute("id","editor"),(A=$.tinymce)==null||A.init({selector:"#editor",license_key:"gpl",inline:!0,menubar:!1,language:b??"en",skin:x==="light"?"oxide":"oxide-dark",plugins:"autolink link",toolbar:["fontsize forecolor undo redo","removeformat bold italic underline strikethrough link unlink"],fixed_toolbar_container:`#${It}`,forced_root_block:" ",init_instance_callback:()=>{_.focus()},font_size_formats:"12px 14px 16px 18px 24px 36px 48px 56px 72px",setup:Y=>{N=Y,Y.on("change",ee=>{const le=ee.level.content,ve=se({node:T});m({type:"tinymce"}),a(ne=>Bt({appData:ne,idx:ve,content:le}))}),Y.on("blur",()=>{setTimeout(()=>{H(_??null)})})}});return}N&&!N.removed&&H(N.bodyElement)};return c.addEventListener("click",U,!1),()=>{c.removeEventListener("click",U,!1)}},[y,c,b,x]),f.useEffect(()=>{var J;if(!o||!c)return;const N=Et(o),$=se({node:r}),H=Ft({doc:N,idx:$});let U=null;if(l){if(["copy","delete","tinymce"].includes(l.type)){m(null);return}const T=se({node:u,transferAction:l==null?void 0:l.type}),z=Ft({doc:N,idx:T});if(l.type==="add")U=z,ot(U),u==null||u.replaceWith(U);else{const A=re(r,S.MJ_COLUMN);($.split("-")[1]!==T.split("-")[1]||$.length!==T.length)&&D("remove"),Q(r)?r==null||r.remove():(J=r==null?void 0:r.parentElement)==null||J.remove(),rt(A)||A==null||A.classList.add(pe),U=z,U&&(Q(U)?v.current=U:v.current=U.children[0],n(v.current)),ot(U),u==null||u.replaceWith(U),D("add")}}else{const T=r||ge().document.body.children[0];H&&(Q(T)&&T.tagName!==(H==null?void 0:H.tagName)?(H.appendChild(T.lastElementChild),v.current=H,T.replaceWith(H),D("add"),n(H)):setTimeout(()=>{zr(T,H),ot(T)}))}m(null)},[o]),{setRef:p}},lo=()=>{const{t}=R(),{token:r}=d.theme.useToken(),{focusNode:n,setFocusNode:i}=oe(),{currentFocusNode:o,setFocusNodeCls:a}=it(),[l,m]=f.useState("desktop"),u=()=>{const x={title:e.jsx("a",{onClick:c=>{c.preventDefault(),a("remove"),i(null)},children:t("block.body")})},b={title:e.jsx("a",{onClick:c=>{c.preventDefault();const p=re(n,S.MJ_SECTION);a("remove"),o.current=p,a("add"),i(p)},children:t("block.section")})};if(n){if(Q(n))return[x,{title:t("block.section")}];{const c={title:t(`block.${n.classList[0].split("-")[1]}`)};return[x,b,c]}}else return[{title:t("block.body")}]},y=x=>{const b=document.getElementById(qe);b.style.width=x==="mobile"?"400px":"100%",m(x)};return e.jsxs(d.Flex,{style:{height:40,padding:"0 20px",borderBottom:`1px solid ${r.colorBorder}`,backgroundColor:r.colorBgContainer},align:"center",justify:"space-between",children:[e.jsx(d.Breadcrumb,{separator:">",items:u()}),e.jsx(d.Flex,{gap:10,children:e.jsx(d.Segmented,{value:l,onChange:y,options:[{label:"",value:"desktop",icon:e.jsx(O.DesktopOutlined,{})},{label:"",value:"mobile",icon:e.jsx(O.MobileOutlined,{})}]})})]})},{Text:ao}=d.Typography,Gt=({value:t})=>{const{setDataTransfer:r}=Be(),{t:n}=R(),i=o=>{r({type:"add",data:{type:o.type,value:o.value}})};return e.jsx(d.Flex,{wrap:!0,style:{margin:"10px 0"},justify:"space-between",children:t.map((o,a)=>e.jsxs(d.Card,{style:{width:96,height:96,marginBottom:10},styles:{body:{padding:0,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}},hoverable:!0,draggable:!0,onDragStart:()=>i(o),children:[o.icon,e.jsx(ao,{style:{marginTop:4},strong:!0,children:n(`block.${o.label}`)})]},a))})},co=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M16 4.5H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-9a1 1 0 0 0-1-1zM4 3a2.5 2.5 0 0 0-2.5 2.5v9A2.5 2.5 0 0 0 4 17h12a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16 3H4z"}),e.jsx("title",{children:"1 Column"})]}),Vt=t=>e.jsx(O,{component:co,...t}),uo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M4 4.5h2.75a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm-2.5 1A2.5 2.5 0 0 1 4 3h2.75a2.5 2.5 0 0 1 2.5 2.5v9a2.5 2.5 0 0 1-2.5 2.5H4a2.5 2.5 0 0 1-2.5-2.5v-9zm11.75-1H16a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-2.75a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm-2.5 1a2.5 2.5 0 0 1 2.5-2.5H16a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 16 17h-2.75a2.5 2.5 0 0 1-2.5-2.5v-9z"}),e.jsx("title",{children:"2 Column"})]}),Jt=t=>e.jsx(O,{component:uo,...t}),po=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M1.5 4.75C1.5 3.784 2.284 3 3.25 3h1.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0 1 4.75 17h-1.5a1.75 1.75 0 0 1-1.75-1.75V4.75zm1.75-.25a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25V4.75a.25.25 0 0 0-.25-.25h-1.5zm4.25.25C7.5 3.784 8.284 3 9.25 3h1.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0 1 10.75 17h-1.5a1.75 1.75 0 0 1-1.75-1.75V4.75zm1.75-.25a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25V4.75a.25.25 0 0 0-.25-.25h-1.5zm6-1.5a1.75 1.75 0 0 0-1.75 1.75v10.5c0 .966.784 1.75 1.75 1.75h1.5a1.75 1.75 0 0 0 1.75-1.75V4.75A1.75 1.75 0 0 0 16.75 3h-1.5zM15 4.75a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v10.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V4.75z"}),e.jsx("title",{children:"3 Column"})]}),Zt=t=>e.jsx(O,{component:po,...t}),mo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M2.75 3c-.69 0-1.25.56-1.25 1.25v11.5c0 .69.56 1.25 1.25 1.25h1C4.44 17 5 16.44 5 15.75V4.25C5 3.56 4.44 3 3.75 3h-1zM3 4.75a.25.25 0 0 1 .5 0v10.5a.25.25 0 1 1-.5 0V4.75zM7.25 3C6.56 3 6 3.56 6 4.25v11.5c0 .69.56 1.25 1.25 1.25h1c.69 0 1.25-.56 1.25-1.25V4.25C9.5 3.56 8.94 3 8.25 3h-1zm.25 1.75a.25.25 0 0 1 .5 0v10.5a.25.25 0 1 1-.5 0V4.75zm3-.5c0-.69.56-1.25 1.25-1.25h1c.69 0 1.25.56 1.25 1.25v11.5c0 .69-.56 1.25-1.25 1.25h-1c-.69 0-1.25-.56-1.25-1.25V4.25zm1.75.25a.25.25 0 0 0-.25.25v10.5a.25.25 0 1 0 .5 0V4.75a.25.25 0 0 0-.25-.25zm4-1.5C15.56 3 15 3.56 15 4.25v11.5c0 .69.56 1.25 1.25 1.25h1c.69 0 1.25-.56 1.25-1.25V4.25c0-.69-.56-1.25-1.25-1.25h-1zm.25 1.75a.25.25 0 1 1 .5 0v10.5a.25.25 0 1 1-.5 0V4.75z"}),e.jsx("title",{children:"4 Column"})]}),Wt=t=>e.jsx(O,{component:mo,...t}),go=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M1.5 5.5A2.5 2.5 0 0 1 4 3h5a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 9 17H4a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h5a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zM12.5 5.5A2.5 2.5 0 0 1 15 3h1a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 16 17h-1a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"}),e.jsx("title",{children:"2 Columns left split"})]}),Qt=t=>e.jsx(O,{component:go,...t}),ho=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M8.5 5.5A2.5 2.5 0 0 1 11 3h5a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 16 17h-5a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h5a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zM1.5 5.5A2.5 2.5 0 0 1 4 3h1a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 5 17H4a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"}),e.jsx("title",{children:"2 Columns right split"})]}),$t=t=>e.jsx(O,{component:ho,...t}),bo=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M14 4h.5a1.5 1.5 0 0 1 0 3H14a7 7 0 0 0-6.996 6.76L7 14v.5a1.5 1.5 0 0 1-3 0V14C4 8.477 8.477 4 14 4z",fill:"#979797",fillRule:"nonzero"})}),yo=t=>e.jsx(O,{component:bo,...t}),fo=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M14 15h.5a1.5 1.5 0 0 0 0-3H14a7 7 0 0 1-6.996-6.76L7 5v-.5a1.5 1.5 0 0 0-3 0V5c0 5.523 4.477 10 10 10z",fill:"#979797",fillRule:"nonzero"})}),xo=t=>e.jsx(O,{component:fo,...t}),jo=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M5 4h-.5a1.5 1.5 0 0 0 0 3H5a7 7 0 0 1 6.996 6.76L12 14v.5a1.5 1.5 0 0 0 3 0V14C15 8.477 10.523 4 5 4z",fill:"#979797",fillRule:"nonzero"})}),vo=t=>e.jsx(O,{component:jo,...t}),Co=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M5 15h-.5a1.5 1.5 0 0 1 0-3H5a7 7 0 0 0 6.996-6.76L12 5v-.5a1.5 1.5 0 0 1 3 0V5c0 5.523-4.477 10-10 10z",fill:"#979797",fillRule:"nonzero"})}),wo=t=>e.jsx(O,{component:Co,...t}),_o=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M17 6.733h-.93c0-1.866-1.87-2.333-4.203-2.333v9.47c0 .763.464 1.45 1.173 1.733l1.16.464V17H5.8v-.933l1.16-.464a1.867 1.867 0 0 0 1.173-1.733V4.4c-2.333 0-4.2.467-4.2 2.333H3V3h14v3.733z"})}),Mo=t=>e.jsx(O,{component:_o,...t}),ko=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M18 4.5A2.5 2.5 0 0 0 15.5 2h-11A2.5 2.5 0 0 0 2 4.5v11A2.5 2.5 0 0 0 4.5 18h11a2.5 2.5 0 0 0 2.5-2.5v-11zm-13.5-1a1 1 0 0 0-1 1v9.732l2.66-2.85a1 1 0 0 1 1.3-.14l1.81 1.252a1 1 0 0 0 1.318-.16l2.485-2.817a1 1 0 0 1 1.428-.073l1.999 1.845V4.5a1 1 0 0 0-1-1h-11zm1 3.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0z"})}),So=t=>e.jsx(O,{component:ko,...t}),Lo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fill:"currentColor",d:"M18 5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 2 5v5a2.5 2.5 0 0 0 2.5 2.5h3.654L8.038 11H4.5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v5c0 .261-.1.499-.264.677l1.203.902c.35-.43.561-.98.561-1.579V5z"}),e.jsx("path",{fill:"currentColor",d:"M9.706 8.116l.929 8.48c.012.109.148.15.22.068L12.62 14.6l1.667 2.887a.833.833 0 1 0 1.443-.833l-1.667-2.887 2.67-.498a.125.125 0 0 0 .051-.223L9.904 8a.125.125 0 0 0-.198.115z"})]}),To=t=>e.jsx(O,{component:Lo,...t}),Io=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fill:"currentColor",d:"M9.836 4.561a.25.25 0 0 1 .328 0l1.927 1.67a.25.25 0 0 1-.163.438H8.072a.25.25 0 0 1-.163-.439l1.927-1.669zM2 8.42h16v3H2v-3zM9.836 15.277a.25.25 0 0 0 .328 0l1.927-1.669a.25.25 0 0 0-.163-.439H8.072a.25.25 0 0 0-.163.44l1.927 1.668z"})}),Ao=t=>e.jsx(O,{component:Io,...t}),Eo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fill:"currentColor",d:"M9.836 2.161a.25.25 0 0 1 .328 0l1.927 1.67a.25.25 0 0 1-.163.438H8.072a.25.25 0 0 1-.163-.439l1.927-1.669z"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M18 8.02a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 2 8.02v4a2.5 2.5 0 0 0 2.5 2.5h11a2.5 2.5 0 0 0 2.5-2.5v-4zm-13.5-1a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-11z"}),e.jsx("path",{fill:"currentColor",d:"M9.836 17.878a.25.25 0 0 0 .328 0l1.927-1.67a.25.25 0 0 0-.163-.439H8.072a.25.25 0 0 0-.163.44l1.927 1.669z"})]}),Do=t=>e.jsx(O,{component:Eo,...t}),No=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fill:"currentColor",d:"M15.5 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM12.22 6.224c.179.48.46.909.816 1.262L9.916 9.23a3.485 3.485 0 0 0-.64-1.361l2.944-1.645zM9 10a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0zM18 15a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0zM9.854 11.005c-.147.491-.4.937-.73 1.31l3.022 1.68c.147-.491.4-.937.73-1.31l-3.022-1.68z"})}),Fo=t=>e.jsx(O,{component:No,...t}),Oo=[{type:"column",value:"mj-column-1",label:"1_column",icon:e.jsx(Vt,{})},{type:"column",value:"mj-column-2",label:"2_columns",icon:e.jsx(Jt,{})},{type:"column",value:"mj-column-3",label:"3_columns",icon:e.jsx(Zt,{})},{type:"column",value:"mj-column-4",label:"4_columns",icon:e.jsx(Wt,{})},{type:"column",value:"mj-column-left",label:"left_columns",icon:e.jsx(Qt,{})},{type:"column",value:"mj-column-right",label:"right_columns",icon:e.jsx($t,{})}],zo=[{type:"basic",value:"mj-text",label:"text",icon:e.jsx(Mo,{})},{type:"basic",value:"mj-image",label:"image",icon:e.jsx(So,{})},{type:"basic",value:"mj-button",label:"button",icon:e.jsx(To,{})},{type:"basic",value:"mj-divider",label:"divider",icon:e.jsx(Ao,{})},{type:"basic",value:"mj-spacer",label:"spacer",icon:e.jsx(Do,{})},{type:"basic",value:"mj-social",label:"social",icon:e.jsx(Fo,{})}],Ro=()=>{const{t}=R();return e.jsxs("div",{style:{margin:10},children:[e.jsx(d.Typography.Title,{level:5,children:t("basic.add_component")}),e.jsxs(e.Fragment,{children:[e.jsx(d.Typography.Text,{strong:!0,children:t("basic.layout_component")}),e.jsx(Gt,{value:Oo})]}),e.jsxs(e.Fragment,{children:[e.jsx(d.Typography.Text,{strong:!0,children:t("basic.basic_component")}),e.jsx(Gt,{value:zo})]})]})},{Text:fe}=d.Typography,Bo=()=>{const{t}=R();return e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.body_style")}),e.jsx(d.Form.Item,{name:"background-color",label:e.jsx(fe,{strong:!0,children:t("property.background_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(V,{name:"width",label:e.jsx(fe,{strong:!0,children:t("property.width")})}),e.jsx(B,{children:t("basic.public_style")}),e.jsx(dt,{name:"all_font-family"}),e.jsx(d.Form.Item,{name:"all_color",label:e.jsx(fe,{strong:!0,children:t("property.font_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(d.Form.Item,{name:"button_background-color",label:e.jsx(fe,{strong:!0,children:t("property.button_background_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(d.Form.Item,{name:"button_color",label:e.jsx(fe,{strong:!0,children:t("property.button_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(d.Form.Item,{name:"section_background-color",label:e.jsx(fe,{strong:!0,children:t("property.section_background_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]})},{Text:xe}=d.Typography,Po=()=>{const{t}=R(),{property:r,setProperty:n}=ce();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.button_style")}),e.jsx(d.Form.Item,{labelCol:{span:24},name:"href",label:e.jsx(xe,{strong:!0,children:t("property.button_link")}),style:{marginBottom:6},children:e.jsx(d.Input,{placeholder:"https://www.example.com"})}),e.jsx(d.Form.Item,{name:"target",valuePropName:"checked",normalize:i=>i?"_blank":void 0,style:{textAlign:"left"},children:e.jsx(d.Checkbox,{children:t("basic.open_link_new_tab")})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.styles")}),e.jsxs(d.Flex,{justify:"space-between",style:{marginBottom:24},children:[e.jsx(xe,{strong:!0,children:t("property.full_width")}),e.jsx(d.Switch,{value:!ye(r==null?void 0:r.width),onChange:i=>{n({...r,width:i?"100%":""})}})]}),e.jsx(d.Form.Item,{name:"background-color",label:e.jsx(xe,{strong:!0,children:t("property.background_color")}),normalize:i=>i.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(Ue,{}),e.jsx(tr,{})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.text_style")}),e.jsx(V,{step:1,name:"font-size",label:e.jsx(xe,{strong:!0,children:t("property.font_size")})}),e.jsx(V,{name:"line-height",options:["px","%","-"],label:e.jsx(xe,{strong:!0,children:t("property.line_height")}),step:.1}),e.jsx(d.Form.Item,{name:"color",label:e.jsx(xe,{strong:!0,children:t("property.font_color")}),normalize:i=>i.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Le,{}),e.jsx(je,{})]})]})},{Text:st}=d.Typography,Ho=()=>{const{t}=R();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.divider_style")}),e.jsx(V,{name:"width",percentMax:100,options:["px","%"],label:e.jsx(st,{strong:!0,children:t("property.width")})}),e.jsx(V,{step:1,name:"border-width",label:e.jsx(st,{strong:!0,children:t("property.border_width")})}),e.jsx(d.Form.Item,{name:"border-color",label:e.jsx(st,{strong:!0,children:t("property.border_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Le,{}),e.jsx(je,{})]})]})},{Text:Xt}=d.Typography,Uo=()=>{const{t}=R();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.image_style")}),e.jsx(ir,{name:"src",label:t("property.image_source")}),e.jsx(d.Form.Item,{labelCol:{span:24},name:"href",label:e.jsx(Xt,{strong:!0,children:t("property.image_link")}),style:{marginBottom:6},children:e.jsx(d.Input,{placeholder:"https://www.example.com"})}),e.jsx(d.Form.Item,{name:"target",valuePropName:"checked",normalize:r=>r?"_blank":void 0,style:{textAlign:"left"},children:e.jsx(d.Checkbox,{children:t("basic.open_link_new_tab")})}),e.jsx(d.Form.Item,{labelCol:{span:24},name:"alt",label:e.jsx(Xt,{strong:!0,children:t("property.alt_text")}),children:e.jsx(d.Input,{placeholder:t("basic.alt_text_plc")})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.size")}),e.jsx(tn,{}),e.jsx(Ue,{})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Le,{}),e.jsx(je,{})]})]})},{Text:Kt}=d.Typography,qt={"padding-top":0,"padding-right":0,"padding-bottom":0,"padding-left":0},je=()=>{const{t}=R(),[r,n]=f.useState(!1),{property:i,setProperty:o}=ce(),a=f.useMemo(()=>{const c={...qt};if(!i||Object.keys(i).length==0)return c;const p=i.padding;if(!p)return c;const g=p==null?void 0:p.split(" "),v=g.length;if(v==1)Object.keys(c).forEach(C=>{c[C]=parseInt(g[0])});else if(v==2){const C=parseInt(g[0]),M=parseInt(g[1]);c["padding-left"]=M,c["padding-right"]=M,c["padding-top"]=C,c["padding-bottom"]=C}else if(v==3){const C=parseInt(g[0]),M=parseInt(g[1]),I=parseInt(g[2]);c["padding-left"]=M,c["padding-right"]=M,c["padding-top"]=C,c["padding-bottom"]=I}else Object.keys(c).forEach((C,M)=>{c[C]=parseInt(g[M])});return c},[i]),{["padding-right"]:l,["padding-left"]:m,["padding-top"]:u,["padding-bottom"]:y}=a,x=[u,l,y,m],b=(c,p)=>{let g=null;if(p==="padding")g={...i,padding:`${c}px ${c}px ${c}px ${c}px`};else{const v=Object.assign(a,{[p]:c});g={...i,padding:`${v["padding-top"]}px ${v["padding-right"]}px ${v["padding-bottom"]}px ${v["padding-left"]}px`}}o(g)};return f.useEffect(()=>{!r&&n(!(m===l&&l===u&&u===y))},[a]),e.jsxs(e.Fragment,{children:[e.jsxs(d.Flex,{align:"center",justify:"space-between",children:[e.jsx(Kt,{strong:!0,children:t("property.padding")}),r?e.jsx(d.Button,{style:{paddingRight:0},onClick:()=>{const c=Math.min(...x),p=`${c}px ${c}px ${c}px ${c}px`;n(!1),o({...i,padding:p})},type:"link",children:t("basic.less_option")}):e.jsxs(d.Flex,{align:"center",children:[e.jsx(d.Button,{style:{paddingRight:5},onClick:()=>n(!0),type:"link",children:t("basic.more_option")}),e.jsx(V,{hasForm:!1,value:Math.min(...x),onChange:c=>b(c??0,"padding")})]})]}),r&&e.jsx(d.Flex,{wrap:!0,justify:"space-between",children:Object.keys(qt).map((c,p)=>e.jsxs(d.Flex,{align:"center",style:{marginTop:12},children:[e.jsx(Kt,{style:{width:50,textAlign:"left"},children:t(`property.${c.split("-")[1]}`)}),e.jsx(V,{hasForm:!1,style:{width:80},value:x[p],onChange:g=>b(g??0,c)})]},c))})]})},{Text:Pe}=d.Typography,Yo=()=>{const{t}=R(),{appData:r,setAppData:n}=ae(),{focusNode:i}=oe(),o=[{key:"1",icon:e.jsx(Vt,{})},{key:"2",icon:e.jsx(Jt,{})},{key:"3",icon:e.jsx(Zt,{})},{key:"4",icon:e.jsx(Wt,{})},{key:"left",icon:e.jsx(Qt,{})},{key:"right",icon:e.jsx($t,{})}],a=l=>{const m=se({node:i});n(Vr({appData:r,idx:m,column:l}))};return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.layout")}),e.jsx(d.Flex,{justify:"space-around",children:o.map(l=>e.jsx(d.Button,{type:"text",onClick:()=>a(l.key),style:{padding:"0px 6px"},children:l.icon},l.key))})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.section_style")}),e.jsx(d.Form.Item,{name:"full-width",label:e.jsx(Pe,{strong:!0,children:t("property.full_width")}),valuePropName:"checked",normalize:l=>l?"full-width":"",children:e.jsx(d.Switch,{})}),e.jsx(Ue,{}),e.jsx(tr,{}),e.jsx(d.Form.Item,{name:"background-color",label:e.jsx(Pe,{strong:!0,children:t("property.background_color")}),normalize:l=>l.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(ir,{name:"background-url",label:t("property.background_image")}),e.jsx(d.Form.Item,{name:"background-repeat",label:e.jsx(Pe,{strong:!0,children:t("property.background_repeat")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"repeat",label:t("property.repeat")},{value:"no-repeat",label:t("property.no_repeat")}]})}),e.jsx(d.Form.Item,{name:"background-size",label:e.jsx(Pe,{strong:!0,children:t("property.background_size")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"auto",label:t("property.auto")},{value:"cover",label:t("property.cover")},{value:"contain",label:t("property.contain")}]})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(je,{})]})]})},{Text:q}=d.Typography,er={facebook:{name:"facebook",href:"https://www.facebook.com/"},twitter:{name:"twitter",href:"https://www.twitter.com/"},x:{name:"x",href:"https://www.twitter.com/"},google:{name:"google",href:"https://www.google.com/"},pinterest:{name:"pinterest",href:"https://www.pinterest.com/"},linkedin:{name:"linkedin",href:"https://www.linkedin.com/"},tumblr:{name:"tumblr",href:"https://www.tumblr.com/"},xing:{name:"xing",href:"https://www.xing.com/"},github:{name:"github",href:"https://www.github.com/"},instagram:{name:"instagram",href:"https://www.instagram.com/"},web:{name:"web",href:"https://www.web.com/"},snapchat:{name:"snapchat",href:"https://www.snapchat.com/"},youtube:{name:"youtube",href:"https://www.youtube.com/"},vimeo:{name:"vimeo",href:"https://www.vimeo.com/"},medium:{name:"medium",href:"https://www.medium.com/"},soundcloud:{name:"soundcloud",href:"https://www.soundcloud.com/"},dribbble:{name:"dribbble",href:"https://www.dribbble.com/"},custom:{name:"custom",href:"",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAQAAAD/5HvMAAACDUlEQVR4Ae3BP0tqcQDH4a8NCUHWUg1tElGBEvRvDhoaIlp6BSFmtFdzk29BKgQJCXoBLU1FBIE1ByVFFC5Cehoi7HMRrnAwDY+e3z3CPc8jn8/n8/0fmGVW3YQUKXUP+ilTpl/dgk2qNtUtyFGVU3dgjpo5dQMOqDmQ9whhUWMRktdIYJeQ17jF7lbeYp568/ISh9Q7lHcIYVHPIiSvsEUjW/IKdzRyJ2+wQDML8gJHNHOkf48BPmjmgwGZQIBBwsywxDpxdkmS4pRzcuQp8ZsSeXKcc0qKJLvEWWeJGcIMEpAzRDjjhgeKVDChQpEHbjgjotawQgnTSqyodUTIY1KeiJxhiEtMuWRIztFLGhPS9Kpd7FDBTRV21BlWKeOWMqvqHFGecMMTUbmDYa7o1BXDcg9BMnQiQ1BuY49v2vHNnsxgDQunLNZkDtMUcKLAtMziGSeeZRZhnArLJDZwakMmkcGpjEziBadeZA5jtGNMphCjHTGZwjHtOJYpvNJMmjTNvMoMxmnsnkVJYpF7GhuXCcT56ZN9gvqLIPt88lNcJpCl3gWTqsMkF9TLygTesCsSI6AGCBCjiN2b3McEdllG9AtGyGI3IbeRoOaRZbWAZR6pSchtnFD1RZI+tYg+knxRdSK3UQCuicoholwDBbmLKd7ZpkdtoIdt3pmSm4gwqg4wSkQ+n8/n85nwB8QLTUFkdp6OAAAAAElFTkSuQmCC","background-color":"#c1c1c1"}},Go=()=>{var b;const{t}=R(),{appData:r,setAppData:n}=ae(),{focusNode:i}=oe(),o=se({node:i}),a=Nt({appData:r,idx:o}),l=(c,p,g,v)=>{let C=null;if(p==="content")C=Bt({appData:r,idx:o,content:g,index:c});else{const M=p==="name"?er[g]:{...v,[p]:g};C=Rt({appData:r,idx:o,property:M,index:c})}n(C)},m=()=>{n(Jr({appData:r,idx:o,value:{tagName:"mj-social-element",attributes:er.custom,content:""}}))},u=c=>{n(Pt({appData:r,idx:o,originIndex:c,targetIndex:c-1}))},y=c=>{n(Pt({appData:r,idx:o,originIndex:c,targetIndex:c+1}))},x=c=>{n(Zr({appData:r,idx:o,index:c}))};return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.content")}),(b=a==null?void 0:a.children)==null?void 0:b.map((c,p)=>{var v,C,M,I;const g=c.attributes;return e.jsxs(d.Card,{style:{marginBottom:12},styles:{header:{textAlign:"left",padding:"0 12px",minHeight:46},body:{padding:"12px"}},title:g.name,extra:e.jsxs(d.Flex,{gap:4,children:[e.jsx(d.Button,{type:"text",style:{padding:"2px 8px"},disabled:p===0||((v=a==null?void 0:a.children)==null?void 0:v.length)===1,onClick:()=>u(p),children:e.jsx(O.UpOutlined,{})}),e.jsx(d.Button,{type:"text",style:{padding:"2px 8px"},disabled:p===(((C=a==null?void 0:a.children)==null?void 0:C.length)??1)-1||((M=a==null?void 0:a.children)==null?void 0:M.length)===1,onClick:()=>y(p),children:e.jsx(O.DownOutlined,{})}),e.jsx(d.Button,{type:"text",style:{padding:"2px 8px"},disabled:((I=a==null?void 0:a.children)==null?void 0:I.length)===1,onClick:()=>x(p),children:e.jsx(O.DeleteOutlined,{})})]}),children:[e.jsxs(d.Flex,{justify:"space-between",align:"center",children:[e.jsx(q,{strong:!0,children:t("property.network")}),e.jsx(d.Select,{value:g.name,style:{width:150,textAlign:"left"},options:[{value:"facebook",label:"Facebook"},{value:"twitter",label:"Twitter(X)"},{value:"x",label:"X"},{value:"google",label:"Google"},{value:"pinterest",label:"Pinterest"},{value:"linkedin",label:"Linkedin"},{value:"tumblr",label:"Tumblr"},{value:"xing",label:"Xing"},{value:"github",label:"Github"},{value:"instagram",label:"Instagram"},{value:"web",label:"Web"},{value:"snapchat",label:"Snapchat"},{value:"youtube",label:"Youtube"},{value:"vimeo",label:"Vimeo"},{value:"medium",label:"Medium"},{value:"soundcloud",label:"Soundcloud"},{value:"dribbble",label:"Dribbble"},{value:"custom",label:t("property.custom")}],onChange:D=>l(p,"name",D,g)})]}),e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.label")}),e.jsx(d.Input,{value:c.content,style:{width:150},placeholder:t("basic.social_label_plc"),onChange:D=>l(p,"content",D.target.value,g)})]}),e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.url")}),e.jsx(d.Input,{value:g.href,style:{width:150},placeholder:t("basic.social_url_plc"),onChange:D=>l(p,"href",D.target.value,g)})]}),g.name==="custom"&&e.jsxs(e.Fragment,{children:[e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.icon")}),e.jsx(d.Input,{value:g==null?void 0:g.src,style:{width:150},placeholder:t("basic.social_icon"),onChange:D=>l(p,"src",D.target.value,g)})]}),e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.icon_color")}),e.jsx(d.ColorPicker,{value:g==null?void 0:g["background-color"],onChange:(D,N)=>{l(p,"background-color",N,g)},showText:!0})]})]})]},`${g.name}-${p}`)}),e.jsx(d.Button,{icon:e.jsx(O.PlusOutlined,{}),style:{width:"100%"},type:"default",onClick:m,children:t("basic.add_social")})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.social_style")}),e.jsx(V,{step:1,name:"icon-size",label:e.jsx(q,{strong:!0,children:t("property.icon_size")})}),e.jsx(V,{step:1,name:"icon-padding",label:e.jsx(q,{strong:!0,children:t("property.icon_padding")})}),e.jsx(Ue,{}),e.jsx(V,{step:1,name:"inner-padding",label:e.jsx(q,{strong:!0,children:t("property.inner_padding")})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.text_style")}),e.jsx(dt,{}),e.jsx(V,{step:1,name:"font-size",label:e.jsx(q,{strong:!0,children:t("property.font_size")})}),e.jsx(d.Form.Item,{name:"color",label:e.jsx(q,{strong:!0,children:t("property.font_color")}),normalize:c=>c.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(d.Form.Item,{name:"mode",label:e.jsx(q,{strong:!0,children:t("property.mode")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"vertical",label:t("property.vertical")},{value:"horizontal",label:t("property.horizontal")}]})}),e.jsx(Le,{}),e.jsx(je,{})]})]})},{Text:Vo}=d.Typography,Jo=()=>{const{t}=R();return e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.spacer_style")}),e.jsx(V,{name:"height",label:e.jsx(Vo,{strong:!0,children:t("property.height")})})]})},{Text:lt}=d.Typography,Zo=()=>{const{t}=R();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.text_style")}),e.jsx(dt,{}),e.jsx(V,{step:1,name:"font-size",label:e.jsx(lt,{strong:!0,children:t("property.font_size")})}),e.jsx(V,{name:"line-height",options:["px","%","-"],label:e.jsx(lt,{strong:!0,children:t("property.line_height")}),step:.1}),e.jsx(d.Form.Item,{name:"color",label:e.jsx(lt,{strong:!0,children:t("property.font_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Le,{}),e.jsx(je,{})]})]})},{Text:Wo}=d.Typography,Le=()=>{const{t}=R();return e.jsx(d.Form.Item,{name:"align",label:e.jsx(Wo,{strong:!0,children:t("property.align")}),children:e.jsxs(d.Radio.Group,{children:[e.jsx(d.Radio.Button,{value:"left",children:t("property.left")}),e.jsx(d.Radio.Button,{value:"center",children:t("property.center")}),e.jsx(d.Radio.Button,{value:"right",children:t("property.right")})]})})},{Text:He}=d.Typography,Qo="1px solid #000",$o=[{label:"top",value:"border-top"},{label:"bottom",value:"border-bottom"},{label:"left",value:"border-left"},{label:"right",value:"border-right"}],Xo=[{label:"Solid",value:"solid"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"rigde"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"},{label:"Hidden",value:"hidden"}],tr=()=>{const{t}=R(),[r,n]=f.useState(!1),{property:i,setProperty:o}=ce(),a=(i==null?void 0:i.border)&&(i==null?void 0:i.border)!=="none",{borderWidth:l,borderStyle:m,borderColor:u}=f.useMemo(()=>{const p=a?i==null?void 0:i.border:Qo,[g,v,C]=p.split(" ");return{borderWidth:g,borderStyle:v,borderColor:C}},[i]),y=f.useMemo(()=>{const p=["border-top","border-bottom","border-left","border-right"];if(!i||Object.keys(i).length==0)return p;const g={"border-top":i["border-top"],"border-bottom":i["border-bottom"],"border-left":i["border-left"],"border-right":i["border-right"]};return Object.keys(g).filter(v=>g[v]===void 0)},[i]),x=(p,g)=>{const v=Object.assign({borderWidth:l,borderStyle:m,borderColor:u},{[g]:p}),C=`${v.borderWidth} ${v.borderStyle} ${v.borderColor}`;o({...i,border:C})},b=p=>{n(p);const g=p?`${l} ${m} ${u}`:"";o({...i,border:g})},c=p=>{if(y.length>p.length){const g=y.filter(C=>!p.includes(C)),v={};g.forEach(C=>{v[C]="none"}),o({...i,...v})}else p.filter(v=>!y.includes(v)).forEach(v=>{delete i[v]}),o({...i})};return f.useEffect(()=>{n(!!a)},[i]),e.jsxs("div",{style:{marginBottom:24},children:[e.jsxs(d.Flex,{align:"center",justify:"space-between",children:[e.jsx(He,{strong:!0,children:t("property.border")}),e.jsx(d.Switch,{value:!!a,onChange:b})]}),r&&e.jsxs(d.Card,{style:{width:"100%",marginTop:6},styles:{body:{padding:16}},children:[e.jsx(qo,{style:{marginBottom:12},value:y,options:$o,onChange:c}),e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{marginBottom:12},children:[e.jsx(He,{strong:!0,children:t("property.border_width")}),e.jsx(V,{hasForm:!1,step:1,value:parseInt(l),onChange:p=>{x(`${p??0}px`,"borderWidth")}})]}),e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{marginBottom:12},children:[e.jsx(He,{strong:!0,children:t("property.border_style")}),e.jsx(d.Select,{value:m,style:{width:100,textAlign:"left"},options:Xo,onChange:p=>{x(p,"borderStyle")}})]}),e.jsxs(d.Flex,{align:"center",justify:"space-between",children:[e.jsx(He,{strong:!0,children:t("property.border_color")}),e.jsx(d.ColorPicker,{showText:!0,value:u,onChange:(p,g)=>{x(g,"borderColor")}})]})]})]})},{Text:Ko}=d.Typography,at={"radius-top":0,"radius-right":0,"radius-bottom":0,"radius-left":0},rr={"radius-top":e.jsx(yo,{}),"radius-right":e.jsx(vo,{}),"radius-bottom":e.jsx(wo,{}),"radius-left":e.jsx(xo,{})},Ue=()=>{const{t}=R(),[r,n]=f.useState(!1),{property:i,setProperty:o}=ce(),a=f.useMemo(()=>{const c={...at};if(!i||Object.keys(i).length==0)return c;const p=i["border-radius"];if(!p)return c;const g=p.split(" "),v=g.length;if(v==1)Object.keys(c).forEach(C=>{c[C]=parseInt(g[0])});else if(v==2){const C=parseInt(g[0]),M=parseInt(g[1]);c["radius-left"]=M,c["radius-right"]=M,c["radius-top"]=C,c["radius-bottom"]=C}else if(v==3){const C=parseInt(g[0]),M=parseInt(g[1]),I=parseInt(g[2]);c["radius-left"]=M,c["radius-right"]=M,c["radius-top"]=C,c["radius-bottom"]=I}else Object.keys(c).forEach((C,M)=>{c[C]=parseInt(g[M])});return c},[i]),{["radius-right"]:l,["radius-left"]:m,["radius-top"]:u,["radius-bottom"]:y}=a,x=[u,l,y,m],b=(c,p)=>{let g=null;if(p==="radius")g={...i,"border-radius":`${c}px ${c}px ${c}px ${c}px`};else{const v=Object.assign(a,{[p]:c});g={...i,"border-radius":`${v["radius-top"]}px ${v["radius-right"]}px ${v["radius-bottom"]}px ${v["radius-left"]}px`}}o(g)};return f.useEffect(()=>{!r&&n(!(y===m&&m===l&&l===u))},[a]),e.jsxs("div",{style:{marginBottom:24},children:[e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{marginBottom:12},children:[e.jsx(Ko,{strong:!0,children:t("property.border_radius")}),r?e.jsx(d.Button,{style:{paddingRight:0},onClick:()=>{const c=Math.min(...x),p=`${c}px ${c}px ${c}px ${c}px`;n(!1),o({...i,"border-radius":p})},type:"link",children:t("basic.less_option")}):e.jsxs(d.Flex,{align:"center",children:[e.jsx(d.Button,{style:{paddingRight:5},onClick:()=>n(!0),type:"link",children:t("basic.more_option")}),e.jsx(V,{hasForm:!1,style:{width:74},step:1,value:Math.min(...x),onChange:c=>b(c??0,"radius")})]})]}),r&&e.jsxs(e.Fragment,{children:[e.jsx(d.Flex,{wrap:!0,justify:"space-between",align:"center",gap:12,children:Object.keys(at).slice(0,2).map((c,p)=>e.jsxs(d.Flex,{gap:12,style:{flexDirection:p%2===0?"row-reverse":"row"},children:[rr[c],e.jsx(V,{hasForm:!1,style:{width:85},value:x[p],step:1,onChange:g=>b(g??0,c)})]},p))}),e.jsx(d.Flex,{wrap:!0,justify:"space-between",align:"center",gap:12,style:{flexDirection:"row-reverse",marginTop:12},children:Object.keys(at).slice(2).map((c,p)=>e.jsxs(d.Flex,{gap:12,style:{flexDirection:p==0?"row":"row-reverse"},children:[rr[c],e.jsx(V,{hasForm:!1,style:{width:85},value:x[p+2],step:1,onChange:g=>b(g??0,c)})]},p))})]})]})},B=({children:t})=>e.jsx(d.Divider,{orientation:"left",orientationMargin:"0",children:e.jsx(d.Typography.Text,{type:"secondary",children:t})}),qo=({style:t,value:r,options:n,onChange:i})=>{const{token:o}=d.theme.useToken(),{t:a}=R();return e.jsx(d.Flex,{style:t,justify:"space-between",align:"center",children:n.map(l=>{const m=r.includes(l.value);return e.jsx("div",{onClick:()=>{i(m?r.filter(u=>u!==l.value):[...r,l.value])},style:{width:55,border:`1px solid ${m?o.colorPrimaryBorder:o.colorBorder}`,backgroundColor:m?o.colorPrimaryBg:"transparent",color:m?o.colorPrimaryText:o.colorText,cursor:"pointer",borderRadius:"4px",textAlign:"center"},children:a(`property.${l.label}`)},l.value)})})},ct=[{value:"px",label:"px",className:"easy-mail-input-number-select-option"},{value:"%",label:"%",className:"easy-mail-input-number-select-option"},{value:"",label:"-",className:"easy-mail-input-number-select-option"}],or=10,V=({hasForm:t=!0,name:r,options:n,style:i,step:o=or,label:a,value:l,percentMax:m,onChange:u})=>{const{property:y}=ce(),x=y==null?void 0:y[r],b=n?n.map(v=>ct.find(C=>C.label===v)):[ct[0]],c=()=>{var v,C;return((v=String(x))!=null&&v.includes("%")||(C=String(x))!=null&&C.includes("px"))&&o===.1?or:o},p=e.jsx(d.InputNumber,{min:0,max:m,step:c(),style:i,className:"easy-mail-input-number-input",value:l,onChange:u}),g=e.jsx(d.Select,{value:"px",allowClear:!1,suffixIcon:!1,className:"easy-mail-input-number-select",variant:"borderless",options:t?b:[ct[0]],dropdownStyle:{padding:0}});return e.jsx("div",{style:{position:"relative"},children:t?e.jsxs(e.Fragment,{children:[e.jsx(d.Form.Item,{name:r,label:a,children:p}),e.jsx(d.Form.Item,{name:`${r}_unit`,style:{position:"absolute",right:25,top:0,width:20,marginBottom:0,zIndex:99},children:g})]}):e.jsxs(e.Fragment,{children:[p,e.jsx("div",{style:{position:"absolute",right:25,top:0,width:20,marginBottom:0,zIndex:99},children:g})]})})},{Text:en}=d.Typography,dt=({name:t="font-family"})=>{const{t:r}=R();return e.jsx(d.Form.Item,{name:t,label:e.jsx(en,{strong:!0,children:r("property.font_family")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"arial",label:e.jsx("span",{style:{fontFamily:"arial"},children:"Arial"})},{value:"serif ",label:e.jsx("span",{style:{fontFamily:"serif"},children:"Serif"})},{value:"sans-serif",label:e.jsx("span",{style:{fontFamily:"sans-serif"},children:"Sansserif"})},{value:"monospace",label:e.jsx("span",{style:{fontFamily:"monospace"},children:"Monospace"})},{value:"cursive",label:e.jsx("span",{style:{fontFamily:"cursive"},children:"Cursive"})},{value:"fantasy",label:e.jsx("span",{style:{fontFamily:"fantasy"},children:"Fantasy"})},{value:"emoji",label:e.jsx("span",{style:{fontFamily:"emoji"},children:"Emoji"})},{value:"math",label:e.jsx("span",{style:{fontFamily:"math"},children:"Math"})},{value:"fangsong",label:e.jsx("span",{style:{fontFamily:"fangsong"},children:"仿宋"})}]})})},{Text:nr}=d.Typography,tn=()=>{const{t}=R(),{property:r,setProperty:n}=ce(),[i,o]=f.useState(!1),{width:a}=f.useMemo(()=>!r||Object.keys(r).length==0?{width:""}:{width:r.width||""},[r]);return f.useEffect(()=>{o(a!=="")},[a]),e.jsxs("div",{children:[e.jsxs(d.Flex,{justify:"space-between",style:{marginBottom:24},children:[e.jsx(nr,{strong:!0,children:t("property.full_width")}),e.jsx(d.Switch,{value:a==="",onChange:l=>{n({...r,width:l?"":"200px"})}})]}),i&&e.jsxs(d.Flex,{justify:"space-between",style:{marginBottom:24},children:[e.jsx(nr,{strong:!0,children:t("property.width")}),e.jsx(V,{hasForm:!1,value:parseInt(a),onChange:l=>{l&&n({...r,width:`${l}px`})}})]})]})},{Text:rn}=d.Typography,ir=({label:t,name:r})=>{const{t:n}=R(),{onUpload:i,onUploadFocusChange:o}=Fe(),{focusNode:a}=oe(),{setProperty:l}=ce(),[m,u]=f.useState(!1),y=()=>{const x=document.createElement("input");x.setAttribute("type","file"),x.setAttribute("accept",".png,.jpg,.jpeg,.webp"),x.click(),x.onchange=async()=>{var c;try{var b=(c=x.files)==null?void 0:c[0];let p="";u(!0),i?p=(await i(b)).url:p=await Wr(b),l({[r]:p}),u(!1)}catch(p){u(!1),console.error(p)}}};return f.useEffect(()=>()=>{m&&(o==null||o())},[a,m]),e.jsx(d.Form.Item,{className:"easy-marl-src-container",labelCol:{span:24},name:r,label:e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[e.jsx(rn,{strong:!0,children:t}),e.jsx(d.Button,{type:"link",icon:e.jsx(O.UploadOutlined,{}),style:{padding:0},loading:m,onClick:y,children:n("basic.upload_image")})]}),normalize:x=>x===""?void 0:x,children:e.jsx(d.Input,{placeholder:"https://www.example.com"})})},on={[S.MJ_BODY]:e.jsx(Bo,{}),[S.MJ_SECTION]:e.jsx(Yo,{}),[S.MJ_TEXT]:e.jsx(Zo,{}),[S.MJ_IMAGE]:e.jsx(Uo,{}),[S.MJ_BUTTON]:e.jsx(Po,{}),[S.MJ_DIVEDER]:e.jsx(Ho,{}),[S.MJ_SPACER]:e.jsx(Jo,{}),[S.MJ_SOCIAL]:e.jsx(Go,{})},nn=()=>{const{t}=R(),{token:r}=d.theme.useToken(),[n]=d.Form.useForm(),{focusNode:i}=oe(),{property:o,setProperty:a}=ce(),{appData:l}=ae(),m=(i==null?void 0:i.classList[0])??S.MJ_BODY;return f.useEffect(()=>{if(!o)return;const u=Object.keys(o);let y={};u.forEach(b=>{const c=o[b],p=String(c);Qr(p)||$r(p)?y[b]=c:typeof c=="number"?(y[b]=c,y[`${b}_unit`]=""):p.includes("px")?(y[b]=parseInt(c),y[`${b}_unit`]="px"):p.includes("%")?(y[b]=parseInt(c),y[`${b}_unit`]="%"):y[b]=c});const x=Pr(zt(l));m==S.MJ_BUTTON&&(y={...x[S.MJ_BUTTON],...y}),m==S.MJ_SECTION&&(y={...x[S.MJ_SECTION],...y}),y={...x["mj-all"],...y},n.setFieldsValue(y)},[o]),e.jsxs("div",{style:{padding:20},children:[e.jsxs(d.Row,{children:[e.jsx(d.Col,{style:{background:r.colorPrimary,width:4,marginRight:4}}),e.jsx(d.Col,{children:e.jsx(d.Typography.Title,{level:4,style:{margin:0},children:t(`block.${m==null?void 0:m.split("-")[1]}`).toUpperCase()})})]}),e.jsx(d.Form,{form:n,colon:!1,preserve:!1,style:{textAlign:"right"},onValuesChange:(u,y)=>{const x=Object.keys(y),b={};x.forEach(c=>{const p=y[c];if(!c.includes("unit"))b[c]=p;else{const g=c.split("_")[0];ye(p)||(b[g]=`${b[g]}${p}`)}}),a(b)},children:on[m]})]})},sn=()=>{const{token:t}=d.theme.useToken(),{t:r}=R(),{tab:n,setTab:i}=Yt(),o=[{key:"add",label:e.jsxs(d.Flex,{vertical:!0,align:"center",gap:4,style:{padding:"10px 0"},children:[e.jsx(O.PlusOutlined,{}),r("basic.add")]})},{key:"edit",label:e.jsxs(d.Flex,{vertical:!0,align:"center",gap:4,style:{padding:"10px 0"},children:[e.jsx(O.EditOutlined,{}),r("basic.edit")]})}];return e.jsxs(d.Flex,{style:{width:406,borderRight:`1px solid ${t.colorBorder}`,backgroundColor:t.colorBgContainer},children:[e.jsx("div",{style:{width:77,height:"100%"},children:e.jsx(d.Tabs,{style:{height:"100%",display:"block"},tabPosition:"left",items:o,activeKey:n,onChange:a=>{i(a)}})}),e.jsx("div",{style:{flex:1,overflow:"auto"},children:n==="add"?e.jsx(Ro,{}):e.jsx(nn,{})})]})},ln=t=>{const r=f.forwardRef((n,i)=>e.jsx(kr,{children:e.jsx(t,{...n,ref:i})}));return r.displayName=`withTranslation(${t.displayName||t.name||"Component"})`,r},an=f.forwardRef((t,r)=>{const{changeLanguage:n}=R(),i={...Qe,...t,value:ye(t.value)?Qe.value:t.value},{value:o,width:a,height:l,colorPrimary:m,skin:u,lang:y}=i,[x,b]=f.useState(()=>Ut(eo(typeof o=="string"?jt(o).json:o))),[c,p]=f.useState("add"),[g,v]=f.useState(null),[C,M]=f.useState(null),[I,D]=f.useState(null),N=f.useRef(null),$=f.useRef(null),H=f.useRef(null);f.useImperativeHandle(r,()=>({getData:()=>({json:x,mjml:to(x)})}));const U=`easy-mail-container ${u==="dark"?"dark":""}`;return f.useEffect(()=>{n(y??"en")},[y]),e.jsx(d.ConfigProvider,{theme:{algorithm:u==="light"?d.theme.defaultAlgorithm:d.theme.darkAlgorithm,token:{colorPrimary:m,colorBgBase:u==="dark"?"#5a5a5a":void 0},components:{Tabs:{verticalItemPadding:`8px ${y==="de"?"2px":"24px"}`}}},children:e.jsx("div",{className:U,style:{height:l,width:a},children:e.jsx(_t.Provider,{value:{...i},children:e.jsx(ue.Provider,{value:{appData:x,setAppData:b,tab:c,setTab:p,hoverNode:g,setHoverNode:v,focusNode:C,setFocusNode:M,dataTransfer:I,setDataTransfer:D},children:e.jsxs(wt.Provider,{value:{currentHoverNode:N,currentFocusNode:$,currentEmptyNode:H},children:[e.jsx(lo,{}),e.jsxs(d.Flex,{style:{height:"calc(100% - 40px)"},children:[e.jsx(sn,{}),e.jsx(Tr,{refMain:t.refMain})]})]})})})})})}),cn=ln(an),dn=Object.freeze(Object.defineProperty({__proto__:null,default:{"basic.add":"إضافة","basic.edit":"تحرير","basic.add_component":"إضافة مكون","basic.layout_component":"مكون تخطيط","basic.basic_component":"مكون أساسي","basic.empty_body":"لوحة فارغة - أسقط المحتوى هنا","basic.empty_column":"عمود فارغ","basic.empty_section":"قسم فارغ - أسقط المحتوى هنا","basic.empty_text_plc":"الرجاء إدخال نص","basic.drop_here":"أسقط هنا","basic.body_style":"أنماط الجسم","basic.public_style":"الإعدادات الافتراضية للقالب","basic.more_option":"المزيد من الخيارات","basic.less_option":"أقل خيارات","basic.upload_image":"تحميل صورة","basic.layout":"تخطيط","basic.section_style":"أنماط القسم","basic.position":"الموضع","basic.text_style":"أنماط النص","basic.image_style":"أنماط الصورة","basic.size":"الحجم","basic.button_style":"أنماط الزر","basic.styles":"الأنماط","basic.open_link_new_tab":"فتح الرابط في علامة تبويب جديدة","basic.divider_style":"أنماط الفاصل","basic.spacer_style":"أنماط المسافة","basic.content":"المحتوى","basic.add_social":"إضافة إجتماعي","basic.social_style":"أنماط الإجتماعي","basic.alt_text_plc":"أدخل نصًا","basic.social_label_plc":"تسمية الإجتماعي","basic.social_url_plc":"رابط الإجتماعي","basic.social_icon_plc":"أيقونة الإجتماعي","block.1_column":"عمود واحد","block.2_columns":"عمودان","block.3_columns":"ثلاثة أعمدة","block.4_columns":"أربعة أعمدة","block.left_columns":"تقسيم يساري","block.right_columns":"تقسيم يميني","block.text":"نص","block.image":"صورة","block.button":"زر","block.divider":"فاصل","block.spacer":"مسافة","block.social":"إجتماعي","block.body":"الجسم","block.section":"القسم","property.width":"العرض","property.background_color":"لون الخلفية","property.background_image":"صورة الخلفية","property.background_repeat":"تكرار الخلفية","property.background_size":"حجم الخلفية","property.border_radius":"نصف قطر الحدود","property.border":"الحدود","property.border_width":"عرض الحدود","property.border_style":"نمط الحدود","property.border_color":"لون الحدود","property.padding":"الحشو","property.top":"أعلى","property.right":"يمين","property.bottom":"أسفل","property.left":"يسار","property.font_family":"عائلة الخط","property.font_size":"حجم الخط","property.line_height":"ارتفاع السطر","property.font_color":"لون الخط","property.align":"محاذاة","property.center":"مركز","property.image_source":"مصدر الصورة","property.image_link":"رابط الصورة","property.alt_text":"نص بديل","property.full_width":"عرض كامل","property.button_link":"رابط الزر","property.height":"الارتفاع","property.network":"الشبكة","property.label":"التسمية","property.url":"الرابط","property.icon":"الأيقونة","property.icon_color":"لون الأيقونة","property.icon_size":"حجم الأيقونة","property.icon_padding":"حشو الأيقونة","property.inner_padding":"حشو داخلي","property.mode":"الوضع","property.custom":"مخصص","property.horizontal":"أفقي","property.vertical":"عمودي","property.repeat":"تكرار","property.no_repeat":"لا تكرار","property.auto":"تلقائي","property.cover":"تغطية","property.contain":"احتواء","property.button_background_color":"لون الزر","property.button_color":"لون نص الزر","property.section_background_color":"لون خلفية القسم"}},Symbol.toStringTag,{value:"Module"})),un=Object.freeze(Object.defineProperty({__proto__:null,default:{"basic.add":"Hinzufügen","basic.edit":"Bearbeiten","basic.add_component":"Komponente hinzufügen","basic.layout_component":"Layout-Komponente","basic.basic_component":"Grundlegende Komponente","basic.empty_body":"Leerer Leinwand - Inhalt hier ablegen","basic.empty_column":"Leere Spalte","basic.empty_section":"Leere Sektion - Inhalt hier ablegen","basic.empty_text_plc":"Bitte Text eingeben","basic.drop_here":"Hier ablegen","basic.body_style":"BODY-STYLES","basic.public_style":"VORLAGESTANDARDS","basic.more_option":"Mehr Optionen","basic.less_option":"Weniger Optionen","basic.upload_image":"Bild hochladen","basic.layout":"LAYOUT","basic.section_style":"SEKTION-STYLES","basic.position":"POSITION","basic.text_style":"TEXT-STYLES","basic.image_style":"BILD-STYLES","basic.size":"GRÖSSE","basic.button_style":"BUTTON-STYLES","basic.styles":"STYLES","basic.open_link_new_tab":"Link in neuem Tab öffnen","basic.divider_style":"TEILER-STYLES","basic.spacer_style":"SPACER-STYLES","basic.content":"INHALT","basic.add_social":"Sozial hinzufügen","basic.social_style":"SOZIAL-STYLES","basic.alt_text_plc":"Text eingeben","basic.social_label_plc":"Soziales Label","basic.social_url_plc":"Soziale URL","basic.social_icon_plc":"Soziales Icon","block.1_column":"1 Spalte","block.2_columns":"2 Spalten","block.3_columns":"3 Spalten","block.4_columns":"4 Spalten","block.left_columns":"Links geteilt","block.right_columns":"Rechts geteilt","block.text":"Text","block.image":"Bild","block.button":"Button","block.divider":"Teiler","block.spacer":"Spacer","block.social":"Sozial","block.body":"Body","block.section":"Sektion","property.width":"Breite","property.background_color":"Hintergrundfarbe","property.background_image":"Hintergrundbild","property.background_repeat":"Hintergrundwiederholung","property.background_size":"Hintergrundgröße","property.border_radius":"Randradius","property.border":"Rand","property.border_width":"Randbreite","property.border_style":"Randstil","property.border_color":"Randfarbe","property.padding":"Padding","property.top":"Oben","property.right":"Rechts","property.bottom":"Unten","property.left":"Links","property.font_family":"Schriftfamilie","property.font_size":"Schriftgröße","property.line_height":"Zeilenhöhe","property.font_color":"Schriftfarbe","property.align":"Ausrichtung","property.center":"Zentriert","property.image_source":"Bildquelle","property.image_link":"Bildlink","property.alt_text":"Alternativer Text","property.full_width":"Volle Breite","property.button_link":"Button-Link","property.height":"Höhe","property.network":"Netzwerk","property.label":"Label","property.url":"URL","property.icon":"Icon","property.icon_color":"Iconfarbe","property.icon_size":"Icongröße","property.icon_padding":"Icon-Padding","property.inner_padding":"Inneres Padding","property.mode":"Modus","property.custom":"Benutzerdefiniert","property.horizontal":"Horizontal","property.vertical":"Vertikal","property.repeat":"Wiederholen","property.no_repeat":"Nicht wiederholen","property.auto":"Automatisch","property.cover":"Abdecken","property.contain":"Enthalten","property.button_background_color":"Button-Farbe","property.button_color":"Button-Textfarbe","property.section_background_color":"Sektionshintergrundfarbe"}},Symbol.toStringTag,{value:"Module"})),pn=Object.freeze(Object.defineProperty({__proto__:null,default:{"basic.add":"Add","basic.edit":"Edit","basic.add_component":"Add Component","basic.layout_component":"Layout Component","basic.basic_component":"Basic Component","basic.empty_body":"Empty Canvas - Drop content here","basic.empty_column":"Empty Column","basic.empty_section":"Empty Section - Drop content here","basic.empty_text_plc":"Please enter text","basic.drop_here":"Drop here","basic.body_style":"BODY STYLES","basic.public_style":"TEMPLATE DEFAULTS","basic.more_option":"More Options","basic.less_option":"Less Options","basic.upload_image":"Upload Image","basic.layout":"LAYOUT","basic.section_style":"SECTION STYLES","basic.position":"POSITION","basic.text_style":"TEXT STYLES","basic.image_style":"IMAGE STYLES","basic.size":"SIZE","basic.button_style":"BUTTON STYLES","basic.styles":"STYLES","basic.open_link_new_tab":"Open link in new tab","basic.divider_style":"DIVIDER STYLES","basic.spacer_style":"SPACER STYLES","basic.content":"CONTENT","basic.add_social":"Add Social","basic.social_style":"SOCIAL STYLES","basic.alt_text_plc":"Enter a text","basic.social_label_plc":"Social Label","basic.social_url_plc":"Social URL","basic.social_icon_plc":"Social Icon","block.1_column":"1 Column","block.2_columns":"2 Column","block.3_columns":"3 Column","block.4_columns":"4 Column","block.left_columns":"Left Split","block.right_columns":"Right Split","block.text":"Text","block.image":"Image","block.button":"Button","block.divider":"Divider","block.spacer":"Spacer","block.social":"Social","block.body":"Body","block.section":"Section","property.width":"Width","property.background_color":"Background Color","property.background_image":"Background Image","property.background_repeat":"Background Repeat","property.background_size":"Background Size","property.border_radius":"Border Radius","property.border":"Border","property.border_width":"Border Width","property.border_style":"Border Style","property.border_color":"Border Color","property.padding":"Padding","property.top":"Top","property.right":"Right","property.bottom":"Bottom","property.left":"Left","property.font_family":"Font Family","property.font_size":"Font Size","property.line_height":"Line Height","property.font_color":"Font Color","property.align":"Align","property.center":"Center","property.image_source":"Image Source","property.image_link":"Image Link","property.alt_text":"Alt Text","property.full_width":"Full Width","property.button_link":"Button Link","property.height":"Height","property.network":"Network","property.label":"Label","property.url":"URL","property.icon":"Icon","property.icon_color":"Icon Color","property.icon_size":"Icon Size","property.icon_padding":"Icon Padding","property.inner_padding":"Inner Padding","property.mode":"Mode","property.custom":"Custom","property.horizontal":"Horizontal","property.vertical":"Vertical","property.repeat":"Repeat","property.no_repeat":"No Repeat","property.auto":"Auto","property.cover":"Cover","property.contain":"Contain","property.button_background_color":"Button Color","property.button_color":"Button Text Color","property.section_background_color":"Section Background Color"}},Symbol.toStringTag,{value:"Module"})),mn=Object.freeze(Object.defineProperty({__proto__:null,default:{"basic.add":"افزودن","basic.edit":"ویرایش","basic.add_component":"افزودن کامپوننت","basic.layout_component":"کامپوننت چیدمان","basic.basic_component":"کامپوننت پایه","basic.empty_body":"صفحه خالی - محتوا را اینجا رها کنید","basic.empty_column":"ستون خالی","basic.empty_section":"بخش خالی - محتوا را اینجا رها کنید","basic.empty_text_plc":"لطفاً متن را وارد کنید","basic.drop_here":"اینجا رها کنید","basic.body_style":"استایل بدنه","basic.public_style":"پیش‌فرض‌های الگو","basic.more_option":"گزینه‌های بیشتر","basic.less_option":"گزینه‌های کمتر","basic.upload_image":"آپلود تصویر","basic.layout":"چیدمان","basic.section_style":"استایل بخش","basic.position":"موقعیت","basic.text_style":"استایل متن","basic.image_style":"استایل تصویر","basic.size":"اندازه","basic.button_style":"استایل دکمه","basic.styles":"استایل‌ها","basic.open_link_new_tab":"باز کردن لینک در تب جدید","basic.divider_style":"استایل خط تقسیم‌کننده","basic.spacer_style":"استایل فضای خالی","basic.content":"محتوا","basic.add_social":"افزودن شبکه اجتماعی","basic.social_style":"استایل شبکه‌های اجتماعی","basic.alt_text_plc":"متن را وارد کنید","basic.social_label_plc":"برچسب شبکه اجتماعی","basic.social_url_plc":"URL شبکه اجتماعی","basic.social_icon_plc":"آیکون شبکه اجتماعی","block.1_column":"1 ستون","block.2_columns":"2 ستون","block.3_columns":"3 ستون","block.4_columns":"4 ستون","block.left_columns":"تقسیم چپ","block.right_columns":"تقسیم راست","block.text":"متن","block.image":"تصویر","block.button":"دکمه","block.divider":"خط تقسیم‌کننده","block.spacer":"فضای خالی","block.social":"شبکه‌های اجتماعی","block.body":"بدنه","block.section":"بخش","property.width":"عرض","property.background_color":"رنگ پس‌زمینه","property.background_image":"تصویر پس‌زمینه","property.background_repeat":"تکرار پس‌زمینه","property.background_size":"اندازه پس‌زمینه","property.border_radius":"شعاع حاشیه","property.border":"حاشیه","property.border_width":"عرض حاشیه","property.border_style":"استایل حاشیه","property.border_color":"رنگ حاشیه","property.padding":"پدینگ","property.top":"بالا","property.right":"راست","property.bottom":"پایین","property.left":"چپ","property.font_family":"خانواده فونت","property.font_size":"اندازه فونت","property.line_height":"ارتفاع خط","property.font_color":"رنگ فونت","property.align":"تراز","property.center":"مرکز","property.image_source":"منبع تصویر","property.image_link":"لینک تصویر","property.alt_text":"متن جایگزین","property.full_width":"عرض کامل","property.button_link":"لینک دکمه","property.height":"ارتفاع","property.network":"شبکه","property.label":"برچسب","property.url":"URL","property.icon":"آیکون","property.icon_color":"رنگ آیکون","property.icon_size":"اندازه آیکون","property.icon_padding":"پدینگ آیکون","property.inner_padding":"پدینگ داخلی","property.mode":"حالت","property.custom":"سفارشی","property.horizontal":"افقی","property.vertical":"عمودی","property.repeat":"تکرار","property.no_repeat":"بدون تکرار","property.auto":"خودکار","property.cover":"پوشش","property.contain":"شامل","property.button_background_color":"رنگ پس‌زمینه دکمه","property.button_color":"رنگ متن دکمه","property.section_background_color":"رنگ پس‌زمینه بخش"}},Symbol.toStringTag,{value:"Module"}));return cn});